File: llvm-class_04-290b898.stdout

package info (click to toggle)
lfortran 0.58.0-4
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 54,512 kB
  • sloc: cpp: 162,179; f90: 68,251; python: 17,476; ansic: 6,278; yacc: 2,334; sh: 1,317; fortran: 892; makefile: 33; javascript: 15
file content (570 lines) | stat: -rw-r--r-- 28,741 bytes parent folder | download
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
; ModuleID = 'LFortran'
source_filename = "LFortran"

%foo_c = type { %foo_b, %bar_c }
%foo_b = type { %foo_a, %bar_b }
%foo_a = type { i32 (...)**, %bar_a }
%bar_a = type { i32 (...)**, i32 }
%bar_b = type { %bar_a, i32 }
%bar_c = type { %bar_b, i32 }
%string_descriptor = type <{ i8*, i64 }>

@_Name_foo_a = private unnamed_addr constant [6 x i8] c"foo_a\00", align 1
@_Type_Info_foo_a = linkonce_odr unnamed_addr constant { i8* } { i8* getelementptr inbounds ([6 x i8], [6 x i8]* @_Name_foo_a, i32 0, i32 0) }, align 8
@_Name_bar_a = private unnamed_addr constant [6 x i8] c"bar_a\00", align 1
@_Type_Info_bar_a = linkonce_odr unnamed_addr constant { i8* } { i8* getelementptr inbounds ([6 x i8], [6 x i8]* @_Name_bar_a, i32 0, i32 0) }, align 8
@_VTable_bar_a = linkonce_odr unnamed_addr constant { [4 x i8*] } { [4 x i8*] [i8* null, i8* bitcast ({ i8* }* @_Type_Info_bar_a to i8*), i8* bitcast (void (i8*, i8*)* @_copy_main_bar_a to i8*), i8* bitcast (void (i8**)* @_allocate_struct_main_bar_a to i8*)] }, align 8
@_VTable_foo_a = linkonce_odr unnamed_addr constant { [4 x i8*] } { [4 x i8*] [i8* null, i8* bitcast ({ i8* }* @_Type_Info_foo_a to i8*), i8* bitcast (void (i8*, i8*)* @_copy_main_foo_a to i8*), i8* bitcast (void (i8**)* @_allocate_struct_main_foo_a to i8*)] }, align 8
@_Name_foo_b = private unnamed_addr constant [6 x i8] c"foo_b\00", align 1
@_Type_Info_foo_b = linkonce_odr unnamed_addr constant { i8*, i8* } { i8* getelementptr inbounds ([6 x i8], [6 x i8]* @_Name_foo_b, i32 0, i32 0), i8* bitcast ({ i8* }* @_Type_Info_foo_a to i8*) }, align 8
@_Name_bar_b = private unnamed_addr constant [6 x i8] c"bar_b\00", align 1
@_Type_Info_bar_b = linkonce_odr unnamed_addr constant { i8*, i8* } { i8* getelementptr inbounds ([6 x i8], [6 x i8]* @_Name_bar_b, i32 0, i32 0), i8* bitcast ({ i8* }* @_Type_Info_bar_a to i8*) }, align 8
@_VTable_bar_b = linkonce_odr unnamed_addr constant { [4 x i8*] } { [4 x i8*] [i8* null, i8* bitcast ({ i8*, i8* }* @_Type_Info_bar_b to i8*), i8* bitcast (void (i8*, i8*)* @_copy_main_bar_b to i8*), i8* bitcast (void (i8**)* @_allocate_struct_main_bar_b to i8*)] }, align 8
@_VTable_foo_b = linkonce_odr unnamed_addr constant { [4 x i8*] } { [4 x i8*] [i8* null, i8* bitcast ({ i8*, i8* }* @_Type_Info_foo_b to i8*), i8* bitcast (void (i8*, i8*)* @_copy_main_foo_b to i8*), i8* bitcast (void (i8**)* @_allocate_struct_main_foo_b to i8*)] }, align 8
@_Name_foo_c = private unnamed_addr constant [6 x i8] c"foo_c\00", align 1
@_Type_Info_foo_c = linkonce_odr unnamed_addr constant { i8*, i8* } { i8* getelementptr inbounds ([6 x i8], [6 x i8]* @_Name_foo_c, i32 0, i32 0), i8* bitcast ({ i8*, i8* }* @_Type_Info_foo_b to i8*) }, align 8
@_Name_bar_c = private unnamed_addr constant [6 x i8] c"bar_c\00", align 1
@_Type_Info_bar_c = linkonce_odr unnamed_addr constant { i8*, i8* } { i8* getelementptr inbounds ([6 x i8], [6 x i8]* @_Name_bar_c, i32 0, i32 0), i8* bitcast ({ i8*, i8* }* @_Type_Info_bar_b to i8*) }, align 8
@_VTable_bar_c = linkonce_odr unnamed_addr constant { [4 x i8*] } { [4 x i8*] [i8* null, i8* bitcast ({ i8*, i8* }* @_Type_Info_bar_c to i8*), i8* bitcast (void (i8*, i8*)* @_copy_main_bar_c to i8*), i8* bitcast (void (i8**)* @_allocate_struct_main_bar_c to i8*)] }, align 8
@_VTable_foo_c = linkonce_odr unnamed_addr constant { [4 x i8*] } { [4 x i8*] [i8* null, i8* bitcast ({ i8*, i8* }* @_Type_Info_foo_c to i8*), i8* bitcast (void (i8*, i8*)* @_copy_main_foo_c to i8*), i8* bitcast (void (i8**)* @_allocate_struct_main_foo_c to i8*)] }, align 8
@0 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1
@serialization_info = private unnamed_addr constant [3 x i8] c"I4\00", align 1
@1 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1
@2 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1
@serialization_info.1 = private unnamed_addr constant [3 x i8] c"I4\00", align 1
@3 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1
@4 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1
@serialization_info.2 = private unnamed_addr constant [3 x i8] c"I4\00", align 1
@5 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1
@"ERROR STOP" = private unnamed_addr constant [11 x i8] c"ERROR STOP\00", align 1
@6 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1
@7 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1

define i32 @main(i32 %0, i8** %1) {
.entry:
  call void @_lpython_call_initial_functions(i32 %0, i8** %1)
  %foo = alloca %foo_c, align 8
  %2 = bitcast %foo_c* %foo to i32 (...)***
  store i32 (...)** bitcast (i8** getelementptr inbounds ({ [4 x i8*] }, { [4 x i8*] }* @_VTable_foo_c, i32 0, i32 0, i32 2) to i32 (...)**), i32 (...)*** %2, align 8
  %3 = getelementptr %foo_c, %foo_c* %foo, i32 0, i32 1
  %4 = bitcast %bar_c* %3 to i32 (...)***
  store i32 (...)** bitcast (i8** getelementptr inbounds ({ [4 x i8*] }, { [4 x i8*] }* @_VTable_bar_c, i32 0, i32 0, i32 2) to i32 (...)**), i32 (...)*** %4, align 8
  %5 = getelementptr %bar_c, %bar_c* %3, i32 0, i32 1
  %6 = getelementptr %bar_c, %bar_c* %3, i32 0, i32 0
  %7 = getelementptr %bar_b, %bar_b* %6, i32 0, i32 1
  %8 = getelementptr %bar_b, %bar_b* %6, i32 0, i32 0
  %9 = getelementptr %bar_a, %bar_a* %8, i32 0, i32 1
  %10 = getelementptr %foo_c, %foo_c* %foo, i32 0, i32 0
  %11 = getelementptr %foo_b, %foo_b* %10, i32 0, i32 1
  %12 = bitcast %bar_b* %11 to i32 (...)***
  store i32 (...)** bitcast (i8** getelementptr inbounds ({ [4 x i8*] }, { [4 x i8*] }* @_VTable_bar_b, i32 0, i32 0, i32 2) to i32 (...)**), i32 (...)*** %12, align 8
  %13 = getelementptr %bar_b, %bar_b* %11, i32 0, i32 1
  %14 = getelementptr %bar_b, %bar_b* %11, i32 0, i32 0
  %15 = getelementptr %bar_a, %bar_a* %14, i32 0, i32 1
  %16 = getelementptr %foo_b, %foo_b* %10, i32 0, i32 0
  %17 = getelementptr %foo_a, %foo_a* %16, i32 0, i32 1
  %18 = bitcast %bar_a* %17 to i32 (...)***
  store i32 (...)** bitcast (i8** getelementptr inbounds ({ [4 x i8*] }, { [4 x i8*] }* @_VTable_bar_a, i32 0, i32 0, i32 2) to i32 (...)**), i32 (...)*** %18, align 8
  %19 = getelementptr %bar_a, %bar_a* %17, i32 0, i32 1
  %20 = getelementptr %foo_c, %foo_c* %foo, i32 0, i32 0
  %21 = getelementptr %foo_b, %foo_b* %20, i32 0, i32 0
  %22 = getelementptr %foo_a, %foo_a* %21, i32 0, i32 1
  %23 = getelementptr %bar_a, %bar_a* %22, i32 0, i32 1
  store i32 -20, i32* %23, align 4
  %24 = getelementptr %foo_c, %foo_c* %foo, i32 0, i32 0
  %25 = getelementptr %foo_b, %foo_b* %24, i32 0, i32 1
  %26 = getelementptr %bar_b, %bar_b* %25, i32 0, i32 1
  store i32 9, i32* %26, align 4
  %27 = getelementptr %foo_c, %foo_c* %foo, i32 0, i32 1
  %28 = getelementptr %bar_c, %bar_c* %27, i32 0, i32 1
  store i32 11, i32* %28, align 4
  %29 = alloca i64, align 8
  %30 = getelementptr %foo_c, %foo_c* %foo, i32 0, i32 0
  %31 = getelementptr %foo_b, %foo_b* %30, i32 0, i32 0
  %32 = getelementptr %foo_a, %foo_a* %31, i32 0, i32 1
  %33 = getelementptr %bar_a, %bar_a* %32, i32 0, i32 1
  %34 = load i32, i32* %33, align 4
  %35 = alloca i32, align 4
  store i32 %34, i32* %35, align 4
  %36 = call i8* (i8*, i64, i8*, i64*, i32, i32, ...) @_lcompilers_string_format_fortran(i8* null, i64 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @serialization_info, i32 0, i32 0), i64* %29, i32 0, i32 0, i32* %35)
  %37 = load i64, i64* %29, align 4
  %stringFormat_desc = alloca %string_descriptor, align 8
  %38 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0
  store i8* %36, i8** %38, align 8
  %39 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1
  store i64 %37, i64* %39, align 4
  %40 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0
  %41 = load i8*, i8** %40, align 8
  %42 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1
  %43 = load i64, i64* %42, align 4
  %44 = trunc i64 %43 to i32
  call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @1, i32 0, i32 0), i8* %41, i32 %44, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @0, i32 0, i32 0), i32 1)
  call void @_lfortran_free(i8* %36)
  %45 = alloca i64, align 8
  %46 = getelementptr %foo_c, %foo_c* %foo, i32 0, i32 0
  %47 = getelementptr %foo_b, %foo_b* %46, i32 0, i32 1
  %48 = getelementptr %bar_b, %bar_b* %47, i32 0, i32 1
  %49 = load i32, i32* %48, align 4
  %50 = alloca i32, align 4
  store i32 %49, i32* %50, align 4
  %51 = call i8* (i8*, i64, i8*, i64*, i32, i32, ...) @_lcompilers_string_format_fortran(i8* null, i64 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @serialization_info.1, i32 0, i32 0), i64* %45, i32 0, i32 0, i32* %50)
  %52 = load i64, i64* %45, align 4
  %stringFormat_desc1 = alloca %string_descriptor, align 8
  %53 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 0
  store i8* %51, i8** %53, align 8
  %54 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 1
  store i64 %52, i64* %54, align 4
  %55 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 0
  %56 = load i8*, i8** %55, align 8
  %57 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 1
  %58 = load i64, i64* %57, align 4
  %59 = trunc i64 %58 to i32
  call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @3, i32 0, i32 0), i8* %56, i32 %59, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @2, i32 0, i32 0), i32 1)
  call void @_lfortran_free(i8* %51)
  %60 = alloca i64, align 8
  %61 = getelementptr %foo_c, %foo_c* %foo, i32 0, i32 1
  %62 = getelementptr %bar_c, %bar_c* %61, i32 0, i32 1
  %63 = load i32, i32* %62, align 4
  %64 = alloca i32, align 4
  store i32 %63, i32* %64, align 4
  %65 = call i8* (i8*, i64, i8*, i64*, i32, i32, ...) @_lcompilers_string_format_fortran(i8* null, i64 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @serialization_info.2, i32 0, i32 0), i64* %60, i32 0, i32 0, i32* %64)
  %66 = load i64, i64* %60, align 4
  %stringFormat_desc2 = alloca %string_descriptor, align 8
  %67 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc2, i32 0, i32 0
  store i8* %65, i8** %67, align 8
  %68 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc2, i32 0, i32 1
  store i64 %66, i64* %68, align 4
  %69 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc2, i32 0, i32 0
  %70 = load i8*, i8** %69, align 8
  %71 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc2, i32 0, i32 1
  %72 = load i64, i64* %71, align 4
  %73 = trunc i64 %72 to i32
  call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @5, i32 0, i32 0), i8* %70, i32 %73, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @4, i32 0, i32 0), i32 1)
  call void @_lfortran_free(i8* %65)
  %74 = getelementptr %foo_c, %foo_c* %foo, i32 0, i32 0
  %75 = getelementptr %foo_b, %foo_b* %74, i32 0, i32 0
  %76 = getelementptr %foo_a, %foo_a* %75, i32 0, i32 1
  %77 = getelementptr %bar_a, %bar_a* %76, i32 0, i32 1
  %78 = load i32, i32* %77, align 4
  %79 = getelementptr %foo_c, %foo_c* %foo, i32 0, i32 0
  %80 = getelementptr %foo_b, %foo_b* %79, i32 0, i32 1
  %81 = getelementptr %bar_b, %bar_b* %80, i32 0, i32 1
  %82 = load i32, i32* %81, align 4
  %83 = add i32 %78, %82
  %84 = getelementptr %foo_c, %foo_c* %foo, i32 0, i32 1
  %85 = getelementptr %bar_c, %bar_c* %84, i32 0, i32 1
  %86 = load i32, i32* %85, align 4
  %87 = add i32 %83, %86
  %88 = icmp ne i32 %87, 0
  br i1 %88, label %then, label %else

then:                                             ; preds = %.entry
  call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @7, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @6, i32 0, i32 0))
  call void @exit(i32 1)
  br label %ifcont

else:                                             ; preds = %.entry
  br label %ifcont

ifcont:                                           ; preds = %else, %then
  call void @_lpython_free_argv()
  br label %return

return:                                           ; preds = %ifcont
  ret i32 0
}

declare void @_lpython_call_initial_functions(i32, i8**)

define linkonce_odr void @_copy_main_foo_a(i8* %0, i8* %1) {
entry:
  %2 = bitcast i8* %0 to %foo_a*
  %3 = bitcast i8* %1 to %foo_a*
  %4 = bitcast %foo_a* %2 to i32 (...)***
  %5 = load i32 (...)**, i32 (...)*** %4, align 8
  %6 = bitcast %foo_a* %3 to i32 (...)***
  store i32 (...)** %5, i32 (...)*** %6, align 8
  %7 = getelementptr %foo_a, %foo_a* %2, i32 0, i32 1
  %8 = getelementptr %foo_a, %foo_a* %3, i32 0, i32 1
  br i1 true, label %then, label %else

then:                                             ; preds = %entry
  %9 = bitcast %bar_a* %7 to void (i8*, i8*)***
  %10 = load void (i8*, i8*)**, void (i8*, i8*)*** %9, align 8
  %11 = getelementptr inbounds void (i8*, i8*)*, void (i8*, i8*)** %10, i32 0
  %12 = load void (i8*, i8*)*, void (i8*, i8*)** %11, align 8
  %13 = bitcast %bar_a* %7 to i8*
  %14 = bitcast %bar_a* %8 to i8*
  call void %12(i8* %13, i8* %14)
  br label %ifcont

else:                                             ; preds = %entry
  br label %ifcont

ifcont:                                           ; preds = %else, %then
  %15 = bitcast %foo_a* %3 to i32 (...)***
  store i32 (...)** bitcast (i8** getelementptr inbounds ({ [4 x i8*] }, { [4 x i8*] }* @_VTable_foo_a, i32 0, i32 0, i32 2) to i32 (...)**), i32 (...)*** %15, align 8
  ret void
}

define linkonce_odr void @_allocate_struct_main_foo_a(i8** %0) {
entry:
  %1 = call i8* @_lfortran_malloc(i64 24)
  call void @llvm.memset.p0i8.i32(i8* %1, i8 0, i32 24, i1 false)
  store i8* %1, i8** %0, align 8
  %2 = bitcast i8* %1 to %foo_a*
  %3 = getelementptr %foo_a, %foo_a* %2, i32 0, i32 1
  %4 = bitcast %bar_a* %3 to i32 (...)***
  store i32 (...)** bitcast (i8** getelementptr inbounds ({ [4 x i8*] }, { [4 x i8*] }* @_VTable_bar_a, i32 0, i32 0, i32 2) to i32 (...)**), i32 (...)*** %4, align 8
  %5 = getelementptr %bar_a, %bar_a* %3, i32 0, i32 1
  ret void
}

declare i8* @_lfortran_malloc(i64)

; Function Attrs: argmemonly nounwind willreturn writeonly
declare void @llvm.memset.p0i8.i32(i8* nocapture writeonly, i8, i32, i1 immarg) #0

define linkonce_odr void @_copy_main_bar_a(i8* %0, i8* %1) {
entry:
  %2 = bitcast i8* %0 to %bar_a*
  %3 = bitcast i8* %1 to %bar_a*
  %4 = bitcast %bar_a* %2 to i32 (...)***
  %5 = load i32 (...)**, i32 (...)*** %4, align 8
  %6 = bitcast %bar_a* %3 to i32 (...)***
  store i32 (...)** %5, i32 (...)*** %6, align 8
  %7 = getelementptr %bar_a, %bar_a* %2, i32 0, i32 1
  %8 = load i32, i32* %7, align 4
  %9 = getelementptr %bar_a, %bar_a* %3, i32 0, i32 1
  br i1 true, label %then, label %else

then:                                             ; preds = %entry
  store i32 %8, i32* %9, align 4
  br label %ifcont

else:                                             ; preds = %entry
  br label %ifcont

ifcont:                                           ; preds = %else, %then
  %10 = bitcast %bar_a* %3 to i32 (...)***
  store i32 (...)** bitcast (i8** getelementptr inbounds ({ [4 x i8*] }, { [4 x i8*] }* @_VTable_bar_a, i32 0, i32 0, i32 2) to i32 (...)**), i32 (...)*** %10, align 8
  ret void
}

define linkonce_odr void @_allocate_struct_main_bar_a(i8** %0) {
entry:
  %1 = call i8* @_lfortran_malloc(i64 16)
  call void @llvm.memset.p0i8.i32(i8* %1, i8 0, i32 16, i1 false)
  store i8* %1, i8** %0, align 8
  %2 = bitcast i8* %1 to %bar_a*
  %3 = getelementptr %bar_a, %bar_a* %2, i32 0, i32 1
  ret void
}

define linkonce_odr void @_copy_main_foo_b(i8* %0, i8* %1) {
entry:
  %2 = bitcast i8* %0 to %foo_b*
  %3 = bitcast i8* %1 to %foo_b*
  %4 = bitcast %foo_b* %2 to i32 (...)***
  %5 = load i32 (...)**, i32 (...)*** %4, align 8
  %6 = bitcast %foo_b* %3 to i32 (...)***
  store i32 (...)** %5, i32 (...)*** %6, align 8
  %7 = getelementptr %foo_b, %foo_b* %2, i32 0, i32 1
  %8 = getelementptr %foo_b, %foo_b* %3, i32 0, i32 1
  br i1 true, label %then, label %else

then:                                             ; preds = %entry
  %9 = bitcast %bar_b* %7 to void (i8*, i8*)***
  %10 = load void (i8*, i8*)**, void (i8*, i8*)*** %9, align 8
  %11 = getelementptr inbounds void (i8*, i8*)*, void (i8*, i8*)** %10, i32 0
  %12 = load void (i8*, i8*)*, void (i8*, i8*)** %11, align 8
  %13 = bitcast %bar_b* %7 to i8*
  %14 = bitcast %bar_b* %8 to i8*
  call void %12(i8* %13, i8* %14)
  br label %ifcont

else:                                             ; preds = %entry
  br label %ifcont

ifcont:                                           ; preds = %else, %then
  %15 = getelementptr %foo_b, %foo_b* %2, i32 0, i32 0
  %16 = getelementptr %foo_b, %foo_b* %3, i32 0, i32 0
  %17 = getelementptr %foo_a, %foo_a* %15, i32 0, i32 1
  %18 = getelementptr %foo_a, %foo_a* %16, i32 0, i32 1
  br i1 true, label %then1, label %else2

then1:                                            ; preds = %ifcont
  %19 = bitcast %bar_a* %17 to void (i8*, i8*)***
  %20 = load void (i8*, i8*)**, void (i8*, i8*)*** %19, align 8
  %21 = getelementptr inbounds void (i8*, i8*)*, void (i8*, i8*)** %20, i32 0
  %22 = load void (i8*, i8*)*, void (i8*, i8*)** %21, align 8
  %23 = bitcast %bar_a* %17 to i8*
  %24 = bitcast %bar_a* %18 to i8*
  call void %22(i8* %23, i8* %24)
  br label %ifcont3

else2:                                            ; preds = %ifcont
  br label %ifcont3

ifcont3:                                          ; preds = %else2, %then1
  %25 = bitcast %foo_b* %3 to i32 (...)***
  store i32 (...)** bitcast (i8** getelementptr inbounds ({ [4 x i8*] }, { [4 x i8*] }* @_VTable_foo_b, i32 0, i32 0, i32 2) to i32 (...)**), i32 (...)*** %25, align 8
  ret void
}

define linkonce_odr void @_allocate_struct_main_foo_b(i8** %0) {
entry:
  %1 = call i8* @_lfortran_malloc(i64 48)
  call void @llvm.memset.p0i8.i32(i8* %1, i8 0, i32 48, i1 false)
  store i8* %1, i8** %0, align 8
  %2 = bitcast i8* %1 to %foo_b*
  %3 = getelementptr %foo_b, %foo_b* %2, i32 0, i32 1
  %4 = bitcast %bar_b* %3 to i32 (...)***
  store i32 (...)** bitcast (i8** getelementptr inbounds ({ [4 x i8*] }, { [4 x i8*] }* @_VTable_bar_b, i32 0, i32 0, i32 2) to i32 (...)**), i32 (...)*** %4, align 8
  %5 = getelementptr %bar_b, %bar_b* %3, i32 0, i32 1
  %6 = getelementptr %bar_b, %bar_b* %3, i32 0, i32 0
  %7 = getelementptr %bar_a, %bar_a* %6, i32 0, i32 1
  %8 = getelementptr %foo_b, %foo_b* %2, i32 0, i32 0
  %9 = getelementptr %foo_a, %foo_a* %8, i32 0, i32 1
  %10 = bitcast %bar_a* %9 to i32 (...)***
  store i32 (...)** bitcast (i8** getelementptr inbounds ({ [4 x i8*] }, { [4 x i8*] }* @_VTable_bar_a, i32 0, i32 0, i32 2) to i32 (...)**), i32 (...)*** %10, align 8
  %11 = getelementptr %bar_a, %bar_a* %9, i32 0, i32 1
  ret void
}

define linkonce_odr void @_copy_main_bar_b(i8* %0, i8* %1) {
entry:
  %2 = bitcast i8* %0 to %bar_b*
  %3 = bitcast i8* %1 to %bar_b*
  %4 = bitcast %bar_b* %2 to i32 (...)***
  %5 = load i32 (...)**, i32 (...)*** %4, align 8
  %6 = bitcast %bar_b* %3 to i32 (...)***
  store i32 (...)** %5, i32 (...)*** %6, align 8
  %7 = getelementptr %bar_b, %bar_b* %2, i32 0, i32 1
  %8 = load i32, i32* %7, align 4
  %9 = getelementptr %bar_b, %bar_b* %3, i32 0, i32 1
  br i1 true, label %then, label %else

then:                                             ; preds = %entry
  store i32 %8, i32* %9, align 4
  br label %ifcont

else:                                             ; preds = %entry
  br label %ifcont

ifcont:                                           ; preds = %else, %then
  %10 = getelementptr %bar_b, %bar_b* %2, i32 0, i32 0
  %11 = getelementptr %bar_b, %bar_b* %3, i32 0, i32 0
  %12 = getelementptr %bar_a, %bar_a* %10, i32 0, i32 1
  %13 = load i32, i32* %12, align 4
  %14 = getelementptr %bar_a, %bar_a* %11, i32 0, i32 1
  br i1 true, label %then1, label %else2

then1:                                            ; preds = %ifcont
  store i32 %13, i32* %14, align 4
  br label %ifcont3

else2:                                            ; preds = %ifcont
  br label %ifcont3

ifcont3:                                          ; preds = %else2, %then1
  %15 = bitcast %bar_b* %3 to i32 (...)***
  store i32 (...)** bitcast (i8** getelementptr inbounds ({ [4 x i8*] }, { [4 x i8*] }* @_VTable_bar_b, i32 0, i32 0, i32 2) to i32 (...)**), i32 (...)*** %15, align 8
  ret void
}

define linkonce_odr void @_allocate_struct_main_bar_b(i8** %0) {
entry:
  %1 = call i8* @_lfortran_malloc(i64 24)
  call void @llvm.memset.p0i8.i32(i8* %1, i8 0, i32 24, i1 false)
  store i8* %1, i8** %0, align 8
  %2 = bitcast i8* %1 to %bar_b*
  %3 = getelementptr %bar_b, %bar_b* %2, i32 0, i32 1
  %4 = getelementptr %bar_b, %bar_b* %2, i32 0, i32 0
  %5 = getelementptr %bar_a, %bar_a* %4, i32 0, i32 1
  ret void
}

define linkonce_odr void @_copy_main_foo_c(i8* %0, i8* %1) {
entry:
  %2 = bitcast i8* %0 to %foo_c*
  %3 = bitcast i8* %1 to %foo_c*
  %4 = bitcast %foo_c* %2 to i32 (...)***
  %5 = load i32 (...)**, i32 (...)*** %4, align 8
  %6 = bitcast %foo_c* %3 to i32 (...)***
  store i32 (...)** %5, i32 (...)*** %6, align 8
  %7 = getelementptr %foo_c, %foo_c* %2, i32 0, i32 1
  %8 = getelementptr %foo_c, %foo_c* %3, i32 0, i32 1
  br i1 true, label %then, label %else

then:                                             ; preds = %entry
  %9 = bitcast %bar_c* %7 to void (i8*, i8*)***
  %10 = load void (i8*, i8*)**, void (i8*, i8*)*** %9, align 8
  %11 = getelementptr inbounds void (i8*, i8*)*, void (i8*, i8*)** %10, i32 0
  %12 = load void (i8*, i8*)*, void (i8*, i8*)** %11, align 8
  %13 = bitcast %bar_c* %7 to i8*
  %14 = bitcast %bar_c* %8 to i8*
  call void %12(i8* %13, i8* %14)
  br label %ifcont

else:                                             ; preds = %entry
  br label %ifcont

ifcont:                                           ; preds = %else, %then
  %15 = getelementptr %foo_c, %foo_c* %2, i32 0, i32 0
  %16 = getelementptr %foo_c, %foo_c* %3, i32 0, i32 0
  %17 = getelementptr %foo_b, %foo_b* %15, i32 0, i32 1
  %18 = getelementptr %foo_b, %foo_b* %16, i32 0, i32 1
  br i1 true, label %then1, label %else2

then1:                                            ; preds = %ifcont
  %19 = bitcast %bar_b* %17 to void (i8*, i8*)***
  %20 = load void (i8*, i8*)**, void (i8*, i8*)*** %19, align 8
  %21 = getelementptr inbounds void (i8*, i8*)*, void (i8*, i8*)** %20, i32 0
  %22 = load void (i8*, i8*)*, void (i8*, i8*)** %21, align 8
  %23 = bitcast %bar_b* %17 to i8*
  %24 = bitcast %bar_b* %18 to i8*
  call void %22(i8* %23, i8* %24)
  br label %ifcont3

else2:                                            ; preds = %ifcont
  br label %ifcont3

ifcont3:                                          ; preds = %else2, %then1
  %25 = getelementptr %foo_b, %foo_b* %15, i32 0, i32 0
  %26 = getelementptr %foo_b, %foo_b* %16, i32 0, i32 0
  %27 = getelementptr %foo_a, %foo_a* %25, i32 0, i32 1
  %28 = getelementptr %foo_a, %foo_a* %26, i32 0, i32 1
  br i1 true, label %then4, label %else5

then4:                                            ; preds = %ifcont3
  %29 = bitcast %bar_a* %27 to void (i8*, i8*)***
  %30 = load void (i8*, i8*)**, void (i8*, i8*)*** %29, align 8
  %31 = getelementptr inbounds void (i8*, i8*)*, void (i8*, i8*)** %30, i32 0
  %32 = load void (i8*, i8*)*, void (i8*, i8*)** %31, align 8
  %33 = bitcast %bar_a* %27 to i8*
  %34 = bitcast %bar_a* %28 to i8*
  call void %32(i8* %33, i8* %34)
  br label %ifcont6

else5:                                            ; preds = %ifcont3
  br label %ifcont6

ifcont6:                                          ; preds = %else5, %then4
  %35 = bitcast %foo_c* %3 to i32 (...)***
  store i32 (...)** bitcast (i8** getelementptr inbounds ({ [4 x i8*] }, { [4 x i8*] }* @_VTable_foo_c, i32 0, i32 0, i32 2) to i32 (...)**), i32 (...)*** %35, align 8
  ret void
}

define linkonce_odr void @_allocate_struct_main_foo_c(i8** %0) {
entry:
  %1 = call i8* @_lfortran_malloc(i64 80)
  call void @llvm.memset.p0i8.i32(i8* %1, i8 0, i32 80, i1 false)
  store i8* %1, i8** %0, align 8
  %2 = bitcast i8* %1 to %foo_c*
  %3 = getelementptr %foo_c, %foo_c* %2, i32 0, i32 1
  %4 = bitcast %bar_c* %3 to i32 (...)***
  store i32 (...)** bitcast (i8** getelementptr inbounds ({ [4 x i8*] }, { [4 x i8*] }* @_VTable_bar_c, i32 0, i32 0, i32 2) to i32 (...)**), i32 (...)*** %4, align 8
  %5 = getelementptr %bar_c, %bar_c* %3, i32 0, i32 1
  %6 = getelementptr %bar_c, %bar_c* %3, i32 0, i32 0
  %7 = getelementptr %bar_b, %bar_b* %6, i32 0, i32 1
  %8 = getelementptr %bar_b, %bar_b* %6, i32 0, i32 0
  %9 = getelementptr %bar_a, %bar_a* %8, i32 0, i32 1
  %10 = getelementptr %foo_c, %foo_c* %2, i32 0, i32 0
  %11 = getelementptr %foo_b, %foo_b* %10, i32 0, i32 1
  %12 = bitcast %bar_b* %11 to i32 (...)***
  store i32 (...)** bitcast (i8** getelementptr inbounds ({ [4 x i8*] }, { [4 x i8*] }* @_VTable_bar_b, i32 0, i32 0, i32 2) to i32 (...)**), i32 (...)*** %12, align 8
  %13 = getelementptr %bar_b, %bar_b* %11, i32 0, i32 1
  %14 = getelementptr %bar_b, %bar_b* %11, i32 0, i32 0
  %15 = getelementptr %bar_a, %bar_a* %14, i32 0, i32 1
  %16 = getelementptr %foo_b, %foo_b* %10, i32 0, i32 0
  %17 = getelementptr %foo_a, %foo_a* %16, i32 0, i32 1
  %18 = bitcast %bar_a* %17 to i32 (...)***
  store i32 (...)** bitcast (i8** getelementptr inbounds ({ [4 x i8*] }, { [4 x i8*] }* @_VTable_bar_a, i32 0, i32 0, i32 2) to i32 (...)**), i32 (...)*** %18, align 8
  %19 = getelementptr %bar_a, %bar_a* %17, i32 0, i32 1
  ret void
}

define linkonce_odr void @_copy_main_bar_c(i8* %0, i8* %1) {
entry:
  %2 = bitcast i8* %0 to %bar_c*
  %3 = bitcast i8* %1 to %bar_c*
  %4 = bitcast %bar_c* %2 to i32 (...)***
  %5 = load i32 (...)**, i32 (...)*** %4, align 8
  %6 = bitcast %bar_c* %3 to i32 (...)***
  store i32 (...)** %5, i32 (...)*** %6, align 8
  %7 = getelementptr %bar_c, %bar_c* %2, i32 0, i32 1
  %8 = load i32, i32* %7, align 4
  %9 = getelementptr %bar_c, %bar_c* %3, i32 0, i32 1
  br i1 true, label %then, label %else

then:                                             ; preds = %entry
  store i32 %8, i32* %9, align 4
  br label %ifcont

else:                                             ; preds = %entry
  br label %ifcont

ifcont:                                           ; preds = %else, %then
  %10 = getelementptr %bar_c, %bar_c* %2, i32 0, i32 0
  %11 = getelementptr %bar_c, %bar_c* %3, i32 0, i32 0
  %12 = getelementptr %bar_b, %bar_b* %10, i32 0, i32 1
  %13 = load i32, i32* %12, align 4
  %14 = getelementptr %bar_b, %bar_b* %11, i32 0, i32 1
  br i1 true, label %then1, label %else2

then1:                                            ; preds = %ifcont
  store i32 %13, i32* %14, align 4
  br label %ifcont3

else2:                                            ; preds = %ifcont
  br label %ifcont3

ifcont3:                                          ; preds = %else2, %then1
  %15 = getelementptr %bar_b, %bar_b* %10, i32 0, i32 0
  %16 = getelementptr %bar_b, %bar_b* %11, i32 0, i32 0
  %17 = getelementptr %bar_a, %bar_a* %15, i32 0, i32 1
  %18 = load i32, i32* %17, align 4
  %19 = getelementptr %bar_a, %bar_a* %16, i32 0, i32 1
  br i1 true, label %then4, label %else5

then4:                                            ; preds = %ifcont3
  store i32 %18, i32* %19, align 4
  br label %ifcont6

else5:                                            ; preds = %ifcont3
  br label %ifcont6

ifcont6:                                          ; preds = %else5, %then4
  %20 = bitcast %bar_c* %3 to i32 (...)***
  store i32 (...)** bitcast (i8** getelementptr inbounds ({ [4 x i8*] }, { [4 x i8*] }* @_VTable_bar_c, i32 0, i32 0, i32 2) to i32 (...)**), i32 (...)*** %20, align 8
  ret void
}

define linkonce_odr void @_allocate_struct_main_bar_c(i8** %0) {
entry:
  %1 = call i8* @_lfortran_malloc(i64 32)
  call void @llvm.memset.p0i8.i32(i8* %1, i8 0, i32 32, i1 false)
  store i8* %1, i8** %0, align 8
  %2 = bitcast i8* %1 to %bar_c*
  %3 = getelementptr %bar_c, %bar_c* %2, i32 0, i32 1
  %4 = getelementptr %bar_c, %bar_c* %2, i32 0, i32 0
  %5 = getelementptr %bar_b, %bar_b* %4, i32 0, i32 1
  %6 = getelementptr %bar_b, %bar_b* %4, i32 0, i32 0
  %7 = getelementptr %bar_a, %bar_a* %6, i32 0, i32 1
  ret void
}

declare i8* @_lcompilers_string_format_fortran(i8*, i64, i8*, i64*, i32, i32, ...)

declare void @_lfortran_printf(i8*, i8*, i32, i8*, i32)

declare void @_lfortran_free(i8*)

declare void @_lcompilers_print_error(i8*, ...)

declare void @exit(i32)

declare void @_lpython_free_argv()

attributes #0 = { argmemonly nounwind willreturn writeonly }