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
.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)
LBB0_1: ## =>This Loop Header: Depth=1
## Child Loop BB0_3 Depth 2
## Child Loop BB0_5 Depth 3
movl -24(%rbp), %eax
cmpl -20(%rbp), %eax
jge LBB0_14
## %bb.2: ## in Loop: Header=BB0_1 Depth=1
movl -24(%rbp), %eax
addl $1, %eax
movl %eax, -28(%rbp)
LBB0_3: ## Parent Loop BB0_1 Depth=1
## => This Loop Header: Depth=2
## Child Loop BB0_5 Depth 3
movl -28(%rbp), %eax
cmpl -20(%rbp), %eax
jge LBB0_12
## %bb.4: ## in Loop: Header=BB0_3 Depth=2
movl -28(%rbp), %eax
addl $1, %eax
movl %eax, -32(%rbp)
LBB0_5: ## Parent Loop BB0_1 Depth=1
## Parent Loop BB0_3 Depth=2
## => This Inner Loop Header: Depth=3
movl -32(%rbp), %eax
cmpl -20(%rbp), %eax
jge LBB0_10
## %bb.6: ## in Loop: Header=BB0_5 Depth=3
movq -16(%rbp), %rax
movslq -24(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movq -16(%rbp), %rcx
movslq -28(%rbp), %rdx
addl (%rcx,%rdx,4), %eax
movq -16(%rbp), %rcx
movslq -32(%rbp), %rdx
addl (%rcx,%rdx,4), %eax
cmpl $0, %eax
jne LBB0_8
## %bb.7:
movb $1, -1(%rbp)
jmp LBB0_15
LBB0_8: ## in Loop: Header=BB0_5 Depth=3
jmp LBB0_9
LBB0_9: ## in Loop: Header=BB0_5 Depth=3
movl -32(%rbp), %eax
addl $1, %eax
movl %eax, -32(%rbp)
jmp LBB0_5
LBB0_10: ## in Loop: Header=BB0_3 Depth=2
jmp LBB0_11
LBB0_11: ## in Loop: Header=BB0_3 Depth=2
movl -28(%rbp), %eax
addl $1, %eax
movl %eax, -28(%rbp)
jmp LBB0_3
LBB0_12: ## in Loop: Header=BB0_1 Depth=1
jmp LBB0_13
LBB0_13: ## in Loop: Header=BB0_1 Depth=1
movl -24(%rbp), %eax
addl $1, %eax
movl %eax, -24(%rbp)
jmp LBB0_1
LBB0_14:
movb $0, -1(%rbp)
LBB0_15:
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]
b LBB0_1
LBB0_1: ; =>This Loop Header: Depth=1
; Child Loop BB0_3 Depth 2
; Child Loop BB0_5 Depth 3
ldr w8, [sp, #8]
ldr w9, [sp, #12]
subs w8, w8, w9
cset w8, ge
tbnz w8, #0, LBB0_14
b LBB0_2
LBB0_2: ; in Loop: Header=BB0_1 Depth=1
ldr w8, [sp, #8]
add w8, w8, #1
str w8, [sp, #4]
b LBB0_3
LBB0_3: ; Parent Loop BB0_1 Depth=1
; => This Loop Header: Depth=2
; Child Loop BB0_5 Depth 3
ldr w8, [sp, #4]
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=2
ldr w8, [sp, #4]
add w8, w8, #1
str w8, [sp]
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]
ldr w9, [sp, #12]
subs w8, w8, w9
cset w8, ge
tbnz w8, #0, LBB0_10
b LBB0_6
LBB0_6: ; in Loop: Header=BB0_5 Depth=3
ldr x8, [sp, #16]
ldrsw x9, [sp, #8]
ldr w8, [x8, x9, lsl #2]
ldr x9, [sp, #16]
ldrsw x10, [sp, #4]
ldr w9, [x9, x10, lsl #2]
add w8, w8, w9
ldr x9, [sp, #16]
ldrsw x10, [sp]
ldr w9, [x9, x10, lsl #2]
add w8, w8, w9
subs w8, w8, #0
cset w8, ne
tbnz w8, #0, LBB0_8
b LBB0_7
LBB0_7:
mov w8, #1
and w8, w8, #0x1
and w8, w8, #0x1
strb w8, [sp, #31]
b LBB0_15
LBB0_8: ; in Loop: Header=BB0_5 Depth=3
b LBB0_9
LBB0_9: ; in Loop: Header=BB0_5 Depth=3
ldr w8, [sp]
add w8, w8, #1
str w8, [sp]
b LBB0_5
LBB0_10: ; in Loop: Header=BB0_3 Depth=2
b LBB0_11
LBB0_11: ; in Loop: Header=BB0_3 Depth=2
ldr w8, [sp, #4]
add w8, w8, #1
str w8, [sp, #4]
b LBB0_3
LBB0_12: ; in Loop: Header=BB0_1 Depth=1
b LBB0_13
LBB0_13: ; in Loop: Header=BB0_1 Depth=1
ldr w8, [sp, #8]
add w8, w8, #1
str w8, [sp, #8]
b LBB0_1
LBB0_14:
mov w8, #0
and w8, w8, #0x1
and w8, w8, #0x1
strb w8, [sp, #31]
b LBB0_15
LBB0_15:
ldrb w8, [sp, #31]
and w0, w8, #0x1
add sp, sp, #32
ret
.cfi_endproc
; -- End function
.subsections_via_symbols
|
eval/problem41/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 -4(%rbp), %eax
imull -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]
ldr w8, [sp, #12]
ldr w9, [sp, #12]
mul w0, w8, w9
add sp, sp, #16
ret
.cfi_endproc
; -- End function
.subsections_via_symbols
|
eval/problem42/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)
LBB0_1: ## =>This Inner Loop Header: Depth=1
movl -16(%rbp), %eax
cmpl -12(%rbp), %eax
jge LBB0_4
## %bb.2: ## in Loop: Header=BB0_1 Depth=1
movq -8(%rbp), %rax
movslq -16(%rbp), %rcx
movl (%rax,%rcx,4), %edx
addl $1, %edx
movl %edx, (%rax,%rcx,4)
## %bb.3: ## in Loop: Header=BB0_1 Depth=1
movl -16(%rbp), %eax
addl $1, %eax
movl %eax, -16(%rbp)
jmp LBB0_1
LBB0_4:
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 w1, [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
ldr x8, [sp, #8]
ldrsw x9, [sp]
add x9, x8, x9, lsl #2
ldr w8, [x9]
add w8, w8, #1
str w8, [x9]
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:
add sp, sp, #16
ret
.cfi_endproc
; -- End function
.subsections_via_symbols
|
eval/problem43/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)
LBB0_1: ## =>This Loop Header: Depth=1
## Child Loop BB0_3 Depth 2
movl -24(%rbp), %eax
cmpl -20(%rbp), %eax
jge LBB0_10
## %bb.2: ## in Loop: Header=BB0_1 Depth=1
movl -24(%rbp), %eax
addl $1, %eax
movl %eax, -28(%rbp)
LBB0_3: ## Parent Loop BB0_1 Depth=1
## => This Inner Loop Header: Depth=2
movl -28(%rbp), %eax
cmpl -20(%rbp), %eax
jge LBB0_8
## %bb.4: ## in Loop: Header=BB0_3 Depth=2
movq -16(%rbp), %rax
movslq -24(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movq -16(%rbp), %rcx
movslq -28(%rbp), %rdx
addl (%rcx,%rdx,4), %eax
cmpl $0, %eax
jne LBB0_6
## %bb.5:
movb $1, -1(%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 -28(%rbp), %eax
addl $1, %eax
movl %eax, -28(%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 -24(%rbp), %eax
addl $1, %eax
movl %eax, -24(%rbp)
jmp LBB0_1
LBB0_10:
movb $0, -1(%rbp)
LBB0_11:
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]
b LBB0_1
LBB0_1: ; =>This Loop Header: Depth=1
; Child Loop BB0_3 Depth 2
ldr w8, [sp, #8]
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, #8]
add w8, w8, #1
str w8, [sp, #4]
b LBB0_3
LBB0_3: ; Parent Loop BB0_1 Depth=1
; => This Inner Loop Header: Depth=2
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=2
ldr x8, [sp, #16]
ldrsw x9, [sp, #8]
ldr w8, [x8, x9, lsl #2]
ldr x9, [sp, #16]
ldrsw x10, [sp, #4]
ldr w9, [x9, x10, lsl #2]
add w8, w8, w9
subs w8, w8, #0
cset w8, ne
tbnz w8, #0, LBB0_6
b LBB0_5
LBB0_5:
mov w8, #1
and w8, w8, #0x1
and w8, w8, #0x1
strb w8, [sp, #31]
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, #4]
add w8, w8, #1
str w8, [sp, #4]
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, #8]
add w8, w8, #1
str w8, [sp, #8]
b LBB0_1
LBB0_10:
mov w8, #0
and w8, w8, #0x1
and w8, w8, #0x1
strb w8, [sp, #31]
b LBB0_11
LBB0_11:
ldrb w8, [sp, #31]
and w0, w8, #0x1
add sp, sp, #32
ret
.cfi_endproc
; -- End function
.subsections_via_symbols
|
eval/problem44/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 ___stack_chk_guard@GOTPCREL(%rip), %rax
movq (%rax), %rax
movq %rax, -8(%rbp)
movl %edi, -52(%rbp)
movl %esi, -56(%rbp)
movq %rdx, -64(%rbp)
movl $0, -68(%rbp)
LBB0_1: ## =>This Inner Loop Header: Depth=1
cmpl $0, -52(%rbp)
jle LBB0_3
## %bb.2: ## in Loop: Header=BB0_1 Depth=1
movl -52(%rbp), %eax
cltd
idivl -56(%rbp)
addl $48, %edx
movb %dl, %cl
movl -68(%rbp), %eax
movl %eax, %edx
addl $1, %edx
movl %edx, -68(%rbp)
cltq
movb %cl, -48(%rbp,%rax)
movl -52(%rbp), %eax
cltd
idivl -56(%rbp)
movl %eax, -52(%rbp)
jmp LBB0_1
LBB0_3:
movl $0, -72(%rbp)
LBB0_4: ## =>This Inner Loop Header: Depth=1
cmpl $0, -68(%rbp)
jle LBB0_6
## %bb.5: ## in Loop: Header=BB0_4 Depth=1
movl -68(%rbp), %eax
addl $-1, %eax
movl %eax, -68(%rbp)
cltq
movb -48(%rbp,%rax), %dl
movq -64(%rbp), %rax
movl -72(%rbp), %ecx
movl %ecx, %esi
addl $1, %esi
movl %esi, -72(%rbp)
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
jmp LBB0_4
LBB0_6:
movq -64(%rbp), %rax
movslq -72(%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_8
## %bb.7:
addq $80, %rsp
popq %rbp
retq
LBB0_8:
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, #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
adrp x8, ___stack_chk_guard@GOTPAGE
ldr x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
ldr x8, [x8]
stur x8, [x29, #-8]
str w0, [sp, #32]
str w1, [sp, #28]
str x2, [sp, #16]
str wzr, [sp, #12]
b LBB0_1
LBB0_1: ; =>This Inner Loop Header: Depth=1
ldr w8, [sp, #32]
subs w8, w8, #0
cset w8, le
tbnz w8, #0, LBB0_3
b LBB0_2
LBB0_2: ; in Loop: Header=BB0_1 Depth=1
ldr w8, [sp, #32]
ldr w10, [sp, #28]
sdiv w9, w8, w10
mul w9, w9, w10
subs w8, w8, w9
add w8, w8, #48
ldrsw x10, [sp, #12]
mov x9, x10
add w9, w9, #1
str w9, [sp, #12]
add x9, sp, #39
strb w8, [x9, x10]
ldr w8, [sp, #32]
ldr w9, [sp, #28]
sdiv w8, w8, w9
str w8, [sp, #32]
b LBB0_1
LBB0_3:
str wzr, [sp, #8]
b LBB0_4
LBB0_4: ; =>This Inner Loop Header: Depth=1
ldr w8, [sp, #12]
subs w8, w8, #0
cset w8, le
tbnz w8, #0, LBB0_6
b LBB0_5
LBB0_5: ; in Loop: Header=BB0_4 Depth=1
ldr w8, [sp, #12]
subs w9, w8, #1
str w9, [sp, #12]
add x8, sp, #39
add x8, x8, w9, sxtw
ldrb w8, [x8]
ldr x9, [sp, #16]
ldrsw x10, [sp, #8]
mov x11, x10
add w11, w11, #1
str w11, [sp, #8]
add x9, x9, x10
strb w8, [x9]
b LBB0_4
LBB0_6:
ldr x8, [sp, #16]
ldrsw x9, [sp, #8]
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_8
b LBB0_7
LBB0_7:
bl ___stack_chk_fail
LBB0_8:
ldp x29, x30, [sp, #80] ; 16-byte Folded Reload
add sp, sp, #96
ret
.cfi_endproc
; -- End function
.subsections_via_symbols
|
eval/problem45/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
movss %xmm0, -4(%rbp)
movss %xmm1, -8(%rbp)
movss -4(%rbp), %xmm0 ## xmm0 = mem[0],zero,zero,zero
mulss -8(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movsd LCPI0_0(%rip), %xmm1 ## xmm1 = mem[0],zero
mulsd %xmm1, %xmm0
cvtsd2ss %xmm0, %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]
str s1, [sp, #8]
ldr s0, [sp, #12]
ldr s1, [sp, #8]
fmul s0, s0, s1
fcvt d0, s0
fmov d1, #0.50000000
fmul d0, d0, d1
fcvt s0, d0
add sp, sp, #16
ret
.cfi_endproc
; -- End function
.subsections_via_symbols
|
eval/problem46/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 $432, %rsp ## imm = 0x1B0
movq ___stack_chk_guard@GOTPCREL(%rip), %rax
movq (%rax), %rax
movq %rax, -8(%rbp)
movl %edi, -420(%rbp)
movl $0, -416(%rbp)
movl $0, -412(%rbp)
movl $2, -408(%rbp)
movl $0, -404(%rbp)
movl $4, -424(%rbp)
LBB0_1: ## =>This Inner Loop Header: Depth=1
movl -424(%rbp), %eax
cmpl -420(%rbp), %eax
jg LBB0_4
## %bb.2: ## in Loop: Header=BB0_1 Depth=1
movl -424(%rbp), %eax
subl $1, %eax
cltq
movl -416(%rbp,%rax,4), %ecx
movl -424(%rbp), %eax
subl $2, %eax
cltq
addl -416(%rbp,%rax,4), %ecx
movl -424(%rbp), %eax
subl $3, %eax
cltq
addl -416(%rbp,%rax,4), %ecx
movl -424(%rbp), %eax
subl $4, %eax
cltq
addl -416(%rbp,%rax,4), %ecx
movslq -424(%rbp), %rax
movl %ecx, -416(%rbp,%rax,4)
## %bb.3: ## in Loop: Header=BB0_1 Depth=1
movl -424(%rbp), %eax
addl $1, %eax
movl %eax, -424(%rbp)
jmp LBB0_1
LBB0_4:
movslq -420(%rbp), %rax
movl -416(%rbp,%rax,4), %eax
movl %eax, -428(%rbp) ## 4-byte Spill
movq ___stack_chk_guard@GOTPCREL(%rip), %rax
movq (%rax), %rax
movq -8(%rbp), %rcx
cmpq %rcx, %rax
jne LBB0_6
## %bb.5:
movl -428(%rbp), %eax ## 4-byte Reload
addq $432, %rsp ## imm = 0x1B0
popq %rbp
retq
LBB0_6:
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, #464
.cfi_def_cfa_offset 464
stp x28, x27, [sp, #432] ; 16-byte Folded Spill
stp x29, x30, [sp, #448] ; 16-byte Folded Spill
add x29, sp, #448
.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 w0, [sp, #20]
str wzr, [sp, #24]
str wzr, [sp, #28]
mov w8, #2
str w8, [sp, #32]
str wzr, [sp, #36]
mov w8, #4
str w8, [sp, #16]
b LBB0_1
LBB0_1: ; =>This Inner Loop Header: Depth=1
ldr w8, [sp, #16]
ldr w9, [sp, #20]
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 w8, [sp, #16]
subs w8, w8, #1
add x9, sp, #24
ldr w8, [x9, w8, sxtw #2]
ldr w10, [sp, #16]
subs w10, w10, #2
ldr w10, [x9, w10, sxtw #2]
add w8, w8, w10
ldr w10, [sp, #16]
subs w10, w10, #3
ldr w10, [x9, w10, sxtw #2]
add w8, w8, w10
ldr w10, [sp, #16]
subs w10, w10, #4
ldr w10, [x9, w10, sxtw #2]
add w8, w8, w10
ldrsw x10, [sp, #16]
str w8, [x9, x10, lsl #2]
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_1
LBB0_4:
ldrsw x9, [sp, #20]
add x8, sp, #24
ldr w8, [x8, x9, lsl #2]
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_6
b LBB0_5
LBB0_5:
bl ___stack_chk_fail
LBB0_6:
ldr w0, [sp, #12] ; 4-byte Folded Reload
ldp x29, x30, [sp, #448] ; 16-byte Folded Reload
ldp x28, x27, [sp, #432] ; 16-byte Folded Reload
add sp, sp, #464
ret
.cfi_endproc
; -- End function
.subsections_via_symbols
|
eval/problem47/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
movq %rdi, -16(%rbp)
movl %esi, -20(%rbp)
movl $0, -24(%rbp)
LBB0_1: ## =>This Loop Header: Depth=1
## Child Loop BB0_3 Depth 2
movl -24(%rbp), %eax
cmpl -20(%rbp), %eax
jge LBB0_10
## %bb.2: ## in Loop: Header=BB0_1 Depth=1
movl -24(%rbp), %eax
addl $1, %eax
movl %eax, -28(%rbp)
LBB0_3: ## Parent Loop BB0_1 Depth=1
## => This Inner Loop Header: Depth=2
movl -28(%rbp), %eax
cmpl -20(%rbp), %eax
jge LBB0_8
## %bb.4: ## in Loop: Header=BB0_3 Depth=2
movq -16(%rbp), %rax
movslq -24(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0 ## xmm0 = mem[0],zero,zero,zero
movq -16(%rbp), %rax
movslq -28(%rbp), %rcx
ucomiss (%rax,%rcx,4), %xmm0
jbe LBB0_6
## %bb.5: ## in Loop: Header=BB0_3 Depth=2
movq -16(%rbp), %rax
movslq -24(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0 ## xmm0 = mem[0],zero,zero,zero
movss %xmm0, -32(%rbp)
movq -16(%rbp), %rax
movslq -28(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0 ## xmm0 = mem[0],zero,zero,zero
movq -16(%rbp), %rax
movslq -24(%rbp), %rcx
movss %xmm0, (%rax,%rcx,4)
movss -32(%rbp), %xmm0 ## xmm0 = mem[0],zero,zero,zero
movq -16(%rbp), %rax
movslq -28(%rbp), %rcx
movss %xmm0, (%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 -28(%rbp), %eax
addl $1, %eax
movl %eax, -28(%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 -24(%rbp), %eax
addl $1, %eax
movl %eax, -24(%rbp)
jmp LBB0_1
LBB0_10:
movl -20(%rbp), %eax
movl $2, %ecx
cltd
idivl %ecx
cmpl $1, %edx
jne LBB0_12
## %bb.11:
movq -16(%rbp), %rax
movq %rax, -40(%rbp) ## 8-byte Spill
movl -20(%rbp), %eax
movl $2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movq -40(%rbp), %rax ## 8-byte Reload
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm0 ## xmm0 = mem[0],zero,zero,zero
movss %xmm0, -4(%rbp)
jmp LBB0_13
LBB0_12:
movq -16(%rbp), %rax
movq %rax, -56(%rbp) ## 8-byte Spill
movl -20(%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 -16(%rbp), %rax
movq %rax, -48(%rbp) ## 8-byte Spill
movl -20(%rbp), %eax
movl $2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movq -48(%rbp), %rax ## 8-byte Reload
subl $1, %ecx
movslq %ecx, %rcx
addss (%rax,%rcx,4), %xmm0
cvtss2sd %xmm0, %xmm1
movsd LCPI0_0(%rip), %xmm0 ## xmm0 = mem[0],zero
mulsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -4(%rbp)
LBB0_13:
movss -4(%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, #16]
str w1, [sp, #12]
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, #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, #8]
add w8, w8, #1
str w8, [sp, #4]
b LBB0_3
LBB0_3: ; Parent Loop BB0_1 Depth=1
; => This Inner Loop Header: Depth=2
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=2
ldr x8, [sp, #16]
ldrsw x9, [sp, #8]
ldr s0, [x8, x9, lsl #2]
ldr x8, [sp, #16]
ldrsw x9, [sp, #4]
ldr s1, [x8, x9, lsl #2]
fcmp s0, s1
cset w8, le
tbnz w8, #0, LBB0_6
b LBB0_5
LBB0_5: ; in Loop: Header=BB0_3 Depth=2
ldr x8, [sp, #16]
ldrsw x9, [sp, #8]
ldr s0, [x8, x9, lsl #2]
str s0, [sp]
ldr x8, [sp, #16]
ldrsw x9, [sp, #4]
ldr s0, [x8, x9, lsl #2]
ldr x8, [sp, #16]
ldrsw x9, [sp, #8]
str s0, [x8, x9, lsl #2]
ldr s0, [sp]
ldr x8, [sp, #16]
ldrsw x9, [sp, #4]
str s0, [x8, x9, lsl #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, #4]
add w8, w8, #1
str w8, [sp, #4]
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, #8]
add w8, w8, #1
str w8, [sp, #8]
b LBB0_1
LBB0_10:
ldr w8, [sp, #12]
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_12
b LBB0_11
LBB0_11:
ldr x8, [sp, #16]
ldr w9, [sp, #12]
mov w10, #2
sdiv w9, w9, w10
ldr s0, [x8, w9, sxtw #2]
str s0, [sp, #28]
b LBB0_13
LBB0_12:
ldr x8, [sp, #16]
ldr w9, [sp, #12]
mov w10, #2
sdiv w9, w9, w10
ldr s0, [x8, w9, sxtw #2]
ldr x8, [sp, #16]
ldr w9, [sp, #12]
sdiv w9, w9, w10
subs w9, w9, #1
ldr s1, [x8, w9, sxtw #2]
fadd s0, s0, s1
fcvt d1, s0
fmov d0, #0.50000000
fmul d0, d0, d1
fcvt s0, d0
str s0, [sp, #28]
b LBB0_13
LBB0_13:
ldr s0, [sp, #28]
add sp, sp, #32
ret
.cfi_endproc
; -- End function
.subsections_via_symbols
|
eval/problem48/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)
movl $0, -24(%rbp)
LBB0_1: ## =>This Inner Loop Header: Depth=1
movl -24(%rbp), %eax
movl %eax, -28(%rbp) ## 4-byte Spill
movl -20(%rbp), %eax
movl $2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -28(%rbp), %eax ## 4-byte Reload
cmpl %ecx, %eax
jge LBB0_6
## %bb.2: ## in Loop: Header=BB0_1 Depth=1
movq -16(%rbp), %rax
movslq -24(%rbp), %rcx
movsbl (%rax,%rcx), %eax
movq -16(%rbp), %rcx
movl -20(%rbp), %edx
subl $1, %edx
subl -24(%rbp), %edx
movslq %edx, %rdx
movsbl (%rcx,%rdx), %ecx
cmpl %ecx, %eax
je LBB0_4
## %bb.3:
movb $0, -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 -24(%rbp), %eax
addl $1, %eax
movl %eax, -24(%rbp)
jmp LBB0_1
LBB0_6:
movb $1, -1(%rbp)
LBB0_7:
movb -1(%rbp), %al
andb $1, %al
movzbl %al, %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]
str wzr, [sp, #8]
b LBB0_1
LBB0_1: ; =>This Inner Loop Header: Depth=1
ldr w8, [sp, #8]
ldr w9, [sp, #12]
mov w10, #2
sdiv w9, w9, w10
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, #8]
ldrsb w8, [x8, x9]
ldr x9, [sp, #16]
ldr w10, [sp, #12]
subs w10, w10, #1
ldr w11, [sp, #8]
subs w10, w10, w11
ldrsb w9, [x9, w10, sxtw]
subs w8, w8, w9
cset w8, eq
tbnz w8, #0, LBB0_4
b LBB0_3
LBB0_3:
mov w8, #0
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, #8]
add w8, w8, #1
str w8, [sp, #8]
b LBB0_1
LBB0_6:
mov w8, #1
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, #32] ; 16-byte Folded Reload
add sp, sp, #48
ret
.cfi_endproc
; -- End function
.subsections_via_symbols
|
eval/problem49/code.c
|
.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, -8(%rbp)
movl %esi, -12(%rbp)
xorps %xmm0, %xmm0
movss %xmm0, -16(%rbp)
movl $0, -32(%rbp)
movl $0, -32(%rbp)
LBB0_1: ## =>This Inner Loop Header: Depth=1
movl -32(%rbp), %eax
cmpl -12(%rbp), %eax
jge LBB0_4
## %bb.2: ## in Loop: Header=BB0_1 Depth=1
movq -8(%rbp), %rax
movslq -32(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0 ## xmm0 = mem[0],zero,zero,zero
addss -16(%rbp), %xmm0
movss %xmm0, -16(%rbp)
## %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:
movss -16(%rbp), %xmm0 ## xmm0 = mem[0],zero,zero,zero
cvtsi2ssl -12(%rbp), %xmm1
divss %xmm1, %xmm0
movss %xmm0, -20(%rbp)
xorps %xmm0, %xmm0
movss %xmm0, -24(%rbp)
movl $0, -32(%rbp)
LBB0_5: ## =>This Inner Loop Header: Depth=1
movl -32(%rbp), %eax
cmpl -12(%rbp), %eax
jge LBB0_8
## %bb.6: ## in Loop: Header=BB0_5 Depth=1
movq -8(%rbp), %rax
movslq -32(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0 ## xmm0 = mem[0],zero,zero,zero
subss -20(%rbp), %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
addsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -24(%rbp)
## %bb.7: ## in Loop: Header=BB0_5 Depth=1
movl -32(%rbp), %eax
addl $1, %eax
movl %eax, -32(%rbp)
jmp LBB0_5
LBB0_8:
movss -24(%rbp), %xmm0 ## xmm0 = mem[0],zero,zero,zero
cvtsi2ssl -12(%rbp), %xmm1
divss %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, #32
.cfi_def_cfa_offset 32
str x0, [sp, #24]
str w1, [sp, #20]
movi d0, #0000000000000000
str s0, [sp, #16]
str wzr, [sp]
str wzr, [sp]
b LBB0_1
LBB0_1: ; =>This Inner Loop Header: Depth=1
ldr w8, [sp]
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]
ldr s1, [x8, x9, lsl #2]
ldr s0, [sp, #16]
fadd s0, s0, s1
str s0, [sp, #16]
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:
ldr s0, [sp, #16]
ldr s1, [sp, #20]
scvtf s1, s1
fdiv s0, s0, s1
str s0, [sp, #12]
movi d0, #0000000000000000
str s0, [sp, #8]
str wzr, [sp]
b LBB0_5
LBB0_5: ; =>This Inner Loop Header: Depth=1
ldr w8, [sp]
ldr w9, [sp, #20]
subs w8, w8, w9
cset w8, ge
tbnz w8, #0, LBB0_8
b LBB0_6
LBB0_6: ; in Loop: Header=BB0_5 Depth=1
ldr x8, [sp, #24]
ldrsw x9, [sp]
ldr s0, [x8, x9, lsl #2]
ldr s1, [sp, #12]
fsub s0, s0, s1
fcvt d0, s0
fabs d1, d0
ldr s0, [sp, #8]
fcvt d0, s0
fadd d0, d0, d1
fcvt s0, d0
str s0, [sp, #8]
b LBB0_7
LBB0_7: ; in Loop: Header=BB0_5 Depth=1
ldr w8, [sp]
add w8, w8, #1
str w8, [sp]
b LBB0_5
LBB0_8:
ldr s0, [sp, #8]
ldr s1, [sp, #20]
scvtf s1, s1
fdiv s0, s0, s1
add sp, sp, #32
ret
.cfi_endproc
; -- End function
.subsections_via_symbols
|
eval/problem5/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 $1, -12(%rbp)
movl $0, -16(%rbp)
LBB0_1: ## =>This Inner Loop Header: Depth=1
movl -16(%rbp), %eax
cmpl -4(%rbp), %eax
jge LBB0_4
## %bb.2: ## in Loop: Header=BB0_1 Depth=1
movl -12(%rbp), %eax
shll $1, %eax
cltd
idivl -8(%rbp)
movl %edx, -12(%rbp)
## %bb.3: ## in Loop: Header=BB0_1 Depth=1
movl -16(%rbp), %eax
addl $1, %eax
movl %eax, -16(%rbp)
jmp LBB0_1
LBB0_4:
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 w0, [sp, #12]
str w1, [sp, #8]
mov w8, #1
str w8, [sp, #4]
str wzr, [sp]
b LBB0_1
LBB0_1: ; =>This Inner Loop Header: Depth=1
ldr w8, [sp]
ldr w9, [sp, #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
ldr w8, [sp, #4]
lsl w8, w8, #1
ldr w10, [sp, #8]
sdiv w9, w8, w10
mul w9, w9, w10
subs w8, w8, w9
str w8, [sp, #4]
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:
ldr w0, [sp, #4]
add sp, sp, #16
ret
.cfi_endproc
; -- End function
.subsections_via_symbols
|
eval/problem50/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)
movl -12(%rbp), %edx
movl $21, %eax
movl $5, %ecx
cmpl $0, %edx
cmovnel %ecx, %eax
movl %eax, -16(%rbp)
movq -8(%rbp), %rdi
callq _strlen
movq %rax, -24(%rbp)
movq $0, -32(%rbp)
LBB0_1: ## =>This Inner Loop Header: Depth=1
movq -32(%rbp), %rax
cmpq -24(%rbp), %rax
jae LBB0_4
## %bb.2: ## in Loop: Header=BB0_1 Depth=1
movq -8(%rbp), %rax
movq -32(%rbp), %rcx
movsbl (%rax,%rcx), %eax
subl $97, %eax
addl -16(%rbp), %eax
movl $26, %ecx
cltd
idivl %ecx
addl $97, %edx
movl %edx, -36(%rbp)
movl -36(%rbp), %eax
movb %al, %dl
movq -8(%rbp), %rax
movq -32(%rbp), %rcx
movb %dl, (%rax,%rcx)
## %bb.3: ## in Loop: Header=BB0_1 Depth=1
movq -32(%rbp), %rax
addq $1, %rax
movq %rax, -32(%rbp)
jmp LBB0_1
LBB0_4:
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 w8, [x29, #-12]
subs w8, w8, #0
cset w8, ne
and w10, w8, #0x1
mov w9, #21
mov w8, #5
ands w10, w10, #0x1
csel w8, w8, w9, ne
stur w8, [x29, #-16]
ldur x0, [x29, #-8]
bl _strlen
str x0, [sp, #24]
str xzr, [sp, #16]
b LBB0_1
LBB0_1: ; =>This Inner Loop Header: Depth=1
ldr x8, [sp, #16]
ldr x9, [sp, #24]
subs x8, x8, x9
cset w8, hs
tbnz w8, #0, LBB0_4
b LBB0_2
LBB0_2: ; in Loop: Header=BB0_1 Depth=1
ldur x8, [x29, #-8]
ldr x9, [sp, #16]
ldrsb w8, [x8, x9]
subs w8, w8, #97
ldur w9, [x29, #-16]
add w8, w8, w9
mov w10, #26
sdiv w9, w8, w10
mul w9, w9, w10
subs w8, w8, w9
add w8, w8, #97
str w8, [sp, #12]
ldr w8, [sp, #12]
ldur x9, [x29, #-8]
ldr x10, [sp, #16]
strb w8, [x9, x10]
b LBB0_3
LBB0_3: ; in Loop: Header=BB0_1 Depth=1
ldr x8, [sp, #16]
add x8, x8, #1
str x8, [sp, #16]
b LBB0_1
LBB0_4:
ldp x29, x30, [sp, #48] ; 16-byte Folded Reload
add sp, sp, #64
ret
.cfi_endproc
; -- End function
.subsections_via_symbols
|
eval/problem51/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)
leaq L_.str(%rip), %rax
movq %rax, -16(%rbp)
movq -8(%rbp), %rax
movq %rax, -24(%rbp)
LBB0_1: ## =>This Inner Loop Header: Depth=1
movq -8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0, %eax
je LBB0_5
## %bb.2: ## in Loop: Header=BB0_1 Depth=1
movq -16(%rbp), %rdi
movq -8(%rbp), %rax
movsbl (%rax), %esi
callq _strchr
cmpq $0, %rax
jne LBB0_4
## %bb.3: ## in Loop: Header=BB0_1 Depth=1
movq -8(%rbp), %rax
movb (%rax), %cl
movq -24(%rbp), %rax
movq %rax, %rdx
addq $1, %rdx
movq %rdx, -24(%rbp)
movb %cl, (%rax)
LBB0_4: ## in Loop: Header=BB0_1 Depth=1
movq -8(%rbp), %rax
addq $1, %rax
movq %rax, -8(%rbp)
jmp LBB0_1
LBB0_5:
movq -24(%rbp), %rax
movb $0, (%rax)
addq $32, %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, #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]
adrp x8, l_.str@PAGE
add x8, x8, l_.str@PAGEOFF
str x8, [sp, #16]
ldur x8, [x29, #-8]
str x8, [sp, #8]
b LBB0_1
LBB0_1: ; =>This Inner Loop Header: Depth=1
ldur x8, [x29, #-8]
ldrsb w8, [x8]
subs w8, w8, #0
cset w8, eq
tbnz w8, #0, LBB0_5
b LBB0_2
LBB0_2: ; in Loop: Header=BB0_1 Depth=1
ldr x0, [sp, #16]
ldur x8, [x29, #-8]
ldrsb w1, [x8]
bl _strchr
subs x8, x0, #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]
ldrb w8, [x8]
ldr x9, [sp, #8]
add x10, x9, #1
str x10, [sp, #8]
strb w8, [x9]
b LBB0_4
LBB0_4: ; in Loop: Header=BB0_1 Depth=1
ldur x8, [x29, #-8]
add x8, x8, #1
stur x8, [x29, #-8]
b LBB0_1
LBB0_5:
ldr x8, [sp, #8]
strb wzr, [x8]
ldp x29, x30, [sp, #32] ; 16-byte Folded Reload
add sp, sp, #48
ret
.cfi_endproc
; -- End function
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "AEIOUaeiou"
.subsections_via_symbols
|
eval/problem52/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 %edx, -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
cmpl -24(%rbp), %eax
jl LBB0_4
## %bb.3:
movb $0, -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 -28(%rbp), %eax
addl $1, %eax
movl %eax, -28(%rbp)
jmp LBB0_1
LBB0_6:
movb $1, -1(%rbp)
LBB0_7:
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 w2, [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 w8, [x8, x9, lsl #2]
ldr w9, [sp, #8]
subs w8, w8, w9
cset w8, lt
tbnz w8, #0, LBB0_4
b LBB0_3
LBB0_3:
mov w8, #0
and w8, w8, #0x1
and w8, w8, #0x1
strb w8, [sp, #31]
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
and w8, w8, #0x1
and w8, w8, #0x1
strb w8, [sp, #31]
b LBB0_7
LBB0_7:
ldrb w8, [sp, #31]
and w0, w8, #0x1
add sp, sp, #32
ret
.cfi_endproc
; -- End function
.subsections_via_symbols
|
eval/problem53/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 -4(%rbp), %eax
addl -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 w1, [sp, #8]
ldr w8, [sp, #12]
ldr w9, [sp, #8]
add w0, w8, w9
add sp, sp, #16
ret
.cfi_endproc
; -- End function
.subsections_via_symbols
|
eval/problem54/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 $0, -36(%rbp)
LBB0_1: ## =>This Loop Header: Depth=1
## Child Loop BB0_3 Depth 2
movl -36(%rbp), %eax
cmpl -28(%rbp), %eax
jge LBB0_12
## %bb.2: ## in Loop: Header=BB0_1 Depth=1
movb $0, -37(%rbp)
movl $0, -44(%rbp)
LBB0_3: ## Parent Loop BB0_1 Depth=1
## => This Inner Loop Header: Depth=2
movl -44(%rbp), %eax
cmpl -32(%rbp), %eax
jge LBB0_8
## %bb.4: ## in Loop: Header=BB0_3 Depth=2
movq -16(%rbp), %rax
movslq -36(%rbp), %rcx
movsbl (%rax,%rcx), %eax
movq -24(%rbp), %rcx
movslq -44(%rbp), %rdx
movsbl (%rcx,%rdx), %ecx
cmpl %ecx, %eax
jne LBB0_6
## %bb.5: ## in Loop: Header=BB0_1 Depth=1
movb $1, -37(%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 -44(%rbp), %eax
addl $1, %eax
movl %eax, -44(%rbp)
jmp LBB0_3
LBB0_8: ## in Loop: Header=BB0_1 Depth=1
testb $1, -37(%rbp)
jne LBB0_10
## %bb.9:
movb $0, -1(%rbp)
jmp LBB0_25
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 $0, -48(%rbp)
LBB0_13: ## =>This Loop Header: Depth=1
## Child Loop BB0_15 Depth 2
movl -48(%rbp), %eax
cmpl -32(%rbp), %eax
jge LBB0_24
## %bb.14: ## in Loop: Header=BB0_13 Depth=1
movb $0, -49(%rbp)
movl $0, -56(%rbp)
LBB0_15: ## Parent Loop BB0_13 Depth=1
## => This Inner Loop Header: Depth=2
movl -56(%rbp), %eax
cmpl -28(%rbp), %eax
jge LBB0_20
## %bb.16: ## in Loop: Header=BB0_15 Depth=2
movq -24(%rbp), %rax
movslq -48(%rbp), %rcx
movsbl (%rax,%rcx), %eax
movq -16(%rbp), %rcx
movslq -56(%rbp), %rdx
movsbl (%rcx,%rdx), %ecx
cmpl %ecx, %eax
jne LBB0_18
## %bb.17: ## in Loop: Header=BB0_13 Depth=1
movb $1, -49(%rbp)
jmp LBB0_20
LBB0_18: ## in Loop: Header=BB0_15 Depth=2
jmp LBB0_19
LBB0_19: ## in Loop: Header=BB0_15 Depth=2
movl -56(%rbp), %eax
addl $1, %eax
movl %eax, -56(%rbp)
jmp LBB0_15
LBB0_20: ## in Loop: Header=BB0_13 Depth=1
testb $1, -49(%rbp)
jne LBB0_22
## %bb.21:
movb $0, -1(%rbp)
jmp LBB0_25
LBB0_22: ## in Loop: Header=BB0_13 Depth=1
jmp LBB0_23
LBB0_23: ## in Loop: Header=BB0_13 Depth=1
movl -48(%rbp), %eax
addl $1, %eax
movl %eax, -48(%rbp)
jmp LBB0_13
LBB0_24:
movb $1, -1(%rbp)
LBB0_25:
movb -1(%rbp), %al
andb $1, %al
movzbl %al, %eax
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]
str wzr, [sp, #28]
b LBB0_1
LBB0_1: ; =>This Loop Header: Depth=1
; Child Loop BB0_3 Depth 2
ldr w8, [sp, #28]
ldur w9, [x29, #-28]
subs w8, w8, w9
cset w8, ge
tbnz w8, #0, LBB0_12
b LBB0_2
LBB0_2: ; in Loop: Header=BB0_1 Depth=1
strb wzr, [sp, #27]
str wzr, [sp, #20]
b LBB0_3
LBB0_3: ; Parent Loop BB0_1 Depth=1
; => This Inner Loop Header: Depth=2
ldr w8, [sp, #20]
ldr w9, [sp, #32]
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, #-16]
ldrsw x9, [sp, #28]
ldrsb w8, [x8, x9]
ldur x9, [x29, #-24]
ldrsw x10, [sp, #20]
ldrsb w9, [x9, x10]
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, #27]
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, #20]
add w8, w8, #1
str w8, [sp, #20]
b LBB0_3
LBB0_8: ; in Loop: Header=BB0_1 Depth=1
ldrb w8, [sp, #27]
tbnz w8, #0, LBB0_10
b LBB0_9
LBB0_9:
mov w8, #0
and w8, w8, #0x1
and w8, w8, #0x1
sturb w8, [x29, #-1]
b LBB0_25
LBB0_10: ; in Loop: Header=BB0_1 Depth=1
b LBB0_11
LBB0_11: ; in Loop: Header=BB0_1 Depth=1
ldr w8, [sp, #28]
add w8, w8, #1
str w8, [sp, #28]
b LBB0_1
LBB0_12:
str wzr, [sp, #16]
b LBB0_13
LBB0_13: ; =>This Loop Header: Depth=1
; Child Loop BB0_15 Depth 2
ldr w8, [sp, #16]
ldr w9, [sp, #32]
subs w8, w8, w9
cset w8, ge
tbnz w8, #0, LBB0_24
b LBB0_14
LBB0_14: ; in Loop: Header=BB0_13 Depth=1
strb wzr, [sp, #15]
str wzr, [sp, #8]
b LBB0_15
LBB0_15: ; Parent Loop BB0_13 Depth=1
; => This Inner Loop Header: Depth=2
ldr w8, [sp, #8]
ldur w9, [x29, #-28]
subs w8, w8, w9
cset w8, ge
tbnz w8, #0, LBB0_20
b LBB0_16
LBB0_16: ; in Loop: Header=BB0_15 Depth=2
ldur x8, [x29, #-24]
ldrsw x9, [sp, #16]
ldrsb w8, [x8, x9]
ldur x9, [x29, #-16]
ldrsw x10, [sp, #8]
ldrsb w9, [x9, x10]
subs w8, w8, w9
cset w8, ne
tbnz w8, #0, LBB0_18
b LBB0_17
LBB0_17: ; in Loop: Header=BB0_13 Depth=1
mov w8, #1
strb w8, [sp, #15]
b LBB0_20
LBB0_18: ; in Loop: Header=BB0_15 Depth=2
b LBB0_19
LBB0_19: ; in Loop: Header=BB0_15 Depth=2
ldr w8, [sp, #8]
add w8, w8, #1
str w8, [sp, #8]
b LBB0_15
LBB0_20: ; in Loop: Header=BB0_13 Depth=1
ldrb w8, [sp, #15]
tbnz w8, #0, LBB0_22
b LBB0_21
LBB0_21:
mov w8, #0
and w8, w8, #0x1
and w8, w8, #0x1
sturb w8, [x29, #-1]
b LBB0_25
LBB0_22: ; in Loop: Header=BB0_13 Depth=1
b LBB0_23
LBB0_23: ; in Loop: Header=BB0_13 Depth=1
ldr w8, [sp, #16]
add w8, w8, #1
str w8, [sp, #16]
b LBB0_13
LBB0_24:
mov w8, #1
and w8, w8, #0x1
and w8, w8, #0x1
sturb w8, [x29, #-1]
b LBB0_25
LBB0_25:
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/problem55/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 $4032, %rsp ## imm = 0xFC0
movq ___stack_chk_guard@GOTPCREL(%rip), %rax
movq (%rax), %rax
movq %rax, -8(%rbp)
movl %edi, -4020(%rbp)
leaq -4016(%rbp), %rdi
xorl %esi, %esi
movl $4000, %edx ## imm = 0xFA0
callq _memset
movl $0, -4016(%rbp)
movl $1, -4012(%rbp)
movl $2, -4024(%rbp)
LBB0_1: ## =>This Inner Loop Header: Depth=1
movl -4024(%rbp), %eax
cmpl -4020(%rbp), %eax
jg LBB0_4
## %bb.2: ## in Loop: Header=BB0_1 Depth=1
movl -4024(%rbp), %eax
subl $1, %eax
cltq
movl -4016(%rbp,%rax,4), %ecx
movl -4024(%rbp), %eax
subl $2, %eax
cltq
addl -4016(%rbp,%rax,4), %ecx
movslq -4024(%rbp), %rax
movl %ecx, -4016(%rbp,%rax,4)
## %bb.3: ## in Loop: Header=BB0_1 Depth=1
movl -4024(%rbp), %eax
addl $1, %eax
movl %eax, -4024(%rbp)
jmp LBB0_1
LBB0_4:
movslq -4020(%rbp), %rax
movl -4016(%rbp,%rax,4), %eax
movl %eax, -4028(%rbp) ## 4-byte Spill
movq ___stack_chk_guard@GOTPCREL(%rip), %rax
movq (%rax), %rax
movq -8(%rbp), %rcx
cmpq %rcx, %rax
jne LBB0_6
## %bb.5:
movl -4028(%rbp), %eax ## 4-byte Reload
addq $4032, %rsp ## imm = 0xFC0
popq %rbp
retq
LBB0_6:
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, #4032
adrp x8, ___stack_chk_guard@GOTPAGE
ldr x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
ldr x8, [x8]
stur x8, [x29, #-24]
str w0, [sp, #20]
add x0, sp, #24
mov x1, #4000
bl _bzero
str wzr, [sp, #24]
mov w8, #1
str w8, [sp, #28]
mov w8, #2
str w8, [sp, #16]
b LBB0_1
LBB0_1: ; =>This Inner Loop Header: Depth=1
ldr w8, [sp, #16]
ldr w9, [sp, #20]
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 w8, [sp, #16]
subs w8, w8, #1
add x9, sp, #24
ldr w8, [x9, w8, sxtw #2]
ldr w10, [sp, #16]
subs w10, w10, #2
ldr w10, [x9, w10, sxtw #2]
add w8, w8, w10
ldrsw x10, [sp, #16]
str w8, [x9, x10, lsl #2]
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_1
LBB0_4:
ldrsw x9, [sp, #20]
add x8, sp, #24
ldr w8, [x8, x9, lsl #2]
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_6
b LBB0_5
LBB0_5:
bl ___stack_chk_fail
LBB0_6:
ldr w0, [sp, #12] ; 4-byte Folded Reload
add sp, sp, #4032
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/problem56/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 $0, -20(%rbp)
movl $0, -24(%rbp)
LBB0_1: ## =>This Inner Loop Header: Depth=1
movq -16(%rbp), %rax
movslq -24(%rbp), %rcx
cmpb $0, (%rax,%rcx)
je LBB0_9
## %bb.2: ## in Loop: Header=BB0_1 Depth=1
movq -16(%rbp), %rax
movslq -24(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $60, %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 -24(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $62, %eax
jne LBB0_6
## %bb.5: ## in Loop: Header=BB0_1 Depth=1
movl -20(%rbp), %eax
addl $-1, %eax
movl %eax, -20(%rbp)
LBB0_6: ## in Loop: Header=BB0_1 Depth=1
cmpl $0, -20(%rbp)
jge LBB0_8
## %bb.7:
movb $0, -1(%rbp)
jmp LBB0_12
LBB0_8: ## in Loop: Header=BB0_1 Depth=1
movl -24(%rbp), %eax
addl $1, %eax
movl %eax, -24(%rbp)
jmp LBB0_1
LBB0_9:
cmpl $0, -20(%rbp)
je LBB0_11
## %bb.10:
movb $0, -1(%rbp)
jmp LBB0_12
LBB0_11:
movb $1, -1(%rbp)
LBB0_12:
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 wzr, [sp, #12]
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_9
b LBB0_2
LBB0_2: ; in Loop: Header=BB0_1 Depth=1
ldr x8, [sp, #16]
ldrsw x9, [sp, #8]
ldrsb w8, [x8, x9]
subs w8, w8, #60
cset w8, ne
tbnz w8, #0, LBB0_4
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_4
LBB0_4: ; in Loop: Header=BB0_1 Depth=1
ldr x8, [sp, #16]
ldrsw x9, [sp, #8]
ldrsb w8, [x8, x9]
subs w8, w8, #62
cset w8, ne
tbnz w8, #0, LBB0_6
b LBB0_5
LBB0_5: ; in Loop: Header=BB0_1 Depth=1
ldr w8, [sp, #12]
subs w8, w8, #1
str w8, [sp, #12]
b LBB0_6
LBB0_6: ; in Loop: Header=BB0_1 Depth=1
ldr w8, [sp, #12]
subs w8, w8, #0
cset w8, ge
tbnz w8, #0, LBB0_8
b LBB0_7
LBB0_7:
mov w8, #0
and w8, w8, #0x1
and w8, w8, #0x1
strb w8, [sp, #31]
b LBB0_12
LBB0_8: ; in Loop: Header=BB0_1 Depth=1
ldr w8, [sp, #8]
add w8, w8, #1
str w8, [sp, #8]
b LBB0_1
LBB0_9:
ldr w8, [sp, #12]
subs w8, w8, #0
cset w8, eq
tbnz w8, #0, LBB0_11
b LBB0_10
LBB0_10:
mov w8, #0
and w8, w8, #0x1
and w8, w8, #0x1
strb w8, [sp, #31]
b LBB0_12
LBB0_11:
mov w8, #1
and w8, w8, #0x1
and w8, w8, #0x1
strb w8, [sp, #31]
b LBB0_12
LBB0_12:
ldrb w8, [sp, #31]
and w0, w8, #0x1
add sp, sp, #32
ret
.cfi_endproc
; -- End function
.subsections_via_symbols
|
eval/problem57/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, -28(%rbp)
movl $0, -24(%rbp)
movl $1, -32(%rbp)
LBB0_1: ## =>This Inner Loop Header: Depth=1
movl -32(%rbp), %eax
cmpl -20(%rbp), %eax
jge LBB0_8
## %bb.2: ## in Loop: Header=BB0_1 Depth=1
movq -16(%rbp), %rax
movslq -32(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0 ## xmm0 = mem[0],zero,zero,zero
movq -16(%rbp), %rax
movl -32(%rbp), %ecx
subl $1, %ecx
movslq %ecx, %rcx
ucomiss (%rax,%rcx,4), %xmm0
jbe LBB0_4
## %bb.3: ## in Loop: Header=BB0_1 Depth=1
movl $1, -24(%rbp)
LBB0_4: ## in Loop: Header=BB0_1 Depth=1
movq -16(%rbp), %rax
movslq -32(%rbp), %rcx
movss (%rax,%rcx,4), %xmm1 ## xmm1 = mem[0],zero,zero,zero
movq -16(%rbp), %rax
movl -32(%rbp), %ecx
subl $1, %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm0 ## xmm0 = mem[0],zero,zero,zero
ucomiss %xmm1, %xmm0
jbe LBB0_6
## %bb.5: ## in Loop: Header=BB0_1 Depth=1
movl $1, -28(%rbp)
LBB0_6: ## in Loop: Header=BB0_1 Depth=1
jmp LBB0_7
LBB0_7: ## in Loop: Header=BB0_1 Depth=1
movl -32(%rbp), %eax
addl $1, %eax
movl %eax, -32(%rbp)
jmp LBB0_1
LBB0_8:
movl -24(%rbp), %eax
addl -28(%rbp), %eax
cmpl $2, %eax
jne LBB0_10
## %bb.9:
movb $0, -1(%rbp)
jmp LBB0_11
LBB0_10:
movb $1, -1(%rbp)
LBB0_11:
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, #4]
str wzr, [sp, #8]
mov w8, #1
str w8, [sp]
b LBB0_1
LBB0_1: ; =>This Inner Loop Header: Depth=1
ldr w8, [sp]
ldr w9, [sp, #12]
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, #16]
ldrsw x9, [sp]
ldr s0, [x8, x9, lsl #2]
ldr x8, [sp, #16]
ldr w9, [sp]
subs w9, w9, #1
ldr s1, [x8, w9, sxtw #2]
fcmp s0, s1
cset w8, le
tbnz w8, #0, LBB0_4
b LBB0_3
LBB0_3: ; in Loop: Header=BB0_1 Depth=1
mov w8, #1
str w8, [sp, #8]
b LBB0_4
LBB0_4: ; in Loop: Header=BB0_1 Depth=1
ldr x8, [sp, #16]
ldrsw x9, [sp]
ldr s0, [x8, x9, lsl #2]
ldr x8, [sp, #16]
ldr w9, [sp]
subs w9, w9, #1
ldr s1, [x8, w9, sxtw #2]
fcmp s0, s1
cset w8, pl
tbnz w8, #0, LBB0_6
b LBB0_5
LBB0_5: ; in Loop: Header=BB0_1 Depth=1
mov w8, #1
str w8, [sp, #4]
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]
add w8, w8, #1
str w8, [sp]
b LBB0_1
LBB0_8:
ldr w8, [sp, #8]
ldr w9, [sp, #4]
add w8, w8, w9
subs w8, w8, #2
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_11
LBB0_10:
mov w8, #1
and w8, w8, #0x1
and w8, w8, #0x1
strb w8, [sp, #31]
b LBB0_11
LBB0_11:
ldrb w8, [sp, #31]
and w0, w8, #0x1
add sp, sp, #32
ret
.cfi_endproc
; -- End function
.subsections_via_symbols
|
eval/problem58/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)
movl %ecx, -28(%rbp)
movq %r8, -40(%rbp)
movslq -12(%rbp), %rdi
shlq $2, %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
## Child Loop BB0_10 Depth 2
movl -56(%rbp), %eax
cmpl -12(%rbp), %eax
jge LBB0_18
## %bb.2: ## in Loop: Header=BB0_1 Depth=1
movl $0, -68(%rbp)
movl $0, -64(%rbp)
LBB0_3: ## Parent Loop BB0_1 Depth=1
## => This Inner Loop Header: Depth=2
movl -64(%rbp), %eax
cmpl -52(%rbp), %eax
jge LBB0_8
## %bb.4: ## in Loop: Header=BB0_3 Depth=2
movq -48(%rbp), %rax
movslq -64(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movq -8(%rbp), %rcx
movslq -56(%rbp), %rdx
cmpl (%rcx,%rdx,4), %eax
jne LBB0_6
## %bb.5: ## in Loop: Header=BB0_1 Depth=1
movl $1, -68(%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 -64(%rbp), %eax
addl $1, %eax
movl %eax, -64(%rbp)
jmp LBB0_3
LBB0_8: ## in Loop: Header=BB0_1 Depth=1
cmpl $0, -68(%rbp)
jne LBB0_16
## %bb.9: ## in Loop: Header=BB0_1 Depth=1
movl $0, -60(%rbp)
LBB0_10: ## Parent Loop BB0_1 Depth=1
## => This Inner Loop Header: Depth=2
movl -60(%rbp), %eax
cmpl -28(%rbp), %eax
jge LBB0_15
## %bb.11: ## in Loop: Header=BB0_10 Depth=2
movq -8(%rbp), %rax
movslq -56(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movq -24(%rbp), %rcx
movslq -60(%rbp), %rdx
cmpl (%rcx,%rdx,4), %eax
jne LBB0_13
## %bb.12: ## in Loop: Header=BB0_1 Depth=1
movq -8(%rbp), %rax
movslq -56(%rbp), %rcx
movl (%rax,%rcx,4), %edx
movq -48(%rbp), %rax
movl -52(%rbp), %ecx
movl %ecx, %esi
addl $1, %esi
movl %esi, -52(%rbp)
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
jmp LBB0_15
LBB0_13: ## in Loop: Header=BB0_10 Depth=2
jmp LBB0_14
LBB0_14: ## in Loop: Header=BB0_10 Depth=2
movl -60(%rbp), %eax
addl $1, %eax
movl %eax, -60(%rbp)
jmp LBB0_10
LBB0_15: ## in Loop: Header=BB0_1 Depth=1
jmp LBB0_16
LBB0_16: ## in Loop: Header=BB0_1 Depth=1
jmp LBB0_17
LBB0_17: ## in Loop: Header=BB0_1 Depth=1
movl -56(%rbp), %eax
addl $1, %eax
movl %eax, -56(%rbp)
jmp LBB0_1
LBB0_18:
movl $0, -56(%rbp)
LBB0_19: ## =>This Loop Header: Depth=1
## Child Loop BB0_21 Depth 2
movl -56(%rbp), %eax
movl -52(%rbp), %ecx
subl $1, %ecx
cmpl %ecx, %eax
jge LBB0_28
## %bb.20: ## in Loop: Header=BB0_19 Depth=1
movl $0, -60(%rbp)
LBB0_21: ## Parent Loop BB0_19 Depth=1
## => This Inner Loop Header: Depth=2
movl -60(%rbp), %eax
movl -52(%rbp), %ecx
subl -56(%rbp), %ecx
subl $1, %ecx
cmpl %ecx, %eax
jge LBB0_26
## %bb.22: ## in Loop: Header=BB0_21 Depth=2
movq -48(%rbp), %rax
movslq -60(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movq -48(%rbp), %rcx
movl -60(%rbp), %edx
addl $1, %edx
movslq %edx, %rdx
cmpl (%rcx,%rdx,4), %eax
jle LBB0_24
## %bb.23: ## in Loop: Header=BB0_21 Depth=2
movq -48(%rbp), %rax
movslq -60(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -72(%rbp)
movq -48(%rbp), %rax
movl -60(%rbp), %ecx
addl $1, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %edx
movq -48(%rbp), %rax
movslq -60(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movl -72(%rbp), %edx
movq -48(%rbp), %rax
movl -60(%rbp), %ecx
addl $1, %ecx
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
LBB0_24: ## in Loop: Header=BB0_21 Depth=2
jmp LBB0_25
LBB0_25: ## in Loop: Header=BB0_21 Depth=2
movl -60(%rbp), %eax
addl $1, %eax
movl %eax, -60(%rbp)
jmp LBB0_21
LBB0_26: ## in Loop: Header=BB0_19 Depth=1
jmp LBB0_27
LBB0_27: ## in Loop: Header=BB0_19 Depth=1
movl -56(%rbp), %eax
addl $1, %eax
movl %eax, -56(%rbp)
jmp LBB0_19
LBB0_28:
movl -52(%rbp), %ecx
movq -40(%rbp), %rax
movl %ecx, (%rax)
movq -48(%rbp), %rax
addq $80, %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, #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]
stur w3, [x29, #-28]
str x4, [sp, #40]
ldursw x8, [x29, #-12]
lsl x0, x8, #2
bl _malloc
str x0, [sp, #32]
str wzr, [sp, #28]
str wzr, [sp, #24]
b LBB0_1
LBB0_1: ; =>This Loop Header: Depth=1
; Child Loop BB0_3 Depth 2
; Child Loop BB0_10 Depth 2
ldr w8, [sp, #24]
ldur w9, [x29, #-12]
subs w8, w8, w9
cset w8, ge
tbnz w8, #0, LBB0_18
b LBB0_2
LBB0_2: ; in Loop: Header=BB0_1 Depth=1
str wzr, [sp, #12]
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, #28]
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, #32]
ldrsw x9, [sp, #16]
ldr w8, [x8, x9, lsl #2]
ldur x9, [x29, #-8]
ldrsw x10, [sp, #24]
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, #12]
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, #12]
subs w8, w8, #0
cset w8, ne
tbnz w8, #0, LBB0_16
b LBB0_9
LBB0_9: ; in Loop: Header=BB0_1 Depth=1
str wzr, [sp, #20]
b LBB0_10
LBB0_10: ; Parent Loop BB0_1 Depth=1
; => This Inner Loop Header: Depth=2
ldr w8, [sp, #20]
ldur w9, [x29, #-28]
subs w8, w8, w9
cset w8, ge
tbnz w8, #0, LBB0_15
b LBB0_11
LBB0_11: ; in Loop: Header=BB0_10 Depth=2
ldur x8, [x29, #-8]
ldrsw x9, [sp, #24]
ldr w8, [x8, x9, lsl #2]
ldur x9, [x29, #-24]
ldrsw x10, [sp, #20]
ldr w9, [x9, x10, lsl #2]
subs w8, w8, w9
cset w8, ne
tbnz w8, #0, LBB0_13
b LBB0_12
LBB0_12: ; in Loop: Header=BB0_1 Depth=1
ldur x8, [x29, #-8]
ldrsw x9, [sp, #24]
ldr w8, [x8, x9, lsl #2]
ldr x9, [sp, #32]
ldrsw x10, [sp, #28]
mov x11, x10
add w11, w11, #1
str w11, [sp, #28]
str w8, [x9, x10, lsl #2]
b LBB0_15
LBB0_13: ; in Loop: Header=BB0_10 Depth=2
b LBB0_14
LBB0_14: ; in Loop: Header=BB0_10 Depth=2
ldr w8, [sp, #20]
add w8, w8, #1
str w8, [sp, #20]
b LBB0_10
LBB0_15: ; in Loop: Header=BB0_1 Depth=1
b LBB0_16
LBB0_16: ; in Loop: Header=BB0_1 Depth=1
b LBB0_17
LBB0_17: ; in Loop: Header=BB0_1 Depth=1
ldr w8, [sp, #24]
add w8, w8, #1
str w8, [sp, #24]
b LBB0_1
LBB0_18:
str wzr, [sp, #24]
b LBB0_19
LBB0_19: ; =>This Loop Header: Depth=1
; Child Loop BB0_21 Depth 2
ldr w8, [sp, #24]
ldr w9, [sp, #28]
subs w9, w9, #1
subs w8, w8, w9
cset w8, ge
tbnz w8, #0, LBB0_28
b LBB0_20
LBB0_20: ; in Loop: Header=BB0_19 Depth=1
str wzr, [sp, #20]
b LBB0_21
LBB0_21: ; Parent Loop BB0_19 Depth=1
; => This Inner Loop Header: Depth=2
ldr w8, [sp, #20]
ldr w9, [sp, #28]
ldr w10, [sp, #24]
subs w9, w9, w10
subs w9, w9, #1
subs w8, w8, w9
cset w8, ge
tbnz w8, #0, LBB0_26
b LBB0_22
LBB0_22: ; in Loop: Header=BB0_21 Depth=2
ldr x8, [sp, #32]
ldrsw x9, [sp, #20]
ldr w8, [x8, x9, lsl #2]
ldr x9, [sp, #32]
ldr w10, [sp, #20]
add w10, w10, #1
ldr w9, [x9, w10, sxtw #2]
subs w8, w8, w9
cset w8, le
tbnz w8, #0, LBB0_24
b LBB0_23
LBB0_23: ; in Loop: Header=BB0_21 Depth=2
ldr x8, [sp, #32]
ldrsw x9, [sp, #20]
ldr w8, [x8, x9, lsl #2]
str w8, [sp, #8]
ldr x8, [sp, #32]
ldr w9, [sp, #20]
add w9, w9, #1
ldr w8, [x8, w9, sxtw #2]
ldr x9, [sp, #32]
ldrsw x10, [sp, #20]
str w8, [x9, x10, lsl #2]
ldr w8, [sp, #8]
ldr x9, [sp, #32]
ldr w10, [sp, #20]
add w10, w10, #1
str w8, [x9, w10, sxtw #2]
b LBB0_24
LBB0_24: ; in Loop: Header=BB0_21 Depth=2
b LBB0_25
LBB0_25: ; in Loop: Header=BB0_21 Depth=2
ldr w8, [sp, #20]
add w8, w8, #1
str w8, [sp, #20]
b LBB0_21
LBB0_26: ; in Loop: Header=BB0_19 Depth=1
b LBB0_27
LBB0_27: ; in Loop: Header=BB0_19 Depth=1
ldr w8, [sp, #24]
add w8, w8, #1
str w8, [sp, #24]
b LBB0_19
LBB0_28:
ldr w8, [sp, #28]
ldr x9, [sp, #40]
str w8, [x9]
ldr x0, [sp, #32]
ldp x29, x30, [sp, #80] ; 16-byte Folded Reload
add sp, sp, #96
ret
.cfi_endproc
; -- End function
.subsections_via_symbols
|
eval/problem59/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)
movl %edx, -16(%rbp)
movq %rcx, -24(%rbp)
cmpl $0, -12(%rbp)
jle LBB0_2
## %bb.1:
movl -12(%rbp), %eax
shll $1, %eax
subl $1, %eax
movl %eax, -44(%rbp) ## 4-byte Spill
jmp LBB0_3
LBB0_2:
xorl %eax, %eax
movl %eax, -44(%rbp) ## 4-byte Spill
jmp LBB0_3
LBB0_3:
movl -44(%rbp), %ecx ## 4-byte Reload
movq -24(%rbp), %rax
movl %ecx, (%rax)
movq -24(%rbp), %rax
movslq (%rax), %rdi
shlq $2, %rdi
callq _malloc
movq %rax, -32(%rbp)
cmpl $0, -12(%rbp)
jle LBB0_5
## %bb.4:
movq -8(%rbp), %rax
movl (%rax), %ecx
movq -32(%rbp), %rax
movl %ecx, (%rax)
LBB0_5:
movl $1, -36(%rbp)
movl $1, -40(%rbp)
LBB0_6: ## =>This Inner Loop Header: Depth=1
movl -36(%rbp), %eax
cmpl -12(%rbp), %eax
jge LBB0_9
## %bb.7: ## in Loop: Header=BB0_6 Depth=1
movl -16(%rbp), %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)
movq -8(%rbp), %rax
movslq -36(%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)
## %bb.8: ## in Loop: Header=BB0_6 Depth=1
movl -36(%rbp), %eax
addl $1, %eax
movl %eax, -36(%rbp)
jmp LBB0_6
LBB0_9:
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]
stur w2, [x29, #-16]
str x3, [sp, #24]
ldur w8, [x29, #-12]
subs w8, w8, #0
cset w8, le
tbnz w8, #0, LBB0_2
b LBB0_1
LBB0_1:
ldur w8, [x29, #-12]
lsl w8, w8, #1
subs w8, w8, #1
str w8, [sp, #4] ; 4-byte Folded Spill
b LBB0_3
LBB0_2:
mov w8, #0
str w8, [sp, #4] ; 4-byte Folded Spill
b LBB0_3
LBB0_3:
ldr w8, [sp, #4] ; 4-byte Folded Reload
ldr x9, [sp, #24]
str w8, [x9]
ldr x8, [sp, #24]
ldrsw x8, [x8]
lsl x0, x8, #2
bl _malloc
str x0, [sp, #16]
ldur w8, [x29, #-12]
subs w8, w8, #0
cset w8, le
tbnz w8, #0, LBB0_5
b LBB0_4
LBB0_4:
ldur x8, [x29, #-8]
ldr w8, [x8]
ldr x9, [sp, #16]
str w8, [x9]
b LBB0_5
LBB0_5:
mov w8, #1
str w8, [sp, #12]
str w8, [sp, #8]
b LBB0_6
LBB0_6: ; =>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_9
b LBB0_7
LBB0_7: ; in Loop: Header=BB0_6 Depth=1
ldur w8, [x29, #-16]
ldr x9, [sp, #16]
ldrsw x10, [sp, #8]
mov x11, x10
add w11, w11, #1
str w11, [sp, #8]
str w8, [x9, x10, lsl #2]
ldur x8, [x29, #-8]
ldrsw x9, [sp, #12]
ldr w8, [x8, x9, lsl #2]
ldr x9, [sp, #16]
ldrsw x10, [sp, #8]
mov x11, x10
add w11, w11, #1
str w11, [sp, #8]
str w8, [x9, x10, lsl #2]
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 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/problem6/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 $2, -8(%rbp)
LBB0_1: ## =>This Loop Header: Depth=1
## Child Loop BB0_3 Depth 2
movl -8(%rbp), %eax
imull -8(%rbp), %eax
cmpl -4(%rbp), %eax
jg LBB0_9
## %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 -8(%rbp)
xorl %eax, %eax
## kill: def $al killed $al killed $eax
cmpl $0, %edx
movb %al, -9(%rbp) ## 1-byte Spill
jne LBB0_5
## %bb.4: ## in Loop: Header=BB0_3 Depth=2
movl -4(%rbp), %eax
cmpl -8(%rbp), %eax
setg %al
movb %al, -9(%rbp) ## 1-byte Spill
LBB0_5: ## in Loop: Header=BB0_3 Depth=2
movb -9(%rbp), %al ## 1-byte Reload
testb $1, %al
jne LBB0_6
jmp LBB0_7
LBB0_6: ## in Loop: Header=BB0_3 Depth=2
movl -4(%rbp), %eax
cltd
idivl -8(%rbp)
movl %eax, -4(%rbp)
jmp LBB0_3
LBB0_7: ## in Loop: Header=BB0_1 Depth=1
jmp LBB0_8
LBB0_8: ## in Loop: Header=BB0_1 Depth=1
movl -8(%rbp), %eax
addl $1, %eax
movl %eax, -8(%rbp)
jmp LBB0_1
LBB0_9:
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]
mov w8, #2
str w8, [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, #8]
mul w8, w8, w9
ldr w9, [sp, #12]
subs w8, w8, w9
cset w8, gt
tbnz w8, #0, LBB0_9
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, #12]
ldr w10, [sp, #8]
sdiv w9, w8, w10
mul w9, w9, w10
subs w8, w8, w9
subs w8, w8, #0
cset w8, ne
mov w9, #0
str w9, [sp, #4] ; 4-byte Folded Spill
tbnz w8, #0, LBB0_5
b LBB0_4
LBB0_4: ; in Loop: Header=BB0_3 Depth=2
ldr w8, [sp, #12]
ldr w9, [sp, #8]
subs w8, w8, w9
cset w8, gt
str w8, [sp, #4] ; 4-byte Folded Spill
b LBB0_5
LBB0_5: ; in Loop: Header=BB0_3 Depth=2
ldr w8, [sp, #4] ; 4-byte Folded Reload
tbz w8, #0, LBB0_7
b LBB0_6
LBB0_6: ; in Loop: Header=BB0_3 Depth=2
ldr w8, [sp, #12]
ldr w9, [sp, #8]
sdiv w8, w8, w9
str w8, [sp, #12]
b LBB0_3
LBB0_7: ; in Loop: Header=BB0_1 Depth=1
b LBB0_8
LBB0_8: ; in Loop: Header=BB0_1 Depth=1
ldr w8, [sp, #8]
add w8, w8, #1
str w8, [sp, #8]
b LBB0_1
LBB0_9:
ldr w0, [sp, #12]
add sp, sp, #16
ret
.cfi_endproc
; -- End function
.subsections_via_symbols
|
eval/problem60/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 -4(%rbp), %eax
movl -4(%rbp), %ecx
addl $1, %ecx
imull %ecx, %eax
movl $2, %ecx
cltd
idivl %ecx
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]
ldr w8, [sp, #12]
ldr w9, [sp, #12]
add w9, w9, #1
mul w8, w8, w9
mov w9, #2
sdiv w0, w8, w9
add sp, sp, #16
ret
.cfi_endproc
; -- End function
.subsections_via_symbols
|
eval/problem61/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 $0, -20(%rbp)
movl $0, -24(%rbp)
LBB0_1: ## =>This Inner Loop Header: Depth=1
movslq -24(%rbp), %rax
movq %rax, -32(%rbp) ## 8-byte Spill
movq -16(%rbp), %rdi
callq _strlen
movq %rax, %rcx
movq -32(%rbp), %rax ## 8-byte Reload
cmpq %rcx, %rax
jae LBB0_10
## %bb.2: ## in Loop: Header=BB0_1 Depth=1
movq -16(%rbp), %rax
movslq -24(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $40, %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 -24(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $41, %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:
movb $0, -1(%rbp)
jmp LBB0_11
LBB0_8: ## in Loop: Header=BB0_1 Depth=1
jmp LBB0_9
LBB0_9: ## in Loop: Header=BB0_1 Depth=1
movl -24(%rbp), %eax
addl $1, %eax
movl %eax, -24(%rbp)
jmp LBB0_1
LBB0_10:
cmpl $0, -20(%rbp)
sete %al
andb $1, %al
movb %al, -1(%rbp)
LBB0_11:
movb -1(%rbp), %al
andb $1, %al
movzbl %al, %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 wzr, [sp, #12]
str wzr, [sp, #8]
b LBB0_1
LBB0_1: ; =>This Inner Loop Header: Depth=1
ldrsw x8, [sp, #8]
str x8, [sp] ; 8-byte Folded Spill
ldr x0, [sp, #16]
bl _strlen
ldr x8, [sp] ; 8-byte Folded Reload
subs x8, x8, x0
cset w8, hs
tbnz w8, #0, LBB0_10
b LBB0_2
LBB0_2: ; in Loop: Header=BB0_1 Depth=1
ldr x8, [sp, #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, #12]
add w8, w8, #1
str w8, [sp, #12]
b LBB0_4
LBB0_4: ; in Loop: Header=BB0_1 Depth=1
ldr x8, [sp, #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, #12]
subs w8, w8, #1
str w8, [sp, #12]
b LBB0_6
LBB0_6: ; in Loop: Header=BB0_1 Depth=1
ldr w8, [sp, #12]
subs w8, w8, #0
cset w8, ge
tbnz w8, #0, LBB0_8
b LBB0_7
LBB0_7:
mov w8, #0
and w8, w8, #0x1
and w8, w8, #0x1
sturb w8, [x29, #-1]
b LBB0_11
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:
ldr w8, [sp, #12]
subs w8, w8, #0
cset w8, eq
and w8, w8, #0x1
and w8, w8, #0x1
sturb w8, [x29, #-1]
b LBB0_11
LBB0_11:
ldurb w8, [x29, #-1]
and w0, w8, #0x1
ldp x29, x30, [sp, #32] ; 16-byte Folded Reload
add sp, sp, #48
ret
.cfi_endproc
; -- End function
.subsections_via_symbols
|
eval/problem62/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 $1, -28(%rbp)
LBB0_1: ## =>This Inner Loop Header: Depth=1
movl -28(%rbp), %eax
cmpl -12(%rbp), %eax
jge LBB0_4
## %bb.2: ## in Loop: Header=BB0_1 Depth=1
cvtsi2ssl -28(%rbp), %xmm0
movq -8(%rbp), %rax
movslq -28(%rbp), %rcx
mulss (%rax,%rcx,4), %xmm0
movq -24(%rbp), %rax
movl -28(%rbp), %ecx
subl $1, %ecx
movslq %ecx, %rcx
movss %xmm0, (%rax,%rcx,4)
## %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:
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 x2, [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, #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 s0, [sp, #4]
scvtf s0, s0
ldr x8, [sp, #24]
ldrsw x9, [sp, #4]
ldr s1, [x8, x9, lsl #2]
fmul s0, s0, s1
ldr x8, [sp, #8]
ldr w9, [sp, #4]
subs w9, w9, #1
str s0, [x8, w9, sxtw #2]
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:
add sp, sp, #32
ret
.cfi_endproc
; -- End function
.subsections_via_symbols
|
eval/problem63/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 $432, %rsp ## imm = 0x1B0
movq ___stack_chk_guard@GOTPCREL(%rip), %rax
movq (%rax), %rax
movq %rax, -8(%rbp)
movl %edi, -420(%rbp)
leaq -416(%rbp), %rdi
xorl %esi, %esi
movl $400, %edx ## imm = 0x190
callq _memset
movl $0, -412(%rbp)
movl $1, -408(%rbp)
movl $3, -424(%rbp)
LBB0_1: ## =>This Inner Loop Header: Depth=1
movl -424(%rbp), %eax
cmpl -420(%rbp), %eax
jg LBB0_4
## %bb.2: ## in Loop: Header=BB0_1 Depth=1
movl -424(%rbp), %eax
subl $1, %eax
cltq
movl -416(%rbp,%rax,4), %ecx
movl -424(%rbp), %eax
subl $2, %eax
cltq
addl -416(%rbp,%rax,4), %ecx
movl -424(%rbp), %eax
subl $3, %eax
cltq
addl -416(%rbp,%rax,4), %ecx
movslq -424(%rbp), %rax
movl %ecx, -416(%rbp,%rax,4)
## %bb.3: ## in Loop: Header=BB0_1 Depth=1
movl -424(%rbp), %eax
addl $1, %eax
movl %eax, -424(%rbp)
jmp LBB0_1
LBB0_4:
movslq -420(%rbp), %rax
movl -416(%rbp,%rax,4), %eax
movl %eax, -428(%rbp) ## 4-byte Spill
movq ___stack_chk_guard@GOTPCREL(%rip), %rax
movq (%rax), %rax
movq -8(%rbp), %rcx
cmpq %rcx, %rax
jne LBB0_6
## %bb.5:
movl -428(%rbp), %eax ## 4-byte Reload
addq $432, %rsp ## imm = 0x1B0
popq %rbp
retq
LBB0_6:
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, #464
.cfi_def_cfa_offset 464
stp x28, x27, [sp, #432] ; 16-byte Folded Spill
stp x29, x30, [sp, #448] ; 16-byte Folded Spill
add x29, sp, #448
.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 w0, [sp, #20]
add x0, sp, #24
mov x1, #400
bl _bzero
str wzr, [sp, #28]
mov w8, #1
str w8, [sp, #32]
mov w8, #3
str w8, [sp, #16]
b LBB0_1
LBB0_1: ; =>This Inner Loop Header: Depth=1
ldr w8, [sp, #16]
ldr w9, [sp, #20]
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 w8, [sp, #16]
subs w8, w8, #1
add x9, sp, #24
ldr w8, [x9, w8, sxtw #2]
ldr w10, [sp, #16]
subs w10, w10, #2
ldr w10, [x9, w10, sxtw #2]
add w8, w8, w10
ldr w10, [sp, #16]
subs w10, w10, #3
ldr w10, [x9, w10, sxtw #2]
add w8, w8, w10
ldrsw x10, [sp, #16]
str w8, [x9, x10, lsl #2]
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_1
LBB0_4:
ldrsw x9, [sp, #20]
add x8, sp, #24
ldr w8, [x8, x9, lsl #2]
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_6
b LBB0_5
LBB0_5:
bl ___stack_chk_fail
LBB0_6:
ldr w0, [sp, #12] ; 4-byte Folded Reload
ldp x29, x30, [sp, #448] ; 16-byte Folded Reload
ldp x28, x27, [sp, #432] ; 16-byte Folded Reload
add sp, sp, #464
ret
.cfi_endproc
; -- End function
.subsections_via_symbols
|
eval/problem64/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)
leaq L_.str(%rip), %rax
movq %rax, -16(%rbp)
movl $0, -20(%rbp)
movq -8(%rbp), %rdi
callq _strlen
## kill: def $eax killed $eax killed $rax
movl %eax, -24(%rbp)
movl $0, -28(%rbp)
LBB0_1: ## =>This Inner Loop Header: Depth=1
movl -28(%rbp), %eax
cmpl -24(%rbp), %eax
jge LBB0_6
## %bb.2: ## in Loop: Header=BB0_1 Depth=1
movq -16(%rbp), %rdi
movq -8(%rbp), %rax
movslq -28(%rbp), %rcx
movsbl (%rax,%rcx), %esi
callq _strchr
cmpq $0, %rax
je 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
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:
cmpl $0, -24(%rbp)
jle LBB0_10
## %bb.7:
movq -8(%rbp), %rax
movl -24(%rbp), %ecx
subl $1, %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %eax
cmpl $121, %eax
je LBB0_9
## %bb.8:
movq -8(%rbp), %rax
movl -24(%rbp), %ecx
subl $1, %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %eax
cmpl $89, %eax
jne LBB0_10
LBB0_9:
movl -20(%rbp), %eax
addl $1, %eax
movl %eax, -20(%rbp)
LBB0_10:
movl -20(%rbp), %eax
addq $32, %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, #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]
adrp x8, l_.str@PAGE
add x8, x8, l_.str@PAGEOFF
str x8, [sp, #16]
str wzr, [sp, #12]
ldur x0, [x29, #-8]
bl _strlen
mov x8, x0
str w8, [sp, #8]
str wzr, [sp, #4]
b LBB0_1
LBB0_1: ; =>This Inner Loop Header: Depth=1
ldr w8, [sp, #4]
ldr w9, [sp, #8]
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, #16]
ldur x8, [x29, #-8]
ldrsw x9, [sp, #4]
ldrsb w1, [x8, x9]
bl _strchr
subs x8, x0, #0
cset w8, eq
tbnz w8, #0, LBB0_4
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_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 w8, [sp, #8]
subs w8, w8, #0
cset w8, le
tbnz w8, #0, LBB0_10
b LBB0_7
LBB0_7:
ldur x8, [x29, #-8]
ldr w9, [sp, #8]
subs w9, w9, #1
ldrsb w8, [x8, w9, sxtw]
subs w8, w8, #121
cset w8, eq
tbnz w8, #0, LBB0_9
b LBB0_8
LBB0_8:
ldur x8, [x29, #-8]
ldr w9, [sp, #8]
subs w9, w9, #1
ldrsb w8, [x8, w9, sxtw]
subs w8, w8, #89
cset w8, ne
tbnz w8, #0, LBB0_10
b LBB0_9
LBB0_9:
ldr w8, [sp, #12]
add w8, w8, #1
str w8, [sp, #12]
b LBB0_10
LBB0_10:
ldr w0, [sp, #12]
ldp x29, x30, [sp, #32] ; 16-byte Folded Reload
add sp, sp, #48
ret
.cfi_endproc
; -- End function
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "aeiouAEIOU"
.subsections_via_symbols
|
eval/problem65/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)
movl %edi, -68(%rbp)
movl %esi, -72(%rbp)
movl -68(%rbp), %r8d
leaq _func0.xs(%rip), %rdi
xorl %esi, %esi
movl $50, %edx
leaq L_.str(%rip), %rcx
movb $0, %al
callq ___sprintf_chk
leaq _func0.xs(%rip), %rdi
callq _strlen
## kill: def $eax killed $eax killed $rax
movl %eax, -76(%rbp)
movl -76(%rbp), %eax
cmpl -72(%rbp), %eax
jge LBB0_6
## %bb.1:
movl $0, -80(%rbp)
LBB0_2: ## =>This Inner Loop Header: Depth=1
movl -80(%rbp), %eax
movl %eax, -88(%rbp) ## 4-byte Spill
movl -76(%rbp), %eax
movl $2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -88(%rbp), %eax ## 4-byte Reload
cmpl %ecx, %eax
jge LBB0_5
## %bb.3: ## in Loop: Header=BB0_2 Depth=1
movslq -80(%rbp), %rcx
leaq _func0.xs(%rip), %rax
movb (%rax,%rcx), %al
movb %al, -81(%rbp)
movl -76(%rbp), %eax
subl $1, %eax
subl -80(%rbp), %eax
movslq %eax, %rcx
leaq _func0.xs(%rip), %rax
movb (%rax,%rcx), %dl
movslq -80(%rbp), %rcx
leaq _func0.xs(%rip), %rax
movb %dl, (%rax,%rcx)
movb -81(%rbp), %dl
movl -76(%rbp), %eax
subl $1, %eax
subl -80(%rbp), %eax
movslq %eax, %rcx
leaq _func0.xs(%rip), %rax
movb %dl, (%rax,%rcx)
## %bb.4: ## in Loop: Header=BB0_2 Depth=1
movl -80(%rbp), %eax
addl $1, %eax
movl %eax, -80(%rbp)
jmp LBB0_2
LBB0_5:
jmp LBB0_7
LBB0_6:
leaq -64(%rbp), %rdi
movslq -76(%rbp), %rax
leaq _func0.xs(%rip), %rsi
addq %rax, %rsi
movslq -72(%rbp), %rcx
xorl %eax, %eax
## kill: def $rax killed $eax
subq %rcx, %rax
addq %rax, %rsi
movl $50, %edx
callq ___strcpy_chk
movslq -72(%rbp), %rax
movb $0, -64(%rbp,%rax)
leaq -64(%rbp), %rdi
movl -76(%rbp), %eax
subl -72(%rbp), %eax
movslq %eax, %rdx
leaq _func0.xs(%rip), %rsi
movl $50, %ecx
callq ___strncat_chk
leaq -64(%rbp), %rsi
leaq _func0.xs(%rip), %rdi
movl $50, %edx
callq ___strcpy_chk
LBB0_7:
movq ___stack_chk_guard@GOTPCREL(%rip), %rax
movq (%rax), %rax
movq -8(%rbp), %rcx
cmpq %rcx, %rax
jne LBB0_9
## %bb.8:
leaq _func0.xs(%rip), %rax
addq $96, %rsp
popq %rbp
retq
LBB0_9:
callq ___stack_chk_fail
ud2
.cfi_endproc
## -- End function
.zerofill __DATA,__bss,_func0.xs,50,4 ## @func0.xs
.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, #144
.cfi_def_cfa_offset 144
stp x29, x30, [sp, #128] ; 16-byte Folded Spill
add x29, sp, #128
.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, #64]
str w1, [sp, #60]
ldr w9, [sp, #64]
; implicit-def: $x8
mov x8, x9
mov x9, sp
str x8, [x9]
adrp x0, _func0.xs@PAGE
add x0, x0, _func0.xs@PAGEOFF
str x0, [sp, #40] ; 8-byte Folded Spill
mov w1, #0
mov x2, #50
adrp x3, l_.str@PAGE
add x3, x3, l_.str@PAGEOFF
bl ___sprintf_chk
ldr x0, [sp, #40] ; 8-byte Folded Reload
bl _strlen
mov x8, x0
str w8, [sp, #56]
ldr w8, [sp, #56]
ldr w9, [sp, #60]
subs w8, w8, w9
cset w8, ge
tbnz w8, #0, LBB0_6
b LBB0_1
LBB0_1:
str wzr, [sp, #52]
b LBB0_2
LBB0_2: ; =>This Inner Loop Header: Depth=1
ldr w8, [sp, #52]
ldr w9, [sp, #56]
mov w10, #2
sdiv w9, w9, w10
subs w8, w8, w9
cset w8, ge
tbnz w8, #0, LBB0_5
b LBB0_3
LBB0_3: ; in Loop: Header=BB0_2 Depth=1
ldrsw x10, [sp, #52]
adrp x9, _func0.xs@PAGE
add x9, x9, _func0.xs@PAGEOFF
mov x8, x9
add x8, x8, x10
ldrb w8, [x8]
strb w8, [sp, #51]
ldr w8, [sp, #56]
subs w8, w8, #1
ldr w10, [sp, #52]
subs w8, w8, w10
add x8, x9, w8, sxtw
ldrb w8, [x8]
ldrsw x11, [sp, #52]
mov x10, x9
add x10, x10, x11
strb w8, [x10]
ldrb w8, [sp, #51]
ldr w10, [sp, #56]
subs w10, w10, #1
ldr w11, [sp, #52]
subs w10, w10, w11
add x9, x9, w10, sxtw
strb w8, [x9]
b LBB0_4
LBB0_4: ; in Loop: Header=BB0_2 Depth=1
ldr w8, [sp, #52]
add w8, w8, #1
str w8, [sp, #52]
b LBB0_2
LBB0_5:
b LBB0_7
LBB0_6:
ldrsw x9, [sp, #56]
adrp x8, _func0.xs@PAGE
add x8, x8, _func0.xs@PAGEOFF
str x8, [sp, #32] ; 8-byte Folded Spill
add x8, x8, x9
ldrsw x9, [sp, #60]
subs x1, x8, x9
sub x0, x29, #58
str x0, [sp, #16] ; 8-byte Folded Spill
mov x2, #50
str x2, [sp, #24] ; 8-byte Folded Spill
bl ___strcpy_chk
ldr x1, [sp, #32] ; 8-byte Folded Reload
ldr x3, [sp, #24] ; 8-byte Folded Reload
ldr x0, [sp, #16] ; 8-byte Folded Reload
ldrsw x9, [sp, #60]
mov x8, x0
add x8, x8, x9
strb wzr, [x8]
ldr w8, [sp, #56]
ldr w9, [sp, #60]
subs w9, w8, w9
; implicit-def: $x8
mov x8, x9
sxtw x2, w8
bl ___strncat_chk
ldr x1, [sp, #16] ; 8-byte Folded Reload
ldr x2, [sp, #24] ; 8-byte Folded Reload
ldr x0, [sp, #32] ; 8-byte Folded Reload
bl ___strcpy_chk
b LBB0_7
LBB0_7:
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_9
b LBB0_8
LBB0_8:
bl ___stack_chk_fail
LBB0_9:
adrp x0, _func0.xs@PAGE
add x0, x0, _func0.xs@PAGEOFF
ldp x29, x30, [sp, #128] ; 16-byte Folded Reload
add sp, sp, #144
ret
.cfi_endproc
; -- End function
.zerofill __DATA,__bss,_func0.xs,50,0 ; @func0.xs
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "%d"
.subsections_via_symbols
|
eval/problem66/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)
movl $0, -16(%rbp)
LBB0_1: ## =>This Inner Loop Header: Depth=1
movq -8(%rbp), %rax
movslq -16(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0, %eax
je LBB0_7
## %bb.2: ## in Loop: Header=BB0_1 Depth=1
movq -8(%rbp), %rax
movslq -16(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $65, %eax
jl LBB0_5
## %bb.3: ## in Loop: Header=BB0_1 Depth=1
movq -8(%rbp), %rax
movslq -16(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $90, %eax
jg LBB0_5
## %bb.4: ## in Loop: Header=BB0_1 Depth=1
movq -8(%rbp), %rax
movslq -16(%rbp), %rcx
movsbl (%rax,%rcx), %eax
addl -12(%rbp), %eax
movl %eax, -12(%rbp)
LBB0_5: ## in Loop: Header=BB0_1 Depth=1
jmp LBB0_6
LBB0_6: ## in Loop: Header=BB0_1 Depth=1
movl -16(%rbp), %eax
addl $1, %eax
movl %eax, -16(%rbp)
jmp LBB0_1
LBB0_7:
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]
str wzr, [sp]
b LBB0_1
LBB0_1: ; =>This Inner Loop Header: Depth=1
ldr x8, [sp, #8]
ldrsw x9, [sp]
ldrsb w8, [x8, x9]
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, #8]
ldrsw x9, [sp]
ldrsb w8, [x8, x9]
subs w8, w8, #65
cset w8, lt
tbnz w8, #0, LBB0_5
b LBB0_3
LBB0_3: ; in Loop: Header=BB0_1 Depth=1
ldr x8, [sp, #8]
ldrsw x9, [sp]
ldrsb w8, [x8, x9]
subs w8, w8, #90
cset w8, gt
tbnz w8, #0, LBB0_5
b LBB0_4
LBB0_4: ; in Loop: Header=BB0_1 Depth=1
ldr x8, [sp, #8]
ldrsw x9, [sp]
ldrsb w9, [x8, x9]
ldr w8, [sp, #4]
add w8, w8, w9
str w8, [sp, #4]
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]
add w8, w8, #1
str w8, [sp]
b LBB0_1
LBB0_7:
ldr w0, [sp, #4]
add sp, sp, #16
ret
.cfi_endproc
; -- End function
.subsections_via_symbols
|
eval/problem67/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 ___stack_chk_guard@GOTPCREL(%rip), %rax
movq (%rax), %rax
movq %rax, -8(%rbp)
movq %rdi, -40(%rbp)
movl %esi, -44(%rbp)
leaq -18(%rbp), %rdi
xorl %esi, %esi
movl $10, %edx
callq _memset
leaq -28(%rbp), %rdi
xorl %esi, %esi
movl $10, %edx
callq _memset
movl $0, -48(%rbp)
movl $0, -52(%rbp)
movl $0, -56(%rbp)
LBB0_1: ## =>This Inner Loop Header: Depth=1
movq -40(%rbp), %rax
movslq -56(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0, %eax
je LBB0_13
## %bb.2: ## in Loop: Header=BB0_1 Depth=1
movq -40(%rbp), %rax
movslq -56(%rbp), %rcx
movsbl (%rax,%rcx), %edi
callq _isdigit
cmpl $0, %eax
je LBB0_7
## %bb.3: ## in Loop: Header=BB0_1 Depth=1
cmpl $0, -48(%rbp)
jne LBB0_5
## %bb.4: ## in Loop: Header=BB0_1 Depth=1
movq -40(%rbp), %rax
movslq -56(%rbp), %rcx
movb (%rax,%rcx), %cl
movl -52(%rbp), %eax
movl %eax, %edx
addl $1, %edx
movl %edx, -52(%rbp)
cltq
movb %cl, -18(%rbp,%rax)
jmp LBB0_6
LBB0_5: ## in Loop: Header=BB0_1 Depth=1
movq -40(%rbp), %rax
movslq -56(%rbp), %rcx
movb (%rax,%rcx), %cl
movl -52(%rbp), %eax
movl %eax, %edx
addl $1, %edx
movl %edx, -52(%rbp)
cltq
movb %cl, -28(%rbp,%rax)
LBB0_6: ## in Loop: Header=BB0_1 Depth=1
jmp LBB0_11
LBB0_7: ## in Loop: Header=BB0_1 Depth=1
cmpl $0, -48(%rbp)
jne LBB0_10
## %bb.8: ## in Loop: Header=BB0_1 Depth=1
cmpl $0, -52(%rbp)
jle LBB0_10
## %bb.9: ## in Loop: Header=BB0_1 Depth=1
movl $1, -48(%rbp)
movl $0, -52(%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 -56(%rbp), %eax
addl $1, %eax
movl %eax, -56(%rbp)
jmp LBB0_1
LBB0_13:
movl -44(%rbp), %eax
movl %eax, -68(%rbp) ## 4-byte Spill
leaq -18(%rbp), %rdi
callq _atoi
movl %eax, %ecx
movl -68(%rbp), %eax ## 4-byte Reload
subl %ecx, %eax
movl %eax, -64(%rbp) ## 4-byte Spill
leaq -28(%rbp), %rdi
callq _atoi
movl %eax, %ecx
movl -64(%rbp), %eax ## 4-byte Reload
subl %ecx, %eax
movl %eax, -60(%rbp) ## 4-byte Spill
movq ___stack_chk_guard@GOTPCREL(%rip), %rax
movq (%rax), %rax
movq -8(%rbp), %rcx
cmpq %rcx, %rax
jne LBB0_15
## %bb.14:
movl -60(%rbp), %eax ## 4-byte Reload
addq $80, %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, #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
adrp x8, ___stack_chk_guard@GOTPAGE
ldr x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
ldr x8, [x8]
stur x8, [x29, #-8]
str x0, [sp, #32]
str w1, [sp, #28]
stur xzr, [x29, #-24]
sturh wzr, [x29, #-16]
str xzr, [sp, #40]
strh wzr, [sp, #48]
str wzr, [sp, #24]
str wzr, [sp, #20]
str wzr, [sp, #16]
b LBB0_1
LBB0_1: ; =>This Inner Loop Header: Depth=1
ldr x8, [sp, #32]
ldrsw x9, [sp, #16]
ldrsb w8, [x8, x9]
subs w8, w8, #0
cset w8, eq
tbnz w8, #0, LBB0_13
b LBB0_2
LBB0_2: ; in Loop: Header=BB0_1 Depth=1
ldr x8, [sp, #32]
ldrsw x9, [sp, #16]
ldrsb w0, [x8, x9]
bl _isdigit
subs w8, w0, #0
cset w8, eq
tbnz w8, #0, LBB0_7
b LBB0_3
LBB0_3: ; in Loop: Header=BB0_1 Depth=1
ldr w8, [sp, #24]
subs w8, w8, #0
cset w8, ne
tbnz w8, #0, LBB0_5
b LBB0_4
LBB0_4: ; in Loop: Header=BB0_1 Depth=1
ldr x8, [sp, #32]
ldrsw x9, [sp, #16]
add x8, x8, x9
ldrb w8, [x8]
ldrsw x10, [sp, #20]
mov x9, x10
add w9, w9, #1
str w9, [sp, #20]
sub x9, x29, #24
add x9, x9, x10
strb w8, [x9]
b LBB0_6
LBB0_5: ; in Loop: Header=BB0_1 Depth=1
ldr x8, [sp, #32]
ldrsw x9, [sp, #16]
add x8, x8, x9
ldrb w8, [x8]
ldrsw x10, [sp, #20]
mov x9, x10
add w9, w9, #1
str w9, [sp, #20]
add x9, sp, #40
add x9, x9, x10
strb w8, [x9]
b LBB0_6
LBB0_6: ; in Loop: Header=BB0_1 Depth=1
b LBB0_11
LBB0_7: ; in Loop: Header=BB0_1 Depth=1
ldr w8, [sp, #24]
subs w8, w8, #0
cset w8, ne
tbnz w8, #0, LBB0_10
b LBB0_8
LBB0_8: ; in Loop: Header=BB0_1 Depth=1
ldr w8, [sp, #20]
subs w8, w8, #0
cset w8, le
tbnz w8, #0, LBB0_10
b LBB0_9
LBB0_9: ; in Loop: Header=BB0_1 Depth=1
mov w8, #1
str w8, [sp, #24]
str wzr, [sp, #20]
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, #16]
add w8, w8, #1
str w8, [sp, #16]
b LBB0_1
LBB0_13:
ldr w8, [sp, #28]
str w8, [sp, #4] ; 4-byte Folded Spill
sub x0, x29, #24
bl _atoi
ldr w8, [sp, #4] ; 4-byte Folded Reload
subs w8, w8, w0
str w8, [sp, #8] ; 4-byte Folded Spill
add x0, sp, #40
bl _atoi
ldr w8, [sp, #8] ; 4-byte Folded Reload
subs w8, w8, w0
str w8, [sp, #12] ; 4-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_15
b LBB0_14
LBB0_14:
bl ___stack_chk_fail
LBB0_15:
ldr w0, [sp, #12] ; 4-byte Folded Reload
ldp x29, x30, [sp, #80] ; 16-byte Folded Reload
add sp, sp, #96
ret
.cfi_endproc
; -- End function
.subsections_via_symbols
|
eval/problem68/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 $2147483647, -36(%rbp) ## imm = 0x7FFFFFFF
movl $-1, -40(%rbp)
movl $0, -44(%rbp)
LBB0_1: ## =>This Inner Loop Header: Depth=1
movl -44(%rbp), %eax
cmpl -20(%rbp), %eax
jge LBB0_8
## %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_6
## %bb.3: ## in Loop: Header=BB0_1 Depth=1
movq -16(%rbp), %rax
movslq -44(%rbp), %rcx
movl (%rax,%rcx,4), %eax
cmpl -36(%rbp), %eax
jl LBB0_5
## %bb.4: ## in Loop: Header=BB0_1 Depth=1
cmpl $-1, -40(%rbp)
jne LBB0_6
LBB0_5: ## in Loop: Header=BB0_1 Depth=1
movq -16(%rbp), %rax
movslq -44(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -36(%rbp)
movl -44(%rbp), %eax
movl %eax, -40(%rbp)
LBB0_6: ## in Loop: Header=BB0_1 Depth=1
jmp LBB0_7
LBB0_7: ## in Loop: Header=BB0_1 Depth=1
movl -44(%rbp), %eax
addl $1, %eax
movl %eax, -44(%rbp)
jmp LBB0_1
LBB0_8:
cmpl $-1, -40(%rbp)
jne LBB0_10
## %bb.9:
movq $0, -8(%rbp)
jmp LBB0_11
LBB0_10:
movl -36(%rbp), %ecx
movq -32(%rbp), %rax
movl %ecx, (%rax)
movl -40(%rbp), %ecx
movq -32(%rbp), %rax
movl %ecx, 4(%rax)
movq -32(%rbp), %rax
movq %rax, -8(%rbp)
LBB0_11:
movq -8(%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, #32]
str w1, [sp, #28]
str x2, [sp, #16]
mov w8, #2147483647
str w8, [sp, #12]
mov w8, #-1
str w8, [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_8
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_6
b LBB0_3
LBB0_3: ; in Loop: Header=BB0_1 Depth=1
ldr x8, [sp, #32]
ldrsw x9, [sp, #4]
ldr w8, [x8, x9, lsl #2]
ldr w9, [sp, #12]
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, #8]
adds 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, #32]
ldrsw x9, [sp, #4]
ldr w8, [x8, x9, lsl #2]
str w8, [sp, #12]
ldr w8, [sp, #4]
str w8, [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
ldr w8, [sp, #4]
add w8, w8, #1
str w8, [sp, #4]
b LBB0_1
LBB0_8:
ldr w8, [sp, #8]
adds w8, w8, #1
cset w8, ne
tbnz w8, #0, LBB0_10
b LBB0_9
LBB0_9:
; kill: def $x8 killed $xzr
str xzr, [sp, #40]
b LBB0_11
LBB0_10:
ldr w8, [sp, #12]
ldr x9, [sp, #16]
str w8, [x9]
ldr w8, [sp, #8]
ldr x9, [sp, #16]
str w8, [x9, #4]
ldr x8, [sp, #16]
str x8, [sp, #40]
b LBB0_11
LBB0_11:
ldr x0, [sp, #40]
add sp, sp, #48
ret
.cfi_endproc
; -- End function
.subsections_via_symbols
|
eval/problem69/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)
movq $0, -24(%rbp)
movl $0, -28(%rbp)
movl $0, -32(%rbp)
movl $0, -36(%rbp)
movl $0, -40(%rbp)
movl $0, -36(%rbp)
LBB0_1: ## =>This Inner Loop Header: Depth=1
movq -8(%rbp), %rax
movslq -36(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0, %eax
je LBB0_13
## %bb.2: ## in Loop: Header=BB0_1 Depth=1
movq -8(%rbp), %rax
movslq -36(%rbp), %rcx
movb (%rax,%rcx), %al
movb %al, -41(%rbp)
movsbl -41(%rbp), %eax
cmpl $40, %eax
jne LBB0_6
## %bb.3: ## in Loop: Header=BB0_1 Depth=1
movl -28(%rbp), %eax
addl $1, %eax
movl %eax, -28(%rbp)
movl -28(%rbp), %eax
cmpl -32(%rbp), %eax
jle LBB0_5
## %bb.4: ## in Loop: Header=BB0_1 Depth=1
movl -28(%rbp), %eax
movl %eax, -32(%rbp)
LBB0_5: ## in Loop: Header=BB0_1 Depth=1
jmp LBB0_11
LBB0_6: ## in Loop: Header=BB0_1 Depth=1
movsbl -41(%rbp), %eax
cmpl $41, %eax
jne LBB0_10
## %bb.7: ## in Loop: Header=BB0_1 Depth=1
movl -28(%rbp), %eax
subl $1, %eax
movl %eax, -28(%rbp)
cmpl $0, -28(%rbp)
jne LBB0_9
## %bb.8: ## in Loop: Header=BB0_1 Depth=1
movq -24(%rbp), %rdi
movl -40(%rbp), %eax
addl $1, %eax
movslq %eax, %rsi
shlq $2, %rsi
callq _realloc
movq %rax, -24(%rbp)
movl -32(%rbp), %edx
movq -24(%rbp), %rax
movl -40(%rbp), %ecx
movl %ecx, %esi
addl $1, %esi
movl %esi, -40(%rbp)
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movl $0, -32(%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
jmp LBB0_12
LBB0_12: ## in Loop: Header=BB0_1 Depth=1
movl -36(%rbp), %eax
addl $1, %eax
movl %eax, -36(%rbp)
jmp LBB0_1
LBB0_13:
movl -40(%rbp), %ecx
movq -16(%rbp), %rax
movl %ecx, (%rax)
movq -24(%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 x1, [x29, #-16]
; kill: def $x8 killed $xzr
str xzr, [sp, #24]
str wzr, [sp, #20]
str wzr, [sp, #16]
str wzr, [sp, #12]
str wzr, [sp, #8]
str wzr, [sp, #12]
b LBB0_1
LBB0_1: ; =>This Inner Loop Header: Depth=1
ldur x8, [x29, #-8]
ldrsw x9, [sp, #12]
ldrsb w8, [x8, x9]
subs w8, w8, #0
cset w8, eq
tbnz w8, #0, LBB0_13
b LBB0_2
LBB0_2: ; in Loop: Header=BB0_1 Depth=1
ldur x8, [x29, #-8]
ldrsw x9, [sp, #12]
add x8, x8, x9
ldrb w8, [x8]
strb w8, [sp, #7]
ldrsb w8, [sp, #7]
subs w8, w8, #40
cset w8, ne
tbnz w8, #0, LBB0_6
b LBB0_3
LBB0_3: ; in Loop: Header=BB0_1 Depth=1
ldr w8, [sp, #20]
add w8, w8, #1
str w8, [sp, #20]
ldr w8, [sp, #20]
ldr w9, [sp, #16]
subs w8, w8, w9
cset w8, le
tbnz w8, #0, LBB0_5
b LBB0_4
LBB0_4: ; in Loop: Header=BB0_1 Depth=1
ldr w8, [sp, #20]
str w8, [sp, #16]
b LBB0_5
LBB0_5: ; in Loop: Header=BB0_1 Depth=1
b LBB0_11
LBB0_6: ; in Loop: Header=BB0_1 Depth=1
ldrsb w8, [sp, #7]
subs w8, w8, #41
cset w8, ne
tbnz w8, #0, LBB0_10
b LBB0_7
LBB0_7: ; in Loop: Header=BB0_1 Depth=1
ldr w8, [sp, #20]
subs w8, w8, #1
str w8, [sp, #20]
ldr w8, [sp, #20]
subs w8, w8, #0
cset w8, ne
tbnz w8, #0, LBB0_9
b LBB0_8
LBB0_8: ; in Loop: Header=BB0_1 Depth=1
ldr x0, [sp, #24]
ldr w8, [sp, #8]
add w9, w8, #1
; implicit-def: $x8
mov x8, x9
sxtw x9, w8
mov x8, #4
mul x1, x8, x9
bl _realloc
str x0, [sp, #24]
ldr w8, [sp, #16]
ldr x9, [sp, #24]
ldrsw x10, [sp, #8]
mov x11, x10
add w11, w11, #1
str w11, [sp, #8]
str w8, [x9, x10, lsl #2]
str wzr, [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
b LBB0_12
LBB0_12: ; in Loop: Header=BB0_1 Depth=1
ldr w8, [sp, #12]
add w8, w8, #1
str w8, [sp, #12]
b LBB0_1
LBB0_13:
ldr w8, [sp, #8]
ldur x9, [x29, #-16]
str w8, [x9]
ldr x0, [sp, #24]
ldp x29, x30, [sp, #48] ; 16-byte Folded Reload
add sp, sp, #64
ret
.cfi_endproc
; -- End function
.subsections_via_symbols
|
eval/problem7/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 -12(%rbp), %eax
addl $1, %eax
movslq %eax, %rdi
movl $4, %esi
callq _calloc
movq %rax, -24(%rbp)
movl $-1, -28(%rbp)
movl $0, -32(%rbp)
LBB0_1: ## =>This Inner Loop Header: Depth=1
movl -32(%rbp), %eax
cmpl -12(%rbp), %eax
jge LBB0_7
## %bb.2: ## in Loop: Header=BB0_1 Depth=1
movq -24(%rbp), %rax
movq -8(%rbp), %rcx
movslq -32(%rbp), %rdx
movslq (%rcx,%rdx,4), %rcx
movl (%rax,%rcx,4), %edx
addl $1, %edx
movl %edx, (%rax,%rcx,4)
movq -24(%rbp), %rax
movq -8(%rbp), %rcx
movslq -32(%rbp), %rdx
movslq (%rcx,%rdx,4), %rcx
movl (%rax,%rcx,4), %eax
movq -8(%rbp), %rcx
movslq -32(%rbp), %rdx
cmpl (%rcx,%rdx,4), %eax
jl LBB0_5
## %bb.3: ## in Loop: Header=BB0_1 Depth=1
movq -8(%rbp), %rax
movslq -32(%rbp), %rcx
movl (%rax,%rcx,4), %eax
cmpl -28(%rbp), %eax
jle LBB0_5
## %bb.4: ## in Loop: Header=BB0_1 Depth=1
movq -8(%rbp), %rax
movslq -32(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -28(%rbp)
LBB0_5: ## in Loop: Header=BB0_1 Depth=1
jmp LBB0_6
LBB0_6: ## in Loop: Header=BB0_1 Depth=1
movl -32(%rbp), %eax
addl $1, %eax
movl %eax, -32(%rbp)
jmp LBB0_1
LBB0_7:
movq -24(%rbp), %rdi
callq _free
movl -28(%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]
ldur w8, [x29, #-12]
add w9, w8, #1
; implicit-def: $x8
mov x8, x9
sxtw x0, w8
mov x1, #4
bl _calloc
str x0, [sp, #8]
mov w8, #-1
str w8, [sp, #4]
str wzr, [sp]
b LBB0_1
LBB0_1: ; =>This Inner Loop Header: Depth=1
ldr w8, [sp]
ldur w9, [x29, #-12]
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, #8]
ldur x9, [x29, #-8]
ldrsw x10, [sp]
ldrsw x9, [x9, x10, lsl #2]
add x9, x8, x9, lsl #2
ldr w8, [x9]
add w8, w8, #1
str w8, [x9]
ldr x8, [sp, #8]
ldur x9, [x29, #-8]
ldrsw x10, [sp]
ldrsw x9, [x9, x10, lsl #2]
ldr w8, [x8, x9, lsl #2]
ldur x9, [x29, #-8]
ldrsw x10, [sp]
ldr w9, [x9, x10, lsl #2]
subs w8, w8, w9
cset w8, lt
tbnz w8, #0, LBB0_5
b LBB0_3
LBB0_3: ; in Loop: Header=BB0_1 Depth=1
ldur x8, [x29, #-8]
ldrsw x9, [sp]
ldr w8, [x8, x9, lsl #2]
ldr w9, [sp, #4]
subs w8, w8, w9
cset w8, le
tbnz w8, #0, LBB0_5
b LBB0_4
LBB0_4: ; in Loop: Header=BB0_1 Depth=1
ldur x8, [x29, #-8]
ldrsw x9, [sp]
ldr w8, [x8, x9, lsl #2]
str w8, [sp, #4]
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]
add w8, w8, #1
str w8, [sp]
b LBB0_1
LBB0_7:
ldr x0, [sp, #8]
bl _free
ldr w0, [sp, #4]
ldp x29, x30, [sp, #32] ; 16-byte Folded Reload
add sp, sp, #48
ret
.cfi_endproc
; -- End function
.subsections_via_symbols
|
eval/problem70/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)
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 -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 -12(%rbp), %eax
jge LBB0_8
## %bb.4: ## in Loop: Header=BB0_3 Depth=2
movq -8(%rbp), %rax
movslq -28(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movq -8(%rbp), %rcx
movslq -32(%rbp), %rdx
cmpl (%rcx,%rdx,4), %eax
jle LBB0_6
## %bb.5: ## in Loop: Header=BB0_3 Depth=2
movq -8(%rbp), %rax
movslq -28(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -36(%rbp)
movq -8(%rbp), %rax
movslq -32(%rbp), %rcx
movl (%rax,%rcx,4), %edx
movq -8(%rbp), %rax
movslq -28(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movl -36(%rbp), %edx
movq -8(%rbp), %rax
movslq -32(%rbp), %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)
movl -12(%rbp), %eax
subl $1, %eax
movl %eax, -44(%rbp)
movl $0, -48(%rbp)
LBB0_11: ## =>This Inner Loop Header: Depth=1
movl -40(%rbp), %eax
cmpl -44(%rbp), %eax
jg LBB0_16
## %bb.12: ## in Loop: Header=BB0_11 Depth=1
movl -40(%rbp), %eax
cmpl -44(%rbp), %eax
jne LBB0_14
## %bb.13: ## in Loop: Header=BB0_11 Depth=1
movq -8(%rbp), %rax
movl -40(%rbp), %ecx
movl %ecx, %edx
addl $1, %edx
movl %edx, -40(%rbp)
movslq %ecx, %rcx
movl (%rax,%rcx,4), %edx
movq -24(%rbp), %rax
movl -48(%rbp), %ecx
movl %ecx, %esi
addl $1, %esi
movl %esi, -48(%rbp)
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
jmp LBB0_15
LBB0_14: ## in Loop: Header=BB0_11 Depth=1
movq -8(%rbp), %rax
movl -40(%rbp), %ecx
movl %ecx, %edx
addl $1, %edx
movl %edx, -40(%rbp)
movslq %ecx, %rcx
movl (%rax,%rcx,4), %edx
movq -24(%rbp), %rax
movl -48(%rbp), %ecx
movl %ecx, %esi
addl $1, %esi
movl %esi, -48(%rbp)
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movq -8(%rbp), %rax
movl -44(%rbp), %ecx
movl %ecx, %edx
addl $-1, %edx
movl %edx, -44(%rbp)
movslq %ecx, %rcx
movl (%rax,%rcx,4), %edx
movq -24(%rbp), %rax
movl -48(%rbp), %ecx
movl %ecx, %esi
addl $1, %esi
movl %esi, -48(%rbp)
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
LBB0_15: ## in Loop: Header=BB0_11 Depth=1
jmp LBB0_11
LBB0_16:
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]
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
ldr w8, [sp, #20]
add w8, w8, #1
str w8, [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]
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, #20]
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, 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, #20]
ldr w8, [x8, x9, lsl #2]
str w8, [sp, #12]
ldr x8, [sp, #40]
ldrsw x9, [sp, #16]
ldr w8, [x8, x9, lsl #2]
ldr x9, [sp, #40]
ldrsw x10, [sp, #20]
str w8, [x9, x10, lsl #2]
ldr w8, [sp, #12]
ldr x9, [sp, #40]
ldrsw x10, [sp, #16]
str w8, [x9, x10, lsl #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]
ldr w8, [sp, #36]
subs w8, w8, #1
str w8, [sp, #4]
str wzr, [sp]
b LBB0_11
LBB0_11: ; =>This Inner Loop Header: Depth=1
ldr w8, [sp, #8]
ldr w9, [sp, #4]
subs w8, w8, w9
cset w8, gt
tbnz w8, #0, LBB0_16
b LBB0_12
LBB0_12: ; in Loop: Header=BB0_11 Depth=1
ldr w8, [sp, #8]
ldr w9, [sp, #4]
subs w8, w8, w9
cset w8, ne
tbnz w8, #0, LBB0_14
b LBB0_13
LBB0_13: ; in Loop: Header=BB0_11 Depth=1
ldr x8, [sp, #40]
ldrsw x9, [sp, #8]
mov x10, x9
add w10, w10, #1
str w10, [sp, #8]
ldr w8, [x8, x9, lsl #2]
ldr x9, [sp, #24]
ldrsw x10, [sp]
mov x11, x10
add w11, w11, #1
str w11, [sp]
str w8, [x9, x10, lsl #2]
b LBB0_15
LBB0_14: ; in Loop: Header=BB0_11 Depth=1
ldr x8, [sp, #40]
ldrsw x9, [sp, #8]
mov x10, x9
add w10, w10, #1
str w10, [sp, #8]
ldr w8, [x8, x9, lsl #2]
ldr x9, [sp, #24]
ldrsw x10, [sp]
mov x11, x10
add w11, w11, #1
str w11, [sp]
str w8, [x9, x10, lsl #2]
ldr x8, [sp, #40]
ldrsw x9, [sp, #4]
mov x10, x9
subs w10, w10, #1
str w10, [sp, #4]
ldr w8, [x8, x9, lsl #2]
ldr x9, [sp, #24]
ldrsw x10, [sp]
mov x11, x10
add w11, w11, #1
str w11, [sp]
str w8, [x9, x10, lsl #2]
b LBB0_15
LBB0_15: ; in Loop: Header=BB0_11 Depth=1
b LBB0_11
LBB0_16:
add sp, sp, #48
ret
.cfi_endproc
; -- End function
.subsections_via_symbols
|
eval/problem71/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 0x42c80000 ## float 100
LCPI0_3:
.long 0x40000000 ## float 2
LCPI0_4:
.long 0xbf800000 ## float -1
.section __TEXT,__literal16,16byte_literals
.p2align 4
LCPI0_1:
.long 0x80000000 ## float -0
.long 0x80000000 ## float -0
.long 0x80000000 ## float -0
.long 0x80000000 ## float -0
LCPI0_2:
.long 0x3effffff ## float 0.49999997
.long 0x3effffff ## float 0.49999997
.long 0x3effffff ## float 0.49999997
.long 0x3effffff ## float 0.49999997
.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
addss -12(%rbp), %xmm1
movss -16(%rbp), %xmm0 ## xmm0 = mem[0],zero,zero,zero
ucomiss %xmm1, %xmm0
jae LBB0_3
## %bb.1:
movss -8(%rbp), %xmm1 ## xmm1 = mem[0],zero,zero,zero
addss -16(%rbp), %xmm1
movss -12(%rbp), %xmm0 ## xmm0 = mem[0],zero,zero,zero
ucomiss %xmm1, %xmm0
jae LBB0_3
## %bb.2:
movss -12(%rbp), %xmm1 ## xmm1 = mem[0],zero,zero,zero
addss -16(%rbp), %xmm1
movss -8(%rbp), %xmm0 ## xmm0 = mem[0],zero,zero,zero
ucomiss %xmm1, %xmm0
jb LBB0_4
LBB0_3:
movss LCPI0_4(%rip), %xmm0 ## xmm0 = mem[0],zero,zero,zero
movss %xmm0, -4(%rbp)
jmp LBB0_5
LBB0_4:
movss -8(%rbp), %xmm0 ## xmm0 = mem[0],zero,zero,zero
addss -12(%rbp), %xmm0
addss -16(%rbp), %xmm0
movss LCPI0_3(%rip), %xmm1 ## xmm1 = mem[0],zero,zero,zero
divss %xmm1, %xmm0
movss %xmm0, -20(%rbp)
movss -20(%rbp), %xmm0 ## xmm0 = mem[0],zero,zero,zero
movss -20(%rbp), %xmm1 ## xmm1 = mem[0],zero,zero,zero
subss -8(%rbp), %xmm1
mulss %xmm1, %xmm0
movss -20(%rbp), %xmm1 ## xmm1 = mem[0],zero,zero,zero
subss -12(%rbp), %xmm1
mulss %xmm1, %xmm0
movss -20(%rbp), %xmm1 ## xmm1 = mem[0],zero,zero,zero
subss -16(%rbp), %xmm1
mulss %xmm1, %xmm0
sqrtss %xmm0, %xmm0
movss %xmm0, -24(%rbp)
movss LCPI0_0(%rip), %xmm0 ## xmm0 = mem[0],zero,zero,zero
mulss -24(%rbp), %xmm0
movaps %xmm0, %xmm1
movaps LCPI0_1(%rip), %xmm2 ## xmm2 = [-0.0E+0,-0.0E+0,-0.0E+0,-0.0E+0]
pand %xmm2, %xmm1
movaps LCPI0_2(%rip), %xmm2 ## xmm2 = [4.9999997E-1,4.9999997E-1,4.9999997E-1,4.9999997E-1]
por %xmm2, %xmm1
addss %xmm1, %xmm0
roundss $11, %xmm0, %xmm0
movss LCPI0_0(%rip), %xmm1 ## xmm1 = mem[0],zero,zero,zero
divss %xmm1, %xmm0
movss %xmm0, -4(%rbp)
LBB0_5:
movss -4(%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 s0, [sp, #24]
str s1, [sp, #20]
str s2, [sp, #16]
ldr s0, [sp, #24]
ldr s1, [sp, #20]
fadd s0, s0, s1
ldr s1, [sp, #16]
fcmp s0, s1
cset w8, ls
tbnz w8, #0, LBB0_3
b LBB0_1
LBB0_1:
ldr s0, [sp, #24]
ldr s1, [sp, #16]
fadd s0, s0, s1
ldr s1, [sp, #20]
fcmp s0, s1
cset w8, ls
tbnz w8, #0, LBB0_3
b LBB0_2
LBB0_2:
ldr s0, [sp, #20]
ldr s1, [sp, #16]
fadd s0, s0, s1
ldr s1, [sp, #24]
fcmp s0, s1
cset w8, hi
tbnz w8, #0, LBB0_4
b LBB0_3
LBB0_3:
fmov s0, #-1.00000000
str s0, [sp, #28]
b LBB0_5
LBB0_4:
ldr s0, [sp, #24]
ldr s1, [sp, #20]
fadd s0, s0, s1
ldr s1, [sp, #16]
fadd s0, s0, s1
fmov s1, #2.00000000
fdiv s0, s0, s1
str s0, [sp, #12]
ldr s0, [sp, #12]
ldr s1, [sp, #12]
ldr s2, [sp, #24]
fsub s1, s1, s2
fmul s0, s0, s1
ldr s1, [sp, #12]
ldr s2, [sp, #20]
fsub s1, s1, s2
fmul s0, s0, s1
ldr s1, [sp, #12]
ldr s2, [sp, #16]
fsub s1, s1, s2
fmul s0, s0, s1
fsqrt s0, s0
str s0, [sp, #8]
ldr s0, [sp, #8]
mov w8, #1120403456
fmov s1, w8
fmul s0, s0, s1
frinta s0, s0
fdiv s0, s0, s1
str s0, [sp, #28]
b LBB0_5
LBB0_5:
ldr s0, [sp, #28]
add sp, sp, #32
ret
.cfi_endproc
; -- End function
.subsections_via_symbols
|
eval/problem72/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 %edx, -24(%rbp)
movl $0, -28(%rbp)
movl $0, -32(%rbp)
LBB0_1: ## =>This Inner Loop Header: Depth=1
movl -32(%rbp), %eax
movl %eax, -36(%rbp) ## 4-byte Spill
movl -20(%rbp), %eax
movl $2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -36(%rbp), %eax ## 4-byte Reload
cmpl %ecx, %eax
jge LBB0_6
## %bb.2: ## in Loop: Header=BB0_1 Depth=1
movq -16(%rbp), %rax
movslq -32(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movq -16(%rbp), %rcx
movl -20(%rbp), %edx
subl $1, %edx
subl -32(%rbp), %edx
movslq %edx, %rdx
cmpl (%rcx,%rdx,4), %eax
je LBB0_4
## %bb.3:
movb $0, -1(%rbp)
jmp LBB0_9
LBB0_4: ## in Loop: Header=BB0_1 Depth=1
movq -16(%rbp), %rax
movslq -32(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movq -16(%rbp), %rcx
movl -20(%rbp), %edx
subl $1, %edx
subl -32(%rbp), %edx
movslq %edx, %rdx
addl (%rcx,%rdx,4), %eax
addl -28(%rbp), %eax
movl %eax, -28(%rbp)
## %bb.5: ## in Loop: Header=BB0_1 Depth=1
movl -32(%rbp), %eax
addl $1, %eax
movl %eax, -32(%rbp)
jmp LBB0_1
LBB0_6:
movl -20(%rbp), %eax
movl $2, %ecx
cltd
idivl %ecx
cmpl $1, %edx
jne LBB0_8
## %bb.7:
movq -16(%rbp), %rax
movq %rax, -48(%rbp) ## 8-byte Spill
movl -20(%rbp), %eax
movl $2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movq -48(%rbp), %rax ## 8-byte Reload
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
addl -28(%rbp), %eax
movl %eax, -28(%rbp)
LBB0_8:
movl -28(%rbp), %eax
cmpl -24(%rbp), %eax
setle %al
andb $1, %al
movb %al, -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]
str w1, [sp, #12]
str w2, [sp, #8]
str wzr, [sp, #4]
str wzr, [sp]
b LBB0_1
LBB0_1: ; =>This Inner Loop Header: Depth=1
ldr w8, [sp]
ldr w9, [sp, #12]
mov w10, #2
sdiv w9, w9, w10
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]
ldr w8, [x8, x9, lsl #2]
ldr x9, [sp, #16]
ldr w10, [sp, #12]
subs w10, w10, #1
ldr w11, [sp]
subs w10, w10, w11
ldr w9, [x9, w10, sxtw #2]
subs w8, w8, w9
cset w8, eq
tbnz w8, #0, LBB0_4
b LBB0_3
LBB0_3:
mov w8, #0
and w8, w8, #0x1
and w8, w8, #0x1
strb w8, [sp, #31]
b LBB0_9
LBB0_4: ; in Loop: Header=BB0_1 Depth=1
ldr x8, [sp, #16]
ldrsw x9, [sp]
ldr w8, [x8, x9, lsl #2]
ldr x9, [sp, #16]
ldr w10, [sp, #12]
subs w10, w10, #1
ldr w11, [sp]
subs w10, w10, w11
ldr w9, [x9, w10, sxtw #2]
add w9, w8, w9
ldr w8, [sp, #4]
add w8, w8, w9
str w8, [sp, #4]
b LBB0_5
LBB0_5: ; in Loop: Header=BB0_1 Depth=1
ldr w8, [sp]
add w8, w8, #1
str w8, [sp]
b LBB0_1
LBB0_6:
ldr w8, [sp, #12]
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:
ldr x8, [sp, #16]
ldr w9, [sp, #12]
mov w10, #2
sdiv w9, w9, w10
ldr w9, [x8, w9, sxtw #2]
ldr w8, [sp, #4]
add w8, w8, w9
str w8, [sp, #4]
b LBB0_8
LBB0_8:
ldr w8, [sp, #4]
ldr w9, [sp, #8]
subs w8, w8, w9
cset w8, le
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/problem73/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
movl %eax, -24(%rbp) ## 4-byte Spill
movl -12(%rbp), %eax
movl $2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -24(%rbp), %eax ## 4-byte Reload
cmpl %ecx, %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 -12(%rbp), %edx
subl $1, %edx
subl -20(%rbp), %edx
movslq %edx, %rdx
cmpl (%rcx,%rdx,4), %eax
je LBB0_4
## %bb.3: ## in Loop: Header=BB0_1 Depth=1
movl -16(%rbp), %eax
addl $1, %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 w8, [sp, #12]
ldr w9, [sp, #20]
mov w10, #2
sdiv w9, w9, w10
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, #20]
subs w10, w10, #1
ldr w11, [sp, #12]
subs w10, w10, w11
ldr w9, [x9, w10, sxtw #2]
subs w8, w8, w9
cset w8, eq
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_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/problem74/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)
movq %rdx, -32(%rbp)
movl %ecx, -36(%rbp)
movl $0, -44(%rbp)
movl $0, -48(%rbp)
movl $0, -40(%rbp)
LBB0_1: ## =>This Inner Loop Header: Depth=1
movl -40(%rbp), %eax
cmpl -20(%rbp), %eax
jge LBB0_4
## %bb.2: ## in Loop: Header=BB0_1 Depth=1
movq -16(%rbp), %rax
movslq -40(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq _strlen
movq %rax, %rcx
movslq -44(%rbp), %rax
addq %rcx, %rax
## kill: def $eax killed $eax killed $rax
movl %eax, -44(%rbp)
## %bb.3: ## in Loop: Header=BB0_1 Depth=1
movl -40(%rbp), %eax
addl $1, %eax
movl %eax, -40(%rbp)
jmp LBB0_1
LBB0_4:
movl $0, -40(%rbp)
LBB0_5: ## =>This Inner Loop Header: Depth=1
movl -40(%rbp), %eax
cmpl -36(%rbp), %eax
jge LBB0_8
## %bb.6: ## in Loop: Header=BB0_5 Depth=1
movq -32(%rbp), %rax
movslq -40(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq _strlen
movq %rax, %rcx
movslq -48(%rbp), %rax
addq %rcx, %rax
## kill: def $eax killed $eax killed $rax
movl %eax, -48(%rbp)
## %bb.7: ## in Loop: Header=BB0_5 Depth=1
movl -40(%rbp), %eax
addl $1, %eax
movl %eax, -40(%rbp)
jmp LBB0_5
LBB0_8:
movl -44(%rbp), %eax
cmpl -48(%rbp), %eax
jge LBB0_10
## %bb.9:
movq -16(%rbp), %rax
movq %rax, -8(%rbp)
jmp LBB0_13
LBB0_10:
movl -44(%rbp), %eax
cmpl -48(%rbp), %eax
jle LBB0_12
## %bb.11:
movq -32(%rbp), %rax
movq %rax, -8(%rbp)
jmp LBB0_13
LBB0_12:
movq -16(%rbp), %rax
movq %rax, -8(%rbp)
LBB0_13:
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 x2, [sp, #16]
str w3, [sp, #12]
str wzr, [sp, #4]
str wzr, [sp]
str wzr, [sp, #8]
b LBB0_1
LBB0_1: ; =>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_4
b LBB0_2
LBB0_2: ; in Loop: Header=BB0_1 Depth=1
ldur x8, [x29, #-16]
ldrsw x9, [sp, #8]
ldr x0, [x8, x9, lsl #3]
bl _strlen
ldrsw x8, [sp, #4]
add x8, x8, x0
; kill: def $w8 killed $w8 killed $x8
str w8, [sp, #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_1
LBB0_4:
str wzr, [sp, #8]
b LBB0_5
LBB0_5: ; =>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_8
b LBB0_6
LBB0_6: ; in Loop: Header=BB0_5 Depth=1
ldr x8, [sp, #16]
ldrsw x9, [sp, #8]
ldr x0, [x8, x9, lsl #3]
bl _strlen
ldrsw x8, [sp]
add x8, x8, x0
; kill: def $w8 killed $w8 killed $x8
str w8, [sp]
b LBB0_7
LBB0_7: ; in Loop: Header=BB0_5 Depth=1
ldr w8, [sp, #8]
add w8, w8, #1
str w8, [sp, #8]
b LBB0_5
LBB0_8:
ldr w8, [sp, #4]
ldr w9, [sp]
subs w8, w8, w9
cset w8, ge
tbnz w8, #0, LBB0_10
b LBB0_9
LBB0_9:
ldur x8, [x29, #-16]
stur x8, [x29, #-8]
b LBB0_13
LBB0_10:
ldr w8, [sp, #4]
ldr w9, [sp]
subs w8, w8, w9
cset w8, le
tbnz w8, #0, LBB0_12
b LBB0_11
LBB0_11:
ldr x8, [sp, #16]
stur x8, [x29, #-8]
b LBB0_13
LBB0_12:
ldur x8, [x29, #-16]
stur x8, [x29, #-8]
b LBB0_13
LBB0_13:
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/problem75/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)
cmpl $2, -8(%rbp)
jge LBB0_2
## %bb.1:
movl $0, -4(%rbp)
jmp LBB0_12
LBB0_2:
movl $0, -12(%rbp)
movl $2, -16(%rbp)
LBB0_3: ## =>This Loop Header: Depth=1
## Child Loop BB0_5 Depth 2
movl -16(%rbp), %eax
imull -16(%rbp), %eax
cmpl -8(%rbp), %eax
jg LBB0_9
## %bb.4: ## in Loop: Header=BB0_3 Depth=1
jmp LBB0_5
LBB0_5: ## Parent Loop BB0_3 Depth=1
## => This Inner Loop Header: Depth=2
movl -8(%rbp), %eax
cltd
idivl -16(%rbp)
cmpl $0, %edx
jne LBB0_7
## %bb.6: ## in Loop: Header=BB0_5 Depth=2
movl -8(%rbp), %eax
cltd
idivl -16(%rbp)
movl %eax, -8(%rbp)
movl -12(%rbp), %eax
addl $1, %eax
movl %eax, -12(%rbp)
jmp LBB0_5
LBB0_7: ## in Loop: Header=BB0_3 Depth=1
jmp LBB0_8
LBB0_8: ## in Loop: Header=BB0_3 Depth=1
movl -16(%rbp), %eax
addl $1, %eax
movl %eax, -16(%rbp)
jmp LBB0_3
LBB0_9:
cmpl $1, -8(%rbp)
jle LBB0_11
## %bb.10:
movl -12(%rbp), %eax
addl $1, %eax
movl %eax, -12(%rbp)
LBB0_11:
cmpl $3, -12(%rbp)
sete %al
andb $1, %al
movzbl %al, %eax
movl %eax, -4(%rbp)
LBB0_12:
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]
subs w8, w8, #2
cset w8, ge
tbnz w8, #0, LBB0_2
b LBB0_1
LBB0_1:
str wzr, [sp, #12]
b LBB0_12
LBB0_2:
str wzr, [sp, #4]
mov w8, #2
str w8, [sp]
b LBB0_3
LBB0_3: ; =>This Loop Header: Depth=1
; Child Loop BB0_5 Depth 2
ldr w8, [sp]
ldr w9, [sp]
mul w8, w8, w9
ldr w9, [sp, #8]
subs w8, w8, w9
cset w8, gt
tbnz w8, #0, LBB0_9
b LBB0_4
LBB0_4: ; in Loop: Header=BB0_3 Depth=1
b LBB0_5
LBB0_5: ; Parent Loop BB0_3 Depth=1
; => This Inner Loop Header: Depth=2
ldr w8, [sp, #8]
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_7
b LBB0_6
LBB0_6: ; in Loop: Header=BB0_5 Depth=2
ldr w8, [sp, #8]
ldr w9, [sp]
sdiv w8, w8, w9
str w8, [sp, #8]
ldr w8, [sp, #4]
add w8, w8, #1
str w8, [sp, #4]
b LBB0_5
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:
ldr w8, [sp, #8]
subs w8, w8, #1
cset w8, le
tbnz w8, #0, LBB0_11
b LBB0_10
LBB0_10:
ldr w8, [sp, #4]
add w8, w8, #1
str w8, [sp, #4]
b LBB0_11
LBB0_11:
ldr w8, [sp, #4]
subs w8, w8, #3
cset w8, eq
and w8, w8, #0x1
str w8, [sp, #12]
b LBB0_12
LBB0_12:
ldr w0, [sp, #12]
add sp, sp, #16
ret
.cfi_endproc
; -- End function
.subsections_via_symbols
|
eval/problem76/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 $1, -16(%rbp)
movl $0, -20(%rbp)
LBB0_1: ## =>This Inner Loop Header: Depth=1
movl -16(%rbp), %ecx
xorl %eax, %eax
## kill: def $al killed $al killed $eax
cmpl -8(%rbp), %ecx
movb %al, -21(%rbp) ## 1-byte Spill
jg LBB0_3
## %bb.2: ## in Loop: Header=BB0_1 Depth=1
cmpl $100, -20(%rbp)
setl %al
movb %al, -21(%rbp) ## 1-byte Spill
LBB0_3: ## in Loop: Header=BB0_1 Depth=1
movb -21(%rbp), %al ## 1-byte Reload
testb $1, %al
jne LBB0_4
jmp LBB0_7
LBB0_4: ## in Loop: Header=BB0_1 Depth=1
movl -16(%rbp), %eax
cmpl -8(%rbp), %eax
jne LBB0_6
## %bb.5:
movl $1, -4(%rbp)
jmp LBB0_8
LBB0_6: ## in Loop: Header=BB0_1 Depth=1
movl -16(%rbp), %eax
imull -12(%rbp), %eax
movl %eax, -16(%rbp)
movl -20(%rbp), %eax
addl $1, %eax
movl %eax, -20(%rbp)
jmp LBB0_1
LBB0_7:
movl $0, -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, #32
.cfi_def_cfa_offset 32
str w0, [sp, #24]
str w1, [sp, #20]
mov w8, #1
str w8, [sp, #16]
str wzr, [sp, #12]
b LBB0_1
LBB0_1: ; =>This Inner Loop Header: Depth=1
ldr w8, [sp, #16]
ldr w9, [sp, #24]
subs w8, w8, w9
cset w8, gt
mov w9, #0
str w9, [sp, #8] ; 4-byte Folded Spill
tbnz w8, #0, LBB0_3
b LBB0_2
LBB0_2: ; in Loop: Header=BB0_1 Depth=1
ldr w8, [sp, #12]
subs w8, w8, #100
cset w8, lt
str w8, [sp, #8] ; 4-byte Folded Spill
b LBB0_3
LBB0_3: ; in Loop: Header=BB0_1 Depth=1
ldr w8, [sp, #8] ; 4-byte Folded Reload
tbz w8, #0, LBB0_7
b LBB0_4
LBB0_4: ; in Loop: Header=BB0_1 Depth=1
ldr w8, [sp, #16]
ldr w9, [sp, #24]
subs w8, w8, w9
cset w8, ne
tbnz w8, #0, LBB0_6
b LBB0_5
LBB0_5:
mov w8, #1
str w8, [sp, #28]
b LBB0_8
LBB0_6: ; in Loop: Header=BB0_1 Depth=1
ldr w8, [sp, #16]
ldr w9, [sp, #20]
mul w8, w8, w9
str w8, [sp, #16]
ldr w8, [sp, #12]
add w8, w8, #1
str w8, [sp, #12]
b LBB0_1
LBB0_7:
str wzr, [sp, #28]
b LBB0_8
LBB0_8:
ldr w0, [sp, #28]
add sp, sp, #32
ret
.cfi_endproc
; -- End function
.subsections_via_symbols
|
eval/problem77/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, -8(%rbp)
movl $0, -12(%rbp)
LBB0_1: ## =>This Inner Loop Header: Depth=1
movl -12(%rbp), %eax
imull -12(%rbp), %eax
imull -12(%rbp), %eax
movl %eax, -16(%rbp) ## 4-byte Spill
movl -8(%rbp), %edi
callq _abs
movl %eax, %ecx
movl -16(%rbp), %eax ## 4-byte Reload
cmpl %ecx, %eax
jg LBB0_6
## %bb.2: ## in Loop: Header=BB0_1 Depth=1
movl -12(%rbp), %eax
imull -12(%rbp), %eax
imull -12(%rbp), %eax
movl %eax, -20(%rbp) ## 4-byte Spill
movl -8(%rbp), %edi
callq _abs
movl %eax, %ecx
movl -20(%rbp), %eax ## 4-byte Reload
cmpl %ecx, %eax
jne 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 -12(%rbp), %eax
addl $1, %eax
movl %eax, -12(%rbp)
jmp LBB0_1
LBB0_6:
movl $0, -4(%rbp)
LBB0_7:
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
stur w0, [x29, #-8]
stur wzr, [x29, #-12]
b LBB0_1
LBB0_1: ; =>This Inner Loop Header: Depth=1
ldur w8, [x29, #-12]
ldur w9, [x29, #-12]
mul w8, w8, w9
ldur w9, [x29, #-12]
mul w8, w8, w9
str w8, [sp, #16] ; 4-byte Folded Spill
ldur w0, [x29, #-8]
bl _abs
ldr w8, [sp, #16] ; 4-byte Folded Reload
subs w8, w8, w0
cset w8, gt
tbnz w8, #0, LBB0_6
b LBB0_2
LBB0_2: ; in Loop: Header=BB0_1 Depth=1
ldur w8, [x29, #-12]
ldur w9, [x29, #-12]
mul w8, w8, w9
ldur w9, [x29, #-12]
mul w8, w8, w9
str w8, [sp, #12] ; 4-byte Folded Spill
ldur w0, [x29, #-8]
bl _abs
ldr w8, [sp, #12] ; 4-byte Folded Reload
subs w8, w8, w0
cset w8, ne
tbnz w8, #0, LBB0_4
b LBB0_3
LBB0_3:
mov w8, #1
stur w8, [x29, #-4]
b LBB0_7
LBB0_4: ; in Loop: Header=BB0_1 Depth=1
b LBB0_5
LBB0_5: ; in Loop: Header=BB0_1 Depth=1
ldur w8, [x29, #-12]
add w8, w8, #1
stur w8, [x29, #-12]
b LBB0_1
LBB0_6:
stur wzr, [x29, #-4]
b LBB0_7
LBB0_7:
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/problem78/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)
leaq L_.str(%rip), %rax
movq %rax, -16(%rbp)
movl $0, -20(%rbp)
movl $0, -24(%rbp)
LBB0_1: ## =>This Inner Loop Header: Depth=1
movslq -24(%rbp), %rax
movq %rax, -32(%rbp) ## 8-byte Spill
movq -8(%rbp), %rdi
callq _strlen
movq %rax, %rcx
movq -32(%rbp), %rax ## 8-byte Reload
cmpq %rcx, %rax
jae LBB0_6
## %bb.2: ## in Loop: Header=BB0_1 Depth=1
movq -16(%rbp), %rdi
movq -8(%rbp), %rax
movslq -24(%rbp), %rcx
movsbl (%rax,%rcx), %esi
callq _strchr
cmpq $0, %rax
je 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
jmp LBB0_5
LBB0_5: ## in Loop: Header=BB0_1 Depth=1
movl -24(%rbp), %eax
addl $1, %eax
movl %eax, -24(%rbp)
jmp LBB0_1
LBB0_6:
movl -20(%rbp), %eax
addq $32, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "2357BD"
.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]
adrp x8, l_.str@PAGE
add x8, x8, l_.str@PAGEOFF
str x8, [sp, #16]
str wzr, [sp, #12]
str wzr, [sp, #8]
b LBB0_1
LBB0_1: ; =>This Inner Loop Header: Depth=1
ldrsw x8, [sp, #8]
str x8, [sp] ; 8-byte Folded Spill
ldur x0, [x29, #-8]
bl _strlen
ldr x8, [sp] ; 8-byte Folded Reload
subs x8, x8, x0
cset w8, hs
tbnz w8, #0, LBB0_6
b LBB0_2
LBB0_2: ; in Loop: Header=BB0_1 Depth=1
ldr x0, [sp, #16]
ldur x8, [x29, #-8]
ldrsw x9, [sp, #8]
ldrsb w1, [x8, x9]
bl _strchr
subs x8, x0, #0
cset w8, eq
tbnz w8, #0, LBB0_4
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_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, #8]
add w8, w8, #1
str w8, [sp, #8]
b LBB0_1
LBB0_6:
ldr w0, [sp, #12]
ldp x29, x30, [sp, #32] ; 16-byte Folded Reload
add sp, sp, #48
ret
.cfi_endproc
; -- End function
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "2357BD"
.subsections_via_symbols
|
eval/problem79/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 $0, -40(%rbp)
movl $0, -44(%rbp)
movl $0, -48(%rbp)
LBB0_1: ## =>This Inner Loop Header: Depth=1
movl -48(%rbp), %eax
cmpl -12(%rbp), %eax
jge LBB0_6
## %bb.2: ## in Loop: Header=BB0_1 Depth=1
movq -8(%rbp), %rax
movslq -48(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movq -24(%rbp), %rsi
callq _strstr
cmpq $0, %rax
je LBB0_4
## %bb.3: ## in Loop: Header=BB0_1 Depth=1
movq -40(%rbp), %rdi
movl -44(%rbp), %eax
addl $1, %eax
movslq %eax, %rsi
shlq $3, %rsi
callq _realloc
movq %rax, -40(%rbp)
movq -8(%rbp), %rax
movslq -48(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
movq -40(%rbp), %rax
movslq -44(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl -44(%rbp), %eax
addl $1, %eax
movl %eax, -44(%rbp)
LBB0_4: ## in Loop: Header=BB0_1 Depth=1
jmp LBB0_5
LBB0_5: ## in Loop: Header=BB0_1 Depth=1
movl -48(%rbp), %eax
addl $1, %eax
movl %eax, -48(%rbp)
jmp LBB0_1
LBB0_6:
movl -44(%rbp), %ecx
movq -32(%rbp), %rax
movl %ecx, (%rax)
movq -40(%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]
str x3, [sp, #16]
; kill: def $x8 killed $xzr
str xzr, [sp, #8]
str wzr, [sp, #4]
str wzr, [sp]
b LBB0_1
LBB0_1: ; =>This Inner Loop Header: Depth=1
ldr w8, [sp]
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]
ldr x0, [x8, x9, lsl #3]
ldr x1, [sp, #24]
bl _strstr
subs x8, x0, #0
cset w8, eq
tbnz w8, #0, LBB0_4
b LBB0_3
LBB0_3: ; in Loop: Header=BB0_1 Depth=1
ldr x0, [sp, #8]
ldr w8, [sp, #4]
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, #8]
ldur x8, [x29, #-8]
ldrsw x9, [sp]
ldr x8, [x8, x9, lsl #3]
ldr x9, [sp, #8]
ldrsw x10, [sp, #4]
str x8, [x9, x10, lsl #3]
ldr w8, [sp, #4]
add w8, w8, #1
str w8, [sp, #4]
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]
add w8, w8, #1
str w8, [sp]
b LBB0_1
LBB0_6:
ldr w8, [sp, #4]
ldr x9, [sp, #16]
str w8, [x9]
ldr x0, [sp, #8]
ldp x29, x30, [sp, #48] ; 16-byte Folded Reload
add sp, sp, #64
ret
.cfi_endproc
; -- End function
.subsections_via_symbols
|
eval/problem8/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 $64, %edi
callq _malloc
movq %rax, -24(%rbp)
cmpq $0, -24(%rbp)
jne LBB0_2
## %bb.1:
movq $0, -8(%rbp)
jmp LBB0_11
LBB0_2:
movl $62, -28(%rbp)
movq -24(%rbp), %rax
movb $0, 63(%rax)
cmpl $0, -12(%rbp)
jne LBB0_4
## %bb.3:
movq -24(%rbp), %rax
movl -28(%rbp), %ecx
movl %ecx, %edx
addl $-1, %edx
movl %edx, -28(%rbp)
movslq %ecx, %rcx
movb $48, (%rax,%rcx)
jmp LBB0_8
LBB0_4:
jmp LBB0_5
LBB0_5: ## =>This Inner Loop Header: Depth=1
cmpl $0, -12(%rbp)
jle LBB0_7
## %bb.6: ## in Loop: Header=BB0_5 Depth=1
movl -12(%rbp), %eax
movl $2, %ecx
cltd
idivl %ecx
addl $48, %edx
## kill: def $dl killed $dl killed $edx
movq -24(%rbp), %rax
movl -28(%rbp), %ecx
movl %ecx, %esi
addl $-1, %esi
movl %esi, -28(%rbp)
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movl -12(%rbp), %eax
movl $2, %ecx
cltd
idivl %ecx
movl %eax, -12(%rbp)
jmp LBB0_5
LBB0_7:
jmp LBB0_8
LBB0_8:
movq -24(%rbp), %rax
movl -28(%rbp), %ecx
movl %ecx, %edx
addl $-1, %edx
movl %edx, -28(%rbp)
movslq %ecx, %rcx
movb $98, (%rax,%rcx)
movq -24(%rbp), %rax
movl -28(%rbp), %ecx
movl %ecx, %edx
addl $-1, %edx
movl %edx, -28(%rbp)
movslq %ecx, %rcx
movb $100, (%rax,%rcx)
movl -28(%rbp), %eax
addl $1, %eax
movl %eax, -32(%rbp)
movl $62, %eax
subl -32(%rbp), %eax
movl %eax, -36(%rbp)
movl -36(%rbp), %eax
addl $3, %eax
movslq %eax, %rdi
callq _malloc
movq %rax, -48(%rbp)
cmpq $0, -48(%rbp)
jne LBB0_10
## %bb.9:
movq -24(%rbp), %rdi
callq _free
movq $0, -8(%rbp)
jmp LBB0_11
LBB0_10:
movq -48(%rbp), %rdi
movq -24(%rbp), %rsi
movslq -32(%rbp), %rax
addq %rax, %rsi
movq $-1, %rdx
callq ___strcpy_chk
movq -48(%rbp), %rdi
leaq L_.str(%rip), %rsi
movq $-1, %rdx
callq ___strcat_chk
movq -24(%rbp), %rdi
callq _free
movq -48(%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 "db"
.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 x0, #64
bl _malloc
stur x0, [x29, #-24]
ldur x8, [x29, #-24]
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_11
LBB0_2:
mov w8, #62
stur w8, [x29, #-28]
ldur x8, [x29, #-24]
strb wzr, [x8, #63]
ldur w8, [x29, #-12]
subs w8, w8, #0
cset w8, ne
tbnz w8, #0, LBB0_4
b LBB0_3
LBB0_3:
ldur x8, [x29, #-24]
ldursw x9, [x29, #-28]
mov x10, x9
subs w10, w10, #1
stur w10, [x29, #-28]
add x9, x8, x9
mov w8, #48
strb w8, [x9]
b LBB0_8
LBB0_4:
b LBB0_5
LBB0_5: ; =>This Inner Loop Header: Depth=1
ldur w8, [x29, #-12]
subs w8, w8, #0
cset w8, le
tbnz w8, #0, LBB0_7
b LBB0_6
LBB0_6: ; in Loop: Header=BB0_5 Depth=1
ldur w8, [x29, #-12]
mov w9, #2
sdiv w10, w8, w9
mul w10, w10, w9
subs w8, w8, w10
add w8, w8, #48
ldur x10, [x29, #-24]
ldursw x11, [x29, #-28]
mov x12, x11
subs w12, w12, #1
stur w12, [x29, #-28]
strb w8, [x10, x11]
ldur w8, [x29, #-12]
sdiv w8, w8, w9
stur w8, [x29, #-12]
b LBB0_5
LBB0_7:
b LBB0_8
LBB0_8:
ldur x8, [x29, #-24]
ldursw x9, [x29, #-28]
mov x10, x9
subs w10, w10, #1
stur w10, [x29, #-28]
add x9, x8, x9
mov w8, #98
strb w8, [x9]
ldur x8, [x29, #-24]
ldursw x9, [x29, #-28]
mov x10, x9
subs w10, w10, #1
stur w10, [x29, #-28]
add x9, x8, x9
mov w8, #100
strb w8, [x9]
ldur w8, [x29, #-28]
add w8, w8, #1
str w8, [sp, #32]
ldr w9, [sp, #32]
mov w8, #62
subs w8, w8, w9
str w8, [sp, #28]
ldr w8, [sp, #28]
add w9, w8, #3
; implicit-def: $x8
mov x8, x9
sxtw x0, w8
bl _malloc
str x0, [sp, #16]
ldr x8, [sp, #16]
subs x8, x8, #0
cset w8, ne
tbnz w8, #0, LBB0_10
b LBB0_9
LBB0_9:
ldur x0, [x29, #-24]
bl _free
; kill: def $x8 killed $xzr
stur xzr, [x29, #-8]
b LBB0_11
LBB0_10:
ldr x0, [sp, #16]
ldur x8, [x29, #-24]
ldrsw x9, [sp, #32]
add x1, x8, x9
mov x2, #-1
str x2, [sp, #8] ; 8-byte Folded Spill
bl ___strcpy_chk
ldr x2, [sp, #8] ; 8-byte Folded Reload
ldr x0, [sp, #16]
adrp x1, l_.str@PAGE
add x1, x1, l_.str@PAGEOFF
bl ___strcat_chk
ldur x0, [x29, #-24]
bl _free
ldr x8, [sp, #16]
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 "db"
.subsections_via_symbols
|
eval/problem80/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
cmpq $3, %rax
jae LBB0_2
## %bb.1:
movb $0, -1(%rbp)
jmp LBB0_10
LBB0_2:
movl $2, -20(%rbp)
LBB0_3: ## =>This Inner Loop Header: Depth=1
movslq -20(%rbp), %rax
movq %rax, -32(%rbp) ## 8-byte Spill
movq -16(%rbp), %rdi
callq _strlen
movq %rax, %rcx
movq -32(%rbp), %rax ## 8-byte Reload
cmpq %rcx, %rax
jae LBB0_9
## %bb.4: ## in Loop: Header=BB0_3 Depth=1
movq -16(%rbp), %rax
movslq -20(%rbp), %rcx
movsbl (%rax,%rcx), %eax
movq -16(%rbp), %rcx
movl -20(%rbp), %edx
subl $1, %edx
movslq %edx, %rdx
movsbl (%rcx,%rdx), %ecx
cmpl %ecx, %eax
je LBB0_6
## %bb.5: ## in Loop: Header=BB0_3 Depth=1
movq -16(%rbp), %rax
movslq -20(%rbp), %rcx
movsbl (%rax,%rcx), %eax
movq -16(%rbp), %rcx
movl -20(%rbp), %edx
subl $2, %edx
movslq %edx, %rdx
movsbl (%rcx,%rdx), %ecx
cmpl %ecx, %eax
jne LBB0_7
LBB0_6:
movb $0, -1(%rbp)
jmp LBB0_10
LBB0_7: ## in Loop: Header=BB0_3 Depth=1
jmp LBB0_8
LBB0_8: ## in Loop: Header=BB0_3 Depth=1
movl -20(%rbp), %eax
addl $1, %eax
movl %eax, -20(%rbp)
jmp LBB0_3
LBB0_9:
movb $1, -1(%rbp)
LBB0_10:
movb -1(%rbp), %al
andb $1, %al
movzbl %al, %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
subs x8, x0, #3
cset w8, hs
tbnz w8, #0, LBB0_2
b LBB0_1
LBB0_1:
mov w8, #0
and w8, w8, #0x1
and w8, w8, #0x1
sturb w8, [x29, #-1]
b LBB0_10
LBB0_2:
mov w8, #2
str w8, [sp, #12]
b LBB0_3
LBB0_3: ; =>This Inner Loop Header: Depth=1
ldrsw x8, [sp, #12]
str x8, [sp] ; 8-byte Folded Spill
ldr x0, [sp, #16]
bl _strlen
ldr x8, [sp] ; 8-byte Folded Reload
subs x8, x8, x0
cset w8, hs
tbnz w8, #0, LBB0_9
b LBB0_4
LBB0_4: ; in Loop: Header=BB0_3 Depth=1
ldr x8, [sp, #16]
ldrsw x9, [sp, #12]
ldrsb w8, [x8, x9]
ldr x9, [sp, #16]
ldr w10, [sp, #12]
subs w10, w10, #1
ldrsb w9, [x9, w10, sxtw]
subs w8, w8, w9
cset w8, eq
tbnz w8, #0, LBB0_6
b LBB0_5
LBB0_5: ; in Loop: Header=BB0_3 Depth=1
ldr x8, [sp, #16]
ldrsw x9, [sp, #12]
ldrsb w8, [x8, x9]
ldr x9, [sp, #16]
ldr w10, [sp, #12]
subs w10, w10, #2
ldrsb w9, [x9, w10, sxtw]
subs w8, w8, w9
cset w8, ne
tbnz w8, #0, LBB0_7
b LBB0_6
LBB0_6:
mov w8, #0
and w8, w8, #0x1
and w8, w8, #0x1
sturb w8, [x29, #-1]
b LBB0_10
LBB0_7: ; in Loop: Header=BB0_3 Depth=1
b LBB0_8
LBB0_8: ; in Loop: Header=BB0_3 Depth=1
ldr w8, [sp, #12]
add w8, w8, #1
str w8, [sp, #12]
b LBB0_3
LBB0_9:
mov w8, #1
and w8, w8, #0x1
and w8, w8, #0x1
sturb w8, [x29, #-1]
b LBB0_10
LBB0_10:
ldurb w8, [x29, #-1]
and w0, w8, #0x1
ldp x29, x30, [sp, #32] ; 16-byte Folded Reload
add sp, sp, #48
ret
.cfi_endproc
; -- End function
.subsections_via_symbols
|
eval/problem81/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 0x400fffcb923a29c7 ## double 3.9998999999999998
LCPI0_1:
.quad 0x400d99ce075f6fd2 ## double 3.7000999999999999
LCPI0_2:
.quad 0x400a669ad42c3c9f ## double 3.3001
LCPI0_3:
.quad 0x400800346dc5d639 ## double 3.0001000000000002
LCPI0_4:
.quad 0x400599ce075f6fd2 ## double 2.7000999999999999
LCPI0_5:
.quad 0x4002669ad42c3c9f ## double 2.3001
LCPI0_6:
.quad 0x400000346dc5d639 ## double 2.0001000000000002
LCPI0_7:
.quad 0x3ffb339c0ebedfa4 ## double 1.7000999999999999
LCPI0_8:
.quad 0x3ff4cd35a858793e ## double 1.3001
LCPI0_9:
.quad 0x3ff00068db8bac71 ## double 1.0001
LCPI0_10:
.quad 0x3fe667381d7dbf48 ## double 0.70009999999999994
LCPI0_11:
.quad 0x3f1a36e2eb1c432d ## double 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
subq $32, %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 Inner Loop Header: Depth=1
movl -28(%rbp), %eax
cmpl -12(%rbp), %eax
jge LBB0_40
## %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, %xmm0
movsd LCPI0_0(%rip), %xmm1 ## xmm1 = mem[0],zero
ucomisd %xmm1, %xmm0
jb LBB0_4
## %bb.3: ## in Loop: Header=BB0_1 Depth=1
movq -24(%rbp), %rax
movslq -28(%rbp), %rcx
leaq L_.str(%rip), %rdx
movq %rdx, (%rax,%rcx,8)
jmp LBB0_38
LBB0_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
movsd LCPI0_1(%rip), %xmm1 ## xmm1 = mem[0],zero
ucomisd %xmm1, %xmm0
jbe LBB0_6
## %bb.5: ## in Loop: Header=BB0_1 Depth=1
movq -24(%rbp), %rax
movslq -28(%rbp), %rcx
leaq L_.str.1(%rip), %rdx
movq %rdx, (%rax,%rcx,8)
jmp LBB0_37
LBB0_6: ## 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
movsd LCPI0_2(%rip), %xmm1 ## xmm1 = mem[0],zero
ucomisd %xmm1, %xmm0
jbe LBB0_8
## %bb.7: ## in Loop: Header=BB0_1 Depth=1
movq -24(%rbp), %rax
movslq -28(%rbp), %rcx
leaq L_.str.2(%rip), %rdx
movq %rdx, (%rax,%rcx,8)
jmp LBB0_36
LBB0_8: ## 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
movsd LCPI0_3(%rip), %xmm1 ## xmm1 = mem[0],zero
ucomisd %xmm1, %xmm0
jbe LBB0_10
## %bb.9: ## in Loop: Header=BB0_1 Depth=1
movq -24(%rbp), %rax
movslq -28(%rbp), %rcx
leaq L_.str.3(%rip), %rdx
movq %rdx, (%rax,%rcx,8)
jmp LBB0_35
LBB0_10: ## 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
movsd LCPI0_4(%rip), %xmm1 ## xmm1 = mem[0],zero
ucomisd %xmm1, %xmm0
jbe LBB0_12
## %bb.11: ## in Loop: Header=BB0_1 Depth=1
movq -24(%rbp), %rax
movslq -28(%rbp), %rcx
leaq L_.str.4(%rip), %rdx
movq %rdx, (%rax,%rcx,8)
jmp LBB0_34
LBB0_12: ## 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
movsd LCPI0_5(%rip), %xmm1 ## xmm1 = mem[0],zero
ucomisd %xmm1, %xmm0
jbe LBB0_14
## %bb.13: ## in Loop: Header=BB0_1 Depth=1
movq -24(%rbp), %rax
movslq -28(%rbp), %rcx
leaq L_.str.5(%rip), %rdx
movq %rdx, (%rax,%rcx,8)
jmp LBB0_33
LBB0_14: ## 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
movsd LCPI0_6(%rip), %xmm1 ## xmm1 = mem[0],zero
ucomisd %xmm1, %xmm0
jbe LBB0_16
## %bb.15: ## in Loop: Header=BB0_1 Depth=1
movq -24(%rbp), %rax
movslq -28(%rbp), %rcx
leaq L_.str.6(%rip), %rdx
movq %rdx, (%rax,%rcx,8)
jmp LBB0_32
LBB0_16: ## 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
movsd LCPI0_7(%rip), %xmm1 ## xmm1 = mem[0],zero
ucomisd %xmm1, %xmm0
jbe LBB0_18
## %bb.17: ## in Loop: Header=BB0_1 Depth=1
movq -24(%rbp), %rax
movslq -28(%rbp), %rcx
leaq L_.str.7(%rip), %rdx
movq %rdx, (%rax,%rcx,8)
jmp LBB0_31
LBB0_18: ## 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
movsd LCPI0_8(%rip), %xmm1 ## xmm1 = mem[0],zero
ucomisd %xmm1, %xmm0
jbe LBB0_20
## %bb.19: ## in Loop: Header=BB0_1 Depth=1
movq -24(%rbp), %rax
movslq -28(%rbp), %rcx
leaq L_.str.8(%rip), %rdx
movq %rdx, (%rax,%rcx,8)
jmp LBB0_30
LBB0_20: ## 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
movsd LCPI0_9(%rip), %xmm1 ## xmm1 = mem[0],zero
ucomisd %xmm1, %xmm0
jbe LBB0_22
## %bb.21: ## in Loop: Header=BB0_1 Depth=1
movq -24(%rbp), %rax
movslq -28(%rbp), %rcx
leaq L_.str.9(%rip), %rdx
movq %rdx, (%rax,%rcx,8)
jmp LBB0_29
LBB0_22: ## 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
movsd LCPI0_10(%rip), %xmm1 ## xmm1 = mem[0],zero
ucomisd %xmm1, %xmm0
jbe LBB0_24
## %bb.23: ## in Loop: Header=BB0_1 Depth=1
movq -24(%rbp), %rax
movslq -28(%rbp), %rcx
leaq L_.str.10(%rip), %rdx
movq %rdx, (%rax,%rcx,8)
jmp LBB0_28
LBB0_24: ## 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
movsd LCPI0_11(%rip), %xmm1 ## xmm1 = mem[0],zero
ucomisd %xmm1, %xmm0
jbe LBB0_26
## %bb.25: ## in Loop: Header=BB0_1 Depth=1
movq -24(%rbp), %rax
movslq -28(%rbp), %rcx
leaq L_.str.11(%rip), %rdx
movq %rdx, (%rax,%rcx,8)
jmp LBB0_27
LBB0_26: ## in Loop: Header=BB0_1 Depth=1
movq -24(%rbp), %rax
movslq -28(%rbp), %rcx
leaq L_.str.12(%rip), %rdx
movq %rdx, (%rax,%rcx,8)
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
jmp LBB0_30
LBB0_30: ## in Loop: Header=BB0_1 Depth=1
jmp LBB0_31
LBB0_31: ## in Loop: Header=BB0_1 Depth=1
jmp LBB0_32
LBB0_32: ## in Loop: Header=BB0_1 Depth=1
jmp LBB0_33
LBB0_33: ## in Loop: Header=BB0_1 Depth=1
jmp LBB0_34
LBB0_34: ## in Loop: Header=BB0_1 Depth=1
jmp LBB0_35
LBB0_35: ## in Loop: Header=BB0_1 Depth=1
jmp LBB0_36
LBB0_36: ## in Loop: Header=BB0_1 Depth=1
jmp LBB0_37
LBB0_37: ## in Loop: Header=BB0_1 Depth=1
jmp LBB0_38
LBB0_38: ## in Loop: Header=BB0_1 Depth=1
jmp LBB0_39
LBB0_39: ## in Loop: Header=BB0_1 Depth=1
movl -28(%rbp), %eax
addl $1, %eax
movl %eax, -28(%rbp)
jmp LBB0_1
LBB0_40:
movq -24(%rbp), %rax
addq $32, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "A+"
L_.str.1: ## @.str.1
.asciz "A"
L_.str.2: ## @.str.2
.asciz "A-"
L_.str.3: ## @.str.3
.asciz "B+"
L_.str.4: ## @.str.4
.asciz "B"
L_.str.5: ## @.str.5
.asciz "B-"
L_.str.6: ## @.str.6
.asciz "C+"
L_.str.7: ## @.str.7
.asciz "C"
L_.str.8: ## @.str.8
.asciz "C-"
L_.str.9: ## @.str.9
.asciz "D+"
L_.str.10: ## @.str.10
.asciz "D"
L_.str.11: ## @.str.11
.asciz "D-"
L_.str.12: ## @.str.12
.asciz "E"
.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
lCPI0_1:
.quad 0x3fe667381d7dbf48 ; double 0.70009999999999994
lCPI0_2:
.quad 0x3ff00068db8bac71 ; double 1.0001
lCPI0_3:
.quad 0x3ff4cd35a858793e ; double 1.3001
lCPI0_4:
.quad 0x3ffb339c0ebedfa4 ; double 1.7000999999999999
lCPI0_5:
.quad 0x400000346dc5d639 ; double 2.0001000000000002
lCPI0_6:
.quad 0x4002669ad42c3c9f ; double 2.3001
lCPI0_7:
.quad 0x400599ce075f6fd2 ; double 2.7000999999999999
lCPI0_8:
.quad 0x400800346dc5d639 ; double 3.0001000000000002
lCPI0_9:
.quad 0x400a669ad42c3c9f ; double 3.3001
lCPI0_10:
.quad 0x400d99ce075f6fd2 ; double 3.7000999999999999
lCPI0_11:
.quad 0x400fffcb923a29c7 ; double 3.9998999999999998
.section __TEXT,__text,regular,pure_instructions
.globl _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]
ldursw x8, [x29, #-12]
lsl x0, x8, #3
bl _malloc
str x0, [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_40
b LBB0_2
LBB0_2: ; in Loop: Header=BB0_1 Depth=1
ldur x8, [x29, #-8]
ldrsw x9, [sp, #4]
ldr s0, [x8, x9, lsl #2]
fcvt d0, s0
adrp x8, lCPI0_11@PAGE
ldr d1, [x8, lCPI0_11@PAGEOFF]
fcmp d0, d1
cset w8, lt
tbnz w8, #0, LBB0_4
b LBB0_3
LBB0_3: ; in Loop: Header=BB0_1 Depth=1
ldr x9, [sp, #8]
ldrsw x10, [sp, #4]
adrp x8, l_.str@PAGE
add x8, x8, l_.str@PAGEOFF
str x8, [x9, x10, lsl #3]
b LBB0_38
LBB0_4: ; in Loop: Header=BB0_1 Depth=1
ldur x8, [x29, #-8]
ldrsw x9, [sp, #4]
ldr s0, [x8, x9, lsl #2]
fcvt d0, s0
adrp x8, lCPI0_10@PAGE
ldr d1, [x8, lCPI0_10@PAGEOFF]
fcmp d0, d1
cset w8, le
tbnz w8, #0, LBB0_6
b LBB0_5
LBB0_5: ; in Loop: Header=BB0_1 Depth=1
ldr x9, [sp, #8]
ldrsw x10, [sp, #4]
adrp x8, l_.str.1@PAGE
add x8, x8, l_.str.1@PAGEOFF
str x8, [x9, x10, lsl #3]
b LBB0_37
LBB0_6: ; in Loop: Header=BB0_1 Depth=1
ldur x8, [x29, #-8]
ldrsw x9, [sp, #4]
ldr s0, [x8, x9, lsl #2]
fcvt d0, s0
adrp x8, lCPI0_9@PAGE
ldr d1, [x8, lCPI0_9@PAGEOFF]
fcmp d0, d1
cset w8, le
tbnz w8, #0, LBB0_8
b LBB0_7
LBB0_7: ; in Loop: Header=BB0_1 Depth=1
ldr x9, [sp, #8]
ldrsw x10, [sp, #4]
adrp x8, l_.str.2@PAGE
add x8, x8, l_.str.2@PAGEOFF
str x8, [x9, x10, lsl #3]
b LBB0_36
LBB0_8: ; in Loop: Header=BB0_1 Depth=1
ldur x8, [x29, #-8]
ldrsw x9, [sp, #4]
ldr s0, [x8, x9, lsl #2]
fcvt d0, s0
adrp x8, lCPI0_8@PAGE
ldr d1, [x8, lCPI0_8@PAGEOFF]
fcmp d0, d1
cset w8, le
tbnz w8, #0, LBB0_10
b LBB0_9
LBB0_9: ; in Loop: Header=BB0_1 Depth=1
ldr x9, [sp, #8]
ldrsw x10, [sp, #4]
adrp x8, l_.str.3@PAGE
add x8, x8, l_.str.3@PAGEOFF
str x8, [x9, x10, lsl #3]
b LBB0_35
LBB0_10: ; in Loop: Header=BB0_1 Depth=1
ldur x8, [x29, #-8]
ldrsw x9, [sp, #4]
ldr s0, [x8, x9, lsl #2]
fcvt d0, s0
adrp x8, lCPI0_7@PAGE
ldr d1, [x8, lCPI0_7@PAGEOFF]
fcmp d0, d1
cset w8, le
tbnz w8, #0, LBB0_12
b LBB0_11
LBB0_11: ; in Loop: Header=BB0_1 Depth=1
ldr x9, [sp, #8]
ldrsw x10, [sp, #4]
adrp x8, l_.str.4@PAGE
add x8, x8, l_.str.4@PAGEOFF
str x8, [x9, x10, lsl #3]
b LBB0_34
LBB0_12: ; in Loop: Header=BB0_1 Depth=1
ldur x8, [x29, #-8]
ldrsw x9, [sp, #4]
ldr s0, [x8, x9, lsl #2]
fcvt d0, s0
adrp x8, lCPI0_6@PAGE
ldr d1, [x8, lCPI0_6@PAGEOFF]
fcmp d0, d1
cset w8, le
tbnz w8, #0, LBB0_14
b LBB0_13
LBB0_13: ; in Loop: Header=BB0_1 Depth=1
ldr x9, [sp, #8]
ldrsw x10, [sp, #4]
adrp x8, l_.str.5@PAGE
add x8, x8, l_.str.5@PAGEOFF
str x8, [x9, x10, lsl #3]
b LBB0_33
LBB0_14: ; in Loop: Header=BB0_1 Depth=1
ldur x8, [x29, #-8]
ldrsw x9, [sp, #4]
ldr s0, [x8, x9, lsl #2]
fcvt d0, s0
adrp x8, lCPI0_5@PAGE
ldr d1, [x8, lCPI0_5@PAGEOFF]
fcmp d0, d1
cset w8, le
tbnz w8, #0, LBB0_16
b LBB0_15
LBB0_15: ; in Loop: Header=BB0_1 Depth=1
ldr x9, [sp, #8]
ldrsw x10, [sp, #4]
adrp x8, l_.str.6@PAGE
add x8, x8, l_.str.6@PAGEOFF
str x8, [x9, x10, lsl #3]
b LBB0_32
LBB0_16: ; in Loop: Header=BB0_1 Depth=1
ldur x8, [x29, #-8]
ldrsw x9, [sp, #4]
ldr s0, [x8, x9, lsl #2]
fcvt d0, s0
adrp x8, lCPI0_4@PAGE
ldr d1, [x8, lCPI0_4@PAGEOFF]
fcmp d0, d1
cset w8, le
tbnz w8, #0, LBB0_18
b LBB0_17
LBB0_17: ; in Loop: Header=BB0_1 Depth=1
ldr x9, [sp, #8]
ldrsw x10, [sp, #4]
adrp x8, l_.str.7@PAGE
add x8, x8, l_.str.7@PAGEOFF
str x8, [x9, x10, lsl #3]
b LBB0_31
LBB0_18: ; in Loop: Header=BB0_1 Depth=1
ldur x8, [x29, #-8]
ldrsw x9, [sp, #4]
ldr s0, [x8, x9, lsl #2]
fcvt d0, s0
adrp x8, lCPI0_3@PAGE
ldr d1, [x8, lCPI0_3@PAGEOFF]
fcmp d0, d1
cset w8, le
tbnz w8, #0, LBB0_20
b LBB0_19
LBB0_19: ; in Loop: Header=BB0_1 Depth=1
ldr x9, [sp, #8]
ldrsw x10, [sp, #4]
adrp x8, l_.str.8@PAGE
add x8, x8, l_.str.8@PAGEOFF
str x8, [x9, x10, lsl #3]
b LBB0_30
LBB0_20: ; in Loop: Header=BB0_1 Depth=1
ldur x8, [x29, #-8]
ldrsw x9, [sp, #4]
ldr s0, [x8, x9, lsl #2]
fcvt d0, s0
adrp x8, lCPI0_2@PAGE
ldr d1, [x8, lCPI0_2@PAGEOFF]
fcmp d0, d1
cset w8, le
tbnz w8, #0, LBB0_22
b LBB0_21
LBB0_21: ; in Loop: Header=BB0_1 Depth=1
ldr x9, [sp, #8]
ldrsw x10, [sp, #4]
adrp x8, l_.str.9@PAGE
add x8, x8, l_.str.9@PAGEOFF
str x8, [x9, x10, lsl #3]
b LBB0_29
LBB0_22: ; in Loop: Header=BB0_1 Depth=1
ldur x8, [x29, #-8]
ldrsw x9, [sp, #4]
ldr s0, [x8, x9, lsl #2]
fcvt d0, s0
adrp x8, lCPI0_1@PAGE
ldr d1, [x8, lCPI0_1@PAGEOFF]
fcmp d0, d1
cset w8, le
tbnz w8, #0, LBB0_24
b LBB0_23
LBB0_23: ; in Loop: Header=BB0_1 Depth=1
ldr x9, [sp, #8]
ldrsw x10, [sp, #4]
adrp x8, l_.str.10@PAGE
add x8, x8, l_.str.10@PAGEOFF
str x8, [x9, x10, lsl #3]
b LBB0_28
LBB0_24: ; in Loop: Header=BB0_1 Depth=1
ldur x8, [x29, #-8]
ldrsw x9, [sp, #4]
ldr s0, [x8, x9, lsl #2]
fcvt d0, s0
adrp x8, lCPI0_0@PAGE
ldr d1, [x8, lCPI0_0@PAGEOFF]
fcmp d0, d1
cset w8, le
tbnz w8, #0, LBB0_26
b LBB0_25
LBB0_25: ; in Loop: Header=BB0_1 Depth=1
ldr x9, [sp, #8]
ldrsw x10, [sp, #4]
adrp x8, l_.str.11@PAGE
add x8, x8, l_.str.11@PAGEOFF
str x8, [x9, x10, lsl #3]
b LBB0_27
LBB0_26: ; in Loop: Header=BB0_1 Depth=1
ldr x9, [sp, #8]
ldrsw x10, [sp, #4]
adrp x8, l_.str.12@PAGE
add x8, x8, l_.str.12@PAGEOFF
str x8, [x9, x10, lsl #3]
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
b LBB0_30
LBB0_30: ; in Loop: Header=BB0_1 Depth=1
b LBB0_31
LBB0_31: ; in Loop: Header=BB0_1 Depth=1
b LBB0_32
LBB0_32: ; in Loop: Header=BB0_1 Depth=1
b LBB0_33
LBB0_33: ; in Loop: Header=BB0_1 Depth=1
b LBB0_34
LBB0_34: ; in Loop: Header=BB0_1 Depth=1
b LBB0_35
LBB0_35: ; in Loop: Header=BB0_1 Depth=1
b LBB0_36
LBB0_36: ; in Loop: Header=BB0_1 Depth=1
b LBB0_37
LBB0_37: ; in Loop: Header=BB0_1 Depth=1
b LBB0_38
LBB0_38: ; in Loop: Header=BB0_1 Depth=1
b LBB0_39
LBB0_39: ; in Loop: Header=BB0_1 Depth=1
ldr w8, [sp, #4]
add w8, w8, #1
str w8, [sp, #4]
b LBB0_1
LBB0_40:
ldr x0, [sp, #8]
ldp x29, x30, [sp, #32] ; 16-byte Folded Reload
add sp, sp, #48
ret
.cfi_endproc
; -- End function
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "A+"
l_.str.1: ; @.str.1
.asciz "A"
l_.str.2: ; @.str.2
.asciz "A-"
l_.str.3: ; @.str.3
.asciz "B+"
l_.str.4: ; @.str.4
.asciz "B"
l_.str.5: ; @.str.5
.asciz "B-"
l_.str.6: ; @.str.6
.asciz "C+"
l_.str.7: ; @.str.7
.asciz "C"
l_.str.8: ; @.str.8
.asciz "C-"
l_.str.9: ; @.str.9
.asciz "D+"
l_.str.10: ; @.str.10
.asciz "D"
l_.str.11: ; @.str.11
.asciz "D-"
l_.str.12: ; @.str.12
.asciz "E"
.subsections_via_symbols
|
eval/problem82/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 $2, -20(%rbp)
jge LBB0_2
## %bb.1:
movb $0, -1(%rbp)
jmp LBB0_9
LBB0_2:
movl $2, -24(%rbp)
LBB0_3: ## =>This Inner Loop Header: Depth=1
movl -24(%rbp), %eax
imull -24(%rbp), %eax
cmpl -20(%rbp), %eax
jg LBB0_8
## %bb.4: ## in Loop: Header=BB0_3 Depth=1
movl -20(%rbp), %eax
cltd
idivl -24(%rbp)
cmpl $0, %edx
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
movl -24(%rbp), %eax
addl $1, %eax
movl %eax, -24(%rbp)
jmp LBB0_3
LBB0_8:
movb $1, -1(%rbp)
LBB0_9:
movb -1(%rbp), %al
andb $1, %al
movzbl %al, %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, #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
sturb w8, [x29, #-1]
b LBB0_9
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, #12]
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, #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_6
b LBB0_5
LBB0_5:
mov w8, #0
and w8, w8, #0x1
and w8, w8, #0x1
sturb w8, [x29, #-1]
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 w8, [sp, #8]
add w8, w8, #1
str w8, [sp, #8]
b LBB0_3
LBB0_8:
mov w8, #1
and w8, w8, #0x1
and w8, w8, #0x1
sturb w8, [x29, #-1]
b LBB0_9
LBB0_9:
ldurb w8, [x29, #-1]
and w0, w8, #0x1
ldp x29, x30, [sp, #32] ; 16-byte Folded Reload
add sp, sp, #48
ret
.cfi_endproc
; -- End function
.subsections_via_symbols
|
eval/problem83/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)
cmpl $1, -8(%rbp)
jge LBB0_2
## %bb.1:
movl $0, -4(%rbp)
jmp LBB0_9
LBB0_2:
cmpl $1, -8(%rbp)
jne LBB0_4
## %bb.3:
movl $1, -4(%rbp)
jmp LBB0_9
LBB0_4:
movl $18, -12(%rbp)
movl $2, -16(%rbp)
LBB0_5: ## =>This Inner Loop Header: Depth=1
movl -16(%rbp), %eax
cmpl -8(%rbp), %eax
jge LBB0_8
## %bb.6: ## in Loop: Header=BB0_5 Depth=1
imull $10, -12(%rbp), %eax
movl %eax, -12(%rbp)
## %bb.7: ## in Loop: Header=BB0_5 Depth=1
movl -16(%rbp), %eax
addl $1, %eax
movl %eax, -16(%rbp)
jmp LBB0_5
LBB0_8:
movl -12(%rbp), %eax
movl %eax, -4(%rbp)
LBB0_9:
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]
subs w8, w8, #1
cset w8, ge
tbnz w8, #0, LBB0_2
b LBB0_1
LBB0_1:
str wzr, [sp, #12]
b LBB0_9
LBB0_2:
ldr w8, [sp, #8]
subs w8, w8, #1
cset w8, ne
tbnz w8, #0, LBB0_4
b LBB0_3
LBB0_3:
mov w8, #1
str w8, [sp, #12]
b LBB0_9
LBB0_4:
mov w8, #18
str w8, [sp, #4]
mov w8, #2
str w8, [sp]
b LBB0_5
LBB0_5: ; =>This Inner Loop Header: Depth=1
ldr w8, [sp]
ldr w9, [sp, #8]
subs w8, w8, w9
cset w8, ge
tbnz w8, #0, LBB0_8
b LBB0_6
LBB0_6: ; in Loop: Header=BB0_5 Depth=1
ldr w8, [sp, #4]
mov w9, #10
mul w8, w8, w9
str w8, [sp, #4]
b LBB0_7
LBB0_7: ; in Loop: Header=BB0_5 Depth=1
ldr w8, [sp]
add w8, w8, #1
str w8, [sp]
b LBB0_5
LBB0_8:
ldr w8, [sp, #4]
str w8, [sp, #12]
b LBB0_9
LBB0_9:
ldr w0, [sp, #12]
add sp, sp, #16
ret
.cfi_endproc
; -- End function
.subsections_via_symbols
|
eval/problem84/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)
leaq -10(%rbp), %rdi
movl -4(%rbp), %r8d
xorl %esi, %esi
movl $6, %edx
leaq L_.str(%rip), %rcx
movb $0, %al
callq ___sprintf_chk
movl $0, -16(%rbp)
movl $0, -20(%rbp)
LBB0_1: ## =>This Inner Loop Header: Depth=1
movslq -20(%rbp), %rax
movsbl -10(%rbp,%rax), %eax
cmpl $0, %eax
je LBB0_4
## %bb.2: ## in Loop: Header=BB0_1 Depth=1
movslq -20(%rbp), %rax
movsbl -10(%rbp,%rax), %eax
subl $48, %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 $33, %edi
callq _malloc
movq %rax, -32(%rbp)
movl $0, -36(%rbp)
cmpl $0, -16(%rbp)
jne LBB0_6
## %bb.5:
movq -32(%rbp), %rax
movl -36(%rbp), %ecx
movl %ecx, %edx
addl $1, %edx
movl %edx, -36(%rbp)
movslq %ecx, %rcx
movb $48, (%rax,%rcx)
jmp LBB0_10
LBB0_6:
jmp LBB0_7
LBB0_7: ## =>This Inner Loop Header: Depth=1
cmpl $0, -16(%rbp)
jle LBB0_9
## %bb.8: ## in Loop: Header=BB0_7 Depth=1
movl -16(%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 -16(%rbp), %eax
movl $2, %ecx
cltd
idivl %ecx
movl %eax, -16(%rbp)
jmp LBB0_7
LBB0_9:
jmp LBB0_10
LBB0_10:
movq -32(%rbp), %rax
movslq -36(%rbp), %rcx
movb $0, (%rax,%rcx)
movl $0, -40(%rbp)
LBB0_11: ## =>This Inner Loop Header: Depth=1
movl -40(%rbp), %eax
movl %eax, -48(%rbp) ## 4-byte Spill
movl -36(%rbp), %eax
movl $2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -48(%rbp), %eax ## 4-byte Reload
cmpl %ecx, %eax
jge LBB0_14
## %bb.12: ## in Loop: Header=BB0_11 Depth=1
movq -32(%rbp), %rax
movslq -40(%rbp), %rcx
movb (%rax,%rcx), %al
movb %al, -41(%rbp)
movq -32(%rbp), %rax
movl -36(%rbp), %ecx
subl -40(%rbp), %ecx
subl $1, %ecx
movslq %ecx, %rcx
movb (%rax,%rcx), %dl
movq -32(%rbp), %rax
movslq -40(%rbp), %rcx
movb %dl, (%rax,%rcx)
movb -41(%rbp), %dl
movq -32(%rbp), %rax
movl -36(%rbp), %ecx
subl -40(%rbp), %ecx
subl $1, %ecx
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
## %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:
movq -32(%rbp), %rax
addq $48, %rsp
popq %rbp
retq
.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, #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, #-4]
ldur w9, [x29, #-4]
; implicit-def: $x8
mov x8, x9
mov x9, sp
str x8, [x9]
sub x0, x29, #10
mov w1, #0
mov x2, #6
adrp x3, l_.str@PAGE
add x3, x3, l_.str@PAGEOFF
bl ___sprintf_chk
stur wzr, [x29, #-16]
stur wzr, [x29, #-20]
b LBB0_1
LBB0_1: ; =>This Inner Loop Header: Depth=1
ldursw x9, [x29, #-20]
sub x8, x29, #10
ldrsb w8, [x8, x9]
subs w8, w8, #0
cset w8, eq
tbnz w8, #0, LBB0_4
b LBB0_2
LBB0_2: ; in Loop: Header=BB0_1 Depth=1
ldursw x9, [x29, #-20]
sub x8, x29, #10
ldrsb w8, [x8, x9]
subs w9, w8, #48
ldur w8, [x29, #-16]
add w8, w8, w9
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:
mov x0, #33
bl _malloc
str x0, [sp, #32]
str wzr, [sp, #28]
ldur w8, [x29, #-16]
subs w8, w8, #0
cset w8, ne
tbnz w8, #0, LBB0_6
b LBB0_5
LBB0_5:
ldr x8, [sp, #32]
ldrsw x9, [sp, #28]
mov x10, x9
add w10, w10, #1
str w10, [sp, #28]
add x9, x8, x9
mov w8, #48
strb w8, [x9]
b LBB0_10
LBB0_6:
b LBB0_7
LBB0_7: ; =>This Inner Loop Header: Depth=1
ldur w8, [x29, #-16]
subs w8, w8, #0
cset w8, le
tbnz w8, #0, LBB0_9
b LBB0_8
LBB0_8: ; in Loop: Header=BB0_7 Depth=1
ldur w8, [x29, #-16]
mov w9, #2
sdiv w10, w8, w9
mul w10, w10, w9
subs w8, w8, w10
add w8, w8, #48
ldr x10, [sp, #32]
ldrsw x11, [sp, #28]
mov x12, x11
add w12, w12, #1
str w12, [sp, #28]
strb w8, [x10, x11]
ldur w8, [x29, #-16]
sdiv w8, w8, w9
stur w8, [x29, #-16]
b LBB0_7
LBB0_9:
b LBB0_10
LBB0_10:
ldr x8, [sp, #32]
ldrsw x9, [sp, #28]
add x8, x8, x9
strb wzr, [x8]
str wzr, [sp, #24]
b LBB0_11
LBB0_11: ; =>This Inner Loop Header: Depth=1
ldr w8, [sp, #24]
ldr w9, [sp, #28]
mov w10, #2
sdiv w9, w9, w10
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, #32]
ldrsw x9, [sp, #24]
add x8, x8, x9
ldrb w8, [x8]
strb w8, [sp, #23]
ldr x8, [sp, #32]
ldr w9, [sp, #28]
ldr w10, [sp, #24]
subs w9, w9, w10
subs w9, w9, #1
add x8, x8, w9, sxtw
ldrb w8, [x8]
ldr x9, [sp, #32]
ldrsw x10, [sp, #24]
add x9, x9, x10
strb w8, [x9]
ldrb w8, [sp, #23]
ldr x9, [sp, #32]
ldr w10, [sp, #28]
ldr w11, [sp, #24]
subs w10, w10, w11
subs w10, w10, #1
add x9, x9, w10, sxtw
strb w8, [x9]
b LBB0_13
LBB0_13: ; in Loop: Header=BB0_11 Depth=1
ldr w8, [sp, #24]
add w8, w8, #1
str w8, [sp, #24]
b LBB0_11
LBB0_14:
ldr x0, [sp, #32]
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"
.subsections_via_symbols
|
eval/problem85/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
addl $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
addl $1, %ecx
movslq %ecx, %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
movq -8(%rbp), %rax
movl -20(%rbp), %ecx
shll $1, %ecx
addl $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 w8, [sp, #12]
lsl w8, w8, #1
add w8, w8, #1
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]
ldr w9, [sp, #12]
lsl w9, w9, #1
add 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, #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]
ldr w9, [sp, #12]
lsl w9, w9, #1
add 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/problem86/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 $128, %rsp
movq ___stack_chk_guard@GOTPCREL(%rip), %rax
movq (%rax), %rax
movq %rax, -8(%rbp)
movq %rdi, -72(%rbp)
movq -72(%rbp), %rdi
callq _strlen
## kill: def $eax killed $eax killed $rax
movl %eax, -76(%rbp)
movl -76(%rbp), %eax
addl $2, %eax
movslq %eax, %rdi
callq _malloc
movq %rax, -88(%rbp)
movl $0, -92(%rbp)
movl $0, -96(%rbp)
movl $0, -100(%rbp)
LBB0_1: ## =>This Loop Header: Depth=1
## Child Loop BB0_5 Depth 2
## Child Loop BB0_7 Depth 3
## Child Loop BB0_17 Depth 2
movl -100(%rbp), %eax
cmpl -76(%rbp), %eax
jg LBB0_24
## %bb.2: ## in Loop: Header=BB0_1 Depth=1
movq -72(%rbp), %rax
movslq -100(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $32, %eax
je LBB0_4
## %bb.3: ## in Loop: Header=BB0_1 Depth=1
movq -72(%rbp), %rax
movslq -100(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0, %eax
jne LBB0_21
LBB0_4: ## in Loop: Header=BB0_1 Depth=1
movl $0, -104(%rbp)
LBB0_5: ## Parent Loop BB0_1 Depth=1
## => This Loop Header: Depth=2
## Child Loop BB0_7 Depth 3
movl -104(%rbp), %eax
movl -96(%rbp), %ecx
subl $1, %ecx
cmpl %ecx, %eax
jge LBB0_14
## %bb.6: ## in Loop: Header=BB0_5 Depth=2
movl -104(%rbp), %eax
addl $1, %eax
movl %eax, -108(%rbp)
LBB0_7: ## Parent Loop BB0_1 Depth=1
## Parent Loop BB0_5 Depth=2
## => This Inner Loop Header: Depth=3
movl -108(%rbp), %eax
cmpl -96(%rbp), %eax
jge LBB0_12
## %bb.8: ## in Loop: Header=BB0_7 Depth=3
movslq -104(%rbp), %rax
movsbl -64(%rbp,%rax), %eax
movslq -108(%rbp), %rcx
movsbl -64(%rbp,%rcx), %ecx
cmpl %ecx, %eax
jle LBB0_10
## %bb.9: ## in Loop: Header=BB0_7 Depth=3
movslq -104(%rbp), %rax
movb -64(%rbp,%rax), %al
movb %al, -109(%rbp)
movslq -108(%rbp), %rax
movb -64(%rbp,%rax), %cl
movslq -104(%rbp), %rax
movb %cl, -64(%rbp,%rax)
movb -109(%rbp), %cl
movslq -108(%rbp), %rax
movb %cl, -64(%rbp,%rax)
LBB0_10: ## in Loop: Header=BB0_7 Depth=3
jmp LBB0_11
LBB0_11: ## in Loop: Header=BB0_7 Depth=3
movl -108(%rbp), %eax
addl $1, %eax
movl %eax, -108(%rbp)
jmp LBB0_7
LBB0_12: ## in Loop: Header=BB0_5 Depth=2
jmp LBB0_13
LBB0_13: ## in Loop: Header=BB0_5 Depth=2
movl -104(%rbp), %eax
addl $1, %eax
movl %eax, -104(%rbp)
jmp LBB0_5
LBB0_14: ## in Loop: Header=BB0_1 Depth=1
cmpl $0, -92(%rbp)
jle LBB0_16
## %bb.15: ## in Loop: Header=BB0_1 Depth=1
movq -88(%rbp), %rax
movl -92(%rbp), %ecx
movl %ecx, %edx
addl $1, %edx
movl %edx, -92(%rbp)
movslq %ecx, %rcx
movb $32, (%rax,%rcx)
LBB0_16: ## in Loop: Header=BB0_1 Depth=1
movl $0, -116(%rbp)
LBB0_17: ## Parent Loop BB0_1 Depth=1
## => This Inner Loop Header: Depth=2
movl -116(%rbp), %eax
cmpl -96(%rbp), %eax
jge LBB0_20
## %bb.18: ## in Loop: Header=BB0_17 Depth=2
movslq -116(%rbp), %rax
movb -64(%rbp,%rax), %dl
movq -88(%rbp), %rax
movl -92(%rbp), %ecx
movl %ecx, %esi
addl $1, %esi
movl %esi, -92(%rbp)
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
## %bb.19: ## in Loop: Header=BB0_17 Depth=2
movl -116(%rbp), %eax
addl $1, %eax
movl %eax, -116(%rbp)
jmp LBB0_17
LBB0_20: ## in Loop: Header=BB0_1 Depth=1
movl $0, -96(%rbp)
jmp LBB0_22
LBB0_21: ## in Loop: Header=BB0_1 Depth=1
movq -72(%rbp), %rax
movslq -100(%rbp), %rcx
movb (%rax,%rcx), %cl
movl -96(%rbp), %eax
movl %eax, %edx
addl $1, %edx
movl %edx, -96(%rbp)
cltq
movb %cl, -64(%rbp,%rax)
LBB0_22: ## in Loop: Header=BB0_1 Depth=1
jmp LBB0_23
LBB0_23: ## in Loop: Header=BB0_1 Depth=1
movl -100(%rbp), %eax
addl $1, %eax
movl %eax, -100(%rbp)
jmp LBB0_1
LBB0_24:
movq -88(%rbp), %rax
movslq -92(%rbp), %rcx
movb $0, (%rax,%rcx)
movq -88(%rbp), %rax
movq %rax, -128(%rbp) ## 8-byte Spill
movq ___stack_chk_guard@GOTPCREL(%rip), %rax
movq (%rax), %rax
movq -8(%rbp), %rcx
cmpq %rcx, %rax
jne LBB0_26
## %bb.25:
movq -128(%rbp), %rax ## 8-byte Reload
addq $128, %rsp
popq %rbp
retq
LBB0_26:
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, #144
.cfi_def_cfa_offset 144
stp x29, x30, [sp, #128] ; 16-byte Folded Spill
add x29, sp, #128
.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]
ldr x0, [sp, #56]
bl _strlen
mov x8, x0
str w8, [sp, #52]
ldr w8, [sp, #52]
add w9, w8, #2
; implicit-def: $x8
mov x8, x9
sxtw x0, w8
bl _malloc
str x0, [sp, #40]
str wzr, [sp, #36]
str wzr, [sp, #32]
str wzr, [sp, #28]
b LBB0_1
LBB0_1: ; =>This Loop Header: Depth=1
; Child Loop BB0_5 Depth 2
; Child Loop BB0_7 Depth 3
; Child Loop BB0_17 Depth 2
ldr w8, [sp, #28]
ldr w9, [sp, #52]
subs w8, w8, w9
cset w8, gt
tbnz w8, #0, LBB0_24
b LBB0_2
LBB0_2: ; in Loop: Header=BB0_1 Depth=1
ldr x8, [sp, #56]
ldrsw x9, [sp, #28]
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 x8, [sp, #56]
ldrsw x9, [sp, #28]
ldrsb w8, [x8, x9]
subs w8, w8, #0
cset w8, ne
tbnz w8, #0, LBB0_21
b LBB0_4
LBB0_4: ; in Loop: Header=BB0_1 Depth=1
str wzr, [sp, #24]
b LBB0_5
LBB0_5: ; Parent Loop BB0_1 Depth=1
; => This Loop Header: Depth=2
; Child Loop BB0_7 Depth 3
ldr w8, [sp, #24]
ldr w9, [sp, #32]
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=2
ldr w8, [sp, #24]
add w8, w8, #1
str w8, [sp, #20]
b LBB0_7
LBB0_7: ; Parent Loop BB0_1 Depth=1
; Parent Loop BB0_5 Depth=2
; => This Inner Loop Header: Depth=3
ldr w8, [sp, #20]
ldr w9, [sp, #32]
subs w8, w8, w9
cset w8, ge
tbnz w8, #0, LBB0_12
b LBB0_8
LBB0_8: ; in Loop: Header=BB0_7 Depth=3
ldrsw x8, [sp, #24]
sub x9, x29, #59
ldrsb w8, [x9, x8]
ldrsw x10, [sp, #20]
ldrsb w9, [x9, x10]
subs w8, w8, w9
cset w8, le
tbnz w8, #0, LBB0_10
b LBB0_9
LBB0_9: ; in Loop: Header=BB0_7 Depth=3
ldrsw x10, [sp, #24]
sub x9, x29, #59
mov x8, x9
add x8, x8, x10
ldrb w8, [x8]
strb w8, [sp, #19]
ldrsw x10, [sp, #20]
mov x8, x9
add x8, x8, x10
ldrb w8, [x8]
ldrsw x11, [sp, #24]
mov x10, x9
add x10, x10, x11
strb w8, [x10]
ldrb w8, [sp, #19]
ldrsw x10, [sp, #20]
add x9, x9, x10
strb w8, [x9]
b LBB0_10
LBB0_10: ; in Loop: Header=BB0_7 Depth=3
b LBB0_11
LBB0_11: ; in Loop: Header=BB0_7 Depth=3
ldr w8, [sp, #20]
add w8, w8, #1
str w8, [sp, #20]
b LBB0_7
LBB0_12: ; in Loop: Header=BB0_5 Depth=2
b LBB0_13
LBB0_13: ; in Loop: Header=BB0_5 Depth=2
ldr w8, [sp, #24]
add w8, w8, #1
str w8, [sp, #24]
b LBB0_5
LBB0_14: ; in Loop: Header=BB0_1 Depth=1
ldr w8, [sp, #36]
subs w8, w8, #0
cset w8, le
tbnz w8, #0, LBB0_16
b LBB0_15
LBB0_15: ; in Loop: Header=BB0_1 Depth=1
ldr x8, [sp, #40]
ldrsw x9, [sp, #36]
mov x10, x9
add w10, w10, #1
str w10, [sp, #36]
add x9, x8, x9
mov w8, #32
strb w8, [x9]
b LBB0_16
LBB0_16: ; in Loop: Header=BB0_1 Depth=1
str wzr, [sp, #12]
b LBB0_17
LBB0_17: ; 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_20
b LBB0_18
LBB0_18: ; in Loop: Header=BB0_17 Depth=2
ldrsw x9, [sp, #12]
sub x8, x29, #59
add x8, x8, x9
ldrb w8, [x8]
ldr x9, [sp, #40]
ldrsw x10, [sp, #36]
mov x11, x10
add w11, w11, #1
str w11, [sp, #36]
add x9, x9, x10
strb w8, [x9]
b LBB0_19
LBB0_19: ; in Loop: Header=BB0_17 Depth=2
ldr w8, [sp, #12]
add w8, w8, #1
str w8, [sp, #12]
b LBB0_17
LBB0_20: ; in Loop: Header=BB0_1 Depth=1
str wzr, [sp, #32]
b LBB0_22
LBB0_21: ; in Loop: Header=BB0_1 Depth=1
ldr x8, [sp, #56]
ldrsw x9, [sp, #28]
add x8, x8, x9
ldrb w8, [x8]
ldrsw x10, [sp, #32]
mov x9, x10
add w9, w9, #1
str w9, [sp, #32]
sub x9, x29, #59
add x9, x9, x10
strb w8, [x9]
b LBB0_22
LBB0_22: ; in Loop: Header=BB0_1 Depth=1
b LBB0_23
LBB0_23: ; in Loop: Header=BB0_1 Depth=1
ldr w8, [sp, #28]
add w8, w8, #1
str w8, [sp, #28]
b LBB0_1
LBB0_24:
ldr x8, [sp, #40]
ldrsw x9, [sp, #36]
add x8, x8, x9
strb wzr, [x8]
ldr x8, [sp, #40]
str x8, [sp] ; 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_26
b LBB0_25
LBB0_25:
bl ___stack_chk_fail
LBB0_26:
ldr x0, [sp] ; 8-byte Folded Reload
ldp x29, x30, [sp, #128] ; 16-byte Folded Reload
add sp, sp, #144
ret
.cfi_endproc
; -- End function
.subsections_via_symbols
|
eval/problem87/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 %ecx, -28(%rbp)
movq %r8, -40(%rbp)
movl $800, %edi ## imm = 0x320
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
movl -56(%rbp), %eax
cmpl -12(%rbp), %eax
jge LBB0_10
## %bb.2: ## in Loop: Header=BB0_1 Depth=1
movq -24(%rbp), %rax
movslq -56(%rbp), %rcx
movl (%rax,%rcx,4), %eax
subl $1, %eax
movl %eax, -60(%rbp)
LBB0_3: ## Parent Loop BB0_1 Depth=1
## => This Inner Loop Header: Depth=2
cmpl $0, -60(%rbp)
jl LBB0_8
## %bb.4: ## in Loop: Header=BB0_3 Depth=2
movq -8(%rbp), %rax
movslq -56(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -60(%rbp), %rcx
movl (%rax,%rcx,4), %eax
cmpl -28(%rbp), %eax
jne LBB0_6
## %bb.5: ## in Loop: Header=BB0_3 Depth=2
movl $8, %edi
callq _malloc
movq %rax, %rdx
movq -48(%rbp), %rax
movslq -52(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl -56(%rbp), %ecx
movq -48(%rbp), %rax
movslq -52(%rbp), %rdx
movq (%rax,%rdx,8), %rax
movl %ecx, (%rax)
movl -60(%rbp), %ecx
movq -48(%rbp), %rax
movslq -52(%rbp), %rdx
movq (%rax,%rdx,8), %rax
movl %ecx, 4(%rax)
movl -52(%rbp), %eax
addl $1, %eax
movl %eax, -52(%rbp)
LBB0_6: ## in Loop: Header=BB0_3 Depth=2
jmp LBB0_7
LBB0_7: ## in Loop: Header=BB0_3 Depth=2
movl -60(%rbp), %eax
addl $-1, %eax
movl %eax, -60(%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 -56(%rbp), %eax
addl $1, %eax
movl %eax, -56(%rbp)
jmp LBB0_1
LBB0_10:
movl -52(%rbp), %ecx
movq -40(%rbp), %rax
movl %ecx, (%rax)
movq -48(%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]
stur w3, [x29, #-28]
str x4, [sp, #24]
mov x0, #800
bl _malloc
str x0, [sp, #16]
str wzr, [sp, #12]
str wzr, [sp, #8]
b LBB0_1
LBB0_1: ; =>This Loop Header: Depth=1
; Child Loop BB0_3 Depth 2
ldr w8, [sp, #8]
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
ldur x8, [x29, #-24]
ldrsw x9, [sp, #8]
ldr w8, [x8, x9, lsl #2]
subs w8, w8, #1
str w8, [sp, #4]
b LBB0_3
LBB0_3: ; Parent Loop BB0_1 Depth=1
; => This Inner Loop Header: Depth=2
ldr w8, [sp, #4]
subs w8, w8, #0
cset w8, lt
tbnz w8, #0, LBB0_8
b LBB0_4
LBB0_4: ; in Loop: Header=BB0_3 Depth=2
ldur x8, [x29, #-8]
ldrsw x9, [sp, #8]
ldr x8, [x8, x9, lsl #3]
ldrsw x9, [sp, #4]
ldr w8, [x8, x9, lsl #2]
ldur w9, [x29, #-28]
subs w8, w8, w9
cset w8, ne
tbnz w8, #0, LBB0_6
b LBB0_5
LBB0_5: ; in Loop: Header=BB0_3 Depth=2
mov x0, #8
bl _malloc
ldr x8, [sp, #16]
ldrsw x9, [sp, #12]
str x0, [x8, x9, lsl #3]
ldr w8, [sp, #8]
ldr x9, [sp, #16]
ldrsw x10, [sp, #12]
ldr x9, [x9, x10, lsl #3]
str w8, [x9]
ldr w8, [sp, #4]
ldr x9, [sp, #16]
ldrsw x10, [sp, #12]
ldr x9, [x9, x10, lsl #3]
str w8, [x9, #4]
ldr w8, [sp, #12]
add w8, w8, #1
str w8, [sp, #12]
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, #4]
subs w8, w8, #1
str w8, [sp, #4]
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, #8]
add w8, w8, #1
str w8, [sp, #8]
b LBB0_1
LBB0_10:
ldr w8, [sp, #12]
ldr x9, [sp, #24]
str w8, [x9]
ldr x0, [sp, #16]
ldp x29, x30, [sp, #64] ; 16-byte Folded Reload
add sp, sp, #80
ret
.cfi_endproc
; -- End function
.subsections_via_symbols
|
eval/problem88/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)
movl -12(%rbp), %ecx
movq -32(%rbp), %rax
movl %ecx, (%rax)
cmpl $0, -12(%rbp)
jne LBB0_2
## %bb.1:
movq -24(%rbp), %rax
movq $0, (%rax)
jmp LBB0_23
LBB0_2:
movslq -12(%rbp), %rdi
shlq $2, %rdi
callq _malloc
movq %rax, %rcx
movq -24(%rbp), %rax
movq %rcx, (%rax)
movq -24(%rbp), %rax
cmpq $0, (%rax)
jne LBB0_4
## %bb.3:
movl $1, %edi
callq _exit
LBB0_4:
movl $0, -36(%rbp)
LBB0_5: ## =>This Inner Loop Header: Depth=1
movl -36(%rbp), %eax
cmpl -12(%rbp), %eax
jge LBB0_8
## %bb.6: ## in Loop: Header=BB0_5 Depth=1
movq -8(%rbp), %rax
movslq -36(%rbp), %rcx
movl (%rax,%rcx,4), %edx
movq -24(%rbp), %rax
movq (%rax), %rax
movslq -36(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
## %bb.7: ## in Loop: Header=BB0_5 Depth=1
movl -36(%rbp), %eax
addl $1, %eax
movl %eax, -36(%rbp)
jmp LBB0_5
LBB0_8:
movq -8(%rbp), %rax
movl (%rax), %eax
movq -8(%rbp), %rcx
movl -12(%rbp), %edx
subl $1, %edx
movslq %edx, %rdx
addl (%rcx,%rdx,4), %eax
movl $2, %ecx
cltd
idivl %ecx
cmpl $1, %edx
sete %al
andb $1, %al
movzbl %al, %eax
movl %eax, -40(%rbp)
movl $0, -44(%rbp)
LBB0_9: ## =>This Loop Header: Depth=1
## Child Loop BB0_11 Depth 2
movl -44(%rbp), %eax
movl -12(%rbp), %ecx
subl $1, %ecx
cmpl %ecx, %eax
jge LBB0_23
## %bb.10: ## in Loop: Header=BB0_9 Depth=1
movl -44(%rbp), %eax
addl $1, %eax
movl %eax, -48(%rbp)
LBB0_11: ## Parent Loop BB0_9 Depth=1
## => This Inner Loop Header: Depth=2
movl -48(%rbp), %eax
cmpl -12(%rbp), %eax
jge LBB0_21
## %bb.12: ## in Loop: Header=BB0_11 Depth=2
cmpl $0, -40(%rbp)
je LBB0_16
## %bb.13: ## in Loop: Header=BB0_11 Depth=2
movq -24(%rbp), %rax
movq (%rax), %rax
movslq -44(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movq -24(%rbp), %rcx
movq (%rcx), %rcx
movslq -48(%rbp), %rdx
cmpl (%rcx,%rdx,4), %eax
jle LBB0_15
## %bb.14: ## in Loop: Header=BB0_11 Depth=2
movq -24(%rbp), %rax
movq (%rax), %rax
movslq -44(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -52(%rbp)
movq -24(%rbp), %rax
movq (%rax), %rax
movslq -48(%rbp), %rcx
movl (%rax,%rcx,4), %edx
movq -24(%rbp), %rax
movq (%rax), %rax
movslq -44(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movl -52(%rbp), %edx
movq -24(%rbp), %rax
movq (%rax), %rax
movslq -48(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
LBB0_15: ## in Loop: Header=BB0_11 Depth=2
jmp LBB0_19
LBB0_16: ## in Loop: Header=BB0_11 Depth=2
movq -24(%rbp), %rax
movq (%rax), %rax
movslq -44(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movq -24(%rbp), %rcx
movq (%rcx), %rcx
movslq -48(%rbp), %rdx
cmpl (%rcx,%rdx,4), %eax
jge LBB0_18
## %bb.17: ## in Loop: Header=BB0_11 Depth=2
movq -24(%rbp), %rax
movq (%rax), %rax
movslq -44(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -56(%rbp)
movq -24(%rbp), %rax
movq (%rax), %rax
movslq -48(%rbp), %rcx
movl (%rax,%rcx,4), %edx
movq -24(%rbp), %rax
movq (%rax), %rax
movslq -44(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movl -56(%rbp), %edx
movq -24(%rbp), %rax
movq (%rax), %rax
movslq -48(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
LBB0_18: ## in Loop: Header=BB0_11 Depth=2
jmp LBB0_19
LBB0_19: ## in Loop: Header=BB0_11 Depth=2
jmp LBB0_20
LBB0_20: ## in Loop: Header=BB0_11 Depth=2
movl -48(%rbp), %eax
addl $1, %eax
movl %eax, -48(%rbp)
jmp LBB0_11
LBB0_21: ## in Loop: Header=BB0_9 Depth=1
jmp LBB0_22
LBB0_22: ## in Loop: Header=BB0_9 Depth=1
movl -44(%rbp), %eax
addl $1, %eax
movl %eax, -44(%rbp)
jmp LBB0_9
LBB0_23:
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]
ldur w8, [x29, #-12]
ldr x9, [sp, #32]
str w8, [x9]
ldur w8, [x29, #-12]
subs w8, w8, #0
cset w8, ne
tbnz w8, #0, LBB0_2
b LBB0_1
LBB0_1:
ldur x8, [x29, #-24]
; kill: def $x9 killed $xzr
str xzr, [x8]
b LBB0_23
LBB0_2:
ldursw x9, [x29, #-12]
mov x8, #4
mul x0, x8, x9
bl _malloc
ldur x8, [x29, #-24]
str x0, [x8]
ldur x8, [x29, #-24]
ldr x8, [x8]
subs x8, x8, #0
cset w8, ne
tbnz w8, #0, LBB0_4
b LBB0_3
LBB0_3:
mov w0, #1
bl _exit
LBB0_4:
str wzr, [sp, #28]
b LBB0_5
LBB0_5: ; =>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_8
b LBB0_6
LBB0_6: ; in Loop: Header=BB0_5 Depth=1
ldur x8, [x29, #-8]
ldrsw x9, [sp, #28]
ldr w8, [x8, x9, lsl #2]
ldur x9, [x29, #-24]
ldr x9, [x9]
ldrsw x10, [sp, #28]
str w8, [x9, x10, lsl #2]
b LBB0_7
LBB0_7: ; in Loop: Header=BB0_5 Depth=1
ldr w8, [sp, #28]
add w8, w8, #1
str w8, [sp, #28]
b LBB0_5
LBB0_8:
ldur x8, [x29, #-8]
ldr w8, [x8]
ldur x9, [x29, #-8]
ldur w10, [x29, #-12]
subs w10, w10, #1
ldr w9, [x9, w10, sxtw #2]
add w8, w8, w9
mov w10, #2
sdiv w9, w8, w10
mul w9, w9, w10
subs w8, w8, w9
subs w8, w8, #1
cset w8, eq
and w8, w8, #0x1
str w8, [sp, #24]
str wzr, [sp, #20]
b LBB0_9
LBB0_9: ; =>This Loop Header: Depth=1
; Child Loop BB0_11 Depth 2
ldr w8, [sp, #20]
ldur w9, [x29, #-12]
subs w9, w9, #1
subs w8, w8, w9
cset w8, ge
tbnz w8, #0, LBB0_23
b LBB0_10
LBB0_10: ; in Loop: Header=BB0_9 Depth=1
ldr w8, [sp, #20]
add w8, w8, #1
str w8, [sp, #16]
b LBB0_11
LBB0_11: ; Parent Loop BB0_9 Depth=1
; => This Inner Loop Header: Depth=2
ldr w8, [sp, #16]
ldur w9, [x29, #-12]
subs w8, w8, w9
cset w8, ge
tbnz w8, #0, LBB0_21
b LBB0_12
LBB0_12: ; in Loop: Header=BB0_11 Depth=2
ldr w8, [sp, #24]
subs w8, w8, #0
cset w8, eq
tbnz w8, #0, LBB0_16
b LBB0_13
LBB0_13: ; in Loop: Header=BB0_11 Depth=2
ldur x8, [x29, #-24]
ldr x8, [x8]
ldrsw x9, [sp, #20]
ldr w8, [x8, x9, lsl #2]
ldur x9, [x29, #-24]
ldr x9, [x9]
ldrsw x10, [sp, #16]
ldr w9, [x9, x10, lsl #2]
subs w8, w8, w9
cset w8, le
tbnz w8, #0, LBB0_15
b LBB0_14
LBB0_14: ; in Loop: Header=BB0_11 Depth=2
ldur x8, [x29, #-24]
ldr x8, [x8]
ldrsw x9, [sp, #20]
ldr w8, [x8, x9, lsl #2]
str w8, [sp, #12]
ldur x8, [x29, #-24]
ldr x8, [x8]
ldrsw x9, [sp, #16]
ldr w8, [x8, x9, lsl #2]
ldur x9, [x29, #-24]
ldr x9, [x9]
ldrsw x10, [sp, #20]
str w8, [x9, x10, lsl #2]
ldr w8, [sp, #12]
ldur x9, [x29, #-24]
ldr x9, [x9]
ldrsw x10, [sp, #16]
str w8, [x9, x10, lsl #2]
b LBB0_15
LBB0_15: ; in Loop: Header=BB0_11 Depth=2
b LBB0_19
LBB0_16: ; in Loop: Header=BB0_11 Depth=2
ldur x8, [x29, #-24]
ldr x8, [x8]
ldrsw x9, [sp, #20]
ldr w8, [x8, x9, lsl #2]
ldur x9, [x29, #-24]
ldr x9, [x9]
ldrsw x10, [sp, #16]
ldr w9, [x9, x10, lsl #2]
subs w8, w8, w9
cset w8, ge
tbnz w8, #0, LBB0_18
b LBB0_17
LBB0_17: ; in Loop: Header=BB0_11 Depth=2
ldur x8, [x29, #-24]
ldr x8, [x8]
ldrsw x9, [sp, #20]
ldr w8, [x8, x9, lsl #2]
str w8, [sp, #8]
ldur x8, [x29, #-24]
ldr x8, [x8]
ldrsw x9, [sp, #16]
ldr w8, [x8, x9, lsl #2]
ldur x9, [x29, #-24]
ldr x9, [x9]
ldrsw x10, [sp, #20]
str w8, [x9, x10, lsl #2]
ldr w8, [sp, #8]
ldur x9, [x29, #-24]
ldr x9, [x9]
ldrsw x10, [sp, #16]
str w8, [x9, x10, lsl #2]
b LBB0_18
LBB0_18: ; in Loop: Header=BB0_11 Depth=2
b LBB0_19
LBB0_19: ; in Loop: Header=BB0_11 Depth=2
b LBB0_20
LBB0_20: ; in Loop: Header=BB0_11 Depth=2
ldr w8, [sp, #16]
add w8, w8, #1
str w8, [sp, #16]
b LBB0_11
LBB0_21: ; in Loop: Header=BB0_9 Depth=1
b LBB0_22
LBB0_22: ; in Loop: Header=BB0_9 Depth=1
ldr w8, [sp, #20]
add w8, w8, #1
str w8, [sp, #20]
b LBB0_9
LBB0_23:
ldp x29, x30, [sp, #64] ; 16-byte Folded Reload
add sp, sp, #80
ret
.cfi_endproc
; -- End function
.subsections_via_symbols
|
eval/problem89/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 $1, -32(%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
movl (%rax,%rcx,4), %eax
addl -28(%rbp), %eax
movl %eax, -28(%rbp)
movq -8(%rbp), %rax
movslq -36(%rbp), %rcx
movl (%rax,%rcx,4), %eax
imull -32(%rbp), %eax
movl %eax, -32(%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 -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]
mov w8, #1
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, #36]
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, #40]
ldrsw x9, [sp, #12]
ldr w9, [x8, x9, lsl #2]
ldr w8, [sp, #20]
add w8, w8, w9
str w8, [sp, #20]
ldr x8, [sp, #40]
ldrsw x9, [sp, #12]
ldr w9, [x8, x9, lsl #2]
ldr w8, [sp, #16]
mul 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 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/problem9/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)
movq %rsi, -16(%rbp)
movl $0, -20(%rbp)
LBB0_1: ## =>This Inner Loop Header: Depth=1
movq -8(%rbp), %rax
movslq -20(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0, %eax
je LBB0_4
## %bb.2: ## in Loop: Header=BB0_1 Depth=1
movq -8(%rbp), %rax
movslq -20(%rbp), %rcx
movsbl (%rax,%rcx), %eax
subl $97, %eax
addl $4, %eax
movl $26, %ecx
cltd
idivl %ecx
addl $97, %edx
movl %edx, -24(%rbp)
movl -24(%rbp), %eax
movb %al, %dl
movq -16(%rbp), %rax
movslq -20(%rbp), %rcx
movb %dl, (%rax,%rcx)
## %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
movslq -20(%rbp), %rcx
movb $0, (%rax,%rcx)
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 x1, [sp, #16]
str wzr, [sp, #12]
b LBB0_1
LBB0_1: ; =>This Inner Loop Header: Depth=1
ldr x8, [sp, #24]
ldrsw x9, [sp, #12]
ldrsb w8, [x8, x9]
subs w8, w8, #0
cset w8, eq
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]
ldrsb w8, [x8, x9]
subs w8, w8, #97
add w8, w8, #4
mov w10, #26
sdiv w9, w8, w10
mul w9, w9, w10
subs w8, w8, w9
add w8, w8, #97
str w8, [sp, #8]
ldr w8, [sp, #8]
ldr x9, [sp, #16]
ldrsw x10, [sp, #12]
strb w8, [x9, x10]
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 x8, [sp, #16]
ldrsw x9, [sp, #12]
add x8, x8, x9
strb wzr, [x8]
add sp, sp, #32
ret
.cfi_endproc
; -- End function
.subsections_via_symbols
|
eval/problem90/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 $2, -20(%rbp)
jge LBB0_2
## %bb.1:
movl $-1, -4(%rbp)
jmp LBB0_15
LBB0_2:
movl $2147483647, -24(%rbp) ## imm = 0x7FFFFFFF
movl $2147483647, -28(%rbp) ## imm = 0x7FFFFFFF
movl $0, -32(%rbp)
LBB0_3: ## =>This Inner Loop Header: Depth=1
movl -32(%rbp), %eax
cmpl -20(%rbp), %eax
jge LBB0_12
## %bb.4: ## in Loop: Header=BB0_3 Depth=1
movq -16(%rbp), %rax
movslq -32(%rbp), %rcx
movl (%rax,%rcx,4), %eax
cmpl -24(%rbp), %eax
jge LBB0_6
## %bb.5: ## in Loop: Header=BB0_3 Depth=1
movl -24(%rbp), %eax
movl %eax, -28(%rbp)
movq -16(%rbp), %rax
movslq -32(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -24(%rbp)
jmp LBB0_10
LBB0_6: ## in Loop: Header=BB0_3 Depth=1
movq -16(%rbp), %rax
movslq -32(%rbp), %rcx
movl (%rax,%rcx,4), %eax
cmpl -28(%rbp), %eax
jge LBB0_9
## %bb.7: ## in Loop: Header=BB0_3 Depth=1
movq -16(%rbp), %rax
movslq -32(%rbp), %rcx
movl (%rax,%rcx,4), %eax
cmpl -24(%rbp), %eax
je LBB0_9
## %bb.8: ## in Loop: Header=BB0_3 Depth=1
movq -16(%rbp), %rax
movslq -32(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -28(%rbp)
LBB0_9: ## in Loop: Header=BB0_3 Depth=1
jmp LBB0_10
LBB0_10: ## in Loop: Header=BB0_3 Depth=1
jmp LBB0_11
LBB0_11: ## in Loop: Header=BB0_3 Depth=1
movl -32(%rbp), %eax
addl $1, %eax
movl %eax, -32(%rbp)
jmp LBB0_3
LBB0_12:
cmpl $2147483647, -28(%rbp) ## imm = 0x7FFFFFFF
jne LBB0_14
## %bb.13:
movl $-1, -4(%rbp)
jmp LBB0_15
LBB0_14:
movl -28(%rbp), %eax
movl %eax, -4(%rbp)
LBB0_15:
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]
ldr w8, [sp, #12]
subs w8, w8, #2
cset w8, ge
tbnz w8, #0, LBB0_2
b LBB0_1
LBB0_1:
mov w8, #-1
str w8, [sp, #28]
b LBB0_15
LBB0_2:
mov w8, #2147483647
str w8, [sp, #8]
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_12
b LBB0_4
LBB0_4: ; in Loop: Header=BB0_3 Depth=1
ldr x8, [sp, #16]
ldrsw x9, [sp]
ldr w8, [x8, x9, lsl #2]
ldr w9, [sp, #8]
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]
str w8, [sp, #4]
ldr x8, [sp, #16]
ldrsw x9, [sp]
ldr w8, [x8, x9, lsl #2]
str w8, [sp, #8]
b LBB0_10
LBB0_6: ; in Loop: Header=BB0_3 Depth=1
ldr x8, [sp, #16]
ldrsw x9, [sp]
ldr w8, [x8, x9, lsl #2]
ldr w9, [sp, #4]
subs w8, w8, w9
cset w8, ge
tbnz w8, #0, LBB0_9
b LBB0_7
LBB0_7: ; in Loop: Header=BB0_3 Depth=1
ldr x8, [sp, #16]
ldrsw x9, [sp]
ldr w8, [x8, x9, lsl #2]
ldr w9, [sp, #8]
subs w8, w8, w9
cset w8, eq
tbnz w8, #0, LBB0_9
b LBB0_8
LBB0_8: ; in Loop: Header=BB0_3 Depth=1
ldr x8, [sp, #16]
ldrsw x9, [sp]
ldr w8, [x8, x9, lsl #2]
str w8, [sp, #4]
b LBB0_9
LBB0_9: ; in Loop: Header=BB0_3 Depth=1
b LBB0_10
LBB0_10: ; in Loop: Header=BB0_3 Depth=1
b LBB0_11
LBB0_11: ; in Loop: Header=BB0_3 Depth=1
ldr w8, [sp]
add w8, w8, #1
str w8, [sp]
b LBB0_3
LBB0_12:
ldr w8, [sp, #4]
mov w9, #2147483647
subs w8, w8, w9
cset w8, ne
tbnz w8, #0, LBB0_14
b LBB0_13
LBB0_13:
mov w8, #-1
str w8, [sp, #28]
b LBB0_15
LBB0_14:
ldr w8, [sp, #4]
str w8, [sp, #28]
b LBB0_15
LBB0_15:
ldr w0, [sp, #28]
add sp, sp, #32
ret
.cfi_endproc
; -- End function
.subsections_via_symbols
|
eval/problem91/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 $1, -12(%rbp)
movl $0, -16(%rbp)
movl $0, -20(%rbp)
movl $0, -24(%rbp)
LBB0_1: ## =>This Inner Loop Header: Depth=1
movq -8(%rbp), %rax
movslq -24(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0, %eax
je LBB0_19
## %bb.2: ## in Loop: Header=BB0_1 Depth=1
movq -8(%rbp), %rax
movslq -24(%rbp), %rcx
movsbl (%rax,%rcx), %edi
callq _isspace
cmpl $0, %eax
je LBB0_5
## %bb.3: ## in Loop: Header=BB0_1 Depth=1
cmpl $0, -16(%rbp)
je LBB0_5
## %bb.4: ## in Loop: Header=BB0_1 Depth=1
movl $0, -16(%rbp)
movl -20(%rbp), %eax
addl $1, %eax
movl %eax, -20(%rbp)
LBB0_5: ## in Loop: Header=BB0_1 Depth=1
movq -8(%rbp), %rax
movslq -24(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $73, %eax
jne LBB0_8
## %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
movl $1, -16(%rbp)
jmp LBB0_11
LBB0_8: ## in Loop: Header=BB0_1 Depth=1
movq -8(%rbp), %rax
movslq -24(%rbp), %rcx
movsbl (%rax,%rcx), %edi
callq _isspace
cmpl $0, %eax
jne LBB0_10
## %bb.9: ## in Loop: Header=BB0_1 Depth=1
movl $0, -16(%rbp)
LBB0_10: ## in Loop: Header=BB0_1 Depth=1
jmp LBB0_11
LBB0_11: ## in Loop: Header=BB0_1 Depth=1
movq -8(%rbp), %rax
movslq -24(%rbp), %rcx
movsbl (%rax,%rcx), %edi
callq _isspace
cmpl $0, %eax
jne LBB0_13
## %bb.12: ## in Loop: Header=BB0_1 Depth=1
movl $0, -12(%rbp)
LBB0_13: ## in Loop: Header=BB0_1 Depth=1
movq -8(%rbp), %rax
movslq -24(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $46, %eax
je LBB0_16
## %bb.14: ## in Loop: Header=BB0_1 Depth=1
movq -8(%rbp), %rax
movslq -24(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $63, %eax
je LBB0_16
## %bb.15: ## in Loop: Header=BB0_1 Depth=1
movq -8(%rbp), %rax
movslq -24(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $33, %eax
jne LBB0_17
LBB0_16: ## in Loop: Header=BB0_1 Depth=1
movl $1, -12(%rbp)
LBB0_17: ## in Loop: Header=BB0_1 Depth=1
jmp LBB0_18
LBB0_18: ## in Loop: Header=BB0_1 Depth=1
movl -24(%rbp), %eax
addl $1, %eax
movl %eax, -24(%rbp)
jmp LBB0_1
LBB0_19:
movl -20(%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]
mov w8, #1
stur w8, [x29, #-12]
str wzr, [sp, #16]
str wzr, [sp, #12]
str wzr, [sp, #8]
b LBB0_1
LBB0_1: ; =>This Inner Loop Header: Depth=1
ldur x8, [x29, #-8]
ldrsw x9, [sp, #8]
ldrsb w8, [x8, x9]
subs w8, w8, #0
cset w8, eq
tbnz w8, #0, LBB0_19
b LBB0_2
LBB0_2: ; in Loop: Header=BB0_1 Depth=1
ldur x8, [x29, #-8]
ldrsw x9, [sp, #8]
ldrsb w0, [x8, x9]
bl _isspace
subs w8, w0, #0
cset w8, eq
tbnz w8, #0, LBB0_5
b LBB0_3
LBB0_3: ; in Loop: Header=BB0_1 Depth=1
ldr w8, [sp, #16]
subs w8, w8, #0
cset w8, eq
tbnz w8, #0, LBB0_5
b LBB0_4
LBB0_4: ; in Loop: Header=BB0_1 Depth=1
str wzr, [sp, #16]
ldr w8, [sp, #12]
add w8, w8, #1
str w8, [sp, #12]
b LBB0_5
LBB0_5: ; in Loop: Header=BB0_1 Depth=1
ldur x8, [x29, #-8]
ldrsw x9, [sp, #8]
ldrsb w8, [x8, x9]
subs w8, w8, #73
cset w8, ne
tbnz w8, #0, LBB0_8
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
mov w8, #1
str w8, [sp, #16]
b LBB0_11
LBB0_8: ; in Loop: Header=BB0_1 Depth=1
ldur x8, [x29, #-8]
ldrsw x9, [sp, #8]
ldrsb w0, [x8, x9]
bl _isspace
subs w8, w0, #0
cset w8, ne
tbnz w8, #0, LBB0_10
b LBB0_9
LBB0_9: ; in Loop: Header=BB0_1 Depth=1
str wzr, [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
ldur x8, [x29, #-8]
ldrsw x9, [sp, #8]
ldrsb w0, [x8, x9]
bl _isspace
subs w8, w0, #0
cset w8, ne
tbnz w8, #0, LBB0_13
b LBB0_12
LBB0_12: ; in Loop: Header=BB0_1 Depth=1
stur wzr, [x29, #-12]
b LBB0_13
LBB0_13: ; in Loop: Header=BB0_1 Depth=1
ldur x8, [x29, #-8]
ldrsw x9, [sp, #8]
ldrsb w8, [x8, x9]
subs w8, w8, #46
cset w8, eq
tbnz w8, #0, LBB0_16
b LBB0_14
LBB0_14: ; in Loop: Header=BB0_1 Depth=1
ldur x8, [x29, #-8]
ldrsw x9, [sp, #8]
ldrsb w8, [x8, x9]
subs w8, w8, #63
cset w8, eq
tbnz w8, #0, LBB0_16
b LBB0_15
LBB0_15: ; in Loop: Header=BB0_1 Depth=1
ldur x8, [x29, #-8]
ldrsw x9, [sp, #8]
ldrsb w8, [x8, x9]
subs w8, w8, #33
cset w8, ne
tbnz w8, #0, LBB0_17
b LBB0_16
LBB0_16: ; in Loop: Header=BB0_1 Depth=1
mov w8, #1
stur w8, [x29, #-12]
b LBB0_17
LBB0_17: ; in Loop: Header=BB0_1 Depth=1
b LBB0_18
LBB0_18: ; in Loop: Header=BB0_1 Depth=1
ldr w8, [sp, #8]
add w8, w8, #1
str w8, [sp, #8]
b LBB0_1
LBB0_19:
ldr w0, [sp, #12]
ldp x29, x30, [sp, #32] ; 16-byte Folded Reload
add sp, sp, #48
ret
.cfi_endproc
; -- End function
.subsections_via_symbols
|
eval/problem92/code.c
|
.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:
.long 0x80000000 ## float -0
.long 0x80000000 ## float -0
.long 0x80000000 ## float -0
.long 0x80000000 ## float -0
LCPI0_1:
.long 0x3effffff ## float 0.49999997
.long 0x3effffff ## float 0.49999997
.long 0x3effffff ## float 0.49999997
.long 0x3effffff ## float 0.49999997
.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), %xmm0 ## xmm0 = mem[0],zero,zero,zero
movaps %xmm0, %xmm1
movaps LCPI0_0(%rip), %xmm2 ## xmm2 = [-0.0E+0,-0.0E+0,-0.0E+0,-0.0E+0]
pand %xmm2, %xmm1
movaps LCPI0_1(%rip), %xmm2 ## xmm2 = [4.9999997E-1,4.9999997E-1,4.9999997E-1,4.9999997E-1]
por %xmm2, %xmm1
addss %xmm1, %xmm0
roundss $11, %xmm0, %xmm0
ucomiss -8(%rbp), %xmm0
jne LBB0_1
jp LBB0_1
jmp LBB0_2
LBB0_1:
movl $0, -4(%rbp)
jmp LBB0_11
LBB0_2:
movss -12(%rbp), %xmm0 ## xmm0 = mem[0],zero,zero,zero
movaps %xmm0, %xmm1
movaps LCPI0_0(%rip), %xmm2 ## xmm2 = [-0.0E+0,-0.0E+0,-0.0E+0,-0.0E+0]
pand %xmm2, %xmm1
movaps LCPI0_1(%rip), %xmm2 ## xmm2 = [4.9999997E-1,4.9999997E-1,4.9999997E-1,4.9999997E-1]
por %xmm2, %xmm1
addss %xmm1, %xmm0
roundss $11, %xmm0, %xmm0
ucomiss -12(%rbp), %xmm0
jne LBB0_3
jp LBB0_3
jmp LBB0_4
LBB0_3:
movl $0, -4(%rbp)
jmp LBB0_11
LBB0_4:
movss -16(%rbp), %xmm0 ## xmm0 = mem[0],zero,zero,zero
movaps %xmm0, %xmm1
movaps LCPI0_0(%rip), %xmm2 ## xmm2 = [-0.0E+0,-0.0E+0,-0.0E+0,-0.0E+0]
pand %xmm2, %xmm1
movaps LCPI0_1(%rip), %xmm2 ## xmm2 = [4.9999997E-1,4.9999997E-1,4.9999997E-1,4.9999997E-1]
por %xmm2, %xmm1
addss %xmm1, %xmm0
roundss $11, %xmm0, %xmm0
ucomiss -16(%rbp), %xmm0
jne LBB0_5
jp LBB0_5
jmp LBB0_6
LBB0_5:
movl $0, -4(%rbp)
jmp LBB0_11
LBB0_6:
movss -8(%rbp), %xmm0 ## xmm0 = mem[0],zero,zero,zero
addss -12(%rbp), %xmm0
ucomiss -16(%rbp), %xmm0
jne LBB0_7
jp LBB0_7
jmp LBB0_9
LBB0_7:
movss -8(%rbp), %xmm0 ## xmm0 = mem[0],zero,zero,zero
addss -16(%rbp), %xmm0
ucomiss -12(%rbp), %xmm0
jne LBB0_8
jp LBB0_8
jmp LBB0_9
LBB0_8:
movss -12(%rbp), %xmm0 ## xmm0 = mem[0],zero,zero,zero
addss -16(%rbp), %xmm0
ucomiss -8(%rbp), %xmm0
jne LBB0_10
jp LBB0_10
LBB0_9:
movl $1, -4(%rbp)
jmp LBB0_11
LBB0_10:
movl $0, -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, #16
.cfi_def_cfa_offset 16
str s0, [sp, #8]
str s1, [sp, #4]
str s2, [sp]
ldr s0, [sp, #8]
frinta s0, s0
ldr s1, [sp, #8]
fcmp s0, s1
cset w8, eq
tbnz w8, #0, LBB0_2
b LBB0_1
LBB0_1:
str wzr, [sp, #12]
b LBB0_11
LBB0_2:
ldr s0, [sp, #4]
frinta s0, s0
ldr s1, [sp, #4]
fcmp s0, s1
cset w8, eq
tbnz w8, #0, LBB0_4
b LBB0_3
LBB0_3:
str wzr, [sp, #12]
b LBB0_11
LBB0_4:
ldr s0, [sp]
frinta s0, s0
ldr s1, [sp]
fcmp s0, s1
cset w8, eq
tbnz w8, #0, LBB0_6
b LBB0_5
LBB0_5:
str wzr, [sp, #12]
b LBB0_11
LBB0_6:
ldr s0, [sp, #8]
ldr s1, [sp, #4]
fadd s0, s0, s1
ldr s1, [sp]
fcmp s0, s1
cset w8, eq
tbnz w8, #0, LBB0_9
b LBB0_7
LBB0_7:
ldr s0, [sp, #8]
ldr s1, [sp]
fadd s0, s0, s1
ldr s1, [sp, #4]
fcmp s0, s1
cset w8, eq
tbnz w8, #0, LBB0_9
b LBB0_8
LBB0_8:
ldr s0, [sp, #4]
ldr s1, [sp]
fadd s0, s0, s1
ldr s1, [sp, #8]
fcmp s0, s1
cset w8, ne
tbnz w8, #0, LBB0_10
b LBB0_9
LBB0_9:
mov w8, #1
str w8, [sp, #12]
b LBB0_11
LBB0_10:
str wzr, [sp, #12]
b LBB0_11
LBB0_11:
ldr w0, [sp, #12]
add sp, sp, #16
ret
.cfi_endproc
; -- End function
.subsections_via_symbols
|
eval/problem93/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)
leaq L_.str(%rip), %rax
movq %rax, -24(%rbp)
movl $0, -28(%rbp)
LBB0_1: ## =>This Loop Header: Depth=1
## Child Loop BB0_8 Depth 2
movq -8(%rbp), %rax
movslq -28(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0, %eax
je LBB0_17
## %bb.2: ## in Loop: Header=BB0_1 Depth=1
movq -8(%rbp), %rax
movslq -28(%rbp), %rcx
movb (%rax,%rcx), %al
movb %al, -33(%rbp)
movsbl -33(%rbp), %edi
callq _islower
cmpl $0, %eax
je LBB0_4
## %bb.3: ## in Loop: Header=BB0_1 Depth=1
movsbl -33(%rbp), %edi
callq _toupper
## kill: def $al killed $al killed $eax
movb %al, -33(%rbp)
jmp LBB0_7
LBB0_4: ## in Loop: Header=BB0_1 Depth=1
movsbl -33(%rbp), %edi
callq _isupper
cmpl $0, %eax
je LBB0_6
## %bb.5: ## in Loop: Header=BB0_1 Depth=1
movsbl -33(%rbp), %edi
callq _tolower
## kill: def $al killed $al killed $eax
movb %al, -33(%rbp)
LBB0_6: ## in Loop: Header=BB0_1 Depth=1
jmp LBB0_7
LBB0_7: ## in Loop: Header=BB0_1 Depth=1
movl $0, -32(%rbp)
LBB0_8: ## Parent Loop BB0_1 Depth=1
## => This Inner Loop Header: Depth=2
movq -24(%rbp), %rax
movslq -32(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0, %eax
je LBB0_15
## %bb.9: ## in Loop: Header=BB0_8 Depth=2
movsbl -33(%rbp), %eax
movq -24(%rbp), %rcx
movslq -32(%rbp), %rdx
movsbl (%rcx,%rdx), %ecx
cmpl %ecx, %eax
jne LBB0_13
## %bb.10: ## in Loop: Header=BB0_1 Depth=1
cmpl $10, -32(%rbp)
jge LBB0_12
## %bb.11: ## in Loop: Header=BB0_1 Depth=1
movsbl -33(%rbp), %eax
addl $2, %eax
## kill: def $al killed $al killed $eax
movb %al, -33(%rbp)
LBB0_12: ## in Loop: Header=BB0_1 Depth=1
jmp LBB0_15
LBB0_13: ## in Loop: Header=BB0_8 Depth=2
jmp LBB0_14
LBB0_14: ## in Loop: Header=BB0_8 Depth=2
movl -32(%rbp), %eax
addl $1, %eax
movl %eax, -32(%rbp)
jmp LBB0_8
LBB0_15: ## in Loop: Header=BB0_1 Depth=1
movb -33(%rbp), %dl
movq -16(%rbp), %rax
movslq -28(%rbp), %rcx
movb %dl, (%rax,%rcx)
## %bb.16: ## in Loop: Header=BB0_1 Depth=1
movl -28(%rbp), %eax
addl $1, %eax
movl %eax, -28(%rbp)
jmp LBB0_1
LBB0_17:
movq -16(%rbp), %rax
movslq -28(%rbp), %rcx
movb $0, (%rax,%rcx)
addq $48, %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, #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]
adrp x8, l_.str@PAGE
add x8, x8, l_.str@PAGEOFF
str x8, [sp, #24]
str wzr, [sp, #20]
b LBB0_1
LBB0_1: ; =>This Loop Header: Depth=1
; Child Loop BB0_8 Depth 2
ldur x8, [x29, #-8]
ldrsw x9, [sp, #20]
ldrsb w8, [x8, x9]
subs w8, w8, #0
cset w8, eq
tbnz w8, #0, LBB0_17
b LBB0_2
LBB0_2: ; in Loop: Header=BB0_1 Depth=1
ldur x8, [x29, #-8]
ldrsw x9, [sp, #20]
add x8, x8, x9
ldrb w8, [x8]
strb w8, [sp, #15]
ldrsb w0, [sp, #15]
bl _islower
subs w8, w0, #0
cset w8, eq
tbnz w8, #0, LBB0_4
b LBB0_3
LBB0_3: ; in Loop: Header=BB0_1 Depth=1
ldrsb w0, [sp, #15]
bl _toupper
strb w0, [sp, #15]
b LBB0_7
LBB0_4: ; in Loop: Header=BB0_1 Depth=1
ldrsb w0, [sp, #15]
bl _isupper
subs w8, w0, #0
cset w8, eq
tbnz w8, #0, LBB0_6
b LBB0_5
LBB0_5: ; in Loop: Header=BB0_1 Depth=1
ldrsb w0, [sp, #15]
bl _tolower
strb w0, [sp, #15]
b LBB0_6
LBB0_6: ; in Loop: Header=BB0_1 Depth=1
b LBB0_7
LBB0_7: ; in Loop: Header=BB0_1 Depth=1
str wzr, [sp, #16]
b LBB0_8
LBB0_8: ; Parent Loop BB0_1 Depth=1
; => This Inner Loop Header: Depth=2
ldr x8, [sp, #24]
ldrsw x9, [sp, #16]
ldrsb w8, [x8, x9]
subs w8, w8, #0
cset w8, eq
tbnz w8, #0, LBB0_15
b LBB0_9
LBB0_9: ; in Loop: Header=BB0_8 Depth=2
ldrsb w8, [sp, #15]
ldr x9, [sp, #24]
ldrsw x10, [sp, #16]
ldrsb w9, [x9, x10]
subs w8, w8, w9
cset w8, ne
tbnz w8, #0, LBB0_13
b LBB0_10
LBB0_10: ; in Loop: Header=BB0_1 Depth=1
ldr w8, [sp, #16]
subs w8, w8, #10
cset w8, ge
tbnz w8, #0, LBB0_12
b LBB0_11
LBB0_11: ; in Loop: Header=BB0_1 Depth=1
ldrsb w8, [sp, #15]
add w8, w8, #2
strb w8, [sp, #15]
b LBB0_12
LBB0_12: ; in Loop: Header=BB0_1 Depth=1
b LBB0_15
LBB0_13: ; in Loop: Header=BB0_8 Depth=2
b LBB0_14
LBB0_14: ; in Loop: Header=BB0_8 Depth=2
ldr w8, [sp, #16]
add w8, w8, #1
str w8, [sp, #16]
b LBB0_8
LBB0_15: ; in Loop: Header=BB0_1 Depth=1
ldrb w8, [sp, #15]
ldur x9, [x29, #-16]
ldrsw x10, [sp, #20]
add x9, x9, x10
strb w8, [x9]
b LBB0_16
LBB0_16: ; in Loop: Header=BB0_1 Depth=1
ldr w8, [sp, #20]
add w8, w8, #1
str w8, [sp, #20]
b LBB0_1
LBB0_17:
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
.section __TEXT,__cstring,cstring_literals
l_.str: ; @.str
.asciz "aeiouAEIOU"
.subsections_via_symbols
|
eval/problem94/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)
movl $0, -32(%rbp)
LBB0_1: ## =>This Loop Header: Depth=1
## Child Loop BB0_4 Depth 2
movl -32(%rbp), %eax
cmpl -12(%rbp), %eax
jge LBB0_17
## %bb.2: ## in Loop: Header=BB0_1 Depth=1
movq -8(%rbp), %rax
movslq -32(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -24(%rbp)
cmpl $1, -24(%rbp)
jle LBB0_15
## %bb.3: ## in Loop: Header=BB0_1 Depth=1
movl $1, -36(%rbp)
movl $2, -40(%rbp)
LBB0_4: ## 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_9
## %bb.5: ## in Loop: Header=BB0_4 Depth=2
movl -24(%rbp), %eax
cltd
idivl -40(%rbp)
cmpl $0, %edx
jne LBB0_7
## %bb.6: ## in Loop: Header=BB0_1 Depth=1
movl $0, -36(%rbp)
jmp LBB0_9
LBB0_7: ## in Loop: Header=BB0_4 Depth=2
jmp LBB0_8
LBB0_8: ## in Loop: Header=BB0_4 Depth=2
movl -40(%rbp), %eax
addl $1, %eax
movl %eax, -40(%rbp)
jmp LBB0_4
LBB0_9: ## in Loop: Header=BB0_1 Depth=1
cmpl $0, -36(%rbp)
je LBB0_14
## %bb.10: ## in Loop: Header=BB0_1 Depth=1
movl -24(%rbp), %eax
cmpl -16(%rbp), %eax
jle LBB0_12
## %bb.11: ## in Loop: Header=BB0_1 Depth=1
movl -24(%rbp), %eax
movl %eax, -44(%rbp) ## 4-byte Spill
jmp LBB0_13
LBB0_12: ## in Loop: Header=BB0_1 Depth=1
movl -16(%rbp), %eax
movl %eax, -44(%rbp) ## 4-byte Spill
LBB0_13: ## in Loop: Header=BB0_1 Depth=1
movl -44(%rbp), %eax ## 4-byte Reload
movl %eax, -16(%rbp)
LBB0_14: ## in Loop: Header=BB0_1 Depth=1
jmp LBB0_15
LBB0_15: ## in Loop: Header=BB0_1 Depth=1
jmp LBB0_16
LBB0_16: ## in Loop: Header=BB0_1 Depth=1
movl -32(%rbp), %eax
addl $1, %eax
movl %eax, -32(%rbp)
jmp LBB0_1
LBB0_17:
jmp LBB0_18
LBB0_18: ## =>This Inner Loop Header: Depth=1
cmpl $0, -16(%rbp)
jle LBB0_20
## %bb.19: ## in Loop: Header=BB0_18 Depth=1
movl -16(%rbp), %eax
movl $10, %ecx
cltd
idivl %ecx
addl -20(%rbp), %edx
movl %edx, -20(%rbp)
movl -16(%rbp), %eax
movl $10, %ecx
cltd
idivl %ecx
movl %eax, -16(%rbp)
jmp LBB0_18
LBB0_20:
movl -20(%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 wzr, [sp, #32]
str wzr, [sp, #28]
str wzr, [sp, #16]
b LBB0_1
LBB0_1: ; =>This Loop Header: Depth=1
; Child Loop BB0_4 Depth 2
ldr w8, [sp, #16]
ldr w9, [sp, #36]
subs w8, w8, w9
cset w8, ge
tbnz w8, #0, LBB0_17
b LBB0_2
LBB0_2: ; in Loop: Header=BB0_1 Depth=1
ldr x8, [sp, #40]
ldrsw x9, [sp, #16]
ldr w8, [x8, x9, lsl #2]
str w8, [sp, #24]
ldr w8, [sp, #24]
subs w8, w8, #1
cset w8, le
tbnz w8, #0, LBB0_15
b LBB0_3
LBB0_3: ; in Loop: Header=BB0_1 Depth=1
mov w8, #1
str w8, [sp, #12]
mov w8, #2
str w8, [sp, #8]
b LBB0_4
LBB0_4: ; 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_9
b LBB0_5
LBB0_5: ; in Loop: Header=BB0_4 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_7
b LBB0_6
LBB0_6: ; in Loop: Header=BB0_1 Depth=1
str wzr, [sp, #12]
b LBB0_9
LBB0_7: ; in Loop: Header=BB0_4 Depth=2
b LBB0_8
LBB0_8: ; in Loop: Header=BB0_4 Depth=2
ldr w8, [sp, #8]
add w8, w8, #1
str w8, [sp, #8]
b LBB0_4
LBB0_9: ; in Loop: Header=BB0_1 Depth=1
ldr w8, [sp, #12]
subs w8, w8, #0
cset w8, eq
tbnz w8, #0, LBB0_14
b LBB0_10
LBB0_10: ; in Loop: Header=BB0_1 Depth=1
ldr w8, [sp, #24]
ldr w9, [sp, #32]
subs w8, w8, w9
cset w8, le
tbnz w8, #0, LBB0_12
b LBB0_11
LBB0_11: ; in Loop: Header=BB0_1 Depth=1
ldr w8, [sp, #24]
str w8, [sp, #4] ; 4-byte Folded Spill
b LBB0_13
LBB0_12: ; in Loop: Header=BB0_1 Depth=1
ldr w8, [sp, #32]
str w8, [sp, #4] ; 4-byte Folded Spill
b LBB0_13
LBB0_13: ; in Loop: Header=BB0_1 Depth=1
ldr w8, [sp, #4] ; 4-byte Folded Reload
str w8, [sp, #32]
b LBB0_14
LBB0_14: ; in Loop: Header=BB0_1 Depth=1
b LBB0_15
LBB0_15: ; in Loop: Header=BB0_1 Depth=1
b LBB0_16
LBB0_16: ; in Loop: Header=BB0_1 Depth=1
ldr w8, [sp, #16]
add w8, w8, #1
str w8, [sp, #16]
b LBB0_1
LBB0_17:
b LBB0_18
LBB0_18: ; =>This Inner Loop Header: Depth=1
ldr w8, [sp, #32]
subs w8, w8, #0
cset w8, le
tbnz w8, #0, LBB0_20
b LBB0_19
LBB0_19: ; in Loop: Header=BB0_18 Depth=1
ldr w8, [sp, #32]
mov w9, #10
sdiv w10, w8, w9
mul w10, w10, w9
subs w10, w8, w10
ldr w8, [sp, #28]
add w8, w8, w10
str w8, [sp, #28]
ldr w8, [sp, #32]
sdiv w8, w8, w9
str w8, [sp, #32]
b LBB0_18
LBB0_20:
ldr w0, [sp, #28]
add sp, sp, #48
ret
.cfi_endproc
; -- End function
.subsections_via_symbols
|
eval/problem95/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)
jne LBB0_2
## %bb.1:
movl $0, -4(%rbp)
jmp LBB0_19
LBB0_2:
movl $0, -24(%rbp)
movl $0, -28(%rbp)
movl $0, -32(%rbp)
LBB0_3: ## =>This Loop Header: Depth=1
## Child Loop BB0_5 Depth 2
movl -32(%rbp), %eax
cmpl -20(%rbp), %eax
jge LBB0_18
## %bb.4: ## in Loop: Header=BB0_3 Depth=1
movq -16(%rbp), %rax
movslq -32(%rbp), %rcx
shlq $4, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq %rax, -40(%rbp)
movl $0, -44(%rbp)
LBB0_5: ## Parent Loop BB0_3 Depth=1
## => This Inner Loop Header: Depth=2
movq -40(%rbp), %rax
movslq -44(%rbp), %rcx
cmpb $0, (%rax,%rcx)
je LBB0_16
## %bb.6: ## in Loop: Header=BB0_5 Depth=2
movq -40(%rbp), %rax
movslq -44(%rbp), %rcx
movzbl (%rax,%rcx), %edi
callq _isalpha
cmpl $0, %eax
jne LBB0_8
## %bb.7:
movl $0, -4(%rbp)
jmp LBB0_19
LBB0_8: ## in Loop: Header=BB0_5 Depth=2
movq -40(%rbp), %rax
movslq -44(%rbp), %rcx
movzbl (%rax,%rcx), %edi
callq _isupper
cmpl $0, %eax
je LBB0_10
## %bb.9: ## in Loop: Header=BB0_5 Depth=2
movl $1, -28(%rbp)
LBB0_10: ## in Loop: Header=BB0_5 Depth=2
movq -40(%rbp), %rax
movslq -44(%rbp), %rcx
movzbl (%rax,%rcx), %edi
callq _islower
cmpl $0, %eax
je LBB0_12
## %bb.11: ## in Loop: Header=BB0_5 Depth=2
movl $1, -24(%rbp)
LBB0_12: ## in Loop: Header=BB0_5 Depth=2
movl -28(%rbp), %eax
addl -24(%rbp), %eax
cmpl $2, %eax
jne LBB0_14
## %bb.13:
movl $0, -4(%rbp)
jmp LBB0_19
LBB0_14: ## in Loop: Header=BB0_5 Depth=2
jmp LBB0_15
LBB0_15: ## in Loop: Header=BB0_5 Depth=2
movl -44(%rbp), %eax
addl $1, %eax
movl %eax, -44(%rbp)
jmp LBB0_5
LBB0_16: ## in Loop: Header=BB0_3 Depth=1
jmp LBB0_17
LBB0_17: ## in Loop: Header=BB0_3 Depth=1
movl -32(%rbp), %eax
addl $1, %eax
movl %eax, -32(%rbp)
jmp LBB0_3
LBB0_18:
movl $1, -4(%rbp)
LBB0_19:
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 w1, [x29, #-20]
ldur w8, [x29, #-20]
subs w8, w8, #0
cset w8, ne
tbnz w8, #0, LBB0_2
b LBB0_1
LBB0_1:
stur wzr, [x29, #-4]
b LBB0_19
LBB0_2:
str wzr, [sp, #24]
str wzr, [sp, #20]
str wzr, [sp, #16]
b LBB0_3
LBB0_3: ; =>This Loop Header: Depth=1
; Child Loop BB0_5 Depth 2
ldr w8, [sp, #16]
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
ldur x8, [x29, #-16]
ldrsw x9, [sp, #16]
lsl x9, x9, #4
ldr x8, [x8, x9]
str x8, [sp, #8]
str wzr, [sp, #4]
b LBB0_5
LBB0_5: ; Parent Loop BB0_3 Depth=1
; => This Inner Loop Header: Depth=2
ldr x8, [sp, #8]
ldrsw x9, [sp, #4]
add x8, x8, x9
ldrb w8, [x8]
subs w8, w8, #0
cset w8, eq
tbnz w8, #0, LBB0_16
b LBB0_6
LBB0_6: ; in Loop: Header=BB0_5 Depth=2
ldr x8, [sp, #8]
ldrsw x9, [sp, #4]
ldrb w0, [x8, x9]
bl _isalpha
subs w8, w0, #0
cset w8, ne
tbnz w8, #0, LBB0_8
b LBB0_7
LBB0_7:
stur wzr, [x29, #-4]
b LBB0_19
LBB0_8: ; in Loop: Header=BB0_5 Depth=2
ldr x8, [sp, #8]
ldrsw x9, [sp, #4]
ldrb w0, [x8, x9]
bl _isupper
subs w8, w0, #0
cset w8, eq
tbnz w8, #0, LBB0_10
b LBB0_9
LBB0_9: ; in Loop: Header=BB0_5 Depth=2
mov w8, #1
str w8, [sp, #20]
b LBB0_10
LBB0_10: ; in Loop: Header=BB0_5 Depth=2
ldr x8, [sp, #8]
ldrsw x9, [sp, #4]
ldrb w0, [x8, x9]
bl _islower
subs w8, w0, #0
cset w8, eq
tbnz w8, #0, LBB0_12
b LBB0_11
LBB0_11: ; in Loop: Header=BB0_5 Depth=2
mov w8, #1
str w8, [sp, #24]
b LBB0_12
LBB0_12: ; in Loop: Header=BB0_5 Depth=2
ldr w8, [sp, #20]
ldr w9, [sp, #24]
add w8, w8, w9
subs w8, w8, #2
cset w8, ne
tbnz w8, #0, LBB0_14
b LBB0_13
LBB0_13:
stur wzr, [x29, #-4]
b LBB0_19
LBB0_14: ; in Loop: Header=BB0_5 Depth=2
b LBB0_15
LBB0_15: ; in Loop: Header=BB0_5 Depth=2
ldr w8, [sp, #4]
add w8, w8, #1
str w8, [sp, #4]
b LBB0_5
LBB0_16: ; in Loop: Header=BB0_3 Depth=1
b LBB0_17
LBB0_17: ; in Loop: Header=BB0_3 Depth=1
ldr w8, [sp, #16]
add w8, w8, #1
str w8, [sp, #16]
b LBB0_3
LBB0_18:
mov w8, #1
stur w8, [x29, #-4]
b LBB0_19
LBB0_19:
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/problem96/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)
movslq -4(%rbp), %rdi
shlq $2, %rdi
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
cmpl -4(%rbp), %eax
jge LBB0_14
## %bb.2: ## in Loop: Header=BB0_1 Depth=1
movl $1, -36(%rbp)
movl $0, -32(%rbp)
LBB0_3: ## Parent Loop BB0_1 Depth=1
## => This Inner Loop Header: Depth=2
movl -32(%rbp), %eax
movq -16(%rbp), %rcx
cmpl (%rcx), %eax
jge LBB0_10
## %bb.4: ## in Loop: Header=BB0_3 Depth=2
movq -24(%rbp), %rax
movslq -32(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -40(%rbp)
movl -40(%rbp), %eax
imull -40(%rbp), %eax
cmpl -28(%rbp), %eax
jle LBB0_6
## %bb.5: ## in Loop: Header=BB0_1 Depth=1
jmp LBB0_10
LBB0_6: ## in Loop: Header=BB0_3 Depth=2
movl -28(%rbp), %eax
cltd
idivl -40(%rbp)
cmpl $0, %edx
jne LBB0_8
## %bb.7: ## in Loop: Header=BB0_1 Depth=1
movl $0, -36(%rbp)
jmp LBB0_10
LBB0_8: ## in Loop: Header=BB0_3 Depth=2
jmp LBB0_9
LBB0_9: ## in Loop: Header=BB0_3 Depth=2
movl -32(%rbp), %eax
addl $1, %eax
movl %eax, -32(%rbp)
jmp LBB0_3
LBB0_10: ## in Loop: Header=BB0_1 Depth=1
cmpl $0, -36(%rbp)
je LBB0_12
## %bb.11: ## in Loop: Header=BB0_1 Depth=1
movl -28(%rbp), %edx
movq -24(%rbp), %rax
movq -16(%rbp), %rcx
movslq (%rcx), %rcx
movl %edx, (%rax,%rcx,4)
movq -16(%rbp), %rax
movl (%rax), %ecx
addl $1, %ecx
movl %ecx, (%rax)
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:
movq -24(%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 w0, [x29, #-4]
stur x1, [x29, #-16]
ldursw x8, [x29, #-4]
lsl x0, x8, #2
bl _malloc
str x0, [sp, #24]
ldur x8, [x29, #-16]
str wzr, [x8]
mov w8, #2
str w8, [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, #-4]
subs w8, w8, w9
cset w8, ge
tbnz w8, #0, LBB0_14
b LBB0_2
LBB0_2: ; in Loop: Header=BB0_1 Depth=1
mov w8, #1
str w8, [sp, #12]
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]
ldur x9, [x29, #-16]
ldr w9, [x9]
subs w8, w8, w9
cset w8, ge
tbnz w8, #0, LBB0_10
b LBB0_4
LBB0_4: ; in Loop: Header=BB0_3 Depth=2
ldr x8, [sp, #24]
ldrsw x9, [sp, #16]
ldr w8, [x8, x9, lsl #2]
str w8, [sp, #8]
ldr w8, [sp, #8]
ldr w9, [sp, #8]
mul w8, w8, w9
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
b LBB0_10
LBB0_6: ; in Loop: Header=BB0_3 Depth=2
ldr w8, [sp, #20]
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_8
b LBB0_7
LBB0_7: ; in Loop: Header=BB0_1 Depth=1
str wzr, [sp, #12]
b LBB0_10
LBB0_8: ; in Loop: Header=BB0_3 Depth=2
b LBB0_9
LBB0_9: ; in Loop: Header=BB0_3 Depth=2
ldr w8, [sp, #16]
add w8, w8, #1
str w8, [sp, #16]
b LBB0_3
LBB0_10: ; in Loop: Header=BB0_1 Depth=1
ldr w8, [sp, #12]
subs w8, w8, #0
cset w8, eq
tbnz w8, #0, LBB0_12
b LBB0_11
LBB0_11: ; in Loop: Header=BB0_1 Depth=1
ldr w8, [sp, #20]
ldr x9, [sp, #24]
ldur x10, [x29, #-16]
ldrsw x10, [x10]
str w8, [x9, x10, lsl #2]
ldur x9, [x29, #-16]
ldr w8, [x9]
add w8, w8, #1
str w8, [x9]
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, #20]
add w8, w8, #1
str w8, [sp, #20]
b LBB0_1
LBB0_14:
ldr x0, [sp, #24]
ldp x29, x30, [sp, #48] ; 16-byte Folded Reload
add sp, sp, #64
ret
.cfi_endproc
; -- End function
.subsections_via_symbols
|
eval/problem97/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 $16, %rsp
movl %edi, -4(%rbp)
movl %esi, -8(%rbp)
movl -4(%rbp), %edi
callq _abs
movl $10, %ecx
cltd
idivl %ecx
movl %edx, -12(%rbp) ## 4-byte Spill
movl -8(%rbp), %edi
callq _abs
movl $10, %ecx
cltd
idivl %ecx
movl -12(%rbp), %eax ## 4-byte Reload
imull %edx, %eax
addq $16, %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, #32
.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
stur w0, [x29, #-4]
str w1, [sp, #8]
ldur w0, [x29, #-4]
bl _abs
mov w9, #10
str w9, [sp] ; 4-byte Folded Spill
sdiv w8, w0, w9
mul w8, w8, w9
subs w8, w0, w8
str w8, [sp, #4] ; 4-byte Folded Spill
ldr w0, [sp, #8]
bl _abs
ldr w10, [sp] ; 4-byte Folded Reload
ldr w8, [sp, #4] ; 4-byte Folded Reload
sdiv w9, w0, w10
mul w9, w9, w10
subs w9, w0, w9
mul w0, w8, w9
ldp x29, x30, [sp, #16] ; 16-byte Folded Reload
add sp, sp, #32
ret
.cfi_endproc
; -- End function
.subsections_via_symbols
|
eval/problem98/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)
leaq L_.str(%rip), %rax
movq %rax, -16(%rbp)
movl $0, -20(%rbp)
movl $0, -24(%rbp)
LBB0_1: ## =>This Inner Loop Header: Depth=1
movq -8(%rbp), %rax
movslq -24(%rbp), %rcx
movsbl (%rax,%rcx), %ecx
xorl %eax, %eax
## kill: def $al killed $al killed $eax
cmpl $0, %ecx
movb %al, -25(%rbp) ## 1-byte Spill
je LBB0_3
## %bb.2: ## in Loop: Header=BB0_1 Depth=1
movl -24(%rbp), %eax
shll $1, %eax
cltq
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
setb %al
movb %al, -25(%rbp) ## 1-byte Spill
LBB0_3: ## in Loop: Header=BB0_1 Depth=1
movb -25(%rbp), %al ## 1-byte Reload
testb $1, %al
jne LBB0_4
jmp LBB0_8
LBB0_4: ## in Loop: Header=BB0_1 Depth=1
movq -16(%rbp), %rdi
movq -8(%rbp), %rax
movl -24(%rbp), %ecx
shll $1, %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %esi
callq _strchr
cmpq $0, %rax
je LBB0_6
## %bb.5: ## in Loop: Header=BB0_1 Depth=1
movl -20(%rbp), %eax
addl $1, %eax
movl %eax, -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 -20(%rbp), %eax
addq $48, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "AEIOU"
.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]
adrp x8, l_.str@PAGE
add x8, x8, l_.str@PAGEOFF
stur x8, [x29, #-16]
stur wzr, [x29, #-20]
str wzr, [sp, #24]
b LBB0_1
LBB0_1: ; =>This Inner Loop Header: Depth=1
ldur x8, [x29, #-8]
ldrsw x9, [sp, #24]
ldrsb w8, [x8, x9]
subs w8, w8, #0
cset w8, eq
mov w9, #0
str w9, [sp, #20] ; 4-byte Folded Spill
tbnz w8, #0, LBB0_3
b LBB0_2
LBB0_2: ; in Loop: Header=BB0_1 Depth=1
ldr w8, [sp, #24]
lsl w9, w8, #1
; implicit-def: $x8
mov x8, x9
sxtw x8, w8
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, lo
str w8, [sp, #20] ; 4-byte Folded Spill
b LBB0_3
LBB0_3: ; in Loop: Header=BB0_1 Depth=1
ldr w8, [sp, #20] ; 4-byte Folded Reload
tbz w8, #0, LBB0_8
b LBB0_4
LBB0_4: ; in Loop: Header=BB0_1 Depth=1
ldur x0, [x29, #-16]
ldur x8, [x29, #-8]
ldr w9, [sp, #24]
lsl w9, w9, #1
ldrsb w1, [x8, w9, sxtw]
bl _strchr
subs x8, x0, #0
cset w8, eq
tbnz w8, #0, LBB0_6
b LBB0_5
LBB0_5: ; in Loop: Header=BB0_1 Depth=1
ldur w8, [x29, #-20]
add w8, w8, #1
stur w8, [x29, #-20]
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, #24]
add w8, w8, #1
str w8, [sp, #24]
b LBB0_1
LBB0_8:
ldur w0, [x29, #-20]
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 "AEIOU"
.subsections_via_symbols
|
eval/problem99/code.c
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.