forked from CMinusGroup/C_compiler
-
Notifications
You must be signed in to change notification settings - Fork 0
/
hell.ll
241 lines (208 loc) · 9.76 KB
/
hell.ll
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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
; ModuleID = 'hell.c'
source_filename = "hell.c"
target datalayout = "e-m:x-p:32:32-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:32-n8:16:32-a:0:32-S32"
target triple = "i686-pc-windows-msvc19.16.27034"
%struct.__crt_locale_pointers = type { %struct.__crt_locale_data*, %struct.__crt_multibyte_data* }
%struct.__crt_locale_data = type opaque
%struct.__crt_multibyte_data = type opaque
%struct._iobuf = type { i8* }
$sprintf = comdat any
$vsprintf = comdat any
$_snprintf = comdat any
$_vsnprintf = comdat any
$printf_s = comdat any
$_vsprintf_l = comdat any
$_vsnprintf_l = comdat any
$__local_stdio_printf_options = comdat any
$_vfprintf_s_l = comdat any
$"??_C@_0N@MEFMBHFK@hello?0worldd?$AA@" = comdat any
@"??_C@_0N@MEFMBHFK@hello?0worldd?$AA@" = linkonce_odr dso_local unnamed_addr constant [13 x i8] c"hello,worldd\00", comdat, align 1
@__local_stdio_printf_options._OptionsStorage = internal global i64 0, align 8
; Function Attrs: nobuiltin noinline nounwind optnone
define linkonce_odr dso_local i32 @sprintf(i8* %0, i8* %1, ...) #0 comdat {
%3 = alloca i8*, align 4
%4 = alloca i8*, align 4
%5 = alloca i32, align 4
%6 = alloca i8*, align 4
store i8* %1, i8** %3, align 4
store i8* %0, i8** %4, align 4
%7 = bitcast i8** %6 to i8*
call void @llvm.va_start(i8* %7)
%8 = load i8*, i8** %6, align 4
%9 = load i8*, i8** %3, align 4
%10 = load i8*, i8** %4, align 4
%11 = call i32 @_vsprintf_l(i8* %10, i8* %9, %struct.__crt_locale_pointers* null, i8* %8)
store i32 %11, i32* %5, align 4
%12 = bitcast i8** %6 to i8*
call void @llvm.va_end(i8* %12)
%13 = load i32, i32* %5, align 4
ret i32 %13
}
; Function Attrs: nobuiltin noinline nounwind optnone
define linkonce_odr dso_local i32 @vsprintf(i8* %0, i8* %1, i8* %2) #0 comdat {
%4 = alloca i8*, align 4
%5 = alloca i8*, align 4
%6 = alloca i8*, align 4
store i8* %2, i8** %4, align 4
store i8* %1, i8** %5, align 4
store i8* %0, i8** %6, align 4
%7 = load i8*, i8** %4, align 4
%8 = load i8*, i8** %5, align 4
%9 = load i8*, i8** %6, align 4
%10 = call i32 @_vsnprintf_l(i8* %9, i32 -1, i8* %8, %struct.__crt_locale_pointers* null, i8* %7)
ret i32 %10
}
; Function Attrs: noinline nounwind optnone
define linkonce_odr dso_local i32 @_snprintf(i8* %0, i32 %1, i8* %2, ...) #1 comdat {
%4 = alloca i8*, align 4
%5 = alloca i32, align 4
%6 = alloca i8*, align 4
%7 = alloca i32, align 4
%8 = alloca i8*, align 4
store i8* %2, i8** %4, align 4
store i32 %1, i32* %5, align 4
store i8* %0, i8** %6, align 4
%9 = bitcast i8** %8 to i8*
call void @llvm.va_start(i8* %9)
%10 = load i8*, i8** %8, align 4
%11 = load i8*, i8** %4, align 4
%12 = load i32, i32* %5, align 4
%13 = load i8*, i8** %6, align 4
%14 = call i32 @_vsnprintf(i8* %13, i32 %12, i8* %11, i8* %10)
store i32 %14, i32* %7, align 4
%15 = bitcast i8** %8 to i8*
call void @llvm.va_end(i8* %15)
%16 = load i32, i32* %7, align 4
ret i32 %16
}
; Function Attrs: noinline nounwind optnone
define linkonce_odr dso_local i32 @_vsnprintf(i8* %0, i32 %1, i8* %2, i8* %3) #1 comdat {
%5 = alloca i8*, align 4
%6 = alloca i8*, align 4
%7 = alloca i32, align 4
%8 = alloca i8*, align 4
store i8* %3, i8** %5, align 4
store i8* %2, i8** %6, align 4
store i32 %1, i32* %7, align 4
store i8* %0, i8** %8, align 4
%9 = load i8*, i8** %5, align 4
%10 = load i8*, i8** %6, align 4
%11 = load i32, i32* %7, align 4
%12 = load i8*, i8** %8, align 4
%13 = call i32 @_vsnprintf_l(i8* %12, i32 %11, i8* %10, %struct.__crt_locale_pointers* null, i8* %9)
ret i32 %13
}
; Function Attrs: noinline nounwind optnone
define dso_local i32 @main() #1 {
%1 = call i32 (i8*, ...) @printf_s(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @"??_C@_0N@MEFMBHFK@hello?0worldd?$AA@", i32 0, i32 0))
ret i32 0
}
; Function Attrs: noinline nounwind optnone
define linkonce_odr dso_local i32 @printf_s(i8* %0, ...) #1 comdat {
%2 = alloca i8*, align 4
%3 = alloca i32, align 4
%4 = alloca i8*, align 4
store i8* %0, i8** %2, align 4
%5 = bitcast i8** %4 to i8*
call void @llvm.va_start(i8* %5)
%6 = load i8*, i8** %4, align 4
%7 = load i8*, i8** %2, align 4
%8 = call %struct._iobuf* @__acrt_iob_func(i32 1)
%9 = call i32 @_vfprintf_s_l(%struct._iobuf* %8, i8* %7, %struct.__crt_locale_pointers* null, i8* %6)
store i32 %9, i32* %3, align 4
%10 = bitcast i8** %4 to i8*
call void @llvm.va_end(i8* %10)
%11 = load i32, i32* %3, align 4
ret i32 %11
}
; Function Attrs: nounwind
declare void @llvm.va_start(i8*) #2
; Function Attrs: noinline nounwind optnone
define linkonce_odr dso_local i32 @_vsprintf_l(i8* %0, i8* %1, %struct.__crt_locale_pointers* %2, i8* %3) #1 comdat {
%5 = alloca i8*, align 4
%6 = alloca %struct.__crt_locale_pointers*, align 4
%7 = alloca i8*, align 4
%8 = alloca i8*, align 4
store i8* %3, i8** %5, align 4
store %struct.__crt_locale_pointers* %2, %struct.__crt_locale_pointers** %6, align 4
store i8* %1, i8** %7, align 4
store i8* %0, i8** %8, align 4
%9 = load i8*, i8** %5, align 4
%10 = load %struct.__crt_locale_pointers*, %struct.__crt_locale_pointers** %6, align 4
%11 = load i8*, i8** %7, align 4
%12 = load i8*, i8** %8, align 4
%13 = call i32 @_vsnprintf_l(i8* %12, i32 -1, i8* %11, %struct.__crt_locale_pointers* %10, i8* %9)
ret i32 %13
}
; Function Attrs: nounwind
declare void @llvm.va_end(i8*) #2
; Function Attrs: noinline nounwind optnone
define linkonce_odr dso_local i32 @_vsnprintf_l(i8* %0, i32 %1, i8* %2, %struct.__crt_locale_pointers* %3, i8* %4) #1 comdat {
%6 = alloca i8*, align 4
%7 = alloca %struct.__crt_locale_pointers*, align 4
%8 = alloca i8*, align 4
%9 = alloca i32, align 4
%10 = alloca i8*, align 4
%11 = alloca i32, align 4
store i8* %4, i8** %6, align 4
store %struct.__crt_locale_pointers* %3, %struct.__crt_locale_pointers** %7, align 4
store i8* %2, i8** %8, align 4
store i32 %1, i32* %9, align 4
store i8* %0, i8** %10, align 4
%12 = load i8*, i8** %6, align 4
%13 = load %struct.__crt_locale_pointers*, %struct.__crt_locale_pointers** %7, align 4
%14 = load i8*, i8** %8, align 4
%15 = load i32, i32* %9, align 4
%16 = load i8*, i8** %10, align 4
%17 = call i64* @__local_stdio_printf_options()
%18 = load i64, i64* %17, align 8
%19 = or i64 %18, 1
%20 = call i32 @__stdio_common_vsprintf(i64 %19, i8* %16, i32 %15, i8* %14, %struct.__crt_locale_pointers* %13, i8* %12)
store i32 %20, i32* %11, align 4
%21 = load i32, i32* %11, align 4
%22 = icmp slt i32 %21, 0
br i1 %22, label %23, label %24
23: ; preds = %5
br label %26
24: ; preds = %5
%25 = load i32, i32* %11, align 4
br label %26
26: ; preds = %24, %23
%27 = phi i32 [ -1, %23 ], [ %25, %24 ]
ret i32 %27
}
declare dso_local i32 @__stdio_common_vsprintf(i64, i8*, i32, i8*, %struct.__crt_locale_pointers*, i8*) #3
; Function Attrs: noinline nounwind optnone
define linkonce_odr dso_local i64* @__local_stdio_printf_options() #1 comdat {
ret i64* @__local_stdio_printf_options._OptionsStorage
}
; Function Attrs: noinline nounwind optnone
define linkonce_odr dso_local i32 @_vfprintf_s_l(%struct._iobuf* %0, i8* %1, %struct.__crt_locale_pointers* %2, i8* %3) #1 comdat {
%5 = alloca i8*, align 4
%6 = alloca %struct.__crt_locale_pointers*, align 4
%7 = alloca i8*, align 4
%8 = alloca %struct._iobuf*, align 4
store i8* %3, i8** %5, align 4
store %struct.__crt_locale_pointers* %2, %struct.__crt_locale_pointers** %6, align 4
store i8* %1, i8** %7, align 4
store %struct._iobuf* %0, %struct._iobuf** %8, align 4
%9 = load i8*, i8** %5, align 4
%10 = load %struct.__crt_locale_pointers*, %struct.__crt_locale_pointers** %6, align 4
%11 = load i8*, i8** %7, align 4
%12 = load %struct._iobuf*, %struct._iobuf** %8, align 4
%13 = call i64* @__local_stdio_printf_options()
%14 = load i64, i64* %13, align 8
%15 = call i32 @__stdio_common_vfprintf_s(i64 %14, %struct._iobuf* %12, i8* %11, %struct.__crt_locale_pointers* %10, i8* %9)
ret i32 %15
}
declare dso_local %struct._iobuf* @__acrt_iob_func(i32) #3
declare dso_local i32 @__stdio_common_vfprintf_s(i64, %struct._iobuf*, i8*, %struct.__crt_locale_pointers*, i8*) #3
attributes #0 = { nobuiltin noinline nounwind optnone "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "min-legal-vector-width"="0" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="pentium4" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
attributes #1 = { noinline nounwind optnone "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "min-legal-vector-width"="0" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="pentium4" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
attributes #2 = { nounwind }
attributes #3 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="pentium4" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
!llvm.module.flags = !{!0, !1}
!llvm.ident = !{!2}
!0 = !{i32 1, !"NumRegisterParameters", i32 0}
!1 = !{i32 1, !"wchar_size", i32 2}
!2 = !{!"clang version 10.0.0 "}