-
Notifications
You must be signed in to change notification settings - Fork 0
/
01262023.s
155 lines (155 loc) · 2.45 KB
/
01262023.s
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
.file "01262023.c"
.text
.globl add5
.type add5, @function
add5:
.LFB0:
.cfi_startproc
endbr64
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 %rdx, -24(%rbp)
movq %rcx, -32(%rbp)
movq %r8, -40(%rbp)
movq -8(%rbp), %rdx
movq -16(%rbp), %rax
addq %rax, %rdx
movq -24(%rbp), %rax
addq %rax, %rdx
movq -32(%rbp), %rax
addq %rax, %rdx
movq -40(%rbp), %rax
addq %rdx, %rax
popq %rbp
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE0:
.size add5, .-add5
.globl add10
.type add10, @function
add10:
.LFB1:
.cfi_startproc
endbr64
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
movq %rsp, %rbp
.cfi_def_cfa_register 6
pushq %rbx
subq $48, %rsp
.cfi_offset 3, -24
movq %rdi, -16(%rbp)
movq %rsi, -24(%rbp)
movq %rdx, -32(%rbp)
movq %rcx, -40(%rbp)
movq %r8, -48(%rbp)
movq %r9, -56(%rbp)
movq -48(%rbp), %rdi
movq -40(%rbp), %rcx
movq -32(%rbp), %rdx
movq -24(%rbp), %rsi
movq -16(%rbp), %rax
movq %rdi, %r8
movq %rax, %rdi
call add5
movq %rax, %rbx
movq 40(%rbp), %rdi
movq 32(%rbp), %rcx
movq 24(%rbp), %rdx
movq 16(%rbp), %rsi
movq -56(%rbp), %rax
movq %rdi, %r8
movq %rax, %rdi
call add5
addq %rbx, %rax
movq -8(%rbp), %rbx
leave
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE1:
.size add10, .-add10
.globl pcount_r
.type pcount_r, @function
pcount_r:
.LFB2:
.cfi_startproc
endbr64
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
movq %rsp, %rbp
.cfi_def_cfa_register 6
pushq %rbx
subq $24, %rsp
.cfi_offset 3, -24
movq %rdi, -24(%rbp)
cmpq $0, -24(%rbp)
jne .L6
movl $0, %eax
jmp .L7
.L6:
movq -24(%rbp), %rax
andl $1, %eax
movq %rax, %rbx
movq -24(%rbp), %rax
shrq %rax
movq %rax, %rdi
call pcount_r
addq %rbx, %rax
.L7:
movq -8(%rbp), %rbx
leave
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE2:
.size pcount_r, .-pcount_r
.globl main
.type main, @function
main:
.LFB3:
.cfi_startproc
endbr64
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
movq %rsp, %rbp
.cfi_def_cfa_register 6
subq $16, %rsp
movl %edi, -4(%rbp)
movq %rsi, -16(%rbp)
movl $10, %edi
call pcount_r
movl $0, %eax
leave
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE3:
.size main, .-main
.ident "GCC: (Ubuntu 12.2.0-3ubuntu1) 12.2.0"
.section .note.GNU-stack,"",@progbits
.section .note.gnu.property,"a"
.align 8
.long 1f - 0f
.long 4f - 1f
.long 5
0:
.string "GNU"
1:
.align 8
.long 0xc0000002
.long 3f - 2f
2:
.long 0x3
3:
.align 8
4: