; LLVM IR from nickmqb/muon :: bootstrap/mu.ll_TypeCheckerFirstPass (checkTypeParams__)

; 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_____Error__ = type { ptr, %struct.tag_____IntRange__, %struct.string__ }
%struct.tag_____IntRange__ = type { i32, i32 }
%struct.tag_____List__Ptr__Namespace______ = type { ptr, i32, i32 }
%struct.tag_____Namespace__ = type { %struct.string__, ptr, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32 }
%struct.tag_____TypeParams__ = type { ptr, ptr, ptr, ptr }
%struct.tag_____List__Ptr__Token______ = type { ptr, i32, i32 }
%struct.tag_____Token__ = type { i32, %struct.string__, %struct.tag_____IntRange__, %struct.tag_____IntRange__, i32 }
%struct.tag_____TypeCheckerContext__ = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, ptr, i32, i8 }

@mu_____string99 = external dso_local global %struct.string__, align 8
@mu_____string98 = 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__Error____(ptr noundef, ptr noundef byval(%struct.tag_____Error__) align 8) #4

; Function Attrs: nounwind uwtable
declare dso_local void @Error__at__(ptr dead_on_unwind noalias writable sret(%struct.tag_____Error__) align 8, ptr noundef, i64, ptr, i32) #4

; Function Attrs: nounwind uwtable
declare dso_local zeroext i8 @TypeCheckerFirstPass__isSingleUppercaseLetter__(ptr, i32) #4

; Function Attrs: nounwind uwtable
define dso_local ptr @TypeCheckerFirstPass__checkTypeParams__(ptr noundef %0, ptr noundef %1) #4 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca %struct.tag_____List__Ptr__Namespace______, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca %struct.tag_____Namespace__, align 8
  %13 = alloca %struct.tag_____Error__, align 8
  %14 = alloca %struct.tag_____Error__, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  %15 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @top_____currentAllocator__)
  %16 = getelementptr inbounds %struct.tag_____IAllocator__, ptr %15, i32 0, i32 1
  %17 = load ptr, ptr %16, align 8, !tbaa !9
  %18 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @top_____currentAllocator__)
  %19 = getelementptr inbounds %struct.tag_____IAllocator__, ptr %18, i32 0, i32 0
  %20 = load ptr, ptr %19, align 8, !tbaa !11
  %21 = call ptr %17(ptr noundef %20, i64 noundef 16)
  store ptr %21, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %6) #5
  call void @llvm.memset.p0.i64(ptr align 8 %6, i8 0, i64 16, i1 false)
  %22 = load ptr, ptr %5, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %22, ptr align 8 %6, i64 16, i1 false), !tbaa.struct !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %23 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %23, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %24 = load ptr, ptr %4, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.tag_____TypeParams__, ptr %24, i32 0, i32 1
  %26 = load ptr, ptr %25, align 8, !tbaa !15
  store ptr %26, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  store i32 0, ptr %9, align 4, !tbaa !13
  br label %27

27:                                               ; preds = %101, %2
  %28 = load i32, ptr %9, align 4, !tbaa !13
  %29 = load ptr, ptr %8, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.tag_____List__Ptr__Token______, ptr %29, i32 0, i32 1
  %31 = load i32, ptr %30, align 8, !tbaa !17
  %32 = icmp slt i32 %28, %31
  br i1 %32, label %33, label %104

33:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %34 = load ptr, ptr %8, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.tag_____List__Ptr__Token______, ptr %34, i32 0, i32 0
  %36 = load ptr, ptr %35, align 8, !tbaa !19
  %37 = load i32, ptr %9, align 4, !tbaa !13
  %38 = sext i32 %37 to i64
  %39 = getelementptr inbounds ptr, ptr %36, i64 %38
  %40 = load ptr, ptr %39, align 8, !tbaa !5
  store ptr %40, ptr %10, align 8, !tbaa !5
  %41 = load ptr, ptr %10, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.tag_____Token__, ptr %41, i32 0, i32 1
  %43 = getelementptr inbounds { ptr, i32 }, ptr %42, i32 0, i32 0
  %44 = load ptr, ptr %43, align 8
  %45 = getelementptr inbounds { ptr, i32 }, ptr %42, i32 0, i32 1
  %46 = load i32, ptr %45, align 8
  %47 = call zeroext i8 @TypeCheckerFirstPass__isSingleUppercaseLetter__(ptr %44, i32 %46)
  %48 = icmp ne i8 %47, 0
  br i1 %48, label %49, label %88

49:                                               ; preds = %33
  %50 = load ptr, ptr %7, align 8, !tbaa !5
  %51 = load ptr, ptr %10, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.tag_____Token__, ptr %51, i32 0, i32 1
  %53 = getelementptr inbounds { ptr, i32 }, ptr %52, i32 0, i32 0
  %54 = load ptr, ptr %53, align 8
  %55 = getelementptr inbounds { ptr, i32 }, ptr %52, i32 0, i32 1
  %56 = load i32, ptr %55, align 8
  %57 = call ptr @TypeChecker__findTypeParamByNameOrNull__(ptr noundef %50, ptr %54, i32 %56)
  %58 = icmp eq ptr %57, null
  br i1 %58, label %59, label %74

59:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %60 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @top_____currentAllocator__)
  %61 = getelementptr inbounds %struct.tag_____IAllocator__, ptr %60, i32 0, i32 1
  %62 = load ptr, ptr %61, align 8, !tbaa !9
  %63 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @top_____currentAllocator__)
  %64 = getelementptr inbounds %struct.tag_____IAllocator__, ptr %63, i32 0, i32 0
  %65 = load ptr, ptr %64, align 8, !tbaa !11
  %66 = call ptr %62(ptr noundef %65, i64 noundef 112)
  store ptr %66, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 112, ptr %12) #5
  call void @llvm.memset.p0.i64(ptr align 8 %12, i8 0, i64 112, i1 false)
  %67 = getelementptr inbounds %struct.tag_____Namespace__, ptr %12, i32 0, i32 0
  %68 = load ptr, ptr %10, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.tag_____Token__, ptr %68, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %67, ptr align 8 %69, i64 16, i1 false), !tbaa.struct !20
  %70 = getelementptr inbounds %struct.tag_____Namespace__, ptr %12, i32 0, i32 3
  store i32 16384, ptr %70, align 4, !tbaa !21
  %71 = load ptr, ptr %11, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %71, ptr align 8 %12, i64 112, i1 false), !tbaa.struct !24
  %72 = load ptr, ptr %7, align 8, !tbaa !5
  %73 = load ptr, ptr %11, align 8, !tbaa !5
  call void @List__add__Ptr__Namespace______(ptr noundef %72, ptr noundef %73)
  call void @llvm.lifetime.end.p0(i64 112, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  br label %87

74:                                               ; preds = %49
  %75 = load ptr, ptr %7, align 8, !tbaa !5
  call void @List__add__Ptr__Namespace______(ptr noundef %75, ptr noundef null)
  %76 = load ptr, ptr %3, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.tag_____TypeCheckerContext__, ptr %76, i32 0, i32 2
  %78 = load ptr, ptr %77, align 8, !tbaa !25
  %79 = load ptr, ptr %3, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.tag_____TypeCheckerContext__, ptr %79, i32 0, i32 5
  %81 = load ptr, ptr %80, align 8, !tbaa !27
  %82 = load ptr, ptr %10, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.tag_____Token__, ptr %82, i32 0, i32 2
  %84 = load i64, ptr %83, align 8
  %85 = load ptr, ptr @mu_____string98, align 8
  %86 = load i32, ptr getelementptr inbounds ({ ptr, i32 }, ptr @mu_____string98, i32 0, i32 1), align 8
  call void @Error__at__(ptr dead_on_unwind writable sret(%struct.tag_____Error__) align 8 %13, ptr noundef %81, i64 %84, ptr %85, i32 %86)
  call void @List__add__Error____(ptr noundef %78, ptr noundef byval(%struct.tag_____Error__) align 8 %13)
  br label %87

87:                                               ; preds = %74, %59
  br label %101

88:                                               ; preds = %33
  %89 = load ptr, ptr %7, align 8, !tbaa !5
  call void @List__add__Ptr__Namespace______(ptr noundef %89, ptr noundef null)
  %90 = load ptr, ptr %3, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.tag_____TypeCheckerContext__, ptr %90, i32 0, i32 2
  %92 = load ptr, ptr %91, align 8, !tbaa !25
  %93 = load ptr, ptr %3, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.tag_____TypeCheckerContext__, ptr %93, i32 0, i32 5
  %95 = load ptr, ptr %94, align 8, !tbaa !27
  %96 = load ptr, ptr %10, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.tag_____Token__, ptr %96, i32 0, i32 2
  %98 = load i64, ptr %97, align 8
  %99 = load ptr, ptr @mu_____string99, align 8
  %100 = load i32, ptr getelementptr inbounds ({ ptr, i32 }, ptr @mu_____string99, i32 0, i32 1), align 8
  call void @Error__at__(ptr dead_on_unwind writable sret(%struct.tag_____Error__) align 8 %14, ptr noundef %95, i64 %98, ptr %99, i32 %100)
  call void @List__add__Error____(ptr noundef %92, ptr noundef byval(%struct.tag_____Error__) align 8 %14)
  br label %101

101:                                              ; preds = %88, %87
  %102 = load i32, ptr %9, align 4, !tbaa !13
  %103 = add nsw i32 %102, 1
  store i32 %103, ptr %9, align 4, !tbaa !13
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  br label %27, !llvm.loop !28

104:                                              ; preds = %27
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  %105 = load ptr, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  ret ptr %105
}

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

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

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 8}
!10 = !{!"tag_____IAllocator__", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!11 = !{!10, !6, i64 0}
!12 = !{i64 0, i64 8, !5, i64 8, i64 4, !13, i64 12, i64 4, !13}
!13 = !{!14, !14, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = !{!16, !6, i64 8}
!16 = !{!"tag_____TypeParams__", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!17 = !{!18, !14, i64 8}
!18 = !{!"tag_____List__Ptr__Token______", !6, i64 0, !14, i64 8, !14, i64 12}
!19 = !{!18, !6, i64 0}
!20 = !{i64 0, i64 8, !5, i64 8, i64 4, !13}
!21 = !{!22, !14, i64 28}
!22 = !{!"tag_____Namespace__", !23, i64 0, !6, i64 16, !14, i64 24, !14, i64 28, !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, !14, i64 104}
!23 = !{!"", !6, i64 0, !14, i64 8}
!24 = !{i64 0, i64 8, !5, i64 8, i64 4, !13, i64 16, i64 8, !5, i64 24, i64 4, !13, i64 28, i64 4, !13, i64 32, i64 8, !5, i64 40, i64 8, !5, i64 48, i64 8, !5, i64 56, i64 8, !5, i64 64, i64 8, !5, i64 72, i64 8, !5, i64 80, i64 8, !5, i64 88, i64 8, !5, i64 96, i64 8, !5, i64 104, i64 4, !13}
!25 = !{!26, !6, i64 16}
!26 = !{!"tag_____TypeCheckerContext__", !6, i64 0, !6, i64 8, !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, !14, i64 120, !14, i64 124, !6, i64 128, !14, i64 136, !7, i64 140}
!27 = !{!26, !6, i64 40}
!28 = distinct !{!28, !29}
!29 = !{!"llvm.loop.mustprogress"}


; 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 }
%struct.tag_____Error__ = type { ptr, %struct.tag_____IntRange__, %struct.string__ }
%struct.tag_____IntRange__ = type { i32, i32 }

@mu_____string99 = external dso_local local_unnamed_addr global %struct.string__, align 8
@mu_____string98 = 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 willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

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

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

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

; Function Attrs: mustprogress 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__Error____(ptr noundef, ptr noundef byval(%struct.tag_____Error__) align 8) local_unnamed_addr #4

; Function Attrs: nounwind uwtable
declare dso_local void @Error__at__(ptr dead_on_unwind noalias writable sret(%struct.tag_____Error__) align 8, ptr noundef, i64, ptr, i32) local_unnamed_addr #4

; Function Attrs: nounwind uwtable
declare dso_local zeroext i8 @TypeCheckerFirstPass__isSingleUppercaseLetter__(ptr, i32) local_unnamed_addr #4

; Function Attrs: nounwind uwtable
define dso_local noundef ptr @TypeCheckerFirstPass__checkTypeParams__(ptr nocapture noundef readonly %0, ptr nocapture noundef readonly %1) local_unnamed_addr #4 {
  %.sroa.0 = alloca [28 x i8], align 8
  %3 = alloca %struct.tag_____Error__, align 8
  %4 = alloca %struct.tag_____Error__, align 8
  %5 = tail call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @top_____currentAllocator__)
  %6 = getelementptr inbounds i8, ptr %5, i64 8
  %7 = load ptr, ptr %6, align 8, !tbaa !5
  %8 = load ptr, ptr %5, align 8, !tbaa !10
  %9 = tail call ptr %7(ptr noundef %8, i64 noundef 16) #5
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %9, i8 0, i64 16, i1 false)
  %10 = getelementptr inbounds i8, ptr %1, i64 8
  %11 = load ptr, ptr %10, align 8, !tbaa !11
  %12 = getelementptr inbounds i8, ptr %11, i64 8
  %13 = load i32, ptr %12, align 8, !tbaa !13
  %14 = icmp sgt i32 %13, 0
  br i1 %14, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %2
  %15 = getelementptr inbounds i8, ptr %0, i64 16
  %16 = getelementptr inbounds i8, ptr %0, i64 40
  %.sroa.0.16.sroa_idx = getelementptr inbounds i8, ptr %.sroa.0, i64 16
  br label %17

17:                                               ; preds = %.lr.ph, %49
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %49 ]
  %18 = load ptr, ptr %11, align 8, !tbaa !16
  %19 = getelementptr inbounds ptr, ptr %18, i64 %indvars.iv
  %20 = load ptr, ptr %19, align 8, !tbaa !17
  %21 = getelementptr inbounds i8, ptr %20, i64 8
  %22 = load ptr, ptr %21, align 8
  %23 = getelementptr inbounds i8, ptr %20, i64 16
  %24 = load i32, ptr %23, align 8
  %25 = call zeroext i8 @TypeCheckerFirstPass__isSingleUppercaseLetter__(ptr %22, i32 %24)
  %.not = icmp eq i8 %25, 0
  br i1 %.not, label %42, label %26

26:                                               ; preds = %17
  %27 = load ptr, ptr %21, align 8
  %28 = load i32, ptr %23, align 8
  %29 = call ptr @TypeChecker__findTypeParamByNameOrNull__(ptr noundef %9, ptr %27, i32 %28)
  %30 = icmp eq ptr %29, null
  br i1 %30, label %31, label %35

31:                                               ; preds = %26
  %32 = load ptr, ptr %6, align 8, !tbaa !5
  %33 = load ptr, ptr %5, align 8, !tbaa !10
  %34 = call ptr %32(ptr noundef %33, i64 noundef 112) #5
  call void @llvm.lifetime.start.p0(i64 28, ptr nonnull %.sroa.0)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(12) %.sroa.0.16.sroa_idx, i8 0, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %.sroa.0, ptr noundef nonnull align 8 dereferenceable(16) %21, i64 16, i1 false), !tbaa.struct !18
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(28) %34, ptr noundef nonnull align 8 dereferenceable(28) %.sroa.0, i64 28, i1 false), !tbaa.struct !20
  %.sroa.5.0..sroa_idx = getelementptr inbounds i8, ptr %34, i64 28
  store i32 16384, ptr %.sroa.5.0..sroa_idx, align 4, !tbaa !19
  %.sroa.6.0..sroa_idx = getelementptr inbounds i8, ptr %34, i64 32
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(80) %.sroa.6.0..sroa_idx, i8 0, i64 80, i1 false)
  call void @List__add__Ptr__Namespace______(ptr noundef %9, ptr noundef %34)
  call void @llvm.lifetime.end.p0(i64 28, ptr nonnull %.sroa.0)
  br label %49

35:                                               ; preds = %26
  call void @List__add__Ptr__Namespace______(ptr noundef %9, ptr noundef null)
  %36 = load ptr, ptr %15, align 8, !tbaa !21
  %37 = load ptr, ptr %16, align 8, !tbaa !23
  %38 = getelementptr inbounds i8, ptr %20, i64 24
  %39 = load i64, ptr %38, align 8
  %40 = load ptr, ptr @mu_____string98, align 8
  %41 = load i32, ptr getelementptr inbounds (i8, ptr @mu_____string98, i64 8), align 8
  call void @Error__at__(ptr dead_on_unwind nonnull writable sret(%struct.tag_____Error__) align 8 %3, ptr noundef %37, i64 %39, ptr %40, i32 %41)
  call void @List__add__Error____(ptr noundef %36, ptr noundef nonnull byval(%struct.tag_____Error__) align 8 %3)
  br label %49

42:                                               ; preds = %17
  call void @List__add__Ptr__Namespace______(ptr noundef %9, ptr noundef null)
  %43 = load ptr, ptr %15, align 8, !tbaa !21
  %44 = load ptr, ptr %16, align 8, !tbaa !23
  %45 = getelementptr inbounds i8, ptr %20, i64 24
  %46 = load i64, ptr %45, align 8
  %47 = load ptr, ptr @mu_____string99, align 8
  %48 = load i32, ptr getelementptr inbounds (i8, ptr @mu_____string99, i64 8), align 8
  call void @Error__at__(ptr dead_on_unwind nonnull writable sret(%struct.tag_____Error__) align 8 %4, ptr noundef %44, i64 %46, ptr %47, i32 %48)
  call void @List__add__Error____(ptr noundef %43, ptr noundef nonnull byval(%struct.tag_____Error__) align 8 %4)
  br label %49

49:                                               ; preds = %31, %35, %42
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %50 = load i32, ptr %12, align 8, !tbaa !13
  %51 = sext i32 %50 to i64
  %52 = icmp slt i64 %indvars.iv.next, %51
  br i1 %52, label %17, label %._crit_edge, !llvm.loop !24

._crit_edge:                                      ; preds = %49, %2
  ret ptr %9
}

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { mustprogress 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, !7, i64 8}
!6 = !{!"tag_____IAllocator__", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!6, !7, i64 0}
!11 = !{!12, !7, i64 8}
!12 = !{!"tag_____TypeParams__", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24}
!13 = !{!14, !15, i64 8}
!14 = !{!"tag_____List__Ptr__Token______", !7, i64 0, !15, i64 8, !15, i64 12}
!15 = !{!"int", !8, i64 0}
!16 = !{!14, !7, i64 0}
!17 = !{!7, !7, i64 0}
!18 = !{i64 0, i64 8, !17, i64 8, i64 4, !19}
!19 = !{!15, !15, i64 0}
!20 = !{i64 0, i64 8, !17, i64 8, i64 4, !19, i64 16, i64 8, !17, i64 24, i64 4, !19, i64 28, i64 4, !19, i64 32, i64 8, !17, i64 40, i64 8, !17, i64 48, i64 8, !17, i64 56, i64 8, !17, i64 64, i64 8, !17, i64 72, i64 8, !17, i64 80, i64 8, !17, i64 88, i64 8, !17, i64 96, i64 8, !17, i64 104, i64 4, !19}
!21 = !{!22, !7, i64 16}
!22 = !{!"tag_____TypeCheckerContext__", !7, i64 0, !7, i64 8, !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, !15, i64 120, !15, i64 124, !7, i64 128, !15, i64 136, !8, i64 140}
!23 = !{!22, !7, i64 40}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}


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