-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathout.ll
239 lines (206 loc) · 8.59 KB
/
out.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
; ModuleID = 'test.c'
source_filename = "test.c"
target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-windows-msvc19.36.32532"
$sprintf = comdat any
$vsprintf = comdat any
$_snprintf = comdat any
$_vsnprintf = comdat any
$printf = comdat any
$_vsprintf_l = comdat any
$_vsnprintf_l = comdat any
$__local_stdio_printf_options = comdat any
$_vfprintf_l = comdat any
$"??_C@_05COLMCDPH@Hello?$AA@" = comdat any
$"??_C@_05EHKCKGF@?$CF?4?$CKs?6?$AA@" = comdat any
@"??_C@_05COLMCDPH@Hello?$AA@" = linkonce_odr dso_local unnamed_addr constant [6 x i8] c"Hello\00", comdat, align 1
@"??_C@_05EHKCKGF@?$CF?4?$CKs?6?$AA@" = linkonce_odr dso_local unnamed_addr constant [6 x i8] c"%.*s\0A\00", comdat, align 1
@__local_stdio_printf_options._OptionsStorage = internal global i64 0, align 8
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local i32 @sprintf(ptr noundef %0, ptr noundef %1, ...) #0 comdat {
%3 = alloca ptr, align 8
%4 = alloca ptr, align 8
%5 = alloca i32, align 4
%6 = alloca ptr, align 8
store ptr %1, ptr %3, align 8
store ptr %0, ptr %4, align 8
call void @llvm.va_start(ptr %6)
%7 = load ptr, ptr %6, align 8
%8 = load ptr, ptr %3, align 8
%9 = load ptr, ptr %4, align 8
%10 = call i32 @_vsprintf_l(ptr noundef %9, ptr noundef %8, ptr noundef null, ptr noundef %7)
store i32 %10, ptr %5, align 4
call void @llvm.va_end(ptr %6)
%11 = load i32, ptr %5, align 4
ret i32 %11
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local i32 @vsprintf(ptr noundef %0, ptr noundef %1, ptr noundef %2) #0 comdat {
%4 = alloca ptr, align 8
%5 = alloca ptr, align 8
%6 = alloca ptr, align 8
store ptr %2, ptr %4, align 8
store ptr %1, ptr %5, align 8
store ptr %0, ptr %6, align 8
%7 = load ptr, ptr %4, align 8
%8 = load ptr, ptr %5, align 8
%9 = load ptr, ptr %6, align 8
%10 = call i32 @_vsnprintf_l(ptr noundef %9, i64 noundef -1, ptr noundef %8, ptr noundef null, ptr noundef %7)
ret i32 %10
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local i32 @_snprintf(ptr noundef %0, i64 noundef %1, ptr noundef %2, ...) #0 comdat {
%4 = alloca ptr, align 8
%5 = alloca i64, align 8
%6 = alloca ptr, align 8
%7 = alloca i32, align 4
%8 = alloca ptr, align 8
store ptr %2, ptr %4, align 8
store i64 %1, ptr %5, align 8
store ptr %0, ptr %6, align 8
call void @llvm.va_start(ptr %8)
%9 = load ptr, ptr %8, align 8
%10 = load ptr, ptr %4, align 8
%11 = load i64, ptr %5, align 8
%12 = load ptr, ptr %6, align 8
%13 = call i32 @_vsnprintf(ptr noundef %12, i64 noundef %11, ptr noundef %10, ptr noundef %9)
store i32 %13, ptr %7, align 4
call void @llvm.va_end(ptr %8)
%14 = load i32, ptr %7, align 4
ret i32 %14
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local i32 @_vsnprintf(ptr noundef %0, i64 noundef %1, ptr noundef %2, ptr noundef %3) #0 comdat {
%5 = alloca ptr, align 8
%6 = alloca ptr, align 8
%7 = alloca i64, align 8
%8 = alloca ptr, align 8
store ptr %3, ptr %5, align 8
store ptr %2, ptr %6, align 8
store i64 %1, ptr %7, align 8
store ptr %0, ptr %8, align 8
%9 = load ptr, ptr %5, align 8
%10 = load ptr, ptr %6, align 8
%11 = load i64, ptr %7, align 8
%12 = load ptr, ptr %8, align 8
%13 = call i32 @_vsnprintf_l(ptr noundef %12, i64 noundef %11, ptr noundef %10, ptr noundef null, ptr noundef %9)
ret i32 %13
}
; Function Attrs: noinline nounwind optnone uwtable
define dso_local i32 @main() #0 {
%1 = alloca i32, align 4
%2 = alloca i8, align 1
store i32 0, ptr %1, align 4
store i8 3, ptr %2, align 1
%3 = load i8, ptr %2, align 1
%4 = sext i8 %3 to i32
%5 = call i32 (ptr, ...) @printf(ptr noundef @"??_C@_05EHKCKGF@?$CF?4?$CKs?6?$AA@", i32 noundef %4, ptr noundef @"??_C@_05COLMCDPH@Hello?$AA@")
ret i32 0
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local i32 @printf(ptr noundef %0, ...) #0 comdat {
%2 = alloca ptr, align 8
%3 = alloca i32, align 4
%4 = alloca ptr, align 8
store ptr %0, ptr %2, align 8
call void @llvm.va_start(ptr %4)
%5 = load ptr, ptr %4, align 8
%6 = load ptr, ptr %2, align 8
%7 = call ptr @__acrt_iob_func(i32 noundef 1)
%8 = call i32 @_vfprintf_l(ptr noundef %7, ptr noundef %6, ptr noundef null, ptr noundef %5)
store i32 %8, ptr %3, align 4
call void @llvm.va_end(ptr %4)
%9 = load i32, ptr %3, align 4
ret i32 %9
}
; Function Attrs: nocallback nofree nosync nounwind willreturn
declare void @llvm.va_start(ptr) #1
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local i32 @_vsprintf_l(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) #0 comdat {
%5 = alloca ptr, align 8
%6 = alloca ptr, align 8
%7 = alloca ptr, align 8
%8 = alloca ptr, align 8
store ptr %3, ptr %5, align 8
store ptr %2, ptr %6, align 8
store ptr %1, ptr %7, align 8
store ptr %0, ptr %8, align 8
%9 = load ptr, ptr %5, align 8
%10 = load ptr, ptr %6, align 8
%11 = load ptr, ptr %7, align 8
%12 = load ptr, ptr %8, align 8
%13 = call i32 @_vsnprintf_l(ptr noundef %12, i64 noundef -1, ptr noundef %11, ptr noundef %10, ptr noundef %9)
ret i32 %13
}
; Function Attrs: nocallback nofree nosync nounwind willreturn
declare void @llvm.va_end(ptr) #1
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local i32 @_vsnprintf_l(ptr noundef %0, i64 noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4) #0 comdat {
%6 = alloca ptr, align 8
%7 = alloca ptr, align 8
%8 = alloca ptr, align 8
%9 = alloca i64, align 8
%10 = alloca ptr, align 8
%11 = alloca i32, align 4
store ptr %4, ptr %6, align 8
store ptr %3, ptr %7, align 8
store ptr %2, ptr %8, align 8
store i64 %1, ptr %9, align 8
store ptr %0, ptr %10, align 8
%12 = load ptr, ptr %6, align 8
%13 = load ptr, ptr %7, align 8
%14 = load ptr, ptr %8, align 8
%15 = load i64, ptr %9, align 8
%16 = load ptr, ptr %10, align 8
%17 = call ptr @__local_stdio_printf_options()
%18 = load i64, ptr %17, align 8
%19 = or i64 %18, 1
%20 = call i32 @__stdio_common_vsprintf(i64 noundef %19, ptr noundef %16, i64 noundef %15, ptr noundef %14, ptr noundef %13, ptr noundef %12)
store i32 %20, ptr %11, align 4
%21 = load i32, ptr %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, ptr %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 noundef, ptr noundef, i64 noundef, ptr noundef, ptr noundef, ptr noundef) #2
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local ptr @__local_stdio_printf_options() #0 comdat {
ret ptr @__local_stdio_printf_options._OptionsStorage
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local i32 @_vfprintf_l(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) #0 comdat {
%5 = alloca ptr, align 8
%6 = alloca ptr, align 8
%7 = alloca ptr, align 8
%8 = alloca ptr, align 8
store ptr %3, ptr %5, align 8
store ptr %2, ptr %6, align 8
store ptr %1, ptr %7, align 8
store ptr %0, ptr %8, align 8
%9 = load ptr, ptr %5, align 8
%10 = load ptr, ptr %6, align 8
%11 = load ptr, ptr %7, align 8
%12 = load ptr, ptr %8, align 8
%13 = call ptr @__local_stdio_printf_options()
%14 = load i64, ptr %13, align 8
%15 = call i32 @__stdio_common_vfprintf(i64 noundef %14, ptr noundef %12, ptr noundef %11, ptr noundef %10, ptr noundef %9)
ret i32 %15
}
declare dso_local ptr @__acrt_iob_func(i32 noundef) #2
declare dso_local i32 @__stdio_common_vfprintf(i64 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2
attributes #0 = { noinline nounwind optnone uwtable "frame-pointer"="none" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn }
attributes #2 = { "frame-pointer"="none" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
!llvm.module.flags = !{!0, !1, !2}
!llvm.ident = !{!3}
!0 = !{i32 1, !"wchar_size", i32 2}
!1 = !{i32 7, !"PIC Level", i32 2}
!2 = !{i32 7, !"uwtable", i32 2}
!3 = !{!"clang version 15.0.7"}