133 lines
1.9 KiB
ArmAsm
133 lines
1.9 KiB
ArmAsm
|
.text
|
||
|
.attribute 4, 16
|
||
|
.attribute 5, "rv64i2p0_m2p0_a2p0_f2p0_d2p0_c2p0"
|
||
|
.file "81_skip_spaces.sy"
|
||
|
.globl main
|
||
|
.p2align 1
|
||
|
.type main,@function
|
||
|
main:
|
||
|
addi sp, sp, -432
|
||
|
sd ra, 424(sp)
|
||
|
sd s0, 416(sp)
|
||
|
sd s1, 408(sp)
|
||
|
sd s2, 400(sp)
|
||
|
call getint
|
||
|
beqz a0, .LBB0_7
|
||
|
li s1, 0
|
||
|
li a1, 1
|
||
|
mv s0, sp
|
||
|
.LBB0_2:
|
||
|
mv s2, a1
|
||
|
call getint
|
||
|
sw a0, 0(s0)
|
||
|
addi s1, s1, 1
|
||
|
call getint
|
||
|
addiw a1, s2, 1
|
||
|
addi s0, s0, 4
|
||
|
bnez a0, .LBB0_2
|
||
|
sext.w a0, s1
|
||
|
beqz a0, .LBB0_7
|
||
|
li a0, 0
|
||
|
slli a1, s2, 2
|
||
|
mv a2, sp
|
||
|
add a2, a2, a1
|
||
|
addi a1, s2, -1
|
||
|
addi a2, a2, -4
|
||
|
.LBB0_5:
|
||
|
lw a3, 0(a2)
|
||
|
addw a0, a0, a3
|
||
|
sext.w a3, a1
|
||
|
addi a1, a1, -1
|
||
|
addi a2, a2, -4
|
||
|
bnez a3, .LBB0_5
|
||
|
lui a1, 424740
|
||
|
addiw a1, a1, -1451
|
||
|
mul a1, a0, a1
|
||
|
srli a2, a1, 63
|
||
|
srai a1, a1, 37
|
||
|
addw a1, a1, a2
|
||
|
li a2, 79
|
||
|
mulw a1, a1, a2
|
||
|
subw a0, a0, a1
|
||
|
j .LBB0_8
|
||
|
.LBB0_7:
|
||
|
li a0, 0
|
||
|
.LBB0_8:
|
||
|
ld ra, 424(sp)
|
||
|
ld s0, 416(sp)
|
||
|
ld s1, 408(sp)
|
||
|
ld s2, 400(sp)
|
||
|
addi sp, sp, 432
|
||
|
ret
|
||
|
.Lfunc_end0:
|
||
|
.size main, .Lfunc_end0-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
|