Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ==> powersoftwo-1-c2.s <===================================================
- .section __TEXT,__text,regular,pure_instructions
- .globl _isPowerOfTwo
- _isPowerOfTwo: ## @isPowerOfTwo
- Ltmp2:
- .cfi_startproc
- ## BB#0: ## %entry
- pushq %rbp
- Ltmp3:
- .cfi_def_cfa_offset 16
- Ltmp4:
- .cfi_offset %rbp, -16
- movq %rsp, %rbp
- Ltmp5:
- .cfi_def_cfa_register %rbp
- testb $1, %dil
- je LBB0_2
- LBB0_1:
- movl %edi, %eax
- jmp LBB0_5
- LBB0_2: ## %entry
- cmpl $2, %edi
- jb LBB0_1
- LBB0_3: ## %while.body
- ## =>This Inner Loop Header: Depth=1
- movl %edi, %eax
- shrl %eax
- btl $1, %edi
- jb LBB0_5
- ## BB#4: ## %while.body
- ## in Loop: Header=BB0_3 Depth=1
- cmpl $3, %edi
- movl %eax, %edi
- ja LBB0_3
- LBB0_5: ## %while.end
- cmpl $1, %eax
- sete %al
- movzbl %al, %eax
- popq %rbp
- ret
- Ltmp6:
- .cfi_endproc
- Leh_func_end0:
- .globl _main
- _main: ## @main
- Ltmp10:
- .cfi_startproc
- ## BB#0: ## %entry
- pushq %rbp
- Ltmp11:
- .cfi_def_cfa_offset 16
- Ltmp12:
- .cfi_offset %rbp, -16
- movq %rsp, %rbp
- Ltmp13:
- .cfi_def_cfa_register %rbp
- pushq %r14
- pushq %rbx
- Ltmp14:
- .cfi_offset %rbx, -32
- Ltmp15:
- .cfi_offset %r14, -24
- callq _mach_absolute_time
- movq %rax, %r14
- xorl %eax, %eax
- movl %eax, %ebx
- LBB1_1: ## %for.body
- ## =>This Loop Header: Depth=1
- ## Child Loop BB1_3 Depth 2
- movl %ebx, %ecx
- testb $1, %al
- movl %eax, %edx
- jne LBB1_5
- ## BB#2: ## %for.body
- ## in Loop: Header=BB1_1 Depth=1
- cmpl $2, %eax
- movl %eax, %esi
- movl %eax, %edx
- jb LBB1_5
- LBB1_3: ## %while.body.i
- ## Parent Loop BB1_1 Depth=1
- ## => This Inner Loop Header: Depth=2
- movl %esi, %edx
- shrl %edx
- btl $1, %esi
- jb LBB1_5
- ## BB#4: ## %while.body.i
- ## in Loop: Header=BB1_3 Depth=2
- cmpl $3, %esi
- movl %edx, %esi
- ja LBB1_3
- LBB1_5: ## %isPowerOfTwo.exit
- ## in Loop: Header=BB1_1 Depth=1
- cmpl $1, %edx
- sete %dl
- movzbl %dl, %ebx
- addl %ecx, %ebx
- incl %eax
- cmpl $-1, %eax
- jne LBB1_1
- ## BB#6: ## %for.end
- callq _mach_absolute_time
- subq %r14, %rax
- leaq L_.str(%rip), %rdi
- movl %ebx, %esi
- movq %rax, %rdx
- xorb %al, %al
- callq _printf
- xorl %eax, %eax
- popq %rbx
- popq %r14
- popq %rbp
- ret
- Ltmp16:
- .cfi_endproc
- Leh_func_end1:
- .section __TEXT,__cstring,cstring_literals
- L_.str: ## @.str
- .asciz "%d powers of two found in %lu ns\n"
- .subsections_via_symbols
- ==> powersoftwo-1-i7.s <===================================================
- .section __TEXT,__text,regular,pure_instructions
- .globl _isPowerOfTwo
- _isPowerOfTwo: ## @isPowerOfTwo
- Ltmp2:
- .cfi_startproc
- ## BB#0: ## %entry
- pushq %rbp
- Ltmp3:
- .cfi_def_cfa_offset 16
- Ltmp4:
- .cfi_offset %rbp, -16
- movq %rsp, %rbp
- Ltmp5:
- .cfi_def_cfa_register %rbp
- testb $1, %dil
- je LBB0_2
- LBB0_1:
- movl %edi, %eax
- jmp LBB0_5
- LBB0_2: ## %entry
- cmpl $2, %edi
- jb LBB0_1
- LBB0_3: ## %while.body
- ## =>This Inner Loop Header: Depth=1
- movl %edi, %eax
- shrl %eax
- btl $1, %edi
- jb LBB0_5
- ## BB#4: ## %while.body
- ## in Loop: Header=BB0_3 Depth=1
- cmpl $3, %edi
- movl %eax, %edi
- ja LBB0_3
- LBB0_5: ## %while.end
- cmpl $1, %eax
- sete %al
- movzbl %al, %eax
- popq %rbp
- ret
- Ltmp6:
- .cfi_endproc
- Leh_func_end0:
- .globl _main
- _main: ## @main
- Ltmp10:
- .cfi_startproc
- ## BB#0: ## %entry
- pushq %rbp
- Ltmp11:
- .cfi_def_cfa_offset 16
- Ltmp12:
- .cfi_offset %rbp, -16
- movq %rsp, %rbp
- Ltmp13:
- .cfi_def_cfa_register %rbp
- pushq %r14
- pushq %rbx
- Ltmp14:
- .cfi_offset %rbx, -32
- Ltmp15:
- .cfi_offset %r14, -24
- callq _mach_absolute_time
- movq %rax, %r14
- xorl %eax, %eax
- movl %eax, %ebx
- LBB1_1: ## %for.body
- ## =>This Loop Header: Depth=1
- ## Child Loop BB1_3 Depth 2
- movl %ebx, %ecx
- testb $1, %al
- movl %eax, %edx
- jne LBB1_5
- ## BB#2: ## %for.body
- ## in Loop: Header=BB1_1 Depth=1
- cmpl $2, %eax
- movl %eax, %esi
- movl %eax, %edx
- jb LBB1_5
- LBB1_3: ## %while.body.i
- ## Parent Loop BB1_1 Depth=1
- ## => This Inner Loop Header: Depth=2
- movl %esi, %edx
- shrl %edx
- btl $1, %esi
- jb LBB1_5
- ## BB#4: ## %while.body.i
- ## in Loop: Header=BB1_3 Depth=2
- cmpl $3, %esi
- movl %edx, %esi
- ja LBB1_3
- LBB1_5: ## %isPowerOfTwo.exit
- ## in Loop: Header=BB1_1 Depth=1
- cmpl $1, %edx
- sete %dl
- movzbl %dl, %ebx
- addl %ecx, %ebx
- incl %eax
- cmpl $-1, %eax
- jne LBB1_1
- ## BB#6: ## %for.end
- callq _mach_absolute_time
- subq %r14, %rax
- leaq L_.str(%rip), %rdi
- movl %ebx, %esi
- movq %rax, %rdx
- xorb %al, %al
- callq _printf
- xorl %eax, %eax
- popq %rbx
- popq %r14
- popq %rbp
- ret
- Ltmp16:
- .cfi_endproc
- Leh_func_end1:
- .section __TEXT,__cstring,cstring_literals
- L_.str: ## @.str
- .asciz "%d powers of two found in %lu ns\n"
- .subsections_via_symbols
- ==> powersoftwo-2-c2.s <===================================================
- .section __TEXT,__text,regular,pure_instructions
- .globl _isPowerOfTwo
- _isPowerOfTwo: ## @isPowerOfTwo
- Ltmp2:
- .cfi_startproc
- ## BB#0: ## %entry
- pushq %rbp
- Ltmp3:
- .cfi_def_cfa_offset 16
- Ltmp4:
- .cfi_offset %rbp, -16
- movq %rsp, %rbp
- Ltmp5:
- .cfi_def_cfa_register %rbp
- leal -1(%rdi), %ecx
- movb $1, %al
- cmpl $2, %ecx
- jb LBB0_31
- ## BB#1: ## %entry
- cmpl $4, %edi
- je LBB0_31
- ## BB#2: ## %entry
- cmpl $8, %edi
- je LBB0_31
- ## BB#3: ## %entry
- cmpl $16, %edi
- je LBB0_31
- ## BB#4: ## %entry
- cmpl $32, %edi
- je LBB0_31
- ## BB#5: ## %entry
- cmpl $64, %edi
- je LBB0_31
- ## BB#6: ## %entry
- cmpl $128, %edi
- je LBB0_31
- ## BB#7: ## %entry
- cmpl $256, %edi ## imm = 0x100
- je LBB0_31
- ## BB#8: ## %entry
- cmpl $512, %edi ## imm = 0x200
- je LBB0_31
- ## BB#9: ## %entry
- cmpl $1024, %edi ## imm = 0x400
- je LBB0_31
- ## BB#10: ## %entry
- cmpl $2048, %edi ## imm = 0x800
- je LBB0_31
- ## BB#11: ## %entry
- cmpl $4096, %edi ## imm = 0x1000
- je LBB0_31
- ## BB#12: ## %entry
- cmpl $8192, %edi ## imm = 0x2000
- je LBB0_31
- ## BB#13: ## %entry
- cmpl $16384, %edi ## imm = 0x4000
- je LBB0_31
- ## BB#14: ## %entry
- cmpl $32768, %edi ## imm = 0x8000
- je LBB0_31
- ## BB#15: ## %entry
- cmpl $65536, %edi ## imm = 0x10000
- je LBB0_31
- ## BB#16: ## %entry
- cmpl $131072, %edi ## imm = 0x20000
- je LBB0_31
- ## BB#17: ## %entry
- cmpl $262144, %edi ## imm = 0x40000
- je LBB0_31
- ## BB#18: ## %entry
- cmpl $524288, %edi ## imm = 0x80000
- je LBB0_31
- ## BB#19: ## %entry
- cmpl $1048576, %edi ## imm = 0x100000
- je LBB0_31
- ## BB#20: ## %entry
- cmpl $2097152, %edi ## imm = 0x200000
- je LBB0_31
- ## BB#21: ## %entry
- cmpl $4194304, %edi ## imm = 0x400000
- je LBB0_31
- ## BB#22: ## %entry
- cmpl $8388608, %edi ## imm = 0x800000
- je LBB0_31
- ## BB#23: ## %entry
- cmpl $16777216, %edi ## imm = 0x1000000
- je LBB0_31
- ## BB#24: ## %entry
- cmpl $33554432, %edi ## imm = 0x2000000
- je LBB0_31
- ## BB#25: ## %entry
- cmpl $67108864, %edi ## imm = 0x4000000
- je LBB0_31
- ## BB#26: ## %entry
- cmpl $134217728, %edi ## imm = 0x8000000
- je LBB0_31
- ## BB#27: ## %entry
- cmpl $268435456, %edi ## imm = 0x10000000
- je LBB0_31
- ## BB#28: ## %entry
- cmpl $536870912, %edi ## imm = 0x20000000
- je LBB0_31
- ## BB#29: ## %entry
- cmpl $1073741824, %edi ## imm = 0x40000000
- je LBB0_31
- ## BB#30: ## %lor.rhs
- cmpl $-2147483648, %edi ## imm = 0xFFFFFFFF80000000
- sete %al
- LBB0_31: ## %lor.end
- movzbl %al, %eax
- popq %rbp
- ret
- Ltmp6:
- .cfi_endproc
- Leh_func_end0:
- .globl _main
- _main: ## @main
- Ltmp10:
- .cfi_startproc
- ## BB#0: ## %entry
- pushq %rbp
- Ltmp11:
- .cfi_def_cfa_offset 16
- Ltmp12:
- .cfi_offset %rbp, -16
- movq %rsp, %rbp
- Ltmp13:
- .cfi_def_cfa_register %rbp
- pushq %r15
- pushq %r14
- pushq %rbx
- pushq %rax
- Ltmp14:
- .cfi_offset %rbx, -40
- Ltmp15:
- .cfi_offset %r14, -32
- Ltmp16:
- .cfi_offset %r15, -24
- callq _mach_absolute_time
- movq %rax, %r14
- xorl %r15d, %r15d
- movl %r15d, %ebx
- LBB1_1: ## %for.body
- ## =>This Inner Loop Header: Depth=1
- movl %r15d, %edi
- callq _isPowerOfTwo
- cmpl $1, %eax
- sbbl $-1, %ebx
- incl %r15d
- cmpl $-1, %r15d
- jne LBB1_1
- ## BB#2: ## %for.end
- callq _mach_absolute_time
- subq %r14, %rax
- leaq L_.str(%rip), %rdi
- movl %ebx, %esi
- movq %rax, %rdx
- xorb %al, %al
- callq _printf
- xorl %eax, %eax
- addq $8, %rsp
- popq %rbx
- popq %r14
- popq %r15
- popq %rbp
- ret
- Ltmp17:
- .cfi_endproc
- Leh_func_end1:
- .section __TEXT,__cstring,cstring_literals
- L_.str: ## @.str
- .asciz "%d powers of two found in %lu ns\n"
- .subsections_via_symbols
- ==> powersoftwo-2-i7.s <===================================================
- .section __TEXT,__text,regular,pure_instructions
- .globl _isPowerOfTwo
- _isPowerOfTwo: ## @isPowerOfTwo
- Ltmp2:
- .cfi_startproc
- ## BB#0: ## %entry
- pushq %rbp
- Ltmp3:
- .cfi_def_cfa_offset 16
- Ltmp4:
- .cfi_offset %rbp, -16
- movq %rsp, %rbp
- Ltmp5:
- .cfi_def_cfa_register %rbp
- leal -1(%rdi), %ecx
- movb $1, %al
- cmpl $2, %ecx
- jb LBB0_31
- ## BB#1: ## %entry
- cmpl $4, %edi
- je LBB0_31
- ## BB#2: ## %entry
- cmpl $8, %edi
- je LBB0_31
- ## BB#3: ## %entry
- cmpl $16, %edi
- je LBB0_31
- ## BB#4: ## %entry
- cmpl $32, %edi
- je LBB0_31
- ## BB#5: ## %entry
- cmpl $64, %edi
- je LBB0_31
- ## BB#6: ## %entry
- cmpl $128, %edi
- je LBB0_31
- ## BB#7: ## %entry
- cmpl $256, %edi ## imm = 0x100
- je LBB0_31
- ## BB#8: ## %entry
- cmpl $512, %edi ## imm = 0x200
- je LBB0_31
- ## BB#9: ## %entry
- cmpl $1024, %edi ## imm = 0x400
- je LBB0_31
- ## BB#10: ## %entry
- cmpl $2048, %edi ## imm = 0x800
- je LBB0_31
- ## BB#11: ## %entry
- cmpl $4096, %edi ## imm = 0x1000
- je LBB0_31
- ## BB#12: ## %entry
- cmpl $8192, %edi ## imm = 0x2000
- je LBB0_31
- ## BB#13: ## %entry
- cmpl $16384, %edi ## imm = 0x4000
- je LBB0_31
- ## BB#14: ## %entry
- cmpl $32768, %edi ## imm = 0x8000
- je LBB0_31
- ## BB#15: ## %entry
- cmpl $65536, %edi ## imm = 0x10000
- je LBB0_31
- ## BB#16: ## %entry
- cmpl $131072, %edi ## imm = 0x20000
- je LBB0_31
- ## BB#17: ## %entry
- cmpl $262144, %edi ## imm = 0x40000
- je LBB0_31
- ## BB#18: ## %entry
- cmpl $524288, %edi ## imm = 0x80000
- je LBB0_31
- ## BB#19: ## %entry
- cmpl $1048576, %edi ## imm = 0x100000
- je LBB0_31
- ## BB#20: ## %entry
- cmpl $2097152, %edi ## imm = 0x200000
- je LBB0_31
- ## BB#21: ## %entry
- cmpl $4194304, %edi ## imm = 0x400000
- je LBB0_31
- ## BB#22: ## %entry
- cmpl $8388608, %edi ## imm = 0x800000
- je LBB0_31
- ## BB#23: ## %entry
- cmpl $16777216, %edi ## imm = 0x1000000
- je LBB0_31
- ## BB#24: ## %entry
- cmpl $33554432, %edi ## imm = 0x2000000
- je LBB0_31
- ## BB#25: ## %entry
- cmpl $67108864, %edi ## imm = 0x4000000
- je LBB0_31
- ## BB#26: ## %entry
- cmpl $134217728, %edi ## imm = 0x8000000
- je LBB0_31
- ## BB#27: ## %entry
- cmpl $268435456, %edi ## imm = 0x10000000
- je LBB0_31
- ## BB#28: ## %entry
- cmpl $536870912, %edi ## imm = 0x20000000
- je LBB0_31
- ## BB#29: ## %entry
- cmpl $1073741824, %edi ## imm = 0x40000000
- je LBB0_31
- ## BB#30: ## %lor.rhs
- cmpl $-2147483648, %edi ## imm = 0xFFFFFFFF80000000
- sete %al
- LBB0_31: ## %lor.end
- movzbl %al, %eax
- popq %rbp
- ret
- Ltmp6:
- .cfi_endproc
- Leh_func_end0:
- .globl _main
- _main: ## @main
- Ltmp10:
- .cfi_startproc
- ## BB#0: ## %entry
- pushq %rbp
- Ltmp11:
- .cfi_def_cfa_offset 16
- Ltmp12:
- .cfi_offset %rbp, -16
- movq %rsp, %rbp
- Ltmp13:
- .cfi_def_cfa_register %rbp
- pushq %r15
- pushq %r14
- pushq %rbx
- pushq %rax
- Ltmp14:
- .cfi_offset %rbx, -40
- Ltmp15:
- .cfi_offset %r14, -32
- Ltmp16:
- .cfi_offset %r15, -24
- callq _mach_absolute_time
- movq %rax, %r14
- xorl %r15d, %r15d
- movl %r15d, %ebx
- LBB1_1: ## %for.body
- ## =>This Inner Loop Header: Depth=1
- movl %r15d, %edi
- callq _isPowerOfTwo
- cmpl $1, %eax
- sbbl $-1, %ebx
- incl %r15d
- cmpl $-1, %r15d
- jne LBB1_1
- ## BB#2: ## %for.end
- callq _mach_absolute_time
- subq %r14, %rax
- leaq L_.str(%rip), %rdi
- movl %ebx, %esi
- movq %rax, %rdx
- xorb %al, %al
- callq _printf
- xorl %eax, %eax
- addq $8, %rsp
- popq %rbx
- popq %r14
- popq %r15
- popq %rbp
- ret
- Ltmp17:
- .cfi_endproc
- Leh_func_end1:
- .section __TEXT,__cstring,cstring_literals
- L_.str: ## @.str
- .asciz "%d powers of two found in %lu ns\n"
- .subsections_via_symbols
- ==> powersoftwo-3-c2.s <===================================================
- .section __TEXT,__text,regular,pure_instructions
- .globl _isPowerOfTwo
- _isPowerOfTwo: ## @isPowerOfTwo
- Ltmp2:
- .cfi_startproc
- ## BB#0: ## %entry
- pushq %rbp
- Ltmp3:
- .cfi_def_cfa_offset 16
- Ltmp4:
- .cfi_offset %rbp, -16
- movq %rsp, %rbp
- Ltmp5:
- .cfi_def_cfa_register %rbp
- movl $1, %eax
- cmpl $2, %edi
- jb LBB0_3
- LBB0_1: ## %while.body
- ## =>This Inner Loop Header: Depth=1
- addl %eax, %eax
- cmpl %edi, %eax
- jae LBB0_3
- ## BB#2: ## %while.body
- ## in Loop: Header=BB0_1 Depth=1
- testl %eax, %eax
- jns LBB0_1
- LBB0_3: ## %while.end
- cmpl %edi, %eax
- sete %al
- movzbl %al, %eax
- popq %rbp
- ret
- Ltmp6:
- .cfi_endproc
- Leh_func_end0:
- .globl _main
- _main: ## @main
- Ltmp10:
- .cfi_startproc
- ## BB#0: ## %entry
- pushq %rbp
- Ltmp11:
- .cfi_def_cfa_offset 16
- Ltmp12:
- .cfi_offset %rbp, -16
- movq %rsp, %rbp
- Ltmp13:
- .cfi_def_cfa_register %rbp
- pushq %r14
- pushq %rbx
- Ltmp14:
- .cfi_offset %rbx, -32
- Ltmp15:
- .cfi_offset %r14, -24
- callq _mach_absolute_time
- movq %rax, %r14
- xorl %eax, %eax
- movl %eax, %ebx
- LBB1_1: ## %for.body
- ## =>This Loop Header: Depth=1
- ## Child Loop BB1_2 Depth 2
- movl %ebx, %ecx
- movl $1, %edx
- cmpl $2, %eax
- jb LBB1_4
- LBB1_2: ## %while.body.i
- ## Parent Loop BB1_1 Depth=1
- ## => This Inner Loop Header: Depth=2
- addl %edx, %edx
- cmpl %eax, %edx
- jae LBB1_4
- ## BB#3: ## %while.body.i
- ## in Loop: Header=BB1_2 Depth=2
- testl %edx, %edx
- jns LBB1_2
- LBB1_4: ## %isPowerOfTwo.exit
- ## in Loop: Header=BB1_1 Depth=1
- cmpl %edx, %eax
- sete %dl
- movzbl %dl, %ebx
- addl %ecx, %ebx
- incl %eax
- cmpl $-1, %eax
- jne LBB1_1
- ## BB#5: ## %for.end
- callq _mach_absolute_time
- subq %r14, %rax
- leaq L_.str(%rip), %rdi
- movl %ebx, %esi
- movq %rax, %rdx
- xorb %al, %al
- callq _printf
- xorl %eax, %eax
- popq %rbx
- popq %r14
- popq %rbp
- ret
- Ltmp16:
- .cfi_endproc
- Leh_func_end1:
- .section __TEXT,__cstring,cstring_literals
- L_.str: ## @.str
- .asciz "%d powers of two found in %lu ns\n"
- .subsections_via_symbols
- ==> powersoftwo-3-i7.s <===================================================
- .section __TEXT,__text,regular,pure_instructions
- .globl _isPowerOfTwo
- _isPowerOfTwo: ## @isPowerOfTwo
- Ltmp2:
- .cfi_startproc
- ## BB#0: ## %entry
- pushq %rbp
- Ltmp3:
- .cfi_def_cfa_offset 16
- Ltmp4:
- .cfi_offset %rbp, -16
- movq %rsp, %rbp
- Ltmp5:
- .cfi_def_cfa_register %rbp
- movl $1, %eax
- cmpl $2, %edi
- jb LBB0_3
- LBB0_1: ## %while.body
- ## =>This Inner Loop Header: Depth=1
- addl %eax, %eax
- cmpl %edi, %eax
- jae LBB0_3
- ## BB#2: ## %while.body
- ## in Loop: Header=BB0_1 Depth=1
- testl %eax, %eax
- jns LBB0_1
- LBB0_3: ## %while.end
- cmpl %edi, %eax
- sete %al
- movzbl %al, %eax
- popq %rbp
- ret
- Ltmp6:
- .cfi_endproc
- Leh_func_end0:
- .globl _main
- _main: ## @main
- Ltmp10:
- .cfi_startproc
- ## BB#0: ## %entry
- pushq %rbp
- Ltmp11:
- .cfi_def_cfa_offset 16
- Ltmp12:
- .cfi_offset %rbp, -16
- movq %rsp, %rbp
- Ltmp13:
- .cfi_def_cfa_register %rbp
- pushq %r14
- pushq %rbx
- Ltmp14:
- .cfi_offset %rbx, -32
- Ltmp15:
- .cfi_offset %r14, -24
- callq _mach_absolute_time
- movq %rax, %r14
- xorl %eax, %eax
- movl %eax, %ebx
- LBB1_1: ## %for.body
- ## =>This Loop Header: Depth=1
- ## Child Loop BB1_2 Depth 2
- movl %ebx, %ecx
- movl $1, %edx
- cmpl $2, %eax
- jb LBB1_4
- LBB1_2: ## %while.body.i
- ## Parent Loop BB1_1 Depth=1
- ## => This Inner Loop Header: Depth=2
- addl %edx, %edx
- cmpl %eax, %edx
- jae LBB1_4
- ## BB#3: ## %while.body.i
- ## in Loop: Header=BB1_2 Depth=2
- testl %edx, %edx
- jns LBB1_2
- LBB1_4: ## %isPowerOfTwo.exit
- ## in Loop: Header=BB1_1 Depth=1
- cmpl %edx, %eax
- sete %dl
- movzbl %dl, %ebx
- addl %ecx, %ebx
- incl %eax
- cmpl $-1, %eax
- jne LBB1_1
- ## BB#5: ## %for.end
- callq _mach_absolute_time
- subq %r14, %rax
- leaq L_.str(%rip), %rdi
- movl %ebx, %esi
- movq %rax, %rdx
- xorb %al, %al
- callq _printf
- xorl %eax, %eax
- popq %rbx
- popq %r14
- popq %rbp
- ret
- Ltmp16:
- .cfi_endproc
- Leh_func_end1:
- .section __TEXT,__cstring,cstring_literals
- L_.str: ## @.str
- .asciz "%d powers of two found in %lu ns\n"
- .subsections_via_symbols
- ==> powersoftwo-4-c2.s <===================================================
- .section __TEXT,__text,regular,pure_instructions
- .globl _isPowerOfTwo
- _isPowerOfTwo: ## @isPowerOfTwo
- Ltmp2:
- .cfi_startproc
- ## BB#0: ## %entry
- pushq %rbp
- Ltmp3:
- .cfi_def_cfa_offset 16
- Ltmp4:
- .cfi_offset %rbp, -16
- movq %rsp, %rbp
- Ltmp5:
- .cfi_def_cfa_register %rbp
- movl $1, %eax
- cmpl $2, %edi
- jb LBB0_4
- ## BB#1:
- movl $1, %ecx
- leaq _isPowerOfTwo.powersOfTwo(%rip), %rdx
- LBB0_2: ## %while.body
- ## =>This Inner Loop Header: Depth=1
- movl (%rdx,%rcx,4), %eax
- cmpl %edi, %eax
- jae LBB0_4
- ## BB#3: ## %while.body
- ## in Loop: Header=BB0_2 Depth=1
- movq %rcx, %rsi
- incq %rsi
- cmpl $31, %ecx
- movq %rsi, %rcx
- jl LBB0_2
- LBB0_4: ## %while.end
- cmpl %edi, %eax
- sete %al
- movzbl %al, %eax
- popq %rbp
- ret
- Ltmp6:
- .cfi_endproc
- Leh_func_end0:
- .globl _main
- _main: ## @main
- Ltmp10:
- .cfi_startproc
- ## BB#0: ## %entry
- pushq %rbp
- Ltmp11:
- .cfi_def_cfa_offset 16
- Ltmp12:
- .cfi_offset %rbp, -16
- movq %rsp, %rbp
- Ltmp13:
- .cfi_def_cfa_register %rbp
- pushq %r14
- pushq %rbx
- Ltmp14:
- .cfi_offset %rbx, -32
- Ltmp15:
- .cfi_offset %r14, -24
- callq _mach_absolute_time
- movq %rax, %r14
- xorl %eax, %eax
- leaq _isPowerOfTwo.powersOfTwo(%rip), %rcx
- movl %eax, %ebx
- LBB1_1: ## %for.body
- ## =>This Loop Header: Depth=1
- ## Child Loop BB1_2 Depth 2
- movl %ebx, %edx
- movl $1, %esi
- movl $1, %ebx
- cmpl $2, %eax
- jb LBB1_4
- LBB1_2: ## %while.body.i
- ## Parent Loop BB1_1 Depth=1
- ## => This Inner Loop Header: Depth=2
- movl (%rcx,%rbx,4), %esi
- cmpl %eax, %esi
- jae LBB1_4
- ## BB#3: ## %while.body.i
- ## in Loop: Header=BB1_2 Depth=2
- movq %rbx, %rdi
- incq %rdi
- cmpl $31, %ebx
- movq %rdi, %rbx
- jl LBB1_2
- LBB1_4: ## %isPowerOfTwo.exit
- ## in Loop: Header=BB1_1 Depth=1
- cmpl %esi, %eax
- sete %bl
- movzbl %bl, %ebx
- addl %edx, %ebx
- incl %eax
- cmpl $-1, %eax
- jne LBB1_1
- ## BB#5: ## %for.end
- callq _mach_absolute_time
- subq %r14, %rax
- leaq L_.str(%rip), %rdi
- movl %ebx, %esi
- movq %rax, %rdx
- xorb %al, %al
- callq _printf
- xorl %eax, %eax
- popq %rbx
- popq %r14
- popq %rbp
- ret
- Ltmp16:
- .cfi_endproc
- Leh_func_end1:
- .section __TEXT,__const
- .align 4 ## @isPowerOfTwo.powersOfTwo
- _isPowerOfTwo.powersOfTwo:
- .long 1 ## 0x1
- .long 2 ## 0x2
- .long 4 ## 0x4
- .long 8 ## 0x8
- .long 16 ## 0x10
- .long 32 ## 0x20
- .long 64 ## 0x40
- .long 128 ## 0x80
- .long 256 ## 0x100
- .long 512 ## 0x200
- .long 1024 ## 0x400
- .long 2048 ## 0x800
- .long 4096 ## 0x1000
- .long 8192 ## 0x2000
- .long 16384 ## 0x4000
- .long 32768 ## 0x8000
- .long 65536 ## 0x10000
- .long 131072 ## 0x20000
- .long 262144 ## 0x40000
- .long 524288 ## 0x80000
- .long 1048576 ## 0x100000
- .long 2097152 ## 0x200000
- .long 4194304 ## 0x400000
- .long 8388608 ## 0x800000
- .long 16777216 ## 0x1000000
- .long 33554432 ## 0x2000000
- .long 67108864 ## 0x4000000
- .long 134217728 ## 0x8000000
- .long 268435456 ## 0x10000000
- .long 536870912 ## 0x20000000
- .long 1073741824 ## 0x40000000
- .long 2147483648 ## 0x80000000
- .section __TEXT,__cstring,cstring_literals
- L_.str: ## @.str
- .asciz "%d powers of two found in %lu ns\n"
- .subsections_via_symbols
- ==> powersoftwo-4-i7.s <===================================================
- .section __TEXT,__text,regular,pure_instructions
- .globl _isPowerOfTwo
- _isPowerOfTwo: ## @isPowerOfTwo
- Ltmp2:
- .cfi_startproc
- ## BB#0: ## %entry
- pushq %rbp
- Ltmp3:
- .cfi_def_cfa_offset 16
- Ltmp4:
- .cfi_offset %rbp, -16
- movq %rsp, %rbp
- Ltmp5:
- .cfi_def_cfa_register %rbp
- movl $1, %eax
- cmpl $2, %edi
- jb LBB0_4
- ## BB#1:
- movl $1, %ecx
- leaq _isPowerOfTwo.powersOfTwo(%rip), %rdx
- LBB0_2: ## %while.body
- ## =>This Inner Loop Header: Depth=1
- movl (%rdx,%rcx,4), %eax
- cmpl %edi, %eax
- jae LBB0_4
- ## BB#3: ## %while.body
- ## in Loop: Header=BB0_2 Depth=1
- movq %rcx, %rsi
- incq %rsi
- cmpl $31, %ecx
- movq %rsi, %rcx
- jl LBB0_2
- LBB0_4: ## %while.end
- cmpl %edi, %eax
- sete %al
- movzbl %al, %eax
- popq %rbp
- ret
- Ltmp6:
- .cfi_endproc
- Leh_func_end0:
- .globl _main
- _main: ## @main
- Ltmp10:
- .cfi_startproc
- ## BB#0: ## %entry
- pushq %rbp
- Ltmp11:
- .cfi_def_cfa_offset 16
- Ltmp12:
- .cfi_offset %rbp, -16
- movq %rsp, %rbp
- Ltmp13:
- .cfi_def_cfa_register %rbp
- pushq %r14
- pushq %rbx
- Ltmp14:
- .cfi_offset %rbx, -32
- Ltmp15:
- .cfi_offset %r14, -24
- callq _mach_absolute_time
- movq %rax, %r14
- xorl %eax, %eax
- leaq _isPowerOfTwo.powersOfTwo(%rip), %rcx
- movl %eax, %ebx
- LBB1_1: ## %for.body
- ## =>This Loop Header: Depth=1
- ## Child Loop BB1_2 Depth 2
- movl %ebx, %edx
- movl $1, %esi
- movl $1, %ebx
- cmpl $2, %eax
- jb LBB1_4
- LBB1_2: ## %while.body.i
- ## Parent Loop BB1_1 Depth=1
- ## => This Inner Loop Header: Depth=2
- movl (%rcx,%rbx,4), %esi
- cmpl %eax, %esi
- jae LBB1_4
- ## BB#3: ## %while.body.i
- ## in Loop: Header=BB1_2 Depth=2
- movq %rbx, %rdi
- incq %rdi
- cmpl $31, %ebx
- movq %rdi, %rbx
- jl LBB1_2
- LBB1_4: ## %isPowerOfTwo.exit
- ## in Loop: Header=BB1_1 Depth=1
- cmpl %esi, %eax
- sete %bl
- movzbl %bl, %ebx
- addl %edx, %ebx
- incl %eax
- cmpl $-1, %eax
- jne LBB1_1
- ## BB#5: ## %for.end
- callq _mach_absolute_time
- subq %r14, %rax
- leaq L_.str(%rip), %rdi
- movl %ebx, %esi
- movq %rax, %rdx
- xorb %al, %al
- callq _printf
- xorl %eax, %eax
- popq %rbx
- popq %r14
- popq %rbp
- ret
- Ltmp16:
- .cfi_endproc
- Leh_func_end1:
- .section __TEXT,__const
- .align 4 ## @isPowerOfTwo.powersOfTwo
- _isPowerOfTwo.powersOfTwo:
- .long 1 ## 0x1
- .long 2 ## 0x2
- .long 4 ## 0x4
- .long 8 ## 0x8
- .long 16 ## 0x10
- .long 32 ## 0x20
- .long 64 ## 0x40
- .long 128 ## 0x80
- .long 256 ## 0x100
- .long 512 ## 0x200
- .long 1024 ## 0x400
- .long 2048 ## 0x800
- .long 4096 ## 0x1000
- .long 8192 ## 0x2000
- .long 16384 ## 0x4000
- .long 32768 ## 0x8000
- .long 65536 ## 0x10000
- .long 131072 ## 0x20000
- .long 262144 ## 0x40000
- .long 524288 ## 0x80000
- .long 1048576 ## 0x100000
- .long 2097152 ## 0x200000
- .long 4194304 ## 0x400000
- .long 8388608 ## 0x800000
- .long 16777216 ## 0x1000000
- .long 33554432 ## 0x2000000
- .long 67108864 ## 0x4000000
- .long 134217728 ## 0x8000000
- .long 268435456 ## 0x10000000
- .long 536870912 ## 0x20000000
- .long 1073741824 ## 0x40000000
- .long 2147483648 ## 0x80000000
- .section __TEXT,__cstring,cstring_literals
- L_.str: ## @.str
- .asciz "%d powers of two found in %lu ns\n"
- .subsections_via_symbols
- ==> powersoftwo-5-c2.s <===================================================
- .section __TEXT,__text,regular,pure_instructions
- .globl _isPowerOfTwo
- _isPowerOfTwo: ## @isPowerOfTwo
- Ltmp2:
- .cfi_startproc
- ## BB#0: ## %entry
- pushq %rbp
- Ltmp3:
- .cfi_def_cfa_offset 16
- Ltmp4:
- .cfi_offset %rbp, -16
- movq %rsp, %rbp
- Ltmp5:
- .cfi_def_cfa_register %rbp
- cmpl $2, %edi
- jb LBB0_6
- ## BB#1: ## %while.cond.preheader
- movb $1, %r9b
- cmpl $65536, %edi ## imm = 0x10000
- je LBB0_5
- ## BB#2:
- movl $16, %eax
- movl $65536, %r10d ## imm = 0x10000
- leaq _isPowerOfTwo.powersOfTwo(%rip), %r8
- movl %eax, %ecx
- LBB0_3: ## %while.body
- ## =>This Inner Loop Header: Depth=1
- movl %ecx, %esi
- shrl $31, %esi
- addl %ecx, %esi
- sarl %esi
- movl %esi, %edx
- negl %edx
- cmpl %edi, %r10d
- cmovbel %esi, %edx
- addl %edx, %eax
- movslq %eax, %rdx
- movl (%r8,%rdx,4), %r10d
- cmpl %edi, %r10d
- setne %dl
- sete %r9b
- cmpl $4, %ecx
- jl LBB0_5
- ## BB#4: ## %while.body
- ## in Loop: Header=BB0_3 Depth=1
- testb %dl, %dl
- movl %esi, %ecx
- jne LBB0_3
- LBB0_5: ## %while.end
- movzbl %r9b, %edi
- LBB0_6: ## %sw.epilog
- movl %edi, %eax
- popq %rbp
- ret
- Ltmp6:
- .cfi_endproc
- Leh_func_end0:
- .globl _main
- _main: ## @main
- Ltmp10:
- .cfi_startproc
- ## BB#0: ## %entry
- pushq %rbp
- Ltmp11:
- .cfi_def_cfa_offset 16
- Ltmp12:
- .cfi_offset %rbp, -16
- movq %rsp, %rbp
- Ltmp13:
- .cfi_def_cfa_register %rbp
- pushq %r15
- pushq %r14
- pushq %rbx
- pushq %rax
- Ltmp14:
- .cfi_offset %rbx, -40
- Ltmp15:
- .cfi_offset %r14, -32
- Ltmp16:
- .cfi_offset %r15, -24
- callq _mach_absolute_time
- movq %rax, %r14
- xorl %r15d, %r15d
- movl %r15d, %ebx
- LBB1_1: ## %for.body
- ## =>This Inner Loop Header: Depth=1
- movl %r15d, %edi
- callq _isPowerOfTwo
- cmpl $1, %eax
- sbbl $-1, %ebx
- incl %r15d
- cmpl $-1, %r15d
- jne LBB1_1
- ## BB#2: ## %for.end
- callq _mach_absolute_time
- subq %r14, %rax
- leaq L_.str(%rip), %rdi
- movl %ebx, %esi
- movq %rax, %rdx
- xorb %al, %al
- callq _printf
- xorl %eax, %eax
- addq $8, %rsp
- popq %rbx
- popq %r14
- popq %r15
- popq %rbp
- ret
- Ltmp17:
- .cfi_endproc
- Leh_func_end1:
- .section __TEXT,__const
- .align 4 ## @isPowerOfTwo.powersOfTwo
- _isPowerOfTwo.powersOfTwo:
- .long 1 ## 0x1
- .long 2 ## 0x2
- .long 4 ## 0x4
- .long 8 ## 0x8
- .long 16 ## 0x10
- .long 32 ## 0x20
- .long 64 ## 0x40
- .long 128 ## 0x80
- .long 256 ## 0x100
- .long 512 ## 0x200
- .long 1024 ## 0x400
- .long 2048 ## 0x800
- .long 4096 ## 0x1000
- .long 8192 ## 0x2000
- .long 16384 ## 0x4000
- .long 32768 ## 0x8000
- .long 65536 ## 0x10000
- .long 131072 ## 0x20000
- .long 262144 ## 0x40000
- .long 524288 ## 0x80000
- .long 1048576 ## 0x100000
- .long 2097152 ## 0x200000
- .long 4194304 ## 0x400000
- .long 8388608 ## 0x800000
- .long 16777216 ## 0x1000000
- .long 33554432 ## 0x2000000
- .long 67108864 ## 0x4000000
- .long 134217728 ## 0x8000000
- .long 268435456 ## 0x10000000
- .long 536870912 ## 0x20000000
- .long 1073741824 ## 0x40000000
- .long 2147483648 ## 0x80000000
- .section __TEXT,__cstring,cstring_literals
- L_.str: ## @.str
- .asciz "%d powers of two found in %lu ns\n"
- .subsections_via_symbols
- ==> powersoftwo-5-i7.s <===================================================
- .section __TEXT,__text,regular,pure_instructions
- .globl _isPowerOfTwo
- _isPowerOfTwo: ## @isPowerOfTwo
- Ltmp2:
- .cfi_startproc
- ## BB#0: ## %entry
- pushq %rbp
- Ltmp3:
- .cfi_def_cfa_offset 16
- Ltmp4:
- .cfi_offset %rbp, -16
- movq %rsp, %rbp
- Ltmp5:
- .cfi_def_cfa_register %rbp
- cmpl $2, %edi
- jb LBB0_6
- ## BB#1: ## %while.cond.preheader
- movb $1, %r9b
- cmpl $65536, %edi ## imm = 0x10000
- je LBB0_5
- ## BB#2:
- movl $16, %eax
- movl $65536, %r10d ## imm = 0x10000
- leaq _isPowerOfTwo.powersOfTwo(%rip), %r8
- movl %eax, %ecx
- LBB0_3: ## %while.body
- ## =>This Inner Loop Header: Depth=1
- movl %ecx, %esi
- shrl $31, %esi
- addl %ecx, %esi
- sarl %esi
- movl %esi, %edx
- negl %edx
- cmpl %edi, %r10d
- cmovbel %esi, %edx
- addl %edx, %eax
- movslq %eax, %rdx
- movl (%r8,%rdx,4), %r10d
- cmpl %edi, %r10d
- setne %dl
- sete %r9b
- cmpl $4, %ecx
- jl LBB0_5
- ## BB#4: ## %while.body
- ## in Loop: Header=BB0_3 Depth=1
- testb %dl, %dl
- movl %esi, %ecx
- jne LBB0_3
- LBB0_5: ## %while.end
- movzbl %r9b, %edi
- LBB0_6: ## %sw.epilog
- movl %edi, %eax
- popq %rbp
- ret
- Ltmp6:
- .cfi_endproc
- Leh_func_end0:
- .globl _main
- _main: ## @main
- Ltmp10:
- .cfi_startproc
- ## BB#0: ## %entry
- pushq %rbp
- Ltmp11:
- .cfi_def_cfa_offset 16
- Ltmp12:
- .cfi_offset %rbp, -16
- movq %rsp, %rbp
- Ltmp13:
- .cfi_def_cfa_register %rbp
- pushq %r15
- pushq %r14
- pushq %rbx
- pushq %rax
- Ltmp14:
- .cfi_offset %rbx, -40
- Ltmp15:
- .cfi_offset %r14, -32
- Ltmp16:
- .cfi_offset %r15, -24
- callq _mach_absolute_time
- movq %rax, %r14
- xorl %r15d, %r15d
- movl %r15d, %ebx
- LBB1_1: ## %for.body
- ## =>This Inner Loop Header: Depth=1
- movl %r15d, %edi
- callq _isPowerOfTwo
- cmpl $1, %eax
- sbbl $-1, %ebx
- incl %r15d
- cmpl $-1, %r15d
- jne LBB1_1
- ## BB#2: ## %for.end
- callq _mach_absolute_time
- subq %r14, %rax
- leaq L_.str(%rip), %rdi
- movl %ebx, %esi
- movq %rax, %rdx
- xorb %al, %al
- callq _printf
- xorl %eax, %eax
- addq $8, %rsp
- popq %rbx
- popq %r14
- popq %r15
- popq %rbp
- ret
- Ltmp17:
- .cfi_endproc
- Leh_func_end1:
- .section __TEXT,__const
- .align 4 ## @isPowerOfTwo.powersOfTwo
- _isPowerOfTwo.powersOfTwo:
- .long 1 ## 0x1
- .long 2 ## 0x2
- .long 4 ## 0x4
- .long 8 ## 0x8
- .long 16 ## 0x10
- .long 32 ## 0x20
- .long 64 ## 0x40
- .long 128 ## 0x80
- .long 256 ## 0x100
- .long 512 ## 0x200
- .long 1024 ## 0x400
- .long 2048 ## 0x800
- .long 4096 ## 0x1000
- .long 8192 ## 0x2000
- .long 16384 ## 0x4000
- .long 32768 ## 0x8000
- .long 65536 ## 0x10000
- .long 131072 ## 0x20000
- .long 262144 ## 0x40000
- .long 524288 ## 0x80000
- .long 1048576 ## 0x100000
- .long 2097152 ## 0x200000
- .long 4194304 ## 0x400000
- .long 8388608 ## 0x800000
- .long 16777216 ## 0x1000000
- .long 33554432 ## 0x2000000
- .long 67108864 ## 0x4000000
- .long 134217728 ## 0x8000000
- .long 268435456 ## 0x10000000
- .long 536870912 ## 0x20000000
- .long 1073741824 ## 0x40000000
- .long 2147483648 ## 0x80000000
- .section __TEXT,__cstring,cstring_literals
- L_.str: ## @.str
- .asciz "%d powers of two found in %lu ns\n"
- .subsections_via_symbols
- ==> powersoftwo-6-c2.s <===================================================
- .section __TEXT,__text,regular,pure_instructions
- .section __TEXT,__literal8,8byte_literals
- .align 3
- LCPI0_0:
- .quad 4604418534313441775 ## double 6.931472e-01
- .section __TEXT,__text,regular,pure_instructions
- .globl _isPowerOfTwo
- _isPowerOfTwo: ## @isPowerOfTwo
- Ltmp3:
- .cfi_startproc
- ## BB#0: ## %entry
- pushq %rbp
- Ltmp4:
- .cfi_def_cfa_offset 16
- Ltmp5:
- .cfi_offset %rbp, -16
- movq %rsp, %rbp
- Ltmp6:
- .cfi_def_cfa_register %rbp
- pushq %rbx
- pushq %rax
- Ltmp7:
- .cfi_offset %rbx, -24
- movl %edi, %ebx
- xorl %eax, %eax
- testl %ebx, %ebx
- je LBB0_5
- ## BB#1: ## %entry
- cmpl $-2147483648, %ebx ## imm = 0xFFFFFFFF80000000
- ja LBB0_5
- ## BB#2: ## %if.else
- movl %ebx, %eax
- cvtsi2sdq %rax, %xmm0
- callq _log
- divsd LCPI0_0(%rip), %xmm0
- movb $1, %al
- leaq _isPowerOfTwo.powersOfTwo(%rip), %rdx
- cvttsd2si %xmm0, %ecx
- movslq %ecx, %rsi
- cmpl %ebx, (%rdx,%rsi,4)
- je LBB0_4
- ## BB#3: ## %lor.rhs
- incl %ecx
- movslq %ecx, %rax
- leaq _isPowerOfTwo.powersOfTwo(%rip), %rcx
- cmpl %ebx, (%rcx,%rax,4)
- sete %al
- LBB0_4: ## %lor.end
- movzbl %al, %eax
- LBB0_5: ## %if.end
- addq $8, %rsp
- popq %rbx
- popq %rbp
- ret
- Ltmp8:
- .cfi_endproc
- Leh_func_end0:
- .globl _main
- _main: ## @main
- Ltmp12:
- .cfi_startproc
- ## BB#0: ## %entry
- pushq %rbp
- Ltmp13:
- .cfi_def_cfa_offset 16
- Ltmp14:
- .cfi_offset %rbp, -16
- movq %rsp, %rbp
- Ltmp15:
- .cfi_def_cfa_register %rbp
- pushq %r15
- pushq %r14
- pushq %rbx
- pushq %rax
- Ltmp16:
- .cfi_offset %rbx, -40
- Ltmp17:
- .cfi_offset %r14, -32
- Ltmp18:
- .cfi_offset %r15, -24
- callq _mach_absolute_time
- movq %rax, %r14
- xorl %r15d, %r15d
- movl %r15d, %ebx
- LBB1_1: ## %for.body
- ## =>This Inner Loop Header: Depth=1
- movl %r15d, %edi
- callq _isPowerOfTwo
- cmpl $1, %eax
- sbbl $-1, %ebx
- incl %r15d
- cmpl $-1, %r15d
- jne LBB1_1
- ## BB#2: ## %for.end
- callq _mach_absolute_time
- subq %r14, %rax
- leaq L_.str(%rip), %rdi
- movl %ebx, %esi
- movq %rax, %rdx
- xorb %al, %al
- callq _printf
- xorl %eax, %eax
- addq $8, %rsp
- popq %rbx
- popq %r14
- popq %r15
- popq %rbp
- ret
- Ltmp19:
- .cfi_endproc
- Leh_func_end1:
- .section __TEXT,__const
- .align 4 ## @isPowerOfTwo.powersOfTwo
- _isPowerOfTwo.powersOfTwo:
- .long 1 ## 0x1
- .long 2 ## 0x2
- .long 4 ## 0x4
- .long 8 ## 0x8
- .long 16 ## 0x10
- .long 32 ## 0x20
- .long 64 ## 0x40
- .long 128 ## 0x80
- .long 256 ## 0x100
- .long 512 ## 0x200
- .long 1024 ## 0x400
- .long 2048 ## 0x800
- .long 4096 ## 0x1000
- .long 8192 ## 0x2000
- .long 16384 ## 0x4000
- .long 32768 ## 0x8000
- .long 65536 ## 0x10000
- .long 131072 ## 0x20000
- .long 262144 ## 0x40000
- .long 524288 ## 0x80000
- .long 1048576 ## 0x100000
- .long 2097152 ## 0x200000
- .long 4194304 ## 0x400000
- .long 8388608 ## 0x800000
- .long 16777216 ## 0x1000000
- .long 33554432 ## 0x2000000
- .long 67108864 ## 0x4000000
- .long 134217728 ## 0x8000000
- .long 268435456 ## 0x10000000
- .long 536870912 ## 0x20000000
- .long 1073741824 ## 0x40000000
- .long 2147483648 ## 0x80000000
- .section __TEXT,__cstring,cstring_literals
- L_.str: ## @.str
- .asciz "%d powers of two found in %lu ns\n"
- .subsections_via_symbols
- ==> powersoftwo-6-i7.s <===================================================
- .section __TEXT,__text,regular,pure_instructions
- .section __TEXT,__literal8,8byte_literals
- .align 3
- LCPI0_0:
- .quad 4604418534313441775 ## double 6.931472e-01
- .section __TEXT,__text,regular,pure_instructions
- .globl _isPowerOfTwo
- _isPowerOfTwo: ## @isPowerOfTwo
- Ltmp3:
- .cfi_startproc
- ## BB#0: ## %entry
- pushq %rbp
- Ltmp4:
- .cfi_def_cfa_offset 16
- Ltmp5:
- .cfi_offset %rbp, -16
- movq %rsp, %rbp
- Ltmp6:
- .cfi_def_cfa_register %rbp
- pushq %rbx
- pushq %rax
- Ltmp7:
- .cfi_offset %rbx, -24
- movl %edi, %ebx
- xorl %eax, %eax
- testl %ebx, %ebx
- je LBB0_5
- ## BB#1: ## %entry
- cmpl $-2147483648, %ebx ## imm = 0xFFFFFFFF80000000
- ja LBB0_5
- ## BB#2: ## %if.else
- movl %ebx, %eax
- cvtsi2sdq %rax, %xmm0
- callq _log
- divsd LCPI0_0(%rip), %xmm0
- movb $1, %al
- leaq _isPowerOfTwo.powersOfTwo(%rip), %rdx
- cvttsd2si %xmm0, %ecx
- movslq %ecx, %rsi
- cmpl %ebx, (%rdx,%rsi,4)
- je LBB0_4
- ## BB#3: ## %lor.rhs
- incl %ecx
- movslq %ecx, %rax
- leaq _isPowerOfTwo.powersOfTwo(%rip), %rcx
- cmpl %ebx, (%rcx,%rax,4)
- sete %al
- LBB0_4: ## %lor.end
- movzbl %al, %eax
- LBB0_5: ## %if.end
- addq $8, %rsp
- popq %rbx
- popq %rbp
- ret
- Ltmp8:
- .cfi_endproc
- Leh_func_end0:
- .globl _main
- _main: ## @main
- Ltmp12:
- .cfi_startproc
- ## BB#0: ## %entry
- pushq %rbp
- Ltmp13:
- .cfi_def_cfa_offset 16
- Ltmp14:
- .cfi_offset %rbp, -16
- movq %rsp, %rbp
- Ltmp15:
- .cfi_def_cfa_register %rbp
- pushq %r15
- pushq %r14
- pushq %rbx
- pushq %rax
- Ltmp16:
- .cfi_offset %rbx, -40
- Ltmp17:
- .cfi_offset %r14, -32
- Ltmp18:
- .cfi_offset %r15, -24
- callq _mach_absolute_time
- movq %rax, %r14
- xorl %r15d, %r15d
- movl %r15d, %ebx
- LBB1_1: ## %for.body
- ## =>This Inner Loop Header: Depth=1
- movl %r15d, %edi
- callq _isPowerOfTwo
- cmpl $1, %eax
- sbbl $-1, %ebx
- incl %r15d
- cmpl $-1, %r15d
- jne LBB1_1
- ## BB#2: ## %for.end
- callq _mach_absolute_time
- subq %r14, %rax
- leaq L_.str(%rip), %rdi
- movl %ebx, %esi
- movq %rax, %rdx
- xorb %al, %al
- callq _printf
- xorl %eax, %eax
- addq $8, %rsp
- popq %rbx
- popq %r14
- popq %r15
- popq %rbp
- ret
- Ltmp19:
- .cfi_endproc
- Leh_func_end1:
- .section __TEXT,__const
- .align 4 ## @isPowerOfTwo.powersOfTwo
- _isPowerOfTwo.powersOfTwo:
- .long 1 ## 0x1
- .long 2 ## 0x2
- .long 4 ## 0x4
- .long 8 ## 0x8
- .long 16 ## 0x10
- .long 32 ## 0x20
- .long 64 ## 0x40
- .long 128 ## 0x80
- .long 256 ## 0x100
- .long 512 ## 0x200
- .long 1024 ## 0x400
- .long 2048 ## 0x800
- .long 4096 ## 0x1000
- .long 8192 ## 0x2000
- .long 16384 ## 0x4000
- .long 32768 ## 0x8000
- .long 65536 ## 0x10000
- .long 131072 ## 0x20000
- .long 262144 ## 0x40000
- .long 524288 ## 0x80000
- .long 1048576 ## 0x100000
- .long 2097152 ## 0x200000
- .long 4194304 ## 0x400000
- .long 8388608 ## 0x800000
- .long 16777216 ## 0x1000000
- .long 33554432 ## 0x2000000
- .long 67108864 ## 0x4000000
- .long 134217728 ## 0x8000000
- .long 268435456 ## 0x10000000
- .long 536870912 ## 0x20000000
- .long 1073741824 ## 0x40000000
- .long 2147483648 ## 0x80000000
- .section __TEXT,__cstring,cstring_literals
- L_.str: ## @.str
- .asciz "%d powers of two found in %lu ns\n"
- .subsections_via_symbols
- ==> powersoftwo-7-c2.s <===================================================
- .section __TEXT,__text,regular,pure_instructions
- .globl _isPowerOfTwo
- _isPowerOfTwo: ## @isPowerOfTwo
- Ltmp2:
- .cfi_startproc
- ## BB#0: ## %entry
- pushq %rbp
- Ltmp3:
- .cfi_def_cfa_offset 16
- Ltmp4:
- .cfi_offset %rbp, -16
- movq %rsp, %rbp
- Ltmp5:
- .cfi_def_cfa_register %rbp
- xorb %al, %al
- testl %edi, %edi
- je LBB0_5
- ## BB#1:
- xorl %eax, %eax
- LBB0_2: ## %while.body
- ## =>This Inner Loop Header: Depth=1
- movl %edi, %ecx
- andl $1, %ecx
- addl %ecx, %eax
- shrl %edi
- testl %edi, %edi
- je LBB0_4
- ## BB#3: ## %while.body
- ## in Loop: Header=BB0_2 Depth=1
- cmpl $2, %eax
- jb LBB0_2
- LBB0_4: ## %while.cond.while.end_crit_edge
- cmpl $1, %eax
- sete %al
- LBB0_5: ## %while.end
- movzbl %al, %eax
- popq %rbp
- ret
- Ltmp6:
- .cfi_endproc
- Leh_func_end0:
- .globl _main
- _main: ## @main
- Ltmp10:
- .cfi_startproc
- ## BB#0: ## %entry
- pushq %rbp
- Ltmp11:
- .cfi_def_cfa_offset 16
- Ltmp12:
- .cfi_offset %rbp, -16
- movq %rsp, %rbp
- Ltmp13:
- .cfi_def_cfa_register %rbp
- pushq %r14
- pushq %rbx
- Ltmp14:
- .cfi_offset %rbx, -32
- Ltmp15:
- .cfi_offset %r14, -24
- callq _mach_absolute_time
- movq %rax, %r14
- xorl %ebx, %ebx
- movl %ebx, %esi
- jmp LBB1_1
- LBB1_2: ## %for.cond
- ## in Loop: Header=BB1_1 Depth=1
- xorb %al, %al
- testl %esi, %esi
- movl %esi, %edx
- movl $0, %ecx
- je LBB1_6
- LBB1_3: ## %while.body.i
- ## Parent Loop BB1_1 Depth=1
- ## => This Inner Loop Header: Depth=2
- movl %edx, %eax
- andl $1, %eax
- addl %eax, %ecx
- shrl %edx
- testl %edx, %edx
- je LBB1_5
- ## BB#4: ## %while.body.i
- ## in Loop: Header=BB1_3 Depth=2
- cmpl $2, %ecx
- jb LBB1_3
- LBB1_5: ## %while.cond.while.end_crit_edge.i
- ## in Loop: Header=BB1_1 Depth=1
- cmpl $1, %ecx
- sete %al
- LBB1_6: ## %isPowerOfTwo.exit
- ## in Loop: Header=BB1_1 Depth=1
- movzbl %al, %eax
- addl %eax, %ebx
- incl %esi
- LBB1_1: ## %for.cond
- ## =>This Loop Header: Depth=1
- ## Child Loop BB1_3 Depth 2
- cmpl $-1, %esi
- jne LBB1_2
- ## BB#7: ## %for.end
- callq _mach_absolute_time
- subq %r14, %rax
- leaq L_.str(%rip), %rdi
- movl %ebx, %esi
- movq %rax, %rdx
- xorb %al, %al
- callq _printf
- xorl %eax, %eax
- popq %rbx
- popq %r14
- popq %rbp
- ret
- Ltmp16:
- .cfi_endproc
- Leh_func_end1:
- .section __TEXT,__cstring,cstring_literals
- L_.str: ## @.str
- .asciz "%d powers of two found in %lu ns\n"
- .subsections_via_symbols
- ==> powersoftwo-7-i7.s <===================================================
- .section __TEXT,__text,regular,pure_instructions
- .globl _isPowerOfTwo
- _isPowerOfTwo: ## @isPowerOfTwo
- Ltmp2:
- .cfi_startproc
- ## BB#0: ## %entry
- pushq %rbp
- Ltmp3:
- .cfi_def_cfa_offset 16
- Ltmp4:
- .cfi_offset %rbp, -16
- movq %rsp, %rbp
- Ltmp5:
- .cfi_def_cfa_register %rbp
- xorb %al, %al
- testl %edi, %edi
- je LBB0_5
- ## BB#1:
- xorl %eax, %eax
- LBB0_2: ## %while.body
- ## =>This Inner Loop Header: Depth=1
- movl %edi, %ecx
- andl $1, %ecx
- addl %ecx, %eax
- shrl %edi
- testl %edi, %edi
- je LBB0_4
- ## BB#3: ## %while.body
- ## in Loop: Header=BB0_2 Depth=1
- cmpl $2, %eax
- jb LBB0_2
- LBB0_4: ## %while.cond.while.end_crit_edge
- cmpl $1, %eax
- sete %al
- LBB0_5: ## %while.end
- movzbl %al, %eax
- popq %rbp
- ret
- Ltmp6:
- .cfi_endproc
- Leh_func_end0:
- .globl _main
- _main: ## @main
- Ltmp10:
- .cfi_startproc
- ## BB#0: ## %entry
- pushq %rbp
- Ltmp11:
- .cfi_def_cfa_offset 16
- Ltmp12:
- .cfi_offset %rbp, -16
- movq %rsp, %rbp
- Ltmp13:
- .cfi_def_cfa_register %rbp
- pushq %r14
- pushq %rbx
- Ltmp14:
- .cfi_offset %rbx, -32
- Ltmp15:
- .cfi_offset %r14, -24
- callq _mach_absolute_time
- movq %rax, %r14
- xorl %ebx, %ebx
- movl %ebx, %esi
- jmp LBB1_1
- LBB1_2: ## %for.cond
- ## in Loop: Header=BB1_1 Depth=1
- xorb %al, %al
- testl %esi, %esi
- movl %esi, %edx
- movl $0, %ecx
- je LBB1_6
- LBB1_3: ## %while.body.i
- ## Parent Loop BB1_1 Depth=1
- ## => This Inner Loop Header: Depth=2
- movl %edx, %eax
- andl $1, %eax
- addl %eax, %ecx
- shrl %edx
- testl %edx, %edx
- je LBB1_5
- ## BB#4: ## %while.body.i
- ## in Loop: Header=BB1_3 Depth=2
- cmpl $2, %ecx
- jb LBB1_3
- LBB1_5: ## %while.cond.while.end_crit_edge.i
- ## in Loop: Header=BB1_1 Depth=1
- cmpl $1, %ecx
- sete %al
- LBB1_6: ## %isPowerOfTwo.exit
- ## in Loop: Header=BB1_1 Depth=1
- movzbl %al, %eax
- addl %eax, %ebx
- incl %esi
- LBB1_1: ## %for.cond
- ## =>This Loop Header: Depth=1
- ## Child Loop BB1_3 Depth 2
- cmpl $-1, %esi
- jne LBB1_2
- ## BB#7: ## %for.end
- callq _mach_absolute_time
- subq %r14, %rax
- leaq L_.str(%rip), %rdi
- movl %ebx, %esi
- movq %rax, %rdx
- xorb %al, %al
- callq _printf
- xorl %eax, %eax
- popq %rbx
- popq %r14
- popq %rbp
- ret
- Ltmp16:
- .cfi_endproc
- Leh_func_end1:
- .section __TEXT,__cstring,cstring_literals
- L_.str: ## @.str
- .asciz "%d powers of two found in %lu ns\n"
- .subsections_via_symbols
- ==> powersoftwo-8-c2.s <===================================================
- .section __TEXT,__text,regular,pure_instructions
- .globl _isPowerOfTwo
- _isPowerOfTwo: ## @isPowerOfTwo
- Ltmp2:
- .cfi_startproc
- ## BB#0: ## %entry
- pushq %rbp
- Ltmp3:
- .cfi_def_cfa_offset 16
- Ltmp4:
- .cfi_offset %rbp, -16
- movq %rsp, %rbp
- Ltmp5:
- .cfi_def_cfa_register %rbp
- testb $1, %dil
- je LBB0_2
- LBB0_1:
- movl %edi, %eax
- jmp LBB0_5
- LBB0_2: ## %entry
- cmpl $2, %edi
- jb LBB0_1
- LBB0_3: ## %while.body
- ## =>This Inner Loop Header: Depth=1
- movl %edi, %eax
- shrl %eax
- btl $1, %edi
- jb LBB0_5
- ## BB#4: ## %while.body
- ## in Loop: Header=BB0_3 Depth=1
- cmpl $3, %edi
- movl %eax, %edi
- ja LBB0_3
- LBB0_5: ## %while.end
- cmpl $1, %eax
- sete %al
- movzbl %al, %eax
- popq %rbp
- ret
- Ltmp6:
- .cfi_endproc
- Leh_func_end0:
- .globl _main
- _main: ## @main
- Ltmp10:
- .cfi_startproc
- ## BB#0: ## %entry
- pushq %rbp
- Ltmp11:
- .cfi_def_cfa_offset 16
- Ltmp12:
- .cfi_offset %rbp, -16
- movq %rsp, %rbp
- Ltmp13:
- .cfi_def_cfa_register %rbp
- pushq %r14
- pushq %rbx
- Ltmp14:
- .cfi_offset %rbx, -32
- Ltmp15:
- .cfi_offset %r14, -24
- callq _mach_absolute_time
- movq %rax, %r14
- xorl %eax, %eax
- movl %eax, %ebx
- LBB1_1: ## %for.body
- ## =>This Loop Header: Depth=1
- ## Child Loop BB1_3 Depth 2
- movl %ebx, %ecx
- testb $1, %al
- movl %eax, %edx
- jne LBB1_5
- ## BB#2: ## %for.body
- ## in Loop: Header=BB1_1 Depth=1
- cmpl $2, %eax
- movl %eax, %esi
- movl %eax, %edx
- jb LBB1_5
- LBB1_3: ## %while.body.i
- ## Parent Loop BB1_1 Depth=1
- ## => This Inner Loop Header: Depth=2
- movl %esi, %edx
- shrl %edx
- btl $1, %esi
- jb LBB1_5
- ## BB#4: ## %while.body.i
- ## in Loop: Header=BB1_3 Depth=2
- cmpl $3, %esi
- movl %edx, %esi
- ja LBB1_3
- LBB1_5: ## %isPowerOfTwo.exit
- ## in Loop: Header=BB1_1 Depth=1
- cmpl $1, %edx
- sete %dl
- movzbl %dl, %ebx
- addl %ecx, %ebx
- incl %eax
- cmpl $-1, %eax
- jne LBB1_1
- ## BB#6: ## %for.end
- callq _mach_absolute_time
- subq %r14, %rax
- leaq L_.str(%rip), %rdi
- movl %ebx, %esi
- movq %rax, %rdx
- xorb %al, %al
- callq _printf
- xorl %eax, %eax
- popq %rbx
- popq %r14
- popq %rbp
- ret
- Ltmp16:
- .cfi_endproc
- Leh_func_end1:
- .section __TEXT,__cstring,cstring_literals
- L_.str: ## @.str
- .asciz "%d powers of two found in %lu ns\n"
- .subsections_via_symbols
- ==> powersoftwo-8-i7.s <===================================================
- .section __TEXT,__text,regular,pure_instructions
- .globl _isPowerOfTwo
- _isPowerOfTwo: ## @isPowerOfTwo
- Ltmp2:
- .cfi_startproc
- ## BB#0: ## %entry
- pushq %rbp
- Ltmp3:
- .cfi_def_cfa_offset 16
- Ltmp4:
- .cfi_offset %rbp, -16
- movq %rsp, %rbp
- Ltmp5:
- .cfi_def_cfa_register %rbp
- testb $1, %dil
- je LBB0_2
- LBB0_1:
- movl %edi, %eax
- jmp LBB0_5
- LBB0_2: ## %entry
- cmpl $2, %edi
- jb LBB0_1
- LBB0_3: ## %while.body
- ## =>This Inner Loop Header: Depth=1
- movl %edi, %eax
- shrl %eax
- btl $1, %edi
- jb LBB0_5
- ## BB#4: ## %while.body
- ## in Loop: Header=BB0_3 Depth=1
- cmpl $3, %edi
- movl %eax, %edi
- ja LBB0_3
- LBB0_5: ## %while.end
- cmpl $1, %eax
- sete %al
- movzbl %al, %eax
- popq %rbp
- ret
- Ltmp6:
- .cfi_endproc
- Leh_func_end0:
- .globl _main
- _main: ## @main
- Ltmp10:
- .cfi_startproc
- ## BB#0: ## %entry
- pushq %rbp
- Ltmp11:
- .cfi_def_cfa_offset 16
- Ltmp12:
- .cfi_offset %rbp, -16
- movq %rsp, %rbp
- Ltmp13:
- .cfi_def_cfa_register %rbp
- pushq %r14
- pushq %rbx
- Ltmp14:
- .cfi_offset %rbx, -32
- Ltmp15:
- .cfi_offset %r14, -24
- callq _mach_absolute_time
- movq %rax, %r14
- xorl %eax, %eax
- movl %eax, %ebx
- LBB1_1: ## %for.body
- ## =>This Loop Header: Depth=1
- ## Child Loop BB1_3 Depth 2
- movl %ebx, %ecx
- testb $1, %al
- movl %eax, %edx
- jne LBB1_5
- ## BB#2: ## %for.body
- ## in Loop: Header=BB1_1 Depth=1
- cmpl $2, %eax
- movl %eax, %esi
- movl %eax, %edx
- jb LBB1_5
- LBB1_3: ## %while.body.i
- ## Parent Loop BB1_1 Depth=1
- ## => This Inner Loop Header: Depth=2
- movl %esi, %edx
- shrl %edx
- btl $1, %esi
- jb LBB1_5
- ## BB#4: ## %while.body.i
- ## in Loop: Header=BB1_3 Depth=2
- cmpl $3, %esi
- movl %edx, %esi
- ja LBB1_3
- LBB1_5: ## %isPowerOfTwo.exit
- ## in Loop: Header=BB1_1 Depth=1
- cmpl $1, %edx
- sete %dl
- movzbl %dl, %ebx
- addl %ecx, %ebx
- incl %eax
- cmpl $-1, %eax
- jne LBB1_1
- ## BB#6: ## %for.end
- callq _mach_absolute_time
- subq %r14, %rax
- leaq L_.str(%rip), %rdi
- movl %ebx, %esi
- movq %rax, %rdx
- xorb %al, %al
- callq _printf
- xorl %eax, %eax
- popq %rbx
- popq %r14
- popq %rbp
- ret
- Ltmp16:
- .cfi_endproc
- Leh_func_end1:
- .section __TEXT,__cstring,cstring_literals
- L_.str: ## @.str
- .asciz "%d powers of two found in %lu ns\n"
- .subsections_via_symbols
- ==> powersoftwo-9a-c2.s <===================================================
- .section __TEXT,__text,regular,pure_instructions
- .globl _isPowerOfTwo
- _isPowerOfTwo: ## @isPowerOfTwo
- Ltmp2:
- .cfi_startproc
- ## BB#0: ## %entry
- pushq %rbp
- Ltmp3:
- .cfi_def_cfa_offset 16
- Ltmp4:
- .cfi_offset %rbp, -16
- movq %rsp, %rbp
- Ltmp5:
- .cfi_def_cfa_register %rbp
- xorb %al, %al
- testl %edi, %edi
- je LBB0_2
- ## BB#1: ## %land.rhs
- leal -1(%rdi), %eax
- testl %edi, %eax
- sete %al
- LBB0_2: ## %land.end
- movzbl %al, %eax
- popq %rbp
- ret
- Ltmp6:
- .cfi_endproc
- Leh_func_end0:
- .globl _main
- _main: ## @main
- Ltmp10:
- .cfi_startproc
- ## BB#0: ## %entry
- pushq %rbp
- Ltmp11:
- .cfi_def_cfa_offset 16
- Ltmp12:
- .cfi_offset %rbp, -16
- movq %rsp, %rbp
- Ltmp13:
- .cfi_def_cfa_register %rbp
- pushq %r14
- pushq %rbx
- Ltmp14:
- .cfi_offset %rbx, -32
- Ltmp15:
- .cfi_offset %r14, -24
- callq _mach_absolute_time
- movq %rax, %r14
- xorl %ebx, %ebx
- movl $-1, %eax
- jmp LBB1_1
- LBB1_2: ## %for.cond
- ## in Loop: Header=BB1_1 Depth=1
- xorb %dl, %dl
- testl %ecx, %ecx
- je LBB1_4
- ## BB#3: ## %land.rhs.i
- ## in Loop: Header=BB1_1 Depth=1
- testl %ecx, %eax
- sete %dl
- LBB1_4: ## %isPowerOfTwo.exit
- ## in Loop: Header=BB1_1 Depth=1
- movzbl %dl, %eax
- addl %eax, %ebx
- movl %ecx, %eax
- LBB1_1: ## %for.cond
- ## =>This Inner Loop Header: Depth=1
- leal 1(%rax), %ecx
- cmpl $-1, %ecx
- jne LBB1_2
- ## BB#5: ## %for.end
- callq _mach_absolute_time
- subq %r14, %rax
- leaq L_.str(%rip), %rdi
- movl %ebx, %esi
- movq %rax, %rdx
- xorb %al, %al
- callq _printf
- xorl %eax, %eax
- popq %rbx
- popq %r14
- popq %rbp
- ret
- Ltmp16:
- .cfi_endproc
- Leh_func_end1:
- .section __TEXT,__cstring,cstring_literals
- L_.str: ## @.str
- .asciz "%d powers of two found in %lu ns\n"
- .subsections_via_symbols
- ==> powersoftwo-9a-i7.s <===================================================
- .section __TEXT,__text,regular,pure_instructions
- .globl _isPowerOfTwo
- _isPowerOfTwo: ## @isPowerOfTwo
- Ltmp2:
- .cfi_startproc
- ## BB#0: ## %entry
- pushq %rbp
- Ltmp3:
- .cfi_def_cfa_offset 16
- Ltmp4:
- .cfi_offset %rbp, -16
- movq %rsp, %rbp
- Ltmp5:
- .cfi_def_cfa_register %rbp
- xorb %al, %al
- testl %edi, %edi
- je LBB0_2
- ## BB#1: ## %land.rhs
- leal -1(%rdi), %eax
- testl %edi, %eax
- sete %al
- LBB0_2: ## %land.end
- movzbl %al, %eax
- popq %rbp
- ret
- Ltmp6:
- .cfi_endproc
- Leh_func_end0:
- .globl _main
- _main: ## @main
- Ltmp10:
- .cfi_startproc
- ## BB#0: ## %entry
- pushq %rbp
- Ltmp11:
- .cfi_def_cfa_offset 16
- Ltmp12:
- .cfi_offset %rbp, -16
- movq %rsp, %rbp
- Ltmp13:
- .cfi_def_cfa_register %rbp
- pushq %r14
- pushq %rbx
- Ltmp14:
- .cfi_offset %rbx, -32
- Ltmp15:
- .cfi_offset %r14, -24
- callq _mach_absolute_time
- movq %rax, %r14
- xorl %ebx, %ebx
- movl $-1, %eax
- jmp LBB1_1
- LBB1_2: ## %for.cond
- ## in Loop: Header=BB1_1 Depth=1
- xorb %dl, %dl
- testl %ecx, %ecx
- je LBB1_4
- ## BB#3: ## %land.rhs.i
- ## in Loop: Header=BB1_1 Depth=1
- testl %ecx, %eax
- sete %dl
- LBB1_4: ## %isPowerOfTwo.exit
- ## in Loop: Header=BB1_1 Depth=1
- movzbl %dl, %eax
- addl %eax, %ebx
- movl %ecx, %eax
- LBB1_1: ## %for.cond
- ## =>This Inner Loop Header: Depth=1
- leal 1(%rax), %ecx
- cmpl $-1, %ecx
- jne LBB1_2
- ## BB#5: ## %for.end
- callq _mach_absolute_time
- subq %r14, %rax
- leaq L_.str(%rip), %rdi
- movl %ebx, %esi
- movq %rax, %rdx
- xorb %al, %al
- callq _printf
- xorl %eax, %eax
- popq %rbx
- popq %r14
- popq %rbp
- ret
- Ltmp16:
- .cfi_endproc
- Leh_func_end1:
- .section __TEXT,__cstring,cstring_literals
- L_.str: ## @.str
- .asciz "%d powers of two found in %lu ns\n"
- .subsections_via_symbols
- ==> powersoftwo-9b-c2.s <===================================================
- .section __TEXT,__text,regular,pure_instructions
- .globl _isPowerOfTwo
- _isPowerOfTwo: ## @isPowerOfTwo
- Ltmp2:
- .cfi_startproc
- ## BB#0: ## %entry
- pushq %rbp
- Ltmp3:
- .cfi_def_cfa_offset 16
- Ltmp4:
- .cfi_offset %rbp, -16
- movq %rsp, %rbp
- Ltmp5:
- .cfi_def_cfa_register %rbp
- xorb %al, %al
- testl %edi, %edi
- je LBB0_2
- ## BB#1: ## %land.rhs
- movl %edi, %eax
- negl %eax
- andl %edi, %eax
- cmpl %edi, %eax
- sete %al
- LBB0_2: ## %land.end
- movzbl %al, %eax
- popq %rbp
- ret
- Ltmp6:
- .cfi_endproc
- Leh_func_end0:
- .globl _main
- _main: ## @main
- Ltmp10:
- .cfi_startproc
- ## BB#0: ## %entry
- pushq %rbp
- Ltmp11:
- .cfi_def_cfa_offset 16
- Ltmp12:
- .cfi_offset %rbp, -16
- movq %rsp, %rbp
- Ltmp13:
- .cfi_def_cfa_register %rbp
- pushq %r14
- pushq %rbx
- Ltmp14:
- .cfi_offset %rbx, -32
- Ltmp15:
- .cfi_offset %r14, -24
- callq _mach_absolute_time
- movq %rax, %r14
- xorl %eax, %eax
- movl %eax, %ebx
- movl %eax, %ecx
- jmp LBB1_1
- LBB1_2: ## %for.cond
- ## in Loop: Header=BB1_1 Depth=1
- xorb %dl, %dl
- testl %ecx, %ecx
- je LBB1_4
- ## BB#3: ## %land.rhs.i
- ## in Loop: Header=BB1_1 Depth=1
- movl %ecx, %edx
- andl %eax, %edx
- cmpl %edx, %ecx
- sete %dl
- LBB1_4: ## %isPowerOfTwo.exit
- ## in Loop: Header=BB1_1 Depth=1
- movzbl %dl, %edx
- addl %edx, %ebx
- decl %eax
- incl %ecx
- LBB1_1: ## %for.cond
- ## =>This Inner Loop Header: Depth=1
- cmpl $-1, %ecx
- jne LBB1_2
- ## BB#5: ## %for.end
- callq _mach_absolute_time
- subq %r14, %rax
- leaq L_.str(%rip), %rdi
- movl %ebx, %esi
- movq %rax, %rdx
- xorb %al, %al
- callq _printf
- xorl %eax, %eax
- popq %rbx
- popq %r14
- popq %rbp
- ret
- Ltmp16:
- .cfi_endproc
- Leh_func_end1:
- .section __TEXT,__cstring,cstring_literals
- L_.str: ## @.str
- .asciz "%d powers of two found in %lu ns\n"
- .subsections_via_symbols
- ==> powersoftwo-9b-i7.s <===================================================
- .section __TEXT,__text,regular,pure_instructions
- .globl _isPowerOfTwo
- _isPowerOfTwo: ## @isPowerOfTwo
- Ltmp2:
- .cfi_startproc
- ## BB#0: ## %entry
- pushq %rbp
- Ltmp3:
- .cfi_def_cfa_offset 16
- Ltmp4:
- .cfi_offset %rbp, -16
- movq %rsp, %rbp
- Ltmp5:
- .cfi_def_cfa_register %rbp
- xorb %al, %al
- testl %edi, %edi
- je LBB0_2
- ## BB#1: ## %land.rhs
- movl %edi, %eax
- negl %eax
- andl %edi, %eax
- cmpl %edi, %eax
- sete %al
- LBB0_2: ## %land.end
- movzbl %al, %eax
- popq %rbp
- ret
- Ltmp6:
- .cfi_endproc
- Leh_func_end0:
- .globl _main
- _main: ## @main
- Ltmp10:
- .cfi_startproc
- ## BB#0: ## %entry
- pushq %rbp
- Ltmp11:
- .cfi_def_cfa_offset 16
- Ltmp12:
- .cfi_offset %rbp, -16
- movq %rsp, %rbp
- Ltmp13:
- .cfi_def_cfa_register %rbp
- pushq %r14
- pushq %rbx
- Ltmp14:
- .cfi_offset %rbx, -32
- Ltmp15:
- .cfi_offset %r14, -24
- callq _mach_absolute_time
- movq %rax, %r14
- xorl %eax, %eax
- movl %eax, %ebx
- movl %eax, %ecx
- jmp LBB1_1
- LBB1_2: ## %for.cond
- ## in Loop: Header=BB1_1 Depth=1
- xorb %dl, %dl
- testl %ecx, %ecx
- je LBB1_4
- ## BB#3: ## %land.rhs.i
- ## in Loop: Header=BB1_1 Depth=1
- movl %ecx, %edx
- andl %eax, %edx
- cmpl %edx, %ecx
- sete %dl
- LBB1_4: ## %isPowerOfTwo.exit
- ## in Loop: Header=BB1_1 Depth=1
- movzbl %dl, %edx
- addl %edx, %ebx
- decl %eax
- incl %ecx
- LBB1_1: ## %for.cond
- ## =>This Inner Loop Header: Depth=1
- cmpl $-1, %ecx
- jne LBB1_2
- ## BB#5: ## %for.end
- callq _mach_absolute_time
- subq %r14, %rax
- leaq L_.str(%rip), %rdi
- movl %ebx, %esi
- movq %rax, %rdx
- xorb %al, %al
- callq _printf
- xorl %eax, %eax
- popq %rbx
- popq %r14
- popq %rbp
- ret
- Ltmp16:
- .cfi_endproc
- Leh_func_end1:
- .section __TEXT,__cstring,cstring_literals
- L_.str: ## @.str
- .asciz "%d powers of two found in %lu ns\n"
- .subsections_via_symbols
- ==> powersoftwo-R1-c2.s <===================================================
- .section __TEXT,__text,regular,pure_instructions
- .globl _is_pot_recur
- _is_pot_recur: ## @is_pot_recur
- Ltmp2:
- .cfi_startproc
- ## BB#0: ## %entry
- pushq %rbp
- Ltmp3:
- .cfi_def_cfa_offset 16
- Ltmp4:
- .cfi_offset %rbp, -16
- movq %rsp, %rbp
- Ltmp5:
- .cfi_def_cfa_register %rbp
- movl %esi, %edx
- jmp LBB0_1
- LBB0_3: ## %if.end
- ## in Loop: Header=BB0_1 Depth=1
- xorl %eax, %eax
- cmpl $1, %ecx
- jne LBB0_6
- LBB0_4: ## %sw.bb
- ## in Loop: Header=BB0_1 Depth=1
- shrl %edx
- LBB0_1: ## %tailrecurse
- ## =>This Inner Loop Header: Depth=1
- movl $1, %eax
- movb %dl, %cl
- movl $1, %esi
- shll %cl, %esi
- testl %edx, %edx
- je LBB0_6
- ## BB#2: ## %if.end
- ## in Loop: Header=BB0_1 Depth=1
- decl %esi
- testl %edi, %esi
- setne %al
- movzbl %al, %eax
- movb %dl, %cl
- shll %cl, %esi
- testl %edi, %esi
- setne %cl
- movzbl %cl, %ecx
- addl %ecx, %ecx
- orl %eax, %ecx
- cmpl $2, %ecx
- jne LBB0_3
- ## BB#5: ## %sw.bb19
- ## in Loop: Header=BB0_1 Depth=1
- movb %dl, %cl
- shrl %cl, %edi
- jmp LBB0_4
- LBB0_6: ## %return
- popq %rbp
- ret
- Ltmp6:
- .cfi_endproc
- Leh_func_end0:
- .globl _is_pot
- _is_pot: ## @is_pot
- Ltmp9:
- .cfi_startproc
- ## BB#0: ## %entry
- pushq %rbp
- Ltmp10:
- .cfi_def_cfa_offset 16
- Ltmp11:
- .cfi_offset %rbp, -16
- movq %rsp, %rbp
- Ltmp12:
- .cfi_def_cfa_register %rbp
- movl $16, %esi
- popq %rbp
- jmp _is_pot_recur ## TAILCALL
- Ltmp13:
- .cfi_endproc
- Leh_func_end1:
- .globl _main
- _main: ## @main
- Ltmp17:
- .cfi_startproc
- ## BB#0: ## %entry
- pushq %rbp
- Ltmp18:
- .cfi_def_cfa_offset 16
- Ltmp19:
- .cfi_offset %rbp, -16
- movq %rsp, %rbp
- Ltmp20:
- .cfi_def_cfa_register %rbp
- pushq %r15
- pushq %r14
- pushq %rbx
- pushq %rax
- Ltmp21:
- .cfi_offset %rbx, -40
- Ltmp22:
- .cfi_offset %r14, -32
- Ltmp23:
- .cfi_offset %r15, -24
- callq _mach_absolute_time
- movq %rax, %r14
- xorl %r15d, %r15d
- movl %r15d, %ebx
- LBB2_1: ## %for.body
- ## =>This Inner Loop Header: Depth=1
- movl %r15d, %edi
- movl $16, %esi
- callq _is_pot_recur
- cmpl $1, %eax
- sbbl $-1, %ebx
- incl %r15d
- cmpl $-1, %r15d
- jne LBB2_1
- ## BB#2: ## %for.end
- callq _mach_absolute_time
- subq %r14, %rax
- leaq L_.str(%rip), %rdi
- movl %ebx, %esi
- movq %rax, %rdx
- xorb %al, %al
- callq _printf
- xorl %eax, %eax
- addq $8, %rsp
- popq %rbx
- popq %r14
- popq %r15
- popq %rbp
- ret
- Ltmp24:
- .cfi_endproc
- Leh_func_end2:
- .section __TEXT,__cstring,cstring_literals
- L_.str: ## @.str
- .asciz "%d powers of two found in %lu ns\n"
- .subsections_via_symbols
- ==> powersoftwo-R1-i7.s <===================================================
- .section __TEXT,__text,regular,pure_instructions
- .globl _is_pot_recur
- _is_pot_recur: ## @is_pot_recur
- Ltmp2:
- .cfi_startproc
- ## BB#0: ## %entry
- pushq %rbp
- Ltmp3:
- .cfi_def_cfa_offset 16
- Ltmp4:
- .cfi_offset %rbp, -16
- movq %rsp, %rbp
- Ltmp5:
- .cfi_def_cfa_register %rbp
- movl %esi, %edx
- jmp LBB0_1
- LBB0_3: ## %if.end
- ## in Loop: Header=BB0_1 Depth=1
- xorl %eax, %eax
- cmpl $1, %ecx
- jne LBB0_6
- LBB0_4: ## %sw.bb
- ## in Loop: Header=BB0_1 Depth=1
- shrl %edx
- LBB0_1: ## %tailrecurse
- ## =>This Inner Loop Header: Depth=1
- movl $1, %eax
- movb %dl, %cl
- movl $1, %esi
- shll %cl, %esi
- testl %edx, %edx
- je LBB0_6
- ## BB#2: ## %if.end
- ## in Loop: Header=BB0_1 Depth=1
- decl %esi
- testl %edi, %esi
- setne %al
- movzbl %al, %eax
- movb %dl, %cl
- shll %cl, %esi
- testl %edi, %esi
- setne %cl
- movzbl %cl, %ecx
- addl %ecx, %ecx
- orl %eax, %ecx
- cmpl $2, %ecx
- jne LBB0_3
- ## BB#5: ## %sw.bb19
- ## in Loop: Header=BB0_1 Depth=1
- movb %dl, %cl
- shrl %cl, %edi
- jmp LBB0_4
- LBB0_6: ## %return
- popq %rbp
- ret
- Ltmp6:
- .cfi_endproc
- Leh_func_end0:
- .globl _is_pot
- _is_pot: ## @is_pot
- Ltmp9:
- .cfi_startproc
- ## BB#0: ## %entry
- pushq %rbp
- Ltmp10:
- .cfi_def_cfa_offset 16
- Ltmp11:
- .cfi_offset %rbp, -16
- movq %rsp, %rbp
- Ltmp12:
- .cfi_def_cfa_register %rbp
- movl $16, %esi
- popq %rbp
- jmp _is_pot_recur ## TAILCALL
- Ltmp13:
- .cfi_endproc
- Leh_func_end1:
- .globl _main
- _main: ## @main
- Ltmp17:
- .cfi_startproc
- ## BB#0: ## %entry
- pushq %rbp
- Ltmp18:
- .cfi_def_cfa_offset 16
- Ltmp19:
- .cfi_offset %rbp, -16
- movq %rsp, %rbp
- Ltmp20:
- .cfi_def_cfa_register %rbp
- pushq %r15
- pushq %r14
- pushq %rbx
- pushq %rax
- Ltmp21:
- .cfi_offset %rbx, -40
- Ltmp22:
- .cfi_offset %r14, -32
- Ltmp23:
- .cfi_offset %r15, -24
- callq _mach_absolute_time
- movq %rax, %r14
- xorl %r15d, %r15d
- movl %r15d, %ebx
- LBB2_1: ## %for.body
- ## =>This Inner Loop Header: Depth=1
- movl %r15d, %edi
- movl $16, %esi
- callq _is_pot_recur
- cmpl $1, %eax
- sbbl $-1, %ebx
- incl %r15d
- cmpl $-1, %r15d
- jne LBB2_1
- ## BB#2: ## %for.end
- callq _mach_absolute_time
- subq %r14, %rax
- leaq L_.str(%rip), %rdi
- movl %ebx, %esi
- movq %rax, %rdx
- xorb %al, %al
- callq _printf
- xorl %eax, %eax
- addq $8, %rsp
- popq %rbx
- popq %r14
- popq %r15
- popq %rbp
- ret
- Ltmp24:
- .cfi_endproc
- Leh_func_end2:
- .section __TEXT,__cstring,cstring_literals
- L_.str: ## @.str
- .asciz "%d powers of two found in %lu ns\n"
- .subsections_via_symbols
- ==> powersoftwo-R2-c2.s <===================================================
- .section __TEXT,__text,regular,pure_instructions
- .globl _isPowerOfTwo
- _isPowerOfTwo: ## @isPowerOfTwo
- Ltmp2:
- .cfi_startproc
- ## BB#0: ## %entry
- pushq %rbp
- Ltmp3:
- .cfi_def_cfa_offset 16
- Ltmp4:
- .cfi_offset %rbp, -16
- movq %rsp, %rbp
- Ltmp5:
- .cfi_def_cfa_register %rbp
- testl $1431655765, %edi ## imm = 0x55555555
- je LBB0_2
- ## BB#1: ## %entry
- movl %edi, %ecx
- andl $-1431655766, %ecx ## imm = 0xFFFFFFFFAAAAAAAA
- xorb %al, %al
- testl %ecx, %ecx
- jne LBB0_9
- LBB0_2: ## %land.lhs.true4
- testl $858993459, %edi ## imm = 0x33333333
- je LBB0_4
- ## BB#3: ## %land.lhs.true4
- movl %edi, %ecx
- andl $-858993460, %ecx ## imm = 0xFFFFFFFFCCCCCCCC
- xorb %al, %al
- testl %ecx, %ecx
- jne LBB0_9
- LBB0_4: ## %land.lhs.true12
- testl $252645135, %edi ## imm = 0xF0F0F0F
- je LBB0_6
- ## BB#5: ## %land.lhs.true12
- movl %edi, %ecx
- andl $-252645136, %ecx ## imm = 0xFFFFFFFFF0F0F0F0
- xorb %al, %al
- testl %ecx, %ecx
- jne LBB0_9
- LBB0_6: ## %land.lhs.true20
- testl $16711935, %edi ## imm = 0xFF00FF
- je LBB0_8
- ## BB#7: ## %land.lhs.true20
- movl %edi, %ecx
- andl $-16711936, %ecx ## imm = 0xFFFFFFFFFF00FF00
- xorb %al, %al
- testl %ecx, %ecx
- jne LBB0_9
- LBB0_8: ## %land.rhs
- cmpl $65536, %edi ## imm = 0x10000
- setb %cl
- testw %di, %di
- sete %al
- orb %cl, %al
- LBB0_9: ## %land.end35
- movzbl %al, %eax
- popq %rbp
- ret
- Ltmp6:
- .cfi_endproc
- Leh_func_end0:
- .globl _main
- _main: ## @main
- Ltmp10:
- .cfi_startproc
- ## BB#0: ## %entry
- pushq %rbp
- Ltmp11:
- .cfi_def_cfa_offset 16
- Ltmp12:
- .cfi_offset %rbp, -16
- movq %rsp, %rbp
- Ltmp13:
- .cfi_def_cfa_register %rbp
- pushq %r15
- pushq %r14
- pushq %rbx
- pushq %rax
- Ltmp14:
- .cfi_offset %rbx, -40
- Ltmp15:
- .cfi_offset %r14, -32
- Ltmp16:
- .cfi_offset %r15, -24
- callq _mach_absolute_time
- movq %rax, %r14
- xorl %r15d, %r15d
- movl %r15d, %ebx
- LBB1_1: ## %for.body
- ## =>This Inner Loop Header: Depth=1
- movl %r15d, %edi
- callq _isPowerOfTwo
- cmpl $1, %eax
- sbbl $-1, %ebx
- incl %r15d
- cmpl $-1, %r15d
- jne LBB1_1
- ## BB#2: ## %for.end
- callq _mach_absolute_time
- subq %r14, %rax
- leaq L_.str(%rip), %rdi
- movl %ebx, %esi
- movq %rax, %rdx
- xorb %al, %al
- callq _printf
- xorl %eax, %eax
- addq $8, %rsp
- popq %rbx
- popq %r14
- popq %r15
- popq %rbp
- ret
- Ltmp17:
- .cfi_endproc
- Leh_func_end1:
- .section __TEXT,__cstring,cstring_literals
- L_.str: ## @.str
- .asciz "%d powers of two found in %lu ns\n"
- .subsections_via_symbols
- ==> powersoftwo-R2-i7.s <===================================================
- .section __TEXT,__text,regular,pure_instructions
- .globl _isPowerOfTwo
- _isPowerOfTwo: ## @isPowerOfTwo
- Ltmp2:
- .cfi_startproc
- ## BB#0: ## %entry
- pushq %rbp
- Ltmp3:
- .cfi_def_cfa_offset 16
- Ltmp4:
- .cfi_offset %rbp, -16
- movq %rsp, %rbp
- Ltmp5:
- .cfi_def_cfa_register %rbp
- testl $1431655765, %edi ## imm = 0x55555555
- je LBB0_2
- ## BB#1: ## %entry
- movl %edi, %ecx
- andl $-1431655766, %ecx ## imm = 0xFFFFFFFFAAAAAAAA
- xorb %al, %al
- testl %ecx, %ecx
- jne LBB0_9
- LBB0_2: ## %land.lhs.true4
- testl $858993459, %edi ## imm = 0x33333333
- je LBB0_4
- ## BB#3: ## %land.lhs.true4
- movl %edi, %ecx
- andl $-858993460, %ecx ## imm = 0xFFFFFFFFCCCCCCCC
- xorb %al, %al
- testl %ecx, %ecx
- jne LBB0_9
- LBB0_4: ## %land.lhs.true12
- testl $252645135, %edi ## imm = 0xF0F0F0F
- je LBB0_6
- ## BB#5: ## %land.lhs.true12
- movl %edi, %ecx
- andl $-252645136, %ecx ## imm = 0xFFFFFFFFF0F0F0F0
- xorb %al, %al
- testl %ecx, %ecx
- jne LBB0_9
- LBB0_6: ## %land.lhs.true20
- testl $16711935, %edi ## imm = 0xFF00FF
- je LBB0_8
- ## BB#7: ## %land.lhs.true20
- movl %edi, %ecx
- andl $-16711936, %ecx ## imm = 0xFFFFFFFFFF00FF00
- xorb %al, %al
- testl %ecx, %ecx
- jne LBB0_9
- LBB0_8: ## %land.rhs
- cmpl $65536, %edi ## imm = 0x10000
- setb %cl
- testw %di, %di
- sete %al
- orb %cl, %al
- LBB0_9: ## %land.end35
- movzbl %al, %eax
- popq %rbp
- ret
- Ltmp6:
- .cfi_endproc
- Leh_func_end0:
- .globl _main
- _main: ## @main
- Ltmp10:
- .cfi_startproc
- ## BB#0: ## %entry
- pushq %rbp
- Ltmp11:
- .cfi_def_cfa_offset 16
- Ltmp12:
- .cfi_offset %rbp, -16
- movq %rsp, %rbp
- Ltmp13:
- .cfi_def_cfa_register %rbp
- pushq %r15
- pushq %r14
- pushq %rbx
- pushq %rax
- Ltmp14:
- .cfi_offset %rbx, -40
- Ltmp15:
- .cfi_offset %r14, -32
- Ltmp16:
- .cfi_offset %r15, -24
- callq _mach_absolute_time
- movq %rax, %r14
- xorl %r15d, %r15d
- movl %r15d, %ebx
- LBB1_1: ## %for.body
- ## =>This Inner Loop Header: Depth=1
- movl %r15d, %edi
- callq _isPowerOfTwo
- cmpl $1, %eax
- sbbl $-1, %ebx
- incl %r15d
- cmpl $-1, %r15d
- jne LBB1_1
- ## BB#2: ## %for.end
- callq _mach_absolute_time
- subq %r14, %rax
- leaq L_.str(%rip), %rdi
- movl %ebx, %esi
- movq %rax, %rdx
- xorb %al, %al
- callq _printf
- xorl %eax, %eax
- addq $8, %rsp
- popq %rbx
- popq %r14
- popq %r15
- popq %rbp
- ret
- Ltmp17:
- .cfi_endproc
- Leh_func_end1:
- .section __TEXT,__cstring,cstring_literals
- L_.str: ## @.str
- .asciz "%d powers of two found in %lu ns\n"
- .subsections_via_symbols
- ==> powersoftwo-R3-c2.s <===================================================
- .section __TEXT,__text,regular,pure_instructions
- .globl _isPowerOf2
- _isPowerOf2: ## @isPowerOf2
- Ltmp2:
- .cfi_startproc
- ## BB#0: ## %entry
- pushq %rbp
- Ltmp3:
- .cfi_def_cfa_offset 16
- Ltmp4:
- .cfi_offset %rbp, -16
- movq %rsp, %rbp
- Ltmp5:
- .cfi_def_cfa_register %rbp
- movl %edi, %eax
- shrl %eax
- andl $1431655765, %eax ## imm = 0x55555555
- subl %eax, %edi
- movl %edi, %eax
- andl $858993459, %eax ## imm = 0x33333333
- shrl $2, %edi
- andl $858993459, %edi ## imm = 0x33333333
- addl %eax, %edi
- movl %edi, %eax
- shrl $4, %eax
- addl %edi, %eax
- andl $252645135, %eax ## imm = 0xF0F0F0F
- imull $16843009, %eax, %eax ## imm = 0x1010101
- shrl $24, %eax
- cmpl $1, %eax
- sete %al
- movzbl %al, %eax
- popq %rbp
- ret
- Ltmp6:
- .cfi_endproc
- Leh_func_end0:
- .globl _main
- _main: ## @main
- Ltmp10:
- .cfi_startproc
- ## BB#0: ## %entry
- pushq %rbp
- Ltmp11:
- .cfi_def_cfa_offset 16
- Ltmp12:
- .cfi_offset %rbp, -16
- movq %rsp, %rbp
- Ltmp13:
- .cfi_def_cfa_register %rbp
- pushq %r14
- pushq %rbx
- Ltmp14:
- .cfi_offset %rbx, -32
- Ltmp15:
- .cfi_offset %r14, -24
- callq _mach_absolute_time
- movq %rax, %r14
- xorl %eax, %eax
- movl %eax, %ebx
- LBB1_1: ## %for.body
- ## =>This Inner Loop Header: Depth=1
- movl %eax, %edx
- shrl %edx
- andl $1431655765, %edx ## imm = 0x55555555
- movl %eax, %ecx
- subl %edx, %ecx
- movl %ecx, %edx
- andl $858993459, %edx ## imm = 0x33333333
- shrl $2, %ecx
- andl $858993459, %ecx ## imm = 0x33333333
- addl %edx, %ecx
- incl %eax
- movl %ecx, %edx
- shrl $4, %edx
- addl %ecx, %edx
- andl $252645135, %edx ## imm = 0xF0F0F0F
- imull $16843009, %edx, %ecx ## imm = 0x1010101
- shrl $24, %ecx
- cmpl $1, %ecx
- sete %cl
- movzbl %cl, %ecx
- addl %ecx, %ebx
- cmpl $-1, %eax
- jne LBB1_1
- ## BB#2: ## %for.end
- callq _mach_absolute_time
- subq %r14, %rax
- leaq L_.str(%rip), %rdi
- movl %ebx, %esi
- movq %rax, %rdx
- xorb %al, %al
- callq _printf
- xorl %eax, %eax
- popq %rbx
- popq %r14
- popq %rbp
- ret
- Ltmp16:
- .cfi_endproc
- Leh_func_end1:
- .section __TEXT,__cstring,cstring_literals
- L_.str: ## @.str
- .asciz "%d powers of two found in %lu ns\n"
- .subsections_via_symbols
- ==> powersoftwo-R4-c2.s <===================================================
- .section __TEXT,__text,regular,pure_instructions
- .globl _isPowerOf2
- _isPowerOf2: ## @isPowerOf2
- Ltmp2:
- .cfi_startproc
- ## BB#0: ## %entry
- pushq %rbp
- Ltmp3:
- .cfi_def_cfa_offset 16
- Ltmp4:
- .cfi_offset %rbp, -16
- movq %rsp, %rbp
- Ltmp5:
- .cfi_def_cfa_register %rbp
- xorb %al, %al
- testl %edi, %edi
- je LBB0_2
- ## BB#1: ## %land.rhs
- movl $32, %eax
- bsfl %edi, %ecx
- cmovel %eax, %ecx
- ## kill: CL<def> CL<kill> ECX<kill>
- movl $1, %eax
- shll %cl, %eax
- cmpl %edi, %eax
- sete %al
- LBB0_2: ## %land.end
- movzbl %al, %eax
- popq %rbp
- ret
- Ltmp6:
- .cfi_endproc
- Leh_func_end0:
- .globl _main
- _main: ## @main
- Ltmp10:
- .cfi_startproc
- ## BB#0: ## %entry
- pushq %rbp
- Ltmp11:
- .cfi_def_cfa_offset 16
- Ltmp12:
- .cfi_offset %rbp, -16
- movq %rsp, %rbp
- Ltmp13:
- .cfi_def_cfa_register %rbp
- pushq %r14
- pushq %rbx
- Ltmp14:
- .cfi_offset %rbx, -32
- Ltmp15:
- .cfi_offset %r14, -24
- callq _mach_absolute_time
- movq %rax, %r14
- xorl %ebx, %ebx
- movl $32, %eax
- movl %ebx, %edx
- jmp LBB1_1
- LBB1_2: ## %for.cond
- ## in Loop: Header=BB1_1 Depth=1
- xorb %cl, %cl
- testl %edx, %edx
- je LBB1_4
- ## BB#3: ## %land.rhs.i
- ## in Loop: Header=BB1_1 Depth=1
- bsfl %edx, %ecx
- cmovel %eax, %ecx
- ## kill: CL<def> CL<kill> ECX<kill>
- movl $1, %esi
- shll %cl, %esi
- cmpl %esi, %edx
- sete %cl
- LBB1_4: ## %isPowerOf2.exit
- ## in Loop: Header=BB1_1 Depth=1
- movzbl %cl, %ecx
- addl %ecx, %ebx
- incl %edx
- LBB1_1: ## %for.cond
- ## =>This Inner Loop Header: Depth=1
- cmpl $-1, %edx
- jne LBB1_2
- ## BB#5: ## %for.end
- callq _mach_absolute_time
- subq %r14, %rax
- leaq L_.str(%rip), %rdi
- movl %ebx, %esi
- movq %rax, %rdx
- xorb %al, %al
- callq _printf
- xorl %eax, %eax
- popq %rbx
- popq %r14
- popq %rbp
- ret
- Ltmp16:
- .cfi_endproc
- Leh_func_end1:
- .section __TEXT,__cstring,cstring_literals
- L_.str: ## @.str
- .asciz "%d powers of two found in %lu ns\n"
- .subsections_via_symbols
- ==> powersoftwo-R4-i7.s <===================================================
- .section __TEXT,__text,regular,pure_instructions
- .globl _isPowerOf2
- _isPowerOf2: ## @isPowerOf2
- Ltmp2:
- .cfi_startproc
- ## BB#0: ## %entry
- pushq %rbp
- Ltmp3:
- .cfi_def_cfa_offset 16
- Ltmp4:
- .cfi_offset %rbp, -16
- movq %rsp, %rbp
- Ltmp5:
- .cfi_def_cfa_register %rbp
- xorb %al, %al
- testl %edi, %edi
- je LBB0_2
- ## BB#1: ## %land.rhs
- movl $32, %eax
- bsfl %edi, %ecx
- cmovel %eax, %ecx
- ## kill: CL<def> CL<kill> ECX<kill>
- movl $1, %eax
- shll %cl, %eax
- cmpl %edi, %eax
- sete %al
- LBB0_2: ## %land.end
- movzbl %al, %eax
- popq %rbp
- ret
- Ltmp6:
- .cfi_endproc
- Leh_func_end0:
- .globl _main
- _main: ## @main
- Ltmp10:
- .cfi_startproc
- ## BB#0: ## %entry
- pushq %rbp
- Ltmp11:
- .cfi_def_cfa_offset 16
- Ltmp12:
- .cfi_offset %rbp, -16
- movq %rsp, %rbp
- Ltmp13:
- .cfi_def_cfa_register %rbp
- pushq %r14
- pushq %rbx
- Ltmp14:
- .cfi_offset %rbx, -32
- Ltmp15:
- .cfi_offset %r14, -24
- callq _mach_absolute_time
- movq %rax, %r14
- xorl %ebx, %ebx
- movl $32, %eax
- movl %ebx, %edx
- jmp LBB1_1
- LBB1_2: ## %for.cond
- ## in Loop: Header=BB1_1 Depth=1
- xorb %cl, %cl
- testl %edx, %edx
- je LBB1_4
- ## BB#3: ## %land.rhs.i
- ## in Loop: Header=BB1_1 Depth=1
- bsfl %edx, %ecx
- cmovel %eax, %ecx
- ## kill: CL<def> CL<kill> ECX<kill>
- movl $1, %esi
- shll %cl, %esi
- cmpl %esi, %edx
- sete %cl
- LBB1_4: ## %isPowerOf2.exit
- ## in Loop: Header=BB1_1 Depth=1
- movzbl %cl, %ecx
- addl %ecx, %ebx
- incl %edx
- LBB1_1: ## %for.cond
- ## =>This Inner Loop Header: Depth=1
- cmpl $-1, %edx
- jne LBB1_2
- ## BB#5: ## %for.end
- callq _mach_absolute_time
- subq %r14, %rax
- leaq L_.str(%rip), %rdi
- movl %ebx, %esi
- movq %rax, %rdx
- xorb %al, %al
- callq _printf
- xorl %eax, %eax
- popq %rbx
- popq %r14
- popq %rbp
- ret
- Ltmp16:
- .cfi_endproc
- Leh_func_end1:
- .section __TEXT,__cstring,cstring_literals
- L_.str: ## @.str
- .asciz "%d powers of two found in %lu ns\n"
- .subsections_via_symbols
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement