; LLVM IR from ponylang/ponyc :: src/libponyc/pass (names)

; 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.pass_opt_t = type { i32, i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i32, i64, i8, i8, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, %struct.typecheck_t, ptr, ptr }
%struct.typecheck_t = type { ptr, %struct.typecheck_stats_t, ptr }
%struct.typecheck_stats_t = type { i64, i64, i64, i64 }

@.str = external hidden unnamed_addr constant [29 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [33 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

declare ptr @ast_data(ptr noundef) #1

declare void @ast_get_children(ptr noundef, i64 noundef, ptr noundef) #1

; 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
declare hidden ptr @get_package_scope(ptr noundef, ptr noundef, ptr noundef) #2

declare ptr @ast_get(ptr noundef, ptr noundef, ptr noundef) #1

declare ptr @ast_name(ptr noundef) #1

; Function Attrs: nounwind uwtable
define dso_local zeroext i1 @names_nominal(ptr noundef %0, ptr noundef %1, ptr noundef %2, i1 noundef zeroext %3) #2 {
  %5 = alloca i1, align 1
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i8, align 1
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca [6 x ptr], align 16
  %18 = alloca ptr, align 8
  %19 = alloca i8, align 1
  %20 = alloca ptr, align 8
  %21 = alloca ptr, align 8
  %22 = alloca i8, align 1
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  %23 = zext i1 %3 to i8
  store i8 %23, ptr %9, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  %24 = load ptr, ptr %8, align 8, !tbaa !5
  %25 = load ptr, ptr %24, align 8, !tbaa !5
  store ptr %25, ptr %10, align 8, !tbaa !5
  %26 = load ptr, ptr %10, align 8, !tbaa !5
  %27 = call ptr @ast_data(ptr noundef %26)
  %28 = icmp ne ptr %27, null
  br i1 %28, label %29, label %30

29:                                               ; preds = %4
  store i1 true, ptr %5, align 1
  store i32 1, ptr %11, align 4
  br label %152

30:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #3
  call void @llvm.lifetime.start.p0(i64 48, ptr %17) #3
  store ptr %12, ptr %17, align 8, !tbaa !5
  %31 = getelementptr inbounds ptr, ptr %17, i64 1
  store ptr %13, ptr %31, align 8, !tbaa !5
  %32 = getelementptr inbounds ptr, ptr %17, i64 2
  store ptr %14, ptr %32, align 8, !tbaa !5
  %33 = getelementptr inbounds ptr, ptr %17, i64 3
  store ptr %15, ptr %33, align 8, !tbaa !5
  %34 = getelementptr inbounds ptr, ptr %17, i64 4
  store ptr %16, ptr %34, align 8, !tbaa !5
  %35 = getelementptr inbounds ptr, ptr %17, i64 5
  store ptr null, ptr %35, align 8, !tbaa !5
  %36 = load ptr, ptr %10, align 8, !tbaa !5
  %37 = getelementptr inbounds [6 x ptr], ptr %17, i64 0, i64 0
  call void @ast_get_children(ptr noundef %36, i64 noundef 5, ptr noundef %37)
  call void @llvm.lifetime.end.p0(i64 48, ptr %17) #3
  %38 = load ptr, ptr %6, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.pass_opt_t, ptr %38, i32 0, i32 36
  %40 = getelementptr inbounds %struct.typecheck_t, ptr %39, i32 0, i32 1
  %41 = getelementptr inbounds %struct.typecheck_stats_t, ptr %40, i32 0, i32 0
  %42 = load i64, ptr %41, align 8, !tbaa !11
  %43 = add i64 %42, 1
  store i64 %43, ptr %41, align 8, !tbaa !11
  %44 = load ptr, ptr %15, align 8, !tbaa !5
  %45 = call i32 @ast_id(ptr noundef %44)
  %46 = icmp eq i32 %45, 2
  br i1 %46, label %47, label %54

47:                                               ; preds = %30
  %48 = load ptr, ptr %6, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.pass_opt_t, ptr %48, i32 0, i32 36
  %50 = getelementptr inbounds %struct.typecheck_t, ptr %49, i32 0, i32 1
  %51 = getelementptr inbounds %struct.typecheck_stats_t, ptr %50, i32 0, i32 1
  %52 = load i64, ptr %51, align 8, !tbaa !17
  %53 = add i64 %52, 1
  store i64 %53, ptr %51, align 8, !tbaa !17
  br label %54

54:                                               ; preds = %47, %30
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #3
  %55 = load ptr, ptr %6, align 8, !tbaa !5
  %56 = load ptr, ptr %7, align 8, !tbaa !5
  %57 = load ptr, ptr %10, align 8, !tbaa !5
  %58 = call ptr @get_package_scope(ptr noundef %55, ptr noundef %56, ptr noundef %57)
  store ptr %58, ptr %18, align 8, !tbaa !5
  %59 = load ptr, ptr %18, align 8, !tbaa !5
  %60 = icmp eq ptr %59, null
  br i1 %60, label %61, label %62

61:                                               ; preds = %54
  store i1 false, ptr %5, align 1
  store i32 1, ptr %11, align 4
  br label %151

62:                                               ; preds = %54
  call void @llvm.lifetime.start.p0(i64 1, ptr %19) #3
  %63 = load ptr, ptr %18, align 8, !tbaa !5
  %64 = load ptr, ptr %7, align 8, !tbaa !5
  %65 = icmp eq ptr %63, %64
  br i1 %65, label %71, label %66

66:                                               ; preds = %62
  %67 = load ptr, ptr %18, align 8, !tbaa !5
  %68 = load ptr, ptr %10, align 8, !tbaa !5
  %69 = call ptr @ast_nearest(ptr noundef %68, i32 noundef 137)
  %70 = icmp eq ptr %67, %69
  br label %71

71:                                               ; preds = %66, %62
  %72 = phi i1 [ true, %62 ], [ %70, %66 ]
  %73 = zext i1 %72 to i8
  store i8 %73, ptr %19, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #3
  %74 = load ptr, ptr %13, align 8, !tbaa !5
  %75 = call ptr @ast_name(ptr noundef %74)
  store ptr %75, ptr %20, align 8, !tbaa !5
  %76 = load ptr, ptr %20, align 8, !tbaa !5
  %77 = call zeroext i1 @is_name_dontcare(ptr noundef %76)
  br i1 %77, label %78, label %84

78:                                               ; preds = %71
  %79 = load ptr, ptr %6, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.pass_opt_t, ptr %79, i32 0, i32 36
  %81 = getelementptr inbounds %struct.typecheck_t, ptr %80, i32 0, i32 2
  %82 = load ptr, ptr %81, align 8, !tbaa !18
  %83 = load ptr, ptr %13, align 8, !tbaa !5
  call void (ptr, ptr, ptr, ...) @ast_error(ptr noundef %82, ptr noundef %83, ptr noundef @.str)
  store i1 false, ptr %5, align 1
  store i32 1, ptr %11, align 4
  br label %150

84:                                               ; preds = %71
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #3
  %85 = load ptr, ptr %18, align 8, !tbaa !5
  %86 = load ptr, ptr %20, align 8, !tbaa !5
  %87 = call ptr @ast_get(ptr noundef %85, ptr noundef %86, ptr noundef null)
  store ptr %87, ptr %21, align 8, !tbaa !5
  %88 = load ptr, ptr %21, align 8, !tbaa !5
  %89 = icmp eq ptr %88, null
  br i1 %89, label %90, label %94

90:                                               ; preds = %84
  %91 = load ptr, ptr %10, align 8, !tbaa !5
  %92 = load ptr, ptr %20, align 8, !tbaa !5
  %93 = call ptr @ast_get_provided_symbol_definition(ptr noundef %91, ptr noundef %92, ptr noundef null)
  store ptr %93, ptr %21, align 8, !tbaa !5
  br label %94

94:                                               ; preds = %90, %84
  call void @llvm.lifetime.start.p0(i64 1, ptr %22) #3
  store i8 1, ptr %22, align 1, !tbaa !9
  %95 = load ptr, ptr %21, align 8, !tbaa !5
  %96 = icmp eq ptr %95, null
  br i1 %96, label %97, label %104

97:                                               ; preds = %94
  %98 = load ptr, ptr %6, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.pass_opt_t, ptr %98, i32 0, i32 36
  %100 = getelementptr inbounds %struct.typecheck_t, ptr %99, i32 0, i32 2
  %101 = load ptr, ptr %100, align 8, !tbaa !18
  %102 = load ptr, ptr %13, align 8, !tbaa !5
  %103 = load ptr, ptr %20, align 8, !tbaa !5
  call void (ptr, ptr, ptr, ...) @ast_error(ptr noundef %101, ptr noundef %102, ptr noundef @.str.1, ptr noundef %103)
  store i8 0, ptr %22, align 1, !tbaa !9
  br label %147

104:                                              ; preds = %94
  %105 = load i8, ptr %19, align 1, !tbaa !9, !range !19, !noundef !20
  %106 = trunc i8 %105 to i1
  br i1 %106, label %116, label %107

107:                                              ; preds = %104
  %108 = load ptr, ptr %20, align 8, !tbaa !5
  %109 = call zeroext i1 @is_name_private(ptr noundef %108)
  br i1 %109, label %110, label %116

110:                                              ; preds = %107
  %111 = load ptr, ptr %6, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.pass_opt_t, ptr %111, i32 0, i32 36
  %113 = getelementptr inbounds %struct.typecheck_t, ptr %112, i32 0, i32 2
  %114 = load ptr, ptr %113, align 8, !tbaa !18
  %115 = load ptr, ptr %13, align 8, !tbaa !5
  call void (ptr, ptr, ptr, ...) @ast_error(ptr noundef %114, ptr noundef %115, ptr noundef @.str.2)
  store i8 0, ptr %22, align 1, !tbaa !9
  br label %116

116:                                              ; preds = %110, %107, %104
  %117 = load ptr, ptr %21, align 8, !tbaa !5
  %118 = call i32 @ast_id(ptr noundef %117)
  switch i32 %118, label %139 [
    i32 71, label %119
    i32 163, label %127
    i32 72, label %133
    i32 73, label %133
    i32 74, label %133
    i32 75, label %133
    i32 76, label %133
    i32 77, label %133
  ]

119:                                              ; preds = %116
  %120 = load ptr, ptr %6, align 8, !tbaa !5
  %121 = load ptr, ptr %8, align 8, !tbaa !5
  %122 = load ptr, ptr %21, align 8, !tbaa !5
  %123 = load i8, ptr %9, align 1, !tbaa !9, !range !19, !noundef !20
  %124 = trunc i8 %123 to i1
  %125 = call zeroext i1 @names_typealias(ptr noundef %120, ptr noundef %121, ptr noundef %122, i1 noundef zeroext %124)
  %126 = zext i1 %125 to i8
  store i8 %126, ptr %22, align 1, !tbaa !9
  br label %146

127:                                              ; preds = %116
  %128 = load ptr, ptr %6, align 8, !tbaa !5
  %129 = load ptr, ptr %8, align 8, !tbaa !5
  %130 = load ptr, ptr %21, align 8, !tbaa !5
  %131 = call zeroext i1 @names_typeparam(ptr noundef %128, ptr noundef %129, ptr noundef %130)
  %132 = zext i1 %131 to i8
  store i8 %132, ptr %22, align 1, !tbaa !9
  br label %146

133:                                              ; preds = %116, %116, %116, %116, %116, %116
  %134 = load ptr, ptr %6, align 8, !tbaa !5
  %135 = load ptr, ptr %8, align 8, !tbaa !5
  %136 = load ptr, ptr %21, align 8, !tbaa !5
  %137 = call zeroext i1 @names_type(ptr noundef %134, ptr noundef %135, ptr noundef %136)
  %138 = zext i1 %137 to i8
  store i8 %138, ptr %22, align 1, !tbaa !9
  br label %146

139:                                              ; preds = %116
  %140 = load ptr, ptr %6, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct.pass_opt_t, ptr %140, i32 0, i32 36
  %142 = getelementptr inbounds %struct.typecheck_t, ptr %141, i32 0, i32 2
  %143 = load ptr, ptr %142, align 8, !tbaa !18
  %144 = load ptr, ptr %13, align 8, !tbaa !5
  %145 = load ptr, ptr %20, align 8, !tbaa !5
  call void (ptr, ptr, ptr, ...) @ast_error(ptr noundef %143, ptr noundef %144, ptr noundef @.str.3, ptr noundef %145)
  store i8 0, ptr %22, align 1, !tbaa !9
  br label %146

146:                                              ; preds = %139, %133, %127, %119
  br label %147

147:                                              ; preds = %146, %97
  %148 = load i8, ptr %22, align 1, !tbaa !9, !range !19, !noundef !20
  %149 = trunc i8 %148 to i1
  store i1 %149, ptr %5, align 1
  store i32 1, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %22) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #3
  br label %150

150:                                              ; preds = %147, %78
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #3
  br label %151

151:                                              ; preds = %150, %61
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  br label %152

152:                                              ; preds = %151, %29
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  %153 = load i1, ptr %5, align 1
  ret i1 %153
}

declare i32 @ast_id(ptr noundef) #1

declare ptr @ast_nearest(ptr noundef, i32 noundef) #1

declare zeroext i1 @is_name_dontcare(ptr noundef) #1

declare void @ast_error(ptr noundef, ptr noundef, ptr noundef, ...) #1

declare ptr @ast_get_provided_symbol_definition(ptr noundef, ptr noundef, ptr noundef) #1

declare zeroext i1 @is_name_private(ptr noundef) #1

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 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, !10, i64 0}
!10 = !{!"_Bool", !7, i64 0}
!11 = !{!12, !14, i64 184}
!12 = !{!"pass_opt_t", !13, i64 0, !13, i64 4, !10, i64 8, !10, i64 9, !10, i64 10, !10, i64 11, !10, i64 12, !10, i64 13, !10, i64 14, !10, i64 15, !10, i64 16, !10, i64 17, !10, i64 18, !10, i64 19, !10, i64 20, !10, i64 21, !13, i64 24, !14, i64 32, !10, i64 40, !10, i64 41, !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, !15, i64 176, !6, i64 224, !6, i64 232}
!13 = !{!"int", !7, i64 0}
!14 = !{!"long", !7, i64 0}
!15 = !{!"typecheck_t", !6, i64 0, !16, i64 8, !6, i64 40}
!16 = !{!"typecheck_stats_t", !14, i64 0, !14, i64 8, !14, i64 16, !14, i64 24}
!17 = !{!12, !14, i64 192}
!18 = !{!12, !6, i64 216}
!19 = !{i8 0, i8 2}
!20 = !{}


; 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 [29 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [33 x i8], align 1

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

declare ptr @ast_data(ptr noundef) local_unnamed_addr #1

declare void @ast_get_children(ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #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: nounwind uwtable
declare hidden ptr @get_package_scope(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare ptr @ast_get(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare ptr @ast_name(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local zeroext i1 @names_nominal(ptr noundef %0, ptr noundef %1, ptr noundef %2, i1 noundef zeroext %3) local_unnamed_addr #2 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca [6 x ptr], align 16
  %11 = load ptr, ptr %2, align 8, !tbaa !5
  %12 = tail call ptr @ast_data(ptr noundef %11) #3
  %.not = icmp eq ptr %12, null
  br i1 %.not, label %13, label %75

13:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #3
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %10) #3
  store ptr %5, ptr %10, align 16, !tbaa !5
  %14 = getelementptr inbounds i8, ptr %10, i64 8
  store ptr %6, ptr %14, align 8, !tbaa !5
  %15 = getelementptr inbounds i8, ptr %10, i64 16
  store ptr %7, ptr %15, align 16, !tbaa !5
  %16 = getelementptr inbounds i8, ptr %10, i64 24
  store ptr %8, ptr %16, align 8, !tbaa !5
  %17 = getelementptr inbounds i8, ptr %10, i64 32
  store ptr %9, ptr %17, align 16, !tbaa !5
  %18 = getelementptr inbounds i8, ptr %10, i64 40
  store ptr null, ptr %18, align 8, !tbaa !5
  call void @ast_get_children(ptr noundef %11, i64 noundef 5, ptr noundef nonnull %10) #3
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %10) #3
  %19 = getelementptr inbounds i8, ptr %0, i64 184
  %20 = load i64, ptr %19, align 8, !tbaa !9
  %21 = add i64 %20, 1
  store i64 %21, ptr %19, align 8, !tbaa !9
  %22 = load ptr, ptr %8, align 8, !tbaa !5
  %23 = call i32 @ast_id(ptr noundef %22) #3
  %24 = icmp eq i32 %23, 2
  br i1 %24, label %25, label %29

25:                                               ; preds = %13
  %26 = getelementptr inbounds i8, ptr %0, i64 192
  %27 = load i64, ptr %26, align 8, !tbaa !16
  %28 = add i64 %27, 1
  store i64 %28, ptr %26, align 8, !tbaa !16
  br label %29

29:                                               ; preds = %25, %13
  %30 = call ptr @get_package_scope(ptr noundef nonnull %0, ptr noundef %1, ptr noundef %11)
  %31 = icmp eq ptr %30, null
  br i1 %31, label %74, label %32

32:                                               ; preds = %29
  %33 = icmp eq ptr %30, %1
  br i1 %33, label %37, label %34

34:                                               ; preds = %32
  %35 = call ptr @ast_nearest(ptr noundef %11, i32 noundef 137) #3
  %36 = icmp eq ptr %30, %35
  br label %37

37:                                               ; preds = %34, %32
  %38 = phi i1 [ true, %32 ], [ %36, %34 ]
  %39 = load ptr, ptr %6, align 8, !tbaa !5
  %40 = call ptr @ast_name(ptr noundef %39) #3
  %41 = call zeroext i1 @is_name_dontcare(ptr noundef %40) #3
  br i1 %41, label %42, label %46

42:                                               ; preds = %37
  %43 = getelementptr inbounds i8, ptr %0, i64 216
  %44 = load ptr, ptr %43, align 8, !tbaa !17
  %45 = load ptr, ptr %6, align 8, !tbaa !5
  call void (ptr, ptr, ptr, ...) @ast_error(ptr noundef %44, ptr noundef %45, ptr noundef nonnull @.str) #3
  br label %74

46:                                               ; preds = %37
  %47 = call ptr @ast_get(ptr noundef nonnull %30, ptr noundef %40, ptr noundef null) #3
  %48 = icmp eq ptr %47, null
  br i1 %48, label %49, label %.thread

49:                                               ; preds = %46
  %50 = call ptr @ast_get_provided_symbol_definition(ptr noundef %11, ptr noundef %40, ptr noundef null) #3
  %51 = icmp eq ptr %50, null
  br i1 %51, label %52, label %.thread

52:                                               ; preds = %49
  %53 = getelementptr inbounds i8, ptr %0, i64 216
  %54 = load ptr, ptr %53, align 8, !tbaa !17
  %55 = load ptr, ptr %6, align 8, !tbaa !5
  call void (ptr, ptr, ptr, ...) @ast_error(ptr noundef %54, ptr noundef %55, ptr noundef nonnull @.str.1, ptr noundef %40) #3
  br label %74

.thread:                                          ; preds = %46, %49
  %.04045 = phi ptr [ %50, %49 ], [ %47, %46 ]
  br i1 %38, label %62, label %56

56:                                               ; preds = %.thread
  %57 = call zeroext i1 @is_name_private(ptr noundef %40) #3
  br i1 %57, label %58, label %62

58:                                               ; preds = %56
  %59 = getelementptr inbounds i8, ptr %0, i64 216
  %60 = load ptr, ptr %59, align 8, !tbaa !17
  %61 = load ptr, ptr %6, align 8, !tbaa !5
  call void (ptr, ptr, ptr, ...) @ast_error(ptr noundef %60, ptr noundef %61, ptr noundef nonnull @.str.2) #3
  br label %62

62:                                               ; preds = %58, %56, %.thread
  %63 = call i32 @ast_id(ptr noundef nonnull %.04045) #3
  switch i32 %63, label %70 [
    i32 71, label %64
    i32 163, label %66
    i32 72, label %68
    i32 73, label %68
    i32 74, label %68
    i32 75, label %68
    i32 76, label %68
    i32 77, label %68
  ]

64:                                               ; preds = %62
  %65 = call zeroext i1 @names_typealias(ptr noundef nonnull %0, ptr noundef nonnull %2, ptr noundef nonnull %.04045, i1 noundef zeroext %3)
  br label %74

66:                                               ; preds = %62
  %67 = call zeroext i1 @names_typeparam(ptr noundef nonnull %0, ptr noundef nonnull %2, ptr noundef nonnull %.04045)
  br label %74

68:                                               ; preds = %62, %62, %62, %62, %62, %62
  %69 = call zeroext i1 @names_type(ptr noundef nonnull %0, ptr noundef nonnull %2, ptr noundef nonnull %.04045)
  br label %74

70:                                               ; preds = %62
  %71 = getelementptr inbounds i8, ptr %0, i64 216
  %72 = load ptr, ptr %71, align 8, !tbaa !17
  %73 = load ptr, ptr %6, align 8, !tbaa !5
  call void (ptr, ptr, ptr, ...) @ast_error(ptr noundef %72, ptr noundef %73, ptr noundef nonnull @.str.3, ptr noundef %40) #3
  br label %74

74:                                               ; preds = %42, %64, %66, %68, %70, %52, %29
  %.1 = phi i1 [ false, %29 ], [ false, %42 ], [ false, %52 ], [ false, %70 ], [ %69, %68 ], [ %67, %66 ], [ %65, %64 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #3
  br label %75

75:                                               ; preds = %4, %74
  %.2 = phi i1 [ %.1, %74 ], [ true, %4 ]
  ret i1 %.2
}

declare i32 @ast_id(ptr noundef) local_unnamed_addr #1

declare ptr @ast_nearest(ptr noundef, i32 noundef) local_unnamed_addr #1

declare zeroext i1 @is_name_dontcare(ptr noundef) local_unnamed_addr #1

declare void @ast_error(ptr noundef, ptr noundef, ptr noundef, ...) local_unnamed_addr #1

declare ptr @ast_get_provided_symbol_definition(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare zeroext i1 @is_name_private(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden zeroext i1 @names_typealias(ptr noundef, ptr noundef, ptr noundef, i1 noundef zeroext) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare hidden zeroext i1 @names_typeparam(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare hidden zeroext i1 @names_type(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 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 184}
!10 = !{!"pass_opt_t", !11, i64 0, !11, i64 4, !12, i64 8, !12, i64 9, !12, i64 10, !12, i64 11, !12, i64 12, !12, i64 13, !12, i64 14, !12, i64 15, !12, i64 16, !12, i64 17, !12, i64 18, !12, i64 19, !12, i64 20, !12, i64 21, !11, i64 24, !13, i64 32, !12, i64 40, !12, i64 41, !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, !14, i64 176, !6, i64 224, !6, i64 232}
!11 = !{!"int", !7, i64 0}
!12 = !{!"_Bool", !7, i64 0}
!13 = !{!"long", !7, i64 0}
!14 = !{!"typecheck_t", !6, i64 0, !15, i64 8, !6, i64 40}
!15 = !{!"typecheck_stats_t", !13, i64 0, !13, i64 8, !13, i64 16, !13, i64 24}
!16 = !{!10, !13, i64 192}
!17 = !{!10, !6, i64 216}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,SROAPass,SimplifyCFGPass,TailCallElimPass