Skip to content

Instantly share code, notes, and snippets.

@H2CO3
Created April 20, 2016 22:13
Show Gist options
  • Save H2CO3/4c2c2c30c62d3126d64a82076e991758 to your computer and use it in GitHub Desktop.
Save H2CO3/4c2c2c30c62d3126d64a82076e991758 to your computer and use it in GitHub Desktop.
.section __TEXT,__text,regular,pure_instructions
.macosx_version_min 10, 11
.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
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
Ltmp3:
.cfi_offset %rbx, -40
Ltmp4:
.cfi_offset %r14, -32
Ltmp5:
.cfi_offset %r15, -24
callq __Z7get_setv
movq %rax, %r15
leaq L_.str(%rip), %r14
xorl %ebx, %ebx
.align 4, 0x90
LBB0_1: ## %.preheader
## =>This Inner Loop Header: Depth=1
testb $1, %bl
movl $0, %esi
je LBB0_3
## BB#2: ## in Loop: Header=BB0_1 Depth=1
movl (%r15), %esi
LBB0_3: ## in Loop: Header=BB0_1 Depth=1
testb $2, %bl
je LBB0_5
## BB#4: ## in Loop: Header=BB0_1 Depth=1
addl 4(%r15), %esi
LBB0_5: ## in Loop: Header=BB0_1 Depth=1
testb $4, %bl
je LBB0_7
## BB#6: ## in Loop: Header=BB0_1 Depth=1
addl 8(%r15), %esi
LBB0_7: ## in Loop: Header=BB0_1 Depth=1
testb $8, %bl
je LBB0_9
## BB#8: ## in Loop: Header=BB0_1 Depth=1
addl 12(%r15), %esi
LBB0_9: ## in Loop: Header=BB0_1 Depth=1
testb $16, %bl
je LBB0_11
## BB#10: ## in Loop: Header=BB0_1 Depth=1
addl 16(%r15), %esi
LBB0_11: ## in Loop: Header=BB0_1 Depth=1
xorl %eax, %eax
movq %r14, %rdi
callq _printf
incl %ebx
cmpl $32, %ebx
jne LBB0_1
## BB#12:
xorl %eax, %eax
addq $8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
.cfi_endproc
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "osszeg = %d\n"
.subsections_via_symbols
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment