sysy-data/hidden_functional_c/asm/30_many_dimensions.s

525 lines
7.8 KiB
ArmAsm

.text
.attribute 4, 16
.attribute 5, "rv64i2p0_m2p0_a2p0_f2p0_d2p0_c2p0"
.file "30_many_dimensions.sy"
.globl sum
.p2align 1
.type sum,@function
sum:
addi sp, sp, -32
sd s0, 24(sp)
sd s1, 16(sp)
sd s2, 8(sp)
sd s3, 0(sp)
ld t0, 112(sp)
ld t1, 104(sp)
ld t2, 96(sp)
ld t3, 88(sp)
ld t4, 80(sp)
ld t5, 72(sp)
ld t6, 64(sp)
ld s2, 56(sp)
ld s3, 48(sp)
lw a0, 0(a0)
lw a1, 8(a1)
lw a2, 4(a2)
ld s0, 40(sp)
ld s1, 32(sp)
addw a0, a0, a1
addw a0, a0, a2
lw a1, 40(a3)
lw a2, 24(a4)
lw a3, 228(a5)
lw a4, 56(a6)
addw a0, a0, a1
addw a0, a0, a2
addw a0, a0, a3
addw a0, a0, a4
lw a1, 964(a7)
lw a2, 224(s1)
lw a3, 804(s0)
lw a4, 1996(s3)
addw a0, a0, a1
addw a0, a0, a2
addw a0, a0, a3
addw a0, a0, a4
addi a1, s2, 1612
lw a1, 1612(a1)
lui a2, 6
addiw a2, a2, 1824
add a2, a2, t6
lw a2, 0(a2)
lw a3, 508(t5)
lw a4, 124(t4)
addw a0, a0, a1
addw a0, a0, a2
addw a0, a0, a3
addw a0, a0, a4
lui a1, 60
addiw a1, a1, 912
add a1, a1, t3
lw a1, 0(a1)
lui a2, 4
addiw a2, a2, -428
add a2, a2, t2
lw a2, 0(a2)
lui a3, 202
addiw a3, a3, 972
add a3, a3, t1
lw a3, 0(a3)
lui a4, 69
addiw a4, a4, -1024
add a4, a4, t0
lw a4, 0(a4)
addw a0, a0, a1
addw a0, a0, a2
addw a0, a0, a3
addw a0, a0, a4
ld s0, 24(sp)
ld s1, 16(sp)
ld s2, 8(sp)
ld s3, 0(sp)
addi sp, sp, 32
ret
.Lfunc_end0:
.size sum, .Lfunc_end0-sum
.globl main
.p2align 1
.type main,@function
main:
addi sp, sp, -2032
sd ra, 2024(sp)
sd s0, 2016(sp)
sd s1, 2008(sp)
sd s2, 2000(sp)
sd s3, 1992(sp)
sd s4, 1984(sp)
sd s5, 1976(sp)
sd s6, 1968(sp)
sd s7, 1960(sp)
sd s8, 1952(sp)
sd s9, 1944(sp)
sd s10, 1936(sp)
sd s11, 1928(sp)
lui a0, 512
addiw a0, a0, -1840
sub sp, sp, a0
lui a0, 202
addiw a0, a0, 972
addi s8, sp, 88
add a0, a0, s8
sd a0, 56(sp)
lui a0, 69
addiw a0, a0, -1024
add a0, a0, s8
sd a0, 48(sp)
lui a0, 60
addiw a0, a0, 912
add a0, a0, s8
sd a0, 40(sp)
lui a0, 6
addiw a0, a0, 1824
add a0, a0, s8
sd a0, 24(sp)
lui a0, 4
addiw a0, a0, -428
add a0, a0, s8
sd a0, 32(sp)
addi a0, s8, 1612
addi a0, a0, 1612
sd a0, 16(sp)
addi a0, sp, 88
lui a2, 512
li a1, 0
call memset@plt
li t6, 0
li a0, 0
li a2, 1
.LBB1_1:
sd a2, 64(sp)
li s10, 0
li a2, 1
.LBB1_2:
sd a2, 72(sp)
li ra, 0
li a2, 1
.LBB1_3:
sd a2, 80(sp)
li a6, 0
li t1, 1
.LBB1_4:
li a7, 0
li t2, 1
.LBB1_5:
li t0, 0
li t3, 1
.LBB1_6:
li s0, 0
li t4, 1
.LBB1_7:
li a2, 0
li t5, 1
.LBB1_8:
li a4, 0
li s9, 1
.LBB1_9:
li s1, 0
li s11, 1
.LBB1_10:
li s3, 0
li s2, 1
.LBB1_11:
li s5, 0
li s4, 1
.LBB1_12:
li a3, 0
li s6, 1
.LBB1_13:
slli a1, t6, 20
add a1, a1, s8
slli a5, s10, 19
add a1, a1, a5
slli a5, ra, 18
add a1, a1, a5
slli a5, a6, 17
add a1, a1, a5
slli a5, a7, 16
add a1, a1, a5
slli a5, t0, 15
add a1, a1, a5
slli a5, s0, 14
add a1, a1, a5
slli a5, a2, 13
add a1, a1, a5
slli a5, a4, 12
add a1, a1, a5
slli a5, s1, 11
add a1, a1, a5
slli a5, s3, 10
add a1, a1, a5
slli a5, s5, 9
add a1, a1, a5
slli a3, a3, 8
add s7, a1, a3
sw a0, 0(s7)
addiw a1, a0, 1
sw a1, 4(s7)
addiw a1, a0, 2
sw a1, 8(s7)
addiw a1, a0, 3
sw a1, 12(s7)
addiw a1, a0, 4
sw a1, 16(s7)
addiw a1, a0, 5
sw a1, 20(s7)
addiw a1, a0, 6
sw a1, 24(s7)
addiw a1, a0, 7
sw a1, 28(s7)
addiw a1, a0, 8
sw a1, 32(s7)
addiw a1, a0, 9
sw a1, 36(s7)
addiw a1, a0, 10
sw a1, 40(s7)
addiw a1, a0, 11
sw a1, 44(s7)
addiw a1, a0, 12
sw a1, 48(s7)
addiw a1, a0, 13
sw a1, 52(s7)
addiw a1, a0, 14
sw a1, 56(s7)
addiw a1, a0, 15
sw a1, 60(s7)
addiw a1, a0, 16
sw a1, 64(s7)
addiw a1, a0, 17
sw a1, 68(s7)
addiw a1, a0, 18
sw a1, 72(s7)
addiw a1, a0, 19
sw a1, 76(s7)
addiw a1, a0, 20
sw a1, 80(s7)
addiw a1, a0, 21
sw a1, 84(s7)
addiw a1, a0, 22
sw a1, 88(s7)
addiw a1, a0, 23
sw a1, 92(s7)
addiw a1, a0, 24
sw a1, 96(s7)
addiw a1, a0, 25
sw a1, 100(s7)
addiw a1, a0, 26
sw a1, 104(s7)
addiw a1, a0, 27
sw a1, 108(s7)
addiw a1, a0, 28
sw a1, 112(s7)
addiw a1, a0, 29
sw a1, 116(s7)
addiw a1, a0, 30
sw a1, 120(s7)
addiw a1, a0, 31
sw a1, 124(s7)
addiw a1, a0, 32
sw a1, 128(s7)
addiw a1, a0, 33
sw a1, 132(s7)
addiw a1, a0, 34
sw a1, 136(s7)
addiw a1, a0, 35
sw a1, 140(s7)
addiw a1, a0, 36
sw a1, 144(s7)
addiw a1, a0, 37
sw a1, 148(s7)
addiw a1, a0, 38
sw a1, 152(s7)
addiw a1, a0, 39
sw a1, 156(s7)
addiw a1, a0, 40
sw a1, 160(s7)
addiw a1, a0, 41
sw a1, 164(s7)
addiw a1, a0, 42
sw a1, 168(s7)
addiw a1, a0, 43
sw a1, 172(s7)
addiw a1, a0, 44
sw a1, 176(s7)
addiw a1, a0, 45
sw a1, 180(s7)
addiw a1, a0, 46
sw a1, 184(s7)
addiw a1, a0, 47
sw a1, 188(s7)
addiw a1, a0, 48
sw a1, 192(s7)
addiw a1, a0, 49
sw a1, 196(s7)
addiw a1, a0, 50
sw a1, 200(s7)
addiw a1, a0, 51
sw a1, 204(s7)
addiw a1, a0, 52
sw a1, 208(s7)
addiw a1, a0, 53
sw a1, 212(s7)
addiw a1, a0, 54
sw a1, 216(s7)
addiw a1, a0, 55
sw a1, 220(s7)
addiw a1, a0, 56
sw a1, 224(s7)
addiw a1, a0, 57
sw a1, 228(s7)
addiw a1, a0, 58
sw a1, 232(s7)
addiw a1, a0, 59
sw a1, 236(s7)
addiw a1, a0, 60
sw a1, 240(s7)
addiw a1, a0, 61
sw a1, 244(s7)
addiw a1, a0, 62
sw a1, 248(s7)
addiw a1, a0, 63
sw a1, 252(s7)
addiw a0, a0, 64
andi a1, s6, 1
li a3, 1
li s6, 0
bnez a1, .LBB1_13
andi a1, s4, 1
li s5, 1
li s4, 0
bnez a1, .LBB1_12
andi a1, s2, 1
li s3, 1
li s2, 0
bnez a1, .LBB1_11
andi a1, s11, 1
li s1, 1
li s11, 0
bnez a1, .LBB1_10
andi a1, s9, 1
li a4, 1
li s9, 0
bnez a1, .LBB1_9
andi a1, t5, 1
li a2, 1
li t5, 0
bnez a1, .LBB1_8
andi a1, t4, 1
li s0, 1
li t4, 0
bnez a1, .LBB1_7
andi a1, t3, 1
li t0, 1
li t3, 0
bnez a1, .LBB1_6
andi a1, t2, 1
li a7, 1
li t2, 0
bnez a1, .LBB1_5
andi a1, t1, 1
li a6, 1
li t1, 0
bnez a1, .LBB1_4
ld a1, 80(sp)
andi a1, a1, 1
li ra, 1
li a2, 0
bnez a1, .LBB1_3
ld a1, 72(sp)
andi a1, a1, 1
li s10, 1
li a2, 0
bnez a1, .LBB1_2
ld a1, 64(sp)
andi a1, a1, 1
li t6, 1
li a2, 0
bnez a1, .LBB1_1
lw a0, 88(sp)
lw a1, 96(sp)
lw a2, 92(sp)
addw a0, a0, a1
addw a0, a0, a2
lw a1, 128(sp)
lw a2, 112(sp)
lw a3, 316(sp)
lw a4, 144(sp)
addw a0, a0, a1
addw a0, a0, a2
addw a0, a0, a3
addw a0, a0, a4
lw a1, 1052(sp)
lw a2, 312(sp)
lw a3, 892(sp)
lui a4, 1
addiw a4, a4, -2012
add a4, a4, sp
lw a4, 0(a4)
addw a0, a0, a1
addw a0, a0, a2
addw a0, a0, a3
addw a0, a0, a4
ld a1, 16(sp)
lw a1, 0(a1)
ld a2, 24(sp)
lw a2, 0(a2)
lw a3, 596(sp)
lw a4, 212(sp)
addw a0, a0, a1
addw a0, a0, a2
addw a0, a0, a3
addw a0, a0, a4
ld a1, 40(sp)
lw a1, 0(a1)
ld a2, 32(sp)
lw a2, 0(a2)
ld a3, 56(sp)
lw a3, 0(a3)
ld a4, 48(sp)
lw a4, 0(a4)
addw a0, a0, a1
addw a0, a0, a2
addw a0, a0, a3
addw a0, a0, a4
call putint
li a0, 0
lui a1, 512
addiw a1, a1, -1840
add sp, sp, a1
ld ra, 2024(sp)
ld s0, 2016(sp)
ld s1, 2008(sp)
ld s2, 2000(sp)
ld s3, 1992(sp)
ld s4, 1984(sp)
ld s5, 1976(sp)
ld s6, 1968(sp)
ld s7, 1960(sp)
ld s8, 1952(sp)
ld s9, 1944(sp)
ld s10, 1936(sp)
ld s11, 1928(sp)
addi sp, sp, 2032
ret
.Lfunc_end1:
.size main, .Lfunc_end1-main
.type _sysy_start,@object
.bss
.globl _sysy_start
.p2align 3
_sysy_start:
.zero 16
.size _sysy_start, 16
.type _sysy_end,@object
.globl _sysy_end
.p2align 3
_sysy_end:
.zero 16
.size _sysy_end, 16
.type _sysy_l1,@object
.globl _sysy_l1
.p2align 2
_sysy_l1:
.zero 4096
.size _sysy_l1, 4096
.type _sysy_l2,@object
.globl _sysy_l2
.p2align 2
_sysy_l2:
.zero 4096
.size _sysy_l2, 4096
.type _sysy_h,@object
.globl _sysy_h
.p2align 2
_sysy_h:
.zero 4096
.size _sysy_h, 4096
.type _sysy_m,@object
.globl _sysy_m
.p2align 2
_sysy_m:
.zero 4096
.size _sysy_m, 4096
.type _sysy_s,@object
.globl _sysy_s
.p2align 2
_sysy_s:
.zero 4096
.size _sysy_s, 4096
.type _sysy_us,@object
.globl _sysy_us
.p2align 2
_sysy_us:
.zero 4096
.size _sysy_us, 4096
.type _sysy_idx,@object
.section .sbss,"aw",@nobits
.globl _sysy_idx
.p2align 2
_sysy_idx:
.word 0
.size _sysy_idx, 4
.ident "Debian clang version 14.0.6"
.section ".note.GNU-stack","",@progbits
.addrsig