; LLVM IR from nickmqb/muon :: bootstrap/mu.ll_Parser (tryParseTypeParams__)

; 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.string__ = type { ptr, i32 }
%struct.tag_____IAllocator__ = type { ptr, ptr, ptr, ptr }
%struct.tag_____TypeParams__ = type { ptr, ptr, ptr, ptr }
%struct.tag_____List__Ptr__Token______ = type { ptr, i32, i32 }
%struct.tag_____ParserState__ = type { %struct.string__, i32, ptr, ptr, i32, i32, i32, i32, i32, ptr, %struct.tag_____IntRange__, i32, i32, ptr, i32, ptr, ptr, ptr }
%struct.tag_____IntRange__ = type { i32, i32 }
%struct.tag_____Token__ = type { i32, %struct.string__, %struct.tag_____IntRange__, %struct.tag_____IntRange__, i32 }

@mu_____string297 = external dso_local global %struct.string__, align 8
@mu_____string295 = external dso_local global %struct.string__, align 8
@mu_____string77 = external dso_local global %struct.string__, align 8
@mu_____string78 = external dso_local global %struct.string__, align 8
@top_____currentAllocator__ = external dso_local thread_local global %struct.tag_____IAllocator__, align 8

; 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 speculatable willreturn memory(none)
declare nonnull ptr @llvm.threadlocal.address.p0(ptr nonnull) #1

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3

; Function Attrs: nounwind uwtable
declare dso_local void @List__add__Ptr__Token______(ptr noundef, ptr noundef) #4

; Function Attrs: nounwind uwtable
declare dso_local void @Parser__readToken__(ptr noundef) #4

; Function Attrs: nounwind uwtable
declare dso_local void @Parser__badToken__(ptr noundef, ptr, i32) #4

; Function Attrs: nounwind uwtable
declare dso_local void @Parser__expected__(ptr noundef, ptr, i32) #4

; Function Attrs: nounwind uwtable
define dso_local ptr @Parser__tryParseTypeParams__(ptr noundef %0) #4 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca i8, align 1
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca %struct.tag_____TypeParams__, align 8
  %8 = alloca ptr, align 8
  %9 = alloca %struct.tag_____List__Ptr__Token______, align 8
  %10 = alloca ptr, align 8
  %11 = alloca %struct.tag_____List__Ptr__Token______, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca i8, align 1
  %15 = alloca i8, align 1
  store ptr %0, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %4) #5
  %16 = load ptr, ptr %3, align 8, !tbaa !5
  %17 = getelementptr inbounds %struct.tag_____ParserState__, ptr %16, i32 0, i32 3
  %18 = load ptr, ptr %17, align 8, !tbaa !9
  %19 = getelementptr inbounds %struct.tag_____Token__, ptr %18, i32 0, i32 4
  %20 = load i32, ptr %19, align 8, !tbaa !14
  %21 = load ptr, ptr %3, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.tag_____ParserState__, ptr %21, i32 0, i32 5
  %23 = load i32, ptr %22, align 4, !tbaa !16
  %24 = icmp sgt i32 %20, %23
  %25 = zext i1 %24 to i32
  %26 = trunc i32 %25 to i8
  store i8 %26, ptr %4, align 1, !tbaa !17
  %27 = load i8, ptr %4, align 1, !tbaa !17
  %28 = icmp ne i8 %27, 0
  br i1 %28, label %29, label %38

29:                                               ; preds = %1
  %30 = load ptr, ptr %3, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.tag_____ParserState__, ptr %30, i32 0, i32 3
  %32 = load ptr, ptr %31, align 8, !tbaa !9
  %33 = getelementptr inbounds %struct.tag_____Token__, ptr %32, i32 0, i32 0
  %34 = load i32, ptr %33, align 8, !tbaa !18
  %35 = icmp eq i32 %34, 11
  %36 = zext i1 %35 to i32
  %37 = trunc i32 %36 to i8
  store i8 %37, ptr %4, align 1, !tbaa !17
  br label %38

38:                                               ; preds = %29, %1
  %39 = load i8, ptr %4, align 1, !tbaa !17
  %40 = icmp ne i8 %39, 0
  br i1 %40, label %42, label %41

41:                                               ; preds = %38
  store ptr null, ptr %2, align 8
  store i32 1, ptr %5, align 4
  br label %208

42:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  %43 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @top_____currentAllocator__)
  %44 = getelementptr inbounds %struct.tag_____IAllocator__, ptr %43, i32 0, i32 1
  %45 = load ptr, ptr %44, align 8, !tbaa !19
  %46 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @top_____currentAllocator__)
  %47 = getelementptr inbounds %struct.tag_____IAllocator__, ptr %46, i32 0, i32 0
  %48 = load ptr, ptr %47, align 8, !tbaa !21
  %49 = call ptr %45(ptr noundef %48, i64 noundef 32)
  store ptr %49, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %7) #5
  call void @llvm.memset.p0.i64(ptr align 8 %7, i8 0, i64 32, i1 false)
  %50 = load ptr, ptr %3, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.tag_____ParserState__, ptr %50, i32 0, i32 3
  %52 = load ptr, ptr %51, align 8, !tbaa !9
  %53 = getelementptr inbounds %struct.tag_____TypeParams__, ptr %7, i32 0, i32 0
  store ptr %52, ptr %53, align 8, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %54 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @top_____currentAllocator__)
  %55 = getelementptr inbounds %struct.tag_____IAllocator__, ptr %54, i32 0, i32 1
  %56 = load ptr, ptr %55, align 8, !tbaa !19
  %57 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @top_____currentAllocator__)
  %58 = getelementptr inbounds %struct.tag_____IAllocator__, ptr %57, i32 0, i32 0
  %59 = load ptr, ptr %58, align 8, !tbaa !21
  %60 = call ptr %56(ptr noundef %59, i64 noundef 16)
  store ptr %60, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #5
  call void @llvm.memset.p0.i64(ptr align 8 %9, i8 0, i64 16, i1 false)
  %61 = load ptr, ptr %8, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %61, ptr align 8 %9, i64 16, i1 false), !tbaa.struct !24
  %62 = load ptr, ptr %8, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.tag_____TypeParams__, ptr %7, i32 0, i32 1
  store ptr %62, ptr %63, align 8, !tbaa !26
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %64 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @top_____currentAllocator__)
  %65 = getelementptr inbounds %struct.tag_____IAllocator__, ptr %64, i32 0, i32 1
  %66 = load ptr, ptr %65, align 8, !tbaa !19
  %67 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @top_____currentAllocator__)
  %68 = getelementptr inbounds %struct.tag_____IAllocator__, ptr %67, i32 0, i32 0
  %69 = load ptr, ptr %68, align 8, !tbaa !21
  %70 = call ptr %66(ptr noundef %69, i64 noundef 16)
  store ptr %70, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #5
  call void @llvm.memset.p0.i64(ptr align 8 %11, i8 0, i64 16, i1 false)
  %71 = load ptr, ptr %10, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %71, ptr align 8 %11, i64 16, i1 false), !tbaa.struct !24
  %72 = load ptr, ptr %10, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.tag_____TypeParams__, ptr %7, i32 0, i32 2
  store ptr %72, ptr %73, align 8, !tbaa !27
  %74 = load ptr, ptr %6, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %74, ptr align 8 %7, i64 32, i1 false), !tbaa.struct !28
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %75 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %75, ptr %12, align 8, !tbaa !5
  %76 = load ptr, ptr %3, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.tag_____ParserState__, ptr %76, i32 0, i32 8
  store i32 1, ptr %77, align 8, !tbaa !29
  %78 = load ptr, ptr %3, align 8, !tbaa !5
  call void @Parser__readToken__(ptr noundef %78)
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  store i32 0, ptr %13, align 4, !tbaa !25
  br label %79

79:                                               ; preds = %162, %42
  br label %80

80:                                               ; preds = %79
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #5
  %81 = load ptr, ptr %3, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.tag_____ParserState__, ptr %81, i32 0, i32 3
  %83 = load ptr, ptr %82, align 8, !tbaa !9
  %84 = getelementptr inbounds %struct.tag_____Token__, ptr %83, i32 0, i32 4
  %85 = load i32, ptr %84, align 8, !tbaa !14
  %86 = icmp eq i32 %85, 2147483647
  %87 = zext i1 %86 to i32
  %88 = trunc i32 %87 to i8
  store i8 %88, ptr %14, align 1, !tbaa !17
  %89 = load i8, ptr %14, align 1, !tbaa !17
  %90 = icmp ne i8 %89, 0
  br i1 %90, label %91, label %100

91:                                               ; preds = %80
  %92 = load ptr, ptr %3, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.tag_____ParserState__, ptr %92, i32 0, i32 3
  %94 = load ptr, ptr %93, align 8, !tbaa !9
  %95 = getelementptr inbounds %struct.tag_____Token__, ptr %94, i32 0, i32 0
  %96 = load i32, ptr %95, align 8, !tbaa !18
  %97 = icmp ne i32 %96, 12
  %98 = zext i1 %97 to i32
  %99 = trunc i32 %98 to i8
  store i8 %99, ptr %14, align 1, !tbaa !17
  br label %100

100:                                              ; preds = %91, %80
  %101 = load i8, ptr %14, align 1, !tbaa !17
  %102 = icmp ne i8 %101, 0
  br i1 %102, label %104, label %103

103:                                              ; preds = %100
  store i32 3, ptr %5, align 4
  br label %160

104:                                              ; preds = %100
  %105 = load i32, ptr %13, align 4, !tbaa !25
  %106 = icmp ne i32 %105, 2
  br i1 %106, label %107, label %139

107:                                              ; preds = %104
  %108 = load ptr, ptr %3, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.tag_____ParserState__, ptr %108, i32 0, i32 3
  %110 = load ptr, ptr %109, align 8, !tbaa !9
  %111 = getelementptr inbounds %struct.tag_____Token__, ptr %110, i32 0, i32 0
  %112 = load i32, ptr %111, align 8, !tbaa !18
  %113 = icmp eq i32 %112, 0
  br i1 %113, label %114, label %128

114:                                              ; preds = %107
  %115 = load ptr, ptr %12, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.tag_____TypeParams__, ptr %115, i32 0, i32 1
  %117 = load ptr, ptr %116, align 8, !tbaa !26
  %118 = load ptr, ptr %3, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.tag_____ParserState__, ptr %118, i32 0, i32 3
  %120 = load ptr, ptr %119, align 8, !tbaa !9
  call void @List__add__Ptr__Token______(ptr noundef %117, ptr noundef %120)
  %121 = load ptr, ptr %12, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.tag_____TypeParams__, ptr %121, i32 0, i32 2
  %123 = load ptr, ptr %122, align 8, !tbaa !27
  %124 = load ptr, ptr %3, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.tag_____ParserState__, ptr %124, i32 0, i32 3
  %126 = load ptr, ptr %125, align 8, !tbaa !9
  call void @List__add__Ptr__Token______(ptr noundef %123, ptr noundef %126)
  %127 = load ptr, ptr %3, align 8, !tbaa !5
  call void @Parser__readToken__(ptr noundef %127)
  store i32 2, ptr %13, align 4, !tbaa !25
  br label %138

128:                                              ; preds = %107
  %129 = load ptr, ptr %12, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.tag_____TypeParams__, ptr %129, i32 0, i32 2
  %131 = load ptr, ptr %130, align 8, !tbaa !27
  %132 = load ptr, ptr %3, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct.tag_____ParserState__, ptr %132, i32 0, i32 3
  %134 = load ptr, ptr %133, align 8, !tbaa !9
  call void @List__add__Ptr__Token______(ptr noundef %131, ptr noundef %134)
  %135 = load ptr, ptr %3, align 8, !tbaa !5
  %136 = load ptr, ptr @mu_____string295, align 8
  %137 = load i32, ptr getelementptr inbounds ({ ptr, i32 }, ptr @mu_____string295, i32 0, i32 1), align 8
  call void @Parser__badToken__(ptr noundef %135, ptr %136, i32 %137)
  br label %138

138:                                              ; preds = %128, %114
  br label %159

139:                                              ; preds = %104
  %140 = load ptr, ptr %3, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct.tag_____ParserState__, ptr %140, i32 0, i32 3
  %142 = load ptr, ptr %141, align 8, !tbaa !9
  %143 = getelementptr inbounds %struct.tag_____Token__, ptr %142, i32 0, i32 0
  %144 = load i32, ptr %143, align 8, !tbaa !18
  %145 = icmp eq i32 %144, 13
  br i1 %145, label %146, label %154

146:                                              ; preds = %139
  %147 = load ptr, ptr %12, align 8, !tbaa !5
  %148 = getelementptr inbounds %struct.tag_____TypeParams__, ptr %147, i32 0, i32 2
  %149 = load ptr, ptr %148, align 8, !tbaa !27
  %150 = load ptr, ptr %3, align 8, !tbaa !5
  %151 = getelementptr inbounds %struct.tag_____ParserState__, ptr %150, i32 0, i32 3
  %152 = load ptr, ptr %151, align 8, !tbaa !9
  call void @List__add__Ptr__Token______(ptr noundef %149, ptr noundef %152)
  %153 = load ptr, ptr %3, align 8, !tbaa !5
  call void @Parser__readToken__(ptr noundef %153)
  br label %158

154:                                              ; preds = %139
  %155 = load ptr, ptr %3, align 8, !tbaa !5
  %156 = load ptr, ptr @mu_____string77, align 8
  %157 = load i32, ptr getelementptr inbounds ({ ptr, i32 }, ptr @mu_____string77, i32 0, i32 1), align 8
  call void @Parser__expected__(ptr noundef %155, ptr %156, i32 %157)
  br label %158

158:                                              ; preds = %154, %146
  store i32 1, ptr %13, align 4, !tbaa !25
  br label %159

159:                                              ; preds = %158, %138
  store i32 0, ptr %5, align 4
  br label %160

160:                                              ; preds = %159, %103
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #5
  %161 = load i32, ptr %5, align 4
  switch i32 %161, label %210 [
    i32 0, label %162
    i32 3, label %163
  ]

162:                                              ; preds = %160
  br label %79

163:                                              ; preds = %160
  %164 = load i32, ptr %13, align 4, !tbaa !25
  %165 = icmp eq i32 %164, 0
  br i1 %165, label %166, label %170

166:                                              ; preds = %163
  %167 = load ptr, ptr %3, align 8, !tbaa !5
  %168 = load ptr, ptr @mu_____string297, align 8
  %169 = load i32, ptr getelementptr inbounds ({ ptr, i32 }, ptr @mu_____string297, i32 0, i32 1), align 8
  call void @Parser__expected__(ptr noundef %167, ptr %168, i32 %169)
  br label %170

170:                                              ; preds = %166, %163
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #5
  %171 = load ptr, ptr %3, align 8, !tbaa !5
  %172 = getelementptr inbounds %struct.tag_____ParserState__, ptr %171, i32 0, i32 3
  %173 = load ptr, ptr %172, align 8, !tbaa !9
  %174 = getelementptr inbounds %struct.tag_____Token__, ptr %173, i32 0, i32 4
  %175 = load i32, ptr %174, align 8, !tbaa !14
  %176 = icmp eq i32 %175, 2147483647
  %177 = zext i1 %176 to i32
  %178 = trunc i32 %177 to i8
  store i8 %178, ptr %15, align 1, !tbaa !17
  %179 = load i8, ptr %15, align 1, !tbaa !17
  %180 = icmp ne i8 %179, 0
  br i1 %180, label %181, label %190

181:                                              ; preds = %170
  %182 = load ptr, ptr %3, align 8, !tbaa !5
  %183 = getelementptr inbounds %struct.tag_____ParserState__, ptr %182, i32 0, i32 3
  %184 = load ptr, ptr %183, align 8, !tbaa !9
  %185 = getelementptr inbounds %struct.tag_____Token__, ptr %184, i32 0, i32 0
  %186 = load i32, ptr %185, align 8, !tbaa !18
  %187 = icmp eq i32 %186, 12
  %188 = zext i1 %187 to i32
  %189 = trunc i32 %188 to i8
  store i8 %189, ptr %15, align 1, !tbaa !17
  br label %190

190:                                              ; preds = %181, %170
  %191 = load i8, ptr %15, align 1, !tbaa !17
  %192 = icmp ne i8 %191, 0
  br i1 %192, label %193, label %200

193:                                              ; preds = %190
  %194 = load ptr, ptr %3, align 8, !tbaa !5
  %195 = getelementptr inbounds %struct.tag_____ParserState__, ptr %194, i32 0, i32 3
  %196 = load ptr, ptr %195, align 8, !tbaa !9
  %197 = load ptr, ptr %12, align 8, !tbaa !5
  %198 = getelementptr inbounds %struct.tag_____TypeParams__, ptr %197, i32 0, i32 3
  store ptr %196, ptr %198, align 8, !tbaa !30
  %199 = load ptr, ptr %3, align 8, !tbaa !5
  call void @Parser__readToken__(ptr noundef %199)
  br label %204

200:                                              ; preds = %190
  %201 = load ptr, ptr %3, align 8, !tbaa !5
  %202 = load ptr, ptr @mu_____string78, align 8
  %203 = load i32, ptr getelementptr inbounds ({ ptr, i32 }, ptr @mu_____string78, i32 0, i32 1), align 8
  call void @Parser__expected__(ptr noundef %201, ptr %202, i32 %203)
  br label %204

204:                                              ; preds = %200, %193
  %205 = load ptr, ptr %3, align 8, !tbaa !5
  %206 = getelementptr inbounds %struct.tag_____ParserState__, ptr %205, i32 0, i32 8
  store i32 0, ptr %206, align 8, !tbaa !29
  %207 = load ptr, ptr %12, align 8, !tbaa !5
  store ptr %207, ptr %2, align 8
  store i32 1, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  br label %208

208:                                              ; preds = %204, %41
  call void @llvm.lifetime.end.p0(i64 1, ptr %4) #5
  %209 = load ptr, ptr %2, align 8
  ret ptr %209

210:                                              ; preds = %160
  unreachable
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #5 = { 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, !6, i64 32}
!10 = !{!"tag_____ParserState__", !11, i64 0, !12, i64 16, !6, i64 24, !6, i64 32, !12, i64 40, !12, i64 44, !12, i64 48, !12, i64 52, !12, i64 56, !6, i64 64, !13, i64 72, !12, i64 80, !12, i64 84, !6, i64 88, !12, i64 96, !6, i64 104, !6, i64 112, !6, i64 120}
!11 = !{!"", !6, i64 0, !12, i64 8}
!12 = !{!"int", !7, i64 0}
!13 = !{!"tag_____IntRange__", !12, i64 0, !12, i64 4}
!14 = !{!15, !12, i64 40}
!15 = !{!"tag_____Token__", !12, i64 0, !11, i64 8, !13, i64 24, !13, i64 32, !12, i64 40}
!16 = !{!10, !12, i64 44}
!17 = !{!7, !7, i64 0}
!18 = !{!15, !12, i64 0}
!19 = !{!20, !6, i64 8}
!20 = !{!"tag_____IAllocator__", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!21 = !{!20, !6, i64 0}
!22 = !{!23, !6, i64 0}
!23 = !{!"tag_____TypeParams__", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!24 = !{i64 0, i64 8, !5, i64 8, i64 4, !25, i64 12, i64 4, !25}
!25 = !{!12, !12, i64 0}
!26 = !{!23, !6, i64 8}
!27 = !{!23, !6, i64 16}
!28 = !{i64 0, i64 8, !5, i64 8, i64 8, !5, i64 16, i64 8, !5, i64 24, i64 8, !5}
!29 = !{!10, !12, i64 56}
!30 = !{!23, !6, i64 24}


; 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"

%struct.string__ = type { ptr, i32 }
%struct.tag_____IAllocator__ = type { ptr, ptr, ptr, ptr }

@mu_____string297 = external dso_local local_unnamed_addr global %struct.string__, align 8
@mu_____string295 = external dso_local local_unnamed_addr global %struct.string__, align 8
@mu_____string77 = external dso_local local_unnamed_addr global %struct.string__, align 8
@mu_____string78 = external dso_local local_unnamed_addr global %struct.string__, align 8
@top_____currentAllocator__ = external dso_local thread_local local_unnamed_addr global %struct.tag_____IAllocator__, align 8

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare nonnull ptr @llvm.threadlocal.address.p0(ptr nonnull) #0

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

; Function Attrs: nounwind uwtable
declare dso_local void @List__add__Ptr__Token______(ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local void @Parser__readToken__(ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local void @Parser__badToken__(ptr noundef, ptr, i32) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local void @Parser__expected__(ptr noundef, ptr, i32) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local ptr @Parser__tryParseTypeParams__(ptr noundef %0) local_unnamed_addr #2 {
  %2 = getelementptr inbounds i8, ptr %0, i64 32
  %3 = load ptr, ptr %2, align 8, !tbaa !5
  %4 = getelementptr inbounds i8, ptr %3, i64 40
  %5 = load i32, ptr %4, align 8, !tbaa !13
  %6 = getelementptr inbounds i8, ptr %0, i64 44
  %7 = load i32, ptr %6, align 4, !tbaa !15
  %8 = icmp sgt i32 %5, %7
  br i1 %8, label %9, label %.critedge

9:                                                ; preds = %1
  %10 = load i32, ptr %3, align 8, !tbaa !16
  %.not65 = icmp eq i32 %10, 11
  br i1 %.not65, label %11, label %.critedge

11:                                               ; preds = %9
  %12 = tail call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @top_____currentAllocator__)
  %13 = getelementptr inbounds i8, ptr %12, i64 8
  %14 = load ptr, ptr %13, align 8, !tbaa !17
  %15 = load ptr, ptr %12, align 8, !tbaa !19
  %16 = tail call ptr %14(ptr noundef %15, i64 noundef 32) #3
  %17 = load ptr, ptr %2, align 8, !tbaa !5
  %18 = load ptr, ptr %13, align 8, !tbaa !17
  %19 = load ptr, ptr %12, align 8, !tbaa !19
  %20 = tail call ptr %18(ptr noundef %19, i64 noundef 16) #3
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %20, i8 0, i64 16, i1 false)
  %21 = load ptr, ptr %13, align 8, !tbaa !17
  %22 = load ptr, ptr %12, align 8, !tbaa !19
  %23 = tail call ptr %21(ptr noundef %22, i64 noundef 16) #3
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %23, i8 0, i64 16, i1 false)
  store ptr %17, ptr %16, align 8, !tbaa !20
  %.sroa.5.0..sroa_idx = getelementptr inbounds i8, ptr %16, i64 8
  store ptr %20, ptr %.sroa.5.0..sroa_idx, align 8, !tbaa !20
  %.sroa.6.0..sroa_idx = getelementptr inbounds i8, ptr %16, i64 16
  store ptr %23, ptr %.sroa.6.0..sroa_idx, align 8, !tbaa !20
  %.sroa.7.0..sroa_idx = getelementptr inbounds i8, ptr %16, i64 24
  store ptr null, ptr %.sroa.7.0..sroa_idx, align 8, !tbaa !20
  %24 = getelementptr inbounds i8, ptr %0, i64 56
  store i32 1, ptr %24, align 8, !tbaa !21
  tail call void @Parser__readToken__(ptr noundef nonnull %0)
  %25 = load ptr, ptr %2, align 8, !tbaa !5
  %26 = getelementptr inbounds i8, ptr %25, i64 40
  %27 = load i32, ptr %26, align 8, !tbaa !13
  %28 = icmp eq i32 %27, 2147483647
  br i1 %28, label %.lr.ph, label %.thread.thread

.lr.ph:                                           ; preds = %11, %49
  %29 = phi ptr [ %50, %49 ], [ %25, %11 ]
  %.04767 = phi i32 [ %.2, %49 ], [ 0, %11 ]
  %30 = load i32, ptr %29, align 8, !tbaa !16
  %.not66 = icmp eq i32 %30, 12
  br i1 %.not66, label %.thread, label %31

31:                                               ; preds = %.lr.ph
  %.not54 = icmp eq i32 %.04767, 2
  br i1 %.not54, label %42, label %32

32:                                               ; preds = %31
  %33 = icmp eq i32 %30, 0
  br i1 %33, label %34, label %38

34:                                               ; preds = %32
  %35 = load ptr, ptr %.sroa.5.0..sroa_idx, align 8, !tbaa !22
  tail call void @List__add__Ptr__Token______(ptr noundef %35, ptr noundef nonnull %29)
  %36 = load ptr, ptr %.sroa.6.0..sroa_idx, align 8, !tbaa !24
  %37 = load ptr, ptr %2, align 8, !tbaa !5
  tail call void @List__add__Ptr__Token______(ptr noundef %36, ptr noundef %37)
  tail call void @Parser__readToken__(ptr noundef %0)
  br label %49

38:                                               ; preds = %32
  %39 = load ptr, ptr %.sroa.6.0..sroa_idx, align 8, !tbaa !24
  tail call void @List__add__Ptr__Token______(ptr noundef %39, ptr noundef nonnull %29)
  %40 = load ptr, ptr @mu_____string295, align 8
  %41 = load i32, ptr getelementptr inbounds (i8, ptr @mu_____string295, i64 8), align 8
  tail call void @Parser__badToken__(ptr noundef %0, ptr %40, i32 %41)
  br label %49

42:                                               ; preds = %31
  %43 = icmp eq i32 %30, 13
  br i1 %43, label %44, label %46

44:                                               ; preds = %42
  %45 = load ptr, ptr %.sroa.6.0..sroa_idx, align 8, !tbaa !24
  tail call void @List__add__Ptr__Token______(ptr noundef %45, ptr noundef nonnull %29)
  tail call void @Parser__readToken__(ptr noundef %0)
  br label %49

46:                                               ; preds = %42
  %47 = load ptr, ptr @mu_____string77, align 8
  %48 = load i32, ptr getelementptr inbounds (i8, ptr @mu_____string77, i64 8), align 8
  tail call void @Parser__expected__(ptr noundef %0, ptr %47, i32 %48)
  br label %49

49:                                               ; preds = %38, %34, %46, %44
  %.2 = phi i32 [ 2, %34 ], [ %.04767, %38 ], [ 1, %46 ], [ 1, %44 ]
  %50 = load ptr, ptr %2, align 8, !tbaa !5
  %51 = getelementptr inbounds i8, ptr %50, i64 40
  %52 = load i32, ptr %51, align 8, !tbaa !13
  %53 = icmp eq i32 %52, 2147483647
  br i1 %53, label %.lr.ph, label %.thread

.thread:                                          ; preds = %.lr.ph, %49
  %54 = phi ptr [ %29, %.lr.ph ], [ %50, %49 ]
  %.047.lcssa.ph = phi i32 [ %.04767, %.lr.ph ], [ %.2, %49 ]
  %55 = icmp eq i32 %.047.lcssa.ph, 0
  br i1 %55, label %.thread.thread, label %58

.thread.thread:                                   ; preds = %11, %.thread
  %56 = load ptr, ptr @mu_____string297, align 8
  %57 = load i32, ptr getelementptr inbounds (i8, ptr @mu_____string297, i64 8), align 8
  tail call void @Parser__expected__(ptr noundef nonnull %0, ptr %56, i32 %57)
  %.pre = load ptr, ptr %2, align 8, !tbaa !5
  br label %58

58:                                               ; preds = %.thread.thread, %.thread
  %59 = phi ptr [ %.pre, %.thread.thread ], [ %54, %.thread ]
  %60 = getelementptr inbounds i8, ptr %59, i64 40
  %61 = load i32, ptr %60, align 8, !tbaa !13
  %62 = icmp eq i32 %61, 2147483647
  br i1 %62, label %63, label %.critedge57

63:                                               ; preds = %58
  %64 = load i32, ptr %59, align 8, !tbaa !16
  %.not = icmp eq i32 %64, 12
  br i1 %.not, label %65, label %.critedge57

65:                                               ; preds = %63
  store ptr %59, ptr %.sroa.7.0..sroa_idx, align 8, !tbaa !25
  tail call void @Parser__readToken__(ptr noundef nonnull %0)
  br label %68

.critedge57:                                      ; preds = %58, %63
  %66 = load ptr, ptr @mu_____string78, align 8
  %67 = load i32, ptr getelementptr inbounds (i8, ptr @mu_____string78, i64 8), align 8
  tail call void @Parser__expected__(ptr noundef nonnull %0, ptr %66, i32 %67)
  br label %68

68:                                               ; preds = %.critedge57, %65
  store i32 0, ptr %24, align 8, !tbaa !21
  br label %.critedge

.critedge:                                        ; preds = %1, %9, %68
  %.048 = phi ptr [ %16, %68 ], [ null, %9 ], [ null, %1 ]
  ret ptr %.048
}

attributes #0 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { 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, !8, i64 32}
!6 = !{!"tag_____ParserState__", !7, i64 0, !11, i64 16, !8, i64 24, !8, i64 32, !11, i64 40, !11, i64 44, !11, i64 48, !11, i64 52, !11, i64 56, !8, i64 64, !12, i64 72, !11, i64 80, !11, i64 84, !8, i64 88, !11, i64 96, !8, i64 104, !8, i64 112, !8, i64 120}
!7 = !{!"", !8, i64 0, !11, i64 8}
!8 = !{!"any pointer", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C/C++ TBAA"}
!11 = !{!"int", !9, i64 0}
!12 = !{!"tag_____IntRange__", !11, i64 0, !11, i64 4}
!13 = !{!14, !11, i64 40}
!14 = !{!"tag_____Token__", !11, i64 0, !7, i64 8, !12, i64 24, !12, i64 32, !11, i64 40}
!15 = !{!6, !11, i64 44}
!16 = !{!14, !11, i64 0}
!17 = !{!18, !8, i64 8}
!18 = !{!"tag_____IAllocator__", !8, i64 0, !8, i64 8, !8, i64 16, !8, i64 24}
!19 = !{!18, !8, i64 0}
!20 = !{!8, !8, i64 0}
!21 = !{!6, !11, i64 56}
!22 = !{!23, !8, i64 8}
!23 = !{!"tag_____TypeParams__", !8, i64 0, !8, i64 8, !8, i64 16, !8, i64 24}
!24 = !{!23, !8, i64 16}
!25 = !{!23, !8, i64 24}


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