x86
stringlengths
541
12.7k
arm
stringlengths
482
13.3k
file
stringlengths
20
22
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .section __TEXT,__literal16,16byte_literals .p2align 4 ## -- Begin function func0 LCPI0_0: .quad 0x7fffffffffffffff ## double NaN .quad 0x7fffffffffffffff ## double NaN .section __TEXT,__text,regular,pure_instructions .globl _func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp movq %rdi, -16(%rbp) movl %esi, -20(%rbp) movss %xmm0, -24(%rbp) movl $0, -28(%rbp) LBB0_1: ## =>This Loop Header: Depth=1 ## Child Loop BB0_3 Depth 2 movl -28(%rbp), %eax cmpl -20(%rbp), %eax jge LBB0_10 ## %bb.2: ## in Loop: Header=BB0_1 Depth=1 movl -28(%rbp), %eax addl $1, %eax movl %eax, -32(%rbp) LBB0_3: ## Parent Loop BB0_1 Depth=1 ## => This Inner Loop Header: Depth=2 movl -32(%rbp), %eax cmpl -20(%rbp), %eax jge LBB0_8 ## %bb.4: ## in Loop: Header=BB0_3 Depth=2 movq -16(%rbp), %rax movslq -28(%rbp), %rcx movss (%rax,%rcx,4), %xmm0 ## xmm0 = mem[0],zero,zero,zero movq -16(%rbp), %rax movslq -32(%rbp), %rcx subss (%rax,%rcx,4), %xmm0 cvtss2sd %xmm0, %xmm1 movaps LCPI0_0(%rip), %xmm0 ## xmm0 = [NaN,NaN] pand %xmm0, %xmm1 movss -24(%rbp), %xmm0 ## xmm0 = mem[0],zero,zero,zero cvtss2sd %xmm0, %xmm0 ucomisd %xmm1, %xmm0 jbe LBB0_6 ## %bb.5: movl $1, -4(%rbp) jmp LBB0_11 LBB0_6: ## in Loop: Header=BB0_3 Depth=2 jmp LBB0_7 LBB0_7: ## in Loop: Header=BB0_3 Depth=2 movl -32(%rbp), %eax addl $1, %eax movl %eax, -32(%rbp) jmp LBB0_3 LBB0_8: ## in Loop: Header=BB0_1 Depth=1 jmp LBB0_9 LBB0_9: ## in Loop: Header=BB0_1 Depth=1 movl -28(%rbp), %eax addl $1, %eax movl %eax, -28(%rbp) jmp LBB0_1 LBB0_10: movl $10, -4(%rbp) LBB0_11: movl -4(%rbp), %eax popq %rbp retq .cfi_endproc ## -- End function .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #32 .cfi_def_cfa_offset 32 str x0, [sp, #16] str w1, [sp, #12] str s0, [sp, #8] str wzr, [sp, #4] b LBB0_1 LBB0_1: ; =>This Loop Header: Depth=1 ; Child Loop BB0_3 Depth 2 ldr w8, [sp, #4] ldr w9, [sp, #12] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_10 b LBB0_2 LBB0_2: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #4] add w8, w8, #1 str w8, [sp] b LBB0_3 LBB0_3: ; Parent Loop BB0_1 Depth=1 ; => This Inner Loop Header: Depth=2 ldr w8, [sp] ldr w9, [sp, #12] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_8 b LBB0_4 LBB0_4: ; in Loop: Header=BB0_3 Depth=2 ldr x8, [sp, #16] ldrsw x9, [sp, #4] ldr s0, [x8, x9, lsl #2] ldr x8, [sp, #16] ldrsw x9, [sp] ldr s1, [x8, x9, lsl #2] fsub s0, s0, s1 fcvt d0, s0 fabs d0, d0 ldr s1, [sp, #8] fcvt d1, s1 fcmp d0, d1 cset w8, pl tbnz w8, #0, LBB0_6 b LBB0_5 LBB0_5: mov w8, #1 str w8, [sp, #28] b LBB0_11 LBB0_6: ; in Loop: Header=BB0_3 Depth=2 b LBB0_7 LBB0_7: ; in Loop: Header=BB0_3 Depth=2 ldr w8, [sp] add w8, w8, #1 str w8, [sp] b LBB0_3 LBB0_8: ; in Loop: Header=BB0_1 Depth=1 b LBB0_9 LBB0_9: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #4] add w8, w8, #1 str w8, [sp, #4] b LBB0_1 LBB0_10: mov w8, #10 str w8, [sp, #28] b LBB0_11 LBB0_11: ldr w0, [sp, #28] add sp, sp, #32 ret .cfi_endproc ; -- End function .subsections_via_symbols
eval/problem1/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ## -- Begin function func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp subq $48, %rsp movq %rdi, -16(%rbp) movl %esi, -20(%rbp) cmpl $0, -20(%rbp) jg LBB0_2 ## %bb.1: movq $0, -8(%rbp) jmp LBB0_11 LBB0_2: movslq -20(%rbp), %rdi shlq $2, %rdi callq _malloc movq %rax, -32(%rbp) cmpq $0, -32(%rbp) jne LBB0_4 ## %bb.3: movq $0, -8(%rbp) jmp LBB0_11 LBB0_4: movq -16(%rbp), %rax movl (%rax), %eax movl %eax, -36(%rbp) movl $0, -40(%rbp) LBB0_5: ## =>This Inner Loop Header: Depth=1 movl -40(%rbp), %eax cmpl -20(%rbp), %eax jge LBB0_10 ## %bb.6: ## in Loop: Header=BB0_5 Depth=1 movq -16(%rbp), %rax movslq -40(%rbp), %rcx movl (%rax,%rcx,4), %eax cmpl -36(%rbp), %eax jle LBB0_8 ## %bb.7: ## in Loop: Header=BB0_5 Depth=1 movq -16(%rbp), %rax movslq -40(%rbp), %rcx movl (%rax,%rcx,4), %eax movl %eax, -36(%rbp) LBB0_8: ## in Loop: Header=BB0_5 Depth=1 movl -36(%rbp), %edx movq -32(%rbp), %rax movslq -40(%rbp), %rcx movl %edx, (%rax,%rcx,4) ## %bb.9: ## in Loop: Header=BB0_5 Depth=1 movl -40(%rbp), %eax addl $1, %eax movl %eax, -40(%rbp) jmp LBB0_5 LBB0_10: movq -32(%rbp), %rax movq %rax, -8(%rbp) LBB0_11: movq -8(%rbp), %rax addq $48, %rsp popq %rbp retq .cfi_endproc ## -- End function .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #64 .cfi_def_cfa_offset 64 stp x29, x30, [sp, #48] ; 16-byte Folded Spill add x29, sp, #48 .cfi_def_cfa w29, 16 .cfi_offset w30, -8 .cfi_offset w29, -16 stur x0, [x29, #-16] stur w1, [x29, #-20] ldur w8, [x29, #-20] subs w8, w8, #0 cset w8, gt tbnz w8, #0, LBB0_2 b LBB0_1 LBB0_1: ; kill: def $x8 killed $xzr stur xzr, [x29, #-8] b LBB0_11 LBB0_2: ldursw x8, [x29, #-20] lsl x0, x8, #2 bl _malloc str x0, [sp, #16] ldr x8, [sp, #16] subs x8, x8, #0 cset w8, ne tbnz w8, #0, LBB0_4 b LBB0_3 LBB0_3: ; kill: def $x8 killed $xzr stur xzr, [x29, #-8] b LBB0_11 LBB0_4: ldur x8, [x29, #-16] ldr w8, [x8] str w8, [sp, #12] str wzr, [sp, #8] b LBB0_5 LBB0_5: ; =>This Inner Loop Header: Depth=1 ldr w8, [sp, #8] ldur w9, [x29, #-20] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_10 b LBB0_6 LBB0_6: ; in Loop: Header=BB0_5 Depth=1 ldur x8, [x29, #-16] ldrsw x9, [sp, #8] ldr w8, [x8, x9, lsl #2] ldr w9, [sp, #12] subs w8, w8, w9 cset w8, le tbnz w8, #0, LBB0_8 b LBB0_7 LBB0_7: ; in Loop: Header=BB0_5 Depth=1 ldur x8, [x29, #-16] ldrsw x9, [sp, #8] ldr w8, [x8, x9, lsl #2] str w8, [sp, #12] b LBB0_8 LBB0_8: ; in Loop: Header=BB0_5 Depth=1 ldr w8, [sp, #12] ldr x9, [sp, #16] ldrsw x10, [sp, #8] str w8, [x9, x10, lsl #2] b LBB0_9 LBB0_9: ; in Loop: Header=BB0_5 Depth=1 ldr w8, [sp, #8] add w8, w8, #1 str w8, [sp, #8] b LBB0_5 LBB0_10: ldr x8, [sp, #16] stur x8, [x29, #-8] b LBB0_11 LBB0_11: ldur x0, [x29, #-8] ldp x29, x30, [sp, #48] ; 16-byte Folded Reload add sp, sp, #64 ret .cfi_endproc ; -- End function .subsections_via_symbols
eval/problem10/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .section __TEXT,__literal8,8byte_literals .p2align 3 ## -- Begin function func0 LCPI0_0: .quad 0x3fe0000000000000 ## double 0.5 .section __TEXT,__text,regular,pure_instructions .globl _func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp subq $32, %rsp movq %rdi, -8(%rbp) movq -8(%rbp), %rdi callq _atof movsd %xmm0, -16(%rbp) xorps %xmm0, %xmm0 ucomisd -16(%rbp), %xmm0 jbe LBB0_2 ## %bb.1: movsd -16(%rbp), %xmm0 ## xmm0 = mem[0],zero movsd LCPI0_0(%rip), %xmm1 ## xmm1 = mem[0],zero subsd %xmm1, %xmm0 roundsd $10, %xmm0, %xmm0 movsd %xmm0, -24(%rbp) ## 8-byte Spill jmp LBB0_3 LBB0_2: movsd LCPI0_0(%rip), %xmm0 ## xmm0 = mem[0],zero addsd -16(%rbp), %xmm0 roundsd $9, %xmm0, %xmm0 movsd %xmm0, -24(%rbp) ## 8-byte Spill LBB0_3: movsd -24(%rbp), %xmm0 ## 8-byte Reload ## xmm0 = mem[0],zero cvttsd2si %xmm0, %eax addq $32, %rsp popq %rbp retq .cfi_endproc ## -- End function .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #48 .cfi_def_cfa_offset 48 stp x29, x30, [sp, #32] ; 16-byte Folded Spill add x29, sp, #32 .cfi_def_cfa w29, 16 .cfi_offset w30, -8 .cfi_offset w29, -16 stur x0, [x29, #-8] ldur x0, [x29, #-8] bl _atof str d0, [sp, #16] ldr d0, [sp, #16] fcmp d0, #0.0 cset w8, pl tbnz w8, #0, LBB0_2 b LBB0_1 LBB0_1: ldr d0, [sp, #16] fmov d1, #0.50000000 fsub d0, d0, d1 frintp d0, d0 str d0, [sp, #8] ; 8-byte Folded Spill b LBB0_3 LBB0_2: ldr d0, [sp, #16] fmov d1, #0.50000000 fadd d0, d0, d1 frintm d0, d0 str d0, [sp, #8] ; 8-byte Folded Spill b LBB0_3 LBB0_3: ldr d0, [sp, #8] ; 8-byte Folded Reload fcvtzs w0, d0 ldp x29, x30, [sp, #32] ; 16-byte Folded Reload add sp, sp, #48 ret .cfi_endproc ; -- End function .subsections_via_symbols
eval/problem100/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ## -- Begin function func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp subq $32, %rsp movl %edi, -4(%rbp) movslq -4(%rbp), %rdi shlq $2, %rdi callq _malloc movq %rax, -16(%rbp) movl -4(%rbp), %ecx movq -16(%rbp), %rax movl %ecx, (%rax) movl $1, -20(%rbp) LBB0_1: ## =>This Inner Loop Header: Depth=1 movl -20(%rbp), %eax cmpl -4(%rbp), %eax jge LBB0_4 ## %bb.2: ## in Loop: Header=BB0_1 Depth=1 movq -16(%rbp), %rax movslq -20(%rbp), %rcx movl -4(%rax,%rcx,4), %edx addl $2, %edx movq -16(%rbp), %rax movslq -20(%rbp), %rcx movl %edx, (%rax,%rcx,4) ## %bb.3: ## in Loop: Header=BB0_1 Depth=1 movl -20(%rbp), %eax addl $1, %eax movl %eax, -20(%rbp) jmp LBB0_1 LBB0_4: movq -16(%rbp), %rax addq $32, %rsp popq %rbp retq .cfi_endproc ## -- End function .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #48 .cfi_def_cfa_offset 48 stp x29, x30, [sp, #32] ; 16-byte Folded Spill add x29, sp, #32 .cfi_def_cfa w29, 16 .cfi_offset w30, -8 .cfi_offset w29, -16 stur w0, [x29, #-4] ldursw x8, [x29, #-4] lsl x0, x8, #2 bl _malloc str x0, [sp, #16] ldur w8, [x29, #-4] ldr x9, [sp, #16] str w8, [x9] mov w8, #1 str w8, [sp, #12] b LBB0_1 LBB0_1: ; =>This Inner Loop Header: Depth=1 ldr w8, [sp, #12] ldur w9, [x29, #-4] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_4 b LBB0_2 LBB0_2: ; in Loop: Header=BB0_1 Depth=1 ldr x8, [sp, #16] ldrsw x9, [sp, #12] add x8, x8, x9, lsl #2 ldur w8, [x8, #-4] add w8, w8, #2 ldr x9, [sp, #16] ldrsw x10, [sp, #12] str w8, [x9, x10, lsl #2] b LBB0_3 LBB0_3: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #12] add w8, w8, #1 str w8, [sp, #12] b LBB0_1 LBB0_4: ldr x0, [sp, #16] ldp x29, x30, [sp, #32] ; 16-byte Folded Reload add sp, sp, #48 ret .cfi_endproc ; -- End function .subsections_via_symbols
eval/problem101/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ## -- Begin function func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp movl %edi, -8(%rbp) movl %esi, -12(%rbp) movl -12(%rbp), %eax cmpl -8(%rbp), %eax jge LBB0_2 ## %bb.1: movl $-1, -4(%rbp) jmp LBB0_8 LBB0_2: movl -12(%rbp), %eax cmpl -8(%rbp), %eax jne LBB0_5 ## %bb.3: movl -12(%rbp), %eax movl $2, %ecx cltd idivl %ecx cmpl $1, %edx jne LBB0_5 ## %bb.4: movl $-1, -4(%rbp) jmp LBB0_8 LBB0_5: movl -12(%rbp), %eax movl $2, %ecx cltd idivl %ecx cmpl $1, %edx jne LBB0_7 ## %bb.6: movl -12(%rbp), %eax subl $1, %eax movl %eax, -4(%rbp) jmp LBB0_8 LBB0_7: movl -12(%rbp), %eax movl %eax, -4(%rbp) LBB0_8: movl -4(%rbp), %eax popq %rbp retq .cfi_endproc ## -- End function .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #16 .cfi_def_cfa_offset 16 str w0, [sp, #8] str w1, [sp, #4] ldr w8, [sp, #4] ldr w9, [sp, #8] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_2 b LBB0_1 LBB0_1: mov w8, #-1 str w8, [sp, #12] b LBB0_8 LBB0_2: ldr w8, [sp, #4] ldr w9, [sp, #8] subs w8, w8, w9 cset w8, ne tbnz w8, #0, LBB0_5 b LBB0_3 LBB0_3: ldr w8, [sp, #4] mov w10, #2 sdiv w9, w8, w10 mul w9, w9, w10 subs w8, w8, w9 subs w8, w8, #1 cset w8, ne tbnz w8, #0, LBB0_5 b LBB0_4 LBB0_4: mov w8, #-1 str w8, [sp, #12] b LBB0_8 LBB0_5: ldr w8, [sp, #4] mov w10, #2 sdiv w9, w8, w10 mul w9, w9, w10 subs w8, w8, w9 subs w8, w8, #1 cset w8, ne tbnz w8, #0, LBB0_7 b LBB0_6 LBB0_6: ldr w8, [sp, #4] subs w8, w8, #1 str w8, [sp, #12] b LBB0_8 LBB0_7: ldr w8, [sp, #4] str w8, [sp, #12] b LBB0_8 LBB0_8: ldr w0, [sp, #12] add sp, sp, #16 ret .cfi_endproc ; -- End function .subsections_via_symbols
eval/problem102/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ## -- Begin function func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp movl %edi, -8(%rbp) movl %esi, -12(%rbp) movl -12(%rbp), %eax cmpl -8(%rbp), %eax jge LBB0_2 ## %bb.1: movl $-1, -4(%rbp) jmp LBB0_8 LBB0_2: movl -12(%rbp), %eax cmpl -8(%rbp), %eax jne LBB0_5 ## %bb.3: movl -12(%rbp), %eax movl $2, %ecx cltd idivl %ecx cmpl $1, %edx jne LBB0_5 ## %bb.4: movl $-1, -4(%rbp) jmp LBB0_8 LBB0_5: movl -12(%rbp), %eax movl $2, %ecx cltd idivl %ecx cmpl $1, %edx jne LBB0_7 ## %bb.6: movl -12(%rbp), %eax subl $1, %eax movl %eax, -4(%rbp) jmp LBB0_8 LBB0_7: movl -12(%rbp), %eax movl %eax, -4(%rbp) LBB0_8: movl -4(%rbp), %eax popq %rbp retq .cfi_endproc ## -- End function .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #16 .cfi_def_cfa_offset 16 str w0, [sp, #8] str w1, [sp, #4] ldr w8, [sp, #4] ldr w9, [sp, #8] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_2 b LBB0_1 LBB0_1: mov w8, #-1 str w8, [sp, #12] b LBB0_8 LBB0_2: ldr w8, [sp, #4] ldr w9, [sp, #8] subs w8, w8, w9 cset w8, ne tbnz w8, #0, LBB0_5 b LBB0_3 LBB0_3: ldr w8, [sp, #4] mov w10, #2 sdiv w9, w8, w10 mul w9, w9, w10 subs w8, w8, w9 subs w8, w8, #1 cset w8, ne tbnz w8, #0, LBB0_5 b LBB0_4 LBB0_4: mov w8, #-1 str w8, [sp, #12] b LBB0_8 LBB0_5: ldr w8, [sp, #4] mov w10, #2 sdiv w9, w8, w10 mul w9, w9, w10 subs w8, w8, w9 subs w8, w8, #1 cset w8, ne tbnz w8, #0, LBB0_7 b LBB0_6 LBB0_6: ldr w8, [sp, #4] subs w8, w8, #1 str w8, [sp, #12] b LBB0_8 LBB0_7: ldr w8, [sp, #4] str w8, [sp, #12] b LBB0_8 LBB0_8: ldr w0, [sp, #12] add sp, sp, #16 ret .cfi_endproc ; -- End function .subsections_via_symbols
eval/problem103/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ## -- Begin function func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp subq $48, %rsp movl %edi, -12(%rbp) movl %esi, -16(%rbp) movl -12(%rbp), %eax cmpl -16(%rbp), %eax jle LBB0_2 ## %bb.1: leaq L_.str(%rip), %rax movq %rax, -8(%rbp) jmp LBB0_6 LBB0_2: movl -16(%rbp), %eax addl -12(%rbp), %eax movl $2, %ecx cltd idivl %ecx movl %eax, -20(%rbp) movl $33, %edi callq _malloc movq %rax, -32(%rbp) movq -32(%rbp), %rax movb $0, (%rax) movl $32, -36(%rbp) movq -32(%rbp), %rax movl -36(%rbp), %ecx movl %ecx, %edx addl $-1, %edx movl %edx, -36(%rbp) movslq %ecx, %rcx movb $0, (%rax,%rcx) LBB0_3: ## =>This Inner Loop Header: Depth=1 movl -20(%rbp), %eax movl $2, %ecx cltd idivl %ecx addl $48, %edx ## kill: def $dl killed $dl killed $edx movq -32(%rbp), %rax movl -36(%rbp), %ecx movl %ecx, %esi addl $-1, %esi movl %esi, -36(%rbp) movslq %ecx, %rcx movb %dl, (%rax,%rcx) movl -20(%rbp), %eax movl $2, %ecx cltd idivl %ecx movl %eax, -20(%rbp) ## %bb.4: ## in Loop: Header=BB0_3 Depth=1 cmpl $0, -20(%rbp) jg LBB0_3 ## %bb.5: movq -32(%rbp), %rax movl -36(%rbp), %ecx addl $1, %ecx movslq %ecx, %rcx addq %rcx, %rax movq %rax, -8(%rbp) LBB0_6: movq -8(%rbp), %rax addq $48, %rsp popq %rbp retq .cfi_endproc ## -- End function .section __TEXT,__cstring,cstring_literals L_.str: ## @.str .asciz "-1" .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #64 .cfi_def_cfa_offset 64 stp x29, x30, [sp, #48] ; 16-byte Folded Spill add x29, sp, #48 .cfi_def_cfa w29, 16 .cfi_offset w30, -8 .cfi_offset w29, -16 stur w0, [x29, #-12] stur w1, [x29, #-16] ldur w8, [x29, #-12] ldur w9, [x29, #-16] subs w8, w8, w9 cset w8, le tbnz w8, #0, LBB0_2 b LBB0_1 LBB0_1: adrp x8, l_.str@PAGE add x8, x8, l_.str@PAGEOFF stur x8, [x29, #-8] b LBB0_6 LBB0_2: ldur w8, [x29, #-16] ldur w9, [x29, #-12] add w8, w8, w9 mov w9, #2 sdiv w8, w8, w9 stur w8, [x29, #-20] mov x0, #33 bl _malloc str x0, [sp, #16] ldr x8, [sp, #16] strb wzr, [x8] mov w8, #32 str w8, [sp, #12] ldr x8, [sp, #16] ldrsw x9, [sp, #12] mov x10, x9 subs w10, w10, #1 str w10, [sp, #12] add x8, x8, x9 strb wzr, [x8] b LBB0_3 LBB0_3: ; =>This Inner Loop Header: Depth=1 ldur w8, [x29, #-20] mov w9, #2 sdiv w10, w8, w9 mul w10, w10, w9 subs w8, w8, w10 add w8, w8, #48 ldr x10, [sp, #16] ldrsw x11, [sp, #12] mov x12, x11 subs w12, w12, #1 str w12, [sp, #12] strb w8, [x10, x11] ldur w8, [x29, #-20] sdiv w8, w8, w9 stur w8, [x29, #-20] b LBB0_4 LBB0_4: ; in Loop: Header=BB0_3 Depth=1 ldur w8, [x29, #-20] subs w8, w8, #0 cset w8, gt tbnz w8, #0, LBB0_3 b LBB0_5 LBB0_5: ldr x8, [sp, #16] ldr w9, [sp, #12] add w9, w9, #1 add x8, x8, w9, sxtw stur x8, [x29, #-8] b LBB0_6 LBB0_6: ldur x0, [x29, #-8] ldp x29, x30, [sp, #48] ; 16-byte Folded Reload add sp, sp, #64 ret .cfi_endproc ; -- End function .section __TEXT,__cstring,cstring_literals l_.str: ; @.str .asciz "-1" .subsections_via_symbols
eval/problem104/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ## -- Begin function func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp subq $64, %rsp movq %rdi, -8(%rbp) movl %esi, -12(%rbp) movq %rdx, -24(%rbp) movq %rcx, -32(%rbp) movslq -12(%rbp), %rdi shlq $2, %rdi callq _malloc movq %rax, %rcx movq -24(%rbp), %rax movq %rcx, (%rax) movq -32(%rbp), %rax movl $0, (%rax) movl $0, -36(%rbp) LBB0_1: ## =>This Loop Header: Depth=1 ## Child Loop BB0_5 Depth 2 movl -36(%rbp), %eax cmpl -12(%rbp), %eax jge LBB0_15 ## %bb.2: ## in Loop: Header=BB0_1 Depth=1 movq -8(%rbp), %rax movslq -36(%rbp), %rcx movl (%rax,%rcx,4), %eax movl %eax, -40(%rbp) movb $0, -41(%rbp) cmpl $0, -40(%rbp) jne LBB0_4 ## %bb.3: ## in Loop: Header=BB0_1 Depth=1 movb $1, -41(%rbp) LBB0_4: ## in Loop: Header=BB0_1 Depth=1 jmp LBB0_5 LBB0_5: ## Parent Loop BB0_1 Depth=1 ## => This Inner Loop Header: Depth=2 xorl %eax, %eax ## kill: def $al killed $al killed $eax cmpl $0, -40(%rbp) movb %al, -57(%rbp) ## 1-byte Spill jle LBB0_7 ## %bb.6: ## in Loop: Header=BB0_5 Depth=2 movb -41(%rbp), %al xorb $-1, %al movb %al, -57(%rbp) ## 1-byte Spill LBB0_7: ## in Loop: Header=BB0_5 Depth=2 movb -57(%rbp), %al ## 1-byte Reload testb $1, %al jne LBB0_8 jmp LBB0_11 LBB0_8: ## in Loop: Header=BB0_5 Depth=2 movl -40(%rbp), %eax movl $2, %ecx cltd idivl %ecx cmpl $0, %edx jne LBB0_10 ## %bb.9: ## in Loop: Header=BB0_5 Depth=2 movb $1, -41(%rbp) LBB0_10: ## in Loop: Header=BB0_5 Depth=2 movl -40(%rbp), %eax movl $10, %ecx cltd idivl %ecx movl %eax, -40(%rbp) jmp LBB0_5 LBB0_11: ## in Loop: Header=BB0_1 Depth=1 testb $1, -41(%rbp) jne LBB0_13 ## %bb.12: ## in Loop: Header=BB0_1 Depth=1 movq -8(%rbp), %rax movslq -36(%rbp), %rcx movl (%rax,%rcx,4), %edx movq -24(%rbp), %rax movq (%rax), %rax movq -32(%rbp), %rcx movslq (%rcx), %rcx movl %edx, (%rax,%rcx,4) movq -32(%rbp), %rax movl (%rax), %ecx addl $1, %ecx movl %ecx, (%rax) LBB0_13: ## in Loop: Header=BB0_1 Depth=1 jmp LBB0_14 LBB0_14: ## in Loop: Header=BB0_1 Depth=1 movl -36(%rbp), %eax addl $1, %eax movl %eax, -36(%rbp) jmp LBB0_1 LBB0_15: movl $0, -48(%rbp) LBB0_16: ## =>This Loop Header: Depth=1 ## Child Loop BB0_18 Depth 2 movl -48(%rbp), %eax movq -32(%rbp), %rcx movl (%rcx), %ecx subl $1, %ecx cmpl %ecx, %eax jge LBB0_25 ## %bb.17: ## in Loop: Header=BB0_16 Depth=1 movl $0, -52(%rbp) LBB0_18: ## Parent Loop BB0_16 Depth=1 ## => This Inner Loop Header: Depth=2 movl -52(%rbp), %eax movq -32(%rbp), %rcx movl (%rcx), %ecx subl -48(%rbp), %ecx subl $1, %ecx cmpl %ecx, %eax jge LBB0_23 ## %bb.19: ## in Loop: Header=BB0_18 Depth=2 movq -24(%rbp), %rax movq (%rax), %rax movslq -52(%rbp), %rcx movl (%rax,%rcx,4), %eax movq -24(%rbp), %rcx movq (%rcx), %rcx movl -52(%rbp), %edx addl $1, %edx movslq %edx, %rdx cmpl (%rcx,%rdx,4), %eax jle LBB0_21 ## %bb.20: ## in Loop: Header=BB0_18 Depth=2 movq -24(%rbp), %rax movq (%rax), %rax movslq -52(%rbp), %rcx movl (%rax,%rcx,4), %eax movl %eax, -56(%rbp) movq -24(%rbp), %rax movq (%rax), %rax movl -52(%rbp), %ecx addl $1, %ecx movslq %ecx, %rcx movl (%rax,%rcx,4), %edx movq -24(%rbp), %rax movq (%rax), %rax movslq -52(%rbp), %rcx movl %edx, (%rax,%rcx,4) movl -56(%rbp), %edx movq -24(%rbp), %rax movq (%rax), %rax movl -52(%rbp), %ecx addl $1, %ecx movslq %ecx, %rcx movl %edx, (%rax,%rcx,4) LBB0_21: ## in Loop: Header=BB0_18 Depth=2 jmp LBB0_22 LBB0_22: ## in Loop: Header=BB0_18 Depth=2 movl -52(%rbp), %eax addl $1, %eax movl %eax, -52(%rbp) jmp LBB0_18 LBB0_23: ## in Loop: Header=BB0_16 Depth=1 jmp LBB0_24 LBB0_24: ## in Loop: Header=BB0_16 Depth=1 movl -48(%rbp), %eax addl $1, %eax movl %eax, -48(%rbp) jmp LBB0_16 LBB0_25: addq $64, %rsp popq %rbp retq .cfi_endproc ## -- End function .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #80 .cfi_def_cfa_offset 80 stp x29, x30, [sp, #64] ; 16-byte Folded Spill add x29, sp, #64 .cfi_def_cfa w29, 16 .cfi_offset w30, -8 .cfi_offset w29, -16 stur x0, [x29, #-8] stur w1, [x29, #-12] stur x2, [x29, #-24] str x3, [sp, #32] ldursw x8, [x29, #-12] lsl x0, x8, #2 bl _malloc ldur x8, [x29, #-24] str x0, [x8] ldr x8, [sp, #32] str wzr, [x8] str wzr, [sp, #28] b LBB0_1 LBB0_1: ; =>This Loop Header: Depth=1 ; Child Loop BB0_5 Depth 2 ldr w8, [sp, #28] ldur w9, [x29, #-12] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_15 b LBB0_2 LBB0_2: ; in Loop: Header=BB0_1 Depth=1 ldur x8, [x29, #-8] ldrsw x9, [sp, #28] ldr w8, [x8, x9, lsl #2] str w8, [sp, #24] strb wzr, [sp, #23] ldr w8, [sp, #24] subs w8, w8, #0 cset w8, ne tbnz w8, #0, LBB0_4 b LBB0_3 LBB0_3: ; in Loop: Header=BB0_1 Depth=1 mov w8, #1 strb w8, [sp, #23] b LBB0_4 LBB0_4: ; in Loop: Header=BB0_1 Depth=1 b LBB0_5 LBB0_5: ; Parent Loop BB0_1 Depth=1 ; => This Inner Loop Header: Depth=2 ldr w8, [sp, #24] subs w8, w8, #0 cset w8, le mov w9, #0 str w9, [sp, #4] ; 4-byte Folded Spill tbnz w8, #0, LBB0_7 b LBB0_6 LBB0_6: ; in Loop: Header=BB0_5 Depth=2 ldrb w8, [sp, #23] eor w8, w8, #0x1 str w8, [sp, #4] ; 4-byte Folded Spill b LBB0_7 LBB0_7: ; in Loop: Header=BB0_5 Depth=2 ldr w8, [sp, #4] ; 4-byte Folded Reload tbz w8, #0, LBB0_11 b LBB0_8 LBB0_8: ; in Loop: Header=BB0_5 Depth=2 ldr w8, [sp, #24] mov w10, #2 sdiv w9, w8, w10 mul w9, w9, w10 subs w8, w8, w9 subs w8, w8, #0 cset w8, ne tbnz w8, #0, LBB0_10 b LBB0_9 LBB0_9: ; in Loop: Header=BB0_5 Depth=2 mov w8, #1 strb w8, [sp, #23] b LBB0_10 LBB0_10: ; in Loop: Header=BB0_5 Depth=2 ldr w8, [sp, #24] mov w9, #10 sdiv w8, w8, w9 str w8, [sp, #24] b LBB0_5 LBB0_11: ; in Loop: Header=BB0_1 Depth=1 ldrb w8, [sp, #23] tbnz w8, #0, LBB0_13 b LBB0_12 LBB0_12: ; in Loop: Header=BB0_1 Depth=1 ldur x8, [x29, #-8] ldrsw x9, [sp, #28] ldr w8, [x8, x9, lsl #2] ldur x9, [x29, #-24] ldr x9, [x9] ldr x10, [sp, #32] ldrsw x10, [x10] str w8, [x9, x10, lsl #2] ldr x9, [sp, #32] ldr w8, [x9] add w8, w8, #1 str w8, [x9] b LBB0_13 LBB0_13: ; in Loop: Header=BB0_1 Depth=1 b LBB0_14 LBB0_14: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #28] add w8, w8, #1 str w8, [sp, #28] b LBB0_1 LBB0_15: str wzr, [sp, #16] b LBB0_16 LBB0_16: ; =>This Loop Header: Depth=1 ; Child Loop BB0_18 Depth 2 ldr w8, [sp, #16] ldr x9, [sp, #32] ldr w9, [x9] subs w9, w9, #1 subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_25 b LBB0_17 LBB0_17: ; in Loop: Header=BB0_16 Depth=1 str wzr, [sp, #12] b LBB0_18 LBB0_18: ; Parent Loop BB0_16 Depth=1 ; => This Inner Loop Header: Depth=2 ldr w8, [sp, #12] ldr x9, [sp, #32] ldr w9, [x9] ldr w10, [sp, #16] subs w9, w9, w10 subs w9, w9, #1 subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_23 b LBB0_19 LBB0_19: ; in Loop: Header=BB0_18 Depth=2 ldur x8, [x29, #-24] ldr x8, [x8] ldrsw x9, [sp, #12] ldr w8, [x8, x9, lsl #2] ldur x9, [x29, #-24] ldr x9, [x9] ldr w10, [sp, #12] add w10, w10, #1 ldr w9, [x9, w10, sxtw #2] subs w8, w8, w9 cset w8, le tbnz w8, #0, LBB0_21 b LBB0_20 LBB0_20: ; in Loop: Header=BB0_18 Depth=2 ldur x8, [x29, #-24] ldr x8, [x8] ldrsw x9, [sp, #12] ldr w8, [x8, x9, lsl #2] str w8, [sp, #8] ldur x8, [x29, #-24] ldr x8, [x8] ldr w9, [sp, #12] add w9, w9, #1 ldr w8, [x8, w9, sxtw #2] ldur x9, [x29, #-24] ldr x9, [x9] ldrsw x10, [sp, #12] str w8, [x9, x10, lsl #2] ldr w8, [sp, #8] ldur x9, [x29, #-24] ldr x9, [x9] ldr w10, [sp, #12] add w10, w10, #1 str w8, [x9, w10, sxtw #2] b LBB0_21 LBB0_21: ; in Loop: Header=BB0_18 Depth=2 b LBB0_22 LBB0_22: ; in Loop: Header=BB0_18 Depth=2 ldr w8, [sp, #12] add w8, w8, #1 str w8, [sp, #12] b LBB0_18 LBB0_23: ; in Loop: Header=BB0_16 Depth=1 b LBB0_24 LBB0_24: ; in Loop: Header=BB0_16 Depth=1 ldr w8, [sp, #16] add w8, w8, #1 str w8, [sp, #16] b LBB0_16 LBB0_25: ldp x29, x30, [sp, #64] ; 16-byte Folded Reload add sp, sp, #80 ret .cfi_endproc ; -- End function .subsections_via_symbols
eval/problem105/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ## -- Begin function func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp subq $144, %rsp movq ___stack_chk_guard@GOTPCREL(%rip), %rax movq (%rax), %rax movq %rax, -8(%rbp) movq %rdi, -104(%rbp) movl %esi, -108(%rbp) movq %rdx, -120(%rbp) movq %rcx, -128(%rbp) leaq -96(%rbp), %rdi leaq l___const.func0.names(%rip), %rsi movl $80, %edx callq _memcpy movl $0, -132(%rbp) LBB0_1: ## =>This Loop Header: Depth=1 ## Child Loop BB0_3 Depth 2 movl -132(%rbp), %eax movl -108(%rbp), %ecx subl $1, %ecx cmpl %ecx, %eax jge LBB0_10 ## %bb.2: ## in Loop: Header=BB0_1 Depth=1 movl $0, -136(%rbp) LBB0_3: ## Parent Loop BB0_1 Depth=1 ## => This Inner Loop Header: Depth=2 movl -136(%rbp), %eax movl -108(%rbp), %ecx subl -132(%rbp), %ecx subl $1, %ecx cmpl %ecx, %eax jge LBB0_8 ## %bb.4: ## in Loop: Header=BB0_3 Depth=2 movq -104(%rbp), %rax movslq -136(%rbp), %rcx movl (%rax,%rcx,4), %eax movq -104(%rbp), %rcx movl -136(%rbp), %edx addl $1, %edx movslq %edx, %rdx cmpl (%rcx,%rdx,4), %eax jle LBB0_6 ## %bb.5: ## in Loop: Header=BB0_3 Depth=2 movq -104(%rbp), %rax movslq -136(%rbp), %rcx movl (%rax,%rcx,4), %eax movl %eax, -140(%rbp) movq -104(%rbp), %rax movl -136(%rbp), %ecx addl $1, %ecx movslq %ecx, %rcx movl (%rax,%rcx,4), %edx movq -104(%rbp), %rax movslq -136(%rbp), %rcx movl %edx, (%rax,%rcx,4) movl -140(%rbp), %edx movq -104(%rbp), %rax movl -136(%rbp), %ecx addl $1, %ecx movslq %ecx, %rcx movl %edx, (%rax,%rcx,4) LBB0_6: ## in Loop: Header=BB0_3 Depth=2 jmp LBB0_7 LBB0_7: ## in Loop: Header=BB0_3 Depth=2 movl -136(%rbp), %eax addl $1, %eax movl %eax, -136(%rbp) jmp LBB0_3 LBB0_8: ## in Loop: Header=BB0_1 Depth=1 jmp LBB0_9 LBB0_9: ## in Loop: Header=BB0_1 Depth=1 movl -132(%rbp), %eax addl $1, %eax movl %eax, -132(%rbp) jmp LBB0_1 LBB0_10: movq -128(%rbp), %rax movl $0, (%rax) movl -108(%rbp), %eax subl $1, %eax movl %eax, -132(%rbp) LBB0_11: ## =>This Inner Loop Header: Depth=1 cmpl $0, -132(%rbp) jl LBB0_17 ## %bb.12: ## in Loop: Header=BB0_11 Depth=1 movq -104(%rbp), %rax movslq -132(%rbp), %rcx cmpl $1, (%rax,%rcx,4) jl LBB0_15 ## %bb.13: ## in Loop: Header=BB0_11 Depth=1 movq -104(%rbp), %rax movslq -132(%rbp), %rcx cmpl $9, (%rax,%rcx,4) jg LBB0_15 ## %bb.14: ## in Loop: Header=BB0_11 Depth=1 movq -128(%rbp), %rax movl (%rax), %ecx addl $1, %ecx movl %ecx, (%rax) LBB0_15: ## in Loop: Header=BB0_11 Depth=1 jmp LBB0_16 LBB0_16: ## in Loop: Header=BB0_11 Depth=1 movl -132(%rbp), %eax addl $-1, %eax movl %eax, -132(%rbp) jmp LBB0_11 LBB0_17: movq -128(%rbp), %rax movslq (%rax), %rdi shlq $3, %rdi callq _malloc movq %rax, %rcx movq -120(%rbp), %rax movq %rcx, (%rax) movl -108(%rbp), %eax subl $1, %eax movl %eax, -132(%rbp) movl $0, -136(%rbp) LBB0_18: ## =>This Inner Loop Header: Depth=1 xorl %eax, %eax ## kill: def $al killed $al killed $eax cmpl $0, -132(%rbp) movb %al, -141(%rbp) ## 1-byte Spill jl LBB0_20 ## %bb.19: ## in Loop: Header=BB0_18 Depth=1 movl -136(%rbp), %eax movq -128(%rbp), %rcx cmpl (%rcx), %eax setl %al movb %al, -141(%rbp) ## 1-byte Spill LBB0_20: ## in Loop: Header=BB0_18 Depth=1 movb -141(%rbp), %al ## 1-byte Reload testb $1, %al jne LBB0_21 jmp LBB0_26 LBB0_21: ## in Loop: Header=BB0_18 Depth=1 movq -104(%rbp), %rax movslq -132(%rbp), %rcx cmpl $1, (%rax,%rcx,4) jl LBB0_24 ## %bb.22: ## in Loop: Header=BB0_18 Depth=1 movq -104(%rbp), %rax movslq -132(%rbp), %rcx cmpl $9, (%rax,%rcx,4) jg LBB0_24 ## %bb.23: ## in Loop: Header=BB0_18 Depth=1 movq -104(%rbp), %rax movslq -132(%rbp), %rcx movslq (%rax,%rcx,4), %rax movq -96(%rbp,%rax,8), %rdx movq -120(%rbp), %rax movq (%rax), %rax movl -136(%rbp), %ecx movl %ecx, %esi addl $1, %esi movl %esi, -136(%rbp) movslq %ecx, %rcx movq %rdx, (%rax,%rcx,8) LBB0_24: ## in Loop: Header=BB0_18 Depth=1 jmp LBB0_25 LBB0_25: ## in Loop: Header=BB0_18 Depth=1 movl -132(%rbp), %eax addl $-1, %eax movl %eax, -132(%rbp) jmp LBB0_18 LBB0_26: movq ___stack_chk_guard@GOTPCREL(%rip), %rax movq (%rax), %rax movq -8(%rbp), %rcx cmpq %rcx, %rax jne LBB0_28 ## %bb.27: addq $144, %rsp popq %rbp retq LBB0_28: callq ___stack_chk_fail ud2 .cfi_endproc ## -- End function .section __TEXT,__cstring,cstring_literals L_.str: ## @.str .space 1 L_.str.1: ## @.str.1 .asciz "One" L_.str.2: ## @.str.2 .asciz "Two" L_.str.3: ## @.str.3 .asciz "Three" L_.str.4: ## @.str.4 .asciz "Four" L_.str.5: ## @.str.5 .asciz "Five" L_.str.6: ## @.str.6 .asciz "Six" L_.str.7: ## @.str.7 .asciz "Seven" L_.str.8: ## @.str.8 .asciz "Eight" L_.str.9: ## @.str.9 .asciz "Nine" .section __DATA,__const .p2align 4 ## @__const.func0.names l___const.func0.names: .quad L_.str .quad L_.str.1 .quad L_.str.2 .quad L_.str.3 .quad L_.str.4 .quad L_.str.5 .quad L_.str.6 .quad L_.str.7 .quad L_.str.8 .quad L_.str.9 .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #160 .cfi_def_cfa_offset 160 stp x29, x30, [sp, #144] ; 16-byte Folded Spill add x29, sp, #144 .cfi_def_cfa w29, 16 .cfi_offset w30, -8 .cfi_offset w29, -16 adrp x8, ___stack_chk_guard@GOTPAGE ldr x8, [x8, ___stack_chk_guard@GOTPAGEOFF] ldr x8, [x8] stur x8, [x29, #-8] str x0, [sp, #48] str w1, [sp, #44] str x2, [sp, #32] str x3, [sp, #24] add x0, sp, #56 adrp x1, l___const.func0.names@PAGE add x1, x1, l___const.func0.names@PAGEOFF mov x2, #80 bl _memcpy str wzr, [sp, #20] b LBB0_1 LBB0_1: ; =>This Loop Header: Depth=1 ; Child Loop BB0_3 Depth 2 ldr w8, [sp, #20] ldr w9, [sp, #44] subs w9, w9, #1 subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_10 b LBB0_2 LBB0_2: ; in Loop: Header=BB0_1 Depth=1 str wzr, [sp, #16] b LBB0_3 LBB0_3: ; Parent Loop BB0_1 Depth=1 ; => This Inner Loop Header: Depth=2 ldr w8, [sp, #16] ldr w9, [sp, #44] ldr w10, [sp, #20] subs w9, w9, w10 subs w9, w9, #1 subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_8 b LBB0_4 LBB0_4: ; in Loop: Header=BB0_3 Depth=2 ldr x8, [sp, #48] ldrsw x9, [sp, #16] ldr w8, [x8, x9, lsl #2] ldr x9, [sp, #48] ldr w10, [sp, #16] add w10, w10, #1 ldr w9, [x9, w10, sxtw #2] subs w8, w8, w9 cset w8, le tbnz w8, #0, LBB0_6 b LBB0_5 LBB0_5: ; in Loop: Header=BB0_3 Depth=2 ldr x8, [sp, #48] ldrsw x9, [sp, #16] ldr w8, [x8, x9, lsl #2] str w8, [sp, #12] ldr x8, [sp, #48] ldr w9, [sp, #16] add w9, w9, #1 ldr w8, [x8, w9, sxtw #2] ldr x9, [sp, #48] ldrsw x10, [sp, #16] str w8, [x9, x10, lsl #2] ldr w8, [sp, #12] ldr x9, [sp, #48] ldr w10, [sp, #16] add w10, w10, #1 str w8, [x9, w10, sxtw #2] b LBB0_6 LBB0_6: ; in Loop: Header=BB0_3 Depth=2 b LBB0_7 LBB0_7: ; in Loop: Header=BB0_3 Depth=2 ldr w8, [sp, #16] add w8, w8, #1 str w8, [sp, #16] b LBB0_3 LBB0_8: ; in Loop: Header=BB0_1 Depth=1 b LBB0_9 LBB0_9: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #20] add w8, w8, #1 str w8, [sp, #20] b LBB0_1 LBB0_10: ldr x8, [sp, #24] str wzr, [x8] ldr w8, [sp, #44] subs w8, w8, #1 str w8, [sp, #20] b LBB0_11 LBB0_11: ; =>This Inner Loop Header: Depth=1 ldr w8, [sp, #20] subs w8, w8, #0 cset w8, lt tbnz w8, #0, LBB0_17 b LBB0_12 LBB0_12: ; in Loop: Header=BB0_11 Depth=1 ldr x8, [sp, #48] ldrsw x9, [sp, #20] ldr w8, [x8, x9, lsl #2] subs w8, w8, #1 cset w8, lt tbnz w8, #0, LBB0_15 b LBB0_13 LBB0_13: ; in Loop: Header=BB0_11 Depth=1 ldr x8, [sp, #48] ldrsw x9, [sp, #20] ldr w8, [x8, x9, lsl #2] subs w8, w8, #9 cset w8, gt tbnz w8, #0, LBB0_15 b LBB0_14 LBB0_14: ; in Loop: Header=BB0_11 Depth=1 ldr x9, [sp, #24] ldr w8, [x9] add w8, w8, #1 str w8, [x9] b LBB0_15 LBB0_15: ; in Loop: Header=BB0_11 Depth=1 b LBB0_16 LBB0_16: ; in Loop: Header=BB0_11 Depth=1 ldr w8, [sp, #20] subs w8, w8, #1 str w8, [sp, #20] b LBB0_11 LBB0_17: ldr x8, [sp, #24] ldrsw x8, [x8] lsl x0, x8, #3 bl _malloc ldr x8, [sp, #32] str x0, [x8] ldr w8, [sp, #44] subs w8, w8, #1 str w8, [sp, #20] str wzr, [sp, #16] b LBB0_18 LBB0_18: ; =>This Inner Loop Header: Depth=1 ldr w8, [sp, #20] subs w8, w8, #0 cset w8, lt mov w9, #0 str w9, [sp, #8] ; 4-byte Folded Spill tbnz w8, #0, LBB0_20 b LBB0_19 LBB0_19: ; in Loop: Header=BB0_18 Depth=1 ldr w8, [sp, #16] ldr x9, [sp, #24] ldr w9, [x9] subs w8, w8, w9 cset w8, lt str w8, [sp, #8] ; 4-byte Folded Spill b LBB0_20 LBB0_20: ; in Loop: Header=BB0_18 Depth=1 ldr w8, [sp, #8] ; 4-byte Folded Reload tbz w8, #0, LBB0_26 b LBB0_21 LBB0_21: ; in Loop: Header=BB0_18 Depth=1 ldr x8, [sp, #48] ldrsw x9, [sp, #20] ldr w8, [x8, x9, lsl #2] subs w8, w8, #1 cset w8, lt tbnz w8, #0, LBB0_24 b LBB0_22 LBB0_22: ; in Loop: Header=BB0_18 Depth=1 ldr x8, [sp, #48] ldrsw x9, [sp, #20] ldr w8, [x8, x9, lsl #2] subs w8, w8, #9 cset w8, gt tbnz w8, #0, LBB0_24 b LBB0_23 LBB0_23: ; in Loop: Header=BB0_18 Depth=1 ldr x8, [sp, #48] ldrsw x9, [sp, #20] ldrsw x9, [x8, x9, lsl #2] add x8, sp, #56 ldr x8, [x8, x9, lsl #3] ldr x9, [sp, #32] ldr x9, [x9] ldrsw x10, [sp, #16] mov x11, x10 add w11, w11, #1 str w11, [sp, #16] str x8, [x9, x10, lsl #3] b LBB0_24 LBB0_24: ; in Loop: Header=BB0_18 Depth=1 b LBB0_25 LBB0_25: ; in Loop: Header=BB0_18 Depth=1 ldr w8, [sp, #20] subs w8, w8, #1 str w8, [sp, #20] b LBB0_18 LBB0_26: ldur x9, [x29, #-8] adrp x8, ___stack_chk_guard@GOTPAGE ldr x8, [x8, ___stack_chk_guard@GOTPAGEOFF] ldr x8, [x8] subs x8, x8, x9 cset w8, eq tbnz w8, #0, LBB0_28 b LBB0_27 LBB0_27: bl ___stack_chk_fail LBB0_28: ldp x29, x30, [sp, #144] ; 16-byte Folded Reload add sp, sp, #160 ret .cfi_endproc ; -- End function .section __TEXT,__cstring,cstring_literals l_.str: ; @.str .space 1 l_.str.1: ; @.str.1 .asciz "One" l_.str.2: ; @.str.2 .asciz "Two" l_.str.3: ; @.str.3 .asciz "Three" l_.str.4: ; @.str.4 .asciz "Four" l_.str.5: ; @.str.5 .asciz "Five" l_.str.6: ; @.str.6 .asciz "Six" l_.str.7: ; @.str.7 .asciz "Seven" l_.str.8: ; @.str.8 .asciz "Eight" l_.str.9: ; @.str.9 .asciz "Nine" .section __DATA,__const .p2align 3 ; @__const.func0.names l___const.func0.names: .quad l_.str .quad l_.str.1 .quad l_.str.2 .quad l_.str.3 .quad l_.str.4 .quad l_.str.5 .quad l_.str.6 .quad l_.str.7 .quad l_.str.8 .quad l_.str.9 .subsections_via_symbols
eval/problem106/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ## -- Begin function func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp subq $32, %rsp movl %edi, -4(%rbp) movslq -4(%rbp), %rdi shlq $2, %rdi callq _malloc movq %rax, -16(%rbp) movl $0, -20(%rbp) movl $1, -24(%rbp) movl $1, -28(%rbp) LBB0_1: ## =>This Inner Loop Header: Depth=1 movl -28(%rbp), %eax cmpl -4(%rbp), %eax jg LBB0_7 ## %bb.2: ## in Loop: Header=BB0_1 Depth=1 movl -28(%rbp), %eax addl -20(%rbp), %eax movl %eax, -20(%rbp) movl -28(%rbp), %eax imull -24(%rbp), %eax movl %eax, -24(%rbp) movl -28(%rbp), %eax movl $2, %ecx cltd idivl %ecx cmpl $0, %edx jne LBB0_4 ## %bb.3: ## in Loop: Header=BB0_1 Depth=1 movl -24(%rbp), %edx movq -16(%rbp), %rax movl -28(%rbp), %ecx subl $1, %ecx movslq %ecx, %rcx movl %edx, (%rax,%rcx,4) jmp LBB0_5 LBB0_4: ## in Loop: Header=BB0_1 Depth=1 movl -20(%rbp), %edx movq -16(%rbp), %rax movl -28(%rbp), %ecx subl $1, %ecx movslq %ecx, %rcx movl %edx, (%rax,%rcx,4) LBB0_5: ## in Loop: Header=BB0_1 Depth=1 jmp LBB0_6 LBB0_6: ## in Loop: Header=BB0_1 Depth=1 movl -28(%rbp), %eax addl $1, %eax movl %eax, -28(%rbp) jmp LBB0_1 LBB0_7: movq -16(%rbp), %rax addq $32, %rsp popq %rbp retq .cfi_endproc ## -- End function .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #48 .cfi_def_cfa_offset 48 stp x29, x30, [sp, #32] ; 16-byte Folded Spill add x29, sp, #32 .cfi_def_cfa w29, 16 .cfi_offset w30, -8 .cfi_offset w29, -16 stur w0, [x29, #-4] ldursw x8, [x29, #-4] lsl x0, x8, #2 bl _malloc str x0, [sp, #16] str wzr, [sp, #12] mov w8, #1 str w8, [sp, #8] str w8, [sp, #4] b LBB0_1 LBB0_1: ; =>This Inner Loop Header: Depth=1 ldr w8, [sp, #4] ldur w9, [x29, #-4] subs w8, w8, w9 cset w8, gt tbnz w8, #0, LBB0_7 b LBB0_2 LBB0_2: ; in Loop: Header=BB0_1 Depth=1 ldr w9, [sp, #4] ldr w8, [sp, #12] add w8, w8, w9 str w8, [sp, #12] ldr w9, [sp, #4] ldr w8, [sp, #8] mul w8, w8, w9 str w8, [sp, #8] ldr w8, [sp, #4] mov w10, #2 sdiv w9, w8, w10 mul w9, w9, w10 subs w8, w8, w9 subs w8, w8, #0 cset w8, ne tbnz w8, #0, LBB0_4 b LBB0_3 LBB0_3: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #8] ldr x9, [sp, #16] ldr w10, [sp, #4] subs w10, w10, #1 str w8, [x9, w10, sxtw #2] b LBB0_5 LBB0_4: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #12] ldr x9, [sp, #16] ldr w10, [sp, #4] subs w10, w10, #1 str w8, [x9, w10, sxtw #2] b LBB0_5 LBB0_5: ; in Loop: Header=BB0_1 Depth=1 b LBB0_6 LBB0_6: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #4] add w8, w8, #1 str w8, [sp, #4] b LBB0_1 LBB0_7: ldr x0, [sp, #16] ldp x29, x30, [sp, #32] ; 16-byte Folded Reload add sp, sp, #48 ret .cfi_endproc ; -- End function .subsections_via_symbols
eval/problem107/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ## -- Begin function func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp subq $48, %rsp movl %edi, -4(%rbp) movl $8, %edi callq _malloc movq %rax, -16(%rbp) movq -16(%rbp), %rax movl $0, (%rax) movq -16(%rbp), %rax movl $0, 4(%rax) movl $1, -20(%rbp) LBB0_1: ## =>This Loop Header: Depth=1 ## Child Loop BB0_3 Depth 2 movl -20(%rbp), %eax cmpl -4(%rbp), %eax jg LBB0_12 ## %bb.2: ## in Loop: Header=BB0_1 Depth=1 movl $0, -24(%rbp) movl -20(%rbp), %eax movl %eax, -28(%rbp) movl -20(%rbp), %eax movl %eax, -32(%rbp) LBB0_3: ## Parent Loop BB0_1 Depth=1 ## => This Inner Loop Header: Depth=2 cmpl $0, -32(%rbp) je LBB0_5 ## %bb.4: ## in Loop: Header=BB0_3 Depth=2 imull $10, -24(%rbp), %eax movl %eax, -36(%rbp) ## 4-byte Spill movl -32(%rbp), %eax movl $10, %ecx cltd idivl %ecx movl -36(%rbp), %eax ## 4-byte Reload addl %edx, %eax movl %eax, -24(%rbp) movl -32(%rbp), %eax movl $10, %ecx cltd idivl %ecx movl %eax, -32(%rbp) jmp LBB0_3 LBB0_5: ## in Loop: Header=BB0_1 Depth=1 movl -28(%rbp), %eax cmpl -24(%rbp), %eax jne LBB0_10 ## %bb.6: ## in Loop: Header=BB0_1 Depth=1 movl -28(%rbp), %eax movl $2, %ecx cltd idivl %ecx cmpl $0, %edx jne LBB0_8 ## %bb.7: ## in Loop: Header=BB0_1 Depth=1 movq -16(%rbp), %rax movl (%rax), %ecx addl $1, %ecx movl %ecx, (%rax) jmp LBB0_9 LBB0_8: ## in Loop: Header=BB0_1 Depth=1 movq -16(%rbp), %rax movl 4(%rax), %ecx addl $1, %ecx movl %ecx, 4(%rax) LBB0_9: ## in Loop: Header=BB0_1 Depth=1 jmp LBB0_10 LBB0_10: ## in Loop: Header=BB0_1 Depth=1 jmp LBB0_11 LBB0_11: ## in Loop: Header=BB0_1 Depth=1 movl -20(%rbp), %eax addl $1, %eax movl %eax, -20(%rbp) jmp LBB0_1 LBB0_12: movq -16(%rbp), %rax addq $48, %rsp popq %rbp retq .cfi_endproc ## -- End function .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #48 .cfi_def_cfa_offset 48 stp x29, x30, [sp, #32] ; 16-byte Folded Spill add x29, sp, #32 .cfi_def_cfa w29, 16 .cfi_offset w30, -8 .cfi_offset w29, -16 stur w0, [x29, #-4] mov x0, #8 bl _malloc str x0, [sp, #16] ldr x8, [sp, #16] str wzr, [x8] ldr x8, [sp, #16] str wzr, [x8, #4] mov w8, #1 str w8, [sp, #12] b LBB0_1 LBB0_1: ; =>This Loop Header: Depth=1 ; Child Loop BB0_3 Depth 2 ldr w8, [sp, #12] ldur w9, [x29, #-4] subs w8, w8, w9 cset w8, gt tbnz w8, #0, LBB0_12 b LBB0_2 LBB0_2: ; in Loop: Header=BB0_1 Depth=1 str wzr, [sp, #8] ldr w8, [sp, #12] str w8, [sp, #4] ldr w8, [sp, #12] str w8, [sp] b LBB0_3 LBB0_3: ; Parent Loop BB0_1 Depth=1 ; => This Inner Loop Header: Depth=2 ldr w8, [sp] subs w8, w8, #0 cset w8, eq tbnz w8, #0, LBB0_5 b LBB0_4 LBB0_4: ; in Loop: Header=BB0_3 Depth=2 ldr w8, [sp, #8] mov w9, #10 mul w8, w8, w9 ldr w10, [sp] sdiv w11, w10, w9 mul w11, w11, w9 subs w10, w10, w11 add w8, w8, w10 str w8, [sp, #8] ldr w8, [sp] sdiv w8, w8, w9 str w8, [sp] b LBB0_3 LBB0_5: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #4] ldr w9, [sp, #8] subs w8, w8, w9 cset w8, ne tbnz w8, #0, LBB0_10 b LBB0_6 LBB0_6: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #4] mov w10, #2 sdiv w9, w8, w10 mul w9, w9, w10 subs w8, w8, w9 subs w8, w8, #0 cset w8, ne tbnz w8, #0, LBB0_8 b LBB0_7 LBB0_7: ; in Loop: Header=BB0_1 Depth=1 ldr x9, [sp, #16] ldr w8, [x9] add w8, w8, #1 str w8, [x9] b LBB0_9 LBB0_8: ; in Loop: Header=BB0_1 Depth=1 ldr x9, [sp, #16] ldr w8, [x9, #4] add w8, w8, #1 str w8, [x9, #4] b LBB0_9 LBB0_9: ; in Loop: Header=BB0_1 Depth=1 b LBB0_10 LBB0_10: ; in Loop: Header=BB0_1 Depth=1 b LBB0_11 LBB0_11: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #12] add w8, w8, #1 str w8, [sp, #12] b LBB0_1 LBB0_12: ldr x0, [sp, #16] ldp x29, x30, [sp, #32] ; 16-byte Folded Reload add sp, sp, #48 ret .cfi_endproc ; -- End function .subsections_via_symbols
eval/problem108/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ## -- Begin function func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp subq $32, %rsp movq %rdi, -8(%rbp) movl %esi, -12(%rbp) movl $0, -16(%rbp) movl $0, -20(%rbp) LBB0_1: ## =>This Loop Header: Depth=1 ## Child Loop BB0_5 Depth 2 movl -20(%rbp), %eax cmpl -12(%rbp), %eax jge LBB0_12 ## %bb.2: ## in Loop: Header=BB0_1 Depth=1 movq -8(%rbp), %rax movslq -20(%rbp), %rcx cmpl $0, (%rax,%rcx,4) jle LBB0_4 ## %bb.3: ## in Loop: Header=BB0_1 Depth=1 movl -16(%rbp), %eax addl $1, %eax movl %eax, -16(%rbp) jmp LBB0_10 LBB0_4: ## in Loop: Header=BB0_1 Depth=1 movl $0, -24(%rbp) movq -8(%rbp), %rax movslq -20(%rbp), %rcx movl (%rax,%rcx,4), %edi callq _abs movl %eax, -28(%rbp) LBB0_5: ## Parent Loop BB0_1 Depth=1 ## => This Inner Loop Header: Depth=2 cmpl $10, -28(%rbp) jl LBB0_7 ## %bb.6: ## in Loop: Header=BB0_5 Depth=2 movl -28(%rbp), %eax movl $10, %ecx cltd idivl %ecx addl -24(%rbp), %edx movl %edx, -24(%rbp) movl -28(%rbp), %eax movl $10, %ecx cltd idivl %ecx movl %eax, -28(%rbp) jmp LBB0_5 LBB0_7: ## in Loop: Header=BB0_1 Depth=1 movl -28(%rbp), %ecx movl -24(%rbp), %eax subl %ecx, %eax movl %eax, -24(%rbp) cmpl $0, -24(%rbp) jle LBB0_9 ## %bb.8: ## in Loop: Header=BB0_1 Depth=1 movl -16(%rbp), %eax addl $1, %eax movl %eax, -16(%rbp) LBB0_9: ## in Loop: Header=BB0_1 Depth=1 jmp LBB0_10 LBB0_10: ## in Loop: Header=BB0_1 Depth=1 jmp LBB0_11 LBB0_11: ## in Loop: Header=BB0_1 Depth=1 movl -20(%rbp), %eax addl $1, %eax movl %eax, -20(%rbp) jmp LBB0_1 LBB0_12: movl -16(%rbp), %eax addq $32, %rsp popq %rbp retq .cfi_endproc ## -- End function .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #48 .cfi_def_cfa_offset 48 stp x29, x30, [sp, #32] ; 16-byte Folded Spill add x29, sp, #32 .cfi_def_cfa w29, 16 .cfi_offset w30, -8 .cfi_offset w29, -16 stur x0, [x29, #-8] stur w1, [x29, #-12] str wzr, [sp, #16] str wzr, [sp, #12] b LBB0_1 LBB0_1: ; =>This Loop Header: Depth=1 ; Child Loop BB0_5 Depth 2 ldr w8, [sp, #12] ldur w9, [x29, #-12] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_12 b LBB0_2 LBB0_2: ; in Loop: Header=BB0_1 Depth=1 ldur x8, [x29, #-8] ldrsw x9, [sp, #12] ldr w8, [x8, x9, lsl #2] subs w8, w8, #0 cset w8, le tbnz w8, #0, LBB0_4 b LBB0_3 LBB0_3: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #16] add w8, w8, #1 str w8, [sp, #16] b LBB0_10 LBB0_4: ; in Loop: Header=BB0_1 Depth=1 str wzr, [sp, #8] ldur x8, [x29, #-8] ldrsw x9, [sp, #12] ldr w0, [x8, x9, lsl #2] bl _abs str w0, [sp, #4] b LBB0_5 LBB0_5: ; Parent Loop BB0_1 Depth=1 ; => This Inner Loop Header: Depth=2 ldr w8, [sp, #4] subs w8, w8, #10 cset w8, lt tbnz w8, #0, LBB0_7 b LBB0_6 LBB0_6: ; in Loop: Header=BB0_5 Depth=2 ldr w8, [sp, #4] mov w9, #10 sdiv w10, w8, w9 mul w10, w10, w9 subs w10, w8, w10 ldr w8, [sp, #8] add w8, w8, w10 str w8, [sp, #8] ldr w8, [sp, #4] sdiv w8, w8, w9 str w8, [sp, #4] b LBB0_5 LBB0_7: ; in Loop: Header=BB0_1 Depth=1 ldr w9, [sp, #4] ldr w8, [sp, #8] subs w8, w8, w9 str w8, [sp, #8] ldr w8, [sp, #8] subs w8, w8, #0 cset w8, le tbnz w8, #0, LBB0_9 b LBB0_8 LBB0_8: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #16] add w8, w8, #1 str w8, [sp, #16] b LBB0_9 LBB0_9: ; in Loop: Header=BB0_1 Depth=1 b LBB0_10 LBB0_10: ; in Loop: Header=BB0_1 Depth=1 b LBB0_11 LBB0_11: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #12] add w8, w8, #1 str w8, [sp, #12] b LBB0_1 LBB0_12: ldr w0, [sp, #16] ldp x29, x30, [sp, #32] ; 16-byte Folded Reload add sp, sp, #48 ret .cfi_endproc ; -- End function .subsections_via_symbols
eval/problem109/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ## -- Begin function func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp subq $48, %rsp movq %rdi, -16(%rbp) movq -16(%rbp), %rdi callq _strlen ## kill: def $eax killed $eax killed $rax movl %eax, -20(%rbp) movl -20(%rbp), %eax shll $1, %eax addl $1, %eax movslq %eax, %rdi callq _malloc movq %rax, -40(%rbp) cmpq $0, -40(%rbp) jne LBB0_2 ## %bb.1: movq $0, -8(%rbp) jmp LBB0_23 LBB0_2: movl $0, -24(%rbp) LBB0_3: ## =>This Loop Header: Depth=1 ## Child Loop BB0_5 Depth 2 movl -24(%rbp), %eax cmpl -20(%rbp), %eax jge LBB0_18 ## %bb.4: ## in Loop: Header=BB0_3 Depth=1 movl $1, -44(%rbp) movl $0, -28(%rbp) LBB0_5: ## Parent Loop BB0_3 Depth=1 ## => This Inner Loop Header: Depth=2 movl -28(%rbp), %eax movl %eax, -48(%rbp) ## 4-byte Spill movl -20(%rbp), %eax subl -24(%rbp), %eax movl $2, %ecx cltd idivl %ecx movl %eax, %ecx movl -48(%rbp), %eax ## 4-byte Reload cmpl %ecx, %eax jge LBB0_10 ## %bb.6: ## in Loop: Header=BB0_5 Depth=2 movq -16(%rbp), %rax movl -24(%rbp), %ecx addl -28(%rbp), %ecx movslq %ecx, %rcx movsbl (%rax,%rcx), %eax movq -16(%rbp), %rcx movl -20(%rbp), %edx subl $1, %edx subl -28(%rbp), %edx movslq %edx, %rdx movsbl (%rcx,%rdx), %ecx cmpl %ecx, %eax je LBB0_8 ## %bb.7: ## in Loop: Header=BB0_3 Depth=1 movl $0, -44(%rbp) jmp LBB0_10 LBB0_8: ## in Loop: Header=BB0_5 Depth=2 jmp LBB0_9 LBB0_9: ## in Loop: Header=BB0_5 Depth=2 movl -28(%rbp), %eax addl $1, %eax movl %eax, -28(%rbp) jmp LBB0_5 LBB0_10: ## in Loop: Header=BB0_3 Depth=1 cmpl $0, -44(%rbp) je LBB0_16 ## %bb.11: movq -40(%rbp), %rdi movq -16(%rbp), %rsi movslq -20(%rbp), %rdx movq $-1, %rcx callq ___strncpy_chk movl $0, -28(%rbp) LBB0_12: ## =>This Inner Loop Header: Depth=1 movl -28(%rbp), %eax cmpl -24(%rbp), %eax jge LBB0_15 ## %bb.13: ## in Loop: Header=BB0_12 Depth=1 movq -16(%rbp), %rax movl -24(%rbp), %ecx subl -28(%rbp), %ecx subl $1, %ecx movslq %ecx, %rcx movb (%rax,%rcx), %dl movq -40(%rbp), %rax movl -20(%rbp), %ecx addl -28(%rbp), %ecx movslq %ecx, %rcx movb %dl, (%rax,%rcx) ## %bb.14: ## in Loop: Header=BB0_12 Depth=1 movl -28(%rbp), %eax addl $1, %eax movl %eax, -28(%rbp) jmp LBB0_12 LBB0_15: movq -40(%rbp), %rax movl -20(%rbp), %ecx addl -24(%rbp), %ecx movslq %ecx, %rcx movb $0, (%rax,%rcx) movq -40(%rbp), %rax movq %rax, -8(%rbp) jmp LBB0_23 LBB0_16: ## in Loop: Header=BB0_3 Depth=1 jmp LBB0_17 LBB0_17: ## in Loop: Header=BB0_3 Depth=1 movl -24(%rbp), %eax addl $1, %eax movl %eax, -24(%rbp) jmp LBB0_3 LBB0_18: movq -40(%rbp), %rdi movq -16(%rbp), %rsi movslq -20(%rbp), %rdx movq $-1, %rcx callq ___strncpy_chk movl $0, -28(%rbp) LBB0_19: ## =>This Inner Loop Header: Depth=1 movl -28(%rbp), %eax cmpl -20(%rbp), %eax jge LBB0_22 ## %bb.20: ## in Loop: Header=BB0_19 Depth=1 movq -16(%rbp), %rax movl -20(%rbp), %ecx subl -28(%rbp), %ecx subl $1, %ecx movslq %ecx, %rcx movb (%rax,%rcx), %dl movq -40(%rbp), %rax movl -20(%rbp), %ecx addl -28(%rbp), %ecx movslq %ecx, %rcx movb %dl, (%rax,%rcx) ## %bb.21: ## in Loop: Header=BB0_19 Depth=1 movl -28(%rbp), %eax addl $1, %eax movl %eax, -28(%rbp) jmp LBB0_19 LBB0_22: movq -40(%rbp), %rax movl -20(%rbp), %ecx shll $1, %ecx movslq %ecx, %rcx movb $0, (%rax,%rcx) movq -40(%rbp), %rax movq %rax, -8(%rbp) LBB0_23: movq -8(%rbp), %rax addq $48, %rsp popq %rbp retq .cfi_endproc ## -- End function .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #64 .cfi_def_cfa_offset 64 stp x29, x30, [sp, #48] ; 16-byte Folded Spill add x29, sp, #48 .cfi_def_cfa w29, 16 .cfi_offset w30, -8 .cfi_offset w29, -16 stur x0, [x29, #-16] ldur x0, [x29, #-16] bl _strlen mov x8, x0 stur w8, [x29, #-20] ldur w9, [x29, #-20] mov w8, #2 mul w8, w8, w9 add w9, w8, #1 ; implicit-def: $x8 mov x8, x9 sxtw x0, w8 bl _malloc str x0, [sp, #8] ldr x8, [sp, #8] subs x8, x8, #0 cset w8, ne tbnz w8, #0, LBB0_2 b LBB0_1 LBB0_1: ; kill: def $x8 killed $xzr stur xzr, [x29, #-8] b LBB0_23 LBB0_2: str wzr, [sp, #24] b LBB0_3 LBB0_3: ; =>This Loop Header: Depth=1 ; Child Loop BB0_5 Depth 2 ldr w8, [sp, #24] ldur w9, [x29, #-20] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_18 b LBB0_4 LBB0_4: ; in Loop: Header=BB0_3 Depth=1 mov w8, #1 str w8, [sp, #4] str wzr, [sp, #20] b LBB0_5 LBB0_5: ; Parent Loop BB0_3 Depth=1 ; => This Inner Loop Header: Depth=2 ldr w8, [sp, #20] ldur w9, [x29, #-20] ldr w10, [sp, #24] subs w9, w9, w10 mov w10, #2 sdiv w9, w9, w10 subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_10 b LBB0_6 LBB0_6: ; in Loop: Header=BB0_5 Depth=2 ldur x8, [x29, #-16] ldr w9, [sp, #24] ldr w10, [sp, #20] add w9, w9, w10 ldrsb w8, [x8, w9, sxtw] ldur x9, [x29, #-16] ldur w10, [x29, #-20] subs w10, w10, #1 ldr w11, [sp, #20] subs w10, w10, w11 ldrsb w9, [x9, w10, sxtw] subs w8, w8, w9 cset w8, eq tbnz w8, #0, LBB0_8 b LBB0_7 LBB0_7: ; in Loop: Header=BB0_3 Depth=1 str wzr, [sp, #4] b LBB0_10 LBB0_8: ; in Loop: Header=BB0_5 Depth=2 b LBB0_9 LBB0_9: ; in Loop: Header=BB0_5 Depth=2 ldr w8, [sp, #20] add w8, w8, #1 str w8, [sp, #20] b LBB0_5 LBB0_10: ; in Loop: Header=BB0_3 Depth=1 ldr w8, [sp, #4] subs w8, w8, #0 cset w8, eq tbnz w8, #0, LBB0_16 b LBB0_11 LBB0_11: ldr x0, [sp, #8] ldur x1, [x29, #-16] ldursw x2, [x29, #-20] mov x3, #-1 bl ___strncpy_chk str wzr, [sp, #20] b LBB0_12 LBB0_12: ; =>This Inner Loop Header: Depth=1 ldr w8, [sp, #20] ldr w9, [sp, #24] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_15 b LBB0_13 LBB0_13: ; in Loop: Header=BB0_12 Depth=1 ldur x8, [x29, #-16] ldr w9, [sp, #24] ldr w10, [sp, #20] subs w9, w9, w10 subs w9, w9, #1 add x8, x8, w9, sxtw ldrb w8, [x8] ldr x9, [sp, #8] ldur w10, [x29, #-20] ldr w11, [sp, #20] add w10, w10, w11 add x9, x9, w10, sxtw strb w8, [x9] b LBB0_14 LBB0_14: ; in Loop: Header=BB0_12 Depth=1 ldr w8, [sp, #20] add w8, w8, #1 str w8, [sp, #20] b LBB0_12 LBB0_15: ldr x8, [sp, #8] ldur w9, [x29, #-20] ldr w10, [sp, #24] add w9, w9, w10 add x8, x8, w9, sxtw strb wzr, [x8] ldr x8, [sp, #8] stur x8, [x29, #-8] b LBB0_23 LBB0_16: ; in Loop: Header=BB0_3 Depth=1 b LBB0_17 LBB0_17: ; in Loop: Header=BB0_3 Depth=1 ldr w8, [sp, #24] add w8, w8, #1 str w8, [sp, #24] b LBB0_3 LBB0_18: ldr x0, [sp, #8] ldur x1, [x29, #-16] ldursw x2, [x29, #-20] mov x3, #-1 bl ___strncpy_chk str wzr, [sp, #20] b LBB0_19 LBB0_19: ; =>This Inner Loop Header: Depth=1 ldr w8, [sp, #20] ldur w9, [x29, #-20] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_22 b LBB0_20 LBB0_20: ; in Loop: Header=BB0_19 Depth=1 ldur x8, [x29, #-16] ldur w9, [x29, #-20] ldr w10, [sp, #20] subs w9, w9, w10 subs w9, w9, #1 add x8, x8, w9, sxtw ldrb w8, [x8] ldr x9, [sp, #8] ldur w10, [x29, #-20] ldr w11, [sp, #20] add w10, w10, w11 add x9, x9, w10, sxtw strb w8, [x9] b LBB0_21 LBB0_21: ; in Loop: Header=BB0_19 Depth=1 ldr w8, [sp, #20] add w8, w8, #1 str w8, [sp, #20] b LBB0_19 LBB0_22: ldr x8, [sp, #8] ldur w10, [x29, #-20] mov w9, #2 mul w9, w9, w10 add x8, x8, w9, sxtw strb wzr, [x8] ldr x8, [sp, #8] stur x8, [x29, #-8] b LBB0_23 LBB0_23: ldur x0, [x29, #-8] ldp x29, x30, [sp, #48] ; 16-byte Folded Reload add sp, sp, #64 ret .cfi_endproc ; -- End function .subsections_via_symbols
eval/problem11/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ## -- Begin function func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp movq %rdi, -16(%rbp) movl %esi, -20(%rbp) movl $0, -24(%rbp) cmpl $0, -20(%rbp) jne LBB0_2 ## %bb.1: movb $1, -1(%rbp) jmp LBB0_13 LBB0_2: movl $1, -28(%rbp) LBB0_3: ## =>This Inner Loop Header: Depth=1 movl -28(%rbp), %eax cmpl -20(%rbp), %eax jge LBB0_8 ## %bb.4: ## in Loop: Header=BB0_3 Depth=1 movq -16(%rbp), %rax movslq -28(%rbp), %rcx movl (%rax,%rcx,4), %eax movq -16(%rbp), %rcx movl -28(%rbp), %edx subl $1, %edx movslq %edx, %rdx cmpl (%rcx,%rdx,4), %eax jge LBB0_6 ## %bb.5: ## in Loop: Header=BB0_3 Depth=1 movl -24(%rbp), %eax addl $1, %eax movl %eax, -24(%rbp) LBB0_6: ## in Loop: Header=BB0_3 Depth=1 jmp LBB0_7 LBB0_7: ## in Loop: Header=BB0_3 Depth=1 movl -28(%rbp), %eax addl $1, %eax movl %eax, -28(%rbp) jmp LBB0_3 LBB0_8: movq -16(%rbp), %rax movl -20(%rbp), %ecx subl $1, %ecx movslq %ecx, %rcx movl (%rax,%rcx,4), %eax movq -16(%rbp), %rcx cmpl (%rcx), %eax jle LBB0_10 ## %bb.9: movl -24(%rbp), %eax addl $1, %eax movl %eax, -24(%rbp) LBB0_10: cmpl $2, -24(%rbp) jge LBB0_12 ## %bb.11: movb $1, -1(%rbp) jmp LBB0_13 LBB0_12: movb $0, -1(%rbp) LBB0_13: movb -1(%rbp), %al andb $1, %al movzbl %al, %eax popq %rbp retq .cfi_endproc ## -- End function .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #32 .cfi_def_cfa_offset 32 str x0, [sp, #16] str w1, [sp, #12] str wzr, [sp, #8] ldr w8, [sp, #12] subs w8, w8, #0 cset w8, ne tbnz w8, #0, LBB0_2 b LBB0_1 LBB0_1: mov w8, #1 and w8, w8, #0x1 and w8, w8, #0x1 strb w8, [sp, #31] b LBB0_13 LBB0_2: mov w8, #1 str w8, [sp, #4] b LBB0_3 LBB0_3: ; =>This Inner Loop Header: Depth=1 ldr w8, [sp, #4] ldr w9, [sp, #12] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_8 b LBB0_4 LBB0_4: ; in Loop: Header=BB0_3 Depth=1 ldr x8, [sp, #16] ldrsw x9, [sp, #4] ldr w8, [x8, x9, lsl #2] ldr x9, [sp, #16] ldr w10, [sp, #4] subs w10, w10, #1 ldr w9, [x9, w10, sxtw #2] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_6 b LBB0_5 LBB0_5: ; in Loop: Header=BB0_3 Depth=1 ldr w8, [sp, #8] add w8, w8, #1 str w8, [sp, #8] b LBB0_6 LBB0_6: ; in Loop: Header=BB0_3 Depth=1 b LBB0_7 LBB0_7: ; in Loop: Header=BB0_3 Depth=1 ldr w8, [sp, #4] add w8, w8, #1 str w8, [sp, #4] b LBB0_3 LBB0_8: ldr x8, [sp, #16] ldr w9, [sp, #12] subs w9, w9, #1 ldr w8, [x8, w9, sxtw #2] ldr x9, [sp, #16] ldr w9, [x9] subs w8, w8, w9 cset w8, le tbnz w8, #0, LBB0_10 b LBB0_9 LBB0_9: ldr w8, [sp, #8] add w8, w8, #1 str w8, [sp, #8] b LBB0_10 LBB0_10: ldr w8, [sp, #8] subs w8, w8, #2 cset w8, ge tbnz w8, #0, LBB0_12 b LBB0_11 LBB0_11: mov w8, #1 and w8, w8, #0x1 and w8, w8, #0x1 strb w8, [sp, #31] b LBB0_13 LBB0_12: mov w8, #0 and w8, w8, #0x1 and w8, w8, #0x1 strb w8, [sp, #31] b LBB0_13 LBB0_13: ldrb w8, [sp, #31] and w0, w8, #0x1 add sp, sp, #32 ret .cfi_endproc ; -- End function .subsections_via_symbols
eval/problem110/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ## -- Begin function func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp movq %rdi, -16(%rbp) movl %esi, -20(%rbp) movq %rdx, -32(%rbp) movl %ecx, -36(%rbp) movl $0, -40(%rbp) movl $0, -44(%rbp) LBB0_1: ## =>This Inner Loop Header: Depth=1 movl -44(%rbp), %eax cmpl -20(%rbp), %eax jge LBB0_6 ## %bb.2: ## in Loop: Header=BB0_1 Depth=1 movq -16(%rbp), %rax movslq -44(%rbp), %rcx movl (%rax,%rcx,4), %eax movl $2, %ecx cltd idivl %ecx cmpl $0, %edx jne LBB0_4 ## %bb.3: ## in Loop: Header=BB0_1 Depth=1 movl -40(%rbp), %eax addl $1, %eax movl %eax, -40(%rbp) LBB0_4: ## in Loop: Header=BB0_1 Depth=1 jmp LBB0_5 LBB0_5: ## in Loop: Header=BB0_1 Depth=1 movl -44(%rbp), %eax addl $1, %eax movl %eax, -44(%rbp) jmp LBB0_1 LBB0_6: movl $0, -48(%rbp) LBB0_7: ## =>This Inner Loop Header: Depth=1 movl -48(%rbp), %eax cmpl -36(%rbp), %eax jge LBB0_12 ## %bb.8: ## in Loop: Header=BB0_7 Depth=1 movq -32(%rbp), %rax movslq -48(%rbp), %rcx movl (%rax,%rcx,4), %eax movl $2, %ecx cltd idivl %ecx cmpl $0, %edx jne LBB0_10 ## %bb.9: ## in Loop: Header=BB0_7 Depth=1 movl -40(%rbp), %eax addl $1, %eax movl %eax, -40(%rbp) LBB0_10: ## in Loop: Header=BB0_7 Depth=1 jmp LBB0_11 LBB0_11: ## in Loop: Header=BB0_7 Depth=1 movl -48(%rbp), %eax addl $1, %eax movl %eax, -48(%rbp) jmp LBB0_7 LBB0_12: movl -40(%rbp), %eax cmpl -20(%rbp), %eax jl LBB0_14 ## %bb.13: leaq L_.str(%rip), %rax movq %rax, -8(%rbp) jmp LBB0_15 LBB0_14: leaq L_.str.1(%rip), %rax movq %rax, -8(%rbp) LBB0_15: movq -8(%rbp), %rax popq %rbp retq .cfi_endproc ## -- End function .section __TEXT,__cstring,cstring_literals L_.str: ## @.str .asciz "YES" L_.str.1: ## @.str.1 .asciz "NO" .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #48 .cfi_def_cfa_offset 48 str x0, [sp, #32] str w1, [sp, #28] str x2, [sp, #16] str w3, [sp, #12] str wzr, [sp, #8] str wzr, [sp, #4] b LBB0_1 LBB0_1: ; =>This Inner Loop Header: Depth=1 ldr w8, [sp, #4] ldr w9, [sp, #28] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_6 b LBB0_2 LBB0_2: ; in Loop: Header=BB0_1 Depth=1 ldr x8, [sp, #32] ldrsw x9, [sp, #4] ldr w8, [x8, x9, lsl #2] mov w10, #2 sdiv w9, w8, w10 mul w9, w9, w10 subs w8, w8, w9 subs w8, w8, #0 cset w8, ne tbnz w8, #0, LBB0_4 b LBB0_3 LBB0_3: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #8] add w8, w8, #1 str w8, [sp, #8] b LBB0_4 LBB0_4: ; in Loop: Header=BB0_1 Depth=1 b LBB0_5 LBB0_5: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #4] add w8, w8, #1 str w8, [sp, #4] b LBB0_1 LBB0_6: str wzr, [sp] b LBB0_7 LBB0_7: ; =>This Inner Loop Header: Depth=1 ldr w8, [sp] ldr w9, [sp, #12] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_12 b LBB0_8 LBB0_8: ; in Loop: Header=BB0_7 Depth=1 ldr x8, [sp, #16] ldrsw x9, [sp] ldr w8, [x8, x9, lsl #2] mov w10, #2 sdiv w9, w8, w10 mul w9, w9, w10 subs w8, w8, w9 subs w8, w8, #0 cset w8, ne tbnz w8, #0, LBB0_10 b LBB0_9 LBB0_9: ; in Loop: Header=BB0_7 Depth=1 ldr w8, [sp, #8] add w8, w8, #1 str w8, [sp, #8] b LBB0_10 LBB0_10: ; in Loop: Header=BB0_7 Depth=1 b LBB0_11 LBB0_11: ; in Loop: Header=BB0_7 Depth=1 ldr w8, [sp] add w8, w8, #1 str w8, [sp] b LBB0_7 LBB0_12: ldr w8, [sp, #8] ldr w9, [sp, #28] subs w8, w8, w9 cset w8, lt tbnz w8, #0, LBB0_14 b LBB0_13 LBB0_13: adrp x8, l_.str@PAGE add x8, x8, l_.str@PAGEOFF str x8, [sp, #40] b LBB0_15 LBB0_14: adrp x8, l_.str.1@PAGE add x8, x8, l_.str.1@PAGEOFF str x8, [sp, #40] b LBB0_15 LBB0_15: ldr x0, [sp, #40] add sp, sp, #48 ret .cfi_endproc ; -- End function .section __TEXT,__cstring,cstring_literals l_.str: ; @.str .asciz "YES" l_.str.1: ; @.str.1 .asciz "NO" .subsections_via_symbols
eval/problem111/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ## -- Begin function func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp subq $176, %rsp movq ___stack_chk_guard@GOTPCREL(%rip), %rax movq (%rax), %rax movq %rax, -8(%rbp) movq %rdi, -120(%rbp) movq %rsi, -128(%rbp) movq %rdx, -136(%rbp) movq %rcx, -144(%rbp) leaq -112(%rbp), %rdi xorl %esi, %esi movl $104, %edx callq _memset movl $0, -148(%rbp) movq -120(%rbp), %rax movq %rax, -160(%rbp) movl $0, -164(%rbp) LBB0_1: ## =>This Inner Loop Header: Depth=1 movq -160(%rbp), %rax cmpb $0, (%rax) je LBB0_7 ## %bb.2: ## in Loop: Header=BB0_1 Depth=1 movq -160(%rbp), %rax movsbl (%rax), %eax cmpl $32, %eax je LBB0_6 ## %bb.3: ## in Loop: Header=BB0_1 Depth=1 movq -160(%rbp), %rax movsbl (%rax), %eax subl $97, %eax movl %eax, -168(%rbp) movslq -168(%rbp), %rax movl -112(%rbp,%rax,4), %ecx addl $1, %ecx movl %ecx, -112(%rbp,%rax,4) movslq -168(%rbp), %rax movl -112(%rbp,%rax,4), %eax cmpl -148(%rbp), %eax jle LBB0_5 ## %bb.4: ## in Loop: Header=BB0_1 Depth=1 movslq -168(%rbp), %rax movl -112(%rbp,%rax,4), %eax movl %eax, -148(%rbp) LBB0_5: ## in Loop: Header=BB0_1 Depth=1 jmp LBB0_6 LBB0_6: ## in Loop: Header=BB0_1 Depth=1 movq -160(%rbp), %rax addq $1, %rax movq %rax, -160(%rbp) jmp LBB0_1 LBB0_7: movl $0, -172(%rbp) LBB0_8: ## =>This Inner Loop Header: Depth=1 cmpl $26, -172(%rbp) jge LBB0_13 ## %bb.9: ## in Loop: Header=BB0_8 Depth=1 movslq -172(%rbp), %rax movl -112(%rbp,%rax,4), %edx movq -128(%rbp), %rax movslq -172(%rbp), %rcx movl %edx, (%rax,%rcx,4) movslq -172(%rbp), %rax movl -112(%rbp,%rax,4), %eax cmpl -148(%rbp), %eax jne LBB0_11 ## %bb.10: ## in Loop: Header=BB0_8 Depth=1 movl -172(%rbp), %eax addl $97, %eax movb %al, %dl movq -144(%rbp), %rax movl -164(%rbp), %ecx movl %ecx, %esi addl $1, %esi movl %esi, -164(%rbp) movslq %ecx, %rcx movb %dl, (%rax,%rcx) LBB0_11: ## in Loop: Header=BB0_8 Depth=1 jmp LBB0_12 LBB0_12: ## in Loop: Header=BB0_8 Depth=1 movl -172(%rbp), %eax addl $1, %eax movl %eax, -172(%rbp) jmp LBB0_8 LBB0_13: movl -148(%rbp), %ecx movq -136(%rbp), %rax movl %ecx, (%rax) movq -144(%rbp), %rax movslq -164(%rbp), %rcx movb $0, (%rax,%rcx) movq ___stack_chk_guard@GOTPCREL(%rip), %rax movq (%rax), %rax movq -8(%rbp), %rcx cmpq %rcx, %rax jne LBB0_15 ## %bb.14: addq $176, %rsp popq %rbp retq LBB0_15: callq ___stack_chk_fail ud2 .cfi_endproc ## -- End function .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #192 .cfi_def_cfa_offset 192 stp x29, x30, [sp, #176] ; 16-byte Folded Spill add x29, sp, #176 .cfi_def_cfa w29, 16 .cfi_offset w30, -8 .cfi_offset w29, -16 adrp x8, ___stack_chk_guard@GOTPAGE ldr x8, [x8, ___stack_chk_guard@GOTPAGEOFF] ldr x8, [x8] stur x8, [x29, #-8] str x0, [sp, #56] str x1, [sp, #48] str x2, [sp, #40] str x3, [sp, #32] add x0, sp, #64 mov w1, #0 mov x2, #104 bl _memset str wzr, [sp, #28] ldr x8, [sp, #56] str x8, [sp, #16] str wzr, [sp, #12] b LBB0_1 LBB0_1: ; =>This Inner Loop Header: Depth=1 ldr x8, [sp, #16] ldrb w8, [x8] subs w8, w8, #0 cset w8, eq tbnz w8, #0, LBB0_7 b LBB0_2 LBB0_2: ; in Loop: Header=BB0_1 Depth=1 ldr x8, [sp, #16] ldrsb w8, [x8] subs w8, w8, #32 cset w8, eq tbnz w8, #0, LBB0_6 b LBB0_3 LBB0_3: ; in Loop: Header=BB0_1 Depth=1 ldr x8, [sp, #16] ldrsb w8, [x8] subs w8, w8, #97 str w8, [sp, #8] ldrsw x10, [sp, #8] add x8, sp, #64 mov x9, x8 add x10, x9, x10, lsl #2 ldr w9, [x10] add w9, w9, #1 str w9, [x10] ldrsw x9, [sp, #8] ldr w8, [x8, x9, lsl #2] ldr w9, [sp, #28] subs w8, w8, w9 cset w8, le tbnz w8, #0, LBB0_5 b LBB0_4 LBB0_4: ; in Loop: Header=BB0_1 Depth=1 ldrsw x9, [sp, #8] add x8, sp, #64 ldr w8, [x8, x9, lsl #2] str w8, [sp, #28] b LBB0_5 LBB0_5: ; in Loop: Header=BB0_1 Depth=1 b LBB0_6 LBB0_6: ; in Loop: Header=BB0_1 Depth=1 ldr x8, [sp, #16] add x8, x8, #1 str x8, [sp, #16] b LBB0_1 LBB0_7: str wzr, [sp, #4] b LBB0_8 LBB0_8: ; =>This Inner Loop Header: Depth=1 ldr w8, [sp, #4] subs w8, w8, #26 cset w8, ge tbnz w8, #0, LBB0_13 b LBB0_9 LBB0_9: ; in Loop: Header=BB0_8 Depth=1 ldrsw x9, [sp, #4] add x8, sp, #64 ldr w9, [x8, x9, lsl #2] ldr x10, [sp, #48] ldrsw x11, [sp, #4] str w9, [x10, x11, lsl #2] ldrsw x9, [sp, #4] ldr w8, [x8, x9, lsl #2] ldr w9, [sp, #28] subs w8, w8, w9 cset w8, ne tbnz w8, #0, LBB0_11 b LBB0_10 LBB0_10: ; in Loop: Header=BB0_8 Depth=1 ldr w8, [sp, #4] add w8, w8, #97 ldr x9, [sp, #32] ldrsw x10, [sp, #12] mov x11, x10 add w11, w11, #1 str w11, [sp, #12] strb w8, [x9, x10] b LBB0_11 LBB0_11: ; in Loop: Header=BB0_8 Depth=1 b LBB0_12 LBB0_12: ; in Loop: Header=BB0_8 Depth=1 ldr w8, [sp, #4] add w8, w8, #1 str w8, [sp, #4] b LBB0_8 LBB0_13: ldr w8, [sp, #28] ldr x9, [sp, #40] str w8, [x9] ldr x8, [sp, #32] ldrsw x9, [sp, #12] add x8, x8, x9 strb wzr, [x8] ldur x9, [x29, #-8] adrp x8, ___stack_chk_guard@GOTPAGE ldr x8, [x8, ___stack_chk_guard@GOTPAGEOFF] ldr x8, [x8] subs x8, x8, x9 cset w8, eq tbnz w8, #0, LBB0_15 b LBB0_14 LBB0_14: bl ___stack_chk_fail LBB0_15: ldp x29, x30, [sp, #176] ; 16-byte Folded Reload add sp, sp, #192 ret .cfi_endproc ; -- End function .subsections_via_symbols
eval/problem112/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ## -- Begin function func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp subq $96, %rsp movq %rdi, -8(%rbp) movq %rsi, -16(%rbp) movq %rdx, -24(%rbp) movq %rcx, -32(%rbp) movq -8(%rbp), %rdi callq _strlen ## kill: def $eax killed $eax killed $rax movl %eax, -36(%rbp) movl -36(%rbp), %eax addl $1, %eax movslq %eax, %rdi shlq $0, %rdi callq _malloc movq %rax, -48(%rbp) movl $0, -52(%rbp) movl $0, -56(%rbp) LBB0_1: ## =>This Loop Header: Depth=1 ## Child Loop BB0_3 Depth 2 movq -8(%rbp), %rax movslq -56(%rbp), %rcx movsbl (%rax,%rcx), %eax cmpl $0, %eax je LBB0_11 ## %bb.2: ## in Loop: Header=BB0_1 Depth=1 movq -16(%rbp), %rax movq %rax, -64(%rbp) movb $0, -65(%rbp) LBB0_3: ## Parent Loop BB0_1 Depth=1 ## => This Inner Loop Header: Depth=2 movq -64(%rbp), %rax movsbl (%rax), %eax cmpl $0, %eax je LBB0_7 ## %bb.4: ## in Loop: Header=BB0_3 Depth=2 movq -8(%rbp), %rax movslq -56(%rbp), %rcx movsbl (%rax,%rcx), %eax movq -64(%rbp), %rcx movsbl (%rcx), %ecx cmpl %ecx, %eax jne LBB0_6 ## %bb.5: ## in Loop: Header=BB0_1 Depth=1 movb $1, -65(%rbp) jmp LBB0_7 LBB0_6: ## in Loop: Header=BB0_3 Depth=2 movq -64(%rbp), %rax addq $1, %rax movq %rax, -64(%rbp) jmp LBB0_3 LBB0_7: ## in Loop: Header=BB0_1 Depth=1 testb $1, -65(%rbp) jne LBB0_9 ## %bb.8: ## in Loop: Header=BB0_1 Depth=1 movq -8(%rbp), %rax movslq -56(%rbp), %rcx movb (%rax,%rcx), %dl movq -48(%rbp), %rax movl -52(%rbp), %ecx movl %ecx, %esi addl $1, %esi movl %esi, -52(%rbp) movslq %ecx, %rcx movb %dl, (%rax,%rcx) LBB0_9: ## in Loop: Header=BB0_1 Depth=1 jmp LBB0_10 LBB0_10: ## in Loop: Header=BB0_1 Depth=1 movl -56(%rbp), %eax addl $1, %eax movl %eax, -56(%rbp) jmp LBB0_1 LBB0_11: movq -48(%rbp), %rax movslq -52(%rbp), %rcx movb $0, (%rax,%rcx) movq -48(%rbp), %rdi callq _strlen ## kill: def $eax killed $eax killed $rax movl %eax, -72(%rbp) movb $1, -73(%rbp) movl $0, -80(%rbp) LBB0_12: ## =>This Inner Loop Header: Depth=1 movl -80(%rbp), %eax movl %eax, -84(%rbp) ## 4-byte Spill movl -72(%rbp), %eax movl $2, %ecx cltd idivl %ecx movl %eax, %ecx movl -84(%rbp), %eax ## 4-byte Reload cmpl %ecx, %eax jge LBB0_17 ## %bb.13: ## in Loop: Header=BB0_12 Depth=1 movq -48(%rbp), %rax movslq -80(%rbp), %rcx movsbl (%rax,%rcx), %eax movq -48(%rbp), %rcx movl -72(%rbp), %edx subl $1, %edx subl -80(%rbp), %edx movslq %edx, %rdx movsbl (%rcx,%rdx), %ecx cmpl %ecx, %eax je LBB0_15 ## %bb.14: movb $0, -73(%rbp) jmp LBB0_17 LBB0_15: ## in Loop: Header=BB0_12 Depth=1 jmp LBB0_16 LBB0_16: ## in Loop: Header=BB0_12 Depth=1 movl -80(%rbp), %eax addl $1, %eax movl %eax, -80(%rbp) jmp LBB0_12 LBB0_17: movq -24(%rbp), %rdi movq -48(%rbp), %rsi movq $-1, %rdx callq ___strcpy_chk movq -32(%rbp), %rdi movb -73(%rbp), %cl leaq L_.str.1(%rip), %rsi leaq L_.str(%rip), %rax testb $1, %cl cmovneq %rax, %rsi movq $-1, %rdx callq ___strcpy_chk movq -48(%rbp), %rdi callq _free addq $96, %rsp popq %rbp retq .cfi_endproc ## -- End function .section __TEXT,__cstring,cstring_literals L_.str: ## @.str .asciz "True" L_.str.1: ## @.str.1 .asciz "False" .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #112 .cfi_def_cfa_offset 112 stp x29, x30, [sp, #96] ; 16-byte Folded Spill add x29, sp, #96 .cfi_def_cfa w29, 16 .cfi_offset w30, -8 .cfi_offset w29, -16 stur x0, [x29, #-8] stur x1, [x29, #-16] stur x2, [x29, #-24] stur x3, [x29, #-32] ldur x0, [x29, #-8] bl _strlen mov x8, x0 stur w8, [x29, #-36] ldur w8, [x29, #-36] add w9, w8, #1 ; implicit-def: $x8 mov x8, x9 sxtw x8, w8 lsr x0, x8, #0 bl _malloc str x0, [sp, #48] str wzr, [sp, #44] str wzr, [sp, #40] b LBB0_1 LBB0_1: ; =>This Loop Header: Depth=1 ; Child Loop BB0_3 Depth 2 ldur x8, [x29, #-8] ldrsw x9, [sp, #40] ldrsb w8, [x8, x9] subs w8, w8, #0 cset w8, eq tbnz w8, #0, LBB0_11 b LBB0_2 LBB0_2: ; in Loop: Header=BB0_1 Depth=1 ldur x8, [x29, #-16] str x8, [sp, #32] strb wzr, [sp, #31] b LBB0_3 LBB0_3: ; Parent Loop BB0_1 Depth=1 ; => This Inner Loop Header: Depth=2 ldr x8, [sp, #32] ldrsb w8, [x8] subs w8, w8, #0 cset w8, eq tbnz w8, #0, LBB0_7 b LBB0_4 LBB0_4: ; in Loop: Header=BB0_3 Depth=2 ldur x8, [x29, #-8] ldrsw x9, [sp, #40] ldrsb w8, [x8, x9] ldr x9, [sp, #32] ldrsb w9, [x9] subs w8, w8, w9 cset w8, ne tbnz w8, #0, LBB0_6 b LBB0_5 LBB0_5: ; in Loop: Header=BB0_1 Depth=1 mov w8, #1 strb w8, [sp, #31] b LBB0_7 LBB0_6: ; in Loop: Header=BB0_3 Depth=2 ldr x8, [sp, #32] add x8, x8, #1 str x8, [sp, #32] b LBB0_3 LBB0_7: ; in Loop: Header=BB0_1 Depth=1 ldrb w8, [sp, #31] tbnz w8, #0, LBB0_9 b LBB0_8 LBB0_8: ; in Loop: Header=BB0_1 Depth=1 ldur x8, [x29, #-8] ldrsw x9, [sp, #40] add x8, x8, x9 ldrb w8, [x8] ldr x9, [sp, #48] ldrsw x10, [sp, #44] mov x11, x10 add w11, w11, #1 str w11, [sp, #44] add x9, x9, x10 strb w8, [x9] b LBB0_9 LBB0_9: ; in Loop: Header=BB0_1 Depth=1 b LBB0_10 LBB0_10: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #40] add w8, w8, #1 str w8, [sp, #40] b LBB0_1 LBB0_11: ldr x8, [sp, #48] ldrsw x9, [sp, #44] add x8, x8, x9 strb wzr, [x8] ldr x0, [sp, #48] bl _strlen mov x8, x0 str w8, [sp, #24] mov w8, #1 strb w8, [sp, #23] str wzr, [sp, #16] b LBB0_12 LBB0_12: ; =>This Inner Loop Header: Depth=1 ldr w8, [sp, #16] ldr w9, [sp, #24] mov w10, #2 sdiv w9, w9, w10 subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_17 b LBB0_13 LBB0_13: ; in Loop: Header=BB0_12 Depth=1 ldr x8, [sp, #48] ldrsw x9, [sp, #16] ldrsb w8, [x8, x9] ldr x9, [sp, #48] ldr w10, [sp, #24] subs w10, w10, #1 ldr w11, [sp, #16] subs w10, w10, w11 ldrsb w9, [x9, w10, sxtw] subs w8, w8, w9 cset w8, eq tbnz w8, #0, LBB0_15 b LBB0_14 LBB0_14: strb wzr, [sp, #23] b LBB0_17 LBB0_15: ; in Loop: Header=BB0_12 Depth=1 b LBB0_16 LBB0_16: ; in Loop: Header=BB0_12 Depth=1 ldr w8, [sp, #16] add w8, w8, #1 str w8, [sp, #16] b LBB0_12 LBB0_17: ldur x0, [x29, #-24] ldr x1, [sp, #48] mov x2, #-1 str x2, [sp, #8] ; 8-byte Folded Spill bl ___strcpy_chk ldr x2, [sp, #8] ; 8-byte Folded Reload ldur x0, [x29, #-32] ldrb w8, [sp, #23] and w10, w8, #0x1 adrp x9, l_.str.1@PAGE add x9, x9, l_.str.1@PAGEOFF adrp x8, l_.str@PAGE add x8, x8, l_.str@PAGEOFF ands w10, w10, #0x1 csel x1, x8, x9, ne bl ___strcpy_chk ldr x0, [sp, #48] bl _free ldp x29, x30, [sp, #96] ; 16-byte Folded Reload add sp, sp, #112 ret .cfi_endproc ; -- End function .section __TEXT,__cstring,cstring_literals l_.str: ; @.str .asciz "True" l_.str.1: ; @.str.1 .asciz "False" .subsections_via_symbols
eval/problem113/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ## -- Begin function func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp subq $48, %rsp movq %rdi, -8(%rbp) movl %esi, -12(%rbp) movslq -12(%rbp), %rdi shlq $3, %rdi callq _malloc movq %rax, -24(%rbp) movl $0, -28(%rbp) LBB0_1: ## =>This Loop Header: Depth=1 ## Child Loop BB0_3 Depth 2 movl -28(%rbp), %eax cmpl -12(%rbp), %eax jge LBB0_12 ## %bb.2: ## in Loop: Header=BB0_1 Depth=1 movl $0, -32(%rbp) movl $0, -36(%rbp) LBB0_3: ## Parent Loop BB0_1 Depth=1 ## => This Inner Loop Header: Depth=2 movq -8(%rbp), %rax movslq -28(%rbp), %rcx movq (%rax,%rcx,8), %rax movslq -36(%rbp), %rcx movsbl (%rax,%rcx), %eax cmpl $0, %eax je LBB0_10 ## %bb.4: ## in Loop: Header=BB0_3 Depth=2 movq -8(%rbp), %rax movslq -28(%rbp), %rcx movq (%rax,%rcx,8), %rax movslq -36(%rbp), %rcx movsbl (%rax,%rcx), %eax cmpl $48, %eax jl LBB0_8 ## %bb.5: ## in Loop: Header=BB0_3 Depth=2 movq -8(%rbp), %rax movslq -28(%rbp), %rcx movq (%rax,%rcx,8), %rax movslq -36(%rbp), %rcx movsbl (%rax,%rcx), %eax cmpl $57, %eax jg LBB0_8 ## %bb.6: ## in Loop: Header=BB0_3 Depth=2 movq -8(%rbp), %rax movslq -28(%rbp), %rcx movq (%rax,%rcx,8), %rax movslq -36(%rbp), %rcx movsbl (%rax,%rcx), %eax subl $48, %eax movl $2, %ecx cltd idivl %ecx cmpl $1, %edx jne LBB0_8 ## %bb.7: ## in Loop: Header=BB0_3 Depth=2 movl -32(%rbp), %eax addl $1, %eax movl %eax, -32(%rbp) LBB0_8: ## in Loop: Header=BB0_3 Depth=2 jmp LBB0_9 LBB0_9: ## in Loop: Header=BB0_3 Depth=2 movl -36(%rbp), %eax addl $1, %eax movl %eax, -36(%rbp) jmp LBB0_3 LBB0_10: ## in Loop: Header=BB0_1 Depth=1 movl $100, %edi callq _malloc movq %rax, %rdx movq -24(%rbp), %rax movslq -28(%rbp), %rcx movq %rdx, (%rax,%rcx,8) movq -24(%rbp), %rax movslq -28(%rbp), %rcx movq (%rax,%rcx,8), %rdi movl -32(%rbp), %r8d movl -32(%rbp), %r9d movl -32(%rbp), %eax xorl %esi, %esi movq $-1, %rdx leaq L_.str(%rip), %rcx movl %eax, (%rsp) movb $0, %al callq ___sprintf_chk ## %bb.11: ## in Loop: Header=BB0_1 Depth=1 movl -28(%rbp), %eax addl $1, %eax movl %eax, -28(%rbp) jmp LBB0_1 LBB0_12: movq -24(%rbp), %rax addq $48, %rsp popq %rbp retq .cfi_endproc ## -- End function .section __TEXT,__cstring,cstring_literals L_.str: ## @.str .asciz "the number of odd elements %d in the string %d of the %d input." .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #80 .cfi_def_cfa_offset 80 stp x29, x30, [sp, #64] ; 16-byte Folded Spill add x29, sp, #64 .cfi_def_cfa w29, 16 .cfi_offset w30, -8 .cfi_offset w29, -16 stur x0, [x29, #-8] stur w1, [x29, #-12] ldursw x8, [x29, #-12] lsl x0, x8, #3 bl _malloc stur x0, [x29, #-24] stur wzr, [x29, #-28] b LBB0_1 LBB0_1: ; =>This Loop Header: Depth=1 ; Child Loop BB0_3 Depth 2 ldur w8, [x29, #-28] ldur w9, [x29, #-12] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_12 b LBB0_2 LBB0_2: ; in Loop: Header=BB0_1 Depth=1 str wzr, [sp, #32] str wzr, [sp, #28] b LBB0_3 LBB0_3: ; Parent Loop BB0_1 Depth=1 ; => This Inner Loop Header: Depth=2 ldur x8, [x29, #-8] ldursw x9, [x29, #-28] ldr x8, [x8, x9, lsl #3] ldrsw x9, [sp, #28] ldrsb w8, [x8, x9] subs w8, w8, #0 cset w8, eq tbnz w8, #0, LBB0_10 b LBB0_4 LBB0_4: ; in Loop: Header=BB0_3 Depth=2 ldur x8, [x29, #-8] ldursw x9, [x29, #-28] ldr x8, [x8, x9, lsl #3] ldrsw x9, [sp, #28] ldrsb w8, [x8, x9] subs w8, w8, #48 cset w8, lt tbnz w8, #0, LBB0_8 b LBB0_5 LBB0_5: ; in Loop: Header=BB0_3 Depth=2 ldur x8, [x29, #-8] ldursw x9, [x29, #-28] ldr x8, [x8, x9, lsl #3] ldrsw x9, [sp, #28] ldrsb w8, [x8, x9] subs w8, w8, #57 cset w8, gt tbnz w8, #0, LBB0_8 b LBB0_6 LBB0_6: ; in Loop: Header=BB0_3 Depth=2 ldur x8, [x29, #-8] ldursw x9, [x29, #-28] ldr x8, [x8, x9, lsl #3] ldrsw x9, [sp, #28] ldrsb w8, [x8, x9] subs w8, w8, #48 mov w10, #2 sdiv w9, w8, w10 mul w9, w9, w10 subs w8, w8, w9 subs w8, w8, #1 cset w8, ne tbnz w8, #0, LBB0_8 b LBB0_7 LBB0_7: ; in Loop: Header=BB0_3 Depth=2 ldr w8, [sp, #32] add w8, w8, #1 str w8, [sp, #32] b LBB0_8 LBB0_8: ; in Loop: Header=BB0_3 Depth=2 b LBB0_9 LBB0_9: ; in Loop: Header=BB0_3 Depth=2 ldr w8, [sp, #28] add w8, w8, #1 str w8, [sp, #28] b LBB0_3 LBB0_10: ; in Loop: Header=BB0_1 Depth=1 mov x0, #100 bl _malloc ldur x8, [x29, #-24] ldursw x9, [x29, #-28] str x0, [x8, x9, lsl #3] ldur x8, [x29, #-24] ldursw x9, [x29, #-28] ldr x0, [x8, x9, lsl #3] ldr w8, [sp, #32] ; implicit-def: $x11 mov x11, x8 ldr w8, [sp, #32] ; implicit-def: $x10 mov x10, x8 ldr w9, [sp, #32] ; implicit-def: $x8 mov x8, x9 mov x9, sp str x11, [x9] str x10, [x9, #8] str x8, [x9, #16] mov w1, #0 mov x2, #-1 adrp x3, l_.str@PAGE add x3, x3, l_.str@PAGEOFF bl ___sprintf_chk b LBB0_11 LBB0_11: ; in Loop: Header=BB0_1 Depth=1 ldur w8, [x29, #-28] add w8, w8, #1 stur w8, [x29, #-28] b LBB0_1 LBB0_12: ldur x0, [x29, #-24] ldp x29, x30, [sp, #64] ; 16-byte Folded Reload add sp, sp, #80 ret .cfi_endproc ; -- End function .section __TEXT,__cstring,cstring_literals l_.str: ; @.str .asciz "the number of odd elements %d in the string %d of the %d input." .subsections_via_symbols
eval/problem114/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ## -- Begin function func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp movq %rdi, -8(%rbp) movl %esi, -12(%rbp) movq -8(%rbp), %rax movq (%rax), %rax movq %rax, -24(%rbp) movq -8(%rbp), %rax movq (%rax), %rax movq %rax, -32(%rbp) movl $1, -36(%rbp) LBB0_1: ## =>This Inner Loop Header: Depth=1 movl -36(%rbp), %eax cmpl -12(%rbp), %eax jge LBB0_9 ## %bb.2: ## in Loop: Header=BB0_1 Depth=1 cmpq $0, -24(%rbp) jge LBB0_4 ## %bb.3: ## in Loop: Header=BB0_1 Depth=1 movq -24(%rbp), %rax movq -8(%rbp), %rcx movslq -36(%rbp), %rdx addq (%rcx,%rdx,8), %rax movq %rax, -48(%rbp) ## 8-byte Spill jmp LBB0_5 LBB0_4: ## in Loop: Header=BB0_1 Depth=1 movq -8(%rbp), %rax movslq -36(%rbp), %rcx movq (%rax,%rcx,8), %rax movq %rax, -48(%rbp) ## 8-byte Spill LBB0_5: ## in Loop: Header=BB0_1 Depth=1 movq -48(%rbp), %rax ## 8-byte Reload movq %rax, -24(%rbp) movq -24(%rbp), %rax cmpq -32(%rbp), %rax jge LBB0_7 ## %bb.6: ## in Loop: Header=BB0_1 Depth=1 movq -24(%rbp), %rax movq %rax, -32(%rbp) LBB0_7: ## in Loop: Header=BB0_1 Depth=1 jmp LBB0_8 LBB0_8: ## in Loop: Header=BB0_1 Depth=1 movl -36(%rbp), %eax addl $1, %eax movl %eax, -36(%rbp) jmp LBB0_1 LBB0_9: movq -32(%rbp), %rax popq %rbp retq .cfi_endproc ## -- End function .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #48 .cfi_def_cfa_offset 48 str x0, [sp, #40] str w1, [sp, #36] ldr x8, [sp, #40] ldr x8, [x8] str x8, [sp, #24] ldr x8, [sp, #40] ldr x8, [x8] str x8, [sp, #16] mov w8, #1 str w8, [sp, #12] b LBB0_1 LBB0_1: ; =>This Inner Loop Header: Depth=1 ldr w8, [sp, #12] ldr w9, [sp, #36] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_9 b LBB0_2 LBB0_2: ; in Loop: Header=BB0_1 Depth=1 ldr x8, [sp, #24] subs x8, x8, #0 cset w8, ge tbnz w8, #0, LBB0_4 b LBB0_3 LBB0_3: ; in Loop: Header=BB0_1 Depth=1 ldr x8, [sp, #24] ldr x9, [sp, #40] ldrsw x10, [sp, #12] ldr x9, [x9, x10, lsl #3] add x8, x8, x9 str x8, [sp] ; 8-byte Folded Spill b LBB0_5 LBB0_4: ; in Loop: Header=BB0_1 Depth=1 ldr x8, [sp, #40] ldrsw x9, [sp, #12] ldr x8, [x8, x9, lsl #3] str x8, [sp] ; 8-byte Folded Spill b LBB0_5 LBB0_5: ; in Loop: Header=BB0_1 Depth=1 ldr x8, [sp] ; 8-byte Folded Reload str x8, [sp, #24] ldr x8, [sp, #24] ldr x9, [sp, #16] subs x8, x8, x9 cset w8, ge tbnz w8, #0, LBB0_7 b LBB0_6 LBB0_6: ; in Loop: Header=BB0_1 Depth=1 ldr x8, [sp, #24] str x8, [sp, #16] b LBB0_7 LBB0_7: ; in Loop: Header=BB0_1 Depth=1 b LBB0_8 LBB0_8: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #12] add w8, w8, #1 str w8, [sp, #12] b LBB0_1 LBB0_9: ldr x0, [sp, #16] add sp, sp, #48 ret .cfi_endproc ; -- End function .subsections_via_symbols
eval/problem115/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ## -- Begin function func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp movq %rdi, -8(%rbp) movl %esi, -12(%rbp) movl %edx, -16(%rbp) movl %ecx, -20(%rbp) movl $0, -24(%rbp) movl $0, -28(%rbp) LBB0_1: ## =>This Loop Header: Depth=1 ## Child Loop BB0_3 Depth 2 movl -28(%rbp), %eax cmpl -12(%rbp), %eax jge LBB0_10 ## %bb.2: ## in Loop: Header=BB0_1 Depth=1 movl $0, -32(%rbp) movl $0, -36(%rbp) LBB0_3: ## Parent Loop BB0_1 Depth=1 ## => This Inner Loop Header: Depth=2 movl -36(%rbp), %eax cmpl -16(%rbp), %eax jge LBB0_6 ## %bb.4: ## in Loop: Header=BB0_3 Depth=2 movq -8(%rbp), %rax movslq -28(%rbp), %rcx movq (%rax,%rcx,8), %rax movslq -36(%rbp), %rcx movl (%rax,%rcx,4), %eax addl -32(%rbp), %eax movl %eax, -32(%rbp) ## %bb.5: ## in Loop: Header=BB0_3 Depth=2 movl -36(%rbp), %eax addl $1, %eax movl %eax, -36(%rbp) jmp LBB0_3 LBB0_6: ## in Loop: Header=BB0_1 Depth=1 cmpl $0, -32(%rbp) jle LBB0_8 ## %bb.7: ## in Loop: Header=BB0_1 Depth=1 movl -32(%rbp), %eax addl -20(%rbp), %eax subl $1, %eax cltd idivl -20(%rbp) addl -24(%rbp), %eax movl %eax, -24(%rbp) LBB0_8: ## in Loop: Header=BB0_1 Depth=1 jmp LBB0_9 LBB0_9: ## in Loop: Header=BB0_1 Depth=1 movl -28(%rbp), %eax addl $1, %eax movl %eax, -28(%rbp) jmp LBB0_1 LBB0_10: movl -24(%rbp), %eax popq %rbp retq .cfi_endproc ## -- End function .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #48 .cfi_def_cfa_offset 48 str x0, [sp, #40] str w1, [sp, #36] str w2, [sp, #32] str w3, [sp, #28] str wzr, [sp, #24] str wzr, [sp, #20] b LBB0_1 LBB0_1: ; =>This Loop Header: Depth=1 ; Child Loop BB0_3 Depth 2 ldr w8, [sp, #20] ldr w9, [sp, #36] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_10 b LBB0_2 LBB0_2: ; in Loop: Header=BB0_1 Depth=1 str wzr, [sp, #16] str wzr, [sp, #12] b LBB0_3 LBB0_3: ; Parent Loop BB0_1 Depth=1 ; => This Inner Loop Header: Depth=2 ldr w8, [sp, #12] ldr w9, [sp, #32] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_6 b LBB0_4 LBB0_4: ; in Loop: Header=BB0_3 Depth=2 ldr x8, [sp, #40] ldrsw x9, [sp, #20] ldr x8, [x8, x9, lsl #3] ldrsw x9, [sp, #12] ldr w9, [x8, x9, lsl #2] ldr w8, [sp, #16] add w8, w8, w9 str w8, [sp, #16] b LBB0_5 LBB0_5: ; in Loop: Header=BB0_3 Depth=2 ldr w8, [sp, #12] add w8, w8, #1 str w8, [sp, #12] b LBB0_3 LBB0_6: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #16] subs w8, w8, #0 cset w8, le tbnz w8, #0, LBB0_8 b LBB0_7 LBB0_7: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #16] ldr w9, [sp, #28] add w8, w8, w9 subs w8, w8, #1 ldr w9, [sp, #28] sdiv w9, w8, w9 ldr w8, [sp, #24] add w8, w8, w9 str w8, [sp, #24] b LBB0_8 LBB0_8: ; in Loop: Header=BB0_1 Depth=1 b LBB0_9 LBB0_9: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #20] add w8, w8, #1 str w8, [sp, #20] b LBB0_1 LBB0_10: ldr w0, [sp, #24] add sp, sp, #48 ret .cfi_endproc ; -- End function .subsections_via_symbols
eval/problem116/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ## -- Begin function func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp movq %rdi, -8(%rbp) movl %esi, -12(%rbp) movl $0, -32(%rbp) LBB0_1: ## =>This Loop Header: Depth=1 ## Child Loop BB0_3 Depth 2 ## Child Loop BB0_5 Depth 3 ## Child Loop BB0_8 Depth 3 movl -32(%rbp), %eax cmpl -12(%rbp), %eax jge LBB0_18 ## %bb.2: ## in Loop: Header=BB0_1 Depth=1 movl -32(%rbp), %eax addl $1, %eax movl %eax, -36(%rbp) LBB0_3: ## Parent Loop BB0_1 Depth=1 ## => This Loop Header: Depth=2 ## Child Loop BB0_5 Depth 3 ## Child Loop BB0_8 Depth 3 movl -36(%rbp), %eax cmpl -12(%rbp), %eax jge LBB0_16 ## %bb.4: ## in Loop: Header=BB0_3 Depth=2 movl $0, -16(%rbp) movq -8(%rbp), %rax movslq -32(%rbp), %rcx movl (%rax,%rcx,4), %eax movl %eax, -20(%rbp) movq -8(%rbp), %rax movslq -36(%rbp), %rcx movl (%rax,%rcx,4), %eax movl %eax, -24(%rbp) LBB0_5: ## Parent Loop BB0_1 Depth=1 ## Parent Loop BB0_3 Depth=2 ## => This Inner Loop Header: Depth=3 cmpl $0, -20(%rbp) jle LBB0_7 ## %bb.6: ## in Loop: Header=BB0_5 Depth=3 movl -20(%rbp), %eax andl $1, %eax addl -16(%rbp), %eax movl %eax, -16(%rbp) movl -20(%rbp), %eax sarl $1, %eax movl %eax, -20(%rbp) jmp LBB0_5 LBB0_7: ## in Loop: Header=BB0_3 Depth=2 movl -16(%rbp), %eax movl %eax, -20(%rbp) movl $0, -16(%rbp) LBB0_8: ## Parent Loop BB0_1 Depth=1 ## Parent Loop BB0_3 Depth=2 ## => This Inner Loop Header: Depth=3 cmpl $0, -24(%rbp) jle LBB0_10 ## %bb.9: ## in Loop: Header=BB0_8 Depth=3 movl -24(%rbp), %eax andl $1, %eax addl -16(%rbp), %eax movl %eax, -16(%rbp) movl -24(%rbp), %eax sarl $1, %eax movl %eax, -24(%rbp) jmp LBB0_8 LBB0_10: ## in Loop: Header=BB0_3 Depth=2 movl -16(%rbp), %eax movl %eax, -24(%rbp) movl -24(%rbp), %eax cmpl -20(%rbp), %eax jl LBB0_13 ## %bb.11: ## in Loop: Header=BB0_3 Depth=2 movl -24(%rbp), %eax cmpl -20(%rbp), %eax jne LBB0_14 ## %bb.12: ## in Loop: Header=BB0_3 Depth=2 movq -8(%rbp), %rax movslq -36(%rbp), %rcx movl (%rax,%rcx,4), %eax movq -8(%rbp), %rcx movslq -32(%rbp), %rdx cmpl (%rcx,%rdx,4), %eax jge LBB0_14 LBB0_13: ## in Loop: Header=BB0_3 Depth=2 movq -8(%rbp), %rax movslq -32(%rbp), %rcx movl (%rax,%rcx,4), %eax movl %eax, -28(%rbp) movq -8(%rbp), %rax movslq -36(%rbp), %rcx movl (%rax,%rcx,4), %edx movq -8(%rbp), %rax movslq -32(%rbp), %rcx movl %edx, (%rax,%rcx,4) movl -28(%rbp), %edx movq -8(%rbp), %rax movslq -36(%rbp), %rcx movl %edx, (%rax,%rcx,4) LBB0_14: ## in Loop: Header=BB0_3 Depth=2 jmp LBB0_15 LBB0_15: ## in Loop: Header=BB0_3 Depth=2 movl -36(%rbp), %eax addl $1, %eax movl %eax, -36(%rbp) jmp LBB0_3 LBB0_16: ## in Loop: Header=BB0_1 Depth=1 jmp LBB0_17 LBB0_17: ## in Loop: Header=BB0_1 Depth=1 movl -32(%rbp), %eax addl $1, %eax movl %eax, -32(%rbp) jmp LBB0_1 LBB0_18: popq %rbp retq .cfi_endproc ## -- End function .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #48 .cfi_def_cfa_offset 48 str x0, [sp, #40] str w1, [sp, #36] str wzr, [sp, #16] b LBB0_1 LBB0_1: ; =>This Loop Header: Depth=1 ; Child Loop BB0_3 Depth 2 ; Child Loop BB0_5 Depth 3 ; Child Loop BB0_8 Depth 3 ldr w8, [sp, #16] ldr w9, [sp, #36] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_18 b LBB0_2 LBB0_2: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #16] add w8, w8, #1 str w8, [sp, #12] b LBB0_3 LBB0_3: ; Parent Loop BB0_1 Depth=1 ; => This Loop Header: Depth=2 ; Child Loop BB0_5 Depth 3 ; Child Loop BB0_8 Depth 3 ldr w8, [sp, #12] ldr w9, [sp, #36] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_16 b LBB0_4 LBB0_4: ; in Loop: Header=BB0_3 Depth=2 str wzr, [sp, #32] ldr x8, [sp, #40] ldrsw x9, [sp, #16] ldr w8, [x8, x9, lsl #2] str w8, [sp, #28] ldr x8, [sp, #40] ldrsw x9, [sp, #12] ldr w8, [x8, x9, lsl #2] str w8, [sp, #24] b LBB0_5 LBB0_5: ; Parent Loop BB0_1 Depth=1 ; Parent Loop BB0_3 Depth=2 ; => This Inner Loop Header: Depth=3 ldr w8, [sp, #28] subs w8, w8, #0 cset w8, le tbnz w8, #0, LBB0_7 b LBB0_6 LBB0_6: ; in Loop: Header=BB0_5 Depth=3 ldr w8, [sp, #28] and w9, w8, #0x1 ldr w8, [sp, #32] add w8, w8, w9 str w8, [sp, #32] ldr w8, [sp, #28] asr w8, w8, #1 str w8, [sp, #28] b LBB0_5 LBB0_7: ; in Loop: Header=BB0_3 Depth=2 ldr w8, [sp, #32] str w8, [sp, #28] str wzr, [sp, #32] b LBB0_8 LBB0_8: ; Parent Loop BB0_1 Depth=1 ; Parent Loop BB0_3 Depth=2 ; => This Inner Loop Header: Depth=3 ldr w8, [sp, #24] subs w8, w8, #0 cset w8, le tbnz w8, #0, LBB0_10 b LBB0_9 LBB0_9: ; in Loop: Header=BB0_8 Depth=3 ldr w8, [sp, #24] and w9, w8, #0x1 ldr w8, [sp, #32] add w8, w8, w9 str w8, [sp, #32] ldr w8, [sp, #24] asr w8, w8, #1 str w8, [sp, #24] b LBB0_8 LBB0_10: ; in Loop: Header=BB0_3 Depth=2 ldr w8, [sp, #32] str w8, [sp, #24] ldr w8, [sp, #24] ldr w9, [sp, #28] subs w8, w8, w9 cset w8, lt tbnz w8, #0, LBB0_13 b LBB0_11 LBB0_11: ; in Loop: Header=BB0_3 Depth=2 ldr w8, [sp, #24] ldr w9, [sp, #28] subs w8, w8, w9 cset w8, ne tbnz w8, #0, LBB0_14 b LBB0_12 LBB0_12: ; in Loop: Header=BB0_3 Depth=2 ldr x8, [sp, #40] ldrsw x9, [sp, #12] ldr w8, [x8, x9, lsl #2] ldr x9, [sp, #40] ldrsw x10, [sp, #16] ldr w9, [x9, x10, lsl #2] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_14 b LBB0_13 LBB0_13: ; in Loop: Header=BB0_3 Depth=2 ldr x8, [sp, #40] ldrsw x9, [sp, #16] ldr w8, [x8, x9, lsl #2] str w8, [sp, #20] ldr x8, [sp, #40] ldrsw x9, [sp, #12] ldr w8, [x8, x9, lsl #2] ldr x9, [sp, #40] ldrsw x10, [sp, #16] str w8, [x9, x10, lsl #2] ldr w8, [sp, #20] ldr x9, [sp, #40] ldrsw x10, [sp, #12] str w8, [x9, x10, lsl #2] b LBB0_14 LBB0_14: ; in Loop: Header=BB0_3 Depth=2 b LBB0_15 LBB0_15: ; in Loop: Header=BB0_3 Depth=2 ldr w8, [sp, #12] add w8, w8, #1 str w8, [sp, #12] b LBB0_3 LBB0_16: ; in Loop: Header=BB0_1 Depth=1 b LBB0_17 LBB0_17: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #16] add w8, w8, #1 str w8, [sp, #16] b LBB0_1 LBB0_18: add sp, sp, #48 ret .cfi_endproc ; -- End function .subsections_via_symbols
eval/problem117/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ## -- Begin function func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp subq $80, %rsp movq %rdi, -8(%rbp) movl %esi, -12(%rbp) movq %rdx, -24(%rbp) leaq L_.str(%rip), %rax movq %rax, -32(%rbp) movq $0, -40(%rbp) movl $0, -44(%rbp) movl $0, -48(%rbp) movl $0, -52(%rbp) movq -8(%rbp), %rdi callq _strlen movq %rax, -64(%rbp) movq -64(%rbp), %rdi addq $1, %rdi callq _malloc movq %rax, -72(%rbp) movl $0, -76(%rbp) LBB0_1: ## =>This Inner Loop Header: Depth=1 movslq -76(%rbp), %rax cmpq -64(%rbp), %rax ja LBB0_13 ## %bb.2: ## in Loop: Header=BB0_1 Depth=1 movq -8(%rbp), %rax movslq -76(%rbp), %rcx movsbl (%rax,%rcx), %edi callq _isspace cmpl $0, %eax jne LBB0_4 ## %bb.3: ## in Loop: Header=BB0_1 Depth=1 movq -8(%rbp), %rax movslq -76(%rbp), %rcx movsbl (%rax,%rcx), %eax cmpl $0, %eax jne LBB0_7 LBB0_4: ## in Loop: Header=BB0_1 Depth=1 movl -44(%rbp), %eax cmpl -12(%rbp), %eax jne LBB0_6 ## %bb.5: ## in Loop: Header=BB0_1 Depth=1 movq -72(%rbp), %rax movl -76(%rbp), %ecx subl -52(%rbp), %ecx movslq %ecx, %rcx movb $0, (%rax,%rcx) movq -40(%rbp), %rdi movl -48(%rbp), %eax addl $1, %eax movslq %eax, %rsi shlq $3, %rsi callq _realloc movq %rax, -40(%rbp) movq -72(%rbp), %rdi callq _strlen movq %rax, %rdi addq $1, %rdi callq _malloc movq %rax, %rdx movq -40(%rbp), %rax movslq -48(%rbp), %rcx movq %rdx, (%rax,%rcx,8) movq -40(%rbp), %rax movslq -48(%rbp), %rcx movq (%rax,%rcx,8), %rdi movq -72(%rbp), %rsi movq $-1, %rdx callq ___strcpy_chk movl -48(%rbp), %eax addl $1, %eax movl %eax, -48(%rbp) LBB0_6: ## in Loop: Header=BB0_1 Depth=1 movl -76(%rbp), %eax addl $1, %eax movl %eax, -52(%rbp) movl $0, -44(%rbp) jmp LBB0_11 LBB0_7: ## in Loop: Header=BB0_1 Depth=1 movq -8(%rbp), %rax movslq -76(%rbp), %rcx movb (%rax,%rcx), %dl movq -72(%rbp), %rax movl -76(%rbp), %ecx subl -52(%rbp), %ecx movslq %ecx, %rcx movb %dl, (%rax,%rcx) movq -32(%rbp), %rdi movq -8(%rbp), %rax movslq -76(%rbp), %rcx movsbl (%rax,%rcx), %esi callq _strchr cmpq $0, %rax jne LBB0_10 ## %bb.8: ## in Loop: Header=BB0_1 Depth=1 movq -8(%rbp), %rax movslq -76(%rbp), %rcx movzbl (%rax,%rcx), %edi callq _isalpha cmpl $0, %eax je LBB0_10 ## %bb.9: ## in Loop: Header=BB0_1 Depth=1 movl -44(%rbp), %eax addl $1, %eax movl %eax, -44(%rbp) LBB0_10: ## in Loop: Header=BB0_1 Depth=1 jmp LBB0_11 LBB0_11: ## in Loop: Header=BB0_1 Depth=1 jmp LBB0_12 LBB0_12: ## in Loop: Header=BB0_1 Depth=1 movl -76(%rbp), %eax addl $1, %eax movl %eax, -76(%rbp) jmp LBB0_1 LBB0_13: movq -72(%rbp), %rdi callq _free movl -48(%rbp), %ecx movq -24(%rbp), %rax movl %ecx, (%rax) movq -40(%rbp), %rax addq $80, %rsp popq %rbp retq .cfi_endproc ## -- End function .section __TEXT,__cstring,cstring_literals L_.str: ## @.str .asciz "aeiouAEIOU" .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #96 .cfi_def_cfa_offset 96 stp x29, x30, [sp, #80] ; 16-byte Folded Spill add x29, sp, #80 .cfi_def_cfa w29, 16 .cfi_offset w30, -8 .cfi_offset w29, -16 stur x0, [x29, #-8] stur w1, [x29, #-12] stur x2, [x29, #-24] adrp x8, l_.str@PAGE add x8, x8, l_.str@PAGEOFF stur x8, [x29, #-32] ; kill: def $x8 killed $xzr str xzr, [sp, #40] str wzr, [sp, #36] str wzr, [sp, #32] str wzr, [sp, #28] ldur x0, [x29, #-8] bl _strlen str x0, [sp, #16] ldr x8, [sp, #16] add x0, x8, #1 bl _malloc str x0, [sp, #8] str wzr, [sp, #4] b LBB0_1 LBB0_1: ; =>This Inner Loop Header: Depth=1 ldrsw x8, [sp, #4] ldr x9, [sp, #16] subs x8, x8, x9 cset w8, hi tbnz w8, #0, LBB0_13 b LBB0_2 LBB0_2: ; in Loop: Header=BB0_1 Depth=1 ldur x8, [x29, #-8] ldrsw x9, [sp, #4] ldrsb w0, [x8, x9] bl _isspace subs w8, w0, #0 cset w8, ne tbnz w8, #0, LBB0_4 b LBB0_3 LBB0_3: ; in Loop: Header=BB0_1 Depth=1 ldur x8, [x29, #-8] ldrsw x9, [sp, #4] ldrsb w8, [x8, x9] subs w8, w8, #0 cset w8, ne tbnz w8, #0, LBB0_7 b LBB0_4 LBB0_4: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #36] ldur w9, [x29, #-12] subs w8, w8, w9 cset w8, ne tbnz w8, #0, LBB0_6 b LBB0_5 LBB0_5: ; in Loop: Header=BB0_1 Depth=1 ldr x8, [sp, #8] ldr w9, [sp, #4] ldr w10, [sp, #28] subs w9, w9, w10 add x8, x8, w9, sxtw strb wzr, [x8] ldr x0, [sp, #40] ldr w8, [sp, #32] add w9, w8, #1 ; implicit-def: $x8 mov x8, x9 sxtw x9, w8 mov x8, #8 mul x1, x8, x9 bl _realloc str x0, [sp, #40] ldr x0, [sp, #8] bl _strlen add x0, x0, #1 bl _malloc ldr x8, [sp, #40] ldrsw x9, [sp, #32] str x0, [x8, x9, lsl #3] ldr x8, [sp, #40] ldrsw x9, [sp, #32] ldr x0, [x8, x9, lsl #3] ldr x1, [sp, #8] mov x2, #-1 bl ___strcpy_chk ldr w8, [sp, #32] add w8, w8, #1 str w8, [sp, #32] b LBB0_6 LBB0_6: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #4] add w8, w8, #1 str w8, [sp, #28] str wzr, [sp, #36] b LBB0_11 LBB0_7: ; in Loop: Header=BB0_1 Depth=1 ldur x8, [x29, #-8] ldrsw x9, [sp, #4] add x8, x8, x9 ldrb w8, [x8] ldr x9, [sp, #8] ldr w10, [sp, #4] ldr w11, [sp, #28] subs w10, w10, w11 add x9, x9, w10, sxtw strb w8, [x9] ldur x0, [x29, #-32] ldur x8, [x29, #-8] ldrsw x9, [sp, #4] ldrsb w1, [x8, x9] bl _strchr subs x8, x0, #0 cset w8, ne tbnz w8, #0, LBB0_10 b LBB0_8 LBB0_8: ; in Loop: Header=BB0_1 Depth=1 ldur x8, [x29, #-8] ldrsw x9, [sp, #4] ldrb w0, [x8, x9] bl _isalpha subs w8, w0, #0 cset w8, eq tbnz w8, #0, LBB0_10 b LBB0_9 LBB0_9: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #36] add w8, w8, #1 str w8, [sp, #36] b LBB0_10 LBB0_10: ; in Loop: Header=BB0_1 Depth=1 b LBB0_11 LBB0_11: ; in Loop: Header=BB0_1 Depth=1 b LBB0_12 LBB0_12: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #4] add w8, w8, #1 str w8, [sp, #4] b LBB0_1 LBB0_13: ldr x0, [sp, #8] bl _free ldr w8, [sp, #32] ldur x9, [x29, #-24] str w8, [x9] ldr x0, [sp, #40] ldp x29, x30, [sp, #80] ; 16-byte Folded Reload add sp, sp, #96 ret .cfi_endproc ; -- End function .section __TEXT,__cstring,cstring_literals l_.str: ; @.str .asciz "aeiouAEIOU" .subsections_via_symbols
eval/problem118/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ## -- Begin function func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp subq $48, %rsp movq %rdi, -16(%rbp) leaq L_.str(%rip), %rax movq %rax, -24(%rbp) movq -16(%rbp), %rdi callq _strlen movq %rax, -32(%rbp) movq -32(%rbp), %rax subq $2, %rax ## kill: def $eax killed $eax killed $rax movl %eax, -36(%rbp) LBB0_1: ## =>This Inner Loop Header: Depth=1 cmpl $1, -36(%rbp) jl LBB0_8 ## %bb.2: ## in Loop: Header=BB0_1 Depth=1 movq -24(%rbp), %rdi movq -16(%rbp), %rax movslq -36(%rbp), %rcx movsbl (%rax,%rcx), %esi callq _strchr cmpq $0, %rax je LBB0_6 ## %bb.3: ## in Loop: Header=BB0_1 Depth=1 movq -24(%rbp), %rdi movq -16(%rbp), %rax movl -36(%rbp), %ecx addl $1, %ecx movslq %ecx, %rcx movsbl (%rax,%rcx), %esi callq _strchr cmpq $0, %rax jne LBB0_6 ## %bb.4: ## in Loop: Header=BB0_1 Depth=1 movq -24(%rbp), %rdi movq -16(%rbp), %rax movl -36(%rbp), %ecx subl $1, %ecx movslq %ecx, %rcx movsbl (%rax,%rcx), %esi callq _strchr cmpq $0, %rax jne LBB0_6 ## %bb.5: movq -16(%rbp), %rax movslq -36(%rbp), %rcx movb (%rax,%rcx), %al movb %al, _func0.out(%rip) leaq _func0.out(%rip), %rax movq %rax, -8(%rbp) jmp LBB0_9 LBB0_6: ## in Loop: Header=BB0_1 Depth=1 jmp LBB0_7 LBB0_7: ## in Loop: Header=BB0_1 Depth=1 movl -36(%rbp), %eax addl $-1, %eax movl %eax, -36(%rbp) jmp LBB0_1 LBB0_8: movb $0, _func0.out(%rip) leaq _func0.out(%rip), %rax movq %rax, -8(%rbp) LBB0_9: movq -8(%rbp), %rax addq $48, %rsp popq %rbp retq .cfi_endproc ## -- End function .zerofill __DATA,__bss,_func0.out,2,0 ## @func0.out .section __TEXT,__cstring,cstring_literals L_.str: ## @.str .asciz "AEIOUaeiou" .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #64 .cfi_def_cfa_offset 64 stp x29, x30, [sp, #48] ; 16-byte Folded Spill add x29, sp, #48 .cfi_def_cfa w29, 16 .cfi_offset w30, -8 .cfi_offset w29, -16 stur x0, [x29, #-16] adrp x8, l_.str@PAGE add x8, x8, l_.str@PAGEOFF str x8, [sp, #24] ldur x0, [x29, #-16] bl _strlen str x0, [sp, #16] ldr x8, [sp, #16] subs x8, x8, #2 ; kill: def $w8 killed $w8 killed $x8 str w8, [sp, #12] b LBB0_1 LBB0_1: ; =>This Inner Loop Header: Depth=1 ldr w8, [sp, #12] subs w8, w8, #1 cset w8, lt tbnz w8, #0, LBB0_8 b LBB0_2 LBB0_2: ; in Loop: Header=BB0_1 Depth=1 ldr x0, [sp, #24] ldur x8, [x29, #-16] ldrsw x9, [sp, #12] ldrsb w1, [x8, x9] bl _strchr subs x8, x0, #0 cset w8, eq tbnz w8, #0, LBB0_6 b LBB0_3 LBB0_3: ; in Loop: Header=BB0_1 Depth=1 ldr x0, [sp, #24] ldur x8, [x29, #-16] ldr w9, [sp, #12] add w9, w9, #1 ldrsb w1, [x8, w9, sxtw] bl _strchr subs x8, x0, #0 cset w8, ne tbnz w8, #0, LBB0_6 b LBB0_4 LBB0_4: ; in Loop: Header=BB0_1 Depth=1 ldr x0, [sp, #24] ldur x8, [x29, #-16] ldr w9, [sp, #12] subs w9, w9, #1 ldrsb w1, [x8, w9, sxtw] bl _strchr subs x8, x0, #0 cset w8, ne tbnz w8, #0, LBB0_6 b LBB0_5 LBB0_5: ldur x8, [x29, #-16] ldrsw x9, [sp, #12] add x8, x8, x9 ldrb w9, [x8] adrp x10, _func0.out@PAGE adrp x8, _func0.out@PAGE add x8, x8, _func0.out@PAGEOFF strb w9, [x10, _func0.out@PAGEOFF] stur x8, [x29, #-8] b LBB0_9 LBB0_6: ; in Loop: Header=BB0_1 Depth=1 b LBB0_7 LBB0_7: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #12] subs w8, w8, #1 str w8, [sp, #12] b LBB0_1 LBB0_8: adrp x9, _func0.out@PAGE adrp x8, _func0.out@PAGE add x8, x8, _func0.out@PAGEOFF strb wzr, [x9, _func0.out@PAGEOFF] stur x8, [x29, #-8] b LBB0_9 LBB0_9: ldur x0, [x29, #-8] ldp x29, x30, [sp, #48] ; 16-byte Folded Reload add sp, sp, #64 ret .cfi_endproc ; -- End function .zerofill __DATA,__bss,_func0.out,2,0 ; @func0.out .section __TEXT,__cstring,cstring_literals l_.str: ; @.str .asciz "AEIOUaeiou" .subsections_via_symbols
eval/problem119/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ## -- Begin function func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp subq $64, %rsp movq %rdi, -16(%rbp) movq %rsi, -24(%rbp) movq -16(%rbp), %rdi callq _strlen ## kill: def $eax killed $eax killed $rax movl %eax, -28(%rbp) movq -24(%rbp), %rdi callq _strlen ## kill: def $eax killed $eax killed $rax movl %eax, -32(%rbp) movl -28(%rbp), %eax cmpl -32(%rbp), %eax jge LBB0_2 ## %bb.1: movl -28(%rbp), %eax movl %eax, -56(%rbp) ## 4-byte Spill jmp LBB0_3 LBB0_2: movl -32(%rbp), %eax movl %eax, -56(%rbp) ## 4-byte Spill LBB0_3: movl -56(%rbp), %eax ## 4-byte Reload movl %eax, -36(%rbp) movl -36(%rbp), %eax addl $1, %eax movslq %eax, %rdi shlq $0, %rdi callq _malloc movq %rax, -48(%rbp) cmpq $0, -48(%rbp) jne LBB0_5 ## %bb.4: movq $0, -8(%rbp) jmp LBB0_10 LBB0_5: movl $0, -52(%rbp) LBB0_6: ## =>This Inner Loop Header: Depth=1 movl -52(%rbp), %eax cmpl -36(%rbp), %eax jge LBB0_9 ## %bb.7: ## in Loop: Header=BB0_6 Depth=1 movq -16(%rbp), %rax movslq -52(%rbp), %rcx movsbl (%rax,%rcx), %edx movq -24(%rbp), %rax movslq -52(%rbp), %rcx movsbl (%rax,%rcx), %esi movl $49, %eax movl $48, %ecx cmpl %esi, %edx cmovel %ecx, %eax movb %al, %dl movq -48(%rbp), %rax movslq -52(%rbp), %rcx movb %dl, (%rax,%rcx) ## %bb.8: ## in Loop: Header=BB0_6 Depth=1 movl -52(%rbp), %eax addl $1, %eax movl %eax, -52(%rbp) jmp LBB0_6 LBB0_9: movq -48(%rbp), %rax movslq -36(%rbp), %rcx movb $0, (%rax,%rcx) movq -48(%rbp), %rax movq %rax, -8(%rbp) LBB0_10: movq -8(%rbp), %rax addq $64, %rsp popq %rbp retq .cfi_endproc ## -- End function .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #80 .cfi_def_cfa_offset 80 stp x29, x30, [sp, #64] ; 16-byte Folded Spill add x29, sp, #64 .cfi_def_cfa w29, 16 .cfi_offset w30, -8 .cfi_offset w29, -16 stur x0, [x29, #-16] stur x1, [x29, #-24] ldur x0, [x29, #-16] bl _strlen mov x8, x0 stur w8, [x29, #-28] ldur x0, [x29, #-24] bl _strlen mov x8, x0 str w8, [sp, #32] ldur w8, [x29, #-28] ldr w9, [sp, #32] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_2 b LBB0_1 LBB0_1: ldur w8, [x29, #-28] str w8, [sp, #8] ; 4-byte Folded Spill b LBB0_3 LBB0_2: ldr w8, [sp, #32] str w8, [sp, #8] ; 4-byte Folded Spill b LBB0_3 LBB0_3: ldr w8, [sp, #8] ; 4-byte Folded Reload str w8, [sp, #28] ldr w8, [sp, #28] add w9, w8, #1 ; implicit-def: $x8 mov x8, x9 sxtw x8, w8 lsr x0, x8, #0 bl _malloc str x0, [sp, #16] ldr x8, [sp, #16] subs x8, x8, #0 cset w8, ne tbnz w8, #0, LBB0_5 b LBB0_4 LBB0_4: ; kill: def $x8 killed $xzr stur xzr, [x29, #-8] b LBB0_10 LBB0_5: str wzr, [sp, #12] b LBB0_6 LBB0_6: ; =>This Inner Loop Header: Depth=1 ldr w8, [sp, #12] ldr w9, [sp, #28] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_9 b LBB0_7 LBB0_7: ; in Loop: Header=BB0_6 Depth=1 ldur x8, [x29, #-16] ldrsw x9, [sp, #12] ldrsb w8, [x8, x9] ldur x9, [x29, #-24] ldrsw x10, [sp, #12] ldrsb w9, [x9, x10] subs w8, w8, w9 cset w8, eq and w10, w8, #0x1 mov w9, #49 mov w8, #48 ands w10, w10, #0x1 csel w8, w8, w9, ne ldr x9, [sp, #16] ldrsw x10, [sp, #12] strb w8, [x9, x10] b LBB0_8 LBB0_8: ; in Loop: Header=BB0_6 Depth=1 ldr w8, [sp, #12] add w8, w8, #1 str w8, [sp, #12] b LBB0_6 LBB0_9: ldr x8, [sp, #16] ldrsw x9, [sp, #28] add x8, x8, x9 strb wzr, [x8] ldr x8, [sp, #16] stur x8, [x29, #-8] b LBB0_10 LBB0_10: ldur x0, [x29, #-8] ldp x29, x30, [sp, #64] ; 16-byte Folded Reload add sp, sp, #80 ret .cfi_endproc ; -- End function .subsections_via_symbols
eval/problem12/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ## -- Begin function func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp subq $48, %rsp movq %rdi, -16(%rbp) movq %rsi, -24(%rbp) movl $0, -28(%rbp) movq -16(%rbp), %rdi callq _strlen ## kill: def $eax killed $eax killed $rax movl %eax, -32(%rbp) movq -24(%rbp), %rdi callq _strlen ## kill: def $eax killed $eax killed $rax movl %eax, -36(%rbp) movl $1, -44(%rbp) movl $0, -40(%rbp) LBB0_1: ## =>This Inner Loop Header: Depth=1 movl -40(%rbp), %eax cmpl -32(%rbp), %eax jge LBB0_10 ## %bb.2: ## in Loop: Header=BB0_1 Depth=1 movq -16(%rbp), %rax movslq -40(%rbp), %rcx movsbl (%rax,%rcx), %eax cmpl $40, %eax jne LBB0_4 ## %bb.3: ## in Loop: Header=BB0_1 Depth=1 movl -28(%rbp), %eax addl $1, %eax movl %eax, -28(%rbp) LBB0_4: ## in Loop: Header=BB0_1 Depth=1 movq -16(%rbp), %rax movslq -40(%rbp), %rcx movsbl (%rax,%rcx), %eax cmpl $41, %eax jne LBB0_6 ## %bb.5: ## in Loop: Header=BB0_1 Depth=1 movl -28(%rbp), %eax addl $-1, %eax movl %eax, -28(%rbp) LBB0_6: ## in Loop: Header=BB0_1 Depth=1 cmpl $0, -28(%rbp) jge LBB0_8 ## %bb.7: ## in Loop: Header=BB0_1 Depth=1 movl $0, -44(%rbp) LBB0_8: ## in Loop: Header=BB0_1 Depth=1 jmp LBB0_9 LBB0_9: ## in Loop: Header=BB0_1 Depth=1 movl -40(%rbp), %eax addl $1, %eax movl %eax, -40(%rbp) jmp LBB0_1 LBB0_10: movl $0, -40(%rbp) LBB0_11: ## =>This Inner Loop Header: Depth=1 movl -40(%rbp), %eax cmpl -36(%rbp), %eax jge LBB0_20 ## %bb.12: ## in Loop: Header=BB0_11 Depth=1 movq -24(%rbp), %rax movslq -40(%rbp), %rcx movsbl (%rax,%rcx), %eax cmpl $40, %eax jne LBB0_14 ## %bb.13: ## in Loop: Header=BB0_11 Depth=1 movl -28(%rbp), %eax addl $1, %eax movl %eax, -28(%rbp) LBB0_14: ## in Loop: Header=BB0_11 Depth=1 movq -24(%rbp), %rax movslq -40(%rbp), %rcx movsbl (%rax,%rcx), %eax cmpl $41, %eax jne LBB0_16 ## %bb.15: ## in Loop: Header=BB0_11 Depth=1 movl -28(%rbp), %eax addl $-1, %eax movl %eax, -28(%rbp) LBB0_16: ## in Loop: Header=BB0_11 Depth=1 cmpl $0, -28(%rbp) jge LBB0_18 ## %bb.17: ## in Loop: Header=BB0_11 Depth=1 movl $0, -44(%rbp) LBB0_18: ## in Loop: Header=BB0_11 Depth=1 jmp LBB0_19 LBB0_19: ## in Loop: Header=BB0_11 Depth=1 movl -40(%rbp), %eax addl $1, %eax movl %eax, -40(%rbp) jmp LBB0_11 LBB0_20: cmpl $0, -28(%rbp) jne LBB0_23 ## %bb.21: cmpl $0, -44(%rbp) je LBB0_23 ## %bb.22: leaq L_.str(%rip), %rax movq %rax, -8(%rbp) jmp LBB0_47 LBB0_23: movl $0, -28(%rbp) movl $1, -44(%rbp) movl $0, -40(%rbp) LBB0_24: ## =>This Inner Loop Header: Depth=1 movl -40(%rbp), %eax cmpl -36(%rbp), %eax jge LBB0_33 ## %bb.25: ## in Loop: Header=BB0_24 Depth=1 movq -24(%rbp), %rax movslq -40(%rbp), %rcx movsbl (%rax,%rcx), %eax cmpl $40, %eax jne LBB0_27 ## %bb.26: ## in Loop: Header=BB0_24 Depth=1 movl -28(%rbp), %eax addl $1, %eax movl %eax, -28(%rbp) LBB0_27: ## in Loop: Header=BB0_24 Depth=1 movq -24(%rbp), %rax movslq -40(%rbp), %rcx movsbl (%rax,%rcx), %eax cmpl $41, %eax jne LBB0_29 ## %bb.28: ## in Loop: Header=BB0_24 Depth=1 movl -28(%rbp), %eax addl $-1, %eax movl %eax, -28(%rbp) LBB0_29: ## in Loop: Header=BB0_24 Depth=1 cmpl $0, -28(%rbp) jge LBB0_31 ## %bb.30: ## in Loop: Header=BB0_24 Depth=1 movl $0, -44(%rbp) LBB0_31: ## in Loop: Header=BB0_24 Depth=1 jmp LBB0_32 LBB0_32: ## in Loop: Header=BB0_24 Depth=1 movl -40(%rbp), %eax addl $1, %eax movl %eax, -40(%rbp) jmp LBB0_24 LBB0_33: movl $0, -40(%rbp) LBB0_34: ## =>This Inner Loop Header: Depth=1 movl -40(%rbp), %eax cmpl -32(%rbp), %eax jge LBB0_43 ## %bb.35: ## in Loop: Header=BB0_34 Depth=1 movq -16(%rbp), %rax movslq -40(%rbp), %rcx movsbl (%rax,%rcx), %eax cmpl $40, %eax jne LBB0_37 ## %bb.36: ## in Loop: Header=BB0_34 Depth=1 movl -28(%rbp), %eax addl $1, %eax movl %eax, -28(%rbp) LBB0_37: ## in Loop: Header=BB0_34 Depth=1 movq -16(%rbp), %rax movslq -40(%rbp), %rcx movsbl (%rax,%rcx), %eax cmpl $41, %eax jne LBB0_39 ## %bb.38: ## in Loop: Header=BB0_34 Depth=1 movl -28(%rbp), %eax addl $-1, %eax movl %eax, -28(%rbp) LBB0_39: ## in Loop: Header=BB0_34 Depth=1 cmpl $0, -28(%rbp) jge LBB0_41 ## %bb.40: ## in Loop: Header=BB0_34 Depth=1 movl $0, -44(%rbp) LBB0_41: ## in Loop: Header=BB0_34 Depth=1 jmp LBB0_42 LBB0_42: ## in Loop: Header=BB0_34 Depth=1 movl -40(%rbp), %eax addl $1, %eax movl %eax, -40(%rbp) jmp LBB0_34 LBB0_43: cmpl $0, -28(%rbp) jne LBB0_46 ## %bb.44: cmpl $0, -44(%rbp) je LBB0_46 ## %bb.45: leaq L_.str(%rip), %rax movq %rax, -8(%rbp) jmp LBB0_47 LBB0_46: leaq L_.str.1(%rip), %rax movq %rax, -8(%rbp) LBB0_47: movq -8(%rbp), %rax addq $48, %rsp popq %rbp retq .cfi_endproc ## -- End function .section __TEXT,__cstring,cstring_literals L_.str: ## @.str .asciz "Yes" L_.str.1: ## @.str.1 .asciz "No" .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #64 .cfi_def_cfa_offset 64 stp x29, x30, [sp, #48] ; 16-byte Folded Spill add x29, sp, #48 .cfi_def_cfa w29, 16 .cfi_offset w30, -8 .cfi_offset w29, -16 stur x0, [x29, #-16] str x1, [sp, #24] str wzr, [sp, #20] ldur x0, [x29, #-16] bl _strlen mov x8, x0 str w8, [sp, #16] ldr x0, [sp, #24] bl _strlen mov x8, x0 str w8, [sp, #12] mov w8, #1 str w8, [sp, #4] str wzr, [sp, #8] b LBB0_1 LBB0_1: ; =>This Inner Loop Header: Depth=1 ldr w8, [sp, #8] ldr w9, [sp, #16] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_10 b LBB0_2 LBB0_2: ; in Loop: Header=BB0_1 Depth=1 ldur x8, [x29, #-16] ldrsw x9, [sp, #8] ldrsb w8, [x8, x9] subs w8, w8, #40 cset w8, ne tbnz w8, #0, LBB0_4 b LBB0_3 LBB0_3: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #20] add w8, w8, #1 str w8, [sp, #20] b LBB0_4 LBB0_4: ; in Loop: Header=BB0_1 Depth=1 ldur x8, [x29, #-16] ldrsw x9, [sp, #8] ldrsb w8, [x8, x9] subs w8, w8, #41 cset w8, ne tbnz w8, #0, LBB0_6 b LBB0_5 LBB0_5: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #20] subs w8, w8, #1 str w8, [sp, #20] b LBB0_6 LBB0_6: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #20] subs w8, w8, #0 cset w8, ge tbnz w8, #0, LBB0_8 b LBB0_7 LBB0_7: ; in Loop: Header=BB0_1 Depth=1 str wzr, [sp, #4] b LBB0_8 LBB0_8: ; in Loop: Header=BB0_1 Depth=1 b LBB0_9 LBB0_9: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #8] add w8, w8, #1 str w8, [sp, #8] b LBB0_1 LBB0_10: str wzr, [sp, #8] b LBB0_11 LBB0_11: ; =>This Inner Loop Header: Depth=1 ldr w8, [sp, #8] ldr w9, [sp, #12] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_20 b LBB0_12 LBB0_12: ; in Loop: Header=BB0_11 Depth=1 ldr x8, [sp, #24] ldrsw x9, [sp, #8] ldrsb w8, [x8, x9] subs w8, w8, #40 cset w8, ne tbnz w8, #0, LBB0_14 b LBB0_13 LBB0_13: ; in Loop: Header=BB0_11 Depth=1 ldr w8, [sp, #20] add w8, w8, #1 str w8, [sp, #20] b LBB0_14 LBB0_14: ; in Loop: Header=BB0_11 Depth=1 ldr x8, [sp, #24] ldrsw x9, [sp, #8] ldrsb w8, [x8, x9] subs w8, w8, #41 cset w8, ne tbnz w8, #0, LBB0_16 b LBB0_15 LBB0_15: ; in Loop: Header=BB0_11 Depth=1 ldr w8, [sp, #20] subs w8, w8, #1 str w8, [sp, #20] b LBB0_16 LBB0_16: ; in Loop: Header=BB0_11 Depth=1 ldr w8, [sp, #20] subs w8, w8, #0 cset w8, ge tbnz w8, #0, LBB0_18 b LBB0_17 LBB0_17: ; in Loop: Header=BB0_11 Depth=1 str wzr, [sp, #4] b LBB0_18 LBB0_18: ; in Loop: Header=BB0_11 Depth=1 b LBB0_19 LBB0_19: ; in Loop: Header=BB0_11 Depth=1 ldr w8, [sp, #8] add w8, w8, #1 str w8, [sp, #8] b LBB0_11 LBB0_20: ldr w8, [sp, #20] subs w8, w8, #0 cset w8, ne tbnz w8, #0, LBB0_23 b LBB0_21 LBB0_21: ldr w8, [sp, #4] subs w8, w8, #0 cset w8, eq tbnz w8, #0, LBB0_23 b LBB0_22 LBB0_22: adrp x8, l_.str@PAGE add x8, x8, l_.str@PAGEOFF stur x8, [x29, #-8] b LBB0_47 LBB0_23: str wzr, [sp, #20] mov w8, #1 str w8, [sp, #4] str wzr, [sp, #8] b LBB0_24 LBB0_24: ; =>This Inner Loop Header: Depth=1 ldr w8, [sp, #8] ldr w9, [sp, #12] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_33 b LBB0_25 LBB0_25: ; in Loop: Header=BB0_24 Depth=1 ldr x8, [sp, #24] ldrsw x9, [sp, #8] ldrsb w8, [x8, x9] subs w8, w8, #40 cset w8, ne tbnz w8, #0, LBB0_27 b LBB0_26 LBB0_26: ; in Loop: Header=BB0_24 Depth=1 ldr w8, [sp, #20] add w8, w8, #1 str w8, [sp, #20] b LBB0_27 LBB0_27: ; in Loop: Header=BB0_24 Depth=1 ldr x8, [sp, #24] ldrsw x9, [sp, #8] ldrsb w8, [x8, x9] subs w8, w8, #41 cset w8, ne tbnz w8, #0, LBB0_29 b LBB0_28 LBB0_28: ; in Loop: Header=BB0_24 Depth=1 ldr w8, [sp, #20] subs w8, w8, #1 str w8, [sp, #20] b LBB0_29 LBB0_29: ; in Loop: Header=BB0_24 Depth=1 ldr w8, [sp, #20] subs w8, w8, #0 cset w8, ge tbnz w8, #0, LBB0_31 b LBB0_30 LBB0_30: ; in Loop: Header=BB0_24 Depth=1 str wzr, [sp, #4] b LBB0_31 LBB0_31: ; in Loop: Header=BB0_24 Depth=1 b LBB0_32 LBB0_32: ; in Loop: Header=BB0_24 Depth=1 ldr w8, [sp, #8] add w8, w8, #1 str w8, [sp, #8] b LBB0_24 LBB0_33: str wzr, [sp, #8] b LBB0_34 LBB0_34: ; =>This Inner Loop Header: Depth=1 ldr w8, [sp, #8] ldr w9, [sp, #16] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_43 b LBB0_35 LBB0_35: ; in Loop: Header=BB0_34 Depth=1 ldur x8, [x29, #-16] ldrsw x9, [sp, #8] ldrsb w8, [x8, x9] subs w8, w8, #40 cset w8, ne tbnz w8, #0, LBB0_37 b LBB0_36 LBB0_36: ; in Loop: Header=BB0_34 Depth=1 ldr w8, [sp, #20] add w8, w8, #1 str w8, [sp, #20] b LBB0_37 LBB0_37: ; in Loop: Header=BB0_34 Depth=1 ldur x8, [x29, #-16] ldrsw x9, [sp, #8] ldrsb w8, [x8, x9] subs w8, w8, #41 cset w8, ne tbnz w8, #0, LBB0_39 b LBB0_38 LBB0_38: ; in Loop: Header=BB0_34 Depth=1 ldr w8, [sp, #20] subs w8, w8, #1 str w8, [sp, #20] b LBB0_39 LBB0_39: ; in Loop: Header=BB0_34 Depth=1 ldr w8, [sp, #20] subs w8, w8, #0 cset w8, ge tbnz w8, #0, LBB0_41 b LBB0_40 LBB0_40: ; in Loop: Header=BB0_34 Depth=1 str wzr, [sp, #4] b LBB0_41 LBB0_41: ; in Loop: Header=BB0_34 Depth=1 b LBB0_42 LBB0_42: ; in Loop: Header=BB0_34 Depth=1 ldr w8, [sp, #8] add w8, w8, #1 str w8, [sp, #8] b LBB0_34 LBB0_43: ldr w8, [sp, #20] subs w8, w8, #0 cset w8, ne tbnz w8, #0, LBB0_46 b LBB0_44 LBB0_44: ldr w8, [sp, #4] subs w8, w8, #0 cset w8, eq tbnz w8, #0, LBB0_46 b LBB0_45 LBB0_45: adrp x8, l_.str@PAGE add x8, x8, l_.str@PAGEOFF stur x8, [x29, #-8] b LBB0_47 LBB0_46: adrp x8, l_.str.1@PAGE add x8, x8, l_.str.1@PAGEOFF stur x8, [x29, #-8] b LBB0_47 LBB0_47: ldur x0, [x29, #-8] ldp x29, x30, [sp, #48] ; 16-byte Folded Reload add sp, sp, #64 ret .cfi_endproc ; -- End function .section __TEXT,__cstring,cstring_literals l_.str: ; @.str .asciz "Yes" l_.str.1: ; @.str.1 .asciz "No" .subsections_via_symbols
eval/problem120/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ## -- Begin function func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp movq %rdi, -8(%rbp) movl %esi, -12(%rbp) movl %edx, -16(%rbp) movq %rcx, -24(%rbp) movl $0, -28(%rbp) LBB0_1: ## =>This Loop Header: Depth=1 ## Child Loop BB0_3 Depth 2 movl -28(%rbp), %eax movl -12(%rbp), %ecx subl $1, %ecx cmpl %ecx, %eax jge LBB0_10 ## %bb.2: ## in Loop: Header=BB0_1 Depth=1 movl $0, -32(%rbp) LBB0_3: ## Parent Loop BB0_1 Depth=1 ## => This Inner Loop Header: Depth=2 movl -32(%rbp), %eax movl -12(%rbp), %ecx subl -28(%rbp), %ecx subl $1, %ecx cmpl %ecx, %eax jge LBB0_8 ## %bb.4: ## in Loop: Header=BB0_3 Depth=2 movq -8(%rbp), %rax movslq -32(%rbp), %rcx movl (%rax,%rcx,4), %eax movq -8(%rbp), %rcx movl -32(%rbp), %edx addl $1, %edx movslq %edx, %rdx cmpl (%rcx,%rdx,4), %eax jle LBB0_6 ## %bb.5: ## in Loop: Header=BB0_3 Depth=2 movq -8(%rbp), %rax movslq -32(%rbp), %rcx movl (%rax,%rcx,4), %eax movl %eax, -36(%rbp) movq -8(%rbp), %rax movl -32(%rbp), %ecx addl $1, %ecx movslq %ecx, %rcx movl (%rax,%rcx,4), %edx movq -8(%rbp), %rax movslq -32(%rbp), %rcx movl %edx, (%rax,%rcx,4) movl -36(%rbp), %edx movq -8(%rbp), %rax movl -32(%rbp), %ecx addl $1, %ecx movslq %ecx, %rcx movl %edx, (%rax,%rcx,4) LBB0_6: ## in Loop: Header=BB0_3 Depth=2 jmp LBB0_7 LBB0_7: ## in Loop: Header=BB0_3 Depth=2 movl -32(%rbp), %eax addl $1, %eax movl %eax, -32(%rbp) jmp LBB0_3 LBB0_8: ## in Loop: Header=BB0_1 Depth=1 jmp LBB0_9 LBB0_9: ## in Loop: Header=BB0_1 Depth=1 movl -28(%rbp), %eax addl $1, %eax movl %eax, -28(%rbp) jmp LBB0_1 LBB0_10: movl $0, -40(%rbp) LBB0_11: ## =>This Inner Loop Header: Depth=1 movl -40(%rbp), %eax cmpl -16(%rbp), %eax jge LBB0_14 ## %bb.12: ## in Loop: Header=BB0_11 Depth=1 movq -8(%rbp), %rax movl -12(%rbp), %ecx subl -16(%rbp), %ecx addl -40(%rbp), %ecx movslq %ecx, %rcx movl (%rax,%rcx,4), %edx movq -24(%rbp), %rax movslq -40(%rbp), %rcx movl %edx, (%rax,%rcx,4) ## %bb.13: ## in Loop: Header=BB0_11 Depth=1 movl -40(%rbp), %eax addl $1, %eax movl %eax, -40(%rbp) jmp LBB0_11 LBB0_14: popq %rbp retq .cfi_endproc ## -- End function .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #48 .cfi_def_cfa_offset 48 str x0, [sp, #40] str w1, [sp, #36] str w2, [sp, #32] str x3, [sp, #24] str wzr, [sp, #20] b LBB0_1 LBB0_1: ; =>This Loop Header: Depth=1 ; Child Loop BB0_3 Depth 2 ldr w8, [sp, #20] ldr w9, [sp, #36] subs w9, w9, #1 subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_10 b LBB0_2 LBB0_2: ; in Loop: Header=BB0_1 Depth=1 str wzr, [sp, #16] b LBB0_3 LBB0_3: ; Parent Loop BB0_1 Depth=1 ; => This Inner Loop Header: Depth=2 ldr w8, [sp, #16] ldr w9, [sp, #36] ldr w10, [sp, #20] subs w9, w9, w10 subs w9, w9, #1 subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_8 b LBB0_4 LBB0_4: ; in Loop: Header=BB0_3 Depth=2 ldr x8, [sp, #40] ldrsw x9, [sp, #16] ldr w8, [x8, x9, lsl #2] ldr x9, [sp, #40] ldr w10, [sp, #16] add w10, w10, #1 ldr w9, [x9, w10, sxtw #2] subs w8, w8, w9 cset w8, le tbnz w8, #0, LBB0_6 b LBB0_5 LBB0_5: ; in Loop: Header=BB0_3 Depth=2 ldr x8, [sp, #40] ldrsw x9, [sp, #16] ldr w8, [x8, x9, lsl #2] str w8, [sp, #12] ldr x8, [sp, #40] ldr w9, [sp, #16] add w9, w9, #1 ldr w8, [x8, w9, sxtw #2] ldr x9, [sp, #40] ldrsw x10, [sp, #16] str w8, [x9, x10, lsl #2] ldr w8, [sp, #12] ldr x9, [sp, #40] ldr w10, [sp, #16] add w10, w10, #1 str w8, [x9, w10, sxtw #2] b LBB0_6 LBB0_6: ; in Loop: Header=BB0_3 Depth=2 b LBB0_7 LBB0_7: ; in Loop: Header=BB0_3 Depth=2 ldr w8, [sp, #16] add w8, w8, #1 str w8, [sp, #16] b LBB0_3 LBB0_8: ; in Loop: Header=BB0_1 Depth=1 b LBB0_9 LBB0_9: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #20] add w8, w8, #1 str w8, [sp, #20] b LBB0_1 LBB0_10: str wzr, [sp, #8] b LBB0_11 LBB0_11: ; =>This Inner Loop Header: Depth=1 ldr w8, [sp, #8] ldr w9, [sp, #32] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_14 b LBB0_12 LBB0_12: ; in Loop: Header=BB0_11 Depth=1 ldr x8, [sp, #40] ldr w9, [sp, #36] ldr w10, [sp, #32] subs w9, w9, w10 ldr w10, [sp, #8] add w9, w9, w10 ldr w8, [x8, w9, sxtw #2] ldr x9, [sp, #24] ldrsw x10, [sp, #8] str w8, [x9, x10, lsl #2] b LBB0_13 LBB0_13: ; in Loop: Header=BB0_11 Depth=1 ldr w8, [sp, #8] add w8, w8, #1 str w8, [sp, #8] b LBB0_11 LBB0_14: add sp, sp, #48 ret .cfi_endproc ; -- End function .subsections_via_symbols
eval/problem121/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ## -- Begin function func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp movq %rdi, -8(%rbp) movl %esi, -12(%rbp) movl $0, -16(%rbp) movl $0, -20(%rbp) LBB0_1: ## =>This Inner Loop Header: Depth=1 movl -20(%rbp), %eax shll $1, %eax cmpl -12(%rbp), %eax jge LBB0_6 ## %bb.2: ## in Loop: Header=BB0_1 Depth=1 movq -8(%rbp), %rax movl -20(%rbp), %ecx shll $1, %ecx movslq %ecx, %rcx movl (%rax,%rcx,4), %eax movl $2, %ecx cltd idivl %ecx cmpl $1, %edx jne LBB0_4 ## %bb.3: ## in Loop: Header=BB0_1 Depth=1 movq -8(%rbp), %rax movl -20(%rbp), %ecx shll $1, %ecx movslq %ecx, %rcx movl (%rax,%rcx,4), %eax addl -16(%rbp), %eax movl %eax, -16(%rbp) LBB0_4: ## in Loop: Header=BB0_1 Depth=1 jmp LBB0_5 LBB0_5: ## in Loop: Header=BB0_1 Depth=1 movl -20(%rbp), %eax addl $1, %eax movl %eax, -20(%rbp) jmp LBB0_1 LBB0_6: movl -16(%rbp), %eax popq %rbp retq .cfi_endproc ## -- End function .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #32 .cfi_def_cfa_offset 32 str x0, [sp, #24] str w1, [sp, #20] str wzr, [sp, #16] str wzr, [sp, #12] b LBB0_1 LBB0_1: ; =>This Inner Loop Header: Depth=1 ldr w9, [sp, #12] ldr w8, [sp, #20] subs w8, w8, w9, lsl #1 cset w8, le tbnz w8, #0, LBB0_6 b LBB0_2 LBB0_2: ; in Loop: Header=BB0_1 Depth=1 ldr x8, [sp, #24] ldr w9, [sp, #12] lsl w9, w9, #1 ldr w8, [x8, w9, sxtw #2] mov w10, #2 sdiv w9, w8, w10 mul w9, w9, w10 subs w8, w8, w9 subs w8, w8, #1 cset w8, ne tbnz w8, #0, LBB0_4 b LBB0_3 LBB0_3: ; in Loop: Header=BB0_1 Depth=1 ldr x8, [sp, #24] ldr w9, [sp, #12] lsl w9, w9, #1 ldr w9, [x8, w9, sxtw #2] ldr w8, [sp, #16] add w8, w8, w9 str w8, [sp, #16] b LBB0_4 LBB0_4: ; in Loop: Header=BB0_1 Depth=1 b LBB0_5 LBB0_5: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #12] add w8, w8, #1 str w8, [sp, #12] b LBB0_1 LBB0_6: ldr w0, [sp, #16] add sp, sp, #32 ret .cfi_endproc ; -- End function .subsections_via_symbols
eval/problem122/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ## -- Begin function func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp movq %rdi, -8(%rbp) movl %esi, -12(%rbp) movl $0, -16(%rbp) movl $0, -20(%rbp) LBB0_1: ## =>This Inner Loop Header: Depth=1 movl -20(%rbp), %eax cmpl -12(%rbp), %eax jge LBB0_7 ## %bb.2: ## in Loop: Header=BB0_1 Depth=1 movq -8(%rbp), %rax movslq -20(%rbp), %rcx cmpl $-99, (%rax,%rcx,4) jl LBB0_5 ## %bb.3: ## in Loop: Header=BB0_1 Depth=1 movq -8(%rbp), %rax movslq -20(%rbp), %rcx cmpl $99, (%rax,%rcx,4) jg LBB0_5 ## %bb.4: ## in Loop: Header=BB0_1 Depth=1 movq -8(%rbp), %rax movslq -20(%rbp), %rcx movl (%rax,%rcx,4), %eax addl -16(%rbp), %eax movl %eax, -16(%rbp) LBB0_5: ## in Loop: Header=BB0_1 Depth=1 jmp LBB0_6 LBB0_6: ## in Loop: Header=BB0_1 Depth=1 movl -20(%rbp), %eax addl $1, %eax movl %eax, -20(%rbp) jmp LBB0_1 LBB0_7: movl -16(%rbp), %eax popq %rbp retq .cfi_endproc ## -- End function .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #32 .cfi_def_cfa_offset 32 str x0, [sp, #24] str w1, [sp, #20] str wzr, [sp, #16] str wzr, [sp, #12] b LBB0_1 LBB0_1: ; =>This Inner Loop Header: Depth=1 ldr w8, [sp, #12] ldr w9, [sp, #20] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_7 b LBB0_2 LBB0_2: ; in Loop: Header=BB0_1 Depth=1 ldr x8, [sp, #24] ldrsw x9, [sp, #12] ldr w8, [x8, x9, lsl #2] adds w8, w8, #99 cset w8, lt tbnz w8, #0, LBB0_5 b LBB0_3 LBB0_3: ; in Loop: Header=BB0_1 Depth=1 ldr x8, [sp, #24] ldrsw x9, [sp, #12] ldr w8, [x8, x9, lsl #2] subs w8, w8, #99 cset w8, gt tbnz w8, #0, LBB0_5 b LBB0_4 LBB0_4: ; in Loop: Header=BB0_1 Depth=1 ldr x8, [sp, #24] ldrsw x9, [sp, #12] ldr w9, [x8, x9, lsl #2] ldr w8, [sp, #16] add w8, w8, w9 str w8, [sp, #16] b LBB0_5 LBB0_5: ; in Loop: Header=BB0_1 Depth=1 b LBB0_6 LBB0_6: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #12] add w8, w8, #1 str w8, [sp, #12] b LBB0_1 LBB0_7: ldr w0, [sp, #16] add sp, sp, #32 ret .cfi_endproc ; -- End function .subsections_via_symbols
eval/problem123/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ## -- Begin function func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp subq $48, %rsp movl %edi, -4(%rbp) movq %rsi, -16(%rbp) movq %rdx, -24(%rbp) movl $10, -28(%rbp) movq -24(%rbp), %rax movl $1, (%rax) movq -16(%rbp), %rax movl $1, (%rax) LBB0_1: ## =>This Inner Loop Header: Depth=1 cmpl $1, -4(%rbp) je LBB0_8 ## %bb.2: ## in Loop: Header=BB0_1 Depth=1 movl -4(%rbp), %eax movl $2, %ecx cltd idivl %ecx cmpl $1, %edx jne LBB0_6 ## %bb.3: ## in Loop: Header=BB0_1 Depth=1 movq -24(%rbp), %rax movl (%rax), %eax cmpl -28(%rbp), %eax jl LBB0_5 ## %bb.4: ## in Loop: Header=BB0_1 Depth=1 movl -28(%rbp), %eax shll $1, %eax movl %eax, -28(%rbp) movq -16(%rbp), %rdi movslq -28(%rbp), %rsi shlq $2, %rsi callq _realloc movq %rax, -16(%rbp) LBB0_5: ## in Loop: Header=BB0_1 Depth=1 movl -4(%rbp), %edx movq -16(%rbp), %rax movq -24(%rbp), %rsi movl (%rsi), %ecx movl %ecx, %edi addl $1, %edi movl %edi, (%rsi) movslq %ecx, %rcx movl %edx, (%rax,%rcx,4) imull $3, -4(%rbp), %eax addl $1, %eax movl %eax, -4(%rbp) jmp LBB0_7 LBB0_6: ## in Loop: Header=BB0_1 Depth=1 movl -4(%rbp), %eax movl $2, %ecx cltd idivl %ecx movl %eax, -4(%rbp) LBB0_7: ## in Loop: Header=BB0_1 Depth=1 jmp LBB0_1 LBB0_8: movl $1, -32(%rbp) LBB0_9: ## =>This Loop Header: Depth=1 ## Child Loop BB0_11 Depth 2 movl -32(%rbp), %eax movq -24(%rbp), %rcx cmpl (%rcx), %eax jge LBB0_17 ## %bb.10: ## in Loop: Header=BB0_9 Depth=1 movq -16(%rbp), %rax movslq -32(%rbp), %rcx movl (%rax,%rcx,4), %eax movl %eax, -36(%rbp) movl -32(%rbp), %eax subl $1, %eax movl %eax, -40(%rbp) LBB0_11: ## Parent Loop BB0_9 Depth=1 ## => This Inner Loop Header: Depth=2 xorl %eax, %eax ## kill: def $al killed $al killed $eax cmpl $0, -40(%rbp) movb %al, -41(%rbp) ## 1-byte Spill jl LBB0_13 ## %bb.12: ## in Loop: Header=BB0_11 Depth=2 movq -16(%rbp), %rax movslq -40(%rbp), %rcx movl (%rax,%rcx,4), %eax cmpl -36(%rbp), %eax setg %al movb %al, -41(%rbp) ## 1-byte Spill LBB0_13: ## in Loop: Header=BB0_11 Depth=2 movb -41(%rbp), %al ## 1-byte Reload testb $1, %al jne LBB0_14 jmp LBB0_15 LBB0_14: ## in Loop: Header=BB0_11 Depth=2 movq -16(%rbp), %rax movslq -40(%rbp), %rcx movl (%rax,%rcx,4), %edx movq -16(%rbp), %rax movl -40(%rbp), %ecx addl $1, %ecx movslq %ecx, %rcx movl %edx, (%rax,%rcx,4) movl -40(%rbp), %eax subl $1, %eax movl %eax, -40(%rbp) jmp LBB0_11 LBB0_15: ## in Loop: Header=BB0_9 Depth=1 movl -36(%rbp), %edx movq -16(%rbp), %rax movl -40(%rbp), %ecx addl $1, %ecx movslq %ecx, %rcx movl %edx, (%rax,%rcx,4) ## %bb.16: ## in Loop: Header=BB0_9 Depth=1 movl -32(%rbp), %eax addl $1, %eax movl %eax, -32(%rbp) jmp LBB0_9 LBB0_17: addq $48, %rsp popq %rbp retq .cfi_endproc ## -- End function .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #64 .cfi_def_cfa_offset 64 stp x29, x30, [sp, #48] ; 16-byte Folded Spill add x29, sp, #48 .cfi_def_cfa w29, 16 .cfi_offset w30, -8 .cfi_offset w29, -16 stur w0, [x29, #-4] stur x1, [x29, #-16] str x2, [sp, #24] mov w8, #10 str w8, [sp, #20] ldr x9, [sp, #24] mov w8, #1 str w8, [x9] ldur x9, [x29, #-16] str w8, [x9] b LBB0_1 LBB0_1: ; =>This Inner Loop Header: Depth=1 ldur w8, [x29, #-4] subs w8, w8, #1 cset w8, eq tbnz w8, #0, LBB0_8 b LBB0_2 LBB0_2: ; in Loop: Header=BB0_1 Depth=1 ldur w8, [x29, #-4] mov w10, #2 sdiv w9, w8, w10 mul w9, w9, w10 subs w8, w8, w9 subs w8, w8, #1 cset w8, ne tbnz w8, #0, LBB0_6 b LBB0_3 LBB0_3: ; in Loop: Header=BB0_1 Depth=1 ldr x8, [sp, #24] ldr w8, [x8] ldr w9, [sp, #20] subs w8, w8, w9 cset w8, lt tbnz w8, #0, LBB0_5 b LBB0_4 LBB0_4: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #20] lsl w8, w8, #1 str w8, [sp, #20] ldur x0, [x29, #-16] ldrsw x8, [sp, #20] lsl x1, x8, #2 bl _realloc stur x0, [x29, #-16] b LBB0_5 LBB0_5: ; in Loop: Header=BB0_1 Depth=1 ldur w8, [x29, #-4] ldur x9, [x29, #-16] ldr x12, [sp, #24] ldrsw x10, [x12] mov x11, x10 add w11, w11, #1 str w11, [x12] str w8, [x9, x10, lsl #2] ldur w8, [x29, #-4] mov w9, #3 mul w8, w8, w9 add w8, w8, #1 stur w8, [x29, #-4] b LBB0_7 LBB0_6: ; in Loop: Header=BB0_1 Depth=1 ldur w8, [x29, #-4] mov w9, #2 sdiv w8, w8, w9 stur w8, [x29, #-4] b LBB0_7 LBB0_7: ; in Loop: Header=BB0_1 Depth=1 b LBB0_1 LBB0_8: mov w8, #1 str w8, [sp, #16] b LBB0_9 LBB0_9: ; =>This Loop Header: Depth=1 ; Child Loop BB0_11 Depth 2 ldr w8, [sp, #16] ldr x9, [sp, #24] ldr w9, [x9] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_17 b LBB0_10 LBB0_10: ; in Loop: Header=BB0_9 Depth=1 ldur x8, [x29, #-16] ldrsw x9, [sp, #16] ldr w8, [x8, x9, lsl #2] str w8, [sp, #12] ldr w8, [sp, #16] subs w8, w8, #1 str w8, [sp, #8] b LBB0_11 LBB0_11: ; Parent Loop BB0_9 Depth=1 ; => This Inner Loop Header: Depth=2 ldr w8, [sp, #8] subs w8, w8, #0 cset w8, lt mov w9, #0 str w9, [sp, #4] ; 4-byte Folded Spill tbnz w8, #0, LBB0_13 b LBB0_12 LBB0_12: ; in Loop: Header=BB0_11 Depth=2 ldur x8, [x29, #-16] ldrsw x9, [sp, #8] ldr w8, [x8, x9, lsl #2] ldr w9, [sp, #12] subs w8, w8, w9 cset w8, gt str w8, [sp, #4] ; 4-byte Folded Spill b LBB0_13 LBB0_13: ; in Loop: Header=BB0_11 Depth=2 ldr w8, [sp, #4] ; 4-byte Folded Reload tbz w8, #0, LBB0_15 b LBB0_14 LBB0_14: ; in Loop: Header=BB0_11 Depth=2 ldur x8, [x29, #-16] ldrsw x9, [sp, #8] ldr w8, [x8, x9, lsl #2] ldur x9, [x29, #-16] ldr w10, [sp, #8] add w10, w10, #1 str w8, [x9, w10, sxtw #2] ldr w8, [sp, #8] subs w8, w8, #1 str w8, [sp, #8] b LBB0_11 LBB0_15: ; in Loop: Header=BB0_9 Depth=1 ldr w8, [sp, #12] ldur x9, [x29, #-16] ldr w10, [sp, #8] add w10, w10, #1 str w8, [x9, w10, sxtw #2] b LBB0_16 LBB0_16: ; in Loop: Header=BB0_9 Depth=1 ldr w8, [sp, #16] add w8, w8, #1 str w8, [sp, #16] b LBB0_9 LBB0_17: ldp x29, x30, [sp, #48] ; 16-byte Folded Reload add sp, sp, #64 ret .cfi_endproc ; -- End function .subsections_via_symbols
eval/problem124/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ## -- Begin function func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp subq $48, %rsp movq %rdi, -16(%rbp) movq -16(%rbp), %rdi callq _strlen cmpq $10, %rax je LBB0_2 ## %bb.1: movl $0, -4(%rbp) jmp LBB0_31 LBB0_2: movl $0, -32(%rbp) LBB0_3: ## =>This Inner Loop Header: Depth=1 cmpl $10, -32(%rbp) jge LBB0_15 ## %bb.4: ## in Loop: Header=BB0_3 Depth=1 cmpl $2, -32(%rbp) je LBB0_6 ## %bb.5: ## in Loop: Header=BB0_3 Depth=1 cmpl $5, -32(%rbp) jne LBB0_9 LBB0_6: ## in Loop: Header=BB0_3 Depth=1 movq -16(%rbp), %rax movslq -32(%rbp), %rcx movsbl (%rax,%rcx), %eax cmpl $45, %eax je LBB0_8 ## %bb.7: movl $0, -4(%rbp) jmp LBB0_31 LBB0_8: ## in Loop: Header=BB0_3 Depth=1 jmp LBB0_13 LBB0_9: ## in Loop: Header=BB0_3 Depth=1 movq -16(%rbp), %rax movslq -32(%rbp), %rcx movsbl (%rax,%rcx), %eax cmpl $48, %eax jl LBB0_11 ## %bb.10: ## in Loop: Header=BB0_3 Depth=1 movq -16(%rbp), %rax movslq -32(%rbp), %rcx movsbl (%rax,%rcx), %eax cmpl $57, %eax jle LBB0_12 LBB0_11: movl $0, -4(%rbp) jmp LBB0_31 LBB0_12: ## in Loop: Header=BB0_3 Depth=1 jmp LBB0_13 LBB0_13: ## in Loop: Header=BB0_3 Depth=1 jmp LBB0_14 LBB0_14: ## in Loop: Header=BB0_3 Depth=1 movl -32(%rbp), %eax addl $1, %eax movl %eax, -32(%rbp) jmp LBB0_3 LBB0_15: movq -16(%rbp), %rax movb (%rax), %al movb %al, -35(%rbp) movq -16(%rbp), %rax movb 1(%rax), %al movb %al, -34(%rbp) movb $0, -33(%rbp) movq -16(%rbp), %rax movb 3(%rax), %al movb %al, -38(%rbp) movq -16(%rbp), %rax movb 4(%rax), %al movb %al, -37(%rbp) movb $0, -36(%rbp) movq -16(%rbp), %rax movb 6(%rax), %al movb %al, -43(%rbp) movq -16(%rbp), %rax movb 7(%rax), %al movb %al, -42(%rbp) movq -16(%rbp), %rax movb 8(%rax), %al movb %al, -41(%rbp) movq -16(%rbp), %rax movb 9(%rax), %al movb %al, -40(%rbp) movb $0, -39(%rbp) leaq -35(%rbp), %rdi callq _atoi movl %eax, -20(%rbp) leaq -38(%rbp), %rdi callq _atoi movl %eax, -24(%rbp) leaq -43(%rbp), %rdi callq _atoi movl %eax, -28(%rbp) cmpl $1, -20(%rbp) jl LBB0_17 ## %bb.16: cmpl $12, -20(%rbp) jle LBB0_18 LBB0_17: movl $0, -4(%rbp) jmp LBB0_31 LBB0_18: cmpl $1, -24(%rbp) jl LBB0_20 ## %bb.19: cmpl $31, -24(%rbp) jle LBB0_21 LBB0_20: movl $0, -4(%rbp) jmp LBB0_31 LBB0_21: cmpl $4, -20(%rbp) je LBB0_25 ## %bb.22: cmpl $6, -20(%rbp) je LBB0_25 ## %bb.23: cmpl $9, -20(%rbp) je LBB0_25 ## %bb.24: cmpl $11, -20(%rbp) jne LBB0_27 LBB0_25: cmpl $31, -24(%rbp) jne LBB0_27 ## %bb.26: movl $0, -4(%rbp) jmp LBB0_31 LBB0_27: cmpl $2, -20(%rbp) jne LBB0_30 ## %bb.28: cmpl $29, -24(%rbp) jle LBB0_30 ## %bb.29: movl $0, -4(%rbp) jmp LBB0_31 LBB0_30: movl $1, -4(%rbp) LBB0_31: movl -4(%rbp), %eax addq $48, %rsp popq %rbp retq .cfi_endproc ## -- End function .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #80 .cfi_def_cfa_offset 80 stp x29, x30, [sp, #64] ; 16-byte Folded Spill add x29, sp, #64 .cfi_def_cfa w29, 16 .cfi_offset w30, -8 .cfi_offset w29, -16 stur x0, [x29, #-16] ldur x0, [x29, #-16] bl _strlen subs x8, x0, #10 cset w8, eq tbnz w8, #0, LBB0_2 b LBB0_1 LBB0_1: stur wzr, [x29, #-4] b LBB0_31 LBB0_2: str wzr, [sp, #32] b LBB0_3 LBB0_3: ; =>This Inner Loop Header: Depth=1 ldr w8, [sp, #32] subs w8, w8, #10 cset w8, ge tbnz w8, #0, LBB0_15 b LBB0_4 LBB0_4: ; in Loop: Header=BB0_3 Depth=1 ldr w8, [sp, #32] subs w8, w8, #2 cset w8, eq tbnz w8, #0, LBB0_6 b LBB0_5 LBB0_5: ; in Loop: Header=BB0_3 Depth=1 ldr w8, [sp, #32] subs w8, w8, #5 cset w8, ne tbnz w8, #0, LBB0_9 b LBB0_6 LBB0_6: ; in Loop: Header=BB0_3 Depth=1 ldur x8, [x29, #-16] ldrsw x9, [sp, #32] ldrsb w8, [x8, x9] subs w8, w8, #45 cset w8, eq tbnz w8, #0, LBB0_8 b LBB0_7 LBB0_7: stur wzr, [x29, #-4] b LBB0_31 LBB0_8: ; in Loop: Header=BB0_3 Depth=1 b LBB0_13 LBB0_9: ; in Loop: Header=BB0_3 Depth=1 ldur x8, [x29, #-16] ldrsw x9, [sp, #32] ldrsb w8, [x8, x9] subs w8, w8, #48 cset w8, lt tbnz w8, #0, LBB0_11 b LBB0_10 LBB0_10: ; in Loop: Header=BB0_3 Depth=1 ldur x8, [x29, #-16] ldrsw x9, [sp, #32] ldrsb w8, [x8, x9] subs w8, w8, #57 cset w8, le tbnz w8, #0, LBB0_12 b LBB0_11 LBB0_11: stur wzr, [x29, #-4] b LBB0_31 LBB0_12: ; in Loop: Header=BB0_3 Depth=1 b LBB0_13 LBB0_13: ; in Loop: Header=BB0_3 Depth=1 b LBB0_14 LBB0_14: ; in Loop: Header=BB0_3 Depth=1 ldr w8, [sp, #32] add w8, w8, #1 str w8, [sp, #32] b LBB0_3 LBB0_15: ldur x8, [x29, #-16] ldrb w8, [x8] add x0, sp, #29 strb w8, [sp, #29] ldur x8, [x29, #-16] ldrb w8, [x8, #1] strb w8, [sp, #30] strb wzr, [sp, #31] ldur x8, [x29, #-16] ldrb w8, [x8, #3] add x9, sp, #26 str x9, [sp] ; 8-byte Folded Spill strb w8, [sp, #26] ldur x8, [x29, #-16] ldrb w8, [x8, #4] strb w8, [sp, #27] strb wzr, [sp, #28] ldur x8, [x29, #-16] ldrb w8, [x8, #6] add x9, sp, #21 str x9, [sp, #8] ; 8-byte Folded Spill strb w8, [sp, #21] ldur x8, [x29, #-16] ldrb w8, [x8, #7] strb w8, [sp, #22] ldur x8, [x29, #-16] ldrb w8, [x8, #8] strb w8, [sp, #23] ldur x8, [x29, #-16] ldrb w8, [x8, #9] strb w8, [sp, #24] strb wzr, [sp, #25] bl _atoi mov x8, x0 ldr x0, [sp] ; 8-byte Folded Reload stur w8, [x29, #-20] bl _atoi mov x8, x0 ldr x0, [sp, #8] ; 8-byte Folded Reload stur w8, [x29, #-24] bl _atoi stur w0, [x29, #-28] ldur w8, [x29, #-20] subs w8, w8, #1 cset w8, lt tbnz w8, #0, LBB0_17 b LBB0_16 LBB0_16: ldur w8, [x29, #-20] subs w8, w8, #12 cset w8, le tbnz w8, #0, LBB0_18 b LBB0_17 LBB0_17: stur wzr, [x29, #-4] b LBB0_31 LBB0_18: ldur w8, [x29, #-24] subs w8, w8, #1 cset w8, lt tbnz w8, #0, LBB0_20 b LBB0_19 LBB0_19: ldur w8, [x29, #-24] subs w8, w8, #31 cset w8, le tbnz w8, #0, LBB0_21 b LBB0_20 LBB0_20: stur wzr, [x29, #-4] b LBB0_31 LBB0_21: ldur w8, [x29, #-20] subs w8, w8, #4 cset w8, eq tbnz w8, #0, LBB0_25 b LBB0_22 LBB0_22: ldur w8, [x29, #-20] subs w8, w8, #6 cset w8, eq tbnz w8, #0, LBB0_25 b LBB0_23 LBB0_23: ldur w8, [x29, #-20] subs w8, w8, #9 cset w8, eq tbnz w8, #0, LBB0_25 b LBB0_24 LBB0_24: ldur w8, [x29, #-20] subs w8, w8, #11 cset w8, ne tbnz w8, #0, LBB0_27 b LBB0_25 LBB0_25: ldur w8, [x29, #-24] subs w8, w8, #31 cset w8, ne tbnz w8, #0, LBB0_27 b LBB0_26 LBB0_26: stur wzr, [x29, #-4] b LBB0_31 LBB0_27: ldur w8, [x29, #-20] subs w8, w8, #2 cset w8, ne tbnz w8, #0, LBB0_30 b LBB0_28 LBB0_28: ldur w8, [x29, #-24] subs w8, w8, #29 cset w8, le tbnz w8, #0, LBB0_30 b LBB0_29 LBB0_29: stur wzr, [x29, #-4] b LBB0_31 LBB0_30: mov w8, #1 stur w8, [x29, #-4] b LBB0_31 LBB0_31: ldur w0, [x29, #-4] ldp x29, x30, [sp, #64] ; 16-byte Folded Reload add sp, sp, #80 ret .cfi_endproc ; -- End function .subsections_via_symbols
eval/problem125/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ## -- Begin function func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp movq %rdi, -16(%rbp) movl %esi, -20(%rbp) cmpl $0, -20(%rbp) jne LBB0_2 ## %bb.1: movb $1, -1(%rbp) jmp LBB0_13 LBB0_2: movl $1, -24(%rbp) LBB0_3: ## =>This Inner Loop Header: Depth=1 movl -24(%rbp), %eax cmpl -20(%rbp), %eax jge LBB0_12 ## %bb.4: ## in Loop: Header=BB0_3 Depth=1 movq -16(%rbp), %rax movslq -24(%rbp), %rcx movl (%rax,%rcx,4), %eax movq -16(%rbp), %rcx movl -24(%rbp), %edx subl $1, %edx movslq %edx, %rdx cmpl (%rcx,%rdx,4), %eax jge LBB0_6 ## %bb.5: movb $0, -1(%rbp) jmp LBB0_13 LBB0_6: ## in Loop: Header=BB0_3 Depth=1 cmpl $2, -24(%rbp) jl LBB0_10 ## %bb.7: ## in Loop: Header=BB0_3 Depth=1 movq -16(%rbp), %rax movslq -24(%rbp), %rcx movl (%rax,%rcx,4), %eax movq -16(%rbp), %rcx movl -24(%rbp), %edx subl $1, %edx movslq %edx, %rdx cmpl (%rcx,%rdx,4), %eax jne LBB0_10 ## %bb.8: ## in Loop: Header=BB0_3 Depth=1 movq -16(%rbp), %rax movslq -24(%rbp), %rcx movl (%rax,%rcx,4), %eax movq -16(%rbp), %rcx movl -24(%rbp), %edx subl $2, %edx movslq %edx, %rdx cmpl (%rcx,%rdx,4), %eax jne LBB0_10 ## %bb.9: movb $0, -1(%rbp) jmp LBB0_13 LBB0_10: ## in Loop: Header=BB0_3 Depth=1 jmp LBB0_11 LBB0_11: ## in Loop: Header=BB0_3 Depth=1 movl -24(%rbp), %eax addl $1, %eax movl %eax, -24(%rbp) jmp LBB0_3 LBB0_12: movb $1, -1(%rbp) LBB0_13: movb -1(%rbp), %al andb $1, %al movzbl %al, %eax popq %rbp retq .cfi_endproc ## -- End function .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #32 .cfi_def_cfa_offset 32 str x0, [sp, #16] str w1, [sp, #12] ldr w8, [sp, #12] subs w8, w8, #0 cset w8, ne tbnz w8, #0, LBB0_2 b LBB0_1 LBB0_1: mov w8, #1 and w8, w8, #0x1 and w8, w8, #0x1 strb w8, [sp, #31] b LBB0_13 LBB0_2: mov w8, #1 str w8, [sp, #8] b LBB0_3 LBB0_3: ; =>This Inner Loop Header: Depth=1 ldr w8, [sp, #8] ldr w9, [sp, #12] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_12 b LBB0_4 LBB0_4: ; in Loop: Header=BB0_3 Depth=1 ldr x8, [sp, #16] ldrsw x9, [sp, #8] ldr w8, [x8, x9, lsl #2] ldr x9, [sp, #16] ldr w10, [sp, #8] subs w10, w10, #1 ldr w9, [x9, w10, sxtw #2] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_6 b LBB0_5 LBB0_5: mov w8, #0 and w8, w8, #0x1 and w8, w8, #0x1 strb w8, [sp, #31] b LBB0_13 LBB0_6: ; in Loop: Header=BB0_3 Depth=1 ldr w8, [sp, #8] subs w8, w8, #2 cset w8, lt tbnz w8, #0, LBB0_10 b LBB0_7 LBB0_7: ; in Loop: Header=BB0_3 Depth=1 ldr x8, [sp, #16] ldrsw x9, [sp, #8] ldr w8, [x8, x9, lsl #2] ldr x9, [sp, #16] ldr w10, [sp, #8] subs w10, w10, #1 ldr w9, [x9, w10, sxtw #2] subs w8, w8, w9 cset w8, ne tbnz w8, #0, LBB0_10 b LBB0_8 LBB0_8: ; in Loop: Header=BB0_3 Depth=1 ldr x8, [sp, #16] ldrsw x9, [sp, #8] ldr w8, [x8, x9, lsl #2] ldr x9, [sp, #16] ldr w10, [sp, #8] subs w10, w10, #2 ldr w9, [x9, w10, sxtw #2] subs w8, w8, w9 cset w8, ne tbnz w8, #0, LBB0_10 b LBB0_9 LBB0_9: mov w8, #0 and w8, w8, #0x1 and w8, w8, #0x1 strb w8, [sp, #31] b LBB0_13 LBB0_10: ; in Loop: Header=BB0_3 Depth=1 b LBB0_11 LBB0_11: ; in Loop: Header=BB0_3 Depth=1 ldr w8, [sp, #8] add w8, w8, #1 str w8, [sp, #8] b LBB0_3 LBB0_12: mov w8, #1 and w8, w8, #0x1 and w8, w8, #0x1 strb w8, [sp, #31] b LBB0_13 LBB0_13: ldrb w8, [sp, #31] and w0, w8, #0x1 add sp, sp, #32 ret .cfi_endproc ; -- End function .subsections_via_symbols
eval/problem126/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ## -- Begin function func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp movq %rdi, -16(%rbp) movl %esi, -20(%rbp) cmpl $0, -20(%rbp) jne LBB0_2 ## %bb.1: movb $1, -1(%rbp) jmp LBB0_13 LBB0_2: movl $1, -24(%rbp) LBB0_3: ## =>This Inner Loop Header: Depth=1 movl -24(%rbp), %eax cmpl -20(%rbp), %eax jge LBB0_12 ## %bb.4: ## in Loop: Header=BB0_3 Depth=1 movq -16(%rbp), %rax movslq -24(%rbp), %rcx movl (%rax,%rcx,4), %eax movq -16(%rbp), %rcx movl -24(%rbp), %edx subl $1, %edx movslq %edx, %rdx cmpl (%rcx,%rdx,4), %eax jge LBB0_6 ## %bb.5: movb $0, -1(%rbp) jmp LBB0_13 LBB0_6: ## in Loop: Header=BB0_3 Depth=1 cmpl $2, -24(%rbp) jl LBB0_10 ## %bb.7: ## in Loop: Header=BB0_3 Depth=1 movq -16(%rbp), %rax movslq -24(%rbp), %rcx movl (%rax,%rcx,4), %eax movq -16(%rbp), %rcx movl -24(%rbp), %edx subl $1, %edx movslq %edx, %rdx cmpl (%rcx,%rdx,4), %eax jne LBB0_10 ## %bb.8: ## in Loop: Header=BB0_3 Depth=1 movq -16(%rbp), %rax movslq -24(%rbp), %rcx movl (%rax,%rcx,4), %eax movq -16(%rbp), %rcx movl -24(%rbp), %edx subl $2, %edx movslq %edx, %rdx cmpl (%rcx,%rdx,4), %eax jne LBB0_10 ## %bb.9: movb $0, -1(%rbp) jmp LBB0_13 LBB0_10: ## in Loop: Header=BB0_3 Depth=1 jmp LBB0_11 LBB0_11: ## in Loop: Header=BB0_3 Depth=1 movl -24(%rbp), %eax addl $1, %eax movl %eax, -24(%rbp) jmp LBB0_3 LBB0_12: movb $1, -1(%rbp) LBB0_13: movb -1(%rbp), %al andb $1, %al movzbl %al, %eax popq %rbp retq .cfi_endproc ## -- End function .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #32 .cfi_def_cfa_offset 32 str x0, [sp, #16] str w1, [sp, #12] ldr w8, [sp, #12] subs w8, w8, #0 cset w8, ne tbnz w8, #0, LBB0_2 b LBB0_1 LBB0_1: mov w8, #1 and w8, w8, #0x1 and w8, w8, #0x1 strb w8, [sp, #31] b LBB0_13 LBB0_2: mov w8, #1 str w8, [sp, #8] b LBB0_3 LBB0_3: ; =>This Inner Loop Header: Depth=1 ldr w8, [sp, #8] ldr w9, [sp, #12] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_12 b LBB0_4 LBB0_4: ; in Loop: Header=BB0_3 Depth=1 ldr x8, [sp, #16] ldrsw x9, [sp, #8] ldr w8, [x8, x9, lsl #2] ldr x9, [sp, #16] ldr w10, [sp, #8] subs w10, w10, #1 ldr w9, [x9, w10, sxtw #2] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_6 b LBB0_5 LBB0_5: mov w8, #0 and w8, w8, #0x1 and w8, w8, #0x1 strb w8, [sp, #31] b LBB0_13 LBB0_6: ; in Loop: Header=BB0_3 Depth=1 ldr w8, [sp, #8] subs w8, w8, #2 cset w8, lt tbnz w8, #0, LBB0_10 b LBB0_7 LBB0_7: ; in Loop: Header=BB0_3 Depth=1 ldr x8, [sp, #16] ldrsw x9, [sp, #8] ldr w8, [x8, x9, lsl #2] ldr x9, [sp, #16] ldr w10, [sp, #8] subs w10, w10, #1 ldr w9, [x9, w10, sxtw #2] subs w8, w8, w9 cset w8, ne tbnz w8, #0, LBB0_10 b LBB0_8 LBB0_8: ; in Loop: Header=BB0_3 Depth=1 ldr x8, [sp, #16] ldrsw x9, [sp, #8] ldr w8, [x8, x9, lsl #2] ldr x9, [sp, #16] ldr w10, [sp, #8] subs w10, w10, #2 ldr w9, [x9, w10, sxtw #2] subs w8, w8, w9 cset w8, ne tbnz w8, #0, LBB0_10 b LBB0_9 LBB0_9: mov w8, #0 and w8, w8, #0x1 and w8, w8, #0x1 strb w8, [sp, #31] b LBB0_13 LBB0_10: ; in Loop: Header=BB0_3 Depth=1 b LBB0_11 LBB0_11: ; in Loop: Header=BB0_3 Depth=1 ldr w8, [sp, #8] add w8, w8, #1 str w8, [sp, #8] b LBB0_3 LBB0_12: mov w8, #1 and w8, w8, #0x1 and w8, w8, #0x1 strb w8, [sp, #31] b LBB0_13 LBB0_13: ldrb w8, [sp, #31] and w0, w8, #0x1 add sp, sp, #32 ret .cfi_endproc ; -- End function .subsections_via_symbols
eval/problem127/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ## -- Begin function func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp movl %edi, -12(%rbp) movl %esi, -16(%rbp) movl %edx, -20(%rbp) movl %ecx, -24(%rbp) movl -12(%rbp), %eax cmpl -20(%rbp), %eax jle LBB0_2 ## %bb.1: movl -12(%rbp), %eax movl %eax, -44(%rbp) ## 4-byte Spill jmp LBB0_3 LBB0_2: movl -20(%rbp), %eax movl %eax, -44(%rbp) ## 4-byte Spill LBB0_3: movl -44(%rbp), %eax ## 4-byte Reload movl %eax, -28(%rbp) movl -16(%rbp), %eax cmpl -24(%rbp), %eax jge LBB0_5 ## %bb.4: movl -16(%rbp), %eax movl %eax, -48(%rbp) ## 4-byte Spill jmp LBB0_6 LBB0_5: movl -24(%rbp), %eax movl %eax, -48(%rbp) ## 4-byte Spill LBB0_6: movl -48(%rbp), %eax ## 4-byte Reload movl %eax, -32(%rbp) movl -32(%rbp), %eax subl -28(%rbp), %eax movl %eax, -36(%rbp) cmpl $2, -36(%rbp) jge LBB0_8 ## %bb.7: leaq L_.str(%rip), %rax movq %rax, -8(%rbp) jmp LBB0_15 LBB0_8: movl $2, -40(%rbp) LBB0_9: ## =>This Inner Loop Header: Depth=1 movl -40(%rbp), %eax imull -40(%rbp), %eax cmpl -36(%rbp), %eax jg LBB0_14 ## %bb.10: ## in Loop: Header=BB0_9 Depth=1 movl -36(%rbp), %eax cltd idivl -40(%rbp) cmpl $0, %edx jne LBB0_12 ## %bb.11: leaq L_.str(%rip), %rax movq %rax, -8(%rbp) jmp LBB0_15 LBB0_12: ## in Loop: Header=BB0_9 Depth=1 jmp LBB0_13 LBB0_13: ## in Loop: Header=BB0_9 Depth=1 movl -40(%rbp), %eax addl $1, %eax movl %eax, -40(%rbp) jmp LBB0_9 LBB0_14: leaq L_.str.1(%rip), %rax movq %rax, -8(%rbp) LBB0_15: movq -8(%rbp), %rax popq %rbp retq .cfi_endproc ## -- End function .section __TEXT,__cstring,cstring_literals L_.str: ## @.str .asciz "NO" L_.str.1: ## @.str.1 .asciz "YES" .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #48 .cfi_def_cfa_offset 48 str w0, [sp, #36] str w1, [sp, #32] str w2, [sp, #28] str w3, [sp, #24] ldr w8, [sp, #36] ldr w9, [sp, #28] subs w8, w8, w9 cset w8, le tbnz w8, #0, LBB0_2 b LBB0_1 LBB0_1: ldr w8, [sp, #36] str w8, [sp, #4] ; 4-byte Folded Spill b LBB0_3 LBB0_2: ldr w8, [sp, #28] str w8, [sp, #4] ; 4-byte Folded Spill b LBB0_3 LBB0_3: ldr w8, [sp, #4] ; 4-byte Folded Reload str w8, [sp, #20] ldr w8, [sp, #32] ldr w9, [sp, #24] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_5 b LBB0_4 LBB0_4: ldr w8, [sp, #32] str w8, [sp] ; 4-byte Folded Spill b LBB0_6 LBB0_5: ldr w8, [sp, #24] str w8, [sp] ; 4-byte Folded Spill b LBB0_6 LBB0_6: ldr w8, [sp] ; 4-byte Folded Reload str w8, [sp, #16] ldr w8, [sp, #16] ldr w9, [sp, #20] subs w8, w8, w9 str w8, [sp, #12] ldr w8, [sp, #12] subs w8, w8, #2 cset w8, ge tbnz w8, #0, LBB0_8 b LBB0_7 LBB0_7: adrp x8, l_.str@PAGE add x8, x8, l_.str@PAGEOFF str x8, [sp, #40] b LBB0_15 LBB0_8: mov w8, #2 str w8, [sp, #8] b LBB0_9 LBB0_9: ; =>This Inner Loop Header: Depth=1 ldr w8, [sp, #8] ldr w9, [sp, #8] mul w8, w8, w9 ldr w9, [sp, #12] subs w8, w8, w9 cset w8, gt tbnz w8, #0, LBB0_14 b LBB0_10 LBB0_10: ; in Loop: Header=BB0_9 Depth=1 ldr w8, [sp, #12] ldr w10, [sp, #8] sdiv w9, w8, w10 mul w9, w9, w10 subs w8, w8, w9 subs w8, w8, #0 cset w8, ne tbnz w8, #0, LBB0_12 b LBB0_11 LBB0_11: adrp x8, l_.str@PAGE add x8, x8, l_.str@PAGEOFF str x8, [sp, #40] b LBB0_15 LBB0_12: ; in Loop: Header=BB0_9 Depth=1 b LBB0_13 LBB0_13: ; in Loop: Header=BB0_9 Depth=1 ldr w8, [sp, #8] add w8, w8, #1 str w8, [sp, #8] b LBB0_9 LBB0_14: adrp x8, l_.str.1@PAGE add x8, x8, l_.str.1@PAGEOFF str x8, [sp, #40] b LBB0_15 LBB0_15: ldr x0, [sp, #40] add sp, sp, #48 ret .cfi_endproc ; -- End function .section __TEXT,__cstring,cstring_literals l_.str: ; @.str .asciz "NO" l_.str.1: ; @.str.1 .asciz "YES" .subsections_via_symbols
eval/problem128/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ## -- Begin function func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp subq $32, %rsp movq %rdi, -16(%rbp) movl %esi, -20(%rbp) cmpl $0, -20(%rbp) jne LBB0_2 ## %bb.1: movl $-32768, -4(%rbp) ## imm = 0x8000 jmp LBB0_11 LBB0_2: movl $0, -24(%rbp) movl $1, -28(%rbp) movl $0, -32(%rbp) LBB0_3: ## =>This Inner Loop Header: Depth=1 movl -32(%rbp), %eax cmpl -20(%rbp), %eax jge LBB0_10 ## %bb.4: ## in Loop: Header=BB0_3 Depth=1 movq -16(%rbp), %rax movslq -32(%rbp), %rcx movl (%rax,%rcx,4), %edi callq _abs addl -24(%rbp), %eax movl %eax, -24(%rbp) movq -16(%rbp), %rax movslq -32(%rbp), %rcx cmpl $0, (%rax,%rcx,4) jne LBB0_6 ## %bb.5: ## in Loop: Header=BB0_3 Depth=1 movl $0, -28(%rbp) LBB0_6: ## in Loop: Header=BB0_3 Depth=1 movq -16(%rbp), %rax movslq -32(%rbp), %rcx cmpl $0, (%rax,%rcx,4) jge LBB0_8 ## %bb.7: ## in Loop: Header=BB0_3 Depth=1 xorl %eax, %eax subl -28(%rbp), %eax movl %eax, -28(%rbp) LBB0_8: ## in Loop: Header=BB0_3 Depth=1 jmp LBB0_9 LBB0_9: ## in Loop: Header=BB0_3 Depth=1 movl -32(%rbp), %eax addl $1, %eax movl %eax, -32(%rbp) jmp LBB0_3 LBB0_10: movl -24(%rbp), %eax imull -28(%rbp), %eax movl %eax, -4(%rbp) LBB0_11: movl -4(%rbp), %eax addq $32, %rsp popq %rbp retq .cfi_endproc ## -- End function .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #48 .cfi_def_cfa_offset 48 stp x29, x30, [sp, #32] ; 16-byte Folded Spill add x29, sp, #32 .cfi_def_cfa w29, 16 .cfi_offset w30, -8 .cfi_offset w29, -16 str x0, [sp, #16] str w1, [sp, #12] ldr w8, [sp, #12] subs w8, w8, #0 cset w8, ne tbnz w8, #0, LBB0_2 b LBB0_1 LBB0_1: mov w8, #-32768 stur w8, [x29, #-4] b LBB0_11 LBB0_2: str wzr, [sp, #8] mov w8, #1 str w8, [sp, #4] str wzr, [sp] b LBB0_3 LBB0_3: ; =>This Inner Loop Header: Depth=1 ldr w8, [sp] ldr w9, [sp, #12] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_10 b LBB0_4 LBB0_4: ; in Loop: Header=BB0_3 Depth=1 ldr x8, [sp, #16] ldrsw x9, [sp] ldr w0, [x8, x9, lsl #2] bl _abs ldr w8, [sp, #8] add w8, w8, w0 str w8, [sp, #8] ldr x8, [sp, #16] ldrsw x9, [sp] ldr w8, [x8, x9, lsl #2] subs w8, w8, #0 cset w8, ne tbnz w8, #0, LBB0_6 b LBB0_5 LBB0_5: ; in Loop: Header=BB0_3 Depth=1 str wzr, [sp, #4] b LBB0_6 LBB0_6: ; in Loop: Header=BB0_3 Depth=1 ldr x8, [sp, #16] ldrsw x9, [sp] ldr w8, [x8, x9, lsl #2] subs w8, w8, #0 cset w8, ge tbnz w8, #0, LBB0_8 b LBB0_7 LBB0_7: ; in Loop: Header=BB0_3 Depth=1 ldr w9, [sp, #4] mov w8, #0 subs w8, w8, w9 str w8, [sp, #4] b LBB0_8 LBB0_8: ; in Loop: Header=BB0_3 Depth=1 b LBB0_9 LBB0_9: ; in Loop: Header=BB0_3 Depth=1 ldr w8, [sp] add w8, w8, #1 str w8, [sp] b LBB0_3 LBB0_10: ldr w8, [sp, #8] ldr w9, [sp, #4] mul w8, w8, w9 stur w8, [x29, #-4] b LBB0_11 LBB0_11: ldur w0, [x29, #-4] ldp x29, x30, [sp, #32] ; 16-byte Folded Reload add sp, sp, #48 ret .cfi_endproc ; -- End function .subsections_via_symbols
eval/problem129/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ## -- Begin function func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp subq $48, %rsp movq %rdi, -8(%rbp) movl %esi, -12(%rbp) leaq L_.str(%rip), %rax movq %rax, -24(%rbp) movl $0, -28(%rbp) movl $0, -32(%rbp) LBB0_1: ## =>This Inner Loop Header: Depth=1 movl -32(%rbp), %eax cmpl -12(%rbp), %eax jge LBB0_6 ## %bb.2: ## in Loop: Header=BB0_1 Depth=1 movq -8(%rbp), %rax movslq -32(%rbp), %rcx movq (%rax,%rcx,8), %rdi callq _strlen ## kill: def $eax killed $eax killed $rax movl %eax, -36(%rbp) movl -36(%rbp), %eax cmpl -28(%rbp), %eax jle LBB0_4 ## %bb.3: ## in Loop: Header=BB0_1 Depth=1 movq -8(%rbp), %rax movslq -32(%rbp), %rcx movq (%rax,%rcx,8), %rax movq %rax, -24(%rbp) movl -36(%rbp), %eax movl %eax, -28(%rbp) LBB0_4: ## in Loop: Header=BB0_1 Depth=1 jmp LBB0_5 LBB0_5: ## in Loop: Header=BB0_1 Depth=1 movl -32(%rbp), %eax addl $1, %eax movl %eax, -32(%rbp) jmp LBB0_1 LBB0_6: movq -24(%rbp), %rax addq $48, %rsp popq %rbp retq .cfi_endproc ## -- End function .section __TEXT,__cstring,cstring_literals L_.str: ## @.str .space 1 .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #64 .cfi_def_cfa_offset 64 stp x29, x30, [sp, #48] ; 16-byte Folded Spill add x29, sp, #48 .cfi_def_cfa w29, 16 .cfi_offset w30, -8 .cfi_offset w29, -16 stur x0, [x29, #-8] stur w1, [x29, #-12] adrp x8, l_.str@PAGE add x8, x8, l_.str@PAGEOFF str x8, [sp, #24] str wzr, [sp, #20] str wzr, [sp, #16] b LBB0_1 LBB0_1: ; =>This Inner Loop Header: Depth=1 ldr w8, [sp, #16] ldur w9, [x29, #-12] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_6 b LBB0_2 LBB0_2: ; in Loop: Header=BB0_1 Depth=1 ldur x8, [x29, #-8] ldrsw x9, [sp, #16] ldr x0, [x8, x9, lsl #3] bl _strlen mov x8, x0 str w8, [sp, #12] ldr w8, [sp, #12] ldr w9, [sp, #20] subs w8, w8, w9 cset w8, le tbnz w8, #0, LBB0_4 b LBB0_3 LBB0_3: ; in Loop: Header=BB0_1 Depth=1 ldur x8, [x29, #-8] ldrsw x9, [sp, #16] ldr x8, [x8, x9, lsl #3] str x8, [sp, #24] ldr w8, [sp, #12] str w8, [sp, #20] b LBB0_4 LBB0_4: ; in Loop: Header=BB0_1 Depth=1 b LBB0_5 LBB0_5: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #16] add w8, w8, #1 str w8, [sp, #16] b LBB0_1 LBB0_6: ldr x0, [sp, #24] ldp x29, x30, [sp, #48] ; 16-byte Folded Reload add sp, sp, #64 ret .cfi_endproc ; -- End function .section __TEXT,__cstring,cstring_literals l_.str: ; @.str .space 1 .subsections_via_symbols
eval/problem13/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ## -- Begin function func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp subq $64, %rsp movq %rdi, -8(%rbp) movl %esi, -12(%rbp) movl %edx, -16(%rbp) movq %rcx, -24(%rbp) movl $0, -28(%rbp) LBB0_1: ## =>This Loop Header: Depth=1 ## Child Loop BB0_3 Depth 2 movl -28(%rbp), %eax cmpl -12(%rbp), %eax jge LBB0_10 ## %bb.2: ## in Loop: Header=BB0_1 Depth=1 movl $0, -32(%rbp) LBB0_3: ## Parent Loop BB0_1 Depth=1 ## => This Inner Loop Header: Depth=2 movl -32(%rbp), %eax cmpl -12(%rbp), %eax jge LBB0_8 ## %bb.4: ## in Loop: Header=BB0_3 Depth=2 movq -8(%rbp), %rax movslq -28(%rbp), %rcx movq (%rax,%rcx,8), %rax movslq -32(%rbp), %rcx cmpl $1, (%rax,%rcx,4) jne LBB0_6 ## %bb.5: ## in Loop: Header=BB0_3 Depth=2 movl -28(%rbp), %eax movl %eax, -36(%rbp) movl -32(%rbp), %eax movl %eax, -40(%rbp) LBB0_6: ## in Loop: Header=BB0_3 Depth=2 jmp LBB0_7 LBB0_7: ## in Loop: Header=BB0_3 Depth=2 movl -32(%rbp), %eax addl $1, %eax movl %eax, -32(%rbp) jmp LBB0_3 LBB0_8: ## in Loop: Header=BB0_1 Depth=1 jmp LBB0_9 LBB0_9: ## in Loop: Header=BB0_1 Depth=1 movl -28(%rbp), %eax addl $1, %eax movl %eax, -28(%rbp) jmp LBB0_1 LBB0_10: movl -12(%rbp), %eax imull -12(%rbp), %eax movl %eax, -44(%rbp) cmpl $0, -36(%rbp) jle LBB0_13 ## %bb.11: movq -8(%rbp), %rax movl -36(%rbp), %ecx subl $1, %ecx movslq %ecx, %rcx movq (%rax,%rcx,8), %rax movslq -40(%rbp), %rcx movl (%rax,%rcx,4), %eax cmpl -44(%rbp), %eax jge LBB0_13 ## %bb.12: movq -8(%rbp), %rax movl -36(%rbp), %ecx subl $1, %ecx movslq %ecx, %rcx movq (%rax,%rcx,8), %rax movslq -40(%rbp), %rcx movl (%rax,%rcx,4), %eax movl %eax, -44(%rbp) LBB0_13: movl -36(%rbp), %eax movl -12(%rbp), %ecx subl $1, %ecx cmpl %ecx, %eax jge LBB0_16 ## %bb.14: movq -8(%rbp), %rax movl -36(%rbp), %ecx addl $1, %ecx movslq %ecx, %rcx movq (%rax,%rcx,8), %rax movslq -40(%rbp), %rcx movl (%rax,%rcx,4), %eax cmpl -44(%rbp), %eax jge LBB0_16 ## %bb.15: movq -8(%rbp), %rax movl -36(%rbp), %ecx addl $1, %ecx movslq %ecx, %rcx movq (%rax,%rcx,8), %rax movslq -40(%rbp), %rcx movl (%rax,%rcx,4), %eax movl %eax, -44(%rbp) LBB0_16: cmpl $0, -40(%rbp) jle LBB0_19 ## %bb.17: movq -8(%rbp), %rax movslq -36(%rbp), %rcx movq (%rax,%rcx,8), %rax movl -40(%rbp), %ecx subl $1, %ecx movslq %ecx, %rcx movl (%rax,%rcx,4), %eax cmpl -44(%rbp), %eax jge LBB0_19 ## %bb.18: movq -8(%rbp), %rax movslq -36(%rbp), %rcx movq (%rax,%rcx,8), %rax movl -40(%rbp), %ecx subl $1, %ecx movslq %ecx, %rcx movl (%rax,%rcx,4), %eax movl %eax, -44(%rbp) LBB0_19: movl -40(%rbp), %eax movl -12(%rbp), %ecx subl $1, %ecx cmpl %ecx, %eax jge LBB0_22 ## %bb.20: movq -8(%rbp), %rax movslq -36(%rbp), %rcx movq (%rax,%rcx,8), %rax movl -40(%rbp), %ecx addl $1, %ecx movslq %ecx, %rcx movl (%rax,%rcx,4), %eax cmpl -44(%rbp), %eax jge LBB0_22 ## %bb.21: movq -8(%rbp), %rax movslq -36(%rbp), %rcx movq (%rax,%rcx,8), %rax movl -40(%rbp), %ecx addl $1, %ecx movslq %ecx, %rcx movl (%rax,%rcx,4), %eax movl %eax, -44(%rbp) LBB0_22: movl -16(%rbp), %ecx movq -24(%rbp), %rax movl %ecx, (%rax) movslq -16(%rbp), %rdi shlq $2, %rdi callq _malloc movq %rax, -56(%rbp) movl $0, -28(%rbp) LBB0_23: ## =>This Inner Loop Header: Depth=1 movl -28(%rbp), %eax cmpl -16(%rbp), %eax jge LBB0_29 ## %bb.24: ## in Loop: Header=BB0_23 Depth=1 movl -28(%rbp), %eax movl $2, %ecx cltd idivl %ecx cmpl $0, %edx jne LBB0_26 ## %bb.25: ## in Loop: Header=BB0_23 Depth=1 movq -56(%rbp), %rax movslq -28(%rbp), %rcx movl $1, (%rax,%rcx,4) jmp LBB0_27 LBB0_26: ## in Loop: Header=BB0_23 Depth=1 movl -44(%rbp), %edx movq -56(%rbp), %rax movslq -28(%rbp), %rcx movl %edx, (%rax,%rcx,4) LBB0_27: ## in Loop: Header=BB0_23 Depth=1 jmp LBB0_28 LBB0_28: ## in Loop: Header=BB0_23 Depth=1 movl -28(%rbp), %eax addl $1, %eax movl %eax, -28(%rbp) jmp LBB0_23 LBB0_29: movq -56(%rbp), %rax addq $64, %rsp popq %rbp retq .cfi_endproc ## -- End function .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #80 .cfi_def_cfa_offset 80 stp x29, x30, [sp, #64] ; 16-byte Folded Spill add x29, sp, #64 .cfi_def_cfa w29, 16 .cfi_offset w30, -8 .cfi_offset w29, -16 stur x0, [x29, #-8] stur w1, [x29, #-12] stur w2, [x29, #-16] stur x3, [x29, #-24] stur wzr, [x29, #-28] b LBB0_1 LBB0_1: ; =>This Loop Header: Depth=1 ; Child Loop BB0_3 Depth 2 ldur w8, [x29, #-28] ldur w9, [x29, #-12] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_10 b LBB0_2 LBB0_2: ; in Loop: Header=BB0_1 Depth=1 str wzr, [sp, #32] b LBB0_3 LBB0_3: ; Parent Loop BB0_1 Depth=1 ; => This Inner Loop Header: Depth=2 ldr w8, [sp, #32] ldur w9, [x29, #-12] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_8 b LBB0_4 LBB0_4: ; in Loop: Header=BB0_3 Depth=2 ldur x8, [x29, #-8] ldursw x9, [x29, #-28] ldr x8, [x8, x9, lsl #3] ldrsw x9, [sp, #32] ldr w8, [x8, x9, lsl #2] subs w8, w8, #1 cset w8, ne tbnz w8, #0, LBB0_6 b LBB0_5 LBB0_5: ; in Loop: Header=BB0_3 Depth=2 ldur w8, [x29, #-28] str w8, [sp, #28] ldr w8, [sp, #32] str w8, [sp, #24] b LBB0_6 LBB0_6: ; in Loop: Header=BB0_3 Depth=2 b LBB0_7 LBB0_7: ; in Loop: Header=BB0_3 Depth=2 ldr w8, [sp, #32] add w8, w8, #1 str w8, [sp, #32] b LBB0_3 LBB0_8: ; in Loop: Header=BB0_1 Depth=1 b LBB0_9 LBB0_9: ; in Loop: Header=BB0_1 Depth=1 ldur w8, [x29, #-28] add w8, w8, #1 stur w8, [x29, #-28] b LBB0_1 LBB0_10: ldur w8, [x29, #-12] ldur w9, [x29, #-12] mul w8, w8, w9 str w8, [sp, #20] ldr w8, [sp, #28] subs w8, w8, #0 cset w8, le tbnz w8, #0, LBB0_13 b LBB0_11 LBB0_11: ldur x8, [x29, #-8] ldr w9, [sp, #28] subs w9, w9, #1 ldr x8, [x8, w9, sxtw #3] ldrsw x9, [sp, #24] ldr w8, [x8, x9, lsl #2] ldr w9, [sp, #20] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_13 b LBB0_12 LBB0_12: ldur x8, [x29, #-8] ldr w9, [sp, #28] subs w9, w9, #1 ldr x8, [x8, w9, sxtw #3] ldrsw x9, [sp, #24] ldr w8, [x8, x9, lsl #2] str w8, [sp, #20] b LBB0_13 LBB0_13: ldr w8, [sp, #28] ldur w9, [x29, #-12] subs w9, w9, #1 subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_16 b LBB0_14 LBB0_14: ldur x8, [x29, #-8] ldr w9, [sp, #28] add w9, w9, #1 ldr x8, [x8, w9, sxtw #3] ldrsw x9, [sp, #24] ldr w8, [x8, x9, lsl #2] ldr w9, [sp, #20] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_16 b LBB0_15 LBB0_15: ldur x8, [x29, #-8] ldr w9, [sp, #28] add w9, w9, #1 ldr x8, [x8, w9, sxtw #3] ldrsw x9, [sp, #24] ldr w8, [x8, x9, lsl #2] str w8, [sp, #20] b LBB0_16 LBB0_16: ldr w8, [sp, #24] subs w8, w8, #0 cset w8, le tbnz w8, #0, LBB0_19 b LBB0_17 LBB0_17: ldur x8, [x29, #-8] ldrsw x9, [sp, #28] ldr x8, [x8, x9, lsl #3] ldr w9, [sp, #24] subs w9, w9, #1 ldr w8, [x8, w9, sxtw #2] ldr w9, [sp, #20] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_19 b LBB0_18 LBB0_18: ldur x8, [x29, #-8] ldrsw x9, [sp, #28] ldr x8, [x8, x9, lsl #3] ldr w9, [sp, #24] subs w9, w9, #1 ldr w8, [x8, w9, sxtw #2] str w8, [sp, #20] b LBB0_19 LBB0_19: ldr w8, [sp, #24] ldur w9, [x29, #-12] subs w9, w9, #1 subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_22 b LBB0_20 LBB0_20: ldur x8, [x29, #-8] ldrsw x9, [sp, #28] ldr x8, [x8, x9, lsl #3] ldr w9, [sp, #24] add w9, w9, #1 ldr w8, [x8, w9, sxtw #2] ldr w9, [sp, #20] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_22 b LBB0_21 LBB0_21: ldur x8, [x29, #-8] ldrsw x9, [sp, #28] ldr x8, [x8, x9, lsl #3] ldr w9, [sp, #24] add w9, w9, #1 ldr w8, [x8, w9, sxtw #2] str w8, [sp, #20] b LBB0_22 LBB0_22: ldur w8, [x29, #-16] ldur x9, [x29, #-24] str w8, [x9] ldursw x8, [x29, #-16] lsl x0, x8, #2 bl _malloc str x0, [sp, #8] stur wzr, [x29, #-28] b LBB0_23 LBB0_23: ; =>This Inner Loop Header: Depth=1 ldur w8, [x29, #-28] ldur w9, [x29, #-16] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_29 b LBB0_24 LBB0_24: ; in Loop: Header=BB0_23 Depth=1 ldur w8, [x29, #-28] mov w10, #2 sdiv w9, w8, w10 mul w9, w9, w10 subs w8, w8, w9 subs w8, w8, #0 cset w8, ne tbnz w8, #0, LBB0_26 b LBB0_25 LBB0_25: ; in Loop: Header=BB0_23 Depth=1 ldr x9, [sp, #8] ldursw x10, [x29, #-28] mov w8, #1 str w8, [x9, x10, lsl #2] b LBB0_27 LBB0_26: ; in Loop: Header=BB0_23 Depth=1 ldr w8, [sp, #20] ldr x9, [sp, #8] ldursw x10, [x29, #-28] str w8, [x9, x10, lsl #2] b LBB0_27 LBB0_27: ; in Loop: Header=BB0_23 Depth=1 b LBB0_28 LBB0_28: ; in Loop: Header=BB0_23 Depth=1 ldur w8, [x29, #-28] add w8, w8, #1 stur w8, [x29, #-28] b LBB0_23 LBB0_29: ldr x0, [sp, #8] ldp x29, x30, [sp, #64] ; 16-byte Folded Reload add sp, sp, #80 ret .cfi_endproc ; -- End function .subsections_via_symbols
eval/problem130/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ## -- Begin function func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp subq $32, %rsp movl %edi, -12(%rbp) movl -12(%rbp), %eax addl $1, %eax movslq %eax, %rdi shlq $2, %rdi callq _malloc movq %rax, -24(%rbp) movq -24(%rbp), %rax movl $1, (%rax) cmpl $0, -12(%rbp) jne LBB0_2 ## %bb.1: movq -24(%rbp), %rax movq %rax, -8(%rbp) jmp LBB0_10 LBB0_2: movq -24(%rbp), %rax movl $3, 4(%rax) movl $2, -28(%rbp) LBB0_3: ## =>This Inner Loop Header: Depth=1 movl -28(%rbp), %eax cmpl -12(%rbp), %eax jg LBB0_9 ## %bb.4: ## in Loop: Header=BB0_3 Depth=1 movl -28(%rbp), %eax movl $2, %ecx cltd idivl %ecx cmpl $0, %edx jne LBB0_6 ## %bb.5: ## in Loop: Header=BB0_3 Depth=1 movl -28(%rbp), %eax movl $2, %ecx cltd idivl %ecx movl %eax, %edx addl $1, %edx movq -24(%rbp), %rax movslq -28(%rbp), %rcx movl %edx, (%rax,%rcx,4) jmp LBB0_7 LBB0_6: ## in Loop: Header=BB0_3 Depth=1 movq -24(%rbp), %rax movl -28(%rbp), %ecx subl $1, %ecx movslq %ecx, %rcx movl (%rax,%rcx,4), %eax movq -24(%rbp), %rcx movl -28(%rbp), %edx subl $2, %edx movslq %edx, %rdx addl (%rcx,%rdx,4), %eax addl $1, %eax movl %eax, -32(%rbp) ## 4-byte Spill movl -28(%rbp), %eax addl $1, %eax movl $2, %ecx cltd idivl %ecx movl -32(%rbp), %edx ## 4-byte Reload addl %eax, %edx movq -24(%rbp), %rax movslq -28(%rbp), %rcx movl %edx, (%rax,%rcx,4) LBB0_7: ## in Loop: Header=BB0_3 Depth=1 jmp LBB0_8 LBB0_8: ## in Loop: Header=BB0_3 Depth=1 movl -28(%rbp), %eax addl $1, %eax movl %eax, -28(%rbp) jmp LBB0_3 LBB0_9: movq -24(%rbp), %rax movq %rax, -8(%rbp) LBB0_10: movq -8(%rbp), %rax addq $32, %rsp popq %rbp retq .cfi_endproc ## -- End function .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #48 .cfi_def_cfa_offset 48 stp x29, x30, [sp, #32] ; 16-byte Folded Spill add x29, sp, #32 .cfi_def_cfa w29, 16 .cfi_offset w30, -8 .cfi_offset w29, -16 stur w0, [x29, #-12] ldur w8, [x29, #-12] mov w9, #1 str w9, [sp] ; 4-byte Folded Spill add w9, w8, #1 ; implicit-def: $x8 mov x8, x9 sxtw x8, w8 lsl x0, x8, #2 bl _malloc ldr w8, [sp] ; 4-byte Folded Reload str x0, [sp, #8] ldr x9, [sp, #8] str w8, [x9] ldur w8, [x29, #-12] subs w8, w8, #0 cset w8, ne tbnz w8, #0, LBB0_2 b LBB0_1 LBB0_1: ldr x8, [sp, #8] stur x8, [x29, #-8] b LBB0_10 LBB0_2: ldr x9, [sp, #8] mov w8, #3 str w8, [x9, #4] mov w8, #2 str w8, [sp, #4] b LBB0_3 LBB0_3: ; =>This Inner Loop Header: Depth=1 ldr w8, [sp, #4] ldur w9, [x29, #-12] subs w8, w8, w9 cset w8, gt tbnz w8, #0, LBB0_9 b LBB0_4 LBB0_4: ; in Loop: Header=BB0_3 Depth=1 ldr w8, [sp, #4] mov w10, #2 sdiv w9, w8, w10 mul w9, w9, w10 subs w8, w8, w9 subs w8, w8, #0 cset w8, ne tbnz w8, #0, LBB0_6 b LBB0_5 LBB0_5: ; in Loop: Header=BB0_3 Depth=1 ldr w8, [sp, #4] mov w9, #2 sdiv w8, w8, w9 add w8, w8, #1 ldr x9, [sp, #8] ldrsw x10, [sp, #4] str w8, [x9, x10, lsl #2] b LBB0_7 LBB0_6: ; in Loop: Header=BB0_3 Depth=1 ldr x8, [sp, #8] ldr w9, [sp, #4] subs w9, w9, #1 ldr w8, [x8, w9, sxtw #2] ldr x9, [sp, #8] ldr w11, [sp, #4] mov w10, #2 subs w11, w11, #2 ldr w9, [x9, w11, sxtw #2] add w8, w8, w9 add w8, w8, #1 ldr w9, [sp, #4] add w9, w9, #1 sdiv w9, w9, w10 add w8, w8, w9 ldr x9, [sp, #8] ldrsw x10, [sp, #4] str w8, [x9, x10, lsl #2] b LBB0_7 LBB0_7: ; in Loop: Header=BB0_3 Depth=1 b LBB0_8 LBB0_8: ; in Loop: Header=BB0_3 Depth=1 ldr w8, [sp, #4] add w8, w8, #1 str w8, [sp, #4] b LBB0_3 LBB0_9: ldr x8, [sp, #8] stur x8, [x29, #-8] b LBB0_10 LBB0_10: ldur x0, [x29, #-8] ldp x29, x30, [sp, #32] ; 16-byte Folded Reload add sp, sp, #48 ret .cfi_endproc ; -- End function .subsections_via_symbols
eval/problem131/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ## -- Begin function func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp movl %edi, -4(%rbp) movl $1, -8(%rbp) movl $0, -12(%rbp) LBB0_1: ## =>This Inner Loop Header: Depth=1 cmpl $0, -4(%rbp) jle LBB0_5 ## %bb.2: ## in Loop: Header=BB0_1 Depth=1 movl -4(%rbp), %eax movl $10, %ecx cltd idivl %ecx movl %edx, -16(%rbp) movl -16(%rbp), %eax movl $2, %ecx cltd idivl %ecx cmpl $1, %edx jne LBB0_4 ## %bb.3: ## in Loop: Header=BB0_1 Depth=1 movl $1, -12(%rbp) movl -16(%rbp), %eax imull -8(%rbp), %eax movl %eax, -8(%rbp) LBB0_4: ## in Loop: Header=BB0_1 Depth=1 movl -4(%rbp), %eax movl $10, %ecx cltd idivl %ecx movl %eax, -4(%rbp) jmp LBB0_1 LBB0_5: cmpl $0, -12(%rbp) je LBB0_7 ## %bb.6: movl -8(%rbp), %eax movl %eax, -20(%rbp) ## 4-byte Spill jmp LBB0_8 LBB0_7: xorl %eax, %eax movl %eax, -20(%rbp) ## 4-byte Spill jmp LBB0_8 LBB0_8: movl -20(%rbp), %eax ## 4-byte Reload popq %rbp retq .cfi_endproc ## -- End function .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #32 .cfi_def_cfa_offset 32 str w0, [sp, #28] mov w8, #1 str w8, [sp, #24] str wzr, [sp, #20] b LBB0_1 LBB0_1: ; =>This Inner Loop Header: Depth=1 ldr w8, [sp, #28] subs w8, w8, #0 cset w8, le tbnz w8, #0, LBB0_5 b LBB0_2 LBB0_2: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #28] mov w10, #10 sdiv w9, w8, w10 mul w9, w9, w10 subs w8, w8, w9 str w8, [sp, #16] ldr w8, [sp, #16] mov w10, #2 sdiv w9, w8, w10 mul w9, w9, w10 subs w8, w8, w9 subs w8, w8, #1 cset w8, ne tbnz w8, #0, LBB0_4 b LBB0_3 LBB0_3: ; in Loop: Header=BB0_1 Depth=1 mov w8, #1 str w8, [sp, #20] ldr w9, [sp, #16] ldr w8, [sp, #24] mul w8, w8, w9 str w8, [sp, #24] b LBB0_4 LBB0_4: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #28] mov w9, #10 sdiv w8, w8, w9 str w8, [sp, #28] b LBB0_1 LBB0_5: ldr w8, [sp, #20] subs w8, w8, #0 cset w8, eq tbnz w8, #0, LBB0_7 b LBB0_6 LBB0_6: ldr w8, [sp, #24] str w8, [sp, #12] ; 4-byte Folded Spill b LBB0_8 LBB0_7: mov w8, #0 str w8, [sp, #12] ; 4-byte Folded Spill b LBB0_8 LBB0_8: ldr w0, [sp, #12] ; 4-byte Folded Reload add sp, sp, #32 ret .cfi_endproc ; -- End function .subsections_via_symbols
eval/problem132/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ## -- Begin function func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp subq $48, %rsp movq %rdi, -16(%rbp) movl $0, -20(%rbp) movl $0, -24(%rbp) movl $0, -28(%rbp) LBB0_1: ## =>This Inner Loop Header: Depth=1 movslq -28(%rbp), %rax movq %rax, -40(%rbp) ## 8-byte Spill movq -16(%rbp), %rdi callq _strlen movq %rax, %rcx movq -40(%rbp), %rax ## 8-byte Reload cmpq %rcx, %rax jae LBB0_14 ## %bb.2: ## in Loop: Header=BB0_1 Depth=1 movq -16(%rbp), %rax movslq -28(%rbp), %rcx movsbl (%rax,%rcx), %eax cmpl $91, %eax jne LBB0_4 ## %bb.3: ## in Loop: Header=BB0_1 Depth=1 movl -20(%rbp), %eax addl $1, %eax movl %eax, -20(%rbp) LBB0_4: ## in Loop: Header=BB0_1 Depth=1 movq -16(%rbp), %rax movslq -28(%rbp), %rcx movsbl (%rax,%rcx), %eax cmpl $93, %eax jne LBB0_6 ## %bb.5: ## in Loop: Header=BB0_1 Depth=1 movl -20(%rbp), %eax subl $1, %eax movl %eax, -20(%rbp) LBB0_6: ## in Loop: Header=BB0_1 Depth=1 cmpl $0, -20(%rbp) jge LBB0_8 ## %bb.7: ## in Loop: Header=BB0_1 Depth=1 movl $0, -20(%rbp) LBB0_8: ## in Loop: Header=BB0_1 Depth=1 movl -20(%rbp), %eax cmpl -24(%rbp), %eax jle LBB0_10 ## %bb.9: ## in Loop: Header=BB0_1 Depth=1 movl -20(%rbp), %eax movl %eax, -24(%rbp) LBB0_10: ## in Loop: Header=BB0_1 Depth=1 movl -20(%rbp), %eax movl -24(%rbp), %ecx subl $2, %ecx cmpl %ecx, %eax jg LBB0_12 ## %bb.11: movl $1, -4(%rbp) jmp LBB0_15 LBB0_12: ## in Loop: Header=BB0_1 Depth=1 jmp LBB0_13 LBB0_13: ## in Loop: Header=BB0_1 Depth=1 movl -28(%rbp), %eax addl $1, %eax movl %eax, -28(%rbp) jmp LBB0_1 LBB0_14: movl $0, -4(%rbp) LBB0_15: movl -4(%rbp), %eax addq $48, %rsp popq %rbp retq .cfi_endproc ## -- End function .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #64 .cfi_def_cfa_offset 64 stp x29, x30, [sp, #48] ; 16-byte Folded Spill add x29, sp, #48 .cfi_def_cfa w29, 16 .cfi_offset w30, -8 .cfi_offset w29, -16 stur x0, [x29, #-16] stur wzr, [x29, #-20] str wzr, [sp, #24] str wzr, [sp, #20] b LBB0_1 LBB0_1: ; =>This Inner Loop Header: Depth=1 ldrsw x8, [sp, #20] str x8, [sp, #8] ; 8-byte Folded Spill ldur x0, [x29, #-16] bl _strlen ldr x8, [sp, #8] ; 8-byte Folded Reload subs x8, x8, x0 cset w8, hs tbnz w8, #0, LBB0_14 b LBB0_2 LBB0_2: ; in Loop: Header=BB0_1 Depth=1 ldur x8, [x29, #-16] ldrsw x9, [sp, #20] ldrsb w8, [x8, x9] subs w8, w8, #91 cset w8, ne tbnz w8, #0, LBB0_4 b LBB0_3 LBB0_3: ; in Loop: Header=BB0_1 Depth=1 ldur w8, [x29, #-20] add w8, w8, #1 stur w8, [x29, #-20] b LBB0_4 LBB0_4: ; in Loop: Header=BB0_1 Depth=1 ldur x8, [x29, #-16] ldrsw x9, [sp, #20] ldrsb w8, [x8, x9] subs w8, w8, #93 cset w8, ne tbnz w8, #0, LBB0_6 b LBB0_5 LBB0_5: ; in Loop: Header=BB0_1 Depth=1 ldur w8, [x29, #-20] subs w8, w8, #1 stur w8, [x29, #-20] b LBB0_6 LBB0_6: ; in Loop: Header=BB0_1 Depth=1 ldur w8, [x29, #-20] subs w8, w8, #0 cset w8, ge tbnz w8, #0, LBB0_8 b LBB0_7 LBB0_7: ; in Loop: Header=BB0_1 Depth=1 stur wzr, [x29, #-20] b LBB0_8 LBB0_8: ; in Loop: Header=BB0_1 Depth=1 ldur w8, [x29, #-20] ldr w9, [sp, #24] subs w8, w8, w9 cset w8, le tbnz w8, #0, LBB0_10 b LBB0_9 LBB0_9: ; in Loop: Header=BB0_1 Depth=1 ldur w8, [x29, #-20] str w8, [sp, #24] b LBB0_10 LBB0_10: ; in Loop: Header=BB0_1 Depth=1 ldur w8, [x29, #-20] ldr w9, [sp, #24] subs w9, w9, #2 subs w8, w8, w9 cset w8, gt tbnz w8, #0, LBB0_12 b LBB0_11 LBB0_11: mov w8, #1 stur w8, [x29, #-4] b LBB0_15 LBB0_12: ; in Loop: Header=BB0_1 Depth=1 b LBB0_13 LBB0_13: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #20] add w8, w8, #1 str w8, [sp, #20] b LBB0_1 LBB0_14: stur wzr, [x29, #-4] b LBB0_15 LBB0_15: ldur w0, [x29, #-4] ldp x29, x30, [sp, #48] ; 16-byte Folded Reload add sp, sp, #64 ret .cfi_endproc ; -- End function .subsections_via_symbols
eval/problem133/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ## -- Begin function func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp movq %rdi, -8(%rbp) movl %esi, -12(%rbp) movl $0, -16(%rbp) movl $0, -20(%rbp) LBB0_1: ## =>This Inner Loop Header: Depth=1 movl -20(%rbp), %eax cmpl -12(%rbp), %eax jge LBB0_4 ## %bb.2: ## in Loop: Header=BB0_1 Depth=1 movq -8(%rbp), %rax movslq -20(%rbp), %rcx movss (%rax,%rcx,4), %xmm0 ## xmm0 = mem[0],zero,zero,zero cvtss2sd %xmm0, %xmm0 roundsd $10, %xmm0, %xmm0 cvttsd2si %xmm0, %eax movq -8(%rbp), %rcx movslq -20(%rbp), %rdx movss (%rcx,%rdx,4), %xmm0 ## xmm0 = mem[0],zero,zero,zero cvtss2sd %xmm0, %xmm0 roundsd $10, %xmm0, %xmm0 cvttsd2si %xmm0, %ecx imull %ecx, %eax addl -16(%rbp), %eax movl %eax, -16(%rbp) ## %bb.3: ## in Loop: Header=BB0_1 Depth=1 movl -20(%rbp), %eax addl $1, %eax movl %eax, -20(%rbp) jmp LBB0_1 LBB0_4: movl -16(%rbp), %eax popq %rbp retq .cfi_endproc ## -- End function .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #32 .cfi_def_cfa_offset 32 str x0, [sp, #24] str w1, [sp, #20] str wzr, [sp, #16] str wzr, [sp, #12] b LBB0_1 LBB0_1: ; =>This Inner Loop Header: Depth=1 ldr w8, [sp, #12] ldr w9, [sp, #20] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_4 b LBB0_2 LBB0_2: ; in Loop: Header=BB0_1 Depth=1 ldr x8, [sp, #24] ldrsw x9, [sp, #12] ldr s0, [x8, x9, lsl #2] fcvt d0, s0 fcvtps w8, d0 ldr x9, [sp, #24] ldrsw x10, [sp, #12] ldr s0, [x9, x10, lsl #2] fcvt d0, s0 fcvtps w9, d0 mul w9, w8, w9 ldr w8, [sp, #16] add w8, w8, w9 str w8, [sp, #16] b LBB0_3 LBB0_3: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #12] add w8, w8, #1 str w8, [sp, #12] b LBB0_1 LBB0_4: ldr w0, [sp, #16] add sp, sp, #32 ret .cfi_endproc ; -- End function .subsections_via_symbols
eval/problem134/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ## -- Begin function func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp subq $32, %rsp movq %rdi, -16(%rbp) movq -16(%rbp), %rdi callq _strlen ## kill: def $eax killed $eax killed $rax movl %eax, -20(%rbp) cmpl $0, -20(%rbp) jne LBB0_2 ## %bb.1: movl $0, -4(%rbp) jmp LBB0_9 LBB0_2: movq -16(%rbp), %rax movl -20(%rbp), %ecx subl $1, %ecx movslq %ecx, %rcx movb (%rax,%rcx), %al movb %al, -21(%rbp) movzbl -21(%rbp), %edi callq _isalpha cmpl $0, %eax jne LBB0_4 ## %bb.3: movl $0, -4(%rbp) jmp LBB0_9 LBB0_4: cmpl $1, -20(%rbp) jne LBB0_6 ## %bb.5: movl $1, -4(%rbp) jmp LBB0_9 LBB0_6: movq -16(%rbp), %rax movl -20(%rbp), %ecx subl $2, %ecx movslq %ecx, %rcx movb (%rax,%rcx), %al movb %al, -22(%rbp) movzbl -22(%rbp), %edi callq _isalpha cmpl $0, %eax je LBB0_8 ## %bb.7: movl $0, -4(%rbp) jmp LBB0_9 LBB0_8: movl $1, -4(%rbp) LBB0_9: movl -4(%rbp), %eax addq $32, %rsp popq %rbp retq .cfi_endproc ## -- End function .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #48 .cfi_def_cfa_offset 48 stp x29, x30, [sp, #32] ; 16-byte Folded Spill add x29, sp, #32 .cfi_def_cfa w29, 16 .cfi_offset w30, -8 .cfi_offset w29, -16 str x0, [sp, #16] ldr x0, [sp, #16] bl _strlen mov x8, x0 str w8, [sp, #12] ldr w8, [sp, #12] subs w8, w8, #0 cset w8, ne tbnz w8, #0, LBB0_2 b LBB0_1 LBB0_1: stur wzr, [x29, #-4] b LBB0_9 LBB0_2: ldr x8, [sp, #16] ldr w9, [sp, #12] subs w9, w9, #1 add x8, x8, w9, sxtw ldrb w8, [x8] strb w8, [sp, #11] ldrb w0, [sp, #11] bl _isalpha subs w8, w0, #0 cset w8, ne tbnz w8, #0, LBB0_4 b LBB0_3 LBB0_3: stur wzr, [x29, #-4] b LBB0_9 LBB0_4: ldr w8, [sp, #12] subs w8, w8, #1 cset w8, ne tbnz w8, #0, LBB0_6 b LBB0_5 LBB0_5: mov w8, #1 stur w8, [x29, #-4] b LBB0_9 LBB0_6: ldr x8, [sp, #16] ldr w9, [sp, #12] subs w9, w9, #2 add x8, x8, w9, sxtw ldrb w8, [x8] strb w8, [sp, #10] ldrb w0, [sp, #10] bl _isalpha subs w8, w0, #0 cset w8, eq tbnz w8, #0, LBB0_8 b LBB0_7 LBB0_7: stur wzr, [x29, #-4] b LBB0_9 LBB0_8: mov w8, #1 stur w8, [x29, #-4] b LBB0_9 LBB0_9: ldur w0, [x29, #-4] ldp x29, x30, [sp, #32] ; 16-byte Folded Reload add sp, sp, #48 ret .cfi_endproc ; -- End function .subsections_via_symbols
eval/problem135/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ## -- Begin function func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp movq %rdi, -8(%rbp) movl %esi, -12(%rbp) movl $-1, -16(%rbp) movl $1, -20(%rbp) LBB0_1: ## =>This Inner Loop Header: Depth=1 movl -20(%rbp), %eax cmpl -12(%rbp), %eax jge LBB0_6 ## %bb.2: ## in Loop: Header=BB0_1 Depth=1 movq -8(%rbp), %rax movslq -20(%rbp), %rcx movl (%rax,%rcx,4), %eax movq -8(%rbp), %rcx movl -20(%rbp), %edx subl $1, %edx movslq %edx, %rdx cmpl (%rcx,%rdx,4), %eax jge LBB0_4 ## %bb.3: ## in Loop: Header=BB0_1 Depth=1 movl -20(%rbp), %eax movl %eax, -16(%rbp) LBB0_4: ## in Loop: Header=BB0_1 Depth=1 jmp LBB0_5 LBB0_5: ## in Loop: Header=BB0_1 Depth=1 movl -20(%rbp), %eax addl $1, %eax movl %eax, -20(%rbp) jmp LBB0_1 LBB0_6: movl -16(%rbp), %eax popq %rbp retq .cfi_endproc ## -- End function .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #32 .cfi_def_cfa_offset 32 str x0, [sp, #24] str w1, [sp, #20] mov w8, #-1 str w8, [sp, #16] mov w8, #1 str w8, [sp, #12] b LBB0_1 LBB0_1: ; =>This Inner Loop Header: Depth=1 ldr w8, [sp, #12] ldr w9, [sp, #20] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_6 b LBB0_2 LBB0_2: ; in Loop: Header=BB0_1 Depth=1 ldr x8, [sp, #24] ldrsw x9, [sp, #12] ldr w8, [x8, x9, lsl #2] ldr x9, [sp, #24] ldr w10, [sp, #12] subs w10, w10, #1 ldr w9, [x9, w10, sxtw #2] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_4 b LBB0_3 LBB0_3: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #12] str w8, [sp, #16] b LBB0_4 LBB0_4: ; in Loop: Header=BB0_1 Depth=1 b LBB0_5 LBB0_5: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #12] add w8, w8, #1 str w8, [sp, #12] b LBB0_1 LBB0_6: ldr w0, [sp, #16] add sp, sp, #32 ret .cfi_endproc ; -- End function .subsections_via_symbols
eval/problem136/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ## -- Begin function func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp movq %rdi, -8(%rbp) movl %esi, -12(%rbp) movq %rdx, -24(%rbp) movl $0, -28(%rbp) movl $0, -32(%rbp) movl $0, -36(%rbp) LBB0_1: ## =>This Inner Loop Header: Depth=1 movl -36(%rbp), %eax cmpl -12(%rbp), %eax jge LBB0_12 ## %bb.2: ## in Loop: Header=BB0_1 Depth=1 movq -8(%rbp), %rax movslq -36(%rbp), %rcx cmpl $0, (%rax,%rcx,4) jge LBB0_6 ## %bb.3: ## in Loop: Header=BB0_1 Depth=1 cmpl $0, -28(%rbp) je LBB0_5 ## %bb.4: ## in Loop: Header=BB0_1 Depth=1 movq -8(%rbp), %rax movslq -36(%rbp), %rcx movl (%rax,%rcx,4), %eax cmpl -28(%rbp), %eax jle LBB0_6 LBB0_5: ## in Loop: Header=BB0_1 Depth=1 movq -8(%rbp), %rax movslq -36(%rbp), %rcx movl (%rax,%rcx,4), %eax movl %eax, -28(%rbp) LBB0_6: ## in Loop: Header=BB0_1 Depth=1 movq -8(%rbp), %rax movslq -36(%rbp), %rcx cmpl $0, (%rax,%rcx,4) jle LBB0_10 ## %bb.7: ## in Loop: Header=BB0_1 Depth=1 cmpl $0, -32(%rbp) je LBB0_9 ## %bb.8: ## in Loop: Header=BB0_1 Depth=1 movq -8(%rbp), %rax movslq -36(%rbp), %rcx movl (%rax,%rcx,4), %eax cmpl -32(%rbp), %eax jge LBB0_10 LBB0_9: ## in Loop: Header=BB0_1 Depth=1 movq -8(%rbp), %rax movslq -36(%rbp), %rcx movl (%rax,%rcx,4), %eax movl %eax, -32(%rbp) LBB0_10: ## in Loop: Header=BB0_1 Depth=1 jmp LBB0_11 LBB0_11: ## in Loop: Header=BB0_1 Depth=1 movl -36(%rbp), %eax addl $1, %eax movl %eax, -36(%rbp) jmp LBB0_1 LBB0_12: movl -28(%rbp), %ecx movq -24(%rbp), %rax movl %ecx, (%rax) movl -32(%rbp), %ecx movq -24(%rbp), %rax movl %ecx, 4(%rax) popq %rbp retq .cfi_endproc ## -- End function .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #48 .cfi_def_cfa_offset 48 str x0, [sp, #40] str w1, [sp, #36] str x2, [sp, #24] str wzr, [sp, #20] str wzr, [sp, #16] str wzr, [sp, #12] b LBB0_1 LBB0_1: ; =>This Inner Loop Header: Depth=1 ldr w8, [sp, #12] ldr w9, [sp, #36] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_12 b LBB0_2 LBB0_2: ; in Loop: Header=BB0_1 Depth=1 ldr x8, [sp, #40] ldrsw x9, [sp, #12] ldr w8, [x8, x9, lsl #2] subs w8, w8, #0 cset w8, ge tbnz w8, #0, LBB0_6 b LBB0_3 LBB0_3: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #20] subs w8, w8, #0 cset w8, eq tbnz w8, #0, LBB0_5 b LBB0_4 LBB0_4: ; in Loop: Header=BB0_1 Depth=1 ldr x8, [sp, #40] ldrsw x9, [sp, #12] ldr w8, [x8, x9, lsl #2] ldr w9, [sp, #20] subs w8, w8, w9 cset w8, le tbnz w8, #0, LBB0_6 b LBB0_5 LBB0_5: ; in Loop: Header=BB0_1 Depth=1 ldr x8, [sp, #40] ldrsw x9, [sp, #12] ldr w8, [x8, x9, lsl #2] str w8, [sp, #20] b LBB0_6 LBB0_6: ; in Loop: Header=BB0_1 Depth=1 ldr x8, [sp, #40] ldrsw x9, [sp, #12] ldr w8, [x8, x9, lsl #2] subs w8, w8, #0 cset w8, le tbnz w8, #0, LBB0_10 b LBB0_7 LBB0_7: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #16] subs w8, w8, #0 cset w8, eq tbnz w8, #0, LBB0_9 b LBB0_8 LBB0_8: ; in Loop: Header=BB0_1 Depth=1 ldr x8, [sp, #40] ldrsw x9, [sp, #12] ldr w8, [x8, x9, lsl #2] ldr w9, [sp, #16] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_10 b LBB0_9 LBB0_9: ; in Loop: Header=BB0_1 Depth=1 ldr x8, [sp, #40] ldrsw x9, [sp, #12] ldr w8, [x8, x9, lsl #2] str w8, [sp, #16] b LBB0_10 LBB0_10: ; in Loop: Header=BB0_1 Depth=1 b LBB0_11 LBB0_11: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #12] add w8, w8, #1 str w8, [sp, #12] b LBB0_1 LBB0_12: ldr w8, [sp, #20] ldr x9, [sp, #24] str w8, [x9] ldr w8, [sp, #16] ldr x9, [sp, #24] str w8, [x9, #4] add sp, sp, #48 ret .cfi_endproc ; -- End function .subsections_via_symbols
eval/problem137/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ## -- Begin function func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp movl %edi, -8(%rbp) movl -8(%rbp), %eax movl $2, %ecx cltd idivl %ecx cmpl $0, %edx jne LBB0_3 ## %bb.1: cmpl $8, -8(%rbp) jl LBB0_3 ## %bb.2: movl $1, -4(%rbp) jmp LBB0_4 LBB0_3: movl $0, -4(%rbp) LBB0_4: movl -4(%rbp), %eax popq %rbp retq .cfi_endproc ## -- End function .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #16 .cfi_def_cfa_offset 16 str w0, [sp, #8] ldr w8, [sp, #8] mov w10, #2 sdiv w9, w8, w10 mul w9, w9, w10 subs w8, w8, w9 subs w8, w8, #0 cset w8, ne tbnz w8, #0, LBB0_3 b LBB0_1 LBB0_1: ldr w8, [sp, #8] subs w8, w8, #8 cset w8, lt tbnz w8, #0, LBB0_3 b LBB0_2 LBB0_2: mov w8, #1 str w8, [sp, #12] b LBB0_4 LBB0_3: str wzr, [sp, #12] b LBB0_4 LBB0_4: ldr w0, [sp, #12] add sp, sp, #16 ret .cfi_endproc ; -- End function .subsections_via_symbols
eval/problem138/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ## -- Begin function func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp movl %edi, -8(%rbp) movl -8(%rbp), %eax movl $2, %ecx cltd idivl %ecx cmpl $0, %edx jne LBB0_3 ## %bb.1: cmpl $8, -8(%rbp) jl LBB0_3 ## %bb.2: movl $1, -4(%rbp) jmp LBB0_4 LBB0_3: movl $0, -4(%rbp) LBB0_4: movl -4(%rbp), %eax popq %rbp retq .cfi_endproc ## -- End function .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #16 .cfi_def_cfa_offset 16 str w0, [sp, #8] ldr w8, [sp, #8] mov w10, #2 sdiv w9, w8, w10 mul w9, w9, w10 subs w8, w8, w9 subs w8, w8, #0 cset w8, ne tbnz w8, #0, LBB0_3 b LBB0_1 LBB0_1: ldr w8, [sp, #8] subs w8, w8, #8 cset w8, lt tbnz w8, #0, LBB0_3 b LBB0_2 LBB0_2: mov w8, #1 str w8, [sp, #12] b LBB0_4 LBB0_3: str wzr, [sp, #12] b LBB0_4 LBB0_4: ldr w0, [sp, #12] add sp, sp, #16 ret .cfi_endproc ; -- End function .subsections_via_symbols
eval/problem139/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ## -- Begin function func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp movl %edi, -4(%rbp) movl %esi, -8(%rbp) LBB0_1: ## =>This Inner Loop Header: Depth=1 cmpl $0, -8(%rbp) je LBB0_3 ## %bb.2: ## in Loop: Header=BB0_1 Depth=1 movl -4(%rbp), %eax cltd idivl -8(%rbp) movl %edx, -12(%rbp) movl -8(%rbp), %eax movl %eax, -4(%rbp) movl -12(%rbp), %eax movl %eax, -8(%rbp) jmp LBB0_1 LBB0_3: movl -4(%rbp), %eax popq %rbp retq .cfi_endproc ## -- End function .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #16 .cfi_def_cfa_offset 16 str w0, [sp, #12] str w1, [sp, #8] b LBB0_1 LBB0_1: ; =>This Inner Loop Header: Depth=1 ldr w8, [sp, #8] subs w8, w8, #0 cset w8, eq tbnz w8, #0, LBB0_3 b LBB0_2 LBB0_2: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #12] ldr w10, [sp, #8] sdiv w9, w8, w10 mul w9, w9, w10 subs w8, w8, w9 str w8, [sp, #4] ldr w8, [sp, #8] str w8, [sp, #12] ldr w8, [sp, #4] str w8, [sp, #8] b LBB0_1 LBB0_3: ldr w0, [sp, #12] add sp, sp, #16 ret .cfi_endproc ; -- End function .subsections_via_symbols
eval/problem14/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ## -- Begin function func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp movl %edi, -4(%rbp) movq $1, -16(%rbp) movq $1, -24(%rbp) movl $1, -28(%rbp) LBB0_1: ## =>This Inner Loop Header: Depth=1 movl -28(%rbp), %eax cmpl -4(%rbp), %eax jg LBB0_4 ## %bb.2: ## in Loop: Header=BB0_1 Depth=1 movq -16(%rbp), %rax movslq -28(%rbp), %rcx imulq %rcx, %rax movq %rax, -16(%rbp) movq -24(%rbp), %rax imulq -16(%rbp), %rax movq %rax, -24(%rbp) ## %bb.3: ## in Loop: Header=BB0_1 Depth=1 movl -28(%rbp), %eax addl $1, %eax movl %eax, -28(%rbp) jmp LBB0_1 LBB0_4: movq -24(%rbp), %rax popq %rbp retq .cfi_endproc ## -- End function .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #32 .cfi_def_cfa_offset 32 str w0, [sp, #28] mov x8, #1 str x8, [sp, #16] str x8, [sp, #8] mov w8, #1 str w8, [sp, #4] b LBB0_1 LBB0_1: ; =>This Inner Loop Header: Depth=1 ldr w8, [sp, #4] ldr w9, [sp, #28] subs w8, w8, w9 cset w8, gt tbnz w8, #0, LBB0_4 b LBB0_2 LBB0_2: ; in Loop: Header=BB0_1 Depth=1 ldr x8, [sp, #16] ldrsw x9, [sp, #4] mul x8, x8, x9 str x8, [sp, #16] ldr x8, [sp, #8] ldr x9, [sp, #16] mul x8, x8, x9 str x8, [sp, #8] b LBB0_3 LBB0_3: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #4] add w8, w8, #1 str w8, [sp, #4] b LBB0_1 LBB0_4: ldr x0, [sp, #8] add sp, sp, #32 ret .cfi_endproc ; -- End function .subsections_via_symbols
eval/problem140/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ## -- Begin function func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp subq $48, %rsp movq %rdi, -8(%rbp) movq %rsi, -16(%rbp) movl $0, -20(%rbp) movl $0, -24(%rbp) movl $0, -28(%rbp) LBB0_1: ## =>This Inner Loop Header: Depth=1 movslq -28(%rbp), %rax movq %rax, -40(%rbp) ## 8-byte Spill movq -8(%rbp), %rdi callq _strlen movq %rax, %rcx movq -40(%rbp), %rax ## 8-byte Reload cmpq %rcx, %rax jae LBB0_13 ## %bb.2: ## in Loop: Header=BB0_1 Depth=1 movq -8(%rbp), %rax movslq -28(%rbp), %rcx movsbl (%rax,%rcx), %eax cmpl $32, %eax jne LBB0_4 ## %bb.3: ## in Loop: Header=BB0_1 Depth=1 movl -20(%rbp), %eax addl $1, %eax movl %eax, -20(%rbp) jmp LBB0_11 LBB0_4: ## in Loop: Header=BB0_1 Depth=1 cmpl $1, -20(%rbp) jne LBB0_6 ## %bb.5: ## in Loop: Header=BB0_1 Depth=1 movq -16(%rbp), %rax movl -24(%rbp), %ecx movl %ecx, %edx addl $1, %edx movl %edx, -24(%rbp) movslq %ecx, %rcx movb $95, (%rax,%rcx) LBB0_6: ## in Loop: Header=BB0_1 Depth=1 cmpl $2, -20(%rbp) jne LBB0_8 ## %bb.7: ## in Loop: Header=BB0_1 Depth=1 movq -16(%rbp), %rax movl -24(%rbp), %ecx movl %ecx, %edx addl $1, %edx movl %edx, -24(%rbp) movslq %ecx, %rcx movb $95, (%rax,%rcx) movq -16(%rbp), %rax movl -24(%rbp), %ecx movl %ecx, %edx addl $1, %edx movl %edx, -24(%rbp) movslq %ecx, %rcx movb $95, (%rax,%rcx) LBB0_8: ## in Loop: Header=BB0_1 Depth=1 cmpl $2, -20(%rbp) jle LBB0_10 ## %bb.9: ## in Loop: Header=BB0_1 Depth=1 movq -16(%rbp), %rax movl -24(%rbp), %ecx movl %ecx, %edx addl $1, %edx movl %edx, -24(%rbp) movslq %ecx, %rcx movb $45, (%rax,%rcx) LBB0_10: ## in Loop: Header=BB0_1 Depth=1 movl $0, -20(%rbp) movq -8(%rbp), %rax movslq -28(%rbp), %rcx movb (%rax,%rcx), %dl movq -16(%rbp), %rax movl -24(%rbp), %ecx movl %ecx, %esi addl $1, %esi movl %esi, -24(%rbp) movslq %ecx, %rcx movb %dl, (%rax,%rcx) LBB0_11: ## in Loop: Header=BB0_1 Depth=1 jmp LBB0_12 LBB0_12: ## in Loop: Header=BB0_1 Depth=1 movl -28(%rbp), %eax addl $1, %eax movl %eax, -28(%rbp) jmp LBB0_1 LBB0_13: cmpl $1, -20(%rbp) jne LBB0_15 ## %bb.14: movq -16(%rbp), %rax movl -24(%rbp), %ecx movl %ecx, %edx addl $1, %edx movl %edx, -24(%rbp) movslq %ecx, %rcx movb $95, (%rax,%rcx) LBB0_15: cmpl $2, -20(%rbp) jne LBB0_17 ## %bb.16: movq -16(%rbp), %rax movl -24(%rbp), %ecx movl %ecx, %edx addl $1, %edx movl %edx, -24(%rbp) movslq %ecx, %rcx movb $95, (%rax,%rcx) movq -16(%rbp), %rax movl -24(%rbp), %ecx movl %ecx, %edx addl $1, %edx movl %edx, -24(%rbp) movslq %ecx, %rcx movb $95, (%rax,%rcx) LBB0_17: cmpl $2, -20(%rbp) jle LBB0_19 ## %bb.18: movq -16(%rbp), %rax movl -24(%rbp), %ecx movl %ecx, %edx addl $1, %edx movl %edx, -24(%rbp) movslq %ecx, %rcx movb $45, (%rax,%rcx) LBB0_19: movq -16(%rbp), %rax movslq -24(%rbp), %rcx movb $0, (%rax,%rcx) addq $48, %rsp popq %rbp retq .cfi_endproc ## -- End function .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #64 .cfi_def_cfa_offset 64 stp x29, x30, [sp, #48] ; 16-byte Folded Spill add x29, sp, #48 .cfi_def_cfa w29, 16 .cfi_offset w30, -8 .cfi_offset w29, -16 stur x0, [x29, #-8] stur x1, [x29, #-16] stur wzr, [x29, #-20] str wzr, [sp, #24] str wzr, [sp, #20] b LBB0_1 LBB0_1: ; =>This Inner Loop Header: Depth=1 ldrsw x8, [sp, #20] str x8, [sp, #8] ; 8-byte Folded Spill ldur x0, [x29, #-8] bl _strlen ldr x8, [sp, #8] ; 8-byte Folded Reload subs x8, x8, x0 cset w8, hs tbnz w8, #0, LBB0_13 b LBB0_2 LBB0_2: ; in Loop: Header=BB0_1 Depth=1 ldur x8, [x29, #-8] ldrsw x9, [sp, #20] ldrsb w8, [x8, x9] subs w8, w8, #32 cset w8, ne tbnz w8, #0, LBB0_4 b LBB0_3 LBB0_3: ; in Loop: Header=BB0_1 Depth=1 ldur w8, [x29, #-20] add w8, w8, #1 stur w8, [x29, #-20] b LBB0_11 LBB0_4: ; in Loop: Header=BB0_1 Depth=1 ldur w8, [x29, #-20] subs w8, w8, #1 cset w8, ne tbnz w8, #0, LBB0_6 b LBB0_5 LBB0_5: ; in Loop: Header=BB0_1 Depth=1 ldur x8, [x29, #-16] ldrsw x9, [sp, #24] mov x10, x9 add w10, w10, #1 str w10, [sp, #24] add x9, x8, x9 mov w8, #95 strb w8, [x9] b LBB0_6 LBB0_6: ; in Loop: Header=BB0_1 Depth=1 ldur w8, [x29, #-20] subs w8, w8, #2 cset w8, ne tbnz w8, #0, LBB0_8 b LBB0_7 LBB0_7: ; in Loop: Header=BB0_1 Depth=1 ldur x8, [x29, #-16] ldrsw x9, [sp, #24] mov x10, x9 add w10, w10, #1 str w10, [sp, #24] add x9, x8, x9 mov w8, #95 strb w8, [x9] ldur x9, [x29, #-16] ldrsw x10, [sp, #24] mov x11, x10 add w11, w11, #1 str w11, [sp, #24] add x9, x9, x10 strb w8, [x9] b LBB0_8 LBB0_8: ; in Loop: Header=BB0_1 Depth=1 ldur w8, [x29, #-20] subs w8, w8, #2 cset w8, le tbnz w8, #0, LBB0_10 b LBB0_9 LBB0_9: ; in Loop: Header=BB0_1 Depth=1 ldur x8, [x29, #-16] ldrsw x9, [sp, #24] mov x10, x9 add w10, w10, #1 str w10, [sp, #24] add x9, x8, x9 mov w8, #45 strb w8, [x9] b LBB0_10 LBB0_10: ; in Loop: Header=BB0_1 Depth=1 stur wzr, [x29, #-20] ldur x8, [x29, #-8] ldrsw x9, [sp, #20] add x8, x8, x9 ldrb w8, [x8] ldur x9, [x29, #-16] ldrsw x10, [sp, #24] mov x11, x10 add w11, w11, #1 str w11, [sp, #24] add x9, x9, x10 strb w8, [x9] b LBB0_11 LBB0_11: ; in Loop: Header=BB0_1 Depth=1 b LBB0_12 LBB0_12: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #20] add w8, w8, #1 str w8, [sp, #20] b LBB0_1 LBB0_13: ldur w8, [x29, #-20] subs w8, w8, #1 cset w8, ne tbnz w8, #0, LBB0_15 b LBB0_14 LBB0_14: ldur x8, [x29, #-16] ldrsw x9, [sp, #24] mov x10, x9 add w10, w10, #1 str w10, [sp, #24] add x9, x8, x9 mov w8, #95 strb w8, [x9] b LBB0_15 LBB0_15: ldur w8, [x29, #-20] subs w8, w8, #2 cset w8, ne tbnz w8, #0, LBB0_17 b LBB0_16 LBB0_16: ldur x8, [x29, #-16] ldrsw x9, [sp, #24] mov x10, x9 add w10, w10, #1 str w10, [sp, #24] add x9, x8, x9 mov w8, #95 strb w8, [x9] ldur x9, [x29, #-16] ldrsw x10, [sp, #24] mov x11, x10 add w11, w11, #1 str w11, [sp, #24] add x9, x9, x10 strb w8, [x9] b LBB0_17 LBB0_17: ldur w8, [x29, #-20] subs w8, w8, #2 cset w8, le tbnz w8, #0, LBB0_19 b LBB0_18 LBB0_18: ldur x8, [x29, #-16] ldrsw x9, [sp, #24] mov x10, x9 add w10, w10, #1 str w10, [sp, #24] add x9, x8, x9 mov w8, #45 strb w8, [x9] b LBB0_19 LBB0_19: ldur x8, [x29, #-16] ldrsw x9, [sp, #24] add x8, x8, x9 strb wzr, [x8] ldp x29, x30, [sp, #48] ; 16-byte Folded Reload add sp, sp, #64 ret .cfi_endproc ; -- End function .subsections_via_symbols
eval/problem141/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ## -- Begin function func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp subq $48, %rsp movq %rdi, -16(%rbp) movl $0, -20(%rbp) movl $0, -24(%rbp) movq -16(%rbp), %rdi callq _strlen ## kill: def $eax killed $eax killed $rax movl %eax, -28(%rbp) cmpl $5, -28(%rbp) jge LBB0_2 ## %bb.1: leaq L_.str(%rip), %rax movq %rax, -8(%rbp) jmp LBB0_24 LBB0_2: movq -16(%rbp), %rax movb (%rax), %al movb %al, -29(%rbp) movsbl -29(%rbp), %eax cmpl $65, %eax jl LBB0_6 ## %bb.3: movsbl -29(%rbp), %eax cmpl $90, %eax jle LBB0_5 ## %bb.4: movsbl -29(%rbp), %eax cmpl $97, %eax jl LBB0_6 LBB0_5: movsbl -29(%rbp), %eax cmpl $122, %eax jle LBB0_7 LBB0_6: leaq L_.str(%rip), %rax movq %rax, -8(%rbp) jmp LBB0_24 LBB0_7: movq -16(%rbp), %rax movslq -28(%rbp), %rcx addq %rcx, %rax addq $-4, %rax movq %rax, -40(%rbp) movq -40(%rbp), %rdi leaq L_.str.1(%rip), %rsi callq _strcmp cmpl $0, %eax je LBB0_11 ## %bb.8: movq -40(%rbp), %rdi leaq L_.str.2(%rip), %rsi callq _strcmp cmpl $0, %eax je LBB0_11 ## %bb.9: movq -40(%rbp), %rdi leaq L_.str.3(%rip), %rsi callq _strcmp cmpl $0, %eax je LBB0_11 ## %bb.10: leaq L_.str(%rip), %rax movq %rax, -8(%rbp) jmp LBB0_24 LBB0_11: movl $0, -44(%rbp) LBB0_12: ## =>This Inner Loop Header: Depth=1 movl -44(%rbp), %eax cmpl -28(%rbp), %eax jge LBB0_20 ## %bb.13: ## in Loop: Header=BB0_12 Depth=1 movq -16(%rbp), %rax movslq -44(%rbp), %rcx movsbl (%rax,%rcx), %eax cmpl $48, %eax jl LBB0_16 ## %bb.14: ## in Loop: Header=BB0_12 Depth=1 movq -16(%rbp), %rax movslq -44(%rbp), %rcx movsbl (%rax,%rcx), %eax cmpl $57, %eax jg LBB0_16 ## %bb.15: ## in Loop: Header=BB0_12 Depth=1 movl -20(%rbp), %eax addl $1, %eax movl %eax, -20(%rbp) LBB0_16: ## in Loop: Header=BB0_12 Depth=1 movq -16(%rbp), %rax movslq -44(%rbp), %rcx movsbl (%rax,%rcx), %eax cmpl $46, %eax jne LBB0_18 ## %bb.17: ## in Loop: Header=BB0_12 Depth=1 movl -24(%rbp), %eax addl $1, %eax movl %eax, -24(%rbp) LBB0_18: ## in Loop: Header=BB0_12 Depth=1 jmp LBB0_19 LBB0_19: ## in Loop: Header=BB0_12 Depth=1 movl -44(%rbp), %eax addl $1, %eax movl %eax, -44(%rbp) jmp LBB0_12 LBB0_20: cmpl $3, -20(%rbp) jg LBB0_22 ## %bb.21: cmpl $1, -24(%rbp) je LBB0_23 LBB0_22: leaq L_.str(%rip), %rax movq %rax, -8(%rbp) jmp LBB0_24 LBB0_23: leaq L_.str.4(%rip), %rax movq %rax, -8(%rbp) LBB0_24: movq -8(%rbp), %rax addq $48, %rsp popq %rbp retq .cfi_endproc ## -- End function .section __TEXT,__cstring,cstring_literals L_.str: ## @.str .asciz "No" L_.str.1: ## @.str.1 .asciz ".txt" L_.str.2: ## @.str.2 .asciz ".exe" L_.str.3: ## @.str.3 .asciz ".dll" L_.str.4: ## @.str.4 .asciz "Yes" .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #64 .cfi_def_cfa_offset 64 stp x29, x30, [sp, #48] ; 16-byte Folded Spill add x29, sp, #48 .cfi_def_cfa w29, 16 .cfi_offset w30, -8 .cfi_offset w29, -16 stur x0, [x29, #-16] stur wzr, [x29, #-20] str wzr, [sp, #24] ldur x0, [x29, #-16] bl _strlen mov x8, x0 str w8, [sp, #20] ldr w8, [sp, #20] subs w8, w8, #5 cset w8, ge tbnz w8, #0, LBB0_2 b LBB0_1 LBB0_1: adrp x8, l_.str@PAGE add x8, x8, l_.str@PAGEOFF stur x8, [x29, #-8] b LBB0_24 LBB0_2: ldur x8, [x29, #-16] ldrb w8, [x8] strb w8, [sp, #19] ldrsb w8, [sp, #19] subs w8, w8, #65 cset w8, lt tbnz w8, #0, LBB0_6 b LBB0_3 LBB0_3: ldrsb w8, [sp, #19] subs w8, w8, #90 cset w8, le tbnz w8, #0, LBB0_5 b LBB0_4 LBB0_4: ldrsb w8, [sp, #19] subs w8, w8, #97 cset w8, lt tbnz w8, #0, LBB0_6 b LBB0_5 LBB0_5: ldrsb w8, [sp, #19] subs w8, w8, #122 cset w8, le tbnz w8, #0, LBB0_7 b LBB0_6 LBB0_6: adrp x8, l_.str@PAGE add x8, x8, l_.str@PAGEOFF stur x8, [x29, #-8] b LBB0_24 LBB0_7: ldur x8, [x29, #-16] ldrsw x9, [sp, #20] add x8, x8, x9 subs x8, x8, #4 str x8, [sp, #8] ldr x0, [sp, #8] adrp x1, l_.str.1@PAGE add x1, x1, l_.str.1@PAGEOFF bl _strcmp subs w8, w0, #0 cset w8, eq tbnz w8, #0, LBB0_11 b LBB0_8 LBB0_8: ldr x0, [sp, #8] adrp x1, l_.str.2@PAGE add x1, x1, l_.str.2@PAGEOFF bl _strcmp subs w8, w0, #0 cset w8, eq tbnz w8, #0, LBB0_11 b LBB0_9 LBB0_9: ldr x0, [sp, #8] adrp x1, l_.str.3@PAGE add x1, x1, l_.str.3@PAGEOFF bl _strcmp subs w8, w0, #0 cset w8, eq tbnz w8, #0, LBB0_11 b LBB0_10 LBB0_10: adrp x8, l_.str@PAGE add x8, x8, l_.str@PAGEOFF stur x8, [x29, #-8] b LBB0_24 LBB0_11: str wzr, [sp, #4] b LBB0_12 LBB0_12: ; =>This Inner Loop Header: Depth=1 ldr w8, [sp, #4] ldr w9, [sp, #20] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_20 b LBB0_13 LBB0_13: ; in Loop: Header=BB0_12 Depth=1 ldur x8, [x29, #-16] ldrsw x9, [sp, #4] ldrsb w8, [x8, x9] subs w8, w8, #48 cset w8, lt tbnz w8, #0, LBB0_16 b LBB0_14 LBB0_14: ; in Loop: Header=BB0_12 Depth=1 ldur x8, [x29, #-16] ldrsw x9, [sp, #4] ldrsb w8, [x8, x9] subs w8, w8, #57 cset w8, gt tbnz w8, #0, LBB0_16 b LBB0_15 LBB0_15: ; in Loop: Header=BB0_12 Depth=1 ldur w8, [x29, #-20] add w8, w8, #1 stur w8, [x29, #-20] b LBB0_16 LBB0_16: ; in Loop: Header=BB0_12 Depth=1 ldur x8, [x29, #-16] ldrsw x9, [sp, #4] ldrsb w8, [x8, x9] subs w8, w8, #46 cset w8, ne tbnz w8, #0, LBB0_18 b LBB0_17 LBB0_17: ; in Loop: Header=BB0_12 Depth=1 ldr w8, [sp, #24] add w8, w8, #1 str w8, [sp, #24] b LBB0_18 LBB0_18: ; in Loop: Header=BB0_12 Depth=1 b LBB0_19 LBB0_19: ; in Loop: Header=BB0_12 Depth=1 ldr w8, [sp, #4] add w8, w8, #1 str w8, [sp, #4] b LBB0_12 LBB0_20: ldur w8, [x29, #-20] subs w8, w8, #3 cset w8, gt tbnz w8, #0, LBB0_22 b LBB0_21 LBB0_21: ldr w8, [sp, #24] subs w8, w8, #1 cset w8, eq tbnz w8, #0, LBB0_23 b LBB0_22 LBB0_22: adrp x8, l_.str@PAGE add x8, x8, l_.str@PAGEOFF stur x8, [x29, #-8] b LBB0_24 LBB0_23: adrp x8, l_.str.4@PAGE add x8, x8, l_.str.4@PAGEOFF stur x8, [x29, #-8] b LBB0_24 LBB0_24: ldur x0, [x29, #-8] ldp x29, x30, [sp, #48] ; 16-byte Folded Reload add sp, sp, #64 ret .cfi_endproc ; -- End function .section __TEXT,__cstring,cstring_literals l_.str: ; @.str .asciz "No" l_.str.1: ; @.str.1 .asciz ".txt" l_.str.2: ; @.str.2 .asciz ".exe" l_.str.3: ; @.str.3 .asciz ".dll" l_.str.4: ; @.str.4 .asciz "Yes" .subsections_via_symbols
eval/problem142/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ## -- Begin function func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp movq %rdi, -8(%rbp) movl %esi, -12(%rbp) movl $0, -16(%rbp) movl $0, -20(%rbp) LBB0_1: ## =>This Inner Loop Header: Depth=1 movl -20(%rbp), %eax cmpl -12(%rbp), %eax jge LBB0_10 ## %bb.2: ## in Loop: Header=BB0_1 Depth=1 movl -20(%rbp), %eax movl $3, %ecx cltd idivl %ecx cmpl $0, %edx jne LBB0_4 ## %bb.3: ## in Loop: Header=BB0_1 Depth=1 movq -8(%rbp), %rax movslq -20(%rbp), %rcx movl (%rax,%rcx,4), %eax movq -8(%rbp), %rcx movslq -20(%rbp), %rdx imull (%rcx,%rdx,4), %eax addl -16(%rbp), %eax movl %eax, -16(%rbp) jmp LBB0_8 LBB0_4: ## in Loop: Header=BB0_1 Depth=1 movl -20(%rbp), %eax movl $4, %ecx cltd idivl %ecx cmpl $0, %edx jne LBB0_6 ## %bb.5: ## in Loop: Header=BB0_1 Depth=1 movq -8(%rbp), %rax movslq -20(%rbp), %rcx movl (%rax,%rcx,4), %eax movq -8(%rbp), %rcx movslq -20(%rbp), %rdx imull (%rcx,%rdx,4), %eax movq -8(%rbp), %rcx movslq -20(%rbp), %rdx imull (%rcx,%rdx,4), %eax addl -16(%rbp), %eax movl %eax, -16(%rbp) jmp LBB0_7 LBB0_6: ## in Loop: Header=BB0_1 Depth=1 movq -8(%rbp), %rax movslq -20(%rbp), %rcx movl (%rax,%rcx,4), %eax addl -16(%rbp), %eax movl %eax, -16(%rbp) LBB0_7: ## in Loop: Header=BB0_1 Depth=1 jmp LBB0_8 LBB0_8: ## in Loop: Header=BB0_1 Depth=1 jmp LBB0_9 LBB0_9: ## in Loop: Header=BB0_1 Depth=1 movl -20(%rbp), %eax addl $1, %eax movl %eax, -20(%rbp) jmp LBB0_1 LBB0_10: movl -16(%rbp), %eax popq %rbp retq .cfi_endproc ## -- End function .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #32 .cfi_def_cfa_offset 32 str x0, [sp, #24] str w1, [sp, #20] str wzr, [sp, #16] str wzr, [sp, #12] b LBB0_1 LBB0_1: ; =>This Inner Loop Header: Depth=1 ldr w8, [sp, #12] ldr w9, [sp, #20] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_10 b LBB0_2 LBB0_2: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #12] mov w10, #3 sdiv w9, w8, w10 mul w9, w9, w10 subs w8, w8, w9 subs w8, w8, #0 cset w8, ne tbnz w8, #0, LBB0_4 b LBB0_3 LBB0_3: ; in Loop: Header=BB0_1 Depth=1 ldr x8, [sp, #24] ldrsw x9, [sp, #12] ldr w8, [x8, x9, lsl #2] ldr x9, [sp, #24] ldrsw x10, [sp, #12] ldr w9, [x9, x10, lsl #2] mul w9, w8, w9 ldr w8, [sp, #16] add w8, w8, w9 str w8, [sp, #16] b LBB0_8 LBB0_4: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #12] mov w10, #4 sdiv w9, w8, w10 mul w9, w9, w10 subs w8, w8, w9 subs w8, w8, #0 cset w8, ne tbnz w8, #0, LBB0_6 b LBB0_5 LBB0_5: ; in Loop: Header=BB0_1 Depth=1 ldr x8, [sp, #24] ldrsw x9, [sp, #12] ldr w8, [x8, x9, lsl #2] ldr x9, [sp, #24] ldrsw x10, [sp, #12] ldr w9, [x9, x10, lsl #2] mul w8, w8, w9 ldr x9, [sp, #24] ldrsw x10, [sp, #12] ldr w9, [x9, x10, lsl #2] mul w9, w8, w9 ldr w8, [sp, #16] add w8, w8, w9 str w8, [sp, #16] b LBB0_7 LBB0_6: ; in Loop: Header=BB0_1 Depth=1 ldr x8, [sp, #24] ldrsw x9, [sp, #12] ldr w9, [x8, x9, lsl #2] ldr w8, [sp, #16] add w8, w8, w9 str w8, [sp, #16] b LBB0_7 LBB0_7: ; in Loop: Header=BB0_1 Depth=1 b LBB0_8 LBB0_8: ; in Loop: Header=BB0_1 Depth=1 b LBB0_9 LBB0_9: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #12] add w8, w8, #1 str w8, [sp, #12] b LBB0_1 LBB0_10: ldr w0, [sp, #16] add sp, sp, #32 ret .cfi_endproc ; -- End function .subsections_via_symbols
eval/problem143/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ## -- Begin function func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp subq $48, %rsp movq %rdi, -8(%rbp) movq %rsi, -16(%rbp) movl $0, -20(%rbp) movl $0, -24(%rbp) movl $0, -28(%rbp) movl $0, -36(%rbp) LBB0_1: ## =>This Loop Header: Depth=1 ## Child Loop BB0_6 Depth 2 movq -8(%rbp), %rax movslq -36(%rbp), %rcx movsbl (%rax,%rcx), %eax cmpl $0, %eax je LBB0_20 ## %bb.2: ## in Loop: Header=BB0_1 Depth=1 movq -8(%rbp), %rax movslq -36(%rbp), %rcx movsbl (%rax,%rcx), %eax cmpl $32, %eax je LBB0_4 ## %bb.3: ## in Loop: Header=BB0_1 Depth=1 movl -24(%rbp), %eax addl $1, %eax movl %eax, -24(%rbp) jmp LBB0_18 LBB0_4: ## in Loop: Header=BB0_1 Depth=1 cmpl $1, -24(%rbp) jle LBB0_12 ## %bb.5: ## in Loop: Header=BB0_1 Depth=1 movb $1, -29(%rbp) movl $2, -40(%rbp) LBB0_6: ## Parent Loop BB0_1 Depth=1 ## => This Inner Loop Header: Depth=2 movl -40(%rbp), %eax imull -40(%rbp), %eax cmpl -24(%rbp), %eax jg LBB0_11 ## %bb.7: ## in Loop: Header=BB0_6 Depth=2 movl -24(%rbp), %eax cltd idivl -40(%rbp) cmpl $0, %edx jne LBB0_9 ## %bb.8: ## in Loop: Header=BB0_1 Depth=1 movb $0, -29(%rbp) jmp LBB0_11 LBB0_9: ## in Loop: Header=BB0_6 Depth=2 jmp LBB0_10 LBB0_10: ## in Loop: Header=BB0_6 Depth=2 movl -40(%rbp), %eax addl $1, %eax movl %eax, -40(%rbp) jmp LBB0_6 LBB0_11: ## in Loop: Header=BB0_1 Depth=1 jmp LBB0_13 LBB0_12: ## in Loop: Header=BB0_1 Depth=1 movb $0, -29(%rbp) LBB0_13: ## in Loop: Header=BB0_1 Depth=1 testb $1, -29(%rbp) je LBB0_17 ## %bb.14: ## in Loop: Header=BB0_1 Depth=1 cmpl $0, -28(%rbp) jle LBB0_16 ## %bb.15: ## in Loop: Header=BB0_1 Depth=1 movq -16(%rbp), %rax movl -28(%rbp), %ecx movl %ecx, %edx addl $1, %edx movl %edx, -28(%rbp) movslq %ecx, %rcx movb $32, (%rax,%rcx) LBB0_16: ## in Loop: Header=BB0_1 Depth=1 movq -16(%rbp), %rdi movslq -28(%rbp), %rax addq %rax, %rdi movq -8(%rbp), %rsi movslq -36(%rbp), %rax addq %rax, %rsi movslq -24(%rbp), %rcx xorl %eax, %eax ## kill: def $rax killed $eax subq %rcx, %rax addq %rax, %rsi movslq -24(%rbp), %rdx movq $-1, %rcx callq ___memcpy_chk movl -24(%rbp), %eax addl -28(%rbp), %eax movl %eax, -28(%rbp) LBB0_17: ## in Loop: Header=BB0_1 Depth=1 movl $0, -24(%rbp) LBB0_18: ## in Loop: Header=BB0_1 Depth=1 jmp LBB0_19 LBB0_19: ## in Loop: Header=BB0_1 Depth=1 movl -36(%rbp), %eax addl $1, %eax movl %eax, -36(%rbp) jmp LBB0_1 LBB0_20: cmpl $1, -24(%rbp) jle LBB0_28 ## %bb.21: movb $1, -29(%rbp) movl $2, -40(%rbp) LBB0_22: ## =>This Inner Loop Header: Depth=1 movl -40(%rbp), %eax imull -40(%rbp), %eax cmpl -24(%rbp), %eax jg LBB0_27 ## %bb.23: ## in Loop: Header=BB0_22 Depth=1 movl -24(%rbp), %eax cltd idivl -40(%rbp) cmpl $0, %edx jne LBB0_25 ## %bb.24: movb $0, -29(%rbp) jmp LBB0_27 LBB0_25: ## in Loop: Header=BB0_22 Depth=1 jmp LBB0_26 LBB0_26: ## in Loop: Header=BB0_22 Depth=1 movl -40(%rbp), %eax addl $1, %eax movl %eax, -40(%rbp) jmp LBB0_22 LBB0_27: jmp LBB0_29 LBB0_28: movb $0, -29(%rbp) LBB0_29: testb $1, -29(%rbp) je LBB0_33 ## %bb.30: cmpl $0, -28(%rbp) jle LBB0_32 ## %bb.31: movq -16(%rbp), %rax movl -28(%rbp), %ecx movl %ecx, %edx addl $1, %edx movl %edx, -28(%rbp) movslq %ecx, %rcx movb $32, (%rax,%rcx) LBB0_32: movq -16(%rbp), %rdi movslq -28(%rbp), %rax addq %rax, %rdi movq -8(%rbp), %rsi movslq -36(%rbp), %rax addq %rax, %rsi movslq -24(%rbp), %rcx xorl %eax, %eax ## kill: def $rax killed $eax subq %rcx, %rax addq %rax, %rsi movslq -24(%rbp), %rdx movq $-1, %rcx callq ___memcpy_chk movl -24(%rbp), %eax addl -28(%rbp), %eax movl %eax, -28(%rbp) LBB0_33: movq -16(%rbp), %rax movslq -28(%rbp), %rcx movb $0, (%rax,%rcx) addq $48, %rsp popq %rbp retq .cfi_endproc ## -- End function .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #64 .cfi_def_cfa_offset 64 stp x29, x30, [sp, #48] ; 16-byte Folded Spill add x29, sp, #48 .cfi_def_cfa w29, 16 .cfi_offset w30, -8 .cfi_offset w29, -16 stur x0, [x29, #-8] stur x1, [x29, #-16] stur wzr, [x29, #-20] str wzr, [sp, #24] str wzr, [sp, #20] str wzr, [sp, #12] b LBB0_1 LBB0_1: ; =>This Loop Header: Depth=1 ; Child Loop BB0_6 Depth 2 ldur x8, [x29, #-8] ldrsw x9, [sp, #12] ldrsb w8, [x8, x9] subs w8, w8, #0 cset w8, eq tbnz w8, #0, LBB0_20 b LBB0_2 LBB0_2: ; in Loop: Header=BB0_1 Depth=1 ldur x8, [x29, #-8] ldrsw x9, [sp, #12] ldrsb w8, [x8, x9] subs w8, w8, #32 cset w8, eq tbnz w8, #0, LBB0_4 b LBB0_3 LBB0_3: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #24] add w8, w8, #1 str w8, [sp, #24] b LBB0_18 LBB0_4: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #24] subs w8, w8, #1 cset w8, le tbnz w8, #0, LBB0_12 b LBB0_5 LBB0_5: ; in Loop: Header=BB0_1 Depth=1 mov w8, #1 strb w8, [sp, #19] mov w8, #2 str w8, [sp, #8] b LBB0_6 LBB0_6: ; Parent Loop BB0_1 Depth=1 ; => This Inner Loop Header: Depth=2 ldr w8, [sp, #8] ldr w9, [sp, #8] mul w8, w8, w9 ldr w9, [sp, #24] subs w8, w8, w9 cset w8, gt tbnz w8, #0, LBB0_11 b LBB0_7 LBB0_7: ; in Loop: Header=BB0_6 Depth=2 ldr w8, [sp, #24] ldr w10, [sp, #8] sdiv w9, w8, w10 mul w9, w9, w10 subs w8, w8, w9 subs w8, w8, #0 cset w8, ne tbnz w8, #0, LBB0_9 b LBB0_8 LBB0_8: ; in Loop: Header=BB0_1 Depth=1 strb wzr, [sp, #19] b LBB0_11 LBB0_9: ; in Loop: Header=BB0_6 Depth=2 b LBB0_10 LBB0_10: ; in Loop: Header=BB0_6 Depth=2 ldr w8, [sp, #8] add w8, w8, #1 str w8, [sp, #8] b LBB0_6 LBB0_11: ; in Loop: Header=BB0_1 Depth=1 b LBB0_13 LBB0_12: ; in Loop: Header=BB0_1 Depth=1 strb wzr, [sp, #19] b LBB0_13 LBB0_13: ; in Loop: Header=BB0_1 Depth=1 ldrb w8, [sp, #19] tbz w8, #0, LBB0_17 b LBB0_14 LBB0_14: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #20] subs w8, w8, #0 cset w8, le tbnz w8, #0, LBB0_16 b LBB0_15 LBB0_15: ; in Loop: Header=BB0_1 Depth=1 ldur x8, [x29, #-16] ldrsw x9, [sp, #20] mov x10, x9 add w10, w10, #1 str w10, [sp, #20] add x9, x8, x9 mov w8, #32 strb w8, [x9] b LBB0_16 LBB0_16: ; in Loop: Header=BB0_1 Depth=1 ldur x8, [x29, #-16] ldrsw x9, [sp, #20] add x0, x8, x9 ldur x8, [x29, #-8] ldrsw x9, [sp, #12] add x8, x8, x9 ldrsw x9, [sp, #24] subs x1, x8, x9 ldrsw x2, [sp, #24] mov x3, #-1 bl ___memcpy_chk ldr w9, [sp, #24] ldr w8, [sp, #20] add w8, w8, w9 str w8, [sp, #20] b LBB0_17 LBB0_17: ; in Loop: Header=BB0_1 Depth=1 str wzr, [sp, #24] b LBB0_18 LBB0_18: ; in Loop: Header=BB0_1 Depth=1 b LBB0_19 LBB0_19: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #12] add w8, w8, #1 str w8, [sp, #12] b LBB0_1 LBB0_20: ldr w8, [sp, #24] subs w8, w8, #1 cset w8, le tbnz w8, #0, LBB0_28 b LBB0_21 LBB0_21: mov w8, #1 strb w8, [sp, #19] mov w8, #2 str w8, [sp, #8] b LBB0_22 LBB0_22: ; =>This Inner Loop Header: Depth=1 ldr w8, [sp, #8] ldr w9, [sp, #8] mul w8, w8, w9 ldr w9, [sp, #24] subs w8, w8, w9 cset w8, gt tbnz w8, #0, LBB0_27 b LBB0_23 LBB0_23: ; in Loop: Header=BB0_22 Depth=1 ldr w8, [sp, #24] ldr w10, [sp, #8] sdiv w9, w8, w10 mul w9, w9, w10 subs w8, w8, w9 subs w8, w8, #0 cset w8, ne tbnz w8, #0, LBB0_25 b LBB0_24 LBB0_24: strb wzr, [sp, #19] b LBB0_27 LBB0_25: ; in Loop: Header=BB0_22 Depth=1 b LBB0_26 LBB0_26: ; in Loop: Header=BB0_22 Depth=1 ldr w8, [sp, #8] add w8, w8, #1 str w8, [sp, #8] b LBB0_22 LBB0_27: b LBB0_29 LBB0_28: strb wzr, [sp, #19] b LBB0_29 LBB0_29: ldrb w8, [sp, #19] tbz w8, #0, LBB0_33 b LBB0_30 LBB0_30: ldr w8, [sp, #20] subs w8, w8, #0 cset w8, le tbnz w8, #0, LBB0_32 b LBB0_31 LBB0_31: ldur x8, [x29, #-16] ldrsw x9, [sp, #20] mov x10, x9 add w10, w10, #1 str w10, [sp, #20] add x9, x8, x9 mov w8, #32 strb w8, [x9] b LBB0_32 LBB0_32: ldur x8, [x29, #-16] ldrsw x9, [sp, #20] add x0, x8, x9 ldur x8, [x29, #-8] ldrsw x9, [sp, #12] add x8, x8, x9 ldrsw x9, [sp, #24] subs x1, x8, x9 ldrsw x2, [sp, #24] mov x3, #-1 bl ___memcpy_chk ldr w9, [sp, #24] ldr w8, [sp, #20] add w8, w8, w9 str w8, [sp, #20] b LBB0_33 LBB0_33: ldur x8, [x29, #-16] ldrsw x9, [sp, #20] add x8, x8, x9 strb wzr, [x8] ldp x29, x30, [sp, #48] ; 16-byte Folded Reload add sp, sp, #64 ret .cfi_endproc ; -- End function .subsections_via_symbols
eval/problem144/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ## -- Begin function func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp subq $288, %rsp ## imm = 0x120 movq ___stack_chk_guard@GOTPCREL(%rip), %rax movq (%rax), %rax movq %rax, -8(%rbp) movq %rdi, -240(%rbp) movq %rsi, -248(%rbp) movl $0, -268(%rbp) LBB0_1: ## =>This Inner Loop Header: Depth=1 movq -240(%rbp), %rax movslq -268(%rbp), %rcx movsbl (%rax,%rcx), %eax cmpl $47, %eax je LBB0_4 ## %bb.2: ## in Loop: Header=BB0_1 Depth=1 movq -240(%rbp), %rax movslq -268(%rbp), %rcx movb (%rax,%rcx), %cl movslq -268(%rbp), %rax movb %cl, -112(%rbp,%rax) ## %bb.3: ## in Loop: Header=BB0_1 Depth=1 movl -268(%rbp), %eax addl $1, %eax movl %eax, -268(%rbp) jmp LBB0_1 LBB0_4: movslq -268(%rbp), %rax movb $0, -112(%rbp,%rax) leaq -112(%rbp), %rdi callq _atoi movl %eax, -252(%rbp) movl $0, -272(%rbp) movl -268(%rbp), %eax addl $1, %eax movl %eax, -268(%rbp) LBB0_5: ## =>This Inner Loop Header: Depth=1 movq -240(%rbp), %rax movslq -268(%rbp), %rcx movsbl (%rax,%rcx), %eax cmpl $0, %eax je LBB0_8 ## %bb.6: ## in Loop: Header=BB0_5 Depth=1 movq -240(%rbp), %rax movslq -268(%rbp), %rcx movb (%rax,%rcx), %cl movslq -272(%rbp), %rax movb %cl, -224(%rbp,%rax) ## %bb.7: ## in Loop: Header=BB0_5 Depth=1 movl -268(%rbp), %eax addl $1, %eax movl %eax, -268(%rbp) movl -272(%rbp), %eax addl $1, %eax movl %eax, -272(%rbp) jmp LBB0_5 LBB0_8: movslq -272(%rbp), %rax movb $0, -224(%rbp,%rax) leaq -224(%rbp), %rdi callq _atoi movl %eax, -256(%rbp) movl $0, -268(%rbp) LBB0_9: ## =>This Inner Loop Header: Depth=1 movq -248(%rbp), %rax movslq -268(%rbp), %rcx movsbl (%rax,%rcx), %eax cmpl $47, %eax je LBB0_12 ## %bb.10: ## in Loop: Header=BB0_9 Depth=1 movq -248(%rbp), %rax movslq -268(%rbp), %rcx movb (%rax,%rcx), %cl movslq -268(%rbp), %rax movb %cl, -112(%rbp,%rax) ## %bb.11: ## in Loop: Header=BB0_9 Depth=1 movl -268(%rbp), %eax addl $1, %eax movl %eax, -268(%rbp) jmp LBB0_9 LBB0_12: movslq -268(%rbp), %rax movb $0, -112(%rbp,%rax) leaq -112(%rbp), %rdi callq _atoi movl %eax, -260(%rbp) movl $0, -272(%rbp) movl -268(%rbp), %eax addl $1, %eax movl %eax, -268(%rbp) LBB0_13: ## =>This Inner Loop Header: Depth=1 movq -248(%rbp), %rax movslq -268(%rbp), %rcx movsbl (%rax,%rcx), %eax cmpl $0, %eax je LBB0_16 ## %bb.14: ## in Loop: Header=BB0_13 Depth=1 movq -248(%rbp), %rax movslq -268(%rbp), %rcx movb (%rax,%rcx), %cl movslq -272(%rbp), %rax movb %cl, -224(%rbp,%rax) ## %bb.15: ## in Loop: Header=BB0_13 Depth=1 movl -268(%rbp), %eax addl $1, %eax movl %eax, -268(%rbp) movl -272(%rbp), %eax addl $1, %eax movl %eax, -272(%rbp) jmp LBB0_13 LBB0_16: movslq -272(%rbp), %rax movb $0, -224(%rbp,%rax) leaq -224(%rbp), %rdi callq _atoi movl %eax, -264(%rbp) movl -252(%rbp), %eax imull -260(%rbp), %eax movl -256(%rbp), %ecx imull -264(%rbp), %ecx cltd idivl %ecx cmpl $0, %edx jne LBB0_18 ## %bb.17: movl $1, -228(%rbp) jmp LBB0_19 LBB0_18: movl $0, -228(%rbp) LBB0_19: movl -228(%rbp), %eax movl %eax, -276(%rbp) ## 4-byte Spill movq ___stack_chk_guard@GOTPCREL(%rip), %rax movq (%rax), %rax movq -8(%rbp), %rcx cmpq %rcx, %rax jne LBB0_21 ## %bb.20: movl -276(%rbp), %eax ## 4-byte Reload addq $288, %rsp ## imm = 0x120 popq %rbp retq LBB0_21: callq ___stack_chk_fail ud2 .cfi_endproc ## -- End function .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #304 .cfi_def_cfa_offset 304 stp x28, x27, [sp, #272] ; 16-byte Folded Spill stp x29, x30, [sp, #288] ; 16-byte Folded Spill add x29, sp, #288 .cfi_def_cfa w29, 16 .cfi_offset w30, -8 .cfi_offset w29, -16 .cfi_offset w27, -24 .cfi_offset w28, -32 adrp x8, ___stack_chk_guard@GOTPAGE ldr x8, [x8, ___stack_chk_guard@GOTPAGEOFF] ldr x8, [x8] stur x8, [x29, #-24] str x0, [sp, #48] str x1, [sp, #40] str wzr, [sp, #20] b LBB0_1 LBB0_1: ; =>This Inner Loop Header: Depth=1 ldr x8, [sp, #48] ldrsw x9, [sp, #20] ldrsb w8, [x8, x9] subs w8, w8, #47 cset w8, eq tbnz w8, #0, LBB0_4 b LBB0_2 LBB0_2: ; in Loop: Header=BB0_1 Depth=1 ldr x8, [sp, #48] ldrsw x9, [sp, #20] add x8, x8, x9 ldrb w8, [x8] ldrsw x10, [sp, #20] sub x9, x29, #125 add x9, x9, x10 strb w8, [x9] b LBB0_3 LBB0_3: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #20] add w8, w8, #1 str w8, [sp, #20] b LBB0_1 LBB0_4: ldrsw x9, [sp, #20] sub x0, x29, #125 mov x8, x0 add x8, x8, x9 strb wzr, [x8] bl _atoi str w0, [sp, #36] str wzr, [sp, #16] ldr w8, [sp, #20] add w8, w8, #1 str w8, [sp, #20] b LBB0_5 LBB0_5: ; =>This Inner Loop Header: Depth=1 ldr x8, [sp, #48] ldrsw x9, [sp, #20] ldrsb w8, [x8, x9] subs w8, w8, #0 cset w8, eq tbnz w8, #0, LBB0_8 b LBB0_6 LBB0_6: ; in Loop: Header=BB0_5 Depth=1 ldr x8, [sp, #48] ldrsw x9, [sp, #20] add x8, x8, x9 ldrb w8, [x8] ldrsw x10, [sp, #16] add x9, sp, #62 add x9, x9, x10 strb w8, [x9] b LBB0_7 LBB0_7: ; in Loop: Header=BB0_5 Depth=1 ldr w8, [sp, #20] add w8, w8, #1 str w8, [sp, #20] ldr w8, [sp, #16] add w8, w8, #1 str w8, [sp, #16] b LBB0_5 LBB0_8: ldrsw x9, [sp, #16] add x0, sp, #62 mov x8, x0 add x8, x8, x9 strb wzr, [x8] bl _atoi str w0, [sp, #32] str wzr, [sp, #20] b LBB0_9 LBB0_9: ; =>This Inner Loop Header: Depth=1 ldr x8, [sp, #40] ldrsw x9, [sp, #20] ldrsb w8, [x8, x9] subs w8, w8, #47 cset w8, eq tbnz w8, #0, LBB0_12 b LBB0_10 LBB0_10: ; in Loop: Header=BB0_9 Depth=1 ldr x8, [sp, #40] ldrsw x9, [sp, #20] add x8, x8, x9 ldrb w8, [x8] ldrsw x10, [sp, #20] sub x9, x29, #125 add x9, x9, x10 strb w8, [x9] b LBB0_11 LBB0_11: ; in Loop: Header=BB0_9 Depth=1 ldr w8, [sp, #20] add w8, w8, #1 str w8, [sp, #20] b LBB0_9 LBB0_12: ldrsw x9, [sp, #20] sub x0, x29, #125 mov x8, x0 add x8, x8, x9 strb wzr, [x8] bl _atoi str w0, [sp, #28] str wzr, [sp, #16] ldr w8, [sp, #20] add w8, w8, #1 str w8, [sp, #20] b LBB0_13 LBB0_13: ; =>This Inner Loop Header: Depth=1 ldr x8, [sp, #40] ldrsw x9, [sp, #20] ldrsb w8, [x8, x9] subs w8, w8, #0 cset w8, eq tbnz w8, #0, LBB0_16 b LBB0_14 LBB0_14: ; in Loop: Header=BB0_13 Depth=1 ldr x8, [sp, #40] ldrsw x9, [sp, #20] add x8, x8, x9 ldrb w8, [x8] ldrsw x10, [sp, #16] add x9, sp, #62 add x9, x9, x10 strb w8, [x9] b LBB0_15 LBB0_15: ; in Loop: Header=BB0_13 Depth=1 ldr w8, [sp, #20] add w8, w8, #1 str w8, [sp, #20] ldr w8, [sp, #16] add w8, w8, #1 str w8, [sp, #16] b LBB0_13 LBB0_16: ldrsw x9, [sp, #16] add x0, sp, #62 mov x8, x0 add x8, x8, x9 strb wzr, [x8] bl _atoi str w0, [sp, #24] ldr w8, [sp, #36] ldr w9, [sp, #28] mul w8, w8, w9 ldr w9, [sp, #32] ldr w10, [sp, #24] mul w10, w9, w10 sdiv w9, w8, w10 mul w9, w9, w10 subs w8, w8, w9 subs w8, w8, #0 cset w8, ne tbnz w8, #0, LBB0_18 b LBB0_17 LBB0_17: mov w8, #1 str w8, [sp, #56] b LBB0_19 LBB0_18: str wzr, [sp, #56] b LBB0_19 LBB0_19: ldr w8, [sp, #56] str w8, [sp, #12] ; 4-byte Folded Spill ldur x9, [x29, #-24] adrp x8, ___stack_chk_guard@GOTPAGE ldr x8, [x8, ___stack_chk_guard@GOTPAGEOFF] ldr x8, [x8] subs x8, x8, x9 cset w8, eq tbnz w8, #0, LBB0_21 b LBB0_20 LBB0_20: bl ___stack_chk_fail LBB0_21: ldr w0, [sp, #12] ; 4-byte Folded Reload ldp x29, x30, [sp, #288] ; 16-byte Folded Reload ldp x28, x27, [sp, #272] ; 16-byte Folded Reload add sp, sp, #304 ret .cfi_endproc ; -- End function .subsections_via_symbols
eval/problem145/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ## -- Begin function func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp subq $96, %rsp movq ___stack_chk_guard@GOTPCREL(%rip), %rax movq (%rax), %rax movq %rax, -8(%rbp) movq %rdi, -32(%rbp) movl %esi, -36(%rbp) movslq -36(%rbp), %rdi shlq $2, %rdi callq _malloc movq %rax, -48(%rbp) movl $0, -52(%rbp) LBB0_1: ## =>This Loop Header: Depth=1 ## Child Loop BB0_3 Depth 2 movl -52(%rbp), %eax cmpl -36(%rbp), %eax jge LBB0_11 ## %bb.2: ## in Loop: Header=BB0_1 Depth=1 leaq -20(%rbp), %rax movq %rax, -88(%rbp) ## 8-byte Spill movq -32(%rbp), %rax movslq -52(%rbp), %rcx movl (%rax,%rcx,4), %edi callq _abs movq -88(%rbp), %rdi ## 8-byte Reload movl %eax, %r8d xorl %esi, %esi movl $12, %edx leaq L_.str(%rip), %rcx movb $0, %al callq ___sprintf_chk movl $0, -56(%rbp) leaq -20(%rbp), %rdi callq _strlen ## kill: def $eax killed $eax killed $rax movl %eax, -60(%rbp) movl $1, -64(%rbp) LBB0_3: ## Parent Loop BB0_1 Depth=1 ## => This Inner Loop Header: Depth=2 movl -64(%rbp), %eax cmpl -60(%rbp), %eax jge LBB0_6 ## %bb.4: ## in Loop: Header=BB0_3 Depth=2 movslq -64(%rbp), %rax movsbl -20(%rbp,%rax), %eax subl $48, %eax addl -56(%rbp), %eax movl %eax, -56(%rbp) ## %bb.5: ## in Loop: Header=BB0_3 Depth=2 movl -64(%rbp), %eax addl $1, %eax movl %eax, -64(%rbp) jmp LBB0_3 LBB0_6: ## in Loop: Header=BB0_1 Depth=1 movq -32(%rbp), %rax movslq -52(%rbp), %rcx cmpl $0, (%rax,%rcx,4) jle LBB0_8 ## %bb.7: ## in Loop: Header=BB0_1 Depth=1 movsbl -20(%rbp), %eax subl $48, %eax addl -56(%rbp), %eax movl %eax, -56(%rbp) jmp LBB0_9 LBB0_8: ## in Loop: Header=BB0_1 Depth=1 movsbl -20(%rbp), %ecx subl $48, %ecx movl -56(%rbp), %eax subl %ecx, %eax movl %eax, -56(%rbp) LBB0_9: ## in Loop: Header=BB0_1 Depth=1 movl -56(%rbp), %edx movq -48(%rbp), %rax movslq -52(%rbp), %rcx movl %edx, (%rax,%rcx,4) ## %bb.10: ## in Loop: Header=BB0_1 Depth=1 movl -52(%rbp), %eax addl $1, %eax movl %eax, -52(%rbp) jmp LBB0_1 LBB0_11: movl $0, -72(%rbp) LBB0_12: ## =>This Loop Header: Depth=1 ## Child Loop BB0_14 Depth 2 movl -72(%rbp), %eax cmpl -36(%rbp), %eax jge LBB0_21 ## %bb.13: ## in Loop: Header=BB0_12 Depth=1 movl $1, -76(%rbp) LBB0_14: ## Parent Loop BB0_12 Depth=1 ## => This Inner Loop Header: Depth=2 movl -76(%rbp), %eax cmpl -36(%rbp), %eax jge LBB0_19 ## %bb.15: ## in Loop: Header=BB0_14 Depth=2 movq -48(%rbp), %rax movl -76(%rbp), %ecx subl $1, %ecx movslq %ecx, %rcx movl (%rax,%rcx,4), %eax movq -48(%rbp), %rcx movslq -76(%rbp), %rdx cmpl (%rcx,%rdx,4), %eax jle LBB0_17 ## %bb.16: ## in Loop: Header=BB0_14 Depth=2 movq -48(%rbp), %rax movslq -76(%rbp), %rcx movl (%rax,%rcx,4), %eax movl %eax, -68(%rbp) movq -48(%rbp), %rax movl -76(%rbp), %ecx subl $1, %ecx movslq %ecx, %rcx movl (%rax,%rcx,4), %edx movq -48(%rbp), %rax movslq -76(%rbp), %rcx movl %edx, (%rax,%rcx,4) movl -68(%rbp), %edx movq -48(%rbp), %rax movl -76(%rbp), %ecx subl $1, %ecx movslq %ecx, %rcx movl %edx, (%rax,%rcx,4) movq -32(%rbp), %rax movslq -76(%rbp), %rcx movl (%rax,%rcx,4), %eax movl %eax, -68(%rbp) movq -32(%rbp), %rax movl -76(%rbp), %ecx subl $1, %ecx movslq %ecx, %rcx movl (%rax,%rcx,4), %edx movq -32(%rbp), %rax movslq -76(%rbp), %rcx movl %edx, (%rax,%rcx,4) movl -68(%rbp), %edx movq -32(%rbp), %rax movl -76(%rbp), %ecx subl $1, %ecx movslq %ecx, %rcx movl %edx, (%rax,%rcx,4) LBB0_17: ## in Loop: Header=BB0_14 Depth=2 jmp LBB0_18 LBB0_18: ## in Loop: Header=BB0_14 Depth=2 movl -76(%rbp), %eax addl $1, %eax movl %eax, -76(%rbp) jmp LBB0_14 LBB0_19: ## in Loop: Header=BB0_12 Depth=1 jmp LBB0_20 LBB0_20: ## in Loop: Header=BB0_12 Depth=1 movl -72(%rbp), %eax addl $1, %eax movl %eax, -72(%rbp) jmp LBB0_12 LBB0_21: movq -48(%rbp), %rdi callq _free movq -32(%rbp), %rax movq %rax, -96(%rbp) ## 8-byte Spill movq ___stack_chk_guard@GOTPCREL(%rip), %rax movq (%rax), %rax movq -8(%rbp), %rcx cmpq %rcx, %rax jne LBB0_23 ## %bb.22: movq -96(%rbp), %rax ## 8-byte Reload addq $96, %rsp popq %rbp retq LBB0_23: callq ___stack_chk_fail ud2 .cfi_endproc ## -- End function .section __TEXT,__cstring,cstring_literals L_.str: ## @.str .asciz "%d" .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #128 .cfi_def_cfa_offset 128 stp x29, x30, [sp, #112] ; 16-byte Folded Spill add x29, sp, #112 .cfi_def_cfa w29, 16 .cfi_offset w30, -8 .cfi_offset w29, -16 adrp x8, ___stack_chk_guard@GOTPAGE ldr x8, [x8, ___stack_chk_guard@GOTPAGEOFF] ldr x8, [x8] stur x8, [x29, #-8] stur x0, [x29, #-32] stur w1, [x29, #-36] ldursw x8, [x29, #-36] lsl x0, x8, #2 bl _malloc stur x0, [x29, #-48] stur wzr, [x29, #-52] b LBB0_1 LBB0_1: ; =>This Loop Header: Depth=1 ; Child Loop BB0_3 Depth 2 ldur w8, [x29, #-52] ldur w9, [x29, #-36] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_11 b LBB0_2 LBB0_2: ; in Loop: Header=BB0_1 Depth=1 ldur x8, [x29, #-32] ldursw x9, [x29, #-52] ldr w0, [x8, x9, lsl #2] bl _abs mov x9, sp ; implicit-def: $x8 mov x8, x0 str x8, [x9] sub x0, x29, #20 str x0, [sp, #24] ; 8-byte Folded Spill mov w1, #0 mov x2, #12 adrp x3, l_.str@PAGE add x3, x3, l_.str@PAGEOFF bl ___sprintf_chk ldr x0, [sp, #24] ; 8-byte Folded Reload str wzr, [sp, #56] bl _strlen mov x8, x0 str w8, [sp, #52] mov w8, #1 str w8, [sp, #48] b LBB0_3 LBB0_3: ; Parent Loop BB0_1 Depth=1 ; => This Inner Loop Header: Depth=2 ldr w8, [sp, #48] ldr w9, [sp, #52] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_6 b LBB0_4 LBB0_4: ; in Loop: Header=BB0_3 Depth=2 ldrsw x9, [sp, #48] sub x8, x29, #20 ldrsb w8, [x8, x9] subs w9, w8, #48 ldr w8, [sp, #56] add w8, w8, w9 str w8, [sp, #56] b LBB0_5 LBB0_5: ; in Loop: Header=BB0_3 Depth=2 ldr w8, [sp, #48] add w8, w8, #1 str w8, [sp, #48] b LBB0_3 LBB0_6: ; in Loop: Header=BB0_1 Depth=1 ldur x8, [x29, #-32] ldursw x9, [x29, #-52] ldr w8, [x8, x9, lsl #2] subs w8, w8, #0 cset w8, le tbnz w8, #0, LBB0_8 b LBB0_7 LBB0_7: ; in Loop: Header=BB0_1 Depth=1 ldursb w8, [x29, #-20] subs w9, w8, #48 ldr w8, [sp, #56] add w8, w8, w9 str w8, [sp, #56] b LBB0_9 LBB0_8: ; in Loop: Header=BB0_1 Depth=1 ldursb w8, [x29, #-20] subs w9, w8, #48 ldr w8, [sp, #56] subs w8, w8, w9 str w8, [sp, #56] b LBB0_9 LBB0_9: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #56] ldur x9, [x29, #-48] ldursw x10, [x29, #-52] str w8, [x9, x10, lsl #2] b LBB0_10 LBB0_10: ; in Loop: Header=BB0_1 Depth=1 ldur w8, [x29, #-52] add w8, w8, #1 stur w8, [x29, #-52] b LBB0_1 LBB0_11: str wzr, [sp, #40] b LBB0_12 LBB0_12: ; =>This Loop Header: Depth=1 ; Child Loop BB0_14 Depth 2 ldr w8, [sp, #40] ldur w9, [x29, #-36] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_21 b LBB0_13 LBB0_13: ; in Loop: Header=BB0_12 Depth=1 mov w8, #1 str w8, [sp, #36] b LBB0_14 LBB0_14: ; Parent Loop BB0_12 Depth=1 ; => This Inner Loop Header: Depth=2 ldr w8, [sp, #36] ldur w9, [x29, #-36] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_19 b LBB0_15 LBB0_15: ; in Loop: Header=BB0_14 Depth=2 ldur x8, [x29, #-48] ldr w9, [sp, #36] subs w9, w9, #1 ldr w8, [x8, w9, sxtw #2] ldur x9, [x29, #-48] ldrsw x10, [sp, #36] ldr w9, [x9, x10, lsl #2] subs w8, w8, w9 cset w8, le tbnz w8, #0, LBB0_17 b LBB0_16 LBB0_16: ; in Loop: Header=BB0_14 Depth=2 ldur x8, [x29, #-48] ldrsw x9, [sp, #36] ldr w8, [x8, x9, lsl #2] str w8, [sp, #44] ldur x8, [x29, #-48] ldr w9, [sp, #36] subs w9, w9, #1 ldr w8, [x8, w9, sxtw #2] ldur x9, [x29, #-48] ldrsw x10, [sp, #36] str w8, [x9, x10, lsl #2] ldr w8, [sp, #44] ldur x9, [x29, #-48] ldr w10, [sp, #36] subs w10, w10, #1 str w8, [x9, w10, sxtw #2] ldur x8, [x29, #-32] ldrsw x9, [sp, #36] ldr w8, [x8, x9, lsl #2] str w8, [sp, #44] ldur x8, [x29, #-32] ldr w9, [sp, #36] subs w9, w9, #1 ldr w8, [x8, w9, sxtw #2] ldur x9, [x29, #-32] ldrsw x10, [sp, #36] str w8, [x9, x10, lsl #2] ldr w8, [sp, #44] ldur x9, [x29, #-32] ldr w10, [sp, #36] subs w10, w10, #1 str w8, [x9, w10, sxtw #2] b LBB0_17 LBB0_17: ; in Loop: Header=BB0_14 Depth=2 b LBB0_18 LBB0_18: ; in Loop: Header=BB0_14 Depth=2 ldr w8, [sp, #36] add w8, w8, #1 str w8, [sp, #36] b LBB0_14 LBB0_19: ; in Loop: Header=BB0_12 Depth=1 b LBB0_20 LBB0_20: ; in Loop: Header=BB0_12 Depth=1 ldr w8, [sp, #40] add w8, w8, #1 str w8, [sp, #40] b LBB0_12 LBB0_21: ldur x0, [x29, #-48] bl _free ldur x8, [x29, #-32] str x8, [sp, #16] ; 8-byte Folded Spill ldur x9, [x29, #-8] adrp x8, ___stack_chk_guard@GOTPAGE ldr x8, [x8, ___stack_chk_guard@GOTPAGEOFF] ldr x8, [x8] subs x8, x8, x9 cset w8, eq tbnz w8, #0, LBB0_23 b LBB0_22 LBB0_22: bl ___stack_chk_fail LBB0_23: ldr x0, [sp, #16] ; 8-byte Folded Reload ldp x29, x30, [sp, #112] ; 16-byte Folded Reload add sp, sp, #128 ret .cfi_endproc ; -- End function .section __TEXT,__cstring,cstring_literals l_.str: ; @.str .asciz "%d" .subsections_via_symbols
eval/problem146/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ## -- Begin function func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp movq %rdi, -8(%rbp) movl %esi, -12(%rbp) movl $0, -16(%rbp) movl $0, -20(%rbp) LBB0_1: ## =>This Loop Header: Depth=1 ## Child Loop BB0_4 Depth 2 movl -20(%rbp), %eax cmpl -12(%rbp), %eax jge LBB0_12 ## %bb.2: ## in Loop: Header=BB0_1 Depth=1 movq -8(%rbp), %rax movslq -20(%rbp), %rcx cmpl $10, (%rax,%rcx,4) jle LBB0_10 ## %bb.3: ## in Loop: Header=BB0_1 Depth=1 movq -8(%rbp), %rax movslq -20(%rbp), %rcx movl (%rax,%rcx,4), %eax movl $10, %ecx cltd idivl %ecx movl %edx, -28(%rbp) movq -8(%rbp), %rax movslq -20(%rbp), %rcx movl (%rax,%rcx,4), %eax movl %eax, -32(%rbp) LBB0_4: ## Parent Loop BB0_1 Depth=1 ## => This Inner Loop Header: Depth=2 cmpl $10, -32(%rbp) jl LBB0_6 ## %bb.5: ## in Loop: Header=BB0_4 Depth=2 movl -32(%rbp), %eax movl $10, %ecx cltd idivl %ecx movl %eax, -32(%rbp) jmp LBB0_4 LBB0_6: ## in Loop: Header=BB0_1 Depth=1 movl -32(%rbp), %eax movl %eax, -24(%rbp) movl -24(%rbp), %eax movl $2, %ecx cltd idivl %ecx cmpl $1, %edx jne LBB0_9 ## %bb.7: ## in Loop: Header=BB0_1 Depth=1 movl -28(%rbp), %eax movl $2, %ecx cltd idivl %ecx cmpl $1, %edx jne LBB0_9 ## %bb.8: ## in Loop: Header=BB0_1 Depth=1 movl -16(%rbp), %eax addl $1, %eax movl %eax, -16(%rbp) LBB0_9: ## in Loop: Header=BB0_1 Depth=1 jmp LBB0_10 LBB0_10: ## in Loop: Header=BB0_1 Depth=1 jmp LBB0_11 LBB0_11: ## in Loop: Header=BB0_1 Depth=1 movl -20(%rbp), %eax addl $1, %eax movl %eax, -20(%rbp) jmp LBB0_1 LBB0_12: movl -16(%rbp), %eax popq %rbp retq .cfi_endproc ## -- End function .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #32 .cfi_def_cfa_offset 32 str x0, [sp, #24] str w1, [sp, #20] str wzr, [sp, #16] str wzr, [sp, #12] b LBB0_1 LBB0_1: ; =>This Loop Header: Depth=1 ; Child Loop BB0_4 Depth 2 ldr w8, [sp, #12] ldr w9, [sp, #20] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_12 b LBB0_2 LBB0_2: ; in Loop: Header=BB0_1 Depth=1 ldr x8, [sp, #24] ldrsw x9, [sp, #12] ldr w8, [x8, x9, lsl #2] subs w8, w8, #10 cset w8, le tbnz w8, #0, LBB0_10 b LBB0_3 LBB0_3: ; in Loop: Header=BB0_1 Depth=1 ldr x8, [sp, #24] ldrsw x9, [sp, #12] ldr w8, [x8, x9, lsl #2] mov w10, #10 sdiv w9, w8, w10 mul w9, w9, w10 subs w8, w8, w9 str w8, [sp, #4] ldr x8, [sp, #24] ldrsw x9, [sp, #12] ldr w8, [x8, x9, lsl #2] str w8, [sp] b LBB0_4 LBB0_4: ; Parent Loop BB0_1 Depth=1 ; => This Inner Loop Header: Depth=2 ldr w8, [sp] subs w8, w8, #10 cset w8, lt tbnz w8, #0, LBB0_6 b LBB0_5 LBB0_5: ; in Loop: Header=BB0_4 Depth=2 ldr w8, [sp] mov w9, #10 sdiv w8, w8, w9 str w8, [sp] b LBB0_4 LBB0_6: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp] str w8, [sp, #8] ldr w8, [sp, #8] mov w10, #2 sdiv w9, w8, w10 mul w9, w9, w10 subs w8, w8, w9 subs w8, w8, #1 cset w8, ne tbnz w8, #0, LBB0_9 b LBB0_7 LBB0_7: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #4] mov w10, #2 sdiv w9, w8, w10 mul w9, w9, w10 subs w8, w8, w9 subs w8, w8, #1 cset w8, ne tbnz w8, #0, LBB0_9 b LBB0_8 LBB0_8: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #16] add w8, w8, #1 str w8, [sp, #16] b LBB0_9 LBB0_9: ; in Loop: Header=BB0_1 Depth=1 b LBB0_10 LBB0_10: ; in Loop: Header=BB0_1 Depth=1 b LBB0_11 LBB0_11: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #12] add w8, w8, #1 str w8, [sp, #12] b LBB0_1 LBB0_12: ldr w0, [sp, #16] add sp, sp, #32 ret .cfi_endproc ; -- End function .subsections_via_symbols
eval/problem147/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ## -- Begin function func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp subq $96, %rsp movl %edi, -4(%rbp) movslq -4(%rbp), %rdi shlq $2, %rdi callq _malloc movq %rax, -16(%rbp) movl -4(%rbp), %eax addl $1, %eax movslq %eax, %rdi shlq $3, %rdi callq _malloc movq %rax, -24(%rbp) movl -4(%rbp), %eax addl $1, %eax movslq %eax, %rdi shlq $3, %rdi callq _malloc movq %rax, -32(%rbp) movl $0, -36(%rbp) LBB0_1: ## =>This Inner Loop Header: Depth=1 movl -36(%rbp), %eax cmpl -4(%rbp), %eax jg LBB0_4 ## %bb.2: ## in Loop: Header=BB0_1 Depth=1 movl $3, %edi movl $4, %esi callq _calloc movq %rax, %rdx movq -24(%rbp), %rax movslq -36(%rbp), %rcx movq %rdx, (%rax,%rcx,8) movl $3, %edi movl $4, %esi callq _calloc movq %rax, %rdx movq -32(%rbp), %rax movslq -36(%rbp), %rcx movq %rdx, (%rax,%rcx,8) ## %bb.3: ## in Loop: Header=BB0_1 Depth=1 movl -36(%rbp), %eax addl $1, %eax movl %eax, -36(%rbp) jmp LBB0_1 LBB0_4: movq -24(%rbp), %rax movq (%rax), %rax movl $0, 8(%rax) movq -24(%rbp), %rax movq (%rax), %rax movl $0, 4(%rax) movq -24(%rbp), %rax movq (%rax), %rax movl $0, (%rax) movq -32(%rbp), %rax movq (%rax), %rax movl $0, 8(%rax) movq -32(%rbp), %rax movq (%rax), %rax movl $0, 4(%rax) movq -32(%rbp), %rax movq (%rax), %rax movl $0, (%rax) movl $1, -40(%rbp) LBB0_5: ## =>This Loop Header: Depth=1 ## Child Loop BB0_7 Depth 2 movl -40(%rbp), %eax cmpl -4(%rbp), %eax jg LBB0_12 ## %bb.6: ## in Loop: Header=BB0_5 Depth=1 movl -40(%rbp), %eax imull -40(%rbp), %eax subl -40(%rbp), %eax addl $1, %eax movl $3, %ecx cltd idivl %ecx movq -16(%rbp), %rax movl -40(%rbp), %ecx subl $1, %ecx movslq %ecx, %rcx movl %edx, (%rax,%rcx,4) movl $0, -44(%rbp) LBB0_7: ## Parent Loop BB0_5 Depth=1 ## => This Inner Loop Header: Depth=2 cmpl $3, -44(%rbp) jge LBB0_10 ## %bb.8: ## in Loop: Header=BB0_7 Depth=2 movq -24(%rbp), %rax movl -40(%rbp), %ecx subl $1, %ecx movslq %ecx, %rcx movq (%rax,%rcx,8), %rax movslq -44(%rbp), %rcx movl (%rax,%rcx,4), %edx movq -24(%rbp), %rax movslq -40(%rbp), %rcx movq (%rax,%rcx,8), %rax movslq -44(%rbp), %rcx movl %edx, (%rax,%rcx,4) ## %bb.9: ## in Loop: Header=BB0_7 Depth=2 movl -44(%rbp), %eax addl $1, %eax movl %eax, -44(%rbp) jmp LBB0_7 LBB0_10: ## in Loop: Header=BB0_5 Depth=1 movq -24(%rbp), %rax movslq -40(%rbp), %rcx movq (%rax,%rcx,8), %rax movq -16(%rbp), %rcx movl -40(%rbp), %edx subl $1, %edx movslq %edx, %rdx movslq (%rcx,%rdx,4), %rcx movl (%rax,%rcx,4), %edx addl $1, %edx movl %edx, (%rax,%rcx,4) ## %bb.11: ## in Loop: Header=BB0_5 Depth=1 movl -40(%rbp), %eax addl $1, %eax movl %eax, -40(%rbp) jmp LBB0_5 LBB0_12: movl $1, -48(%rbp) LBB0_13: ## =>This Loop Header: Depth=1 ## Child Loop BB0_15 Depth 2 ## Child Loop BB0_17 Depth 3 ## Child Loop BB0_22 Depth 3 ## Child Loop BB0_29 Depth 2 ## Child Loop BB0_31 Depth 3 cmpl $3, -48(%rbp) jge LBB0_38 ## %bb.14: ## in Loop: Header=BB0_13 Depth=1 movl $1, -52(%rbp) LBB0_15: ## Parent Loop BB0_13 Depth=1 ## => This Loop Header: Depth=2 ## Child Loop BB0_17 Depth 3 ## Child Loop BB0_22 Depth 3 movl -52(%rbp), %eax cmpl -4(%rbp), %eax jg LBB0_28 ## %bb.16: ## in Loop: Header=BB0_15 Depth=2 movl $0, -56(%rbp) LBB0_17: ## Parent Loop BB0_13 Depth=1 ## Parent Loop BB0_15 Depth=2 ## => This Inner Loop Header: Depth=3 cmpl $3, -56(%rbp) jge LBB0_20 ## %bb.18: ## in Loop: Header=BB0_17 Depth=3 movq -32(%rbp), %rax movl -52(%rbp), %ecx subl $1, %ecx movslq %ecx, %rcx movq (%rax,%rcx,8), %rax movslq -56(%rbp), %rcx movl (%rax,%rcx,4), %edx movq -32(%rbp), %rax movslq -52(%rbp), %rcx movq (%rax,%rcx,8), %rax movslq -56(%rbp), %rcx movl %edx, (%rax,%rcx,4) ## %bb.19: ## in Loop: Header=BB0_17 Depth=3 movl -56(%rbp), %eax addl $1, %eax movl %eax, -56(%rbp) jmp LBB0_17 LBB0_20: ## in Loop: Header=BB0_15 Depth=2 cmpl $1, -52(%rbp) jl LBB0_26 ## %bb.21: ## in Loop: Header=BB0_15 Depth=2 movl $0, -60(%rbp) LBB0_22: ## Parent Loop BB0_13 Depth=1 ## Parent Loop BB0_15 Depth=2 ## => This Inner Loop Header: Depth=3 cmpl $2, -60(%rbp) jg LBB0_25 ## %bb.23: ## in Loop: Header=BB0_22 Depth=3 movq -24(%rbp), %rax movl -52(%rbp), %ecx subl $1, %ecx movslq %ecx, %rcx movq (%rax,%rcx,8), %rax movslq -60(%rbp), %rcx movl (%rax,%rcx,4), %eax movl %eax, -80(%rbp) ## 4-byte Spill movq -32(%rbp), %rax movslq -52(%rbp), %rcx movq (%rax,%rcx,8), %rax movq %rax, -88(%rbp) ## 8-byte Spill movq -16(%rbp), %rax movl -52(%rbp), %ecx subl $1, %ecx movslq %ecx, %rcx movl (%rax,%rcx,4), %eax addl -60(%rbp), %eax movl $3, %ecx cltd idivl %ecx movq -88(%rbp), %rax ## 8-byte Reload movl %edx, %ecx movl -80(%rbp), %edx ## 4-byte Reload movslq %ecx, %rcx addl (%rax,%rcx,4), %edx movl %edx, (%rax,%rcx,4) ## %bb.24: ## in Loop: Header=BB0_22 Depth=3 movl -60(%rbp), %eax addl $1, %eax movl %eax, -60(%rbp) jmp LBB0_22 LBB0_25: ## in Loop: Header=BB0_15 Depth=2 jmp LBB0_26 LBB0_26: ## in Loop: Header=BB0_15 Depth=2 jmp LBB0_27 LBB0_27: ## in Loop: Header=BB0_15 Depth=2 movl -52(%rbp), %eax addl $1, %eax movl %eax, -52(%rbp) jmp LBB0_15 LBB0_28: ## in Loop: Header=BB0_13 Depth=1 movl $0, -64(%rbp) LBB0_29: ## Parent Loop BB0_13 Depth=1 ## => This Loop Header: Depth=2 ## Child Loop BB0_31 Depth 3 movl -64(%rbp), %eax cmpl -4(%rbp), %eax jg LBB0_36 ## %bb.30: ## in Loop: Header=BB0_29 Depth=2 movl $0, -68(%rbp) LBB0_31: ## Parent Loop BB0_13 Depth=1 ## Parent Loop BB0_29 Depth=2 ## => This Inner Loop Header: Depth=3 cmpl $3, -68(%rbp) jge LBB0_34 ## %bb.32: ## in Loop: Header=BB0_31 Depth=3 movq -32(%rbp), %rax movslq -64(%rbp), %rcx movq (%rax,%rcx,8), %rax movslq -68(%rbp), %rcx movl (%rax,%rcx,4), %edx movq -24(%rbp), %rax movslq -64(%rbp), %rcx movq (%rax,%rcx,8), %rax movslq -68(%rbp), %rcx movl %edx, (%rax,%rcx,4) movq -32(%rbp), %rax movslq -64(%rbp), %rcx movq (%rax,%rcx,8), %rax movslq -68(%rbp), %rcx movl $0, (%rax,%rcx,4) ## %bb.33: ## in Loop: Header=BB0_31 Depth=3 movl -68(%rbp), %eax addl $1, %eax movl %eax, -68(%rbp) jmp LBB0_31 LBB0_34: ## in Loop: Header=BB0_29 Depth=2 jmp LBB0_35 LBB0_35: ## in Loop: Header=BB0_29 Depth=2 movl -64(%rbp), %eax addl $1, %eax movl %eax, -64(%rbp) jmp LBB0_29 LBB0_36: ## in Loop: Header=BB0_13 Depth=1 jmp LBB0_37 LBB0_37: ## in Loop: Header=BB0_13 Depth=1 movl -48(%rbp), %eax addl $1, %eax movl %eax, -48(%rbp) jmp LBB0_13 LBB0_38: movq -24(%rbp), %rax movslq -4(%rbp), %rcx movq (%rax,%rcx,8), %rax movl (%rax), %eax movl %eax, -72(%rbp) movl $0, -76(%rbp) LBB0_39: ## =>This Inner Loop Header: Depth=1 movl -76(%rbp), %eax cmpl -4(%rbp), %eax jg LBB0_42 ## %bb.40: ## in Loop: Header=BB0_39 Depth=1 movq -24(%rbp), %rax movslq -76(%rbp), %rcx movq (%rax,%rcx,8), %rdi callq _free movq -32(%rbp), %rax movslq -76(%rbp), %rcx movq (%rax,%rcx,8), %rdi callq _free ## %bb.41: ## in Loop: Header=BB0_39 Depth=1 movl -76(%rbp), %eax addl $1, %eax movl %eax, -76(%rbp) jmp LBB0_39 LBB0_42: movq -24(%rbp), %rdi callq _free movq -32(%rbp), %rdi callq _free movq -16(%rbp), %rdi callq _free movl -72(%rbp), %eax addq $96, %rsp popq %rbp retq .cfi_endproc ## -- End function .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #112 .cfi_def_cfa_offset 112 stp x29, x30, [sp, #96] ; 16-byte Folded Spill add x29, sp, #96 .cfi_def_cfa w29, 16 .cfi_offset w30, -8 .cfi_offset w29, -16 stur w0, [x29, #-4] ldursw x8, [x29, #-4] lsl x0, x8, #2 bl _malloc stur x0, [x29, #-16] ldur w8, [x29, #-4] add w9, w8, #1 ; implicit-def: $x8 mov x8, x9 sxtw x8, w8 lsl x0, x8, #3 bl _malloc stur x0, [x29, #-24] ldur w8, [x29, #-4] add w9, w8, #1 ; implicit-def: $x8 mov x8, x9 sxtw x8, w8 lsl x0, x8, #3 bl _malloc stur x0, [x29, #-32] stur wzr, [x29, #-36] b LBB0_1 LBB0_1: ; =>This Inner Loop Header: Depth=1 ldur w8, [x29, #-36] ldur w9, [x29, #-4] subs w8, w8, w9 cset w8, gt tbnz w8, #0, LBB0_4 b LBB0_2 LBB0_2: ; in Loop: Header=BB0_1 Depth=1 mov x0, #3 str x0, [sp, #8] ; 8-byte Folded Spill mov x1, #4 str x1, [sp] ; 8-byte Folded Spill bl _calloc ldr x1, [sp] ; 8-byte Folded Reload mov x8, x0 ldr x0, [sp, #8] ; 8-byte Folded Reload ldur x9, [x29, #-24] ldursw x10, [x29, #-36] str x8, [x9, x10, lsl #3] bl _calloc ldur x8, [x29, #-32] ldursw x9, [x29, #-36] str x0, [x8, x9, lsl #3] b LBB0_3 LBB0_3: ; in Loop: Header=BB0_1 Depth=1 ldur w8, [x29, #-36] add w8, w8, #1 stur w8, [x29, #-36] b LBB0_1 LBB0_4: ldur x8, [x29, #-24] ldr x8, [x8] str wzr, [x8, #8] ldur x8, [x29, #-24] ldr x8, [x8] str wzr, [x8, #4] ldur x8, [x29, #-24] ldr x8, [x8] str wzr, [x8] ldur x8, [x29, #-32] ldr x8, [x8] str wzr, [x8, #8] ldur x8, [x29, #-32] ldr x8, [x8] str wzr, [x8, #4] ldur x8, [x29, #-32] ldr x8, [x8] str wzr, [x8] mov w8, #1 stur w8, [x29, #-40] b LBB0_5 LBB0_5: ; =>This Loop Header: Depth=1 ; Child Loop BB0_7 Depth 2 ldur w8, [x29, #-40] ldur w9, [x29, #-4] subs w8, w8, w9 cset w8, gt tbnz w8, #0, LBB0_12 b LBB0_6 LBB0_6: ; in Loop: Header=BB0_5 Depth=1 ldur w8, [x29, #-40] ldur w9, [x29, #-40] mul w8, w8, w9 ldur w9, [x29, #-40] subs w8, w8, w9 add w8, w8, #1 mov w10, #3 sdiv w9, w8, w10 mul w9, w9, w10 subs w8, w8, w9 ldur x9, [x29, #-16] ldur w10, [x29, #-40] subs w10, w10, #1 str w8, [x9, w10, sxtw #2] stur wzr, [x29, #-44] b LBB0_7 LBB0_7: ; Parent Loop BB0_5 Depth=1 ; => This Inner Loop Header: Depth=2 ldur w8, [x29, #-44] subs w8, w8, #3 cset w8, ge tbnz w8, #0, LBB0_10 b LBB0_8 LBB0_8: ; in Loop: Header=BB0_7 Depth=2 ldur x8, [x29, #-24] ldur w9, [x29, #-40] subs w9, w9, #1 ldr x8, [x8, w9, sxtw #3] ldursw x9, [x29, #-44] ldr w8, [x8, x9, lsl #2] ldur x9, [x29, #-24] ldursw x10, [x29, #-40] ldr x9, [x9, x10, lsl #3] ldursw x10, [x29, #-44] str w8, [x9, x10, lsl #2] b LBB0_9 LBB0_9: ; in Loop: Header=BB0_7 Depth=2 ldur w8, [x29, #-44] add w8, w8, #1 stur w8, [x29, #-44] b LBB0_7 LBB0_10: ; in Loop: Header=BB0_5 Depth=1 ldur x8, [x29, #-24] ldursw x9, [x29, #-40] ldr x8, [x8, x9, lsl #3] ldur x9, [x29, #-16] ldur w10, [x29, #-40] subs w10, w10, #1 ldrsw x9, [x9, w10, sxtw #2] add x9, x8, x9, lsl #2 ldr w8, [x9] add w8, w8, #1 str w8, [x9] b LBB0_11 LBB0_11: ; in Loop: Header=BB0_5 Depth=1 ldur w8, [x29, #-40] add w8, w8, #1 stur w8, [x29, #-40] b LBB0_5 LBB0_12: mov w8, #1 str w8, [sp, #48] b LBB0_13 LBB0_13: ; =>This Loop Header: Depth=1 ; Child Loop BB0_15 Depth 2 ; Child Loop BB0_17 Depth 3 ; Child Loop BB0_22 Depth 3 ; Child Loop BB0_29 Depth 2 ; Child Loop BB0_31 Depth 3 ldr w8, [sp, #48] subs w8, w8, #3 cset w8, ge tbnz w8, #0, LBB0_38 b LBB0_14 LBB0_14: ; in Loop: Header=BB0_13 Depth=1 mov w8, #1 str w8, [sp, #44] b LBB0_15 LBB0_15: ; Parent Loop BB0_13 Depth=1 ; => This Loop Header: Depth=2 ; Child Loop BB0_17 Depth 3 ; Child Loop BB0_22 Depth 3 ldr w8, [sp, #44] ldur w9, [x29, #-4] subs w8, w8, w9 cset w8, gt tbnz w8, #0, LBB0_28 b LBB0_16 LBB0_16: ; in Loop: Header=BB0_15 Depth=2 str wzr, [sp, #40] b LBB0_17 LBB0_17: ; Parent Loop BB0_13 Depth=1 ; Parent Loop BB0_15 Depth=2 ; => This Inner Loop Header: Depth=3 ldr w8, [sp, #40] subs w8, w8, #3 cset w8, ge tbnz w8, #0, LBB0_20 b LBB0_18 LBB0_18: ; in Loop: Header=BB0_17 Depth=3 ldur x8, [x29, #-32] ldr w9, [sp, #44] subs w9, w9, #1 ldr x8, [x8, w9, sxtw #3] ldrsw x9, [sp, #40] ldr w8, [x8, x9, lsl #2] ldur x9, [x29, #-32] ldrsw x10, [sp, #44] ldr x9, [x9, x10, lsl #3] ldrsw x10, [sp, #40] str w8, [x9, x10, lsl #2] b LBB0_19 LBB0_19: ; in Loop: Header=BB0_17 Depth=3 ldr w8, [sp, #40] add w8, w8, #1 str w8, [sp, #40] b LBB0_17 LBB0_20: ; in Loop: Header=BB0_15 Depth=2 ldr w8, [sp, #44] subs w8, w8, #1 cset w8, lt tbnz w8, #0, LBB0_26 b LBB0_21 LBB0_21: ; in Loop: Header=BB0_15 Depth=2 str wzr, [sp, #36] b LBB0_22 LBB0_22: ; Parent Loop BB0_13 Depth=1 ; Parent Loop BB0_15 Depth=2 ; => This Inner Loop Header: Depth=3 ldr w8, [sp, #36] subs w8, w8, #2 cset w8, gt tbnz w8, #0, LBB0_25 b LBB0_23 LBB0_23: ; in Loop: Header=BB0_22 Depth=3 ldur x8, [x29, #-24] ldr w9, [sp, #44] subs w9, w9, #1 ldr x8, [x8, w9, sxtw #3] ldrsw x9, [sp, #36] ldr w10, [x8, x9, lsl #2] ldur x8, [x29, #-32] ldrsw x9, [sp, #44] ldr x8, [x8, x9, lsl #3] ldur x9, [x29, #-16] ldr w11, [sp, #44] subs w11, w11, #1 ldr w9, [x9, w11, sxtw #2] ldr w11, [sp, #36] add w9, w9, w11 mov w12, #3 sdiv w11, w9, w12 mul w11, w11, w12 subs w9, w9, w11 add x9, x8, w9, sxtw #2 ldr w8, [x9] add w8, w8, w10 str w8, [x9] b LBB0_24 LBB0_24: ; in Loop: Header=BB0_22 Depth=3 ldr w8, [sp, #36] add w8, w8, #1 str w8, [sp, #36] b LBB0_22 LBB0_25: ; in Loop: Header=BB0_15 Depth=2 b LBB0_26 LBB0_26: ; in Loop: Header=BB0_15 Depth=2 b LBB0_27 LBB0_27: ; in Loop: Header=BB0_15 Depth=2 ldr w8, [sp, #44] add w8, w8, #1 str w8, [sp, #44] b LBB0_15 LBB0_28: ; in Loop: Header=BB0_13 Depth=1 str wzr, [sp, #32] b LBB0_29 LBB0_29: ; Parent Loop BB0_13 Depth=1 ; => This Loop Header: Depth=2 ; Child Loop BB0_31 Depth 3 ldr w8, [sp, #32] ldur w9, [x29, #-4] subs w8, w8, w9 cset w8, gt tbnz w8, #0, LBB0_36 b LBB0_30 LBB0_30: ; in Loop: Header=BB0_29 Depth=2 str wzr, [sp, #28] b LBB0_31 LBB0_31: ; Parent Loop BB0_13 Depth=1 ; Parent Loop BB0_29 Depth=2 ; => This Inner Loop Header: Depth=3 ldr w8, [sp, #28] subs w8, w8, #3 cset w8, ge tbnz w8, #0, LBB0_34 b LBB0_32 LBB0_32: ; in Loop: Header=BB0_31 Depth=3 ldur x8, [x29, #-32] ldrsw x9, [sp, #32] ldr x8, [x8, x9, lsl #3] ldrsw x9, [sp, #28] ldr w8, [x8, x9, lsl #2] ldur x9, [x29, #-24] ldrsw x10, [sp, #32] ldr x9, [x9, x10, lsl #3] ldrsw x10, [sp, #28] str w8, [x9, x10, lsl #2] ldur x8, [x29, #-32] ldrsw x9, [sp, #32] ldr x9, [x8, x9, lsl #3] ldrsw x10, [sp, #28] mov w8, #0 str w8, [x9, x10, lsl #2] b LBB0_33 LBB0_33: ; in Loop: Header=BB0_31 Depth=3 ldr w8, [sp, #28] add w8, w8, #1 str w8, [sp, #28] b LBB0_31 LBB0_34: ; in Loop: Header=BB0_29 Depth=2 b LBB0_35 LBB0_35: ; in Loop: Header=BB0_29 Depth=2 ldr w8, [sp, #32] add w8, w8, #1 str w8, [sp, #32] b LBB0_29 LBB0_36: ; in Loop: Header=BB0_13 Depth=1 b LBB0_37 LBB0_37: ; in Loop: Header=BB0_13 Depth=1 ldr w8, [sp, #48] add w8, w8, #1 str w8, [sp, #48] b LBB0_13 LBB0_38: ldur x8, [x29, #-24] ldursw x9, [x29, #-4] ldr x8, [x8, x9, lsl #3] ldr w8, [x8] str w8, [sp, #24] str wzr, [sp, #20] b LBB0_39 LBB0_39: ; =>This Inner Loop Header: Depth=1 ldr w8, [sp, #20] ldur w9, [x29, #-4] subs w8, w8, w9 cset w8, gt tbnz w8, #0, LBB0_42 b LBB0_40 LBB0_40: ; in Loop: Header=BB0_39 Depth=1 ldur x8, [x29, #-24] ldrsw x9, [sp, #20] ldr x0, [x8, x9, lsl #3] bl _free ldur x8, [x29, #-32] ldrsw x9, [sp, #20] ldr x0, [x8, x9, lsl #3] bl _free b LBB0_41 LBB0_41: ; in Loop: Header=BB0_39 Depth=1 ldr w8, [sp, #20] add w8, w8, #1 str w8, [sp, #20] b LBB0_39 LBB0_42: ldur x0, [x29, #-24] bl _free ldur x0, [x29, #-32] bl _free ldur x0, [x29, #-16] bl _free ldr w0, [sp, #24] ldp x29, x30, [sp, #96] ; 16-byte Folded Reload add sp, sp, #112 ret .cfi_endproc ; -- End function .subsections_via_symbols
eval/problem148/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ## -- Begin function func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp subq $144, %rsp movq ___stack_chk_guard@GOTPCREL(%rip), %rax movq (%rax), %rax movq %rax, -8(%rbp) movq %rdi, -96(%rbp) movq %rsi, -104(%rbp) movq %rdx, -112(%rbp) leaq -80(%rbp), %rdi leaq l___const.func0.planets(%rip), %rsi movl $64, %edx callq _memcpy movl $-1, -116(%rbp) movl $-1, -120(%rbp) movl $0, -124(%rbp) LBB0_1: ## =>This Inner Loop Header: Depth=1 cmpl $8, -124(%rbp) jge LBB0_8 ## %bb.2: ## in Loop: Header=BB0_1 Depth=1 movslq -124(%rbp), %rax movq -80(%rbp,%rax,8), %rdi movq -96(%rbp), %rsi callq _strcmp cmpl $0, %eax jne LBB0_4 ## %bb.3: ## in Loop: Header=BB0_1 Depth=1 movl -124(%rbp), %eax movl %eax, -116(%rbp) LBB0_4: ## in Loop: Header=BB0_1 Depth=1 movslq -124(%rbp), %rax movq -80(%rbp,%rax,8), %rdi movq -104(%rbp), %rsi callq _strcmp cmpl $0, %eax jne LBB0_6 ## %bb.5: ## in Loop: Header=BB0_1 Depth=1 movl -124(%rbp), %eax movl %eax, -120(%rbp) LBB0_6: ## in Loop: Header=BB0_1 Depth=1 jmp LBB0_7 LBB0_7: ## in Loop: Header=BB0_1 Depth=1 movl -124(%rbp), %eax addl $1, %eax movl %eax, -124(%rbp) jmp LBB0_1 LBB0_8: cmpl $-1, -116(%rbp) je LBB0_11 ## %bb.9: cmpl $-1, -120(%rbp) je LBB0_11 ## %bb.10: movl -116(%rbp), %eax cmpl -120(%rbp), %eax jne LBB0_12 LBB0_11: movq -112(%rbp), %rax movl $0, (%rax) movq $0, -88(%rbp) jmp LBB0_21 LBB0_12: movl -116(%rbp), %eax cmpl -120(%rbp), %eax jle LBB0_14 ## %bb.13: movl -116(%rbp), %eax movl %eax, -128(%rbp) movl -120(%rbp), %eax movl %eax, -116(%rbp) movl -128(%rbp), %eax movl %eax, -120(%rbp) LBB0_14: movl -120(%rbp), %ecx subl -116(%rbp), %ecx subl $1, %ecx movq -112(%rbp), %rax movl %ecx, (%rax) movq -112(%rbp), %rax cmpl $0, (%rax) jg LBB0_16 ## %bb.15: movq -112(%rbp), %rax movl $0, (%rax) movq $0, -88(%rbp) jmp LBB0_21 LBB0_16: movq -112(%rbp), %rax movslq (%rax), %rdi shlq $3, %rdi callq _malloc movq %rax, -136(%rbp) movl -116(%rbp), %eax addl $1, %eax movl %eax, -124(%rbp) LBB0_17: ## =>This Inner Loop Header: Depth=1 movl -124(%rbp), %eax cmpl -120(%rbp), %eax jge LBB0_20 ## %bb.18: ## in Loop: Header=BB0_17 Depth=1 movslq -124(%rbp), %rax movq -80(%rbp,%rax,8), %rdx movq -136(%rbp), %rax movl -124(%rbp), %ecx subl -116(%rbp), %ecx subl $1, %ecx movslq %ecx, %rcx movq %rdx, (%rax,%rcx,8) ## %bb.19: ## in Loop: Header=BB0_17 Depth=1 movl -124(%rbp), %eax addl $1, %eax movl %eax, -124(%rbp) jmp LBB0_17 LBB0_20: movq -136(%rbp), %rax movq %rax, -88(%rbp) LBB0_21: movq -88(%rbp), %rax movq %rax, -144(%rbp) ## 8-byte Spill movq ___stack_chk_guard@GOTPCREL(%rip), %rax movq (%rax), %rax movq -8(%rbp), %rcx cmpq %rcx, %rax jne LBB0_23 ## %bb.22: movq -144(%rbp), %rax ## 8-byte Reload addq $144, %rsp popq %rbp retq LBB0_23: callq ___stack_chk_fail ud2 .cfi_endproc ## -- End function .section __TEXT,__cstring,cstring_literals L_.str: ## @.str .asciz "Mercury" L_.str.1: ## @.str.1 .asciz "Venus" L_.str.2: ## @.str.2 .asciz "Earth" L_.str.3: ## @.str.3 .asciz "Mars" L_.str.4: ## @.str.4 .asciz "Jupiter" L_.str.5: ## @.str.5 .asciz "Saturn" L_.str.6: ## @.str.6 .asciz "Uranus" L_.str.7: ## @.str.7 .asciz "Neptune" .section __DATA,__const .p2align 4 ## @__const.func0.planets l___const.func0.planets: .quad L_.str .quad L_.str.1 .quad L_.str.2 .quad L_.str.3 .quad L_.str.4 .quad L_.str.5 .quad L_.str.6 .quad L_.str.7 .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #160 .cfi_def_cfa_offset 160 stp x29, x30, [sp, #144] ; 16-byte Folded Spill add x29, sp, #144 .cfi_def_cfa w29, 16 .cfi_offset w30, -8 .cfi_offset w29, -16 adrp x8, ___stack_chk_guard@GOTPAGE ldr x8, [x8, ___stack_chk_guard@GOTPAGEOFF] ldr x8, [x8] stur x8, [x29, #-8] str x0, [sp, #56] str x1, [sp, #48] str x2, [sp, #40] add x0, sp, #72 adrp x1, l___const.func0.planets@PAGE add x1, x1, l___const.func0.planets@PAGEOFF mov x2, #64 bl _memcpy mov w8, #-1 str w8, [sp, #36] str w8, [sp, #32] str wzr, [sp, #28] b LBB0_1 LBB0_1: ; =>This Inner Loop Header: Depth=1 ldr w8, [sp, #28] subs w8, w8, #8 cset w8, ge tbnz w8, #0, LBB0_8 b LBB0_2 LBB0_2: ; in Loop: Header=BB0_1 Depth=1 ldrsw x9, [sp, #28] add x8, sp, #72 ldr x0, [x8, x9, lsl #3] ldr x1, [sp, #56] bl _strcmp subs w8, w0, #0 cset w8, ne tbnz w8, #0, LBB0_4 b LBB0_3 LBB0_3: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #28] str w8, [sp, #36] b LBB0_4 LBB0_4: ; in Loop: Header=BB0_1 Depth=1 ldrsw x9, [sp, #28] add x8, sp, #72 ldr x0, [x8, x9, lsl #3] ldr x1, [sp, #48] bl _strcmp subs w8, w0, #0 cset w8, ne tbnz w8, #0, LBB0_6 b LBB0_5 LBB0_5: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #28] str w8, [sp, #32] b LBB0_6 LBB0_6: ; in Loop: Header=BB0_1 Depth=1 b LBB0_7 LBB0_7: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #28] add w8, w8, #1 str w8, [sp, #28] b LBB0_1 LBB0_8: ldr w8, [sp, #36] adds w8, w8, #1 cset w8, eq tbnz w8, #0, LBB0_11 b LBB0_9 LBB0_9: ldr w8, [sp, #32] adds w8, w8, #1 cset w8, eq tbnz w8, #0, LBB0_11 b LBB0_10 LBB0_10: ldr w8, [sp, #36] ldr w9, [sp, #32] subs w8, w8, w9 cset w8, ne tbnz w8, #0, LBB0_12 b LBB0_11 LBB0_11: ldr x8, [sp, #40] str wzr, [x8] ; kill: def $x8 killed $xzr str xzr, [sp, #64] b LBB0_21 LBB0_12: ldr w8, [sp, #36] ldr w9, [sp, #32] subs w8, w8, w9 cset w8, le tbnz w8, #0, LBB0_14 b LBB0_13 LBB0_13: ldr w8, [sp, #36] str w8, [sp, #24] ldr w8, [sp, #32] str w8, [sp, #36] ldr w8, [sp, #24] str w8, [sp, #32] b LBB0_14 LBB0_14: ldr w8, [sp, #32] ldr w9, [sp, #36] subs w8, w8, w9 subs w8, w8, #1 ldr x9, [sp, #40] str w8, [x9] ldr x8, [sp, #40] ldr w8, [x8] subs w8, w8, #0 cset w8, gt tbnz w8, #0, LBB0_16 b LBB0_15 LBB0_15: ldr x8, [sp, #40] str wzr, [x8] ; kill: def $x8 killed $xzr str xzr, [sp, #64] b LBB0_21 LBB0_16: ldr x8, [sp, #40] ldrsw x8, [x8] lsl x0, x8, #3 bl _malloc str x0, [sp, #16] ldr w8, [sp, #36] add w8, w8, #1 str w8, [sp, #28] b LBB0_17 LBB0_17: ; =>This Inner Loop Header: Depth=1 ldr w8, [sp, #28] ldr w9, [sp, #32] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_20 b LBB0_18 LBB0_18: ; in Loop: Header=BB0_17 Depth=1 ldrsw x9, [sp, #28] add x8, sp, #72 ldr x8, [x8, x9, lsl #3] ldr x9, [sp, #16] ldr w10, [sp, #28] ldr w11, [sp, #36] subs w10, w10, w11 subs w10, w10, #1 str x8, [x9, w10, sxtw #3] b LBB0_19 LBB0_19: ; in Loop: Header=BB0_17 Depth=1 ldr w8, [sp, #28] add w8, w8, #1 str w8, [sp, #28] b LBB0_17 LBB0_20: ldr x8, [sp, #16] str x8, [sp, #64] b LBB0_21 LBB0_21: ldr x8, [sp, #64] str x8, [sp, #8] ; 8-byte Folded Spill ldur x9, [x29, #-8] adrp x8, ___stack_chk_guard@GOTPAGE ldr x8, [x8, ___stack_chk_guard@GOTPAGEOFF] ldr x8, [x8] subs x8, x8, x9 cset w8, eq tbnz w8, #0, LBB0_23 b LBB0_22 LBB0_22: bl ___stack_chk_fail LBB0_23: ldr x0, [sp, #8] ; 8-byte Folded Reload ldp x29, x30, [sp, #144] ; 16-byte Folded Reload add sp, sp, #160 ret .cfi_endproc ; -- End function .section __TEXT,__cstring,cstring_literals l_.str: ; @.str .asciz "Mercury" l_.str.1: ; @.str.1 .asciz "Venus" l_.str.2: ; @.str.2 .asciz "Earth" l_.str.3: ; @.str.3 .asciz "Mars" l_.str.4: ; @.str.4 .asciz "Jupiter" l_.str.5: ; @.str.5 .asciz "Saturn" l_.str.6: ; @.str.6 .asciz "Uranus" l_.str.7: ; @.str.7 .asciz "Neptune" .section __DATA,__const .p2align 3 ; @__const.func0.planets l___const.func0.planets: .quad l_.str .quad l_.str.1 .quad l_.str.2 .quad l_.str.3 .quad l_.str.4 .quad l_.str.5 .quad l_.str.6 .quad l_.str.7 .subsections_via_symbols
eval/problem149/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ## -- Begin function func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp subq $64, %rsp movq %rdi, -8(%rbp) movq %rsi, -16(%rbp) movq -8(%rbp), %rdi callq _strlen ## kill: def $eax killed $eax killed $rax movl %eax, -20(%rbp) movslq -20(%rbp), %rdi shlq $3, %rdi callq _malloc movq %rax, -32(%rbp) movl -20(%rbp), %eax addl $1, %eax movslq %eax, %rdi callq _malloc movq %rax, -40(%rbp) movq -40(%rbp), %rax movb $0, (%rax) movl $0, -44(%rbp) LBB0_1: ## =>This Inner Loop Header: Depth=1 movl -44(%rbp), %eax cmpl -20(%rbp), %eax jge LBB0_4 ## %bb.2: ## in Loop: Header=BB0_1 Depth=1 movq -40(%rbp), %rdi callq _strlen movq %rax, -56(%rbp) movq -40(%rbp), %rdi movq -56(%rbp), %rsi addq $2, %rsi callq _realloc movq %rax, -40(%rbp) movq -8(%rbp), %rax movslq -44(%rbp), %rcx movb (%rax,%rcx), %dl movq -40(%rbp), %rax movq -56(%rbp), %rcx movb %dl, (%rax,%rcx) movq -40(%rbp), %rax movq -56(%rbp), %rcx movb $0, 1(%rax,%rcx) movq -40(%rbp), %rdi callq _strlen movq %rax, %rdi addq $1, %rdi callq _malloc movq %rax, %rdx movq -32(%rbp), %rax movslq -44(%rbp), %rcx movq %rdx, (%rax,%rcx,8) movq -32(%rbp), %rax movslq -44(%rbp), %rcx movq (%rax,%rcx,8), %rdi movq -40(%rbp), %rsi movq $-1, %rdx callq ___strcpy_chk ## %bb.3: ## in Loop: Header=BB0_1 Depth=1 movl -44(%rbp), %eax addl $1, %eax movl %eax, -44(%rbp) jmp LBB0_1 LBB0_4: movq -40(%rbp), %rdi callq _free movl -20(%rbp), %ecx movq -16(%rbp), %rax movl %ecx, (%rax) movq -32(%rbp), %rax addq $64, %rsp popq %rbp retq .cfi_endproc ## -- End function .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #80 .cfi_def_cfa_offset 80 stp x29, x30, [sp, #64] ; 16-byte Folded Spill add x29, sp, #64 .cfi_def_cfa w29, 16 .cfi_offset w30, -8 .cfi_offset w29, -16 stur x0, [x29, #-8] stur x1, [x29, #-16] ldur x0, [x29, #-8] bl _strlen mov x8, x0 stur w8, [x29, #-20] ldursw x8, [x29, #-20] lsl x0, x8, #3 bl _malloc str x0, [sp, #32] ldur w8, [x29, #-20] add w9, w8, #1 ; implicit-def: $x8 mov x8, x9 sxtw x0, w8 bl _malloc str x0, [sp, #24] ldr x8, [sp, #24] strb wzr, [x8] str wzr, [sp, #20] b LBB0_1 LBB0_1: ; =>This Inner Loop Header: Depth=1 ldr w8, [sp, #20] ldur w9, [x29, #-20] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_4 b LBB0_2 LBB0_2: ; in Loop: Header=BB0_1 Depth=1 ldr x0, [sp, #24] bl _strlen str x0, [sp, #8] ldr x0, [sp, #24] ldr x8, [sp, #8] add x1, x8, #2 bl _realloc str x0, [sp, #24] ldur x8, [x29, #-8] ldrsw x9, [sp, #20] add x8, x8, x9 ldrb w8, [x8] ldr x9, [sp, #24] ldr x10, [sp, #8] add x9, x9, x10 strb w8, [x9] ldr x8, [sp, #24] ldr x9, [sp, #8] add x9, x9, #1 add x8, x8, x9 strb wzr, [x8] ldr x0, [sp, #24] bl _strlen add x0, x0, #1 bl _malloc ldr x8, [sp, #32] ldrsw x9, [sp, #20] str x0, [x8, x9, lsl #3] ldr x8, [sp, #32] ldrsw x9, [sp, #20] ldr x0, [x8, x9, lsl #3] ldr x1, [sp, #24] mov x2, #-1 bl ___strcpy_chk b LBB0_3 LBB0_3: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #20] add w8, w8, #1 str w8, [sp, #20] b LBB0_1 LBB0_4: ldr x0, [sp, #24] bl _free ldur w8, [x29, #-20] ldur x9, [x29, #-16] str w8, [x9] ldr x0, [sp, #32] ldp x29, x30, [sp, #64] ; 16-byte Folded Reload add sp, sp, #80 ret .cfi_endproc ; -- End function .subsections_via_symbols
eval/problem15/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ## -- Begin function func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp subq $64, %rsp movq %rdi, -8(%rbp) movl %esi, -12(%rbp) movq %rdx, -24(%rbp) movq -24(%rbp), %rax movl $0, (%rax) movl $0, -28(%rbp) LBB0_1: ## =>This Inner Loop Header: Depth=1 movl -28(%rbp), %eax cmpl -12(%rbp), %eax jge LBB0_6 ## %bb.2: ## in Loop: Header=BB0_1 Depth=1 movq -8(%rbp), %rax movslq -28(%rbp), %rcx movq (%rax,%rcx,8), %rdi callq _strlen andq $1, %rax cmpq $0, %rax jne LBB0_4 ## %bb.3: ## in Loop: Header=BB0_1 Depth=1 movq -8(%rbp), %rax movslq -28(%rbp), %rcx movq (%rax,%rcx,8), %rdx movq -8(%rbp), %rax movq -24(%rbp), %rcx movslq (%rcx), %rcx movq %rdx, (%rax,%rcx,8) movq -24(%rbp), %rax movl (%rax), %ecx addl $1, %ecx movl %ecx, (%rax) LBB0_4: ## in Loop: Header=BB0_1 Depth=1 jmp LBB0_5 LBB0_5: ## in Loop: Header=BB0_1 Depth=1 movl -28(%rbp), %eax addl $1, %eax movl %eax, -28(%rbp) jmp LBB0_1 LBB0_6: movl $0, -28(%rbp) LBB0_7: ## =>This Loop Header: Depth=1 ## Child Loop BB0_9 Depth 2 movl -28(%rbp), %eax movq -24(%rbp), %rcx movl (%rcx), %ecx subl $1, %ecx cmpl %ecx, %eax jge LBB0_18 ## %bb.8: ## in Loop: Header=BB0_7 Depth=1 movl $0, -32(%rbp) LBB0_9: ## Parent Loop BB0_7 Depth=1 ## => This Inner Loop Header: Depth=2 movl -32(%rbp), %eax movq -24(%rbp), %rcx movl (%rcx), %ecx subl -28(%rbp), %ecx subl $1, %ecx cmpl %ecx, %eax jge LBB0_16 ## %bb.10: ## in Loop: Header=BB0_9 Depth=2 movq -8(%rbp), %rax movslq -32(%rbp), %rcx movq (%rax,%rcx,8), %rdi callq _strlen movq %rax, -48(%rbp) movq -8(%rbp), %rax movl -32(%rbp), %ecx addl $1, %ecx movslq %ecx, %rcx movq (%rax,%rcx,8), %rdi callq _strlen movq %rax, -56(%rbp) movq -48(%rbp), %rax cmpq -56(%rbp), %rax ja LBB0_13 ## %bb.11: ## in Loop: Header=BB0_9 Depth=2 movq -48(%rbp), %rax cmpq -56(%rbp), %rax jne LBB0_14 ## %bb.12: ## in Loop: Header=BB0_9 Depth=2 movq -8(%rbp), %rax movslq -32(%rbp), %rcx movq (%rax,%rcx,8), %rdi movq -8(%rbp), %rax movl -32(%rbp), %ecx addl $1, %ecx movslq %ecx, %rcx movq (%rax,%rcx,8), %rsi callq _strcmp cmpl $0, %eax jle LBB0_14 LBB0_13: ## in Loop: Header=BB0_9 Depth=2 movq -8(%rbp), %rax movslq -32(%rbp), %rcx movq (%rax,%rcx,8), %rax movq %rax, -40(%rbp) movq -8(%rbp), %rax movl -32(%rbp), %ecx addl $1, %ecx movslq %ecx, %rcx movq (%rax,%rcx,8), %rdx movq -8(%rbp), %rax movslq -32(%rbp), %rcx movq %rdx, (%rax,%rcx,8) movq -40(%rbp), %rdx movq -8(%rbp), %rax movl -32(%rbp), %ecx addl $1, %ecx movslq %ecx, %rcx movq %rdx, (%rax,%rcx,8) LBB0_14: ## in Loop: Header=BB0_9 Depth=2 jmp LBB0_15 LBB0_15: ## in Loop: Header=BB0_9 Depth=2 movl -32(%rbp), %eax addl $1, %eax movl %eax, -32(%rbp) jmp LBB0_9 LBB0_16: ## in Loop: Header=BB0_7 Depth=1 jmp LBB0_17 LBB0_17: ## in Loop: Header=BB0_7 Depth=1 movl -28(%rbp), %eax addl $1, %eax movl %eax, -28(%rbp) jmp LBB0_7 LBB0_18: movq -24(%rbp), %rax movslq (%rax), %rdi shlq $3, %rdi callq _malloc movq %rax, -64(%rbp) movl $0, -28(%rbp) LBB0_19: ## =>This Inner Loop Header: Depth=1 movl -28(%rbp), %eax movq -24(%rbp), %rcx cmpl (%rcx), %eax jge LBB0_22 ## %bb.20: ## in Loop: Header=BB0_19 Depth=1 movq -8(%rbp), %rax movslq -28(%rbp), %rcx movq (%rax,%rcx,8), %rdx movq -64(%rbp), %rax movslq -28(%rbp), %rcx movq %rdx, (%rax,%rcx,8) ## %bb.21: ## in Loop: Header=BB0_19 Depth=1 movl -28(%rbp), %eax addl $1, %eax movl %eax, -28(%rbp) jmp LBB0_19 LBB0_22: movq -64(%rbp), %rax addq $64, %rsp popq %rbp retq .cfi_endproc ## -- End function .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #80 .cfi_def_cfa_offset 80 stp x29, x30, [sp, #64] ; 16-byte Folded Spill add x29, sp, #64 .cfi_def_cfa w29, 16 .cfi_offset w30, -8 .cfi_offset w29, -16 stur x0, [x29, #-8] stur w1, [x29, #-12] stur x2, [x29, #-24] ldur x8, [x29, #-24] str wzr, [x8] stur wzr, [x29, #-28] b LBB0_1 LBB0_1: ; =>This Inner Loop Header: Depth=1 ldur w8, [x29, #-28] ldur w9, [x29, #-12] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_6 b LBB0_2 LBB0_2: ; in Loop: Header=BB0_1 Depth=1 ldur x8, [x29, #-8] ldursw x9, [x29, #-28] ldr x0, [x8, x9, lsl #3] bl _strlen mov x9, #2 udiv x8, x0, x9 mul x8, x8, x9 subs x8, x0, x8 subs x8, x8, #0 cset w8, ne tbnz w8, #0, LBB0_4 b LBB0_3 LBB0_3: ; in Loop: Header=BB0_1 Depth=1 ldur x8, [x29, #-8] ldursw x9, [x29, #-28] ldr x8, [x8, x9, lsl #3] ldur x9, [x29, #-8] ldur x10, [x29, #-24] ldrsw x10, [x10] str x8, [x9, x10, lsl #3] ldur x9, [x29, #-24] ldr w8, [x9] add w8, w8, #1 str w8, [x9] b LBB0_4 LBB0_4: ; in Loop: Header=BB0_1 Depth=1 b LBB0_5 LBB0_5: ; in Loop: Header=BB0_1 Depth=1 ldur w8, [x29, #-28] add w8, w8, #1 stur w8, [x29, #-28] b LBB0_1 LBB0_6: stur wzr, [x29, #-28] b LBB0_7 LBB0_7: ; =>This Loop Header: Depth=1 ; Child Loop BB0_9 Depth 2 ldur w8, [x29, #-28] ldur x9, [x29, #-24] ldr w9, [x9] subs w9, w9, #1 subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_18 b LBB0_8 LBB0_8: ; in Loop: Header=BB0_7 Depth=1 str wzr, [sp, #32] b LBB0_9 LBB0_9: ; Parent Loop BB0_7 Depth=1 ; => This Inner Loop Header: Depth=2 ldr w8, [sp, #32] ldur x9, [x29, #-24] ldr w9, [x9] ldur w10, [x29, #-28] subs w9, w9, w10 subs w9, w9, #1 subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_16 b LBB0_10 LBB0_10: ; in Loop: Header=BB0_9 Depth=2 ldur x8, [x29, #-8] ldrsw x9, [sp, #32] ldr x0, [x8, x9, lsl #3] bl _strlen str x0, [sp, #16] ldur x8, [x29, #-8] ldr w9, [sp, #32] add w9, w9, #1 ldr x0, [x8, w9, sxtw #3] bl _strlen str x0, [sp, #8] ldr x8, [sp, #16] ldr x9, [sp, #8] subs x8, x8, x9 cset w8, hi tbnz w8, #0, LBB0_13 b LBB0_11 LBB0_11: ; in Loop: Header=BB0_9 Depth=2 ldr x8, [sp, #16] ldr x9, [sp, #8] subs x8, x8, x9 cset w8, ne tbnz w8, #0, LBB0_14 b LBB0_12 LBB0_12: ; in Loop: Header=BB0_9 Depth=2 ldur x8, [x29, #-8] ldrsw x9, [sp, #32] ldr x0, [x8, x9, lsl #3] ldur x8, [x29, #-8] ldr w9, [sp, #32] add w9, w9, #1 ldr x1, [x8, w9, sxtw #3] bl _strcmp subs w8, w0, #0 cset w8, le tbnz w8, #0, LBB0_14 b LBB0_13 LBB0_13: ; in Loop: Header=BB0_9 Depth=2 ldur x8, [x29, #-8] ldrsw x9, [sp, #32] ldr x8, [x8, x9, lsl #3] str x8, [sp, #24] ldur x8, [x29, #-8] ldr w9, [sp, #32] add w9, w9, #1 ldr x8, [x8, w9, sxtw #3] ldur x9, [x29, #-8] ldrsw x10, [sp, #32] str x8, [x9, x10, lsl #3] ldr x8, [sp, #24] ldur x9, [x29, #-8] ldr w10, [sp, #32] add w10, w10, #1 str x8, [x9, w10, sxtw #3] b LBB0_14 LBB0_14: ; in Loop: Header=BB0_9 Depth=2 b LBB0_15 LBB0_15: ; in Loop: Header=BB0_9 Depth=2 ldr w8, [sp, #32] add w8, w8, #1 str w8, [sp, #32] b LBB0_9 LBB0_16: ; in Loop: Header=BB0_7 Depth=1 b LBB0_17 LBB0_17: ; in Loop: Header=BB0_7 Depth=1 ldur w8, [x29, #-28] add w8, w8, #1 stur w8, [x29, #-28] b LBB0_7 LBB0_18: ldur x8, [x29, #-24] ldrsw x8, [x8] lsl x0, x8, #3 bl _malloc str x0, [sp] stur wzr, [x29, #-28] b LBB0_19 LBB0_19: ; =>This Inner Loop Header: Depth=1 ldur w8, [x29, #-28] ldur x9, [x29, #-24] ldr w9, [x9] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_22 b LBB0_20 LBB0_20: ; in Loop: Header=BB0_19 Depth=1 ldur x8, [x29, #-8] ldursw x9, [x29, #-28] ldr x8, [x8, x9, lsl #3] ldr x9, [sp] ldursw x10, [x29, #-28] str x8, [x9, x10, lsl #3] b LBB0_21 LBB0_21: ; in Loop: Header=BB0_19 Depth=1 ldur w8, [x29, #-28] add w8, w8, #1 stur w8, [x29, #-28] b LBB0_19 LBB0_22: ldr x0, [sp] ldp x29, x30, [sp, #64] ; 16-byte Folded Reload add sp, sp, #80 ret .cfi_endproc ; -- End function .subsections_via_symbols
eval/problem150/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ## -- Begin function func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp movl %edi, -8(%rbp) movl %esi, -12(%rbp) movl %edx, -16(%rbp) movl $1, -20(%rbp) cmpl $2, -8(%rbp) jge LBB0_2 ## %bb.1: movl $0, -20(%rbp) LBB0_2: movl $2, -24(%rbp) LBB0_3: ## =>This Inner Loop Header: Depth=1 movl -24(%rbp), %eax imull -24(%rbp), %eax cmpl -8(%rbp), %eax jg LBB0_8 ## %bb.4: ## in Loop: Header=BB0_3 Depth=1 movl -8(%rbp), %eax cltd idivl -24(%rbp) cmpl $0, %edx jne LBB0_6 ## %bb.5: ## in Loop: Header=BB0_3 Depth=1 movl $0, -20(%rbp) LBB0_6: ## in Loop: Header=BB0_3 Depth=1 jmp LBB0_7 LBB0_7: ## in Loop: Header=BB0_3 Depth=1 movl -24(%rbp), %eax addl $1, %eax movl %eax, -24(%rbp) jmp LBB0_3 LBB0_8: cmpl $0, -20(%rbp) je LBB0_10 ## %bb.9: movl -12(%rbp), %eax movl %eax, -4(%rbp) jmp LBB0_11 LBB0_10: movl -16(%rbp), %eax movl %eax, -4(%rbp) LBB0_11: movl -4(%rbp), %eax popq %rbp retq .cfi_endproc ## -- End function .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #32 .cfi_def_cfa_offset 32 str w0, [sp, #24] str w1, [sp, #20] str w2, [sp, #16] mov w8, #1 str w8, [sp, #12] ldr w8, [sp, #24] subs w8, w8, #2 cset w8, ge tbnz w8, #0, LBB0_2 b LBB0_1 LBB0_1: str wzr, [sp, #12] b LBB0_2 LBB0_2: mov w8, #2 str w8, [sp, #8] b LBB0_3 LBB0_3: ; =>This Inner Loop Header: Depth=1 ldr w8, [sp, #8] ldr w9, [sp, #8] mul w8, w8, w9 ldr w9, [sp, #24] subs w8, w8, w9 cset w8, gt tbnz w8, #0, LBB0_8 b LBB0_4 LBB0_4: ; in Loop: Header=BB0_3 Depth=1 ldr w8, [sp, #24] ldr w10, [sp, #8] sdiv w9, w8, w10 mul w9, w9, w10 subs w8, w8, w9 subs w8, w8, #0 cset w8, ne tbnz w8, #0, LBB0_6 b LBB0_5 LBB0_5: ; in Loop: Header=BB0_3 Depth=1 str wzr, [sp, #12] b LBB0_6 LBB0_6: ; in Loop: Header=BB0_3 Depth=1 b LBB0_7 LBB0_7: ; in Loop: Header=BB0_3 Depth=1 ldr w8, [sp, #8] add w8, w8, #1 str w8, [sp, #8] b LBB0_3 LBB0_8: ldr w8, [sp, #12] subs w8, w8, #0 cset w8, eq tbnz w8, #0, LBB0_10 b LBB0_9 LBB0_9: ldr w8, [sp, #20] str w8, [sp, #28] b LBB0_11 LBB0_10: ldr w8, [sp, #16] str w8, [sp, #28] b LBB0_11 LBB0_11: ldr w0, [sp, #28] add sp, sp, #32 ret .cfi_endproc ; -- End function .subsections_via_symbols
eval/problem151/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .section __TEXT,__literal8,8byte_literals .p2align 3 ## -- Begin function func0 LCPI0_0: .quad 0x3f1a36e2eb1c432d ## double 1.0E-4 .section __TEXT,__literal16,16byte_literals .p2align 4 LCPI0_1: .quad 0x7fffffffffffffff ## double NaN .quad 0x7fffffffffffffff ## double NaN LCPI0_2: .quad 0x8000000000000000 ## double -0 .quad 0x8000000000000000 ## double -0 LCPI0_3: .quad 0x3fdfffffffffffff ## double 0.49999999999999994 .quad 0x3fdfffffffffffff ## double 0.49999999999999994 .section __TEXT,__text,regular,pure_instructions .globl _func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp movq %rdi, -8(%rbp) movl %esi, -12(%rbp) movq $0, -24(%rbp) movl $0, -28(%rbp) LBB0_1: ## =>This Inner Loop Header: Depth=1 movl -28(%rbp), %eax cmpl -12(%rbp), %eax jge LBB0_9 ## %bb.2: ## in Loop: Header=BB0_1 Depth=1 movq -8(%rbp), %rax movslq -28(%rbp), %rcx movss (%rax,%rcx,4), %xmm0 ## xmm0 = mem[0],zero,zero,zero cvtss2sd %xmm0, %xmm1 movq -8(%rbp), %rax movslq -28(%rbp), %rcx movss (%rax,%rcx,4), %xmm0 ## xmm0 = mem[0],zero,zero,zero cvtss2sd %xmm0, %xmm0 movaps %xmm0, %xmm2 movaps LCPI0_2(%rip), %xmm3 ## xmm3 = [-0.0E+0,-0.0E+0] pand %xmm3, %xmm2 movaps LCPI0_3(%rip), %xmm3 ## xmm3 = [4.9999999999999994E-1,4.9999999999999994E-1] por %xmm3, %xmm2 addsd %xmm2, %xmm0 roundsd $11, %xmm0, %xmm0 subsd %xmm0, %xmm1 movaps LCPI0_1(%rip), %xmm0 ## xmm0 = [NaN,NaN] pand %xmm0, %xmm1 movsd LCPI0_0(%rip), %xmm0 ## xmm0 = mem[0],zero ucomisd %xmm1, %xmm0 jbe LBB0_7 ## %bb.3: ## in Loop: Header=BB0_1 Depth=1 movq -8(%rbp), %rax movslq -28(%rbp), %rcx movss (%rax,%rcx,4), %xmm0 ## xmm0 = mem[0],zero,zero,zero xorps %xmm1, %xmm1 ucomiss %xmm1, %xmm0 jbe LBB0_6 ## %bb.4: ## in Loop: Header=BB0_1 Depth=1 movq -8(%rbp), %rax movslq -28(%rbp), %rcx movss (%rax,%rcx,4), %xmm0 ## xmm0 = mem[0],zero,zero,zero cvtss2sd %xmm0, %xmm0 movaps %xmm0, %xmm1 movaps LCPI0_2(%rip), %xmm2 ## xmm2 = [-0.0E+0,-0.0E+0] pand %xmm2, %xmm1 movaps LCPI0_3(%rip), %xmm2 ## xmm2 = [4.9999999999999994E-1,4.9999999999999994E-1] por %xmm2, %xmm1 addsd %xmm1, %xmm0 roundsd $11, %xmm0, %xmm0 cvttsd2si %xmm0, %eax movl $2, %ecx cltd idivl %ecx cmpl $1, %edx jne LBB0_6 ## %bb.5: ## in Loop: Header=BB0_1 Depth=1 movq -8(%rbp), %rax movslq -28(%rbp), %rcx movss (%rax,%rcx,4), %xmm0 ## xmm0 = mem[0],zero,zero,zero cvtss2sd %xmm0, %xmm0 movaps %xmm0, %xmm1 movaps LCPI0_2(%rip), %xmm2 ## xmm2 = [-0.0E+0,-0.0E+0] pand %xmm2, %xmm1 movaps LCPI0_3(%rip), %xmm2 ## xmm2 = [4.9999999999999994E-1,4.9999999999999994E-1] por %xmm2, %xmm1 addsd %xmm1, %xmm0 roundsd $11, %xmm0, %xmm0 cvttsd2si %xmm0, %eax movq -8(%rbp), %rcx movslq -28(%rbp), %rdx movss (%rcx,%rdx,4), %xmm0 ## xmm0 = mem[0],zero,zero,zero cvtss2sd %xmm0, %xmm0 movaps %xmm0, %xmm1 movaps LCPI0_2(%rip), %xmm2 ## xmm2 = [-0.0E+0,-0.0E+0] pand %xmm2, %xmm1 movaps LCPI0_3(%rip), %xmm2 ## xmm2 = [4.9999999999999994E-1,4.9999999999999994E-1] por %xmm2, %xmm1 addsd %xmm1, %xmm0 roundsd $11, %xmm0, %xmm0 cvttsd2si %xmm0, %ecx imull %ecx, %eax cltq addq -24(%rbp), %rax movq %rax, -24(%rbp) LBB0_6: ## in Loop: Header=BB0_1 Depth=1 jmp LBB0_7 LBB0_7: ## in Loop: Header=BB0_1 Depth=1 jmp LBB0_8 LBB0_8: ## in Loop: Header=BB0_1 Depth=1 movl -28(%rbp), %eax addl $1, %eax movl %eax, -28(%rbp) jmp LBB0_1 LBB0_9: movq -24(%rbp), %rax popq %rbp retq .cfi_endproc ## -- End function .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .section __TEXT,__literal8,8byte_literals .p2align 3 ; -- Begin function func0 lCPI0_0: .quad 0x3f1a36e2eb1c432d ; double 1.0E-4 .section __TEXT,__text,regular,pure_instructions .globl _func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #32 .cfi_def_cfa_offset 32 str x0, [sp, #24] str w1, [sp, #20] str xzr, [sp, #8] str wzr, [sp, #4] b LBB0_1 LBB0_1: ; =>This Inner Loop Header: Depth=1 ldr w8, [sp, #4] ldr w9, [sp, #20] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_9 b LBB0_2 LBB0_2: ; in Loop: Header=BB0_1 Depth=1 ldr x8, [sp, #24] ldrsw x9, [sp, #4] ldr s0, [x8, x9, lsl #2] fcvt d0, s0 ldr x8, [sp, #24] ldrsw x9, [sp, #4] ldr s1, [x8, x9, lsl #2] fcvt d1, s1 frinta d1, d1 fabd d0, d0, d1 adrp x8, lCPI0_0@PAGE ldr d1, [x8, lCPI0_0@PAGEOFF] fcmp d0, d1 cset w8, pl tbnz w8, #0, LBB0_7 b LBB0_3 LBB0_3: ; in Loop: Header=BB0_1 Depth=1 ldr x8, [sp, #24] ldrsw x9, [sp, #4] ldr s0, [x8, x9, lsl #2] fcmp s0, #0.0 cset w8, le tbnz w8, #0, LBB0_6 b LBB0_4 LBB0_4: ; in Loop: Header=BB0_1 Depth=1 ldr x8, [sp, #24] ldrsw x9, [sp, #4] ldr s0, [x8, x9, lsl #2] fcvt d0, s0 fcvtas w8, d0 mov w10, #2 sdiv w9, w8, w10 mul w9, w9, w10 subs w8, w8, w9 subs w8, w8, #1 cset w8, ne tbnz w8, #0, LBB0_6 b LBB0_5 LBB0_5: ; in Loop: Header=BB0_1 Depth=1 ldr x8, [sp, #24] ldrsw x9, [sp, #4] ldr s0, [x8, x9, lsl #2] fcvt d0, s0 fcvtas w8, d0 ldr x9, [sp, #24] ldrsw x10, [sp, #4] ldr s0, [x9, x10, lsl #2] fcvt d0, s0 fcvtas w9, d0 mul w9, w8, w9 ldr x8, [sp, #8] add x8, x8, w9, sxtw str x8, [sp, #8] b LBB0_6 LBB0_6: ; in Loop: Header=BB0_1 Depth=1 b LBB0_7 LBB0_7: ; in Loop: Header=BB0_1 Depth=1 b LBB0_8 LBB0_8: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #4] add w8, w8, #1 str w8, [sp, #4] b LBB0_1 LBB0_9: ldr x0, [sp, #8] add sp, sp, #32 ret .cfi_endproc ; -- End function .subsections_via_symbols
eval/problem152/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ## -- Begin function func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp subq $32, %rsp movq %rdi, -8(%rbp) movq %rsi, -16(%rbp) movq %rdx, -24(%rbp) movl %ecx, -28(%rbp) movl $0, -32(%rbp) LBB0_1: ## =>This Inner Loop Header: Depth=1 movl -32(%rbp), %eax cmpl -28(%rbp), %eax jge LBB0_4 ## %bb.2: ## in Loop: Header=BB0_1 Depth=1 movq -8(%rbp), %rax movslq -32(%rbp), %rcx movl (%rax,%rcx,4), %edi movq -16(%rbp), %rax movslq -32(%rbp), %rcx subl (%rax,%rcx,4), %edi callq _abs movl %eax, %edx movq -24(%rbp), %rax movslq -32(%rbp), %rcx movl %edx, (%rax,%rcx,4) ## %bb.3: ## in Loop: Header=BB0_1 Depth=1 movl -32(%rbp), %eax addl $1, %eax movl %eax, -32(%rbp) jmp LBB0_1 LBB0_4: addq $32, %rsp popq %rbp retq .cfi_endproc ## -- End function .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #48 .cfi_def_cfa_offset 48 stp x29, x30, [sp, #32] ; 16-byte Folded Spill add x29, sp, #32 .cfi_def_cfa w29, 16 .cfi_offset w30, -8 .cfi_offset w29, -16 stur x0, [x29, #-8] str x1, [sp, #16] str x2, [sp, #8] str w3, [sp, #4] str wzr, [sp] b LBB0_1 LBB0_1: ; =>This Inner Loop Header: Depth=1 ldr w8, [sp] ldr w9, [sp, #4] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_4 b LBB0_2 LBB0_2: ; in Loop: Header=BB0_1 Depth=1 ldur x8, [x29, #-8] ldrsw x9, [sp] ldr w8, [x8, x9, lsl #2] ldr x9, [sp, #16] ldrsw x10, [sp] ldr w9, [x9, x10, lsl #2] subs w0, w8, w9 bl _abs ldr x8, [sp, #8] ldrsw x9, [sp] str w0, [x8, x9, lsl #2] b LBB0_3 LBB0_3: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp] add w8, w8, #1 str w8, [sp] b LBB0_1 LBB0_4: ldp x29, x30, [sp, #32] ; 16-byte Folded Reload add sp, sp, #48 ret .cfi_endproc ; -- End function .subsections_via_symbols
eval/problem153/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ## -- Begin function func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp subq $80, %rsp movq %rdi, -8(%rbp) movq %rsi, -16(%rbp) movl %edx, -20(%rbp) movq %rcx, -32(%rbp) movl $-1000, -36(%rbp) ## imm = 0xFC18 movq $0, -48(%rbp) movl $0, -52(%rbp) LBB0_1: ## =>This Loop Header: Depth=1 ## Child Loop BB0_3 Depth 2 movl -52(%rbp), %eax cmpl -20(%rbp), %eax jge LBB0_16 ## %bb.2: ## in Loop: Header=BB0_1 Depth=1 movq -16(%rbp), %rax movslq -52(%rbp), %rcx movq (%rax,%rcx,8), %rax movq %rax, -64(%rbp) movl $0, -68(%rbp) movl $0, -72(%rbp) LBB0_3: ## Parent Loop BB0_1 Depth=1 ## => This Inner Loop Header: Depth=2 movq -64(%rbp), %rax movslq -72(%rbp), %rcx movsbl (%rax,%rcx), %eax cmpl $0, %eax je LBB0_12 ## %bb.4: ## in Loop: Header=BB0_3 Depth=2 movq -64(%rbp), %rax movslq -72(%rbp), %rcx movb (%rax,%rcx), %al movb %al, -73(%rbp) movsbl -73(%rbp), %eax cmpl $65, %eax jl LBB0_7 ## %bb.5: ## in Loop: Header=BB0_3 Depth=2 movsbl -73(%rbp), %eax cmpl $90, %eax jg LBB0_7 ## %bb.6: ## in Loop: Header=BB0_3 Depth=2 movl -68(%rbp), %eax addl $1, %eax movl %eax, -68(%rbp) LBB0_7: ## in Loop: Header=BB0_3 Depth=2 movsbl -73(%rbp), %eax cmpl $97, %eax jl LBB0_10 ## %bb.8: ## in Loop: Header=BB0_3 Depth=2 movsbl -73(%rbp), %eax cmpl $122, %eax jg LBB0_10 ## %bb.9: ## in Loop: Header=BB0_3 Depth=2 movl -68(%rbp), %eax addl $-1, %eax movl %eax, -68(%rbp) LBB0_10: ## in Loop: Header=BB0_3 Depth=2 jmp LBB0_11 LBB0_11: ## in Loop: Header=BB0_3 Depth=2 movl -72(%rbp), %eax addl $1, %eax movl %eax, -72(%rbp) jmp LBB0_3 LBB0_12: ## in Loop: Header=BB0_1 Depth=1 movl -68(%rbp), %eax cmpl -36(%rbp), %eax jle LBB0_14 ## %bb.13: ## in Loop: Header=BB0_1 Depth=1 movl -68(%rbp), %eax movl %eax, -36(%rbp) movq -64(%rbp), %rax movq %rax, -48(%rbp) LBB0_14: ## in Loop: Header=BB0_1 Depth=1 jmp LBB0_15 LBB0_15: ## in Loop: Header=BB0_1 Depth=1 movl -52(%rbp), %eax addl $1, %eax movl %eax, -52(%rbp) jmp LBB0_1 LBB0_16: movq -32(%rbp), %rdi movq -8(%rbp), %r8 movq -48(%rbp), %r9 xorl %esi, %esi movq $-1, %rdx leaq L_.str(%rip), %rcx movb $0, %al callq ___sprintf_chk addq $80, %rsp popq %rbp retq .cfi_endproc ## -- End function .section __TEXT,__cstring,cstring_literals L_.str: ## @.str .asciz "%s.%s" .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #112 .cfi_def_cfa_offset 112 stp x29, x30, [sp, #96] ; 16-byte Folded Spill add x29, sp, #96 .cfi_def_cfa w29, 16 .cfi_offset w30, -8 .cfi_offset w29, -16 stur x0, [x29, #-8] stur x1, [x29, #-16] stur w2, [x29, #-20] stur x3, [x29, #-32] mov w8, #-1000 stur w8, [x29, #-36] ; kill: def $x8 killed $xzr str xzr, [sp, #48] str wzr, [sp, #44] b LBB0_1 LBB0_1: ; =>This Loop Header: Depth=1 ; Child Loop BB0_3 Depth 2 ldr w8, [sp, #44] ldur w9, [x29, #-20] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_16 b LBB0_2 LBB0_2: ; in Loop: Header=BB0_1 Depth=1 ldur x8, [x29, #-16] ldrsw x9, [sp, #44] ldr x8, [x8, x9, lsl #3] str x8, [sp, #32] str wzr, [sp, #28] str wzr, [sp, #24] b LBB0_3 LBB0_3: ; Parent Loop BB0_1 Depth=1 ; => This Inner Loop Header: Depth=2 ldr x8, [sp, #32] ldrsw x9, [sp, #24] ldrsb w8, [x8, x9] subs w8, w8, #0 cset w8, eq tbnz w8, #0, LBB0_12 b LBB0_4 LBB0_4: ; in Loop: Header=BB0_3 Depth=2 ldr x8, [sp, #32] ldrsw x9, [sp, #24] add x8, x8, x9 ldrb w8, [x8] strb w8, [sp, #23] ldrsb w8, [sp, #23] subs w8, w8, #65 cset w8, lt tbnz w8, #0, LBB0_7 b LBB0_5 LBB0_5: ; in Loop: Header=BB0_3 Depth=2 ldrsb w8, [sp, #23] subs w8, w8, #90 cset w8, gt tbnz w8, #0, LBB0_7 b LBB0_6 LBB0_6: ; in Loop: Header=BB0_3 Depth=2 ldr w8, [sp, #28] add w8, w8, #1 str w8, [sp, #28] b LBB0_7 LBB0_7: ; in Loop: Header=BB0_3 Depth=2 ldrsb w8, [sp, #23] subs w8, w8, #97 cset w8, lt tbnz w8, #0, LBB0_10 b LBB0_8 LBB0_8: ; in Loop: Header=BB0_3 Depth=2 ldrsb w8, [sp, #23] subs w8, w8, #122 cset w8, gt tbnz w8, #0, LBB0_10 b LBB0_9 LBB0_9: ; in Loop: Header=BB0_3 Depth=2 ldr w8, [sp, #28] subs w8, w8, #1 str w8, [sp, #28] b LBB0_10 LBB0_10: ; in Loop: Header=BB0_3 Depth=2 b LBB0_11 LBB0_11: ; in Loop: Header=BB0_3 Depth=2 ldr w8, [sp, #24] add w8, w8, #1 str w8, [sp, #24] b LBB0_3 LBB0_12: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #28] ldur w9, [x29, #-36] subs w8, w8, w9 cset w8, le tbnz w8, #0, LBB0_14 b LBB0_13 LBB0_13: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #28] stur w8, [x29, #-36] ldr x8, [sp, #32] str x8, [sp, #48] b LBB0_14 LBB0_14: ; in Loop: Header=BB0_1 Depth=1 b LBB0_15 LBB0_15: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #44] add w8, w8, #1 str w8, [sp, #44] b LBB0_1 LBB0_16: ldur x0, [x29, #-32] ldur x10, [x29, #-8] ldr x8, [sp, #48] mov x9, sp str x10, [x9] str x8, [x9, #8] mov w1, #0 mov x2, #-1 adrp x3, l_.str@PAGE add x3, x3, l_.str@PAGEOFF bl ___sprintf_chk ldp x29, x30, [sp, #96] ; 16-byte Folded Reload add sp, sp, #112 ret .cfi_endproc ; -- End function .section __TEXT,__cstring,cstring_literals l_.str: ; @.str .asciz "%s.%s" .subsections_via_symbols
eval/problem154/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ## -- Begin function func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp subq $48, %rsp movq %rdi, -16(%rbp) movq %rsi, -24(%rbp) movq -16(%rbp), %rdi callq _strlen ## kill: def $eax killed $eax killed $rax movl %eax, -28(%rbp) movq -24(%rbp), %rdi callq _strlen ## kill: def $eax killed $eax killed $rax movl %eax, -32(%rbp) movl -32(%rbp), %eax shll $1, %eax addl $1, %eax movslq %eax, %rdi callq _malloc movq %rax, -40(%rbp) movl $0, -44(%rbp) LBB0_1: ## =>This Inner Loop Header: Depth=1 movl -44(%rbp), %eax cmpl -32(%rbp), %eax jge LBB0_6 ## %bb.2: ## in Loop: Header=BB0_1 Depth=1 movq -40(%rbp), %rdi movq -24(%rbp), %rsi movslq -44(%rbp), %rax addq %rax, %rsi movl -32(%rbp), %eax subl -44(%rbp), %eax movslq %eax, %rdx movq $-1, %rcx callq ___strncpy_chk movq -40(%rbp), %rdi movslq -32(%rbp), %rax addq %rax, %rdi movslq -44(%rbp), %rcx xorl %eax, %eax ## kill: def $rax killed $eax subq %rcx, %rax addq %rax, %rdi movq -24(%rbp), %rsi movslq -44(%rbp), %rdx movq $-1, %rcx callq ___strncpy_chk movq -40(%rbp), %rax movslq -32(%rbp), %rcx movb $0, (%rax,%rcx) movq -16(%rbp), %rdi movq -40(%rbp), %rsi callq _strstr cmpq $0, %rax je LBB0_4 ## %bb.3: movq -40(%rbp), %rdi callq _free movb $1, -1(%rbp) jmp LBB0_7 LBB0_4: ## in Loop: Header=BB0_1 Depth=1 jmp LBB0_5 LBB0_5: ## in Loop: Header=BB0_1 Depth=1 movl -44(%rbp), %eax addl $1, %eax movl %eax, -44(%rbp) jmp LBB0_1 LBB0_6: movq -40(%rbp), %rdi callq _free movb $0, -1(%rbp) LBB0_7: movb -1(%rbp), %al andb $1, %al movzbl %al, %eax addq $48, %rsp popq %rbp retq .cfi_endproc ## -- End function .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #80 .cfi_def_cfa_offset 80 stp x29, x30, [sp, #64] ; 16-byte Folded Spill add x29, sp, #64 .cfi_def_cfa w29, 16 .cfi_offset w30, -8 .cfi_offset w29, -16 stur x0, [x29, #-16] stur x1, [x29, #-24] ldur x0, [x29, #-16] bl _strlen mov x8, x0 stur w8, [x29, #-28] ldur x0, [x29, #-24] bl _strlen mov x8, x0 str w8, [sp, #32] ldr w9, [sp, #32] mov w8, #2 mul w8, w8, w9 add w9, w8, #1 ; implicit-def: $x8 mov x8, x9 sxtw x0, w8 bl _malloc str x0, [sp, #24] str wzr, [sp, #20] b LBB0_1 LBB0_1: ; =>This Inner Loop Header: Depth=1 ldr w8, [sp, #20] ldr w9, [sp, #32] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_6 b LBB0_2 LBB0_2: ; in Loop: Header=BB0_1 Depth=1 ldr x0, [sp, #24] ldur x8, [x29, #-24] ldrsw x9, [sp, #20] add x1, x8, x9 ldr w8, [sp, #32] ldr w9, [sp, #20] subs w9, w8, w9 ; implicit-def: $x8 mov x8, x9 sxtw x2, w8 mov x3, #-1 str x3, [sp, #8] ; 8-byte Folded Spill bl ___strncpy_chk ldr x3, [sp, #8] ; 8-byte Folded Reload ldr x8, [sp, #24] ldrsw x9, [sp, #32] add x8, x8, x9 ldrsw x9, [sp, #20] subs x0, x8, x9 ldur x1, [x29, #-24] ldrsw x2, [sp, #20] bl ___strncpy_chk ldr x8, [sp, #24] ldrsw x9, [sp, #32] add x8, x8, x9 strb wzr, [x8] ldur x0, [x29, #-16] ldr x1, [sp, #24] bl _strstr subs x8, x0, #0 cset w8, eq tbnz w8, #0, LBB0_4 b LBB0_3 LBB0_3: ldr x0, [sp, #24] bl _free mov w8, #1 and w8, w8, #0x1 and w8, w8, #0x1 sturb w8, [x29, #-1] b LBB0_7 LBB0_4: ; in Loop: Header=BB0_1 Depth=1 b LBB0_5 LBB0_5: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #20] add w8, w8, #1 str w8, [sp, #20] b LBB0_1 LBB0_6: ldr x0, [sp, #24] bl _free mov w8, #0 and w8, w8, #0x1 and w8, w8, #0x1 sturb w8, [x29, #-1] b LBB0_7 LBB0_7: ldurb w8, [x29, #-1] and w0, w8, #0x1 ldp x29, x30, [sp, #64] ; 16-byte Folded Reload add sp, sp, #80 ret .cfi_endproc ; -- End function .subsections_via_symbols
eval/problem155/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ## -- Begin function func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp subq $32, %rsp movl %edi, -4(%rbp) movq %rsi, -16(%rbp) movl $0, -20(%rbp) movl $0, -24(%rbp) movl -4(%rbp), %edi callq _abs movl %eax, -4(%rbp) LBB0_1: ## =>This Inner Loop Header: Depth=1 movl -4(%rbp), %eax movl $10, %ecx cltd idivl %ecx movl %edx, -28(%rbp) movl -28(%rbp), %eax movl $2, %ecx cltd idivl %ecx cmpl $0, %edx jne LBB0_3 ## %bb.2: ## in Loop: Header=BB0_1 Depth=1 movl -20(%rbp), %eax addl $1, %eax movl %eax, -20(%rbp) jmp LBB0_4 LBB0_3: ## in Loop: Header=BB0_1 Depth=1 movl -24(%rbp), %eax addl $1, %eax movl %eax, -24(%rbp) LBB0_4: ## in Loop: Header=BB0_1 Depth=1 movl -4(%rbp), %eax movl $10, %ecx cltd idivl %ecx movl %eax, -4(%rbp) ## %bb.5: ## in Loop: Header=BB0_1 Depth=1 cmpl $0, -4(%rbp) jg LBB0_1 ## %bb.6: movl -20(%rbp), %ecx movq -16(%rbp), %rax movl %ecx, (%rax) movl -24(%rbp), %ecx movq -16(%rbp), %rax movl %ecx, 4(%rax) addq $32, %rsp popq %rbp retq .cfi_endproc ## -- End function .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #48 .cfi_def_cfa_offset 48 stp x29, x30, [sp, #32] ; 16-byte Folded Spill add x29, sp, #32 .cfi_def_cfa w29, 16 .cfi_offset w30, -8 .cfi_offset w29, -16 stur w0, [x29, #-4] str x1, [sp, #16] str wzr, [sp, #12] str wzr, [sp, #8] ldur w0, [x29, #-4] bl _abs stur w0, [x29, #-4] b LBB0_1 LBB0_1: ; =>This Inner Loop Header: Depth=1 ldur w8, [x29, #-4] mov w10, #10 sdiv w9, w8, w10 mul w9, w9, w10 subs w8, w8, w9 str w8, [sp, #4] ldr w8, [sp, #4] mov w10, #2 sdiv w9, w8, w10 mul w9, w9, w10 subs w8, w8, w9 subs w8, w8, #0 cset w8, ne tbnz w8, #0, LBB0_3 b LBB0_2 LBB0_2: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #12] add w8, w8, #1 str w8, [sp, #12] b LBB0_4 LBB0_3: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #8] add w8, w8, #1 str w8, [sp, #8] b LBB0_4 LBB0_4: ; in Loop: Header=BB0_1 Depth=1 ldur w8, [x29, #-4] mov w9, #10 sdiv w8, w8, w9 stur w8, [x29, #-4] b LBB0_5 LBB0_5: ; in Loop: Header=BB0_1 Depth=1 ldur w8, [x29, #-4] subs w8, w8, #0 cset w8, gt tbnz w8, #0, LBB0_1 b LBB0_6 LBB0_6: ldr w8, [sp, #12] ldr x9, [sp, #16] str w8, [x9] ldr w8, [sp, #8] ldr x9, [sp, #16] str w8, [x9, #4] ldp x29, x30, [sp, #32] ; 16-byte Folded Reload add sp, sp, #48 ret .cfi_endproc ; -- End function .subsections_via_symbols
eval/problem156/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ## -- Begin function func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp subq $208, %rsp movq ___stack_chk_guard@GOTPCREL(%rip), %rax movq (%rax), %rax movq %rax, -8(%rbp) movl %edi, -180(%rbp) movq %rsi, -192(%rbp) leaq -112(%rbp), %rdi leaq l___const.func0.rep(%rip), %rsi movl $104, %edx callq _memcpy leaq -176(%rbp), %rdi leaq l___const.func0.num(%rip), %rsi movl $52, %edx callq _memcpy movl $0, -196(%rbp) movq -192(%rbp), %rax movb $0, (%rax) LBB0_1: ## =>This Loop Header: Depth=1 ## Child Loop BB0_3 Depth 2 cmpl $0, -180(%rbp) jle LBB0_8 ## %bb.2: ## in Loop: Header=BB0_1 Depth=1 jmp LBB0_3 LBB0_3: ## Parent Loop BB0_1 Depth=1 ## => This Inner Loop Header: Depth=2 movl -180(%rbp), %eax movslq -196(%rbp), %rcx cmpl -176(%rbp,%rcx,4), %eax jl LBB0_5 ## %bb.4: ## in Loop: Header=BB0_3 Depth=2 movq -192(%rbp), %rdi movslq -196(%rbp), %rax movq -112(%rbp,%rax,8), %rsi movq $-1, %rdx callq ___strcat_chk movslq -196(%rbp), %rax movl -176(%rbp,%rax,4), %ecx movl -180(%rbp), %eax subl %ecx, %eax movl %eax, -180(%rbp) jmp LBB0_3 LBB0_5: ## in Loop: Header=BB0_1 Depth=1 cmpl $0, -180(%rbp) jle LBB0_7 ## %bb.6: ## in Loop: Header=BB0_1 Depth=1 movl -196(%rbp), %eax addl $1, %eax movl %eax, -196(%rbp) LBB0_7: ## in Loop: Header=BB0_1 Depth=1 jmp LBB0_1 LBB0_8: movq ___stack_chk_guard@GOTPCREL(%rip), %rax movq (%rax), %rax movq -8(%rbp), %rcx cmpq %rcx, %rax jne LBB0_10 ## %bb.9: addq $208, %rsp popq %rbp retq LBB0_10: callq ___stack_chk_fail ud2 .cfi_endproc ## -- End function .section __TEXT,__cstring,cstring_literals L_.str: ## @.str .asciz "m" L_.str.1: ## @.str.1 .asciz "cm" L_.str.2: ## @.str.2 .asciz "d" L_.str.3: ## @.str.3 .asciz "cd" L_.str.4: ## @.str.4 .asciz "c" L_.str.5: ## @.str.5 .asciz "xc" L_.str.6: ## @.str.6 .asciz "l" L_.str.7: ## @.str.7 .asciz "xl" L_.str.8: ## @.str.8 .asciz "x" L_.str.9: ## @.str.9 .asciz "ix" L_.str.10: ## @.str.10 .asciz "v" L_.str.11: ## @.str.11 .asciz "iv" L_.str.12: ## @.str.12 .asciz "i" .section __DATA,__const .p2align 4 ## @__const.func0.rep l___const.func0.rep: .quad L_.str .quad L_.str.1 .quad L_.str.2 .quad L_.str.3 .quad L_.str.4 .quad L_.str.5 .quad L_.str.6 .quad L_.str.7 .quad L_.str.8 .quad L_.str.9 .quad L_.str.10 .quad L_.str.11 .quad L_.str.12 .section __TEXT,__const .p2align 4 ## @__const.func0.num l___const.func0.num: .long 1000 ## 0x3e8 .long 900 ## 0x384 .long 500 ## 0x1f4 .long 400 ## 0x190 .long 100 ## 0x64 .long 90 ## 0x5a .long 50 ## 0x32 .long 40 ## 0x28 .long 10 ## 0xa .long 9 ## 0x9 .long 5 ## 0x5 .long 4 ## 0x4 .long 1 ## 0x1 .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #208 .cfi_def_cfa_offset 208 stp x29, x30, [sp, #192] ; 16-byte Folded Spill add x29, sp, #192 .cfi_def_cfa w29, 16 .cfi_offset w30, -8 .cfi_offset w29, -16 adrp x8, ___stack_chk_guard@GOTPAGE ldr x8, [x8, ___stack_chk_guard@GOTPAGEOFF] ldr x8, [x8] stur x8, [x29, #-8] str w0, [sp, #24] str x1, [sp, #16] add x0, sp, #80 adrp x1, l___const.func0.rep@PAGE add x1, x1, l___const.func0.rep@PAGEOFF mov x2, #104 bl _memcpy add x0, sp, #28 adrp x1, l___const.func0.num@PAGE add x1, x1, l___const.func0.num@PAGEOFF mov x2, #52 bl _memcpy str wzr, [sp, #12] ldr x8, [sp, #16] strb wzr, [x8] b LBB0_1 LBB0_1: ; =>This Loop Header: Depth=1 ; Child Loop BB0_3 Depth 2 ldr w8, [sp, #24] subs w8, w8, #0 cset w8, le tbnz w8, #0, LBB0_8 b LBB0_2 LBB0_2: ; in Loop: Header=BB0_1 Depth=1 b LBB0_3 LBB0_3: ; Parent Loop BB0_1 Depth=1 ; => This Inner Loop Header: Depth=2 ldr w8, [sp, #24] ldrsw x10, [sp, #12] add x9, sp, #28 ldr w9, [x9, x10, lsl #2] subs w8, w8, w9 cset w8, lt tbnz w8, #0, LBB0_5 b LBB0_4 LBB0_4: ; in Loop: Header=BB0_3 Depth=2 ldr x0, [sp, #16] ldrsw x9, [sp, #12] add x8, sp, #80 ldr x1, [x8, x9, lsl #3] mov x2, #-1 bl ___strcat_chk ldrsw x9, [sp, #12] add x8, sp, #28 ldr w9, [x8, x9, lsl #2] ldr w8, [sp, #24] subs w8, w8, w9 str w8, [sp, #24] b LBB0_3 LBB0_5: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #24] subs w8, w8, #0 cset w8, le tbnz w8, #0, LBB0_7 b LBB0_6 LBB0_6: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #12] add w8, w8, #1 str w8, [sp, #12] b LBB0_7 LBB0_7: ; in Loop: Header=BB0_1 Depth=1 b LBB0_1 LBB0_8: ldur x9, [x29, #-8] adrp x8, ___stack_chk_guard@GOTPAGE ldr x8, [x8, ___stack_chk_guard@GOTPAGEOFF] ldr x8, [x8] subs x8, x8, x9 cset w8, eq tbnz w8, #0, LBB0_10 b LBB0_9 LBB0_9: bl ___stack_chk_fail LBB0_10: ldp x29, x30, [sp, #192] ; 16-byte Folded Reload add sp, sp, #208 ret .cfi_endproc ; -- End function .section __TEXT,__cstring,cstring_literals l_.str: ; @.str .asciz "m" l_.str.1: ; @.str.1 .asciz "cm" l_.str.2: ; @.str.2 .asciz "d" l_.str.3: ; @.str.3 .asciz "cd" l_.str.4: ; @.str.4 .asciz "c" l_.str.5: ; @.str.5 .asciz "xc" l_.str.6: ; @.str.6 .asciz "l" l_.str.7: ; @.str.7 .asciz "xl" l_.str.8: ; @.str.8 .asciz "x" l_.str.9: ; @.str.9 .asciz "ix" l_.str.10: ; @.str.10 .asciz "v" l_.str.11: ; @.str.11 .asciz "iv" l_.str.12: ; @.str.12 .asciz "i" .section __DATA,__const .p2align 3 ; @__const.func0.rep l___const.func0.rep: .quad l_.str .quad l_.str.1 .quad l_.str.2 .quad l_.str.3 .quad l_.str.4 .quad l_.str.5 .quad l_.str.6 .quad l_.str.7 .quad l_.str.8 .quad l_.str.9 .quad l_.str.10 .quad l_.str.11 .quad l_.str.12 .section __TEXT,__const .p2align 2 ; @__const.func0.num l___const.func0.num: .long 1000 ; 0x3e8 .long 900 ; 0x384 .long 500 ; 0x1f4 .long 400 ; 0x190 .long 100 ; 0x64 .long 90 ; 0x5a .long 50 ; 0x32 .long 40 ; 0x28 .long 10 ; 0xa .long 9 ; 0x9 .long 5 ; 0x5 .long 4 ; 0x4 .long 1 ; 0x1 .subsections_via_symbols
eval/problem157/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .section __TEXT,__literal8,8byte_literals .p2align 3 ## -- Begin function func0 LCPI0_0: .quad 0x3f1a36e2eb1c432d ## double 1.0E-4 .section __TEXT,__literal16,16byte_literals .p2align 4 LCPI0_1: .quad 0x7fffffffffffffff ## double NaN .quad 0x7fffffffffffffff ## double NaN .section __TEXT,__text,regular,pure_instructions .globl _func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp movss %xmm0, -8(%rbp) movss %xmm1, -12(%rbp) movss %xmm2, -16(%rbp) movss -8(%rbp), %xmm1 ## xmm1 = mem[0],zero,zero,zero movss -8(%rbp), %xmm2 ## xmm2 = mem[0],zero,zero,zero movss -12(%rbp), %xmm0 ## xmm0 = mem[0],zero,zero,zero mulss -12(%rbp), %xmm0 mulss %xmm2, %xmm1 addss %xmm0, %xmm1 movss -16(%rbp), %xmm0 ## xmm0 = mem[0],zero,zero,zero movss -16(%rbp), %xmm2 ## xmm2 = mem[0],zero,zero,zero movd %xmm0, %eax xorl $2147483648, %eax ## imm = 0x80000000 movd %eax, %xmm0 mulss %xmm2, %xmm0 addss %xmm1, %xmm0 cvtss2sd %xmm0, %xmm1 movaps LCPI0_1(%rip), %xmm0 ## xmm0 = [NaN,NaN] pand %xmm0, %xmm1 movsd LCPI0_0(%rip), %xmm0 ## xmm0 = mem[0],zero ucomisd %xmm1, %xmm0 ja LBB0_3 ## %bb.1: movss -8(%rbp), %xmm1 ## xmm1 = mem[0],zero,zero,zero movss -8(%rbp), %xmm2 ## xmm2 = mem[0],zero,zero,zero movss -16(%rbp), %xmm0 ## xmm0 = mem[0],zero,zero,zero mulss -16(%rbp), %xmm0 mulss %xmm2, %xmm1 addss %xmm0, %xmm1 movss -12(%rbp), %xmm0 ## xmm0 = mem[0],zero,zero,zero movss -12(%rbp), %xmm2 ## xmm2 = mem[0],zero,zero,zero movd %xmm0, %eax xorl $2147483648, %eax ## imm = 0x80000000 movd %eax, %xmm0 mulss %xmm2, %xmm0 addss %xmm1, %xmm0 cvtss2sd %xmm0, %xmm1 movaps LCPI0_1(%rip), %xmm0 ## xmm0 = [NaN,NaN] pand %xmm0, %xmm1 movsd LCPI0_0(%rip), %xmm0 ## xmm0 = mem[0],zero ucomisd %xmm1, %xmm0 ja LBB0_3 ## %bb.2: movss -12(%rbp), %xmm1 ## xmm1 = mem[0],zero,zero,zero movss -12(%rbp), %xmm2 ## xmm2 = mem[0],zero,zero,zero movss -16(%rbp), %xmm0 ## xmm0 = mem[0],zero,zero,zero mulss -16(%rbp), %xmm0 mulss %xmm2, %xmm1 addss %xmm0, %xmm1 movss -8(%rbp), %xmm0 ## xmm0 = mem[0],zero,zero,zero movss -8(%rbp), %xmm2 ## xmm2 = mem[0],zero,zero,zero movd %xmm0, %eax xorl $2147483648, %eax ## imm = 0x80000000 movd %eax, %xmm0 mulss %xmm2, %xmm0 addss %xmm1, %xmm0 cvtss2sd %xmm0, %xmm1 movaps LCPI0_1(%rip), %xmm0 ## xmm0 = [NaN,NaN] pand %xmm0, %xmm1 movsd LCPI0_0(%rip), %xmm0 ## xmm0 = mem[0],zero ucomisd %xmm1, %xmm0 jbe LBB0_4 LBB0_3: movl $1, -4(%rbp) jmp LBB0_5 LBB0_4: movl $0, -4(%rbp) LBB0_5: movl -4(%rbp), %eax popq %rbp retq .cfi_endproc ## -- End function .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .section __TEXT,__literal8,8byte_literals .p2align 3 ; -- Begin function func0 lCPI0_0: .quad 0x3f1a36e2eb1c432d ; double 1.0E-4 .section __TEXT,__text,regular,pure_instructions .globl _func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #16 .cfi_def_cfa_offset 16 str s0, [sp, #8] str s1, [sp, #4] str s2, [sp] ldr s0, [sp, #8] ldr s1, [sp, #8] ldr s2, [sp, #4] ldr s3, [sp, #4] fmul s2, s2, s3 fmadd s2, s0, s1, s2 ldr s0, [sp] ldr s1, [sp] fmsub s0, s0, s1, s2 fcvt d0, s0 fabs d0, d0 adrp x8, lCPI0_0@PAGE ldr d1, [x8, lCPI0_0@PAGEOFF] fcmp d0, d1 cset w8, mi tbnz w8, #0, LBB0_3 b LBB0_1 LBB0_1: ldr s0, [sp, #8] ldr s1, [sp, #8] ldr s2, [sp] ldr s3, [sp] fmul s2, s2, s3 fmadd s2, s0, s1, s2 ldr s0, [sp, #4] ldr s1, [sp, #4] fmsub s0, s0, s1, s2 fcvt d0, s0 fabs d0, d0 adrp x8, lCPI0_0@PAGE ldr d1, [x8, lCPI0_0@PAGEOFF] fcmp d0, d1 cset w8, mi tbnz w8, #0, LBB0_3 b LBB0_2 LBB0_2: ldr s0, [sp, #4] ldr s1, [sp, #4] ldr s2, [sp] ldr s3, [sp] fmul s2, s2, s3 fmadd s2, s0, s1, s2 ldr s0, [sp, #8] ldr s1, [sp, #8] fmsub s0, s0, s1, s2 fcvt d0, s0 fabs d0, d0 adrp x8, lCPI0_0@PAGE ldr d1, [x8, lCPI0_0@PAGEOFF] fcmp d0, d1 cset w8, pl tbnz w8, #0, LBB0_4 b LBB0_3 LBB0_3: mov w8, #1 str w8, [sp, #12] b LBB0_5 LBB0_4: str wzr, [sp, #12] b LBB0_5 LBB0_5: ldr w0, [sp, #12] add sp, sp, #16 ret .cfi_endproc ; -- End function .subsections_via_symbols
eval/problem158/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ## -- Begin function func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp subq $336, %rsp ## imm = 0x150 movq ___stack_chk_guard@GOTPCREL(%rip), %rax movq (%rax), %rax movq %rax, -8(%rbp) movq %rdi, -280(%rbp) movl %esi, -284(%rbp) leaq L_.str(%rip), %rax movq %rax, -296(%rbp) movl $0, -300(%rbp) movl $0, -304(%rbp) LBB0_1: ## =>This Loop Header: Depth=1 ## Child Loop BB0_3 Depth 2 movl -304(%rbp), %eax cmpl -284(%rbp), %eax jge LBB0_14 ## %bb.2: ## in Loop: Header=BB0_1 Depth=1 leaq -272(%rbp), %rdi xorl %esi, %esi movl $256, %edx ## imm = 0x100 callq _memset movl $0, -308(%rbp) movl $0, -312(%rbp) LBB0_3: ## Parent Loop BB0_1 Depth=1 ## => This Inner Loop Header: Depth=2 movq -280(%rbp), %rax movslq -304(%rbp), %rcx movq (%rax,%rcx,8), %rax movslq -312(%rbp), %rcx movsbl (%rax,%rcx), %eax cmpl $0, %eax je LBB0_8 ## %bb.4: ## in Loop: Header=BB0_3 Depth=2 leaq -272(%rbp), %rdi movq -280(%rbp), %rax movslq -304(%rbp), %rcx movq (%rax,%rcx,8), %rax movslq -312(%rbp), %rcx movsbl (%rax,%rcx), %esi callq _strchr cmpq $0, %rax jne LBB0_6 ## %bb.5: ## in Loop: Header=BB0_3 Depth=2 leaq -272(%rbp), %rdi callq _strlen ## kill: def $eax killed $eax killed $rax movl %eax, -316(%rbp) movq -280(%rbp), %rax movslq -304(%rbp), %rcx movq (%rax,%rcx,8), %rax movslq -312(%rbp), %rcx movb (%rax,%rcx), %cl movslq -316(%rbp), %rax movb %cl, -272(%rbp,%rax) movl -316(%rbp), %eax addl $1, %eax cltq movb $0, -272(%rbp,%rax) movl -308(%rbp), %eax addl $1, %eax movl %eax, -308(%rbp) LBB0_6: ## in Loop: Header=BB0_3 Depth=2 jmp LBB0_7 LBB0_7: ## in Loop: Header=BB0_3 Depth=2 movl -312(%rbp), %eax addl $1, %eax movl %eax, -312(%rbp) jmp LBB0_3 LBB0_8: ## in Loop: Header=BB0_1 Depth=1 movl -308(%rbp), %eax cmpl -300(%rbp), %eax jg LBB0_11 ## %bb.9: ## in Loop: Header=BB0_1 Depth=1 movl -308(%rbp), %eax cmpl -300(%rbp), %eax jne LBB0_12 ## %bb.10: ## in Loop: Header=BB0_1 Depth=1 movq -280(%rbp), %rax movslq -304(%rbp), %rcx movq (%rax,%rcx,8), %rdi movq -296(%rbp), %rsi callq _strcmp cmpl $0, %eax jge LBB0_12 LBB0_11: ## in Loop: Header=BB0_1 Depth=1 movq -280(%rbp), %rax movslq -304(%rbp), %rcx movq (%rax,%rcx,8), %rax movq %rax, -296(%rbp) movl -308(%rbp), %eax movl %eax, -300(%rbp) LBB0_12: ## in Loop: Header=BB0_1 Depth=1 jmp LBB0_13 LBB0_13: ## in Loop: Header=BB0_1 Depth=1 movl -304(%rbp), %eax addl $1, %eax movl %eax, -304(%rbp) jmp LBB0_1 LBB0_14: movq -296(%rbp), %rax movq %rax, -328(%rbp) ## 8-byte Spill movq ___stack_chk_guard@GOTPCREL(%rip), %rax movq (%rax), %rax movq -8(%rbp), %rcx cmpq %rcx, %rax jne LBB0_16 ## %bb.15: movq -328(%rbp), %rax ## 8-byte Reload addq $336, %rsp ## imm = 0x150 popq %rbp retq LBB0_16: callq ___stack_chk_fail ud2 .cfi_endproc ## -- End function .section __TEXT,__cstring,cstring_literals L_.str: ## @.str .space 1 .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #368 .cfi_def_cfa_offset 368 stp x28, x27, [sp, #336] ; 16-byte Folded Spill stp x29, x30, [sp, #352] ; 16-byte Folded Spill add x29, sp, #352 .cfi_def_cfa w29, 16 .cfi_offset w30, -8 .cfi_offset w29, -16 .cfi_offset w27, -24 .cfi_offset w28, -32 adrp x8, ___stack_chk_guard@GOTPAGE ldr x8, [x8, ___stack_chk_guard@GOTPAGEOFF] ldr x8, [x8] stur x8, [x29, #-24] str x0, [sp, #64] str w1, [sp, #60] adrp x8, l_.str@PAGE add x8, x8, l_.str@PAGEOFF str x8, [sp, #48] str wzr, [sp, #44] str wzr, [sp, #40] b LBB0_1 LBB0_1: ; =>This Loop Header: Depth=1 ; Child Loop BB0_3 Depth 2 ldr w8, [sp, #40] ldr w9, [sp, #60] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_14 b LBB0_2 LBB0_2: ; in Loop: Header=BB0_1 Depth=1 add x0, sp, #72 mov w1, #0 mov x2, #256 bl _memset str wzr, [sp, #36] str wzr, [sp, #32] b LBB0_3 LBB0_3: ; Parent Loop BB0_1 Depth=1 ; => This Inner Loop Header: Depth=2 ldr x8, [sp, #64] ldrsw x9, [sp, #40] ldr x8, [x8, x9, lsl #3] ldrsw x9, [sp, #32] ldrsb w8, [x8, x9] subs w8, w8, #0 cset w8, eq tbnz w8, #0, LBB0_8 b LBB0_4 LBB0_4: ; in Loop: Header=BB0_3 Depth=2 ldr x8, [sp, #64] ldrsw x9, [sp, #40] ldr x8, [x8, x9, lsl #3] ldrsw x9, [sp, #32] ldrsb w1, [x8, x9] add x0, sp, #72 bl _strchr subs x8, x0, #0 cset w8, ne tbnz w8, #0, LBB0_6 b LBB0_5 LBB0_5: ; in Loop: Header=BB0_3 Depth=2 add x0, sp, #72 str x0, [sp, #16] ; 8-byte Folded Spill bl _strlen ldr x8, [sp, #16] ; 8-byte Folded Reload mov x9, x0 str w9, [sp, #28] ldr x9, [sp, #64] ldrsw x10, [sp, #40] ldr x9, [x9, x10, lsl #3] ldrsw x10, [sp, #32] add x9, x9, x10 ldrb w9, [x9] ldrsw x11, [sp, #28] mov x10, x8 add x10, x10, x11 strb w9, [x10] ldr w9, [sp, #28] add w9, w9, #1 add x8, x8, w9, sxtw strb wzr, [x8] ldr w8, [sp, #36] add w8, w8, #1 str w8, [sp, #36] b LBB0_6 LBB0_6: ; in Loop: Header=BB0_3 Depth=2 b LBB0_7 LBB0_7: ; in Loop: Header=BB0_3 Depth=2 ldr w8, [sp, #32] add w8, w8, #1 str w8, [sp, #32] b LBB0_3 LBB0_8: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #36] ldr w9, [sp, #44] subs w8, w8, w9 cset w8, gt tbnz w8, #0, LBB0_11 b LBB0_9 LBB0_9: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #36] ldr w9, [sp, #44] subs w8, w8, w9 cset w8, ne tbnz w8, #0, LBB0_12 b LBB0_10 LBB0_10: ; in Loop: Header=BB0_1 Depth=1 ldr x8, [sp, #64] ldrsw x9, [sp, #40] ldr x0, [x8, x9, lsl #3] ldr x1, [sp, #48] bl _strcmp subs w8, w0, #0 cset w8, ge tbnz w8, #0, LBB0_12 b LBB0_11 LBB0_11: ; in Loop: Header=BB0_1 Depth=1 ldr x8, [sp, #64] ldrsw x9, [sp, #40] ldr x8, [x8, x9, lsl #3] str x8, [sp, #48] ldr w8, [sp, #36] str w8, [sp, #44] b LBB0_12 LBB0_12: ; in Loop: Header=BB0_1 Depth=1 b LBB0_13 LBB0_13: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #40] add w8, w8, #1 str w8, [sp, #40] b LBB0_1 LBB0_14: ldr x8, [sp, #48] str x8, [sp, #8] ; 8-byte Folded Spill ldur x9, [x29, #-24] adrp x8, ___stack_chk_guard@GOTPAGE ldr x8, [x8, ___stack_chk_guard@GOTPAGEOFF] ldr x8, [x8] subs x8, x8, x9 cset w8, eq tbnz w8, #0, LBB0_16 b LBB0_15 LBB0_15: bl ___stack_chk_fail LBB0_16: ldr x0, [sp, #8] ; 8-byte Folded Reload ldp x29, x30, [sp, #352] ; 16-byte Folded Reload ldp x28, x27, [sp, #336] ; 16-byte Folded Reload add sp, sp, #368 ret .cfi_endproc ; -- End function .section __TEXT,__cstring,cstring_literals l_.str: ; @.str .space 1 .subsections_via_symbols
eval/problem159/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ## -- Begin function func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp subq $48, %rsp movl %edi, -12(%rbp) movl $2, -16(%rbp) movl $1, -20(%rbp) LBB0_1: ## =>This Inner Loop Header: Depth=1 movl -20(%rbp), %eax cmpl -12(%rbp), %eax jg LBB0_4 ## %bb.2: ## in Loop: Header=BB0_1 Depth=1 movl -20(%rbp), %r9d xorl %eax, %eax movl %eax, %esi xorl %edx, %edx movq $-1, %rcx leaq L_.str(%rip), %r8 movq %rsi, %rdi movb $0, %al callq ___snprintf_chk addl -16(%rbp), %eax movl %eax, -16(%rbp) ## %bb.3: ## in Loop: Header=BB0_1 Depth=1 movl -20(%rbp), %eax addl $1, %eax movl %eax, -20(%rbp) jmp LBB0_1 LBB0_4: movslq -16(%rbp), %rdi callq _malloc movq %rax, -32(%rbp) cmpq $0, -32(%rbp) jne LBB0_6 ## %bb.5: movq $0, -8(%rbp) jmp LBB0_11 LBB0_6: movq -32(%rbp), %rax movq %rax, -40(%rbp) movq -40(%rbp), %rdi xorl %esi, %esi movq $-1, %rdx leaq L_.str.1(%rip), %rcx movb $0, %al callq ___sprintf_chk movl %eax, %ecx movq -40(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -40(%rbp) movl $1, -44(%rbp) LBB0_7: ## =>This Inner Loop Header: Depth=1 movl -44(%rbp), %eax cmpl -12(%rbp), %eax jg LBB0_10 ## %bb.8: ## in Loop: Header=BB0_7 Depth=1 movq -40(%rbp), %rdi movl -44(%rbp), %r8d xorl %esi, %esi movq $-1, %rdx leaq L_.str(%rip), %rcx movb $0, %al callq ___sprintf_chk movl %eax, %ecx movq -40(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -40(%rbp) ## %bb.9: ## in Loop: Header=BB0_7 Depth=1 movl -44(%rbp), %eax addl $1, %eax movl %eax, -44(%rbp) jmp LBB0_7 LBB0_10: movq -32(%rbp), %rax movq %rax, -8(%rbp) LBB0_11: movq -8(%rbp), %rax addq $48, %rsp popq %rbp retq .cfi_endproc ## -- End function .section __TEXT,__cstring,cstring_literals L_.str: ## @.str .asciz " %d" L_.str.1: ## @.str.1 .asciz "0" .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #80 .cfi_def_cfa_offset 80 stp x29, x30, [sp, #64] ; 16-byte Folded Spill add x29, sp, #64 .cfi_def_cfa w29, 16 .cfi_offset w30, -8 .cfi_offset w29, -16 stur w0, [x29, #-12] mov w8, #2 stur w8, [x29, #-16] mov w8, #1 stur w8, [x29, #-20] b LBB0_1 LBB0_1: ; =>This Inner Loop Header: Depth=1 ldur w8, [x29, #-20] ldur w9, [x29, #-12] subs w8, w8, w9 cset w8, gt tbnz w8, #0, LBB0_4 b LBB0_2 LBB0_2: ; in Loop: Header=BB0_1 Depth=1 ldur w9, [x29, #-20] ; implicit-def: $x8 mov x8, x9 mov x9, sp str x8, [x9] mov x0, #0 mov x1, #0 mov w2, #0 mov x3, #-1 adrp x4, l_.str@PAGE add x4, x4, l_.str@PAGEOFF bl ___snprintf_chk ldur w8, [x29, #-16] add w8, w8, w0 stur w8, [x29, #-16] b LBB0_3 LBB0_3: ; in Loop: Header=BB0_1 Depth=1 ldur w8, [x29, #-20] add w8, w8, #1 stur w8, [x29, #-20] b LBB0_1 LBB0_4: ldursw x0, [x29, #-16] bl _malloc str x0, [sp, #32] ldr x8, [sp, #32] subs x8, x8, #0 cset w8, ne tbnz w8, #0, LBB0_6 b LBB0_5 LBB0_5: ; kill: def $x8 killed $xzr stur xzr, [x29, #-8] b LBB0_11 LBB0_6: ldr x8, [sp, #32] str x8, [sp, #24] ldr x0, [sp, #24] mov w1, #0 mov x2, #-1 adrp x3, l_.str.1@PAGE add x3, x3, l_.str.1@PAGEOFF bl ___sprintf_chk ldr x8, [sp, #24] add x8, x8, w0, sxtw str x8, [sp, #24] mov w8, #1 str w8, [sp, #20] b LBB0_7 LBB0_7: ; =>This Inner Loop Header: Depth=1 ldr w8, [sp, #20] ldur w9, [x29, #-12] subs w8, w8, w9 cset w8, gt tbnz w8, #0, LBB0_10 b LBB0_8 LBB0_8: ; in Loop: Header=BB0_7 Depth=1 ldr x0, [sp, #24] ldr w9, [sp, #20] ; implicit-def: $x8 mov x8, x9 mov x9, sp str x8, [x9] mov w1, #0 mov x2, #-1 adrp x3, l_.str@PAGE add x3, x3, l_.str@PAGEOFF bl ___sprintf_chk ldr x8, [sp, #24] add x8, x8, w0, sxtw str x8, [sp, #24] b LBB0_9 LBB0_9: ; in Loop: Header=BB0_7 Depth=1 ldr w8, [sp, #20] add w8, w8, #1 str w8, [sp, #20] b LBB0_7 LBB0_10: ldr x8, [sp, #32] stur x8, [x29, #-8] b LBB0_11 LBB0_11: ldur x0, [x29, #-8] ldp x29, x30, [sp, #64] ; 16-byte Folded Reload add sp, sp, #80 ret .cfi_endproc ; -- End function .section __TEXT,__cstring,cstring_literals l_.str: ; @.str .asciz " %d" l_.str.1: ; @.str.1 .asciz "0" .subsections_via_symbols
eval/problem16/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ## -- Begin function func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp movl %edi, -4(%rbp) movl %esi, -8(%rbp) movl %edx, -12(%rbp) movq %rcx, -24(%rbp) movl -8(%rbp), %eax cmpl -12(%rbp), %eax jle LBB0_2 ## %bb.1: movl -4(%rbp), %ecx addl -12(%rbp), %ecx movq -24(%rbp), %rax movl %ecx, (%rax) movq -24(%rbp), %rax movl $0, 4(%rax) jmp LBB0_3 LBB0_2: movl -4(%rbp), %ecx addl -8(%rbp), %ecx movq -24(%rbp), %rax movl %ecx, (%rax) movl -12(%rbp), %ecx subl -8(%rbp), %ecx movq -24(%rbp), %rax movl %ecx, 4(%rax) LBB0_3: popq %rbp retq .cfi_endproc ## -- End function .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #32 .cfi_def_cfa_offset 32 str w0, [sp, #28] str w1, [sp, #24] str w2, [sp, #20] str x3, [sp, #8] ldr w8, [sp, #24] ldr w9, [sp, #20] subs w8, w8, w9 cset w8, le tbnz w8, #0, LBB0_2 b LBB0_1 LBB0_1: ldr w8, [sp, #28] ldr w9, [sp, #20] add w8, w8, w9 ldr x9, [sp, #8] str w8, [x9] ldr x8, [sp, #8] str wzr, [x8, #4] b LBB0_3 LBB0_2: ldr w8, [sp, #28] ldr w9, [sp, #24] add w8, w8, w9 ldr x9, [sp, #8] str w8, [x9] ldr w8, [sp, #20] ldr w9, [sp, #24] subs w8, w8, w9 ldr x9, [sp, #8] str w8, [x9, #4] b LBB0_3 LBB0_3: add sp, sp, #32 ret .cfi_endproc ; -- End function .subsections_via_symbols
eval/problem160/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ## -- Begin function func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp subq $80, %rsp movq %rdi, -8(%rbp) movq %rsi, -16(%rbp) movl %edx, -20(%rbp) movl %ecx, -24(%rbp) movslq -24(%rbp), %rdi shlq $2, %rdi callq _malloc movq %rax, -32(%rbp) movslq -24(%rbp), %rdi shlq $2, %rdi callq _malloc movq %rax, -40(%rbp) movl $0, -44(%rbp) LBB0_1: ## =>This Inner Loop Header: Depth=1 movl -44(%rbp), %eax cmpl -24(%rbp), %eax jge LBB0_4 ## %bb.2: ## in Loop: Header=BB0_1 Depth=1 movq -16(%rbp), %rax movslq -44(%rbp), %rcx movl (%rax,%rcx,4), %edx movq -32(%rbp), %rax movslq -44(%rbp), %rcx movl %edx, (%rax,%rcx,4) movl -44(%rbp), %edx movq -40(%rbp), %rax movslq -44(%rbp), %rcx movl %edx, (%rax,%rcx,4) ## %bb.3: ## in Loop: Header=BB0_1 Depth=1 movl -44(%rbp), %eax addl $1, %eax movl %eax, -44(%rbp) jmp LBB0_1 LBB0_4: movl $0, -48(%rbp) LBB0_5: ## =>This Loop Header: Depth=1 ## Child Loop BB0_8 Depth 2 ## Child Loop BB0_11 Depth 2 movl -48(%rbp), %eax cmpl -20(%rbp), %eax jge LBB0_16 ## %bb.6: ## in Loop: Header=BB0_5 Depth=1 movq -8(%rbp), %rax movslq -48(%rbp), %rcx movq (%rax,%rcx,8), %rdi leaq L_.str(%rip), %rsi callq _strcmp cmpl $0, %eax jne LBB0_14 ## %bb.7: ## in Loop: Header=BB0_5 Depth=1 jmp LBB0_8 LBB0_8: ## Parent Loop BB0_5 Depth=1 ## => This Inner Loop Header: Depth=2 movq -40(%rbp), %rax movq -40(%rbp), %rcx movslq -48(%rbp), %rdx movslq (%rcx,%rdx,4), %rcx movl (%rax,%rcx,4), %eax movq -40(%rbp), %rcx movslq -48(%rbp), %rdx cmpl (%rcx,%rdx,4), %eax je LBB0_10 ## %bb.9: ## in Loop: Header=BB0_8 Depth=2 movq -40(%rbp), %rax movq -40(%rbp), %rcx movslq -48(%rbp), %rdx movslq (%rcx,%rdx,4), %rcx movl (%rax,%rcx,4), %edx movq -40(%rbp), %rax movslq -48(%rbp), %rcx movl %edx, (%rax,%rcx,4) jmp LBB0_8 LBB0_10: ## in Loop: Header=BB0_5 Depth=1 jmp LBB0_11 LBB0_11: ## Parent Loop BB0_5 Depth=1 ## => This Inner Loop Header: Depth=2 movq -40(%rbp), %rax movq -40(%rbp), %rcx movl -48(%rbp), %edx addl $1, %edx movslq %edx, %rdx movslq (%rcx,%rdx,4), %rcx movl (%rax,%rcx,4), %eax movq -40(%rbp), %rcx movl -48(%rbp), %edx addl $1, %edx movslq %edx, %rdx cmpl (%rcx,%rdx,4), %eax je LBB0_13 ## %bb.12: ## in Loop: Header=BB0_11 Depth=2 movq -40(%rbp), %rax movq -40(%rbp), %rcx movl -48(%rbp), %edx addl $1, %edx movslq %edx, %rdx movslq (%rcx,%rdx,4), %rcx movl (%rax,%rcx,4), %edx movq -40(%rbp), %rax movl -48(%rbp), %ecx addl $1, %ecx movslq %ecx, %rcx movl %edx, (%rax,%rcx,4) jmp LBB0_11 LBB0_13: ## in Loop: Header=BB0_5 Depth=1 movq -32(%rbp), %rax movq -40(%rbp), %rcx movslq -48(%rbp), %rdx movslq (%rcx,%rdx,4), %rcx cvtsi2sdl (%rax,%rcx,4), %xmm0 movq -32(%rbp), %rax movq -40(%rbp), %rcx movl -48(%rbp), %edx addl $1, %edx movslq %edx, %rdx movslq (%rcx,%rdx,4), %rcx cvtsi2sdl (%rax,%rcx,4), %xmm1 callq _pow cvttsd2si %xmm0, %edx movq -32(%rbp), %rax movq -40(%rbp), %rcx movslq -48(%rbp), %rsi movslq (%rcx,%rsi,4), %rcx movl %edx, (%rax,%rcx,4) movq -40(%rbp), %rax movslq -48(%rbp), %rcx movl (%rax,%rcx,4), %edx movq -40(%rbp), %rax movl -48(%rbp), %ecx addl $1, %ecx movslq %ecx, %rcx movl %edx, (%rax,%rcx,4) LBB0_14: ## in Loop: Header=BB0_5 Depth=1 jmp LBB0_15 LBB0_15: ## in Loop: Header=BB0_5 Depth=1 movl -48(%rbp), %eax addl $1, %eax movl %eax, -48(%rbp) jmp LBB0_5 LBB0_16: movl $0, -52(%rbp) LBB0_17: ## =>This Loop Header: Depth=1 ## Child Loop BB0_21 Depth 2 ## Child Loop BB0_24 Depth 2 movl -52(%rbp), %eax cmpl -20(%rbp), %eax jge LBB0_32 ## %bb.18: ## in Loop: Header=BB0_17 Depth=1 movq -8(%rbp), %rax movslq -52(%rbp), %rcx movq (%rax,%rcx,8), %rdi leaq L_.str.1(%rip), %rsi callq _strcmp cmpl $0, %eax je LBB0_20 ## %bb.19: ## in Loop: Header=BB0_17 Depth=1 movq -8(%rbp), %rax movslq -52(%rbp), %rcx movq (%rax,%rcx,8), %rdi leaq L_.str.2(%rip), %rsi callq _strcmp cmpl $0, %eax jne LBB0_30 LBB0_20: ## in Loop: Header=BB0_17 Depth=1 jmp LBB0_21 LBB0_21: ## Parent Loop BB0_17 Depth=1 ## => This Inner Loop Header: Depth=2 movq -40(%rbp), %rax movq -40(%rbp), %rcx movslq -52(%rbp), %rdx movslq (%rcx,%rdx,4), %rcx movl (%rax,%rcx,4), %eax movq -40(%rbp), %rcx movslq -52(%rbp), %rdx cmpl (%rcx,%rdx,4), %eax je LBB0_23 ## %bb.22: ## in Loop: Header=BB0_21 Depth=2 movq -40(%rbp), %rax movq -40(%rbp), %rcx movslq -52(%rbp), %rdx movslq (%rcx,%rdx,4), %rcx movl (%rax,%rcx,4), %edx movq -40(%rbp), %rax movslq -52(%rbp), %rcx movl %edx, (%rax,%rcx,4) jmp LBB0_21 LBB0_23: ## in Loop: Header=BB0_17 Depth=1 jmp LBB0_24 LBB0_24: ## Parent Loop BB0_17 Depth=1 ## => This Inner Loop Header: Depth=2 movq -40(%rbp), %rax movq -40(%rbp), %rcx movl -52(%rbp), %edx addl $1, %edx movslq %edx, %rdx movslq (%rcx,%rdx,4), %rcx movl (%rax,%rcx,4), %eax movq -40(%rbp), %rcx movl -52(%rbp), %edx addl $1, %edx movslq %edx, %rdx cmpl (%rcx,%rdx,4), %eax je LBB0_26 ## %bb.25: ## in Loop: Header=BB0_24 Depth=2 movq -40(%rbp), %rax movq -40(%rbp), %rcx movl -52(%rbp), %edx addl $1, %edx movslq %edx, %rdx movslq (%rcx,%rdx,4), %rcx movl (%rax,%rcx,4), %edx movq -40(%rbp), %rax movl -52(%rbp), %ecx addl $1, %ecx movslq %ecx, %rcx movl %edx, (%rax,%rcx,4) jmp LBB0_24 LBB0_26: ## in Loop: Header=BB0_17 Depth=1 movq -8(%rbp), %rax movslq -52(%rbp), %rcx movq (%rax,%rcx,8), %rdi leaq L_.str.1(%rip), %rsi callq _strcmp cmpl $0, %eax jne LBB0_28 ## %bb.27: ## in Loop: Header=BB0_17 Depth=1 movq -32(%rbp), %rax movq -40(%rbp), %rcx movl -52(%rbp), %edx addl $1, %edx movslq %edx, %rdx movslq (%rcx,%rdx,4), %rcx movl (%rax,%rcx,4), %edx movq -32(%rbp), %rax movq -40(%rbp), %rcx movslq -52(%rbp), %rsi movslq (%rcx,%rsi,4), %rcx imull (%rax,%rcx,4), %edx movl %edx, (%rax,%rcx,4) jmp LBB0_29 LBB0_28: ## in Loop: Header=BB0_17 Depth=1 movq -32(%rbp), %rax movq -40(%rbp), %rcx movl -52(%rbp), %edx addl $1, %edx movslq %edx, %rdx movslq (%rcx,%rdx,4), %rcx movl (%rax,%rcx,4), %esi movq -32(%rbp), %rax movq %rax, -72(%rbp) ## 8-byte Spill movq -40(%rbp), %rcx movslq -52(%rbp), %rdx movslq (%rcx,%rdx,4), %rcx movl (%rax,%rcx,4), %eax cltd idivl %esi movl %eax, %edx movq -72(%rbp), %rax ## 8-byte Reload movl %edx, (%rax,%rcx,4) LBB0_29: ## in Loop: Header=BB0_17 Depth=1 movq -40(%rbp), %rax movslq -52(%rbp), %rcx movl (%rax,%rcx,4), %edx movq -40(%rbp), %rax movl -52(%rbp), %ecx addl $1, %ecx movslq %ecx, %rcx movl %edx, (%rax,%rcx,4) LBB0_30: ## in Loop: Header=BB0_17 Depth=1 jmp LBB0_31 LBB0_31: ## in Loop: Header=BB0_17 Depth=1 movl -52(%rbp), %eax addl $1, %eax movl %eax, -52(%rbp) jmp LBB0_17 LBB0_32: movl $0, -56(%rbp) LBB0_33: ## =>This Loop Header: Depth=1 ## Child Loop BB0_37 Depth 2 ## Child Loop BB0_40 Depth 2 movl -56(%rbp), %eax cmpl -20(%rbp), %eax jge LBB0_48 ## %bb.34: ## in Loop: Header=BB0_33 Depth=1 movq -8(%rbp), %rax movslq -56(%rbp), %rcx movq (%rax,%rcx,8), %rdi leaq L_.str.3(%rip), %rsi callq _strcmp cmpl $0, %eax je LBB0_36 ## %bb.35: ## in Loop: Header=BB0_33 Depth=1 movq -8(%rbp), %rax movslq -56(%rbp), %rcx movq (%rax,%rcx,8), %rdi leaq L_.str.4(%rip), %rsi callq _strcmp cmpl $0, %eax jne LBB0_46 LBB0_36: ## in Loop: Header=BB0_33 Depth=1 jmp LBB0_37 LBB0_37: ## Parent Loop BB0_33 Depth=1 ## => This Inner Loop Header: Depth=2 movq -40(%rbp), %rax movq -40(%rbp), %rcx movslq -56(%rbp), %rdx movslq (%rcx,%rdx,4), %rcx movl (%rax,%rcx,4), %eax movq -40(%rbp), %rcx movslq -56(%rbp), %rdx cmpl (%rcx,%rdx,4), %eax je LBB0_39 ## %bb.38: ## in Loop: Header=BB0_37 Depth=2 movq -40(%rbp), %rax movq -40(%rbp), %rcx movslq -56(%rbp), %rdx movslq (%rcx,%rdx,4), %rcx movl (%rax,%rcx,4), %edx movq -40(%rbp), %rax movslq -56(%rbp), %rcx movl %edx, (%rax,%rcx,4) jmp LBB0_37 LBB0_39: ## in Loop: Header=BB0_33 Depth=1 jmp LBB0_40 LBB0_40: ## Parent Loop BB0_33 Depth=1 ## => This Inner Loop Header: Depth=2 movq -40(%rbp), %rax movq -40(%rbp), %rcx movl -56(%rbp), %edx addl $1, %edx movslq %edx, %rdx movslq (%rcx,%rdx,4), %rcx movl (%rax,%rcx,4), %eax movq -40(%rbp), %rcx movl -56(%rbp), %edx addl $1, %edx movslq %edx, %rdx cmpl (%rcx,%rdx,4), %eax je LBB0_42 ## %bb.41: ## in Loop: Header=BB0_40 Depth=2 movq -40(%rbp), %rax movq -40(%rbp), %rcx movl -56(%rbp), %edx addl $1, %edx movslq %edx, %rdx movslq (%rcx,%rdx,4), %rcx movl (%rax,%rcx,4), %edx movq -40(%rbp), %rax movl -56(%rbp), %ecx addl $1, %ecx movslq %ecx, %rcx movl %edx, (%rax,%rcx,4) jmp LBB0_40 LBB0_42: ## in Loop: Header=BB0_33 Depth=1 movq -8(%rbp), %rax movslq -56(%rbp), %rcx movq (%rax,%rcx,8), %rdi leaq L_.str.3(%rip), %rsi callq _strcmp cmpl $0, %eax jne LBB0_44 ## %bb.43: ## in Loop: Header=BB0_33 Depth=1 movq -32(%rbp), %rax movq -40(%rbp), %rcx movl -56(%rbp), %edx addl $1, %edx movslq %edx, %rdx movslq (%rcx,%rdx,4), %rcx movl (%rax,%rcx,4), %edx movq -32(%rbp), %rax movq -40(%rbp), %rcx movslq -56(%rbp), %rsi movslq (%rcx,%rsi,4), %rcx addl (%rax,%rcx,4), %edx movl %edx, (%rax,%rcx,4) jmp LBB0_45 LBB0_44: ## in Loop: Header=BB0_33 Depth=1 movq -32(%rbp), %rax movq -40(%rbp), %rcx movl -56(%rbp), %edx addl $1, %edx movslq %edx, %rdx movslq (%rcx,%rdx,4), %rcx movl (%rax,%rcx,4), %esi movq -32(%rbp), %rax movq -40(%rbp), %rcx movslq -56(%rbp), %rdx movslq (%rcx,%rdx,4), %rcx movl (%rax,%rcx,4), %edx subl %esi, %edx movl %edx, (%rax,%rcx,4) LBB0_45: ## in Loop: Header=BB0_33 Depth=1 movq -40(%rbp), %rax movslq -56(%rbp), %rcx movl (%rax,%rcx,4), %edx movq -40(%rbp), %rax movl -56(%rbp), %ecx addl $1, %ecx movslq %ecx, %rcx movl %edx, (%rax,%rcx,4) LBB0_46: ## in Loop: Header=BB0_33 Depth=1 jmp LBB0_47 LBB0_47: ## in Loop: Header=BB0_33 Depth=1 movl -56(%rbp), %eax addl $1, %eax movl %eax, -56(%rbp) jmp LBB0_33 LBB0_48: movq -32(%rbp), %rax movl (%rax), %eax movl %eax, -60(%rbp) movq -32(%rbp), %rdi callq _free movq -40(%rbp), %rdi callq _free movl -60(%rbp), %eax addq $80, %rsp popq %rbp retq .cfi_endproc ## -- End function .section __TEXT,__cstring,cstring_literals L_.str: ## @.str .asciz "**" L_.str.1: ## @.str.1 .asciz "*" L_.str.2: ## @.str.2 .asciz "//" L_.str.3: ## @.str.3 .asciz "+" L_.str.4: ## @.str.4 .asciz "-" .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #80 .cfi_def_cfa_offset 80 stp x29, x30, [sp, #64] ; 16-byte Folded Spill add x29, sp, #64 .cfi_def_cfa w29, 16 .cfi_offset w30, -8 .cfi_offset w29, -16 stur x0, [x29, #-8] stur x1, [x29, #-16] stur w2, [x29, #-20] stur w3, [x29, #-24] ldursw x8, [x29, #-24] lsl x0, x8, #2 bl _malloc str x0, [sp, #32] ldursw x8, [x29, #-24] lsl x0, x8, #2 bl _malloc str x0, [sp, #24] str wzr, [sp, #20] b LBB0_1 LBB0_1: ; =>This Inner Loop Header: Depth=1 ldr w8, [sp, #20] ldur w9, [x29, #-24] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_4 b LBB0_2 LBB0_2: ; in Loop: Header=BB0_1 Depth=1 ldur x8, [x29, #-16] ldrsw x9, [sp, #20] ldr w8, [x8, x9, lsl #2] ldr x9, [sp, #32] ldrsw x10, [sp, #20] str w8, [x9, x10, lsl #2] ldr w8, [sp, #20] ldr x9, [sp, #24] ldrsw x10, [sp, #20] str w8, [x9, x10, lsl #2] b LBB0_3 LBB0_3: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #20] add w8, w8, #1 str w8, [sp, #20] b LBB0_1 LBB0_4: str wzr, [sp, #16] b LBB0_5 LBB0_5: ; =>This Loop Header: Depth=1 ; Child Loop BB0_8 Depth 2 ; Child Loop BB0_11 Depth 2 ldr w8, [sp, #16] ldur w9, [x29, #-20] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_16 b LBB0_6 LBB0_6: ; in Loop: Header=BB0_5 Depth=1 ldur x8, [x29, #-8] ldrsw x9, [sp, #16] ldr x0, [x8, x9, lsl #3] adrp x1, l_.str@PAGE add x1, x1, l_.str@PAGEOFF bl _strcmp subs w8, w0, #0 cset w8, ne tbnz w8, #0, LBB0_14 b LBB0_7 LBB0_7: ; in Loop: Header=BB0_5 Depth=1 b LBB0_8 LBB0_8: ; Parent Loop BB0_5 Depth=1 ; => This Inner Loop Header: Depth=2 ldr x8, [sp, #24] ldr x9, [sp, #24] ldrsw x10, [sp, #16] ldrsw x9, [x9, x10, lsl #2] ldr w8, [x8, x9, lsl #2] ldr x9, [sp, #24] ldrsw x10, [sp, #16] ldr w9, [x9, x10, lsl #2] subs w8, w8, w9 cset w8, eq tbnz w8, #0, LBB0_10 b LBB0_9 LBB0_9: ; in Loop: Header=BB0_8 Depth=2 ldr x8, [sp, #24] ldr x9, [sp, #24] ldrsw x10, [sp, #16] ldrsw x9, [x9, x10, lsl #2] ldr w8, [x8, x9, lsl #2] ldr x9, [sp, #24] ldrsw x10, [sp, #16] str w8, [x9, x10, lsl #2] b LBB0_8 LBB0_10: ; in Loop: Header=BB0_5 Depth=1 b LBB0_11 LBB0_11: ; Parent Loop BB0_5 Depth=1 ; => This Inner Loop Header: Depth=2 ldr x8, [sp, #24] ldr x9, [sp, #24] ldr w10, [sp, #16] add w10, w10, #1 ldrsw x9, [x9, w10, sxtw #2] ldr w8, [x8, x9, lsl #2] ldr x9, [sp, #24] ldr w10, [sp, #16] add w10, w10, #1 ldr w9, [x9, w10, sxtw #2] subs w8, w8, w9 cset w8, eq tbnz w8, #0, LBB0_13 b LBB0_12 LBB0_12: ; in Loop: Header=BB0_11 Depth=2 ldr x8, [sp, #24] ldr x9, [sp, #24] ldr w10, [sp, #16] add w10, w10, #1 ldrsw x9, [x9, w10, sxtw #2] ldr w8, [x8, x9, lsl #2] ldr x9, [sp, #24] ldr w10, [sp, #16] add w10, w10, #1 str w8, [x9, w10, sxtw #2] b LBB0_11 LBB0_13: ; in Loop: Header=BB0_5 Depth=1 ldr x8, [sp, #32] ldr x9, [sp, #24] ldrsw x10, [sp, #16] ldrsw x9, [x9, x10, lsl #2] ldr s1, [x8, x9, lsl #2] ; implicit-def: $d0 fmov s0, s1 sshll.2d v0, v0, #0 ; kill: def $d0 killed $d0 killed $q0 scvtf d0, d0 ldr x8, [sp, #32] ldr x9, [sp, #24] ldr w10, [sp, #16] add w10, w10, #1 ldrsw x9, [x9, w10, sxtw #2] ldr s2, [x8, x9, lsl #2] ; implicit-def: $d1 fmov s1, s2 sshll.2d v1, v1, #0 ; kill: def $d1 killed $d1 killed $q1 scvtf d1, d1 bl _pow fcvtzs w8, d0 ldr x9, [sp, #32] ldr x10, [sp, #24] ldrsw x11, [sp, #16] ldrsw x10, [x10, x11, lsl #2] str w8, [x9, x10, lsl #2] ldr x8, [sp, #24] ldrsw x9, [sp, #16] ldr w8, [x8, x9, lsl #2] ldr x9, [sp, #24] ldr w10, [sp, #16] add w10, w10, #1 str w8, [x9, w10, sxtw #2] b LBB0_14 LBB0_14: ; in Loop: Header=BB0_5 Depth=1 b LBB0_15 LBB0_15: ; in Loop: Header=BB0_5 Depth=1 ldr w8, [sp, #16] add w8, w8, #1 str w8, [sp, #16] b LBB0_5 LBB0_16: str wzr, [sp, #12] b LBB0_17 LBB0_17: ; =>This Loop Header: Depth=1 ; Child Loop BB0_21 Depth 2 ; Child Loop BB0_24 Depth 2 ldr w8, [sp, #12] ldur w9, [x29, #-20] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_32 b LBB0_18 LBB0_18: ; in Loop: Header=BB0_17 Depth=1 ldur x8, [x29, #-8] ldrsw x9, [sp, #12] ldr x0, [x8, x9, lsl #3] adrp x1, l_.str.1@PAGE add x1, x1, l_.str.1@PAGEOFF bl _strcmp subs w8, w0, #0 cset w8, eq tbnz w8, #0, LBB0_20 b LBB0_19 LBB0_19: ; in Loop: Header=BB0_17 Depth=1 ldur x8, [x29, #-8] ldrsw x9, [sp, #12] ldr x0, [x8, x9, lsl #3] adrp x1, l_.str.2@PAGE add x1, x1, l_.str.2@PAGEOFF bl _strcmp subs w8, w0, #0 cset w8, ne tbnz w8, #0, LBB0_30 b LBB0_20 LBB0_20: ; in Loop: Header=BB0_17 Depth=1 b LBB0_21 LBB0_21: ; Parent Loop BB0_17 Depth=1 ; => This Inner Loop Header: Depth=2 ldr x8, [sp, #24] ldr x9, [sp, #24] ldrsw x10, [sp, #12] ldrsw x9, [x9, x10, lsl #2] ldr w8, [x8, x9, lsl #2] ldr x9, [sp, #24] ldrsw x10, [sp, #12] ldr w9, [x9, x10, lsl #2] subs w8, w8, w9 cset w8, eq tbnz w8, #0, LBB0_23 b LBB0_22 LBB0_22: ; in Loop: Header=BB0_21 Depth=2 ldr x8, [sp, #24] ldr x9, [sp, #24] ldrsw x10, [sp, #12] ldrsw x9, [x9, x10, lsl #2] ldr w8, [x8, x9, lsl #2] ldr x9, [sp, #24] ldrsw x10, [sp, #12] str w8, [x9, x10, lsl #2] b LBB0_21 LBB0_23: ; in Loop: Header=BB0_17 Depth=1 b LBB0_24 LBB0_24: ; Parent Loop BB0_17 Depth=1 ; => This Inner Loop Header: Depth=2 ldr x8, [sp, #24] ldr x9, [sp, #24] ldr w10, [sp, #12] add w10, w10, #1 ldrsw x9, [x9, w10, sxtw #2] ldr w8, [x8, x9, lsl #2] ldr x9, [sp, #24] ldr w10, [sp, #12] add w10, w10, #1 ldr w9, [x9, w10, sxtw #2] subs w8, w8, w9 cset w8, eq tbnz w8, #0, LBB0_26 b LBB0_25 LBB0_25: ; in Loop: Header=BB0_24 Depth=2 ldr x8, [sp, #24] ldr x9, [sp, #24] ldr w10, [sp, #12] add w10, w10, #1 ldrsw x9, [x9, w10, sxtw #2] ldr w8, [x8, x9, lsl #2] ldr x9, [sp, #24] ldr w10, [sp, #12] add w10, w10, #1 str w8, [x9, w10, sxtw #2] b LBB0_24 LBB0_26: ; in Loop: Header=BB0_17 Depth=1 ldur x8, [x29, #-8] ldrsw x9, [sp, #12] ldr x0, [x8, x9, lsl #3] adrp x1, l_.str.1@PAGE add x1, x1, l_.str.1@PAGEOFF bl _strcmp subs w8, w0, #0 cset w8, ne tbnz w8, #0, LBB0_28 b LBB0_27 LBB0_27: ; in Loop: Header=BB0_17 Depth=1 ldr x8, [sp, #32] ldr x9, [sp, #24] ldr w10, [sp, #12] add w10, w10, #1 ldrsw x9, [x9, w10, sxtw #2] ldr w10, [x8, x9, lsl #2] ldr x8, [sp, #32] ldr x9, [sp, #24] ldrsw x11, [sp, #12] ldrsw x9, [x9, x11, lsl #2] add x9, x8, x9, lsl #2 ldr w8, [x9] mul w8, w8, w10 str w8, [x9] b LBB0_29 LBB0_28: ; in Loop: Header=BB0_17 Depth=1 ldr x8, [sp, #32] ldr x9, [sp, #24] ldr w10, [sp, #12] add w10, w10, #1 ldrsw x9, [x9, w10, sxtw #2] ldr w10, [x8, x9, lsl #2] ldr x8, [sp, #32] ldr x9, [sp, #24] ldrsw x11, [sp, #12] ldrsw x9, [x9, x11, lsl #2] add x9, x8, x9, lsl #2 ldr w8, [x9] sdiv w8, w8, w10 str w8, [x9] b LBB0_29 LBB0_29: ; in Loop: Header=BB0_17 Depth=1 ldr x8, [sp, #24] ldrsw x9, [sp, #12] ldr w8, [x8, x9, lsl #2] ldr x9, [sp, #24] ldr w10, [sp, #12] add w10, w10, #1 str w8, [x9, w10, sxtw #2] b LBB0_30 LBB0_30: ; in Loop: Header=BB0_17 Depth=1 b LBB0_31 LBB0_31: ; in Loop: Header=BB0_17 Depth=1 ldr w8, [sp, #12] add w8, w8, #1 str w8, [sp, #12] b LBB0_17 LBB0_32: str wzr, [sp, #8] b LBB0_33 LBB0_33: ; =>This Loop Header: Depth=1 ; Child Loop BB0_37 Depth 2 ; Child Loop BB0_40 Depth 2 ldr w8, [sp, #8] ldur w9, [x29, #-20] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_48 b LBB0_34 LBB0_34: ; in Loop: Header=BB0_33 Depth=1 ldur x8, [x29, #-8] ldrsw x9, [sp, #8] ldr x0, [x8, x9, lsl #3] adrp x1, l_.str.3@PAGE add x1, x1, l_.str.3@PAGEOFF bl _strcmp subs w8, w0, #0 cset w8, eq tbnz w8, #0, LBB0_36 b LBB0_35 LBB0_35: ; in Loop: Header=BB0_33 Depth=1 ldur x8, [x29, #-8] ldrsw x9, [sp, #8] ldr x0, [x8, x9, lsl #3] adrp x1, l_.str.4@PAGE add x1, x1, l_.str.4@PAGEOFF bl _strcmp subs w8, w0, #0 cset w8, ne tbnz w8, #0, LBB0_46 b LBB0_36 LBB0_36: ; in Loop: Header=BB0_33 Depth=1 b LBB0_37 LBB0_37: ; Parent Loop BB0_33 Depth=1 ; => This Inner Loop Header: Depth=2 ldr x8, [sp, #24] ldr x9, [sp, #24] ldrsw x10, [sp, #8] ldrsw x9, [x9, x10, lsl #2] ldr w8, [x8, x9, lsl #2] ldr x9, [sp, #24] ldrsw x10, [sp, #8] ldr w9, [x9, x10, lsl #2] subs w8, w8, w9 cset w8, eq tbnz w8, #0, LBB0_39 b LBB0_38 LBB0_38: ; in Loop: Header=BB0_37 Depth=2 ldr x8, [sp, #24] ldr x9, [sp, #24] ldrsw x10, [sp, #8] ldrsw x9, [x9, x10, lsl #2] ldr w8, [x8, x9, lsl #2] ldr x9, [sp, #24] ldrsw x10, [sp, #8] str w8, [x9, x10, lsl #2] b LBB0_37 LBB0_39: ; in Loop: Header=BB0_33 Depth=1 b LBB0_40 LBB0_40: ; Parent Loop BB0_33 Depth=1 ; => This Inner Loop Header: Depth=2 ldr x8, [sp, #24] ldr x9, [sp, #24] ldr w10, [sp, #8] add w10, w10, #1 ldrsw x9, [x9, w10, sxtw #2] ldr w8, [x8, x9, lsl #2] ldr x9, [sp, #24] ldr w10, [sp, #8] add w10, w10, #1 ldr w9, [x9, w10, sxtw #2] subs w8, w8, w9 cset w8, eq tbnz w8, #0, LBB0_42 b LBB0_41 LBB0_41: ; in Loop: Header=BB0_40 Depth=2 ldr x8, [sp, #24] ldr x9, [sp, #24] ldr w10, [sp, #8] add w10, w10, #1 ldrsw x9, [x9, w10, sxtw #2] ldr w8, [x8, x9, lsl #2] ldr x9, [sp, #24] ldr w10, [sp, #8] add w10, w10, #1 str w8, [x9, w10, sxtw #2] b LBB0_40 LBB0_42: ; in Loop: Header=BB0_33 Depth=1 ldur x8, [x29, #-8] ldrsw x9, [sp, #8] ldr x0, [x8, x9, lsl #3] adrp x1, l_.str.3@PAGE add x1, x1, l_.str.3@PAGEOFF bl _strcmp subs w8, w0, #0 cset w8, ne tbnz w8, #0, LBB0_44 b LBB0_43 LBB0_43: ; in Loop: Header=BB0_33 Depth=1 ldr x8, [sp, #32] ldr x9, [sp, #24] ldr w10, [sp, #8] add w10, w10, #1 ldrsw x9, [x9, w10, sxtw #2] ldr w10, [x8, x9, lsl #2] ldr x8, [sp, #32] ldr x9, [sp, #24] ldrsw x11, [sp, #8] ldrsw x9, [x9, x11, lsl #2] add x9, x8, x9, lsl #2 ldr w8, [x9] add w8, w8, w10 str w8, [x9] b LBB0_45 LBB0_44: ; in Loop: Header=BB0_33 Depth=1 ldr x8, [sp, #32] ldr x9, [sp, #24] ldr w10, [sp, #8] add w10, w10, #1 ldrsw x9, [x9, w10, sxtw #2] ldr w10, [x8, x9, lsl #2] ldr x8, [sp, #32] ldr x9, [sp, #24] ldrsw x11, [sp, #8] ldrsw x9, [x9, x11, lsl #2] add x9, x8, x9, lsl #2 ldr w8, [x9] subs w8, w8, w10 str w8, [x9] b LBB0_45 LBB0_45: ; in Loop: Header=BB0_33 Depth=1 ldr x8, [sp, #24] ldrsw x9, [sp, #8] ldr w8, [x8, x9, lsl #2] ldr x9, [sp, #24] ldr w10, [sp, #8] add w10, w10, #1 str w8, [x9, w10, sxtw #2] b LBB0_46 LBB0_46: ; in Loop: Header=BB0_33 Depth=1 b LBB0_47 LBB0_47: ; in Loop: Header=BB0_33 Depth=1 ldr w8, [sp, #8] add w8, w8, #1 str w8, [sp, #8] b LBB0_33 LBB0_48: ldr x8, [sp, #32] ldr w8, [x8] str w8, [sp, #4] ldr x0, [sp, #32] bl _free ldr x0, [sp, #24] bl _free ldr w0, [sp, #4] ldp x29, x30, [sp, #64] ; 16-byte Folded Reload add sp, sp, #80 ret .cfi_endproc ; -- End function .section __TEXT,__cstring,cstring_literals l_.str: ; @.str .asciz "**" l_.str.1: ; @.str.1 .asciz "*" l_.str.2: ; @.str.2 .asciz "//" l_.str.3: ; @.str.3 .asciz "+" l_.str.4: ; @.str.4 .asciz "-" .subsections_via_symbols
eval/problem161/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ## -- Begin function func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp subq $32, %rsp movq %rdi, -8(%rbp) movl $0, -12(%rbp) movq -8(%rbp), %rdi callq _strlen ## kill: def $eax killed $eax killed $rax movl %eax, -16(%rbp) movl $0, -20(%rbp) LBB0_1: ## =>This Inner Loop Header: Depth=1 movl -20(%rbp), %eax cmpl -16(%rbp), %eax jge LBB0_12 ## %bb.2: ## in Loop: Header=BB0_1 Depth=1 movq -8(%rbp), %rax movslq -20(%rbp), %rcx movzbl (%rax,%rcx), %edi callq _isalpha cmpl $0, %eax je LBB0_9 ## %bb.3: ## in Loop: Header=BB0_1 Depth=1 movq -8(%rbp), %rax movslq -20(%rbp), %rcx movzbl (%rax,%rcx), %edi callq _isupper cmpl $0, %eax je LBB0_5 ## %bb.4: ## in Loop: Header=BB0_1 Depth=1 movq -8(%rbp), %rax movslq -20(%rbp), %rcx movzbl (%rax,%rcx), %edi callq _tolower movb %al, %dl movq -8(%rbp), %rax movslq -20(%rbp), %rcx movb %dl, (%rax,%rcx) jmp LBB0_8 LBB0_5: ## in Loop: Header=BB0_1 Depth=1 movq -8(%rbp), %rax movslq -20(%rbp), %rcx movzbl (%rax,%rcx), %edi callq _islower cmpl $0, %eax je LBB0_7 ## %bb.6: ## in Loop: Header=BB0_1 Depth=1 movq -8(%rbp), %rax movslq -20(%rbp), %rcx movzbl (%rax,%rcx), %edi callq _toupper movb %al, %dl movq -8(%rbp), %rax movslq -20(%rbp), %rcx movb %dl, (%rax,%rcx) LBB0_7: ## in Loop: Header=BB0_1 Depth=1 jmp LBB0_8 LBB0_8: ## in Loop: Header=BB0_1 Depth=1 jmp LBB0_10 LBB0_9: ## in Loop: Header=BB0_1 Depth=1 movl -12(%rbp), %eax addl $1, %eax movl %eax, -12(%rbp) LBB0_10: ## in Loop: Header=BB0_1 Depth=1 jmp LBB0_11 LBB0_11: ## in Loop: Header=BB0_1 Depth=1 movl -20(%rbp), %eax addl $1, %eax movl %eax, -20(%rbp) jmp LBB0_1 LBB0_12: movl -12(%rbp), %eax cmpl -16(%rbp), %eax jne LBB0_18 ## %bb.13: movl $0, -24(%rbp) LBB0_14: ## =>This Inner Loop Header: Depth=1 movl -24(%rbp), %eax movl %eax, -32(%rbp) ## 4-byte Spill movl -16(%rbp), %eax movl $2, %ecx cltd idivl %ecx movl %eax, %ecx movl -32(%rbp), %eax ## 4-byte Reload cmpl %ecx, %eax jge LBB0_17 ## %bb.15: ## in Loop: Header=BB0_14 Depth=1 movq -8(%rbp), %rax movslq -24(%rbp), %rcx movb (%rax,%rcx), %al movb %al, -25(%rbp) movq -8(%rbp), %rax movl -16(%rbp), %ecx subl -24(%rbp), %ecx subl $1, %ecx movslq %ecx, %rcx movb (%rax,%rcx), %dl movq -8(%rbp), %rax movslq -24(%rbp), %rcx movb %dl, (%rax,%rcx) movb -25(%rbp), %dl movq -8(%rbp), %rax movl -16(%rbp), %ecx subl -24(%rbp), %ecx subl $1, %ecx movslq %ecx, %rcx movb %dl, (%rax,%rcx) ## %bb.16: ## in Loop: Header=BB0_14 Depth=1 movl -24(%rbp), %eax addl $1, %eax movl %eax, -24(%rbp) jmp LBB0_14 LBB0_17: jmp LBB0_18 LBB0_18: movq -8(%rbp), %rax addq $32, %rsp popq %rbp retq .cfi_endproc ## -- End function .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #48 .cfi_def_cfa_offset 48 stp x29, x30, [sp, #32] ; 16-byte Folded Spill add x29, sp, #32 .cfi_def_cfa w29, 16 .cfi_offset w30, -8 .cfi_offset w29, -16 stur x0, [x29, #-8] stur wzr, [x29, #-12] ldur x0, [x29, #-8] bl _strlen mov x8, x0 str w8, [sp, #16] str wzr, [sp, #12] b LBB0_1 LBB0_1: ; =>This Inner Loop Header: Depth=1 ldr w8, [sp, #12] ldr w9, [sp, #16] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_12 b LBB0_2 LBB0_2: ; in Loop: Header=BB0_1 Depth=1 ldur x8, [x29, #-8] ldrsw x9, [sp, #12] ldrb w0, [x8, x9] bl _isalpha subs w8, w0, #0 cset w8, eq tbnz w8, #0, LBB0_9 b LBB0_3 LBB0_3: ; in Loop: Header=BB0_1 Depth=1 ldur x8, [x29, #-8] ldrsw x9, [sp, #12] ldrb w0, [x8, x9] bl _isupper subs w8, w0, #0 cset w8, eq tbnz w8, #0, LBB0_5 b LBB0_4 LBB0_4: ; in Loop: Header=BB0_1 Depth=1 ldur x8, [x29, #-8] ldrsw x9, [sp, #12] ldrb w0, [x8, x9] bl _tolower ldur x8, [x29, #-8] ldrsw x9, [sp, #12] strb w0, [x8, x9] b LBB0_8 LBB0_5: ; in Loop: Header=BB0_1 Depth=1 ldur x8, [x29, #-8] ldrsw x9, [sp, #12] ldrb w0, [x8, x9] bl _islower subs w8, w0, #0 cset w8, eq tbnz w8, #0, LBB0_7 b LBB0_6 LBB0_6: ; in Loop: Header=BB0_1 Depth=1 ldur x8, [x29, #-8] ldrsw x9, [sp, #12] ldrb w0, [x8, x9] bl _toupper ldur x8, [x29, #-8] ldrsw x9, [sp, #12] strb w0, [x8, x9] b LBB0_7 LBB0_7: ; in Loop: Header=BB0_1 Depth=1 b LBB0_8 LBB0_8: ; in Loop: Header=BB0_1 Depth=1 b LBB0_10 LBB0_9: ; in Loop: Header=BB0_1 Depth=1 ldur w8, [x29, #-12] add w8, w8, #1 stur w8, [x29, #-12] b LBB0_10 LBB0_10: ; in Loop: Header=BB0_1 Depth=1 b LBB0_11 LBB0_11: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #12] add w8, w8, #1 str w8, [sp, #12] b LBB0_1 LBB0_12: ldur w8, [x29, #-12] ldr w9, [sp, #16] subs w8, w8, w9 cset w8, ne tbnz w8, #0, LBB0_18 b LBB0_13 LBB0_13: str wzr, [sp, #8] b LBB0_14 LBB0_14: ; =>This Inner Loop Header: Depth=1 ldr w8, [sp, #8] ldr w9, [sp, #16] mov w10, #2 sdiv w9, w9, w10 subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_17 b LBB0_15 LBB0_15: ; in Loop: Header=BB0_14 Depth=1 ldur x8, [x29, #-8] ldrsw x9, [sp, #8] add x8, x8, x9 ldrb w8, [x8] strb w8, [sp, #7] ldur x8, [x29, #-8] ldr w9, [sp, #16] ldr w10, [sp, #8] subs w9, w9, w10 subs w9, w9, #1 add x8, x8, w9, sxtw ldrb w8, [x8] ldur x9, [x29, #-8] ldrsw x10, [sp, #8] add x9, x9, x10 strb w8, [x9] ldrb w8, [sp, #7] ldur x9, [x29, #-8] ldr w10, [sp, #16] ldr w11, [sp, #8] subs w10, w10, w11 subs w10, w10, #1 add x9, x9, w10, sxtw strb w8, [x9] b LBB0_16 LBB0_16: ; in Loop: Header=BB0_14 Depth=1 ldr w8, [sp, #8] add w8, w8, #1 str w8, [sp, #8] b LBB0_14 LBB0_17: b LBB0_18 LBB0_18: ldur x0, [x29, #-8] ldp x29, x30, [sp, #32] ; 16-byte Folded Reload add sp, sp, #48 ret .cfi_endproc ; -- End function .subsections_via_symbols
eval/problem162/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ## -- Begin function func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp movl %edi, -4(%rbp) movl %esi, -8(%rbp) movq %rdx, -16(%rbp) movq %rcx, -24(%rbp) movq -24(%rbp), %rax movl $0, (%rax) movl -8(%rbp), %eax cmpl -4(%rbp), %eax jge LBB0_2 ## %bb.1: movl -4(%rbp), %eax movl %eax, -28(%rbp) movl -8(%rbp), %eax movl %eax, -4(%rbp) movl -28(%rbp), %eax movl %eax, -8(%rbp) LBB0_2: movl -4(%rbp), %eax movl %eax, -32(%rbp) LBB0_3: ## =>This Inner Loop Header: Depth=1 movl -32(%rbp), %eax cmpl -8(%rbp), %eax jg LBB0_9 ## %bb.4: ## in Loop: Header=BB0_3 Depth=1 cmpl $10, -32(%rbp) jge LBB0_7 ## %bb.5: ## in Loop: Header=BB0_3 Depth=1 movl -32(%rbp), %eax movl $2, %ecx cltd idivl %ecx cmpl $0, %edx jne LBB0_7 ## %bb.6: ## in Loop: Header=BB0_3 Depth=1 movl -32(%rbp), %edx movq -16(%rbp), %rax movq -24(%rbp), %rsi movl (%rsi), %ecx movl %ecx, %edi addl $1, %edi movl %edi, (%rsi) movslq %ecx, %rcx movl %edx, (%rax,%rcx,4) LBB0_7: ## in Loop: Header=BB0_3 Depth=1 jmp LBB0_8 LBB0_8: ## in Loop: Header=BB0_3 Depth=1 movl -32(%rbp), %eax addl $1, %eax movl %eax, -32(%rbp) jmp LBB0_3 LBB0_9: popq %rbp retq .cfi_endproc ## -- End function .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #32 .cfi_def_cfa_offset 32 str w0, [sp, #28] str w1, [sp, #24] str x2, [sp, #16] str x3, [sp, #8] ldr x8, [sp, #8] str wzr, [x8] ldr w8, [sp, #24] ldr w9, [sp, #28] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_2 b LBB0_1 LBB0_1: ldr w8, [sp, #28] str w8, [sp, #4] ldr w8, [sp, #24] str w8, [sp, #28] ldr w8, [sp, #4] str w8, [sp, #24] b LBB0_2 LBB0_2: ldr w8, [sp, #28] str w8, [sp] b LBB0_3 LBB0_3: ; =>This Inner Loop Header: Depth=1 ldr w8, [sp] ldr w9, [sp, #24] subs w8, w8, w9 cset w8, gt tbnz w8, #0, LBB0_9 b LBB0_4 LBB0_4: ; in Loop: Header=BB0_3 Depth=1 ldr w8, [sp] subs w8, w8, #10 cset w8, ge tbnz w8, #0, LBB0_7 b LBB0_5 LBB0_5: ; in Loop: Header=BB0_3 Depth=1 ldr w8, [sp] mov w10, #2 sdiv w9, w8, w10 mul w9, w9, w10 subs w8, w8, w9 subs w8, w8, #0 cset w8, ne tbnz w8, #0, LBB0_7 b LBB0_6 LBB0_6: ; in Loop: Header=BB0_3 Depth=1 ldr w8, [sp] ldr x9, [sp, #16] ldr x12, [sp, #8] ldrsw x10, [x12] mov x11, x10 add w11, w11, #1 str w11, [x12] str w8, [x9, x10, lsl #2] b LBB0_7 LBB0_7: ; in Loop: Header=BB0_3 Depth=1 b LBB0_8 LBB0_8: ; in Loop: Header=BB0_3 Depth=1 ldr w8, [sp] add w8, w8, #1 str w8, [sp] b LBB0_3 LBB0_9: add sp, sp, #32 ret .cfi_endproc ; -- End function .subsections_via_symbols
eval/problem163/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ## -- Begin function func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp movl %edi, -4(%rbp) movl %esi, -8(%rbp) movq %rdx, -16(%rbp) movq %rcx, -24(%rbp) movq -24(%rbp), %rax movl $0, (%rax) movl -8(%rbp), %eax cmpl -4(%rbp), %eax jge LBB0_2 ## %bb.1: movl -4(%rbp), %eax movl %eax, -28(%rbp) movl -8(%rbp), %eax movl %eax, -4(%rbp) movl -28(%rbp), %eax movl %eax, -8(%rbp) LBB0_2: movl -4(%rbp), %eax movl %eax, -32(%rbp) LBB0_3: ## =>This Inner Loop Header: Depth=1 movl -32(%rbp), %eax cmpl -8(%rbp), %eax jg LBB0_9 ## %bb.4: ## in Loop: Header=BB0_3 Depth=1 cmpl $10, -32(%rbp) jge LBB0_7 ## %bb.5: ## in Loop: Header=BB0_3 Depth=1 movl -32(%rbp), %eax movl $2, %ecx cltd idivl %ecx cmpl $0, %edx jne LBB0_7 ## %bb.6: ## in Loop: Header=BB0_3 Depth=1 movl -32(%rbp), %edx movq -16(%rbp), %rax movq -24(%rbp), %rsi movl (%rsi), %ecx movl %ecx, %edi addl $1, %edi movl %edi, (%rsi) movslq %ecx, %rcx movl %edx, (%rax,%rcx,4) LBB0_7: ## in Loop: Header=BB0_3 Depth=1 jmp LBB0_8 LBB0_8: ## in Loop: Header=BB0_3 Depth=1 movl -32(%rbp), %eax addl $1, %eax movl %eax, -32(%rbp) jmp LBB0_3 LBB0_9: popq %rbp retq .cfi_endproc ## -- End function .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #32 .cfi_def_cfa_offset 32 str w0, [sp, #28] str w1, [sp, #24] str x2, [sp, #16] str x3, [sp, #8] ldr x8, [sp, #8] str wzr, [x8] ldr w8, [sp, #24] ldr w9, [sp, #28] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_2 b LBB0_1 LBB0_1: ldr w8, [sp, #28] str w8, [sp, #4] ldr w8, [sp, #24] str w8, [sp, #28] ldr w8, [sp, #4] str w8, [sp, #24] b LBB0_2 LBB0_2: ldr w8, [sp, #28] str w8, [sp] b LBB0_3 LBB0_3: ; =>This Inner Loop Header: Depth=1 ldr w8, [sp] ldr w9, [sp, #24] subs w8, w8, w9 cset w8, gt tbnz w8, #0, LBB0_9 b LBB0_4 LBB0_4: ; in Loop: Header=BB0_3 Depth=1 ldr w8, [sp] subs w8, w8, #10 cset w8, ge tbnz w8, #0, LBB0_7 b LBB0_5 LBB0_5: ; in Loop: Header=BB0_3 Depth=1 ldr w8, [sp] mov w10, #2 sdiv w9, w8, w10 mul w9, w9, w10 subs w8, w8, w9 subs w8, w8, #0 cset w8, ne tbnz w8, #0, LBB0_7 b LBB0_6 LBB0_6: ; in Loop: Header=BB0_3 Depth=1 ldr w8, [sp] ldr x9, [sp, #16] ldr x12, [sp, #8] ldrsw x10, [x12] mov x11, x10 add w11, w11, #1 str w11, [x12] str w8, [x9, x10, lsl #2] b LBB0_7 LBB0_7: ; in Loop: Header=BB0_3 Depth=1 b LBB0_8 LBB0_8: ; in Loop: Header=BB0_3 Depth=1 ldr w8, [sp] add w8, w8, #1 str w8, [sp] b LBB0_3 LBB0_9: add sp, sp, #32 ret .cfi_endproc ; -- End function .subsections_via_symbols
eval/problem164/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ## -- Begin function func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp subq $1072, %rsp ## imm = 0x430 movq ___stack_chk_guard@GOTPCREL(%rip), %rax movq (%rax), %rax movq %rax, -8(%rbp) movq %rdi, -1048(%rbp) movl $0, -1052(%rbp) leaq -1040(%rbp), %rdi xorl %esi, %esi movl $1024, %edx ## imm = 0x400 callq _memset movl $0, -1056(%rbp) LBB0_1: ## =>This Inner Loop Header: Depth=1 movq -1048(%rbp), %rax movslq -1056(%rbp), %rcx cmpb $0, (%rax,%rcx) je LBB0_7 ## %bb.2: ## in Loop: Header=BB0_1 Depth=1 movq -1048(%rbp), %rax movslq -1056(%rbp), %rcx movzbl (%rax,%rcx), %edi callq _tolower ## kill: def $al killed $al killed $eax movb %al, -1057(%rbp) movsbq -1057(%rbp), %rax cmpl $0, -1040(%rbp,%rax,4) jne LBB0_5 ## %bb.3: ## in Loop: Header=BB0_1 Depth=1 movzbl -1057(%rbp), %edi callq _isalpha cmpl $0, %eax je LBB0_5 ## %bb.4: ## in Loop: Header=BB0_1 Depth=1 movsbq -1057(%rbp), %rax movl $1, -1040(%rbp,%rax,4) movl -1052(%rbp), %eax addl $1, %eax movl %eax, -1052(%rbp) LBB0_5: ## in Loop: Header=BB0_1 Depth=1 jmp LBB0_6 LBB0_6: ## in Loop: Header=BB0_1 Depth=1 movl -1056(%rbp), %eax addl $1, %eax movl %eax, -1056(%rbp) jmp LBB0_1 LBB0_7: movl -1052(%rbp), %eax movl %eax, -1064(%rbp) ## 4-byte Spill movq ___stack_chk_guard@GOTPCREL(%rip), %rax movq (%rax), %rax movq -8(%rbp), %rcx cmpq %rcx, %rax jne LBB0_9 ## %bb.8: movl -1064(%rbp), %eax ## 4-byte Reload addq $1072, %rsp ## imm = 0x430 popq %rbp retq LBB0_9: callq ___stack_chk_fail ud2 .cfi_endproc ## -- End function .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: stp x28, x27, [sp, #-32]! ; 16-byte Folded Spill .cfi_def_cfa_offset 32 stp x29, x30, [sp, #16] ; 16-byte Folded Spill add x29, sp, #16 .cfi_def_cfa w29, 16 .cfi_offset w30, -8 .cfi_offset w29, -16 .cfi_offset w27, -24 .cfi_offset w28, -32 sub sp, sp, #1056 adrp x8, ___stack_chk_guard@GOTPAGE ldr x8, [x8, ___stack_chk_guard@GOTPAGEOFF] ldr x8, [x8] stur x8, [x29, #-24] str x0, [sp, #16] str wzr, [sp, #12] add x0, sp, #24 mov x1, #1024 bl _bzero str wzr, [sp, #8] b LBB0_1 LBB0_1: ; =>This Inner Loop Header: Depth=1 ldr x8, [sp, #16] ldrsw x9, [sp, #8] add x8, x8, x9 ldrb w8, [x8] subs w8, w8, #0 cset w8, eq tbnz w8, #0, LBB0_7 b LBB0_2 LBB0_2: ; in Loop: Header=BB0_1 Depth=1 ldr x8, [sp, #16] ldrsw x9, [sp, #8] ldrb w0, [x8, x9] bl _tolower strb w0, [sp, #7] ldrsb x9, [sp, #7] add x8, sp, #24 ldr w8, [x8, x9, lsl #2] subs w8, w8, #0 cset w8, ne tbnz w8, #0, LBB0_5 b LBB0_3 LBB0_3: ; in Loop: Header=BB0_1 Depth=1 ldrb w0, [sp, #7] bl _isalpha subs w8, w0, #0 cset w8, eq tbnz w8, #0, LBB0_5 b LBB0_4 LBB0_4: ; in Loop: Header=BB0_1 Depth=1 ldrsb x10, [sp, #7] add x9, sp, #24 mov w8, #1 str w8, [x9, x10, lsl #2] ldr w8, [sp, #12] add w8, w8, #1 str w8, [sp, #12] b LBB0_5 LBB0_5: ; in Loop: Header=BB0_1 Depth=1 b LBB0_6 LBB0_6: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #8] add w8, w8, #1 str w8, [sp, #8] b LBB0_1 LBB0_7: ldr w8, [sp, #12] str w8, [sp] ; 4-byte Folded Spill ldur x9, [x29, #-24] adrp x8, ___stack_chk_guard@GOTPAGE ldr x8, [x8, ___stack_chk_guard@GOTPAGEOFF] ldr x8, [x8] subs x8, x8, x9 cset w8, eq tbnz w8, #0, LBB0_9 b LBB0_8 LBB0_8: bl ___stack_chk_fail LBB0_9: ldr w0, [sp] ; 4-byte Folded Reload add sp, sp, #1056 ldp x29, x30, [sp, #16] ; 16-byte Folded Reload ldp x28, x27, [sp], #32 ; 16-byte Folded Reload ret .cfi_endproc ; -- End function .subsections_via_symbols
eval/problem17/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ## -- Begin function func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp subq $80, %rsp movq %rdi, -8(%rbp) movq %rsi, -16(%rbp) movq $0, -24(%rbp) movl $0, -28(%rbp) movl $0, -32(%rbp) leaq -35(%rbp), %rdi xorl %esi, %esi movl $3, %edx callq _memset movq -8(%rbp), %rdi callq _strlen addq $1, %rax ## kill: def $eax killed $eax killed $rax movl %eax, -40(%rbp) movl -40(%rbp), %eax addl $1, %eax movslq %eax, %rdi callq _malloc movq %rax, -48(%rbp) movq -48(%rbp), %rdi movq -8(%rbp), %rsi movq $-1, %rdx callq ___strcpy_chk movq -48(%rbp), %rdi leaq L_.str(%rip), %rsi movq $-1, %rdx callq ___strcat_chk movl $0, -52(%rbp) LBB0_1: ## =>This Inner Loop Header: Depth=1 movl -52(%rbp), %eax cmpl -40(%rbp), %eax jge LBB0_30 ## %bb.2: ## in Loop: Header=BB0_1 Depth=1 movq -48(%rbp), %rax movslq -52(%rbp), %rcx movsbl (%rax,%rcx), %eax cmpl $32, %eax jne LBB0_25 ## %bb.3: ## in Loop: Header=BB0_1 Depth=1 leaq -35(%rbp), %rdi leaq L_.str.1(%rip), %rsi callq _strcmp cmpl $0, %eax jne LBB0_10 ## %bb.4: ## in Loop: Header=BB0_1 Depth=1 movl -28(%rbp), %eax cmpl -32(%rbp), %eax jne LBB0_9 ## %bb.5: ## in Loop: Header=BB0_1 Depth=1 cmpl $0, -32(%rbp) jle LBB0_7 ## %bb.6: ## in Loop: Header=BB0_1 Depth=1 movl -32(%rbp), %eax shll $1, %eax movl %eax, -68(%rbp) ## 4-byte Spill jmp LBB0_8 LBB0_7: ## in Loop: Header=BB0_1 Depth=1 movl $4, %eax movl %eax, -68(%rbp) ## 4-byte Spill jmp LBB0_8 LBB0_8: ## in Loop: Header=BB0_1 Depth=1 movl -68(%rbp), %eax ## 4-byte Reload movl %eax, -32(%rbp) movq -24(%rbp), %rdi movslq -32(%rbp), %rsi shlq $2, %rsi callq _realloc movq %rax, -24(%rbp) LBB0_9: ## in Loop: Header=BB0_1 Depth=1 movq -24(%rbp), %rax movl -28(%rbp), %ecx movl %ecx, %edx addl $1, %edx movl %edx, -28(%rbp) movslq %ecx, %rcx movl $4, (%rax,%rcx,4) LBB0_10: ## in Loop: Header=BB0_1 Depth=1 leaq -35(%rbp), %rdi leaq L_.str.2(%rip), %rsi callq _strcmp cmpl $0, %eax jne LBB0_17 ## %bb.11: ## in Loop: Header=BB0_1 Depth=1 movl -28(%rbp), %eax cmpl -32(%rbp), %eax jne LBB0_16 ## %bb.12: ## in Loop: Header=BB0_1 Depth=1 cmpl $0, -32(%rbp) jle LBB0_14 ## %bb.13: ## in Loop: Header=BB0_1 Depth=1 movl -32(%rbp), %eax shll $1, %eax movl %eax, -72(%rbp) ## 4-byte Spill jmp LBB0_15 LBB0_14: ## in Loop: Header=BB0_1 Depth=1 movl $4, %eax movl %eax, -72(%rbp) ## 4-byte Spill jmp LBB0_15 LBB0_15: ## in Loop: Header=BB0_1 Depth=1 movl -72(%rbp), %eax ## 4-byte Reload movl %eax, -32(%rbp) movq -24(%rbp), %rdi movslq -32(%rbp), %rsi shlq $2, %rsi callq _realloc movq %rax, -24(%rbp) LBB0_16: ## in Loop: Header=BB0_1 Depth=1 movq -24(%rbp), %rax movl -28(%rbp), %ecx movl %ecx, %edx addl $1, %edx movl %edx, -28(%rbp) movslq %ecx, %rcx movl $2, (%rax,%rcx,4) LBB0_17: ## in Loop: Header=BB0_1 Depth=1 leaq -35(%rbp), %rdi leaq L_.str.3(%rip), %rsi callq _strcmp cmpl $0, %eax jne LBB0_24 ## %bb.18: ## in Loop: Header=BB0_1 Depth=1 movl -28(%rbp), %eax cmpl -32(%rbp), %eax jne LBB0_23 ## %bb.19: ## in Loop: Header=BB0_1 Depth=1 cmpl $0, -32(%rbp) jle LBB0_21 ## %bb.20: ## in Loop: Header=BB0_1 Depth=1 movl -32(%rbp), %eax shll $1, %eax movl %eax, -76(%rbp) ## 4-byte Spill jmp LBB0_22 LBB0_21: ## in Loop: Header=BB0_1 Depth=1 movl $4, %eax movl %eax, -76(%rbp) ## 4-byte Spill jmp LBB0_22 LBB0_22: ## in Loop: Header=BB0_1 Depth=1 movl -76(%rbp), %eax ## 4-byte Reload movl %eax, -32(%rbp) movq -24(%rbp), %rdi movslq -32(%rbp), %rsi shlq $2, %rsi callq _realloc movq %rax, -24(%rbp) LBB0_23: ## in Loop: Header=BB0_1 Depth=1 movq -24(%rbp), %rax movl -28(%rbp), %ecx movl %ecx, %edx addl $1, %edx movl %edx, -28(%rbp) movslq %ecx, %rcx movl $1, (%rax,%rcx,4) LBB0_24: ## in Loop: Header=BB0_1 Depth=1 leaq -35(%rbp), %rdi leaq L_.str.4(%rip), %rsi movl $3, %edx callq ___strcpy_chk jmp LBB0_28 LBB0_25: ## in Loop: Header=BB0_1 Depth=1 leaq -35(%rbp), %rdi callq _strlen movq %rax, -64(%rbp) cmpq $2, -64(%rbp) jae LBB0_27 ## %bb.26: ## in Loop: Header=BB0_1 Depth=1 movq -48(%rbp), %rax movslq -52(%rbp), %rcx movb (%rax,%rcx), %cl movq -64(%rbp), %rax movb %cl, -35(%rbp,%rax) movq -64(%rbp), %rax movb $0, -34(%rbp,%rax) LBB0_27: ## in Loop: Header=BB0_1 Depth=1 jmp LBB0_28 LBB0_28: ## in Loop: Header=BB0_1 Depth=1 jmp LBB0_29 LBB0_29: ## in Loop: Header=BB0_1 Depth=1 movl -52(%rbp), %eax addl $1, %eax movl %eax, -52(%rbp) jmp LBB0_1 LBB0_30: movq -48(%rbp), %rdi callq _free movl -28(%rbp), %ecx movq -16(%rbp), %rax movl %ecx, (%rax) movq -24(%rbp), %rax addq $80, %rsp popq %rbp retq .cfi_endproc ## -- End function .section __TEXT,__cstring,cstring_literals L_.str: ## @.str .asciz " " L_.str.1: ## @.str.1 .asciz "o" L_.str.2: ## @.str.2 .asciz "o|" L_.str.3: ## @.str.3 .asciz ".|" L_.str.4: ## @.str.4 .space 1 .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #112 .cfi_def_cfa_offset 112 stp x29, x30, [sp, #96] ; 16-byte Folded Spill add x29, sp, #96 .cfi_def_cfa w29, 16 .cfi_offset w30, -8 .cfi_offset w29, -16 stur x0, [x29, #-8] stur x1, [x29, #-16] ; kill: def $x8 killed $xzr stur xzr, [x29, #-24] stur wzr, [x29, #-28] stur wzr, [x29, #-32] sturh wzr, [x29, #-36] sturb wzr, [x29, #-34] ldur x0, [x29, #-8] bl _strlen add x8, x0, #1 ; kill: def $w8 killed $w8 killed $x8 stur w8, [x29, #-40] ldur w8, [x29, #-40] add w9, w8, #1 ; implicit-def: $x8 mov x8, x9 sxtw x0, w8 bl _malloc str x0, [sp, #48] ldr x0, [sp, #48] ldur x1, [x29, #-8] mov x2, #-1 str x2, [sp, #24] ; 8-byte Folded Spill bl ___strcpy_chk ldr x2, [sp, #24] ; 8-byte Folded Reload ldr x0, [sp, #48] adrp x1, l_.str@PAGE add x1, x1, l_.str@PAGEOFF bl ___strcat_chk str wzr, [sp, #44] b LBB0_1 LBB0_1: ; =>This Inner Loop Header: Depth=1 ldr w8, [sp, #44] ldur w9, [x29, #-40] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_30 b LBB0_2 LBB0_2: ; in Loop: Header=BB0_1 Depth=1 ldr x8, [sp, #48] ldrsw x9, [sp, #44] ldrsb w8, [x8, x9] subs w8, w8, #32 cset w8, ne tbnz w8, #0, LBB0_25 b LBB0_3 LBB0_3: ; in Loop: Header=BB0_1 Depth=1 sub x0, x29, #36 adrp x1, l_.str.1@PAGE add x1, x1, l_.str.1@PAGEOFF bl _strcmp subs w8, w0, #0 cset w8, ne tbnz w8, #0, LBB0_10 b LBB0_4 LBB0_4: ; in Loop: Header=BB0_1 Depth=1 ldur w8, [x29, #-28] ldur w9, [x29, #-32] subs w8, w8, w9 cset w8, ne tbnz w8, #0, LBB0_9 b LBB0_5 LBB0_5: ; in Loop: Header=BB0_1 Depth=1 ldur w8, [x29, #-32] subs w8, w8, #0 cset w8, le tbnz w8, #0, LBB0_7 b LBB0_6 LBB0_6: ; in Loop: Header=BB0_1 Depth=1 ldur w9, [x29, #-32] mov w8, #2 mul w8, w8, w9 str w8, [sp, #20] ; 4-byte Folded Spill b LBB0_8 LBB0_7: ; in Loop: Header=BB0_1 Depth=1 mov w8, #4 str w8, [sp, #20] ; 4-byte Folded Spill b LBB0_8 LBB0_8: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #20] ; 4-byte Folded Reload stur w8, [x29, #-32] ldur x0, [x29, #-24] ldursw x8, [x29, #-32] lsl x1, x8, #2 bl _realloc stur x0, [x29, #-24] b LBB0_9 LBB0_9: ; in Loop: Header=BB0_1 Depth=1 ldur x9, [x29, #-24] ldursw x10, [x29, #-28] mov x8, x10 add w8, w8, #1 stur w8, [x29, #-28] mov w8, #4 str w8, [x9, x10, lsl #2] b LBB0_10 LBB0_10: ; in Loop: Header=BB0_1 Depth=1 sub x0, x29, #36 adrp x1, l_.str.2@PAGE add x1, x1, l_.str.2@PAGEOFF bl _strcmp subs w8, w0, #0 cset w8, ne tbnz w8, #0, LBB0_17 b LBB0_11 LBB0_11: ; in Loop: Header=BB0_1 Depth=1 ldur w8, [x29, #-28] ldur w9, [x29, #-32] subs w8, w8, w9 cset w8, ne tbnz w8, #0, LBB0_16 b LBB0_12 LBB0_12: ; in Loop: Header=BB0_1 Depth=1 ldur w8, [x29, #-32] subs w8, w8, #0 cset w8, le tbnz w8, #0, LBB0_14 b LBB0_13 LBB0_13: ; in Loop: Header=BB0_1 Depth=1 ldur w9, [x29, #-32] mov w8, #2 mul w8, w8, w9 str w8, [sp, #16] ; 4-byte Folded Spill b LBB0_15 LBB0_14: ; in Loop: Header=BB0_1 Depth=1 mov w8, #4 str w8, [sp, #16] ; 4-byte Folded Spill b LBB0_15 LBB0_15: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #16] ; 4-byte Folded Reload stur w8, [x29, #-32] ldur x0, [x29, #-24] ldursw x8, [x29, #-32] lsl x1, x8, #2 bl _realloc stur x0, [x29, #-24] b LBB0_16 LBB0_16: ; in Loop: Header=BB0_1 Depth=1 ldur x9, [x29, #-24] ldursw x10, [x29, #-28] mov x8, x10 add w8, w8, #1 stur w8, [x29, #-28] mov w8, #2 str w8, [x9, x10, lsl #2] b LBB0_17 LBB0_17: ; in Loop: Header=BB0_1 Depth=1 sub x0, x29, #36 adrp x1, l_.str.3@PAGE add x1, x1, l_.str.3@PAGEOFF bl _strcmp subs w8, w0, #0 cset w8, ne tbnz w8, #0, LBB0_24 b LBB0_18 LBB0_18: ; in Loop: Header=BB0_1 Depth=1 ldur w8, [x29, #-28] ldur w9, [x29, #-32] subs w8, w8, w9 cset w8, ne tbnz w8, #0, LBB0_23 b LBB0_19 LBB0_19: ; in Loop: Header=BB0_1 Depth=1 ldur w8, [x29, #-32] subs w8, w8, #0 cset w8, le tbnz w8, #0, LBB0_21 b LBB0_20 LBB0_20: ; in Loop: Header=BB0_1 Depth=1 ldur w9, [x29, #-32] mov w8, #2 mul w8, w8, w9 str w8, [sp, #12] ; 4-byte Folded Spill b LBB0_22 LBB0_21: ; in Loop: Header=BB0_1 Depth=1 mov w8, #4 str w8, [sp, #12] ; 4-byte Folded Spill b LBB0_22 LBB0_22: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #12] ; 4-byte Folded Reload stur w8, [x29, #-32] ldur x0, [x29, #-24] ldursw x8, [x29, #-32] lsl x1, x8, #2 bl _realloc stur x0, [x29, #-24] b LBB0_23 LBB0_23: ; in Loop: Header=BB0_1 Depth=1 ldur x9, [x29, #-24] ldursw x10, [x29, #-28] mov x11, x10 mov w8, #1 add w11, w11, #1 stur w11, [x29, #-28] str w8, [x9, x10, lsl #2] b LBB0_24 LBB0_24: ; in Loop: Header=BB0_1 Depth=1 sub x0, x29, #36 adrp x1, l_.str.4@PAGE add x1, x1, l_.str.4@PAGEOFF mov x2, #3 bl ___strcpy_chk b LBB0_28 LBB0_25: ; in Loop: Header=BB0_1 Depth=1 sub x0, x29, #36 bl _strlen str x0, [sp, #32] ldr x8, [sp, #32] subs x8, x8, #2 cset w8, hs tbnz w8, #0, LBB0_27 b LBB0_26 LBB0_26: ; in Loop: Header=BB0_1 Depth=1 ldr x8, [sp, #48] ldrsw x9, [sp, #44] add x8, x8, x9 ldrb w9, [x8] ldr x11, [sp, #32] sub x8, x29, #36 mov x10, x8 add x10, x10, x11 strb w9, [x10] ldr x9, [sp, #32] add x9, x9, #1 add x8, x8, x9 strb wzr, [x8] b LBB0_27 LBB0_27: ; in Loop: Header=BB0_1 Depth=1 b LBB0_28 LBB0_28: ; in Loop: Header=BB0_1 Depth=1 b LBB0_29 LBB0_29: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #44] add w8, w8, #1 str w8, [sp, #44] b LBB0_1 LBB0_30: ldr x0, [sp, #48] bl _free ldur w8, [x29, #-28] ldur x9, [x29, #-16] str w8, [x9] ldur x0, [x29, #-24] ldp x29, x30, [sp, #96] ; 16-byte Folded Reload add sp, sp, #112 ret .cfi_endproc ; -- End function .section __TEXT,__cstring,cstring_literals l_.str: ; @.str .asciz " " l_.str.1: ; @.str.1 .asciz "o" l_.str.2: ; @.str.2 .asciz "o|" l_.str.3: ; @.str.3 .asciz ".|" l_.str.4: ; @.str.4 .space 1 .subsections_via_symbols
eval/problem18/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ## -- Begin function func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp subq $48, %rsp movq %rdi, -16(%rbp) movq %rsi, -24(%rbp) movl $0, -28(%rbp) movq -16(%rbp), %rdi callq _strlen ## kill: def $eax killed $eax killed $rax movl %eax, -32(%rbp) movq -24(%rbp), %rdi callq _strlen ## kill: def $eax killed $eax killed $rax movl %eax, -36(%rbp) cmpl $0, -32(%rbp) jne LBB0_2 ## %bb.1: movl $0, -4(%rbp) jmp LBB0_9 LBB0_2: movl $0, -40(%rbp) LBB0_3: ## =>This Inner Loop Header: Depth=1 movl -40(%rbp), %eax movl -32(%rbp), %ecx subl -36(%rbp), %ecx cmpl %ecx, %eax jg LBB0_8 ## %bb.4: ## in Loop: Header=BB0_3 Depth=1 movq -16(%rbp), %rdi movslq -40(%rbp), %rax addq %rax, %rdi movq -24(%rbp), %rsi movslq -36(%rbp), %rdx callq _strncmp cmpl $0, %eax jne LBB0_6 ## %bb.5: ## in Loop: Header=BB0_3 Depth=1 movl -28(%rbp), %eax addl $1, %eax movl %eax, -28(%rbp) LBB0_6: ## in Loop: Header=BB0_3 Depth=1 jmp LBB0_7 LBB0_7: ## in Loop: Header=BB0_3 Depth=1 movl -40(%rbp), %eax addl $1, %eax movl %eax, -40(%rbp) jmp LBB0_3 LBB0_8: movl -28(%rbp), %eax movl %eax, -4(%rbp) LBB0_9: movl -4(%rbp), %eax addq $48, %rsp popq %rbp retq .cfi_endproc ## -- End function .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #64 .cfi_def_cfa_offset 64 stp x29, x30, [sp, #48] ; 16-byte Folded Spill add x29, sp, #48 .cfi_def_cfa w29, 16 .cfi_offset w30, -8 .cfi_offset w29, -16 stur x0, [x29, #-16] str x1, [sp, #24] str wzr, [sp, #20] ldur x0, [x29, #-16] bl _strlen mov x8, x0 str w8, [sp, #16] ldr x0, [sp, #24] bl _strlen mov x8, x0 str w8, [sp, #12] ldr w8, [sp, #16] subs w8, w8, #0 cset w8, ne tbnz w8, #0, LBB0_2 b LBB0_1 LBB0_1: stur wzr, [x29, #-4] b LBB0_9 LBB0_2: str wzr, [sp, #8] b LBB0_3 LBB0_3: ; =>This Inner Loop Header: Depth=1 ldr w8, [sp, #8] ldr w9, [sp, #16] ldr w10, [sp, #12] subs w9, w9, w10 subs w8, w8, w9 cset w8, gt tbnz w8, #0, LBB0_8 b LBB0_4 LBB0_4: ; in Loop: Header=BB0_3 Depth=1 ldur x8, [x29, #-16] ldrsw x9, [sp, #8] add x0, x8, x9 ldr x1, [sp, #24] ldrsw x2, [sp, #12] bl _strncmp subs w8, w0, #0 cset w8, ne tbnz w8, #0, LBB0_6 b LBB0_5 LBB0_5: ; in Loop: Header=BB0_3 Depth=1 ldr w8, [sp, #20] add w8, w8, #1 str w8, [sp, #20] b LBB0_6 LBB0_6: ; in Loop: Header=BB0_3 Depth=1 b LBB0_7 LBB0_7: ; in Loop: Header=BB0_3 Depth=1 ldr w8, [sp, #8] add w8, w8, #1 str w8, [sp, #8] b LBB0_3 LBB0_8: ldr w8, [sp, #20] stur w8, [x29, #-4] b LBB0_9 LBB0_9: ldur w0, [x29, #-4] ldp x29, x30, [sp, #48] ; 16-byte Folded Reload add sp, sp, #64 ret .cfi_endproc ; -- End function .subsections_via_symbols
eval/problem19/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ## -- Begin function func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp movss %xmm0, -4(%rbp) movss -4(%rbp), %xmm0 ## xmm0 = mem[0],zero,zero,zero cvttss2si -4(%rbp), %eax cvtsi2ss %eax, %xmm1 subss %xmm1, %xmm0 popq %rbp retq .cfi_endproc ## -- End function .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #16 .cfi_def_cfa_offset 16 str s0, [sp, #12] ldr s0, [sp, #12] ldr s1, [sp, #12] fcvtzs s1, s1 scvtf s1, s1 fsub s0, s0, s1 add sp, sp, #16 ret .cfi_endproc ; -- End function .subsections_via_symbols
eval/problem2/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ## -- Begin function func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp subq $160, %rsp movq ___stack_chk_guard@GOTPCREL(%rip), %rax movq (%rax), %rax movq %rax, -8(%rbp) movq %rdi, -136(%rbp) leaq -48(%rbp), %rdi xorl %esi, %esi movl $40, %edx callq _memset leaq -128(%rbp), %rdi leaq l___const.func0.numto(%rip), %rsi movl $80, %edx callq _memcpy movl $0, -140(%rbp) movq -136(%rbp), %rax cmpb $0, (%rax) je LBB0_17 ## %bb.1: jmp LBB0_2 LBB0_2: ## =>This Loop Header: Depth=1 ## Child Loop BB0_3 Depth 2 ## Child Loop BB0_9 Depth 2 movl $0, -144(%rbp) LBB0_3: ## Parent Loop BB0_2 Depth=1 ## => This Inner Loop Header: Depth=2 movq -136(%rbp), %rax movslq -144(%rbp), %rcx movsbl (%rax,%rcx), %ecx xorl %eax, %eax ## kill: def $al killed $al killed $eax cmpl $32, %ecx movb %al, -159(%rbp) ## 1-byte Spill je LBB0_5 ## %bb.4: ## in Loop: Header=BB0_3 Depth=2 movq -136(%rbp), %rax movslq -144(%rbp), %rcx movsbl (%rax,%rcx), %eax cmpl $0, %eax setne %al movb %al, -159(%rbp) ## 1-byte Spill LBB0_5: ## in Loop: Header=BB0_3 Depth=2 movb -159(%rbp), %al ## 1-byte Reload testb $1, %al jne LBB0_6 jmp LBB0_8 LBB0_6: ## in Loop: Header=BB0_3 Depth=2 movq -136(%rbp), %rax movslq -144(%rbp), %rcx movb (%rax,%rcx), %cl movslq -144(%rbp), %rax movb %cl, -158(%rbp,%rax) ## %bb.7: ## in Loop: Header=BB0_3 Depth=2 movl -144(%rbp), %eax addl $1, %eax movl %eax, -144(%rbp) jmp LBB0_3 LBB0_8: ## in Loop: Header=BB0_2 Depth=1 movslq -144(%rbp), %rax movb $0, -158(%rbp,%rax) movl $0, -148(%rbp) LBB0_9: ## Parent Loop BB0_2 Depth=1 ## => This Inner Loop Header: Depth=2 cmpl $10, -148(%rbp) jge LBB0_14 ## %bb.10: ## in Loop: Header=BB0_9 Depth=2 leaq -158(%rbp), %rdi movslq -148(%rbp), %rax movq -128(%rbp,%rax,8), %rsi callq _strcmp cmpl $0, %eax jne LBB0_12 ## %bb.11: ## in Loop: Header=BB0_2 Depth=1 movslq -148(%rbp), %rax movl -48(%rbp,%rax,4), %ecx addl $1, %ecx movl %ecx, -48(%rbp,%rax,4) jmp LBB0_14 LBB0_12: ## in Loop: Header=BB0_9 Depth=2 jmp LBB0_13 LBB0_13: ## in Loop: Header=BB0_9 Depth=2 movl -148(%rbp), %eax addl $1, %eax movl %eax, -148(%rbp) jmp LBB0_9 LBB0_14: ## in Loop: Header=BB0_2 Depth=1 movl -144(%rbp), %ecx addl $1, %ecx movq -136(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -136(%rbp) ## %bb.15: ## in Loop: Header=BB0_2 Depth=1 movq -136(%rbp), %rax cmpb $0, -1(%rax) jne LBB0_2 ## %bb.16: jmp LBB0_17 LBB0_17: movl $0, -144(%rbp) LBB0_18: ## =>This Loop Header: Depth=1 ## Child Loop BB0_20 Depth 2 ## Child Loop BB0_22 Depth 3 cmpl $10, -144(%rbp) jge LBB0_29 ## %bb.19: ## in Loop: Header=BB0_18 Depth=1 movl $0, -148(%rbp) LBB0_20: ## Parent Loop BB0_18 Depth=1 ## => This Loop Header: Depth=2 ## Child Loop BB0_22 Depth 3 movl -148(%rbp), %eax movslq -144(%rbp), %rcx cmpl -48(%rbp,%rcx,4), %eax jge LBB0_27 ## %bb.21: ## in Loop: Header=BB0_20 Depth=2 movl $0, -152(%rbp) LBB0_22: ## Parent Loop BB0_18 Depth=1 ## Parent Loop BB0_20 Depth=2 ## => This Inner Loop Header: Depth=3 movslq -144(%rbp), %rax movq -128(%rbp,%rax,8), %rax movslq -152(%rbp), %rcx movsbl (%rax,%rcx), %eax cmpl $0, %eax je LBB0_25 ## %bb.23: ## in Loop: Header=BB0_22 Depth=3 movslq -144(%rbp), %rax movq -128(%rbp,%rax,8), %rax movslq -152(%rbp), %rcx movb (%rax,%rcx), %dl movslq -140(%rbp), %rcx leaq _func0.out(%rip), %rax movb %dl, (%rax,%rcx) ## %bb.24: ## in Loop: Header=BB0_22 Depth=3 movl -152(%rbp), %eax addl $1, %eax movl %eax, -152(%rbp) movl -140(%rbp), %eax addl $1, %eax movl %eax, -140(%rbp) jmp LBB0_22 LBB0_25: ## in Loop: Header=BB0_20 Depth=2 movl -140(%rbp), %eax movl %eax, %ecx addl $1, %ecx movl %ecx, -140(%rbp) movslq %eax, %rcx leaq _func0.out(%rip), %rax movb $32, (%rax,%rcx) ## %bb.26: ## in Loop: Header=BB0_20 Depth=2 movl -148(%rbp), %eax addl $1, %eax movl %eax, -148(%rbp) jmp LBB0_20 LBB0_27: ## in Loop: Header=BB0_18 Depth=1 jmp LBB0_28 LBB0_28: ## in Loop: Header=BB0_18 Depth=1 movl -144(%rbp), %eax addl $1, %eax movl %eax, -144(%rbp) jmp LBB0_18 LBB0_29: cmpl $0, -140(%rbp) jle LBB0_31 ## %bb.30: movl -140(%rbp), %eax subl $1, %eax movslq %eax, %rcx leaq _func0.out(%rip), %rax movb $0, (%rax,%rcx) jmp LBB0_32 LBB0_31: movb $0, _func0.out(%rip) LBB0_32: movq ___stack_chk_guard@GOTPCREL(%rip), %rax movq (%rax), %rax movq -8(%rbp), %rcx cmpq %rcx, %rax jne LBB0_34 ## %bb.33: leaq _func0.out(%rip), %rax addq $160, %rsp popq %rbp retq LBB0_34: callq ___stack_chk_fail ud2 .cfi_endproc ## -- End function .section __TEXT,__cstring,cstring_literals L_.str: ## @.str .asciz "zero" L_.str.1: ## @.str.1 .asciz "one" L_.str.2: ## @.str.2 .asciz "two" L_.str.3: ## @.str.3 .asciz "three" L_.str.4: ## @.str.4 .asciz "four" L_.str.5: ## @.str.5 .asciz "five" L_.str.6: ## @.str.6 .asciz "six" L_.str.7: ## @.str.7 .asciz "seven" L_.str.8: ## @.str.8 .asciz "eight" L_.str.9: ## @.str.9 .asciz "nine" .section __DATA,__const .p2align 4 ## @__const.func0.numto l___const.func0.numto: .quad L_.str .quad L_.str.1 .quad L_.str.2 .quad L_.str.3 .quad L_.str.4 .quad L_.str.5 .quad L_.str.6 .quad L_.str.7 .quad L_.str.8 .quad L_.str.9 .zerofill __DATA,__bss,_func0.out,1000,4 ## @func0.out .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #192 .cfi_def_cfa_offset 192 stp x29, x30, [sp, #176] ; 16-byte Folded Spill add x29, sp, #176 .cfi_def_cfa w29, 16 .cfi_offset w30, -8 .cfi_offset w29, -16 adrp x8, ___stack_chk_guard@GOTPAGE ldr x8, [x8, ___stack_chk_guard@GOTPAGEOFF] ldr x8, [x8] stur x8, [x29, #-8] str x0, [sp, #40] sub x0, x29, #48 mov w1, #0 mov x2, #40 bl _memset add x0, sp, #48 adrp x1, l___const.func0.numto@PAGE add x1, x1, l___const.func0.numto@PAGEOFF mov x2, #80 bl _memcpy str wzr, [sp, #36] ldr x8, [sp, #40] ldrb w8, [x8] subs w8, w8, #0 cset w8, eq tbnz w8, #0, LBB0_17 b LBB0_1 LBB0_1: b LBB0_2 LBB0_2: ; =>This Loop Header: Depth=1 ; Child Loop BB0_3 Depth 2 ; Child Loop BB0_9 Depth 2 str wzr, [sp, #32] b LBB0_3 LBB0_3: ; Parent Loop BB0_2 Depth=1 ; => This Inner Loop Header: Depth=2 ldr x8, [sp, #40] ldrsw x9, [sp, #32] ldrsb w8, [x8, x9] subs w8, w8, #32 cset w8, eq mov w9, #0 str w9, [sp, #12] ; 4-byte Folded Spill tbnz w8, #0, LBB0_5 b LBB0_4 LBB0_4: ; in Loop: Header=BB0_3 Depth=2 ldr x8, [sp, #40] ldrsw x9, [sp, #32] ldrsb w8, [x8, x9] subs w8, w8, #0 cset w8, ne str w8, [sp, #12] ; 4-byte Folded Spill b LBB0_5 LBB0_5: ; in Loop: Header=BB0_3 Depth=2 ldr w8, [sp, #12] ; 4-byte Folded Reload tbz w8, #0, LBB0_8 b LBB0_6 LBB0_6: ; in Loop: Header=BB0_3 Depth=2 ldr x8, [sp, #40] ldrsw x9, [sp, #32] add x8, x8, x9 ldrb w8, [x8] ldrsw x10, [sp, #32] add x9, sp, #18 add x9, x9, x10 strb w8, [x9] b LBB0_7 LBB0_7: ; in Loop: Header=BB0_3 Depth=2 ldr w8, [sp, #32] add w8, w8, #1 str w8, [sp, #32] b LBB0_3 LBB0_8: ; in Loop: Header=BB0_2 Depth=1 ldrsw x9, [sp, #32] add x8, sp, #18 add x8, x8, x9 strb wzr, [x8] str wzr, [sp, #28] b LBB0_9 LBB0_9: ; Parent Loop BB0_2 Depth=1 ; => This Inner Loop Header: Depth=2 ldr w8, [sp, #28] subs w8, w8, #10 cset w8, ge tbnz w8, #0, LBB0_14 b LBB0_10 LBB0_10: ; in Loop: Header=BB0_9 Depth=2 ldrsw x9, [sp, #28] add x8, sp, #48 ldr x1, [x8, x9, lsl #3] add x0, sp, #18 bl _strcmp subs w8, w0, #0 cset w8, ne tbnz w8, #0, LBB0_12 b LBB0_11 LBB0_11: ; in Loop: Header=BB0_2 Depth=1 ldrsw x9, [sp, #28] sub x8, x29, #48 add x9, x8, x9, lsl #2 ldr w8, [x9] add w8, w8, #1 str w8, [x9] b LBB0_14 LBB0_12: ; in Loop: Header=BB0_9 Depth=2 b LBB0_13 LBB0_13: ; in Loop: Header=BB0_9 Depth=2 ldr w8, [sp, #28] add w8, w8, #1 str w8, [sp, #28] b LBB0_9 LBB0_14: ; in Loop: Header=BB0_2 Depth=1 ldr w8, [sp, #32] add w9, w8, #1 ldr x8, [sp, #40] add x8, x8, w9, sxtw str x8, [sp, #40] b LBB0_15 LBB0_15: ; in Loop: Header=BB0_2 Depth=1 ldr x8, [sp, #40] subs x8, x8, #1 ldrb w8, [x8] subs w8, w8, #0 cset w8, ne tbnz w8, #0, LBB0_2 b LBB0_16 LBB0_16: b LBB0_17 LBB0_17: str wzr, [sp, #32] b LBB0_18 LBB0_18: ; =>This Loop Header: Depth=1 ; Child Loop BB0_20 Depth 2 ; Child Loop BB0_22 Depth 3 ldr w8, [sp, #32] subs w8, w8, #10 cset w8, ge tbnz w8, #0, LBB0_29 b LBB0_19 LBB0_19: ; in Loop: Header=BB0_18 Depth=1 str wzr, [sp, #28] b LBB0_20 LBB0_20: ; Parent Loop BB0_18 Depth=1 ; => This Loop Header: Depth=2 ; Child Loop BB0_22 Depth 3 ldr w8, [sp, #28] ldrsw x10, [sp, #32] sub x9, x29, #48 ldr w9, [x9, x10, lsl #2] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_27 b LBB0_21 LBB0_21: ; in Loop: Header=BB0_20 Depth=2 str wzr, [sp, #24] b LBB0_22 LBB0_22: ; Parent Loop BB0_18 Depth=1 ; Parent Loop BB0_20 Depth=2 ; => This Inner Loop Header: Depth=3 ldrsw x9, [sp, #32] add x8, sp, #48 ldr x8, [x8, x9, lsl #3] ldrsw x9, [sp, #24] ldrsb w8, [x8, x9] subs w8, w8, #0 cset w8, eq tbnz w8, #0, LBB0_25 b LBB0_23 LBB0_23: ; in Loop: Header=BB0_22 Depth=3 ldrsw x9, [sp, #32] add x8, sp, #48 ldr x8, [x8, x9, lsl #3] ldrsw x9, [sp, #24] add x8, x8, x9 ldrb w8, [x8] ldrsw x10, [sp, #36] adrp x9, _func0.out@PAGE add x9, x9, _func0.out@PAGEOFF add x9, x9, x10 strb w8, [x9] b LBB0_24 LBB0_24: ; in Loop: Header=BB0_22 Depth=3 ldr w8, [sp, #24] add w8, w8, #1 str w8, [sp, #24] ldr w8, [sp, #36] add w8, w8, #1 str w8, [sp, #36] b LBB0_22 LBB0_25: ; in Loop: Header=BB0_20 Depth=2 ldrsw x9, [sp, #36] mov x8, x9 add w8, w8, #1 str w8, [sp, #36] adrp x8, _func0.out@PAGE add x8, x8, _func0.out@PAGEOFF add x9, x8, x9 mov w8, #32 strb w8, [x9] b LBB0_26 LBB0_26: ; in Loop: Header=BB0_20 Depth=2 ldr w8, [sp, #28] add w8, w8, #1 str w8, [sp, #28] b LBB0_20 LBB0_27: ; in Loop: Header=BB0_18 Depth=1 b LBB0_28 LBB0_28: ; in Loop: Header=BB0_18 Depth=1 ldr w8, [sp, #32] add w8, w8, #1 str w8, [sp, #32] b LBB0_18 LBB0_29: ldr w8, [sp, #36] subs w8, w8, #0 cset w8, le tbnz w8, #0, LBB0_31 b LBB0_30 LBB0_30: ldr w8, [sp, #36] subs w9, w8, #1 adrp x8, _func0.out@PAGE add x8, x8, _func0.out@PAGEOFF add x8, x8, w9, sxtw strb wzr, [x8] b LBB0_32 LBB0_31: adrp x8, _func0.out@PAGE strb wzr, [x8, _func0.out@PAGEOFF] b LBB0_32 LBB0_32: ldur x9, [x29, #-8] adrp x8, ___stack_chk_guard@GOTPAGE ldr x8, [x8, ___stack_chk_guard@GOTPAGEOFF] ldr x8, [x8] subs x8, x8, x9 cset w8, eq tbnz w8, #0, LBB0_34 b LBB0_33 LBB0_33: bl ___stack_chk_fail LBB0_34: adrp x0, _func0.out@PAGE add x0, x0, _func0.out@PAGEOFF ldp x29, x30, [sp, #176] ; 16-byte Folded Reload add sp, sp, #192 ret .cfi_endproc ; -- End function .section __TEXT,__cstring,cstring_literals l_.str: ; @.str .asciz "zero" l_.str.1: ; @.str.1 .asciz "one" l_.str.2: ; @.str.2 .asciz "two" l_.str.3: ; @.str.3 .asciz "three" l_.str.4: ; @.str.4 .asciz "four" l_.str.5: ; @.str.5 .asciz "five" l_.str.6: ; @.str.6 .asciz "six" l_.str.7: ; @.str.7 .asciz "seven" l_.str.8: ; @.str.8 .asciz "eight" l_.str.9: ; @.str.9 .asciz "nine" .section __DATA,__const .p2align 3 ; @__const.func0.numto l___const.func0.numto: .quad l_.str .quad l_.str.1 .quad l_.str.2 .quad l_.str.3 .quad l_.str.4 .quad l_.str.5 .quad l_.str.6 .quad l_.str.7 .quad l_.str.8 .quad l_.str.9 .zerofill __DATA,__bss,_func0.out,1000,0 ; @func0.out .subsections_via_symbols
eval/problem20/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .section __TEXT,__literal4,4byte_literals .p2align 2 ## -- Begin function func0 LCPI0_0: .long 0x7f7fffff ## float 3.40282347E+38 .section __TEXT,__literal16,16byte_literals .p2align 4 LCPI0_1: .quad 0x7fffffffffffffff ## double NaN .quad 0x7fffffffffffffff ## double NaN .section __TEXT,__text,regular,pure_instructions .globl _func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp movq %rdi, -8(%rbp) movl %esi, -12(%rbp) movq %rdx, -24(%rbp) movss LCPI0_0(%rip), %xmm0 ## xmm0 = mem[0],zero,zero,zero movss %xmm0, -28(%rbp) movq -8(%rbp), %rax movss (%rax), %xmm0 ## xmm0 = mem[0],zero,zero,zero movq -24(%rbp), %rax movss %xmm0, (%rax) movq -8(%rbp), %rax movss 4(%rax), %xmm0 ## xmm0 = mem[0],zero,zero,zero movq -24(%rbp), %rax movss %xmm0, 4(%rax) movl $0, -32(%rbp) LBB0_1: ## =>This Loop Header: Depth=1 ## Child Loop BB0_3 Depth 2 movl -32(%rbp), %eax cmpl -12(%rbp), %eax jge LBB0_10 ## %bb.2: ## in Loop: Header=BB0_1 Depth=1 movl -32(%rbp), %eax addl $1, %eax movl %eax, -36(%rbp) LBB0_3: ## Parent Loop BB0_1 Depth=1 ## => This Inner Loop Header: Depth=2 movl -36(%rbp), %eax cmpl -12(%rbp), %eax jge LBB0_8 ## %bb.4: ## in Loop: Header=BB0_3 Depth=2 movq -8(%rbp), %rax movslq -32(%rbp), %rcx movss (%rax,%rcx,4), %xmm0 ## xmm0 = mem[0],zero,zero,zero movq -8(%rbp), %rax movslq -36(%rbp), %rcx subss (%rax,%rcx,4), %xmm0 cvtss2sd %xmm0, %xmm0 movaps LCPI0_1(%rip), %xmm1 ## xmm1 = [NaN,NaN] pand %xmm1, %xmm0 cvtsd2ss %xmm0, %xmm0 movss %xmm0, -40(%rbp) movss -40(%rbp), %xmm1 ## xmm1 = mem[0],zero,zero,zero movss -28(%rbp), %xmm0 ## xmm0 = mem[0],zero,zero,zero ucomiss %xmm1, %xmm0 jbe LBB0_6 ## %bb.5: ## in Loop: Header=BB0_3 Depth=2 movss -40(%rbp), %xmm0 ## xmm0 = mem[0],zero,zero,zero movss %xmm0, -28(%rbp) movq -8(%rbp), %rax movslq -32(%rbp), %rcx movss (%rax,%rcx,4), %xmm0 ## xmm0 = mem[0],zero,zero,zero movq -24(%rbp), %rax movss %xmm0, (%rax) movq -8(%rbp), %rax movslq -36(%rbp), %rcx movss (%rax,%rcx,4), %xmm0 ## xmm0 = mem[0],zero,zero,zero movq -24(%rbp), %rax movss %xmm0, 4(%rax) LBB0_6: ## in Loop: Header=BB0_3 Depth=2 jmp LBB0_7 LBB0_7: ## in Loop: Header=BB0_3 Depth=2 movl -36(%rbp), %eax addl $1, %eax movl %eax, -36(%rbp) jmp LBB0_3 LBB0_8: ## in Loop: Header=BB0_1 Depth=1 jmp LBB0_9 LBB0_9: ## in Loop: Header=BB0_1 Depth=1 movl -32(%rbp), %eax addl $1, %eax movl %eax, -32(%rbp) jmp LBB0_1 LBB0_10: movq -24(%rbp), %rax movss (%rax), %xmm0 ## xmm0 = mem[0],zero,zero,zero movq -24(%rbp), %rax ucomiss 4(%rax), %xmm0 jbe LBB0_12 ## %bb.11: movq -24(%rbp), %rax movss (%rax), %xmm0 ## xmm0 = mem[0],zero,zero,zero movss %xmm0, -44(%rbp) movq -24(%rbp), %rax movss 4(%rax), %xmm0 ## xmm0 = mem[0],zero,zero,zero movq -24(%rbp), %rax movss %xmm0, (%rax) movss -44(%rbp), %xmm0 ## xmm0 = mem[0],zero,zero,zero movq -24(%rbp), %rax movss %xmm0, 4(%rax) LBB0_12: popq %rbp retq .cfi_endproc ## -- End function .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #48 .cfi_def_cfa_offset 48 str x0, [sp, #40] str w1, [sp, #36] str x2, [sp, #24] mov w8, #2139095039 fmov s0, w8 str s0, [sp, #20] ldr x8, [sp, #40] ldr s0, [x8] ldr x8, [sp, #24] str s0, [x8] ldr x8, [sp, #40] ldr s0, [x8, #4] ldr x8, [sp, #24] str s0, [x8, #4] str wzr, [sp, #16] b LBB0_1 LBB0_1: ; =>This Loop Header: Depth=1 ; Child Loop BB0_3 Depth 2 ldr w8, [sp, #16] ldr w9, [sp, #36] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_10 b LBB0_2 LBB0_2: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #16] add w8, w8, #1 str w8, [sp, #12] b LBB0_3 LBB0_3: ; Parent Loop BB0_1 Depth=1 ; => This Inner Loop Header: Depth=2 ldr w8, [sp, #12] ldr w9, [sp, #36] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_8 b LBB0_4 LBB0_4: ; in Loop: Header=BB0_3 Depth=2 ldr x8, [sp, #40] ldrsw x9, [sp, #16] ldr s0, [x8, x9, lsl #2] ldr x8, [sp, #40] ldrsw x9, [sp, #12] ldr s1, [x8, x9, lsl #2] fsub s0, s0, s1 fcvt d0, s0 fabs d0, d0 fcvt s0, d0 str s0, [sp, #8] ldr s0, [sp, #8] ldr s1, [sp, #20] fcmp s0, s1 cset w8, pl tbnz w8, #0, LBB0_6 b LBB0_5 LBB0_5: ; in Loop: Header=BB0_3 Depth=2 ldr s0, [sp, #8] str s0, [sp, #20] ldr x8, [sp, #40] ldrsw x9, [sp, #16] ldr s0, [x8, x9, lsl #2] ldr x8, [sp, #24] str s0, [x8] ldr x8, [sp, #40] ldrsw x9, [sp, #12] ldr s0, [x8, x9, lsl #2] ldr x8, [sp, #24] str s0, [x8, #4] b LBB0_6 LBB0_6: ; in Loop: Header=BB0_3 Depth=2 b LBB0_7 LBB0_7: ; in Loop: Header=BB0_3 Depth=2 ldr w8, [sp, #12] add w8, w8, #1 str w8, [sp, #12] b LBB0_3 LBB0_8: ; in Loop: Header=BB0_1 Depth=1 b LBB0_9 LBB0_9: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #16] add w8, w8, #1 str w8, [sp, #16] b LBB0_1 LBB0_10: ldr x8, [sp, #24] ldr s0, [x8] ldr x8, [sp, #24] ldr s1, [x8, #4] fcmp s0, s1 cset w8, le tbnz w8, #0, LBB0_12 b LBB0_11 LBB0_11: ldr x8, [sp, #24] ldr s0, [x8] str s0, [sp, #4] ldr x8, [sp, #24] ldr s0, [x8, #4] ldr x8, [sp, #24] str s0, [x8] ldr s0, [sp, #4] ldr x8, [sp, #24] str s0, [x8, #4] b LBB0_12 LBB0_12: add sp, sp, #48 ret .cfi_endproc ; -- End function .subsections_via_symbols
eval/problem21/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ## -- Begin function func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp movq %rdi, -8(%rbp) movl %esi, -12(%rbp) movq -8(%rbp), %rax movss (%rax), %xmm0 ## xmm0 = mem[0],zero,zero,zero movss %xmm0, -16(%rbp) movq -8(%rbp), %rax movss (%rax), %xmm0 ## xmm0 = mem[0],zero,zero,zero movss %xmm0, -20(%rbp) movl $1, -24(%rbp) LBB0_1: ## =>This Inner Loop Header: Depth=1 movl -24(%rbp), %eax cmpl -12(%rbp), %eax jge LBB0_8 ## %bb.2: ## in Loop: Header=BB0_1 Depth=1 movq -8(%rbp), %rax movslq -24(%rbp), %rcx movss (%rax,%rcx,4), %xmm1 ## xmm1 = mem[0],zero,zero,zero movss -16(%rbp), %xmm0 ## xmm0 = mem[0],zero,zero,zero ucomiss %xmm1, %xmm0 jbe LBB0_4 ## %bb.3: ## in Loop: Header=BB0_1 Depth=1 movq -8(%rbp), %rax movslq -24(%rbp), %rcx movss (%rax,%rcx,4), %xmm0 ## xmm0 = mem[0],zero,zero,zero movss %xmm0, -16(%rbp) LBB0_4: ## in Loop: Header=BB0_1 Depth=1 movq -8(%rbp), %rax movslq -24(%rbp), %rcx movss (%rax,%rcx,4), %xmm0 ## xmm0 = mem[0],zero,zero,zero ucomiss -20(%rbp), %xmm0 jbe LBB0_6 ## %bb.5: ## in Loop: Header=BB0_1 Depth=1 movq -8(%rbp), %rax movslq -24(%rbp), %rcx movss (%rax,%rcx,4), %xmm0 ## xmm0 = mem[0],zero,zero,zero movss %xmm0, -20(%rbp) LBB0_6: ## in Loop: Header=BB0_1 Depth=1 jmp LBB0_7 LBB0_7: ## in Loop: Header=BB0_1 Depth=1 movl -24(%rbp), %eax addl $1, %eax movl %eax, -24(%rbp) jmp LBB0_1 LBB0_8: movl $0, -28(%rbp) LBB0_9: ## =>This Inner Loop Header: Depth=1 movl -28(%rbp), %eax cmpl -12(%rbp), %eax jge LBB0_12 ## %bb.10: ## in Loop: Header=BB0_9 Depth=1 movq -8(%rbp), %rax movslq -28(%rbp), %rcx movss (%rax,%rcx,4), %xmm0 ## xmm0 = mem[0],zero,zero,zero subss -16(%rbp), %xmm0 movss -20(%rbp), %xmm1 ## xmm1 = mem[0],zero,zero,zero subss -16(%rbp), %xmm1 divss %xmm1, %xmm0 movq -8(%rbp), %rax movslq -28(%rbp), %rcx movss %xmm0, (%rax,%rcx,4) ## %bb.11: ## in Loop: Header=BB0_9 Depth=1 movl -28(%rbp), %eax addl $1, %eax movl %eax, -28(%rbp) jmp LBB0_9 LBB0_12: popq %rbp retq .cfi_endproc ## -- End function .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #32 .cfi_def_cfa_offset 32 str x0, [sp, #24] str w1, [sp, #20] ldr x8, [sp, #24] ldr s0, [x8] str s0, [sp, #16] ldr x8, [sp, #24] ldr s0, [x8] str s0, [sp, #12] mov w8, #1 str w8, [sp, #8] b LBB0_1 LBB0_1: ; =>This Inner Loop Header: Depth=1 ldr w8, [sp, #8] ldr w9, [sp, #20] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_8 b LBB0_2 LBB0_2: ; in Loop: Header=BB0_1 Depth=1 ldr x8, [sp, #24] ldrsw x9, [sp, #8] ldr s0, [x8, x9, lsl #2] ldr s1, [sp, #16] fcmp s0, s1 cset w8, pl tbnz w8, #0, LBB0_4 b LBB0_3 LBB0_3: ; in Loop: Header=BB0_1 Depth=1 ldr x8, [sp, #24] ldrsw x9, [sp, #8] ldr s0, [x8, x9, lsl #2] str s0, [sp, #16] b LBB0_4 LBB0_4: ; in Loop: Header=BB0_1 Depth=1 ldr x8, [sp, #24] ldrsw x9, [sp, #8] ldr s0, [x8, x9, lsl #2] ldr s1, [sp, #12] fcmp s0, s1 cset w8, le tbnz w8, #0, LBB0_6 b LBB0_5 LBB0_5: ; in Loop: Header=BB0_1 Depth=1 ldr x8, [sp, #24] ldrsw x9, [sp, #8] ldr s0, [x8, x9, lsl #2] str s0, [sp, #12] b LBB0_6 LBB0_6: ; in Loop: Header=BB0_1 Depth=1 b LBB0_7 LBB0_7: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #8] add w8, w8, #1 str w8, [sp, #8] b LBB0_1 LBB0_8: str wzr, [sp, #4] b LBB0_9 LBB0_9: ; =>This Inner Loop Header: Depth=1 ldr w8, [sp, #4] ldr w9, [sp, #20] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_12 b LBB0_10 LBB0_10: ; in Loop: Header=BB0_9 Depth=1 ldr x8, [sp, #24] ldrsw x9, [sp, #4] ldr s0, [x8, x9, lsl #2] ldr s1, [sp, #16] fsub s0, s0, s1 ldr s1, [sp, #12] ldr s2, [sp, #16] fsub s1, s1, s2 fdiv s0, s0, s1 ldr x8, [sp, #24] ldrsw x9, [sp, #4] str s0, [x8, x9, lsl #2] b LBB0_11 LBB0_11: ; in Loop: Header=BB0_9 Depth=1 ldr w8, [sp, #4] add w8, w8, #1 str w8, [sp, #4] b LBB0_9 LBB0_12: add sp, sp, #32 ret .cfi_endproc ; -- End function .subsections_via_symbols
eval/problem22/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ## -- Begin function func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp subq $48, %rsp movq %rdi, -8(%rbp) movq %rsi, -16(%rbp) movl $0, -20(%rbp) movq -8(%rbp), %rax movq %rax, -32(%rbp) LBB0_1: ## =>This Loop Header: Depth=1 ## Child Loop BB0_3 Depth 2 ## Child Loop BB0_15 Depth 2 movq -32(%rbp), %rax cmpb $0, (%rax) je LBB0_21 ## %bb.2: ## in Loop: Header=BB0_1 Depth=1 jmp LBB0_3 LBB0_3: ## Parent Loop BB0_1 Depth=1 ## => This Inner Loop Header: Depth=2 movq -32(%rbp), %rax movsbl (%rax), %ecx xorl %eax, %eax ## kill: def $al killed $al killed $eax cmpl $0, %ecx movb %al, -45(%rbp) ## 1-byte Spill je LBB0_6 ## %bb.4: ## in Loop: Header=BB0_3 Depth=2 movq -32(%rbp), %rax movsbl (%rax), %edi callq _isdigit movl %eax, %ecx xorl %eax, %eax ## kill: def $al killed $al killed $eax cmpl $0, %ecx movb %al, -45(%rbp) ## 1-byte Spill jne LBB0_6 ## %bb.5: ## in Loop: Header=BB0_3 Depth=2 movq -32(%rbp), %rax movsbl (%rax), %eax cmpl $45, %eax setne %al movb %al, -45(%rbp) ## 1-byte Spill LBB0_6: ## in Loop: Header=BB0_3 Depth=2 movb -45(%rbp), %al ## 1-byte Reload testb $1, %al jne LBB0_7 jmp LBB0_8 LBB0_7: ## in Loop: Header=BB0_3 Depth=2 movq -32(%rbp), %rax addq $1, %rax movq %rax, -32(%rbp) jmp LBB0_3 LBB0_8: ## in Loop: Header=BB0_1 Depth=1 movq -32(%rbp), %rax cmpb $0, (%rax) jne LBB0_10 ## %bb.9: jmp LBB0_21 LBB0_10: ## in Loop: Header=BB0_1 Depth=1 movq -32(%rbp), %rdi leaq -40(%rbp), %rsi movl $10, %edx callq _strtol ## kill: def $eax killed $eax killed $rax movl %eax, -44(%rbp) movq -32(%rbp), %rax cmpq -40(%rbp), %rax je LBB0_14 ## %bb.11: ## in Loop: Header=BB0_1 Depth=1 movq -40(%rbp), %rax movsbl (%rax), %eax cmpl $44, %eax je LBB0_13 ## %bb.12: ## in Loop: Header=BB0_1 Depth=1 movq -40(%rbp), %rax movsbl (%rax), %eax cmpl $0, %eax jne LBB0_14 LBB0_13: ## in Loop: Header=BB0_1 Depth=1 movl -44(%rbp), %edx movl -20(%rbp), %eax movl %eax, %ecx addl $1, %ecx movl %ecx, -20(%rbp) movslq %eax, %rcx leaq _func0.out(%rip), %rax movl %edx, (%rax,%rcx,4) jmp LBB0_20 LBB0_14: ## in Loop: Header=BB0_1 Depth=1 jmp LBB0_15 LBB0_15: ## Parent Loop BB0_1 Depth=1 ## => This Inner Loop Header: Depth=2 movq -40(%rbp), %rax movsbl (%rax), %ecx xorl %eax, %eax ## kill: def $al killed $al killed $eax cmpl $0, %ecx movb %al, -46(%rbp) ## 1-byte Spill je LBB0_17 ## %bb.16: ## in Loop: Header=BB0_15 Depth=2 movq -40(%rbp), %rax movsbl (%rax), %eax cmpl $44, %eax setne %al movb %al, -46(%rbp) ## 1-byte Spill LBB0_17: ## in Loop: Header=BB0_15 Depth=2 movb -46(%rbp), %al ## 1-byte Reload testb $1, %al jne LBB0_18 jmp LBB0_19 LBB0_18: ## in Loop: Header=BB0_15 Depth=2 movq -40(%rbp), %rax addq $1, %rax movq %rax, -40(%rbp) jmp LBB0_15 LBB0_19: ## in Loop: Header=BB0_1 Depth=1 jmp LBB0_20 LBB0_20: ## in Loop: Header=BB0_1 Depth=1 movq -40(%rbp), %rax movq %rax, -32(%rbp) jmp LBB0_1 LBB0_21: movl -20(%rbp), %ecx movq -16(%rbp), %rax movl %ecx, (%rax) leaq _func0.out(%rip), %rax addq $48, %rsp popq %rbp retq .cfi_endproc ## -- End function .zerofill __DATA,__bss,_func0.out,1024,4 ## @func0.out .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #80 .cfi_def_cfa_offset 80 stp x29, x30, [sp, #64] ; 16-byte Folded Spill add x29, sp, #64 .cfi_def_cfa w29, 16 .cfi_offset w30, -8 .cfi_offset w29, -16 stur x0, [x29, #-8] stur x1, [x29, #-16] stur wzr, [x29, #-20] ldur x8, [x29, #-8] str x8, [sp, #32] b LBB0_1 LBB0_1: ; =>This Loop Header: Depth=1 ; Child Loop BB0_3 Depth 2 ; Child Loop BB0_15 Depth 2 ldr x8, [sp, #32] ldrb w8, [x8] subs w8, w8, #0 cset w8, eq tbnz w8, #0, LBB0_21 b LBB0_2 LBB0_2: ; in Loop: Header=BB0_1 Depth=1 b LBB0_3 LBB0_3: ; Parent Loop BB0_1 Depth=1 ; => This Inner Loop Header: Depth=2 ldr x8, [sp, #32] ldrsb w8, [x8] subs w8, w8, #0 cset w8, eq mov w9, #0 str w9, [sp, #16] ; 4-byte Folded Spill tbnz w8, #0, LBB0_6 b LBB0_4 LBB0_4: ; in Loop: Header=BB0_3 Depth=2 ldr x8, [sp, #32] ldrsb w0, [x8] bl _isdigit subs w8, w0, #0 cset w8, ne mov w9, #0 str w9, [sp, #16] ; 4-byte Folded Spill tbnz w8, #0, LBB0_6 b LBB0_5 LBB0_5: ; in Loop: Header=BB0_3 Depth=2 ldr x8, [sp, #32] ldrsb w8, [x8] subs w8, w8, #45 cset w8, ne str w8, [sp, #16] ; 4-byte Folded Spill b LBB0_6 LBB0_6: ; in Loop: Header=BB0_3 Depth=2 ldr w8, [sp, #16] ; 4-byte Folded Reload tbz w8, #0, LBB0_8 b LBB0_7 LBB0_7: ; in Loop: Header=BB0_3 Depth=2 ldr x8, [sp, #32] add x8, x8, #1 str x8, [sp, #32] b LBB0_3 LBB0_8: ; in Loop: Header=BB0_1 Depth=1 ldr x8, [sp, #32] ldrb w8, [x8] subs w8, w8, #0 cset w8, ne tbnz w8, #0, LBB0_10 b LBB0_9 LBB0_9: b LBB0_21 LBB0_10: ; in Loop: Header=BB0_1 Depth=1 ldr x0, [sp, #32] add x1, sp, #24 mov w2, #10 bl _strtol mov x8, x0 str w8, [sp, #20] ldr x8, [sp, #32] ldr x9, [sp, #24] subs x8, x8, x9 cset w8, eq tbnz w8, #0, LBB0_14 b LBB0_11 LBB0_11: ; in Loop: Header=BB0_1 Depth=1 ldr x8, [sp, #24] ldrsb w8, [x8] subs w8, w8, #44 cset w8, eq tbnz w8, #0, LBB0_13 b LBB0_12 LBB0_12: ; in Loop: Header=BB0_1 Depth=1 ldr x8, [sp, #24] ldrsb w8, [x8] subs w8, w8, #0 cset w8, ne tbnz w8, #0, LBB0_14 b LBB0_13 LBB0_13: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #20] ldursw x10, [x29, #-20] mov x9, x10 add w9, w9, #1 stur w9, [x29, #-20] adrp x9, _func0.out@PAGE add x9, x9, _func0.out@PAGEOFF str w8, [x9, x10, lsl #2] b LBB0_20 LBB0_14: ; in Loop: Header=BB0_1 Depth=1 b LBB0_15 LBB0_15: ; Parent Loop BB0_1 Depth=1 ; => This Inner Loop Header: Depth=2 ldr x8, [sp, #24] ldrsb w8, [x8] subs w8, w8, #0 cset w8, eq mov w9, #0 str w9, [sp, #12] ; 4-byte Folded Spill tbnz w8, #0, LBB0_17 b LBB0_16 LBB0_16: ; in Loop: Header=BB0_15 Depth=2 ldr x8, [sp, #24] ldrsb w8, [x8] subs w8, w8, #44 cset w8, ne str w8, [sp, #12] ; 4-byte Folded Spill b LBB0_17 LBB0_17: ; in Loop: Header=BB0_15 Depth=2 ldr w8, [sp, #12] ; 4-byte Folded Reload tbz w8, #0, LBB0_19 b LBB0_18 LBB0_18: ; in Loop: Header=BB0_15 Depth=2 ldr x8, [sp, #24] add x8, x8, #1 str x8, [sp, #24] b LBB0_15 LBB0_19: ; in Loop: Header=BB0_1 Depth=1 b LBB0_20 LBB0_20: ; in Loop: Header=BB0_1 Depth=1 ldr x8, [sp, #24] str x8, [sp, #32] b LBB0_1 LBB0_21: ldur w8, [x29, #-20] ldur x9, [x29, #-16] str w8, [x9] adrp x0, _func0.out@PAGE add x0, x0, _func0.out@PAGEOFF ldp x29, x30, [sp, #64] ; 16-byte Folded Reload add sp, sp, #80 ret .cfi_endproc ; -- End function .zerofill __DATA,__bss,_func0.out,1024,2 ; @func0.out .subsections_via_symbols
eval/problem23/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ## -- Begin function func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp movq %rdi, -8(%rbp) movl $0, -12(%rbp) LBB0_1: ## =>This Inner Loop Header: Depth=1 movq -8(%rbp), %rax movslq -12(%rbp), %rcx movsbl (%rax,%rcx), %eax cmpl $0, %eax je LBB0_3 ## %bb.2: ## in Loop: Header=BB0_1 Depth=1 movl -12(%rbp), %eax addl $1, %eax movl %eax, -12(%rbp) jmp LBB0_1 LBB0_3: movl -12(%rbp), %eax popq %rbp retq .cfi_endproc ## -- End function .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #16 .cfi_def_cfa_offset 16 str x0, [sp, #8] str wzr, [sp, #4] b LBB0_1 LBB0_1: ; =>This Inner Loop Header: Depth=1 ldr x8, [sp, #8] ldrsw x9, [sp, #4] ldrsb w8, [x8, x9] subs w8, w8, #0 cset w8, eq tbnz w8, #0, LBB0_3 b LBB0_2 LBB0_2: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #4] add w8, w8, #1 str w8, [sp, #4] b LBB0_1 LBB0_3: ldr w0, [sp, #4] add sp, sp, #16 ret .cfi_endproc ; -- End function .subsections_via_symbols
eval/problem24/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ## -- Begin function func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp movl %edi, -8(%rbp) movl $2, -12(%rbp) LBB0_1: ## =>This Inner Loop Header: Depth=1 movl -12(%rbp), %eax imull -12(%rbp), %eax cmpl -8(%rbp), %eax jg LBB0_6 ## %bb.2: ## in Loop: Header=BB0_1 Depth=1 movl -8(%rbp), %eax cltd idivl -12(%rbp) cmpl $0, %edx jne LBB0_4 ## %bb.3: movl -8(%rbp), %eax cltd idivl -12(%rbp) movl %eax, -4(%rbp) jmp LBB0_7 LBB0_4: ## in Loop: Header=BB0_1 Depth=1 jmp LBB0_5 LBB0_5: ## in Loop: Header=BB0_1 Depth=1 movl -12(%rbp), %eax addl $1, %eax movl %eax, -12(%rbp) jmp LBB0_1 LBB0_6: movl $1, -4(%rbp) LBB0_7: movl -4(%rbp), %eax popq %rbp retq .cfi_endproc ## -- End function .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #16 .cfi_def_cfa_offset 16 str w0, [sp, #8] mov w8, #2 str w8, [sp, #4] b LBB0_1 LBB0_1: ; =>This Inner Loop Header: Depth=1 ldr w8, [sp, #4] ldr w9, [sp, #4] mul w8, w8, w9 ldr w9, [sp, #8] subs w8, w8, w9 cset w8, gt tbnz w8, #0, LBB0_6 b LBB0_2 LBB0_2: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #8] ldr w10, [sp, #4] sdiv w9, w8, w10 mul w9, w9, w10 subs w8, w8, w9 subs w8, w8, #0 cset w8, ne tbnz w8, #0, LBB0_4 b LBB0_3 LBB0_3: ldr w8, [sp, #8] ldr w9, [sp, #4] sdiv w8, w8, w9 str w8, [sp, #12] b LBB0_7 LBB0_4: ; in Loop: Header=BB0_1 Depth=1 b LBB0_5 LBB0_5: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #4] add w8, w8, #1 str w8, [sp, #4] b LBB0_1 LBB0_6: mov w8, #1 str w8, [sp, #12] b LBB0_7 LBB0_7: ldr w0, [sp, #12] add sp, sp, #16 ret .cfi_endproc ; -- End function .subsections_via_symbols
eval/problem25/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ## -- Begin function func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp subq $32, %rsp movl %edi, -4(%rbp) movq %rsi, -16(%rbp) movl $256, %edi ## imm = 0x100 callq _malloc movq %rax, -24(%rbp) movq -16(%rbp), %rax movl $0, (%rax) movl $2, -28(%rbp) LBB0_1: ## =>This Loop Header: Depth=1 ## Child Loop BB0_3 Depth 2 movl -28(%rbp), %eax imull -28(%rbp), %eax cmpl -4(%rbp), %eax jg LBB0_7 ## %bb.2: ## in Loop: Header=BB0_1 Depth=1 jmp LBB0_3 LBB0_3: ## Parent Loop BB0_1 Depth=1 ## => This Inner Loop Header: Depth=2 movl -4(%rbp), %eax cltd idivl -28(%rbp) cmpl $0, %edx jne LBB0_5 ## %bb.4: ## in Loop: Header=BB0_3 Depth=2 movl -4(%rbp), %eax cltd idivl -28(%rbp) movl %eax, -4(%rbp) movl -28(%rbp), %edx movq -24(%rbp), %rax movq -16(%rbp), %rsi movl (%rsi), %ecx movl %ecx, %edi addl $1, %edi movl %edi, (%rsi) movslq %ecx, %rcx movl %edx, (%rax,%rcx,4) jmp LBB0_3 LBB0_5: ## in Loop: Header=BB0_1 Depth=1 jmp LBB0_6 LBB0_6: ## in Loop: Header=BB0_1 Depth=1 movl -28(%rbp), %eax addl $1, %eax movl %eax, -28(%rbp) jmp LBB0_1 LBB0_7: cmpl $1, -4(%rbp) jle LBB0_9 ## %bb.8: movl -4(%rbp), %edx movq -24(%rbp), %rax movq -16(%rbp), %rsi movl (%rsi), %ecx movl %ecx, %edi addl $1, %edi movl %edi, (%rsi) movslq %ecx, %rcx movl %edx, (%rax,%rcx,4) LBB0_9: movq -24(%rbp), %rax addq $32, %rsp popq %rbp retq .cfi_endproc ## -- End function .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #48 .cfi_def_cfa_offset 48 stp x29, x30, [sp, #32] ; 16-byte Folded Spill add x29, sp, #32 .cfi_def_cfa w29, 16 .cfi_offset w30, -8 .cfi_offset w29, -16 stur w0, [x29, #-4] str x1, [sp, #16] mov x0, #256 bl _malloc str x0, [sp, #8] ldr x8, [sp, #16] str wzr, [x8] mov w8, #2 str w8, [sp, #4] b LBB0_1 LBB0_1: ; =>This Loop Header: Depth=1 ; Child Loop BB0_3 Depth 2 ldr w8, [sp, #4] ldr w9, [sp, #4] mul w8, w8, w9 ldur w9, [x29, #-4] subs w8, w8, w9 cset w8, gt tbnz w8, #0, LBB0_7 b LBB0_2 LBB0_2: ; in Loop: Header=BB0_1 Depth=1 b LBB0_3 LBB0_3: ; Parent Loop BB0_1 Depth=1 ; => This Inner Loop Header: Depth=2 ldur w8, [x29, #-4] ldr w10, [sp, #4] sdiv w9, w8, w10 mul w9, w9, w10 subs w8, w8, w9 subs w8, w8, #0 cset w8, ne tbnz w8, #0, LBB0_5 b LBB0_4 LBB0_4: ; in Loop: Header=BB0_3 Depth=2 ldur w8, [x29, #-4] ldr w9, [sp, #4] sdiv w8, w8, w9 stur w8, [x29, #-4] ldr w8, [sp, #4] ldr x9, [sp, #8] ldr x12, [sp, #16] ldrsw x10, [x12] mov x11, x10 add w11, w11, #1 str w11, [x12] str w8, [x9, x10, lsl #2] b LBB0_3 LBB0_5: ; in Loop: Header=BB0_1 Depth=1 b LBB0_6 LBB0_6: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #4] add w8, w8, #1 str w8, [sp, #4] b LBB0_1 LBB0_7: ldur w8, [x29, #-4] subs w8, w8, #1 cset w8, le tbnz w8, #0, LBB0_9 b LBB0_8 LBB0_8: ldur w8, [x29, #-4] ldr x9, [sp, #8] ldr x12, [sp, #16] ldrsw x10, [x12] mov x11, x10 add w11, w11, #1 str w11, [x12] str w8, [x9, x10, lsl #2] b LBB0_9 LBB0_9: ldr x0, [sp, #8] ldp x29, x30, [sp, #32] ; 16-byte Folded Reload add sp, sp, #48 ret .cfi_endproc ; -- End function .subsections_via_symbols
eval/problem26/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ## -- Begin function func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp subq $112, %rsp movq %rdi, -8(%rbp) movl %esi, -12(%rbp) movq %rdx, -24(%rbp) movslq -12(%rbp), %rdi shlq $2, %rdi callq _malloc movq %rax, -32(%rbp) movslq -12(%rbp), %rdi movl $4, %esi callq _calloc movq %rax, -40(%rbp) movslq -12(%rbp), %rdi movl $4, %esi callq _calloc movq %rax, -48(%rbp) movl $0, -52(%rbp) movl $0, -56(%rbp) movl $0, -60(%rbp) movl $0, -64(%rbp) LBB0_1: ## =>This Loop Header: Depth=1 ## Child Loop BB0_3 Depth 2 ## Child Loop BB0_11 Depth 2 movl -64(%rbp), %eax cmpl -12(%rbp), %eax jge LBB0_21 ## %bb.2: ## in Loop: Header=BB0_1 Depth=1 movq -8(%rbp), %rax movslq -64(%rbp), %rcx movl (%rax,%rcx,4), %eax movl %eax, -68(%rbp) movl $0, -72(%rbp) movl $0, -76(%rbp) LBB0_3: ## Parent Loop BB0_1 Depth=1 ## => This Inner Loop Header: Depth=2 movl -76(%rbp), %eax cmpl -56(%rbp), %eax jge LBB0_8 ## %bb.4: ## in Loop: Header=BB0_3 Depth=2 movq -48(%rbp), %rax movslq -76(%rbp), %rcx movl (%rax,%rcx,4), %eax cmpl -68(%rbp), %eax jne LBB0_6 ## %bb.5: ## in Loop: Header=BB0_1 Depth=1 movl $1, -72(%rbp) jmp LBB0_8 LBB0_6: ## in Loop: Header=BB0_3 Depth=2 jmp LBB0_7 LBB0_7: ## in Loop: Header=BB0_3 Depth=2 movl -76(%rbp), %eax addl $1, %eax movl %eax, -76(%rbp) jmp LBB0_3 LBB0_8: ## in Loop: Header=BB0_1 Depth=1 cmpl $0, -72(%rbp) je LBB0_10 ## %bb.9: ## in Loop: Header=BB0_1 Depth=1 jmp LBB0_20 LBB0_10: ## in Loop: Header=BB0_1 Depth=1 movl $0, -80(%rbp) movl $0, -84(%rbp) LBB0_11: ## Parent Loop BB0_1 Depth=1 ## => This Inner Loop Header: Depth=2 movl -84(%rbp), %eax cmpl -52(%rbp), %eax jge LBB0_16 ## %bb.12: ## in Loop: Header=BB0_11 Depth=2 movq -40(%rbp), %rax movslq -84(%rbp), %rcx movl (%rax,%rcx,4), %eax cmpl -68(%rbp), %eax jne LBB0_14 ## %bb.13: ## in Loop: Header=BB0_1 Depth=1 movl $1, -80(%rbp) jmp LBB0_16 LBB0_14: ## in Loop: Header=BB0_11 Depth=2 jmp LBB0_15 LBB0_15: ## in Loop: Header=BB0_11 Depth=2 movl -84(%rbp), %eax addl $1, %eax movl %eax, -84(%rbp) jmp LBB0_11 LBB0_16: ## in Loop: Header=BB0_1 Depth=1 cmpl $0, -80(%rbp) je LBB0_18 ## %bb.17: ## in Loop: Header=BB0_1 Depth=1 movl -68(%rbp), %edx movq -48(%rbp), %rax movl -56(%rbp), %ecx movl %ecx, %esi addl $1, %esi movl %esi, -56(%rbp) movslq %ecx, %rcx movl %edx, (%rax,%rcx,4) jmp LBB0_19 LBB0_18: ## in Loop: Header=BB0_1 Depth=1 movl -68(%rbp), %edx movq -40(%rbp), %rax movl -52(%rbp), %ecx movl %ecx, %esi addl $1, %esi movl %esi, -52(%rbp) movslq %ecx, %rcx movl %edx, (%rax,%rcx,4) LBB0_19: ## in Loop: Header=BB0_1 Depth=1 jmp LBB0_20 LBB0_20: ## in Loop: Header=BB0_1 Depth=1 movl -64(%rbp), %eax addl $1, %eax movl %eax, -64(%rbp) jmp LBB0_1 LBB0_21: movl $0, -88(%rbp) LBB0_22: ## =>This Loop Header: Depth=1 ## Child Loop BB0_24 Depth 2 movl -88(%rbp), %eax cmpl -12(%rbp), %eax jge LBB0_33 ## %bb.23: ## in Loop: Header=BB0_22 Depth=1 movq -8(%rbp), %rax movslq -88(%rbp), %rcx movl (%rax,%rcx,4), %eax movl %eax, -92(%rbp) movl $0, -96(%rbp) movl $0, -100(%rbp) LBB0_24: ## Parent Loop BB0_22 Depth=1 ## => This Inner Loop Header: Depth=2 movl -100(%rbp), %eax cmpl -56(%rbp), %eax jge LBB0_29 ## %bb.25: ## in Loop: Header=BB0_24 Depth=2 movq -48(%rbp), %rax movslq -100(%rbp), %rcx movl (%rax,%rcx,4), %eax cmpl -92(%rbp), %eax jne LBB0_27 ## %bb.26: ## in Loop: Header=BB0_22 Depth=1 movl $1, -96(%rbp) jmp LBB0_29 LBB0_27: ## in Loop: Header=BB0_24 Depth=2 jmp LBB0_28 LBB0_28: ## in Loop: Header=BB0_24 Depth=2 movl -100(%rbp), %eax addl $1, %eax movl %eax, -100(%rbp) jmp LBB0_24 LBB0_29: ## in Loop: Header=BB0_22 Depth=1 cmpl $0, -96(%rbp) jne LBB0_31 ## %bb.30: ## in Loop: Header=BB0_22 Depth=1 movl -92(%rbp), %edx movq -32(%rbp), %rax movl -60(%rbp), %ecx movl %ecx, %esi addl $1, %esi movl %esi, -60(%rbp) movslq %ecx, %rcx movl %edx, (%rax,%rcx,4) LBB0_31: ## in Loop: Header=BB0_22 Depth=1 jmp LBB0_32 LBB0_32: ## in Loop: Header=BB0_22 Depth=1 movl -88(%rbp), %eax addl $1, %eax movl %eax, -88(%rbp) jmp LBB0_22 LBB0_33: movl -60(%rbp), %ecx movq -24(%rbp), %rax movl %ecx, (%rax) movq -40(%rbp), %rdi callq _free movq -48(%rbp), %rdi callq _free movq -32(%rbp), %rax addq $112, %rsp popq %rbp retq .cfi_endproc ## -- End function .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #128 .cfi_def_cfa_offset 128 stp x29, x30, [sp, #112] ; 16-byte Folded Spill add x29, sp, #112 .cfi_def_cfa w29, 16 .cfi_offset w30, -8 .cfi_offset w29, -16 stur x0, [x29, #-8] stur w1, [x29, #-12] stur x2, [x29, #-24] ldursw x8, [x29, #-12] lsl x0, x8, #2 bl _malloc stur x0, [x29, #-32] ldursw x0, [x29, #-12] mov x1, #4 str x1, [sp] ; 8-byte Folded Spill bl _calloc ldr x1, [sp] ; 8-byte Folded Reload stur x0, [x29, #-40] ldursw x0, [x29, #-12] bl _calloc stur x0, [x29, #-48] stur wzr, [x29, #-52] str wzr, [sp, #56] str wzr, [sp, #52] str wzr, [sp, #48] b LBB0_1 LBB0_1: ; =>This Loop Header: Depth=1 ; Child Loop BB0_3 Depth 2 ; Child Loop BB0_11 Depth 2 ldr w8, [sp, #48] ldur w9, [x29, #-12] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_21 b LBB0_2 LBB0_2: ; in Loop: Header=BB0_1 Depth=1 ldur x8, [x29, #-8] ldrsw x9, [sp, #48] ldr w8, [x8, x9, lsl #2] str w8, [sp, #44] str wzr, [sp, #40] str wzr, [sp, #36] b LBB0_3 LBB0_3: ; Parent Loop BB0_1 Depth=1 ; => This Inner Loop Header: Depth=2 ldr w8, [sp, #36] ldr w9, [sp, #56] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_8 b LBB0_4 LBB0_4: ; in Loop: Header=BB0_3 Depth=2 ldur x8, [x29, #-48] ldrsw x9, [sp, #36] ldr w8, [x8, x9, lsl #2] ldr w9, [sp, #44] subs w8, w8, w9 cset w8, ne tbnz w8, #0, LBB0_6 b LBB0_5 LBB0_5: ; in Loop: Header=BB0_1 Depth=1 mov w8, #1 str w8, [sp, #40] b LBB0_8 LBB0_6: ; in Loop: Header=BB0_3 Depth=2 b LBB0_7 LBB0_7: ; in Loop: Header=BB0_3 Depth=2 ldr w8, [sp, #36] add w8, w8, #1 str w8, [sp, #36] b LBB0_3 LBB0_8: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #40] subs w8, w8, #0 cset w8, eq tbnz w8, #0, LBB0_10 b LBB0_9 LBB0_9: ; in Loop: Header=BB0_1 Depth=1 b LBB0_20 LBB0_10: ; in Loop: Header=BB0_1 Depth=1 str wzr, [sp, #32] str wzr, [sp, #28] b LBB0_11 LBB0_11: ; Parent Loop BB0_1 Depth=1 ; => This Inner Loop Header: Depth=2 ldr w8, [sp, #28] ldur w9, [x29, #-52] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_16 b LBB0_12 LBB0_12: ; in Loop: Header=BB0_11 Depth=2 ldur x8, [x29, #-40] ldrsw x9, [sp, #28] ldr w8, [x8, x9, lsl #2] ldr w9, [sp, #44] subs w8, w8, w9 cset w8, ne tbnz w8, #0, LBB0_14 b LBB0_13 LBB0_13: ; in Loop: Header=BB0_1 Depth=1 mov w8, #1 str w8, [sp, #32] b LBB0_16 LBB0_14: ; in Loop: Header=BB0_11 Depth=2 b LBB0_15 LBB0_15: ; in Loop: Header=BB0_11 Depth=2 ldr w8, [sp, #28] add w8, w8, #1 str w8, [sp, #28] b LBB0_11 LBB0_16: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #32] subs w8, w8, #0 cset w8, eq tbnz w8, #0, LBB0_18 b LBB0_17 LBB0_17: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #44] ldur x9, [x29, #-48] ldrsw x10, [sp, #56] mov x11, x10 add w11, w11, #1 str w11, [sp, #56] str w8, [x9, x10, lsl #2] b LBB0_19 LBB0_18: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #44] ldur x9, [x29, #-40] ldursw x10, [x29, #-52] mov x11, x10 add w11, w11, #1 stur w11, [x29, #-52] str w8, [x9, x10, lsl #2] b LBB0_19 LBB0_19: ; in Loop: Header=BB0_1 Depth=1 b LBB0_20 LBB0_20: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #48] add w8, w8, #1 str w8, [sp, #48] b LBB0_1 LBB0_21: str wzr, [sp, #24] b LBB0_22 LBB0_22: ; =>This Loop Header: Depth=1 ; Child Loop BB0_24 Depth 2 ldr w8, [sp, #24] ldur w9, [x29, #-12] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_33 b LBB0_23 LBB0_23: ; in Loop: Header=BB0_22 Depth=1 ldur x8, [x29, #-8] ldrsw x9, [sp, #24] ldr w8, [x8, x9, lsl #2] str w8, [sp, #20] str wzr, [sp, #16] str wzr, [sp, #12] b LBB0_24 LBB0_24: ; Parent Loop BB0_22 Depth=1 ; => This Inner Loop Header: Depth=2 ldr w8, [sp, #12] ldr w9, [sp, #56] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_29 b LBB0_25 LBB0_25: ; in Loop: Header=BB0_24 Depth=2 ldur x8, [x29, #-48] ldrsw x9, [sp, #12] ldr w8, [x8, x9, lsl #2] ldr w9, [sp, #20] subs w8, w8, w9 cset w8, ne tbnz w8, #0, LBB0_27 b LBB0_26 LBB0_26: ; in Loop: Header=BB0_22 Depth=1 mov w8, #1 str w8, [sp, #16] b LBB0_29 LBB0_27: ; in Loop: Header=BB0_24 Depth=2 b LBB0_28 LBB0_28: ; in Loop: Header=BB0_24 Depth=2 ldr w8, [sp, #12] add w8, w8, #1 str w8, [sp, #12] b LBB0_24 LBB0_29: ; in Loop: Header=BB0_22 Depth=1 ldr w8, [sp, #16] subs w8, w8, #0 cset w8, ne tbnz w8, #0, LBB0_31 b LBB0_30 LBB0_30: ; in Loop: Header=BB0_22 Depth=1 ldr w8, [sp, #20] ldur x9, [x29, #-32] ldrsw x10, [sp, #52] mov x11, x10 add w11, w11, #1 str w11, [sp, #52] str w8, [x9, x10, lsl #2] b LBB0_31 LBB0_31: ; in Loop: Header=BB0_22 Depth=1 b LBB0_32 LBB0_32: ; in Loop: Header=BB0_22 Depth=1 ldr w8, [sp, #24] add w8, w8, #1 str w8, [sp, #24] b LBB0_22 LBB0_33: ldr w8, [sp, #52] ldur x9, [x29, #-24] str w8, [x9] ldur x0, [x29, #-40] bl _free ldur x0, [x29, #-48] bl _free ldur x0, [x29, #-32] ldp x29, x30, [sp, #112] ; 16-byte Folded Reload add sp, sp, #128 ret .cfi_endproc ; -- End function .subsections_via_symbols
eval/problem27/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ## -- Begin function func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp subq $32, %rsp movq %rdi, -8(%rbp) movq %rsi, -16(%rbp) movq -8(%rbp), %rdi callq _strlen ## kill: def $eax killed $eax killed $rax movl %eax, -20(%rbp) movl $0, -24(%rbp) LBB0_1: ## =>This Inner Loop Header: Depth=1 movl -24(%rbp), %eax cmpl -20(%rbp), %eax jge LBB0_11 ## %bb.2: ## in Loop: Header=BB0_1 Depth=1 movq -8(%rbp), %rax movslq -24(%rbp), %rcx movb (%rax,%rcx), %al movb %al, -25(%rbp) movsbl -25(%rbp), %eax cmpl $97, %eax jl LBB0_5 ## %bb.3: ## in Loop: Header=BB0_1 Depth=1 movsbl -25(%rbp), %eax cmpl $122, %eax jg LBB0_5 ## %bb.4: ## in Loop: Header=BB0_1 Depth=1 movsbl -25(%rbp), %eax subl $32, %eax ## kill: def $al killed $al killed $eax movb %al, -25(%rbp) jmp LBB0_9 LBB0_5: ## in Loop: Header=BB0_1 Depth=1 movsbl -25(%rbp), %eax cmpl $65, %eax jl LBB0_8 ## %bb.6: ## in Loop: Header=BB0_1 Depth=1 movsbl -25(%rbp), %eax cmpl $90, %eax jg LBB0_8 ## %bb.7: ## in Loop: Header=BB0_1 Depth=1 movsbl -25(%rbp), %eax addl $32, %eax ## kill: def $al killed $al killed $eax movb %al, -25(%rbp) LBB0_8: ## in Loop: Header=BB0_1 Depth=1 jmp LBB0_9 LBB0_9: ## in Loop: Header=BB0_1 Depth=1 movb -25(%rbp), %dl movq -16(%rbp), %rax movslq -24(%rbp), %rcx movb %dl, (%rax,%rcx) ## %bb.10: ## in Loop: Header=BB0_1 Depth=1 movl -24(%rbp), %eax addl $1, %eax movl %eax, -24(%rbp) jmp LBB0_1 LBB0_11: movq -16(%rbp), %rax movslq -20(%rbp), %rcx movb $0, (%rax,%rcx) addq $32, %rsp popq %rbp retq .cfi_endproc ## -- End function .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #48 .cfi_def_cfa_offset 48 stp x29, x30, [sp, #32] ; 16-byte Folded Spill add x29, sp, #32 .cfi_def_cfa w29, 16 .cfi_offset w30, -8 .cfi_offset w29, -16 stur x0, [x29, #-8] str x1, [sp, #16] ldur x0, [x29, #-8] bl _strlen mov x8, x0 str w8, [sp, #12] str wzr, [sp, #8] b LBB0_1 LBB0_1: ; =>This Inner Loop Header: Depth=1 ldr w8, [sp, #8] ldr w9, [sp, #12] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_11 b LBB0_2 LBB0_2: ; in Loop: Header=BB0_1 Depth=1 ldur x8, [x29, #-8] ldrsw x9, [sp, #8] add x8, x8, x9 ldrb w8, [x8] strb w8, [sp, #7] ldrsb w8, [sp, #7] subs w8, w8, #97 cset w8, lt tbnz w8, #0, LBB0_5 b LBB0_3 LBB0_3: ; in Loop: Header=BB0_1 Depth=1 ldrsb w8, [sp, #7] subs w8, w8, #122 cset w8, gt tbnz w8, #0, LBB0_5 b LBB0_4 LBB0_4: ; in Loop: Header=BB0_1 Depth=1 ldrsb w8, [sp, #7] subs w8, w8, #32 strb w8, [sp, #7] b LBB0_9 LBB0_5: ; in Loop: Header=BB0_1 Depth=1 ldrsb w8, [sp, #7] subs w8, w8, #65 cset w8, lt tbnz w8, #0, LBB0_8 b LBB0_6 LBB0_6: ; in Loop: Header=BB0_1 Depth=1 ldrsb w8, [sp, #7] subs w8, w8, #90 cset w8, gt tbnz w8, #0, LBB0_8 b LBB0_7 LBB0_7: ; in Loop: Header=BB0_1 Depth=1 ldrsb w8, [sp, #7] add w8, w8, #32 strb w8, [sp, #7] b LBB0_8 LBB0_8: ; in Loop: Header=BB0_1 Depth=1 b LBB0_9 LBB0_9: ; in Loop: Header=BB0_1 Depth=1 ldrb w8, [sp, #7] ldr x9, [sp, #16] ldrsw x10, [sp, #8] add x9, x9, x10 strb w8, [x9] b LBB0_10 LBB0_10: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #8] add w8, w8, #1 str w8, [sp, #8] b LBB0_1 LBB0_11: ldr x8, [sp, #16] ldrsw x9, [sp, #12] add x8, x8, x9 strb wzr, [x8] ldp x29, x30, [sp, #32] ; 16-byte Folded Reload add sp, sp, #48 ret .cfi_endproc ; -- End function .subsections_via_symbols
eval/problem28/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ## -- Begin function func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp subq $48, %rsp movq %rdi, -16(%rbp) movl %esi, -20(%rbp) movl $0, -24(%rbp) movl $0, -28(%rbp) LBB0_1: ## =>This Inner Loop Header: Depth=1 movl -28(%rbp), %eax cmpl -20(%rbp), %eax jge LBB0_4 ## %bb.2: ## in Loop: Header=BB0_1 Depth=1 movq -16(%rbp), %rax movslq -28(%rbp), %rcx movq (%rax,%rcx,8), %rdi callq _strlen movq %rax, %rcx movslq -24(%rbp), %rax addq %rcx, %rax ## kill: def $eax killed $eax killed $rax movl %eax, -24(%rbp) ## %bb.3: ## in Loop: Header=BB0_1 Depth=1 movl -28(%rbp), %eax addl $1, %eax movl %eax, -28(%rbp) jmp LBB0_1 LBB0_4: movl -24(%rbp), %eax addl $1, %eax movslq %eax, %rdi callq _malloc movq %rax, -40(%rbp) cmpq $0, -40(%rbp) jne LBB0_6 ## %bb.5: movq $0, -8(%rbp) jmp LBB0_11 LBB0_6: movq -40(%rbp), %rax movb $0, (%rax) movl $0, -44(%rbp) LBB0_7: ## =>This Inner Loop Header: Depth=1 movl -44(%rbp), %eax cmpl -20(%rbp), %eax jge LBB0_10 ## %bb.8: ## in Loop: Header=BB0_7 Depth=1 movq -40(%rbp), %rdi movq -16(%rbp), %rax movslq -44(%rbp), %rcx movq (%rax,%rcx,8), %rsi movq $-1, %rdx callq ___strcat_chk ## %bb.9: ## in Loop: Header=BB0_7 Depth=1 movl -44(%rbp), %eax addl $1, %eax movl %eax, -44(%rbp) jmp LBB0_7 LBB0_10: movq -40(%rbp), %rax movq %rax, -8(%rbp) LBB0_11: movq -8(%rbp), %rax addq $48, %rsp popq %rbp retq .cfi_endproc ## -- End function .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #64 .cfi_def_cfa_offset 64 stp x29, x30, [sp, #48] ; 16-byte Folded Spill add x29, sp, #48 .cfi_def_cfa w29, 16 .cfi_offset w30, -8 .cfi_offset w29, -16 stur x0, [x29, #-16] stur w1, [x29, #-20] str wzr, [sp, #24] str wzr, [sp, #20] b LBB0_1 LBB0_1: ; =>This Inner Loop Header: Depth=1 ldr w8, [sp, #20] ldur w9, [x29, #-20] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_4 b LBB0_2 LBB0_2: ; in Loop: Header=BB0_1 Depth=1 ldur x8, [x29, #-16] ldrsw x9, [sp, #20] ldr x0, [x8, x9, lsl #3] bl _strlen ldrsw x8, [sp, #24] add x8, x8, x0 ; kill: def $w8 killed $w8 killed $x8 str w8, [sp, #24] b LBB0_3 LBB0_3: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #20] add w8, w8, #1 str w8, [sp, #20] b LBB0_1 LBB0_4: ldr w8, [sp, #24] add w9, w8, #1 ; implicit-def: $x8 mov x8, x9 sxtw x0, w8 bl _malloc str x0, [sp, #8] ldr x8, [sp, #8] subs x8, x8, #0 cset w8, ne tbnz w8, #0, LBB0_6 b LBB0_5 LBB0_5: ; kill: def $x8 killed $xzr stur xzr, [x29, #-8] b LBB0_11 LBB0_6: ldr x8, [sp, #8] strb wzr, [x8] str wzr, [sp, #4] b LBB0_7 LBB0_7: ; =>This Inner Loop Header: Depth=1 ldr w8, [sp, #4] ldur w9, [x29, #-20] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_10 b LBB0_8 LBB0_8: ; in Loop: Header=BB0_7 Depth=1 ldr x0, [sp, #8] ldur x8, [x29, #-16] ldrsw x9, [sp, #4] ldr x1, [x8, x9, lsl #3] mov x2, #-1 bl ___strcat_chk b LBB0_9 LBB0_9: ; in Loop: Header=BB0_7 Depth=1 ldr w8, [sp, #4] add w8, w8, #1 str w8, [sp, #4] b LBB0_7 LBB0_10: ldr x8, [sp, #8] stur x8, [x29, #-8] b LBB0_11 LBB0_11: ldur x0, [x29, #-8] ldp x29, x30, [sp, #48] ; 16-byte Folded Reload add sp, sp, #64 ret .cfi_endproc ; -- End function .subsections_via_symbols
eval/problem29/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ## -- Begin function func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp movss %xmm0, -4(%rbp) movss -4(%rbp), %xmm0 ## xmm0 = mem[0],zero,zero,zero cvttss2si -4(%rbp), %eax cvtsi2ss %eax, %xmm1 subss %xmm1, %xmm0 popq %rbp retq .cfi_endproc ## -- End function .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #16 .cfi_def_cfa_offset 16 str s0, [sp, #12] ldr s0, [sp, #12] ldr s1, [sp, #12] fcvtzs s1, s1 scvtf s1, s1 fsub s0, s0, s1 add sp, sp, #16 ret .cfi_endproc ; -- End function .subsections_via_symbols
eval/problem3/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ## -- Begin function func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp subq $48, %rsp movq %rdi, -8(%rbp) movl %esi, -12(%rbp) movq %rdx, -24(%rbp) movq %rcx, -32(%rbp) movq -24(%rbp), %rdi callq _strlen ## kill: def $eax killed $eax killed $rax movl %eax, -36(%rbp) movslq -12(%rbp), %rdi shlq $3, %rdi callq _malloc movq %rax, %rcx movq -32(%rbp), %rax movq %rcx, (%rax) movl $0, -40(%rbp) movl $0, -44(%rbp) LBB0_1: ## =>This Inner Loop Header: Depth=1 movl -44(%rbp), %eax cmpl -12(%rbp), %eax jge LBB0_6 ## %bb.2: ## in Loop: Header=BB0_1 Depth=1 movq -8(%rbp), %rax movslq -44(%rbp), %rcx movq (%rax,%rcx,8), %rdi movq -24(%rbp), %rsi movslq -36(%rbp), %rdx callq _strncmp cmpl $0, %eax jne LBB0_4 ## %bb.3: ## in Loop: Header=BB0_1 Depth=1 movq -8(%rbp), %rax movslq -44(%rbp), %rcx movq (%rax,%rcx,8), %rdx movq -32(%rbp), %rax movq (%rax), %rax movl -40(%rbp), %ecx movl %ecx, %esi addl $1, %esi movl %esi, -40(%rbp) movslq %ecx, %rcx movq %rdx, (%rax,%rcx,8) LBB0_4: ## in Loop: Header=BB0_1 Depth=1 jmp LBB0_5 LBB0_5: ## in Loop: Header=BB0_1 Depth=1 movl -44(%rbp), %eax addl $1, %eax movl %eax, -44(%rbp) jmp LBB0_1 LBB0_6: movl -40(%rbp), %eax addq $48, %rsp popq %rbp retq .cfi_endproc ## -- End function .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #64 .cfi_def_cfa_offset 64 stp x29, x30, [sp, #48] ; 16-byte Folded Spill add x29, sp, #48 .cfi_def_cfa w29, 16 .cfi_offset w30, -8 .cfi_offset w29, -16 stur x0, [x29, #-8] stur w1, [x29, #-12] str x2, [sp, #24] str x3, [sp, #16] ldr x0, [sp, #24] bl _strlen mov x8, x0 str w8, [sp, #12] ldursw x8, [x29, #-12] lsl x0, x8, #3 bl _malloc ldr x8, [sp, #16] str x0, [x8] str wzr, [sp, #8] str wzr, [sp, #4] b LBB0_1 LBB0_1: ; =>This Inner Loop Header: Depth=1 ldr w8, [sp, #4] ldur w9, [x29, #-12] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_6 b LBB0_2 LBB0_2: ; in Loop: Header=BB0_1 Depth=1 ldur x8, [x29, #-8] ldrsw x9, [sp, #4] ldr x0, [x8, x9, lsl #3] ldr x1, [sp, #24] ldrsw x2, [sp, #12] bl _strncmp subs w8, w0, #0 cset w8, ne tbnz w8, #0, LBB0_4 b LBB0_3 LBB0_3: ; in Loop: Header=BB0_1 Depth=1 ldur x8, [x29, #-8] ldrsw x9, [sp, #4] ldr x8, [x8, x9, lsl #3] ldr x9, [sp, #16] ldr x9, [x9] ldrsw x10, [sp, #8] mov x11, x10 add w11, w11, #1 str w11, [sp, #8] str x8, [x9, x10, lsl #3] b LBB0_4 LBB0_4: ; in Loop: Header=BB0_1 Depth=1 b LBB0_5 LBB0_5: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #4] add w8, w8, #1 str w8, [sp, #4] b LBB0_1 LBB0_6: ldr w0, [sp, #8] ldp x29, x30, [sp, #48] ; 16-byte Folded Reload add sp, sp, #64 ret .cfi_endproc ; -- End function .subsections_via_symbols
eval/problem30/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ## -- Begin function func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp subq $48, %rsp movq %rdi, -8(%rbp) movl %esi, -12(%rbp) movq %rdx, -24(%rbp) movslq -12(%rbp), %rdi shlq $2, %rdi callq _malloc movq %rax, -32(%rbp) movq -24(%rbp), %rax movl $0, (%rax) movl $0, -36(%rbp) LBB0_1: ## =>This Inner Loop Header: Depth=1 movl -36(%rbp), %eax cmpl -12(%rbp), %eax jge LBB0_6 ## %bb.2: ## in Loop: Header=BB0_1 Depth=1 movq -8(%rbp), %rax movslq -36(%rbp), %rcx movss (%rax,%rcx,4), %xmm0 ## xmm0 = mem[0],zero,zero,zero xorps %xmm1, %xmm1 ucomiss %xmm1, %xmm0 jbe LBB0_4 ## %bb.3: ## in Loop: Header=BB0_1 Depth=1 movq -8(%rbp), %rax movslq -36(%rbp), %rcx movss (%rax,%rcx,4), %xmm0 ## xmm0 = mem[0],zero,zero,zero movq -32(%rbp), %rax movq -24(%rbp), %rdx movl (%rdx), %ecx movl %ecx, %esi addl $1, %esi movl %esi, (%rdx) movslq %ecx, %rcx movss %xmm0, (%rax,%rcx,4) LBB0_4: ## in Loop: Header=BB0_1 Depth=1 jmp LBB0_5 LBB0_5: ## in Loop: Header=BB0_1 Depth=1 movl -36(%rbp), %eax addl $1, %eax movl %eax, -36(%rbp) jmp LBB0_1 LBB0_6: movq -32(%rbp), %rax addq $48, %rsp popq %rbp retq .cfi_endproc ## -- End function .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #64 .cfi_def_cfa_offset 64 stp x29, x30, [sp, #48] ; 16-byte Folded Spill add x29, sp, #48 .cfi_def_cfa w29, 16 .cfi_offset w30, -8 .cfi_offset w29, -16 stur x0, [x29, #-8] stur w1, [x29, #-12] str x2, [sp, #24] ldursw x8, [x29, #-12] lsl x0, x8, #2 bl _malloc str x0, [sp, #16] ldr x8, [sp, #24] str wzr, [x8] str wzr, [sp, #12] b LBB0_1 LBB0_1: ; =>This Inner Loop Header: Depth=1 ldr w8, [sp, #12] ldur w9, [x29, #-12] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_6 b LBB0_2 LBB0_2: ; in Loop: Header=BB0_1 Depth=1 ldur x8, [x29, #-8] ldrsw x9, [sp, #12] ldr s0, [x8, x9, lsl #2] fcmp s0, #0.0 cset w8, le tbnz w8, #0, LBB0_4 b LBB0_3 LBB0_3: ; in Loop: Header=BB0_1 Depth=1 ldur x8, [x29, #-8] ldrsw x9, [sp, #12] ldr s0, [x8, x9, lsl #2] ldr x8, [sp, #16] ldr x11, [sp, #24] ldrsw x9, [x11] mov x10, x9 add w10, w10, #1 str w10, [x11] str s0, [x8, x9, lsl #2] b LBB0_4 LBB0_4: ; in Loop: Header=BB0_1 Depth=1 b LBB0_5 LBB0_5: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #12] add w8, w8, #1 str w8, [sp, #12] b LBB0_1 LBB0_6: ldr x0, [sp, #16] ldp x29, x30, [sp, #48] ; 16-byte Folded Reload add sp, sp, #64 ret .cfi_endproc ; -- End function .subsections_via_symbols
eval/problem31/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ## -- Begin function func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp movq %rdi, -16(%rbp) cmpq $2, -16(%rbp) jge LBB0_2 ## %bb.1: movb $0, -1(%rbp) jmp LBB0_9 LBB0_2: movq $2, -24(%rbp) LBB0_3: ## =>This Inner Loop Header: Depth=1 movq -24(%rbp), %rax imulq -24(%rbp), %rax cmpq -16(%rbp), %rax jg LBB0_8 ## %bb.4: ## in Loop: Header=BB0_3 Depth=1 movq -16(%rbp), %rax cqto idivq -24(%rbp) cmpq $0, %rdx jne LBB0_6 ## %bb.5: movb $0, -1(%rbp) jmp LBB0_9 LBB0_6: ## in Loop: Header=BB0_3 Depth=1 jmp LBB0_7 LBB0_7: ## in Loop: Header=BB0_3 Depth=1 movq -24(%rbp), %rax addq $1, %rax movq %rax, -24(%rbp) jmp LBB0_3 LBB0_8: movb $1, -1(%rbp) LBB0_9: movb -1(%rbp), %al andb $1, %al movzbl %al, %eax popq %rbp retq .cfi_endproc ## -- End function .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #32 .cfi_def_cfa_offset 32 str x0, [sp, #16] ldr x8, [sp, #16] subs x8, x8, #2 cset w8, ge tbnz w8, #0, LBB0_2 b LBB0_1 LBB0_1: mov w8, #0 and w8, w8, #0x1 and w8, w8, #0x1 strb w8, [sp, #31] b LBB0_9 LBB0_2: mov x8, #2 str x8, [sp, #8] b LBB0_3 LBB0_3: ; =>This Inner Loop Header: Depth=1 ldr x8, [sp, #8] ldr x9, [sp, #8] mul x8, x8, x9 ldr x9, [sp, #16] subs x8, x8, x9 cset w8, gt tbnz w8, #0, LBB0_8 b LBB0_4 LBB0_4: ; in Loop: Header=BB0_3 Depth=1 ldr x8, [sp, #16] ldr x10, [sp, #8] sdiv x9, x8, x10 mul x9, x9, x10 subs x8, x8, x9 subs x8, x8, #0 cset w8, ne tbnz w8, #0, LBB0_6 b LBB0_5 LBB0_5: mov w8, #0 and w8, w8, #0x1 and w8, w8, #0x1 strb w8, [sp, #31] b LBB0_9 LBB0_6: ; in Loop: Header=BB0_3 Depth=1 b LBB0_7 LBB0_7: ; in Loop: Header=BB0_3 Depth=1 ldr x8, [sp, #8] add x8, x8, #1 str x8, [sp, #8] b LBB0_3 LBB0_8: mov w8, #1 and w8, w8, #0x1 and w8, w8, #0x1 strb w8, [sp, #31] b LBB0_9 LBB0_9: ldrb w8, [sp, #31] and w0, w8, #0x1 add sp, sp, #32 ret .cfi_endproc ; -- End function .subsections_via_symbols
eval/problem32/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .section __TEXT,__literal8,8byte_literals .p2align 3 ## -- Begin function func0 LCPI0_0: .quad 0x3eb0c6f7a0b5ed8d ## double 9.9999999999999995E-7 LCPI0_2: .quad 0x3ff0000000000000 ## double 1 .section __TEXT,__literal16,16byte_literals .p2align 4 LCPI0_1: .quad 0x7fffffffffffffff ## double NaN .quad 0x7fffffffffffffff ## double NaN .section __TEXT,__text,regular,pure_instructions .globl _func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp movq %rdi, -8(%rbp) movl %esi, -12(%rbp) xorps %xmm0, %xmm0 movsd %xmm0, -24(%rbp) movq -8(%rbp), %rax movsd (%rax), %xmm0 ## xmm0 = mem[0],zero movsd %xmm0, -32(%rbp) movl $1, -52(%rbp) LBB0_1: ## =>This Loop Header: Depth=1 ## Child Loop BB0_3 Depth 2 movl -52(%rbp), %eax cmpl -12(%rbp), %eax jge LBB0_8 ## %bb.2: ## in Loop: Header=BB0_1 Depth=1 movsd LCPI0_2(%rip), %xmm0 ## xmm0 = mem[0],zero movsd %xmm0, -48(%rbp) movl $0, -56(%rbp) LBB0_3: ## Parent Loop BB0_1 Depth=1 ## => This Inner Loop Header: Depth=2 movl -56(%rbp), %eax cmpl -52(%rbp), %eax jge LBB0_6 ## %bb.4: ## in Loop: Header=BB0_3 Depth=2 movsd -24(%rbp), %xmm0 ## xmm0 = mem[0],zero mulsd -48(%rbp), %xmm0 movsd %xmm0, -48(%rbp) ## %bb.5: ## in Loop: Header=BB0_3 Depth=2 movl -56(%rbp), %eax addl $1, %eax movl %eax, -56(%rbp) jmp LBB0_3 LBB0_6: ## in Loop: Header=BB0_1 Depth=1 movq -8(%rbp), %rax movslq -52(%rbp), %rcx movsd (%rax,%rcx,8), %xmm0 ## xmm0 = mem[0],zero movsd -48(%rbp), %xmm2 ## xmm2 = mem[0],zero movsd -32(%rbp), %xmm1 ## xmm1 = mem[0],zero mulsd %xmm2, %xmm0 addsd %xmm1, %xmm0 movsd %xmm0, -32(%rbp) ## %bb.7: ## in Loop: Header=BB0_1 Depth=1 movl -52(%rbp), %eax addl $1, %eax movl %eax, -52(%rbp) jmp LBB0_1 LBB0_8: jmp LBB0_9 LBB0_9: ## =>This Loop Header: Depth=1 ## Child Loop BB0_11 Depth 2 ## Child Loop BB0_13 Depth 3 ## Child Loop BB0_19 Depth 2 ## Child Loop BB0_21 Depth 3 movsd -32(%rbp), %xmm0 ## xmm0 = mem[0],zero movaps LCPI0_1(%rip), %xmm1 ## xmm1 = [NaN,NaN] pand %xmm1, %xmm0 movsd LCPI0_0(%rip), %xmm1 ## xmm1 = mem[0],zero ucomisd %xmm1, %xmm0 jbe LBB0_27 ## %bb.10: ## in Loop: Header=BB0_9 Depth=1 xorps %xmm0, %xmm0 movsd %xmm0, -40(%rbp) movl $1, -52(%rbp) LBB0_11: ## Parent Loop BB0_9 Depth=1 ## => This Loop Header: Depth=2 ## Child Loop BB0_13 Depth 3 movl -52(%rbp), %eax cmpl -12(%rbp), %eax jge LBB0_18 ## %bb.12: ## in Loop: Header=BB0_11 Depth=2 movsd LCPI0_2(%rip), %xmm0 ## xmm0 = mem[0],zero movsd %xmm0, -48(%rbp) movl $1, -60(%rbp) LBB0_13: ## Parent Loop BB0_9 Depth=1 ## Parent Loop BB0_11 Depth=2 ## => This Inner Loop Header: Depth=3 movl -60(%rbp), %eax cmpl -52(%rbp), %eax jge LBB0_16 ## %bb.14: ## in Loop: Header=BB0_13 Depth=3 movsd -24(%rbp), %xmm0 ## xmm0 = mem[0],zero mulsd -48(%rbp), %xmm0 movsd %xmm0, -48(%rbp) ## %bb.15: ## in Loop: Header=BB0_13 Depth=3 movl -60(%rbp), %eax addl $1, %eax movl %eax, -60(%rbp) jmp LBB0_13 LBB0_16: ## in Loop: Header=BB0_11 Depth=2 cvtsi2sdl -52(%rbp), %xmm0 movq -8(%rbp), %rax movslq -52(%rbp), %rcx mulsd (%rax,%rcx,8), %xmm0 movsd -48(%rbp), %xmm2 ## xmm2 = mem[0],zero movsd -40(%rbp), %xmm1 ## xmm1 = mem[0],zero mulsd %xmm2, %xmm0 addsd %xmm1, %xmm0 movsd %xmm0, -40(%rbp) ## %bb.17: ## in Loop: Header=BB0_11 Depth=2 movl -52(%rbp), %eax addl $1, %eax movl %eax, -52(%rbp) jmp LBB0_11 LBB0_18: ## in Loop: Header=BB0_9 Depth=1 movsd -24(%rbp), %xmm0 ## xmm0 = mem[0],zero movsd -32(%rbp), %xmm1 ## xmm1 = mem[0],zero divsd -40(%rbp), %xmm1 subsd %xmm1, %xmm0 movsd %xmm0, -24(%rbp) movq -8(%rbp), %rax movsd (%rax), %xmm0 ## xmm0 = mem[0],zero movsd %xmm0, -32(%rbp) movl $1, -52(%rbp) LBB0_19: ## Parent Loop BB0_9 Depth=1 ## => This Loop Header: Depth=2 ## Child Loop BB0_21 Depth 3 movl -52(%rbp), %eax cmpl -12(%rbp), %eax jge LBB0_26 ## %bb.20: ## in Loop: Header=BB0_19 Depth=2 movsd LCPI0_2(%rip), %xmm0 ## xmm0 = mem[0],zero movsd %xmm0, -48(%rbp) movl $0, -64(%rbp) LBB0_21: ## Parent Loop BB0_9 Depth=1 ## Parent Loop BB0_19 Depth=2 ## => This Inner Loop Header: Depth=3 movl -64(%rbp), %eax cmpl -52(%rbp), %eax jge LBB0_24 ## %bb.22: ## in Loop: Header=BB0_21 Depth=3 movsd -24(%rbp), %xmm0 ## xmm0 = mem[0],zero mulsd -48(%rbp), %xmm0 movsd %xmm0, -48(%rbp) ## %bb.23: ## in Loop: Header=BB0_21 Depth=3 movl -64(%rbp), %eax addl $1, %eax movl %eax, -64(%rbp) jmp LBB0_21 LBB0_24: ## in Loop: Header=BB0_19 Depth=2 movq -8(%rbp), %rax movslq -52(%rbp), %rcx movsd (%rax,%rcx,8), %xmm0 ## xmm0 = mem[0],zero movsd -48(%rbp), %xmm2 ## xmm2 = mem[0],zero movsd -32(%rbp), %xmm1 ## xmm1 = mem[0],zero mulsd %xmm2, %xmm0 addsd %xmm1, %xmm0 movsd %xmm0, -32(%rbp) ## %bb.25: ## in Loop: Header=BB0_19 Depth=2 movl -52(%rbp), %eax addl $1, %eax movl %eax, -52(%rbp) jmp LBB0_19 LBB0_26: ## in Loop: Header=BB0_9 Depth=1 jmp LBB0_9 LBB0_27: movsd -24(%rbp), %xmm0 ## xmm0 = mem[0],zero popq %rbp retq .cfi_endproc ## -- End function .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .section __TEXT,__literal8,8byte_literals .p2align 3 ; -- Begin function func0 lCPI0_0: .quad 0x3eb0c6f7a0b5ed8d ; double 9.9999999999999995E-7 .section __TEXT,__text,regular,pure_instructions .globl _func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #64 .cfi_def_cfa_offset 64 str x0, [sp, #56] str w1, [sp, #52] movi d0, #0000000000000000 str d0, [sp, #40] ldr x8, [sp, #56] ldr d0, [x8] str d0, [sp, #32] mov w8, #1 str w8, [sp, #12] b LBB0_1 LBB0_1: ; =>This Loop Header: Depth=1 ; Child Loop BB0_3 Depth 2 ldr w8, [sp, #12] ldr w9, [sp, #52] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_8 b LBB0_2 LBB0_2: ; in Loop: Header=BB0_1 Depth=1 fmov d0, #1.00000000 str d0, [sp, #16] str wzr, [sp, #8] b LBB0_3 LBB0_3: ; Parent Loop BB0_1 Depth=1 ; => This Inner Loop Header: Depth=2 ldr w8, [sp, #8] ldr w9, [sp, #12] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_6 b LBB0_4 LBB0_4: ; in Loop: Header=BB0_3 Depth=2 ldr d1, [sp, #40] ldr d0, [sp, #16] fmul d0, d0, d1 str d0, [sp, #16] b LBB0_5 LBB0_5: ; in Loop: Header=BB0_3 Depth=2 ldr w8, [sp, #8] add w8, w8, #1 str w8, [sp, #8] b LBB0_3 LBB0_6: ; in Loop: Header=BB0_1 Depth=1 ldr x8, [sp, #56] ldrsw x9, [sp, #12] ldr d0, [x8, x9, lsl #3] ldr d1, [sp, #16] ldr d2, [sp, #32] fmadd d0, d0, d1, d2 str d0, [sp, #32] b LBB0_7 LBB0_7: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #12] add w8, w8, #1 str w8, [sp, #12] b LBB0_1 LBB0_8: b LBB0_9 LBB0_9: ; =>This Loop Header: Depth=1 ; Child Loop BB0_11 Depth 2 ; Child Loop BB0_13 Depth 3 ; Child Loop BB0_19 Depth 2 ; Child Loop BB0_21 Depth 3 ldr d0, [sp, #32] fabs d0, d0 adrp x8, lCPI0_0@PAGE ldr d1, [x8, lCPI0_0@PAGEOFF] fcmp d0, d1 cset w8, le tbnz w8, #0, LBB0_27 b LBB0_10 LBB0_10: ; in Loop: Header=BB0_9 Depth=1 movi d0, #0000000000000000 str d0, [sp, #24] mov w8, #1 str w8, [sp, #12] b LBB0_11 LBB0_11: ; Parent Loop BB0_9 Depth=1 ; => This Loop Header: Depth=2 ; Child Loop BB0_13 Depth 3 ldr w8, [sp, #12] ldr w9, [sp, #52] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_18 b LBB0_12 LBB0_12: ; in Loop: Header=BB0_11 Depth=2 fmov d0, #1.00000000 str d0, [sp, #16] mov w8, #1 str w8, [sp, #4] b LBB0_13 LBB0_13: ; Parent Loop BB0_9 Depth=1 ; Parent Loop BB0_11 Depth=2 ; => This Inner Loop Header: Depth=3 ldr w8, [sp, #4] ldr w9, [sp, #12] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_16 b LBB0_14 LBB0_14: ; in Loop: Header=BB0_13 Depth=3 ldr d1, [sp, #40] ldr d0, [sp, #16] fmul d0, d0, d1 str d0, [sp, #16] b LBB0_15 LBB0_15: ; in Loop: Header=BB0_13 Depth=3 ldr w8, [sp, #4] add w8, w8, #1 str w8, [sp, #4] b LBB0_13 LBB0_16: ; in Loop: Header=BB0_11 Depth=2 ldr s1, [sp, #12] ; implicit-def: $d0 fmov s0, s1 sshll.2d v0, v0, #0 ; kill: def $d0 killed $d0 killed $q0 scvtf d0, d0 ldr x8, [sp, #56] ldrsw x9, [sp, #12] ldr d1, [x8, x9, lsl #3] fmul d0, d0, d1 ldr d1, [sp, #16] ldr d2, [sp, #24] fmadd d0, d0, d1, d2 str d0, [sp, #24] b LBB0_17 LBB0_17: ; in Loop: Header=BB0_11 Depth=2 ldr w8, [sp, #12] add w8, w8, #1 str w8, [sp, #12] b LBB0_11 LBB0_18: ; in Loop: Header=BB0_9 Depth=1 ldr d0, [sp, #40] ldr d1, [sp, #32] ldr d2, [sp, #24] fdiv d1, d1, d2 fsub d0, d0, d1 str d0, [sp, #40] ldr x8, [sp, #56] ldr d0, [x8] str d0, [sp, #32] mov w8, #1 str w8, [sp, #12] b LBB0_19 LBB0_19: ; Parent Loop BB0_9 Depth=1 ; => This Loop Header: Depth=2 ; Child Loop BB0_21 Depth 3 ldr w8, [sp, #12] ldr w9, [sp, #52] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_26 b LBB0_20 LBB0_20: ; in Loop: Header=BB0_19 Depth=2 fmov d0, #1.00000000 str d0, [sp, #16] str wzr, [sp] b LBB0_21 LBB0_21: ; Parent Loop BB0_9 Depth=1 ; Parent Loop BB0_19 Depth=2 ; => This Inner Loop Header: Depth=3 ldr w8, [sp] ldr w9, [sp, #12] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_24 b LBB0_22 LBB0_22: ; in Loop: Header=BB0_21 Depth=3 ldr d1, [sp, #40] ldr d0, [sp, #16] fmul d0, d0, d1 str d0, [sp, #16] b LBB0_23 LBB0_23: ; in Loop: Header=BB0_21 Depth=3 ldr w8, [sp] add w8, w8, #1 str w8, [sp] b LBB0_21 LBB0_24: ; in Loop: Header=BB0_19 Depth=2 ldr x8, [sp, #56] ldrsw x9, [sp, #12] ldr d0, [x8, x9, lsl #3] ldr d1, [sp, #16] ldr d2, [sp, #32] fmadd d0, d0, d1, d2 str d0, [sp, #32] b LBB0_25 LBB0_25: ; in Loop: Header=BB0_19 Depth=2 ldr w8, [sp, #12] add w8, w8, #1 str w8, [sp, #12] b LBB0_19 LBB0_26: ; in Loop: Header=BB0_9 Depth=1 b LBB0_9 LBB0_27: ldr d0, [sp, #40] add sp, sp, #64 ret .cfi_endproc ; -- End function .subsections_via_symbols
eval/problem33/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ## -- Begin function func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp subq $64, %rsp movq %rdi, -8(%rbp) movl %esi, -12(%rbp) movq %rdx, -24(%rbp) movl -12(%rbp), %eax movl $3, %ecx cltd idivl %ecx addl $1, %eax movslq %eax, %rdi shlq $2, %rdi callq _malloc movq %rax, -32(%rbp) movl $0, -40(%rbp) movl $0, -44(%rbp) movl $0, -36(%rbp) LBB0_1: ## =>This Inner Loop Header: Depth=1 imull $3, -36(%rbp), %eax cmpl -12(%rbp), %eax jge LBB0_4 ## %bb.2: ## in Loop: Header=BB0_1 Depth=1 movq -8(%rbp), %rax imull $3, -36(%rbp), %ecx movslq %ecx, %rcx movl (%rax,%rcx,4), %edx movq -32(%rbp), %rax movslq -36(%rbp), %rcx movl %edx, (%rax,%rcx,4) movl -44(%rbp), %eax addl $1, %eax movl %eax, -44(%rbp) ## %bb.3: ## in Loop: Header=BB0_1 Depth=1 movl -36(%rbp), %eax addl $1, %eax movl %eax, -36(%rbp) jmp LBB0_1 LBB0_4: movl $0, -36(%rbp) LBB0_5: ## =>This Loop Header: Depth=1 ## Child Loop BB0_7 Depth 2 movl -36(%rbp), %eax movl -44(%rbp), %ecx subl $1, %ecx cmpl %ecx, %eax jge LBB0_16 ## %bb.6: ## in Loop: Header=BB0_5 Depth=1 movl -36(%rbp), %eax movl %eax, -48(%rbp) movl -36(%rbp), %eax addl $1, %eax movl %eax, -40(%rbp) LBB0_7: ## Parent Loop BB0_5 Depth=1 ## => This Inner Loop Header: Depth=2 movl -40(%rbp), %eax cmpl -44(%rbp), %eax jge LBB0_12 ## %bb.8: ## in Loop: Header=BB0_7 Depth=2 movq -32(%rbp), %rax movslq -40(%rbp), %rcx movl (%rax,%rcx,4), %eax movq -32(%rbp), %rcx movslq -48(%rbp), %rdx cmpl (%rcx,%rdx,4), %eax jge LBB0_10 ## %bb.9: ## in Loop: Header=BB0_7 Depth=2 movl -40(%rbp), %eax movl %eax, -48(%rbp) LBB0_10: ## in Loop: Header=BB0_7 Depth=2 jmp LBB0_11 LBB0_11: ## in Loop: Header=BB0_7 Depth=2 movl -40(%rbp), %eax addl $1, %eax movl %eax, -40(%rbp) jmp LBB0_7 LBB0_12: ## in Loop: Header=BB0_5 Depth=1 movl -48(%rbp), %eax cmpl -36(%rbp), %eax je LBB0_14 ## %bb.13: ## in Loop: Header=BB0_5 Depth=1 movq -32(%rbp), %rax movslq -36(%rbp), %rcx movl (%rax,%rcx,4), %eax movl %eax, -52(%rbp) movq -32(%rbp), %rax movslq -48(%rbp), %rcx movl (%rax,%rcx,4), %edx movq -32(%rbp), %rax movslq -36(%rbp), %rcx movl %edx, (%rax,%rcx,4) movl -52(%rbp), %edx movq -32(%rbp), %rax movslq -48(%rbp), %rcx movl %edx, (%rax,%rcx,4) LBB0_14: ## in Loop: Header=BB0_5 Depth=1 jmp LBB0_15 LBB0_15: ## in Loop: Header=BB0_5 Depth=1 movl -36(%rbp), %eax addl $1, %eax movl %eax, -36(%rbp) jmp LBB0_5 LBB0_16: movl $0, -36(%rbp) LBB0_17: ## =>This Inner Loop Header: Depth=1 movl -36(%rbp), %eax cmpl -12(%rbp), %eax jge LBB0_23 ## %bb.18: ## in Loop: Header=BB0_17 Depth=1 movl -36(%rbp), %eax movl $3, %ecx cltd idivl %ecx cmpl $0, %edx jne LBB0_20 ## %bb.19: ## in Loop: Header=BB0_17 Depth=1 movq -32(%rbp), %rax movq %rax, -64(%rbp) ## 8-byte Spill movl -36(%rbp), %eax movl $3, %ecx cltd idivl %ecx movl %eax, %ecx movq -64(%rbp), %rax ## 8-byte Reload movslq %ecx, %rcx movl (%rax,%rcx,4), %edx movq -24(%rbp), %rax movslq -36(%rbp), %rcx movl %edx, (%rax,%rcx,4) jmp LBB0_21 LBB0_20: ## in Loop: Header=BB0_17 Depth=1 movq -8(%rbp), %rax movslq -36(%rbp), %rcx movl (%rax,%rcx,4), %edx movq -24(%rbp), %rax movslq -36(%rbp), %rcx movl %edx, (%rax,%rcx,4) LBB0_21: ## in Loop: Header=BB0_17 Depth=1 jmp LBB0_22 LBB0_22: ## in Loop: Header=BB0_17 Depth=1 movl -36(%rbp), %eax addl $1, %eax movl %eax, -36(%rbp) jmp LBB0_17 LBB0_23: movq -32(%rbp), %rdi callq _free addq $64, %rsp popq %rbp retq .cfi_endproc ## -- End function .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #80 .cfi_def_cfa_offset 80 stp x29, x30, [sp, #64] ; 16-byte Folded Spill add x29, sp, #64 .cfi_def_cfa w29, 16 .cfi_offset w30, -8 .cfi_offset w29, -16 stur x0, [x29, #-8] stur w1, [x29, #-12] stur x2, [x29, #-24] ldur w8, [x29, #-12] mov w9, #3 sdiv w8, w8, w9 add w9, w8, #1 ; implicit-def: $x8 mov x8, x9 sxtw x8, w8 lsl x0, x8, #2 bl _malloc str x0, [sp, #32] str wzr, [sp, #24] str wzr, [sp, #20] str wzr, [sp, #28] b LBB0_1 LBB0_1: ; =>This Inner Loop Header: Depth=1 ldr w8, [sp, #28] mov w9, #3 mul w8, w8, w9 ldur w9, [x29, #-12] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_4 b LBB0_2 LBB0_2: ; in Loop: Header=BB0_1 Depth=1 ldur x8, [x29, #-8] ldr w9, [sp, #28] mov w10, #3 mul w9, w9, w10 ldr w8, [x8, w9, sxtw #2] ldr x9, [sp, #32] ldrsw x10, [sp, #28] str w8, [x9, x10, lsl #2] ldr w8, [sp, #20] add w8, w8, #1 str w8, [sp, #20] b LBB0_3 LBB0_3: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #28] add w8, w8, #1 str w8, [sp, #28] b LBB0_1 LBB0_4: str wzr, [sp, #28] b LBB0_5 LBB0_5: ; =>This Loop Header: Depth=1 ; Child Loop BB0_7 Depth 2 ldr w8, [sp, #28] ldr w9, [sp, #20] subs w9, w9, #1 subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_16 b LBB0_6 LBB0_6: ; in Loop: Header=BB0_5 Depth=1 ldr w8, [sp, #28] str w8, [sp, #16] ldr w8, [sp, #28] add w8, w8, #1 str w8, [sp, #24] b LBB0_7 LBB0_7: ; Parent Loop BB0_5 Depth=1 ; => This Inner Loop Header: Depth=2 ldr w8, [sp, #24] ldr w9, [sp, #20] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_12 b LBB0_8 LBB0_8: ; in Loop: Header=BB0_7 Depth=2 ldr x8, [sp, #32] ldrsw x9, [sp, #24] ldr w8, [x8, x9, lsl #2] ldr x9, [sp, #32] ldrsw x10, [sp, #16] ldr w9, [x9, x10, lsl #2] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_10 b LBB0_9 LBB0_9: ; in Loop: Header=BB0_7 Depth=2 ldr w8, [sp, #24] str w8, [sp, #16] b LBB0_10 LBB0_10: ; in Loop: Header=BB0_7 Depth=2 b LBB0_11 LBB0_11: ; in Loop: Header=BB0_7 Depth=2 ldr w8, [sp, #24] add w8, w8, #1 str w8, [sp, #24] b LBB0_7 LBB0_12: ; in Loop: Header=BB0_5 Depth=1 ldr w8, [sp, #16] ldr w9, [sp, #28] subs w8, w8, w9 cset w8, eq tbnz w8, #0, LBB0_14 b LBB0_13 LBB0_13: ; in Loop: Header=BB0_5 Depth=1 ldr x8, [sp, #32] ldrsw x9, [sp, #28] ldr w8, [x8, x9, lsl #2] str w8, [sp, #12] ldr x8, [sp, #32] ldrsw x9, [sp, #16] ldr w8, [x8, x9, lsl #2] ldr x9, [sp, #32] ldrsw x10, [sp, #28] str w8, [x9, x10, lsl #2] ldr w8, [sp, #12] ldr x9, [sp, #32] ldrsw x10, [sp, #16] str w8, [x9, x10, lsl #2] b LBB0_14 LBB0_14: ; in Loop: Header=BB0_5 Depth=1 b LBB0_15 LBB0_15: ; in Loop: Header=BB0_5 Depth=1 ldr w8, [sp, #28] add w8, w8, #1 str w8, [sp, #28] b LBB0_5 LBB0_16: str wzr, [sp, #28] b LBB0_17 LBB0_17: ; =>This Inner Loop Header: Depth=1 ldr w8, [sp, #28] ldur w9, [x29, #-12] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_23 b LBB0_18 LBB0_18: ; in Loop: Header=BB0_17 Depth=1 ldr w8, [sp, #28] mov w10, #3 sdiv w9, w8, w10 mul w9, w9, w10 subs w8, w8, w9 subs w8, w8, #0 cset w8, ne tbnz w8, #0, LBB0_20 b LBB0_19 LBB0_19: ; in Loop: Header=BB0_17 Depth=1 ldr x8, [sp, #32] ldr w9, [sp, #28] mov w10, #3 sdiv w9, w9, w10 ldr w8, [x8, w9, sxtw #2] ldur x9, [x29, #-24] ldrsw x10, [sp, #28] str w8, [x9, x10, lsl #2] b LBB0_21 LBB0_20: ; in Loop: Header=BB0_17 Depth=1 ldur x8, [x29, #-8] ldrsw x9, [sp, #28] ldr w8, [x8, x9, lsl #2] ldur x9, [x29, #-24] ldrsw x10, [sp, #28] str w8, [x9, x10, lsl #2] b LBB0_21 LBB0_21: ; in Loop: Header=BB0_17 Depth=1 b LBB0_22 LBB0_22: ; in Loop: Header=BB0_17 Depth=1 ldr w8, [sp, #28] add w8, w8, #1 str w8, [sp, #28] b LBB0_17 LBB0_23: ldr x0, [sp, #32] bl _free ldp x29, x30, [sp, #64] ; 16-byte Folded Reload add sp, sp, #80 ret .cfi_endproc ; -- End function .subsections_via_symbols
eval/problem34/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ## -- Begin function func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp subq $64, %rsp movq %rdi, -8(%rbp) movl %esi, -12(%rbp) movq %rdx, -24(%rbp) movslq -12(%rbp), %rdi shlq $2, %rdi callq _malloc movq %rax, -32(%rbp) movl $0, -40(%rbp) movl $0, -44(%rbp) LBB0_1: ## =>This Loop Header: Depth=1 ## Child Loop BB0_3 Depth 2 movl -44(%rbp), %eax cmpl -12(%rbp), %eax jge LBB0_12 ## %bb.2: ## in Loop: Header=BB0_1 Depth=1 movl $0, -36(%rbp) movl $0, -48(%rbp) LBB0_3: ## Parent Loop BB0_1 Depth=1 ## => This Inner Loop Header: Depth=2 movl -48(%rbp), %eax cmpl -40(%rbp), %eax jge LBB0_8 ## %bb.4: ## in Loop: Header=BB0_3 Depth=2 movq -8(%rbp), %rax movslq -44(%rbp), %rcx movl (%rax,%rcx,4), %eax movq -32(%rbp), %rcx movslq -48(%rbp), %rdx cmpl (%rcx,%rdx,4), %eax jne LBB0_6 ## %bb.5: ## in Loop: Header=BB0_1 Depth=1 movl $1, -36(%rbp) jmp LBB0_8 LBB0_6: ## in Loop: Header=BB0_3 Depth=2 jmp LBB0_7 LBB0_7: ## in Loop: Header=BB0_3 Depth=2 movl -48(%rbp), %eax addl $1, %eax movl %eax, -48(%rbp) jmp LBB0_3 LBB0_8: ## in Loop: Header=BB0_1 Depth=1 cmpl $0, -36(%rbp) jne LBB0_10 ## %bb.9: ## in Loop: Header=BB0_1 Depth=1 movq -8(%rbp), %rax movslq -44(%rbp), %rcx movl (%rax,%rcx,4), %edx movq -32(%rbp), %rax movl -40(%rbp), %ecx movl %ecx, %esi addl $1, %esi movl %esi, -40(%rbp) movslq %ecx, %rcx movl %edx, (%rax,%rcx,4) LBB0_10: ## in Loop: Header=BB0_1 Depth=1 jmp LBB0_11 LBB0_11: ## in Loop: Header=BB0_1 Depth=1 movl -44(%rbp), %eax addl $1, %eax movl %eax, -44(%rbp) jmp LBB0_1 LBB0_12: movl $0, -44(%rbp) LBB0_13: ## =>This Loop Header: Depth=1 ## Child Loop BB0_15 Depth 2 movl -44(%rbp), %eax movl -40(%rbp), %ecx subl $1, %ecx cmpl %ecx, %eax jge LBB0_22 ## %bb.14: ## in Loop: Header=BB0_13 Depth=1 movl -44(%rbp), %eax addl $1, %eax movl %eax, -48(%rbp) LBB0_15: ## Parent Loop BB0_13 Depth=1 ## => This Inner Loop Header: Depth=2 movl -48(%rbp), %eax cmpl -40(%rbp), %eax jge LBB0_20 ## %bb.16: ## in Loop: Header=BB0_15 Depth=2 movq -32(%rbp), %rax movslq -44(%rbp), %rcx movl (%rax,%rcx,4), %eax movq -32(%rbp), %rcx movslq -48(%rbp), %rdx cmpl (%rcx,%rdx,4), %eax jle LBB0_18 ## %bb.17: ## in Loop: Header=BB0_15 Depth=2 movq -32(%rbp), %rax movslq -44(%rbp), %rcx movl (%rax,%rcx,4), %eax movl %eax, -52(%rbp) movq -32(%rbp), %rax movslq -48(%rbp), %rcx movl (%rax,%rcx,4), %edx movq -32(%rbp), %rax movslq -44(%rbp), %rcx movl %edx, (%rax,%rcx,4) movl -52(%rbp), %edx movq -32(%rbp), %rax movslq -48(%rbp), %rcx movl %edx, (%rax,%rcx,4) LBB0_18: ## in Loop: Header=BB0_15 Depth=2 jmp LBB0_19 LBB0_19: ## in Loop: Header=BB0_15 Depth=2 movl -48(%rbp), %eax addl $1, %eax movl %eax, -48(%rbp) jmp LBB0_15 LBB0_20: ## in Loop: Header=BB0_13 Depth=1 jmp LBB0_21 LBB0_21: ## in Loop: Header=BB0_13 Depth=1 movl -44(%rbp), %eax addl $1, %eax movl %eax, -44(%rbp) jmp LBB0_13 LBB0_22: movl -40(%rbp), %ecx movq -24(%rbp), %rax movl %ecx, (%rax) movq -32(%rbp), %rax addq $64, %rsp popq %rbp retq .cfi_endproc ## -- End function .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #80 .cfi_def_cfa_offset 80 stp x29, x30, [sp, #64] ; 16-byte Folded Spill add x29, sp, #64 .cfi_def_cfa w29, 16 .cfi_offset w30, -8 .cfi_offset w29, -16 stur x0, [x29, #-8] stur w1, [x29, #-12] stur x2, [x29, #-24] ldursw x8, [x29, #-12] lsl x0, x8, #2 bl _malloc str x0, [sp, #32] str wzr, [sp, #24] str wzr, [sp, #20] b LBB0_1 LBB0_1: ; =>This Loop Header: Depth=1 ; Child Loop BB0_3 Depth 2 ldr w8, [sp, #20] ldur w9, [x29, #-12] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_12 b LBB0_2 LBB0_2: ; in Loop: Header=BB0_1 Depth=1 str wzr, [sp, #28] str wzr, [sp, #16] b LBB0_3 LBB0_3: ; Parent Loop BB0_1 Depth=1 ; => This Inner Loop Header: Depth=2 ldr w8, [sp, #16] ldr w9, [sp, #24] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_8 b LBB0_4 LBB0_4: ; in Loop: Header=BB0_3 Depth=2 ldur x8, [x29, #-8] ldrsw x9, [sp, #20] ldr w8, [x8, x9, lsl #2] ldr x9, [sp, #32] ldrsw x10, [sp, #16] ldr w9, [x9, x10, lsl #2] subs w8, w8, w9 cset w8, ne tbnz w8, #0, LBB0_6 b LBB0_5 LBB0_5: ; in Loop: Header=BB0_1 Depth=1 mov w8, #1 str w8, [sp, #28] b LBB0_8 LBB0_6: ; in Loop: Header=BB0_3 Depth=2 b LBB0_7 LBB0_7: ; in Loop: Header=BB0_3 Depth=2 ldr w8, [sp, #16] add w8, w8, #1 str w8, [sp, #16] b LBB0_3 LBB0_8: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #28] subs w8, w8, #0 cset w8, ne tbnz w8, #0, LBB0_10 b LBB0_9 LBB0_9: ; in Loop: Header=BB0_1 Depth=1 ldur x8, [x29, #-8] ldrsw x9, [sp, #20] ldr w8, [x8, x9, lsl #2] ldr x9, [sp, #32] ldrsw x10, [sp, #24] mov x11, x10 add w11, w11, #1 str w11, [sp, #24] str w8, [x9, x10, lsl #2] b LBB0_10 LBB0_10: ; in Loop: Header=BB0_1 Depth=1 b LBB0_11 LBB0_11: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #20] add w8, w8, #1 str w8, [sp, #20] b LBB0_1 LBB0_12: str wzr, [sp, #20] b LBB0_13 LBB0_13: ; =>This Loop Header: Depth=1 ; Child Loop BB0_15 Depth 2 ldr w8, [sp, #20] ldr w9, [sp, #24] subs w9, w9, #1 subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_22 b LBB0_14 LBB0_14: ; in Loop: Header=BB0_13 Depth=1 ldr w8, [sp, #20] add w8, w8, #1 str w8, [sp, #16] b LBB0_15 LBB0_15: ; Parent Loop BB0_13 Depth=1 ; => This Inner Loop Header: Depth=2 ldr w8, [sp, #16] ldr w9, [sp, #24] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_20 b LBB0_16 LBB0_16: ; in Loop: Header=BB0_15 Depth=2 ldr x8, [sp, #32] ldrsw x9, [sp, #20] ldr w8, [x8, x9, lsl #2] ldr x9, [sp, #32] ldrsw x10, [sp, #16] ldr w9, [x9, x10, lsl #2] subs w8, w8, w9 cset w8, le tbnz w8, #0, LBB0_18 b LBB0_17 LBB0_17: ; in Loop: Header=BB0_15 Depth=2 ldr x8, [sp, #32] ldrsw x9, [sp, #20] ldr w8, [x8, x9, lsl #2] str w8, [sp, #12] ldr x8, [sp, #32] ldrsw x9, [sp, #16] ldr w8, [x8, x9, lsl #2] ldr x9, [sp, #32] ldrsw x10, [sp, #20] str w8, [x9, x10, lsl #2] ldr w8, [sp, #12] ldr x9, [sp, #32] ldrsw x10, [sp, #16] str w8, [x9, x10, lsl #2] b LBB0_18 LBB0_18: ; in Loop: Header=BB0_15 Depth=2 b LBB0_19 LBB0_19: ; in Loop: Header=BB0_15 Depth=2 ldr w8, [sp, #16] add w8, w8, #1 str w8, [sp, #16] b LBB0_15 LBB0_20: ; in Loop: Header=BB0_13 Depth=1 b LBB0_21 LBB0_21: ; in Loop: Header=BB0_13 Depth=1 ldr w8, [sp, #20] add w8, w8, #1 str w8, [sp, #20] b LBB0_13 LBB0_22: ldr w8, [sp, #24] ldur x9, [x29, #-24] str w8, [x9] ldr x0, [sp, #32] ldp x29, x30, [sp, #64] ; 16-byte Folded Reload add sp, sp, #80 ret .cfi_endproc ; -- End function .subsections_via_symbols
eval/problem35/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .section __TEXT,__literal4,4byte_literals .p2align 2 ## -- Begin function func0 LCPI0_0: .long 0xc61c4000 ## float -1.0E+4 .section __TEXT,__text,regular,pure_instructions .globl _func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp movq %rdi, -8(%rbp) movl %esi, -12(%rbp) movss LCPI0_0(%rip), %xmm0 ## xmm0 = mem[0],zero,zero,zero movss %xmm0, -16(%rbp) movl $0, -20(%rbp) LBB0_1: ## =>This Inner Loop Header: Depth=1 movl -20(%rbp), %eax cmpl -12(%rbp), %eax jge LBB0_6 ## %bb.2: ## in Loop: Header=BB0_1 Depth=1 movss -16(%rbp), %xmm1 ## xmm1 = mem[0],zero,zero,zero movq -8(%rbp), %rax movslq -20(%rbp), %rcx movss (%rax,%rcx,4), %xmm0 ## xmm0 = mem[0],zero,zero,zero ucomiss %xmm1, %xmm0 jbe LBB0_4 ## %bb.3: ## in Loop: Header=BB0_1 Depth=1 movq -8(%rbp), %rax movslq -20(%rbp), %rcx movss (%rax,%rcx,4), %xmm0 ## xmm0 = mem[0],zero,zero,zero movss %xmm0, -16(%rbp) LBB0_4: ## in Loop: Header=BB0_1 Depth=1 jmp LBB0_5 LBB0_5: ## in Loop: Header=BB0_1 Depth=1 movl -20(%rbp), %eax addl $1, %eax movl %eax, -20(%rbp) jmp LBB0_1 LBB0_6: movss -16(%rbp), %xmm0 ## xmm0 = mem[0],zero,zero,zero popq %rbp retq .cfi_endproc ## -- End function .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #32 .cfi_def_cfa_offset 32 str x0, [sp, #24] str w1, [sp, #20] mov w8, #16384 movk w8, #50716, lsl #16 fmov s0, w8 str s0, [sp, #16] str wzr, [sp, #12] b LBB0_1 LBB0_1: ; =>This Inner Loop Header: Depth=1 ldr w8, [sp, #12] ldr w9, [sp, #20] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_6 b LBB0_2 LBB0_2: ; in Loop: Header=BB0_1 Depth=1 ldr s0, [sp, #16] ldr x8, [sp, #24] ldrsw x9, [sp, #12] ldr s1, [x8, x9, lsl #2] fcmp s0, s1 cset w8, pl tbnz w8, #0, LBB0_4 b LBB0_3 LBB0_3: ; in Loop: Header=BB0_1 Depth=1 ldr x8, [sp, #24] ldrsw x9, [sp, #12] ldr s0, [x8, x9, lsl #2] str s0, [sp, #16] b LBB0_4 LBB0_4: ; in Loop: Header=BB0_1 Depth=1 b LBB0_5 LBB0_5: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #12] add w8, w8, #1 str w8, [sp, #12] b LBB0_1 LBB0_6: ldr s0, [sp, #16] add sp, sp, #32 ret .cfi_endproc ; -- End function .subsections_via_symbols
eval/problem36/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ## -- Begin function func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp movl %edi, -4(%rbp) movl $0, -8(%rbp) movl $0, -12(%rbp) LBB0_1: ## =>This Loop Header: Depth=1 ## Child Loop BB0_5 Depth 2 movl -12(%rbp), %eax cmpl -4(%rbp), %eax jge LBB0_12 ## %bb.2: ## in Loop: Header=BB0_1 Depth=1 movl -12(%rbp), %eax movl $11, %ecx cltd idivl %ecx cmpl $0, %edx je LBB0_4 ## %bb.3: ## in Loop: Header=BB0_1 Depth=1 movl -12(%rbp), %eax movl $13, %ecx cltd idivl %ecx cmpl $0, %edx jne LBB0_10 LBB0_4: ## in Loop: Header=BB0_1 Depth=1 movl -12(%rbp), %eax movl %eax, -16(%rbp) LBB0_5: ## Parent Loop BB0_1 Depth=1 ## => This Inner Loop Header: Depth=2 cmpl $0, -16(%rbp) jle LBB0_9 ## %bb.6: ## in Loop: Header=BB0_5 Depth=2 movl -16(%rbp), %eax movl $10, %ecx cltd idivl %ecx cmpl $7, %edx jne LBB0_8 ## %bb.7: ## in Loop: Header=BB0_5 Depth=2 movl -8(%rbp), %eax addl $1, %eax movl %eax, -8(%rbp) LBB0_8: ## in Loop: Header=BB0_5 Depth=2 movl -16(%rbp), %eax movl $10, %ecx cltd idivl %ecx movl %eax, -16(%rbp) jmp LBB0_5 LBB0_9: ## in Loop: Header=BB0_1 Depth=1 jmp LBB0_10 LBB0_10: ## in Loop: Header=BB0_1 Depth=1 jmp LBB0_11 LBB0_11: ## in Loop: Header=BB0_1 Depth=1 movl -12(%rbp), %eax addl $1, %eax movl %eax, -12(%rbp) jmp LBB0_1 LBB0_12: movl -8(%rbp), %eax popq %rbp retq .cfi_endproc ## -- End function .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #16 .cfi_def_cfa_offset 16 str w0, [sp, #12] str wzr, [sp, #8] str wzr, [sp, #4] b LBB0_1 LBB0_1: ; =>This Loop Header: Depth=1 ; Child Loop BB0_5 Depth 2 ldr w8, [sp, #4] ldr w9, [sp, #12] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_12 b LBB0_2 LBB0_2: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #4] mov w10, #11 sdiv w9, w8, w10 mul w9, w9, w10 subs w8, w8, w9 subs w8, w8, #0 cset w8, eq tbnz w8, #0, LBB0_4 b LBB0_3 LBB0_3: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #4] mov w10, #13 sdiv w9, w8, w10 mul w9, w9, w10 subs w8, w8, w9 subs w8, w8, #0 cset w8, ne tbnz w8, #0, LBB0_10 b LBB0_4 LBB0_4: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #4] str w8, [sp] b LBB0_5 LBB0_5: ; Parent Loop BB0_1 Depth=1 ; => This Inner Loop Header: Depth=2 ldr w8, [sp] subs w8, w8, #0 cset w8, le tbnz w8, #0, LBB0_9 b LBB0_6 LBB0_6: ; in Loop: Header=BB0_5 Depth=2 ldr w8, [sp] mov w10, #10 sdiv w9, w8, w10 mul w9, w9, w10 subs w8, w8, w9 subs w8, w8, #7 cset w8, ne tbnz w8, #0, LBB0_8 b LBB0_7 LBB0_7: ; in Loop: Header=BB0_5 Depth=2 ldr w8, [sp, #8] add w8, w8, #1 str w8, [sp, #8] b LBB0_8 LBB0_8: ; in Loop: Header=BB0_5 Depth=2 ldr w8, [sp] mov w9, #10 sdiv w8, w8, w9 str w8, [sp] b LBB0_5 LBB0_9: ; in Loop: Header=BB0_1 Depth=1 b LBB0_10 LBB0_10: ; in Loop: Header=BB0_1 Depth=1 b LBB0_11 LBB0_11: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #4] add w8, w8, #1 str w8, [sp, #4] b LBB0_1 LBB0_12: ldr w0, [sp, #8] add sp, sp, #16 ret .cfi_endproc ; -- End function .subsections_via_symbols
eval/problem37/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ## -- Begin function func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp subq $64, %rsp movq %rdi, -8(%rbp) movl %esi, -12(%rbp) movq %rdx, -24(%rbp) movl -12(%rbp), %eax movl $2, %ecx cltd idivl %ecx addl $1, %eax movslq %eax, %rdi shlq $2, %rdi callq _malloc movq %rax, -32(%rbp) movl $0, -44(%rbp) movl $0, -36(%rbp) LBB0_1: ## =>This Inner Loop Header: Depth=1 movl -36(%rbp), %eax cmpl -12(%rbp), %eax jge LBB0_4 ## %bb.2: ## in Loop: Header=BB0_1 Depth=1 movq -8(%rbp), %rax movslq -36(%rbp), %rcx movss (%rax,%rcx,4), %xmm0 ## xmm0 = mem[0],zero,zero,zero movq -32(%rbp), %rax movl -44(%rbp), %ecx movl %ecx, %edx addl $1, %edx movl %edx, -44(%rbp) movslq %ecx, %rcx movss %xmm0, (%rax,%rcx,4) ## %bb.3: ## in Loop: Header=BB0_1 Depth=1 movl -36(%rbp), %eax addl $2, %eax movl %eax, -36(%rbp) jmp LBB0_1 LBB0_4: movl $0, -36(%rbp) LBB0_5: ## =>This Loop Header: Depth=1 ## Child Loop BB0_7 Depth 2 movl -36(%rbp), %eax movl -44(%rbp), %ecx subl $1, %ecx cmpl %ecx, %eax jge LBB0_14 ## %bb.6: ## in Loop: Header=BB0_5 Depth=1 movl $0, -40(%rbp) LBB0_7: ## Parent Loop BB0_5 Depth=1 ## => This Inner Loop Header: Depth=2 movl -40(%rbp), %eax movl -44(%rbp), %ecx subl -36(%rbp), %ecx subl $1, %ecx cmpl %ecx, %eax jge LBB0_12 ## %bb.8: ## in Loop: Header=BB0_7 Depth=2 movq -32(%rbp), %rax movslq -40(%rbp), %rcx movss (%rax,%rcx,4), %xmm0 ## xmm0 = mem[0],zero,zero,zero movq -32(%rbp), %rax movl -40(%rbp), %ecx addl $1, %ecx movslq %ecx, %rcx ucomiss (%rax,%rcx,4), %xmm0 jbe LBB0_10 ## %bb.9: ## in Loop: Header=BB0_7 Depth=2 movq -32(%rbp), %rax movslq -40(%rbp), %rcx movss (%rax,%rcx,4), %xmm0 ## xmm0 = mem[0],zero,zero,zero movss %xmm0, -48(%rbp) movq -32(%rbp), %rax movl -40(%rbp), %ecx addl $1, %ecx movslq %ecx, %rcx movss (%rax,%rcx,4), %xmm0 ## xmm0 = mem[0],zero,zero,zero movq -32(%rbp), %rax movslq -40(%rbp), %rcx movss %xmm0, (%rax,%rcx,4) movss -48(%rbp), %xmm0 ## xmm0 = mem[0],zero,zero,zero movq -32(%rbp), %rax movl -40(%rbp), %ecx addl $1, %ecx movslq %ecx, %rcx movss %xmm0, (%rax,%rcx,4) LBB0_10: ## in Loop: Header=BB0_7 Depth=2 jmp LBB0_11 LBB0_11: ## in Loop: Header=BB0_7 Depth=2 movl -40(%rbp), %eax addl $1, %eax movl %eax, -40(%rbp) jmp LBB0_7 LBB0_12: ## in Loop: Header=BB0_5 Depth=1 jmp LBB0_13 LBB0_13: ## in Loop: Header=BB0_5 Depth=1 movl -36(%rbp), %eax addl $1, %eax movl %eax, -36(%rbp) jmp LBB0_5 LBB0_14: movl $0, -36(%rbp) LBB0_15: ## =>This Inner Loop Header: Depth=1 movl -36(%rbp), %eax cmpl -12(%rbp), %eax jge LBB0_21 ## %bb.16: ## in Loop: Header=BB0_15 Depth=1 movl -36(%rbp), %eax movl $2, %ecx cltd idivl %ecx cmpl $0, %edx jne LBB0_18 ## %bb.17: ## in Loop: Header=BB0_15 Depth=1 movq -32(%rbp), %rax movq %rax, -56(%rbp) ## 8-byte Spill movl -36(%rbp), %eax movl $2, %ecx cltd idivl %ecx movl %eax, %ecx movq -56(%rbp), %rax ## 8-byte Reload movslq %ecx, %rcx movss (%rax,%rcx,4), %xmm0 ## xmm0 = mem[0],zero,zero,zero movq -24(%rbp), %rax movslq -36(%rbp), %rcx movss %xmm0, (%rax,%rcx,4) jmp LBB0_19 LBB0_18: ## in Loop: Header=BB0_15 Depth=1 movq -8(%rbp), %rax movslq -36(%rbp), %rcx movss (%rax,%rcx,4), %xmm0 ## xmm0 = mem[0],zero,zero,zero movq -24(%rbp), %rax movslq -36(%rbp), %rcx movss %xmm0, (%rax,%rcx,4) LBB0_19: ## in Loop: Header=BB0_15 Depth=1 jmp LBB0_20 LBB0_20: ## in Loop: Header=BB0_15 Depth=1 movl -36(%rbp), %eax addl $1, %eax movl %eax, -36(%rbp) jmp LBB0_15 LBB0_21: movq -32(%rbp), %rdi callq _free addq $64, %rsp popq %rbp retq .cfi_endproc ## -- End function .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #64 .cfi_def_cfa_offset 64 stp x29, x30, [sp, #48] ; 16-byte Folded Spill add x29, sp, #48 .cfi_def_cfa w29, 16 .cfi_offset w30, -8 .cfi_offset w29, -16 stur x0, [x29, #-8] stur w1, [x29, #-12] str x2, [sp, #24] ldur w8, [x29, #-12] mov w9, #2 sdiv w8, w8, w9 add w9, w8, #1 ; implicit-def: $x8 mov x8, x9 sxtw x8, w8 lsl x0, x8, #2 bl _malloc str x0, [sp, #16] str wzr, [sp, #4] str wzr, [sp, #12] b LBB0_1 LBB0_1: ; =>This Inner Loop Header: Depth=1 ldr w8, [sp, #12] ldur w9, [x29, #-12] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_4 b LBB0_2 LBB0_2: ; in Loop: Header=BB0_1 Depth=1 ldur x8, [x29, #-8] ldrsw x9, [sp, #12] ldr s0, [x8, x9, lsl #2] ldr x8, [sp, #16] ldrsw x9, [sp, #4] mov x10, x9 add w10, w10, #1 str w10, [sp, #4] str s0, [x8, x9, lsl #2] b LBB0_3 LBB0_3: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #12] add w8, w8, #2 str w8, [sp, #12] b LBB0_1 LBB0_4: str wzr, [sp, #12] b LBB0_5 LBB0_5: ; =>This Loop Header: Depth=1 ; Child Loop BB0_7 Depth 2 ldr w8, [sp, #12] ldr w9, [sp, #4] subs w9, w9, #1 subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_14 b LBB0_6 LBB0_6: ; in Loop: Header=BB0_5 Depth=1 str wzr, [sp, #8] b LBB0_7 LBB0_7: ; Parent Loop BB0_5 Depth=1 ; => This Inner Loop Header: Depth=2 ldr w8, [sp, #8] ldr w9, [sp, #4] ldr w10, [sp, #12] subs w9, w9, w10 subs w9, w9, #1 subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_12 b LBB0_8 LBB0_8: ; in Loop: Header=BB0_7 Depth=2 ldr x8, [sp, #16] ldrsw x9, [sp, #8] ldr s0, [x8, x9, lsl #2] ldr x8, [sp, #16] ldr w9, [sp, #8] add w9, w9, #1 ldr s1, [x8, w9, sxtw #2] fcmp s0, s1 cset w8, le tbnz w8, #0, LBB0_10 b LBB0_9 LBB0_9: ; in Loop: Header=BB0_7 Depth=2 ldr x8, [sp, #16] ldrsw x9, [sp, #8] ldr s0, [x8, x9, lsl #2] str s0, [sp] ldr x8, [sp, #16] ldr w9, [sp, #8] add w9, w9, #1 ldr s0, [x8, w9, sxtw #2] ldr x8, [sp, #16] ldrsw x9, [sp, #8] str s0, [x8, x9, lsl #2] ldr s0, [sp] ldr x8, [sp, #16] ldr w9, [sp, #8] add w9, w9, #1 str s0, [x8, w9, sxtw #2] b LBB0_10 LBB0_10: ; in Loop: Header=BB0_7 Depth=2 b LBB0_11 LBB0_11: ; in Loop: Header=BB0_7 Depth=2 ldr w8, [sp, #8] add w8, w8, #1 str w8, [sp, #8] b LBB0_7 LBB0_12: ; in Loop: Header=BB0_5 Depth=1 b LBB0_13 LBB0_13: ; in Loop: Header=BB0_5 Depth=1 ldr w8, [sp, #12] add w8, w8, #1 str w8, [sp, #12] b LBB0_5 LBB0_14: str wzr, [sp, #12] b LBB0_15 LBB0_15: ; =>This Inner Loop Header: Depth=1 ldr w8, [sp, #12] ldur w9, [x29, #-12] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_21 b LBB0_16 LBB0_16: ; in Loop: Header=BB0_15 Depth=1 ldr w8, [sp, #12] mov w10, #2 sdiv w9, w8, w10 mul w9, w9, w10 subs w8, w8, w9 subs w8, w8, #0 cset w8, ne tbnz w8, #0, LBB0_18 b LBB0_17 LBB0_17: ; in Loop: Header=BB0_15 Depth=1 ldr x8, [sp, #16] ldr w9, [sp, #12] mov w10, #2 sdiv w9, w9, w10 ldr s0, [x8, w9, sxtw #2] ldr x8, [sp, #24] ldrsw x9, [sp, #12] str s0, [x8, x9, lsl #2] b LBB0_19 LBB0_18: ; in Loop: Header=BB0_15 Depth=1 ldur x8, [x29, #-8] ldrsw x9, [sp, #12] ldr s0, [x8, x9, lsl #2] ldr x8, [sp, #24] ldrsw x9, [sp, #12] str s0, [x8, x9, lsl #2] b LBB0_19 LBB0_19: ; in Loop: Header=BB0_15 Depth=1 b LBB0_20 LBB0_20: ; in Loop: Header=BB0_15 Depth=1 ldr w8, [sp, #12] add w8, w8, #1 str w8, [sp, #12] b LBB0_15 LBB0_21: ldr x0, [sp, #16] bl _free ldp x29, x30, [sp, #48] ; 16-byte Folded Reload add sp, sp, #64 ret .cfi_endproc ; -- End function .subsections_via_symbols
eval/problem38/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ## -- Begin function func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp subq $48, %rsp movq %rdi, -8(%rbp) movl %esi, -12(%rbp) movq -8(%rbp), %rdi callq _strlen ## kill: def $eax killed $eax killed $rax movl %eax, -16(%rbp) movl -16(%rbp), %eax addl $2, %eax movl $3, %ecx cltd idivl %ecx movl %eax, -20(%rbp) movl $0, -28(%rbp) LBB0_1: ## =>This Inner Loop Header: Depth=1 movl -28(%rbp), %eax cmpl -20(%rbp), %eax jge LBB0_12 ## %bb.2: ## in Loop: Header=BB0_1 Depth=1 imull $3, -28(%rbp), %eax addl $3, %eax cmpl -16(%rbp), %eax jg LBB0_4 ## %bb.3: ## in Loop: Header=BB0_1 Depth=1 movl $3, %eax movl %eax, -40(%rbp) ## 4-byte Spill jmp LBB0_5 LBB0_4: ## in Loop: Header=BB0_1 Depth=1 movl -16(%rbp), %eax imull $3, -28(%rbp), %ecx subl %ecx, %eax movl %eax, -40(%rbp) ## 4-byte Spill LBB0_5: ## in Loop: Header=BB0_1 Depth=1 movl -40(%rbp), %eax ## 4-byte Reload movl %eax, -32(%rbp) leaq -24(%rbp), %rdi movq -8(%rbp), %rsi imull $3, -28(%rbp), %eax cltq addq %rax, %rsi movslq -32(%rbp), %rdx movl $4, %ecx callq ___strncpy_chk movslq -32(%rbp), %rax movb $0, -24(%rbp,%rax) cmpl $3, -32(%rbp) jne LBB0_10 ## %bb.6: ## in Loop: Header=BB0_1 Depth=1 cmpl $0, -12(%rbp) je LBB0_8 ## %bb.7: ## in Loop: Header=BB0_1 Depth=1 movb -22(%rbp), %al movb %al, -33(%rbp) movb -23(%rbp), %al movb %al, -22(%rbp) movb -24(%rbp), %al movb %al, -23(%rbp) movb -33(%rbp), %al movb %al, -24(%rbp) jmp LBB0_9 LBB0_8: ## in Loop: Header=BB0_1 Depth=1 movb -24(%rbp), %al movb %al, -34(%rbp) movb -23(%rbp), %al movb %al, -24(%rbp) movb -22(%rbp), %al movb %al, -23(%rbp) movb -34(%rbp), %al movb %al, -22(%rbp) LBB0_9: ## in Loop: Header=BB0_1 Depth=1 jmp LBB0_10 LBB0_10: ## in Loop: Header=BB0_1 Depth=1 movq -8(%rbp), %rdi imull $3, -28(%rbp), %eax cltq addq %rax, %rdi leaq -24(%rbp), %rsi movslq -32(%rbp), %rdx movq $-1, %rcx callq ___strncpy_chk ## %bb.11: ## in Loop: Header=BB0_1 Depth=1 movl -28(%rbp), %eax addl $1, %eax movl %eax, -28(%rbp) jmp LBB0_1 LBB0_12: addq $48, %rsp popq %rbp retq .cfi_endproc ## -- End function .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #64 .cfi_def_cfa_offset 64 stp x29, x30, [sp, #48] ; 16-byte Folded Spill add x29, sp, #48 .cfi_def_cfa w29, 16 .cfi_offset w30, -8 .cfi_offset w29, -16 stur x0, [x29, #-8] stur w1, [x29, #-12] ldur x0, [x29, #-8] bl _strlen mov x8, x0 stur w8, [x29, #-16] ldur w8, [x29, #-16] add w8, w8, #2 mov w9, #3 sdiv w8, w8, w9 stur w8, [x29, #-20] str wzr, [sp, #20] b LBB0_1 LBB0_1: ; =>This Inner Loop Header: Depth=1 ldr w8, [sp, #20] ldur w9, [x29, #-20] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_12 b LBB0_2 LBB0_2: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #20] mov w9, #3 mul w8, w8, w9 add w8, w8, #3 ldur w9, [x29, #-16] subs w8, w8, w9 cset w8, gt tbnz w8, #0, LBB0_4 b LBB0_3 LBB0_3: ; in Loop: Header=BB0_1 Depth=1 mov w8, #3 str w8, [sp, #8] ; 4-byte Folded Spill b LBB0_5 LBB0_4: ; in Loop: Header=BB0_1 Depth=1 ldur w8, [x29, #-16] ldr w9, [sp, #20] mov w10, #3 mul w9, w9, w10 subs w8, w8, w9 str w8, [sp, #8] ; 4-byte Folded Spill b LBB0_5 LBB0_5: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #8] ; 4-byte Folded Reload str w8, [sp, #16] ldur x8, [x29, #-8] ldr w9, [sp, #20] mov w10, #3 mul w9, w9, w10 add x1, x8, w9, sxtw ldrsw x2, [sp, #16] add x0, sp, #24 str x0, [sp] ; 8-byte Folded Spill mov x3, #4 bl ___strncpy_chk ldr x8, [sp] ; 8-byte Folded Reload ldrsw x9, [sp, #16] add x8, x8, x9 strb wzr, [x8] ldr w8, [sp, #16] subs w8, w8, #3 cset w8, ne tbnz w8, #0, LBB0_10 b LBB0_6 LBB0_6: ; in Loop: Header=BB0_1 Depth=1 ldur w8, [x29, #-12] subs w8, w8, #0 cset w8, eq tbnz w8, #0, LBB0_8 b LBB0_7 LBB0_7: ; in Loop: Header=BB0_1 Depth=1 ldrb w8, [sp, #26] strb w8, [sp, #15] ldrb w8, [sp, #25] strb w8, [sp, #26] ldrb w8, [sp, #24] strb w8, [sp, #25] ldrb w8, [sp, #15] strb w8, [sp, #24] b LBB0_9 LBB0_8: ; in Loop: Header=BB0_1 Depth=1 ldrb w8, [sp, #24] strb w8, [sp, #14] ldrb w8, [sp, #25] strb w8, [sp, #24] ldrb w8, [sp, #26] strb w8, [sp, #25] ldrb w8, [sp, #14] strb w8, [sp, #26] b LBB0_9 LBB0_9: ; in Loop: Header=BB0_1 Depth=1 b LBB0_10 LBB0_10: ; in Loop: Header=BB0_1 Depth=1 ldur x8, [x29, #-8] ldr w9, [sp, #20] mov w10, #3 mul w9, w9, w10 add x0, x8, w9, sxtw ldrsw x2, [sp, #16] add x1, sp, #24 mov x3, #-1 bl ___strncpy_chk b LBB0_11 LBB0_11: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #20] add w8, w8, #1 str w8, [sp, #20] b LBB0_1 LBB0_12: ldp x29, x30, [sp, #48] ; 16-byte Folded Reload add sp, sp, #64 ret .cfi_endproc ; -- End function .subsections_via_symbols
eval/problem39/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ## -- Begin function func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp movq %rdi, -16(%rbp) movl %esi, -20(%rbp) movl $0, -24(%rbp) movl $0, -28(%rbp) LBB0_1: ## =>This Inner Loop Header: Depth=1 movl -28(%rbp), %eax cmpl -20(%rbp), %eax jge LBB0_6 ## %bb.2: ## in Loop: Header=BB0_1 Depth=1 movq -16(%rbp), %rax movslq -28(%rbp), %rcx movl (%rax,%rcx,4), %eax addl -24(%rbp), %eax movl %eax, -24(%rbp) cmpl $0, -24(%rbp) jge LBB0_4 ## %bb.3: movl $1, -4(%rbp) jmp LBB0_7 LBB0_4: ## in Loop: Header=BB0_1 Depth=1 jmp LBB0_5 LBB0_5: ## in Loop: Header=BB0_1 Depth=1 movl -28(%rbp), %eax addl $1, %eax movl %eax, -28(%rbp) jmp LBB0_1 LBB0_6: movl $0, -4(%rbp) LBB0_7: movl -4(%rbp), %eax popq %rbp retq .cfi_endproc ## -- End function .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #32 .cfi_def_cfa_offset 32 str x0, [sp, #16] str w1, [sp, #12] str wzr, [sp, #8] str wzr, [sp, #4] b LBB0_1 LBB0_1: ; =>This Inner Loop Header: Depth=1 ldr w8, [sp, #4] ldr w9, [sp, #12] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_6 b LBB0_2 LBB0_2: ; in Loop: Header=BB0_1 Depth=1 ldr x8, [sp, #16] ldrsw x9, [sp, #4] ldr w9, [x8, x9, lsl #2] ldr w8, [sp, #8] add w8, w8, w9 str w8, [sp, #8] ldr w8, [sp, #8] subs w8, w8, #0 cset w8, ge tbnz w8, #0, LBB0_4 b LBB0_3 LBB0_3: mov w8, #1 str w8, [sp, #28] b LBB0_7 LBB0_4: ; in Loop: Header=BB0_1 Depth=1 b LBB0_5 LBB0_5: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #4] add w8, w8, #1 str w8, [sp, #4] b LBB0_1 LBB0_6: str wzr, [sp, #28] b LBB0_7 LBB0_7: ldr w0, [sp, #28] add sp, sp, #32 ret .cfi_endproc ; -- End function .subsections_via_symbols
eval/problem4/code.c
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ## -- Begin function func0 .p2align 4, 0x90 _func0: ## @func0 .cfi_startproc ## %bb.0: pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset %rbp, -16 movq %rsp, %rbp .cfi_def_cfa_register %rbp movl %edi, -8(%rbp) movl $1, -12(%rbp) movl $2, -16(%rbp) movl $0, -24(%rbp) LBB0_1: ## =>This Loop Header: Depth=1 ## Child Loop BB0_3 Depth 2 movl -24(%rbp), %eax cmpl -8(%rbp), %eax jge LBB0_13 ## %bb.2: ## in Loop: Header=BB0_1 Depth=1 movl -12(%rbp), %eax addl -16(%rbp), %eax movl %eax, -12(%rbp) movl -12(%rbp), %eax movl %eax, -20(%rbp) movl -16(%rbp), %eax movl %eax, -12(%rbp) movl -20(%rbp), %eax movl %eax, -16(%rbp) movl $1, -28(%rbp) movl $2, -32(%rbp) LBB0_3: ## Parent Loop BB0_1 Depth=1 ## => This Inner Loop Header: Depth=2 movl -32(%rbp), %eax imull -32(%rbp), %eax cmpl -12(%rbp), %eax jg LBB0_8 ## %bb.4: ## in Loop: Header=BB0_3 Depth=2 movl -12(%rbp), %eax cltd idivl -32(%rbp) cmpl $0, %edx jne LBB0_6 ## %bb.5: ## in Loop: Header=BB0_1 Depth=1 movl $0, -28(%rbp) jmp LBB0_8 LBB0_6: ## in Loop: Header=BB0_3 Depth=2 jmp LBB0_7 LBB0_7: ## in Loop: Header=BB0_3 Depth=2 movl -32(%rbp), %eax addl $1, %eax movl %eax, -32(%rbp) jmp LBB0_3 LBB0_8: ## in Loop: Header=BB0_1 Depth=1 cmpl $0, -28(%rbp) je LBB0_10 ## %bb.9: ## in Loop: Header=BB0_1 Depth=1 movl -24(%rbp), %eax addl $1, %eax movl %eax, -24(%rbp) LBB0_10: ## in Loop: Header=BB0_1 Depth=1 movl -24(%rbp), %eax cmpl -8(%rbp), %eax jne LBB0_12 ## %bb.11: movl -12(%rbp), %eax movl %eax, -4(%rbp) jmp LBB0_14 LBB0_12: ## in Loop: Header=BB0_1 Depth=1 jmp LBB0_1 LBB0_13: movl $0, -4(%rbp) LBB0_14: movl -4(%rbp), %eax popq %rbp retq .cfi_endproc ## -- End function .subsections_via_symbols
.section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 sdk_version 13, 3 .globl _func0 ; -- Begin function func0 .p2align 2 _func0: ; @func0 .cfi_startproc ; %bb.0: sub sp, sp, #32 .cfi_def_cfa_offset 32 str w0, [sp, #24] mov w8, #1 str w8, [sp, #20] mov w8, #2 str w8, [sp, #16] str wzr, [sp, #8] b LBB0_1 LBB0_1: ; =>This Loop Header: Depth=1 ; Child Loop BB0_3 Depth 2 ldr w8, [sp, #8] ldr w9, [sp, #24] subs w8, w8, w9 cset w8, ge tbnz w8, #0, LBB0_13 b LBB0_2 LBB0_2: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #20] ldr w9, [sp, #16] add w8, w8, w9 str w8, [sp, #20] ldr w8, [sp, #20] str w8, [sp, #12] ldr w8, [sp, #16] str w8, [sp, #20] ldr w8, [sp, #12] str w8, [sp, #16] mov w8, #1 str w8, [sp, #4] mov w8, #2 str w8, [sp] b LBB0_3 LBB0_3: ; Parent Loop BB0_1 Depth=1 ; => This Inner Loop Header: Depth=2 ldr w8, [sp] ldr w9, [sp] mul w8, w8, w9 ldr w9, [sp, #20] subs w8, w8, w9 cset w8, gt tbnz w8, #0, LBB0_8 b LBB0_4 LBB0_4: ; in Loop: Header=BB0_3 Depth=2 ldr w8, [sp, #20] ldr w10, [sp] sdiv w9, w8, w10 mul w9, w9, w10 subs w8, w8, w9 subs w8, w8, #0 cset w8, ne tbnz w8, #0, LBB0_6 b LBB0_5 LBB0_5: ; in Loop: Header=BB0_1 Depth=1 str wzr, [sp, #4] b LBB0_8 LBB0_6: ; in Loop: Header=BB0_3 Depth=2 b LBB0_7 LBB0_7: ; in Loop: Header=BB0_3 Depth=2 ldr w8, [sp] add w8, w8, #1 str w8, [sp] b LBB0_3 LBB0_8: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #4] subs w8, w8, #0 cset w8, eq tbnz w8, #0, LBB0_10 b LBB0_9 LBB0_9: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #8] add w8, w8, #1 str w8, [sp, #8] b LBB0_10 LBB0_10: ; in Loop: Header=BB0_1 Depth=1 ldr w8, [sp, #8] ldr w9, [sp, #24] subs w8, w8, w9 cset w8, ne tbnz w8, #0, LBB0_12 b LBB0_11 LBB0_11: ldr w8, [sp, #20] str w8, [sp, #28] b LBB0_14 LBB0_12: ; in Loop: Header=BB0_1 Depth=1 b LBB0_1 LBB0_13: str wzr, [sp, #28] b LBB0_14 LBB0_14: ldr w0, [sp, #28] add sp, sp, #32 ret .cfi_endproc ; -- End function .subsections_via_symbols
eval/problem40/code.c