-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoutput.app.s
124 lines (122 loc) · 2.87 KB
/
output.app.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
.section __TEXT,__text,regular,pure_instructions
.macosx_version_min 10, 15
.globl _testStaticallySizedArray ## -- Begin function testStaticallySizedArray
.p2align 4, 0x90
_testStaticallySizedArray: ## @testStaticallySizedArray
.cfi_startproc
## %bb.0:
movabsq $12884901888, %rax ## imm = 0x300000000
movq %rax, -8(%rsp)
movabsq $8589934592, %rax ## imm = 0x200000000
movq %rax, -16(%rsp)
movq $1, -24(%rsp)
movb $1, %al
testb %al, %al
jne LBB0_1
## %bb.4:
movl $1, %eax
retq
LBB0_1: ## %if.7.continue
cmpl $2, -12(%rsp)
je LBB0_2
## %bb.5:
movl $2, %eax
retq
LBB0_2: ## %if.12.continue
cmpl $3, -4(%rsp)
je LBB0_3
## %bb.6:
movl $3, %eax
retq
LBB0_3: ## %if.17.continue
xorl %eax, %eax
retq
.cfi_endproc
## -- End function
.globl _testDynamicallySizedArray ## -- Begin function testDynamicallySizedArray
.p2align 4, 0x90
_testDynamicallySizedArray: ## @testDynamicallySizedArray
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
subq $16, %rsp
movl $6, -4(%rbp)
movq %rsp, %rax
leaq -48(%rax), %rsp
movq -48(%rax), %rax
cmpl $1, (%rax)
je LBB1_3
## %bb.1:
movl $4, %eax
jmp LBB1_2
LBB1_3: ## %if.6.continue
xorl %eax, %eax
LBB1_2:
movq %rbp, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.globl _main ## -- Begin function main
.p2align 4, 0x90
_main: ## @main
.cfi_startproc
## %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
pushq %r14
pushq %rbx
subq $16, %rsp
.cfi_offset %rbx, -32
.cfi_offset %r14, -24
movl %edi, -24(%rbp)
movq %rsi, -32(%rbp)
leaq L_l1_StringLiteral0(%rip), %rdi
xorl %esi, %esi
xorl %eax, %eax
callq _printf
callq _testStaticallySizedArray
movl %eax, -20(%rbp)
testl %eax, %eax
je LBB2_3
## %bb.1:
movl -20(%rbp), %eax
jmp LBB2_2
LBB2_3: ## %if.7.continue
movq %rsp, %rbx
leaq -16(%rbx), %r14
movq %r14, %rsp
callq _testDynamicallySizedArray
movl %eax, -16(%rbx)
testl %eax, %eax
je LBB2_5
## %bb.4:
movl (%r14), %eax
jmp LBB2_2
LBB2_5: ## %if.13.continue
leaq L_l1_StringLiteral1(%rip), %rdi
xorl %esi, %esi
xorl %eax, %eax
callq _printf
xorl %eax, %eax
LBB2_2:
leaq -16(%rbp), %rsp
popq %rbx
popq %r14
popq %rbp
retq
.cfi_endproc
## -- End function
.section __TEXT,__cstring,cstring_literals
L_l1_StringLiteral0: ## @l1_StringLiteral0
.asciz "Array: "
L_l1_StringLiteral1: ## @l1_StringLiteral1
.asciz "OK\n"
.subsections_via_symbols