; LLVM IR from ponylang/ponyc :: src/libponyc/type (assemble)

; 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.1 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [29 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 zeroext i1 @names_nominal(ptr noundef, ptr noundef, ptr noundef, i1 noundef zeroext) #1

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

declare void @ast_free(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
define dso_local ptr @type_pointer_to(ptr noundef %0, ptr noundef %1) #2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %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 ptr, align 8
  %11 = alloca ptr, align 8
  %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 i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #3
  %18 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %18, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  store ptr null, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  store ptr null, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  store ptr null, ptr %10, align 8, !tbaa !5
  %19 = load ptr, ptr %7, align 8, !tbaa !5
  %20 = call ptr @ast_from(ptr noundef %19, i32 noundef 151)
  store ptr %20, ptr %10, align 8, !tbaa !5
  %21 = load ptr, ptr %8, align 8, !tbaa !5
  %22 = icmp eq ptr %21, null
  br i1 %22, label %23, label %25

23:                                               ; preds = %2
  %24 = load ptr, ptr %10, align 8, !tbaa !5
  store ptr %24, ptr %8, align 8, !tbaa !5
  br label %37

25:                                               ; preds = %2
  %26 = load ptr, ptr %9, align 8, !tbaa !5
  %27 = icmp eq ptr %26, null
  br i1 %27, label %28, label %32

28:                                               ; preds = %25
  %29 = load ptr, ptr %8, align 8, !tbaa !5
  %30 = load ptr, ptr %10, align 8, !tbaa !5
  %31 = call ptr @ast_add(ptr noundef %29, ptr noundef %30)
  store ptr %31, ptr %9, align 8, !tbaa !5
  br label %36

32:                                               ; preds = %25
  %33 = load ptr, ptr %9, align 8, !tbaa !5
  %34 = load ptr, ptr %10, align 8, !tbaa !5
  %35 = call ptr @ast_add_sibling(ptr noundef %33, ptr noundef %34)
  store ptr %35, ptr %9, align 8, !tbaa !5
  br label %36

36:                                               ; preds = %32, %28
  br label %37

37:                                               ; preds = %36, %23
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  %38 = load ptr, ptr %10, align 8, !tbaa !5
  store ptr %38, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  store ptr null, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #3
  store ptr null, ptr %13, align 8, !tbaa !5
  %39 = load ptr, ptr %11, align 8, !tbaa !5
  %40 = icmp eq ptr %39, null
  br i1 %40, label %41, label %44

41:                                               ; preds = %37
  %42 = load ptr, ptr %7, align 8, !tbaa !5
  %43 = call ptr @ast_from(ptr noundef %42, i32 noundef 2)
  store ptr %43, ptr %11, align 8, !tbaa !5
  br label %58

44:                                               ; preds = %37
  %45 = load ptr, ptr %12, align 8, !tbaa !5
  %46 = icmp eq ptr %45, null
  br i1 %46, label %47, label %52

47:                                               ; preds = %44
  %48 = load ptr, ptr %11, align 8, !tbaa !5
  %49 = load ptr, ptr %7, align 8, !tbaa !5
  %50 = call ptr @ast_from(ptr noundef %49, i32 noundef 2)
  %51 = call ptr @ast_add(ptr noundef %48, ptr noundef %50)
  store ptr %51, ptr %12, align 8, !tbaa !5
  br label %57

52:                                               ; preds = %44
  %53 = load ptr, ptr %12, align 8, !tbaa !5
  %54 = load ptr, ptr %7, align 8, !tbaa !5
  %55 = call ptr @ast_from(ptr noundef %54, i32 noundef 2)
  %56 = call ptr @ast_add_sibling(ptr noundef %53, ptr noundef %55)
  store ptr %56, ptr %12, align 8, !tbaa !5
  br label %57

57:                                               ; preds = %52, %47
  br label %58

58:                                               ; preds = %57, %41
  %59 = load ptr, ptr %11, align 8, !tbaa !5
  %60 = icmp eq ptr %59, null
  br i1 %60, label %61, label %64

61:                                               ; preds = %58
  %62 = load ptr, ptr %7, align 8, !tbaa !5
  %63 = call ptr @ast_from_string(ptr noundef %62, ptr noundef @.str.1)
  store ptr %63, ptr %11, align 8, !tbaa !5
  br label %78

64:                                               ; preds = %58
  %65 = load ptr, ptr %12, align 8, !tbaa !5
  %66 = icmp eq ptr %65, null
  br i1 %66, label %67, label %72

67:                                               ; preds = %64
  %68 = load ptr, ptr %11, align 8, !tbaa !5
  %69 = load ptr, ptr %7, align 8, !tbaa !5
  %70 = call ptr @ast_from_string(ptr noundef %69, ptr noundef @.str.1)
  %71 = call ptr @ast_add(ptr noundef %68, ptr noundef %70)
  store ptr %71, ptr %12, align 8, !tbaa !5
  br label %77

72:                                               ; preds = %64
  %73 = load ptr, ptr %12, align 8, !tbaa !5
  %74 = load ptr, ptr %7, align 8, !tbaa !5
  %75 = call ptr @ast_from_string(ptr noundef %74, ptr noundef @.str.1)
  %76 = call ptr @ast_add_sibling(ptr noundef %73, ptr noundef %75)
  store ptr %76, ptr %12, align 8, !tbaa !5
  br label %77

77:                                               ; preds = %72, %67
  br label %78

78:                                               ; preds = %77, %61
  %79 = load ptr, ptr %7, align 8, !tbaa !5
  %80 = call ptr @ast_from(ptr noundef %79, i32 noundef 166)
  store ptr %80, ptr %13, align 8, !tbaa !5
  %81 = load ptr, ptr %11, align 8, !tbaa !5
  %82 = icmp eq ptr %81, null
  br i1 %82, label %83, label %85

83:                                               ; preds = %78
  %84 = load ptr, ptr %13, align 8, !tbaa !5
  store ptr %84, ptr %11, align 8, !tbaa !5
  br label %97

85:                                               ; preds = %78
  %86 = load ptr, ptr %12, align 8, !tbaa !5
  %87 = icmp eq ptr %86, null
  br i1 %87, label %88, label %92

88:                                               ; preds = %85
  %89 = load ptr, ptr %11, align 8, !tbaa !5
  %90 = load ptr, ptr %13, align 8, !tbaa !5
  %91 = call ptr @ast_add(ptr noundef %89, ptr noundef %90)
  store ptr %91, ptr %12, align 8, !tbaa !5
  br label %96

92:                                               ; preds = %85
  %93 = load ptr, ptr %12, align 8, !tbaa !5
  %94 = load ptr, ptr %13, align 8, !tbaa !5
  %95 = call ptr @ast_add_sibling(ptr noundef %93, ptr noundef %94)
  store ptr %95, ptr %12, align 8, !tbaa !5
  br label %96

96:                                               ; preds = %92, %88
  br label %97

97:                                               ; preds = %96, %83
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #3
  %98 = load ptr, ptr %13, align 8, !tbaa !5
  store ptr %98, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #3
  store ptr null, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #3
  store ptr null, ptr %16, align 8, !tbaa !5
  %99 = load ptr, ptr %14, align 8, !tbaa !5
  %100 = icmp eq ptr %99, null
  br i1 %100, label %101, label %103

101:                                              ; preds = %97
  %102 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %102, ptr %14, align 8, !tbaa !5
  br label %115

103:                                              ; preds = %97
  %104 = load ptr, ptr %15, align 8, !tbaa !5
  %105 = icmp eq ptr %104, null
  br i1 %105, label %106, label %110

106:                                              ; preds = %103
  %107 = load ptr, ptr %14, align 8, !tbaa !5
  %108 = load ptr, ptr %5, align 8, !tbaa !5
  %109 = call ptr @ast_add(ptr noundef %107, ptr noundef %108)
  store ptr %109, ptr %15, align 8, !tbaa !5
  br label %114

110:                                              ; preds = %103
  %111 = load ptr, ptr %15, align 8, !tbaa !5
  %112 = load ptr, ptr %5, align 8, !tbaa !5
  %113 = call ptr @ast_add_sibling(ptr noundef %111, ptr noundef %112)
  store ptr %113, ptr %15, align 8, !tbaa !5
  br label %114

114:                                              ; preds = %110, %106
  br label %115

115:                                              ; preds = %114, %101
  %116 = load ptr, ptr %14, align 8, !tbaa !5
  call void @ast_inheritflags(ptr noundef %116)
  %117 = load ptr, ptr %14, align 8, !tbaa !5
  %118 = load ptr, ptr %15, align 8, !tbaa !5
  %119 = load ptr, ptr %16, align 8, !tbaa !5
  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
  %120 = load ptr, ptr %11, align 8, !tbaa !5
  %121 = icmp eq ptr %120, null
  br i1 %121, label %122, label %125

122:                                              ; preds = %115
  %123 = load ptr, ptr %7, align 8, !tbaa !5
  %124 = call ptr @ast_from(ptr noundef %123, i32 noundef 2)
  store ptr %124, ptr %11, align 8, !tbaa !5
  br label %139

125:                                              ; preds = %115
  %126 = load ptr, ptr %12, align 8, !tbaa !5
  %127 = icmp eq ptr %126, null
  br i1 %127, label %128, label %133

128:                                              ; preds = %125
  %129 = load ptr, ptr %11, align 8, !tbaa !5
  %130 = load ptr, ptr %7, align 8, !tbaa !5
  %131 = call ptr @ast_from(ptr noundef %130, i32 noundef 2)
  %132 = call ptr @ast_add(ptr noundef %129, ptr noundef %131)
  store ptr %132, ptr %12, align 8, !tbaa !5
  br label %138

133:                                              ; preds = %125
  %134 = load ptr, ptr %12, align 8, !tbaa !5
  %135 = load ptr, ptr %7, align 8, !tbaa !5
  %136 = call ptr @ast_from(ptr noundef %135, i32 noundef 2)
  %137 = call ptr @ast_add_sibling(ptr noundef %134, ptr noundef %136)
  store ptr %137, ptr %12, align 8, !tbaa !5
  br label %138

138:                                              ; preds = %133, %128
  br label %139

139:                                              ; preds = %138, %122
  %140 = load ptr, ptr %11, align 8, !tbaa !5
  %141 = icmp eq ptr %140, null
  br i1 %141, label %142, label %145

142:                                              ; preds = %139
  %143 = load ptr, ptr %7, align 8, !tbaa !5
  %144 = call ptr @ast_from(ptr noundef %143, i32 noundef 2)
  store ptr %144, ptr %11, align 8, !tbaa !5
  br label %159

145:                                              ; preds = %139
  %146 = load ptr, ptr %12, align 8, !tbaa !5
  %147 = icmp eq ptr %146, null
  br i1 %147, label %148, label %153

148:                                              ; preds = %145
  %149 = load ptr, ptr %11, align 8, !tbaa !5
  %150 = load ptr, ptr %7, align 8, !tbaa !5
  %151 = call ptr @ast_from(ptr noundef %150, i32 noundef 2)
  %152 = call ptr @ast_add(ptr noundef %149, ptr noundef %151)
  store ptr %152, ptr %12, align 8, !tbaa !5
  br label %158

153:                                              ; preds = %145
  %154 = load ptr, ptr %12, align 8, !tbaa !5
  %155 = load ptr, ptr %7, align 8, !tbaa !5
  %156 = call ptr @ast_from(ptr noundef %155, i32 noundef 2)
  %157 = call ptr @ast_add_sibling(ptr noundef %154, ptr noundef %156)
  store ptr %157, ptr %12, align 8, !tbaa !5
  br label %158

158:                                              ; preds = %153, %148
  br label %159

159:                                              ; preds = %158, %142
  %160 = load ptr, ptr %11, align 8, !tbaa !5
  call void @ast_inheritflags(ptr noundef %160)
  %161 = load ptr, ptr %11, align 8, !tbaa !5
  %162 = load ptr, ptr %12, align 8, !tbaa !5
  %163 = load ptr, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  %164 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %164, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #3
  %165 = load ptr, ptr %4, align 8, !tbaa !5
  %166 = load ptr, ptr %5, align 8, !tbaa !5
  %167 = call zeroext i1 @names_nominal(ptr noundef %165, ptr noundef %166, ptr noundef %6, i1 noundef zeroext false)
  br i1 %167, label %177, label %168

168:                                              ; preds = %159
  %169 = load ptr, ptr %4, align 8, !tbaa !5
  %170 = getelementptr inbounds %struct.pass_opt_t, ptr %169, i32 0, i32 36
  %171 = getelementptr inbounds %struct.typecheck_t, ptr %170, i32 0, i32 2
  %172 = load ptr, ptr %171, align 8, !tbaa !9
  %173 = load ptr, ptr %5, align 8, !tbaa !5
  %174 = load ptr, ptr %5, align 8, !tbaa !5
  %175 = call ptr @ast_print_type(ptr noundef %174)
  call void (ptr, ptr, ptr, ...) @ast_error(ptr noundef %172, ptr noundef %173, ptr noundef @.str.2, ptr noundef %175)
  %176 = load ptr, ptr %6, align 8, !tbaa !5
  call void @ast_free(ptr noundef %176)
  store ptr null, ptr %3, align 8
  store i32 1, ptr %17, align 4
  br label %179

177:                                              ; preds = %159
  %178 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %178, ptr %3, align 8
  store i32 1, ptr %17, align 4
  br label %179

179:                                              ; preds = %177, %168
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  %180 = load ptr, ptr %3, align 8
  ret ptr %180
}

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

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

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

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

declare void @ast_inheritflags(ptr noundef) #1

declare ptr @ast_print_type(ptr noundef) #1

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, !6, i64 216}
!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}


; 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.1 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [29 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 zeroext i1 @names_nominal(ptr noundef, ptr noundef, ptr noundef, i1 noundef zeroext) local_unnamed_addr #1

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

declare void @ast_free(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
define dso_local ptr @type_pointer_to(ptr noundef %0, ptr noundef %1) local_unnamed_addr #2 {
  %3 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #3
  %4 = tail call ptr @ast_from(ptr noundef %1, i32 noundef 151) #3
  %5 = icmp eq ptr %4, null
  %6 = tail call ptr @ast_from(ptr noundef %1, i32 noundef 2) #3
  br i1 %5, label %7, label %9

7:                                                ; preds = %2
  %8 = icmp eq ptr %6, null
  br i1 %8, label %17, label %.thread84

9:                                                ; preds = %2
  %10 = tail call ptr @ast_add(ptr noundef nonnull %4, ptr noundef %6) #3
  %11 = icmp eq ptr %10, null
  br i1 %11, label %.thread84, label %14

.thread84:                                        ; preds = %7, %9
  %.0728287 = phi ptr [ %4, %9 ], [ %6, %7 ]
  %12 = tail call ptr @ast_from_string(ptr noundef %1, ptr noundef nonnull @.str.1) #3
  %13 = tail call ptr @ast_add(ptr noundef nonnull %.0728287, ptr noundef %12) #3
  br label %21

14:                                               ; preds = %9
  %15 = tail call ptr @ast_from_string(ptr noundef %1, ptr noundef nonnull @.str.1) #3
  %16 = tail call ptr @ast_add_sibling(ptr noundef nonnull %10, ptr noundef %15) #3
  br label %21

17:                                               ; preds = %7
  %18 = tail call ptr @ast_from_string(ptr noundef %1, ptr noundef nonnull @.str.1) #3
  %19 = tail call ptr @ast_from(ptr noundef %1, i32 noundef 166) #3
  %20 = icmp eq ptr %18, null
  br i1 %20, label %28, label %.thread93

21:                                               ; preds = %.thread84, %14
  %.173.ph = phi ptr [ %4, %14 ], [ %.0728287, %.thread84 ]
  %.1.ph = phi ptr [ %16, %14 ], [ %13, %.thread84 ]
  %22 = tail call ptr @ast_from(ptr noundef %1, i32 noundef 166) #3
  %23 = icmp eq ptr %.1.ph, null
  br i1 %23, label %.thread93, label %26

.thread93:                                        ; preds = %17, %21
  %.1739196 = phi ptr [ %.173.ph, %21 ], [ %18, %17 ]
  %24 = phi ptr [ %22, %21 ], [ %19, %17 ]
  %25 = tail call ptr @ast_add(ptr noundef nonnull %.1739196, ptr noundef %24) #3
  br label %28

26:                                               ; preds = %21
  %27 = tail call ptr @ast_add_sibling(ptr noundef nonnull %.1.ph, ptr noundef %22) #3
  br label %28

28:                                               ; preds = %17, %.thread93, %26
  %29 = phi ptr [ %24, %.thread93 ], [ %22, %26 ], [ %19, %17 ]
  %.274 = phi ptr [ %.1739196, %.thread93 ], [ %.173.ph, %26 ], [ %19, %17 ]
  %.2 = phi ptr [ %25, %.thread93 ], [ %27, %26 ], [ null, %17 ]
  %30 = icmp eq ptr %29, null
  br i1 %30, label %33, label %31

31:                                               ; preds = %28
  %32 = tail call ptr @ast_add(ptr noundef nonnull %29, ptr noundef %1) #3
  br label %33

33:                                               ; preds = %28, %31
  %.070 = phi ptr [ %29, %31 ], [ %1, %28 ]
  tail call void @ast_inheritflags(ptr noundef %.070) #3
  %34 = icmp eq ptr %.274, null
  br i1 %34, label %42, label %35

35:                                               ; preds = %33
  %36 = icmp eq ptr %.2, null
  %37 = tail call ptr @ast_from(ptr noundef %1, i32 noundef 2) #3
  br i1 %36, label %38, label %40

38:                                               ; preds = %35
  %39 = tail call ptr @ast_add(ptr noundef nonnull %.274, ptr noundef %37) #3
  br label %.thread98

40:                                               ; preds = %35
  %41 = tail call ptr @ast_add_sibling(ptr noundef nonnull %.2, ptr noundef %37) #3
  br label %.thread98

42:                                               ; preds = %33
  %43 = tail call ptr @ast_from(ptr noundef %1, i32 noundef 2) #3
  %44 = icmp eq ptr %43, null
  br i1 %44, label %45, label %.thread98

45:                                               ; preds = %42
  %46 = tail call ptr @ast_from(ptr noundef %1, i32 noundef 2) #3
  br label %53

.thread98:                                        ; preds = %40, %38, %42
  %.3102 = phi ptr [ %.2, %42 ], [ %41, %40 ], [ %39, %38 ]
  %.375101 = phi ptr [ %43, %42 ], [ %.274, %40 ], [ %.274, %38 ]
  %47 = icmp eq ptr %.3102, null
  %48 = tail call ptr @ast_from(ptr noundef %1, i32 noundef 2) #3
  br i1 %47, label %49, label %51

49:                                               ; preds = %.thread98
  %50 = tail call ptr @ast_add(ptr noundef nonnull %.375101, ptr noundef %48) #3
  br label %53

51:                                               ; preds = %.thread98
  %52 = tail call ptr @ast_add_sibling(ptr noundef nonnull %.3102, ptr noundef %48) #3
  br label %53

53:                                               ; preds = %49, %51, %45
  %.476 = phi ptr [ %46, %45 ], [ %.375101, %49 ], [ %.375101, %51 ]
  tail call void @ast_inheritflags(ptr noundef %.476) #3
  store ptr %4, ptr %3, align 8, !tbaa !5
  %54 = call zeroext i1 @names_nominal(ptr noundef %0, ptr noundef %1, ptr noundef nonnull %3, i1 noundef zeroext false) #3
  br i1 %54, label %60, label %55

55:                                               ; preds = %53
  %56 = getelementptr inbounds i8, ptr %0, i64 216
  %57 = load ptr, ptr %56, align 8, !tbaa !9
  %58 = call ptr @ast_print_type(ptr noundef %1) #3
  call void (ptr, ptr, ptr, ...) @ast_error(ptr noundef %57, ptr noundef %1, ptr noundef nonnull @.str.2, ptr noundef %58) #3
  %59 = load ptr, ptr %3, align 8, !tbaa !5
  call void @ast_free(ptr noundef %59) #3
  br label %62

60:                                               ; preds = %53
  %61 = load ptr, ptr %3, align 8, !tbaa !5
  br label %62

62:                                               ; preds = %60, %55
  %.0 = phi ptr [ %61, %60 ], [ null, %55 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #3
  ret ptr %.0
}

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

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

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

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

declare void @ast_inheritflags(ptr noundef) local_unnamed_addr #1

declare ptr @ast_print_type(ptr noundef) local_unnamed_addr #1

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, !6, i64 216}
!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}


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