Skip to content

Instantly share code, notes, and snippets.

@richo
Last active August 29, 2015 14:22
Show Gist options
  • Select an option

  • Save richo/861d86fbc998f85c3cb8 to your computer and use it in GitHub Desktop.

Select an option

Save richo/861d86fbc998f85c3cb8 to your computer and use it in GitHub Desktop.
.section __TEXT,__text,regular,pure_instructions
.macosx_version_min 10, 10
.globl _main
.align 4, 0x90
_main: ## @main
.cfi_startproc
## BB#0:
pushq %rbp
Ltmp0:
.cfi_def_cfa_offset 16
Ltmp1:
.cfi_offset %rbp, -16
movq %rsp, %rbp
Ltmp2:
.cfi_def_cfa_register %rbp
subq $16, %rsp
movl $1, %edi
leaq L_.str(%rip), %rsi
movl $5, %edx
movb $0, %al
callq _write
xorl %edx, %edx
movl %eax, -4(%rbp) ## 4-byte Spill
movl %edx, %eax
addq $16, %rsp
popq %rbp
retq
.cfi_endproc
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "butts"
.subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions
.macosx_version_min 10, 10
.globl _main
.align 4, 0x90
_main: ## @main
.cfi_startproc
## BB#0:
push rbp
Ltmp0:
.cfi_def_cfa_offset 16
Ltmp1:
.cfi_offset rbp, -16
mov rbp, rsp
Ltmp2:
.cfi_def_cfa_register rbp
sub rsp, 16
mov edi, 1
lea rsi, qword ptr [rip + L_.str]
mov edx, 5
mov al, 0
call _write
xor edx, edx
mov dword ptr [rbp - 4], eax ## 4-byte Spill
mov eax, edx
add rsp, 16
pop rbp
ret
.cfi_endproc
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "butts"
.subsections_via_symbols
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment