Files
2026-03-22 17:40:44 +08:00

58 lines
978 B
ArmAsm

.file "main.c"
.text
.section .rodata
.LC0:
.string "Teacher"
.LC1:
.string "Student1"
.LC2:
.string "Chinese"
.text
.globl main
.type main, @function
main:
.LFB0:
.cfi_startproc
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
movq %rsp, %rbp
.cfi_def_cfa_register 6
subq $32, %rsp
movl $1, %edx
movl $20, %esi
movl $.LC0, %edi
call new_teacher
movq %rax, -8(%rbp)
movl $18, %esi
movl $.LC1, %edi
call new_student
movq %rax, -16(%rbp)
movq -8(%rbp), %rax
movq %rax, %rdx
movl $30, %esi
movl $.LC2, %edi
call new_class
movq %rax, -24(%rbp)
movq -8(%rbp), %rax
movl $10000, %esi
movq %rax, %rdi
call add_salary
movq -16(%rbp), %rdx
movq -24(%rbp), %rax
movq %rdx, %rsi
movq %rax, %rdi
call add_student
movq -24(%rbp), %rax
movq %rax, %rdi
call print
movl $0, %eax
leave
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE0:
.size main, .-main
.ident "GCC: (GNU) 15.2.1 20260123 (Red Hat 15.2.1-7)"
.section .note.GNU-stack,"",@progbits