-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path01CB7D2FB582E67D.ll
3741 lines (3227 loc) · 182 KB
/
01CB7D2FB582E67D.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
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
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
; ModuleID = '/usr/local/google/home/aeubanks/repos/test-suite/MultiSource/Benchmarks/Prolangs-C/bison/reader.c'
source_filename = "/usr/local/google/home/aeubanks/repos/test-suite/MultiSource/Benchmarks/Prolangs-C/bison/reader.c"
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-unknown-linux-gnu"
%struct.bucket = type { ptr, ptr, ptr, ptr, i16, i16, i16, i16, i8 }
%struct.symbol_list = type { ptr, ptr, ptr }
@start_flag = dso_local local_unnamed_addr global i32 0, align 4
@startval = dso_local local_unnamed_addr global ptr null, align 8
@translations = external local_unnamed_addr global i32, align 4
@nsyms = external local_unnamed_addr global i32, align 4
@nvars = external local_unnamed_addr global i32, align 4
@nrules = external local_unnamed_addr global i32, align 4
@nitems = external local_unnamed_addr global i32, align 4
@rline_allocated = dso_local local_unnamed_addr global i32 0, align 4
@rline = external local_unnamed_addr global ptr, align 8
@typed = internal unnamed_addr global i1 false, align 4
@lastprec = internal unnamed_addr global i32 0, align 4
@gensym_count = internal unnamed_addr global i32 0, align 4
@semantic_parser = external local_unnamed_addr global i32, align 4
@pure_parser = external local_unnamed_addr global i32, align 4
@yylsp_needed = internal unnamed_addr global i1 false, align 4
@grammar = dso_local local_unnamed_addr global ptr null, align 8
@lineno = dso_local local_unnamed_addr global i32 0, align 4
@.str = private unnamed_addr constant [6 x i8] c"error\00", align 1
@errtoken = internal unnamed_addr global ptr null, align 8
@.str.1 = private unnamed_addr constant [10 x i8] c"$illegal.\00", align 1
@ftable = external local_unnamed_addr global ptr, align 8
@.str.2 = private unnamed_addr constant [40 x i8] c"\0A/* A Bison parser, made from %s */\0A\0A\00", align 1
@infile = external local_unnamed_addr global ptr, align 8
@.str.3 = private unnamed_addr constant [23 x i8] c"#define YYLSP_NEEDED\0A\0A\00", align 1
@.str.4 = private unnamed_addr constant [35 x i8] c"junk after % in definition section\00", align 1
@.str.5 = private unnamed_addr constant [17 x i8] c"no input grammar\00", align 1
@.str.6 = private unnamed_addr constant [46 x i8] c"Unrecognized char '%c' in declaration section\00", align 1
@nolinesflag = external local_unnamed_addr global i32, align 4
@fattrs = external local_unnamed_addr global ptr, align 8
@.str.7 = private unnamed_addr constant [15 x i8] c"#line %d \22%s\22\0A\00", align 1
@finput = external local_unnamed_addr global ptr, align 8
@.str.8 = private unnamed_addr constant [20 x i8] c"unterminated string\00", align 1
@.str.9 = private unnamed_addr constant [38 x i8] c"unterminated comment in %{ definition\00", align 1
@.str.10 = private unnamed_addr constant [27 x i8] c"unterminated %{ definition\00", align 1
@token_buffer = external global [0 x i8], align 1
@symval = external local_unnamed_addr global ptr, align 8
@.str.11 = private unnamed_addr constant [20 x i8] c"symbol %s redefined\00", align 1
@.str.12 = private unnamed_addr constant [26 x i8] c"type redeclaration for %s\00", align 1
@numval = external local_unnamed_addr global i32, align 4
@.str.13 = private unnamed_addr constant [45 x i8] c"invalid text in %token or %nterm declaration\00", align 1
@.str.14 = private unnamed_addr constant [29 x i8] c"multiple %start declarations\00", align 1
@.str.15 = private unnamed_addr constant [27 x i8] c"invalid %start declaration\00", align 1
@.str.16 = private unnamed_addr constant [29 x i8] c"ill-formed %type declaration\00", align 1
@.str.17 = private unnamed_addr constant [26 x i8] c"invalid %type declaration\00", align 1
@.str.18 = private unnamed_addr constant [40 x i8] c"invalid text in association declaration\00", align 1
@.str.19 = private unnamed_addr constant [37 x i8] c"malformatted association declaration\00", align 1
@.str.20 = private unnamed_addr constant [29 x i8] c"multiple %union declarations\00", align 1
@.str.21 = private unnamed_addr constant [16 x i8] c"\0A#line %d \22%s\22\0A\00", align 1
@.str.23 = private unnamed_addr constant [14 x i8] c"typedef union\00", align 1
@fdefines = external local_unnamed_addr global ptr, align 8
@.str.24 = private unnamed_addr constant [21 x i8] c"unterminated comment\00", align 1
@.str.25 = private unnamed_addr constant [11 x i8] c" YYSTYPE;\0A\00", align 1
@expected_conflicts = external local_unnamed_addr global i32, align 4
@.str.26 = private unnamed_addr constant [189 x i8] c"\0A#ifndef YYLTYPE\0Atypedef\0A struct yyltype\0A {\0A int first_line;\0A int first_column;\0A int last_line;\0A int last_column;\0A }\0A yyltype;\0A\0A#define YYLTYPE yyltype\0A#endif\0A\0A\00", align 1
@.str.27 = private unnamed_addr constant [32 x i8] c"#define\09YYACCEPT\09goto yyaccept\0A\00", align 1
@.str.28 = private unnamed_addr constant [30 x i8] c"#define\09YYABORT\09goto yyabort\0A\00", align 1
@.str.29 = private unnamed_addr constant [31 x i8] c"#define\09YYERROR\09goto yyerrlab\0A\00", align 1
@.str.30 = private unnamed_addr constant [50 x i8] c"#define\09yytext\09(*_yytext)\0Aextern char **_yytext;\0A\00", align 1
@.str.31 = private unnamed_addr constant [52 x i8] c"#define\09yylval\09(*_yylval)\0Aextern YYSTYPE *_yylval;\0A\00", align 1
@.str.32 = private unnamed_addr constant [52 x i8] c"#define\09yylloc\09(*_yylloc)\0Aextern YYLTYPE *_yylloc;\0A\00", align 1
@.str.33 = private unnamed_addr constant [51 x i8] c"#define\09yyppval\09(*_yyppval)\0Aextern int *_yyppval;\0A\00", align 1
@.str.34 = private unnamed_addr constant [16 x i8] c"invalid $ value\00", align 1
@fguard = external local_unnamed_addr global ptr, align 8
@.str.35 = private unnamed_addr constant [11 x i8] c"\0Acase %d:\0A\00", align 1
@.str.36 = private unnamed_addr constant [28 x i8] c"unmatched right brace ('}')\00", align 1
@.str.37 = private unnamed_addr constant [6 x i8] c"yyval\00", align 1
@.str.38 = private unnamed_addr constant [4 x i8] c".%s\00", align 1
@stderr = external local_unnamed_addr global ptr, align 8
@.str.39 = private unnamed_addr constant [52 x i8] c"%s:%d: warning: $$ of '%s' has no declared type.\0A\00", align 1
@.str.40 = private unnamed_addr constant [15 x i8] c"yyp->yyvsp[%d]\00", align 1
@.str.41 = private unnamed_addr constant [53 x i8] c"%s:%d: warning: $%d of '%s' has no declared type.\0A\00", align 1
@.str.42 = private unnamed_addr constant [15 x i8] c"$%c is invalid\00", align 1
@.str.43 = private unnamed_addr constant [15 x i8] c"@%c is invalid\00", align 1
@.str.44 = private unnamed_addr constant [15 x i8] c"yyp->yylsp[%d]\00", align 1
@.str.45 = private unnamed_addr constant [27 x i8] c"unterminated %guard clause\00", align 1
@.str.46 = private unnamed_addr constant [14 x i8] c";\0A break;}\00", align 1
@faction = external local_unnamed_addr global ptr, align 8
@.str.47 = private unnamed_addr constant [20 x i8] c"invalid @-construct\00", align 1
@.str.48 = private unnamed_addr constant [14 x i8] c"unmatched '{'\00", align 1
@.str.49 = private unnamed_addr constant [4 x i8] c"@%d\00", align 1
@.str.50 = private unnamed_addr constant [16 x i8] c"ill-formed rule\00", align 1
@.str.51 = private unnamed_addr constant [33 x i8] c"grammar starts with vertical bar\00", align 1
@.str.52 = private unnamed_addr constant [36 x i8] c"rule given for %s, which is a token\00", align 1
@.str.53 = private unnamed_addr constant [50 x i8] c"%guard present but %semantic_parser not specified\00", align 1
@.str.54 = private unnamed_addr constant [31 x i8] c"two actions at end of one rule\00", align 1
@.str.55 = private unnamed_addr constant [60 x i8] c"%s:%d: warning: type clash ('%s' '%s') on default action\0A\00", align 1
@.str.56 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1
@.str.57 = private unnamed_addr constant [14 x i8] c"invalid input\00", align 1
@.str.58 = private unnamed_addr constant [44 x i8] c"#ifndef YYSTYPE\0A#define YYSTYPE int\0A#endif\0A\00", align 1
@firstsymbol = external local_unnamed_addr global ptr, align 8
@.str.59 = private unnamed_addr constant [59 x i8] c"symbol %s used, not defined as token, and no rules for it\0A\00", align 1
@failure = external local_unnamed_addr global i32, align 4
@ntokens = external local_unnamed_addr global i32, align 4
@.str.60 = private unnamed_addr constant [25 x i8] c"bison: memory exhausted\0A\00", align 1
@tags = dso_local local_unnamed_addr global ptr null, align 8
@.str.61 = private unnamed_addr constant [2 x i8] c"$\00", align 1
@sprec = external local_unnamed_addr global ptr, align 8
@sassoc = external local_unnamed_addr global ptr, align 8
@max_user_token_number = external local_unnamed_addr global i32, align 4
@token_translations = external local_unnamed_addr global ptr, align 8
@.str.62 = private unnamed_addr constant [41 x i8] c"tokens %s and %s both assigned number %d\00", align 1
@error_token_number = external local_unnamed_addr global i32, align 4
@.str.63 = private unnamed_addr constant [33 x i8] c"the start symbol %s is undefined\00", align 1
@.str.64 = private unnamed_addr constant [31 x i8] c"the start symbol %s is a token\00", align 1
@start_symbol = external local_unnamed_addr global i32, align 4
@definesflag = external local_unnamed_addr global i32, align 4
@.str.65 = private unnamed_addr constant [17 x i8] c"#define\09NT%s\09%d\0A\00", align 1
@.str.66 = private unnamed_addr constant [15 x i8] c"#define\09%s\09%d\0A\00", align 1
@.str.67 = private unnamed_addr constant [16 x i8] c"#define\09T%s\09%d\0A\00", align 1
@ritem = external local_unnamed_addr global ptr, align 8
@rlhs = external local_unnamed_addr global ptr, align 8
@rrhs = external local_unnamed_addr global ptr, align 8
@rprec = external local_unnamed_addr global ptr, align 8
@rassoc = external local_unnamed_addr global ptr, align 8
; Function Attrs: nounwind uwtable
define dso_local void @reader() local_unnamed_addr #0 {
entry:
store i32 0, ptr @start_flag, align 4, !tbaa !5
store ptr null, ptr @startval, align 8, !tbaa !9
store i32 0, ptr @translations, align 4, !tbaa !5
store i32 1, ptr @nsyms, align 4, !tbaa !5
store i32 0, ptr @nvars, align 4, !tbaa !5
store i32 0, ptr @nrules, align 4, !tbaa !5
store i32 0, ptr @nitems, align 4, !tbaa !5
store i32 10, ptr @rline_allocated, align 4, !tbaa !5
%call = tail call ptr (i32, ...) @mallocate(i32 noundef 20) #12
store ptr %call, ptr @rline, align 8, !tbaa !9
store i1 false, ptr @typed, align 4
store i32 0, ptr @lastprec, align 4, !tbaa !5
store i32 0, ptr @gensym_count, align 4, !tbaa !5
store i32 0, ptr @semantic_parser, align 4, !tbaa !5
store i32 0, ptr @pure_parser, align 4, !tbaa !5
store i1 false, ptr @yylsp_needed, align 4
store ptr null, ptr @grammar, align 8, !tbaa !9
tail call void @init_lex() #12
store i32 1, ptr @lineno, align 4, !tbaa !5
tail call void @tabinit() #12
%call2 = tail call ptr (ptr, ...) @getsym(ptr noundef nonnull @.str) #12
store ptr %call2, ptr @errtoken, align 8, !tbaa !9
%class = getelementptr inbounds %struct.bucket, ptr %call2, i64 0, i32 8
store i8 1, ptr %class, align 8, !tbaa !11
%call3 = tail call ptr (ptr, ...) @getsym(ptr noundef nonnull @.str.1) #12
%class4 = getelementptr inbounds %struct.bucket, ptr %call3, i64 0, i32 8
store i8 1, ptr %class4, align 8, !tbaa !11
%0 = load ptr, ptr @ftable, align 8, !tbaa !9
%1 = load ptr, ptr @infile, align 8, !tbaa !9
%call.i = tail call ptr @strrchr(ptr noundef nonnull dereferenceable(1) %1, i32 noundef 47) #13
%tobool.not.i = icmp eq ptr %call.i, null
%add.ptr.i = getelementptr inbounds i8, ptr %call.i, i64 1
%cond.i = select i1 %tobool.not.i, ptr %1, ptr %add.ptr.i
%call6 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %0, ptr noundef nonnull @.str.2, ptr noundef %cond.i)
tail call void @read_declarations()
tail call void @output_ltype()
tail call void @output_headers() #12
tail call void @readgram()
tail call void @output_trailers() #12
%.b = load i1, ptr @yylsp_needed, align 4
br i1 %.b, label %if.then, label %if.end
if.then: ; preds = %entry
%2 = load ptr, ptr @ftable, align 8, !tbaa !9
%3 = tail call i64 @fwrite(ptr nonnull @.str.3, i64 22, i64 1, ptr %2)
br label %if.end
if.end: ; preds = %if.then, %entry
tail call void @packsymbols()
tail call void @packgram()
tail call void @free_symtab() #12
ret void
}
declare ptr @mallocate(...) local_unnamed_addr #1
declare void @init_lex() local_unnamed_addr #1
declare void @tabinit() local_unnamed_addr #1
declare ptr @getsym(...) local_unnamed_addr #1
; Function Attrs: nofree nounwind
declare noundef i32 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nounwind uwtable
define dso_local void @read_declarations() local_unnamed_addr #0 {
entry:
%buffer.i = alloca [20 x i8], align 16
br label %for.cond
for.cond: ; preds = %for.cond.backedge, %entry
%call = tail call i32 @skip_white_space() #12
switch i32 %call, label %if.else16 [
i32 37, label %if.then
i32 -1, label %if.then15
]
if.then: ; preds = %for.cond
%call1 = tail call i32 @parse_percent_token() #12
switch i32 %call1, label %sw.default [
i32 7, label %sw.bb
i32 8, label %sw.bb2
i32 9, label %sw.bb3
i32 10, label %sw.bb4
i32 12, label %sw.bb5
i32 14, label %sw.bb6
i32 13, label %sw.bb7
i32 23, label %sw.bb8
i32 15, label %sw.bb9
i32 16, label %sw.bb10
i32 17, label %sw.bb11
i32 19, label %sw.bb12
i32 20, label %sw.bb13
]
sw.bb: ; preds = %if.then
ret void
sw.bb2: ; preds = %if.then
tail call void @copy_definition()
br label %for.cond.backedge
sw.bb3: ; preds = %if.then
tail call void @parse_token_decl(i32 noundef 1, i32 noundef 2)
br label %for.cond.backedge
sw.bb4: ; preds = %if.then
tail call void @parse_token_decl(i32 noundef 2, i32 noundef 1)
br label %for.cond.backedge
sw.bb5: ; preds = %if.then
tail call void @parse_type_decl()
br label %for.cond.backedge
sw.bb6: ; preds = %if.then
%0 = load i32, ptr @start_flag, align 4, !tbaa !5
%tobool.not.i = icmp eq i32 %0, 0
br i1 %tobool.not.i, label %if.end.i, label %if.then.i
if.then.i: ; preds = %sw.bb6
tail call void @fatal(ptr noundef nonnull @.str.14) #12
br label %if.end.i
if.end.i: ; preds = %if.then.i, %sw.bb6
store i32 1, ptr @start_flag, align 4, !tbaa !5
%call.i = tail call i32 @lex() #12
%cmp.not.i = icmp eq i32 %call.i, 1
br i1 %cmp.not.i, label %parse_start_decl.exit, label %if.then1.i
if.then1.i: ; preds = %if.end.i
tail call void @fatal(ptr noundef nonnull @.str.15) #12
br label %parse_start_decl.exit
parse_start_decl.exit: ; preds = %if.end.i, %if.then1.i
%1 = load ptr, ptr @symval, align 8, !tbaa !9
store ptr %1, ptr @startval, align 8, !tbaa !9
br label %for.cond.backedge
sw.bb7: ; preds = %if.then
tail call void @parse_union_decl()
br label %for.cond.backedge
sw.bb8: ; preds = %if.then
call void @llvm.lifetime.start.p0(i64 20, ptr nonnull %buffer.i) #12
br label %while.cond.i
while.cond.i: ; preds = %while.cond.i.backedge, %sw.bb8
%2 = load ptr, ptr @finput, align 8, !tbaa !9
%call2.i = tail call i32 @getc(ptr noundef %2)
switch i32 %call2.i, label %while.cond3.preheader.i [
i32 32, label %while.cond.i.backedge
i32 9, label %while.cond.i.backedge
]
while.cond.i.backedge: ; preds = %while.cond.i, %while.cond.i
br label %while.cond.i, !llvm.loop !14
while.cond3.preheader.i: ; preds = %while.cond.i
%3 = add i32 %call2.i, -48
%4 = icmp ult i32 %3, 10
br i1 %4, label %while.body6.i, label %parse_expect_decl.exit
while.body6.i: ; preds = %while.cond3.preheader.i, %if.end.i21
%count.019.i = phi i32 [ %count.1.i, %if.end.i21 ], [ 0, %while.cond3.preheader.i ]
%c.118.i = phi i32 [ %call8.i, %if.end.i21 ], [ %call2.i, %while.cond3.preheader.i ]
%cmp7.i = icmp slt i32 %count.019.i, 20
br i1 %cmp7.i, label %if.then.i20, label %if.end.i21
if.then.i20: ; preds = %while.body6.i
%conv.i = trunc i32 %c.118.i to i8
%inc.i = add nsw i32 %count.019.i, 1
%idxprom.i = sext i32 %count.019.i to i64
%arrayidx.i = getelementptr inbounds [20 x i8], ptr %buffer.i, i64 0, i64 %idxprom.i
store i8 %conv.i, ptr %arrayidx.i, align 1, !tbaa !16
br label %if.end.i21
if.end.i21: ; preds = %if.then.i20, %while.body6.i
%count.1.i = phi i32 [ %inc.i, %if.then.i20 ], [ %count.019.i, %while.body6.i ]
%5 = load ptr, ptr @finput, align 8, !tbaa !9
%call8.i = tail call i32 @getc(ptr noundef %5)
%6 = add i32 %call8.i, -48
%7 = icmp ult i32 %6, 10
br i1 %7, label %while.body6.i, label %parse_expect_decl.exit, !llvm.loop !17
parse_expect_decl.exit: ; preds = %if.end.i21, %while.cond3.preheader.i
%c.1.lcssa.i = phi i32 [ %call2.i, %while.cond3.preheader.i ], [ %call8.i, %if.end.i21 ]
%8 = load ptr, ptr @finput, align 8, !tbaa !9
%call10.i = tail call i32 @ungetc(i32 noundef %c.1.lcssa.i, ptr noundef %8)
%call.i.i = call i64 @strtol(ptr nocapture noundef nonnull %buffer.i, ptr noundef null, i32 noundef 10) #12
%conv.i.i = trunc i64 %call.i.i to i32
store i32 %conv.i.i, ptr @expected_conflicts, align 4, !tbaa !5
call void @llvm.lifetime.end.p0(i64 20, ptr nonnull %buffer.i) #12
br label %for.cond.backedge
sw.bb9: ; preds = %if.then
tail call void @parse_assoc_decl(i32 noundef 2)
br label %for.cond.backedge
sw.bb10: ; preds = %if.then
tail call void @parse_assoc_decl(i32 noundef 1)
br label %for.cond.backedge
sw.bb11: ; preds = %if.then
tail call void @parse_assoc_decl(i32 noundef 3)
br label %for.cond.backedge
sw.bb12: ; preds = %if.then
store i32 1, ptr @semantic_parser, align 4, !tbaa !5
tail call void @open_extra_files() #12
br label %for.cond.backedge
sw.bb13: ; preds = %if.then
store i32 1, ptr @pure_parser, align 4, !tbaa !5
br label %for.cond.backedge
sw.default: ; preds = %if.then
tail call void @fatal(ptr noundef nonnull @.str.4) #12
br label %for.cond.backedge
if.then15: ; preds = %for.cond
tail call void @fatal(ptr noundef nonnull @.str.5) #12
br label %for.cond.backedge
for.cond.backedge: ; preds = %if.then15, %if.else16, %sw.bb2, %sw.bb3, %sw.bb4, %sw.bb5, %parse_start_decl.exit, %sw.bb7, %parse_expect_decl.exit, %sw.bb9, %sw.bb10, %sw.bb11, %sw.bb12, %sw.bb13, %sw.default
br label %for.cond
if.else16: ; preds = %for.cond
tail call void @fatals(ptr noundef nonnull @.str.6, i32 noundef %call, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef 0) #12
br label %for.cond.backedge
}
; Function Attrs: nofree nounwind uwtable
define dso_local void @output_ltype() local_unnamed_addr #3 {
entry:
%0 = load ptr, ptr @fattrs, align 8, !tbaa !9
%1 = tail call i64 @fwrite(ptr nonnull @.str.26, i64 188, i64 1, ptr %0)
%2 = load ptr, ptr @fdefines, align 8, !tbaa !9
%tobool.not = icmp eq ptr %2, null
br i1 %tobool.not, label %if.end, label %if.then
if.then: ; preds = %entry
%3 = tail call i64 @fwrite(ptr nonnull @.str.26, i64 188, i64 1, ptr nonnull %2)
br label %if.end
if.end: ; preds = %if.then, %entry
%4 = load ptr, ptr @fattrs, align 8, !tbaa !9
%5 = tail call i64 @fwrite(ptr nonnull @.str.27, i64 31, i64 1, ptr %4)
%6 = load ptr, ptr @fattrs, align 8, !tbaa !9
%7 = tail call i64 @fwrite(ptr nonnull @.str.28, i64 29, i64 1, ptr %6)
%8 = load ptr, ptr @fattrs, align 8, !tbaa !9
%9 = tail call i64 @fwrite(ptr nonnull @.str.29, i64 30, i64 1, ptr %8)
%10 = load ptr, ptr @fattrs, align 8, !tbaa !9
%11 = tail call i64 @fwrite(ptr nonnull @.str.30, i64 49, i64 1, ptr %10)
%12 = load ptr, ptr @fattrs, align 8, !tbaa !9
%13 = tail call i64 @fwrite(ptr nonnull @.str.31, i64 51, i64 1, ptr %12)
%14 = load ptr, ptr @fattrs, align 8, !tbaa !9
%15 = tail call i64 @fwrite(ptr nonnull @.str.32, i64 51, i64 1, ptr %14)
%16 = load ptr, ptr @fattrs, align 8, !tbaa !9
%17 = tail call i64 @fwrite(ptr nonnull @.str.33, i64 50, i64 1, ptr %16)
%18 = load ptr, ptr @fdefines, align 8, !tbaa !9
%tobool9.not = icmp eq ptr %18, null
br i1 %tobool9.not, label %if.end18, label %if.then10
if.then10: ; preds = %if.end
%19 = tail call i64 @fwrite(ptr nonnull @.str.27, i64 31, i64 1, ptr nonnull %18)
%20 = load ptr, ptr @fdefines, align 8, !tbaa !9
%21 = tail call i64 @fwrite(ptr nonnull @.str.28, i64 29, i64 1, ptr %20)
%22 = load ptr, ptr @fdefines, align 8, !tbaa !9
%23 = tail call i64 @fwrite(ptr nonnull @.str.29, i64 30, i64 1, ptr %22)
%24 = load ptr, ptr @fdefines, align 8, !tbaa !9
%25 = tail call i64 @fwrite(ptr nonnull @.str.30, i64 49, i64 1, ptr %24)
%26 = load ptr, ptr @fdefines, align 8, !tbaa !9
%27 = tail call i64 @fwrite(ptr nonnull @.str.31, i64 51, i64 1, ptr %26)
%28 = load ptr, ptr @fdefines, align 8, !tbaa !9
%29 = tail call i64 @fwrite(ptr nonnull @.str.32, i64 51, i64 1, ptr %28)
%30 = load ptr, ptr @fdefines, align 8, !tbaa !9
%31 = tail call i64 @fwrite(ptr nonnull @.str.33, i64 50, i64 1, ptr %30)
br label %if.end18
if.end18: ; preds = %if.then10, %if.end
ret void
}
declare void @output_headers() local_unnamed_addr #1
; Function Attrs: nounwind uwtable
define dso_local void @readgram() local_unnamed_addr #0 {
entry:
%buffer.i = alloca [20 x i8], align 16
%call = tail call i32 @lex() #12
br label %while.cond
while.cond: ; preds = %while.cond.backedge, %entry
%p1.0 = phi ptr [ null, %entry ], [ %p1.0.be, %while.cond.backedge ]
%lhs.0 = phi ptr [ undef, %entry ], [ %lhs.0.be, %while.cond.backedge ]
%t.0 = phi i32 [ %call, %entry ], [ %t.0.be, %while.cond.backedge ]
switch i32 %t.0, label %if.else179 [
i32 7, label %while.end
i32 0, label %while.end
i32 1, label %if.then5
i32 5, label %if.end9.thread373
i32 9, label %if.then152
i32 10, label %if.then157
i32 12, label %if.then162
i32 13, label %if.then167
i32 23, label %if.then172
i32 14, label %if.then177
]
if.then5: ; preds = %while.cond
%0 = load ptr, ptr @symval, align 8, !tbaa !9
%call6 = tail call i32 @lex() #12
%cmp7.not = icmp eq i32 %call6, 3
br i1 %cmp7.not, label %if.end9.thread, label %if.end9
if.end9: ; preds = %if.then5
tail call void @fatal(ptr noundef nonnull @.str.50) #12
%1 = load i32, ptr @nrules, align 4, !tbaa !5
%cmp10 = icmp eq i32 %1, 0
br i1 %cmp10, label %if.then11, label %if.end17
if.end9.thread373: ; preds = %while.cond
%2 = load i32, ptr @nrules, align 4, !tbaa !5
%cmp10376 = icmp eq i32 %2, 0
br i1 %cmp10376, label %if.then13, label %if.end17
if.end9.thread: ; preds = %if.then5
%3 = load i32, ptr @nrules, align 4, !tbaa !5
%cmp10324 = icmp eq i32 %3, 0
br i1 %cmp10324, label %if.end14, label %if.end17
if.then11: ; preds = %if.end9
%cmp12 = icmp eq i32 %call6, 5
br i1 %cmp12, label %if.then13, label %if.end14
if.then13: ; preds = %if.end9.thread373, %if.then11
%lhs.1377382 = phi ptr [ %0, %if.then11 ], [ %lhs.0, %if.end9.thread373 ]
tail call void @fatal(ptr noundef nonnull @.str.51) #12
br label %if.end14
if.end14: ; preds = %if.end9.thread, %if.then13, %if.then11
%lhs.1326331 = phi ptr [ %lhs.1377382, %if.then13 ], [ %0, %if.then11 ], [ %0, %if.end9.thread ]
%4 = load i32, ptr @start_flag, align 4, !tbaa !5
%tobool.not = icmp eq i32 %4, 0
br i1 %tobool.not, label %if.then15, label %if.end17
if.then15: ; preds = %if.end14
store ptr %lhs.1326331, ptr @startval, align 8, !tbaa !9
br label %if.end17
if.end17: ; preds = %if.end9.thread373, %if.end9.thread, %if.end14, %if.then15, %if.end9
%lhs.1325 = phi ptr [ %0, %if.end9.thread ], [ %lhs.1326331, %if.end14 ], [ %lhs.1326331, %if.then15 ], [ %0, %if.end9 ], [ %lhs.0, %if.end9.thread373 ]
%5 = load i32, ptr @nrules, align 4, !tbaa !5
%inc = add nsw i32 %5, 1
store i32 %inc, ptr @nrules, align 4, !tbaa !5
%6 = load i32, ptr @nitems, align 4, !tbaa !5
%inc18 = add nsw i32 %6, 1
store i32 %inc18, ptr @nitems, align 4, !tbaa !5
%7 = load i32, ptr @rline_allocated, align 4, !tbaa !5
%cmp.not.i = icmp slt i32 %inc, %7
br i1 %cmp.not.i, label %record_rule_line.exit, label %if.then.i
if.then.i: ; preds = %if.end17
%mul.i = shl nsw i32 %inc, 1
store i32 %mul.i, ptr @rline_allocated, align 4, !tbaa !5
%8 = load ptr, ptr @rline, align 8, !tbaa !9
%conv.i = sext i32 %mul.i to i64
%mul1.i = shl nsw i64 %conv.i, 1
%call.i = tail call ptr @realloc(ptr noundef %8, i64 noundef %mul1.i) #14
store ptr %call.i, ptr @rline, align 8, !tbaa !9
%cmp2.i = icmp eq ptr %call.i, null
br i1 %cmp2.i, label %if.then4.i, label %record_rule_line.exit
if.then4.i: ; preds = %if.then.i
%9 = load ptr, ptr @stderr, align 8, !tbaa !9
%10 = tail call i64 @fwrite(ptr nonnull @.str.60, i64 24, i64 1, ptr %9) #15
tail call void @done(i32 noundef 1) #12
br label %record_rule_line.exit
record_rule_line.exit: ; preds = %if.end17, %if.then.i, %if.then4.i
%11 = load i32, ptr @lineno, align 4, !tbaa !5
%conv7.i = trunc i32 %11 to i16
%12 = load ptr, ptr @rline, align 8, !tbaa !9
%13 = load i32, ptr @nrules, align 4, !tbaa !5
%idxprom.i = sext i32 %13 to i64
%arrayidx.i = getelementptr inbounds i16, ptr %12, i64 %idxprom.i
store i16 %conv7.i, ptr %arrayidx.i, align 2, !tbaa !18
%call19 = tail call ptr (i32, ...) @mallocate(i32 noundef 24) #12
%sym = getelementptr inbounds %struct.symbol_list, ptr %call19, i64 0, i32 1
store ptr %lhs.1325, ptr %sym, align 8, !tbaa !19
%tobool20.not = icmp eq ptr %p1.0, null
%grammar.p1.0 = select i1 %tobool20.not, ptr @grammar, ptr %p1.0
store ptr %call19, ptr %grammar.p1.0, align 8, !tbaa !9
%class = getelementptr inbounds %struct.bucket, ptr %lhs.1325, i64 0, i32 8
%14 = load i8, ptr %class, align 8, !tbaa !11
switch i8 %14, label %for.cond.preheader [
i8 0, label %if.then25
i8 1, label %if.then34
]
if.then25: ; preds = %record_rule_line.exit
store i8 2, ptr %class, align 8, !tbaa !11
%15 = load i32, ptr @nvars, align 4, !tbaa !5
%conv27 = trunc i32 %15 to i16
%value = getelementptr inbounds %struct.bucket, ptr %lhs.1325, i64 0, i32 4
store i16 %conv27, ptr %value, align 8, !tbaa !21
%inc28 = add nsw i32 %15, 1
store i32 %inc28, ptr @nvars, align 4, !tbaa !5
br label %for.cond.preheader
if.then34: ; preds = %record_rule_line.exit
%tag = getelementptr inbounds %struct.bucket, ptr %lhs.1325, i64 0, i32 2
%16 = load ptr, ptr %tag, align 8, !tbaa !22
%17 = ptrtoint ptr %16 to i64
%18 = trunc i64 %17 to i32
tail call void @fatals(ptr noundef nonnull @.str.52, i32 noundef %18, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef 0) #12
br label %for.cond.preheader
for.cond.preheader: ; preds = %record_rule_line.exit, %if.then34, %if.then25
br label %for.cond
for.cond: ; preds = %for.cond.preheader, %if.end83
%p1.1 = phi ptr [ %p1.4, %if.end83 ], [ %call19, %for.cond.preheader ]
%crule1.0 = phi ptr [ %crule1.3, %if.end83 ], [ %p1.0, %for.cond.preheader ]
%actionflag.0 = phi i32 [ %actionflag.3, %if.end83 ], [ 0, %for.cond.preheader ]
%rulelength.0 = phi i32 [ %inc84, %if.end83 ], [ 0, %for.cond.preheader ]
%xactions.0 = phi i32 [ %xactions.1, %if.end83 ], [ 0, %for.cond.preheader ]
%first_rhs.0 = phi ptr [ %first_rhs.3, %if.end83 ], [ null, %for.cond.preheader ]
%call37 = tail call i32 @lex() #12
switch i32 %call37, label %for.end [
i32 1, label %if.then47
i32 6, label %if.else81
]
if.then47: ; preds = %for.cond
%19 = load ptr, ptr @symval, align 8, !tbaa !9
%call48 = tail call i32 @lex() #12
tail call void @unlex(i32 noundef %call48) #12
store ptr %19, ptr @symval, align 8, !tbaa !9
%cmp49 = icmp eq i32 %call48, 3
br i1 %cmp49, label %if.end92.thread, label %if.end52
if.end92.thread: ; preds = %if.then47
%call85341 = tail call ptr (i32, ...) @mallocate(i32 noundef 24) #12
store ptr %call85341, ptr %p1.1, align 8, !tbaa !23
br label %if.else108
if.end52: ; preds = %if.then47
%tobool53.not = icmp eq ptr %first_rhs.0, null
%spec.select = select i1 %tobool53.not, ptr %19, ptr %first_rhs.0
%tobool56.not = icmp eq i32 %actionflag.0, 0
br i1 %tobool56.not, label %cleanup.thread, label %if.then57
if.then57: ; preds = %if.end52
%20 = load i32, ptr @gensym_count, align 4, !tbaa !5
%inc.i = add nsw i32 %20, 1
store i32 %inc.i, ptr @gensym_count, align 4, !tbaa !5
%call.i298 = tail call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) @token_buffer, ptr noundef nonnull dereferenceable(1) @.str.49, i32 noundef %inc.i) #12
%call1.i = tail call ptr (ptr, ...) @getsym(ptr noundef nonnull @token_buffer) #12
%class.i = getelementptr inbounds %struct.bucket, ptr %call1.i, i64 0, i32 8
store i8 2, ptr %class.i, align 8, !tbaa !11
%21 = load i32, ptr @nvars, align 4, !tbaa !5
%inc2.i = add nsw i32 %21, 1
store i32 %inc2.i, ptr @nvars, align 4, !tbaa !5
%conv.i299 = trunc i32 %21 to i16
%value.i = getelementptr inbounds %struct.bucket, ptr %call1.i, i64 0, i32 4
store i16 %conv.i299, ptr %value.i, align 8, !tbaa !21
%22 = load i32, ptr @nrules, align 4, !tbaa !5
%inc59 = add nsw i32 %22, 1
store i32 %inc59, ptr @nrules, align 4, !tbaa !5
%23 = load i32, ptr @nitems, align 4, !tbaa !5
%inc60 = add nsw i32 %23, 1
store i32 %inc60, ptr @nitems, align 4, !tbaa !5
%24 = load i32, ptr @rline_allocated, align 4, !tbaa !5
%cmp.not.i300 = icmp slt i32 %inc59, %24
br i1 %cmp.not.i300, label %record_rule_line.exit311, label %if.then.i306
if.then.i306: ; preds = %if.then57
%mul.i301 = shl nsw i32 %inc59, 1
store i32 %mul.i301, ptr @rline_allocated, align 4, !tbaa !5
%25 = load ptr, ptr @rline, align 8, !tbaa !9
%conv.i302 = sext i32 %mul.i301 to i64
%mul1.i303 = shl nsw i64 %conv.i302, 1
%call.i304 = tail call ptr @realloc(ptr noundef %25, i64 noundef %mul1.i303) #14
store ptr %call.i304, ptr @rline, align 8, !tbaa !9
%cmp2.i305 = icmp eq ptr %call.i304, null
br i1 %cmp2.i305, label %if.then4.i307, label %record_rule_line.exit311
if.then4.i307: ; preds = %if.then.i306
%26 = load ptr, ptr @stderr, align 8, !tbaa !9
%27 = tail call i64 @fwrite(ptr nonnull @.str.60, i64 24, i64 1, ptr %26) #15
tail call void @done(i32 noundef 1) #12
br label %record_rule_line.exit311
record_rule_line.exit311: ; preds = %if.then57, %if.then.i306, %if.then4.i307
%28 = load i32, ptr @lineno, align 4, !tbaa !5
%conv7.i308 = trunc i32 %28 to i16
%29 = load ptr, ptr @rline, align 8, !tbaa !9
%30 = load i32, ptr @nrules, align 4, !tbaa !5
%idxprom.i309 = sext i32 %30 to i64
%arrayidx.i310 = getelementptr inbounds i16, ptr %29, i64 %idxprom.i309
store i16 %conv7.i308, ptr %arrayidx.i310, align 2, !tbaa !18
%call61 = tail call ptr (i32, ...) @mallocate(i32 noundef 24) #12
%tobool62.not = icmp eq ptr %crule1.0, null
%grammar.crule1.0 = select i1 %tobool62.not, ptr @grammar, ptr %crule1.0
store ptr %call61, ptr %grammar.crule1.0, align 8, !tbaa !9
%sym67 = getelementptr inbounds %struct.symbol_list, ptr %call61, i64 0, i32 1
store ptr %call1.i, ptr %sym67, align 8, !tbaa !19
%call68 = tail call ptr (i32, ...) @mallocate(i32 noundef 24) #12
store ptr %call68, ptr %call61, align 8, !tbaa !23
store ptr %call19, ptr %call68, align 8, !tbaa !23
%31 = load i32, ptr @nitems, align 4, !tbaa !5
%inc71 = add nsw i32 %31, 1
store i32 %inc71, ptr @nitems, align 4, !tbaa !5
%call72 = tail call ptr (i32, ...) @mallocate(i32 noundef 24) #12
%sym73 = getelementptr inbounds %struct.symbol_list, ptr %call72, i64 0, i32 1
store ptr %call1.i, ptr %sym73, align 8, !tbaa !19
store ptr %call72, ptr %p1.1, align 8, !tbaa !23
br label %cleanup.thread
cleanup.thread: ; preds = %if.end52, %record_rule_line.exit311
%p1.2 = phi ptr [ %call72, %record_rule_line.exit311 ], [ %p1.1, %if.end52 ]
%crule1.1 = phi ptr [ %call68, %record_rule_line.exit311 ], [ %crule1.0, %if.end52 ]
%32 = load i32, ptr @nitems, align 4, !tbaa !5
%inc76 = add nsw i32 %32, 1
store i32 %inc76, ptr @nitems, align 4, !tbaa !5
%call77 = tail call ptr (i32, ...) @mallocate(i32 noundef 24) #12
%33 = load ptr, ptr @symval, align 8, !tbaa !9
%sym78 = getelementptr inbounds %struct.symbol_list, ptr %call77, i64 0, i32 1
store ptr %33, ptr %sym78, align 8, !tbaa !19
store ptr %call77, ptr %p1.2, align 8, !tbaa !23
br label %if.end83
if.else81: ; preds = %for.cond
tail call void @copy_action(ptr noundef %call19, i32 noundef %rulelength.0)
%inc82 = add nsw i32 %xactions.0, 1
br label %if.end83
if.end83: ; preds = %cleanup.thread, %if.else81
%p1.4 = phi ptr [ %p1.1, %if.else81 ], [ %call77, %cleanup.thread ]
%crule1.3 = phi ptr [ %crule1.0, %if.else81 ], [ %crule1.1, %cleanup.thread ]
%actionflag.3 = phi i32 [ 1, %if.else81 ], [ 0, %cleanup.thread ]
%xactions.1 = phi i32 [ %inc82, %if.else81 ], [ %xactions.0, %cleanup.thread ]
%first_rhs.3 = phi ptr [ %first_rhs.0, %if.else81 ], [ %spec.select, %cleanup.thread ]
%inc84 = add nuw nsw i32 %rulelength.0, 1
br label %for.cond
for.end: ; preds = %for.cond
%call85 = tail call ptr (i32, ...) @mallocate(i32 noundef 24) #12
store ptr %call85, ptr %p1.1, align 8, !tbaa !23
%cmp87 = icmp eq i32 %call37, 18
br i1 %cmp87, label %if.then89, label %if.end92
if.then89: ; preds = %for.end
%call90 = tail call i32 @lex() #12
%34 = load ptr, ptr @symval, align 8, !tbaa !9
%ruleprec = getelementptr inbounds %struct.symbol_list, ptr %call19, i64 0, i32 2
store ptr %34, ptr %ruleprec, align 8, !tbaa !24
%call91 = tail call i32 @lex() #12
br label %if.end92
if.end92: ; preds = %if.then89, %for.end
%t.2 = phi i32 [ %call91, %if.then89 ], [ %call37, %for.end ]
switch i32 %t.2, label %if.else108 [
i32 11, label %if.then95
i32 6, label %if.then103
]
if.then95: ; preds = %if.end92
%35 = load i32, ptr @semantic_parser, align 4, !tbaa !5
%tobool96.not = icmp eq i32 %35, 0
br i1 %tobool96.not, label %if.then97, label %if.end98
if.then97: ; preds = %if.then95
tail call void @fatal(ptr noundef nonnull @.str.53) #12
br label %if.end98
if.end98: ; preds = %if.then97, %if.then95
tail call void @copy_guard(ptr noundef %call19, i32 noundef %rulelength.0)
%call99 = tail call i32 @lex() #12
br label %if.end143
if.then103: ; preds = %if.end92
%tobool104.not = icmp eq i32 %actionflag.0, 0
br i1 %tobool104.not, label %if.end106, label %if.then105
if.then105: ; preds = %if.then103
tail call void @fatal(ptr noundef nonnull @.str.54) #12
br label %if.end106
if.end106: ; preds = %if.then105, %if.then103
tail call void @copy_action(ptr noundef %call19, i32 noundef %rulelength.0)
%call107 = tail call i32 @lex() #12
br label %if.end143
if.else108: ; preds = %if.end92.thread, %if.end92
%t.2353 = phi i32 [ 1, %if.end92.thread ], [ %t.2, %if.end92 ]
%call85345351 = phi ptr [ %call85341, %if.end92.thread ], [ %call85, %if.end92 ]
%tobool109 = icmp eq i32 %xactions.0, 0
%tobool110 = icmp ne ptr %first_rhs.0, null
%or.cond217 = select i1 %tobool109, i1 %tobool110, i1 false
br i1 %or.cond217, label %land.lhs.true111, label %if.end143
land.lhs.true111: ; preds = %if.else108
%type_name = getelementptr inbounds %struct.bucket, ptr %lhs.1325, i64 0, i32 3
%36 = load ptr, ptr %type_name, align 8, !tbaa !25
%type_name112 = getelementptr inbounds %struct.bucket, ptr %first_rhs.0, i64 0, i32 3
%37 = load ptr, ptr %type_name112, align 8, !tbaa !25
%cmp113.not = icmp eq ptr %36, %37
br i1 %cmp113.not, label %if.end143, label %if.then115
if.then115: ; preds = %land.lhs.true111
%cmp117 = icmp eq ptr %36, null
%cmp121 = icmp eq ptr %37, null
%or.cond = or i1 %cmp117, %cmp121
br i1 %or.cond, label %if.then128, label %lor.lhs.false123
lor.lhs.false123: ; preds = %if.then115
%call126 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %36, ptr noundef nonnull dereferenceable(1) %37) #13
%tobool127.not = icmp eq i32 %call126, 0
br i1 %tobool127.not, label %if.end143, label %if.then128
if.then128: ; preds = %lor.lhs.false123, %if.then115
%38 = load ptr, ptr @stderr, align 8, !tbaa !9
%39 = load ptr, ptr @infile, align 8, !tbaa !9
%40 = load i32, ptr @lineno, align 4, !tbaa !5
%spec.select321 = select i1 %cmp117, ptr @.str.56, ptr %36
%cond138 = select i1 %cmp121, ptr @.str.56, ptr %37
%call139 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %38, ptr noundef nonnull @.str.55, ptr noundef %39, i32 noundef %40, ptr noundef nonnull %spec.select321, ptr noundef nonnull %cond138) #15
br label %if.end143
if.end143: ; preds = %if.end106, %lor.lhs.false123, %if.then128, %land.lhs.true111, %if.else108, %if.end98
%call85345350 = phi ptr [ %call85, %if.end98 ], [ %call85, %if.end106 ], [ %call85345351, %if.then128 ], [ %call85345351, %lor.lhs.false123 ], [ %call85345351, %land.lhs.true111 ], [ %call85345351, %if.else108 ]
%t.3 = phi i32 [ %call99, %if.end98 ], [ %call107, %if.end106 ], [ %t.2353, %if.then128 ], [ %t.2353, %lor.lhs.false123 ], [ %t.2353, %land.lhs.true111 ], [ %t.2353, %if.else108 ]
%cmp144 = icmp eq i32 %t.3, 4
br i1 %cmp144, label %if.then146, label %while.cond.backedge
while.cond.backedge: ; preds = %if.end143, %if.then146, %if.then152, %if.then162, %parse_expect_decl.exit, %if.else179, %parse_start_decl.exit, %if.then167, %if.then157
%p1.0.be = phi ptr [ %p1.0, %if.then152 ], [ %p1.0, %if.then157 ], [ %p1.0, %if.then162 ], [ %p1.0, %if.then167 ], [ %p1.0, %parse_expect_decl.exit ], [ %p1.0, %parse_start_decl.exit ], [ %p1.0, %if.else179 ], [ %call85345350, %if.then146 ], [ %call85345350, %if.end143 ]
%lhs.0.be = phi ptr [ %lhs.0, %if.then152 ], [ %lhs.0, %if.then157 ], [ %lhs.0, %if.then162 ], [ %lhs.0, %if.then167 ], [ %lhs.0, %parse_expect_decl.exit ], [ %lhs.0, %parse_start_decl.exit ], [ %lhs.0, %if.else179 ], [ %lhs.1325, %if.then146 ], [ %lhs.1325, %if.end143 ]
%t.0.be = phi i32 [ %call153, %if.then152 ], [ %call158, %if.then157 ], [ %call163, %if.then162 ], [ %call168, %if.then167 ], [ %call173, %parse_expect_decl.exit ], [ %call178, %parse_start_decl.exit ], [ %t.0, %if.else179 ], [ %call147, %if.then146 ], [ %t.3, %if.end143 ]
br label %while.cond, !llvm.loop !26
if.then146: ; preds = %if.end143
%call147 = tail call i32 @lex() #12
br label %while.cond.backedge
if.then152: ; preds = %while.cond
tail call void @parse_token_decl(i32 noundef 1, i32 noundef 2)
%call153 = tail call i32 @lex() #12
br label %while.cond.backedge
if.then157: ; preds = %while.cond
tail call void @parse_token_decl(i32 noundef 2, i32 noundef 1)
%call158 = tail call i32 @lex() #12
br label %while.cond.backedge
if.then162: ; preds = %while.cond
%call163 = tail call i32 @get_type()
br label %while.cond.backedge
if.then167: ; preds = %while.cond
tail call void @parse_union_decl()
%call168 = tail call i32 @lex() #12
br label %while.cond.backedge
if.then172: ; preds = %while.cond
call void @llvm.lifetime.start.p0(i64 20, ptr nonnull %buffer.i) #12
br label %while.cond.i
while.cond.i: ; preds = %while.cond.i.backedge, %if.then172
%41 = load ptr, ptr @finput, align 8, !tbaa !9
%call2.i = tail call i32 @getc(ptr noundef %41)
switch i32 %call2.i, label %while.cond3.preheader.i [
i32 32, label %while.cond.i.backedge
i32 9, label %while.cond.i.backedge
]
while.cond.i.backedge: ; preds = %while.cond.i, %while.cond.i
br label %while.cond.i, !llvm.loop !14
while.cond3.preheader.i: ; preds = %while.cond.i
%42 = add i32 %call2.i, -48
%43 = icmp ult i32 %42, 10
br i1 %43, label %while.body6.i, label %parse_expect_decl.exit
while.body6.i: ; preds = %while.cond3.preheader.i, %if.end.i
%count.019.i = phi i32 [ %count.1.i, %if.end.i ], [ 0, %while.cond3.preheader.i ]
%c.118.i = phi i32 [ %call8.i, %if.end.i ], [ %call2.i, %while.cond3.preheader.i ]
%cmp7.i = icmp slt i32 %count.019.i, 20
br i1 %cmp7.i, label %if.then.i316, label %if.end.i
if.then.i316: ; preds = %while.body6.i
%conv.i312 = trunc i32 %c.118.i to i8
%inc.i313 = add nsw i32 %count.019.i, 1
%idxprom.i314 = sext i32 %count.019.i to i64
%arrayidx.i315 = getelementptr inbounds [20 x i8], ptr %buffer.i, i64 0, i64 %idxprom.i314
store i8 %conv.i312, ptr %arrayidx.i315, align 1, !tbaa !16
br label %if.end.i
if.end.i: ; preds = %if.then.i316, %while.body6.i
%count.1.i = phi i32 [ %inc.i313, %if.then.i316 ], [ %count.019.i, %while.body6.i ]
%44 = load ptr, ptr @finput, align 8, !tbaa !9
%call8.i = tail call i32 @getc(ptr noundef %44)
%45 = add i32 %call8.i, -48
%46 = icmp ult i32 %45, 10
br i1 %46, label %while.body6.i, label %parse_expect_decl.exit, !llvm.loop !17
parse_expect_decl.exit: ; preds = %if.end.i, %while.cond3.preheader.i
%c.1.lcssa.i = phi i32 [ %call2.i, %while.cond3.preheader.i ], [ %call8.i, %if.end.i ]
%47 = load ptr, ptr @finput, align 8, !tbaa !9
%call10.i = tail call i32 @ungetc(i32 noundef %c.1.lcssa.i, ptr noundef %47)
%call.i.i = call i64 @strtol(ptr nocapture noundef nonnull %buffer.i, ptr noundef null, i32 noundef 10) #12
%conv.i.i = trunc i64 %call.i.i to i32
store i32 %conv.i.i, ptr @expected_conflicts, align 4, !tbaa !5
call void @llvm.lifetime.end.p0(i64 20, ptr nonnull %buffer.i) #12
%call173 = tail call i32 @lex() #12
br label %while.cond.backedge
if.then177: ; preds = %while.cond
%48 = load i32, ptr @start_flag, align 4, !tbaa !5
%tobool.not.i = icmp eq i32 %48, 0
br i1 %tobool.not.i, label %if.end.i320, label %if.then.i317
if.then.i317: ; preds = %if.then177
tail call void @fatal(ptr noundef nonnull @.str.14) #12
br label %if.end.i320
if.end.i320: ; preds = %if.then.i317, %if.then177
store i32 1, ptr @start_flag, align 4, !tbaa !5
%call.i318 = tail call i32 @lex() #12
%cmp.not.i319 = icmp eq i32 %call.i318, 1
br i1 %cmp.not.i319, label %parse_start_decl.exit, label %if.then1.i
if.then1.i: ; preds = %if.end.i320
tail call void @fatal(ptr noundef nonnull @.str.15) #12
br label %parse_start_decl.exit
parse_start_decl.exit: ; preds = %if.end.i320, %if.then1.i
%49 = load ptr, ptr @symval, align 8, !tbaa !9
store ptr %49, ptr @startval, align 8, !tbaa !9
%call178 = tail call i32 @lex() #12
br label %while.cond.backedge
if.else179: ; preds = %while.cond
tail call void @fatal(ptr noundef nonnull @.str.57) #12
br label %while.cond.backedge
while.end: ; preds = %while.cond, %while.cond
%50 = load i32, ptr @nrules, align 4, !tbaa !5
%cmp187 = icmp eq i32 %50, 0
br i1 %cmp187, label %if.then189, label %if.end190
if.then189: ; preds = %while.end
tail call void @fatal(ptr noundef nonnull @.str.5) #12
br label %if.end190
if.end190: ; preds = %if.then189, %while.end
%.b = load i1, ptr @typed, align 4
br i1 %.b, label %if.end199, label %if.then193
if.then193: ; preds = %if.end190
%51 = load ptr, ptr @fattrs, align 8, !tbaa !9
%52 = tail call i64 @fwrite(ptr nonnull @.str.58, i64 43, i64 1, ptr %51)
%53 = load ptr, ptr @fdefines, align 8, !tbaa !9
%tobool195.not = icmp eq ptr %53, null
br i1 %tobool195.not, label %if.end199, label %if.then196
if.then196: ; preds = %if.then193
%54 = tail call i64 @fwrite(ptr nonnull @.str.58, i64 43, i64 1, ptr nonnull %53)
br label %if.end199
if.end199: ; preds = %if.then193, %if.then196, %if.end190
%bp.0362 = load ptr, ptr @firstsymbol, align 8, !tbaa !9
%tobool201.not363 = icmp eq ptr %bp.0362, null
br i1 %tobool201.not363, label %for.end215, label %for.body
for.body: ; preds = %if.end199, %for.inc
%bp.0364 = phi ptr [ %bp.0, %for.inc ], [ %bp.0362, %if.end199 ]
%class202 = getelementptr inbounds %struct.bucket, ptr %bp.0364, i64 0, i32 8
%55 = load i8, ptr %class202, align 8, !tbaa !11
%cmp204 = icmp eq i8 %55, 0
br i1 %cmp204, label %if.then206, label %for.inc
if.then206: ; preds = %for.body
%56 = load ptr, ptr @stderr, align 8, !tbaa !9
%tag207 = getelementptr inbounds %struct.bucket, ptr %bp.0364, i64 0, i32 2
%57 = load ptr, ptr %tag207, align 8, !tbaa !22
%call208 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %56, ptr noundef nonnull @.str.59, ptr noundef %57) #15
store i32 1, ptr @failure, align 4, !tbaa !5
store i8 2, ptr %class202, align 8, !tbaa !11
%58 = load i32, ptr @nvars, align 4, !tbaa !5
%inc210 = add nsw i32 %58, 1
store i32 %inc210, ptr @nvars, align 4, !tbaa !5
%conv211 = trunc i32 %58 to i16
%value212 = getelementptr inbounds %struct.bucket, ptr %bp.0364, i64 0, i32 4
store i16 %conv211, ptr %value212, align 8, !tbaa !21
br label %for.inc
for.inc: ; preds = %for.body, %if.then206
%next214 = getelementptr inbounds %struct.bucket, ptr %bp.0364, i64 0, i32 1
%bp.0 = load ptr, ptr %next214, align 8, !tbaa !9
%tobool201.not = icmp eq ptr %bp.0, null
br i1 %tobool201.not, label %for.end215, label %for.body, !llvm.loop !27
for.end215: ; preds = %for.inc, %if.end199
%59 = load i32, ptr @nsyms, align 4, !tbaa !5
%60 = load i32, ptr @nvars, align 4, !tbaa !5
%sub = sub nsw i32 %59, %60
store i32 %sub, ptr @ntokens, align 4, !tbaa !5
ret void
}
declare void @output_trailers() local_unnamed_addr #1
; Function Attrs: nounwind uwtable
define dso_local void @packsymbols() local_unnamed_addr #0 {
entry:
%0 = load i32, ptr @nsyms, align 4, !tbaa !5
%add = shl i32 %0, 3
%mul = add i32 %add, 8
%call = tail call ptr (i32, ...) @mallocate(i32 noundef %mul) #12
store ptr %call, ptr @tags, align 8, !tbaa !9
store ptr @.str.61, ptr %call, align 8, !tbaa !9
%1 = load i32, ptr @nsyms, align 4, !tbaa !5
%mul3 = shl i32 %1, 1
%call5 = tail call ptr (i32, ...) @mallocate(i32 noundef %mul3) #12
store ptr %call5, ptr @sprec, align 8, !tbaa !9
%2 = load i32, ptr @nsyms, align 4, !tbaa !5
%mul7 = shl i32 %2, 1
%call9 = tail call ptr (i32, ...) @mallocate(i32 noundef %mul7) #12
store ptr %call9, ptr @sassoc, align 8, !tbaa !9
store i32 255, ptr @max_user_token_number, align 4, !tbaa !5
%bp.0169 = load ptr, ptr @firstsymbol, align 8, !tbaa !9
%tobool.not170 = icmp eq ptr %bp.0169, null
br i1 %tobool.not170, label %for.end, label %for.body.lr.ph
for.body.lr.ph: ; preds = %entry
%3 = load i32, ptr @translations, align 4
%tobool15.not = icmp ne i32 %3, 0
%4 = load i32, ptr @ntokens, align 4
%5 = trunc i32 %4 to i16
br label %for.body
for.body: ; preds = %for.body.lr.ph, %if.end31
%bp.0174 = phi ptr [ %bp.0169, %for.body.lr.ph ], [ %bp.0, %if.end31 ]
%last_user_token_number.0173 = phi i16 [ 255, %for.body.lr.ph ], [ %last_user_token_number.2, %if.end31 ]
%tokno.0172 = phi i16 [ 1, %for.body.lr.ph ], [ %tokno.1, %if.end31 ]
%conv21168171 = phi i32 [ 255, %for.body.lr.ph ], [ %conv21166, %if.end31 ]
%class = getelementptr inbounds %struct.bucket, ptr %bp.0174, i64 0, i32 8
%6 = load i8, ptr %class, align 8, !tbaa !11
%cmp = icmp eq i8 %6, 2
br i1 %cmp, label %if.then, label %if.else
if.then: ; preds = %for.body
%value = getelementptr inbounds %struct.bucket, ptr %bp.0174, i64 0, i32 4
%7 = load i16, ptr %value, align 8, !tbaa !21
%conv14 = add i16 %7, %5
store i16 %conv14, ptr %value, align 8, !tbaa !21
br label %if.end31
if.else: ; preds = %for.body
%user_token_number20.phi.trans.insert = getelementptr inbounds %struct.bucket, ptr %bp.0174, i64 0, i32 7
%.pre = load i16, ptr %user_token_number20.phi.trans.insert, align 2, !tbaa !28
%tobool16.not = icmp eq i16 %.pre, 0
%or.cond200 = select i1 %tobool15.not, i1 %tobool16.not, i1 false
br i1 %or.cond200, label %if.then17, label %if.end
if.then17: ; preds = %if.else
%inc = add i16 %last_user_token_number.0173, 1
store i16 %inc, ptr %user_token_number20.phi.trans.insert, align 2, !tbaa !28
br label %if.end