-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathutil.s
123 lines (123 loc) · 2.02 KB
/
util.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
.file "util.c"
.text
.section .rodata
.LC0:
.string "\nRan out of memory!\n"
.text
.globl checked_malloc
.type checked_malloc, @function
checked_malloc:
.LFB6:
.cfi_startproc
endbr64
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
movq %rsp, %rbp
.cfi_def_cfa_register 6
subq $32, %rsp
movl %edi, -20(%rbp)
movl -20(%rbp), %eax
cltq
movq %rax, %rdi
call malloc@PLT
movq %rax, -8(%rbp)
cmpq $0, -8(%rbp)
jne .L2
movq stderr(%rip), %rax
movq %rax, %rcx
movl $20, %edx
movl $1, %esi
leaq .LC0(%rip), %rdi
call fwrite@PLT
movl $1, %edi
call exit@PLT
.L2:
movq -8(%rbp), %rax
leave
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE6:
.size checked_malloc, .-checked_malloc
.globl String
.type String, @function
String:
.LFB7:
.cfi_startproc
endbr64
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)
movq -24(%rbp), %rax
movq %rax, %rdi
call strlen@PLT
addl $1, %eax
movl %eax, %edi
call checked_malloc
movq %rax, -8(%rbp)
movq -24(%rbp), %rdx
movq -8(%rbp), %rax
movq %rdx, %rsi
movq %rax, %rdi
call strcpy@PLT
movq -8(%rbp), %rax
leave
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE7:
.size String, .-String
.globl U_BoolList
.type U_BoolList, @function
U_BoolList:
.LFB8:
.cfi_startproc
endbr64
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
movq %rsp, %rbp
.cfi_def_cfa_register 6
subq $32, %rsp
movl %edi, %eax
movq %rsi, -32(%rbp)
movb %al, -20(%rbp)
movl $16, %edi
call checked_malloc
movq %rax, -8(%rbp)
movq -8(%rbp), %rax
movzbl -20(%rbp), %edx
movb %dl, (%rax)
movq -8(%rbp), %rax
movq -32(%rbp), %rdx
movq %rdx, 8(%rax)
movq -8(%rbp), %rax
leave
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE8:
.size U_BoolList, .-U_BoolList
.ident "GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.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: