sysy-data/hidden_functional_c/asm/14_dp.s

357 lines
4.7 KiB
ArmAsm
Raw Normal View History

2024-06-14 13:10:27 +08:00
.file "14_dp.sy"
.option pic
.attribute arch, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zifencei2p0"
.attribute unaligned_access, 0
.attribute stack_align, 16
.text
.section .text.startup,"ax",@progbits
.align 1
.globl main
.type main, @function
main:
addi sp,sp,-80
sd ra,72(sp)
sd s2,48(sp)
sd s3,40(sp)
sd s0,64(sp)
sd s1,56(sp)
sd s4,32(sp)
sd s5,24(sp)
sd s6,16(sp)
sd s7,8(sp)
call getint@plt
mv s3,a0
call getint@plt
mv s2,a0
ble s3,zero,.L2
lla s0,dp
lla s7,t+12
mv s6,s0
li s5,1
lla s1,t
li s4,1
.L3:
call getint@plt
srliw a3,a0,31
addw a5,a3,a0
andi a5,a5,1
slli a4,s5,1
subw a5,a5,a3
add a5,a4,a5
slli a5,a5,2
add a5,s1,a5
sw s4,0(a5)
lw a4,0(s6)
lw a5,0(s7)
addi s6,s6,140
addiw s5,s5,1
addw a5,a5,a4
sw a5,0(s6)
addi s7,s7,8
bge s3,s5,.L3
ble s2,zero,.L2
li a5,2
li t4,1
ble s3,a5,.L5
lla t1,t+8
lla a7,dp
li t6,0
li t5,2
li t4,1
li t0,2
.L21:
ble s2,t0,.L36
lw a5,140(a7)
lw a0,0(a7)
lw s5,0(t1)
lw s4,8(t1)
lw t2,4(t1)
lw t3,12(t1)
addi a4,a7,140
mv a1,a7
li a2,2
.L15:
lw a6,4(a1)
blt a0,a6,.L7
addw a3,a0,s5
.L8:
sw a3,4(a4)
blt a5,a3,.L9
addw a5,a5,s4
.L10:
sw a5,144(a4)
lw a0,8(a1)
ble a0,a6,.L11
addw a5,a0,t2
.L12:
sw a5,8(a4)
ble a5,a3,.L13
addw a3,a5,t3
.L14:
sw a3,148(a4)
addiw a3,a2,2
addi a1,a1,8
addi a4,a4,8
ble s2,a3,.L50
mv a2,a3
j .L15
.L7:
addw a3,a6,s5
j .L8
.L13:
addw a3,t3,a3
j .L14
.L11:
addw a5,t2,a6
j .L12
.L9:
addw a5,a3,s4
j .L10
.L2:
li a0,0
bge s2,zero,.L51
.L33:
ld ra,72(sp)
ld s0,64(sp)
ld s1,56(sp)
ld s2,48(sp)
ld s3,40(sp)
ld s4,32(sp)
ld s5,24(sp)
ld s6,16(sp)
ld s7,8(sp)
addi sp,sp,80
jr ra
.L51:
lla s0,dp
lla t5,dp+4
.L32:
li a4,140
mul a4,s3,a4
slli a5,s3,3
add a5,a5,s3
slli a5,a5,2
slli s2,s2,32
sub a5,a5,s3
srli s2,s2,32
add a5,a5,s2
slli a5,a5,2
add t5,t5,a5
li a0,0
add s0,s0,a4
.L35:
lw a5,0(s0)
addi s0,s0,4
mv a4,a5
bge a5,a0,.L34
mv a4,a0
.L34:
sext.w a0,a4
bne s0,t5,.L35
j .L33
.L55:
addiw t5,t5,2
addiw t4,t4,2
addi t6,t6,70
addi t1,t1,16
addi a7,a7,280
bgt s3,t5,.L21
.L5:
li a7,-140
li t6,35
mul a7,t4,a7
addiw t0,s2,-3
slli a0,t4,3
andi t0,t0,-2
li t2,2
add a0,s1,a0
lla t5,dp+4
addiw t0,t0,3
mul t6,t4,t6
addi t1,a7,140
neg a7,a7
addi t6,t6,-35
ble s2,t2,.L38
.L54:
lw s4,0(a0)
lw t3,4(a0)
add a5,s0,a7
lw a4,-140(a5)
sub a1,t5,t1
add a2,t5,a7
mv a3,t0
li a5,1
.L27:
lw a6,0(a1)
sext.w a5,a5
addw s5,s4,a4
ble a6,a4,.L24
addw s5,a6,s4
.L24:
sw s5,0(a2)
lw a4,4(a1)
addiw a5,a5,2
addw s5,a6,t3
bge a6,a4,.L26
addw s5,a4,t3
.L26:
sw s5,4(a2)
addi a1,a1,8
addi a2,a2,8
bne a5,t0,.L27
.L22:
add a4,a3,t6
slli a4,a4,2
add a4,s0,a4
slli t3,t4,1
j .L30
.L53:
add a5,a4,t1
addw a2,a6,a2
add a5,a5,a7
sw a2,0(a5)
addi a4,a4,4
blt s2,a3,.L52
.L30:
addiw a3,a3,1
andi a5,a3,1
add a5,t3,a5
lw a1,0(a4)
lw a6,-4(a4)
slli a5,a5,2
add a5,s1,a5
lw a2,0(a5)
ble a1,a6,.L53
add a5,a4,t1
addw a2,a1,a2
add a5,a5,a7
sw a2,0(a5)
addi a4,a4,4
bge s2,a3,.L30
.L52:
addiw t4,t4,1
addi t1,t1,-140
addi a7,a7,140
addi t6,t6,35
addi a0,a0,8
blt s3,t4,.L32
bgt s2,t2,.L54
.L38:
li a3,1
j .L22
.L50:
addiw a2,a2,1
.L6:
addi a3,t6,35
add a1,a2,t6
add a3,a3,a2
slli a1,a1,2
slli a3,a3,2
add a1,s0,a1
add a3,s0,a3
slli t3,t4,1
slli a6,t5,1
j .L20
.L56:
add a5,a6,a5
lw a0,-4(a3)
addw a4,a4,t2
slli a5,a5,2
add a5,s1,a5
sw a4,0(a3)
lw a5,0(a5)
blt a0,a4,.L18
.L57:
addw a5,a0,a5
.L19:
sw a5,140(a3)
addi a1,a1,4
addi a3,a3,4
blt s2,a2,.L55
.L20:
addiw a2,a2,1
andi a5,a2,1
add a4,t3,a5
lw a0,0(a1)
lw t2,-4(a1)
slli a4,a4,2
add a4,s1,a4
lw a4,0(a4)
ble a0,t2,.L56
addw a4,a4,a0
add a5,a6,a5
lw a0,-4(a3)
slli a5,a5,2
add a5,s1,a5
sw a4,0(a3)
lw a5,0(a5)
bge a0,a4,.L57
.L18:
addw a5,a5,a4
j .L19
.L36:
li a2,1
j .L6
.size main, .-main
.globl dp
.globl t
.globl _sysy_idx
.globl _sysy_us
.globl _sysy_s
.globl _sysy_m
.globl _sysy_h
.globl _sysy_l2
.globl _sysy_l1
.globl _sysy_end
.globl _sysy_start
.bss
.align 3
.type dp, @object
.size dp, 140700
dp:
.zero 140700
.zero 4
.type t, @object
.size t, 8040
t:
.zero 8040
.type _sysy_idx, @object
.size _sysy_idx, 4
_sysy_idx:
.zero 4
.zero 4
.type _sysy_us, @object
.size _sysy_us, 4096
_sysy_us:
.zero 4096
.type _sysy_s, @object
.size _sysy_s, 4096
_sysy_s:
.zero 4096
.type _sysy_m, @object
.size _sysy_m, 4096
_sysy_m:
.zero 4096
.type _sysy_h, @object
.size _sysy_h, 4096
_sysy_h:
.zero 4096
.type _sysy_l2, @object
.size _sysy_l2, 4096
_sysy_l2:
.zero 4096
.type _sysy_l1, @object
.size _sysy_l1, 4096
_sysy_l1:
.zero 4096
.type _sysy_end, @object
.size _sysy_end, 16
_sysy_end:
.zero 16
.type _sysy_start, @object
.size _sysy_start, 16
_sysy_start:
.zero 16
.ident "GCC: (Debian 12.2.0-13) 12.2.0"
.section .note.GNU-stack,"",@progbits