CISC to RISC
Collection
Language-Model Guided Assembly Transpilation
•
7 items
•
Updated
files
stringlengths 20
22
| x86
stringlengths 639
12.7k
| arm
stringlengths 763
10k
|
---|---|---|
eval/problem145/code.c | .file "code.c"
.intel_syntax noprefix
.text
.globl func0
.type func0, @function
func0:
.LFB6:
.cfi_startproc
endbr64
push rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
mov rbp, rsp
.cfi_def_cfa_register 6
sub rsp, 272
mov QWORD PTR -264[rbp], rdi
mov QWORD PTR -272[rbp], rsi
mov rax, QWORD PTR fs:40
mov QWORD PTR -8[rbp], rax
xor eax, eax
mov DWORD PTR -248[rbp], 0
jmp .L2
.L3:
mov eax, DWORD PTR -248[rbp]
movsx rdx, eax
mov rax, QWORD PTR -264[rbp]
add rax, rdx
movzx edx, BYTE PTR [rax]
mov eax, DWORD PTR -248[rbp]
cdqe
mov BYTE PTR -224[rbp+rax], dl
add DWORD PTR -248[rbp], 1
.L2:
mov eax, DWORD PTR -248[rbp]
movsx rdx, eax
mov rax, QWORD PTR -264[rbp]
add rax, rdx
movzx eax, BYTE PTR [rax]
cmp al, 47
jne .L3
mov eax, DWORD PTR -248[rbp]
cdqe
mov BYTE PTR -224[rbp+rax], 0
lea rax, -224[rbp]
mov rdi, rax
call atoi@PLT
mov DWORD PTR -240[rbp], eax
mov DWORD PTR -244[rbp], 0
add DWORD PTR -248[rbp], 1
jmp .L4
.L5:
mov eax, DWORD PTR -248[rbp]
movsx rdx, eax
mov rax, QWORD PTR -264[rbp]
add rax, rdx
movzx edx, BYTE PTR [rax]
mov eax, DWORD PTR -244[rbp]
cdqe
mov BYTE PTR -112[rbp+rax], dl
add DWORD PTR -248[rbp], 1
add DWORD PTR -244[rbp], 1
.L4:
mov eax, DWORD PTR -248[rbp]
movsx rdx, eax
mov rax, QWORD PTR -264[rbp]
add rax, rdx
movzx eax, BYTE PTR [rax]
test al, al
jne .L5
mov eax, DWORD PTR -244[rbp]
cdqe
mov BYTE PTR -112[rbp+rax], 0
lea rax, -112[rbp]
mov rdi, rax
call atoi@PLT
mov DWORD PTR -236[rbp], eax
mov DWORD PTR -248[rbp], 0
jmp .L6
.L7:
mov eax, DWORD PTR -248[rbp]
movsx rdx, eax
mov rax, QWORD PTR -272[rbp]
add rax, rdx
movzx edx, BYTE PTR [rax]
mov eax, DWORD PTR -248[rbp]
cdqe
mov BYTE PTR -224[rbp+rax], dl
add DWORD PTR -248[rbp], 1
.L6:
mov eax, DWORD PTR -248[rbp]
movsx rdx, eax
mov rax, QWORD PTR -272[rbp]
add rax, rdx
movzx eax, BYTE PTR [rax]
cmp al, 47
jne .L7
mov eax, DWORD PTR -248[rbp]
cdqe
mov BYTE PTR -224[rbp+rax], 0
lea rax, -224[rbp]
mov rdi, rax
call atoi@PLT
mov DWORD PTR -232[rbp], eax
mov DWORD PTR -244[rbp], 0
add DWORD PTR -248[rbp], 1
jmp .L8
.L9:
mov eax, DWORD PTR -248[rbp]
movsx rdx, eax
mov rax, QWORD PTR -272[rbp]
add rax, rdx
movzx edx, BYTE PTR [rax]
mov eax, DWORD PTR -244[rbp]
cdqe
mov BYTE PTR -112[rbp+rax], dl
add DWORD PTR -248[rbp], 1
add DWORD PTR -244[rbp], 1
.L8:
mov eax, DWORD PTR -248[rbp]
movsx rdx, eax
mov rax, QWORD PTR -272[rbp]
add rax, rdx
movzx eax, BYTE PTR [rax]
test al, al
jne .L9
mov eax, DWORD PTR -244[rbp]
cdqe
mov BYTE PTR -112[rbp+rax], 0
lea rax, -112[rbp]
mov rdi, rax
call atoi@PLT
mov DWORD PTR -228[rbp], eax
mov eax, DWORD PTR -240[rbp]
imul eax, DWORD PTR -232[rbp]
mov edx, DWORD PTR -236[rbp]
mov ecx, edx
imul ecx, DWORD PTR -228[rbp]
cdq
idiv ecx
mov eax, edx
test eax, eax
jne .L10
mov eax, 1
jmp .L12
.L10:
mov eax, 0
.L12:
mov rsi, QWORD PTR -8[rbp]
xor rsi, QWORD PTR fs:40
je .L13
call __stack_chk_fail@PLT
.L13:
leave
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE6:
.size func0, .-func0
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",@progbits
.section .note.gnu.property,"a"
.align 8
.long 1f - 0f
.long 4f - 1f
.long 5
0:
.string "GNU"
1:
.align 8
.long 0xc0000002
.long 3f - 2f
2:
.long 0x3
3:
.align 8
4:
| .arch armv5t
.eabi_attribute 20, 1
.eabi_attribute 21, 1
.eabi_attribute 23, 3
.eabi_attribute 24, 1
.eabi_attribute 25, 1
.eabi_attribute 26, 2
.eabi_attribute 30, 6
.eabi_attribute 34, 0
.eabi_attribute 18, 4
.file "code.c"
.text
.global __aeabi_idivmod
.section .rodata
.align 2
.LC0:
.word __stack_chk_guard
.text
.align 2
.global func0
.syntax unified
.arm
.fpu softvfp
.type func0, %function
func0:
@ args = 0, pretend = 0, frame = 248
@ frame_needed = 1, uses_anonymous_args = 0
push {fp, lr}
add fp, sp, #4
sub sp, sp, #248
str r0, [fp, #-248]
str r1, [fp, #-252]
ldr r3, .L14
ldr r3, [r3]
str r3, [fp, #-8]
mov r3,#0
mov r3, #0
str r3, [fp, #-240]
b .L2
.L3:
ldr r3, [fp, #-240]
ldr r2, [fp, #-248]
add r3, r2, r3
ldrb r1, [r3] @ zero_extendqisi2
sub r2, fp, #216
ldr r3, [fp, #-240]
add r3, r2, r3
mov r2, r1
strb r2, [r3]
ldr r3, [fp, #-240]
add r3, r3, #1
str r3, [fp, #-240]
.L2:
ldr r3, [fp, #-240]
ldr r2, [fp, #-248]
add r3, r2, r3
ldrb r3, [r3] @ zero_extendqisi2
cmp r3, #47
bne .L3
sub r2, fp, #216
ldr r3, [fp, #-240]
add r3, r2, r3
mov r2, #0
strb r2, [r3]
sub r3, fp, #216
mov r0, r3
bl atoi
str r0, [fp, #-232]
mov r3, #0
str r3, [fp, #-236]
ldr r3, [fp, #-240]
add r3, r3, #1
str r3, [fp, #-240]
b .L4
.L5:
ldr r3, [fp, #-240]
ldr r2, [fp, #-248]
add r3, r2, r3
ldrb r1, [r3] @ zero_extendqisi2
sub r2, fp, #112
ldr r3, [fp, #-236]
add r3, r2, r3
mov r2, r1
strb r2, [r3]
ldr r3, [fp, #-240]
add r3, r3, #1
str r3, [fp, #-240]
ldr r3, [fp, #-236]
add r3, r3, #1
str r3, [fp, #-236]
.L4:
ldr r3, [fp, #-240]
ldr r2, [fp, #-248]
add r3, r2, r3
ldrb r3, [r3] @ zero_extendqisi2
cmp r3, #0
bne .L5
sub r2, fp, #112
ldr r3, [fp, #-236]
add r3, r2, r3
mov r2, #0
strb r2, [r3]
sub r3, fp, #112
mov r0, r3
bl atoi
str r0, [fp, #-228]
mov r3, #0
str r3, [fp, #-240]
b .L6
.L7:
ldr r3, [fp, #-240]
ldr r2, [fp, #-252]
add r3, r2, r3
ldrb r1, [r3] @ zero_extendqisi2
sub r2, fp, #216
ldr r3, [fp, #-240]
add r3, r2, r3
mov r2, r1
strb r2, [r3]
ldr r3, [fp, #-240]
add r3, r3, #1
str r3, [fp, #-240]
.L6:
ldr r3, [fp, #-240]
ldr r2, [fp, #-252]
add r3, r2, r3
ldrb r3, [r3] @ zero_extendqisi2
cmp r3, #47
bne .L7
sub r2, fp, #216
ldr r3, [fp, #-240]
add r3, r2, r3
mov r2, #0
strb r2, [r3]
sub r3, fp, #216
mov r0, r3
bl atoi
str r0, [fp, #-224]
mov r3, #0
str r3, [fp, #-236]
ldr r3, [fp, #-240]
add r3, r3, #1
str r3, [fp, #-240]
b .L8
.L9:
ldr r3, [fp, #-240]
ldr r2, [fp, #-252]
add r3, r2, r3
ldrb r1, [r3] @ zero_extendqisi2
sub r2, fp, #112
ldr r3, [fp, #-236]
add r3, r2, r3
mov r2, r1
strb r2, [r3]
ldr r3, [fp, #-240]
add r3, r3, #1
str r3, [fp, #-240]
ldr r3, [fp, #-236]
add r3, r3, #1
str r3, [fp, #-236]
.L8:
ldr r3, [fp, #-240]
ldr r2, [fp, #-252]
add r3, r2, r3
ldrb r3, [r3] @ zero_extendqisi2
cmp r3, #0
bne .L9
sub r2, fp, #112
ldr r3, [fp, #-236]
add r3, r2, r3
mov r2, #0
strb r2, [r3]
sub r3, fp, #112
mov r0, r3
bl atoi
str r0, [fp, #-220]
ldr r3, [fp, #-232]
ldr r2, [fp, #-224]
mul r0, r2, r3
ldr r3, [fp, #-228]
ldr r2, [fp, #-220]
mul r3, r2, r3
mov r1, r3
bl __aeabi_idivmod
mov r3, r1
cmp r3, #0
bne .L10
mov r3, #1
b .L12
.L10:
mov r3, #0
.L12:
ldr r2, .L14
ldr r1, [r2]
ldr r2, [fp, #-8]
eors r1, r2, r1
mov r2, #0
beq .L13
bl __stack_chk_fail
.L13:
mov r0, r3
sub sp, fp, #4
@ sp needed
pop {fp, pc}
.L15:
.align 2
.L14:
.word .LC0
.size func0, .-func0
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",%progbits
|
eval/problem44/code.c | .file "code.c"
.intel_syntax noprefix
.text
.globl func0
.type func0, @function
func0:
.LFB0:
.cfi_startproc
endbr64
push rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
mov rbp, rsp
.cfi_def_cfa_register 6
mov QWORD PTR -24[rbp], rdi
mov DWORD PTR -28[rbp], esi
mov DWORD PTR -8[rbp], 0
jmp .L2
.L7:
mov eax, DWORD PTR -8[rbp]
add eax, 1
mov DWORD PTR -4[rbp], eax
jmp .L3
.L6:
mov eax, DWORD PTR -8[rbp]
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -24[rbp]
add rax, rdx
mov edx, DWORD PTR [rax]
mov eax, DWORD PTR -4[rbp]
cdqe
lea rcx, 0[0+rax*4]
mov rax, QWORD PTR -24[rbp]
add rax, rcx
mov eax, DWORD PTR [rax]
add eax, edx
test eax, eax
jne .L4
mov eax, 1
jmp .L5
.L4:
add DWORD PTR -4[rbp], 1
.L3:
mov eax, DWORD PTR -4[rbp]
cmp eax, DWORD PTR -28[rbp]
jl .L6
add DWORD PTR -8[rbp], 1
.L2:
mov eax, DWORD PTR -8[rbp]
cmp eax, DWORD PTR -28[rbp]
jl .L7
mov eax, 0
.L5:
pop rbp
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE0:
.size func0, .-func0
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",@progbits
.section .note.gnu.property,"a"
.align 8
.long 1f - 0f
.long 4f - 1f
.long 5
0:
.string "GNU"
1:
.align 8
.long 0xc0000002
.long 3f - 2f
2:
.long 0x3
3:
.align 8
4:
| .arch armv5t
.eabi_attribute 20, 1
.eabi_attribute 21, 1
.eabi_attribute 23, 3
.eabi_attribute 24, 1
.eabi_attribute 25, 1
.eabi_attribute 26, 2
.eabi_attribute 30, 6
.eabi_attribute 34, 0
.eabi_attribute 18, 4
.file "code.c"
.text
.align 2
.global func0
.syntax unified
.arm
.fpu softvfp
.type func0, %function
func0:
@ args = 0, pretend = 0, frame = 16
@ frame_needed = 1, uses_anonymous_args = 0
@ link register save eliminated.
str fp, [sp, #-4]!
add fp, sp, #0
sub sp, sp, #20
str r0, [fp, #-16]
str r1, [fp, #-20]
mov r3, #0
str r3, [fp, #-12]
b .L2
.L7:
ldr r3, [fp, #-12]
add r3, r3, #1
str r3, [fp, #-8]
b .L3
.L6:
ldr r3, [fp, #-12]
lsl r3, r3, #2
ldr r2, [fp, #-16]
add r3, r2, r3
ldr r2, [r3]
ldr r3, [fp, #-8]
lsl r3, r3, #2
ldr r1, [fp, #-16]
add r3, r1, r3
ldr r3, [r3]
add r3, r2, r3
cmp r3, #0
bne .L4
mov r3, #1
b .L5
.L4:
ldr r3, [fp, #-8]
add r3, r3, #1
str r3, [fp, #-8]
.L3:
ldr r2, [fp, #-8]
ldr r3, [fp, #-20]
cmp r2, r3
blt .L6
ldr r3, [fp, #-12]
add r3, r3, #1
str r3, [fp, #-12]
.L2:
ldr r2, [fp, #-12]
ldr r3, [fp, #-20]
cmp r2, r3
blt .L7
mov r3, #0
.L5:
mov r0, r3
add sp, fp, #0
@ sp needed
ldr fp, [sp], #4
bx lr
.size func0, .-func0
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",%progbits
|
eval/problem55/code.c | .file "code.c"
.intel_syntax noprefix
.text
.globl func0
.type func0, @function
func0:
.LFB0:
.cfi_startproc
endbr64
push rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
mov rbp, rsp
.cfi_def_cfa_register 6
sub rsp, 48
mov QWORD PTR -40[rbp], rdi
mov QWORD PTR -48[rbp], rsi
mov rax, QWORD PTR -40[rbp]
mov rdi, rax
call strlen@PLT
mov DWORD PTR -8[rbp], eax
mov rax, QWORD PTR -48[rbp]
mov rdi, rax
call strlen@PLT
mov DWORD PTR -4[rbp], eax
mov DWORD PTR -24[rbp], 0
jmp .L2
.L9:
mov BYTE PTR -26[rbp], 0
mov DWORD PTR -20[rbp], 0
jmp .L3
.L6:
mov eax, DWORD PTR -24[rbp]
movsx rdx, eax
mov rax, QWORD PTR -40[rbp]
add rax, rdx
movzx edx, BYTE PTR [rax]
mov eax, DWORD PTR -20[rbp]
movsx rcx, eax
mov rax, QWORD PTR -48[rbp]
add rax, rcx
movzx eax, BYTE PTR [rax]
cmp dl, al
jne .L4
mov BYTE PTR -26[rbp], 1
jmp .L5
.L4:
add DWORD PTR -20[rbp], 1
.L3:
mov eax, DWORD PTR -20[rbp]
cmp eax, DWORD PTR -4[rbp]
jl .L6
.L5:
movzx eax, BYTE PTR -26[rbp]
xor eax, 1
test al, al
je .L7
mov eax, 0
jmp .L8
.L7:
add DWORD PTR -24[rbp], 1
.L2:
mov eax, DWORD PTR -24[rbp]
cmp eax, DWORD PTR -8[rbp]
jl .L9
mov DWORD PTR -16[rbp], 0
jmp .L10
.L16:
mov BYTE PTR -25[rbp], 0
mov DWORD PTR -12[rbp], 0
jmp .L11
.L14:
mov eax, DWORD PTR -16[rbp]
movsx rdx, eax
mov rax, QWORD PTR -48[rbp]
add rax, rdx
movzx edx, BYTE PTR [rax]
mov eax, DWORD PTR -12[rbp]
movsx rcx, eax
mov rax, QWORD PTR -40[rbp]
add rax, rcx
movzx eax, BYTE PTR [rax]
cmp dl, al
jne .L12
mov BYTE PTR -25[rbp], 1
jmp .L13
.L12:
add DWORD PTR -12[rbp], 1
.L11:
mov eax, DWORD PTR -12[rbp]
cmp eax, DWORD PTR -8[rbp]
jl .L14
.L13:
movzx eax, BYTE PTR -25[rbp]
xor eax, 1
test al, al
je .L15
mov eax, 0
jmp .L8
.L15:
add DWORD PTR -16[rbp], 1
.L10:
mov eax, DWORD PTR -16[rbp]
cmp eax, DWORD PTR -4[rbp]
jl .L16
mov eax, 1
.L8:
leave
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE0:
.size func0, .-func0
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",@progbits
.section .note.gnu.property,"a"
.align 8
.long 1f - 0f
.long 4f - 1f
.long 5
0:
.string "GNU"
1:
.align 8
.long 0xc0000002
.long 3f - 2f
2:
.long 0x3
3:
.align 8
4:
| .arch armv5t
.eabi_attribute 20, 1
.eabi_attribute 21, 1
.eabi_attribute 23, 3
.eabi_attribute 24, 1
.eabi_attribute 25, 1
.eabi_attribute 26, 2
.eabi_attribute 30, 6
.eabi_attribute 34, 0
.eabi_attribute 18, 4
.file "code.c"
.text
.align 2
.global func0
.syntax unified
.arm
.fpu softvfp
.type func0, %function
func0:
@ args = 0, pretend = 0, frame = 40
@ frame_needed = 1, uses_anonymous_args = 0
push {fp, lr}
add fp, sp, #4
sub sp, sp, #40
str r0, [fp, #-40]
str r1, [fp, #-44]
ldr r0, [fp, #-40]
bl strlen
mov r3, r0
str r3, [fp, #-12]
ldr r0, [fp, #-44]
bl strlen
mov r3, r0
str r3, [fp, #-8]
mov r3, #0
str r3, [fp, #-28]
b .L2
.L9:
mov r3, #0
strb r3, [fp, #-30]
mov r3, #0
str r3, [fp, #-24]
b .L3
.L6:
ldr r3, [fp, #-28]
ldr r2, [fp, #-40]
add r3, r2, r3
ldrb r2, [r3] @ zero_extendqisi2
ldr r3, [fp, #-24]
ldr r1, [fp, #-44]
add r3, r1, r3
ldrb r3, [r3] @ zero_extendqisi2
cmp r2, r3
bne .L4
mov r3, #1
strb r3, [fp, #-30]
b .L5
.L4:
ldr r3, [fp, #-24]
add r3, r3, #1
str r3, [fp, #-24]
.L3:
ldr r2, [fp, #-24]
ldr r3, [fp, #-8]
cmp r2, r3
blt .L6
.L5:
ldrb r3, [fp, #-30]
eor r3, r3, #1
and r3, r3, #255
cmp r3, #0
beq .L7
mov r3, #0
b .L8
.L7:
ldr r3, [fp, #-28]
add r3, r3, #1
str r3, [fp, #-28]
.L2:
ldr r2, [fp, #-28]
ldr r3, [fp, #-12]
cmp r2, r3
blt .L9
mov r3, #0
str r3, [fp, #-20]
b .L10
.L16:
mov r3, #0
strb r3, [fp, #-29]
mov r3, #0
str r3, [fp, #-16]
b .L11
.L14:
ldr r3, [fp, #-20]
ldr r2, [fp, #-44]
add r3, r2, r3
ldrb r2, [r3] @ zero_extendqisi2
ldr r3, [fp, #-16]
ldr r1, [fp, #-40]
add r3, r1, r3
ldrb r3, [r3] @ zero_extendqisi2
cmp r2, r3
bne .L12
mov r3, #1
strb r3, [fp, #-29]
b .L13
.L12:
ldr r3, [fp, #-16]
add r3, r3, #1
str r3, [fp, #-16]
.L11:
ldr r2, [fp, #-16]
ldr r3, [fp, #-12]
cmp r2, r3
blt .L14
.L13:
ldrb r3, [fp, #-29]
eor r3, r3, #1
and r3, r3, #255
cmp r3, #0
beq .L15
mov r3, #0
b .L8
.L15:
ldr r3, [fp, #-20]
add r3, r3, #1
str r3, [fp, #-20]
.L10:
ldr r2, [fp, #-20]
ldr r3, [fp, #-8]
cmp r2, r3
blt .L16
mov r3, #1
.L8:
mov r0, r3
sub sp, fp, #4
@ sp needed
pop {fp, pc}
.size func0, .-func0
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",%progbits
|
eval/problem61/code.c | .file "code.c"
.intel_syntax noprefix
.text
.globl func0
.type func0, @function
func0:
.LFB0:
.cfi_startproc
endbr64
push rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
mov rbp, rsp
.cfi_def_cfa_register 6
mov DWORD PTR -4[rbp], edi
mov eax, DWORD PTR -4[rbp]
add eax, 1
imul eax, DWORD PTR -4[rbp]
mov edx, eax
shr edx, 31
add eax, edx
sar eax
pop rbp
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE0:
.size func0, .-func0
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",@progbits
.section .note.gnu.property,"a"
.align 8
.long 1f - 0f
.long 4f - 1f
.long 5
0:
.string "GNU"
1:
.align 8
.long 0xc0000002
.long 3f - 2f
2:
.long 0x3
3:
.align 8
4:
| .arch armv5t
.eabi_attribute 20, 1
.eabi_attribute 21, 1
.eabi_attribute 23, 3
.eabi_attribute 24, 1
.eabi_attribute 25, 1
.eabi_attribute 26, 2
.eabi_attribute 30, 6
.eabi_attribute 34, 0
.eabi_attribute 18, 4
.file "code.c"
.text
.align 2
.global func0
.syntax unified
.arm
.fpu softvfp
.type func0, %function
func0:
@ args = 0, pretend = 0, frame = 8
@ frame_needed = 1, uses_anonymous_args = 0
@ link register save eliminated.
str fp, [sp, #-4]!
add fp, sp, #0
sub sp, sp, #12
str r0, [fp, #-8]
ldr r3, [fp, #-8]
add r3, r3, #1
ldr r2, [fp, #-8]
mul r3, r2, r3
lsr r2, r3, #31
add r3, r2, r3
asr r3, r3, #1
mov r0, r3
add sp, fp, #0
@ sp needed
ldr fp, [sp], #4
bx lr
.size func0, .-func0
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",%progbits
|
eval/problem10/code.c | .file "code.c"
.intel_syntax noprefix
.text
.globl func0
.type func0, @function
func0:
.LFB6:
.cfi_startproc
endbr64
push rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
mov rbp, rsp
.cfi_def_cfa_register 6
sub rsp, 32
mov QWORD PTR -24[rbp], rdi
mov DWORD PTR -28[rbp], esi
cmp DWORD PTR -28[rbp], 0
jg .L2
mov eax, 0
jmp .L3
.L2:
mov eax, DWORD PTR -28[rbp]
cdqe
sal rax, 2
mov rdi, rax
call malloc@PLT
mov QWORD PTR -8[rbp], rax
cmp QWORD PTR -8[rbp], 0
jne .L4
mov eax, 0
jmp .L3
.L4:
mov rax, QWORD PTR -24[rbp]
mov eax, DWORD PTR [rax]
mov DWORD PTR -16[rbp], eax
mov DWORD PTR -12[rbp], 0
jmp .L5
.L7:
mov eax, DWORD PTR -12[rbp]
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -24[rbp]
add rax, rdx
mov eax, DWORD PTR [rax]
cmp DWORD PTR -16[rbp], eax
jge .L6
mov eax, DWORD PTR -12[rbp]
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -24[rbp]
add rax, rdx
mov eax, DWORD PTR [rax]
mov DWORD PTR -16[rbp], eax
.L6:
mov eax, DWORD PTR -12[rbp]
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -8[rbp]
add rdx, rax
mov eax, DWORD PTR -16[rbp]
mov DWORD PTR [rdx], eax
add DWORD PTR -12[rbp], 1
.L5:
mov eax, DWORD PTR -12[rbp]
cmp eax, DWORD PTR -28[rbp]
jl .L7
mov rax, QWORD PTR -8[rbp]
.L3:
leave
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE6:
.size func0, .-func0
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",@progbits
.section .note.gnu.property,"a"
.align 8
.long 1f - 0f
.long 4f - 1f
.long 5
0:
.string "GNU"
1:
.align 8
.long 0xc0000002
.long 3f - 2f
2:
.long 0x3
3:
.align 8
4:
| .arch armv5t
.eabi_attribute 20, 1
.eabi_attribute 21, 1
.eabi_attribute 23, 3
.eabi_attribute 24, 1
.eabi_attribute 25, 1
.eabi_attribute 26, 2
.eabi_attribute 30, 6
.eabi_attribute 34, 0
.eabi_attribute 18, 4
.file "code.c"
.text
.align 2
.global func0
.syntax unified
.arm
.fpu softvfp
.type func0, %function
func0:
@ args = 0, pretend = 0, frame = 24
@ frame_needed = 1, uses_anonymous_args = 0
push {fp, lr}
add fp, sp, #4
sub sp, sp, #24
str r0, [fp, #-24]
str r1, [fp, #-28]
ldr r3, [fp, #-28]
cmp r3, #0
bgt .L2
mov r3, #0
b .L3
.L2:
ldr r3, [fp, #-28]
lsl r3, r3, #2
mov r0, r3
bl malloc
mov r3, r0
str r3, [fp, #-8]
ldr r3, [fp, #-8]
cmp r3, #0
bne .L4
mov r3, #0
b .L3
.L4:
ldr r3, [fp, #-24]
ldr r3, [r3]
str r3, [fp, #-16]
mov r3, #0
str r3, [fp, #-12]
b .L5
.L7:
ldr r3, [fp, #-12]
lsl r3, r3, #2
ldr r2, [fp, #-24]
add r3, r2, r3
ldr r3, [r3]
ldr r2, [fp, #-16]
cmp r2, r3
bge .L6
ldr r3, [fp, #-12]
lsl r3, r3, #2
ldr r2, [fp, #-24]
add r3, r2, r3
ldr r3, [r3]
str r3, [fp, #-16]
.L6:
ldr r3, [fp, #-12]
lsl r3, r3, #2
ldr r2, [fp, #-8]
add r3, r2, r3
ldr r2, [fp, #-16]
str r2, [r3]
ldr r3, [fp, #-12]
add r3, r3, #1
str r3, [fp, #-12]
.L5:
ldr r2, [fp, #-12]
ldr r3, [fp, #-28]
cmp r2, r3
blt .L7
ldr r3, [fp, #-8]
.L3:
mov r0, r3
sub sp, fp, #4
@ sp needed
pop {fp, pc}
.size func0, .-func0
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",%progbits
|
eval/problem56/code.c | .file "code.c"
.intel_syntax noprefix
.text
.globl func0
.type func0, @function
func0:
.LFB0:
.cfi_startproc
endbr64
push rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
mov rbp, rsp
.cfi_def_cfa_register 6
sub rsp, 4048
mov DWORD PTR -4036[rbp], edi
mov rax, QWORD PTR fs:40
mov QWORD PTR -8[rbp], rax
xor eax, eax
lea rdx, -4016[rbp]
mov eax, 0
mov ecx, 500
mov rdi, rdx
rep stosq
mov DWORD PTR -4016[rbp], 0
mov DWORD PTR -4012[rbp], 1
mov DWORD PTR -4020[rbp], 2
jmp .L2
.L3:
mov eax, DWORD PTR -4020[rbp]
sub eax, 1
cdqe
mov edx, DWORD PTR -4016[rbp+rax*4]
mov eax, DWORD PTR -4020[rbp]
sub eax, 2
cdqe
mov eax, DWORD PTR -4016[rbp+rax*4]
add edx, eax
mov eax, DWORD PTR -4020[rbp]
cdqe
mov DWORD PTR -4016[rbp+rax*4], edx
add DWORD PTR -4020[rbp], 1
.L2:
mov eax, DWORD PTR -4020[rbp]
cmp eax, DWORD PTR -4036[rbp]
jle .L3
mov eax, DWORD PTR -4036[rbp]
cdqe
mov eax, DWORD PTR -4016[rbp+rax*4]
mov rsi, QWORD PTR -8[rbp]
xor rsi, QWORD PTR fs:40
je .L5
call __stack_chk_fail@PLT
.L5:
leave
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE0:
.size func0, .-func0
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",@progbits
.section .note.gnu.property,"a"
.align 8
.long 1f - 0f
.long 4f - 1f
.long 5
0:
.string "GNU"
1:
.align 8
.long 0xc0000002
.long 3f - 2f
2:
.long 0x3
3:
.align 8
4:
| .arch armv5t
.eabi_attribute 20, 1
.eabi_attribute 21, 1
.eabi_attribute 23, 3
.eabi_attribute 24, 1
.eabi_attribute 25, 1
.eabi_attribute 26, 2
.eabi_attribute 30, 6
.eabi_attribute 34, 0
.eabi_attribute 18, 4
.file "code.c"
.text
.section .rodata
.align 2
.LC0:
.word __stack_chk_guard
.text
.align 2
.global func0
.syntax unified
.arm
.fpu softvfp
.type func0, %function
func0:
@ args = 0, pretend = 0, frame = 4016
@ frame_needed = 1, uses_anonymous_args = 0
push {fp, lr}
add fp, sp, #4
sub sp, sp, #4016
str r0, [fp, #-4016]
ldr r3, .L6
ldr r3, [r3]
str r3, [fp, #-8]
mov r3,#0
sub r3, fp, #4000
sub r3, r3, #4
sub r3, r3, #4
mov r2, #4000
mov r1, #0
mov r0, r3
bl memset
mov r3, #0
str r3, [fp, #-4008]
mov r3, #1
str r3, [fp, #-4004]
mov r3, #2
str r3, [fp, #-4012]
b .L2
.L3:
ldr r3, [fp, #-4012]
sub r3, r3, #1
lsl r3, r3, #2
sub r2, fp, #4
add r3, r2, r3
ldr r2, [r3, #-4004]
ldr r3, [fp, #-4012]
sub r3, r3, #2
lsl r3, r3, #2
sub r1, fp, #4
add r3, r1, r3
ldr r3, [r3, #-4004]
add r2, r2, r3
ldr r3, [fp, #-4012]
lsl r3, r3, #2
sub r1, fp, #4
add r3, r1, r3
str r2, [r3, #-4004]
ldr r3, [fp, #-4012]
add r3, r3, #1
str r3, [fp, #-4012]
.L2:
ldr r2, [fp, #-4012]
ldr r3, [fp, #-4016]
cmp r2, r3
ble .L3
ldr r3, [fp, #-4016]
lsl r3, r3, #2
sub r2, fp, #4
add r3, r2, r3
ldr r3, [r3, #-4004]
ldr r2, .L6
ldr r1, [r2]
ldr r2, [fp, #-8]
eors r1, r2, r1
mov r2, #0
beq .L5
bl __stack_chk_fail
.L5:
mov r0, r3
sub sp, fp, #4
@ sp needed
pop {fp, pc}
.L7:
.align 2
.L6:
.word .LC0
.size func0, .-func0
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",%progbits
|
eval/problem11/code.c | .file "code.c"
.intel_syntax noprefix
.text
.globl func0
.type func0, @function
func0:
.LFB6:
.cfi_startproc
endbr64
push rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
mov rbp, rsp
.cfi_def_cfa_register 6
sub rsp, 48
mov QWORD PTR -40[rbp], rdi
mov rax, QWORD PTR -40[rbp]
mov rdi, rax
call strlen@PLT
mov DWORD PTR -12[rbp], eax
mov eax, DWORD PTR -12[rbp]
add eax, eax
add eax, 1
cdqe
mov rdi, rax
call malloc@PLT
mov QWORD PTR -8[rbp], rax
cmp QWORD PTR -8[rbp], 0
jne .L2
mov eax, 0
jmp .L3
.L2:
mov DWORD PTR -24[rbp], 0
jmp .L4
.L12:
mov DWORD PTR -16[rbp], 1
mov DWORD PTR -20[rbp], 0
jmp .L5
.L8:
mov edx, DWORD PTR -24[rbp]
mov eax, DWORD PTR -20[rbp]
add eax, edx
movsx rdx, eax
mov rax, QWORD PTR -40[rbp]
add rax, rdx
movzx edx, BYTE PTR [rax]
mov eax, DWORD PTR -12[rbp]
sub eax, 1
sub eax, DWORD PTR -20[rbp]
movsx rcx, eax
mov rax, QWORD PTR -40[rbp]
add rax, rcx
movzx eax, BYTE PTR [rax]
cmp dl, al
je .L6
mov DWORD PTR -16[rbp], 0
jmp .L7
.L6:
add DWORD PTR -20[rbp], 1
.L5:
mov eax, DWORD PTR -12[rbp]
sub eax, DWORD PTR -24[rbp]
mov edx, eax
shr edx, 31
add eax, edx
sar eax
cmp DWORD PTR -20[rbp], eax
jl .L8
.L7:
cmp DWORD PTR -16[rbp], 0
je .L9
mov eax, DWORD PTR -12[rbp]
movsx rdx, eax
mov rcx, QWORD PTR -40[rbp]
mov rax, QWORD PTR -8[rbp]
mov rsi, rcx
mov rdi, rax
call strncpy@PLT
mov DWORD PTR -20[rbp], 0
jmp .L10
.L11:
mov eax, DWORD PTR -24[rbp]
sub eax, DWORD PTR -20[rbp]
cdqe
lea rdx, -1[rax]
mov rax, QWORD PTR -40[rbp]
add rax, rdx
mov ecx, DWORD PTR -12[rbp]
mov edx, DWORD PTR -20[rbp]
add edx, ecx
movsx rcx, edx
mov rdx, QWORD PTR -8[rbp]
add rdx, rcx
movzx eax, BYTE PTR [rax]
mov BYTE PTR [rdx], al
add DWORD PTR -20[rbp], 1
.L10:
mov eax, DWORD PTR -20[rbp]
cmp eax, DWORD PTR -24[rbp]
jl .L11
mov edx, DWORD PTR -12[rbp]
mov eax, DWORD PTR -24[rbp]
add eax, edx
movsx rdx, eax
mov rax, QWORD PTR -8[rbp]
add rax, rdx
mov BYTE PTR [rax], 0
mov rax, QWORD PTR -8[rbp]
jmp .L3
.L9:
add DWORD PTR -24[rbp], 1
.L4:
mov eax, DWORD PTR -24[rbp]
cmp eax, DWORD PTR -12[rbp]
jl .L12
mov eax, DWORD PTR -12[rbp]
movsx rdx, eax
mov rcx, QWORD PTR -40[rbp]
mov rax, QWORD PTR -8[rbp]
mov rsi, rcx
mov rdi, rax
call strncpy@PLT
mov DWORD PTR -20[rbp], 0
jmp .L13
.L14:
mov eax, DWORD PTR -12[rbp]
sub eax, DWORD PTR -20[rbp]
cdqe
lea rdx, -1[rax]
mov rax, QWORD PTR -40[rbp]
add rax, rdx
mov ecx, DWORD PTR -12[rbp]
mov edx, DWORD PTR -20[rbp]
add edx, ecx
movsx rcx, edx
mov rdx, QWORD PTR -8[rbp]
add rdx, rcx
movzx eax, BYTE PTR [rax]
mov BYTE PTR [rdx], al
add DWORD PTR -20[rbp], 1
.L13:
mov eax, DWORD PTR -20[rbp]
cmp eax, DWORD PTR -12[rbp]
jl .L14
mov eax, DWORD PTR -12[rbp]
add eax, eax
movsx rdx, eax
mov rax, QWORD PTR -8[rbp]
add rax, rdx
mov BYTE PTR [rax], 0
mov rax, QWORD PTR -8[rbp]
.L3:
leave
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE6:
.size func0, .-func0
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",@progbits
.section .note.gnu.property,"a"
.align 8
.long 1f - 0f
.long 4f - 1f
.long 5
0:
.string "GNU"
1:
.align 8
.long 0xc0000002
.long 3f - 2f
2:
.long 0x3
3:
.align 8
4:
| .arch armv5t
.eabi_attribute 20, 1
.eabi_attribute 21, 1
.eabi_attribute 23, 3
.eabi_attribute 24, 1
.eabi_attribute 25, 1
.eabi_attribute 26, 2
.eabi_attribute 30, 6
.eabi_attribute 34, 0
.eabi_attribute 18, 4
.file "code.c"
.text
.align 2
.global func0
.syntax unified
.arm
.fpu softvfp
.type func0, %function
func0:
@ args = 0, pretend = 0, frame = 32
@ frame_needed = 1, uses_anonymous_args = 0
push {fp, lr}
add fp, sp, #4
sub sp, sp, #32
str r0, [fp, #-32]
ldr r0, [fp, #-32]
bl strlen
mov r3, r0
str r3, [fp, #-12]
ldr r3, [fp, #-12]
lsl r3, r3, #1
add r3, r3, #1
mov r0, r3
bl malloc
mov r3, r0
str r3, [fp, #-8]
ldr r3, [fp, #-8]
cmp r3, #0
bne .L2
mov r3, #0
b .L3
.L2:
mov r3, #0
str r3, [fp, #-24]
b .L4
.L12:
mov r3, #1
str r3, [fp, #-16]
mov r3, #0
str r3, [fp, #-20]
b .L5
.L8:
ldr r2, [fp, #-24]
ldr r3, [fp, #-20]
add r3, r2, r3
mov r2, r3
ldr r3, [fp, #-32]
add r3, r3, r2
ldrb r2, [r3] @ zero_extendqisi2
ldr r3, [fp, #-12]
sub r1, r3, #1
ldr r3, [fp, #-20]
sub r3, r1, r3
mov r1, r3
ldr r3, [fp, #-32]
add r3, r3, r1
ldrb r3, [r3] @ zero_extendqisi2
cmp r2, r3
beq .L6
mov r3, #0
str r3, [fp, #-16]
b .L7
.L6:
ldr r3, [fp, #-20]
add r3, r3, #1
str r3, [fp, #-20]
.L5:
ldr r2, [fp, #-12]
ldr r3, [fp, #-24]
sub r3, r2, r3
lsr r2, r3, #31
add r3, r2, r3
asr r3, r3, #1
mov r2, r3
ldr r3, [fp, #-20]
cmp r3, r2
blt .L8
.L7:
ldr r3, [fp, #-16]
cmp r3, #0
beq .L9
ldr r3, [fp, #-12]
mov r2, r3
ldr r1, [fp, #-32]
ldr r0, [fp, #-8]
bl strncpy
mov r3, #0
str r3, [fp, #-20]
b .L10
.L11:
ldr r2, [fp, #-24]
ldr r3, [fp, #-20]
sub r3, r2, r3
sub r3, r3, #1
ldr r2, [fp, #-32]
add r2, r2, r3
ldr r1, [fp, #-12]
ldr r3, [fp, #-20]
add r3, r1, r3
mov r1, r3
ldr r3, [fp, #-8]
add r3, r3, r1
ldrb r2, [r2] @ zero_extendqisi2
strb r2, [r3]
ldr r3, [fp, #-20]
add r3, r3, #1
str r3, [fp, #-20]
.L10:
ldr r2, [fp, #-20]
ldr r3, [fp, #-24]
cmp r2, r3
blt .L11
ldr r2, [fp, #-12]
ldr r3, [fp, #-24]
add r3, r2, r3
mov r2, r3
ldr r3, [fp, #-8]
add r3, r3, r2
mov r2, #0
strb r2, [r3]
ldr r3, [fp, #-8]
b .L3
.L9:
ldr r3, [fp, #-24]
add r3, r3, #1
str r3, [fp, #-24]
.L4:
ldr r2, [fp, #-24]
ldr r3, [fp, #-12]
cmp r2, r3
blt .L12
ldr r3, [fp, #-12]
mov r2, r3
ldr r1, [fp, #-32]
ldr r0, [fp, #-8]
bl strncpy
mov r3, #0
str r3, [fp, #-20]
b .L13
.L14:
ldr r2, [fp, #-12]
ldr r3, [fp, #-20]
sub r3, r2, r3
sub r3, r3, #1
ldr r2, [fp, #-32]
add r2, r2, r3
ldr r1, [fp, #-12]
ldr r3, [fp, #-20]
add r3, r1, r3
mov r1, r3
ldr r3, [fp, #-8]
add r3, r3, r1
ldrb r2, [r2] @ zero_extendqisi2
strb r2, [r3]
ldr r3, [fp, #-20]
add r3, r3, #1
str r3, [fp, #-20]
.L13:
ldr r2, [fp, #-20]
ldr r3, [fp, #-12]
cmp r2, r3
blt .L14
ldr r3, [fp, #-12]
lsl r3, r3, #1
mov r2, r3
ldr r3, [fp, #-8]
add r3, r3, r2
mov r2, #0
strb r2, [r3]
ldr r3, [fp, #-8]
.L3:
mov r0, r3
sub sp, fp, #4
@ sp needed
pop {fp, pc}
.size func0, .-func0
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",%progbits
|
eval/problem5/code.c | .file "code.c"
.intel_syntax noprefix
.text
.globl func0
.type func0, @function
func0:
.LFB0:
.cfi_startproc
endbr64
push rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
mov rbp, rsp
.cfi_def_cfa_register 6
mov QWORD PTR -24[rbp], rdi
mov DWORD PTR -28[rbp], esi
pxor xmm0, xmm0
movss DWORD PTR -16[rbp], xmm0
mov DWORD PTR -8[rbp], 0
mov DWORD PTR -8[rbp], 0
jmp .L2
.L3:
mov eax, DWORD PTR -8[rbp]
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -24[rbp]
add rax, rdx
movss xmm0, DWORD PTR [rax]
movss xmm1, DWORD PTR -16[rbp]
addss xmm0, xmm1
movss DWORD PTR -16[rbp], xmm0
add DWORD PTR -8[rbp], 1
.L2:
mov eax, DWORD PTR -8[rbp]
cmp eax, DWORD PTR -28[rbp]
jl .L3
cvtsi2ss xmm1, DWORD PTR -28[rbp]
movss xmm0, DWORD PTR -16[rbp]
divss xmm0, xmm1
movss DWORD PTR -4[rbp], xmm0
pxor xmm0, xmm0
movss DWORD PTR -12[rbp], xmm0
mov DWORD PTR -8[rbp], 0
jmp .L4
.L5:
mov eax, DWORD PTR -8[rbp]
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -24[rbp]
add rax, rdx
movss xmm0, DWORD PTR [rax]
subss xmm0, DWORD PTR -4[rbp]
movss xmm1, DWORD PTR .LC1[rip]
andps xmm0, xmm1
movss xmm1, DWORD PTR -12[rbp]
addss xmm0, xmm1
movss DWORD PTR -12[rbp], xmm0
add DWORD PTR -8[rbp], 1
.L4:
mov eax, DWORD PTR -8[rbp]
cmp eax, DWORD PTR -28[rbp]
jl .L5
cvtsi2ss xmm1, DWORD PTR -28[rbp]
movss xmm0, DWORD PTR -12[rbp]
divss xmm0, xmm1
pop rbp
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE0:
.size func0, .-func0
.section .rodata
.align 16
.LC1:
.long 2147483647
.long 0
.long 0
.long 0
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",@progbits
.section .note.gnu.property,"a"
.align 8
.long 1f - 0f
.long 4f - 1f
.long 5
0:
.string "GNU"
1:
.align 8
.long 0xc0000002
.long 3f - 2f
2:
.long 0x3
3:
.align 8
4:
| .arch armv5t
.eabi_attribute 20, 1
.eabi_attribute 21, 1
.eabi_attribute 23, 3
.eabi_attribute 24, 1
.eabi_attribute 25, 1
.eabi_attribute 26, 2
.eabi_attribute 30, 6
.eabi_attribute 34, 0
.eabi_attribute 18, 4
.file "code.c"
.text
.global __aeabi_fadd
.global __aeabi_i2f
.global __aeabi_fdiv
.global __aeabi_fsub
.align 2
.global func0
.syntax unified
.arm
.fpu softvfp
.type func0, %function
func0:
@ args = 0, pretend = 0, frame = 24
@ frame_needed = 1, uses_anonymous_args = 0
push {fp, lr}
add fp, sp, #4
sub sp, sp, #24
str r0, [fp, #-24]
str r1, [fp, #-28]
mov r3, #0
str r3, [fp, #-20] @ float
mov r3, #0
str r3, [fp, #-12]
mov r3, #0
str r3, [fp, #-12]
b .L2
.L3:
ldr r3, [fp, #-12]
lsl r3, r3, #2
ldr r2, [fp, #-24]
add r3, r2, r3
ldr r3, [r3] @ float
mov r1, r3
ldr r0, [fp, #-20] @ float
bl __aeabi_fadd
mov r3, r0
str r3, [fp, #-20] @ float
ldr r3, [fp, #-12]
add r3, r3, #1
str r3, [fp, #-12]
.L2:
ldr r2, [fp, #-12]
ldr r3, [fp, #-28]
cmp r2, r3
blt .L3
ldr r0, [fp, #-28]
bl __aeabi_i2f
mov r3, r0
mov r1, r3
ldr r0, [fp, #-20] @ float
bl __aeabi_fdiv
mov r3, r0
str r3, [fp, #-8] @ float
mov r3, #0
str r3, [fp, #-16] @ float
mov r3, #0
str r3, [fp, #-12]
b .L4
.L5:
ldr r3, [fp, #-12]
lsl r3, r3, #2
ldr r2, [fp, #-24]
add r3, r2, r3
ldr r3, [r3] @ float
ldr r1, [fp, #-8] @ float
mov r0, r3
bl __aeabi_fsub
mov r3, r0
bic r3, r3, #-2147483648
mov r1, r3
ldr r0, [fp, #-16] @ float
bl __aeabi_fadd
mov r3, r0
str r3, [fp, #-16] @ float
ldr r3, [fp, #-12]
add r3, r3, #1
str r3, [fp, #-12]
.L4:
ldr r2, [fp, #-12]
ldr r3, [fp, #-28]
cmp r2, r3
blt .L5
ldr r0, [fp, #-28]
bl __aeabi_i2f
mov r3, r0
mov r1, r3
ldr r0, [fp, #-16] @ float
bl __aeabi_fdiv
mov r3, r0
mov r0, r3
sub sp, fp, #4
@ sp needed
pop {fp, pc}
.size func0, .-func0
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",%progbits
|
eval/problem15/code.c | .file "code.c"
.intel_syntax noprefix
.text
.globl func0
.type func0, @function
func0:
.LFB6:
.cfi_startproc
endbr64
push rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
mov rbp, rsp
.cfi_def_cfa_register 6
push rbx
sub rsp, 56
.cfi_offset 3, -24
mov QWORD PTR -56[rbp], rdi
mov QWORD PTR -64[rbp], rsi
mov rax, QWORD PTR -56[rbp]
mov rdi, rax
call strlen@PLT
mov DWORD PTR -44[rbp], eax
mov eax, DWORD PTR -44[rbp]
cdqe
sal rax, 3
mov rdi, rax
call malloc@PLT
mov QWORD PTR -32[rbp], rax
mov eax, DWORD PTR -44[rbp]
add eax, 1
cdqe
mov rdi, rax
call malloc@PLT
mov QWORD PTR -40[rbp], rax
mov rax, QWORD PTR -40[rbp]
mov BYTE PTR [rax], 0
mov DWORD PTR -48[rbp], 0
jmp .L2
.L3:
mov rax, QWORD PTR -40[rbp]
mov rdi, rax
call strlen@PLT
mov QWORD PTR -24[rbp], rax
mov rax, QWORD PTR -24[rbp]
lea rdx, 2[rax]
mov rax, QWORD PTR -40[rbp]
mov rsi, rdx
mov rdi, rax
call realloc@PLT
mov QWORD PTR -40[rbp], rax
mov eax, DWORD PTR -48[rbp]
movsx rdx, eax
mov rax, QWORD PTR -56[rbp]
add rax, rdx
mov rcx, QWORD PTR -40[rbp]
mov rdx, QWORD PTR -24[rbp]
add rdx, rcx
movzx eax, BYTE PTR [rax]
mov BYTE PTR [rdx], al
mov rax, QWORD PTR -24[rbp]
lea rdx, 1[rax]
mov rax, QWORD PTR -40[rbp]
add rax, rdx
mov BYTE PTR [rax], 0
mov rax, QWORD PTR -40[rbp]
mov rdi, rax
call strlen@PLT
add rax, 1
mov edx, DWORD PTR -48[rbp]
movsx rdx, edx
lea rcx, 0[0+rdx*8]
mov rdx, QWORD PTR -32[rbp]
lea rbx, [rcx+rdx]
mov rdi, rax
call malloc@PLT
mov QWORD PTR [rbx], rax
mov eax, DWORD PTR -48[rbp]
cdqe
lea rdx, 0[0+rax*8]
mov rax, QWORD PTR -32[rbp]
add rax, rdx
mov rax, QWORD PTR [rax]
mov rdx, QWORD PTR -40[rbp]
mov rsi, rdx
mov rdi, rax
call strcpy@PLT
add DWORD PTR -48[rbp], 1
.L2:
mov eax, DWORD PTR -48[rbp]
cmp eax, DWORD PTR -44[rbp]
jl .L3
mov rax, QWORD PTR -40[rbp]
mov rdi, rax
call free@PLT
mov rax, QWORD PTR -64[rbp]
mov edx, DWORD PTR -44[rbp]
mov DWORD PTR [rax], edx
mov rax, QWORD PTR -32[rbp]
add rsp, 56
pop rbx
pop rbp
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE6:
.size func0, .-func0
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",@progbits
.section .note.gnu.property,"a"
.align 8
.long 1f - 0f
.long 4f - 1f
.long 5
0:
.string "GNU"
1:
.align 8
.long 0xc0000002
.long 3f - 2f
2:
.long 0x3
3:
.align 8
4:
| .arch armv5t
.eabi_attribute 20, 1
.eabi_attribute 21, 1
.eabi_attribute 23, 3
.eabi_attribute 24, 1
.eabi_attribute 25, 1
.eabi_attribute 26, 2
.eabi_attribute 30, 6
.eabi_attribute 34, 0
.eabi_attribute 18, 4
.file "code.c"
.text
.align 2
.global func0
.syntax unified
.arm
.fpu softvfp
.type func0, %function
func0:
@ args = 0, pretend = 0, frame = 32
@ frame_needed = 1, uses_anonymous_args = 0
push {r4, fp, lr}
add fp, sp, #8
sub sp, sp, #36
str r0, [fp, #-40]
str r1, [fp, #-44]
ldr r0, [fp, #-40]
bl strlen
mov r3, r0
str r3, [fp, #-24]
ldr r3, [fp, #-24]
lsl r3, r3, #2
mov r0, r3
bl malloc
mov r3, r0
str r3, [fp, #-20]
ldr r3, [fp, #-24]
add r3, r3, #1
mov r0, r3
bl malloc
mov r3, r0
str r3, [fp, #-32]
ldr r3, [fp, #-32]
mov r2, #0
strb r2, [r3]
mov r3, #0
str r3, [fp, #-28]
b .L2
.L3:
ldr r0, [fp, #-32]
bl strlen
str r0, [fp, #-16]
ldr r3, [fp, #-16]
add r3, r3, #2
mov r1, r3
ldr r0, [fp, #-32]
bl realloc
str r0, [fp, #-32]
ldr r3, [fp, #-28]
ldr r2, [fp, #-40]
add r2, r2, r3
ldr r1, [fp, #-32]
ldr r3, [fp, #-16]
add r3, r1, r3
ldrb r2, [r2] @ zero_extendqisi2
strb r2, [r3]
ldr r3, [fp, #-16]
add r3, r3, #1
ldr r2, [fp, #-32]
add r3, r2, r3
mov r2, #0
strb r2, [r3]
ldr r0, [fp, #-32]
bl strlen
mov r3, r0
add r1, r3, #1
ldr r3, [fp, #-28]
lsl r3, r3, #2
ldr r2, [fp, #-20]
add r4, r2, r3
mov r0, r1
bl malloc
mov r3, r0
str r3, [r4]
ldr r3, [fp, #-28]
lsl r3, r3, #2
ldr r2, [fp, #-20]
add r3, r2, r3
ldr r3, [r3]
ldr r1, [fp, #-32]
mov r0, r3
bl strcpy
ldr r3, [fp, #-28]
add r3, r3, #1
str r3, [fp, #-28]
.L2:
ldr r2, [fp, #-28]
ldr r3, [fp, #-24]
cmp r2, r3
blt .L3
ldr r0, [fp, #-32]
bl free
ldr r3, [fp, #-44]
ldr r2, [fp, #-24]
str r2, [r3]
ldr r3, [fp, #-20]
mov r0, r3
sub sp, fp, #8
@ sp needed
pop {r4, fp, pc}
.size func0, .-func0
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",%progbits
|
eval/problem41/code.c | .file "code.c"
.intel_syntax noprefix
.text
.globl func0
.type func0, @function
func0:
.LFB0:
.cfi_startproc
endbr64
push rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
mov rbp, rsp
.cfi_def_cfa_register 6
mov QWORD PTR -24[rbp], rdi
mov DWORD PTR -28[rbp], esi
mov DWORD PTR -12[rbp], 0
jmp .L2
.L9:
mov eax, DWORD PTR -12[rbp]
add eax, 1
mov DWORD PTR -8[rbp], eax
jmp .L3
.L8:
mov eax, DWORD PTR -8[rbp]
add eax, 1
mov DWORD PTR -4[rbp], eax
jmp .L4
.L7:
mov eax, DWORD PTR -12[rbp]
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -24[rbp]
add rax, rdx
mov edx, DWORD PTR [rax]
mov eax, DWORD PTR -8[rbp]
cdqe
lea rcx, 0[0+rax*4]
mov rax, QWORD PTR -24[rbp]
add rax, rcx
mov eax, DWORD PTR [rax]
add edx, eax
mov eax, DWORD PTR -4[rbp]
cdqe
lea rcx, 0[0+rax*4]
mov rax, QWORD PTR -24[rbp]
add rax, rcx
mov eax, DWORD PTR [rax]
add eax, edx
test eax, eax
jne .L5
mov eax, 1
jmp .L6
.L5:
add DWORD PTR -4[rbp], 1
.L4:
mov eax, DWORD PTR -4[rbp]
cmp eax, DWORD PTR -28[rbp]
jl .L7
add DWORD PTR -8[rbp], 1
.L3:
mov eax, DWORD PTR -8[rbp]
cmp eax, DWORD PTR -28[rbp]
jl .L8
add DWORD PTR -12[rbp], 1
.L2:
mov eax, DWORD PTR -12[rbp]
cmp eax, DWORD PTR -28[rbp]
jl .L9
mov eax, 0
.L6:
pop rbp
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE0:
.size func0, .-func0
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",@progbits
.section .note.gnu.property,"a"
.align 8
.long 1f - 0f
.long 4f - 1f
.long 5
0:
.string "GNU"
1:
.align 8
.long 0xc0000002
.long 3f - 2f
2:
.long 0x3
3:
.align 8
4:
| .arch armv5t
.eabi_attribute 20, 1
.eabi_attribute 21, 1
.eabi_attribute 23, 3
.eabi_attribute 24, 1
.eabi_attribute 25, 1
.eabi_attribute 26, 2
.eabi_attribute 30, 6
.eabi_attribute 34, 0
.eabi_attribute 18, 4
.file "code.c"
.text
.align 2
.global func0
.syntax unified
.arm
.fpu softvfp
.type func0, %function
func0:
@ args = 0, pretend = 0, frame = 24
@ frame_needed = 1, uses_anonymous_args = 0
@ link register save eliminated.
str fp, [sp, #-4]!
add fp, sp, #0
sub sp, sp, #28
str r0, [fp, #-24]
str r1, [fp, #-28]
mov r3, #0
str r3, [fp, #-16]
b .L2
.L9:
ldr r3, [fp, #-16]
add r3, r3, #1
str r3, [fp, #-12]
b .L3
.L8:
ldr r3, [fp, #-12]
add r3, r3, #1
str r3, [fp, #-8]
b .L4
.L7:
ldr r3, [fp, #-16]
lsl r3, r3, #2
ldr r2, [fp, #-24]
add r3, r2, r3
ldr r2, [r3]
ldr r3, [fp, #-12]
lsl r3, r3, #2
ldr r1, [fp, #-24]
add r3, r1, r3
ldr r3, [r3]
add r2, r2, r3
ldr r3, [fp, #-8]
lsl r3, r3, #2
ldr r1, [fp, #-24]
add r3, r1, r3
ldr r3, [r3]
add r3, r2, r3
cmp r3, #0
bne .L5
mov r3, #1
b .L6
.L5:
ldr r3, [fp, #-8]
add r3, r3, #1
str r3, [fp, #-8]
.L4:
ldr r2, [fp, #-8]
ldr r3, [fp, #-28]
cmp r2, r3
blt .L7
ldr r3, [fp, #-12]
add r3, r3, #1
str r3, [fp, #-12]
.L3:
ldr r2, [fp, #-12]
ldr r3, [fp, #-28]
cmp r2, r3
blt .L8
ldr r3, [fp, #-16]
add r3, r3, #1
str r3, [fp, #-16]
.L2:
ldr r2, [fp, #-16]
ldr r3, [fp, #-28]
cmp r2, r3
blt .L9
mov r3, #0
.L6:
mov r0, r3
add sp, fp, #0
@ sp needed
ldr fp, [sp], #4
bx lr
.size func0, .-func0
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",%progbits
|
eval/problem107/code.c | .file "code.c"
.intel_syntax noprefix
.text
.globl func0
.type func0, @function
func0:
.LFB6:
.cfi_startproc
endbr64
push rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
mov rbp, rsp
.cfi_def_cfa_register 6
sub rsp, 48
mov DWORD PTR -36[rbp], edi
mov eax, DWORD PTR -36[rbp]
cdqe
sal rax, 2
mov rdi, rax
call malloc@PLT
mov QWORD PTR -8[rbp], rax
mov DWORD PTR -20[rbp], 0
mov DWORD PTR -16[rbp], 1
mov DWORD PTR -12[rbp], 1
jmp .L2
.L5:
mov eax, DWORD PTR -12[rbp]
add DWORD PTR -20[rbp], eax
mov eax, DWORD PTR -16[rbp]
imul eax, DWORD PTR -12[rbp]
mov DWORD PTR -16[rbp], eax
mov eax, DWORD PTR -12[rbp]
and eax, 1
test eax, eax
jne .L3
mov eax, DWORD PTR -12[rbp]
cdqe
sal rax, 2
lea rdx, -4[rax]
mov rax, QWORD PTR -8[rbp]
add rdx, rax
mov eax, DWORD PTR -16[rbp]
mov DWORD PTR [rdx], eax
jmp .L4
.L3:
mov eax, DWORD PTR -12[rbp]
cdqe
sal rax, 2
lea rdx, -4[rax]
mov rax, QWORD PTR -8[rbp]
add rdx, rax
mov eax, DWORD PTR -20[rbp]
mov DWORD PTR [rdx], eax
.L4:
add DWORD PTR -12[rbp], 1
.L2:
mov eax, DWORD PTR -12[rbp]
cmp eax, DWORD PTR -36[rbp]
jle .L5
mov rax, QWORD PTR -8[rbp]
leave
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE6:
.size func0, .-func0
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",@progbits
.section .note.gnu.property,"a"
.align 8
.long 1f - 0f
.long 4f - 1f
.long 5
0:
.string "GNU"
1:
.align 8
.long 0xc0000002
.long 3f - 2f
2:
.long 0x3
3:
.align 8
4:
| .arch armv5t
.eabi_attribute 20, 1
.eabi_attribute 21, 1
.eabi_attribute 23, 3
.eabi_attribute 24, 1
.eabi_attribute 25, 1
.eabi_attribute 26, 2
.eabi_attribute 30, 6
.eabi_attribute 34, 0
.eabi_attribute 18, 4
.file "code.c"
.text
.align 2
.global func0
.syntax unified
.arm
.fpu softvfp
.type func0, %function
func0:
@ args = 0, pretend = 0, frame = 24
@ frame_needed = 1, uses_anonymous_args = 0
push {fp, lr}
add fp, sp, #4
sub sp, sp, #24
str r0, [fp, #-24]
ldr r3, [fp, #-24]
lsl r3, r3, #2
mov r0, r3
bl malloc
mov r3, r0
str r3, [fp, #-8]
mov r3, #0
str r3, [fp, #-20]
mov r3, #1
str r3, [fp, #-16]
mov r3, #1
str r3, [fp, #-12]
b .L2
.L5:
ldr r2, [fp, #-20]
ldr r3, [fp, #-12]
add r3, r2, r3
str r3, [fp, #-20]
ldr r3, [fp, #-16]
ldr r2, [fp, #-12]
mul r3, r2, r3
str r3, [fp, #-16]
ldr r3, [fp, #-12]
and r3, r3, #1
cmp r3, #0
bne .L3
ldr r3, [fp, #-12]
sub r3, r3, #-1073741823
lsl r3, r3, #2
ldr r2, [fp, #-8]
add r3, r2, r3
ldr r2, [fp, #-16]
str r2, [r3]
b .L4
.L3:
ldr r3, [fp, #-12]
sub r3, r3, #-1073741823
lsl r3, r3, #2
ldr r2, [fp, #-8]
add r3, r2, r3
ldr r2, [fp, #-20]
str r2, [r3]
.L4:
ldr r3, [fp, #-12]
add r3, r3, #1
str r3, [fp, #-12]
.L2:
ldr r2, [fp, #-12]
ldr r3, [fp, #-24]
cmp r2, r3
ble .L5
ldr r3, [fp, #-8]
mov r0, r3
sub sp, fp, #4
@ sp needed
pop {fp, pc}
.size func0, .-func0
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",%progbits
|
eval/problem110/code.c | .file "code.c"
.intel_syntax noprefix
.text
.globl func0
.type func0, @function
func0:
.LFB0:
.cfi_startproc
endbr64
push rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
mov rbp, rsp
.cfi_def_cfa_register 6
mov QWORD PTR -24[rbp], rdi
mov DWORD PTR -28[rbp], esi
mov DWORD PTR -8[rbp], 0
cmp DWORD PTR -28[rbp], 0
jne .L2
mov eax, 1
jmp .L3
.L2:
mov DWORD PTR -4[rbp], 1
jmp .L4
.L6:
mov eax, DWORD PTR -4[rbp]
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -24[rbp]
add rax, rdx
mov edx, DWORD PTR [rax]
mov eax, DWORD PTR -4[rbp]
cdqe
sal rax, 2
lea rcx, -4[rax]
mov rax, QWORD PTR -24[rbp]
add rax, rcx
mov eax, DWORD PTR [rax]
cmp edx, eax
jge .L5
add DWORD PTR -8[rbp], 1
.L5:
add DWORD PTR -4[rbp], 1
.L4:
mov eax, DWORD PTR -4[rbp]
cmp eax, DWORD PTR -28[rbp]
jl .L6
mov eax, DWORD PTR -28[rbp]
cdqe
sal rax, 2
lea rdx, -4[rax]
mov rax, QWORD PTR -24[rbp]
add rax, rdx
mov edx, DWORD PTR [rax]
mov rax, QWORD PTR -24[rbp]
mov eax, DWORD PTR [rax]
cmp edx, eax
jle .L7
add DWORD PTR -8[rbp], 1
.L7:
cmp DWORD PTR -8[rbp], 1
jg .L8
mov eax, 1
jmp .L3
.L8:
mov eax, 0
.L3:
pop rbp
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE0:
.size func0, .-func0
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",@progbits
.section .note.gnu.property,"a"
.align 8
.long 1f - 0f
.long 4f - 1f
.long 5
0:
.string "GNU"
1:
.align 8
.long 0xc0000002
.long 3f - 2f
2:
.long 0x3
3:
.align 8
4:
| .arch armv5t
.eabi_attribute 20, 1
.eabi_attribute 21, 1
.eabi_attribute 23, 3
.eabi_attribute 24, 1
.eabi_attribute 25, 1
.eabi_attribute 26, 2
.eabi_attribute 30, 6
.eabi_attribute 34, 0
.eabi_attribute 18, 4
.file "code.c"
.text
.align 2
.global func0
.syntax unified
.arm
.fpu softvfp
.type func0, %function
func0:
@ args = 0, pretend = 0, frame = 16
@ frame_needed = 1, uses_anonymous_args = 0
@ link register save eliminated.
str fp, [sp, #-4]!
add fp, sp, #0
sub sp, sp, #20
str r0, [fp, #-16]
str r1, [fp, #-20]
mov r3, #0
str r3, [fp, #-12]
ldr r3, [fp, #-20]
cmp r3, #0
bne .L2
mov r3, #1
b .L3
.L2:
mov r3, #1
str r3, [fp, #-8]
b .L4
.L6:
ldr r3, [fp, #-8]
lsl r3, r3, #2
ldr r2, [fp, #-16]
add r3, r2, r3
ldr r2, [r3]
ldr r3, [fp, #-8]
sub r3, r3, #-1073741823
lsl r3, r3, #2
ldr r1, [fp, #-16]
add r3, r1, r3
ldr r3, [r3]
cmp r2, r3
bge .L5
ldr r3, [fp, #-12]
add r3, r3, #1
str r3, [fp, #-12]
.L5:
ldr r3, [fp, #-8]
add r3, r3, #1
str r3, [fp, #-8]
.L4:
ldr r2, [fp, #-8]
ldr r3, [fp, #-20]
cmp r2, r3
blt .L6
ldr r3, [fp, #-20]
sub r3, r3, #-1073741823
lsl r3, r3, #2
ldr r2, [fp, #-16]
add r3, r2, r3
ldr r2, [r3]
ldr r3, [fp, #-16]
ldr r3, [r3]
cmp r2, r3
ble .L7
ldr r3, [fp, #-12]
add r3, r3, #1
str r3, [fp, #-12]
.L7:
ldr r3, [fp, #-12]
cmp r3, #1
bgt .L8
mov r3, #1
b .L3
.L8:
mov r3, #0
.L3:
mov r0, r3
add sp, fp, #0
@ sp needed
ldr fp, [sp], #4
bx lr
.size func0, .-func0
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",%progbits
|
eval/problem119/code.c | .file "code.c"
.intel_syntax noprefix
.text
.section .rodata
.LC0:
.string "AEIOUaeiou"
.text
.globl func0
.type func0, @function
func0:
.LFB0:
.cfi_startproc
endbr64
push rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
mov rbp, rsp
.cfi_def_cfa_register 6
sub rsp, 48
mov QWORD PTR -40[rbp], rdi
lea rax, .LC0[rip]
mov QWORD PTR -16[rbp], rax
mov rax, QWORD PTR -40[rbp]
mov rdi, rax
call strlen@PLT
mov QWORD PTR -8[rbp], rax
mov rax, QWORD PTR -8[rbp]
sub eax, 2
mov DWORD PTR -20[rbp], eax
jmp .L2
.L5:
mov eax, DWORD PTR -20[rbp]
movsx rdx, eax
mov rax, QWORD PTR -40[rbp]
add rax, rdx
movzx eax, BYTE PTR [rax]
movsx edx, al
mov rax, QWORD PTR -16[rbp]
mov esi, edx
mov rdi, rax
call strchr@PLT
test rax, rax
je .L3
mov eax, DWORD PTR -20[rbp]
cdqe
lea rdx, 1[rax]
mov rax, QWORD PTR -40[rbp]
add rax, rdx
movzx eax, BYTE PTR [rax]
movsx edx, al
mov rax, QWORD PTR -16[rbp]
mov esi, edx
mov rdi, rax
call strchr@PLT
test rax, rax
jne .L3
mov eax, DWORD PTR -20[rbp]
cdqe
lea rdx, -1[rax]
mov rax, QWORD PTR -40[rbp]
add rax, rdx
movzx eax, BYTE PTR [rax]
movsx edx, al
mov rax, QWORD PTR -16[rbp]
mov esi, edx
mov rdi, rax
call strchr@PLT
test rax, rax
jne .L3
mov eax, DWORD PTR -20[rbp]
movsx rdx, eax
mov rax, QWORD PTR -40[rbp]
add rax, rdx
movzx eax, BYTE PTR [rax]
mov BYTE PTR out.2496[rip], al
lea rax, out.2496[rip]
jmp .L4
.L3:
sub DWORD PTR -20[rbp], 1
.L2:
cmp DWORD PTR -20[rbp], 0
jg .L5
mov BYTE PTR out.2496[rip], 0
lea rax, out.2496[rip]
.L4:
leave
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE0:
.size func0, .-func0
.local out.2496
.comm out.2496,2,1
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",@progbits
.section .note.gnu.property,"a"
.align 8
.long 1f - 0f
.long 4f - 1f
.long 5
0:
.string "GNU"
1:
.align 8
.long 0xc0000002
.long 3f - 2f
2:
.long 0x3
3:
.align 8
4:
| .arch armv5t
.eabi_attribute 20, 1
.eabi_attribute 21, 1
.eabi_attribute 23, 3
.eabi_attribute 24, 1
.eabi_attribute 25, 1
.eabi_attribute 26, 2
.eabi_attribute 30, 6
.eabi_attribute 34, 0
.eabi_attribute 18, 4
.file "code.c"
.text
.section .rodata
.align 2
.LC0:
.ascii "AEIOUaeiou\000"
.text
.align 2
.global func0
.syntax unified
.arm
.fpu softvfp
.type func0, %function
func0:
@ args = 0, pretend = 0, frame = 24
@ frame_needed = 1, uses_anonymous_args = 0
push {fp, lr}
add fp, sp, #4
sub sp, sp, #24
str r0, [fp, #-24]
ldr r3, .L6
str r3, [fp, #-12]
ldr r0, [fp, #-24]
bl strlen
str r0, [fp, #-8]
ldr r3, [fp, #-8]
sub r3, r3, #2
str r3, [fp, #-16]
b .L2
.L5:
ldr r3, [fp, #-16]
ldr r2, [fp, #-24]
add r3, r2, r3
ldrb r3, [r3] @ zero_extendqisi2
mov r1, r3
ldr r0, [fp, #-12]
bl strchr
mov r3, r0
cmp r3, #0
beq .L3
ldr r3, [fp, #-16]
add r3, r3, #1
ldr r2, [fp, #-24]
add r3, r2, r3
ldrb r3, [r3] @ zero_extendqisi2
mov r1, r3
ldr r0, [fp, #-12]
bl strchr
mov r3, r0
cmp r3, #0
bne .L3
ldr r3, [fp, #-16]
sub r3, r3, #1
ldr r2, [fp, #-24]
add r3, r2, r3
ldrb r3, [r3] @ zero_extendqisi2
mov r1, r3
ldr r0, [fp, #-12]
bl strchr
mov r3, r0
cmp r3, #0
bne .L3
ldr r3, [fp, #-16]
ldr r2, [fp, #-24]
add r3, r2, r3
ldrb r2, [r3] @ zero_extendqisi2
ldr r3, .L6+4
strb r2, [r3]
ldr r3, .L6+4
b .L4
.L3:
ldr r3, [fp, #-16]
sub r3, r3, #1
str r3, [fp, #-16]
.L2:
ldr r3, [fp, #-16]
cmp r3, #0
bgt .L5
ldr r3, .L6+4
mov r2, #0
strb r2, [r3]
ldr r3, .L6+4
.L4:
mov r0, r3
sub sp, fp, #4
@ sp needed
pop {fp, pc}
.L7:
.align 2
.L6:
.word .LC0
.word out.4781
.size func0, .-func0
.local out.4781
.comm out.4781,2,4
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",%progbits
|
eval/problem153/code.c | .file "code.c"
.intel_syntax noprefix
.text
.globl func0
.type func0, @function
func0:
.LFB6:
.cfi_startproc
endbr64
push rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
mov rbp, rsp
.cfi_def_cfa_register 6
mov QWORD PTR -24[rbp], rdi
mov QWORD PTR -32[rbp], rsi
mov QWORD PTR -40[rbp], rdx
mov DWORD PTR -44[rbp], ecx
mov DWORD PTR -4[rbp], 0
jmp .L2
.L3:
mov eax, DWORD PTR -4[rbp]
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -24[rbp]
add rax, rdx
mov edx, DWORD PTR [rax]
mov eax, DWORD PTR -4[rbp]
cdqe
lea rcx, 0[0+rax*4]
mov rax, QWORD PTR -32[rbp]
add rax, rcx
mov eax, DWORD PTR [rax]
sub edx, eax
mov eax, edx
mov edx, DWORD PTR -4[rbp]
movsx rdx, edx
lea rcx, 0[0+rdx*4]
mov rdx, QWORD PTR -40[rbp]
add rcx, rdx
cdq
xor eax, edx
sub eax, edx
mov DWORD PTR [rcx], eax
add DWORD PTR -4[rbp], 1
.L2:
mov eax, DWORD PTR -4[rbp]
cmp eax, DWORD PTR -44[rbp]
jl .L3
nop
nop
pop rbp
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE6:
.size func0, .-func0
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",@progbits
.section .note.gnu.property,"a"
.align 8
.long 1f - 0f
.long 4f - 1f
.long 5
0:
.string "GNU"
1:
.align 8
.long 0xc0000002
.long 3f - 2f
2:
.long 0x3
3:
.align 8
4:
| .arch armv5t
.eabi_attribute 20, 1
.eabi_attribute 21, 1
.eabi_attribute 23, 3
.eabi_attribute 24, 1
.eabi_attribute 25, 1
.eabi_attribute 26, 2
.eabi_attribute 30, 6
.eabi_attribute 34, 0
.eabi_attribute 18, 4
.file "code.c"
.text
.align 2
.global func0
.syntax unified
.arm
.fpu softvfp
.type func0, %function
func0:
@ args = 0, pretend = 0, frame = 24
@ frame_needed = 1, uses_anonymous_args = 0
@ link register save eliminated.
str fp, [sp, #-4]!
add fp, sp, #0
sub sp, sp, #28
str r0, [fp, #-16]
str r1, [fp, #-20]
str r2, [fp, #-24]
str r3, [fp, #-28]
mov r3, #0
str r3, [fp, #-8]
b .L2
.L3:
ldr r3, [fp, #-8]
lsl r3, r3, #2
ldr r2, [fp, #-16]
add r3, r2, r3
ldr r2, [r3]
ldr r3, [fp, #-8]
lsl r3, r3, #2
ldr r1, [fp, #-20]
add r3, r1, r3
ldr r3, [r3]
sub r2, r2, r3
ldr r3, [fp, #-8]
lsl r3, r3, #2
ldr r1, [fp, #-24]
add r3, r1, r3
cmp r2, #0
rsblt r2, r2, #0
str r2, [r3]
ldr r3, [fp, #-8]
add r3, r3, #1
str r3, [fp, #-8]
.L2:
ldr r2, [fp, #-8]
ldr r3, [fp, #-28]
cmp r2, r3
blt .L3
nop
nop
add sp, fp, #0
@ sp needed
ldr fp, [sp], #4
bx lr
.size func0, .-func0
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",%progbits
|
eval/problem136/code.c | .file "code.c"
.intel_syntax noprefix
.text
.globl func0
.type func0, @function
func0:
.LFB0:
.cfi_startproc
endbr64
push rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
mov rbp, rsp
.cfi_def_cfa_register 6
mov QWORD PTR -24[rbp], rdi
mov DWORD PTR -28[rbp], esi
mov DWORD PTR -8[rbp], -1
mov DWORD PTR -4[rbp], 1
jmp .L2
.L4:
mov eax, DWORD PTR -4[rbp]
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -24[rbp]
add rax, rdx
mov edx, DWORD PTR [rax]
mov eax, DWORD PTR -4[rbp]
cdqe
sal rax, 2
lea rcx, -4[rax]
mov rax, QWORD PTR -24[rbp]
add rax, rcx
mov eax, DWORD PTR [rax]
cmp edx, eax
jge .L3
mov eax, DWORD PTR -4[rbp]
mov DWORD PTR -8[rbp], eax
.L3:
add DWORD PTR -4[rbp], 1
.L2:
mov eax, DWORD PTR -4[rbp]
cmp eax, DWORD PTR -28[rbp]
jl .L4
mov eax, DWORD PTR -8[rbp]
pop rbp
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE0:
.size func0, .-func0
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",@progbits
.section .note.gnu.property,"a"
.align 8
.long 1f - 0f
.long 4f - 1f
.long 5
0:
.string "GNU"
1:
.align 8
.long 0xc0000002
.long 3f - 2f
2:
.long 0x3
3:
.align 8
4:
| .arch armv5t
.eabi_attribute 20, 1
.eabi_attribute 21, 1
.eabi_attribute 23, 3
.eabi_attribute 24, 1
.eabi_attribute 25, 1
.eabi_attribute 26, 2
.eabi_attribute 30, 6
.eabi_attribute 34, 0
.eabi_attribute 18, 4
.file "code.c"
.text
.align 2
.global func0
.syntax unified
.arm
.fpu softvfp
.type func0, %function
func0:
@ args = 0, pretend = 0, frame = 16
@ frame_needed = 1, uses_anonymous_args = 0
@ link register save eliminated.
str fp, [sp, #-4]!
add fp, sp, #0
sub sp, sp, #20
str r0, [fp, #-16]
str r1, [fp, #-20]
mvn r3, #0
str r3, [fp, #-12]
mov r3, #1
str r3, [fp, #-8]
b .L2
.L4:
ldr r3, [fp, #-8]
lsl r3, r3, #2
ldr r2, [fp, #-16]
add r3, r2, r3
ldr r2, [r3]
ldr r3, [fp, #-8]
sub r3, r3, #-1073741823
lsl r3, r3, #2
ldr r1, [fp, #-16]
add r3, r1, r3
ldr r3, [r3]
cmp r2, r3
bge .L3
ldr r3, [fp, #-8]
str r3, [fp, #-12]
.L3:
ldr r3, [fp, #-8]
add r3, r3, #1
str r3, [fp, #-8]
.L2:
ldr r2, [fp, #-8]
ldr r3, [fp, #-20]
cmp r2, r3
blt .L4
ldr r3, [fp, #-12]
mov r0, r3
add sp, fp, #0
@ sp needed
ldr fp, [sp], #4
bx lr
.size func0, .-func0
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",%progbits
|
eval/problem151/code.c | .file "code.c"
.intel_syntax noprefix
.text
.globl func0
.type func0, @function
func0:
.LFB0:
.cfi_startproc
endbr64
push rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
mov rbp, rsp
.cfi_def_cfa_register 6
mov DWORD PTR -20[rbp], edi
mov DWORD PTR -24[rbp], esi
mov DWORD PTR -28[rbp], edx
mov DWORD PTR -8[rbp], 1
cmp DWORD PTR -20[rbp], 1
jg .L2
mov DWORD PTR -8[rbp], 0
.L2:
mov DWORD PTR -4[rbp], 2
jmp .L3
.L5:
mov eax, DWORD PTR -20[rbp]
cdq
idiv DWORD PTR -4[rbp]
mov eax, edx
test eax, eax
jne .L4
mov DWORD PTR -8[rbp], 0
.L4:
add DWORD PTR -4[rbp], 1
.L3:
mov eax, DWORD PTR -4[rbp]
imul eax, eax
cmp DWORD PTR -20[rbp], eax
jge .L5
cmp DWORD PTR -8[rbp], 0
je .L6
mov eax, DWORD PTR -24[rbp]
jmp .L7
.L6:
mov eax, DWORD PTR -28[rbp]
.L7:
pop rbp
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE0:
.size func0, .-func0
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",@progbits
.section .note.gnu.property,"a"
.align 8
.long 1f - 0f
.long 4f - 1f
.long 5
0:
.string "GNU"
1:
.align 8
.long 0xc0000002
.long 3f - 2f
2:
.long 0x3
3:
.align 8
4:
| .arch armv5t
.eabi_attribute 20, 1
.eabi_attribute 21, 1
.eabi_attribute 23, 3
.eabi_attribute 24, 1
.eabi_attribute 25, 1
.eabi_attribute 26, 2
.eabi_attribute 30, 6
.eabi_attribute 34, 0
.eabi_attribute 18, 4
.file "code.c"
.text
.global __aeabi_idivmod
.align 2
.global func0
.syntax unified
.arm
.fpu softvfp
.type func0, %function
func0:
@ args = 0, pretend = 0, frame = 24
@ frame_needed = 1, uses_anonymous_args = 0
push {fp, lr}
add fp, sp, #4
sub sp, sp, #24
str r0, [fp, #-16]
str r1, [fp, #-20]
str r2, [fp, #-24]
mov r3, #1
str r3, [fp, #-12]
ldr r3, [fp, #-16]
cmp r3, #1
bgt .L2
mov r3, #0
str r3, [fp, #-12]
.L2:
mov r3, #2
str r3, [fp, #-8]
b .L3
.L5:
ldr r3, [fp, #-16]
ldr r1, [fp, #-8]
mov r0, r3
bl __aeabi_idivmod
mov r3, r1
cmp r3, #0
bne .L4
mov r3, #0
str r3, [fp, #-12]
.L4:
ldr r3, [fp, #-8]
add r3, r3, #1
str r3, [fp, #-8]
.L3:
ldr r3, [fp, #-8]
mov r2, r3
mul r2, r3, r2
mov r3, r2
ldr r2, [fp, #-16]
cmp r2, r3
bge .L5
ldr r3, [fp, #-12]
cmp r3, #0
beq .L6
ldr r3, [fp, #-20]
b .L7
.L6:
ldr r3, [fp, #-24]
.L7:
mov r0, r3
sub sp, fp, #4
@ sp needed
pop {fp, pc}
.size func0, .-func0
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",%progbits
|
eval/problem158/code.c | .file "code.c"
.intel_syntax noprefix
.text
.globl func0
.type func0, @function
func0:
.LFB0:
.cfi_startproc
endbr64
push rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
mov rbp, rsp
.cfi_def_cfa_register 6
movss DWORD PTR -4[rbp], xmm0
movss DWORD PTR -8[rbp], xmm1
movss DWORD PTR -12[rbp], xmm2
movss xmm0, DWORD PTR -4[rbp]
movaps xmm1, xmm0
mulss xmm1, xmm0
movss xmm0, DWORD PTR -8[rbp]
mulss xmm0, xmm0
addss xmm1, xmm0
movss xmm0, DWORD PTR -12[rbp]
mulss xmm0, xmm0
subss xmm1, xmm0
movaps xmm0, xmm1
movss xmm1, DWORD PTR .LC0[rip]
andps xmm0, xmm1
cvtss2sd xmm1, xmm0
movsd xmm0, QWORD PTR .LC1[rip]
comisd xmm0, xmm1
ja .L2
movss xmm0, DWORD PTR -4[rbp]
movaps xmm1, xmm0
mulss xmm1, xmm0
movss xmm0, DWORD PTR -12[rbp]
mulss xmm0, xmm0
addss xmm1, xmm0
movss xmm0, DWORD PTR -8[rbp]
mulss xmm0, xmm0
subss xmm1, xmm0
movaps xmm0, xmm1
movss xmm1, DWORD PTR .LC0[rip]
andps xmm0, xmm1
cvtss2sd xmm1, xmm0
movsd xmm0, QWORD PTR .LC1[rip]
comisd xmm0, xmm1
ja .L2
movss xmm0, DWORD PTR -8[rbp]
movaps xmm1, xmm0
mulss xmm1, xmm0
movss xmm0, DWORD PTR -12[rbp]
mulss xmm0, xmm0
addss xmm1, xmm0
movss xmm0, DWORD PTR -4[rbp]
mulss xmm0, xmm0
subss xmm1, xmm0
movaps xmm0, xmm1
movss xmm1, DWORD PTR .LC0[rip]
andps xmm0, xmm1
cvtss2sd xmm1, xmm0
movsd xmm0, QWORD PTR .LC1[rip]
comisd xmm0, xmm1
jbe .L6
.L2:
mov eax, 1
jmp .L5
.L6:
mov eax, 0
.L5:
pop rbp
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE0:
.size func0, .-func0
.section .rodata
.align 16
.LC0:
.long 2147483647
.long 0
.long 0
.long 0
.align 8
.LC1:
.long 3944497965
.long 1058682594
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",@progbits
.section .note.gnu.property,"a"
.align 8
.long 1f - 0f
.long 4f - 1f
.long 5
0:
.string "GNU"
1:
.align 8
.long 0xc0000002
.long 3f - 2f
2:
.long 0x3
3:
.align 8
4:
| .arch armv5t
.eabi_attribute 20, 1
.eabi_attribute 21, 1
.eabi_attribute 23, 3
.eabi_attribute 24, 1
.eabi_attribute 25, 1
.eabi_attribute 26, 2
.eabi_attribute 30, 6
.eabi_attribute 34, 0
.eabi_attribute 18, 4
.file "code.c"
.text
.global __aeabi_fmul
.global __aeabi_fadd
.global __aeabi_fsub
.global __aeabi_f2d
.global __aeabi_dcmplt
.align 2
.global func0
.syntax unified
.arm
.fpu softvfp
.type func0, %function
func0:
@ args = 0, pretend = 0, frame = 16
@ frame_needed = 1, uses_anonymous_args = 0
push {r4, fp, lr}
add fp, sp, #8
sub sp, sp, #20
str r0, [fp, #-16] @ float
str r1, [fp, #-20] @ float
str r2, [fp, #-24] @ float
ldr r1, [fp, #-16] @ float
ldr r0, [fp, #-16] @ float
bl __aeabi_fmul
mov r3, r0
mov r4, r3
ldr r1, [fp, #-20] @ float
ldr r0, [fp, #-20] @ float
bl __aeabi_fmul
mov r3, r0
mov r1, r3
mov r0, r4
bl __aeabi_fadd
mov r3, r0
mov r4, r3
ldr r1, [fp, #-24] @ float
ldr r0, [fp, #-24] @ float
bl __aeabi_fmul
mov r3, r0
mov r1, r3
mov r0, r4
bl __aeabi_fsub
mov r3, r0
bic r3, r3, #-2147483648
mov r0, r3
bl __aeabi_f2d
ldr r2, .L7
ldr r3, .L7+4
bl __aeabi_dcmplt
mov r3, r0
cmp r3, #0
bne .L2
ldr r1, [fp, #-16] @ float
ldr r0, [fp, #-16] @ float
bl __aeabi_fmul
mov r3, r0
mov r4, r3
ldr r1, [fp, #-24] @ float
ldr r0, [fp, #-24] @ float
bl __aeabi_fmul
mov r3, r0
mov r1, r3
mov r0, r4
bl __aeabi_fadd
mov r3, r0
mov r4, r3
ldr r1, [fp, #-20] @ float
ldr r0, [fp, #-20] @ float
bl __aeabi_fmul
mov r3, r0
mov r1, r3
mov r0, r4
bl __aeabi_fsub
mov r3, r0
bic r3, r3, #-2147483648
mov r0, r3
bl __aeabi_f2d
ldr r2, .L7
ldr r3, .L7+4
bl __aeabi_dcmplt
mov r3, r0
cmp r3, #0
bne .L2
ldr r1, [fp, #-20] @ float
ldr r0, [fp, #-20] @ float
bl __aeabi_fmul
mov r3, r0
mov r4, r3
ldr r1, [fp, #-24] @ float
ldr r0, [fp, #-24] @ float
bl __aeabi_fmul
mov r3, r0
mov r1, r3
mov r0, r4
bl __aeabi_fadd
mov r3, r0
mov r4, r3
ldr r1, [fp, #-16] @ float
ldr r0, [fp, #-16] @ float
bl __aeabi_fmul
mov r3, r0
mov r1, r3
mov r0, r4
bl __aeabi_fsub
mov r3, r0
bic r3, r3, #-2147483648
mov r0, r3
bl __aeabi_f2d
ldr r2, .L7
ldr r3, .L7+4
bl __aeabi_dcmplt
mov r3, r0
cmp r3, #0
beq .L6
.L2:
mov r3, #1
b .L5
.L6:
mov r3, #0
.L5:
mov r0, r3
sub sp, fp, #8
@ sp needed
pop {r4, fp, pc}
.L8:
.align 2
.L7:
.word -350469331
.word 1058682594
.size func0, .-func0
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",%progbits
|
eval/problem6/code.c | .file "code.c"
.intel_syntax noprefix
.text
.globl func0
.type func0, @function
func0:
.LFB6:
.cfi_startproc
endbr64
push rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
mov rbp, rsp
.cfi_def_cfa_register 6
sub rsp, 48
mov QWORD PTR -24[rbp], rdi
mov DWORD PTR -28[rbp], esi
mov DWORD PTR -32[rbp], edx
mov QWORD PTR -40[rbp], rcx
cmp DWORD PTR -28[rbp], 0
jle .L2
mov eax, DWORD PTR -28[rbp]
add eax, eax
lea edx, -1[rax]
jmp .L3
.L2:
mov edx, 0
.L3:
mov rax, QWORD PTR -40[rbp]
mov DWORD PTR [rax], edx
mov rax, QWORD PTR -40[rbp]
mov eax, DWORD PTR [rax]
cdqe
sal rax, 2
mov rdi, rax
call malloc@PLT
mov QWORD PTR -8[rbp], rax
cmp DWORD PTR -28[rbp], 0
jle .L4
mov rax, QWORD PTR -24[rbp]
mov edx, DWORD PTR [rax]
mov rax, QWORD PTR -8[rbp]
mov DWORD PTR [rax], edx
.L4:
mov DWORD PTR -16[rbp], 1
mov DWORD PTR -12[rbp], 1
jmp .L5
.L6:
mov eax, DWORD PTR -12[rbp]
lea edx, 1[rax]
mov DWORD PTR -12[rbp], edx
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -8[rbp]
add rdx, rax
mov eax, DWORD PTR -32[rbp]
mov DWORD PTR [rdx], eax
mov eax, DWORD PTR -16[rbp]
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -24[rbp]
lea rcx, [rdx+rax]
mov eax, DWORD PTR -12[rbp]
lea edx, 1[rax]
mov DWORD PTR -12[rbp], edx
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -8[rbp]
add rdx, rax
mov eax, DWORD PTR [rcx]
mov DWORD PTR [rdx], eax
add DWORD PTR -16[rbp], 1
.L5:
mov eax, DWORD PTR -16[rbp]
cmp eax, DWORD PTR -28[rbp]
jl .L6
mov rax, QWORD PTR -8[rbp]
leave
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE6:
.size func0, .-func0
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",@progbits
.section .note.gnu.property,"a"
.align 8
.long 1f - 0f
.long 4f - 1f
.long 5
0:
.string "GNU"
1:
.align 8
.long 0xc0000002
.long 3f - 2f
2:
.long 0x3
3:
.align 8
4:
| .arch armv5t
.eabi_attribute 20, 1
.eabi_attribute 21, 1
.eabi_attribute 23, 3
.eabi_attribute 24, 1
.eabi_attribute 25, 1
.eabi_attribute 26, 2
.eabi_attribute 30, 6
.eabi_attribute 34, 0
.eabi_attribute 18, 4
.file "code.c"
.text
.align 2
.global func0
.syntax unified
.arm
.fpu softvfp
.type func0, %function
func0:
@ args = 0, pretend = 0, frame = 32
@ frame_needed = 1, uses_anonymous_args = 0
push {fp, lr}
add fp, sp, #4
sub sp, sp, #32
str r0, [fp, #-24]
str r1, [fp, #-28]
str r2, [fp, #-32]
str r3, [fp, #-36]
ldr r3, [fp, #-28]
cmp r3, #0
ble .L2
ldr r3, [fp, #-28]
lsl r3, r3, #1
sub r3, r3, #1
b .L3
.L2:
mov r3, #0
.L3:
ldr r2, [fp, #-36]
str r3, [r2]
ldr r3, [fp, #-36]
ldr r3, [r3]
lsl r3, r3, #2
mov r0, r3
bl malloc
mov r3, r0
str r3, [fp, #-8]
ldr r3, [fp, #-28]
cmp r3, #0
ble .L4
ldr r3, [fp, #-24]
ldr r2, [r3]
ldr r3, [fp, #-8]
str r2, [r3]
.L4:
mov r3, #1
str r3, [fp, #-16]
mov r3, #1
str r3, [fp, #-12]
b .L5
.L6:
ldr r3, [fp, #-12]
add r2, r3, #1
str r2, [fp, #-12]
lsl r3, r3, #2
ldr r2, [fp, #-8]
add r3, r2, r3
ldr r2, [fp, #-32]
str r2, [r3]
ldr r3, [fp, #-16]
lsl r3, r3, #2
ldr r2, [fp, #-24]
add r2, r2, r3
ldr r3, [fp, #-12]
add r1, r3, #1
str r1, [fp, #-12]
lsl r3, r3, #2
ldr r1, [fp, #-8]
add r3, r1, r3
ldr r2, [r2]
str r2, [r3]
ldr r3, [fp, #-16]
add r3, r3, #1
str r3, [fp, #-16]
.L5:
ldr r2, [fp, #-16]
ldr r3, [fp, #-28]
cmp r2, r3
blt .L6
ldr r3, [fp, #-8]
mov r0, r3
sub sp, fp, #4
@ sp needed
pop {fp, pc}
.size func0, .-func0
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",%progbits
|
eval/problem106/code.c | .file "code.c"
.intel_syntax noprefix
.text
.section .rodata
.LC0:
.string ""
.LC1:
.string "One"
.LC2:
.string "Two"
.LC3:
.string "Three"
.LC4:
.string "Four"
.LC5:
.string "Five"
.LC6:
.string "Six"
.LC7:
.string "Seven"
.LC8:
.string "Eight"
.LC9:
.string "Nine"
.text
.globl func0
.type func0, @function
func0:
.LFB6:
.cfi_startproc
endbr64
push rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
mov rbp, rsp
.cfi_def_cfa_register 6
sub rsp, 144
mov QWORD PTR -120[rbp], rdi
mov DWORD PTR -124[rbp], esi
mov QWORD PTR -136[rbp], rdx
mov QWORD PTR -144[rbp], rcx
mov rax, QWORD PTR fs:40
mov QWORD PTR -8[rbp], rax
xor eax, eax
lea rax, .LC0[rip]
mov QWORD PTR -96[rbp], rax
lea rax, .LC1[rip]
mov QWORD PTR -88[rbp], rax
lea rax, .LC2[rip]
mov QWORD PTR -80[rbp], rax
lea rax, .LC3[rip]
mov QWORD PTR -72[rbp], rax
lea rax, .LC4[rip]
mov QWORD PTR -64[rbp], rax
lea rax, .LC5[rip]
mov QWORD PTR -56[rbp], rax
lea rax, .LC6[rip]
mov QWORD PTR -48[rbp], rax
lea rax, .LC7[rip]
mov QWORD PTR -40[rbp], rax
lea rax, .LC8[rip]
mov QWORD PTR -32[rbp], rax
lea rax, .LC9[rip]
mov QWORD PTR -24[rbp], rax
mov DWORD PTR -108[rbp], 0
jmp .L2
.L6:
mov DWORD PTR -104[rbp], 0
jmp .L3
.L5:
mov eax, DWORD PTR -104[rbp]
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -120[rbp]
add rax, rdx
mov edx, DWORD PTR [rax]
mov eax, DWORD PTR -104[rbp]
cdqe
add rax, 1
lea rcx, 0[0+rax*4]
mov rax, QWORD PTR -120[rbp]
add rax, rcx
mov eax, DWORD PTR [rax]
cmp edx, eax
jle .L4
mov eax, DWORD PTR -104[rbp]
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -120[rbp]
add rax, rdx
mov eax, DWORD PTR [rax]
mov DWORD PTR -100[rbp], eax
mov eax, DWORD PTR -104[rbp]
cdqe
add rax, 1
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -120[rbp]
add rax, rdx
mov edx, DWORD PTR -104[rbp]
movsx rdx, edx
lea rcx, 0[0+rdx*4]
mov rdx, QWORD PTR -120[rbp]
add rdx, rcx
mov eax, DWORD PTR [rax]
mov DWORD PTR [rdx], eax
mov eax, DWORD PTR -104[rbp]
cdqe
add rax, 1
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -120[rbp]
add rdx, rax
mov eax, DWORD PTR -100[rbp]
mov DWORD PTR [rdx], eax
.L4:
add DWORD PTR -104[rbp], 1
.L3:
mov eax, DWORD PTR -124[rbp]
sub eax, DWORD PTR -108[rbp]
sub eax, 1
cmp DWORD PTR -104[rbp], eax
jl .L5
add DWORD PTR -108[rbp], 1
.L2:
mov eax, DWORD PTR -124[rbp]
sub eax, 1
cmp DWORD PTR -108[rbp], eax
jl .L6
mov rax, QWORD PTR -144[rbp]
mov DWORD PTR [rax], 0
mov eax, DWORD PTR -124[rbp]
sub eax, 1
mov DWORD PTR -108[rbp], eax
jmp .L7
.L9:
mov eax, DWORD PTR -108[rbp]
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -120[rbp]
add rax, rdx
mov eax, DWORD PTR [rax]
test eax, eax
jle .L8
mov eax, DWORD PTR -108[rbp]
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -120[rbp]
add rax, rdx
mov eax, DWORD PTR [rax]
cmp eax, 9
jg .L8
mov rax, QWORD PTR -144[rbp]
mov eax, DWORD PTR [rax]
lea edx, 1[rax]
mov rax, QWORD PTR -144[rbp]
mov DWORD PTR [rax], edx
.L8:
sub DWORD PTR -108[rbp], 1
.L7:
cmp DWORD PTR -108[rbp], 0
jns .L9
mov rax, QWORD PTR -144[rbp]
mov eax, DWORD PTR [rax]
cdqe
sal rax, 3
mov rdi, rax
call malloc@PLT
mov rdx, rax
mov rax, QWORD PTR -136[rbp]
mov QWORD PTR [rax], rdx
mov eax, DWORD PTR -124[rbp]
sub eax, 1
mov DWORD PTR -108[rbp], eax
mov DWORD PTR -104[rbp], 0
jmp .L10
.L13:
mov eax, DWORD PTR -108[rbp]
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -120[rbp]
add rax, rdx
mov eax, DWORD PTR [rax]
test eax, eax
jle .L11
mov eax, DWORD PTR -108[rbp]
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -120[rbp]
add rax, rdx
mov eax, DWORD PTR [rax]
cmp eax, 9
jg .L11
mov eax, DWORD PTR -108[rbp]
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -120[rbp]
add rax, rdx
mov ecx, DWORD PTR [rax]
mov rax, QWORD PTR -136[rbp]
mov rsi, QWORD PTR [rax]
mov eax, DWORD PTR -104[rbp]
lea edx, 1[rax]
mov DWORD PTR -104[rbp], edx
cdqe
sal rax, 3
lea rdx, [rsi+rax]
movsx rax, ecx
mov rax, QWORD PTR -96[rbp+rax*8]
mov QWORD PTR [rdx], rax
.L11:
sub DWORD PTR -108[rbp], 1
.L10:
cmp DWORD PTR -108[rbp], 0
js .L15
mov rax, QWORD PTR -144[rbp]
mov eax, DWORD PTR [rax]
cmp DWORD PTR -104[rbp], eax
jl .L13
.L15:
nop
mov rax, QWORD PTR -8[rbp]
xor rax, QWORD PTR fs:40
je .L14
call __stack_chk_fail@PLT
.L14:
leave
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE6:
.size func0, .-func0
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",@progbits
.section .note.gnu.property,"a"
.align 8
.long 1f - 0f
.long 4f - 1f
.long 5
0:
.string "GNU"
1:
.align 8
.long 0xc0000002
.long 3f - 2f
2:
.long 0x3
3:
.align 8
4:
| .arch armv5t
.eabi_attribute 20, 1
.eabi_attribute 21, 1
.eabi_attribute 23, 3
.eabi_attribute 24, 1
.eabi_attribute 25, 1
.eabi_attribute 26, 2
.eabi_attribute 30, 6
.eabi_attribute 34, 0
.eabi_attribute 18, 4
.file "code.c"
.section .rodata
.align 2
.LC0:
.ascii "\000"
.align 2
.LC1:
.ascii "One\000"
.align 2
.LC2:
.ascii "Two\000"
.align 2
.LC3:
.ascii "Three\000"
.align 2
.LC4:
.ascii "Four\000"
.align 2
.LC5:
.ascii "Five\000"
.align 2
.LC6:
.ascii "Six\000"
.align 2
.LC7:
.ascii "Seven\000"
.align 2
.LC8:
.ascii "Eight\000"
.align 2
.LC9:
.ascii "Nine\000"
.text
.section .rodata
.align 2
.LC11:
.word .LC0
.word .LC1
.word .LC2
.word .LC3
.word .LC4
.word .LC5
.word .LC6
.word .LC7
.word .LC8
.word .LC9
.align 2
.LC12:
.word __stack_chk_guard
.text
.align 2
.global func0
.syntax unified
.arm
.fpu softvfp
.type func0, %function
func0:
@ args = 0, pretend = 0, frame = 72
@ frame_needed = 1, uses_anonymous_args = 0
push {fp, lr}
add fp, sp, #4
sub sp, sp, #72
str r0, [fp, #-64]
str r1, [fp, #-68]
str r2, [fp, #-72]
str r3, [fp, #-76]
ldr r3, .L16
ldr r3, [r3]
str r3, [fp, #-8]
mov r3,#0
ldr r3, .L16+4
sub ip, fp, #48
mov lr, r3
ldmia lr!, {r0, r1, r2, r3}
stmia ip!, {r0, r1, r2, r3}
ldmia lr!, {r0, r1, r2, r3}
stmia ip!, {r0, r1, r2, r3}
ldm lr, {r0, r1}
stm ip, {r0, r1}
mov r3, #0
str r3, [fp, #-60]
b .L2
.L6:
mov r3, #0
str r3, [fp, #-56]
b .L3
.L5:
ldr r3, [fp, #-56]
lsl r3, r3, #2
ldr r2, [fp, #-64]
add r3, r2, r3
ldr r2, [r3]
ldr r3, [fp, #-56]
add r3, r3, #1
lsl r3, r3, #2
ldr r1, [fp, #-64]
add r3, r1, r3
ldr r3, [r3]
cmp r2, r3
ble .L4
ldr r3, [fp, #-56]
lsl r3, r3, #2
ldr r2, [fp, #-64]
add r3, r2, r3
ldr r3, [r3]
str r3, [fp, #-52]
ldr r3, [fp, #-56]
add r3, r3, #1
lsl r3, r3, #2
ldr r2, [fp, #-64]
add r2, r2, r3
ldr r3, [fp, #-56]
lsl r3, r3, #2
ldr r1, [fp, #-64]
add r3, r1, r3
ldr r2, [r2]
str r2, [r3]
ldr r3, [fp, #-56]
add r3, r3, #1
lsl r3, r3, #2
ldr r2, [fp, #-64]
add r3, r2, r3
ldr r2, [fp, #-52]
str r2, [r3]
.L4:
ldr r3, [fp, #-56]
add r3, r3, #1
str r3, [fp, #-56]
.L3:
ldr r2, [fp, #-68]
ldr r3, [fp, #-60]
sub r3, r2, r3
sub r3, r3, #1
ldr r2, [fp, #-56]
cmp r2, r3
blt .L5
ldr r3, [fp, #-60]
add r3, r3, #1
str r3, [fp, #-60]
.L2:
ldr r3, [fp, #-68]
sub r3, r3, #1
ldr r2, [fp, #-60]
cmp r2, r3
blt .L6
ldr r3, [fp, #-76]
mov r2, #0
str r2, [r3]
ldr r3, [fp, #-68]
sub r3, r3, #1
str r3, [fp, #-60]
b .L7
.L9:
ldr r3, [fp, #-60]
lsl r3, r3, #2
ldr r2, [fp, #-64]
add r3, r2, r3
ldr r3, [r3]
cmp r3, #0
ble .L8
ldr r3, [fp, #-60]
lsl r3, r3, #2
ldr r2, [fp, #-64]
add r3, r2, r3
ldr r3, [r3]
cmp r3, #9
bgt .L8
ldr r3, [fp, #-76]
ldr r3, [r3]
add r2, r3, #1
ldr r3, [fp, #-76]
str r2, [r3]
.L8:
ldr r3, [fp, #-60]
sub r3, r3, #1
str r3, [fp, #-60]
.L7:
ldr r3, [fp, #-60]
cmp r3, #0
bge .L9
ldr r3, [fp, #-76]
ldr r3, [r3]
lsl r3, r3, #2
mov r0, r3
bl malloc
mov r3, r0
mov r2, r3
ldr r3, [fp, #-72]
str r2, [r3]
ldr r3, [fp, #-68]
sub r3, r3, #1
str r3, [fp, #-60]
mov r3, #0
str r3, [fp, #-56]
b .L10
.L13:
ldr r3, [fp, #-60]
lsl r3, r3, #2
ldr r2, [fp, #-64]
add r3, r2, r3
ldr r3, [r3]
cmp r3, #0
ble .L11
ldr r3, [fp, #-60]
lsl r3, r3, #2
ldr r2, [fp, #-64]
add r3, r2, r3
ldr r3, [r3]
cmp r3, #9
bgt .L11
ldr r3, [fp, #-60]
lsl r3, r3, #2
ldr r2, [fp, #-64]
add r3, r2, r3
ldr r1, [r3]
ldr r3, [fp, #-72]
ldr r2, [r3]
ldr r3, [fp, #-56]
add r0, r3, #1
str r0, [fp, #-56]
lsl r3, r3, #2
add r2, r2, r3
lsl r3, r1, #2
sub r1, fp, #4
add r3, r1, r3
ldr r3, [r3, #-44]
str r3, [r2]
.L11:
ldr r3, [fp, #-60]
sub r3, r3, #1
str r3, [fp, #-60]
.L10:
ldr r3, [fp, #-60]
cmp r3, #0
blt .L15
ldr r3, [fp, #-76]
ldr r3, [r3]
ldr r2, [fp, #-56]
cmp r2, r3
blt .L13
.L15:
nop
ldr r3, .L16
ldr r2, [r3]
ldr r3, [fp, #-8]
eors r2, r3, r2
mov r3, #0
beq .L14
bl __stack_chk_fail
.L14:
sub sp, fp, #4
@ sp needed
pop {fp, pc}
.L17:
.align 2
.L16:
.word .LC12
.word .LC11
.size func0, .-func0
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",%progbits
|
eval/problem47/code.c | .file "code.c"
.intel_syntax noprefix
.text
.globl func0
.type func0, @function
func0:
.LFB0:
.cfi_startproc
endbr64
push rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
mov rbp, rsp
.cfi_def_cfa_register 6
sub rsp, 448
mov DWORD PTR -436[rbp], edi
mov rax, QWORD PTR fs:40
mov QWORD PTR -8[rbp], rax
xor eax, eax
mov DWORD PTR -416[rbp], 0
mov DWORD PTR -412[rbp], 0
mov DWORD PTR -408[rbp], 2
mov DWORD PTR -404[rbp], 0
mov DWORD PTR -420[rbp], 4
jmp .L2
.L3:
mov eax, DWORD PTR -420[rbp]
sub eax, 1
cdqe
mov edx, DWORD PTR -416[rbp+rax*4]
mov eax, DWORD PTR -420[rbp]
sub eax, 2
cdqe
mov eax, DWORD PTR -416[rbp+rax*4]
add edx, eax
mov eax, DWORD PTR -420[rbp]
sub eax, 3
cdqe
mov eax, DWORD PTR -416[rbp+rax*4]
add edx, eax
mov eax, DWORD PTR -420[rbp]
sub eax, 4
cdqe
mov eax, DWORD PTR -416[rbp+rax*4]
add edx, eax
mov eax, DWORD PTR -420[rbp]
cdqe
mov DWORD PTR -416[rbp+rax*4], edx
add DWORD PTR -420[rbp], 1
.L2:
mov eax, DWORD PTR -420[rbp]
cmp eax, DWORD PTR -436[rbp]
jle .L3
mov eax, DWORD PTR -436[rbp]
cdqe
mov eax, DWORD PTR -416[rbp+rax*4]
mov rcx, QWORD PTR -8[rbp]
xor rcx, QWORD PTR fs:40
je .L5
call __stack_chk_fail@PLT
.L5:
leave
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE0:
.size func0, .-func0
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",@progbits
.section .note.gnu.property,"a"
.align 8
.long 1f - 0f
.long 4f - 1f
.long 5
0:
.string "GNU"
1:
.align 8
.long 0xc0000002
.long 3f - 2f
2:
.long 0x3
3:
.align 8
4:
| .arch armv5t
.eabi_attribute 20, 1
.eabi_attribute 21, 1
.eabi_attribute 23, 3
.eabi_attribute 24, 1
.eabi_attribute 25, 1
.eabi_attribute 26, 2
.eabi_attribute 30, 6
.eabi_attribute 34, 0
.eabi_attribute 18, 4
.file "code.c"
.text
.section .rodata
.align 2
.LC0:
.word __stack_chk_guard
.text
.align 2
.global func0
.syntax unified
.arm
.fpu softvfp
.type func0, %function
func0:
@ args = 0, pretend = 0, frame = 416
@ frame_needed = 1, uses_anonymous_args = 0
push {fp, lr}
add fp, sp, #4
sub sp, sp, #416
str r0, [fp, #-416]
ldr r3, .L6
ldr r3, [r3]
str r3, [fp, #-8]
mov r3,#0
mov r3, #0
str r3, [fp, #-408]
mov r3, #0
str r3, [fp, #-404]
mov r3, #2
str r3, [fp, #-400]
mov r3, #0
str r3, [fp, #-396]
mov r3, #4
str r3, [fp, #-412]
b .L2
.L3:
ldr r3, [fp, #-412]
sub r3, r3, #1
lsl r3, r3, #2
sub r2, fp, #4
add r3, r2, r3
ldr r2, [r3, #-404]
ldr r3, [fp, #-412]
sub r3, r3, #2
lsl r3, r3, #2
sub r1, fp, #4
add r3, r1, r3
ldr r3, [r3, #-404]
add r2, r2, r3
ldr r3, [fp, #-412]
sub r3, r3, #3
lsl r3, r3, #2
sub r1, fp, #4
add r3, r1, r3
ldr r3, [r3, #-404]
add r2, r2, r3
ldr r3, [fp, #-412]
sub r3, r3, #4
lsl r3, r3, #2
sub r1, fp, #4
add r3, r1, r3
ldr r3, [r3, #-404]
add r2, r2, r3
ldr r3, [fp, #-412]
lsl r3, r3, #2
sub r1, fp, #4
add r3, r1, r3
str r2, [r3, #-404]
ldr r3, [fp, #-412]
add r3, r3, #1
str r3, [fp, #-412]
.L2:
ldr r2, [fp, #-412]
ldr r3, [fp, #-416]
cmp r2, r3
ble .L3
ldr r3, [fp, #-416]
lsl r3, r3, #2
sub r2, fp, #4
add r3, r2, r3
ldr r3, [r3, #-404]
ldr r2, .L6
ldr r1, [r2]
ldr r2, [fp, #-8]
eors r1, r2, r1
mov r2, #0
beq .L5
bl __stack_chk_fail
.L5:
mov r0, r3
sub sp, fp, #4
@ sp needed
pop {fp, pc}
.L7:
.align 2
.L6:
.word .LC0
.size func0, .-func0
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",%progbits
|
eval/problem92/code.c | .file "code.c"
.intel_syntax noprefix
.text
.globl func0
.type func0, @function
func0:
.LFB0:
.cfi_startproc
endbr64
push rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
mov rbp, rsp
.cfi_def_cfa_register 6
sub rsp, 32
mov QWORD PTR -24[rbp], rdi
mov DWORD PTR -16[rbp], 1
mov DWORD PTR -12[rbp], 0
mov DWORD PTR -8[rbp], 0
mov DWORD PTR -4[rbp], 0
jmp .L2
.L9:
call __ctype_b_loc@PLT
mov rax, QWORD PTR [rax]
mov edx, DWORD PTR -4[rbp]
movsx rcx, edx
mov rdx, QWORD PTR -24[rbp]
add rdx, rcx
movzx edx, BYTE PTR [rdx]
movsx rdx, dl
add rdx, rdx
add rax, rdx
movzx eax, WORD PTR [rax]
movzx eax, ax
and eax, 8192
test eax, eax
je .L3
cmp DWORD PTR -12[rbp], 0
je .L3
mov DWORD PTR -12[rbp], 0
add DWORD PTR -8[rbp], 1
.L3:
mov eax, DWORD PTR -4[rbp]
movsx rdx, eax
mov rax, QWORD PTR -24[rbp]
add rax, rdx
movzx eax, BYTE PTR [rax]
cmp al, 73
jne .L4
cmp DWORD PTR -16[rbp], 0
je .L4
mov DWORD PTR -12[rbp], 1
jmp .L5
.L4:
call __ctype_b_loc@PLT
mov rax, QWORD PTR [rax]
mov edx, DWORD PTR -4[rbp]
movsx rcx, edx
mov rdx, QWORD PTR -24[rbp]
add rdx, rcx
movzx edx, BYTE PTR [rdx]
movsx rdx, dl
add rdx, rdx
add rax, rdx
movzx eax, WORD PTR [rax]
movzx eax, ax
and eax, 8192
test eax, eax
jne .L5
mov DWORD PTR -12[rbp], 0
.L5:
call __ctype_b_loc@PLT
mov rax, QWORD PTR [rax]
mov edx, DWORD PTR -4[rbp]
movsx rcx, edx
mov rdx, QWORD PTR -24[rbp]
add rdx, rcx
movzx edx, BYTE PTR [rdx]
movsx rdx, dl
add rdx, rdx
add rax, rdx
movzx eax, WORD PTR [rax]
movzx eax, ax
and eax, 8192
test eax, eax
jne .L6
mov DWORD PTR -16[rbp], 0
.L6:
mov eax, DWORD PTR -4[rbp]
movsx rdx, eax
mov rax, QWORD PTR -24[rbp]
add rax, rdx
movzx eax, BYTE PTR [rax]
cmp al, 46
je .L7
mov eax, DWORD PTR -4[rbp]
movsx rdx, eax
mov rax, QWORD PTR -24[rbp]
add rax, rdx
movzx eax, BYTE PTR [rax]
cmp al, 63
je .L7
mov eax, DWORD PTR -4[rbp]
movsx rdx, eax
mov rax, QWORD PTR -24[rbp]
add rax, rdx
movzx eax, BYTE PTR [rax]
cmp al, 33
jne .L8
.L7:
mov DWORD PTR -16[rbp], 1
.L8:
add DWORD PTR -4[rbp], 1
.L2:
mov eax, DWORD PTR -4[rbp]
movsx rdx, eax
mov rax, QWORD PTR -24[rbp]
add rax, rdx
movzx eax, BYTE PTR [rax]
test al, al
jne .L9
mov eax, DWORD PTR -8[rbp]
leave
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE0:
.size func0, .-func0
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",@progbits
.section .note.gnu.property,"a"
.align 8
.long 1f - 0f
.long 4f - 1f
.long 5
0:
.string "GNU"
1:
.align 8
.long 0xc0000002
.long 3f - 2f
2:
.long 0x3
3:
.align 8
4:
| .arch armv5t
.eabi_attribute 20, 1
.eabi_attribute 21, 1
.eabi_attribute 23, 3
.eabi_attribute 24, 1
.eabi_attribute 25, 1
.eabi_attribute 26, 2
.eabi_attribute 30, 6
.eabi_attribute 34, 0
.eabi_attribute 18, 4
.file "code.c"
.text
.align 2
.global func0
.syntax unified
.arm
.fpu softvfp
.type func0, %function
func0:
@ args = 0, pretend = 0, frame = 24
@ frame_needed = 1, uses_anonymous_args = 0
push {fp, lr}
add fp, sp, #4
sub sp, sp, #24
str r0, [fp, #-24]
mov r3, #1
str r3, [fp, #-20]
mov r3, #0
str r3, [fp, #-16]
mov r3, #0
str r3, [fp, #-12]
mov r3, #0
str r3, [fp, #-8]
b .L2
.L9:
bl __ctype_b_loc
mov r3, r0
ldr r2, [r3]
ldr r3, [fp, #-8]
ldr r1, [fp, #-24]
add r3, r1, r3
ldrb r3, [r3] @ zero_extendqisi2
lsl r3, r3, #1
add r3, r2, r3
ldrh r3, [r3]
and r3, r3, #8192
cmp r3, #0
beq .L3
ldr r3, [fp, #-16]
cmp r3, #0
beq .L3
mov r3, #0
str r3, [fp, #-16]
ldr r3, [fp, #-12]
add r3, r3, #1
str r3, [fp, #-12]
.L3:
ldr r3, [fp, #-8]
ldr r2, [fp, #-24]
add r3, r2, r3
ldrb r3, [r3] @ zero_extendqisi2
cmp r3, #73
bne .L4
ldr r3, [fp, #-20]
cmp r3, #0
beq .L4
mov r3, #1
str r3, [fp, #-16]
b .L5
.L4:
bl __ctype_b_loc
mov r3, r0
ldr r2, [r3]
ldr r3, [fp, #-8]
ldr r1, [fp, #-24]
add r3, r1, r3
ldrb r3, [r3] @ zero_extendqisi2
lsl r3, r3, #1
add r3, r2, r3
ldrh r3, [r3]
and r3, r3, #8192
cmp r3, #0
bne .L5
mov r3, #0
str r3, [fp, #-16]
.L5:
bl __ctype_b_loc
mov r3, r0
ldr r2, [r3]
ldr r3, [fp, #-8]
ldr r1, [fp, #-24]
add r3, r1, r3
ldrb r3, [r3] @ zero_extendqisi2
lsl r3, r3, #1
add r3, r2, r3
ldrh r3, [r3]
and r3, r3, #8192
cmp r3, #0
bne .L6
mov r3, #0
str r3, [fp, #-20]
.L6:
ldr r3, [fp, #-8]
ldr r2, [fp, #-24]
add r3, r2, r3
ldrb r3, [r3] @ zero_extendqisi2
cmp r3, #46
beq .L7
ldr r3, [fp, #-8]
ldr r2, [fp, #-24]
add r3, r2, r3
ldrb r3, [r3] @ zero_extendqisi2
cmp r3, #63
beq .L7
ldr r3, [fp, #-8]
ldr r2, [fp, #-24]
add r3, r2, r3
ldrb r3, [r3] @ zero_extendqisi2
cmp r3, #33
bne .L8
.L7:
mov r3, #1
str r3, [fp, #-20]
.L8:
ldr r3, [fp, #-8]
add r3, r3, #1
str r3, [fp, #-8]
.L2:
ldr r3, [fp, #-8]
ldr r2, [fp, #-24]
add r3, r2, r3
ldrb r3, [r3] @ zero_extendqisi2
cmp r3, #0
bne .L9
ldr r3, [fp, #-12]
mov r0, r3
sub sp, fp, #4
@ sp needed
pop {fp, pc}
.size func0, .-func0
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",%progbits
|
eval/problem52/code.c | .file "code.c"
.intel_syntax noprefix
.text
.section .rodata
.LC0:
.string "AEIOUaeiou"
.text
.globl func0
.type func0, @function
func0:
.LFB6:
.cfi_startproc
endbr64
push rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
mov rbp, rsp
.cfi_def_cfa_register 6
sub rsp, 32
mov QWORD PTR -24[rbp], rdi
lea rax, .LC0[rip]
mov QWORD PTR -8[rbp], rax
mov rax, QWORD PTR -24[rbp]
mov QWORD PTR -16[rbp], rax
jmp .L2
.L4:
mov rax, QWORD PTR -24[rbp]
movzx eax, BYTE PTR [rax]
movsx edx, al
mov rax, QWORD PTR -8[rbp]
mov esi, edx
mov rdi, rax
call strchr@PLT
test rax, rax
jne .L3
mov rax, QWORD PTR -16[rbp]
lea rdx, 1[rax]
mov QWORD PTR -16[rbp], rdx
mov rdx, QWORD PTR -24[rbp]
movzx edx, BYTE PTR [rdx]
mov BYTE PTR [rax], dl
.L3:
add QWORD PTR -24[rbp], 1
.L2:
mov rax, QWORD PTR -24[rbp]
movzx eax, BYTE PTR [rax]
test al, al
jne .L4
mov rax, QWORD PTR -16[rbp]
mov BYTE PTR [rax], 0
nop
leave
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE6:
.size func0, .-func0
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",@progbits
.section .note.gnu.property,"a"
.align 8
.long 1f - 0f
.long 4f - 1f
.long 5
0:
.string "GNU"
1:
.align 8
.long 0xc0000002
.long 3f - 2f
2:
.long 0x3
3:
.align 8
4:
| .arch armv5t
.eabi_attribute 20, 1
.eabi_attribute 21, 1
.eabi_attribute 23, 3
.eabi_attribute 24, 1
.eabi_attribute 25, 1
.eabi_attribute 26, 2
.eabi_attribute 30, 6
.eabi_attribute 34, 0
.eabi_attribute 18, 4
.file "code.c"
.text
.section .rodata
.align 2
.LC0:
.ascii "AEIOUaeiou\000"
.text
.align 2
.global func0
.syntax unified
.arm
.fpu softvfp
.type func0, %function
func0:
@ args = 0, pretend = 0, frame = 16
@ frame_needed = 1, uses_anonymous_args = 0
push {fp, lr}
add fp, sp, #4
sub sp, sp, #16
str r0, [fp, #-16]
ldr r3, .L5
str r3, [fp, #-8]
ldr r3, [fp, #-16]
str r3, [fp, #-12]
b .L2
.L4:
ldr r3, [fp, #-16]
ldrb r3, [r3] @ zero_extendqisi2
mov r1, r3
ldr r0, [fp, #-8]
bl strchr
mov r3, r0
cmp r3, #0
bne .L3
ldr r3, [fp, #-12]
add r2, r3, #1
str r2, [fp, #-12]
ldr r2, [fp, #-16]
ldrb r2, [r2] @ zero_extendqisi2
strb r2, [r3]
.L3:
ldr r3, [fp, #-16]
add r3, r3, #1
str r3, [fp, #-16]
.L2:
ldr r3, [fp, #-16]
ldrb r3, [r3] @ zero_extendqisi2
cmp r3, #0
bne .L4
ldr r3, [fp, #-12]
mov r2, #0
strb r2, [r3]
nop
sub sp, fp, #4
@ sp needed
pop {fp, pc}
.L6:
.align 2
.L5:
.word .LC0
.size func0, .-func0
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",%progbits
|
eval/problem24/code.c | .file "code.c"
.intel_syntax noprefix
.text
.globl func0
.type func0, @function
func0:
.LFB0:
.cfi_startproc
endbr64
push rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
mov rbp, rsp
.cfi_def_cfa_register 6
mov QWORD PTR -24[rbp], rdi
mov DWORD PTR -4[rbp], 0
jmp .L2
.L3:
add DWORD PTR -4[rbp], 1
.L2:
mov eax, DWORD PTR -4[rbp]
movsx rdx, eax
mov rax, QWORD PTR -24[rbp]
add rax, rdx
movzx eax, BYTE PTR [rax]
test al, al
jne .L3
mov eax, DWORD PTR -4[rbp]
pop rbp
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE0:
.size func0, .-func0
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",@progbits
.section .note.gnu.property,"a"
.align 8
.long 1f - 0f
.long 4f - 1f
.long 5
0:
.string "GNU"
1:
.align 8
.long 0xc0000002
.long 3f - 2f
2:
.long 0x3
3:
.align 8
4:
| .arch armv5t
.eabi_attribute 20, 1
.eabi_attribute 21, 1
.eabi_attribute 23, 3
.eabi_attribute 24, 1
.eabi_attribute 25, 1
.eabi_attribute 26, 2
.eabi_attribute 30, 6
.eabi_attribute 34, 0
.eabi_attribute 18, 4
.file "code.c"
.text
.align 2
.global func0
.syntax unified
.arm
.fpu softvfp
.type func0, %function
func0:
@ args = 0, pretend = 0, frame = 16
@ frame_needed = 1, uses_anonymous_args = 0
@ link register save eliminated.
str fp, [sp, #-4]!
add fp, sp, #0
sub sp, sp, #20
str r0, [fp, #-16]
mov r3, #0
str r3, [fp, #-8]
b .L2
.L3:
ldr r3, [fp, #-8]
add r3, r3, #1
str r3, [fp, #-8]
.L2:
ldr r3, [fp, #-8]
ldr r2, [fp, #-16]
add r3, r2, r3
ldrb r3, [r3] @ zero_extendqisi2
cmp r3, #0
bne .L3
ldr r3, [fp, #-8]
mov r0, r3
add sp, fp, #0
@ sp needed
ldr fp, [sp], #4
bx lr
.size func0, .-func0
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",%progbits
|
eval/problem71/code.c | .file "code.c"
.intel_syntax noprefix
.text
.globl func0
.type func0, @function
func0:
.LFB6:
.cfi_startproc
endbr64
push rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
mov rbp, rsp
.cfi_def_cfa_register 6
mov QWORD PTR -40[rbp], rdi
mov DWORD PTR -44[rbp], esi
mov QWORD PTR -56[rbp], rdx
mov DWORD PTR -24[rbp], 0
jmp .L2
.L6:
mov eax, DWORD PTR -24[rbp]
add eax, 1
mov DWORD PTR -20[rbp], eax
jmp .L3
.L5:
mov eax, DWORD PTR -24[rbp]
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -40[rbp]
add rax, rdx
mov edx, DWORD PTR [rax]
mov eax, DWORD PTR -20[rbp]
cdqe
lea rcx, 0[0+rax*4]
mov rax, QWORD PTR -40[rbp]
add rax, rcx
mov eax, DWORD PTR [rax]
cmp edx, eax
jle .L4
mov eax, DWORD PTR -24[rbp]
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -40[rbp]
add rax, rdx
mov eax, DWORD PTR [rax]
mov DWORD PTR -4[rbp], eax
mov eax, DWORD PTR -20[rbp]
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -40[rbp]
add rax, rdx
mov edx, DWORD PTR -24[rbp]
movsx rdx, edx
lea rcx, 0[0+rdx*4]
mov rdx, QWORD PTR -40[rbp]
add rdx, rcx
mov eax, DWORD PTR [rax]
mov DWORD PTR [rdx], eax
mov eax, DWORD PTR -20[rbp]
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -40[rbp]
add rdx, rax
mov eax, DWORD PTR -4[rbp]
mov DWORD PTR [rdx], eax
.L4:
add DWORD PTR -20[rbp], 1
.L3:
mov eax, DWORD PTR -20[rbp]
cmp eax, DWORD PTR -44[rbp]
jl .L5
add DWORD PTR -24[rbp], 1
.L2:
mov eax, DWORD PTR -44[rbp]
sub eax, 1
cmp DWORD PTR -24[rbp], eax
jl .L6
mov DWORD PTR -16[rbp], 0
mov eax, DWORD PTR -44[rbp]
sub eax, 1
mov DWORD PTR -12[rbp], eax
mov DWORD PTR -8[rbp], 0
jmp .L7
.L9:
mov eax, DWORD PTR -16[rbp]
cmp eax, DWORD PTR -12[rbp]
jne .L8
mov eax, DWORD PTR -16[rbp]
lea edx, 1[rax]
mov DWORD PTR -16[rbp], edx
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -40[rbp]
lea rcx, [rdx+rax]
mov eax, DWORD PTR -8[rbp]
lea edx, 1[rax]
mov DWORD PTR -8[rbp], edx
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -56[rbp]
add rdx, rax
mov eax, DWORD PTR [rcx]
mov DWORD PTR [rdx], eax
jmp .L7
.L8:
mov eax, DWORD PTR -16[rbp]
lea edx, 1[rax]
mov DWORD PTR -16[rbp], edx
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -40[rbp]
lea rcx, [rdx+rax]
mov eax, DWORD PTR -8[rbp]
lea edx, 1[rax]
mov DWORD PTR -8[rbp], edx
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -56[rbp]
add rdx, rax
mov eax, DWORD PTR [rcx]
mov DWORD PTR [rdx], eax
mov eax, DWORD PTR -12[rbp]
lea edx, -1[rax]
mov DWORD PTR -12[rbp], edx
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -40[rbp]
lea rcx, [rdx+rax]
mov eax, DWORD PTR -8[rbp]
lea edx, 1[rax]
mov DWORD PTR -8[rbp], edx
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -56[rbp]
add rdx, rax
mov eax, DWORD PTR [rcx]
mov DWORD PTR [rdx], eax
.L7:
mov eax, DWORD PTR -16[rbp]
cmp eax, DWORD PTR -12[rbp]
jle .L9
nop
nop
pop rbp
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE6:
.size func0, .-func0
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",@progbits
.section .note.gnu.property,"a"
.align 8
.long 1f - 0f
.long 4f - 1f
.long 5
0:
.string "GNU"
1:
.align 8
.long 0xc0000002
.long 3f - 2f
2:
.long 0x3
3:
.align 8
4:
| .arch armv5t
.eabi_attribute 20, 1
.eabi_attribute 21, 1
.eabi_attribute 23, 3
.eabi_attribute 24, 1
.eabi_attribute 25, 1
.eabi_attribute 26, 2
.eabi_attribute 30, 6
.eabi_attribute 34, 0
.eabi_attribute 18, 4
.file "code.c"
.text
.align 2
.global func0
.syntax unified
.arm
.fpu softvfp
.type func0, %function
func0:
@ args = 0, pretend = 0, frame = 40
@ frame_needed = 1, uses_anonymous_args = 0
@ link register save eliminated.
str fp, [sp, #-4]!
add fp, sp, #0
sub sp, sp, #44
str r0, [fp, #-32]
str r1, [fp, #-36]
str r2, [fp, #-40]
mov r3, #0
str r3, [fp, #-28]
b .L2
.L6:
ldr r3, [fp, #-28]
add r3, r3, #1
str r3, [fp, #-24]
b .L3
.L5:
ldr r3, [fp, #-28]
lsl r3, r3, #2
ldr r2, [fp, #-32]
add r3, r2, r3
ldr r2, [r3]
ldr r3, [fp, #-24]
lsl r3, r3, #2
ldr r1, [fp, #-32]
add r3, r1, r3
ldr r3, [r3]
cmp r2, r3
ble .L4
ldr r3, [fp, #-28]
lsl r3, r3, #2
ldr r2, [fp, #-32]
add r3, r2, r3
ldr r3, [r3]
str r3, [fp, #-8]
ldr r3, [fp, #-24]
lsl r3, r3, #2
ldr r2, [fp, #-32]
add r2, r2, r3
ldr r3, [fp, #-28]
lsl r3, r3, #2
ldr r1, [fp, #-32]
add r3, r1, r3
ldr r2, [r2]
str r2, [r3]
ldr r3, [fp, #-24]
lsl r3, r3, #2
ldr r2, [fp, #-32]
add r3, r2, r3
ldr r2, [fp, #-8]
str r2, [r3]
.L4:
ldr r3, [fp, #-24]
add r3, r3, #1
str r3, [fp, #-24]
.L3:
ldr r2, [fp, #-24]
ldr r3, [fp, #-36]
cmp r2, r3
blt .L5
ldr r3, [fp, #-28]
add r3, r3, #1
str r3, [fp, #-28]
.L2:
ldr r3, [fp, #-36]
sub r3, r3, #1
ldr r2, [fp, #-28]
cmp r2, r3
blt .L6
mov r3, #0
str r3, [fp, #-20]
ldr r3, [fp, #-36]
sub r3, r3, #1
str r3, [fp, #-16]
mov r3, #0
str r3, [fp, #-12]
b .L7
.L9:
ldr r2, [fp, #-20]
ldr r3, [fp, #-16]
cmp r2, r3
bne .L8
ldr r3, [fp, #-20]
add r2, r3, #1
str r2, [fp, #-20]
lsl r3, r3, #2
ldr r2, [fp, #-32]
add r2, r2, r3
ldr r3, [fp, #-12]
add r1, r3, #1
str r1, [fp, #-12]
lsl r3, r3, #2
ldr r1, [fp, #-40]
add r3, r1, r3
ldr r2, [r2]
str r2, [r3]
b .L7
.L8:
ldr r3, [fp, #-20]
add r2, r3, #1
str r2, [fp, #-20]
lsl r3, r3, #2
ldr r2, [fp, #-32]
add r2, r2, r3
ldr r3, [fp, #-12]
add r1, r3, #1
str r1, [fp, #-12]
lsl r3, r3, #2
ldr r1, [fp, #-40]
add r3, r1, r3
ldr r2, [r2]
str r2, [r3]
ldr r3, [fp, #-16]
sub r2, r3, #1
str r2, [fp, #-16]
lsl r3, r3, #2
ldr r2, [fp, #-32]
add r2, r2, r3
ldr r3, [fp, #-12]
add r1, r3, #1
str r1, [fp, #-12]
lsl r3, r3, #2
ldr r1, [fp, #-40]
add r3, r1, r3
ldr r2, [r2]
str r2, [r3]
.L7:
ldr r2, [fp, #-20]
ldr r3, [fp, #-16]
cmp r2, r3
ble .L9
nop
nop
add sp, fp, #0
@ sp needed
ldr fp, [sp], #4
bx lr
.size func0, .-func0
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",%progbits
|
eval/problem27/code.c | .file "code.c"
.intel_syntax noprefix
.text
.globl func0
.type func0, @function
func0:
.LFB6:
.cfi_startproc
endbr64
push rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
mov rbp, rsp
.cfi_def_cfa_register 6
sub rsp, 112
mov QWORD PTR -88[rbp], rdi
mov DWORD PTR -92[rbp], esi
mov QWORD PTR -104[rbp], rdx
mov eax, DWORD PTR -92[rbp]
cdqe
sal rax, 2
mov rdi, rax
call malloc@PLT
mov QWORD PTR -24[rbp], rax
mov eax, DWORD PTR -92[rbp]
cdqe
mov esi, 4
mov rdi, rax
call calloc@PLT
mov QWORD PTR -16[rbp], rax
mov eax, DWORD PTR -92[rbp]
cdqe
mov esi, 4
mov rdi, rax
call calloc@PLT
mov QWORD PTR -8[rbp], rax
mov DWORD PTR -76[rbp], 0
mov DWORD PTR -72[rbp], 0
mov DWORD PTR -68[rbp], 0
mov DWORD PTR -64[rbp], 0
jmp .L2
.L14:
mov eax, DWORD PTR -64[rbp]
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -88[rbp]
add rax, rdx
mov eax, DWORD PTR [rax]
mov DWORD PTR -28[rbp], eax
mov DWORD PTR -60[rbp], 0
mov DWORD PTR -56[rbp], 0
jmp .L3
.L6:
mov eax, DWORD PTR -56[rbp]
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -8[rbp]
add rax, rdx
mov eax, DWORD PTR [rax]
cmp DWORD PTR -28[rbp], eax
jne .L4
mov DWORD PTR -60[rbp], 1
jmp .L5
.L4:
add DWORD PTR -56[rbp], 1
.L3:
mov eax, DWORD PTR -56[rbp]
cmp eax, DWORD PTR -72[rbp]
jl .L6
.L5:
cmp DWORD PTR -60[rbp], 0
jne .L23
mov DWORD PTR -52[rbp], 0
mov DWORD PTR -48[rbp], 0
jmp .L9
.L12:
mov eax, DWORD PTR -48[rbp]
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -16[rbp]
add rax, rdx
mov eax, DWORD PTR [rax]
cmp DWORD PTR -28[rbp], eax
jne .L10
mov DWORD PTR -52[rbp], 1
jmp .L11
.L10:
add DWORD PTR -48[rbp], 1
.L9:
mov eax, DWORD PTR -48[rbp]
cmp eax, DWORD PTR -76[rbp]
jl .L12
.L11:
cmp DWORD PTR -52[rbp], 0
je .L13
mov eax, DWORD PTR -72[rbp]
lea edx, 1[rax]
mov DWORD PTR -72[rbp], edx
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -8[rbp]
add rdx, rax
mov eax, DWORD PTR -28[rbp]
mov DWORD PTR [rdx], eax
jmp .L8
.L13:
mov eax, DWORD PTR -76[rbp]
lea edx, 1[rax]
mov DWORD PTR -76[rbp], edx
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -16[rbp]
add rdx, rax
mov eax, DWORD PTR -28[rbp]
mov DWORD PTR [rdx], eax
jmp .L8
.L23:
nop
.L8:
add DWORD PTR -64[rbp], 1
.L2:
mov eax, DWORD PTR -64[rbp]
cmp eax, DWORD PTR -92[rbp]
jl .L14
mov DWORD PTR -44[rbp], 0
jmp .L15
.L21:
mov eax, DWORD PTR -44[rbp]
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -88[rbp]
add rax, rdx
mov eax, DWORD PTR [rax]
mov DWORD PTR -32[rbp], eax
mov DWORD PTR -40[rbp], 0
mov DWORD PTR -36[rbp], 0
jmp .L16
.L19:
mov eax, DWORD PTR -36[rbp]
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -8[rbp]
add rax, rdx
mov eax, DWORD PTR [rax]
cmp DWORD PTR -32[rbp], eax
jne .L17
mov DWORD PTR -40[rbp], 1
jmp .L18
.L17:
add DWORD PTR -36[rbp], 1
.L16:
mov eax, DWORD PTR -36[rbp]
cmp eax, DWORD PTR -72[rbp]
jl .L19
.L18:
cmp DWORD PTR -40[rbp], 0
jne .L20
mov eax, DWORD PTR -68[rbp]
lea edx, 1[rax]
mov DWORD PTR -68[rbp], edx
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -24[rbp]
add rdx, rax
mov eax, DWORD PTR -32[rbp]
mov DWORD PTR [rdx], eax
.L20:
add DWORD PTR -44[rbp], 1
.L15:
mov eax, DWORD PTR -44[rbp]
cmp eax, DWORD PTR -92[rbp]
jl .L21
mov rax, QWORD PTR -104[rbp]
mov edx, DWORD PTR -68[rbp]
mov DWORD PTR [rax], edx
mov rax, QWORD PTR -16[rbp]
mov rdi, rax
call free@PLT
mov rax, QWORD PTR -8[rbp]
mov rdi, rax
call free@PLT
mov rax, QWORD PTR -24[rbp]
leave
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE6:
.size func0, .-func0
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",@progbits
.section .note.gnu.property,"a"
.align 8
.long 1f - 0f
.long 4f - 1f
.long 5
0:
.string "GNU"
1:
.align 8
.long 0xc0000002
.long 3f - 2f
2:
.long 0x3
3:
.align 8
4:
| .arch armv5t
.eabi_attribute 20, 1
.eabi_attribute 21, 1
.eabi_attribute 23, 3
.eabi_attribute 24, 1
.eabi_attribute 25, 1
.eabi_attribute 26, 2
.eabi_attribute 30, 6
.eabi_attribute 34, 0
.eabi_attribute 18, 4
.file "code.c"
.text
.align 2
.global func0
.syntax unified
.arm
.fpu softvfp
.type func0, %function
func0:
@ args = 0, pretend = 0, frame = 80
@ frame_needed = 1, uses_anonymous_args = 0
push {fp, lr}
add fp, sp, #4
sub sp, sp, #80
str r0, [fp, #-72]
str r1, [fp, #-76]
str r2, [fp, #-80]
ldr r3, [fp, #-76]
lsl r3, r3, #2
mov r0, r3
bl malloc
mov r3, r0
str r3, [fp, #-24]
ldr r3, [fp, #-76]
mov r1, #4
mov r0, r3
bl calloc
mov r3, r0
str r3, [fp, #-20]
ldr r3, [fp, #-76]
mov r1, #4
mov r0, r3
bl calloc
mov r3, r0
str r3, [fp, #-16]
mov r3, #0
str r3, [fp, #-68]
mov r3, #0
str r3, [fp, #-64]
mov r3, #0
str r3, [fp, #-60]
mov r3, #0
str r3, [fp, #-56]
b .L2
.L14:
ldr r3, [fp, #-56]
lsl r3, r3, #2
ldr r2, [fp, #-72]
add r3, r2, r3
ldr r3, [r3]
str r3, [fp, #-8]
mov r3, #0
str r3, [fp, #-52]
mov r3, #0
str r3, [fp, #-48]
b .L3
.L6:
ldr r3, [fp, #-48]
lsl r3, r3, #2
ldr r2, [fp, #-16]
add r3, r2, r3
ldr r3, [r3]
ldr r2, [fp, #-8]
cmp r2, r3
bne .L4
mov r3, #1
str r3, [fp, #-52]
b .L5
.L4:
ldr r3, [fp, #-48]
add r3, r3, #1
str r3, [fp, #-48]
.L3:
ldr r2, [fp, #-48]
ldr r3, [fp, #-64]
cmp r2, r3
blt .L6
.L5:
ldr r3, [fp, #-52]
cmp r3, #0
bne .L23
mov r3, #0
str r3, [fp, #-44]
mov r3, #0
str r3, [fp, #-40]
b .L9
.L12:
ldr r3, [fp, #-40]
lsl r3, r3, #2
ldr r2, [fp, #-20]
add r3, r2, r3
ldr r3, [r3]
ldr r2, [fp, #-8]
cmp r2, r3
bne .L10
mov r3, #1
str r3, [fp, #-44]
b .L11
.L10:
ldr r3, [fp, #-40]
add r3, r3, #1
str r3, [fp, #-40]
.L9:
ldr r2, [fp, #-40]
ldr r3, [fp, #-68]
cmp r2, r3
blt .L12
.L11:
ldr r3, [fp, #-44]
cmp r3, #0
beq .L13
ldr r3, [fp, #-64]
add r2, r3, #1
str r2, [fp, #-64]
lsl r3, r3, #2
ldr r2, [fp, #-16]
add r3, r2, r3
ldr r2, [fp, #-8]
str r2, [r3]
b .L8
.L13:
ldr r3, [fp, #-68]
add r2, r3, #1
str r2, [fp, #-68]
lsl r3, r3, #2
ldr r2, [fp, #-20]
add r3, r2, r3
ldr r2, [fp, #-8]
str r2, [r3]
b .L8
.L23:
nop
.L8:
ldr r3, [fp, #-56]
add r3, r3, #1
str r3, [fp, #-56]
.L2:
ldr r2, [fp, #-56]
ldr r3, [fp, #-76]
cmp r2, r3
blt .L14
mov r3, #0
str r3, [fp, #-36]
b .L15
.L21:
ldr r3, [fp, #-36]
lsl r3, r3, #2
ldr r2, [fp, #-72]
add r3, r2, r3
ldr r3, [r3]
str r3, [fp, #-12]
mov r3, #0
str r3, [fp, #-32]
mov r3, #0
str r3, [fp, #-28]
b .L16
.L19:
ldr r3, [fp, #-28]
lsl r3, r3, #2
ldr r2, [fp, #-16]
add r3, r2, r3
ldr r3, [r3]
ldr r2, [fp, #-12]
cmp r2, r3
bne .L17
mov r3, #1
str r3, [fp, #-32]
b .L18
.L17:
ldr r3, [fp, #-28]
add r3, r3, #1
str r3, [fp, #-28]
.L16:
ldr r2, [fp, #-28]
ldr r3, [fp, #-64]
cmp r2, r3
blt .L19
.L18:
ldr r3, [fp, #-32]
cmp r3, #0
bne .L20
ldr r3, [fp, #-60]
add r2, r3, #1
str r2, [fp, #-60]
lsl r3, r3, #2
ldr r2, [fp, #-24]
add r3, r2, r3
ldr r2, [fp, #-12]
str r2, [r3]
.L20:
ldr r3, [fp, #-36]
add r3, r3, #1
str r3, [fp, #-36]
.L15:
ldr r2, [fp, #-36]
ldr r3, [fp, #-76]
cmp r2, r3
blt .L21
ldr r3, [fp, #-80]
ldr r2, [fp, #-60]
str r2, [r3]
ldr r0, [fp, #-20]
bl free
ldr r0, [fp, #-16]
bl free
ldr r3, [fp, #-24]
mov r0, r3
sub sp, fp, #4
@ sp needed
pop {fp, pc}
.size func0, .-func0
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",%progbits
|
eval/problem36/code.c | .file "code.c"
.intel_syntax noprefix
.text
.globl func0
.type func0, @function
func0:
.LFB0:
.cfi_startproc
endbr64
push rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
mov rbp, rsp
.cfi_def_cfa_register 6
mov QWORD PTR -24[rbp], rdi
mov DWORD PTR -28[rbp], esi
movss xmm0, DWORD PTR .LC0[rip]
movss DWORD PTR -8[rbp], xmm0
mov DWORD PTR -4[rbp], 0
jmp .L2
.L5:
mov eax, DWORD PTR -4[rbp]
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -24[rbp]
add rax, rdx
movss xmm0, DWORD PTR [rax]
comiss xmm0, DWORD PTR -8[rbp]
jbe .L3
mov eax, DWORD PTR -4[rbp]
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -24[rbp]
add rax, rdx
movss xmm0, DWORD PTR [rax]
movss DWORD PTR -8[rbp], xmm0
.L3:
add DWORD PTR -4[rbp], 1
.L2:
mov eax, DWORD PTR -4[rbp]
cmp eax, DWORD PTR -28[rbp]
jl .L5
movss xmm0, DWORD PTR -8[rbp]
pop rbp
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE0:
.size func0, .-func0
.section .rodata
.align 4
.LC0:
.long 3323740160
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",@progbits
.section .note.gnu.property,"a"
.align 8
.long 1f - 0f
.long 4f - 1f
.long 5
0:
.string "GNU"
1:
.align 8
.long 0xc0000002
.long 3f - 2f
2:
.long 0x3
3:
.align 8
4:
| .arch armv5t
.eabi_attribute 20, 1
.eabi_attribute 21, 1
.eabi_attribute 23, 3
.eabi_attribute 24, 1
.eabi_attribute 25, 1
.eabi_attribute 26, 2
.eabi_attribute 30, 6
.eabi_attribute 34, 0
.eabi_attribute 18, 4
.file "code.c"
.text
.global __aeabi_fcmplt
.align 2
.global func0
.syntax unified
.arm
.fpu softvfp
.type func0, %function
func0:
@ args = 0, pretend = 0, frame = 16
@ frame_needed = 1, uses_anonymous_args = 0
push {fp, lr}
add fp, sp, #4
sub sp, sp, #16
str r0, [fp, #-16]
str r1, [fp, #-20]
ldr r3, .L8
str r3, [fp, #-12] @ float
mov r3, #0
str r3, [fp, #-8]
b .L2
.L5:
ldr r3, [fp, #-8]
lsl r3, r3, #2
ldr r2, [fp, #-16]
add r3, r2, r3
ldr r3, [r3] @ float
mov r1, r3
ldr r0, [fp, #-12] @ float
bl __aeabi_fcmplt
mov r3, r0
cmp r3, #0
beq .L3
ldr r3, [fp, #-8]
lsl r3, r3, #2
ldr r2, [fp, #-16]
add r3, r2, r3
ldr r3, [r3] @ float
str r3, [fp, #-12] @ float
.L3:
ldr r3, [fp, #-8]
add r3, r3, #1
str r3, [fp, #-8]
.L2:
ldr r2, [fp, #-8]
ldr r3, [fp, #-20]
cmp r2, r3
blt .L5
ldr r3, [fp, #-12] @ float
mov r0, r3
sub sp, fp, #4
@ sp needed
pop {fp, pc}
.L9:
.align 2
.L8:
.word -971227136
.size func0, .-func0
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",%progbits
|
eval/problem31/code.c | .file "code.c"
.intel_syntax noprefix
.text
.globl func0
.type func0, @function
func0:
.LFB6:
.cfi_startproc
endbr64
push rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
mov rbp, rsp
.cfi_def_cfa_register 6
sub rsp, 48
mov QWORD PTR -24[rbp], rdi
mov DWORD PTR -28[rbp], esi
mov QWORD PTR -40[rbp], rdx
mov eax, DWORD PTR -28[rbp]
cdqe
sal rax, 2
mov rdi, rax
call malloc@PLT
mov QWORD PTR -8[rbp], rax
mov rax, QWORD PTR -40[rbp]
mov DWORD PTR [rax], 0
mov DWORD PTR -12[rbp], 0
jmp .L2
.L5:
mov eax, DWORD PTR -12[rbp]
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -24[rbp]
add rax, rdx
movss xmm0, DWORD PTR [rax]
pxor xmm1, xmm1
comiss xmm0, xmm1
jbe .L3
mov eax, DWORD PTR -12[rbp]
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -24[rbp]
lea rsi, [rdx+rax]
mov rax, QWORD PTR -40[rbp]
mov eax, DWORD PTR [rax]
lea ecx, 1[rax]
mov rdx, QWORD PTR -40[rbp]
mov DWORD PTR [rdx], ecx
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -8[rbp]
add rax, rdx
movss xmm0, DWORD PTR [rsi]
movss DWORD PTR [rax], xmm0
.L3:
add DWORD PTR -12[rbp], 1
.L2:
mov eax, DWORD PTR -12[rbp]
cmp eax, DWORD PTR -28[rbp]
jl .L5
mov rax, QWORD PTR -8[rbp]
leave
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE6:
.size func0, .-func0
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",@progbits
.section .note.gnu.property,"a"
.align 8
.long 1f - 0f
.long 4f - 1f
.long 5
0:
.string "GNU"
1:
.align 8
.long 0xc0000002
.long 3f - 2f
2:
.long 0x3
3:
.align 8
4:
| .arch armv5t
.eabi_attribute 20, 1
.eabi_attribute 21, 1
.eabi_attribute 23, 3
.eabi_attribute 24, 1
.eabi_attribute 25, 1
.eabi_attribute 26, 2
.eabi_attribute 30, 6
.eabi_attribute 34, 0
.eabi_attribute 18, 4
.file "code.c"
.text
.global __aeabi_fcmpgt
.align 2
.global func0
.syntax unified
.arm
.fpu softvfp
.type func0, %function
func0:
@ args = 0, pretend = 0, frame = 24
@ frame_needed = 1, uses_anonymous_args = 0
push {fp, lr}
add fp, sp, #4
sub sp, sp, #24
str r0, [fp, #-16]
str r1, [fp, #-20]
str r2, [fp, #-24]
ldr r3, [fp, #-20]
lsl r3, r3, #2
mov r0, r3
bl malloc
mov r3, r0
str r3, [fp, #-8]
ldr r3, [fp, #-24]
mov r2, #0
str r2, [r3]
mov r3, #0
str r3, [fp, #-12]
b .L2
.L5:
ldr r3, [fp, #-12]
lsl r3, r3, #2
ldr r2, [fp, #-16]
add r3, r2, r3
ldr r3, [r3] @ float
mov r1, #0
mov r0, r3
bl __aeabi_fcmpgt
mov r3, r0
cmp r3, #0
beq .L3
ldr r3, [fp, #-12]
lsl r3, r3, #2
ldr r2, [fp, #-16]
add r2, r2, r3
ldr r3, [fp, #-24]
ldr r3, [r3]
add r0, r3, #1
ldr r1, [fp, #-24]
str r0, [r1]
lsl r3, r3, #2
ldr r1, [fp, #-8]
add r3, r1, r3
ldr r2, [r2] @ float
str r2, [r3] @ float
.L3:
ldr r3, [fp, #-12]
add r3, r3, #1
str r3, [fp, #-12]
.L2:
ldr r2, [fp, #-12]
ldr r3, [fp, #-20]
cmp r2, r3
blt .L5
ldr r3, [fp, #-8]
mov r0, r3
sub sp, fp, #4
@ sp needed
pop {fp, pc}
.size func0, .-func0
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",%progbits
|
eval/problem86/code.c | .file "code.c"
.intel_syntax noprefix
.text
.globl func0
.type func0, @function
func0:
.LFB0:
.cfi_startproc
endbr64
push rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
mov rbp, rsp
.cfi_def_cfa_register 6
mov QWORD PTR -24[rbp], rdi
mov DWORD PTR -28[rbp], esi
mov DWORD PTR -8[rbp], 0
mov DWORD PTR -4[rbp], 0
jmp .L2
.L4:
mov eax, DWORD PTR -4[rbp]
add eax, eax
cdqe
add rax, 1
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -24[rbp]
add rax, rdx
mov eax, DWORD PTR [rax]
and eax, 1
test eax, eax
jne .L3
mov eax, DWORD PTR -4[rbp]
add eax, eax
cdqe
add rax, 1
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -24[rbp]
add rax, rdx
mov eax, DWORD PTR [rax]
add DWORD PTR -8[rbp], eax
.L3:
add DWORD PTR -4[rbp], 1
.L2:
mov eax, DWORD PTR -4[rbp]
add eax, eax
add eax, 1
cmp DWORD PTR -28[rbp], eax
jg .L4
mov eax, DWORD PTR -8[rbp]
pop rbp
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE0:
.size func0, .-func0
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",@progbits
.section .note.gnu.property,"a"
.align 8
.long 1f - 0f
.long 4f - 1f
.long 5
0:
.string "GNU"
1:
.align 8
.long 0xc0000002
.long 3f - 2f
2:
.long 0x3
3:
.align 8
4:
| .arch armv5t
.eabi_attribute 20, 1
.eabi_attribute 21, 1
.eabi_attribute 23, 3
.eabi_attribute 24, 1
.eabi_attribute 25, 1
.eabi_attribute 26, 2
.eabi_attribute 30, 6
.eabi_attribute 34, 0
.eabi_attribute 18, 4
.file "code.c"
.text
.align 2
.global func0
.syntax unified
.arm
.fpu softvfp
.type func0, %function
func0:
@ args = 0, pretend = 0, frame = 16
@ frame_needed = 1, uses_anonymous_args = 0
@ link register save eliminated.
str fp, [sp, #-4]!
add fp, sp, #0
sub sp, sp, #20
str r0, [fp, #-16]
str r1, [fp, #-20]
mov r3, #0
str r3, [fp, #-12]
mov r3, #0
str r3, [fp, #-8]
b .L2
.L4:
ldr r3, [fp, #-8]
lsl r3, r3, #3
add r3, r3, #4
ldr r2, [fp, #-16]
add r3, r2, r3
ldr r3, [r3]
and r3, r3, #1
cmp r3, #0
bne .L3
ldr r3, [fp, #-8]
lsl r3, r3, #3
add r3, r3, #4
ldr r2, [fp, #-16]
add r3, r2, r3
ldr r3, [r3]
ldr r2, [fp, #-12]
add r3, r2, r3
str r3, [fp, #-12]
.L3:
ldr r3, [fp, #-8]
add r3, r3, #1
str r3, [fp, #-8]
.L2:
ldr r3, [fp, #-8]
lsl r3, r3, #1
add r3, r3, #1
ldr r2, [fp, #-20]
cmp r2, r3
bgt .L4
ldr r3, [fp, #-12]
mov r0, r3
add sp, fp, #0
@ sp needed
ldr fp, [sp], #4
bx lr
.size func0, .-func0
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",%progbits
|
eval/problem77/code.c | .file "code.c"
.intel_syntax noprefix
.text
.globl func0
.type func0, @function
func0:
.LFB0:
.cfi_startproc
endbr64
push rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
mov rbp, rsp
.cfi_def_cfa_register 6
mov DWORD PTR -20[rbp], edi
mov DWORD PTR -24[rbp], esi
mov DWORD PTR -8[rbp], 1
mov DWORD PTR -4[rbp], 0
jmp .L2
.L6:
mov eax, DWORD PTR -8[rbp]
cmp eax, DWORD PTR -20[rbp]
jne .L3
mov eax, 1
jmp .L4
.L3:
mov eax, DWORD PTR -8[rbp]
imul eax, DWORD PTR -24[rbp]
mov DWORD PTR -8[rbp], eax
add DWORD PTR -4[rbp], 1
.L2:
mov eax, DWORD PTR -8[rbp]
cmp eax, DWORD PTR -20[rbp]
jg .L5
cmp DWORD PTR -4[rbp], 99
jle .L6
.L5:
mov eax, 0
.L4:
pop rbp
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE0:
.size func0, .-func0
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",@progbits
.section .note.gnu.property,"a"
.align 8
.long 1f - 0f
.long 4f - 1f
.long 5
0:
.string "GNU"
1:
.align 8
.long 0xc0000002
.long 3f - 2f
2:
.long 0x3
3:
.align 8
4:
| .arch armv5t
.eabi_attribute 20, 1
.eabi_attribute 21, 1
.eabi_attribute 23, 3
.eabi_attribute 24, 1
.eabi_attribute 25, 1
.eabi_attribute 26, 2
.eabi_attribute 30, 6
.eabi_attribute 34, 0
.eabi_attribute 18, 4
.file "code.c"
.text
.align 2
.global func0
.syntax unified
.arm
.fpu softvfp
.type func0, %function
func0:
@ args = 0, pretend = 0, frame = 16
@ frame_needed = 1, uses_anonymous_args = 0
@ link register save eliminated.
str fp, [sp, #-4]!
add fp, sp, #0
sub sp, sp, #20
str r0, [fp, #-16]
str r1, [fp, #-20]
mov r3, #1
str r3, [fp, #-12]
mov r3, #0
str r3, [fp, #-8]
b .L2
.L6:
ldr r2, [fp, #-12]
ldr r3, [fp, #-16]
cmp r2, r3
bne .L3
mov r3, #1
b .L4
.L3:
ldr r3, [fp, #-12]
ldr r2, [fp, #-20]
mul r3, r2, r3
str r3, [fp, #-12]
ldr r3, [fp, #-8]
add r3, r3, #1
str r3, [fp, #-8]
.L2:
ldr r2, [fp, #-12]
ldr r3, [fp, #-16]
cmp r2, r3
bgt .L5
ldr r3, [fp, #-8]
cmp r3, #99
ble .L6
.L5:
mov r3, #0
.L4:
mov r0, r3
add sp, fp, #0
@ sp needed
ldr fp, [sp], #4
bx lr
.size func0, .-func0
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",%progbits
|
eval/problem9/code.c | .file "code.c"
.intel_syntax noprefix
.text
.globl func0
.type func0, @function
func0:
.LFB0:
.cfi_startproc
endbr64
push rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
mov rbp, rsp
.cfi_def_cfa_register 6
mov QWORD PTR -24[rbp], rdi
mov DWORD PTR -28[rbp], esi
mov QWORD PTR -40[rbp], rdx
mov DWORD PTR -12[rbp], 0
mov DWORD PTR -8[rbp], 1
mov DWORD PTR -4[rbp], 0
jmp .L2
.L3:
mov eax, DWORD PTR -4[rbp]
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -24[rbp]
add rax, rdx
mov eax, DWORD PTR [rax]
add DWORD PTR -12[rbp], eax
mov eax, DWORD PTR -4[rbp]
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -24[rbp]
add rax, rdx
mov eax, DWORD PTR [rax]
mov edx, DWORD PTR -8[rbp]
imul eax, edx
mov DWORD PTR -8[rbp], eax
add DWORD PTR -4[rbp], 1
.L2:
mov eax, DWORD PTR -4[rbp]
cmp eax, DWORD PTR -28[rbp]
jl .L3
mov rax, QWORD PTR -40[rbp]
mov edx, DWORD PTR -12[rbp]
mov DWORD PTR [rax], edx
mov rax, QWORD PTR -40[rbp]
lea rdx, 4[rax]
mov eax, DWORD PTR -8[rbp]
mov DWORD PTR [rdx], eax
nop
pop rbp
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE0:
.size func0, .-func0
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",@progbits
.section .note.gnu.property,"a"
.align 8
.long 1f - 0f
.long 4f - 1f
.long 5
0:
.string "GNU"
1:
.align 8
.long 0xc0000002
.long 3f - 2f
2:
.long 0x3
3:
.align 8
4:
| .arch armv5t
.eabi_attribute 20, 1
.eabi_attribute 21, 1
.eabi_attribute 23, 3
.eabi_attribute 24, 1
.eabi_attribute 25, 1
.eabi_attribute 26, 2
.eabi_attribute 30, 6
.eabi_attribute 34, 0
.eabi_attribute 18, 4
.file "code.c"
.text
.align 2
.global func0
.syntax unified
.arm
.fpu softvfp
.type func0, %function
func0:
@ args = 0, pretend = 0, frame = 32
@ frame_needed = 1, uses_anonymous_args = 0
@ link register save eliminated.
str fp, [sp, #-4]!
add fp, sp, #0
sub sp, sp, #36
str r0, [fp, #-24]
str r1, [fp, #-28]
str r2, [fp, #-32]
mov r3, #0
str r3, [fp, #-16]
mov r3, #1
str r3, [fp, #-12]
mov r3, #0
str r3, [fp, #-8]
b .L2
.L3:
ldr r3, [fp, #-8]
lsl r3, r3, #2
ldr r2, [fp, #-24]
add r3, r2, r3
ldr r3, [r3]
ldr r2, [fp, #-16]
add r3, r2, r3
str r3, [fp, #-16]
ldr r3, [fp, #-8]
lsl r3, r3, #2
ldr r2, [fp, #-24]
add r3, r2, r3
ldr r2, [r3]
ldr r3, [fp, #-12]
mul r3, r2, r3
str r3, [fp, #-12]
ldr r3, [fp, #-8]
add r3, r3, #1
str r3, [fp, #-8]
.L2:
ldr r2, [fp, #-8]
ldr r3, [fp, #-28]
cmp r2, r3
blt .L3
ldr r3, [fp, #-32]
ldr r2, [fp, #-16]
str r2, [r3]
ldr r3, [fp, #-32]
add r3, r3, #4
ldr r2, [fp, #-12]
str r2, [r3]
nop
add sp, fp, #0
@ sp needed
ldr fp, [sp], #4
bx lr
.size func0, .-func0
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",%progbits
|
eval/problem64/code.c | .file "code.c"
.intel_syntax noprefix
.text
.globl func0
.type func0, @function
func0:
.LFB0:
.cfi_startproc
endbr64
push rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
mov rbp, rsp
.cfi_def_cfa_register 6
sub rsp, 448
mov DWORD PTR -436[rbp], edi
mov rax, QWORD PTR fs:40
mov QWORD PTR -8[rbp], rax
xor eax, eax
lea rdx, -416[rbp]
mov eax, 0
mov ecx, 50
mov rdi, rdx
rep stosq
mov DWORD PTR -412[rbp], 0
mov DWORD PTR -408[rbp], 1
mov DWORD PTR -420[rbp], 3
jmp .L2
.L3:
mov eax, DWORD PTR -420[rbp]
sub eax, 1
cdqe
mov edx, DWORD PTR -416[rbp+rax*4]
mov eax, DWORD PTR -420[rbp]
sub eax, 2
cdqe
mov eax, DWORD PTR -416[rbp+rax*4]
add edx, eax
mov eax, DWORD PTR -420[rbp]
sub eax, 3
cdqe
mov eax, DWORD PTR -416[rbp+rax*4]
add edx, eax
mov eax, DWORD PTR -420[rbp]
cdqe
mov DWORD PTR -416[rbp+rax*4], edx
add DWORD PTR -420[rbp], 1
.L2:
mov eax, DWORD PTR -420[rbp]
cmp eax, DWORD PTR -436[rbp]
jle .L3
mov eax, DWORD PTR -436[rbp]
cdqe
mov eax, DWORD PTR -416[rbp+rax*4]
mov rsi, QWORD PTR -8[rbp]
xor rsi, QWORD PTR fs:40
je .L5
call __stack_chk_fail@PLT
.L5:
leave
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE0:
.size func0, .-func0
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",@progbits
.section .note.gnu.property,"a"
.align 8
.long 1f - 0f
.long 4f - 1f
.long 5
0:
.string "GNU"
1:
.align 8
.long 0xc0000002
.long 3f - 2f
2:
.long 0x3
3:
.align 8
4:
| .arch armv5t
.eabi_attribute 20, 1
.eabi_attribute 21, 1
.eabi_attribute 23, 3
.eabi_attribute 24, 1
.eabi_attribute 25, 1
.eabi_attribute 26, 2
.eabi_attribute 30, 6
.eabi_attribute 34, 0
.eabi_attribute 18, 4
.file "code.c"
.text
.section .rodata
.align 2
.LC0:
.word __stack_chk_guard
.text
.align 2
.global func0
.syntax unified
.arm
.fpu softvfp
.type func0, %function
func0:
@ args = 0, pretend = 0, frame = 416
@ frame_needed = 1, uses_anonymous_args = 0
push {fp, lr}
add fp, sp, #4
sub sp, sp, #416
str r0, [fp, #-416]
ldr r3, .L6
ldr r3, [r3]
str r3, [fp, #-8]
mov r3,#0
sub r3, fp, #408
mov r2, #400
mov r1, #0
mov r0, r3
bl memset
mov r3, #0
str r3, [fp, #-404]
mov r3, #1
str r3, [fp, #-400]
mov r3, #3
str r3, [fp, #-412]
b .L2
.L3:
ldr r3, [fp, #-412]
sub r3, r3, #1
lsl r3, r3, #2
sub r2, fp, #4
add r3, r2, r3
ldr r2, [r3, #-404]
ldr r3, [fp, #-412]
sub r3, r3, #2
lsl r3, r3, #2
sub r1, fp, #4
add r3, r1, r3
ldr r3, [r3, #-404]
add r2, r2, r3
ldr r3, [fp, #-412]
sub r3, r3, #3
lsl r3, r3, #2
sub r1, fp, #4
add r3, r1, r3
ldr r3, [r3, #-404]
add r2, r2, r3
ldr r3, [fp, #-412]
lsl r3, r3, #2
sub r1, fp, #4
add r3, r1, r3
str r2, [r3, #-404]
ldr r3, [fp, #-412]
add r3, r3, #1
str r3, [fp, #-412]
.L2:
ldr r2, [fp, #-412]
ldr r3, [fp, #-416]
cmp r2, r3
ble .L3
ldr r3, [fp, #-416]
lsl r3, r3, #2
sub r2, fp, #4
add r3, r2, r3
ldr r3, [r3, #-404]
ldr r2, .L6
ldr r1, [r2]
ldr r2, [fp, #-8]
eors r1, r2, r1
mov r2, #0
beq .L5
bl __stack_chk_fail
.L5:
mov r0, r3
sub sp, fp, #4
@ sp needed
pop {fp, pc}
.L7:
.align 2
.L6:
.word .LC0
.size func0, .-func0
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",%progbits
|
eval/problem123/code.c | .file "code.c"
.intel_syntax noprefix
.text
.globl func0
.type func0, @function
func0:
.LFB0:
.cfi_startproc
endbr64
push rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
mov rbp, rsp
.cfi_def_cfa_register 6
mov QWORD PTR -24[rbp], rdi
mov DWORD PTR -28[rbp], esi
mov DWORD PTR -8[rbp], 0
mov DWORD PTR -4[rbp], 0
jmp .L2
.L4:
mov eax, DWORD PTR -4[rbp]
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -24[rbp]
add rax, rdx
mov eax, DWORD PTR [rax]
cmp eax, -99
jl .L3
mov eax, DWORD PTR -4[rbp]
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -24[rbp]
add rax, rdx
mov eax, DWORD PTR [rax]
cmp eax, 99
jg .L3
mov eax, DWORD PTR -4[rbp]
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -24[rbp]
add rax, rdx
mov eax, DWORD PTR [rax]
add DWORD PTR -8[rbp], eax
.L3:
add DWORD PTR -4[rbp], 1
.L2:
mov eax, DWORD PTR -4[rbp]
cmp eax, DWORD PTR -28[rbp]
jl .L4
mov eax, DWORD PTR -8[rbp]
pop rbp
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE0:
.size func0, .-func0
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",@progbits
.section .note.gnu.property,"a"
.align 8
.long 1f - 0f
.long 4f - 1f
.long 5
0:
.string "GNU"
1:
.align 8
.long 0xc0000002
.long 3f - 2f
2:
.long 0x3
3:
.align 8
4:
| .arch armv5t
.eabi_attribute 20, 1
.eabi_attribute 21, 1
.eabi_attribute 23, 3
.eabi_attribute 24, 1
.eabi_attribute 25, 1
.eabi_attribute 26, 2
.eabi_attribute 30, 6
.eabi_attribute 34, 0
.eabi_attribute 18, 4
.file "code.c"
.text
.align 2
.global func0
.syntax unified
.arm
.fpu softvfp
.type func0, %function
func0:
@ args = 0, pretend = 0, frame = 16
@ frame_needed = 1, uses_anonymous_args = 0
@ link register save eliminated.
str fp, [sp, #-4]!
add fp, sp, #0
sub sp, sp, #20
str r0, [fp, #-16]
str r1, [fp, #-20]
mov r3, #0
str r3, [fp, #-12]
mov r3, #0
str r3, [fp, #-8]
b .L2
.L4:
ldr r3, [fp, #-8]
lsl r3, r3, #2
ldr r2, [fp, #-16]
add r3, r2, r3
ldr r3, [r3]
cmn r3, #99
blt .L3
ldr r3, [fp, #-8]
lsl r3, r3, #2
ldr r2, [fp, #-16]
add r3, r2, r3
ldr r3, [r3]
cmp r3, #99
bgt .L3
ldr r3, [fp, #-8]
lsl r3, r3, #2
ldr r2, [fp, #-16]
add r3, r2, r3
ldr r3, [r3]
ldr r2, [fp, #-12]
add r3, r2, r3
str r3, [fp, #-12]
.L3:
ldr r3, [fp, #-8]
add r3, r3, #1
str r3, [fp, #-8]
.L2:
ldr r2, [fp, #-8]
ldr r3, [fp, #-20]
cmp r2, r3
blt .L4
ldr r3, [fp, #-12]
mov r0, r3
add sp, fp, #0
@ sp needed
ldr fp, [sp], #4
bx lr
.size func0, .-func0
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",%progbits
|
eval/problem161/code.c | .file "code.c"
.intel_syntax noprefix
.text
.section .rodata
.LC0:
.string "**"
.LC1:
.string "*"
.LC2:
.string "//"
.LC3:
.string "+"
.LC4:
.string "-"
.text
.globl func0
.type func0, @function
func0:
.LFB6:
.cfi_startproc
endbr64
push rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
mov rbp, rsp
.cfi_def_cfa_register 6
sub rsp, 80
mov QWORD PTR -56[rbp], rdi
mov QWORD PTR -64[rbp], rsi
mov DWORD PTR -68[rbp], edx
mov DWORD PTR -72[rbp], ecx
mov eax, DWORD PTR -72[rbp]
cdqe
sal rax, 2
mov rdi, rax
call malloc@PLT
mov QWORD PTR -16[rbp], rax
mov eax, DWORD PTR -72[rbp]
cdqe
sal rax, 2
mov rdi, rax
call malloc@PLT
mov QWORD PTR -8[rbp], rax
mov DWORD PTR -36[rbp], 0
jmp .L2
.L3:
mov eax, DWORD PTR -36[rbp]
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -64[rbp]
add rax, rdx
mov edx, DWORD PTR -36[rbp]
movsx rdx, edx
lea rcx, 0[0+rdx*4]
mov rdx, QWORD PTR -16[rbp]
add rdx, rcx
mov eax, DWORD PTR [rax]
mov DWORD PTR [rdx], eax
mov eax, DWORD PTR -36[rbp]
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -8[rbp]
add rdx, rax
mov eax, DWORD PTR -36[rbp]
mov DWORD PTR [rdx], eax
add DWORD PTR -36[rbp], 1
.L2:
mov eax, DWORD PTR -36[rbp]
cmp eax, DWORD PTR -72[rbp]
jl .L3
mov DWORD PTR -32[rbp], 0
jmp .L4
.L10:
mov eax, DWORD PTR -32[rbp]
cdqe
lea rdx, 0[0+rax*8]
mov rax, QWORD PTR -56[rbp]
add rax, rdx
mov rax, QWORD PTR [rax]
lea rsi, .LC0[rip]
mov rdi, rax
call strcmp@PLT
test eax, eax
jne .L5
jmp .L6
.L7:
mov eax, DWORD PTR -32[rbp]
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -8[rbp]
add rax, rdx
mov eax, DWORD PTR [rax]
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -8[rbp]
add rax, rdx
mov edx, DWORD PTR -32[rbp]
movsx rdx, edx
lea rcx, 0[0+rdx*4]
mov rdx, QWORD PTR -8[rbp]
add rdx, rcx
mov eax, DWORD PTR [rax]
mov DWORD PTR [rdx], eax
.L6:
mov eax, DWORD PTR -32[rbp]
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -8[rbp]
add rax, rdx
mov eax, DWORD PTR [rax]
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -8[rbp]
add rax, rdx
mov edx, DWORD PTR [rax]
mov eax, DWORD PTR -32[rbp]
cdqe
lea rcx, 0[0+rax*4]
mov rax, QWORD PTR -8[rbp]
add rax, rcx
mov eax, DWORD PTR [rax]
cmp edx, eax
jne .L7
jmp .L8
.L9:
mov eax, DWORD PTR -32[rbp]
cdqe
add rax, 1
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -8[rbp]
add rax, rdx
mov eax, DWORD PTR [rax]
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -8[rbp]
add rax, rdx
mov edx, DWORD PTR -32[rbp]
movsx rdx, edx
add rdx, 1
lea rcx, 0[0+rdx*4]
mov rdx, QWORD PTR -8[rbp]
add rdx, rcx
mov eax, DWORD PTR [rax]
mov DWORD PTR [rdx], eax
.L8:
mov eax, DWORD PTR -32[rbp]
cdqe
add rax, 1
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -8[rbp]
add rax, rdx
mov eax, DWORD PTR [rax]
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -8[rbp]
add rax, rdx
mov edx, DWORD PTR [rax]
mov eax, DWORD PTR -32[rbp]
cdqe
add rax, 1
lea rcx, 0[0+rax*4]
mov rax, QWORD PTR -8[rbp]
add rax, rcx
mov eax, DWORD PTR [rax]
cmp edx, eax
jne .L9
mov eax, DWORD PTR -32[rbp]
cdqe
add rax, 1
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -8[rbp]
add rax, rdx
mov eax, DWORD PTR [rax]
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -16[rbp]
add rax, rdx
mov eax, DWORD PTR [rax]
cvtsi2sd xmm1, eax
mov eax, DWORD PTR -32[rbp]
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -8[rbp]
add rax, rdx
mov eax, DWORD PTR [rax]
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -16[rbp]
add rax, rdx
mov eax, DWORD PTR [rax]
cvtsi2sd xmm0, eax
call pow@PLT
mov eax, DWORD PTR -32[rbp]
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -8[rbp]
add rax, rdx
mov eax, DWORD PTR [rax]
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -16[rbp]
add rdx, rax
cvttsd2si eax, xmm0
mov DWORD PTR [rdx], eax
mov eax, DWORD PTR -32[rbp]
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -8[rbp]
add rax, rdx
mov edx, DWORD PTR -32[rbp]
movsx rdx, edx
add rdx, 1
lea rcx, 0[0+rdx*4]
mov rdx, QWORD PTR -8[rbp]
add rdx, rcx
mov eax, DWORD PTR [rax]
mov DWORD PTR [rdx], eax
.L5:
add DWORD PTR -32[rbp], 1
.L4:
mov eax, DWORD PTR -32[rbp]
cmp eax, DWORD PTR -68[rbp]
jl .L10
mov DWORD PTR -28[rbp], 0
jmp .L11
.L20:
mov eax, DWORD PTR -28[rbp]
cdqe
lea rdx, 0[0+rax*8]
mov rax, QWORD PTR -56[rbp]
add rax, rdx
mov rax, QWORD PTR [rax]
lea rsi, .LC1[rip]
mov rdi, rax
call strcmp@PLT
test eax, eax
je .L14
mov eax, DWORD PTR -28[rbp]
cdqe
lea rdx, 0[0+rax*8]
mov rax, QWORD PTR -56[rbp]
add rax, rdx
mov rax, QWORD PTR [rax]
lea rsi, .LC2[rip]
mov rdi, rax
call strcmp@PLT
test eax, eax
jne .L13
jmp .L14
.L15:
mov eax, DWORD PTR -28[rbp]
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -8[rbp]
add rax, rdx
mov eax, DWORD PTR [rax]
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -8[rbp]
add rax, rdx
mov edx, DWORD PTR -28[rbp]
movsx rdx, edx
lea rcx, 0[0+rdx*4]
mov rdx, QWORD PTR -8[rbp]
add rdx, rcx
mov eax, DWORD PTR [rax]
mov DWORD PTR [rdx], eax
.L14:
mov eax, DWORD PTR -28[rbp]
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -8[rbp]
add rax, rdx
mov eax, DWORD PTR [rax]
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -8[rbp]
add rax, rdx
mov edx, DWORD PTR [rax]
mov eax, DWORD PTR -28[rbp]
cdqe
lea rcx, 0[0+rax*4]
mov rax, QWORD PTR -8[rbp]
add rax, rcx
mov eax, DWORD PTR [rax]
cmp edx, eax
jne .L15
jmp .L16
.L17:
mov eax, DWORD PTR -28[rbp]
cdqe
add rax, 1
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -8[rbp]
add rax, rdx
mov eax, DWORD PTR [rax]
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -8[rbp]
add rax, rdx
mov edx, DWORD PTR -28[rbp]
movsx rdx, edx
add rdx, 1
lea rcx, 0[0+rdx*4]
mov rdx, QWORD PTR -8[rbp]
add rdx, rcx
mov eax, DWORD PTR [rax]
mov DWORD PTR [rdx], eax
.L16:
mov eax, DWORD PTR -28[rbp]
cdqe
add rax, 1
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -8[rbp]
add rax, rdx
mov eax, DWORD PTR [rax]
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -8[rbp]
add rax, rdx
mov edx, DWORD PTR [rax]
mov eax, DWORD PTR -28[rbp]
cdqe
add rax, 1
lea rcx, 0[0+rax*4]
mov rax, QWORD PTR -8[rbp]
add rax, rcx
mov eax, DWORD PTR [rax]
cmp edx, eax
jne .L17
mov eax, DWORD PTR -28[rbp]
cdqe
lea rdx, 0[0+rax*8]
mov rax, QWORD PTR -56[rbp]
add rax, rdx
mov rax, QWORD PTR [rax]
lea rsi, .LC1[rip]
mov rdi, rax
call strcmp@PLT
test eax, eax
jne .L18
mov eax, DWORD PTR -28[rbp]
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -8[rbp]
add rax, rdx
mov eax, DWORD PTR [rax]
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -16[rbp]
add rax, rdx
mov ecx, DWORD PTR [rax]
mov eax, DWORD PTR -28[rbp]
cdqe
add rax, 1
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -8[rbp]
add rax, rdx
mov eax, DWORD PTR [rax]
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -16[rbp]
add rax, rdx
mov eax, DWORD PTR [rax]
mov edx, DWORD PTR -28[rbp]
movsx rdx, edx
lea rsi, 0[0+rdx*4]
mov rdx, QWORD PTR -8[rbp]
add rdx, rsi
mov edx, DWORD PTR [rdx]
movsx rdx, edx
lea rsi, 0[0+rdx*4]
mov rdx, QWORD PTR -16[rbp]
add rdx, rsi
imul eax, ecx
mov DWORD PTR [rdx], eax
jmp .L19
.L18:
mov eax, DWORD PTR -28[rbp]
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -8[rbp]
add rax, rdx
mov eax, DWORD PTR [rax]
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -16[rbp]
add rax, rdx
mov eax, DWORD PTR [rax]
mov edx, DWORD PTR -28[rbp]
movsx rdx, edx
add rdx, 1
lea rcx, 0[0+rdx*4]
mov rdx, QWORD PTR -8[rbp]
add rdx, rcx
mov edx, DWORD PTR [rdx]
movsx rdx, edx
lea rcx, 0[0+rdx*4]
mov rdx, QWORD PTR -16[rbp]
add rdx, rcx
mov edi, DWORD PTR [rdx]
mov ecx, DWORD PTR -28[rbp]
movsx rcx, ecx
lea rsi, 0[0+rcx*4]
mov rcx, QWORD PTR -8[rbp]
add rcx, rsi
mov ecx, DWORD PTR [rcx]
movsx rcx, ecx
lea rsi, 0[0+rcx*4]
mov rcx, QWORD PTR -16[rbp]
add rcx, rsi
cdq
idiv edi
mov DWORD PTR [rcx], eax
.L19:
mov eax, DWORD PTR -28[rbp]
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -8[rbp]
add rax, rdx
mov edx, DWORD PTR -28[rbp]
movsx rdx, edx
add rdx, 1
lea rcx, 0[0+rdx*4]
mov rdx, QWORD PTR -8[rbp]
add rdx, rcx
mov eax, DWORD PTR [rax]
mov DWORD PTR [rdx], eax
.L13:
add DWORD PTR -28[rbp], 1
.L11:
mov eax, DWORD PTR -28[rbp]
cmp eax, DWORD PTR -68[rbp]
jl .L20
mov DWORD PTR -24[rbp], 0
jmp .L21
.L30:
mov eax, DWORD PTR -24[rbp]
cdqe
lea rdx, 0[0+rax*8]
mov rax, QWORD PTR -56[rbp]
add rax, rdx
mov rax, QWORD PTR [rax]
lea rsi, .LC3[rip]
mov rdi, rax
call strcmp@PLT
test eax, eax
je .L24
mov eax, DWORD PTR -24[rbp]
cdqe
lea rdx, 0[0+rax*8]
mov rax, QWORD PTR -56[rbp]
add rax, rdx
mov rax, QWORD PTR [rax]
lea rsi, .LC4[rip]
mov rdi, rax
call strcmp@PLT
test eax, eax
jne .L23
jmp .L24
.L25:
mov eax, DWORD PTR -24[rbp]
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -8[rbp]
add rax, rdx
mov eax, DWORD PTR [rax]
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -8[rbp]
add rax, rdx
mov edx, DWORD PTR -24[rbp]
movsx rdx, edx
lea rcx, 0[0+rdx*4]
mov rdx, QWORD PTR -8[rbp]
add rdx, rcx
mov eax, DWORD PTR [rax]
mov DWORD PTR [rdx], eax
.L24:
mov eax, DWORD PTR -24[rbp]
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -8[rbp]
add rax, rdx
mov eax, DWORD PTR [rax]
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -8[rbp]
add rax, rdx
mov edx, DWORD PTR [rax]
mov eax, DWORD PTR -24[rbp]
cdqe
lea rcx, 0[0+rax*4]
mov rax, QWORD PTR -8[rbp]
add rax, rcx
mov eax, DWORD PTR [rax]
cmp edx, eax
jne .L25
jmp .L26
.L27:
mov eax, DWORD PTR -24[rbp]
cdqe
add rax, 1
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -8[rbp]
add rax, rdx
mov eax, DWORD PTR [rax]
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -8[rbp]
add rax, rdx
mov edx, DWORD PTR -24[rbp]
movsx rdx, edx
add rdx, 1
lea rcx, 0[0+rdx*4]
mov rdx, QWORD PTR -8[rbp]
add rdx, rcx
mov eax, DWORD PTR [rax]
mov DWORD PTR [rdx], eax
.L26:
mov eax, DWORD PTR -24[rbp]
cdqe
add rax, 1
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -8[rbp]
add rax, rdx
mov eax, DWORD PTR [rax]
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -8[rbp]
add rax, rdx
mov edx, DWORD PTR [rax]
mov eax, DWORD PTR -24[rbp]
cdqe
add rax, 1
lea rcx, 0[0+rax*4]
mov rax, QWORD PTR -8[rbp]
add rax, rcx
mov eax, DWORD PTR [rax]
cmp edx, eax
jne .L27
mov eax, DWORD PTR -24[rbp]
cdqe
lea rdx, 0[0+rax*8]
mov rax, QWORD PTR -56[rbp]
add rax, rdx
mov rax, QWORD PTR [rax]
lea rsi, .LC3[rip]
mov rdi, rax
call strcmp@PLT
test eax, eax
jne .L28
mov eax, DWORD PTR -24[rbp]
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -8[rbp]
add rax, rdx
mov eax, DWORD PTR [rax]
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -16[rbp]
add rax, rdx
mov ecx, DWORD PTR [rax]
mov eax, DWORD PTR -24[rbp]
cdqe
add rax, 1
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -8[rbp]
add rax, rdx
mov eax, DWORD PTR [rax]
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -16[rbp]
add rax, rdx
mov edx, DWORD PTR [rax]
mov eax, DWORD PTR -24[rbp]
cdqe
lea rsi, 0[0+rax*4]
mov rax, QWORD PTR -8[rbp]
add rax, rsi
mov eax, DWORD PTR [rax]
cdqe
lea rsi, 0[0+rax*4]
mov rax, QWORD PTR -16[rbp]
add rax, rsi
add edx, ecx
mov DWORD PTR [rax], edx
jmp .L29
.L28:
mov eax, DWORD PTR -24[rbp]
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -8[rbp]
add rax, rdx
mov eax, DWORD PTR [rax]
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -16[rbp]
add rax, rdx
mov ecx, DWORD PTR [rax]
mov eax, DWORD PTR -24[rbp]
cdqe
add rax, 1
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -8[rbp]
add rax, rdx
mov eax, DWORD PTR [rax]
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -16[rbp]
add rax, rdx
mov edx, DWORD PTR [rax]
mov eax, DWORD PTR -24[rbp]
cdqe
lea rsi, 0[0+rax*4]
mov rax, QWORD PTR -8[rbp]
add rax, rsi
mov eax, DWORD PTR [rax]
cdqe
lea rsi, 0[0+rax*4]
mov rax, QWORD PTR -16[rbp]
add rax, rsi
sub ecx, edx
mov edx, ecx
mov DWORD PTR [rax], edx
.L29:
mov eax, DWORD PTR -24[rbp]
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -8[rbp]
add rax, rdx
mov edx, DWORD PTR -24[rbp]
movsx rdx, edx
add rdx, 1
lea rcx, 0[0+rdx*4]
mov rdx, QWORD PTR -8[rbp]
add rdx, rcx
mov eax, DWORD PTR [rax]
mov DWORD PTR [rdx], eax
.L23:
add DWORD PTR -24[rbp], 1
.L21:
mov eax, DWORD PTR -24[rbp]
cmp eax, DWORD PTR -68[rbp]
jl .L30
mov rax, QWORD PTR -16[rbp]
mov eax, DWORD PTR [rax]
mov DWORD PTR -20[rbp], eax
mov rax, QWORD PTR -16[rbp]
mov rdi, rax
call free@PLT
mov rax, QWORD PTR -8[rbp]
mov rdi, rax
call free@PLT
mov eax, DWORD PTR -20[rbp]
leave
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE6:
.size func0, .-func0
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",@progbits
.section .note.gnu.property,"a"
.align 8
.long 1f - 0f
.long 4f - 1f
.long 5
0:
.string "GNU"
1:
.align 8
.long 0xc0000002
.long 3f - 2f
2:
.long 0x3
3:
.align 8
4:
| .arch armv5t
.eabi_attribute 20, 1
.eabi_attribute 21, 1
.eabi_attribute 23, 3
.eabi_attribute 24, 1
.eabi_attribute 25, 1
.eabi_attribute 26, 2
.eabi_attribute 30, 6
.eabi_attribute 34, 0
.eabi_attribute 18, 4
.file "code.c"
.text
.section .rodata
.align 2
.LC0:
.ascii "**\000"
.global __aeabi_i2d
.global __aeabi_d2iz
.align 2
.LC1:
.ascii "*\000"
.align 2
.LC2:
.ascii "//\000"
.global __aeabi_idiv
.align 2
.LC3:
.ascii "+\000"
.align 2
.LC4:
.ascii "-\000"
.text
.align 2
.global func0
.syntax unified
.arm
.fpu softvfp
.type func0, %function
func0:
@ args = 0, pretend = 0, frame = 48
@ frame_needed = 1, uses_anonymous_args = 0
push {r4, r5, fp, lr}
add fp, sp, #12
sub sp, sp, #48
str r0, [fp, #-48]
str r1, [fp, #-52]
str r2, [fp, #-56]
str r3, [fp, #-60]
ldr r3, [fp, #-60]
lsl r3, r3, #2
mov r0, r3
bl malloc
mov r3, r0
str r3, [fp, #-24]
ldr r3, [fp, #-60]
lsl r3, r3, #2
mov r0, r3
bl malloc
mov r3, r0
str r3, [fp, #-20]
mov r3, #0
str r3, [fp, #-40]
b .L2
.L3:
ldr r3, [fp, #-40]
lsl r3, r3, #2
ldr r2, [fp, #-52]
add r2, r2, r3
ldr r3, [fp, #-40]
lsl r3, r3, #2
ldr r1, [fp, #-24]
add r3, r1, r3
ldr r2, [r2]
str r2, [r3]
ldr r3, [fp, #-40]
lsl r3, r3, #2
ldr r2, [fp, #-20]
add r3, r2, r3
ldr r2, [fp, #-40]
str r2, [r3]
ldr r3, [fp, #-40]
add r3, r3, #1
str r3, [fp, #-40]
.L2:
ldr r2, [fp, #-40]
ldr r3, [fp, #-60]
cmp r2, r3
blt .L3
mov r3, #0
str r3, [fp, #-36]
b .L4
.L10:
ldr r3, [fp, #-36]
lsl r3, r3, #2
ldr r2, [fp, #-48]
add r3, r2, r3
ldr r3, [r3]
ldr r1, .L32
mov r0, r3
bl strcmp
mov r3, r0
cmp r3, #0
bne .L5
b .L6
.L7:
ldr r3, [fp, #-36]
lsl r3, r3, #2
ldr r2, [fp, #-20]
add r3, r2, r3
ldr r3, [r3]
lsl r3, r3, #2
ldr r2, [fp, #-20]
add r2, r2, r3
ldr r3, [fp, #-36]
lsl r3, r3, #2
ldr r1, [fp, #-20]
add r3, r1, r3
ldr r2, [r2]
str r2, [r3]
.L6:
ldr r3, [fp, #-36]
lsl r3, r3, #2
ldr r2, [fp, #-20]
add r3, r2, r3
ldr r3, [r3]
lsl r3, r3, #2
ldr r2, [fp, #-20]
add r3, r2, r3
ldr r2, [r3]
ldr r3, [fp, #-36]
lsl r3, r3, #2
ldr r1, [fp, #-20]
add r3, r1, r3
ldr r3, [r3]
cmp r2, r3
bne .L7
b .L8
.L9:
ldr r3, [fp, #-36]
add r3, r3, #1
lsl r3, r3, #2
ldr r2, [fp, #-20]
add r3, r2, r3
ldr r3, [r3]
lsl r3, r3, #2
ldr r2, [fp, #-20]
add r2, r2, r3
ldr r3, [fp, #-36]
add r3, r3, #1
lsl r3, r3, #2
ldr r1, [fp, #-20]
add r3, r1, r3
ldr r2, [r2]
str r2, [r3]
.L8:
ldr r3, [fp, #-36]
add r3, r3, #1
lsl r3, r3, #2
ldr r2, [fp, #-20]
add r3, r2, r3
ldr r3, [r3]
lsl r3, r3, #2
ldr r2, [fp, #-20]
add r3, r2, r3
ldr r2, [r3]
ldr r3, [fp, #-36]
add r3, r3, #1
lsl r3, r3, #2
ldr r1, [fp, #-20]
add r3, r1, r3
ldr r3, [r3]
cmp r2, r3
bne .L9
ldr r3, [fp, #-36]
lsl r3, r3, #2
ldr r2, [fp, #-20]
add r3, r2, r3
ldr r3, [r3]
lsl r3, r3, #2
ldr r2, [fp, #-24]
add r3, r2, r3
ldr r3, [r3]
mov r0, r3
bl __aeabi_i2d
mov r4, r0
mov r5, r1
ldr r3, [fp, #-36]
add r3, r3, #1
lsl r3, r3, #2
ldr r2, [fp, #-20]
add r3, r2, r3
ldr r3, [r3]
lsl r3, r3, #2
ldr r2, [fp, #-24]
add r3, r2, r3
ldr r3, [r3]
mov r0, r3
bl __aeabi_i2d
mov r2, r0
mov r3, r1
mov r0, r4
mov r1, r5
bl pow
mov r2, r0
mov r3, r1
ldr r1, [fp, #-36]
lsl r1, r1, #2
ldr r0, [fp, #-20]
add r1, r0, r1
ldr r1, [r1]
lsl r1, r1, #2
ldr r0, [fp, #-24]
add r4, r0, r1
mov r0, r2
mov r1, r3
bl __aeabi_d2iz
mov r3, r0
str r3, [r4]
ldr r3, [fp, #-36]
lsl r3, r3, #2
ldr r2, [fp, #-20]
add r2, r2, r3
ldr r3, [fp, #-36]
add r3, r3, #1
lsl r3, r3, #2
ldr r1, [fp, #-20]
add r3, r1, r3
ldr r2, [r2]
str r2, [r3]
.L5:
ldr r3, [fp, #-36]
add r3, r3, #1
str r3, [fp, #-36]
.L4:
ldr r2, [fp, #-36]
ldr r3, [fp, #-56]
cmp r2, r3
blt .L10
mov r3, #0
str r3, [fp, #-32]
b .L11
.L20:
ldr r3, [fp, #-32]
lsl r3, r3, #2
ldr r2, [fp, #-48]
add r3, r2, r3
ldr r3, [r3]
ldr r1, .L32+4
mov r0, r3
bl strcmp
mov r3, r0
cmp r3, #0
beq .L14
ldr r3, [fp, #-32]
lsl r3, r3, #2
ldr r2, [fp, #-48]
add r3, r2, r3
ldr r3, [r3]
ldr r1, .L32+8
mov r0, r3
bl strcmp
mov r3, r0
cmp r3, #0
bne .L13
b .L14
.L15:
ldr r3, [fp, #-32]
lsl r3, r3, #2
ldr r2, [fp, #-20]
add r3, r2, r3
ldr r3, [r3]
lsl r3, r3, #2
ldr r2, [fp, #-20]
add r2, r2, r3
ldr r3, [fp, #-32]
lsl r3, r3, #2
ldr r1, [fp, #-20]
add r3, r1, r3
ldr r2, [r2]
str r2, [r3]
.L14:
ldr r3, [fp, #-32]
lsl r3, r3, #2
ldr r2, [fp, #-20]
add r3, r2, r3
ldr r3, [r3]
lsl r3, r3, #2
ldr r2, [fp, #-20]
add r3, r2, r3
ldr r2, [r3]
ldr r3, [fp, #-32]
lsl r3, r3, #2
ldr r1, [fp, #-20]
add r3, r1, r3
ldr r3, [r3]
cmp r2, r3
bne .L15
b .L16
.L17:
ldr r3, [fp, #-32]
add r3, r3, #1
lsl r3, r3, #2
ldr r2, [fp, #-20]
add r3, r2, r3
ldr r3, [r3]
lsl r3, r3, #2
ldr r2, [fp, #-20]
add r2, r2, r3
ldr r3, [fp, #-32]
add r3, r3, #1
lsl r3, r3, #2
ldr r1, [fp, #-20]
add r3, r1, r3
ldr r2, [r2]
str r2, [r3]
.L16:
ldr r3, [fp, #-32]
add r3, r3, #1
lsl r3, r3, #2
ldr r2, [fp, #-20]
add r3, r2, r3
ldr r3, [r3]
lsl r3, r3, #2
ldr r2, [fp, #-20]
add r3, r2, r3
ldr r2, [r3]
ldr r3, [fp, #-32]
add r3, r3, #1
lsl r3, r3, #2
ldr r1, [fp, #-20]
add r3, r1, r3
ldr r3, [r3]
cmp r2, r3
bne .L17
ldr r3, [fp, #-32]
lsl r3, r3, #2
ldr r2, [fp, #-48]
add r3, r2, r3
ldr r3, [r3]
ldr r1, .L32+4
mov r0, r3
bl strcmp
mov r3, r0
cmp r3, #0
bne .L18
ldr r3, [fp, #-32]
lsl r3, r3, #2
ldr r2, [fp, #-20]
add r3, r2, r3
ldr r3, [r3]
lsl r3, r3, #2
ldr r2, [fp, #-24]
add r3, r2, r3
ldr r2, [r3]
ldr r3, [fp, #-32]
add r3, r3, #1
lsl r3, r3, #2
ldr r1, [fp, #-20]
add r3, r1, r3
ldr r3, [r3]
lsl r3, r3, #2
ldr r1, [fp, #-24]
add r3, r1, r3
ldr r1, [r3]
ldr r3, [fp, #-32]
lsl r3, r3, #2
ldr r0, [fp, #-20]
add r3, r0, r3
ldr r3, [r3]
lsl r3, r3, #2
ldr r0, [fp, #-24]
add r3, r0, r3
mul r2, r1, r2
str r2, [r3]
b .L19
.L18:
ldr r3, [fp, #-32]
lsl r3, r3, #2
ldr r2, [fp, #-20]
add r3, r2, r3
ldr r3, [r3]
lsl r3, r3, #2
ldr r2, [fp, #-24]
add r3, r2, r3
ldr r0, [r3]
ldr r3, [fp, #-32]
add r3, r3, #1
lsl r3, r3, #2
ldr r2, [fp, #-20]
add r3, r2, r3
ldr r3, [r3]
lsl r3, r3, #2
ldr r2, [fp, #-24]
add r3, r2, r3
ldr r1, [r3]
ldr r3, [fp, #-32]
lsl r3, r3, #2
ldr r2, [fp, #-20]
add r3, r2, r3
ldr r3, [r3]
lsl r3, r3, #2
ldr r2, [fp, #-24]
add r4, r2, r3
bl __aeabi_idiv
mov r3, r0
str r3, [r4]
.L19:
ldr r3, [fp, #-32]
lsl r3, r3, #2
ldr r2, [fp, #-20]
add r2, r2, r3
ldr r3, [fp, #-32]
add r3, r3, #1
lsl r3, r3, #2
ldr r1, [fp, #-20]
add r3, r1, r3
ldr r2, [r2]
str r2, [r3]
.L13:
ldr r3, [fp, #-32]
add r3, r3, #1
str r3, [fp, #-32]
.L11:
ldr r2, [fp, #-32]
ldr r3, [fp, #-56]
cmp r2, r3
blt .L20
mov r3, #0
str r3, [fp, #-28]
b .L21
.L30:
ldr r3, [fp, #-28]
lsl r3, r3, #2
ldr r2, [fp, #-48]
add r3, r2, r3
ldr r3, [r3]
ldr r1, .L32+12
mov r0, r3
bl strcmp
mov r3, r0
cmp r3, #0
beq .L24
ldr r3, [fp, #-28]
lsl r3, r3, #2
ldr r2, [fp, #-48]
add r3, r2, r3
ldr r3, [r3]
ldr r1, .L32+16
mov r0, r3
bl strcmp
mov r3, r0
cmp r3, #0
bne .L23
b .L24
.L25:
ldr r3, [fp, #-28]
lsl r3, r3, #2
ldr r2, [fp, #-20]
add r3, r2, r3
ldr r3, [r3]
lsl r3, r3, #2
ldr r2, [fp, #-20]
add r2, r2, r3
ldr r3, [fp, #-28]
lsl r3, r3, #2
ldr r1, [fp, #-20]
add r3, r1, r3
ldr r2, [r2]
str r2, [r3]
.L24:
ldr r3, [fp, #-28]
lsl r3, r3, #2
ldr r2, [fp, #-20]
add r3, r2, r3
ldr r3, [r3]
lsl r3, r3, #2
ldr r2, [fp, #-20]
add r3, r2, r3
ldr r2, [r3]
ldr r3, [fp, #-28]
lsl r3, r3, #2
ldr r1, [fp, #-20]
add r3, r1, r3
ldr r3, [r3]
cmp r2, r3
bne .L25
b .L26
.L27:
ldr r3, [fp, #-28]
add r3, r3, #1
lsl r3, r3, #2
ldr r2, [fp, #-20]
add r3, r2, r3
ldr r3, [r3]
lsl r3, r3, #2
ldr r2, [fp, #-20]
add r2, r2, r3
ldr r3, [fp, #-28]
add r3, r3, #1
lsl r3, r3, #2
ldr r1, [fp, #-20]
add r3, r1, r3
ldr r2, [r2]
str r2, [r3]
.L26:
ldr r3, [fp, #-28]
add r3, r3, #1
lsl r3, r3, #2
ldr r2, [fp, #-20]
add r3, r2, r3
ldr r3, [r3]
lsl r3, r3, #2
ldr r2, [fp, #-20]
add r3, r2, r3
ldr r2, [r3]
ldr r3, [fp, #-28]
add r3, r3, #1
lsl r3, r3, #2
ldr r1, [fp, #-20]
add r3, r1, r3
ldr r3, [r3]
cmp r2, r3
bne .L27
ldr r3, [fp, #-28]
lsl r3, r3, #2
ldr r2, [fp, #-48]
add r3, r2, r3
ldr r3, [r3]
ldr r1, .L32+12
mov r0, r3
bl strcmp
mov r3, r0
cmp r3, #0
bne .L28
ldr r3, [fp, #-28]
lsl r3, r3, #2
ldr r2, [fp, #-20]
add r3, r2, r3
ldr r3, [r3]
lsl r3, r3, #2
ldr r2, [fp, #-24]
add r3, r2, r3
ldr r1, [r3]
ldr r3, [fp, #-28]
add r3, r3, #1
lsl r3, r3, #2
ldr r2, [fp, #-20]
add r3, r2, r3
ldr r3, [r3]
lsl r3, r3, #2
ldr r2, [fp, #-24]
add r3, r2, r3
ldr r2, [r3]
ldr r3, [fp, #-28]
lsl r3, r3, #2
ldr r0, [fp, #-20]
add r3, r0, r3
ldr r3, [r3]
lsl r3, r3, #2
ldr r0, [fp, #-24]
add r3, r0, r3
add r2, r1, r2
str r2, [r3]
b .L29
.L28:
ldr r3, [fp, #-28]
lsl r3, r3, #2
ldr r2, [fp, #-20]
add r3, r2, r3
ldr r3, [r3]
lsl r3, r3, #2
ldr r2, [fp, #-24]
add r3, r2, r3
ldr r1, [r3]
ldr r3, [fp, #-28]
add r3, r3, #1
lsl r3, r3, #2
ldr r2, [fp, #-20]
add r3, r2, r3
ldr r3, [r3]
lsl r3, r3, #2
ldr r2, [fp, #-24]
add r3, r2, r3
ldr r2, [r3]
ldr r3, [fp, #-28]
lsl r3, r3, #2
ldr r0, [fp, #-20]
add r3, r0, r3
ldr r3, [r3]
lsl r3, r3, #2
ldr r0, [fp, #-24]
add r3, r0, r3
sub r2, r1, r2
str r2, [r3]
.L29:
ldr r3, [fp, #-28]
lsl r3, r3, #2
ldr r2, [fp, #-20]
add r2, r2, r3
ldr r3, [fp, #-28]
add r3, r3, #1
lsl r3, r3, #2
ldr r1, [fp, #-20]
add r3, r1, r3
ldr r2, [r2]
str r2, [r3]
.L23:
ldr r3, [fp, #-28]
add r3, r3, #1
str r3, [fp, #-28]
.L21:
ldr r2, [fp, #-28]
ldr r3, [fp, #-56]
cmp r2, r3
blt .L30
ldr r3, [fp, #-24]
ldr r3, [r3]
str r3, [fp, #-16]
ldr r0, [fp, #-24]
bl free
ldr r0, [fp, #-20]
bl free
ldr r3, [fp, #-16]
mov r0, r3
sub sp, fp, #12
@ sp needed
pop {r4, r5, fp, pc}
.L33:
.align 2
.L32:
.word .LC0
.word .LC1
.word .LC2
.word .LC3
.word .LC4
.size func0, .-func0
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",%progbits
|
eval/problem114/code.c | .file "code.c"
.intel_syntax noprefix
.text
.section .rodata
.align 8
.LC0:
.string "the number of odd elements %d in the string %d of the %d input."
.text
.globl func0
.type func0, @function
func0:
.LFB6:
.cfi_startproc
endbr64
push rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
mov rbp, rsp
.cfi_def_cfa_register 6
push rbx
sub rsp, 56
.cfi_offset 3, -24
mov QWORD PTR -56[rbp], rdi
mov DWORD PTR -60[rbp], esi
mov eax, DWORD PTR -60[rbp]
cdqe
sal rax, 3
mov rdi, rax
call malloc@PLT
mov QWORD PTR -24[rbp], rax
mov DWORD PTR -36[rbp], 0
jmp .L2
.L6:
mov DWORD PTR -32[rbp], 0
mov DWORD PTR -28[rbp], 0
jmp .L3
.L5:
mov eax, DWORD PTR -36[rbp]
cdqe
lea rdx, 0[0+rax*8]
mov rax, QWORD PTR -56[rbp]
add rax, rdx
mov rdx, QWORD PTR [rax]
mov eax, DWORD PTR -28[rbp]
cdqe
add rax, rdx
movzx eax, BYTE PTR [rax]
cmp al, 47
jle .L4
mov eax, DWORD PTR -36[rbp]
cdqe
lea rdx, 0[0+rax*8]
mov rax, QWORD PTR -56[rbp]
add rax, rdx
mov rdx, QWORD PTR [rax]
mov eax, DWORD PTR -28[rbp]
cdqe
add rax, rdx
movzx eax, BYTE PTR [rax]
cmp al, 57
jg .L4
mov eax, DWORD PTR -36[rbp]
cdqe
lea rdx, 0[0+rax*8]
mov rax, QWORD PTR -56[rbp]
add rax, rdx
mov rdx, QWORD PTR [rax]
mov eax, DWORD PTR -28[rbp]
cdqe
add rax, rdx
movzx eax, BYTE PTR [rax]
movsx eax, al
lea edx, -48[rax]
mov eax, edx
sar eax, 31
shr eax, 31
add edx, eax
and edx, 1
sub edx, eax
mov eax, edx
cmp eax, 1
jne .L4
add DWORD PTR -32[rbp], 1
.L4:
add DWORD PTR -28[rbp], 1
.L3:
mov eax, DWORD PTR -36[rbp]
cdqe
lea rdx, 0[0+rax*8]
mov rax, QWORD PTR -56[rbp]
add rax, rdx
mov rdx, QWORD PTR [rax]
mov eax, DWORD PTR -28[rbp]
cdqe
add rax, rdx
movzx eax, BYTE PTR [rax]
test al, al
jne .L5
mov eax, DWORD PTR -36[rbp]
cdqe
lea rdx, 0[0+rax*8]
mov rax, QWORD PTR -24[rbp]
lea rbx, [rdx+rax]
mov edi, 100
call malloc@PLT
mov QWORD PTR [rbx], rax
mov eax, DWORD PTR -36[rbp]
cdqe
lea rdx, 0[0+rax*8]
mov rax, QWORD PTR -24[rbp]
add rax, rdx
mov rax, QWORD PTR [rax]
mov esi, DWORD PTR -32[rbp]
mov ecx, DWORD PTR -32[rbp]
mov edx, DWORD PTR -32[rbp]
mov r8d, esi
lea rsi, .LC0[rip]
mov rdi, rax
mov eax, 0
call sprintf@PLT
add DWORD PTR -36[rbp], 1
.L2:
mov eax, DWORD PTR -36[rbp]
cmp eax, DWORD PTR -60[rbp]
jl .L6
mov rax, QWORD PTR -24[rbp]
add rsp, 56
pop rbx
pop rbp
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE6:
.size func0, .-func0
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",@progbits
.section .note.gnu.property,"a"
.align 8
.long 1f - 0f
.long 4f - 1f
.long 5
0:
.string "GNU"
1:
.align 8
.long 0xc0000002
.long 3f - 2f
2:
.long 0x3
3:
.align 8
4:
| .arch armv5t
.eabi_attribute 20, 1
.eabi_attribute 21, 1
.eabi_attribute 23, 3
.eabi_attribute 24, 1
.eabi_attribute 25, 1
.eabi_attribute 26, 2
.eabi_attribute 30, 6
.eabi_attribute 34, 0
.eabi_attribute 18, 4
.file "code.c"
.text
.section .rodata
.align 2
.LC0:
.ascii "the number of odd elements %d in the string %d of t"
.ascii "he %d input.\000"
.text
.align 2
.global func0
.syntax unified
.arm
.fpu softvfp
.type func0, %function
func0:
@ args = 0, pretend = 0, frame = 24
@ frame_needed = 1, uses_anonymous_args = 0
push {r4, fp, lr}
add fp, sp, #8
sub sp, sp, #36
str r0, [fp, #-32]
str r1, [fp, #-36]
ldr r3, [fp, #-36]
lsl r3, r3, #2
mov r0, r3
bl malloc
mov r3, r0
str r3, [fp, #-16]
mov r3, #0
str r3, [fp, #-28]
b .L2
.L6:
mov r3, #0
str r3, [fp, #-24]
mov r3, #0
str r3, [fp, #-20]
b .L3
.L5:
ldr r3, [fp, #-28]
lsl r3, r3, #2
ldr r2, [fp, #-32]
add r3, r2, r3
ldr r2, [r3]
ldr r3, [fp, #-20]
add r3, r2, r3
ldrb r3, [r3] @ zero_extendqisi2
cmp r3, #47
bls .L4
ldr r3, [fp, #-28]
lsl r3, r3, #2
ldr r2, [fp, #-32]
add r3, r2, r3
ldr r2, [r3]
ldr r3, [fp, #-20]
add r3, r2, r3
ldrb r3, [r3] @ zero_extendqisi2
cmp r3, #57
bhi .L4
ldr r3, [fp, #-28]
lsl r3, r3, #2
ldr r2, [fp, #-32]
add r3, r2, r3
ldr r2, [r3]
ldr r3, [fp, #-20]
add r3, r2, r3
ldrb r3, [r3] @ zero_extendqisi2
sub r3, r3, #48
cmp r3, #0
and r3, r3, #1
rsblt r3, r3, #0
cmp r3, #1
bne .L4
ldr r3, [fp, #-24]
add r3, r3, #1
str r3, [fp, #-24]
.L4:
ldr r3, [fp, #-20]
add r3, r3, #1
str r3, [fp, #-20]
.L3:
ldr r3, [fp, #-28]
lsl r3, r3, #2
ldr r2, [fp, #-32]
add r3, r2, r3
ldr r2, [r3]
ldr r3, [fp, #-20]
add r3, r2, r3
ldrb r3, [r3] @ zero_extendqisi2
cmp r3, #0
bne .L5
ldr r3, [fp, #-28]
lsl r3, r3, #2
ldr r2, [fp, #-16]
add r4, r2, r3
mov r0, #100
bl malloc
mov r3, r0
str r3, [r4]
ldr r3, [fp, #-28]
lsl r3, r3, #2
ldr r2, [fp, #-16]
add r3, r2, r3
ldr r0, [r3]
ldr r3, [fp, #-24]
str r3, [sp]
ldr r3, [fp, #-24]
ldr r2, [fp, #-24]
ldr r1, .L8
bl sprintf
ldr r3, [fp, #-28]
add r3, r3, #1
str r3, [fp, #-28]
.L2:
ldr r2, [fp, #-28]
ldr r3, [fp, #-36]
cmp r2, r3
blt .L6
ldr r3, [fp, #-16]
mov r0, r3
sub sp, fp, #8
@ sp needed
pop {r4, fp, pc}
.L9:
.align 2
.L8:
.word .LC0
.size func0, .-func0
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",%progbits
|
eval/problem105/code.c | .file "code.c"
.intel_syntax noprefix
.text
.globl func0
.type func0, @function
func0:
.LFB6:
.cfi_startproc
endbr64
push rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
mov rbp, rsp
.cfi_def_cfa_register 6
sub rsp, 64
mov QWORD PTR -40[rbp], rdi
mov DWORD PTR -44[rbp], esi
mov QWORD PTR -56[rbp], rdx
mov QWORD PTR -64[rbp], rcx
mov eax, DWORD PTR -44[rbp]
cdqe
sal rax, 2
mov rdi, rax
call malloc@PLT
mov rdx, rax
mov rax, QWORD PTR -56[rbp]
mov QWORD PTR [rax], rdx
mov rax, QWORD PTR -64[rbp]
mov DWORD PTR [rax], 0
mov DWORD PTR -20[rbp], 0
jmp .L2
.L9:
mov eax, DWORD PTR -20[rbp]
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -40[rbp]
add rax, rdx
mov eax, DWORD PTR [rax]
mov DWORD PTR -16[rbp], eax
mov BYTE PTR -21[rbp], 0
cmp DWORD PTR -16[rbp], 0
jne .L4
mov BYTE PTR -21[rbp], 1
jmp .L4
.L7:
mov eax, DWORD PTR -16[rbp]
and eax, 1
test eax, eax
jne .L5
mov BYTE PTR -21[rbp], 1
.L5:
mov eax, DWORD PTR -16[rbp]
movsx rdx, eax
imul rdx, rdx, 1717986919
shr rdx, 32
sar edx, 2
sar eax, 31
sub edx, eax
mov eax, edx
mov DWORD PTR -16[rbp], eax
.L4:
cmp DWORD PTR -16[rbp], 0
jle .L6
movzx eax, BYTE PTR -21[rbp]
xor eax, 1
test al, al
jne .L7
.L6:
movzx eax, BYTE PTR -21[rbp]
xor eax, 1
test al, al
je .L8
mov eax, DWORD PTR -20[rbp]
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -40[rbp]
lea rcx, [rdx+rax]
mov rax, QWORD PTR -56[rbp]
mov rdx, QWORD PTR [rax]
mov rax, QWORD PTR -64[rbp]
mov eax, DWORD PTR [rax]
cdqe
sal rax, 2
add rdx, rax
mov eax, DWORD PTR [rcx]
mov DWORD PTR [rdx], eax
mov rax, QWORD PTR -64[rbp]
mov eax, DWORD PTR [rax]
lea edx, 1[rax]
mov rax, QWORD PTR -64[rbp]
mov DWORD PTR [rax], edx
.L8:
add DWORD PTR -20[rbp], 1
.L2:
mov eax, DWORD PTR -20[rbp]
cmp eax, DWORD PTR -44[rbp]
jl .L9
mov DWORD PTR -12[rbp], 0
jmp .L10
.L14:
mov DWORD PTR -8[rbp], 0
jmp .L11
.L13:
mov rax, QWORD PTR -56[rbp]
mov rax, QWORD PTR [rax]
mov edx, DWORD PTR -8[rbp]
movsx rdx, edx
sal rdx, 2
add rax, rdx
mov edx, DWORD PTR [rax]
mov rax, QWORD PTR -56[rbp]
mov rax, QWORD PTR [rax]
mov ecx, DWORD PTR -8[rbp]
movsx rcx, ecx
add rcx, 1
sal rcx, 2
add rax, rcx
mov eax, DWORD PTR [rax]
cmp edx, eax
jle .L12
mov rax, QWORD PTR -56[rbp]
mov rax, QWORD PTR [rax]
mov edx, DWORD PTR -8[rbp]
movsx rdx, edx
sal rdx, 2
add rax, rdx
mov eax, DWORD PTR [rax]
mov DWORD PTR -4[rbp], eax
mov rax, QWORD PTR -56[rbp]
mov rax, QWORD PTR [rax]
mov edx, DWORD PTR -8[rbp]
movsx rdx, edx
add rdx, 1
sal rdx, 2
lea rcx, [rax+rdx]
mov rax, QWORD PTR -56[rbp]
mov rax, QWORD PTR [rax]
mov edx, DWORD PTR -8[rbp]
movsx rdx, edx
sal rdx, 2
add rdx, rax
mov eax, DWORD PTR [rcx]
mov DWORD PTR [rdx], eax
mov rax, QWORD PTR -56[rbp]
mov rax, QWORD PTR [rax]
mov edx, DWORD PTR -8[rbp]
movsx rdx, edx
add rdx, 1
sal rdx, 2
add rdx, rax
mov eax, DWORD PTR -4[rbp]
mov DWORD PTR [rdx], eax
.L12:
add DWORD PTR -8[rbp], 1
.L11:
mov rax, QWORD PTR -64[rbp]
mov eax, DWORD PTR [rax]
sub eax, DWORD PTR -12[rbp]
sub eax, 1
cmp DWORD PTR -8[rbp], eax
jl .L13
add DWORD PTR -12[rbp], 1
.L10:
mov rax, QWORD PTR -64[rbp]
mov eax, DWORD PTR [rax]
sub eax, 1
cmp DWORD PTR -12[rbp], eax
jl .L14
nop
nop
leave
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE6:
.size func0, .-func0
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",@progbits
.section .note.gnu.property,"a"
.align 8
.long 1f - 0f
.long 4f - 1f
.long 5
0:
.string "GNU"
1:
.align 8
.long 0xc0000002
.long 3f - 2f
2:
.long 0x3
3:
.align 8
4:
| .arch armv5t
.eabi_attribute 20, 1
.eabi_attribute 21, 1
.eabi_attribute 23, 3
.eabi_attribute 24, 1
.eabi_attribute 25, 1
.eabi_attribute 26, 2
.eabi_attribute 30, 6
.eabi_attribute 34, 0
.eabi_attribute 18, 4
.file "code.c"
.text
.align 2
.global func0
.syntax unified
.arm
.fpu softvfp
.type func0, %function
func0:
@ args = 0, pretend = 0, frame = 40
@ frame_needed = 1, uses_anonymous_args = 0
push {fp, lr}
add fp, sp, #4
sub sp, sp, #40
str r0, [fp, #-32]
str r1, [fp, #-36]
str r2, [fp, #-40]
str r3, [fp, #-44]
ldr r3, [fp, #-36]
lsl r3, r3, #2
mov r0, r3
bl malloc
mov r3, r0
mov r2, r3
ldr r3, [fp, #-40]
str r2, [r3]
ldr r3, [fp, #-44]
mov r2, #0
str r2, [r3]
mov r3, #0
str r3, [fp, #-24]
b .L2
.L9:
ldr r3, [fp, #-24]
lsl r3, r3, #2
ldr r2, [fp, #-32]
add r3, r2, r3
ldr r3, [r3]
str r3, [fp, #-20]
mov r3, #0
strb r3, [fp, #-25]
ldr r3, [fp, #-20]
cmp r3, #0
bne .L4
mov r3, #1
strb r3, [fp, #-25]
b .L4
.L7:
ldr r3, [fp, #-20]
and r3, r3, #1
cmp r3, #0
bne .L5
mov r3, #1
strb r3, [fp, #-25]
.L5:
ldr r3, [fp, #-20]
ldr r2, .L15
smull r1, r2, r3, r2
asr r2, r2, #2
asr r3, r3, #31
sub r3, r2, r3
str r3, [fp, #-20]
.L4:
ldr r3, [fp, #-20]
cmp r3, #0
ble .L6
ldrb r3, [fp, #-25]
eor r3, r3, #1
and r3, r3, #255
cmp r3, #0
bne .L7
.L6:
ldrb r3, [fp, #-25]
eor r3, r3, #1
and r3, r3, #255
cmp r3, #0
beq .L8
ldr r3, [fp, #-24]
lsl r3, r3, #2
ldr r2, [fp, #-32]
add r2, r2, r3
ldr r3, [fp, #-40]
ldr r1, [r3]
ldr r3, [fp, #-44]
ldr r3, [r3]
lsl r3, r3, #2
add r3, r1, r3
ldr r2, [r2]
str r2, [r3]
ldr r3, [fp, #-44]
ldr r3, [r3]
add r2, r3, #1
ldr r3, [fp, #-44]
str r2, [r3]
.L8:
ldr r3, [fp, #-24]
add r3, r3, #1
str r3, [fp, #-24]
.L2:
ldr r2, [fp, #-24]
ldr r3, [fp, #-36]
cmp r2, r3
blt .L9
mov r3, #0
str r3, [fp, #-16]
b .L10
.L14:
mov r3, #0
str r3, [fp, #-12]
b .L11
.L13:
ldr r3, [fp, #-40]
ldr r2, [r3]
ldr r3, [fp, #-12]
lsl r3, r3, #2
add r3, r2, r3
ldr r2, [r3]
ldr r3, [fp, #-40]
ldr r1, [r3]
ldr r3, [fp, #-12]
add r3, r3, #1
lsl r3, r3, #2
add r3, r1, r3
ldr r3, [r3]
cmp r2, r3
ble .L12
ldr r3, [fp, #-40]
ldr r2, [r3]
ldr r3, [fp, #-12]
lsl r3, r3, #2
add r3, r2, r3
ldr r3, [r3]
str r3, [fp, #-8]
ldr r3, [fp, #-40]
ldr r2, [r3]
ldr r3, [fp, #-12]
add r3, r3, #1
lsl r3, r3, #2
add r2, r2, r3
ldr r3, [fp, #-40]
ldr r1, [r3]
ldr r3, [fp, #-12]
lsl r3, r3, #2
add r3, r1, r3
ldr r2, [r2]
str r2, [r3]
ldr r3, [fp, #-40]
ldr r2, [r3]
ldr r3, [fp, #-12]
add r3, r3, #1
lsl r3, r3, #2
add r3, r2, r3
ldr r2, [fp, #-8]
str r2, [r3]
.L12:
ldr r3, [fp, #-12]
add r3, r3, #1
str r3, [fp, #-12]
.L11:
ldr r3, [fp, #-44]
ldr r2, [r3]
ldr r3, [fp, #-16]
sub r3, r2, r3
sub r3, r3, #1
ldr r2, [fp, #-12]
cmp r2, r3
blt .L13
ldr r3, [fp, #-16]
add r3, r3, #1
str r3, [fp, #-16]
.L10:
ldr r3, [fp, #-44]
ldr r3, [r3]
sub r3, r3, #1
ldr r2, [fp, #-16]
cmp r2, r3
blt .L14
nop
nop
sub sp, fp, #4
@ sp needed
pop {fp, pc}
.L16:
.align 2
.L15:
.word 1717986919
.size func0, .-func0
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",%progbits
|
eval/problem113/code.c | .file "code.c"
.intel_syntax noprefix
.text
.section .rodata
.LC0:
.string "True"
.LC1:
.string "False"
.text
.globl func0
.type func0, @function
func0:
.LFB6:
.cfi_startproc
endbr64
push rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
mov rbp, rsp
.cfi_def_cfa_register 6
sub rsp, 80
mov QWORD PTR -56[rbp], rdi
mov QWORD PTR -64[rbp], rsi
mov QWORD PTR -72[rbp], rdx
mov QWORD PTR -80[rbp], rcx
mov rax, QWORD PTR -56[rbp]
mov rdi, rax
call strlen@PLT
mov DWORD PTR -24[rbp], eax
mov eax, DWORD PTR -24[rbp]
add eax, 1
cdqe
mov rdi, rax
call malloc@PLT
mov QWORD PTR -8[rbp], rax
mov DWORD PTR -36[rbp], 0
mov DWORD PTR -32[rbp], 0
jmp .L2
.L8:
mov rax, QWORD PTR -64[rbp]
mov QWORD PTR -16[rbp], rax
mov BYTE PTR -38[rbp], 0
jmp .L3
.L6:
mov eax, DWORD PTR -32[rbp]
movsx rdx, eax
mov rax, QWORD PTR -56[rbp]
add rax, rdx
movzx edx, BYTE PTR [rax]
mov rax, QWORD PTR -16[rbp]
movzx eax, BYTE PTR [rax]
cmp dl, al
jne .L4
mov BYTE PTR -38[rbp], 1
jmp .L5
.L4:
add QWORD PTR -16[rbp], 1
.L3:
mov rax, QWORD PTR -16[rbp]
movzx eax, BYTE PTR [rax]
test al, al
jne .L6
.L5:
movzx eax, BYTE PTR -38[rbp]
xor eax, 1
test al, al
je .L7
mov eax, DWORD PTR -32[rbp]
movsx rdx, eax
mov rax, QWORD PTR -56[rbp]
lea rcx, [rdx+rax]
mov eax, DWORD PTR -36[rbp]
lea edx, 1[rax]
mov DWORD PTR -36[rbp], edx
movsx rdx, eax
mov rax, QWORD PTR -8[rbp]
add rdx, rax
movzx eax, BYTE PTR [rcx]
mov BYTE PTR [rdx], al
.L7:
add DWORD PTR -32[rbp], 1
.L2:
mov eax, DWORD PTR -32[rbp]
movsx rdx, eax
mov rax, QWORD PTR -56[rbp]
add rax, rdx
movzx eax, BYTE PTR [rax]
test al, al
jne .L8
mov eax, DWORD PTR -36[rbp]
movsx rdx, eax
mov rax, QWORD PTR -8[rbp]
add rax, rdx
mov BYTE PTR [rax], 0
mov rax, QWORD PTR -8[rbp]
mov rdi, rax
call strlen@PLT
mov DWORD PTR -20[rbp], eax
mov BYTE PTR -37[rbp], 1
mov DWORD PTR -28[rbp], 0
jmp .L9
.L12:
mov eax, DWORD PTR -28[rbp]
movsx rdx, eax
mov rax, QWORD PTR -8[rbp]
add rax, rdx
movzx edx, BYTE PTR [rax]
mov eax, DWORD PTR -20[rbp]
sub eax, 1
sub eax, DWORD PTR -28[rbp]
movsx rcx, eax
mov rax, QWORD PTR -8[rbp]
add rax, rcx
movzx eax, BYTE PTR [rax]
cmp dl, al
je .L10
mov BYTE PTR -37[rbp], 0
jmp .L11
.L10:
add DWORD PTR -28[rbp], 1
.L9:
mov eax, DWORD PTR -20[rbp]
mov edx, eax
shr edx, 31
add eax, edx
sar eax
cmp DWORD PTR -28[rbp], eax
jl .L12
.L11:
mov rdx, QWORD PTR -8[rbp]
mov rax, QWORD PTR -72[rbp]
mov rsi, rdx
mov rdi, rax
call strcpy@PLT
cmp BYTE PTR -37[rbp], 0
je .L13
lea rax, .LC0[rip]
jmp .L14
.L13:
lea rax, .LC1[rip]
.L14:
mov rdx, QWORD PTR -80[rbp]
mov rsi, rax
mov rdi, rdx
call strcpy@PLT
mov rax, QWORD PTR -8[rbp]
mov rdi, rax
call free@PLT
nop
leave
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE6:
.size func0, .-func0
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",@progbits
.section .note.gnu.property,"a"
.align 8
.long 1f - 0f
.long 4f - 1f
.long 5
0:
.string "GNU"
1:
.align 8
.long 0xc0000002
.long 3f - 2f
2:
.long 0x3
3:
.align 8
4:
| .arch armv5t
.eabi_attribute 20, 1
.eabi_attribute 21, 1
.eabi_attribute 23, 3
.eabi_attribute 24, 1
.eabi_attribute 25, 1
.eabi_attribute 26, 2
.eabi_attribute 30, 6
.eabi_attribute 34, 0
.eabi_attribute 18, 4
.file "code.c"
.text
.section .rodata
.align 2
.LC0:
.ascii "True\000"
.align 2
.LC1:
.ascii "False\000"
.text
.align 2
.global func0
.syntax unified
.arm
.fpu softvfp
.type func0, %function
func0:
@ args = 0, pretend = 0, frame = 48
@ frame_needed = 1, uses_anonymous_args = 0
push {fp, lr}
add fp, sp, #4
sub sp, sp, #48
str r0, [fp, #-40]
str r1, [fp, #-44]
str r2, [fp, #-48]
str r3, [fp, #-52]
ldr r0, [fp, #-40]
bl strlen
mov r3, r0
str r3, [fp, #-16]
ldr r3, [fp, #-16]
add r3, r3, #1
mov r0, r3
bl malloc
mov r3, r0
str r3, [fp, #-12]
mov r3, #0
str r3, [fp, #-32]
mov r3, #0
str r3, [fp, #-28]
b .L2
.L8:
ldr r3, [fp, #-44]
str r3, [fp, #-24]
mov r3, #0
strb r3, [fp, #-34]
b .L3
.L6:
ldr r3, [fp, #-28]
ldr r2, [fp, #-40]
add r3, r2, r3
ldrb r2, [r3] @ zero_extendqisi2
ldr r3, [fp, #-24]
ldrb r3, [r3] @ zero_extendqisi2
cmp r2, r3
bne .L4
mov r3, #1
strb r3, [fp, #-34]
b .L5
.L4:
ldr r3, [fp, #-24]
add r3, r3, #1
str r3, [fp, #-24]
.L3:
ldr r3, [fp, #-24]
ldrb r3, [r3] @ zero_extendqisi2
cmp r3, #0
bne .L6
.L5:
ldrb r3, [fp, #-34]
eor r3, r3, #1
and r3, r3, #255
cmp r3, #0
beq .L7
ldr r3, [fp, #-28]
ldr r2, [fp, #-40]
add r2, r2, r3
ldr r3, [fp, #-32]
add r1, r3, #1
str r1, [fp, #-32]
mov r1, r3
ldr r3, [fp, #-12]
add r3, r3, r1
ldrb r2, [r2] @ zero_extendqisi2
strb r2, [r3]
.L7:
ldr r3, [fp, #-28]
add r3, r3, #1
str r3, [fp, #-28]
.L2:
ldr r3, [fp, #-28]
ldr r2, [fp, #-40]
add r3, r2, r3
ldrb r3, [r3] @ zero_extendqisi2
cmp r3, #0
bne .L8
ldr r3, [fp, #-32]
ldr r2, [fp, #-12]
add r3, r2, r3
mov r2, #0
strb r2, [r3]
ldr r0, [fp, #-12]
bl strlen
mov r3, r0
str r3, [fp, #-8]
mov r3, #1
strb r3, [fp, #-33]
mov r3, #0
str r3, [fp, #-20]
b .L9
.L12:
ldr r3, [fp, #-20]
ldr r2, [fp, #-12]
add r3, r2, r3
ldrb r2, [r3] @ zero_extendqisi2
ldr r3, [fp, #-8]
sub r1, r3, #1
ldr r3, [fp, #-20]
sub r3, r1, r3
mov r1, r3
ldr r3, [fp, #-12]
add r3, r3, r1
ldrb r3, [r3] @ zero_extendqisi2
cmp r2, r3
beq .L10
mov r3, #0
strb r3, [fp, #-33]
b .L11
.L10:
ldr r3, [fp, #-20]
add r3, r3, #1
str r3, [fp, #-20]
.L9:
ldr r3, [fp, #-8]
lsr r2, r3, #31
add r3, r2, r3
asr r3, r3, #1
mov r2, r3
ldr r3, [fp, #-20]
cmp r3, r2
blt .L12
.L11:
ldr r1, [fp, #-12]
ldr r0, [fp, #-48]
bl strcpy
ldrb r3, [fp, #-33] @ zero_extendqisi2
cmp r3, #0
beq .L13
ldr r3, .L15
b .L14
.L13:
ldr r3, .L15+4
.L14:
mov r1, r3
ldr r0, [fp, #-52]
bl strcpy
ldr r0, [fp, #-12]
bl free
nop
sub sp, fp, #4
@ sp needed
pop {fp, pc}
.L16:
.align 2
.L15:
.word .LC0
.word .LC1
.size func0, .-func0
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",%progbits
|
eval/problem108/code.c | .file "code.c"
.intel_syntax noprefix
.text
.globl func0
.type func0, @function
func0:
.LFB6:
.cfi_startproc
endbr64
push rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
mov rbp, rsp
.cfi_def_cfa_register 6
sub rsp, 48
mov DWORD PTR -36[rbp], edi
mov edi, 8
call malloc@PLT
mov QWORD PTR -8[rbp], rax
mov rax, QWORD PTR -8[rbp]
mov DWORD PTR [rax], 0
mov rax, QWORD PTR -8[rbp]
add rax, 4
mov DWORD PTR [rax], 0
mov DWORD PTR -24[rbp], 1
jmp .L2
.L7:
mov DWORD PTR -20[rbp], 0
mov eax, DWORD PTR -24[rbp]
mov DWORD PTR -12[rbp], eax
mov eax, DWORD PTR -24[rbp]
mov DWORD PTR -16[rbp], eax
jmp .L3
.L4:
mov edx, DWORD PTR -20[rbp]
mov eax, edx
sal eax, 2
add eax, edx
add eax, eax
mov esi, eax
mov ecx, DWORD PTR -16[rbp]
movsx rax, ecx
imul rax, rax, 1717986919
shr rax, 32
mov edx, eax
sar edx, 2
mov eax, ecx
sar eax, 31
sub edx, eax
mov eax, edx
sal eax, 2
add eax, edx
add eax, eax
sub ecx, eax
mov edx, ecx
lea eax, [rsi+rdx]
mov DWORD PTR -20[rbp], eax
mov eax, DWORD PTR -16[rbp]
movsx rdx, eax
imul rdx, rdx, 1717986919
shr rdx, 32
sar edx, 2
sar eax, 31
sub edx, eax
mov eax, edx
mov DWORD PTR -16[rbp], eax
.L3:
cmp DWORD PTR -16[rbp], 0
jne .L4
mov eax, DWORD PTR -12[rbp]
cmp eax, DWORD PTR -20[rbp]
jne .L5
mov eax, DWORD PTR -12[rbp]
and eax, 1
test eax, eax
jne .L6
mov rax, QWORD PTR -8[rbp]
mov eax, DWORD PTR [rax]
lea edx, 1[rax]
mov rax, QWORD PTR -8[rbp]
mov DWORD PTR [rax], edx
jmp .L5
.L6:
mov rax, QWORD PTR -8[rbp]
add rax, 4
mov edx, DWORD PTR [rax]
add edx, 1
mov DWORD PTR [rax], edx
.L5:
add DWORD PTR -24[rbp], 1
.L2:
mov eax, DWORD PTR -24[rbp]
cmp eax, DWORD PTR -36[rbp]
jle .L7
mov rax, QWORD PTR -8[rbp]
leave
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE6:
.size func0, .-func0
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",@progbits
.section .note.gnu.property,"a"
.align 8
.long 1f - 0f
.long 4f - 1f
.long 5
0:
.string "GNU"
1:
.align 8
.long 0xc0000002
.long 3f - 2f
2:
.long 0x3
3:
.align 8
4:
| .arch armv5t
.eabi_attribute 20, 1
.eabi_attribute 21, 1
.eabi_attribute 23, 3
.eabi_attribute 24, 1
.eabi_attribute 25, 1
.eabi_attribute 26, 2
.eabi_attribute 30, 6
.eabi_attribute 34, 0
.eabi_attribute 18, 4
.file "code.c"
.text
.align 2
.global func0
.syntax unified
.arm
.fpu softvfp
.type func0, %function
func0:
@ args = 0, pretend = 0, frame = 32
@ frame_needed = 1, uses_anonymous_args = 0
push {fp, lr}
add fp, sp, #4
sub sp, sp, #32
str r0, [fp, #-32]
mov r0, #8
bl malloc
mov r3, r0
str r3, [fp, #-12]
ldr r3, [fp, #-12]
mov r2, #0
str r2, [r3]
ldr r3, [fp, #-12]
add r3, r3, #4
mov r2, #0
str r2, [r3]
mov r3, #1
str r3, [fp, #-24]
b .L2
.L7:
mov r3, #0
str r3, [fp, #-20]
ldr r3, [fp, #-24]
str r3, [fp, #-8]
ldr r3, [fp, #-24]
str r3, [fp, #-16]
b .L3
.L4:
ldr r2, [fp, #-20]
mov r3, r2
lsl r3, r3, #2
add r3, r3, r2
lsl r3, r3, #1
mov r0, r3
ldr r1, [fp, #-16]
ldr r3, .L9
smull r2, r3, r1, r3
asr r2, r3, #2
asr r3, r1, #31
sub r2, r2, r3
mov r3, r2
lsl r3, r3, #2
add r3, r3, r2
lsl r3, r3, #1
sub r2, r1, r3
add r3, r0, r2
str r3, [fp, #-20]
ldr r3, [fp, #-16]
ldr r2, .L9
smull r1, r2, r3, r2
asr r2, r2, #2
asr r3, r3, #31
sub r3, r2, r3
str r3, [fp, #-16]
.L3:
ldr r3, [fp, #-16]
cmp r3, #0
bne .L4
ldr r2, [fp, #-8]
ldr r3, [fp, #-20]
cmp r2, r3
bne .L5
ldr r3, [fp, #-8]
and r3, r3, #1
cmp r3, #0
bne .L6
ldr r3, [fp, #-12]
ldr r3, [r3]
add r2, r3, #1
ldr r3, [fp, #-12]
str r2, [r3]
b .L5
.L6:
ldr r3, [fp, #-12]
add r3, r3, #4
ldr r2, [r3]
add r2, r2, #1
str r2, [r3]
.L5:
ldr r3, [fp, #-24]
add r3, r3, #1
str r3, [fp, #-24]
.L2:
ldr r2, [fp, #-24]
ldr r3, [fp, #-32]
cmp r2, r3
ble .L7
ldr r3, [fp, #-12]
mov r0, r3
sub sp, fp, #4
@ sp needed
pop {fp, pc}
.L10:
.align 2
.L9:
.word 1717986919
.size func0, .-func0
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",%progbits
|
eval/problem83/code.c | .file "code.c"
.intel_syntax noprefix
.text
.globl func0
.type func0, @function
func0:
.LFB0:
.cfi_startproc
endbr64
push rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
mov rbp, rsp
.cfi_def_cfa_register 6
sub rsp, 32
mov QWORD PTR -24[rbp], rdi
mov rax, QWORD PTR -24[rbp]
mov rdi, rax
call strlen@PLT
mov DWORD PTR -4[rbp], eax
cmp DWORD PTR -4[rbp], 1
jg .L2
mov eax, 0
jmp .L3
.L2:
mov DWORD PTR -8[rbp], 2
jmp .L4
.L6:
mov eax, DWORD PTR -4[rbp]
cdq
idiv DWORD PTR -8[rbp]
mov eax, edx
test eax, eax
jne .L5
mov eax, 0
jmp .L3
.L5:
add DWORD PTR -8[rbp], 1
.L4:
mov eax, DWORD PTR -8[rbp]
imul eax, eax
cmp DWORD PTR -4[rbp], eax
jge .L6
mov eax, 1
.L3:
leave
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE0:
.size func0, .-func0
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",@progbits
.section .note.gnu.property,"a"
.align 8
.long 1f - 0f
.long 4f - 1f
.long 5
0:
.string "GNU"
1:
.align 8
.long 0xc0000002
.long 3f - 2f
2:
.long 0x3
3:
.align 8
4:
| .arch armv5t
.eabi_attribute 20, 1
.eabi_attribute 21, 1
.eabi_attribute 23, 3
.eabi_attribute 24, 1
.eabi_attribute 25, 1
.eabi_attribute 26, 2
.eabi_attribute 30, 6
.eabi_attribute 34, 0
.eabi_attribute 18, 4
.file "code.c"
.text
.global __aeabi_idivmod
.align 2
.global func0
.syntax unified
.arm
.fpu softvfp
.type func0, %function
func0:
@ args = 0, pretend = 0, frame = 16
@ frame_needed = 1, uses_anonymous_args = 0
push {fp, lr}
add fp, sp, #4
sub sp, sp, #16
str r0, [fp, #-16]
ldr r0, [fp, #-16]
bl strlen
mov r3, r0
str r3, [fp, #-8]
ldr r3, [fp, #-8]
cmp r3, #1
bgt .L2
mov r3, #0
b .L3
.L2:
mov r3, #2
str r3, [fp, #-12]
b .L4
.L6:
ldr r3, [fp, #-8]
ldr r1, [fp, #-12]
mov r0, r3
bl __aeabi_idivmod
mov r3, r1
cmp r3, #0
bne .L5
mov r3, #0
b .L3
.L5:
ldr r3, [fp, #-12]
add r3, r3, #1
str r3, [fp, #-12]
.L4:
ldr r3, [fp, #-12]
mov r2, r3
mul r2, r3, r2
mov r3, r2
ldr r2, [fp, #-8]
cmp r2, r3
bge .L6
mov r3, #1
.L3:
mov r0, r3
sub sp, fp, #4
@ sp needed
pop {fp, pc}
.size func0, .-func0
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",%progbits
|