-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtest_dict_loop.ll
More file actions
594 lines (565 loc) · 20.5 KB
/
test_dict_loop.ll
File metadata and controls
594 lines (565 loc) · 20.5 KB
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
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
; Roast LLVM IR - Generated by roastc
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str.6 = private unnamed_addr constant [17 x i8] c" Checking item \00"
@.str.10 = private unnamed_addr constant [15 x i8] c" Owner is 1\00"
@.str.4 = private unnamed_addr constant [27 x i8] c"2. Iterating with range...\00"
@.str.11 = private unnamed_addr constant [19 x i8] c" Owner is not 1\00"
@.str.5 = private unnamed_addr constant [9 x i8] c"3. Done!\00"
@.str.0 = private unnamed_addr constant [23 x i8] c"1. Setting up dicts...\00"
@.str.9 = private unnamed_addr constant [13 x i8] c" Owner = \00"
@.str.1 = private unnamed_addr constant [7 x i8] c"Task 1\00"
@.str.7 = private unnamed_addr constant [10 x i8] c" Item \00"
@.str.2 = private unnamed_addr constant [7 x i8] c"Task 2\00"
@.str.3 = private unnamed_addr constant [7 x i8] c"Task 3\00"
@.str.8 = private unnamed_addr constant [16 x i8] c" in items_owner\00"
; Module-level global variables
@roast_global_87 = global i64 0
@roast_global_88 = global i64 0
; C standard library
declare i32 @printf(i8*, ...) nounwind
declare i32 @puts(i8*) nounwind
declare i8* @malloc(i64) nounwind
declare i8* @realloc(i8*, i64) nounwind
declare void @free(i8*) nounwind
declare i8* @memcpy(i8*, i8*, i64) nounwind
declare i32 @memcmp(i8*, i8*, i64) nounwind
declare i64 @strlen(i8*) nounwind
declare double @pow(double, double) nounwind
declare double @sqrt(double) nounwind
declare double @floor(double) nounwind
declare double @ceil(double) nounwind
declare double @sin(double) nounwind
declare double @cos(double) nounwind
; Roast runtime library
declare void @roast_print_int(i64) nounwind
declare void @roast_print_float(double) nounwind
declare void @roast_print_str(i8*) nounwind
declare void @roast_print_roast_str(i8*) nounwind
declare void @roast_print_bool(i1) nounwind
declare void @roast_print_newline() nounwind
declare void @roast_print_space() nounwind
; Memory management
declare i8* @roast_alloc(i64) nounwind
declare void @roast_free(i8*) nounwind
declare void @roast_incref(i8*) nounwind
declare void @roast_decref(i8*) nounwind
; String operations
declare i8* @roast_str_new(i8*, i64) nounwind
declare i8* @roast_str_concat(i8*, i8*) nounwind
declare i64 @roast_str_len(i8*) nounwind
declare i1 @roast_str_eq(i8*, i8*) nounwind
declare i8* @roast_int_to_str(i64) nounwind
declare i8* @roast_float_to_str(double) nounwind
declare i64 @roast_str_to_int(i8*) nounwind
declare double @roast_str_to_float(i8*) nounwind
declare i8* @roast_str_slice(i8*, i64, i64) nounwind
declare i8* @roast_str_upper(i8*) nounwind
declare i8* @roast_str_lower(i8*) nounwind
declare i8* @roast_str_strip(i8*) nounwind
declare i8* @roast_str_lstrip(i8*) nounwind
declare i8* @roast_str_rstrip(i8*) nounwind
declare i8* @roast_str_split(i8*, i8*) nounwind
declare i8* @roast_str_join(i8*, i8*) nounwind
declare i64 @roast_str_find(i8*, i8*) nounwind
declare i64 @roast_str_rfind(i8*, i8*) nounwind
declare i8* @roast_str_replace(i8*, i8*, i8*) nounwind
declare i1 @roast_str_startswith(i8*, i8*) nounwind
declare i1 @roast_str_endswith(i8*, i8*) nounwind
declare i1 @roast_str_contains(i8*, i8*) nounwind
declare i8* @roast_str_index(i8*, i64) nounwind
declare i64 @roast_str_count(i8*, i8*) nounwind
declare i8* @roast_str_repeat(i8*, i64) nounwind
declare i8* @roast_str_format(i8*, i8*) nounwind
; List operations
declare i8* @roast_list_new(i64) nounwind
declare void @roast_list_append(i8*, i64) nounwind
declare i64 @roast_list_get(i8*, i64) nounwind
declare void @roast_list_set(i8*, i64, i64) nounwind
declare i64 @roast_list_len(i8*) nounwind
declare i64 @roast_list_pop(i8*) nounwind
declare i1 @roast_list_contains(i8*, i64) nounwind
declare i64 @roast_subscript_get(i64, i64) nounwind
declare void @roast_subscript_set(i64, i64, i64) nounwind
declare i64 @roast_list_count(i8*, i64) nounwind
declare void @roast_list_sort(i8*) nounwind
declare i64 @roast_list_pop_at(i8*, i64) nounwind
declare void @roast_list_insert(i8*, i64, i64) nounwind
declare void @roast_list_remove(i8*, i64) nounwind
declare void @roast_list_clear(i8*) nounwind
declare void @roast_list_reverse(i8*) nounwind
declare i64 @roast_list_index(i8*, i64) nounwind
declare i8* @roast_list_copy(i8*) nounwind
declare void @roast_list_extend(i8*, i8*) nounwind
declare i8* @roast_list_slice(i8*, i64, i64, i64) nounwind
declare i1 @roast_list_eq(i8*, i8*) nounwind
; Dict operations
declare i8* @roast_dict_new() nounwind
declare void @roast_dict_set(i8*, i64, i64) nounwind
declare i64 @roast_dict_get(i8*, i64) nounwind
declare i1 @roast_dict_contains(i8*, i64) nounwind
declare i64 @roast_dict_len(i8*) nounwind
declare void @roast_dict_delete(i8*, i64) nounwind
declare i8* @roast_dict_keys(i8*) nounwind
declare i8* @roast_dict_values(i8*) nounwind
declare i8* @roast_dict_items(i8*) nounwind
declare void @roast_dict_clear(i8*) nounwind
declare i64 @roast_dict_get_default(i8*, i64, i64) nounwind
declare i64 @roast_dict_pop(i8*, i64, i64) nounwind
declare void @roast_dict_update(i8*, i8*) nounwind
declare i8* @roast_dict_copy(i8*) nounwind
declare i64 @roast_dict_setdefault(i8*, i64, i64) nounwind
declare i1 @roast_dict_eq(i8*, i8*) nounwind
; Set operations
declare i8* @roast_set_new() nounwind
declare void @roast_set_add(i8*, i64) nounwind
declare void @roast_set_remove(i8*, i64) nounwind
declare i1 @roast_set_contains(i8*, i64) nounwind
declare i64 @roast_set_len(i8*) nounwind
; Tuple operations
declare i8* @roast_tuple_new(i64) nounwind
declare void @roast_tuple_set(i8*, i64, i64) nounwind
declare i64 @roast_tuple_get(i8*, i64) nounwind
declare i64 @roast_tuple_len(i8*) nounwind
; BigInt operations
declare i8* @roast_bigint_from_i64(i64) nounwind
declare i8* @roast_bigint_add(i8*, i8*) nounwind
declare i8* @roast_bigint_sub(i8*, i8*) nounwind
declare i8* @roast_bigint_mul(i8*, i8*) nounwind
declare i8* @roast_bigint_to_str(i8*) nounwind
declare void @roast_bigint_print(i8*) nounwind
; Iterator operations
declare i8* @roast_iter_new(i8*) nounwind
declare i64 @roast_iter_next(i8*, i1*) nounwind
declare i8* @roast_range_new(i64, i64, i64) nounwind
; Object operations
declare i8* @roast_object_new(i8*) nounwind
declare i8* @roast_class_new(i8*, i8*) nounwind
declare void @roast_class_add_method(i8*, i8*, i64) nounwind
declare i64 @roast_object_getattr(i8*, i8*) nounwind
declare i64 @roast_object_getattr_auto(i8*, i8*, i64) nounwind
declare void @roast_object_setattr(i8*, i8*, i64) nounwind
declare i1 @roast_object_hasattr(i8*, i8*) nounwind
declare i64 @roast_object_call_method0(i64, i8*) nounwind
declare i64 @roast_object_call_method1(i64, i8*, i64) nounwind
declare i64 @roast_object_call_method2(i64, i8*, i64, i64) nounwind
; Dunder method operations
declare i8* @roast_object_str(i64) nounwind
declare i8* @roast_object_repr(i64) nounwind
declare i64 @roast_object_eq(i64, i64) nounwind
declare i64 @roast_object_hash(i64) nounwind
declare i64 @roast_object_add(i64, i64) nounwind
declare i64 @roast_object_sub(i64, i64) nounwind
declare i64 @roast_object_mul(i64, i64) nounwind
declare i64 @roast_object_lt(i64, i64) nounwind
declare i64 @roast_object_le(i64, i64) nounwind
declare i64 @roast_object_gt(i64, i64) nounwind
declare i64 @roast_object_ge(i64, i64) nounwind
declare i64 @roast_object_bool(i64) nounwind
declare i64 @roast_object_len(i64) nounwind
declare i64 @roast_object_getitem(i64, i64) nounwind
declare void @roast_object_setitem(i64, i64, i64) nounwind
declare i64 @roast_object_contains(i64, i64) nounwind
declare i8* @roast_object_iter(i64) nounwind
; Closure operations
declare i8* @roast_closure_new(i8*, i64, i8*) nounwind
declare i64 @roast_closure_call(i8*, i64*, i64) nounwind
; Math operations
declare i64 @roast_pow_int(i64, i64) nounwind
declare double @roast_pow_float(double, double) nounwind
declare i64 @roast_abs_int(i64) nounwind
declare double @roast_abs_float(double) nounwind
declare i64 @roast_floordiv(i64, i64) nounwind
declare i64 @roast_mod(i64, i64) nounwind
; Async operations
declare i64 @roast_await(i8*) nounwind
declare i64 @roast_asyncio_run(i64) nounwind
declare i64 @roast_asyncio_sleep(double) nounwind
; Reference counting
declare i64 @roast_rc_create(i64) nounwind
declare i64 @roast_rc_get(i64) nounwind
; Error handling
declare i32 @setjmp(i8*) nounwind returns_twice
declare void @longjmp(i8*, i32) noreturn nounwind
declare i8* @roast_exception_push_frame() nounwind
declare void @roast_exception_pop_frame() nounwind
declare void @roast_assert(i1, i8*) nounwind
declare void @roast_raise(i64)
declare void @roast_raise_with_message(i64, i64)
declare void @roast_reraise()
declare i64 @roast_try_begin() nounwind
declare void @roast_try_end() nounwind
declare i64 @roast_get_exception() nounwind
declare i64 @roast_get_exception_type() nounwind
declare i64 @roast_exception_matches(i64, i8*) nounwind
declare i64 @roast_exception_new(i64, i64) nounwind
declare i64 @roast_exception_get_type(i64) nounwind
declare i8* @roast_exception_create(i64, i64) nounwind
; super() and varargs
declare i8* @roast_super_new(i8*, i8*) nounwind
declare i64 @roast_super_getattr(i8*, i8*) nounwind
declare i8* @roast_pack_varargs(i64*, i64, i64) nounwind
declare i64 @roast_pack_kwargs(i8**, i64*, i64) nounwind
declare i64 @roast_args_len(i8*) nounwind
; Property support
declare i8* @roast_property_new(i64, i64) nounwind
declare i64 @roast_property_get(i8*, i64) nounwind
declare void @roast_property_set(i8*, i64, i64) nounwind
declare i64 @roast_is_property(i64) nounwind
; Type constants
@roast_type_int = external global i64
@roast_type_float = external global i64
@roast_type_str = external global i64
@roast_type_bool = external global i64
@roast_type_list = external global i64
@roast_type_dict = external global i64
@roast_type_none = external global i64
; Builtin functions
declare i64 @roast_print(i64) nounwind
declare i64 @roast_print_value(i64) nounwind
declare i64 @roast_len(i64) nounwind
declare i64 @roast_type(i64) nounwind
declare i64 @roast_int(i64) nounwind
declare i64 @roast_float(i64) nounwind
declare i64 @roast_str(i64) nounwind
declare i64 @roast_bool(i64) nounwind
declare i64 @roast_list(i64) nounwind
declare i64 @roast_dict(i64) nounwind
declare i64 @roast_set(i64) nounwind
declare i64 @roast_tuple(i64) nounwind
declare i64 @roast_range(i64, i64, i64) nounwind
declare i64 @roast_enumerate(i64, i64) nounwind
declare i64 @roast_zip(i64, i64) nounwind
declare i64 @roast_abs(i64) nounwind
declare i64 @roast_min(i64, i64) nounwind
declare i64 @roast_max(i64, i64) nounwind
declare i64 @roast_min_list(i64) nounwind
declare i64 @roast_max_list(i64) nounwind
declare i64 @roast_sum(i64) nounwind
declare i64 @roast_sorted(i64) nounwind
declare i64 @roast_reversed(i64) nounwind
declare i64 @roast_map(i64, i64) nounwind
declare i64 @roast_filter(i64, i64) nounwind
declare i64 @roast_input(i64) nounwind
declare i64 @roast_ord(i64) nounwind
declare i64 @roast_chr(i64) nounwind
declare void @roast_class_set_mro(i8*, i8*) nounwind
declare i64 @roast_repr(i64) nounwind
declare i64 @roast_hash(i64) nounwind
declare i64 @roast_id(i64) nounwind
declare i64 @roast_isinstance(i64, i64) nounwind
declare i64 @roast_isinstance_by_name(i64, i8*) nounwind
declare i64 @roast_issubclass(i64, i64) nounwind
declare i64 @roast_hasattr(i64, i64) nounwind
declare i64 @roast_getattr(i64, i64) nounwind
declare i64 @roast_setattr(i64, i64, i64) nounwind
declare i64 @roast_all(i64) nounwind
declare i64 @roast_any(i64) nounwind
declare i64 @roast_pow(i64, i64) nounwind
declare i64 @roast_open(i64, i64) nounwind
declare i64 @roast_file_read(i64) nounwind
declare i64 @roast_file_write(i64, i64) nounwind
declare void @roast_file_close(i64) nounwind
declare i64 @roast_file_readline(i64) nounwind
; TCP Server
declare i64 @roast_tcp_server_create(i8*, i64) nounwind
declare i64 @roast_tcp_server_accept(i64) nounwind
declare void @roast_tcp_server_close(i64) nounwind
declare i8* @roast_tcp_client_read(i64, i64) nounwind
declare i64 @roast_tcp_client_write(i64, i8*) nounwind
declare void @roast_tcp_client_close(i64) nounwind
; Python FFI
declare i64 @roast_py_import(i8*) nounwind
declare i64 @roast_py_getattr(i64, i8*) nounwind
declare i64 @roast_py_call(i64, i8*) nounwind
declare i8* @roast_py_to_str(i64) nounwind
declare i64 @roast_py_to_int(i64) nounwind
define i32 @main(i32 %argc, i8** %argv) {
entry:
call void @roast_fn_156()
ret i32 0
}
define i64 @roast_fn_89() {
entry:
%v0 = alloca i64
%v1 = alloca i64
%v2 = alloca i64
%v3 = alloca i64
%v4 = alloca i64
%v5 = alloca i64
%v6 = alloca i64
%v7 = alloca i64
%v8 = alloca i64
%v9 = alloca i64
%v10 = alloca i64
%v11 = alloca i64
%v12 = alloca i64
%v13 = alloca i64
%v14 = alloca i64
%v15 = alloca i64
%v16 = alloca i64
%v17 = alloca i64
%v18 = alloca i64
%v19 = alloca i64
%v20 = alloca i64
%v21 = alloca i64
%v22 = alloca i64
%v23 = alloca i64
%v24 = alloca i64
%v25 = alloca i64
%v26 = alloca i64
%v27 = alloca i64
%v28 = alloca i64
%v29 = alloca i64
%v30 = alloca i64
%v31 = alloca i64
%v32 = alloca i64
%v33 = alloca i64
br label %bb0
bb0:
%v34 = getelementptr [23 x i8], [23 x i8]* @.str.0, i64 0, i64 0
%v35 = call i8* @roast_str_new(i8* %v34, i64 22)
%v36 = ptrtoint i8* %v35 to i64
%v37 = call i64 @roast_print(i64 %v36)
store i64 %v37, i64* %v0
br label %bb1
bb1:
%v38 = load i64, i64* @roast_global_87
store i64 %v38, i64* %v1
store i64 %v38, i64* @roast_global_87
store i64 1, i64* %v2
%v39 = getelementptr [7 x i8], [7 x i8]* @.str.1, i64 0, i64 0
%v40 = call i8* @roast_str_new(i8* %v39, i64 6)
%v41 = ptrtoint i8* %v40 to i64
%v42 = load i64, i64* %v1
%v43 = load i64, i64* %v2
%v44 = inttoptr i64 %v42 to i8*
call void @roast_dict_set(i8* %v44, i64 %v43, i64 %v41)
store i64 2, i64* %v3
%v45 = getelementptr [7 x i8], [7 x i8]* @.str.2, i64 0, i64 0
%v46 = call i8* @roast_str_new(i8* %v45, i64 6)
%v47 = ptrtoint i8* %v46 to i64
%v48 = load i64, i64* %v1
%v49 = load i64, i64* %v3
%v50 = inttoptr i64 %v48 to i8*
call void @roast_dict_set(i8* %v50, i64 %v49, i64 %v47)
store i64 3, i64* %v4
%v51 = getelementptr [7 x i8], [7 x i8]* @.str.3, i64 0, i64 0
%v52 = call i8* @roast_str_new(i8* %v51, i64 6)
%v53 = ptrtoint i8* %v52 to i64
%v54 = load i64, i64* %v1
%v55 = load i64, i64* %v4
%v56 = inttoptr i64 %v54 to i8*
call void @roast_dict_set(i8* %v56, i64 %v55, i64 %v53)
%v57 = load i64, i64* @roast_global_88
store i64 %v57, i64* %v5
store i64 %v57, i64* @roast_global_88
%v58 = load i64, i64* %v2
store i64 %v58, i64* %v6
%v59 = load i64, i64* %v5
%v60 = load i64, i64* %v6
%v61 = inttoptr i64 %v59 to i8*
call void @roast_dict_set(i8* %v61, i64 %v60, i64 1)
%v62 = load i64, i64* %v3
store i64 %v62, i64* %v7
%v63 = load i64, i64* %v5
%v64 = load i64, i64* %v7
%v65 = inttoptr i64 %v63 to i8*
call void @roast_dict_set(i8* %v65, i64 %v64, i64 1)
%v66 = load i64, i64* %v4
store i64 %v66, i64* %v8
%v67 = load i64, i64* %v5
%v68 = load i64, i64* %v8
%v69 = inttoptr i64 %v67 to i8*
call void @roast_dict_set(i8* %v69, i64 %v68, i64 2)
%v70 = getelementptr [27 x i8], [27 x i8]* @.str.4, i64 0, i64 0
%v71 = call i8* @roast_str_new(i8* %v70, i64 26)
%v72 = ptrtoint i8* %v71 to i64
%v73 = call i64 @roast_print(i64 %v72)
store i64 %v73, i64* %v9
br label %bb2
bb2:
%v74 = call i64 @roast_range(i64 1, i64 4, i64 1)
store i64 %v74, i64* %v10
br label %bb3
bb3:
%v75 = load i64, i64* %v10
store i64 %v75, i64* %v11
br label %bb4
bb4:
%v76 = load i64, i64* %v11
%v77 = inttoptr i64 %v76 to i8*
%v78 = call i8* @roast_iter_new(i8* %v77)
%v79 = ptrtoint i8* %v78 to i64
store i64 %v79, i64* %v12
br label %bb5
bb5:
%v80 = load i64, i64* %v12
%v81 = inttoptr i64 %v80 to i8*
%v82 = alloca i1
%v83 = call i64 @roast_iter_next(i8* %v81, i1* %v82)
%v84 = load i1, i1* %v82
store i64 %v83, i64* %v13
br i1 %v84, label %bb7, label %bb6
bb6:
%v85 = load i64, i64* %v13
%v86 = call i64 @roast_str(i64 %v85)
store i64 %v86, i64* %v15
br label %bb8
bb7:
%v87 = getelementptr [9 x i8], [9 x i8]* @.str.5, i64 0, i64 0
%v88 = call i8* @roast_str_new(i8* %v87, i64 8)
%v89 = ptrtoint i8* %v88 to i64
%v90 = call i64 @roast_print(i64 %v89)
store i64 %v90, i64* %v33
br label %bb21
bb8:
%v91 = getelementptr [17 x i8], [17 x i8]* @.str.6, i64 0, i64 0
%v92 = call i8* @roast_str_new(i8* %v91, i64 16)
%v93 = ptrtoint i8* %v92 to i64
%v94 = load i64, i64* %v15
%v96 = inttoptr i64 %v93 to i8*
%v97 = inttoptr i64 %v94 to i8*
%v98 = call i8* @roast_str_concat(i8* %v96, i8* %v97)
%v95 = ptrtoint i8* %v98 to i64
store i64 %v95, i64* %v16
%v99 = load i64, i64* %v16
%v100 = call i64 @roast_print(i64 %v99)
store i64 %v100, i64* %v14
br label %bb9
bb9:
%v101 = load i64, i64* %v13
%v102 = load i64, i64* %v5
%v104 = inttoptr i64 %v102 to i8*
%v105 = call i1 @roast_dict_contains(i8* %v104, i64 %v101)
%v103 = zext i1 %v105 to i64
store i64 %v103, i64* %v17
%v106 = load i64, i64* %v17
store i64 %v106, i64* %v18
%v107 = load i64, i64* %v18
%v108 = icmp eq i64 %v107, 1
br i1 %v108, label %bb10, label %bb11
bb10:
%v109 = load i64, i64* %v13
%v110 = call i64 @roast_str(i64 %v109)
store i64 %v110, i64* %v20
br label %bb12
bb11:
br label %bb5
bb12:
%v111 = getelementptr [10 x i8], [10 x i8]* @.str.7, i64 0, i64 0
%v112 = call i8* @roast_str_new(i8* %v111, i64 9)
%v113 = ptrtoint i8* %v112 to i64
%v114 = load i64, i64* %v20
%v116 = inttoptr i64 %v113 to i8*
%v117 = inttoptr i64 %v114 to i8*
%v118 = call i8* @roast_str_concat(i8* %v116, i8* %v117)
%v115 = ptrtoint i8* %v118 to i64
store i64 %v115, i64* %v21
%v119 = load i64, i64* %v21
%v120 = getelementptr [16 x i8], [16 x i8]* @.str.8, i64 0, i64 0
%v121 = call i8* @roast_str_new(i8* %v120, i64 15)
%v122 = ptrtoint i8* %v121 to i64
%v124 = inttoptr i64 %v119 to i8*
%v125 = inttoptr i64 %v122 to i8*
%v126 = call i8* @roast_str_concat(i8* %v124, i8* %v125)
%v123 = ptrtoint i8* %v126 to i64
store i64 %v123, i64* %v22
%v127 = load i64, i64* %v22
%v128 = call i64 @roast_print(i64 %v127)
store i64 %v128, i64* %v19
br label %bb13
bb13:
%v129 = load i64, i64* %v5
store i64 %v129, i64* %v24
%v130 = inttoptr i64 %v129 to i8*
call void @roast_incref(i8* %v130)
%v131 = load i64, i64* %v13
store i64 %v131, i64* %v25
%v132 = load i64, i64* %v24
%v133 = load i64, i64* %v25
%v135 = inttoptr i64 %v132 to i8*
%v134 = call i64 @roast_dict_get(i8* %v135, i64 %v133)
store i64 %v134, i64* %v23
%v136 = load i64, i64* %v23
%v137 = call i64 @roast_str(i64 %v136)
store i64 %v137, i64* %v27
br label %bb14
bb14:
%v138 = getelementptr [13 x i8], [13 x i8]* @.str.9, i64 0, i64 0
%v139 = call i8* @roast_str_new(i8* %v138, i64 12)
%v140 = ptrtoint i8* %v139 to i64
%v141 = load i64, i64* %v27
%v143 = inttoptr i64 %v140 to i8*
%v144 = inttoptr i64 %v141 to i8*
%v145 = call i8* @roast_str_concat(i8* %v143, i8* %v144)
%v142 = ptrtoint i8* %v145 to i64
store i64 %v142, i64* %v28
%v146 = load i64, i64* %v28
%v147 = call i64 @roast_print(i64 %v146)
store i64 %v147, i64* %v26
br label %bb15
bb15:
%v148 = load i64, i64* %v23
%v150 = icmp eq i64 %v148, 1
%v149 = zext i1 %v150 to i64
store i64 %v149, i64* %v29
%v151 = load i64, i64* %v29
store i64 %v151, i64* %v30
%v152 = load i64, i64* %v30
%v153 = icmp eq i64 %v152, 1
br i1 %v153, label %bb16, label %bb17
bb16:
%v154 = getelementptr [15 x i8], [15 x i8]* @.str.10, i64 0, i64 0
%v155 = call i8* @roast_str_new(i8* %v154, i64 14)
%v156 = ptrtoint i8* %v155 to i64
%v157 = call i64 @roast_print(i64 %v156)
store i64 %v157, i64* %v31
br label %bb19
bb17:
%v158 = getelementptr [19 x i8], [19 x i8]* @.str.11, i64 0, i64 0
%v159 = call i8* @roast_str_new(i8* %v158, i64 18)
%v160 = ptrtoint i8* %v159 to i64
%v161 = call i64 @roast_print(i64 %v160)
store i64 %v161, i64* %v32
br label %bb20
bb18:
br label %bb11
bb19:
br label %bb18
bb20:
br label %bb18
bb21:
ret i64 0
}
define i64 @roast_fn_156() {
entry:
%v0 = alloca i64
%v1 = alloca i64
%v2 = alloca i64
%v3 = alloca i64
%v4 = alloca i64
br label %bb0
bb0:
%v5 = call i8* @roast_dict_new()
%v6 = ptrtoint i8* %v5 to i64
store i64 %v6, i64* %v1
%v7 = load i64, i64* %v1
store i64 %v7, i64* %v0
store i64 %v7, i64* @roast_global_87
%v8 = inttoptr i64 %v7 to i8*
call void @roast_incref(i8* %v8)
%v9 = call i8* @roast_dict_new()
%v10 = ptrtoint i8* %v9 to i64
store i64 %v10, i64* %v3
%v11 = load i64, i64* %v3
store i64 %v11, i64* %v2
store i64 %v11, i64* @roast_global_88
%v12 = inttoptr i64 %v11 to i8*
call void @roast_incref(i8* %v12)
%v13 = call i64 @roast_fn_89()
store i64 %v13, i64* %v4
br label %bb1
bb1:
ret i64 0
}