76 lines
1.3 KiB
ArmAsm
76 lines
1.3 KiB
ArmAsm
.file "teacher.c"
|
|
.text
|
|
.globl new_teacher
|
|
.type new_teacher, @function
|
|
new_teacher:
|
|
.LFB6:
|
|
.cfi_startproc
|
|
pushq %rbp
|
|
.cfi_def_cfa_offset 16
|
|
.cfi_offset 6, -16
|
|
movq %rsp, %rbp
|
|
.cfi_def_cfa_register 6
|
|
subq $32, %rsp
|
|
movq %rdi, -24(%rbp)
|
|
movl %esi, -28(%rbp)
|
|
movl %edx, -32(%rbp)
|
|
movl $72, %edi
|
|
call malloc
|
|
movq %rax, -8(%rbp)
|
|
cmpq $0, -8(%rbp)
|
|
jne .L2
|
|
movl $0, %eax
|
|
jmp .L3
|
|
.L2:
|
|
movq -8(%rbp), %rax
|
|
movq -24(%rbp), %rcx
|
|
movl $49, %edx
|
|
movq %rcx, %rsi
|
|
movq %rax, %rdi
|
|
call strncpy
|
|
movq -8(%rbp), %rax
|
|
movb $0, 49(%rax)
|
|
movq -8(%rbp), %rax
|
|
movl -28(%rbp), %edx
|
|
movl %edx, 52(%rax)
|
|
movq -8(%rbp), %rax
|
|
movl -32(%rbp), %edx
|
|
movl %edx, 56(%rax)
|
|
movq -8(%rbp), %rax
|
|
movq $0, 64(%rax)
|
|
movq -8(%rbp), %rax
|
|
.L3:
|
|
leave
|
|
.cfi_def_cfa 7, 8
|
|
ret
|
|
.cfi_endproc
|
|
.LFE6:
|
|
.size new_teacher, .-new_teacher
|
|
.globl add_salary
|
|
.type add_salary, @function
|
|
add_salary:
|
|
.LFB7:
|
|
.cfi_startproc
|
|
pushq %rbp
|
|
.cfi_def_cfa_offset 16
|
|
.cfi_offset 6, -16
|
|
movq %rsp, %rbp
|
|
.cfi_def_cfa_register 6
|
|
movq %rdi, -8(%rbp)
|
|
movq %rsi, -16(%rbp)
|
|
movq -8(%rbp), %rax
|
|
movq 64(%rax), %rdx
|
|
movq -16(%rbp), %rax
|
|
addq %rax, %rdx
|
|
movq -8(%rbp), %rax
|
|
movq %rdx, 64(%rax)
|
|
nop
|
|
popq %rbp
|
|
.cfi_def_cfa 7, 8
|
|
ret
|
|
.cfi_endproc
|
|
.LFE7:
|
|
.size add_salary, .-add_salary
|
|
.ident "GCC: (GNU) 15.2.1 20260123 (Red Hat 15.2.1-7)"
|
|
.section .note.GNU-stack,"",@progbits
|