; LLVM IR from marcobambini/gravity :: src/compiler (gravity_lexer)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.gravity_lexer_t = type { ptr, i32, i32, i32, i32, i32, i32, %struct.gtoken_s, i8, i8, ptr, i32 }
%struct.gtoken_s = type { i32, i32, i32, i32, i32, i32, i32, i32, ptr }
%struct.gravity_delegate_t = type { ptr, i8, i8, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }

@.str = external hidden unnamed_addr constant [19 x i8], align 1

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: nounwind uwtable
define dso_local i32 @gravity_lexer_next(ptr noundef %0) #1 {
  %2 = alloca i32, align 4
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #3
  %7 = load ptr, ptr %3, align 8, !tbaa !5
  %8 = getelementptr inbounds %struct.gravity_lexer_t, ptr %7, i32 0, i32 8
  %9 = load i8, ptr %8, align 8, !tbaa !9, !range !14, !noundef !15
  %10 = trunc i8 %9 to i1
  br i1 %10, label %14, label %11

11:                                               ; preds = %1
  %12 = load ptr, ptr %3, align 8, !tbaa !5
  %13 = getelementptr inbounds %struct.gravity_lexer_t, ptr %12, i32 0, i32 11
  store i32 91, ptr %13, align 8, !tbaa !16
  br label %14

14:                                               ; preds = %11, %1
  br label %15

15:                                               ; preds = %98, %54, %37, %14
  %16 = load ptr, ptr %3, align 8, !tbaa !5
  %17 = getelementptr inbounds %struct.gravity_lexer_t, ptr %16, i32 0, i32 1
  %18 = load i32, ptr %17, align 8, !tbaa !17
  %19 = load ptr, ptr %3, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct.gravity_lexer_t, ptr %19, i32 0, i32 3
  %21 = load i32, ptr %20, align 8, !tbaa !18
  %22 = icmp uge i32 %18, %21
  br i1 %22, label %23, label %24

23:                                               ; preds = %15
  store i32 0, ptr %2, align 4
  store i32 1, ptr %6, align 4
  br label %178

24:                                               ; preds = %15
  %25 = load ptr, ptr %3, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.gravity_lexer_t, ptr %25, i32 0, i32 0
  %27 = load ptr, ptr %26, align 8, !tbaa !19
  %28 = load ptr, ptr %3, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.gravity_lexer_t, ptr %28, i32 0, i32 1
  %30 = load i32, ptr %29, align 8, !tbaa !17
  %31 = zext i32 %30 to i64
  %32 = getelementptr inbounds i8, ptr %27, i64 %31
  %33 = load i8, ptr %32, align 1, !tbaa !20
  %34 = sext i8 %33 to i32
  store i32 %34, ptr %4, align 4, !tbaa !21
  %35 = load i32, ptr %4, align 4, !tbaa !21
  %36 = call zeroext i1 @is_whitespace(i32 noundef %35)
  br i1 %36, label %37, label %50

37:                                               ; preds = %24
  %38 = load ptr, ptr %3, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.gravity_lexer_t, ptr %38, i32 0, i32 1
  %40 = load i32, ptr %39, align 8, !tbaa !17
  %41 = add i32 %40, 1
  store i32 %41, ptr %39, align 8, !tbaa !17
  %42 = load ptr, ptr %3, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.gravity_lexer_t, ptr %42, i32 0, i32 5
  %44 = load i32, ptr %43, align 8, !tbaa !22
  %45 = add i32 %44, 1
  store i32 %45, ptr %43, align 8, !tbaa !22
  %46 = load ptr, ptr %3, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.gravity_lexer_t, ptr %46, i32 0, i32 2
  %48 = load i32, ptr %47, align 4, !tbaa !23
  %49 = add i32 %48, 1
  store i32 %49, ptr %47, align 4, !tbaa !23
  br label %15

50:                                               ; preds = %24
  %51 = load ptr, ptr %3, align 8, !tbaa !5
  %52 = load i32, ptr %4, align 4, !tbaa !21
  %53 = call zeroext i1 @is_newline(ptr noundef %51, i32 noundef %52)
  br i1 %53, label %54, label %73

54:                                               ; preds = %50
  %55 = load ptr, ptr %3, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.gravity_lexer_t, ptr %55, i32 0, i32 1
  %57 = load i32, ptr %56, align 8, !tbaa !17
  %58 = add i32 %57, 1
  store i32 %58, ptr %56, align 8, !tbaa !17
  %59 = load ptr, ptr %3, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.gravity_lexer_t, ptr %59, i32 0, i32 5
  %61 = load i32, ptr %60, align 8, !tbaa !22
  %62 = add i32 %61, 1
  store i32 %62, ptr %60, align 8, !tbaa !22
  %63 = load ptr, ptr %3, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.gravity_lexer_t, ptr %63, i32 0, i32 2
  %65 = load i32, ptr %64, align 4, !tbaa !23
  %66 = add i32 %65, 1
  store i32 %66, ptr %64, align 4, !tbaa !23
  %67 = load ptr, ptr %3, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.gravity_lexer_t, ptr %67, i32 0, i32 4
  %69 = load i32, ptr %68, align 4, !tbaa !24
  %70 = add i32 %69, 1
  store i32 %70, ptr %68, align 4, !tbaa !24
  %71 = load ptr, ptr %3, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.gravity_lexer_t, ptr %71, i32 0, i32 5
  store i32 1, ptr %72, align 8, !tbaa !22
  br label %15

73:                                               ; preds = %50
  %74 = load i32, ptr %4, align 4, !tbaa !21
  %75 = load ptr, ptr %3, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.gravity_lexer_t, ptr %75, i32 0, i32 1
  %77 = load i32, ptr %76, align 8, !tbaa !17
  %78 = load ptr, ptr %3, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.gravity_lexer_t, ptr %78, i32 0, i32 3
  %80 = load i32, ptr %79, align 8, !tbaa !18
  %81 = icmp ult i32 %77, %80
  br i1 %81, label %82, label %94

82:                                               ; preds = %73
  %83 = load ptr, ptr %3, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.gravity_lexer_t, ptr %83, i32 0, i32 0
  %85 = load ptr, ptr %84, align 8, !tbaa !19
  %86 = load ptr, ptr %3, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.gravity_lexer_t, ptr %86, i32 0, i32 1
  %88 = load i32, ptr %87, align 8, !tbaa !17
  %89 = add i32 %88, 1
  %90 = zext i32 %89 to i64
  %91 = getelementptr inbounds i8, ptr %85, i64 %90
  %92 = load i8, ptr %91, align 1, !tbaa !20
  %93 = sext i8 %92 to i32
  br label %95

94:                                               ; preds = %73
  br label %95

95:                                               ; preds = %94, %82
  %96 = phi i32 [ %93, %82 ], [ 0, %94 ]
  %97 = call zeroext i1 @is_comment(i32 noundef %74, i32 noundef %96)
  br i1 %97, label %98, label %101

98:                                               ; preds = %95
  %99 = load ptr, ptr %3, align 8, !tbaa !5
  %100 = call i32 @lexer_scan_comment(ptr noundef %99)
  br label %15

101:                                              ; preds = %95
  %102 = load i32, ptr %4, align 4, !tbaa !21
  %103 = call zeroext i1 @is_semicolon(i32 noundef %102)
  br i1 %103, label %104, label %107

104:                                              ; preds = %101
  %105 = load ptr, ptr %3, align 8, !tbaa !5
  %106 = call i32 @lexer_scan_semicolon(ptr noundef %105)
  store i32 %106, ptr %5, align 4, !tbaa !21
  br label %146

107:                                              ; preds = %101
  %108 = load i32, ptr %4, align 4, !tbaa !21
  %109 = call zeroext i1 @is_alpha(i32 noundef %108)
  br i1 %109, label %110, label %113

110:                                              ; preds = %107
  %111 = load ptr, ptr %3, align 8, !tbaa !5
  %112 = call i32 @lexer_scan_identifier(ptr noundef %111)
  store i32 %112, ptr %5, align 4, !tbaa !21
  br label %146

113:                                              ; preds = %107
  %114 = load i32, ptr %4, align 4, !tbaa !21
  %115 = call zeroext i1 @is_digit(i32 noundef %114, i32 noundef 0)
  br i1 %115, label %116, label %119

116:                                              ; preds = %113
  %117 = load ptr, ptr %3, align 8, !tbaa !5
  %118 = call i32 @lexer_scan_number(ptr noundef %117)
  store i32 %118, ptr %5, align 4, !tbaa !21
  br label %146

119:                                              ; preds = %113
  %120 = load i32, ptr %4, align 4, !tbaa !21
  %121 = call zeroext i1 @is_string(i32 noundef %120)
  br i1 %121, label %122, label %125

122:                                              ; preds = %119
  %123 = load ptr, ptr %3, align 8, !tbaa !5
  %124 = call i32 @lexer_scan_string(ptr noundef %123)
  store i32 %124, ptr %5, align 4, !tbaa !21
  br label %146

125:                                              ; preds = %119
  %126 = load i32, ptr %4, align 4, !tbaa !21
  %127 = call zeroext i1 @is_builtin_operator(i32 noundef %126)
  br i1 %127, label %128, label %131

128:                                              ; preds = %125
  %129 = load ptr, ptr %3, align 8, !tbaa !5
  %130 = call i32 @lexer_scan_operator(ptr noundef %129)
  store i32 %130, ptr %5, align 4, !tbaa !21
  br label %146

131:                                              ; preds = %125
  %132 = load i32, ptr %4, align 4, !tbaa !21
  %133 = call zeroext i1 @is_special(i32 noundef %132)
  br i1 %133, label %134, label %137

134:                                              ; preds = %131
  %135 = load ptr, ptr %3, align 8, !tbaa !5
  %136 = call i32 @lexer_scan_special(ptr noundef %135)
  store i32 %136, ptr %5, align 4, !tbaa !21
  br label %146

137:                                              ; preds = %131
  %138 = load i32, ptr %4, align 4, !tbaa !21
  %139 = call zeroext i1 @is_preprocessor(i32 noundef %138)
  br i1 %139, label %140, label %143

140:                                              ; preds = %137
  %141 = load ptr, ptr %3, align 8, !tbaa !5
  %142 = call i32 @lexer_scan_preprocessor(ptr noundef %141)
  store i32 %142, ptr %5, align 4, !tbaa !21
  br label %146

143:                                              ; preds = %137
  %144 = load ptr, ptr %3, align 8, !tbaa !5
  %145 = call i32 @lexer_error(ptr noundef %144, ptr noundef @.str)
  store i32 %145, ptr %2, align 4
  store i32 1, ptr %6, align 4
  br label %178

146:                                              ; preds = %140, %134, %128, %122, %116, %110, %104
  %147 = load ptr, ptr %3, align 8, !tbaa !5
  %148 = getelementptr inbounds %struct.gravity_lexer_t, ptr %147, i32 0, i32 8
  %149 = load i8, ptr %148, align 8, !tbaa !9, !range !14, !noundef !15
  %150 = trunc i8 %149 to i1
  br i1 %150, label %176, label %151

151:                                              ; preds = %146
  %152 = load ptr, ptr %3, align 8, !tbaa !5
  %153 = getelementptr inbounds %struct.gravity_lexer_t, ptr %152, i32 0, i32 10
  %154 = load ptr, ptr %153, align 8, !tbaa !25
  %155 = icmp ne ptr %154, null
  br i1 %155, label %156, label %176

156:                                              ; preds = %151
  %157 = load ptr, ptr %3, align 8, !tbaa !5
  %158 = getelementptr inbounds %struct.gravity_lexer_t, ptr %157, i32 0, i32 10
  %159 = load ptr, ptr %158, align 8, !tbaa !25
  %160 = getelementptr inbounds %struct.gravity_delegate_t, ptr %159, i32 0, i32 7
  %161 = load ptr, ptr %160, align 8, !tbaa !26
  %162 = icmp ne ptr %161, null
  br i1 %162, label %163, label %176

163:                                              ; preds = %156
  %164 = load ptr, ptr %3, align 8, !tbaa !5
  %165 = getelementptr inbounds %struct.gravity_lexer_t, ptr %164, i32 0, i32 10
  %166 = load ptr, ptr %165, align 8, !tbaa !25
  %167 = getelementptr inbounds %struct.gravity_delegate_t, ptr %166, i32 0, i32 7
  %168 = load ptr, ptr %167, align 8, !tbaa !26
  %169 = load ptr, ptr %3, align 8, !tbaa !5
  %170 = getelementptr inbounds %struct.gravity_lexer_t, ptr %169, i32 0, i32 7
  %171 = load ptr, ptr %3, align 8, !tbaa !5
  %172 = getelementptr inbounds %struct.gravity_lexer_t, ptr %171, i32 0, i32 10
  %173 = load ptr, ptr %172, align 8, !tbaa !25
  %174 = getelementptr inbounds %struct.gravity_delegate_t, ptr %173, i32 0, i32 0
  %175 = load ptr, ptr %174, align 8, !tbaa !28
  call void %168(ptr noundef %170, ptr noundef %175)
  br label %176

176:                                              ; preds = %163, %156, %151, %146
  %177 = load i32, ptr %5, align 4, !tbaa !21
  store i32 %177, ptr %2, align 4
  store i32 1, ptr %6, align 4
  br label %178

178:                                              ; preds = %176, %143, %23
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #3
  %179 = load i32, ptr %2, align 4
  ret i32 %179
}

; Function Attrs: inlinehint nounwind uwtable
declare hidden zeroext i1 @is_whitespace(i32 noundef) #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden zeroext i1 @is_newline(ptr noundef, i32 noundef) #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden zeroext i1 @is_comment(i32 noundef, i32 noundef) #2

; Function Attrs: nounwind uwtable
declare hidden i32 @lexer_scan_comment(ptr noundef) #1

; Function Attrs: inlinehint nounwind uwtable
declare hidden zeroext i1 @is_semicolon(i32 noundef) #2

; Function Attrs: nounwind uwtable
declare hidden i32 @lexer_scan_semicolon(ptr noundef) #1

; Function Attrs: inlinehint nounwind uwtable
declare hidden zeroext i1 @is_alpha(i32 noundef) #2

; Function Attrs: nounwind uwtable
declare hidden i32 @lexer_scan_identifier(ptr noundef) #1

; Function Attrs: inlinehint nounwind uwtable
declare hidden zeroext i1 @is_digit(i32 noundef, i32 noundef) #2

; Function Attrs: nounwind uwtable
declare hidden i32 @lexer_scan_number(ptr noundef) #1

; Function Attrs: inlinehint nounwind uwtable
declare hidden zeroext i1 @is_string(i32 noundef) #2

; Function Attrs: nounwind uwtable
declare hidden i32 @lexer_scan_string(ptr noundef) #1

; Function Attrs: inlinehint nounwind uwtable
declare hidden zeroext i1 @is_builtin_operator(i32 noundef) #2

; Function Attrs: nounwind uwtable
declare hidden i32 @lexer_scan_operator(ptr noundef) #1

; Function Attrs: inlinehint nounwind uwtable
declare hidden zeroext i1 @is_special(i32 noundef) #2

; Function Attrs: nounwind uwtable
declare hidden i32 @lexer_scan_special(ptr noundef) #1

; Function Attrs: inlinehint nounwind uwtable
declare hidden zeroext i1 @is_preprocessor(i32 noundef) #2

; Function Attrs: nounwind uwtable
declare hidden i32 @lexer_scan_preprocessor(ptr noundef) #1

; Function Attrs: nounwind uwtable
declare hidden i32 @lexer_error(ptr noundef, ptr noundef) #1

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { inlinehint nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !13, i64 72}
!10 = !{!"gravity_lexer_t", !6, i64 0, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !12, i64 32, !13, i64 72, !13, i64 73, !6, i64 80, !11, i64 88}
!11 = !{!"int", !7, i64 0}
!12 = !{!"gtoken_s", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !6, i64 32}
!13 = !{!"_Bool", !7, i64 0}
!14 = !{i8 0, i8 2}
!15 = !{}
!16 = !{!10, !11, i64 88}
!17 = !{!10, !11, i64 8}
!18 = !{!10, !11, i64 16}
!19 = !{!10, !6, i64 0}
!20 = !{!7, !7, i64 0}
!21 = !{!11, !11, i64 0}
!22 = !{!10, !11, i64 24}
!23 = !{!10, !11, i64 12}
!24 = !{!10, !11, i64 20}
!25 = !{!10, !6, i64 80}
!26 = !{!27, !6, i64 48}
!27 = !{!"", !6, i64 0, !13, i64 8, !13, i64 9, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !6, i64 184}
!28 = !{!27, !6, i64 0}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

@.str = external hidden unnamed_addr constant [19 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @gravity_lexer_next(ptr noundef %0) local_unnamed_addr #0 {
  %2 = getelementptr inbounds i8, ptr %0, i64 72
  %3 = load i8, ptr %2, align 8, !tbaa !5, !range !13, !noundef !14
  %4 = trunc nuw i8 %3 to i1
  br i1 %4, label %7, label %5

5:                                                ; preds = %1
  %6 = getelementptr inbounds i8, ptr %0, i64 88
  store i32 91, ptr %6, align 8, !tbaa !15
  br label %7

7:                                                ; preds = %5, %1
  %8 = getelementptr inbounds i8, ptr %0, i64 8
  %9 = getelementptr inbounds i8, ptr %0, i64 16
  %10 = load i32, ptr %8, align 8, !tbaa !16
  %11 = load i32, ptr %9, align 8, !tbaa !17
  %.not52 = icmp ult i32 %10, %11
  br i1 %.not52, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %7
  %12 = getelementptr inbounds i8, ptr %0, i64 24
  %13 = getelementptr inbounds i8, ptr %0, i64 12
  %14 = getelementptr inbounds i8, ptr %0, i64 20
  br label %15

15:                                               ; preds = %.lr.ph, %.backedge
  %16 = phi i32 [ %10, %.lr.ph ], [ %29, %.backedge ]
  %17 = load ptr, ptr %0, align 8, !tbaa !18
  %18 = zext i32 %16 to i64
  %19 = getelementptr inbounds i8, ptr %17, i64 %18
  %20 = load i8, ptr %19, align 1, !tbaa !19
  %21 = sext i8 %20 to i32
  %22 = tail call zeroext i1 @is_whitespace(i32 noundef %21)
  br i1 %22, label %23, label %31

23:                                               ; preds = %15
  %24 = load i32, ptr %12, align 8, !tbaa !20
  %25 = add i32 %24, 1
  store i32 %25, ptr %12, align 8, !tbaa !20
  %26 = load <2 x i32>, ptr %8, align 8, !tbaa !21
  %27 = add <2 x i32> %26, <i32 1, i32 1>
  store <2 x i32> %27, ptr %8, align 8, !tbaa !21
  %28 = extractelement <2 x i32> %27, i64 0
  br label %.backedge

.backedge:                                        ; preds = %23, %34, %53
  %29 = phi i32 [ %28, %23 ], [ %35, %34 ], [ %.pre, %53 ]
  %30 = load i32, ptr %9, align 8, !tbaa !17
  %.not = icmp ult i32 %29, %30
  br i1 %.not, label %15, label %.loopexit

31:                                               ; preds = %15
  %32 = tail call zeroext i1 @is_newline(ptr noundef nonnull %0, i32 noundef %21)
  %33 = load i32, ptr %8, align 8, !tbaa !16
  br i1 %32, label %34, label %40

34:                                               ; preds = %31
  %35 = add i32 %33, 1
  store i32 %35, ptr %8, align 8, !tbaa !16
  %36 = load i32, ptr %13, align 4, !tbaa !22
  %37 = add i32 %36, 1
  store i32 %37, ptr %13, align 4, !tbaa !22
  %38 = load i32, ptr %14, align 4, !tbaa !23
  %39 = add i32 %38, 1
  store i32 %39, ptr %14, align 4, !tbaa !23
  store i32 1, ptr %12, align 8, !tbaa !20
  br label %.backedge

40:                                               ; preds = %31
  %41 = load i32, ptr %9, align 8, !tbaa !17
  %42 = icmp ult i32 %33, %41
  br i1 %42, label %43, label %50

43:                                               ; preds = %40
  %44 = load ptr, ptr %0, align 8, !tbaa !18
  %45 = add nuw i32 %33, 1
  %46 = zext i32 %45 to i64
  %47 = getelementptr inbounds i8, ptr %44, i64 %46
  %48 = load i8, ptr %47, align 1, !tbaa !19
  %49 = sext i8 %48 to i32
  br label %50

50:                                               ; preds = %40, %43
  %51 = phi i32 [ %49, %43 ], [ 0, %40 ]
  %52 = tail call zeroext i1 @is_comment(i32 noundef %21, i32 noundef %51)
  br i1 %52, label %53, label %55

53:                                               ; preds = %50
  %54 = tail call i32 @lexer_scan_comment(ptr noundef nonnull %0)
  %.pre = load i32, ptr %8, align 8, !tbaa !16
  br label %.backedge

55:                                               ; preds = %50
  %56 = tail call zeroext i1 @is_semicolon(i32 noundef %21)
  br i1 %56, label %57, label %59

57:                                               ; preds = %55
  %58 = tail call i32 @lexer_scan_semicolon(ptr noundef nonnull %0)
  br label %85

59:                                               ; preds = %55
  %60 = tail call zeroext i1 @is_alpha(i32 noundef %21)
  br i1 %60, label %61, label %63

61:                                               ; preds = %59
  %62 = tail call i32 @lexer_scan_identifier(ptr noundef nonnull %0)
  br label %85

63:                                               ; preds = %59
  %64 = tail call zeroext i1 @is_digit(i32 noundef %21, i32 noundef 0)
  br i1 %64, label %65, label %67

65:                                               ; preds = %63
  %66 = tail call i32 @lexer_scan_number(ptr noundef nonnull %0)
  br label %85

67:                                               ; preds = %63
  %68 = tail call zeroext i1 @is_string(i32 noundef %21)
  br i1 %68, label %69, label %71

69:                                               ; preds = %67
  %70 = tail call i32 @lexer_scan_string(ptr noundef nonnull %0)
  br label %85

71:                                               ; preds = %67
  %72 = tail call zeroext i1 @is_builtin_operator(i32 noundef %21)
  br i1 %72, label %73, label %75

73:                                               ; preds = %71
  %74 = tail call i32 @lexer_scan_operator(ptr noundef nonnull %0)
  br label %85

75:                                               ; preds = %71
  %76 = tail call zeroext i1 @is_special(i32 noundef %21)
  br i1 %76, label %77, label %79

77:                                               ; preds = %75
  %78 = tail call i32 @lexer_scan_special(ptr noundef nonnull %0)
  br label %85

79:                                               ; preds = %75
  %80 = tail call zeroext i1 @is_preprocessor(i32 noundef %21)
  br i1 %80, label %81, label %83

81:                                               ; preds = %79
  %82 = tail call i32 @lexer_scan_preprocessor(ptr noundef nonnull %0)
  br label %85

83:                                               ; preds = %79
  %84 = tail call i32 @lexer_error(ptr noundef nonnull %0, ptr noundef nonnull @.str)
  br label %.loopexit

85:                                               ; preds = %81, %77, %73, %69, %65, %61, %57
  %.0 = phi i32 [ %58, %57 ], [ %62, %61 ], [ %66, %65 ], [ %70, %69 ], [ %74, %73 ], [ %78, %77 ], [ %82, %81 ]
  %86 = load i8, ptr %2, align 8, !tbaa !5, !range !13, !noundef !14
  %87 = trunc nuw i8 %86 to i1
  br i1 %87, label %.loopexit, label %88

88:                                               ; preds = %85
  %89 = getelementptr inbounds i8, ptr %0, i64 80
  %90 = load ptr, ptr %89, align 8, !tbaa !24
  %.not50 = icmp eq ptr %90, null
  br i1 %.not50, label %.loopexit, label %91

91:                                               ; preds = %88
  %92 = getelementptr inbounds i8, ptr %90, i64 48
  %93 = load ptr, ptr %92, align 8, !tbaa !25
  %.not51 = icmp eq ptr %93, null
  br i1 %.not51, label %.loopexit, label %94

94:                                               ; preds = %91
  %95 = getelementptr inbounds i8, ptr %0, i64 32
  %96 = load ptr, ptr %90, align 8, !tbaa !27
  tail call void %93(ptr noundef nonnull %95, ptr noundef %96) #2
  br label %.loopexit

.loopexit:                                        ; preds = %.backedge, %7, %85, %88, %91, %94, %83
  %.045 = phi i32 [ %84, %83 ], [ %.0, %94 ], [ %.0, %91 ], [ %.0, %88 ], [ %.0, %85 ], [ 0, %7 ], [ 0, %.backedge ]
  ret i32 %.045
}

; Function Attrs: inlinehint nounwind uwtable
declare hidden zeroext i1 @is_whitespace(i32 noundef) local_unnamed_addr #1

; Function Attrs: inlinehint nounwind uwtable
declare hidden zeroext i1 @is_newline(ptr noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: inlinehint nounwind uwtable
declare hidden zeroext i1 @is_comment(i32 noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden i32 @lexer_scan_comment(ptr noundef) local_unnamed_addr #0

; Function Attrs: inlinehint nounwind uwtable
declare hidden zeroext i1 @is_semicolon(i32 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden i32 @lexer_scan_semicolon(ptr noundef) local_unnamed_addr #0

; Function Attrs: inlinehint nounwind uwtable
declare hidden zeroext i1 @is_alpha(i32 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden i32 @lexer_scan_identifier(ptr noundef) local_unnamed_addr #0

; Function Attrs: inlinehint nounwind uwtable
declare hidden zeroext i1 @is_digit(i32 noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden i32 @lexer_scan_number(ptr noundef) local_unnamed_addr #0

; Function Attrs: inlinehint nounwind uwtable
declare hidden zeroext i1 @is_string(i32 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden i32 @lexer_scan_string(ptr noundef) local_unnamed_addr #0

; Function Attrs: inlinehint nounwind uwtable
declare hidden zeroext i1 @is_builtin_operator(i32 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden i32 @lexer_scan_operator(ptr noundef) local_unnamed_addr #0

; Function Attrs: inlinehint nounwind uwtable
declare hidden zeroext i1 @is_special(i32 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden i32 @lexer_scan_special(ptr noundef) local_unnamed_addr #0

; Function Attrs: inlinehint nounwind uwtable
declare hidden zeroext i1 @is_preprocessor(i32 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden i32 @lexer_scan_preprocessor(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden i32 @lexer_error(ptr noundef, ptr noundef) local_unnamed_addr #0

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { inlinehint nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !12, i64 72}
!6 = !{!"gravity_lexer_t", !7, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !11, i64 32, !12, i64 72, !12, i64 73, !7, i64 80, !10, i64 88}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"gtoken_s", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !7, i64 32}
!12 = !{!"_Bool", !8, i64 0}
!13 = !{i8 0, i8 2}
!14 = !{}
!15 = !{!6, !10, i64 88}
!16 = !{!6, !10, i64 8}
!17 = !{!6, !10, i64 16}
!18 = !{!6, !7, i64 0}
!19 = !{!8, !8, i64 0}
!20 = !{!6, !10, i64 24}
!21 = !{!10, !10, i64 0}
!22 = !{!6, !10, i64 12}
!23 = !{!6, !10, i64 20}
!24 = !{!6, !7, i64 80}
!25 = !{!26, !7, i64 48}
!26 = !{!"", !7, i64 0, !12, i64 8, !12, i64 9, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !7, i64 64, !7, i64 72, !7, i64 80, !7, i64 88, !7, i64 96, !7, i64 104, !7, i64 112, !7, i64 120, !7, i64 128, !7, i64 136, !7, i64 144, !7, i64 152, !7, i64 160, !7, i64 168, !7, i64 176, !7, i64 184}
!27 = !{!26, !7, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass