Skip to content

Instantly share code, notes, and snippets.

@sunnyone
Created October 31, 2011 15:38
Show Gist options
  • Select an option

  • Save sunnyone/1327779 to your computer and use it in GitHub Desktop.

Select an option

Save sunnyone/1327779 to your computer and use it in GitHub Desktop.
irc_message.c assembled by gcc(x86)
irc_message_to_string:
.LFB45:
.loc 1 399 0
.cfi_startproc
.LVL131:
pushl %ebp
.LCFI110:
.cfi_def_cfa_offset 8
.cfi_offset 5, -8
pushl %edi
.LCFI111:
.cfi_def_cfa_offset 12
.cfi_offset 7, -12
pushl %esi
.LCFI112:
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
pushl %ebx
.LCFI113:
.cfi_def_cfa_offset 20
.cfi_offset 3, -20
subl $28, %esp
.LCFI114:
.cfi_def_cfa_offset 48
.loc 1 399 0
movl 48(%esp), %ebp
.LBB75:
.loc 1 404 0
testl %ebp, %ebp
je .L87
.LVL132:
.LBE75:
.LBB76:
.LBB77:
.loc 1 405 0 discriminator 3
call irc_message_get_type
.LVL133:
movl 0(%ebp), %edx
testl %edx, %edx
je .L88
cmpl %eax, (%edx)
je .L89
.L88:
.loc 1 405 0 is_stmt 0 discriminator 4
movl %eax, 4(%esp)
movl %ebp, (%esp)
call g_type_check_instance_is_a
.LVL134:
.LBE77:
testl %eax, %eax
jne .L89
.LVL135:
.LBE76:
.loc 1 405 0
movl $.LC15, 8(%esp)
xorl %esi, %esi
movl $__PRETTY_FUNCTION__.10615, 4(%esp)
movl $.LC3, (%esp)
call g_return_if_fail_warning
.LVL136:
.L101:
.loc 1 431 0 is_stmt 1
addl $28, %esp
.cfi_remember_state
.LCFI115:
.cfi_def_cfa_offset 20
movl %esi, %eax
popl %ebx
.LCFI116:
.cfi_def_cfa_offset 16
.cfi_restore 3
popl %esi
.LCFI117:
.cfi_def_cfa_offset 12
.cfi_restore 6
popl %edi
.LCFI118:
.cfi_def_cfa_offset 8
.cfi_restore 7
popl %ebp
.LCFI119:
.cfi_def_cfa_offset 4
.cfi_restore 5
ret
.LVL137:
.p2align 4,,7
.p2align 3
.L89:
.LCFI120:
.cfi_restore_state
.LBB78:
.loc 1 407 0 discriminator 9
movl 32(%ebp), %ecx
testl %ecx, %ecx
je .L91
.LVL138:
.LBE78:
.LBB79:
.loc 1 408 0 discriminator 3
movl 36(%ebp), %edx
testl %edx, %edx
je .L92
.LVL139:
.LBE79:
.LBB80:
.LBB81:
.loc 1 436 0
movl (%edx), %edi
testl %edi, %edi
je .L93
xorl %edi, %edi
jmp .L94
.LVL140:
.p2align 4,,7
.p2align 3
.L102:
movl %eax, %edi
.LVL141:
.L94:
leal 1(%edi), %eax
.LVL142:
movl (%edx,%eax,4), %esi
testl %esi, %esi
jne .L102
.LBE81:
.LBE80:
.loc 1 412 0
movl %ecx, (%esp)
.loc 1 415 0
xorl %esi, %esi
.loc 1 412 0
call g_string_new
.LVL143:
.loc 1 415 0
testl %edi, %edi
.loc 1 412 0
movl %eax, %ebx
.LVL144:
.loc 1 415 0
jne .L98
jmp .L95
.LVL145:
.p2align 4,,7
.p2align 3
.L106:
.LBB82:
.LBB83:
.file 2 "/usr/include/glib-2.0/glib/gstring.h"
.loc 2 161 0
movl (%ebx), %ecx
movb $32, (%ecx,%eax)
movl %edx, 4(%ebx)
.loc 2 162 0
movl (%ebx), %edx
movb $0, 1(%edx,%eax)
.L97:
.LBE83:
.LBE82:
.loc 1 417 0
movl 36(%ebp), %eax
movl (%eax,%esi,4), %eax
.loc 1 415 0
addl $1, %esi
.loc 1 417 0
movl %ebx, (%esp)
movl %eax, 4(%esp)
call g_string_append
.LVL146:
.loc 1 415 0
cmpl %edi, %esi
je .L105
.LVL147:
.L98:
.LBB87:
.LBB86:
.loc 2 159 0
movl 4(%ebx), %eax
leal 1(%eax), %edx
cmpl 8(%ebx), %edx
jb .L106
.LVL148:
.LBB84:
.LBB85:
.loc 2 165 0
movl $32, 8(%esp)
movl $-1, 4(%esp)
movl %ebx, (%esp)
call g_string_insert_c
jmp .L97
.LVL149:
.p2align 4,,7
.p2align 3
.L105:
.LBE85:
.LBE84:
.LBE86:
.LBE87:
.loc 1 415 0
sall $2, %esi
.LVL150:
.L95:
.loc 1 420 0
movl 36(%ebp), %eax
movl (%eax,%esi), %esi
cmpb $0, (%esi)
je .L99
.loc 1 420 0 is_stmt 0 discriminator 1
movl $32, 4(%esp)
movl %esi, (%esp)
call strchr
testl %eax, %eax
je .L107
.L99:
.loc 1 423 0 is_stmt 1
movl %esi, 8(%esp)
movl $.LC20, 4(%esp)
movl %ebx, (%esp)
call g_string_append_printf
.L100:
.loc 1 427 0
movl (%ebx), %esi
.LVL151:
.loc 1 428 0
movl %ebx, (%esp)
movl $0, 4(%esp)
call g_string_free
.LVL152:
.loc 1 431 0
addl $28, %esp
.cfi_remember_state
.LCFI121:
.cfi_def_cfa_offset 20
popl %ebx
.cfi_restore 3
.LCFI122:
.cfi_def_cfa_offset 16
.LVL153:
movl %esi, %eax
popl %esi
.cfi_restore 6
.LCFI123:
.cfi_def_cfa_offset 12
.LVL154:
popl %edi
.cfi_restore 7
.LCFI124:
.cfi_def_cfa_offset 8
popl %ebp
.cfi_restore 5
.LCFI125:
.cfi_def_cfa_offset 4
ret
.LVL155:
.L91:
.LCFI126:
.cfi_restore_state
.loc 1 407 0
movl $.LC21, 8(%esp)
xorl %esi, %esi
movl $__PRETTY_FUNCTION__.10615, 4(%esp)
movl $.LC3, (%esp)
call g_return_if_fail_warning
.loc 1 431 0
addl $28, %esp
.cfi_remember_state
.LCFI127:
.cfi_def_cfa_offset 20
movl %esi, %eax
popl %ebx
.cfi_restore 3
.LCFI128:
.cfi_def_cfa_offset 16
popl %esi
.cfi_restore 6
.LCFI129:
.cfi_def_cfa_offset 12
popl %edi
.cfi_restore 7
.LCFI130:
.cfi_def_cfa_offset 8
popl %ebp
.cfi_restore 5
.LCFI131:
.cfi_def_cfa_offset 4
ret
.LVL156:
.p2align 4,,7
.p2align 3
.L87:
.LCFI132:
.cfi_restore_state
.loc 1 404 0
movl $.LC14, 8(%esp)
xorl %esi, %esi
movl $__PRETTY_FUNCTION__.10615, 4(%esp)
movl $.LC3, (%esp)
call g_return_if_fail_warning
jmp .L101
.LVL157:
.p2align 4,,7
.p2align 3
.L92:
.loc 1 408 0
movl $.LC22, 8(%esp)
xorl %esi, %esi
movl $__PRETTY_FUNCTION__.10615, 4(%esp)
movl $.LC3, (%esp)
call g_return_if_fail_warning
jmp .L101
.LVL158:
.L93:
.loc 1 412 0
movl %ecx, (%esp)
call g_string_new
movl %eax, %ebx
.LVL159:
.p2align 4,,3
jmp .L100
.LVL160:
.L107:
.loc 1 421 0
movl %esi, 8(%esp)
movl $.LC19, 4(%esp)
movl %ebx, (%esp)
call g_string_append_printf
jmp .L100
.cfi_endproc
.LFE45:
.size irc_message_to_string, .-irc_message_to_string
.p2align 4,,15
.globl irc_message_count_parameters
.type irc_message_count_parameters, @function
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment