ASM Long
Collection
Neural Long Context Assembly Transpilation
•
19 items
•
Updated
x86
stringlengths 322
23.7M
| arm
stringlengths 336
24.4M
|
---|---|
.file "378679.c"
.intel_syntax noprefix
.text
.section .rodata
.align 8
.LC0:
.string "\nCalculadora de funcao de segundo grau"
.align 8
.LC1:
.string "\n(Considere a equacao como ax2 + bx + c = y)"
.LC2:
.string "\nDigite o (a) da equacao: "
.LC3:
.string "%lf"
.LC4:
.string "\nDigite o (b) da equacao: "
.LC5:
.string "\nDigite o (c) da equacao: "
.LC6:
.string "\nDigite o (x) da equacao: "
.LC8:
.string "\nPara essa equacao o Y e %f\n"
.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, 48
mov rax, QWORD PTR fs:40
mov QWORD PTR -8[rbp], rax
xor eax, eax
lea rdi, .LC0[rip]
mov eax, 0
call printf@PLT
lea rdi, .LC1[rip]
mov eax, 0
call printf@PLT
lea rdi, .LC2[rip]
mov eax, 0
call printf@PLT
lea rax, -48[rbp]
mov rsi, rax
lea rdi, .LC3[rip]
mov eax, 0
call __isoc99_scanf@PLT
lea rdi, .LC4[rip]
mov eax, 0
call printf@PLT
lea rax, -40[rbp]
mov rsi, rax
lea rdi, .LC3[rip]
mov eax, 0
call __isoc99_scanf@PLT
lea rdi, .LC5[rip]
mov eax, 0
call printf@PLT
lea rax, -32[rbp]
mov rsi, rax
lea rdi, .LC3[rip]
mov eax, 0
call __isoc99_scanf@PLT
lea rdi, .LC6[rip]
mov eax, 0
call printf@PLT
lea rax, -24[rbp]
mov rsi, rax
lea rdi, .LC3[rip]
mov eax, 0
call __isoc99_scanf@PLT
mov rax, QWORD PTR -24[rbp]
movsd xmm0, QWORD PTR .LC7[rip]
movapd xmm1, xmm0
movq xmm0, rax
call pow@PLT
movsd xmm1, QWORD PTR -48[rbp]
mulsd xmm1, xmm0
movsd xmm2, QWORD PTR -40[rbp]
movsd xmm0, QWORD PTR -24[rbp]
mulsd xmm0, xmm2
addsd xmm1, xmm0
movsd xmm0, QWORD PTR -32[rbp]
addsd xmm0, xmm1
movsd QWORD PTR -16[rbp], xmm0
mov rax, QWORD PTR -16[rbp]
movq xmm0, rax
lea rdi, .LC8[rip]
mov eax, 1
call printf@PLT
mov eax, 0
mov rdx, QWORD PTR -8[rbp]
sub rdx, QWORD PTR fs:40
je .L3
call __stack_chk_fail@PLT
.L3:
leave
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE6:
.size main, .-main
.section .rodata
.align 8
.LC7:
.long 0
.long 1073741824
.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 "378679.c"
.text
.section .rodata
.align 2
.LC0:
.ascii "\012Calculadora de funcao de segundo grau\000"
.align 2
.LC1:
.ascii "\012(Considere a equacao como ax2 + bx + c = y)\000"
.align 2
.LC2:
.ascii "\012Digite o (a) da equacao: \000"
.align 2
.LC3:
.ascii "%lf\000"
.align 2
.LC4:
.ascii "\012Digite o (b) da equacao: \000"
.align 2
.LC5:
.ascii "\012Digite o (c) da equacao: \000"
.align 2
.LC6:
.ascii "\012Digite o (x) da equacao: \000"
.global __aeabi_dmul
.global __aeabi_dadd
.align 2
.LC7:
.ascii "\012Para essa equacao o Y e %f\012\000"
.align 2
.LC8:
.word __stack_chk_guard
.text
.align 2
.global main
.syntax unified
.arm
.fpu softvfp
.type main, %function
main:
@ args = 0, pretend = 0, frame = 48
@ frame_needed = 1, uses_anonymous_args = 0
push {r4, r5, fp, lr}
add fp, sp, #12
sub sp, sp, #48
ldr r3, .L4
ldr r3, [r3]
str r3, [fp, #-16]
mov r3,#0
ldr r0, .L4+4
bl printf
ldr r0, .L4+8
bl printf
ldr r0, .L4+12
bl printf
sub r3, fp, #60
mov r1, r3
ldr r0, .L4+16
bl __isoc99_scanf
ldr r0, .L4+20
bl printf
sub r3, fp, #52
mov r1, r3
ldr r0, .L4+16
bl __isoc99_scanf
ldr r0, .L4+24
bl printf
sub r3, fp, #44
mov r1, r3
ldr r0, .L4+16
bl __isoc99_scanf
ldr r0, .L4+28
bl printf
sub r3, fp, #36
mov r1, r3
ldr r0, .L4+16
bl __isoc99_scanf
sub r1, fp, #36
ldmia r1, {r0-r1}
mov r2, #0
mov r3, #1073741824
bl pow
sub r3, fp, #60
ldmia r3, {r2-r3}
bl __aeabi_dmul
mov r2, r0
mov r3, r1
mov r4, r2
mov r5, r3
sub r1, fp, #52
ldmia r1, {r0-r1}
sub r3, fp, #36
ldmia r3, {r2-r3}
bl __aeabi_dmul
mov r2, r0
mov r3, r1
mov r0, r4
mov r1, r5
bl __aeabi_dadd
mov r2, r0
mov r3, r1
mov r0, r2
mov r1, r3
sub r3, fp, #44
ldmia r3, {r2-r3}
bl __aeabi_dadd
mov r2, r0
mov r3, r1
str r2, [fp, #-28]
str r3, [fp, #-24]
sub r3, fp, #28
ldmia r3, {r2-r3}
ldr r0, .L4+32
bl printf
mov r3, #0
ldr r2, .L4
ldr r1, [r2]
ldr r2, [fp, #-16]
eors r1, r2, r1
mov r2, #0
beq .L3
bl __stack_chk_fail
.L3:
mov r0, r3
sub sp, fp, #12
@ sp needed
pop {r4, r5, fp, pc}
.L5:
.align 2
.L4:
.word .LC8
.word .LC0
.word .LC1
.word .LC2
.word .LC3
.word .LC4
.word .LC5
.word .LC6
.word .LC7
.size main, .-main
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",%progbits
|
.file "720191.c"
.intel_syntax noprefix
.text
.globl global_x
.bss
.align 32
.type global_x, @object
.size global_x, 48
global_x:
.zero 48
.globl global_retval
.align 4
.type global_retval, @object
.size global_retval, 4
global_retval:
.zero 4
.globl global_f
.align 8
.type global_f, @object
.size global_f, 8
global_f:
.zero 8
.globl global_grad
.align 32
.type global_grad, @object
.size global_grad, 48
global_grad:
.zero 48
.section .rodata
.LC0:
.string "r"
.LC1:
.string "x.in"
.LC3:
.string "%lf,"
.LC4:
.string "w"
.LC5:
.string "g.out"
.LC6:
.string "%d\n"
.LC7:
.string "%.17g\n"
.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, 160
mov rax, QWORD PTR fs:40
mov QWORD PTR -8[rbp], rax
xor eax, eax
lea rsi, .LC0[rip]
lea rdi, .LC1[rip]
call fopen@PLT
mov QWORD PTR -128[rbp], rax
pxor xmm0, xmm0
movsd QWORD PTR -136[rbp], xmm0
mov DWORD PTR -152[rbp], 0
jmp .L2
.L3:
mov eax, DWORD PTR -152[rbp]
lea edx, 1[rax]
mov DWORD PTR -152[rbp], edx
movsd xmm0, QWORD PTR -136[rbp]
cdqe
lea rdx, 0[0+rax*8]
lea rax, global_x[rip]
movsd QWORD PTR [rdx+rax], xmm0
.L2:
lea rdx, -136[rbp]
mov rax, QWORD PTR -128[rbp]
lea rsi, .LC3[rip]
mov rdi, rax
mov eax, 0
call __isoc99_fscanf@PLT
test eax, eax
jg .L3
mov rax, QWORD PTR -128[rbp]
mov rdi, rax
call fclose@PLT
mov DWORD PTR -152[rbp], 0
jmp .L4
.L5:
mov eax, DWORD PTR -152[rbp]
cdqe
lea rdx, 0[0+rax*8]
lea rax, global_x[rip]
movsd xmm0, QWORD PTR [rdx+rax]
mov eax, DWORD PTR -152[rbp]
cdqe
movsd QWORD PTR -112[rbp+rax*8], xmm0
add DWORD PTR -152[rbp], 1
.L4:
cmp DWORD PTR -152[rbp], 5
jle .L5
movsd xmm0, QWORD PTR -104[rbp]
movsd xmm2, QWORD PTR -112[rbp]
movapd xmm1, xmm0
subsd xmm1, xmm2
movsd xmm0, QWORD PTR -72[rbp]
movsd xmm2, QWORD PTR -88[rbp]
subsd xmm0, xmm2
mulsd xmm0, xmm1
movsd xmm1, QWORD PTR -80[rbp]
movsd xmm3, QWORD PTR -88[rbp]
movapd xmm2, xmm1
subsd xmm2, xmm3
movsd xmm1, QWORD PTR -96[rbp]
movsd xmm3, QWORD PTR -112[rbp]
subsd xmm1, xmm3
mulsd xmm2, xmm1
movapd xmm1, xmm0
subsd xmm1, xmm2
pxor xmm0, xmm0
comisd xmm0, xmm1
jbe .L6
movsd xmm0, QWORD PTR -104[rbp]
movsd QWORD PTR -144[rbp], xmm0
movsd xmm0, QWORD PTR -96[rbp]
movsd QWORD PTR -104[rbp], xmm0
movsd xmm0, QWORD PTR -144[rbp]
movsd QWORD PTR -96[rbp], xmm0
movsd xmm0, QWORD PTR -80[rbp]
movsd QWORD PTR -144[rbp], xmm0
movsd xmm0, QWORD PTR -72[rbp]
movsd QWORD PTR -80[rbp], xmm0
movsd xmm0, QWORD PTR -144[rbp]
movsd QWORD PTR -72[rbp], xmm0
.L6:
lea rdx, -112[rbp]
lea rcx, -64[rbp]
lea rax, -144[rbp]
mov rsi, rcx
mov rdi, rax
call g_fcn@PLT
mov DWORD PTR -148[rbp], eax
mov eax, DWORD PTR -148[rbp]
mov DWORD PTR global_retval[rip], eax
movsd xmm0, QWORD PTR -144[rbp]
movsd QWORD PTR global_f[rip], xmm0
mov DWORD PTR -152[rbp], 0
jmp .L8
.L9:
mov eax, DWORD PTR -152[rbp]
cdqe
movsd xmm0, QWORD PTR -64[rbp+rax*8]
mov eax, DWORD PTR -152[rbp]
cdqe
lea rdx, 0[0+rax*8]
lea rax, global_grad[rip]
movsd QWORD PTR [rdx+rax], xmm0
add DWORD PTR -152[rbp], 1
.L8:
cmp DWORD PTR -152[rbp], 5
jle .L9
lea rsi, .LC4[rip]
lea rdi, .LC5[rip]
call fopen@PLT
mov QWORD PTR -120[rbp], rax
mov edx, DWORD PTR -148[rbp]
mov rax, QWORD PTR -120[rbp]
lea rsi, .LC6[rip]
mov rdi, rax
mov eax, 0
call fprintf@PLT
mov DWORD PTR -152[rbp], 0
jmp .L10
.L11:
mov eax, DWORD PTR -152[rbp]
cdqe
mov rdx, QWORD PTR -64[rbp+rax*8]
mov rax, QWORD PTR -120[rbp]
movq xmm0, rdx
lea rsi, .LC7[rip]
mov rdi, rax
mov eax, 1
call fprintf@PLT
add DWORD PTR -152[rbp], 1
.L10:
cmp DWORD PTR -152[rbp], 5
jle .L11
mov rax, QWORD PTR -120[rbp]
mov rdi, rax
call fclose@PLT
mov eax, 0
mov rcx, QWORD PTR -8[rbp]
sub rcx, QWORD PTR fs:40
je .L13
call __stack_chk_fail@PLT
.L13:
leave
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE6:
.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 "720191.c"
.text
.comm global_x,48,8
.comm global_retval,4,4
.comm global_f,8,8
.comm global_grad,48,8
.section .rodata
.align 2
.LC0:
.ascii "r\000"
.align 2
.LC1:
.ascii "x.in\000"
.align 2
.LC2:
.ascii "%lf,\000"
.global __aeabi_dsub
.global __aeabi_dmul
.global __aeabi_dcmplt
.align 2
.LC3:
.ascii "w\000"
.align 2
.LC4:
.ascii "g.out\000"
.align 2
.LC5:
.ascii "%d\012\000"
.align 2
.LC6:
.ascii "%.17g\012\000"
.align 2
.LC7:
.word __stack_chk_guard
.text
.align 2
.global main
.syntax unified
.arm
.fpu softvfp
.type main, %function
main:
@ args = 0, pretend = 0, frame = 136
@ frame_needed = 1, uses_anonymous_args = 0
push {r4, r5, r6, r7, fp, lr}
add fp, sp, #20
sub sp, sp, #136
ldr r3, .L15
ldr r3, [r3]
str r3, [fp, #-24]
mov r3,#0
ldr r1, .L15+4
ldr r0, .L15+8
bl fopen
str r0, [fp, #-152]
mov r2, #0
mov r3, #0
str r2, [fp, #-132]
str r3, [fp, #-128]
mov r3, #0
str r3, [fp, #-156]
b .L2
.L3:
ldr r1, [fp, #-156]
add r3, r1, #1
str r3, [fp, #-156]
sub r3, fp, #132
ldmia r3, {r2-r3}
ldr r0, .L15+12
lsl r1, r1, #3
add r1, r0, r1
stm r1, {r2-r3}
.L2:
sub r3, fp, #132
mov r2, r3
ldr r1, .L15+16
ldr r0, [fp, #-152]
bl __isoc99_fscanf
mov r3, r0
cmp r3, #0
bgt .L3
ldr r0, [fp, #-152]
bl fclose
mov r3, #0
str r3, [fp, #-156]
b .L4
.L5:
ldr r2, .L15+12
ldr r3, [fp, #-156]
lsl r3, r3, #3
add r3, r2, r3
ldmia r3, {r2-r3}
ldr r1, [fp, #-156]
lsl r1, r1, #3
sub r0, fp, #20
add r1, r0, r1
sub r1, r1, #104
stm r1, {r2-r3}
ldr r3, [fp, #-156]
add r3, r3, #1
str r3, [fp, #-156]
.L4:
ldr r3, [fp, #-156]
cmp r3, #5
ble .L5
sub r1, fp, #116
ldmia r1, {r0-r1}
sub r3, fp, #124
ldmia r3, {r2-r3}
bl __aeabi_dsub
mov r2, r0
mov r3, r1
mov r4, r2
mov r5, r3
sub r1, fp, #84
ldmia r1, {r0-r1}
sub r3, fp, #100
ldmia r3, {r2-r3}
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 r4, r2
mov r5, r3
sub r1, fp, #92
ldmia r1, {r0-r1}
sub r3, fp, #100
ldmia r3, {r2-r3}
bl __aeabi_dsub
mov r2, r0
mov r3, r1
mov r6, r2
mov r7, r3
sub r1, fp, #108
ldmia r1, {r0-r1}
sub r3, fp, #124
ldmia r3, {r2-r3}
bl __aeabi_dsub
mov r2, r0
mov r3, r1
mov r0, r6
mov r1, r7
bl __aeabi_dmul
mov r2, r0
mov r3, r1
mov r0, r4
mov r1, r5
bl __aeabi_dsub
mov r2, r0
mov r3, r1
mov r0, r2
mov r1, r3
mov r2, #0
mov r3, #0
bl __aeabi_dcmplt
mov r3, r0
cmp r3, #0
beq .L6
sub r3, fp, #116
ldmia r3, {r2-r3}
str r2, [fp, #-140]
str r3, [fp, #-136]
sub r3, fp, #108
ldmia r3, {r2-r3}
str r2, [fp, #-116]
str r3, [fp, #-112]
sub r3, fp, #140
ldmia r3, {r2-r3}
str r2, [fp, #-108]
str r3, [fp, #-104]
sub r3, fp, #92
ldmia r3, {r2-r3}
str r2, [fp, #-140]
str r3, [fp, #-136]
sub r3, fp, #84
ldmia r3, {r2-r3}
str r2, [fp, #-92]
str r3, [fp, #-88]
sub r3, fp, #140
ldmia r3, {r2-r3}
str r2, [fp, #-84]
str r3, [fp, #-80]
.L6:
sub r2, fp, #124
sub r1, fp, #76
sub r3, fp, #140
mov r0, r3
bl g_fcn
str r0, [fp, #-148]
ldr r2, .L15+20
ldr r3, [fp, #-148]
str r3, [r2]
sub r3, fp, #140
ldmia r3, {r2-r3}
ldr r1, .L15+24
stm r1, {r2-r3}
mov r3, #0
str r3, [fp, #-156]
b .L8
.L9:
ldr r3, [fp, #-156]
lsl r3, r3, #3
sub r2, fp, #20
add r3, r2, r3
sub r3, r3, #56
ldmia r3, {r2-r3}
ldr r0, .L15+28
ldr r1, [fp, #-156]
lsl r1, r1, #3
add r1, r0, r1
stm r1, {r2-r3}
ldr r3, [fp, #-156]
add r3, r3, #1
str r3, [fp, #-156]
.L8:
ldr r3, [fp, #-156]
cmp r3, #5
ble .L9
ldr r1, .L15+32
ldr r0, .L15+36
bl fopen
str r0, [fp, #-144]
ldr r2, [fp, #-148]
ldr r1, .L15+40
ldr r0, [fp, #-144]
bl fprintf
mov r3, #0
str r3, [fp, #-156]
b .L10
.L11:
ldr r3, [fp, #-156]
lsl r3, r3, #3
sub r2, fp, #20
add r3, r2, r3
sub r3, r3, #56
ldmia r3, {r2-r3}
ldr r1, .L15+44
ldr r0, [fp, #-144]
bl fprintf
ldr r3, [fp, #-156]
add r3, r3, #1
str r3, [fp, #-156]
.L10:
ldr r3, [fp, #-156]
cmp r3, #5
ble .L11
ldr r0, [fp, #-144]
bl fclose
mov r3, #0
ldr r2, .L15
ldr r1, [r2]
ldr r2, [fp, #-24]
eors r1, r2, r1
mov r2, #0
beq .L13
bl __stack_chk_fail
.L13:
mov r0, r3
sub sp, fp, #20
@ sp needed
pop {r4, r5, r6, r7, fp, pc}
.L16:
.align 2
.L15:
.word .LC7
.word .LC0
.word .LC1
.word global_x
.word .LC2
.word global_retval
.word global_f
.word global_grad
.word .LC3
.word .LC4
.word .LC5
.word .LC6
.size main, .-main
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",%progbits
|
.file "514616.c"
.intel_syntax noprefix
.text
.globl crc16
.type crc16, @function
crc16:
.LFB0:
.cfi_startproc
endbr64
push rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
mov rbp, rsp
.cfi_def_cfa_register 6
mov QWORD PTR -24[rbp], rdi
mov DWORD PTR -28[rbp], esi
mov WORD PTR -10[rbp], -1
mov eax, DWORD PTR -28[rbp]
mov DWORD PTR -4[rbp], eax
jmp .L2
.L5:
mov rax, QWORD PTR -24[rbp]
lea rdx, 1[rax]
mov QWORD PTR -24[rbp], rdx
movzx eax, BYTE PTR [rax]
mov BYTE PTR -11[rbp], al
mov DWORD PTR -8[rbp], 0
jmp .L3
.L4:
movzx eax, WORD PTR -10[rbp]
shr ax
mov ecx, eax
movzx edx, WORD PTR -10[rbp]
movzx eax, BYTE PTR -11[rbp]
xor eax, edx
and eax, 1
cdqe
lea rdx, [rax+rax]
lea rax, poly.0[rip]
movzx eax, WORD PTR [rdx+rax]
xor eax, ecx
mov WORD PTR -10[rbp], ax
shr BYTE PTR -11[rbp]
add DWORD PTR -8[rbp], 1
.L3:
cmp DWORD PTR -8[rbp], 7
jle .L4
sub DWORD PTR -4[rbp], 1
.L2:
cmp DWORD PTR -4[rbp], 0
jg .L5
movzx eax, WORD PTR -10[rbp]
pop rbp
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE0:
.size crc16, .-crc16
.data
.align 2
.type poly.0, @object
.size poly.0, 4
poly.0:
.value 0
.value -24575
.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 "514616.c"
.text
.align 2
.global crc16
.syntax unified
.arm
.fpu softvfp
.type crc16, %function
crc16:
@ args = 0, pretend = 0, frame = 24
@ frame_needed = 1, uses_anonymous_args = 0
@ link register save eliminated.
str fp, [sp, #-4]!
add fp, sp, #0
sub sp, sp, #28
str r0, [fp, #-24]
str r1, [fp, #-28]
mvn r3, #0
strh r3, [fp, #-14] @ movhi
ldr r3, [fp, #-28]
str r3, [fp, #-8]
b .L2
.L5:
ldr r3, [fp, #-24]
add r2, r3, #1
str r2, [fp, #-24]
ldrb r3, [r3]
strb r3, [fp, #-15]
mov r3, #0
str r3, [fp, #-12]
b .L3
.L4:
ldrh r3, [fp, #-14]
lsr r3, r3, #1
lsl r3, r3, #16
lsr r2, r3, #16
ldrh r1, [fp, #-14]
ldrb r3, [fp, #-15] @ zero_extendqisi2
eor r3, r3, r1
and r3, r3, #1
ldr r1, .L7
lsl r3, r3, #1
add r3, r1, r3
ldrh r3, [r3]
eor r3, r3, r2
strh r3, [fp, #-14] @ movhi
ldrb r3, [fp, #-15] @ zero_extendqisi2
lsr r3, r3, #1
strb r3, [fp, #-15]
ldr r3, [fp, #-12]
add r3, r3, #1
str r3, [fp, #-12]
.L3:
ldr r3, [fp, #-12]
cmp r3, #7
ble .L4
ldr r3, [fp, #-8]
sub r3, r3, #1
str r3, [fp, #-8]
.L2:
ldr r3, [fp, #-8]
cmp r3, #0
bgt .L5
ldrh r3, [fp, #-14]
mov r0, r3
add sp, fp, #0
@ sp needed
ldr fp, [sp], #4
bx lr
.L8:
.align 2
.L7:
.word poly.4198
.size crc16, .-crc16
.data
.align 2
.type poly.4198, %object
.size poly.4198, 4
poly.4198:
.short 0
.short -24575
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",%progbits
|
.file "435133.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, 48
mov DWORD PTR -36[rbp], edi
mov QWORD PTR -48[rbp], rsi
mov rax, QWORD PTR fs:40
mov QWORD PTR -8[rbp], rax
xor eax, eax
mov DWORD PTR -24[rbp], 17
mov DWORD PTR -28[rbp], 0
.L4:
mov BYTE PTR -1[rbp], 65
add DWORD PTR -28[rbp], 1
mov eax, DWORD PTR -28[rbp]
cmp eax, DWORD PTR -24[rbp]
jg .L8
jmp .L4
.L8:
nop
mov eax, 0
mov rdx, QWORD PTR -8[rbp]
sub rdx, QWORD PTR fs:40
je .L6
call __stack_chk_fail@PLT
.L6:
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 "435133.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 = 32
@ frame_needed = 1, uses_anonymous_args = 0
push {fp, lr}
add fp, sp, #4
sub sp, sp, #32
str r0, [fp, #-32]
str r1, [fp, #-36]
ldr r3, .L9
ldr r3, [r3]
str r3, [fp, #-8]
mov r3,#0
mov r3, #17
str r3, [fp, #-24]
mov r3, #0
str r3, [fp, #-28]
.L4:
mov r3, #65
strb r3, [fp, #-3]
ldr r3, [fp, #-28]
add r3, r3, #1
str r3, [fp, #-28]
ldr r2, [fp, #-28]
ldr r3, [fp, #-24]
cmp r2, r3
bgt .L8
b .L4
.L8:
nop
mov r3, #0
ldr r2, .L9
ldr r1, [r2]
ldr r2, [fp, #-8]
eors r1, r2, r1
mov r2, #0
beq .L6
bl __stack_chk_fail
.L6:
mov r0, r3
sub sp, fp, #4
@ sp needed
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
|
.file "695627.c"
.intel_syntax noprefix
.text
.globl remove
.type remove, @function
remove:
.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 QWORD PTR -8[rbp], rdi
mov rax, QWORD PTR -8[rbp]
mov rdi, rax
call remove_file@PLT
leave
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE0:
.size remove, .-remove
.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 "695627.c"
.text
.align 2
.global remove
.syntax unified
.arm
.fpu softvfp
.type remove, %function
remove:
@ 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]
ldr r0, [fp, #-8]
bl remove_file
mov r3, r0
mov r0, r3
sub sp, fp, #4
@ sp needed
pop {fp, pc}
.size remove, .-remove
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",%progbits
|
.file "856134.c"
.intel_syntax noprefix
.text
.section .rodata
.LC0:
.string "in pendfunc1, x is %d\n"
.text
.globl pendfunc1
.type pendfunc1, @function
pendfunc1:
.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 DWORD PTR -20[rbp], edi
mov eax, DWORD PTR -20[rbp]
add eax, 4
mov DWORD PTR -4[rbp], eax
mov eax, DWORD PTR -20[rbp]
mov esi, eax
lea rdi, .LC0[rip]
mov eax, 0
call printf@PLT
nop
leave
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE0:
.size pendfunc1, .-pendfunc1
.globl pendfunc
.type pendfunc, @function
pendfunc:
.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 DWORD PTR -4[rbp], edi
mov eax, DWORD PTR -4[rbp]
mov edi, eax
call pendfunc1
nop
leave
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE1:
.size pendfunc, .-pendfunc
.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 "856134.c"
.text
.section .rodata
.align 2
.LC0:
.ascii "in pendfunc1, x is %d\012\000"
.text
.align 2
.global pendfunc1
.syntax unified
.arm
.fpu softvfp
.type pendfunc1, %function
pendfunc1:
@ args = 0, pretend = 0, frame = 16
@ frame_needed = 1, uses_anonymous_args = 0
push {fp, lr}
add fp, sp, #4
sub sp, sp, #16
str r0, [fp, #-16]
ldr r3, [fp, #-16]
add r3, r3, #4
str r3, [fp, #-8]
ldr r1, [fp, #-16]
ldr r0, .L2
bl printf
nop
sub sp, fp, #4
@ sp needed
pop {fp, pc}
.L3:
.align 2
.L2:
.word .LC0
.size pendfunc1, .-pendfunc1
.align 2
.global pendfunc
.syntax unified
.arm
.fpu softvfp
.type pendfunc, %function
pendfunc:
@ 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]
ldr r0, [fp, #-8]
bl pendfunc1
nop
sub sp, fp, #4
@ sp needed
pop {fp, pc}
.size pendfunc, .-pendfunc
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",%progbits
|
.file "261756.c"
.intel_syntax noprefix
.text
.globl check_args
.type check_args, @function
check_args:
.LFB0:
.cfi_startproc
endbr64
push rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
mov rbp, rsp
.cfi_def_cfa_register 6
mov DWORD PTR -4[rbp], edi
cmp DWORD PTR -4[rbp], 8
jne .L2
mov eax, 8
jmp .L3
.L2:
cmp DWORD PTR -4[rbp], 4
jne .L4
mov eax, 1
jmp .L3
.L4:
cmp DWORD PTR -4[rbp], 4
jne .L5
mov eax, 1
jmp .L3
.L5:
cmp DWORD PTR -4[rbp], 4
jne .L6
mov eax, 1
jmp .L3
.L6:
cmp DWORD PTR -4[rbp], 4
jne .L7
mov eax, 1
jmp .L3
.L7:
cmp DWORD PTR -4[rbp], 4
jne .L8
mov eax, 1
jmp .L3
.L8:
cmp DWORD PTR -4[rbp], 4
jne .L9
mov eax, 1
jmp .L3
.L9:
cmp DWORD PTR -4[rbp], 4
jne .L10
mov eax, 1
jmp .L3
.L10:
cmp DWORD PTR -4[rbp], 4
jne .L11
mov eax, 1
jmp .L3
.L11:
cmp DWORD PTR -4[rbp], 4
jne .L12
mov eax, 1
jmp .L3
.L12:
mov eax, 0
.L3:
pop rbp
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE0:
.size check_args, .-check_args
.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 "261756.c"
.text
.align 2
.global check_args
.syntax unified
.arm
.fpu softvfp
.type check_args, %function
check_args:
@ args = 0, pretend = 0, frame = 8
@ frame_needed = 1, uses_anonymous_args = 0
@ link register save eliminated.
str fp, [sp, #-4]!
add fp, sp, #0
sub sp, sp, #12
str r0, [fp, #-8]
ldr r3, [fp, #-8]
cmp r3, #8
bne .L2
mov r3, #8
b .L3
.L2:
ldr r3, [fp, #-8]
cmp r3, #4
bne .L4
mov r3, #1
b .L3
.L4:
ldr r3, [fp, #-8]
cmp r3, #4
bne .L5
mov r3, #1
b .L3
.L5:
ldr r3, [fp, #-8]
cmp r3, #4
bne .L6
mov r3, #1
b .L3
.L6:
ldr r3, [fp, #-8]
cmp r3, #4
bne .L7
mov r3, #1
b .L3
.L7:
ldr r3, [fp, #-8]
cmp r3, #4
bne .L8
mov r3, #1
b .L3
.L8:
ldr r3, [fp, #-8]
cmp r3, #4
bne .L9
mov r3, #1
b .L3
.L9:
ldr r3, [fp, #-8]
cmp r3, #4
bne .L10
mov r3, #1
b .L3
.L10:
ldr r3, [fp, #-8]
cmp r3, #4
bne .L11
mov r3, #1
b .L3
.L11:
ldr r3, [fp, #-8]
cmp r3, #4
bne .L12
mov r3, #1
b .L3
.L12:
mov r3, #0
.L3:
mov r0, r3
add sp, fp, #0
@ sp needed
ldr fp, [sp], #4
bx lr
.size check_args, .-check_args
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",%progbits
|
.file "498422.c"
.intel_syntax noprefix
.text
.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 "498422.c"
.text
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",%progbits
|
.file "638336.c"
.intel_syntax noprefix
.text
.section .rodata
.LC0:
.string "wc"
.LC1:
.string "-w"
.LC2:
.string "fork"
.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, 80
mov DWORD PTR -68[rbp], edi
mov QWORD PTR -80[rbp], rsi
mov rax, QWORD PTR fs:40
mov QWORD PTR -8[rbp], rax
xor eax, eax
cmp DWORD PTR -68[rbp], 2
jne .L2
lea rax, .LC0[rip]
mov QWORD PTR -48[rbp], rax
lea rax, .LC1[rip]
mov QWORD PTR -40[rbp], rax
mov rax, QWORD PTR -80[rbp]
mov rax, QWORD PTR 8[rax]
mov QWORD PTR -32[rbp], rax
mov QWORD PTR -24[rbp], 0
call fork@PLT
mov DWORD PTR -52[rbp], eax
cmp DWORD PTR -52[rbp], 0
jns .L3
lea rdi, .LC2[rip]
call perror@PLT
mov edi, 1
call exit@PLT
.L3:
cmp DWORD PTR -52[rbp], 0
jne .L4
mov rax, QWORD PTR -48[rbp]
lea rdx, -48[rbp]
mov rsi, rdx
mov rdi, rax
call execvp@PLT
jmp .L2
.L4:
mov edi, 0
call wait@PLT
mov eax, 0
jmp .L5
.L2:
mov eax, 0
.L5:
mov rcx, QWORD PTR -8[rbp]
sub rcx, QWORD PTR fs:40
je .L6
call __stack_chk_fail@PLT
.L6:
leave
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE6:
.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 "638336.c"
.text
.section .rodata
.align 2
.LC0:
.ascii "wc\000"
.align 2
.LC1:
.ascii "-w\000"
.align 2
.LC2:
.ascii "fork\000"
.align 2
.LC3:
.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 {fp, lr}
add fp, sp, #4
sub sp, sp, #32
str r0, [fp, #-32]
str r1, [fp, #-36]
ldr r3, .L7
ldr r3, [r3]
str r3, [fp, #-8]
mov r3,#0
ldr r3, [fp, #-32]
cmp r3, #2
bne .L2
ldr r3, .L7+4
str r3, [fp, #-24]
ldr r3, .L7+8
str r3, [fp, #-20]
ldr r3, [fp, #-36]
ldr r3, [r3, #4]
str r3, [fp, #-16]
mov r3, #0
str r3, [fp, #-12]
bl fork
mov r3, r0
str r3, [fp, #-28]
ldr r3, [fp, #-28]
cmp r3, #0
bge .L3
ldr r0, .L7+12
bl perror
mov r0, #1
bl exit
.L3:
ldr r3, [fp, #-28]
cmp r3, #0
bne .L4
ldr r3, [fp, #-24]
sub r2, fp, #24
mov r1, r2
mov r0, r3
bl execvp
b .L2
.L4:
mov r0, #0
bl wait
mov r3, #0
b .L5
.L2:
mov r3, #0
.L5:
ldr r2, .L7
ldr r1, [r2]
ldr r2, [fp, #-8]
eors r1, r2, r1
mov r2, #0
beq .L6
bl __stack_chk_fail
.L6:
mov r0, r3
sub sp, fp, #4
@ sp needed
pop {fp, pc}
.L8:
.align 2
.L7:
.word .LC3
.word .LC0
.word .LC1
.word .LC2
.size main, .-main
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",%progbits
|
.file "556657.c"
.intel_syntax noprefix
.text
.globl Softmax
.type Softmax, @function
Softmax:
.LFB6:
.cfi_startproc
endbr64
push rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
mov rbp, rsp
.cfi_def_cfa_register 6
sub rsp, 48
mov QWORD PTR -24[rbp], rdi
mov QWORD PTR -32[rbp], rsi
mov QWORD PTR -40[rbp], rdx
mov QWORD PTR -48[rbp], rcx
mov DWORD PTR -12[rbp], 0
mov rax, QWORD PTR -24[rbp]
movss xmm0, DWORD PTR [rax]
movss DWORD PTR -8[rbp], xmm0
mov DWORD PTR -16[rbp], 1
jmp .L2
.L5:
mov eax, DWORD PTR -16[rbp]
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -24[rbp]
add rax, rdx
movss xmm0, DWORD PTR [rax]
comiss xmm0, DWORD PTR -8[rbp]
jbe .L3
mov eax, DWORD PTR -16[rbp]
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -24[rbp]
add rax, rdx
movss xmm0, DWORD PTR [rax]
movss DWORD PTR -8[rbp], xmm0
.L3:
add DWORD PTR -16[rbp], 1
.L2:
cmp DWORD PTR -16[rbp], 999
jle .L5
pxor xmm0, xmm0
movss DWORD PTR -4[rbp], xmm0
mov DWORD PTR -16[rbp], 0
jmp .L6
.L7:
mov eax, DWORD PTR -16[rbp]
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -24[rbp]
add rax, rdx
movss xmm0, DWORD PTR [rax]
subss xmm0, DWORD PTR -8[rbp]
pxor xmm2, xmm2
cvtss2sd xmm2, xmm0
movq rax, xmm2
movq xmm0, rax
call exp@PLT
mov eax, DWORD PTR -16[rbp]
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -24[rbp]
add rax, rdx
cvtsd2ss xmm0, xmm0
movss DWORD PTR [rax], xmm0
mov eax, DWORD PTR -16[rbp]
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -24[rbp]
add rax, rdx
movss xmm0, DWORD PTR [rax]
movss xmm1, DWORD PTR -4[rbp]
addss xmm0, xmm1
movss DWORD PTR -4[rbp], xmm0
add DWORD PTR -16[rbp], 1
.L6:
cmp DWORD PTR -16[rbp], 999
jle .L7
mov DWORD PTR -16[rbp], 0
jmp .L8
.L9:
mov eax, DWORD PTR -16[rbp]
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -24[rbp]
add rax, rdx
movss xmm0, DWORD PTR [rax]
mov eax, DWORD PTR -16[rbp]
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -24[rbp]
add rax, rdx
divss xmm0, DWORD PTR -4[rbp]
movss DWORD PTR [rax], xmm0
add DWORD PTR -16[rbp], 1
.L8:
cmp DWORD PTR -16[rbp], 999
jle .L9
mov DWORD PTR -16[rbp], 0
jmp .L10
.L13:
mov eax, DWORD PTR -16[rbp]
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -24[rbp]
add rax, rdx
movss xmm0, DWORD PTR [rax]
pxor xmm1, xmm1
ucomiss xmm0, xmm1
jp .L16
pxor xmm1, xmm1
comiss xmm0, xmm1
je .L11
.L16:
mov eax, DWORD PTR -16[rbp]
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -40[rbp]
add rdx, rax
mov eax, DWORD PTR -12[rbp]
mov DWORD PTR [rdx], eax
mov eax, DWORD PTR -16[rbp]
cdqe
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -24[rbp]
add rdx, rax
mov eax, DWORD PTR -16[rbp]
cdqe
lea rcx, 0[0+rax*4]
mov rax, QWORD PTR -48[rbp]
add rax, rcx
movss xmm0, DWORD PTR [rdx]
movss DWORD PTR [rax], xmm0
.L11:
add DWORD PTR -12[rbp], 1
add DWORD PTR -16[rbp], 1
.L10:
cmp DWORD PTR -16[rbp], 999
jle .L13
nop
leave
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE6:
.size Softmax, .-Softmax
.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 "556657.c"
.text
.global __aeabi_fcmplt
.global __aeabi_fsub
.global __aeabi_f2d
.global __aeabi_d2f
.global __aeabi_fadd
.global __aeabi_fdiv
.global __aeabi_fcmpeq
.align 2
.global Softmax
.syntax unified
.arm
.fpu softvfp
.type Softmax, %function
Softmax:
@ args = 0, pretend = 0, frame = 32
@ frame_needed = 1, uses_anonymous_args = 0
push {r4, fp, lr}
add fp, sp, #8
sub sp, sp, #36
str r0, [fp, #-32]
str r1, [fp, #-36]
str r2, [fp, #-40]
str r3, [fp, #-44]
mov r3, #0
str r3, [fp, #-24]
ldr r3, [fp, #-32]
ldr r3, [r3] @ float
str r3, [fp, #-20] @ float
mov r3, #1
str r3, [fp, #-28]
b .L2
.L5:
ldr r3, [fp, #-28]
lsl r3, r3, #2
ldr r2, [fp, #-32]
add r3, r2, r3
ldr r3, [r3] @ float
mov r1, r3
ldr r0, [fp, #-20] @ float
bl __aeabi_fcmplt
mov r3, r0
cmp r3, #0
beq .L3
ldr r3, [fp, #-28]
lsl r3, r3, #2
ldr r2, [fp, #-32]
add r3, r2, r3
ldr r3, [r3] @ float
str r3, [fp, #-20] @ float
.L3:
ldr r3, [fp, #-28]
add r3, r3, #1
str r3, [fp, #-28]
.L2:
ldr r3, [fp, #-28]
cmp r3, #1000
blt .L5
mov r3, #0
str r3, [fp, #-16] @ float
mov r3, #0
str r3, [fp, #-28]
b .L6
.L7:
ldr r3, [fp, #-28]
lsl r3, r3, #2
ldr r2, [fp, #-32]
add r3, r2, r3
ldr r3, [r3] @ float
ldr r1, [fp, #-20] @ float
mov r0, r3
bl __aeabi_fsub
mov r3, r0
mov r0, r3
bl __aeabi_f2d
mov r2, r0
mov r3, r1
mov r0, r2
mov r1, r3
bl exp
mov r2, r0
mov r3, r1
ldr r1, [fp, #-28]
lsl r1, r1, #2
ldr r0, [fp, #-32]
add r4, r0, r1
mov r0, r2
mov r1, r3
bl __aeabi_d2f
mov r3, r0
str r3, [r4] @ float
ldr r3, [fp, #-28]
lsl r3, r3, #2
ldr r2, [fp, #-32]
add r3, r2, r3
ldr r3, [r3] @ float
mov r1, r3
ldr r0, [fp, #-16] @ float
bl __aeabi_fadd
mov r3, r0
str r3, [fp, #-16] @ float
ldr r3, [fp, #-28]
add r3, r3, #1
str r3, [fp, #-28]
.L6:
ldr r3, [fp, #-28]
cmp r3, #1000
blt .L7
mov r3, #0
str r3, [fp, #-28]
b .L8
.L9:
ldr r3, [fp, #-28]
lsl r3, r3, #2
ldr r2, [fp, #-32]
add r3, r2, r3
ldr r0, [r3] @ float
ldr r3, [fp, #-28]
lsl r3, r3, #2
ldr r2, [fp, #-32]
add r4, r2, r3
ldr r1, [fp, #-16] @ float
bl __aeabi_fdiv
mov r3, r0
str r3, [r4] @ float
ldr r3, [fp, #-28]
add r3, r3, #1
str r3, [fp, #-28]
.L8:
ldr r3, [fp, #-28]
cmp r3, #1000
blt .L9
mov r3, #0
str r3, [fp, #-28]
b .L10
.L13:
ldr r3, [fp, #-28]
lsl r3, r3, #2
ldr r2, [fp, #-32]
add r3, r2, r3
ldr r3, [r3] @ float
mov r1, #0
mov r0, r3
bl __aeabi_fcmpeq
mov r3, r0
cmp r3, #0
bne .L11
ldr r3, [fp, #-28]
lsl r3, r3, #2
ldr r2, [fp, #-40]
add r3, r2, r3
ldr r2, [fp, #-24]
str r2, [r3]
ldr r3, [fp, #-28]
lsl r3, r3, #2
ldr r2, [fp, #-32]
add r2, r2, r3
ldr r3, [fp, #-28]
lsl r3, r3, #2
ldr r1, [fp, #-44]
add r3, r1, r3
ldr r2, [r2] @ float
str r2, [r3] @ float
.L11:
ldr r3, [fp, #-24]
add r3, r3, #1
str r3, [fp, #-24]
ldr r3, [fp, #-28]
add r3, r3, #1
str r3, [fp, #-28]
.L10:
ldr r3, [fp, #-28]
cmp r3, #1000
blt .L13
nop
sub sp, fp, #8
@ sp needed
pop {r4, fp, pc}
.size Softmax, .-Softmax
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",%progbits
|
.file "763313.c"
.intel_syntax noprefix
.text
.section .rodata
.align 8
.LC0:
.string "Bitte geben sie eine ganze Zahl \"a\" ein: "
.LC1:
.string "%i"
.align 8
.LC2:
.string "Bitte geben sie eine nat\303\274rliche Zahl \"n\" ein: "
.LC3:
.string "a*2^n = %i*2^%i = %i\n"
.LC4:
.string "a*2^-n = %i*2^-%i = %i"
.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 rax, QWORD PTR stdout[rip]
mov esi, 0
mov rdi, rax
call setbuf@PLT
lea rdi, .LC0[rip]
mov eax, 0
call printf@PLT
lea rax, -24[rbp]
mov rsi, rax
lea rdi, .LC1[rip]
mov eax, 0
call __isoc99_scanf@PLT
lea rdi, .LC2[rip]
mov eax, 0
call printf@PLT
lea rax, -20[rbp]
mov rsi, rax
lea rdi, .LC1[rip]
mov eax, 0
call __isoc99_scanf@PLT
mov edx, DWORD PTR -24[rbp]
mov eax, DWORD PTR -20[rbp]
mov ecx, eax
sal edx, cl
mov eax, edx
mov DWORD PTR -16[rbp], eax
mov edx, DWORD PTR -24[rbp]
mov eax, DWORD PTR -20[rbp]
mov ecx, eax
sar edx, cl
mov eax, edx
mov DWORD PTR -12[rbp], eax
mov edx, DWORD PTR -20[rbp]
mov eax, DWORD PTR -24[rbp]
mov ecx, DWORD PTR -16[rbp]
mov esi, eax
lea rdi, .LC3[rip]
mov eax, 0
call printf@PLT
mov edx, DWORD PTR -20[rbp]
mov eax, DWORD PTR -24[rbp]
mov ecx, DWORD PTR -12[rbp]
mov esi, eax
lea rdi, .LC4[rip]
mov eax, 0
call printf@PLT
mov eax, 0
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 "763313.c"
.text
.section .rodata
.align 2
.LC0:
.ascii "Bitte geben sie eine ganze Zahl \"a\" ein: \000"
.align 2
.LC1:
.ascii "%i\000"
.align 2
.LC2:
.ascii "Bitte geben sie eine nat\303\274rliche Zahl \"n\" e"
.ascii "in: \000"
.align 2
.LC3:
.ascii "a*2^n = %i*2^%i = %i\012\000"
.align 2
.LC4:
.ascii "a*2^-n = %i*2^-%i = %i\000"
.align 2
.LC5:
.word __stack_chk_guard
.text
.align 2
.global main
.syntax unified
.arm
.fpu softvfp
.type main, %function
main:
@ args = 0, pretend = 0, frame = 24
@ frame_needed = 1, uses_anonymous_args = 0
push {fp, lr}
add fp, sp, #4
sub sp, sp, #24
ldr r3, .L4
ldr r3, [r3]
str r3, [fp, #-8]
mov r3,#0
ldr r3, .L4+4
ldr r3, [r3]
mov r1, #0
mov r0, r3
bl setbuf
ldr r0, .L4+8
bl printf
sub r3, fp, #24
mov r1, r3
ldr r0, .L4+12
bl __isoc99_scanf
ldr r0, .L4+16
bl printf
sub r3, fp, #20
mov r1, r3
ldr r0, .L4+12
bl __isoc99_scanf
ldr r2, [fp, #-24]
ldr r3, [fp, #-20]
lsl r3, r2, r3
str r3, [fp, #-16]
ldr r2, [fp, #-24]
ldr r3, [fp, #-20]
asr r3, r2, r3
str r3, [fp, #-12]
ldr r1, [fp, #-24]
ldr r2, [fp, #-20]
ldr r3, [fp, #-16]
ldr r0, .L4+20
bl printf
ldr r1, [fp, #-24]
ldr r2, [fp, #-20]
ldr r3, [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 .LC5
.word stdout
.word .LC0
.word .LC1
.word .LC2
.word .LC3
.word .LC4
.size main, .-main
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",%progbits
|
.file "627331.c"
.intel_syntax noprefix
.text
.section .rodata
.LC1:
.string "%d"
.LC2:
.string "\n"
.LC3:
.string "%lf\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
pxor xmm0, xmm0
movsd QWORD PTR -16[rbp], xmm0
lea rax, -32[rbp]
mov rsi, rax
lea rdi, .LC1[rip]
mov eax, 0
call __isoc99_scanf@PLT
mov DWORD PTR -20[rbp], eax
mov DWORD PTR -24[rbp], 0
jmp .L2
.L3:
lea rdi, .LC2[rip]
mov eax, 0
call __isoc99_scanf@PLT
mov DWORD PTR -20[rbp], eax
lea rax, -28[rbp]
mov rsi, rax
lea rdi, .LC1[rip]
mov eax, 0
call __isoc99_scanf@PLT
mov DWORD PTR -20[rbp], eax
mov eax, DWORD PTR -28[rbp]
pxor xmm0, xmm0
cvtsi2sd xmm0, eax
movsd xmm1, QWORD PTR -16[rbp]
addsd xmm0, xmm1
movsd QWORD PTR -16[rbp], xmm0
add DWORD PTR -24[rbp], 1
.L2:
mov eax, DWORD PTR -32[rbp]
cmp DWORD PTR -24[rbp], eax
jl .L3
mov eax, DWORD PTR -32[rbp]
pxor xmm1, xmm1
cvtsi2sd xmm1, eax
movsd xmm0, QWORD PTR -16[rbp]
divsd xmm0, xmm1
movsd QWORD PTR -16[rbp], xmm0
mov rax, QWORD PTR -16[rbp]
movq xmm0, rax
lea rdi, .LC3[rip]
mov eax, 1
call printf@PLT
mov eax, 0
mov rdx, QWORD PTR -8[rbp]
sub rdx, QWORD PTR fs:40
je .L5
call __stack_chk_fail@PLT
.L5:
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 "627331.c"
.text
.section .rodata
.align 2
.LC0:
.ascii "%d\000"
.align 2
.LC1:
.ascii "\012\000"
.global __aeabi_i2d
.global __aeabi_dadd
.global __aeabi_ddiv
.align 2
.LC2:
.ascii "%lf\012\000"
.align 2
.LC3:
.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 {fp, lr}
add fp, sp, #4
sub sp, sp, #32
ldr r3, .L6
ldr r3, [r3]
str r3, [fp, #-8]
mov r3,#0
mov r2, #0
mov r3, #0
str r2, [fp, #-20]
str r3, [fp, #-16]
sub r3, fp, #36
mov r1, r3
ldr r0, .L6+4
bl __isoc99_scanf
str r0, [fp, #-24]
mov r3, #0
str r3, [fp, #-28]
b .L2
.L3:
ldr r0, .L6+8
bl __isoc99_scanf
str r0, [fp, #-24]
sub r3, fp, #32
mov r1, r3
ldr r0, .L6+4
bl __isoc99_scanf
str r0, [fp, #-24]
ldr r3, [fp, #-32]
mov r0, r3
bl __aeabi_i2d
mov r2, r0
mov r3, r1
sub r1, fp, #20
ldmia r1, {r0-r1}
bl __aeabi_dadd
mov r2, r0
mov r3, r1
str r2, [fp, #-20]
str r3, [fp, #-16]
ldr r3, [fp, #-28]
add r3, r3, #1
str r3, [fp, #-28]
.L2:
ldr r3, [fp, #-36]
ldr r2, [fp, #-28]
cmp r2, r3
blt .L3
ldr r3, [fp, #-36]
mov r0, r3
bl __aeabi_i2d
mov r2, r0
mov r3, r1
sub r1, fp, #20
ldmia r1, {r0-r1}
bl __aeabi_ddiv
mov r2, r0
mov r3, r1
str r2, [fp, #-20]
str r3, [fp, #-16]
sub r3, fp, #20
ldmia r3, {r2-r3}
ldr r0, .L6+12
bl printf
mov r3, #0
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 main, .-main
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",%progbits
|
.file "260595.c"
.intel_syntax noprefix
.text
.globl alloc_square_matrix
.type alloc_square_matrix, @function
alloc_square_matrix:
.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, 40
.cfi_offset 3, -24
mov DWORD PTR -36[rbp], edi
mov eax, DWORD PTR -36[rbp]
cdqe
sal rax, 3
mov rdi, rax
call malloc@PLT
mov QWORD PTR -24[rbp], rax
mov DWORD PTR -28[rbp], 0
jmp .L2
.L3:
mov eax, DWORD PTR -36[rbp]
cdqe
sal rax, 2
mov edx, DWORD PTR -28[rbp]
movsx rdx, edx
lea rcx, 0[0+rdx*8]
mov rdx, QWORD PTR -24[rbp]
lea rbx, [rcx+rdx]
mov rdi, rax
call malloc@PLT
mov QWORD PTR [rbx], rax
add DWORD PTR -28[rbp], 1
.L2:
mov eax, DWORD PTR -28[rbp]
cmp eax, DWORD PTR -36[rbp]
jl .L3
mov rax, QWORD PTR -24[rbp]
mov rbx, QWORD PTR -8[rbp]
leave
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE6:
.size alloc_square_matrix, .-alloc_square_matrix
.globl unalloc_square_matrix
.type unalloc_square_matrix, @function
unalloc_square_matrix:
.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 QWORD PTR -24[rbp], rdi
mov DWORD PTR -28[rbp], esi
mov DWORD PTR -4[rbp], 0
jmp .L6
.L7:
mov eax, DWORD PTR -4[rbp]
cdqe
lea rdx, 0[0+rax*8]
mov rax, QWORD PTR -24[rbp]
add rax, rdx
mov rax, QWORD PTR [rax]
mov rdi, rax
call free@PLT
add DWORD PTR -4[rbp], 1
.L6:
mov eax, DWORD PTR -4[rbp]
cmp eax, DWORD PTR -28[rbp]
jl .L7
mov rax, QWORD PTR -24[rbp]
mov rdi, rax
call free@PLT
nop
leave
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE7:
.size unalloc_square_matrix, .-unalloc_square_matrix
.section .rodata
.LC0:
.string "r"
.align 8
.LC1:
.string "Error while reading the matrix.\n"
.LC2:
.string "%d\n"
.LC3:
.string "%d"
.text
.globl read_square_matrix
.type read_square_matrix, @function
read_square_matrix:
.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, 48
mov QWORD PTR -40[rbp], rdi
mov QWORD PTR -48[rbp], rsi
mov rax, QWORD PTR -40[rbp]
lea rsi, .LC0[rip]
mov rdi, rax
call fopen@PLT
mov QWORD PTR -16[rbp], rax
cmp QWORD PTR -16[rbp], 0
jne .L9
mov rax, QWORD PTR stderr[rip]
mov rcx, rax
mov edx, 32
mov esi, 1
lea rdi, .LC1[rip]
call fwrite@PLT
mov edi, 1
call exit@PLT
.L9:
mov rdx, QWORD PTR -48[rbp]
mov rax, QWORD PTR -16[rbp]
lea rsi, .LC2[rip]
mov rdi, rax
mov eax, 0
call __isoc99_fscanf@PLT
mov rax, QWORD PTR -48[rbp]
mov eax, DWORD PTR [rax]
mov edi, eax
call alloc_square_matrix
mov QWORD PTR -8[rbp], rax
mov DWORD PTR -24[rbp], 0
jmp .L10
.L13:
mov DWORD PTR -20[rbp], 0
jmp .L11
.L12:
mov eax, DWORD PTR -24[rbp]
cdqe
lea rdx, 0[0+rax*8]
mov rax, QWORD PTR -8[rbp]
add rax, rdx
mov rdx, QWORD PTR [rax]
mov eax, DWORD PTR -20[rbp]
cdqe
sal rax, 2
add rdx, rax
mov rax, QWORD PTR -16[rbp]
lea rsi, .LC3[rip]
mov rdi, rax
mov eax, 0
call __isoc99_fscanf@PLT
add DWORD PTR -20[rbp], 1
.L11:
mov rax, QWORD PTR -48[rbp]
mov eax, DWORD PTR [rax]
cmp DWORD PTR -20[rbp], eax
jl .L12
add DWORD PTR -24[rbp], 1
.L10:
mov rax, QWORD PTR -48[rbp]
mov eax, DWORD PTR [rax]
cmp DWORD PTR -24[rbp], eax
jl .L13
mov rax, QWORD PTR -8[rbp]
leave
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE8:
.size read_square_matrix, .-read_square_matrix
.section .rodata
.LC4:
.string "w"
.align 8
.LC5:
.string "Error while writing the matrix.\n"
.LC6:
.string "%d "
.text
.globl write_square_matrix
.type write_square_matrix, @function
write_square_matrix:
.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, 48
mov QWORD PTR -24[rbp], rdi
mov DWORD PTR -28[rbp], esi
mov QWORD PTR -40[rbp], rdx
mov rax, QWORD PTR -40[rbp]
lea rsi, .LC4[rip]
mov rdi, rax
call fopen@PLT
mov QWORD PTR -8[rbp], rax
cmp QWORD PTR -8[rbp], 0
jne .L16
mov rax, QWORD PTR stderr[rip]
mov rcx, rax
mov edx, 32
mov esi, 1
lea rdi, .LC5[rip]
call fwrite@PLT
mov edi, 1
call exit@PLT
.L16:
mov edx, DWORD PTR -28[rbp]
mov rax, QWORD PTR -8[rbp]
lea rsi, .LC2[rip]
mov rdi, rax
mov eax, 0
call fprintf@PLT
mov DWORD PTR -16[rbp], 0
jmp .L17
.L20:
mov DWORD PTR -12[rbp], 0
jmp .L18
.L19:
mov eax, DWORD PTR -16[rbp]
cdqe
lea rdx, 0[0+rax*8]
mov rax, QWORD PTR -24[rbp]
add rax, rdx
mov rdx, QWORD PTR [rax]
mov eax, DWORD PTR -12[rbp]
cdqe
sal rax, 2
add rax, rdx
mov edx, DWORD PTR [rax]
mov rax, QWORD PTR -8[rbp]
lea rsi, .LC6[rip]
mov rdi, rax
mov eax, 0
call fprintf@PLT
add DWORD PTR -12[rbp], 1
.L18:
mov eax, DWORD PTR -12[rbp]
cmp eax, DWORD PTR -28[rbp]
jl .L19
mov rax, QWORD PTR -8[rbp]
mov rsi, rax
mov edi, 10
call fputc@PLT
add DWORD PTR -16[rbp], 1
.L17:
mov eax, DWORD PTR -16[rbp]
cmp eax, DWORD PTR -28[rbp]
jl .L20
nop
nop
leave
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE9:
.size write_square_matrix, .-write_square_matrix
.section .rodata
.LC7:
.string ""
.text
.globl print_square_matrix
.type print_square_matrix, @function
print_square_matrix:
.LFB10:
.cfi_startproc
endbr64
push rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
mov rbp, rsp
.cfi_def_cfa_register 6
sub rsp, 32
mov QWORD PTR -24[rbp], rdi
mov DWORD PTR -28[rbp], esi
mov DWORD PTR -8[rbp], 0
jmp .L22
.L25:
mov DWORD PTR -4[rbp], 0
jmp .L23
.L24:
mov eax, DWORD PTR -8[rbp]
cdqe
lea rdx, 0[0+rax*8]
mov rax, QWORD PTR -24[rbp]
add rax, rdx
mov rdx, QWORD PTR [rax]
mov eax, DWORD PTR -4[rbp]
cdqe
sal rax, 2
add rax, rdx
mov eax, DWORD PTR [rax]
mov esi, eax
lea rdi, .LC6[rip]
mov eax, 0
call printf@PLT
add DWORD PTR -4[rbp], 1
.L23:
mov eax, DWORD PTR -4[rbp]
cmp eax, DWORD PTR -28[rbp]
jl .L24
lea rdi, .LC7[rip]
call puts@PLT
add DWORD PTR -8[rbp], 1
.L22:
mov eax, DWORD PTR -8[rbp]
cmp eax, DWORD PTR -28[rbp]
jl .L25
nop
nop
leave
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE10:
.size print_square_matrix, .-print_square_matrix
.globl mult_square_matrix
.type mult_square_matrix, @function
mult_square_matrix:
.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, 64
mov QWORD PTR -40[rbp], rdi
mov QWORD PTR -48[rbp], rsi
mov DWORD PTR -52[rbp], edx
mov eax, DWORD PTR -52[rbp]
mov edi, eax
call alloc_square_matrix
mov QWORD PTR -8[rbp], rax
mov DWORD PTR -24[rbp], 0
jmp .L27
.L32:
mov DWORD PTR -20[rbp], 0
jmp .L28
.L31:
mov DWORD PTR -16[rbp], 0
mov DWORD PTR -12[rbp], 0
jmp .L29
.L30:
mov eax, DWORD PTR -24[rbp]
cdqe
lea rdx, 0[0+rax*8]
mov rax, QWORD PTR -40[rbp]
add rax, rdx
mov rdx, QWORD PTR [rax]
mov eax, DWORD PTR -12[rbp]
cdqe
sal rax, 2
add rax, rdx
mov edx, DWORD PTR [rax]
mov eax, DWORD PTR -12[rbp]
cdqe
lea rcx, 0[0+rax*8]
mov rax, QWORD PTR -48[rbp]
add rax, rcx
mov rcx, QWORD PTR [rax]
mov eax, DWORD PTR -20[rbp]
cdqe
sal rax, 2
add rax, rcx
mov eax, DWORD PTR [rax]
imul eax, edx
add DWORD PTR -16[rbp], eax
add DWORD PTR -12[rbp], 1
.L29:
mov eax, DWORD PTR -12[rbp]
cmp eax, DWORD PTR -52[rbp]
jl .L30
mov eax, DWORD PTR -24[rbp]
cdqe
lea rdx, 0[0+rax*8]
mov rax, QWORD PTR -8[rbp]
add rax, rdx
mov rdx, QWORD PTR [rax]
mov eax, DWORD PTR -20[rbp]
cdqe
sal rax, 2
add rdx, rax
mov eax, DWORD PTR -16[rbp]
mov DWORD PTR [rdx], eax
add DWORD PTR -20[rbp], 1
.L28:
mov eax, DWORD PTR -20[rbp]
cmp eax, DWORD PTR -52[rbp]
jl .L31
add DWORD PTR -24[rbp], 1
.L27:
mov eax, DWORD PTR -24[rbp]
cmp eax, DWORD PTR -52[rbp]
jl .L32
mov rax, QWORD PTR -8[rbp]
leave
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE11:
.size mult_square_matrix, .-mult_square_matrix
.section .rodata
.align 8
.LC8:
.string "Usage: %s <matrix1.txt> <matrix2.txt> <outfile.txt>\n"
.align 8
.LC9:
.string "Error: the matrices must have the same\torder!\n"
.LC11:
.string "Execution time: %lf s\n"
.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, 80
mov DWORD PTR -68[rbp], edi
mov QWORD PTR -80[rbp], rsi
mov rax, QWORD PTR fs:40
mov QWORD PTR -8[rbp], rax
xor eax, eax
cmp DWORD PTR -68[rbp], 4
je .L35
mov rax, QWORD PTR -80[rbp]
mov rax, QWORD PTR [rax]
mov rsi, rax
lea rdi, .LC8[rip]
mov eax, 0
call printf@PLT
mov edi, 0
call exit@PLT
.L35:
call clock@PLT
mov QWORD PTR -48[rbp], rax
mov rax, QWORD PTR -80[rbp]
add rax, 8
mov rax, QWORD PTR [rax]
lea rdx, -56[rbp]
mov rsi, rdx
mov rdi, rax
call read_square_matrix
mov QWORD PTR -40[rbp], rax
mov rax, QWORD PTR -80[rbp]
add rax, 16
mov rax, QWORD PTR [rax]
lea rdx, -52[rbp]
mov rsi, rdx
mov rdi, rax
call read_square_matrix
mov QWORD PTR -32[rbp], rax
mov edx, DWORD PTR -56[rbp]
mov eax, DWORD PTR -52[rbp]
cmp edx, eax
je .L36
mov rax, QWORD PTR stderr[rip]
mov rcx, rax
mov edx, 46
mov esi, 1
lea rdi, .LC9[rip]
call fwrite@PLT
mov edi, 1
call exit@PLT
.L36:
mov edx, DWORD PTR -56[rbp]
mov rcx, QWORD PTR -32[rbp]
mov rax, QWORD PTR -40[rbp]
mov rsi, rcx
mov rdi, rax
call mult_square_matrix
mov QWORD PTR -24[rbp], rax
mov rax, QWORD PTR -80[rbp]
add rax, 24
mov rdx, QWORD PTR [rax]
mov ecx, DWORD PTR -56[rbp]
mov rax, QWORD PTR -24[rbp]
mov esi, ecx
mov rdi, rax
call write_square_matrix
call clock@PLT
mov QWORD PTR -16[rbp], rax
mov rax, QWORD PTR -16[rbp]
sub rax, QWORD PTR -48[rbp]
pxor xmm0, xmm0
cvtsi2sd xmm0, rax
movsd xmm1, QWORD PTR .LC10[rip]
divsd xmm0, xmm1
movq rax, xmm0
movq xmm0, rax
lea rdi, .LC11[rip]
mov eax, 1
call printf@PLT
mov edx, DWORD PTR -56[rbp]
mov rax, QWORD PTR -40[rbp]
mov esi, edx
mov rdi, rax
call unalloc_square_matrix
mov edx, DWORD PTR -56[rbp]
mov rax, QWORD PTR -32[rbp]
mov esi, edx
mov rdi, rax
call unalloc_square_matrix
mov edx, DWORD PTR -56[rbp]
mov rax, QWORD PTR -24[rbp]
mov esi, edx
mov rdi, rax
call unalloc_square_matrix
mov eax, 0
mov rcx, QWORD PTR -8[rbp]
sub rcx, QWORD PTR fs:40
je .L38
call __stack_chk_fail@PLT
.L38:
leave
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE12:
.size main, .-main
.section .rodata
.align 8
.LC10:
.long 0
.long 1093567616
.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 "260595.c"
.text
.align 2
.global alloc_square_matrix
.syntax unified
.arm
.fpu softvfp
.type alloc_square_matrix, %function
alloc_square_matrix:
@ args = 0, pretend = 0, frame = 16
@ frame_needed = 1, uses_anonymous_args = 0
push {r4, fp, lr}
add fp, sp, #8
sub sp, sp, #20
str r0, [fp, #-24]
ldr r3, [fp, #-24]
lsl r3, r3, #2
mov r0, r3
bl malloc
mov r3, r0
str r3, [fp, #-16]
mov r3, #0
str r3, [fp, #-20]
b .L2
.L3:
ldr r3, [fp, #-24]
lsl r1, r3, #2
ldr r3, [fp, #-20]
lsl r3, r3, #2
ldr r2, [fp, #-16]
add r4, r2, r3
mov r0, r1
bl malloc
mov r3, r0
str r3, [r4]
ldr r3, [fp, #-20]
add r3, r3, #1
str r3, [fp, #-20]
.L2:
ldr r2, [fp, #-20]
ldr r3, [fp, #-24]
cmp r2, r3
blt .L3
ldr r3, [fp, #-16]
mov r0, r3
sub sp, fp, #8
@ sp needed
pop {r4, fp, pc}
.size alloc_square_matrix, .-alloc_square_matrix
.align 2
.global unalloc_square_matrix
.syntax unified
.arm
.fpu softvfp
.type unalloc_square_matrix, %function
unalloc_square_matrix:
@ args = 0, pretend = 0, frame = 16
@ frame_needed = 1, uses_anonymous_args = 0
push {fp, lr}
add fp, sp, #4
sub sp, sp, #16
str r0, [fp, #-16]
str r1, [fp, #-20]
mov r3, #0
str r3, [fp, #-8]
b .L6
.L7:
ldr r3, [fp, #-8]
lsl r3, r3, #2
ldr r2, [fp, #-16]
add r3, r2, r3
ldr r3, [r3]
mov r0, r3
bl free
ldr r3, [fp, #-8]
add r3, r3, #1
str r3, [fp, #-8]
.L6:
ldr r2, [fp, #-8]
ldr r3, [fp, #-20]
cmp r2, r3
blt .L7
ldr r0, [fp, #-16]
bl free
nop
sub sp, fp, #4
@ sp needed
pop {fp, pc}
.size unalloc_square_matrix, .-unalloc_square_matrix
.section .rodata
.align 2
.LC0:
.ascii "r\000"
.align 2
.LC1:
.ascii "Error while reading the matrix.\012\000"
.align 2
.LC2:
.ascii "%d\012\000"
.align 2
.LC3:
.ascii "%d\000"
.text
.align 2
.global read_square_matrix
.syntax unified
.arm
.fpu softvfp
.type read_square_matrix, %function
read_square_matrix:
@ args = 0, pretend = 0, frame = 24
@ frame_needed = 1, uses_anonymous_args = 0
push {fp, lr}
add fp, sp, #4
sub sp, sp, #24
str r0, [fp, #-24]
str r1, [fp, #-28]
ldr r1, .L15
ldr r0, [fp, #-24]
bl fopen
str r0, [fp, #-12]
ldr r3, [fp, #-12]
cmp r3, #0
bne .L9
ldr r3, .L15+4
ldr r3, [r3]
mov r2, #32
mov r1, #1
ldr r0, .L15+8
bl fwrite
mov r0, #1
bl exit
.L9:
ldr r2, [fp, #-28]
ldr r1, .L15+12
ldr r0, [fp, #-12]
bl __isoc99_fscanf
ldr r3, [fp, #-28]
ldr r3, [r3]
mov r0, r3
bl alloc_square_matrix
str r0, [fp, #-8]
mov r3, #0
str r3, [fp, #-20]
b .L10
.L13:
mov r3, #0
str r3, [fp, #-16]
b .L11
.L12:
ldr r3, [fp, #-20]
lsl r3, r3, #2
ldr r2, [fp, #-8]
add r3, r2, r3
ldr r2, [r3]
ldr r3, [fp, #-16]
lsl r3, r3, #2
add r3, r2, r3
mov r2, r3
ldr r1, .L15+16
ldr r0, [fp, #-12]
bl __isoc99_fscanf
ldr r3, [fp, #-16]
add r3, r3, #1
str r3, [fp, #-16]
.L11:
ldr r3, [fp, #-28]
ldr r3, [r3]
ldr r2, [fp, #-16]
cmp r2, r3
blt .L12
ldr r3, [fp, #-20]
add r3, r3, #1
str r3, [fp, #-20]
.L10:
ldr r3, [fp, #-28]
ldr r3, [r3]
ldr r2, [fp, #-20]
cmp r2, r3
blt .L13
ldr r3, [fp, #-8]
mov r0, r3
sub sp, fp, #4
@ sp needed
pop {fp, pc}
.L16:
.align 2
.L15:
.word .LC0
.word stderr
.word .LC1
.word .LC2
.word .LC3
.size read_square_matrix, .-read_square_matrix
.section .rodata
.align 2
.LC4:
.ascii "w\000"
.align 2
.LC5:
.ascii "Error while writing the matrix.\012\000"
.align 2
.LC6:
.ascii "%d \000"
.text
.align 2
.global write_square_matrix
.syntax unified
.arm
.fpu softvfp
.type write_square_matrix, %function
write_square_matrix:
@ args = 0, pretend = 0, frame = 32
@ frame_needed = 1, uses_anonymous_args = 0
push {fp, lr}
add fp, sp, #4
sub sp, sp, #32
str r0, [fp, #-24]
str r1, [fp, #-28]
str r2, [fp, #-32]
ldr r1, .L23
ldr r0, [fp, #-32]
bl fopen
str r0, [fp, #-8]
ldr r3, [fp, #-8]
cmp r3, #0
bne .L18
ldr r3, .L23+4
ldr r3, [r3]
mov r2, #32
mov r1, #1
ldr r0, .L23+8
bl fwrite
mov r0, #1
bl exit
.L18:
ldr r2, [fp, #-28]
ldr r1, .L23+12
ldr r0, [fp, #-8]
bl fprintf
mov r3, #0
str r3, [fp, #-16]
b .L19
.L22:
mov r3, #0
str r3, [fp, #-12]
b .L20
.L21:
ldr r3, [fp, #-16]
lsl r3, r3, #2
ldr r2, [fp, #-24]
add r3, r2, r3
ldr r2, [r3]
ldr r3, [fp, #-12]
lsl r3, r3, #2
add r3, r2, r3
ldr r3, [r3]
mov r2, r3
ldr r1, .L23+16
ldr r0, [fp, #-8]
bl fprintf
ldr r3, [fp, #-12]
add r3, r3, #1
str r3, [fp, #-12]
.L20:
ldr r2, [fp, #-12]
ldr r3, [fp, #-28]
cmp r2, r3
blt .L21
ldr r1, [fp, #-8]
mov r0, #10
bl fputc
ldr r3, [fp, #-16]
add r3, r3, #1
str r3, [fp, #-16]
.L19:
ldr r2, [fp, #-16]
ldr r3, [fp, #-28]
cmp r2, r3
blt .L22
nop
nop
sub sp, fp, #4
@ sp needed
pop {fp, pc}
.L24:
.align 2
.L23:
.word .LC4
.word stderr
.word .LC5
.word .LC2
.word .LC6
.size write_square_matrix, .-write_square_matrix
.section .rodata
.align 2
.LC7:
.ascii "\000"
.text
.align 2
.global print_square_matrix
.syntax unified
.arm
.fpu softvfp
.type print_square_matrix, %function
print_square_matrix:
@ args = 0, pretend = 0, frame = 16
@ frame_needed = 1, uses_anonymous_args = 0
push {fp, lr}
add fp, sp, #4
sub sp, sp, #16
str r0, [fp, #-16]
str r1, [fp, #-20]
mov r3, #0
str r3, [fp, #-12]
b .L26
.L29:
mov r3, #0
str r3, [fp, #-8]
b .L27
.L28:
ldr r3, [fp, #-12]
lsl r3, r3, #2
ldr r2, [fp, #-16]
add r3, r2, r3
ldr r2, [r3]
ldr r3, [fp, #-8]
lsl r3, r3, #2
add r3, r2, r3
ldr r3, [r3]
mov r1, r3
ldr r0, .L30
bl printf
ldr r3, [fp, #-8]
add r3, r3, #1
str r3, [fp, #-8]
.L27:
ldr r2, [fp, #-8]
ldr r3, [fp, #-20]
cmp r2, r3
blt .L28
ldr r0, .L30+4
bl puts
ldr r3, [fp, #-12]
add r3, r3, #1
str r3, [fp, #-12]
.L26:
ldr r2, [fp, #-12]
ldr r3, [fp, #-20]
cmp r2, r3
blt .L29
nop
nop
sub sp, fp, #4
@ sp needed
pop {fp, pc}
.L31:
.align 2
.L30:
.word .LC6
.word .LC7
.size print_square_matrix, .-print_square_matrix
.align 2
.global mult_square_matrix
.syntax unified
.arm
.fpu softvfp
.type mult_square_matrix, %function
mult_square_matrix:
@ args = 0, pretend = 0, frame = 40
@ frame_needed = 1, uses_anonymous_args = 0
push {fp, lr}
add fp, sp, #4
sub sp, sp, #40
str r0, [fp, #-32]
str r1, [fp, #-36]
str r2, [fp, #-40]
ldr r0, [fp, #-40]
bl alloc_square_matrix
str r0, [fp, #-8]
mov r3, #0
str r3, [fp, #-24]
b .L33
.L38:
mov r3, #0
str r3, [fp, #-20]
b .L34
.L37:
mov r3, #0
str r3, [fp, #-16]
mov r3, #0
str r3, [fp, #-12]
b .L35
.L36:
ldr r3, [fp, #-24]
lsl r3, r3, #2
ldr r2, [fp, #-32]
add r3, r2, r3
ldr r2, [r3]
ldr r3, [fp, #-12]
lsl r3, r3, #2
add r3, r2, r3
ldr r3, [r3]
ldr r2, [fp, #-12]
lsl r2, r2, #2
ldr r1, [fp, #-36]
add r2, r1, r2
ldr r1, [r2]
ldr r2, [fp, #-20]
lsl r2, r2, #2
add r2, r1, r2
ldr r2, [r2]
mul r3, r2, r3
ldr r2, [fp, #-16]
add r3, r2, r3
str r3, [fp, #-16]
ldr r3, [fp, #-12]
add r3, r3, #1
str r3, [fp, #-12]
.L35:
ldr r2, [fp, #-12]
ldr r3, [fp, #-40]
cmp r2, r3
blt .L36
ldr r3, [fp, #-24]
lsl r3, r3, #2
ldr r2, [fp, #-8]
add r3, r2, r3
ldr r2, [r3]
ldr r3, [fp, #-20]
lsl r3, r3, #2
add r3, r2, r3
ldr r2, [fp, #-16]
str r2, [r3]
ldr r3, [fp, #-20]
add r3, r3, #1
str r3, [fp, #-20]
.L34:
ldr r2, [fp, #-20]
ldr r3, [fp, #-40]
cmp r2, r3
blt .L37
ldr r3, [fp, #-24]
add r3, r3, #1
str r3, [fp, #-24]
.L33:
ldr r2, [fp, #-24]
ldr r3, [fp, #-40]
cmp r2, r3
blt .L38
ldr r3, [fp, #-8]
mov r0, r3
sub sp, fp, #4
@ sp needed
pop {fp, pc}
.size mult_square_matrix, .-mult_square_matrix
.section .rodata
.align 2
.LC8:
.ascii "Usage: %s <matrix1.txt> <matrix2.txt> <outfile.txt>"
.ascii "\012\000"
.align 2
.LC9:
.ascii "Error: the matrices must have the same\011order!\012"
.ascii "\000"
.global __aeabi_i2d
.global __aeabi_ddiv
.align 2
.LC10:
.ascii "Execution time: %lf s\012\000"
.align 2
.LC11:
.word __stack_chk_guard
.text
.align 2
.global main
.syntax unified
.arm
.fpu softvfp
.type main, %function
main:
@ args = 0, pretend = 0, frame = 40
@ frame_needed = 1, uses_anonymous_args = 0
push {fp, lr}
add fp, sp, #4
sub sp, sp, #40
str r0, [fp, #-40]
str r1, [fp, #-44]
ldr r3, .L45
ldr r3, [r3]
str r3, [fp, #-8]
mov r3,#0
ldr r3, [fp, #-40]
cmp r3, #4
beq .L41
ldr r3, [fp, #-44]
ldr r3, [r3]
mov r1, r3
ldr r0, .L45+4
bl printf
mov r0, #0
bl exit
.L41:
bl clock
str r0, [fp, #-28]
ldr r3, [fp, #-44]
add r3, r3, #4
ldr r3, [r3]
sub r2, fp, #36
mov r1, r2
mov r0, r3
bl read_square_matrix
str r0, [fp, #-24]
ldr r3, [fp, #-44]
add r3, r3, #8
ldr r3, [r3]
sub r2, fp, #32
mov r1, r2
mov r0, r3
bl read_square_matrix
str r0, [fp, #-20]
ldr r2, [fp, #-36]
ldr r3, [fp, #-32]
cmp r2, r3
beq .L42
ldr r3, .L45+8
ldr r3, [r3]
mov r2, #46
mov r1, #1
ldr r0, .L45+12
bl fwrite
mov r0, #1
bl exit
.L42:
ldr r3, [fp, #-36]
mov r2, r3
ldr r1, [fp, #-20]
ldr r0, [fp, #-24]
bl mult_square_matrix
str r0, [fp, #-16]
ldr r1, [fp, #-36]
ldr r3, [fp, #-44]
add r3, r3, #12
ldr r3, [r3]
mov r2, r3
ldr r0, [fp, #-16]
bl write_square_matrix
bl clock
str r0, [fp, #-12]
ldr r2, [fp, #-12]
ldr r3, [fp, #-28]
sub r3, r2, r3
mov r0, r3
bl __aeabi_i2d
mov r2, #0
ldr r3, .L45+16
bl __aeabi_ddiv
mov r2, r0
mov r3, r1
ldr r0, .L45+20
bl printf
ldr r3, [fp, #-36]
mov r1, r3
ldr r0, [fp, #-24]
bl unalloc_square_matrix
ldr r3, [fp, #-36]
mov r1, r3
ldr r0, [fp, #-20]
bl unalloc_square_matrix
ldr r3, [fp, #-36]
mov r1, r3
ldr r0, [fp, #-16]
bl unalloc_square_matrix
mov r3, #0
ldr r2, .L45
ldr r1, [r2]
ldr r2, [fp, #-8]
eors r1, r2, r1
mov r2, #0
beq .L44
bl __stack_chk_fail
.L44:
mov r0, r3
sub sp, fp, #4
@ sp needed
pop {fp, pc}
.L46:
.align 2
.L45:
.word .LC11
.word .LC8
.word stderr
.word .LC9
.word 1093567616
.word .LC10
.size main, .-main
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",%progbits
|
.file "110230.c"
.intel_syntax noprefix
.text
.globl bufp
.type bufp, @function
bufp:
.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 -52[rbp], edi
mov QWORD PTR -64[rbp], rsi
mov QWORD PTR -72[rbp], rdx
mov QWORD PTR -80[rbp], rcx
mov QWORD PTR -88[rbp], r8
mov eax, r9d
mov BYTE PTR -56[rbp], al
mov BYTE PTR -34[rbp], 1
mov eax, DWORD PTR -52[rbp]
add eax, eax
mov eax, eax
lea rdx, 0[0+rax*8]
mov rax, QWORD PTR -64[rbp]
add rax, rdx
mov rax, QWORD PTR [rax]
mov QWORD PTR -24[rbp], rax
mov eax, DWORD PTR -52[rbp]
add eax, eax
add eax, 1
mov eax, eax
lea rdx, 0[0+rax*8]
mov rax, QWORD PTR -64[rbp]
add rax, rdx
mov rax, QWORD PTR [rax]
mov QWORD PTR -16[rbp], rax
jmp .L2
.L5:
movzx eax, BYTE PTR -56[rbp]
mov rdx, QWORD PTR -24[rbp]
mov ecx, eax
sal rdx, cl
mov rax, rdx
lea rdx, 0[0+rax*4]
mov rax, QWORD PTR -72[rbp]
add rax, rdx
mov eax, DWORD PTR [rax]
mov DWORD PTR -32[rbp], eax
mov eax, DWORD PTR -32[rbp]
shr eax, 6
mov DWORD PTR -28[rbp], eax
mov eax, DWORD PTR -28[rbp]
lea rdx, 0[0+rax*8]
mov rax, QWORD PTR -88[rbp]
add rax, rdx
mov rax, QWORD PTR [rax]
mov QWORD PTR -8[rbp], rax
mov eax, DWORD PTR -32[rbp]
and eax, 63
mov BYTE PTR -33[rbp], al
mov BYTE PTR -34[rbp], 0
movzx eax, BYTE PTR -33[rbp]
mov rdx, QWORD PTR -8[rbp]
mov ecx, eax
shr rdx, cl
mov rax, rdx
and eax, 1
test rax, rax
jne .L3
mov BYTE PTR -34[rbp], 1
mov eax, DWORD PTR -52[rbp]
lea rdx, 0[0+rax*8]
mov rax, QWORD PTR -80[rbp]
add rdx, rax
mov eax, DWORD PTR -32[rbp]
mov QWORD PTR [rdx], rax
jmp .L4
.L3:
add QWORD PTR -24[rbp], 1
.L2:
mov rax, QWORD PTR -24[rbp]
cmp rax, QWORD PTR -16[rbp]
jb .L5
.L4:
movzx eax, BYTE PTR -34[rbp]
pop rbp
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE0:
.size bufp, .-bufp
.globl bottom_up_ctl
.type bottom_up_ctl, @function
bottom_up_ctl:
.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, 112
mov eax, edi
mov QWORD PTR -80[rbp], rsi
mov QWORD PTR -88[rbp], rdx
mov QWORD PTR -96[rbp], rcx
mov QWORD PTR -104[rbp], r8
mov QWORD PTR -112[rbp], r9
mov BYTE PTR -68[rbp], al
mov eax, 0
call __htc_get_unit_count@PLT
mov BYTE PTR -58[rbp], al
movzx esi, BYTE PTR -58[rbp]
mov eax, DWORD PTR 24[rbp]
mov edx, 0
div esi
add eax, 1
mov DWORD PTR -36[rbp], eax
call omp_get_team_num@PLT
mov BYTE PTR -57[rbp], al
movzx eax, BYTE PTR -57[rbp]
imul eax, DWORD PTR -36[rbp]
mov eax, eax
mov QWORD PTR -8[rbp], rax
mov edx, DWORD PTR -36[rbp]
mov rax, QWORD PTR -8[rbp]
add rax, rdx
mov QWORD PTR -24[rbp], rax
mov eax, DWORD PTR 24[rbp]
cmp QWORD PTR -24[rbp], rax
jbe .L8
mov eax, DWORD PTR 24[rbp]
mov QWORD PTR -24[rbp], rax
.L8:
mov rax, QWORD PTR -24[rbp]
mov edx, eax
mov rax, QWORD PTR -8[rbp]
mov ecx, eax
mov eax, edx
sub eax, ecx
add eax, 1
mov DWORD PTR -32[rbp], eax
mov DWORD PTR -52[rbp], 0
cmp DWORD PTR -32[rbp], 512
jbe .L9
mov DWORD PTR -32[rbp], 512
.L9:
movzx eax, BYTE PTR -68[rbp]
cmp eax, 2
je .L10
cmp eax, 2
jg .L11
test eax, eax
je .L12
cmp eax, 1
je .L13
jmp .L11
.L12:
mov rax, QWORD PTR -8[rbp]
mov DWORD PTR -48[rbp], eax
jmp .L14
.L15:
mov eax, DWORD PTR -48[rbp]
lea rdx, 0[0+rax*8]
mov rax, QWORD PTR -80[rbp]
add rax, rdx
mov QWORD PTR [rax], -1
add DWORD PTR -48[rbp], 1
.L14:
mov eax, DWORD PTR -48[rbp]
cmp QWORD PTR -24[rbp], rax
ja .L15
jmp .L11
.L13:
mov rax, QWORD PTR -8[rbp]
mov DWORD PTR -44[rbp], eax
jmp .L16
.L17:
mov eax, DWORD PTR -44[rbp]
add eax, eax
mov eax, eax
lea rdx, 0[0+rax*8]
mov rax, QWORD PTR -88[rbp]
add rax, rdx
mov edx, DWORD PTR -44[rbp]
add edx, edx
add edx, 1
mov edx, edx
lea rcx, 0[0+rdx*8]
mov rdx, QWORD PTR -88[rbp]
add rdx, rcx
mov rdx, QWORD PTR [rdx]
lea rcx, 0[0+rdx*8]
mov rdx, QWORD PTR -80[rbp]
add rdx, rcx
mov rax, QWORD PTR [rax]
mov QWORD PTR [rdx], rax
add DWORD PTR -44[rbp], 1
.L16:
mov eax, DWORD PTR -44[rbp]
cmp QWORD PTR -24[rbp], rax
ja .L17
jmp .L11
.L10:
mov rax, QWORD PTR -8[rbp]
mov DWORD PTR -40[rbp], eax
jmp .L18
.L28:
mov BYTE PTR -60[rbp], 0
mov BYTE PTR -59[rbp], 0
mov eax, DWORD PTR -40[rbp]
lea rdx, 0[0+rax*8]
mov rax, QWORD PTR -96[rbp]
add rax, rdx
mov rax, QWORD PTR [rax]
mov QWORD PTR -16[rbp], rax
cmp QWORD PTR -16[rbp], 0
je .L19
jmp .L20
.L26:
movzx eax, BYTE PTR -60[rbp]
mov rdx, QWORD PTR -16[rbp]
mov ecx, eax
shr rdx, cl
mov rax, rdx
and eax, 1
test rax, rax
je .L21
mov eax, DWORD PTR -40[rbp]
sal eax, 6
mov edx, eax
movzx eax, BYTE PTR -60[rbp]
add eax, edx
mov DWORD PTR -28[rbp], eax
mov rax, QWORD PTR -88[rbp]
movzx eax, al
and eax, 1
mov edi, eax
mov rcx, QWORD PTR -96[rbp]
mov rdx, QWORD PTR -80[rbp]
mov rsi, QWORD PTR -112[rbp]
mov eax, DWORD PTR -28[rbp]
mov r9d, edi
mov r8, rcx
mov rcx, rdx
mov rdx, QWORD PTR 16[rbp]
mov edi, eax
call bufp
movzx eax, al
and eax, 1
test eax, eax
je .L22
movzx eax, BYTE PTR -60[rbp]
mov edx, 1
mov ecx, eax
sal rdx, cl
mov rax, rdx
not rax
and QWORD PTR -16[rbp], rax
movzx eax, BYTE PTR -59[rbp]
add eax, 1
mov BYTE PTR -59[rbp], al
jmp .L22
.L21:
movzx eax, BYTE PTR -60[rbp]
add eax, 1
mov rdx, QWORD PTR -16[rbp]
mov ecx, eax
shr rdx, cl
mov rax, rdx
mov WORD PTR -56[rbp], ax
mov WORD PTR -54[rbp], 0
movzx eax, WORD PTR -56[rbp]
movzx eax, al
test eax, eax
jne .L23
mov WORD PTR -54[rbp], 8
shr WORD PTR -56[rbp], 8
.L23:
movzx eax, WORD PTR -56[rbp]
and eax, 15
test eax, eax
jne .L24
add WORD PTR -54[rbp], 4
shr WORD PTR -56[rbp], 4
.L24:
movzx eax, WORD PTR -56[rbp]
and eax, 3
test eax, eax
jne .L25
add WORD PTR -54[rbp], 2
shr WORD PTR -56[rbp], 2
.L25:
movzx eax, WORD PTR -56[rbp]
and eax, 1
test eax, eax
sete al
movzx eax, al
add WORD PTR -54[rbp], ax
movzx eax, WORD PTR -54[rbp]
add BYTE PTR -60[rbp], al
.L22:
movzx eax, BYTE PTR -60[rbp]
add eax, 1
mov BYTE PTR -60[rbp], al
.L20:
cmp BYTE PTR -60[rbp], 63
jbe .L26
.L19:
cmp BYTE PTR -59[rbp], 0
je .L27
movzx eax, BYTE PTR -59[rbp]
add DWORD PTR -52[rbp], eax
.L27:
mov eax, DWORD PTR -40[rbp]
lea rdx, 0[0+rax*8]
mov rax, QWORD PTR -104[rbp]
add rdx, rax
mov rax, QWORD PTR -16[rbp]
mov QWORD PTR [rdx], rax
add DWORD PTR -40[rbp], 1
.L18:
mov eax, DWORD PTR -40[rbp]
cmp QWORD PTR -24[rbp], rax
ja .L28
mov edx, DWORD PTR -52[rbp]
mov rax, QWORD PTR 32[rbp]
mov QWORD PTR [rax], rdx
nop
.L11:
cmp BYTE PTR -68[rbp], 2
jne .L30
movzx eax, BYTE PTR -57[rbp]
lea rdx, 0[0+rax*8]
mov rax, QWORD PTR 32[rbp]
add rdx, rax
mov eax, DWORD PTR -52[rbp]
mov QWORD PTR [rdx], rax
.L30:
nop
leave
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE1:
.size bottom_up_ctl, .-bottom_up_ctl
.globl pers_init_bfs_tree
.type pers_init_bfs_tree, @function
pers_init_bfs_tree:
.LFB2:
.cfi_startproc
endbr64
push rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
mov rbp, rsp
.cfi_def_cfa_register 6
sub rsp, 32
mov QWORD PTR -24[rbp], rdi
mov QWORD PTR -32[rbp], rsi
mov rax, QWORD PTR -24[rbp]
mov QWORD PTR -8[rbp], rax
mov rax, QWORD PTR -8[rbp]
mov edx, eax
mov rax, QWORD PTR -32[rbp]
sub rsp, 8
push 0
push rdx
push 0
mov r9d, 0
mov r8d, 0
mov ecx, 0
mov edx, 0
mov rsi, rax
mov edi, 0
call bottom_up_ctl
add rsp, 32
nop
leave
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE2:
.size pers_init_bfs_tree, .-pers_init_bfs_tree
.globl pers_scatter_bfs
.type pers_scatter_bfs, @function
pers_scatter_bfs:
.LFB3:
.cfi_startproc
endbr64
push rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
mov rbp, rsp
.cfi_def_cfa_register 6
sub rsp, 48
mov QWORD PTR -24[rbp], rdi
mov QWORD PTR -32[rbp], rsi
mov QWORD PTR -40[rbp], rdx
mov rax, QWORD PTR -24[rbp]
mov rax, QWORD PTR [rax]
mov QWORD PTR -16[rbp], rax
mov rax, QWORD PTR -16[rbp]
mov QWORD PTR -8[rbp], rax
mov rax, QWORD PTR -8[rbp]
mov ecx, eax
mov rdx, QWORD PTR -40[rbp]
mov rax, QWORD PTR -32[rbp]
sub rsp, 8
push 0
push rcx
push 0
mov r9d, 0
mov r8d, 0
mov ecx, 0
mov rsi, rax
mov edi, 1
call bottom_up_ctl
add rsp, 32
nop
leave
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE3:
.size pers_scatter_bfs, .-pers_scatter_bfs
.globl pers_bottom_up
.type pers_bottom_up, @function
pers_bottom_up:
.LFB4:
.cfi_startproc
endbr64
push rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
mov rbp, rsp
.cfi_def_cfa_register 6
sub rsp, 672
mov QWORD PTR -584[rbp], rdi
mov QWORD PTR -592[rbp], rsi
mov QWORD PTR -600[rbp], rdx
mov QWORD PTR -608[rbp], rcx
mov QWORD PTR -616[rbp], r8
mov QWORD PTR -624[rbp], r9
mov rax, QWORD PTR 16[rbp]
mov QWORD PTR -632[rbp], rax
mov rax, QWORD PTR 24[rbp]
mov QWORD PTR -640[rbp], rax
mov rax, QWORD PTR 32[rbp]
mov QWORD PTR -648[rbp], rax
mov rax, QWORD PTR 40[rbp]
mov QWORD PTR -656[rbp], rax
mov rax, QWORD PTR 48[rbp]
mov QWORD PTR -664[rbp], rax
mov rax, QWORD PTR fs:40
mov QWORD PTR -8[rbp], rax
xor eax, eax
mov eax, 0
call __htc_get_unit_count@PLT
mov DWORD PTR -564[rbp], eax
mov rax, QWORD PTR -592[rbp]
mov QWORD PTR -552[rbp], rax
mov rax, QWORD PTR -552[rbp]
add rax, 63
shr rax, 6
mov QWORD PTR -544[rbp], rax
jmp .L34
.L39:
mov rax, QWORD PTR -656[rbp]
mov rdx, QWORD PTR [rax]
mov rax, QWORD PTR -664[rbp]
mov QWORD PTR [rax], rdx
mov QWORD PTR -560[rbp], 0
mov DWORD PTR -568[rbp], 0
jmp .L35
.L36:
mov eax, DWORD PTR -568[rbp]
cdqe
mov QWORD PTR -528[rbp+rax*8], 0
add DWORD PTR -568[rbp], 1
.L35:
mov eax, DWORD PTR -568[rbp]
cmp eax, DWORD PTR -564[rbp]
jl .L36
mov rax, QWORD PTR -544[rbp]
mov r8d, eax
mov rax, QWORD PTR -640[rbp]
mov rsi, QWORD PTR [rax]
mov rax, QWORD PTR -632[rbp]
mov rdx, QWORD PTR [rax]
mov rax, QWORD PTR -584[rbp]
and eax, 16777215
cmp rax, 64
sete al
movzx eax, al
cdqe
mov r10, rax
mov rdi, QWORD PTR -624[rbp]
mov rax, QWORD PTR -600[rbp]
sub rsp, 8
lea rcx, -528[rbp]
push rcx
push r8
push QWORD PTR -616[rbp]
mov r9, rdi
mov r8, rsi
mov rcx, rdx
mov rdx, r10
mov rsi, rax
mov edi, 2
call bottom_up_ctl
add rsp, 32
mov BYTE PTR -569[rbp], 0
jmp .L37
.L38:
movzx eax, BYTE PTR -569[rbp]
cdqe
mov rax, QWORD PTR -528[rbp+rax*8]
add QWORD PTR -560[rbp], rax
movzx eax, BYTE PTR -569[rbp]
add eax, 1
mov BYTE PTR -569[rbp], al
.L37:
movzx eax, BYTE PTR -569[rbp]
cmp DWORD PTR -564[rbp], eax
jg .L38
mov rax, QWORD PTR -656[rbp]
mov rdx, QWORD PTR [rax]
mov rax, QWORD PTR -560[rbp]
add rdx, rax
mov rax, QWORD PTR -656[rbp]
mov QWORD PTR [rax], rdx
mov rax, QWORD PTR -664[rbp]
mov rdx, QWORD PTR [rax]
mov rax, QWORD PTR -648[rbp]
mov QWORD PTR [rax], rdx
mov rax, QWORD PTR -632[rbp]
mov rax, QWORD PTR [rax]
mov QWORD PTR -536[rbp], rax
mov rax, QWORD PTR -640[rbp]
mov rdx, QWORD PTR [rax]
mov rax, QWORD PTR -632[rbp]
mov QWORD PTR [rax], rdx
mov rax, QWORD PTR -640[rbp]
mov rdx, QWORD PTR -536[rbp]
mov QWORD PTR [rax], rdx
.L34:
mov rax, QWORD PTR -648[rbp]
mov rdx, QWORD PTR [rax]
mov rax, QWORD PTR -656[rbp]
mov rax, QWORD PTR [rax]
cmp rdx, rax
jne .L39
nop
mov rax, QWORD PTR -8[rbp]
sub rax, QWORD PTR fs:40
je .L40
call __stack_chk_fail@PLT
.L40:
leave
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE4:
.size pers_bottom_up, .-pers_bottom_up
.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 "110230.c"
.text
.align 2
.global bufp
.syntax unified
.arm
.fpu softvfp
.type bufp, %function
bufp:
@ args = 8, pretend = 0, frame = 64
@ frame_needed = 1, uses_anonymous_args = 0
@ link register save eliminated.
push {r4, r5, r6, r7, r8, r9, fp}
add fp, sp, #24
sub sp, sp, #68
str r0, [fp, #-72]
str r1, [fp, #-76]
str r2, [fp, #-80]
str r3, [fp, #-84]
mov r3, #1
strb r3, [fp, #-62]
ldr r3, [fp, #-72]
lsl r3, r3, #4
ldr r2, [fp, #-76]
add r3, r2, r3
ldmia r3, {r2-r3}
str r2, [fp, #-52]
str r3, [fp, #-48]
ldr r3, [fp, #-72]
lsl r3, r3, #4
add r3, r3, #8
ldr r2, [fp, #-76]
add r3, r2, r3
ldmia r3, {r2-r3}
str r2, [fp, #-44]
str r3, [fp, #-40]
b .L2
.L5:
ldrb r1, [fp, #8] @ zero_extendqisi2
sub r3, fp, #52
ldmia r3, {r2-r3}
sub ip, r1, #32
rsb r0, r1, #32
lsl r7, r3, r1
orr r7, r7, r2, lsl ip
orr r7, r7, r2, lsr r0
lsl r6, r2, r1
mov r3, r6
lsl r3, r3, #2
ldr r2, [fp, #-80]
add r3, r2, r3
ldr r3, [r3]
str r3, [fp, #-60]
ldr r3, [fp, #-60]
lsr r3, r3, #6
str r3, [fp, #-56]
ldr r3, [fp, #-56]
lsl r3, r3, #3
ldr r2, [fp, #4]
add r3, r2, r3
ldmia r3, {r2-r3}
str r2, [fp, #-36]
str r3, [fp, #-32]
ldr r3, [fp, #-60]
and r3, r3, #255
and r3, r3, #63
strb r3, [fp, #-61]
mov r3, #0
strb r3, [fp, #-62]
ldrb r1, [fp, #-61] @ zero_extendqisi2
sub r3, fp, #36
ldmia r3, {r2-r3}
rsb ip, r1, #32
sub r0, r1, #32
lsr r4, r2, r1
orr r4, r4, r3, lsl ip
orr r4, r4, r3, lsr r0
lsr r5, r3, r1
mov r2, #1
mov r3, #0
and r8, r4, r2
and r9, r5, r3
orrs r3, r8, r9
bne .L3
mov r3, #1
strb r3, [fp, #-62]
ldr r3, [fp, #-72]
lsl r3, r3, #3
ldr r2, [fp, #-84]
add r1, r2, r3
ldr r3, [fp, #-60]
mov r2, r3
mov r3, #0
stm r1, {r2-r3}
b .L4
.L3:
sub r3, fp, #52
ldmia r3, {r2-r3}
adds r1, r2, #1
str r1, [fp, #-92]
adc r3, r3, #0
str r3, [fp, #-88]
sub r3, fp, #92
ldmia r3, {r2-r3}
str r2, [fp, #-52]
str r3, [fp, #-48]
.L2:
sub r1, fp, #52
ldmia r1, {r0-r1}
sub r3, fp, #44
ldmia r3, {r2-r3}
cmp r1, r3
cmpeq r0, r2
bcc .L5
.L4:
ldrb r3, [fp, #-62] @ zero_extendqisi2
mov r0, r3
sub sp, fp, #24
@ sp needed
pop {r4, r5, r6, r7, r8, r9, fp}
bx lr
.size bufp, .-bufp
.global __aeabi_uidiv
.align 2
.global bottom_up_ctl
.syntax unified
.arm
.fpu softvfp
.type bottom_up_ctl, %function
bottom_up_ctl:
@ args = 20, pretend = 0, frame = 112
@ frame_needed = 1, uses_anonymous_args = 0
push {r4, r5, r6, r7, r8, r9, fp, lr}
add fp, sp, #28
sub sp, sp, #120
str r1, [fp, #-100]
str r2, [fp, #-104]
str r3, [fp, #-108]
mov r3, r0
strb r3, [fp, #-93]
bl __htc_get_unit_count
mov r3, r0
strb r3, [fp, #-86]
ldrb r3, [fp, #-86] @ zero_extendqisi2
mov r1, r3
ldr r0, [fp, #16]
bl __aeabi_uidiv
mov r3, r0
add r3, r3, #1
str r3, [fp, #-64]
bl omp_get_team_num
mov r3, r0
strb r3, [fp, #-85]
ldrb r2, [fp, #-85] @ zero_extendqisi2
ldr r3, [fp, #-64]
mul r3, r2, r3
mov r2, r3
mov r3, #0
str r2, [fp, #-36]
str r3, [fp, #-32]
ldr r3, [fp, #-64]
mov r0, r3
mov r1, #0
sub r3, fp, #36
ldmia r3, {r2-r3}
adds ip, r2, r0
str ip, [fp, #-132]
adc r3, r3, r1
str r3, [fp, #-128]
sub r3, fp, #132
ldmia r3, {r2-r3}
str r2, [fp, #-52]
str r3, [fp, #-48]
ldr r3, [fp, #16]
mov r0, r3
mov r1, #0
sub r3, fp, #52
ldmia r3, {r2-r3}
cmp r3, r1
cmpeq r2, r0
bls .L8
ldr r3, [fp, #16]
mov r2, r3
mov r3, #0
str r2, [fp, #-52]
str r3, [fp, #-48]
.L8:
ldr r2, [fp, #-52]
ldr r3, [fp, #-36]
sub r3, r2, r3
add r3, r3, #1
str r3, [fp, #-60]
mov r3, #0
str r3, [fp, #-80]
ldr r3, [fp, #-60]
cmp r3, #512
bls .L9
mov r3, #512
str r3, [fp, #-60]
.L9:
ldrb r3, [fp, #-93] @ zero_extendqisi2
cmp r3, #2
beq .L10
cmp r3, #2
bgt .L11
cmp r3, #0
beq .L12
cmp r3, #1
beq .L13
b .L11
.L12:
ldr r3, [fp, #-36]
str r3, [fp, #-76]
b .L14
.L15:
ldr r3, [fp, #-76]
lsl r3, r3, #3
ldr r2, [fp, #-100]
add r1, r2, r3
mvn r2, #0
mvn r3, #0
stm r1, {r2-r3}
ldr r3, [fp, #-76]
add r3, r3, #1
str r3, [fp, #-76]
.L14:
ldr r3, [fp, #-76]
mov r2, r3
mov r3, #0
sub r1, fp, #52
ldmia r1, {r0-r1}
cmp r1, r3
cmpeq r0, r2
bhi .L15
b .L11
.L13:
ldr r3, [fp, #-36]
str r3, [fp, #-72]
b .L16
.L17:
ldr r3, [fp, #-72]
lsl r3, r3, #4
ldr r2, [fp, #-104]
add r0, r2, r3
ldr r3, [fp, #-72]
lsl r3, r3, #4
add r3, r3, #8
ldr r2, [fp, #-104]
add r3, r2, r3
ldmia r3, {r2-r3}
mov r3, r2
lsl r3, r3, #3
ldr r2, [fp, #-100]
add r1, r2, r3
ldmia r0, {r2-r3}
stm r1, {r2-r3}
ldr r3, [fp, #-72]
add r3, r3, #1
str r3, [fp, #-72]
.L16:
ldr r3, [fp, #-72]
mov r2, r3
mov r3, #0
sub r1, fp, #52
ldmia r1, {r0-r1}
cmp r1, r3
cmpeq r0, r2
bhi .L17
b .L11
.L10:
ldr r3, [fp, #-36]
str r3, [fp, #-68]
b .L18
.L28:
mov r3, #0
strb r3, [fp, #-88]
mov r3, #0
strb r3, [fp, #-87]
ldr r3, [fp, #-68]
lsl r3, r3, #3
ldr r2, [fp, #-108]
add r3, r2, r3
ldmia r3, {r2-r3}
str r2, [fp, #-44]
str r3, [fp, #-40]
sub r3, fp, #44
ldmia r3, {r2-r3}
orrs r3, r2, r3
beq .L19
b .L20
.L26:
ldrb r1, [fp, #-88] @ zero_extendqisi2
sub r3, fp, #44
ldmia r3, {r2-r3}
rsb ip, r1, #32
sub r0, r1, #32
lsr r4, r2, r1
orr r4, r4, r3, lsl ip
orr r4, r4, r3, lsr r0
lsr r5, r3, r1
mov r2, #1
mov r3, #0
and r1, r4, r2
str r1, [fp, #-116]
and r3, r5, r3
str r3, [fp, #-112]
sub r3, fp, #116
ldmia r3, {r2-r3}
orrs r3, r2, r3
beq .L21
ldr r3, [fp, #-68]
lsl r2, r3, #6
ldrb r3, [fp, #-88] @ zero_extendqisi2
add r3, r2, r3
str r3, [fp, #-56]
ldr r3, [fp, #-104]
and r3, r3, #255
and r3, r3, #1
and r3, r3, #255
str r3, [sp, #4]
ldr r3, [fp, #-108]
str r3, [sp]
ldr r3, [fp, #-100]
ldr r2, [fp, #12]
ldr r1, [fp, #8]
ldr r0, [fp, #-56]
bl bufp
mov r3, r0
and r3, r3, #1
cmp r3, #0
beq .L22
ldrb r1, [fp, #-88] @ zero_extendqisi2
mov r2, #1
mov r3, #0
sub ip, r1, #32
rsb r0, r1, #32
lsl r7, r3, r1
orr r7, r7, r2, lsl ip
orr r7, r7, r2, lsr r0
lsl r6, r2, r1
mvn r3, r6
str r3, [fp, #-124]
mvn r3, r7
str r3, [fp, #-120]
sub r3, fp, #44
ldmia r3, {r2-r3}
sub r1, fp, #124
ldmia r1, {r0-r1}
mov ip, r0
and ip, r2, ip
str ip, [fp, #-140]
and r3, r3, r1
str r3, [fp, #-136]
sub r3, fp, #140
ldmia r3, {r2-r3}
str r2, [fp, #-44]
str r3, [fp, #-40]
ldrb r3, [fp, #-87] @ zero_extendqisi2
add r3, r3, #1
strb r3, [fp, #-87]
b .L22
.L21:
ldrb r3, [fp, #-88] @ zero_extendqisi2
add r1, r3, #1
sub r3, fp, #44
ldmia r3, {r2-r3}
rsb ip, r1, #32
sub r0, r1, #32
lsr r8, r2, r1
orr r8, r8, r3, lsl ip
orr r8, r8, r3, lsr r0
lsr r9, r3, r1
strh r8, [fp, #-84] @ movhi
mov r3, #0
strh r3, [fp, #-82] @ movhi
ldrh r3, [fp, #-84]
and r3, r3, #255
cmp r3, #0
bne .L23
mov r3, #8
strh r3, [fp, #-82] @ movhi
ldrh r3, [fp, #-84]
lsr r3, r3, #8
strh r3, [fp, #-84] @ movhi
.L23:
ldrh r3, [fp, #-84]
and r3, r3, #15
cmp r3, #0
bne .L24
ldrh r3, [fp, #-82] @ movhi
add r3, r3, #4
strh r3, [fp, #-82] @ movhi
ldrh r3, [fp, #-84]
lsr r3, r3, #4
strh r3, [fp, #-84] @ movhi
.L24:
ldrh r3, [fp, #-84]
and r3, r3, #3
cmp r3, #0
bne .L25
ldrh r3, [fp, #-82] @ movhi
add r3, r3, #2
strh r3, [fp, #-82] @ movhi
ldrh r3, [fp, #-84]
lsr r3, r3, #2
strh r3, [fp, #-84] @ movhi
.L25:
ldrh r3, [fp, #-84]
and r3, r3, #1
cmp r3, #0
moveq r3, #1
movne r3, #0
and r3, r3, #255
lsl r3, r3, #16
lsr r2, r3, #16
ldrh r3, [fp, #-82] @ movhi
add r3, r2, r3
strh r3, [fp, #-82] @ movhi
ldrh r3, [fp, #-82] @ movhi
and r2, r3, #255
ldrb r3, [fp, #-88]
add r3, r2, r3
strb r3, [fp, #-88]
.L22:
ldrb r3, [fp, #-88] @ zero_extendqisi2
add r3, r3, #1
strb r3, [fp, #-88]
.L20:
ldrb r3, [fp, #-88] @ zero_extendqisi2
cmp r3, #63
bls .L26
.L19:
ldrb r3, [fp, #-87] @ zero_extendqisi2
cmp r3, #0
beq .L27
ldrb r3, [fp, #-87] @ zero_extendqisi2
ldr r2, [fp, #-80]
add r3, r2, r3
str r3, [fp, #-80]
.L27:
ldr r3, [fp, #-68]
lsl r3, r3, #3
ldr r2, [fp, #4]
add r1, r2, r3
sub r3, fp, #44
ldmia r3, {r2-r3}
stm r1, {r2-r3}
ldr r3, [fp, #-68]
add r3, r3, #1
str r3, [fp, #-68]
.L18:
ldr r3, [fp, #-68]
mov r0, r3
mov r1, #0
sub r3, fp, #52
ldmia r3, {r2-r3}
cmp r3, r1
cmpeq r2, r0
bhi .L28
ldr r3, [fp, #-80]
mov r2, r3
mov r3, #0
ldr r1, [fp, #20]
stm r1, {r2-r3}
nop
.L11:
ldrb r3, [fp, #-93] @ zero_extendqisi2
cmp r3, #2
bne .L30
ldrb r3, [fp, #-85] @ zero_extendqisi2
lsl r3, r3, #3
ldr r2, [fp, #20]
add r1, r2, r3
ldr r3, [fp, #-80]
mov r2, r3
mov r3, #0
stm r1, {r2-r3}
.L30:
nop
sub sp, fp, #28
@ sp needed
pop {r4, r5, r6, r7, r8, r9, fp, pc}
.size bottom_up_ctl, .-bottom_up_ctl
.align 2
.global pers_init_bfs_tree
.syntax unified
.arm
.fpu softvfp
.type pers_init_bfs_tree, %function
pers_init_bfs_tree:
@ args = 0, pretend = 0, frame = 24
@ frame_needed = 1, uses_anonymous_args = 0
push {fp, lr}
add fp, sp, #4
sub sp, sp, #48
str r0, [fp, #-20]
str r1, [fp, #-16]
str r2, [fp, #-24]
sub r3, fp, #20
ldmia r3, {r2-r3}
str r2, [fp, #-12]
str r3, [fp, #-8]
ldr r3, [fp, #-12]
mov r2, #0
str r2, [sp, #16]
str r3, [sp, #12]
mov r3, #0
str r3, [sp, #8]
mov r3, #0
str r3, [sp, #4]
mov r3, #0
str r3, [sp]
mov r3, #0
mov r2, #0
ldr r1, [fp, #-24]
mov r0, #0
bl bottom_up_ctl
nop
sub sp, fp, #4
@ sp needed
pop {fp, pc}
.size pers_init_bfs_tree, .-pers_init_bfs_tree
.align 2
.global pers_scatter_bfs
.syntax unified
.arm
.fpu softvfp
.type pers_scatter_bfs, %function
pers_scatter_bfs:
@ args = 0, pretend = 0, frame = 32
@ frame_needed = 1, uses_anonymous_args = 0
push {fp, lr}
add fp, sp, #4
sub sp, sp, #56
str r0, [fp, #-24]
str r1, [fp, #-28]
str r2, [fp, #-32]
ldr r3, [fp, #-24]
ldmia r3, {r2-r3}
str r2, [fp, #-20]
str r3, [fp, #-16]
sub r3, fp, #20
ldmia r3, {r2-r3}
str r2, [fp, #-12]
str r3, [fp, #-8]
ldr r3, [fp, #-12]
mov r2, #0
str r2, [sp, #16]
str r3, [sp, #12]
mov r3, #0
str r3, [sp, #8]
mov r3, #0
str r3, [sp, #4]
mov r3, #0
str r3, [sp]
mov r3, #0
ldr r2, [fp, #-32]
ldr r1, [fp, #-28]
mov r0, #1
bl bottom_up_ctl
nop
sub sp, fp, #4
@ sp needed
pop {fp, pc}
.size pers_scatter_bfs, .-pers_scatter_bfs
.section .rodata
.align 2
.LC0:
.word __stack_chk_guard
.text
.align 2
.global pers_bottom_up
.syntax unified
.arm
.fpu softvfp
.type pers_bottom_up, %function
pers_bottom_up:
@ args = 36, pretend = 0, frame = 624
@ frame_needed = 1, uses_anonymous_args = 0
push {r4, r5, r6, r7, r8, r9, fp, lr}
add fp, sp, #28
sub sp, sp, #648
str r0, [fp, #-596]
str r1, [fp, #-592]
str r2, [fp, #-604]
str r3, [fp, #-600]
ldr r3, [fp, #4]
str r3, [fp, #-608]
ldr r3, [fp, #8]
str r3, [fp, #-612]
ldr r3, [fp, #12]
str r3, [fp, #-616]
ldr r3, [fp, #16]
str r3, [fp, #-620]
ldr r3, [fp, #20]
str r3, [fp, #-624]
ldr r3, [fp, #24]
str r3, [fp, #-628]
ldr r3, [fp, #28]
str r3, [fp, #-632]
ldr r3, [fp, #32]
str r3, [fp, #-636]
ldr r3, [fp, #36]
str r3, [fp, #-640]
ldr r3, .L43
ldr r3, [r3]
str r3, [fp, #-32]
mov r3,#0
bl __htc_get_unit_count
str r0, [fp, #-580]
sub r3, fp, #604
ldmia r3, {r2-r3}
str r2, [fp, #-564]
str r3, [fp, #-560]
sub r3, fp, #564
ldmia r3, {r2-r3}
adds r4, r2, #63
adc r5, r3, #0
mov r2, #0
mov r3, #0
lsr r2, r4, #6
orr r2, r2, r5, lsl #26
lsr r3, r5, #6
str r2, [fp, #-556]
str r3, [fp, #-552]
b .L34
.L41:
ldr r3, [fp, #-636]
ldmia r3, {r2-r3}
ldr r1, [fp, #-640]
stm r1, {r2-r3}
mov r2, #0
mov r3, #0
str r2, [fp, #-572]
str r3, [fp, #-568]
mov r3, #0
str r3, [fp, #-584]
b .L35
.L36:
ldr r3, [fp, #-584]
lsl r3, r3, #3
sub r2, fp, #28
add r3, r2, r3
sub r1, r3, #520
mov r2, #0
mov r3, #0
stm r1, {r2-r3}
ldr r3, [fp, #-584]
add r3, r3, #1
str r3, [fp, #-584]
.L35:
ldr r2, [fp, #-584]
ldr r3, [fp, #-580]
cmp r2, r3
blt .L36
sub r3, fp, #596
ldmia r3, {r2-r3}
mvn r0, #-16777216
mov r1, #0
and r6, r2, r0
and r7, r3, r1
cmp r7, #0
cmpeq r6, #64
bne .L37
mov r0, #1
b .L38
.L37:
mov r0, #0
.L38:
ldr r3, [fp, #-624]
ldr ip, [r3]
ldr r3, [fp, #-628]
ldr r3, [r3]
ldr r2, [fp, #-556]
sub r1, fp, #548
str r1, [sp, #16]
str r2, [sp, #12]
ldr r2, [fp, #-616]
str r2, [sp, #8]
ldr r2, [fp, #-620]
str r2, [sp, #4]
str r3, [sp]
mov r3, ip
mov r2, r0
ldr r1, [fp, #-608]
mov r0, #2
bl bottom_up_ctl
mov r3, #0
strb r3, [fp, #-585]
b .L39
.L40:
ldrb r3, [fp, #-585] @ zero_extendqisi2
lsl r3, r3, #3
sub r2, fp, #28
add r3, r2, r3
sub r3, r3, #520
ldmia r3, {r2-r3}
sub r1, fp, #572
ldmia r1, {r0-r1}
adds ip, r0, r2
str ip, [fp, #-652]
adc r3, r1, r3
str r3, [fp, #-648]
sub r4, fp, #652
ldmia r4, {r3-r4}
str r3, [fp, #-572]
str r4, [fp, #-568]
ldrb r3, [fp, #-585] @ zero_extendqisi2
add r3, r3, #1
strb r3, [fp, #-585]
.L39:
ldrb r3, [fp, #-585] @ zero_extendqisi2
ldr r2, [fp, #-580]
cmp r2, r3
bgt .L40
ldr r3, [fp, #-636]
ldmia r3, {r0-r1}
sub r3, fp, #572
ldmia r3, {r2-r3}
adds r8, r0, r2
adc r9, r1, r3
ldr r3, [fp, #-636]
stm r3, {r8-r9}
ldr r3, [fp, #-640]
ldmia r3, {r2-r3}
ldr r1, [fp, #-632]
stm r1, {r2-r3}
ldr r3, [fp, #-624]
ldr r3, [r3]
str r3, [fp, #-576]
ldr r3, [fp, #-628]
ldr r2, [r3]
ldr r3, [fp, #-624]
str r2, [r3]
ldr r3, [fp, #-628]
ldr r2, [fp, #-576]
str r2, [r3]
.L34:
ldr r3, [fp, #-632]
ldmia r3, {r0-r1}
ldr r3, [fp, #-636]
ldmia r3, {r2-r3}
cmp r1, r3
cmpeq r0, r2
bne .L41
nop
ldr r3, .L43
ldr r2, [r3]
ldr r3, [fp, #-32]
eors r2, r3, r2
mov r3, #0
beq .L42
bl __stack_chk_fail
.L42:
sub sp, fp, #28
@ sp needed
pop {r4, r5, r6, r7, r8, r9, fp, pc}
.L44:
.align 2
.L43:
.word .LC0
.size pers_bottom_up, .-pers_bottom_up
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",%progbits
|
.file "498569.c"
.intel_syntax noprefix
.text
.section .rodata
.LC0:
.string "\n Enter No :: "
.LC1:
.string "%d"
.LC2:
.string "\n zero"
.LC3:
.string " Ten "
.LC4:
.string " Elevan "
.LC5:
.string " Twelve "
.LC6:
.string " Thirteen "
.LC7:
.string " Twenty "
.LC8:
.string " Thirty "
.LC9:
.string " One "
.LC10:
.string " Two "
.LC11:
.string " Three "
.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, 32
mov rax, QWORD PTR fs:40
mov QWORD PTR -8[rbp], rax
xor eax, eax
lea rdi, .LC0[rip]
mov eax, 0
call printf@PLT
lea rax, -20[rbp]
mov rsi, rax
lea rdi, .LC1[rip]
mov eax, 0
call __isoc99_scanf@PLT
mov eax, DWORD PTR -20[rbp]
test eax, eax
jne .L2
lea rdi, .LC2[rip]
mov eax, 0
call printf@PLT
jmp .L3
.L2:
mov edx, DWORD PTR -20[rbp]
movsx rax, edx
imul rax, rax, 1717986919
shr rax, 32
sar eax, 2
mov ecx, edx
sar ecx, 31
sub eax, ecx
mov DWORD PTR -16[rbp], eax
mov ecx, DWORD PTR -16[rbp]
mov eax, ecx
sal eax, 2
add eax, ecx
add eax, eax
sub edx, eax
mov DWORD PTR -16[rbp], edx
mov eax, DWORD PTR -20[rbp]
movsx rdx, eax
imul rdx, rdx, 1717986919
shr rdx, 32
sar edx, 2
sar eax, 31
mov ecx, eax
mov eax, edx
sub eax, ecx
mov DWORD PTR -12[rbp], eax
cmp DWORD PTR -12[rbp], 3
je .L4
cmp DWORD PTR -12[rbp], 3
jg .L5
cmp DWORD PTR -12[rbp], 1
je .L6
cmp DWORD PTR -12[rbp], 2
je .L7
jmp .L5
.L6:
cmp DWORD PTR -16[rbp], 3
je .L8
cmp DWORD PTR -16[rbp], 3
jg .L18
cmp DWORD PTR -16[rbp], 2
je .L10
cmp DWORD PTR -16[rbp], 2
jg .L18
cmp DWORD PTR -16[rbp], 0
je .L11
cmp DWORD PTR -16[rbp], 1
je .L12
jmp .L18
.L11:
lea rdi, .LC3[rip]
mov eax, 0
call printf@PLT
jmp .L9
.L12:
lea rdi, .LC4[rip]
mov eax, 0
call printf@PLT
jmp .L9
.L10:
lea rdi, .LC5[rip]
mov eax, 0
call printf@PLT
jmp .L9
.L8:
lea rdi, .LC6[rip]
mov eax, 0
call printf@PLT
nop
.L9:
jmp .L18
.L7:
lea rdi, .LC7[rip]
mov eax, 0
call printf@PLT
jmp .L5
.L4:
lea rdi, .LC8[rip]
mov eax, 0
call printf@PLT
jmp .L5
.L18:
nop
.L5:
cmp DWORD PTR -12[rbp], 1
je .L19
cmp DWORD PTR -16[rbp], 3
je .L13
cmp DWORD PTR -16[rbp], 3
jg .L3
cmp DWORD PTR -16[rbp], 1
je .L14
cmp DWORD PTR -16[rbp], 2
je .L15
jmp .L3
.L14:
lea rdi, .LC9[rip]
mov eax, 0
call printf@PLT
jmp .L3
.L15:
lea rdi, .LC10[rip]
mov eax, 0
call printf@PLT
jmp .L3
.L13:
lea rdi, .LC11[rip]
mov eax, 0
call printf@PLT
jmp .L3
.L19:
nop
.L3:
mov eax, 0
mov rsi, QWORD PTR -8[rbp]
sub rsi, QWORD PTR fs:40
je .L17
call __stack_chk_fail@PLT
.L17:
leave
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE6:
.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 "498569.c"
.text
.section .rodata
.align 2
.LC0:
.ascii "\012 Enter No :: \000"
.align 2
.LC1:
.ascii "%d\000"
.align 2
.LC2:
.ascii "\012 zero\000"
.align 2
.LC3:
.ascii " Ten \000"
.align 2
.LC4:
.ascii " Elevan \000"
.align 2
.LC5:
.ascii " Twelve \000"
.align 2
.LC6:
.ascii " Thirteen \000"
.align 2
.LC7:
.ascii " Twenty \000"
.align 2
.LC8:
.ascii " Thirty \000"
.align 2
.LC9:
.ascii " One \000"
.align 2
.LC10:
.ascii " Two \000"
.align 2
.LC11:
.ascii " Three \000"
.align 2
.LC12:
.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, .L21
ldr r3, [r3]
str r3, [fp, #-8]
mov r3,#0
ldr r0, .L21+4
bl printf
sub r3, fp, #20
mov r1, r3
ldr r0, .L21+8
bl __isoc99_scanf
ldr r3, [fp, #-20]
cmp r3, #0
bne .L2
ldr r0, .L21+12
bl printf
b .L3
.L2:
ldr r2, [fp, #-20]
ldr r3, .L21+16
smull r1, r3, r2, r3
asr r1, r3, #2
asr r3, r2, #31
sub r1, r1, r3
mov r3, r1
lsl r3, r3, #2
add r3, r3, r1
lsl r3, r3, #1
sub r3, r2, r3
str r3, [fp, #-16]
ldr r3, [fp, #-20]
ldr r2, .L21+16
smull r1, r2, r3, r2
asr r2, r2, #2
asr r3, r3, #31
sub r3, r2, r3
str r3, [fp, #-12]
ldr r3, [fp, #-12]
cmp r3, #3
beq .L4
ldr r3, [fp, #-12]
cmp r3, #3
bgt .L5
ldr r3, [fp, #-12]
cmp r3, #1
beq .L6
ldr r3, [fp, #-12]
cmp r3, #2
beq .L7
b .L5
.L6:
ldr r3, [fp, #-16]
cmp r3, #3
ldrls pc, [pc, r3, asl #2]
b .L19
.L10:
.word .L13
.word .L12
.word .L11
.word .L9
.L13:
ldr r0, .L21+20
bl printf
b .L8
.L12:
ldr r0, .L21+24
bl printf
b .L8
.L11:
ldr r0, .L21+28
bl printf
b .L8
.L9:
ldr r0, .L21+32
bl printf
nop
.L8:
b .L19
.L7:
ldr r0, .L21+36
bl printf
b .L5
.L4:
ldr r0, .L21+40
bl printf
b .L5
.L19:
nop
.L5:
ldr r3, [fp, #-12]
cmp r3, #1
beq .L20
ldr r3, [fp, #-16]
cmp r3, #3
beq .L14
ldr r3, [fp, #-16]
cmp r3, #3
bgt .L3
ldr r3, [fp, #-16]
cmp r3, #1
beq .L15
ldr r3, [fp, #-16]
cmp r3, #2
beq .L16
b .L3
.L15:
ldr r0, .L21+44
bl printf
b .L3
.L16:
ldr r0, .L21+48
bl printf
b .L3
.L14:
ldr r0, .L21+52
bl printf
b .L3
.L20:
nop
.L3:
mov r3, #0
ldr r2, .L21
ldr r1, [r2]
ldr r2, [fp, #-8]
eors r1, r2, r1
mov r2, #0
beq .L18
bl __stack_chk_fail
.L18:
mov r0, r3
sub sp, fp, #4
@ sp needed
pop {fp, pc}
.L22:
.align 2
.L21:
.word .LC12
.word .LC0
.word .LC1
.word .LC2
.word 1717986919
.word .LC3
.word .LC4
.word .LC5
.word .LC6
.word .LC7
.word .LC8
.word .LC9
.word .LC10
.word .LC11
.size main, .-main
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",%progbits
|
.file "640965.c"
.intel_syntax noprefix
.text
.section .rodata
.LC0:
.string "Informe o 1o valor: "
.LC1:
.string "%d"
.LC2:
.string "Informe o 2o valor: "
.LC3:
.string "Numeros iguais=%d\n"
.LC4:
.string "Numeros diferentes %d e %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, 16
mov rax, QWORD PTR fs:40
mov QWORD PTR -8[rbp], rax
xor eax, eax
lea rdi, .LC0[rip]
mov eax, 0
call printf@PLT
lea rax, -16[rbp]
mov rsi, rax
lea rdi, .LC1[rip]
mov eax, 0
call __isoc99_scanf@PLT
lea rdi, .LC2[rip]
mov eax, 0
call printf@PLT
lea rax, -12[rbp]
mov rsi, rax
lea rdi, .LC1[rip]
mov eax, 0
call __isoc99_scanf@PLT
mov edx, DWORD PTR -16[rbp]
mov eax, DWORD PTR -12[rbp]
cmp edx, eax
jne .L2
mov eax, DWORD PTR -16[rbp]
mov esi, eax
lea rdi, .LC3[rip]
mov eax, 0
call printf@PLT
jmp .L3
.L2:
mov edx, DWORD PTR -12[rbp]
mov eax, DWORD PTR -16[rbp]
mov esi, eax
lea rdi, .LC4[rip]
mov eax, 0
call printf@PLT
.L3:
mov eax, 0
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
.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 "640965.c"
.text
.section .rodata
.align 2
.LC0:
.ascii "Informe o 1o valor: \000"
.align 2
.LC1:
.ascii "%d\000"
.align 2
.LC2:
.ascii "Informe o 2o valor: \000"
.align 2
.LC3:
.ascii "Numeros iguais=%d\012\000"
.align 2
.LC4:
.ascii "Numeros diferentes %d e %d\012\000"
.align 2
.LC5:
.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, .L6
ldr r3, [r3]
str r3, [fp, #-8]
mov r3,#0
ldr r0, .L6+4
bl printf
sub r3, fp, #16
mov r1, r3
ldr r0, .L6+8
bl __isoc99_scanf
ldr r0, .L6+12
bl printf
sub r3, fp, #12
mov r1, r3
ldr r0, .L6+8
bl __isoc99_scanf
ldr r2, [fp, #-16]
ldr r3, [fp, #-12]
cmp r2, r3
bne .L2
ldr r3, [fp, #-16]
mov r1, r3
ldr r0, .L6+16
bl printf
b .L3
.L2:
ldr r3, [fp, #-16]
ldr r2, [fp, #-12]
mov r1, r3
ldr r0, .L6+20
bl printf
.L3:
mov r3, #0
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 .LC5
.word .LC0
.word .LC1
.word .LC2
.word .LC3
.word .LC4
.size main, .-main
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",%progbits
|
.file "414299.c"
.intel_syntax noprefix
.text
.section .rodata
.LC0:
.string "QB A_B tape (A, tape )"
.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
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 "414299.c"
.text
.section .rodata
.align 2
.LC0:
.ascii "QB A_B tape (A, tape )\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
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 "95696.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 DWORD PTR -12[rbp], 10
mov eax, 0
call rand@PLT
mov DWORD PTR -4[rbp], eax
mov DWORD PTR -8[rbp], 0
mov eax, DWORD PTR -4[rbp]
not eax
shr eax, 31
movzx eax, al
mov edi, eax
mov eax, 0
call assume@PLT
mov DWORD PTR -16[rbp], 1
jmp .L2
.L4:
mov eax, DWORD PTR -16[rbp]
cmp eax, DWORD PTR -12[rbp]
jge .L3
add DWORD PTR -8[rbp], 2
.L3:
sub DWORD PTR -12[rbp], 1
add DWORD PTR -16[rbp], 1
.L2:
mov eax, DWORD PTR -16[rbp]
cmp eax, DWORD PTR -4[rbp]
jle .L4
mov eax, DWORD PTR -4[rbp]
add eax, eax
cmp DWORD PTR -8[rbp], eax
je .L5
cmp DWORD PTR -8[rbp], 0
jne .L6
.L5:
mov eax, 1
jmp .L7
.L6:
mov eax, 0
.L7:
mov edi, eax
mov eax, 0
call assert@PLT
nop
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 "95696.c"
.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
mov r3, #10
str r3, [fp, #-16]
bl rand
str r0, [fp, #-8]
mov r3, #0
str r3, [fp, #-12]
ldr r3, [fp, #-8]
mvn r3, r3
lsr r3, r3, #31
and r3, r3, #255
mov r0, r3
bl assume
mov r3, #1
str r3, [fp, #-20]
b .L2
.L4:
ldr r2, [fp, #-20]
ldr r3, [fp, #-16]
cmp r2, r3
bge .L3
ldr r3, [fp, #-12]
add r3, r3, #2
str r3, [fp, #-12]
.L3:
ldr r3, [fp, #-16]
sub r3, r3, #1
str r3, [fp, #-16]
ldr r3, [fp, #-20]
add r3, r3, #1
str r3, [fp, #-20]
.L2:
ldr r2, [fp, #-20]
ldr r3, [fp, #-8]
cmp r2, r3
ble .L4
ldr r3, [fp, #-8]
lsl r3, r3, #1
ldr r2, [fp, #-12]
cmp r2, r3
beq .L5
ldr r3, [fp, #-12]
cmp r3, #0
bne .L6
.L5:
mov r3, #1
b .L7
.L6:
mov r3, #0
.L7:
mov r0, r3
bl assert
nop
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 "38387.c"
.intel_syntax noprefix
.text
.section .rodata
.LC0:
.string "digite os numeros: %d-%d: "
.LC1:
.string "%d"
.align 8
.LC2:
.string "os numeros com indices iguais e: %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, 64
mov rax, QWORD PTR fs:40
mov QWORD PTR -8[rbp], rax
xor eax, eax
mov DWORD PTR -56[rbp], 0
jmp .L2
.L5:
mov DWORD PTR -52[rbp], 0
jmp .L3
.L4:
mov edx, DWORD PTR -52[rbp]
mov eax, DWORD PTR -56[rbp]
mov esi, eax
lea rdi, .LC0[rip]
mov eax, 0
call printf@PLT
lea rcx, -48[rbp]
mov eax, DWORD PTR -52[rbp]
movsx rsi, eax
mov eax, DWORD PTR -56[rbp]
movsx rdx, eax
mov rax, rdx
add rax, rax
add rax, rdx
add rax, rsi
sal rax, 2
add rax, rcx
mov rsi, rax
lea rdi, .LC1[rip]
mov eax, 0
call __isoc99_scanf@PLT
add DWORD PTR -52[rbp], 1
.L3:
cmp DWORD PTR -52[rbp], 2
jle .L4
add DWORD PTR -56[rbp], 1
.L2:
cmp DWORD PTR -56[rbp], 2
jle .L5
mov DWORD PTR -56[rbp], 0
jmp .L6
.L10:
mov DWORD PTR -52[rbp], 0
jmp .L7
.L9:
mov eax, DWORD PTR -56[rbp]
cmp eax, DWORD PTR -52[rbp]
jne .L8
mov eax, DWORD PTR -52[rbp]
movsx rcx, eax
mov eax, DWORD PTR -56[rbp]
movsx rdx, eax
mov rax, rdx
add rax, rax
add rax, rdx
add rax, rcx
mov eax, DWORD PTR -48[rbp+rax*4]
mov esi, eax
lea rdi, .LC2[rip]
mov eax, 0
call printf@PLT
.L8:
add DWORD PTR -52[rbp], 1
.L7:
cmp DWORD PTR -52[rbp], 2
jle .L9
add DWORD PTR -56[rbp], 1
.L6:
cmp DWORD PTR -56[rbp], 2
jle .L10
mov eax, 0
mov rdi, QWORD PTR -8[rbp]
sub rdi, QWORD PTR fs:40
je .L12
call __stack_chk_fail@PLT
.L12:
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 "38387.c"
.text
.section .rodata
.align 2
.LC0:
.ascii "digite os numeros: %d-%d: \000"
.align 2
.LC1:
.ascii "%d\000"
.align 2
.LC2:
.ascii "os numeros com indices iguais e: %d\012\000"
.align 2
.LC3:
.word __stack_chk_guard
.text
.align 2
.global main
.syntax unified
.arm
.fpu softvfp
.type main, %function
main:
@ args = 0, pretend = 0, frame = 48
@ frame_needed = 1, uses_anonymous_args = 0
push {fp, lr}
add fp, sp, #4
sub sp, sp, #48
ldr r3, .L13
ldr r3, [r3]
str r3, [fp, #-8]
mov r3,#0
mov r3, #0
str r3, [fp, #-52]
b .L2
.L5:
mov r3, #0
str r3, [fp, #-48]
b .L3
.L4:
ldr r2, [fp, #-48]
ldr r1, [fp, #-52]
ldr r0, .L13+4
bl printf
sub r1, fp, #44
ldr r2, [fp, #-52]
mov r3, r2
lsl r3, r3, #1
add r3, r3, r2
ldr r2, [fp, #-48]
add r3, r3, r2
lsl r3, r3, #2
add r3, r1, r3
mov r1, r3
ldr r0, .L13+8
bl __isoc99_scanf
ldr r3, [fp, #-48]
add r3, r3, #1
str r3, [fp, #-48]
.L3:
ldr r3, [fp, #-48]
cmp r3, #2
ble .L4
ldr r3, [fp, #-52]
add r3, r3, #1
str r3, [fp, #-52]
.L2:
ldr r3, [fp, #-52]
cmp r3, #2
ble .L5
mov r3, #0
str r3, [fp, #-52]
b .L6
.L10:
mov r3, #0
str r3, [fp, #-48]
b .L7
.L9:
ldr r2, [fp, #-52]
ldr r3, [fp, #-48]
cmp r2, r3
bne .L8
ldr r2, [fp, #-52]
mov r3, r2
lsl r3, r3, #1
add r3, r3, r2
ldr r2, [fp, #-48]
add r3, r3, r2
lsl r3, r3, #2
sub r2, fp, #4
add r3, r2, r3
ldr r3, [r3, #-40]
mov r1, r3
ldr r0, .L13+12
bl printf
.L8:
ldr r3, [fp, #-48]
add r3, r3, #1
str r3, [fp, #-48]
.L7:
ldr r3, [fp, #-48]
cmp r3, #2
ble .L9
ldr r3, [fp, #-52]
add r3, r3, #1
str r3, [fp, #-52]
.L6:
ldr r3, [fp, #-52]
cmp r3, #2
ble .L10
mov r3, #0
ldr r2, .L13
ldr r1, [r2]
ldr r2, [fp, #-8]
eors r1, r2, r1
mov r2, #0
beq .L12
bl __stack_chk_fail
.L12:
mov r0, r3
sub sp, fp, #4
@ sp needed
pop {fp, pc}
.L14:
.align 2
.L13:
.word .LC3
.word .LC0
.word .LC1
.word .LC2
.size main, .-main
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",%progbits
|
.file "621696.c"
.intel_syntax noprefix
.text
.section .rodata
.LC0:
.string "getcwd failed: %s\n"
.text
.globl print_cwd
.type print_cwd, @function
print_cwd:
.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, 16
mov esi, 0
mov edi, 0
call getcwd@PLT
mov QWORD PTR -8[rbp], rax
cmp QWORD PTR -8[rbp], 0
jne .L2
call __errno_location@PLT
mov eax, DWORD PTR [rax]
mov edi, eax
call strerror@PLT
mov rsi, rax
lea rdi, .LC0[rip]
mov eax, 0
call printf@PLT
mov edi, 1
call exit@PLT
.L2:
mov rax, QWORD PTR -8[rbp]
mov rdi, rax
call puts@PLT
mov rax, QWORD PTR -8[rbp]
mov rdi, rax
call free@PLT
nop
leave
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE6:
.size print_cwd, .-print_cwd
.section .rodata
.LC1:
.string "source"
.LC2:
.string "mkdir failed: %s\n"
.text
.globl mkdir_source
.type mkdir_source, @function
mkdir_source:
.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 esi, 493
lea rdi, .LC1[rip]
call mkdir@PLT
mov DWORD PTR -4[rbp], eax
cmp DWORD PTR -4[rbp], 0
je .L5
call __errno_location@PLT
mov eax, DWORD PTR [rax]
mov edi, eax
call strerror@PLT
mov rsi, rax
lea rdi, .LC2[rip]
mov eax, 0
call printf@PLT
mov edi, 1
call exit@PLT
.L5:
nop
leave
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE7:
.size mkdir_source, .-mkdir_source
.section .rodata
.LC3:
.string "chdir failed: %s\n"
.text
.globl chdir_source
.type chdir_source, @function
chdir_source:
.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, 16
lea rdi, .LC1[rip]
call chdir@PLT
mov DWORD PTR -4[rbp], eax
cmp DWORD PTR -4[rbp], 0
je .L8
call __errno_location@PLT
mov eax, DWORD PTR [rax]
mov edi, eax
call strerror@PLT
mov rsi, rax
lea rdi, .LC3[rip]
mov eax, 0
call printf@PLT
mov edi, 1
call exit@PLT
.L8:
nop
leave
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE8:
.size chdir_source, .-chdir_source
.section .rodata
.LC4:
.string "w"
.LC5:
.string "hello"
.text
.globl create_file
.type create_file, @function
create_file:
.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 -24[rbp], rdi
mov rax, QWORD PTR -24[rbp]
lea rsi, .LC4[rip]
mov rdi, rax
call fopen@PLT
mov QWORD PTR -8[rbp], rax
mov rax, QWORD PTR -8[rbp]
mov edx, 0
lea rsi, .LC5[rip]
mov rdi, rax
mov eax, 0
call fprintf@PLT
mov rax, QWORD PTR -8[rbp]
mov rdi, rax
call fclose@PLT
nop
leave
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE9:
.size create_file, .-create_file
.section .rodata
.LC6:
.string "link failed: %s\n"
.text
.globl create_hardlink
.type create_hardlink, @function
create_hardlink:
.LFB10:
.cfi_startproc
endbr64
push rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
mov rbp, rsp
.cfi_def_cfa_register 6
sub rsp, 32
mov QWORD PTR -24[rbp], rdi
mov QWORD PTR -32[rbp], rsi
mov rdx, QWORD PTR -32[rbp]
mov rax, QWORD PTR -24[rbp]
mov rsi, rdx
mov rdi, rax
call link@PLT
mov DWORD PTR -4[rbp], eax
cmp DWORD PTR -4[rbp], 0
je .L12
call __errno_location@PLT
mov eax, DWORD PTR [rax]
mov edi, eax
call strerror@PLT
mov rsi, rax
lea rdi, .LC6[rip]
mov eax, 0
call printf@PLT
mov edi, 1
call exit@PLT
.L12:
nop
leave
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE10:
.size create_hardlink, .-create_hardlink
.section .rodata
.LC7:
.string ".."
.text
.globl chdir_parent
.type chdir_parent, @function
chdir_parent:
.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
lea rdi, .LC7[rip]
call chdir@PLT
mov DWORD PTR -4[rbp], eax
cmp DWORD PTR -4[rbp], 0
je .L15
call __errno_location@PLT
mov eax, DWORD PTR [rax]
mov edi, eax
call strerror@PLT
mov rsi, rax
lea rdi, .LC3[rip]
mov eax, 0
call printf@PLT
mov edi, 1
call exit@PLT
.L15:
nop
leave
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE11:
.size chdir_parent, .-chdir_parent
.section .rodata
.LC8:
.string "target"
.text
.globl chdir_target
.type chdir_target, @function
chdir_target:
.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, 16
lea rdi, .LC8[rip]
call chdir@PLT
mov DWORD PTR -4[rbp], eax
cmp DWORD PTR -4[rbp], 0
je .L18
call __errno_location@PLT
mov eax, DWORD PTR [rax]
mov edi, eax
call strerror@PLT
mov rsi, rax
lea rdi, .LC3[rip]
mov eax, 0
call printf@PLT
mov edi, 1
call exit@PLT
.L18:
nop
leave
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE12:
.size chdir_target, .-chdir_target
.section .rodata
.LC9:
.string "stat failed: %s\n"
.text
.globl get_inode
.type get_inode, @function
get_inode:
.LFB13:
.cfi_startproc
endbr64
push rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
mov rbp, rsp
.cfi_def_cfa_register 6
sub rsp, 192
mov QWORD PTR -184[rbp], rdi
mov rax, QWORD PTR fs:40
mov QWORD PTR -8[rbp], rax
xor eax, eax
lea rdx, -160[rbp]
mov rax, QWORD PTR -184[rbp]
mov rsi, rdx
mov rdi, rax
call stat@PLT
mov DWORD PTR -164[rbp], eax
cmp DWORD PTR -164[rbp], 0
je .L20
call __errno_location@PLT
mov eax, DWORD PTR [rax]
mov edi, eax
call strerror@PLT
mov rsi, rax
lea rdi, .LC9[rip]
mov eax, 0
call printf@PLT
mov edi, 1
call exit@PLT
.L20:
mov rax, QWORD PTR -152[rbp]
mov rcx, QWORD PTR -8[rbp]
sub rcx, QWORD PTR fs:40
je .L22
call __stack_chk_fail@PLT
.L22:
leave
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE13:
.size get_inode, .-get_inode
.section .rodata
.LC10:
.string "file1"
.LC11:
.string "file2"
.LC12:
.string "file3"
.LC13:
.string "/bin/cp -Rp source target"
.align 8
.LC14:
.string "TEST FAILED: hardlinked files are not copied correct, inodes differs: %lli %lli %lli\n"
.align 8
.LC15:
.string "TEST SUCCESS: hardlinked files are copied correct, inodes the same"
.text
.globl main
.type main, @function
main:
.LFB14:
.cfi_startproc
endbr64
push rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
mov rbp, rsp
.cfi_def_cfa_register 6
sub rsp, 48
mov DWORD PTR -36[rbp], edi
mov QWORD PTR -48[rbp], rsi
mov eax, 0
call print_cwd
mov eax, 0
call mkdir_source
mov eax, 0
call chdir_source
lea rdi, .LC10[rip]
call create_file
lea rsi, .LC11[rip]
lea rdi, .LC10[rip]
call create_hardlink
lea rsi, .LC12[rip]
lea rdi, .LC11[rip]
call create_hardlink
mov eax, 0
call chdir_parent
lea rdi, .LC13[rip]
call system@PLT
mov eax, 0
call chdir_target
lea rdi, .LC10[rip]
call get_inode
mov QWORD PTR -24[rbp], rax
lea rdi, .LC11[rip]
call get_inode
mov QWORD PTR -16[rbp], rax
lea rdi, .LC12[rip]
call get_inode
mov QWORD PTR -8[rbp], rax
mov rax, QWORD PTR -24[rbp]
cmp rax, QWORD PTR -16[rbp]
jne .L24
mov rax, QWORD PTR -24[rbp]
cmp rax, QWORD PTR -8[rbp]
je .L25
.L24:
mov rcx, QWORD PTR -8[rbp]
mov rdx, QWORD PTR -16[rbp]
mov rax, QWORD PTR -24[rbp]
mov rsi, rax
lea rdi, .LC14[rip]
mov eax, 0
call printf@PLT
jmp .L26
.L25:
lea rdi, .LC15[rip]
mov eax, 0
call printf@PLT
.L26:
mov eax, 0
call chdir_parent
mov eax, 0
leave
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE14:
.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 "621696.c"
.text
.section .rodata
.align 2
.LC0:
.ascii "getcwd failed: %s\012\000"
.text
.align 2
.global print_cwd
.syntax unified
.arm
.fpu softvfp
.type print_cwd, %function
print_cwd:
@ 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 r1, #0
mov r0, #0
bl getcwd
str r0, [fp, #-8]
ldr r3, [fp, #-8]
cmp r3, #0
bne .L2
bl __errno_location
mov r3, r0
ldr r3, [r3]
mov r0, r3
bl strerror
mov r3, r0
mov r1, r3
ldr r0, .L3
bl printf
mov r0, #1
bl exit
.L2:
ldr r0, [fp, #-8]
bl puts
ldr r0, [fp, #-8]
bl free
nop
sub sp, fp, #4
@ sp needed
pop {fp, pc}
.L4:
.align 2
.L3:
.word .LC0
.size print_cwd, .-print_cwd
.section .rodata
.align 2
.LC1:
.ascii "source\000"
.align 2
.LC2:
.ascii "mkdir failed: %s\012\000"
.text
.align 2
.global mkdir_source
.syntax unified
.arm
.fpu softvfp
.type mkdir_source, %function
mkdir_source:
@ args = 0, pretend = 0, frame = 8
@ frame_needed = 1, uses_anonymous_args = 0
push {fp, lr}
add fp, sp, #4
sub sp, sp, #8
ldr r1, .L8
ldr r0, .L8+4
bl mkdir
str r0, [fp, #-8]
ldr r3, [fp, #-8]
cmp r3, #0
beq .L7
bl __errno_location
mov r3, r0
ldr r3, [r3]
mov r0, r3
bl strerror
mov r3, r0
mov r1, r3
ldr r0, .L8+8
bl printf
mov r0, #1
bl exit
.L7:
nop
sub sp, fp, #4
@ sp needed
pop {fp, pc}
.L9:
.align 2
.L8:
.word 493
.word .LC1
.word .LC2
.size mkdir_source, .-mkdir_source
.section .rodata
.align 2
.LC3:
.ascii "chdir failed: %s\012\000"
.text
.align 2
.global chdir_source
.syntax unified
.arm
.fpu softvfp
.type chdir_source, %function
chdir_source:
@ args = 0, pretend = 0, frame = 8
@ frame_needed = 1, uses_anonymous_args = 0
push {fp, lr}
add fp, sp, #4
sub sp, sp, #8
ldr r0, .L13
bl chdir
str r0, [fp, #-8]
ldr r3, [fp, #-8]
cmp r3, #0
beq .L12
bl __errno_location
mov r3, r0
ldr r3, [r3]
mov r0, r3
bl strerror
mov r3, r0
mov r1, r3
ldr r0, .L13+4
bl printf
mov r0, #1
bl exit
.L12:
nop
sub sp, fp, #4
@ sp needed
pop {fp, pc}
.L14:
.align 2
.L13:
.word .LC1
.word .LC3
.size chdir_source, .-chdir_source
.section .rodata
.align 2
.LC4:
.ascii "w\000"
.align 2
.LC5:
.ascii "hello\000"
.text
.align 2
.global create_file
.syntax unified
.arm
.fpu softvfp
.type create_file, %function
create_file:
@ args = 0, pretend = 0, frame = 16
@ frame_needed = 1, uses_anonymous_args = 0
push {fp, lr}
add fp, sp, #4
sub sp, sp, #16
str r0, [fp, #-16]
ldr r1, .L16
ldr r0, [fp, #-16]
bl fopen
str r0, [fp, #-8]
mov r2, #0
ldr r1, .L16+4
ldr r0, [fp, #-8]
bl fprintf
ldr r0, [fp, #-8]
bl fclose
nop
sub sp, fp, #4
@ sp needed
pop {fp, pc}
.L17:
.align 2
.L16:
.word .LC4
.word .LC5
.size create_file, .-create_file
.section .rodata
.align 2
.LC6:
.ascii "link failed: %s\012\000"
.text
.align 2
.global create_hardlink
.syntax unified
.arm
.fpu softvfp
.type create_hardlink, %function
create_hardlink:
@ args = 0, pretend = 0, frame = 16
@ frame_needed = 1, uses_anonymous_args = 0
push {fp, lr}
add fp, sp, #4
sub sp, sp, #16
str r0, [fp, #-16]
str r1, [fp, #-20]
ldr r1, [fp, #-20]
ldr r0, [fp, #-16]
bl link
str r0, [fp, #-8]
ldr r3, [fp, #-8]
cmp r3, #0
beq .L20
bl __errno_location
mov r3, r0
ldr r3, [r3]
mov r0, r3
bl strerror
mov r3, r0
mov r1, r3
ldr r0, .L21
bl printf
mov r0, #1
bl exit
.L20:
nop
sub sp, fp, #4
@ sp needed
pop {fp, pc}
.L22:
.align 2
.L21:
.word .LC6
.size create_hardlink, .-create_hardlink
.section .rodata
.align 2
.LC7:
.ascii "..\000"
.text
.align 2
.global chdir_parent
.syntax unified
.arm
.fpu softvfp
.type chdir_parent, %function
chdir_parent:
@ args = 0, pretend = 0, frame = 8
@ frame_needed = 1, uses_anonymous_args = 0
push {fp, lr}
add fp, sp, #4
sub sp, sp, #8
ldr r0, .L26
bl chdir
str r0, [fp, #-8]
ldr r3, [fp, #-8]
cmp r3, #0
beq .L25
bl __errno_location
mov r3, r0
ldr r3, [r3]
mov r0, r3
bl strerror
mov r3, r0
mov r1, r3
ldr r0, .L26+4
bl printf
mov r0, #1
bl exit
.L25:
nop
sub sp, fp, #4
@ sp needed
pop {fp, pc}
.L27:
.align 2
.L26:
.word .LC7
.word .LC3
.size chdir_parent, .-chdir_parent
.section .rodata
.align 2
.LC8:
.ascii "target\000"
.text
.align 2
.global chdir_target
.syntax unified
.arm
.fpu softvfp
.type chdir_target, %function
chdir_target:
@ args = 0, pretend = 0, frame = 8
@ frame_needed = 1, uses_anonymous_args = 0
push {fp, lr}
add fp, sp, #4
sub sp, sp, #8
ldr r0, .L31
bl chdir
str r0, [fp, #-8]
ldr r3, [fp, #-8]
cmp r3, #0
beq .L30
bl __errno_location
mov r3, r0
ldr r3, [r3]
mov r0, r3
bl strerror
mov r3, r0
mov r1, r3
ldr r0, .L31+4
bl printf
mov r0, #1
bl exit
.L30:
nop
sub sp, fp, #4
@ sp needed
pop {fp, pc}
.L32:
.align 2
.L31:
.word .LC8
.word .LC3
.size chdir_target, .-chdir_target
.section .rodata
.align 2
.LC9:
.ascii "stat failed: %s\012\000"
.align 2
.LC10:
.word __stack_chk_guard
.text
.align 2
.global get_inode
.syntax unified
.arm
.fpu softvfp
.type get_inode, %function
get_inode:
@ args = 0, pretend = 0, frame = 112
@ frame_needed = 1, uses_anonymous_args = 0
push {fp, lr}
add fp, sp, #4
sub sp, sp, #112
str r0, [fp, #-112]
ldr r3, .L37
ldr r3, [r3]
str r3, [fp, #-8]
mov r3,#0
sub r3, fp, #100
mov r1, r3
ldr r0, [fp, #-112]
bl stat
str r0, [fp, #-104]
ldr r3, [fp, #-104]
cmp r3, #0
beq .L34
bl __errno_location
mov r3, r0
ldr r3, [r3]
mov r0, r3
bl strerror
mov r3, r0
mov r1, r3
ldr r0, .L37+4
bl printf
mov r0, #1
bl exit
.L34:
ldr r3, [fp, #-88]
ldr r2, .L37
ldr r1, [r2]
ldr r2, [fp, #-8]
eors r1, r2, r1
mov r2, #0
beq .L36
bl __stack_chk_fail
.L36:
mov r0, r3
sub sp, fp, #4
@ sp needed
pop {fp, pc}
.L38:
.align 2
.L37:
.word .LC10
.word .LC9
.size get_inode, .-get_inode
.section .rodata
.align 2
.LC11:
.ascii "file1\000"
.align 2
.LC12:
.ascii "file2\000"
.align 2
.LC13:
.ascii "file3\000"
.align 2
.LC14:
.ascii "/bin/cp -Rp source target\000"
.align 2
.LC15:
.ascii "TEST FAILED: hardlinked files are not copied correc"
.ascii "t, inodes differs: %lli %lli %lli\012\000"
.align 2
.LC16:
.ascii "TEST SUCCESS: hardlinked files are copied correct, "
.ascii "inodes the same\000"
.text
.align 2
.global main
.syntax unified
.arm
.fpu softvfp
.type main, %function
main:
@ args = 0, pretend = 0, frame = 24
@ frame_needed = 1, uses_anonymous_args = 0
push {fp, lr}
add fp, sp, #4
sub sp, sp, #24
str r0, [fp, #-24]
str r1, [fp, #-28]
bl print_cwd
bl mkdir_source
bl chdir_source
ldr r0, .L44
bl create_file
ldr r1, .L44+4
ldr r0, .L44
bl create_hardlink
ldr r1, .L44+8
ldr r0, .L44+4
bl create_hardlink
bl chdir_parent
ldr r0, .L44+12
bl system
bl chdir_target
ldr r0, .L44
bl get_inode
str r0, [fp, #-16]
ldr r0, .L44+4
bl get_inode
str r0, [fp, #-12]
ldr r0, .L44+8
bl get_inode
str r0, [fp, #-8]
ldr r2, [fp, #-16]
ldr r3, [fp, #-12]
cmp r2, r3
bne .L40
ldr r2, [fp, #-16]
ldr r3, [fp, #-8]
cmp r2, r3
beq .L41
.L40:
ldr r3, [fp, #-8]
ldr r2, [fp, #-12]
ldr r1, [fp, #-16]
ldr r0, .L44+16
bl printf
b .L42
.L41:
ldr r0, .L44+20
bl printf
.L42:
bl chdir_parent
mov r3, #0
mov r0, r3
sub sp, fp, #4
@ sp needed
pop {fp, pc}
.L45:
.align 2
.L44:
.word .LC11
.word .LC12
.word .LC13
.word .LC14
.word .LC15
.word .LC16
.size main, .-main
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",%progbits
|
.file "711361.c"
.intel_syntax noprefix
.text
.globl i
.bss
.align 4
.type i, @object
.size i, 4
i:
.zero 4
.globl r
.align 4
.type r, @object
.size r, 4
r:
.zero 4
.globl m
.align 4
.type m, @object
.size m, 4
m:
.zero 4
.text
.globl mult
.type mult, @function
mult:
.LFB0:
.cfi_startproc
endbr64
push rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
mov rbp, rsp
.cfi_def_cfa_register 6
mov edx, DWORD PTR r[rip]
mov eax, DWORD PTR m[rip]
add eax, edx
mov DWORD PTR r[rip], eax
mov eax, DWORD PTR i[rip]
add eax, 1
mov DWORD PTR i[rip], eax
nop
pop rbp
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE0:
.size mult, .-mult
.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
sub rsp, 16
mov eax, 0
call __VERIFIER_nondet_int@PLT
mov DWORD PTR -4[rbp], eax
mov eax, 0
call __VERIFIER_nondet_int@PLT
mov DWORD PTR m[rip], eax
cmp DWORD PTR -4[rbp], 0
setg al
movzx eax, al
mov edi, eax
mov eax, 0
call __VERIFIER_assume@PLT
jmp .L3
.L4:
mov eax, 0
call mult
.L3:
mov eax, DWORD PTR i[rip]
cmp DWORD PTR -4[rbp], eax
jg .L4
mov eax, DWORD PTR i[rip]
cmp DWORD PTR -4[rbp], eax
sete al
movzx eax, al
mov edi, eax
mov eax, 0
call assert@PLT
mov eax, DWORD PTR m[rip]
imul eax, DWORD PTR -4[rbp]
mov edx, eax
mov eax, DWORD PTR r[rip]
cmp edx, eax
sete al
movzx eax, al
mov edi, eax
mov eax, 0
call assert@PLT
nop
leave
.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 "711361.c"
.text
.global i
.bss
.align 2
.type i, %object
.size i, 4
i:
.space 4
.global r
.align 2
.type r, %object
.size r, 4
r:
.space 4
.comm m,4,4
.text
.align 2
.global mult
.syntax unified
.arm
.fpu softvfp
.type mult, %function
mult:
@ 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, [r3]
ldr r3, .L2+4
ldr r3, [r3]
add r3, r2, r3
ldr r2, .L2
str r3, [r2]
ldr r3, .L2+8
ldr r3, [r3]
add r3, r3, #1
ldr r2, .L2+8
str r3, [r2]
nop
add sp, fp, #0
@ sp needed
ldr fp, [sp], #4
bx lr
.L3:
.align 2
.L2:
.word r
.word m
.word i
.size mult, .-mult
.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
bl __VERIFIER_nondet_int
str r0, [fp, #-8]
bl __VERIFIER_nondet_int
mov r3, r0
ldr r2, .L7
str r3, [r2]
ldr r3, [fp, #-8]
cmp r3, #0
movgt r3, #1
movle r3, #0
and r3, r3, #255
mov r0, r3
bl __VERIFIER_assume
b .L5
.L6:
bl mult
.L5:
ldr r3, .L7+4
ldr r3, [r3]
ldr r2, [fp, #-8]
cmp r2, r3
bgt .L6
ldr r3, .L7+4
ldr r3, [r3]
ldr r2, [fp, #-8]
cmp r2, r3
moveq r3, #1
movne r3, #0
and r3, r3, #255
mov r0, r3
bl assert
ldr r3, .L7
ldr r3, [r3]
ldr r2, [fp, #-8]
mul r2, r3, r2
ldr r3, .L7+8
ldr r3, [r3]
cmp r2, r3
moveq r3, #1
movne r3, #0
and r3, r3, #255
mov r0, r3
bl assert
nop
sub sp, fp, #4
@ sp needed
pop {fp, pc}
.L8:
.align 2
.L7:
.word m
.word i
.word r
.size main, .-main
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",%progbits
|
.file "26143.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, 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 "26143.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, #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 "779923.c"
.intel_syntax noprefix
.text
.section .rodata
.align 8
.LC0:
.string "static unsigned char %s[256] = {\n"
.LC1:
.string " "
.LC2:
.string "%s%d"
.LC3:
.string ",\t/* 0x%02x - 0x%02x */\n"
.LC4:
.string ", "
.LC5:
.string "\n};"
.text
.globl dumparray
.type dumparray, @function
dumparray:
.LFB0:
.cfi_startproc
endbr64
push rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
mov rbp, rsp
.cfi_def_cfa_register 6
sub rsp, 32
mov QWORD PTR -24[rbp], rdi
mov QWORD PTR -32[rbp], rsi
mov rax, QWORD PTR -24[rbp]
mov rsi, rax
lea rdi, .LC0[rip]
mov eax, 0
call printf@PLT
lea rax, .LC1[rip]
mov QWORD PTR -8[rbp], rax
mov DWORD PTR -12[rbp], 0
jmp .L2
.L5:
mov eax, DWORD PTR -12[rbp]
movsx rdx, eax
mov rax, QWORD PTR -32[rbp]
add rax, rdx
movzx eax, BYTE PTR [rax]
movzx edx, al
mov rax, QWORD PTR -8[rbp]
mov rsi, rax
lea rdi, .LC2[rip]
mov eax, 0
call printf@PLT
mov eax, DWORD PTR -12[rbp]
add eax, 1
and eax, 15
test eax, eax
jne .L3
mov eax, DWORD PTR -12[rbp]
lea ecx, -15[rax]
mov eax, DWORD PTR -12[rbp]
mov edx, eax
mov esi, ecx
lea rdi, .LC3[rip]
mov eax, 0
call printf@PLT
lea rax, .LC1[rip]
mov QWORD PTR -8[rbp], rax
jmp .L4
.L3:
lea rax, .LC4[rip]
mov QWORD PTR -8[rbp], rax
.L4:
add DWORD PTR -12[rbp], 1
.L2:
cmp DWORD PTR -12[rbp], 255
jle .L5
lea rdi, .LC5[rip]
call puts@PLT
nop
leave
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE0:
.size dumparray, .-dumparray
.section .rodata
.LC6:
.string "bruns"
.LC7:
.string "wruns"
.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 r13
push r12
push rbx
sub rsp, 536
.cfi_offset 13, -24
.cfi_offset 12, -32
.cfi_offset 3, -40
mov rax, QWORD PTR fs:40
mov QWORD PTR -40[rbp], rax
xor eax, eax
lea rax, -560[rbp]
mov edx, 256
mov esi, 0
mov rdi, rax
call memset@PLT
lea rax, -560[rbp]
add rax, 256
mov edx, 256
mov esi, 0
mov rdi, rax
call memset@PLT
mov r13d, 1
mov r12d, 128
jmp .L7
.L10:
lea ebx, -1[r12]
jmp .L8
.L9:
mov eax, r12d
or eax, ebx
mov edx, r13d
cdqe
mov BYTE PTR -304[rbp+rax], dl
mov eax, r12d
or eax, ebx
not eax
movzx eax, al
mov edx, r13d
cdqe
mov BYTE PTR -560[rbp+rax], dl
sub ebx, 1
.L8:
test ebx, ebx
jns .L9
add r13d, 1
mov eax, r12d
sar eax
or al, -128
mov r12d, eax
.L7:
cmp r12d, 255
jne .L10
mov BYTE PTR -560[rbp], 8
movzx eax, BYTE PTR -560[rbp]
mov BYTE PTR -49[rbp], al
lea rax, -560[rbp]
mov rsi, rax
lea rdi, .LC6[rip]
mov eax, 0
call dumparray
lea rax, -560[rbp]
add rax, 256
mov rsi, rax
lea rdi, .LC7[rip]
mov eax, 0
call dumparray
mov eax, 0
mov rcx, QWORD PTR -40[rbp]
sub rcx, QWORD PTR fs:40
je .L12
call __stack_chk_fail@PLT
.L12:
add rsp, 536
pop rbx
pop r12
pop r13
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 "779923.c"
.text
.section .rodata
.align 2
.LC0:
.ascii "static unsigned char %s[256] = {\012\000"
.align 2
.LC1:
.ascii " \000"
.align 2
.LC2:
.ascii "%s%d\000"
.align 2
.LC3:
.ascii ",\011/* 0x%02x - 0x%02x */\012\000"
.align 2
.LC4:
.ascii ", \000"
.align 2
.LC5:
.ascii "\012};\000"
.text
.align 2
.global dumparray
.syntax unified
.arm
.fpu softvfp
.type dumparray, %function
dumparray:
@ args = 0, pretend = 0, frame = 16
@ frame_needed = 1, uses_anonymous_args = 0
push {fp, lr}
add fp, sp, #4
sub sp, sp, #16
str r0, [fp, #-16]
str r1, [fp, #-20]
ldr r1, [fp, #-16]
ldr r0, .L6
bl printf
ldr r3, .L6+4
str r3, [fp, #-8]
mov r3, #0
str r3, [fp, #-12]
b .L2
.L5:
ldr r3, [fp, #-12]
ldr r2, [fp, #-20]
add r3, r2, r3
ldrb r3, [r3] @ zero_extendqisi2
mov r2, r3
ldr r1, [fp, #-8]
ldr r0, .L6+8
bl printf
ldr r3, [fp, #-12]
add r3, r3, #1
and r3, r3, #15
cmp r3, #0
bne .L3
ldr r3, [fp, #-12]
sub r3, r3, #15
ldr r2, [fp, #-12]
mov r1, r3
ldr r0, .L6+12
bl printf
ldr r3, .L6+4
str r3, [fp, #-8]
b .L4
.L3:
ldr r3, .L6+16
str r3, [fp, #-8]
.L4:
ldr r3, [fp, #-12]
add r3, r3, #1
str r3, [fp, #-12]
.L2:
ldr r3, [fp, #-12]
cmp r3, #255
ble .L5
ldr r0, .L6+20
bl puts
nop
mov r0, r3
sub sp, fp, #4
@ sp needed
pop {fp, pc}
.L7:
.align 2
.L6:
.word .LC0
.word .LC1
.word .LC2
.word .LC3
.word .LC4
.word .LC5
.size dumparray, .-dumparray
.section .rodata
.align 2
.LC6:
.ascii "bruns\000"
.align 2
.LC7:
.ascii "wruns\000"
.align 2
.LC8:
.word __stack_chk_guard
.text
.align 2
.global main
.syntax unified
.arm
.fpu softvfp
.type main, %function
main:
@ args = 0, pretend = 0, frame = 520
@ frame_needed = 1, uses_anonymous_args = 0
push {r4, r5, r6, fp, lr}
add fp, sp, #16
sub sp, sp, #524
ldr r3, .L15
ldr r3, [r3]
str r3, [fp, #-24]
mov r3,#0
sub r3, fp, #536
mov r2, #256
mov r1, #0
mov r0, r3
bl memset
sub r3, fp, #536
add r3, r3, #256
mov r2, #256
mov r1, #0
mov r0, r3
bl memset
mov r6, #1
mov r4, #128
b .L9
.L12:
sub r5, r4, #1
b .L10
.L11:
orr r3, r4, r5
and r2, r6, #255
sub r1, fp, #20
add r3, r1, r3
strb r2, [r3, #-260]
orr r3, r4, r5
mvn r3, r3
and r3, r3, #255
and r2, r6, #255
sub r1, fp, #20
add r3, r1, r3
strb r2, [r3, #-516]
sub r5, r5, #1
.L10:
cmp r5, #0
bge .L11
add r6, r6, #1
asr r3, r4, #1
orr r4, r3, #128
.L9:
cmp r4, #255
bne .L12
mov r3, #8
strb r3, [fp, #-536]
ldrb r3, [fp, #-536] @ zero_extendqisi2
strb r3, [fp, #-25]
sub r3, fp, #536
mov r1, r3
ldr r0, .L15+4
bl dumparray
sub r3, fp, #536
add r3, r3, #256
mov r1, r3
ldr r0, .L15+8
bl dumparray
mov r3, #0
ldr r2, .L15
ldr r1, [r2]
ldr r2, [fp, #-24]
eors r1, r2, r1
mov r2, #0
beq .L14
bl __stack_chk_fail
.L14:
mov r0, r3
sub sp, fp, #16
@ sp needed
pop {r4, r5, r6, fp, pc}
.L16:
.align 2
.L15:
.word .LC8
.word .LC6
.word .LC7
.size main, .-main
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",%progbits
|
.file "86917.c"
.intel_syntax noprefix
.text
.globl load
.type load, @function
load:
.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 -8[rbp], rdi
mov QWORD PTR -16[rbp], rsi
mov rax, QWORD PTR -16[rbp]
mov edx, DWORD PTR [rax]
mov rax, QWORD PTR -8[rbp]
mov DWORD PTR [rax], edx
mov rax, QWORD PTR -8[rbp]
lea rdx, 4[rax]
mov rax, QWORD PTR -16[rbp]
mov eax, DWORD PTR 4[rax]
mov DWORD PTR [rdx], eax
nop
pop rbp
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE0:
.size load, .-load
.globl store
.type store, @function
store:
.LFB1:
.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 -16[rbp]
mov edx, DWORD PTR [rax]
mov rax, QWORD PTR -8[rbp]
mov DWORD PTR [rax], edx
mov rax, QWORD PTR -8[rbp]
lea rdx, 4[rax]
mov rax, QWORD PTR -16[rbp]
mov eax, DWORD PTR 4[rax]
mov DWORD PTR [rdx], eax
nop
pop rbp
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE1:
.size store, .-store
.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 "86917.c"
.text
.align 2
.global load
.syntax unified
.arm
.fpu softvfp
.type load, %function
load:
@ 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, #-12]
ldr r2, [r3]
ldr r3, [fp, #-8]
str r2, [r3]
ldr r3, [fp, #-8]
add r3, r3, #4
ldr r2, [fp, #-12]
ldr r2, [r2, #4]
str r2, [r3]
nop
add sp, fp, #0
@ sp needed
ldr fp, [sp], #4
bx lr
.size load, .-load
.align 2
.global store
.syntax unified
.arm
.fpu softvfp
.type store, %function
store:
@ 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, #-12]
ldr r2, [r3]
ldr r3, [fp, #-8]
str r2, [r3]
ldr r3, [fp, #-8]
add r3, r3, #4
ldr r2, [fp, #-12]
ldr r2, [r2, #4]
str r2, [r3]
nop
add sp, fp, #0
@ sp needed
ldr fp, [sp], #4
bx lr
.size store, .-store
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",%progbits
|
.file "617302.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 DWORD PTR -8[rbp], 1
mov DWORD PTR -4[rbp], 5
mov edx, DWORD PTR -8[rbp]
mov eax, DWORD PTR -4[rbp]
add eax, edx
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 "617302.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
@ link register save eliminated.
str fp, [sp, #-4]!
add fp, sp, #0
sub sp, sp, #12
mov r3, #1
str r3, [fp, #-12]
mov r3, #5
str r3, [fp, #-8]
ldr r2, [fp, #-12]
ldr r3, [fp, #-8]
add r3, r2, r3
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 "269024.c"
.intel_syntax noprefix
.text
.globl MAX_LINE
.section .rodata
.align 4
.type MAX_LINE, @object
.size MAX_LINE, 4
MAX_LINE:
.long 11
.LC0:
.string "%d\n"
.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
push rbx
sub rsp, 56
.cfi_offset 3, -24
mov rax, QWORD PTR fs:40
mov QWORD PTR -24[rbp], rax
xor eax, eax
mov rax, rsp
mov rbx, rax
mov DWORD PTR -52[rbp], 0
mov eax, 11
cdqe
sub rax, 1
mov QWORD PTR -40[rbp], rax
mov eax, 11
cdqe
mov r8, rax
mov r9d, 0
mov eax, 11
cdqe
mov rsi, rax
mov edi, 0
mov eax, 11
cdqe
mov edx, 16
sub rdx, 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
.L2:
cmp rsp, rdx
je .L3
sub rsp, 4096
or QWORD PTR 4088[rsp], 0
jmp .L2
.L3:
mov rdx, rax
and edx, 4095
sub rsp, rdx
mov rdx, rax
and edx, 4095
test rdx, rdx
je .L4
and eax, 4095
sub rax, 8
add rax, rsp
or QWORD PTR [rax], 0
.L4:
mov rax, rsp
add rax, 0
mov QWORD PTR -32[rbp], rax
mov rdx, QWORD PTR stdin[rip]
mov ecx, 11
mov rax, QWORD PTR -32[rbp]
mov esi, ecx
mov rdi, rax
call fgets@PLT
mov rax, QWORD PTR -32[rbp]
mov rdi, rax
call atoi@PLT
mov DWORD PTR -48[rbp], eax
jmp .L5
.L7:
mov rax, QWORD PTR -32[rbp]
mov rdi, rax
call atoi@PLT
mov DWORD PTR -44[rbp], eax
mov eax, DWORD PTR -44[rbp]
cmp eax, DWORD PTR -48[rbp]
jle .L6
add DWORD PTR -52[rbp], 1
.L6:
mov eax, DWORD PTR -44[rbp]
mov DWORD PTR -48[rbp], eax
.L5:
mov rdx, QWORD PTR stdin[rip]
mov ecx, 11
mov rax, QWORD PTR -32[rbp]
mov esi, ecx
mov rdi, rax
call fgets@PLT
test rax, rax
jne .L7
mov eax, DWORD PTR -52[rbp]
mov esi, eax
lea rdi, .LC0[rip]
mov eax, 0
call printf@PLT
mov eax, 0
mov rsp, rbx
mov rbx, QWORD PTR -24[rbp]
sub rbx, QWORD PTR fs:40
je .L9
call __stack_chk_fail@PLT
.L9:
mov rbx, QWORD PTR -8[rbp]
leave
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE6:
.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 "269024.c"
.text
.global MAX_LINE
.section .rodata
.align 2
.type MAX_LINE, %object
.size MAX_LINE, 4
MAX_LINE:
.word 11
.align 2
.LC0:
.ascii "%d\012\000"
.align 2
.LC1:
.word __stack_chk_guard
.text
.align 2
.global main
.syntax unified
.arm
.fpu softvfp
.type main, %function
main:
@ args = 0, pretend = 0, frame = 24
@ frame_needed = 1, uses_anonymous_args = 0
push {r4, fp, lr}
add fp, sp, #8
sub sp, sp, #28
ldr r3, .L7
ldr r3, [r3]
str r3, [fp, #-16]
mov r3,#0
mov r3, sp
mov r4, r3
mov r3, #0
str r3, [fp, #-36]
mov r3, #11
sub r3, r3, #1
str r3, [fp, #-28]
mov r3, #11
mov r0, r3
mov r1, #0
mov r2, #0
mov r3, #0
lsl r3, r1, #3
orr r3, r3, r0, lsr #29
lsl r2, r0, #3
mov r3, #11
mov r0, r3
mov r1, #0
mov r2, #0
mov r3, #0
lsl r3, r1, #3
orr r3, r3, r0, lsr #29
lsl r2, r0, #3
mov r3, #11
add r3, r3, #7
lsr r3, r3, #3
lsl r3, r3, #3
sub sp, sp, r3
mov r3, sp
add r3, r3, #0
str r3, [fp, #-24]
mov r1, #11
ldr r3, .L7+4
ldr r3, [r3]
mov r2, r3
ldr r0, [fp, #-24]
bl fgets
ldr r0, [fp, #-24]
bl atoi
str r0, [fp, #-32]
b .L2
.L4:
ldr r0, [fp, #-24]
bl atoi
str r0, [fp, #-20]
ldr r2, [fp, #-20]
ldr r3, [fp, #-32]
cmp r2, r3
ble .L3
ldr r3, [fp, #-36]
add r3, r3, #1
str r3, [fp, #-36]
.L3:
ldr r3, [fp, #-20]
str r3, [fp, #-32]
.L2:
mov r1, #11
ldr r3, .L7+4
ldr r3, [r3]
mov r2, r3
ldr r0, [fp, #-24]
bl fgets
mov r3, r0
cmp r3, #0
bne .L4
ldr r1, [fp, #-36]
ldr r0, .L7+8
bl printf
mov r3, #0
mov sp, r4
ldr r2, .L7
ldr r1, [r2]
ldr r2, [fp, #-16]
eors r1, r2, r1
mov r2, #0
beq .L6
bl __stack_chk_fail
.L6:
mov r0, r3
sub sp, fp, #8
@ sp needed
pop {r4, fp, pc}
.L8:
.align 2
.L7:
.word .LC1
.word stdin
.word .LC0
.size main, .-main
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",%progbits
|
.file "812599.c"
.intel_syntax noprefix
.text
.local num_in_rank
.comm num_in_rank,52,32
.local num_in_suit
.comm num_in_suit,16,16
.local flush
.comm flush,1,1
.local straight
.comm straight,1,1
.local four
.comm four,1,1
.local three
.comm three,1,1
.local pairs
.comm pairs,4,4
.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
.L2:
call read_cards
call analyze_hand
call print_result
jmp .L2
.cfi_endproc
.LFE6:
.size main, .-main
.section .rodata
.align 8
.LC0:
.string "\nPoker begins. Specify your hand:"
.align 8
.LC1:
.string "5s for five spades, tc for ten clubs."
.LC2:
.string "0 - to exit."
.LC3:
.string "Enter a card: "
.LC4:
.string " %c"
.LC5:
.string "Bad card; Ignored."
.LC6:
.string "Duplicate card; Ignored."
.text
.type read_cards, @function
read_cards:
.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, 80
mov rax, QWORD PTR fs:40
mov QWORD PTR -8[rbp], rax
xor eax, eax
mov DWORD PTR -68[rbp], 0
lea rdi, .LC0[rip]
call puts@PLT
lea rdi, .LC1[rip]
call puts@PLT
lea rdi, .LC2[rip]
call puts@PLT
mov DWORD PTR -76[rbp], 0
jmp .L4
.L7:
mov eax, DWORD PTR -76[rbp]
cdqe
lea rdx, 0[0+rax*4]
lea rax, num_in_rank[rip]
mov DWORD PTR [rdx+rax], 0
mov DWORD PTR -72[rbp], 0
jmp .L5
.L6:
mov eax, DWORD PTR -72[rbp]
movsx rdx, eax
mov eax, DWORD PTR -76[rbp]
cdqe
sal rax, 2
add rax, rbp
add rax, rdx
sub rax, 64
mov BYTE PTR [rax], 0
add DWORD PTR -72[rbp], 1
.L5:
cmp DWORD PTR -72[rbp], 3
jle .L6
add DWORD PTR -76[rbp], 1
.L4:
cmp DWORD PTR -76[rbp], 12
jle .L7
mov DWORD PTR -72[rbp], 0
jmp .L8
.L9:
mov eax, DWORD PTR -72[rbp]
cdqe
lea rdx, 0[0+rax*4]
lea rax, num_in_suit[rip]
mov DWORD PTR [rdx+rax], 0
add DWORD PTR -72[rbp], 1
.L8:
cmp DWORD PTR -72[rbp], 3
jle .L9
jmp .L10
.L38:
mov BYTE PTR -78[rbp], 0
lea rdi, .LC3[rip]
mov eax, 0
call printf@PLT
lea rax, -80[rbp]
mov rsi, rax
lea rdi, .LC4[rip]
mov eax, 0
call __isoc99_scanf@PLT
movzx eax, BYTE PTR -80[rbp]
movsx eax, al
mov edi, eax
call tolower@PLT
sub eax, 48
cmp eax, 68
ja .L11
mov eax, eax
lea rdx, 0[0+rax*4]
lea rax, .L13[rip]
mov eax, DWORD PTR [rdx+rax]
cdqe
lea rdx, .L13[rip]
add rax, rdx
notrack jmp rax
.section .rodata
.align 4
.align 4
.L13:
.long .L26-.L13
.long .L11-.L13
.long .L25-.L13
.long .L24-.L13
.long .L23-.L13
.long .L22-.L13
.long .L21-.L13
.long .L20-.L13
.long .L19-.L13
.long .L18-.L13
.long .L11-.L13
.long .L11-.L13
.long .L11-.L13
.long .L11-.L13
.long .L11-.L13
.long .L11-.L13
.long .L11-.L13
.long .L11-.L13
.long .L11-.L13
.long .L11-.L13
.long .L11-.L13
.long .L11-.L13
.long .L11-.L13
.long .L11-.L13
.long .L11-.L13
.long .L11-.L13
.long .L11-.L13
.long .L11-.L13
.long .L11-.L13
.long .L11-.L13
.long .L11-.L13
.long .L11-.L13
.long .L11-.L13
.long .L11-.L13
.long .L11-.L13
.long .L11-.L13
.long .L11-.L13
.long .L11-.L13
.long .L11-.L13
.long .L11-.L13
.long .L11-.L13
.long .L11-.L13
.long .L11-.L13
.long .L11-.L13
.long .L11-.L13
.long .L11-.L13
.long .L11-.L13
.long .L11-.L13
.long .L11-.L13
.long .L17-.L13
.long .L11-.L13
.long .L11-.L13
.long .L11-.L13
.long .L11-.L13
.long .L11-.L13
.long .L11-.L13
.long .L11-.L13
.long .L11-.L13
.long .L16-.L13
.long .L15-.L13
.long .L11-.L13
.long .L11-.L13
.long .L11-.L13
.long .L11-.L13
.long .L11-.L13
.long .L14-.L13
.long .L11-.L13
.long .L11-.L13
.long .L12-.L13
.text
.L26:
mov edi, 0
call exit@PLT
.L25:
mov DWORD PTR -76[rbp], 0
jmp .L27
.L24:
mov DWORD PTR -76[rbp], 1
jmp .L27
.L23:
mov DWORD PTR -76[rbp], 2
jmp .L27
.L22:
mov DWORD PTR -76[rbp], 3
jmp .L27
.L21:
mov DWORD PTR -76[rbp], 4
jmp .L27
.L20:
mov DWORD PTR -76[rbp], 5
jmp .L27
.L19:
mov DWORD PTR -76[rbp], 6
jmp .L27
.L18:
mov DWORD PTR -76[rbp], 7
jmp .L27
.L12:
mov DWORD PTR -76[rbp], 8
jmp .L27
.L16:
mov DWORD PTR -76[rbp], 9
jmp .L27
.L14:
mov DWORD PTR -76[rbp], 10
jmp .L27
.L15:
mov DWORD PTR -76[rbp], 11
jmp .L27
.L17:
mov DWORD PTR -76[rbp], 12
jmp .L27
.L11:
mov BYTE PTR -78[rbp], 1
nop
.L27:
lea rax, -79[rbp]
mov rsi, rax
lea rdi, .LC4[rip]
mov eax, 0
call __isoc99_scanf@PLT
movzx eax, BYTE PTR -79[rbp]
movsx eax, al
mov edi, eax
call tolower@PLT
cmp eax, 115
je .L28
cmp eax, 115
jg .L29
cmp eax, 104
je .L30
cmp eax, 104
jg .L29
cmp eax, 99
je .L31
cmp eax, 100
je .L32
jmp .L29
.L31:
mov DWORD PTR -72[rbp], 0
jmp .L33
.L32:
mov DWORD PTR -72[rbp], 1
jmp .L33
.L30:
mov DWORD PTR -72[rbp], 2
jmp .L33
.L28:
mov DWORD PTR -72[rbp], 3
jmp .L33
.L29:
mov BYTE PTR -78[rbp], 0
nop
.L33:
jmp .L34
.L35:
cmp BYTE PTR -77[rbp], 32
je .L34
mov BYTE PTR -78[rbp], 1
.L34:
call getchar@PLT
mov BYTE PTR -77[rbp], al
cmp BYTE PTR -77[rbp], 10
jne .L35
cmp BYTE PTR -78[rbp], 0
je .L36
lea rdi, .LC5[rip]
call puts@PLT
jmp .L10
.L36:
mov eax, DWORD PTR -72[rbp]
movsx rdx, eax
mov eax, DWORD PTR -76[rbp]
cdqe
sal rax, 2
add rax, rbp
add rax, rdx
sub rax, 64
movzx eax, BYTE PTR [rax]
test al, al
je .L37
lea rdi, .LC6[rip]
call puts@PLT
jmp .L10
.L37:
mov eax, DWORD PTR -72[rbp]
movsx rdx, eax
mov eax, DWORD PTR -76[rbp]
cdqe
sal rax, 2
add rax, rbp
add rax, rdx
sub rax, 64
mov BYTE PTR [rax], 1
mov eax, DWORD PTR -76[rbp]
cdqe
lea rdx, 0[0+rax*4]
lea rax, num_in_rank[rip]
mov eax, DWORD PTR [rdx+rax]
lea ecx, 1[rax]
mov eax, DWORD PTR -76[rbp]
cdqe
lea rdx, 0[0+rax*4]
lea rax, num_in_rank[rip]
mov DWORD PTR [rdx+rax], ecx
mov eax, DWORD PTR -72[rbp]
cdqe
lea rdx, 0[0+rax*4]
lea rax, num_in_suit[rip]
mov eax, DWORD PTR [rdx+rax]
lea ecx, 1[rax]
mov eax, DWORD PTR -72[rbp]
cdqe
lea rdx, 0[0+rax*4]
lea rax, num_in_suit[rip]
mov DWORD PTR [rdx+rax], ecx
add DWORD PTR -68[rbp], 1
.L10:
cmp DWORD PTR -68[rbp], 4
jle .L38
nop
mov rax, QWORD PTR -8[rbp]
sub rax, QWORD PTR fs:40
je .L39
call __stack_chk_fail@PLT
.L39:
leave
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE7:
.size read_cards, .-read_cards
.type analyze_hand, @function
analyze_hand:
.LFB8:
.cfi_startproc
endbr64
push rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
mov rbp, rsp
.cfi_def_cfa_register 6
mov DWORD PTR -4[rbp], 0
mov DWORD PTR pairs[rip], 0
mov BYTE PTR three[rip], 0
movzx eax, BYTE PTR three[rip]
mov BYTE PTR four[rip], al
movzx eax, BYTE PTR four[rip]
mov BYTE PTR straight[rip], al
movzx eax, BYTE PTR straight[rip]
mov BYTE PTR flush[rip], al
mov DWORD PTR -8[rbp], 0
jmp .L41
.L43:
mov eax, DWORD PTR -8[rbp]
cdqe
lea rdx, 0[0+rax*4]
lea rax, num_in_suit[rip]
mov eax, DWORD PTR [rdx+rax]
cmp eax, 5
jne .L42
mov BYTE PTR flush[rip], 1
.L42:
add DWORD PTR -8[rbp], 1
.L41:
cmp DWORD PTR -8[rbp], 3
jle .L43
mov DWORD PTR -12[rbp], 0
jmp .L44
.L45:
add DWORD PTR -12[rbp], 1
.L44:
mov eax, DWORD PTR -12[rbp]
cdqe
lea rdx, 0[0+rax*4]
lea rax, num_in_rank[rip]
mov eax, DWORD PTR [rdx+rax]
test eax, eax
je .L45
jmp .L46
.L48:
add DWORD PTR -4[rbp], 1
add DWORD PTR -12[rbp], 1
.L46:
cmp DWORD PTR -12[rbp], 12
jg .L47
mov eax, DWORD PTR -12[rbp]
cdqe
lea rdx, 0[0+rax*4]
lea rax, num_in_rank[rip]
mov eax, DWORD PTR [rdx+rax]
test eax, eax
jg .L48
.L47:
cmp DWORD PTR -4[rbp], 5
jne .L49
mov BYTE PTR straight[rip], 1
jmp .L40
.L49:
mov DWORD PTR -12[rbp], 0
jmp .L51
.L56:
mov eax, DWORD PTR -12[rbp]
cdqe
lea rdx, 0[0+rax*4]
lea rax, num_in_rank[rip]
mov eax, DWORD PTR [rdx+rax]
cmp eax, 4
je .L52
cmp eax, 4
jg .L53
cmp eax, 2
je .L54
cmp eax, 3
je .L55
jmp .L53
.L52:
mov BYTE PTR four[rip], 1
jmp .L53
.L55:
mov BYTE PTR three[rip], 1
jmp .L53
.L54:
mov eax, DWORD PTR pairs[rip]
add eax, 1
mov DWORD PTR pairs[rip], eax
nop
.L53:
add DWORD PTR -12[rbp], 1
.L51:
cmp DWORD PTR -12[rbp], 12
jle .L56
.L40:
pop rbp
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE8:
.size analyze_hand, .-analyze_hand
.section .rodata
.LC7:
.string "Straight flush"
.LC8:
.string "four-of-a-kind"
.LC9:
.string "full house"
.LC10:
.string "flush"
.LC11:
.string "straight"
.LC12:
.string "three-of-a-kind"
.LC13:
.string "two pairs"
.LC14:
.string "pair"
.LC15:
.string "high card"
.LC16:
.string "\n"
.text
.type print_result, @function
print_result:
.LFB9:
.cfi_startproc
endbr64
push rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
mov rbp, rsp
.cfi_def_cfa_register 6
movzx eax, BYTE PTR straight[rip]
test al, al
je .L58
movzx eax, BYTE PTR flush[rip]
test al, al
je .L58
lea rdi, .LC7[rip]
mov eax, 0
call printf@PLT
jmp .L59
.L58:
movzx eax, BYTE PTR four[rip]
test al, al
je .L60
lea rdi, .LC8[rip]
mov eax, 0
call printf@PLT
jmp .L59
.L60:
movzx eax, BYTE PTR three[rip]
test al, al
je .L61
mov eax, DWORD PTR pairs[rip]
cmp eax, 1
jne .L61
lea rdi, .LC9[rip]
mov eax, 0
call printf@PLT
jmp .L59
.L61:
movzx eax, BYTE PTR flush[rip]
test al, al
je .L62
lea rdi, .LC10[rip]
mov eax, 0
call printf@PLT
jmp .L59
.L62:
movzx eax, BYTE PTR straight[rip]
test al, al
je .L63
lea rdi, .LC11[rip]
mov eax, 0
call printf@PLT
jmp .L59
.L63:
movzx eax, BYTE PTR three[rip]
test al, al
je .L64
lea rdi, .LC12[rip]
mov eax, 0
call printf@PLT
jmp .L59
.L64:
mov eax, DWORD PTR pairs[rip]
cmp eax, 2
jne .L65
lea rdi, .LC13[rip]
mov eax, 0
call printf@PLT
jmp .L59
.L65:
mov eax, DWORD PTR pairs[rip]
cmp eax, 1
jne .L66
lea rdi, .LC14[rip]
mov eax, 0
call printf@PLT
jmp .L59
.L66:
lea rdi, .LC15[rip]
mov eax, 0
call printf@PLT
.L59:
lea rdi, .LC16[rip]
call puts@PLT
nop
pop rbp
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE9:
.size print_result, .-print_result
.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 "812599.c"
.text
.local num_in_rank
.comm num_in_rank,52,4
.local num_in_suit
.comm num_in_suit,16,4
.local flush
.comm flush,1,1
.local straight
.comm straight,1,1
.local four
.comm four,1,1
.local three
.comm three,1,1
.local pairs
.comm pairs,4,4
.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
.L2:
bl read_cards
bl analyze_hand
bl print_result
b .L2
.size main, .-main
.section .rodata
.align 2
.LC0:
.ascii "\012Poker begins. Specify your hand:\000"
.align 2
.LC1:
.ascii "5s for five spades, tc for ten clubs.\000"
.align 2
.LC2:
.ascii "0 - to exit.\000"
.align 2
.LC3:
.ascii "Enter a card: \000"
.align 2
.LC4:
.ascii " %c\000"
.align 2
.LC5:
.ascii "Bad card; Ignored.\000"
.align 2
.LC6:
.ascii "Duplicate card; Ignored.\000"
.align 2
.LC7:
.word __stack_chk_guard
.text
.align 2
.syntax unified
.arm
.fpu softvfp
.type read_cards, %function
read_cards:
@ args = 0, pretend = 0, frame = 72
@ frame_needed = 1, uses_anonymous_args = 0
push {fp, lr}
add fp, sp, #4
sub sp, sp, #72
ldr r3, .L41
ldr r3, [r3]
str r3, [fp, #-8]
mov r3,#0
mov r3, #0
str r3, [fp, #-64]
ldr r0, .L41+4
bl puts
ldr r0, .L41+8
bl puts
ldr r0, .L41+12
bl puts
mov r3, #0
str r3, [fp, #-72]
b .L4
.L7:
ldr r2, .L41+16
ldr r3, [fp, #-72]
mov r1, #0
str r1, [r2, r3, lsl #2]
mov r3, #0
str r3, [fp, #-68]
b .L5
.L6:
ldr r3, [fp, #-72]
lsl r3, r3, #2
sub r2, fp, #4
add r2, r2, r3
ldr r3, [fp, #-68]
add r3, r2, r3
sub r3, r3, #56
mov r2, #0
strb r2, [r3]
ldr r3, [fp, #-68]
add r3, r3, #1
str r3, [fp, #-68]
.L5:
ldr r3, [fp, #-68]
cmp r3, #3
ble .L6
ldr r3, [fp, #-72]
add r3, r3, #1
str r3, [fp, #-72]
.L4:
ldr r3, [fp, #-72]
cmp r3, #12
ble .L7
mov r3, #0
str r3, [fp, #-68]
b .L8
.L9:
ldr r2, .L41+20
ldr r3, [fp, #-68]
mov r1, #0
str r1, [r2, r3, lsl #2]
ldr r3, [fp, #-68]
add r3, r3, #1
str r3, [fp, #-68]
.L8:
ldr r3, [fp, #-68]
cmp r3, #3
ble .L9
b .L10
.L39:
mov r3, #0
strb r3, [fp, #-74]
ldr r0, .L41+24
bl printf
sub r3, fp, #76
mov r1, r3
ldr r0, .L41+28
bl __isoc99_scanf
ldrb r3, [fp, #-76] @ zero_extendqisi2
mov r0, r3
bl tolower
mov r3, r0
sub r3, r3, #48
cmp r3, #68
ldrls pc, [pc, r3, asl #2]
b .L11
.L13:
.word .L26
.word .L11
.word .L25
.word .L24
.word .L23
.word .L22
.word .L21
.word .L20
.word .L19
.word .L18
.word .L11
.word .L11
.word .L11
.word .L11
.word .L11
.word .L11
.word .L11
.word .L11
.word .L11
.word .L11
.word .L11
.word .L11
.word .L11
.word .L11
.word .L11
.word .L11
.word .L11
.word .L11
.word .L11
.word .L11
.word .L11
.word .L11
.word .L11
.word .L11
.word .L11
.word .L11
.word .L11
.word .L11
.word .L11
.word .L11
.word .L11
.word .L11
.word .L11
.word .L11
.word .L11
.word .L11
.word .L11
.word .L11
.word .L11
.word .L17
.word .L11
.word .L11
.word .L11
.word .L11
.word .L11
.word .L11
.word .L11
.word .L11
.word .L16
.word .L15
.word .L11
.word .L11
.word .L11
.word .L11
.word .L11
.word .L14
.word .L11
.word .L11
.word .L12
.L26:
mov r0, #0
bl exit
.L25:
mov r3, #0
str r3, [fp, #-72]
b .L27
.L24:
mov r3, #1
str r3, [fp, #-72]
b .L27
.L23:
mov r3, #2
str r3, [fp, #-72]
b .L27
.L22:
mov r3, #3
str r3, [fp, #-72]
b .L27
.L21:
mov r3, #4
str r3, [fp, #-72]
b .L27
.L20:
mov r3, #5
str r3, [fp, #-72]
b .L27
.L19:
mov r3, #6
str r3, [fp, #-72]
b .L27
.L18:
mov r3, #7
str r3, [fp, #-72]
b .L27
.L12:
mov r3, #8
str r3, [fp, #-72]
b .L27
.L16:
mov r3, #9
str r3, [fp, #-72]
b .L27
.L14:
mov r3, #10
str r3, [fp, #-72]
b .L27
.L15:
mov r3, #11
str r3, [fp, #-72]
b .L27
.L17:
mov r3, #12
str r3, [fp, #-72]
b .L27
.L11:
mov r3, #1
strb r3, [fp, #-74]
nop
.L27:
sub r3, fp, #75
mov r1, r3
ldr r0, .L41+28
bl __isoc99_scanf
ldrb r3, [fp, #-75] @ zero_extendqisi2
mov r0, r3
bl tolower
mov r3, r0
sub r3, r3, #99
cmp r3, #16
ldrls pc, [pc, r3, asl #2]
b .L28
.L30:
.word .L33
.word .L32
.word .L28
.word .L28
.word .L28
.word .L31
.word .L28
.word .L28
.word .L28
.word .L28
.word .L28
.word .L28
.word .L28
.word .L28
.word .L28
.word .L28
.word .L29
.L33:
mov r3, #0
str r3, [fp, #-68]
b .L34
.L32:
mov r3, #1
str r3, [fp, #-68]
b .L34
.L31:
mov r3, #2
str r3, [fp, #-68]
b .L34
.L29:
mov r3, #3
str r3, [fp, #-68]
b .L34
.L28:
mov r3, #0
strb r3, [fp, #-74]
nop
.L34:
b .L35
.L36:
ldrb r3, [fp, #-73] @ zero_extendqisi2
cmp r3, #32
beq .L35
mov r3, #1
strb r3, [fp, #-74]
.L35:
bl getchar
mov r3, r0
strb r3, [fp, #-73]
ldrb r3, [fp, #-73] @ zero_extendqisi2
cmp r3, #10
bne .L36
ldrb r3, [fp, #-74] @ zero_extendqisi2
cmp r3, #0
beq .L37
ldr r0, .L41+32
bl puts
b .L10
.L37:
ldr r3, [fp, #-72]
lsl r3, r3, #2
sub r2, fp, #4
add r2, r2, r3
ldr r3, [fp, #-68]
add r3, r2, r3
sub r3, r3, #56
ldrb r3, [r3] @ zero_extendqisi2
cmp r3, #0
beq .L38
ldr r0, .L41+36
bl puts
b .L10
.L38:
ldr r3, [fp, #-72]
lsl r3, r3, #2
sub r2, fp, #4
add r2, r2, r3
ldr r3, [fp, #-68]
add r3, r2, r3
sub r3, r3, #56
mov r2, #1
strb r2, [r3]
ldr r2, .L41+16
ldr r3, [fp, #-72]
ldr r3, [r2, r3, lsl #2]
add r2, r3, #1
ldr r1, .L41+16
ldr r3, [fp, #-72]
str r2, [r1, r3, lsl #2]
ldr r2, .L41+20
ldr r3, [fp, #-68]
ldr r3, [r2, r3, lsl #2]
add r2, r3, #1
ldr r1, .L41+20
ldr r3, [fp, #-68]
str r2, [r1, r3, lsl #2]
ldr r3, [fp, #-64]
add r3, r3, #1
str r3, [fp, #-64]
.L10:
ldr r3, [fp, #-64]
cmp r3, #4
ble .L39
nop
ldr r3, .L41
ldr r2, [r3]
ldr r3, [fp, #-8]
eors r2, r3, r2
mov r3, #0
beq .L40
bl __stack_chk_fail
.L40:
sub sp, fp, #4
@ sp needed
pop {fp, pc}
.L42:
.align 2
.L41:
.word .LC7
.word .LC0
.word .LC1
.word .LC2
.word num_in_rank
.word num_in_suit
.word .LC3
.word .LC4
.word .LC5
.word .LC6
.size read_cards, .-read_cards
.align 2
.syntax unified
.arm
.fpu softvfp
.type analyze_hand, %function
analyze_hand:
@ 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
mov r3, #0
str r3, [fp, #-8]
ldr r3, .L60
mov r2, #0
str r2, [r3]
ldr r3, .L60+4
mov r2, #0
strb r2, [r3]
ldr r3, .L60+4
ldrb r2, [r3] @ zero_extendqisi2
ldr r3, .L60+8
strb r2, [r3]
ldr r3, .L60+8
ldrb r2, [r3] @ zero_extendqisi2
ldr r3, .L60+12
strb r2, [r3]
ldr r3, .L60+12
ldrb r2, [r3] @ zero_extendqisi2
ldr r3, .L60+16
strb r2, [r3]
mov r3, #0
str r3, [fp, #-12]
b .L44
.L46:
ldr r2, .L60+20
ldr r3, [fp, #-12]
ldr r3, [r2, r3, lsl #2]
cmp r3, #5
bne .L45
ldr r3, .L60+16
mov r2, #1
strb r2, [r3]
.L45:
ldr r3, [fp, #-12]
add r3, r3, #1
str r3, [fp, #-12]
.L44:
ldr r3, [fp, #-12]
cmp r3, #3
ble .L46
mov r3, #0
str r3, [fp, #-16]
b .L47
.L48:
ldr r3, [fp, #-16]
add r3, r3, #1
str r3, [fp, #-16]
.L47:
ldr r2, .L60+24
ldr r3, [fp, #-16]
ldr r3, [r2, r3, lsl #2]
cmp r3, #0
beq .L48
b .L49
.L51:
ldr r3, [fp, #-8]
add r3, r3, #1
str r3, [fp, #-8]
ldr r3, [fp, #-16]
add r3, r3, #1
str r3, [fp, #-16]
.L49:
ldr r3, [fp, #-16]
cmp r3, #12
bgt .L50
ldr r2, .L60+24
ldr r3, [fp, #-16]
ldr r3, [r2, r3, lsl #2]
cmp r3, #0
bgt .L51
.L50:
ldr r3, [fp, #-8]
cmp r3, #5
bne .L52
ldr r3, .L60+12
mov r2, #1
strb r2, [r3]
b .L43
.L52:
mov r3, #0
str r3, [fp, #-16]
b .L54
.L59:
ldr r2, .L60+24
ldr r3, [fp, #-16]
ldr r3, [r2, r3, lsl #2]
cmp r3, #4
beq .L55
cmp r3, #4
bgt .L56
cmp r3, #2
beq .L57
cmp r3, #3
beq .L58
b .L56
.L55:
ldr r3, .L60+8
mov r2, #1
strb r2, [r3]
b .L56
.L58:
ldr r3, .L60+4
mov r2, #1
strb r2, [r3]
b .L56
.L57:
ldr r3, .L60
ldr r3, [r3]
add r3, r3, #1
ldr r2, .L60
str r3, [r2]
nop
.L56:
ldr r3, [fp, #-16]
add r3, r3, #1
str r3, [fp, #-16]
.L54:
ldr r3, [fp, #-16]
cmp r3, #12
ble .L59
.L43:
add sp, fp, #0
@ sp needed
ldr fp, [sp], #4
bx lr
.L61:
.align 2
.L60:
.word pairs
.word three
.word four
.word straight
.word flush
.word num_in_suit
.word num_in_rank
.size analyze_hand, .-analyze_hand
.section .rodata
.align 2
.LC8:
.ascii "Straight flush\000"
.align 2
.LC9:
.ascii "four-of-a-kind\000"
.align 2
.LC10:
.ascii "full house\000"
.align 2
.LC11:
.ascii "flush\000"
.align 2
.LC12:
.ascii "straight\000"
.align 2
.LC13:
.ascii "three-of-a-kind\000"
.align 2
.LC14:
.ascii "two pairs\000"
.align 2
.LC15:
.ascii "pair\000"
.align 2
.LC16:
.ascii "high card\000"
.align 2
.LC17:
.ascii "\012\000"
.text
.align 2
.syntax unified
.arm
.fpu softvfp
.type print_result, %function
print_result:
@ args = 0, pretend = 0, frame = 0
@ frame_needed = 1, uses_anonymous_args = 0
push {fp, lr}
add fp, sp, #4
ldr r3, .L72
ldrb r3, [r3] @ zero_extendqisi2
cmp r3, #0
beq .L63
ldr r3, .L72+4
ldrb r3, [r3] @ zero_extendqisi2
cmp r3, #0
beq .L63
ldr r0, .L72+8
bl printf
b .L64
.L63:
ldr r3, .L72+12
ldrb r3, [r3] @ zero_extendqisi2
cmp r3, #0
beq .L65
ldr r0, .L72+16
bl printf
b .L64
.L65:
ldr r3, .L72+20
ldrb r3, [r3] @ zero_extendqisi2
cmp r3, #0
beq .L66
ldr r3, .L72+24
ldr r3, [r3]
cmp r3, #1
bne .L66
ldr r0, .L72+28
bl printf
b .L64
.L66:
ldr r3, .L72+4
ldrb r3, [r3] @ zero_extendqisi2
cmp r3, #0
beq .L67
ldr r0, .L72+32
bl printf
b .L64
.L67:
ldr r3, .L72
ldrb r3, [r3] @ zero_extendqisi2
cmp r3, #0
beq .L68
ldr r0, .L72+36
bl printf
b .L64
.L68:
ldr r3, .L72+20
ldrb r3, [r3] @ zero_extendqisi2
cmp r3, #0
beq .L69
ldr r0, .L72+40
bl printf
b .L64
.L69:
ldr r3, .L72+24
ldr r3, [r3]
cmp r3, #2
bne .L70
ldr r0, .L72+44
bl printf
b .L64
.L70:
ldr r3, .L72+24
ldr r3, [r3]
cmp r3, #1
bne .L71
ldr r0, .L72+48
bl printf
b .L64
.L71:
ldr r0, .L72+52
bl printf
.L64:
ldr r0, .L72+56
bl puts
nop
pop {fp, pc}
.L73:
.align 2
.L72:
.word straight
.word flush
.word .LC8
.word four
.word .LC9
.word three
.word pairs
.word .LC10
.word .LC11
.word .LC12
.word .LC13
.word .LC14
.word .LC15
.word .LC16
.word .LC17
.size print_result, .-print_result
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",%progbits
|
.file "347717.c"
.intel_syntax noprefix
.text
.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 "347717.c"
.text
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",%progbits
|
.file "990433.c"
.intel_syntax noprefix
.text
.section .rodata
.LC0:
.string "%lld %lld"
.LC1:
.string "%lld"
.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, 48
mov rax, QWORD PTR fs:40
mov QWORD PTR -8[rbp], rax
xor eax, eax
lea rdx, -48[rbp]
lea rax, -40[rbp]
mov rsi, rax
lea rdi, .LC0[rip]
mov eax, 0
call __isoc99_scanf@PLT
mov rax, QWORD PTR -40[rbp]
mov rdi, rax
call f
mov QWORD PTR -32[rbp], rax
mov rax, QWORD PTR -48[rbp]
mov rdi, rax
call f
mov QWORD PTR -24[rbp], rax
mov rax, QWORD PTR -40[rbp]
mov rdx, QWORD PTR -48[rbp]
sub rax, rdx
mov rdi, rax
call f
mov QWORD PTR -16[rbp], rax
mov rax, QWORD PTR -24[rbp]
imul rax, QWORD PTR -16[rbp]
mov rcx, rax
mov rax, QWORD PTR -32[rbp]
cqo
idiv rcx
mov rsi, rax
lea rdi, .LC1[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
.globl f
.type f, @function
f:
.LFB1:
.cfi_startproc
endbr64
push rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
mov rbp, rsp
.cfi_def_cfa_register 6
mov QWORD PTR -24[rbp], rdi
mov QWORD PTR -8[rbp], 1
mov DWORD PTR -12[rbp], 1
jmp .L5
.L6:
mov eax, DWORD PTR -12[rbp]
cdqe
mov rdx, QWORD PTR -8[rbp]
imul rax, rdx
mov QWORD PTR -8[rbp], rax
add DWORD PTR -12[rbp], 1
.L5:
mov eax, DWORD PTR -12[rbp]
cdqe
cmp QWORD PTR -24[rbp], rax
jge .L6
mov rax, QWORD PTR -8[rbp]
pop rbp
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE1:
.size f, .-f
.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 "990433.c"
.text
.section .rodata
.align 2
.LC0:
.ascii "%lld %lld\000"
.global __aeabi_ldivmod
.align 2
.LC1:
.ascii "%lld\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 = 48
@ frame_needed = 1, uses_anonymous_args = 0
push {r4, r5, fp, lr}
add fp, sp, #12
sub sp, sp, #48
ldr r3, .L4
ldr r3, [r3]
str r3, [fp, #-16]
mov r3,#0
sub r2, fp, #60
sub r3, fp, #52
mov r1, r3
ldr r0, .L4+4
bl __isoc99_scanf
sub r3, fp, #52
ldmia r3, {r2-r3}
mov r0, r2
mov r1, r3
bl f
str r0, [fp, #-44]
str r1, [fp, #-40]
sub r3, fp, #60
ldmia r3, {r2-r3}
mov r0, r2
mov r1, r3
bl f
str r0, [fp, #-36]
str r1, [fp, #-32]
sub r1, fp, #52
ldmia r1, {r0-r1}
sub r3, fp, #60
ldmia r3, {r2-r3}
subs r4, r0, r2
sbc r5, r1, r3
mov r0, r4
mov r1, r5
bl f
str r0, [fp, #-28]
str r1, [fp, #-24]
ldr r3, [fp, #-32]
ldr r2, [fp, #-28]
mul r2, r3, r2
ldr r3, [fp, #-24]
ldr r1, [fp, #-36]
mul r3, r1, r3
add r1, r2, r3
ldr ip, [fp, #-36]
ldr r0, [fp, #-28]
umull r2, r3, ip, r0
add r1, r1, r3
mov r3, r1
sub r1, fp, #44
ldmia r1, {r0-r1}
bl __aeabi_ldivmod
mov r2, r0
mov r3, r1
ldr r0, .L4+8
bl printf
mov r3, #0
ldr r2, .L4
ldr r1, [r2]
ldr r2, [fp, #-16]
eors r1, r2, r1
mov r2, #0
beq .L3
bl __stack_chk_fail
.L3:
mov r0, r3
sub sp, fp, #12
@ sp needed
pop {r4, r5, fp, pc}
.L5:
.align 2
.L4:
.word .LC2
.word .LC0
.word .LC1
.size main, .-main
.align 2
.global f
.syntax unified
.arm
.fpu softvfp
.type f, %function
f:
@ args = 0, pretend = 0, frame = 24
@ frame_needed = 1, uses_anonymous_args = 0
push {fp, lr}
add fp, sp, #4
sub sp, sp, #24
str r0, [fp, #-28]
str r1, [fp, #-24]
mov r2, #1
mov r3, #0
str r2, [fp, #-12]
str r3, [fp, #-8]
mov r3, #1
str r3, [fp, #-16]
b .L7
.L8:
ldr r3, [fp, #-16]
mov r0, r3
asr r1, r0, #31
ldr r3, [fp, #-8]
mul r2, r0, r3
ldr r3, [fp, #-12]
mul r3, r1, r3
add ip, r2, r3
ldr lr, [fp, #-12]
umull r2, r3, lr, r0
add r1, ip, r3
mov r3, r1
str r2, [fp, #-12]
str r3, [fp, #-8]
str r2, [fp, #-12]
str r3, [fp, #-8]
ldr r3, [fp, #-16]
add r3, r3, #1
str r3, [fp, #-16]
.L7:
ldr r3, [fp, #-16]
mov r2, r3
asr r3, r2, #31
sub r1, fp, #28
ldmia r1, {r0-r1}
cmp r0, r2
sbcs r3, r1, r3
bge .L8
sub r3, fp, #12
ldmia r3, {r2-r3}
mov r0, r2
mov r1, r3
sub sp, fp, #4
@ sp needed
pop {fp, pc}
.size f, .-f
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
.section .note.GNU-stack,"",%progbits
|