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

; 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 [74 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [77 x i8], align 1
@__func__.check_constraints = external hidden unnamed_addr constant [18 x i8], align 1

declare i32 @ast_id(ptr noundef) #0

declare void @ponyint_assert_fail(ptr noundef, ptr noundef, i64 noundef, ptr noundef) #0

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

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

declare void @ast_error_continue(ptr noundef, ptr noundef, ptr noundef, ...) #0

declare ptr @ast_childidx(ptr noundef, i64 noundef) #0

declare ptr @ast_sibling(ptr noundef) #0

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

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

declare ptr @ast_child(ptr noundef) #0

declare void @ast_free_unattached(ptr noundef) #0

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

27:                                               ; preds = %154, %77, %5
  %28 = load ptr, ptr %12, align 8, !tbaa !5
  %29 = icmp ne ptr %28, null
  br i1 %29, label %30, label %155

30:                                               ; preds = %27
  %31 = load ptr, ptr %13, align 8, !tbaa !5
  %32 = call zeroext i1 @is_bare(ptr noundef %31)
  br i1 %32, label %33, label %43

33:                                               ; preds = %30
  %34 = load i8, ptr %10, align 1, !tbaa !9, !range !11, !noundef !12
  %35 = trunc i8 %34 to i1
  br i1 %35, label %36, label %42

36:                                               ; preds = %33
  %37 = load ptr, ptr %11, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.pass_opt_t, ptr %37, i32 0, i32 36
  %39 = getelementptr inbounds %struct.typecheck_t, ptr %38, i32 0, i32 2
  %40 = load ptr, ptr %39, align 8, !tbaa !13
  %41 = load ptr, ptr %13, align 8, !tbaa !5
  call void (ptr, ptr, ptr, ...) @ast_error(ptr noundef %40, ptr noundef %41, ptr noundef @.str.11)
  br label %42

42:                                               ; preds = %36, %33
  store i1 false, ptr %6, align 1
  store i32 1, ptr %14, align 4
  br label %166

43:                                               ; preds = %30
  %44 = load ptr, ptr %13, align 8, !tbaa !5
  %45 = call i32 @ast_id(ptr noundef %44)
  switch i32 %45, label %79 [
    i32 151, label %46
    i32 187, label %65
  ]

46:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #3
  %47 = load ptr, ptr %13, align 8, !tbaa !5
  %48 = call ptr @ast_data(ptr noundef %47)
  store ptr %48, ptr %15, align 8, !tbaa !5
  %49 = load ptr, ptr %15, align 8, !tbaa !5
  %50 = call i32 @ast_id(ptr noundef %49)
  %51 = icmp eq i32 %50, 75
  br i1 %51, label %52, label %62

52:                                               ; preds = %46
  %53 = load i8, ptr %10, align 1, !tbaa !9, !range !11, !noundef !12
  %54 = trunc i8 %53 to i1
  br i1 %54, label %55, label %61

55:                                               ; preds = %52
  %56 = load ptr, ptr %11, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.pass_opt_t, ptr %56, i32 0, i32 36
  %58 = getelementptr inbounds %struct.typecheck_t, ptr %57, i32 0, i32 2
  %59 = load ptr, ptr %58, align 8, !tbaa !13
  %60 = load ptr, ptr %13, align 8, !tbaa !5
  call void (ptr, ptr, ptr, ...) @ast_error(ptr noundef %59, ptr noundef %60, ptr noundef @.str.12)
  br label %61

61:                                               ; preds = %55, %52
  store i1 false, ptr %6, align 1
  store i32 1, ptr %14, align 4
  br label %63

62:                                               ; preds = %46
  store i32 4, ptr %14, align 4
  br label %63

63:                                               ; preds = %62, %61
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #3
  %64 = load i32, ptr %14, align 4
  switch i32 %64, label %166 [
    i32 4, label %80
  ]

65:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #3
  %66 = load ptr, ptr %13, align 8, !tbaa !5
  %67 = call ptr @ast_data(ptr noundef %66)
  store ptr %67, ptr %16, align 8, !tbaa !5
  %68 = load ptr, ptr %16, align 8, !tbaa !5
  %69 = load ptr, ptr %12, align 8, !tbaa !5
  %70 = icmp eq ptr %68, %69
  br i1 %70, label %71, label %76

71:                                               ; preds = %65
  %72 = load ptr, ptr %12, align 8, !tbaa !5
  %73 = call ptr @ast_sibling(ptr noundef %72)
  store ptr %73, ptr %12, align 8, !tbaa !5
  %74 = load ptr, ptr %13, align 8, !tbaa !5
  %75 = call ptr @ast_sibling(ptr noundef %74)
  store ptr %75, ptr %13, align 8, !tbaa !5
  store i32 2, ptr %14, align 4
  br label %77, !llvm.loop !19

76:                                               ; preds = %65
  store i32 4, ptr %14, align 4
  br label %77

77:                                               ; preds = %76, %71
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #3
  %78 = load i32, ptr %14, align 4
  switch i32 %78, label %168 [
    i32 2, label %27
    i32 4, label %80
  ]

79:                                               ; preds = %43
  br label %80

80:                                               ; preds = %79, %77, %63
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #3
  %81 = load ptr, ptr %12, align 8, !tbaa !5
  %82 = call ptr @ast_childidx(ptr noundef %81, i64 noundef 1)
  store ptr %82, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #3
  %83 = load ptr, ptr %17, align 8, !tbaa !5
  %84 = load ptr, ptr %8, align 8, !tbaa !5
  %85 = load ptr, ptr %9, align 8, !tbaa !5
  %86 = load ptr, ptr %11, align 8, !tbaa !5
  %87 = call ptr @reify(ptr noundef %83, ptr noundef %84, ptr noundef %85, ptr noundef %86, i1 noundef zeroext true)
  store ptr %87, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #3
  store ptr null, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #3
  %88 = load i8, ptr %10, align 1, !tbaa !9, !range !11, !noundef !12
  %89 = trunc i8 %88 to i1
  br i1 %89, label %90, label %91

90:                                               ; preds = %80
  br label %92

91:                                               ; preds = %80
  br label %92

92:                                               ; preds = %91, %90
  %93 = phi ptr [ %19, %90 ], [ null, %91 ]
  store ptr %93, ptr %20, align 8, !tbaa !5
  %94 = load ptr, ptr %13, align 8, !tbaa !5
  %95 = load ptr, ptr %18, align 8, !tbaa !5
  %96 = load ptr, ptr %20, align 8, !tbaa !5
  %97 = load ptr, ptr %11, align 8, !tbaa !5
  %98 = call zeroext i1 @is_subtype_constraint(ptr noundef %94, ptr noundef %95, ptr noundef %96, ptr noundef %97)
  br i1 %98, label %116, label %99

99:                                               ; preds = %92
  %100 = load i8, ptr %10, align 1, !tbaa !9, !range !11, !noundef !12
  %101 = trunc i8 %100 to i1
  br i1 %101, label %102, label %114

102:                                              ; preds = %99
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #3
  store ptr null, ptr %21, align 8, !tbaa !5
  %103 = load ptr, ptr %7, align 8, !tbaa !5
  call void (ptr, ptr, ptr, ...) @ast_error_frame(ptr noundef %21, ptr noundef %103, ptr noundef @.str.13)
  %104 = load ptr, ptr %13, align 8, !tbaa !5
  %105 = load ptr, ptr %13, align 8, !tbaa !5
  %106 = call ptr @ast_print_type(ptr noundef %105)
  call void (ptr, ptr, ptr, ...) @ast_error_frame(ptr noundef %21, ptr noundef %104, ptr noundef @.str.14, ptr noundef %106)
  %107 = load ptr, ptr %12, align 8, !tbaa !5
  %108 = load ptr, ptr %18, align 8, !tbaa !5
  %109 = call ptr @ast_print_type(ptr noundef %108)
  call void (ptr, ptr, ptr, ...) @ast_error_frame(ptr noundef %21, ptr noundef %107, ptr noundef @.str.15, ptr noundef %109)
  call void @errorframe_append(ptr noundef %21, ptr noundef %19)
  %110 = load ptr, ptr %11, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.pass_opt_t, ptr %110, i32 0, i32 36
  %112 = getelementptr inbounds %struct.typecheck_t, ptr %111, i32 0, i32 2
  %113 = load ptr, ptr %112, align 8, !tbaa !13
  call void @errorframe_report(ptr noundef %21, ptr noundef %113)
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #3
  br label %114

114:                                              ; preds = %102, %99
  %115 = load ptr, ptr %18, align 8, !tbaa !5
  call void @ast_free_unattached(ptr noundef %115)
  store i1 false, ptr %6, align 1
  store i32 1, ptr %14, align 4
  br label %152

116:                                              ; preds = %92
  %117 = load ptr, ptr %18, align 8, !tbaa !5
  call void @ast_free_unattached(ptr noundef %117)
  %118 = load ptr, ptr %17, align 8, !tbaa !5
  %119 = call zeroext i1 @is_constructable(ptr noundef %118)
  br i1 %119, label %120, label %147

120:                                              ; preds = %116
  %121 = load ptr, ptr %13, align 8, !tbaa !5
  %122 = call zeroext i1 @is_concrete(ptr noundef %121)
  br i1 %122, label %147, label %123

123:                                              ; preds = %120
  %124 = load i8, ptr %10, align 1, !tbaa !9, !range !11, !noundef !12
  %125 = trunc i8 %124 to i1
  br i1 %125, label %126, label %146

126:                                              ; preds = %123
  %127 = load ptr, ptr %11, align 8, !tbaa !5
  %128 = getelementptr inbounds %struct.pass_opt_t, ptr %127, i32 0, i32 36
  %129 = getelementptr inbounds %struct.typecheck_t, ptr %128, i32 0, i32 2
  %130 = load ptr, ptr %129, align 8, !tbaa !13
  %131 = load ptr, ptr %7, align 8, !tbaa !5
  call void (ptr, ptr, ptr, ...) @ast_error(ptr noundef %130, ptr noundef %131, ptr noundef @.str.16)
  %132 = load ptr, ptr %11, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct.pass_opt_t, ptr %132, i32 0, i32 36
  %134 = getelementptr inbounds %struct.typecheck_t, ptr %133, i32 0, i32 2
  %135 = load ptr, ptr %134, align 8, !tbaa !13
  %136 = load ptr, ptr %13, align 8, !tbaa !5
  %137 = load ptr, ptr %13, align 8, !tbaa !5
  %138 = call ptr @ast_print_type(ptr noundef %137)
  call void (ptr, ptr, ptr, ...) @ast_error_continue(ptr noundef %135, ptr noundef %136, ptr noundef @.str.14, ptr noundef %138)
  %139 = load ptr, ptr %11, align 8, !tbaa !5
  %140 = getelementptr inbounds %struct.pass_opt_t, ptr %139, i32 0, i32 36
  %141 = getelementptr inbounds %struct.typecheck_t, ptr %140, i32 0, i32 2
  %142 = load ptr, ptr %141, align 8, !tbaa !13
  %143 = load ptr, ptr %12, align 8, !tbaa !5
  %144 = load ptr, ptr %17, align 8, !tbaa !5
  %145 = call ptr @ast_print_type(ptr noundef %144)
  call void (ptr, ptr, ptr, ...) @ast_error_continue(ptr noundef %142, ptr noundef %143, ptr noundef @.str.15, ptr noundef %145)
  br label %146

146:                                              ; preds = %126, %123
  store i1 false, ptr %6, align 1
  store i32 1, ptr %14, align 4
  br label %152

147:                                              ; preds = %120, %116
  %148 = load ptr, ptr %12, align 8, !tbaa !5
  %149 = call ptr @ast_sibling(ptr noundef %148)
  store ptr %149, ptr %12, align 8, !tbaa !5
  %150 = load ptr, ptr %13, align 8, !tbaa !5
  %151 = call ptr @ast_sibling(ptr noundef %150)
  store ptr %151, ptr %13, align 8, !tbaa !5
  store i32 0, ptr %14, align 4
  br label %152

152:                                              ; preds = %147, %146, %114
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #3
  %153 = load i32, ptr %14, align 4
  switch i32 %153, label %166 [
    i32 0, label %154
  ]

154:                                              ; preds = %152
  br label %27, !llvm.loop !19

155:                                              ; preds = %27
  %156 = load ptr, ptr %12, align 8, !tbaa !5
  %157 = icmp eq ptr %156, null
  br i1 %157, label %158, label %159

158:                                              ; preds = %155
  br label %160

159:                                              ; preds = %155
  call void @ponyint_assert_fail(ptr noundef @.str.6, ptr noundef @.str.1, i64 noundef 490, ptr noundef @__func__.check_constraints)
  br label %160

160:                                              ; preds = %159, %158
  %161 = load ptr, ptr %13, align 8, !tbaa !5
  %162 = icmp eq ptr %161, null
  br i1 %162, label %163, label %164

163:                                              ; preds = %160
  br label %165

164:                                              ; preds = %160
  call void @ponyint_assert_fail(ptr noundef @.str.7, ptr noundef @.str.1, i64 noundef 491, ptr noundef @__func__.check_constraints)
  br label %165

165:                                              ; preds = %164, %163
  store i1 true, ptr %6, align 1
  store i32 1, ptr %14, align 4
  br label %166

166:                                              ; preds = %165, %152, %63, %42
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  %167 = load i1, ptr %6, align 1
  ret i1 %167

168:                                              ; preds = %77
  unreachable
}

declare zeroext i1 @is_bare(ptr noundef) #0

declare ptr @ast_data(ptr noundef) #0

declare zeroext i1 @is_subtype_constraint(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #0

declare void @ast_error_frame(ptr noundef, ptr noundef, ptr noundef, ...) #0

declare ptr @ast_print_type(ptr noundef) #0

declare void @errorframe_append(ptr noundef, ptr noundef) #0

declare void @errorframe_report(ptr noundef, ptr noundef) #0

declare zeroext i1 @is_constructable(ptr noundef) #0

declare zeroext i1 @is_concrete(ptr noundef) #0

attributes #0 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = !{i8 0, i8 2}
!12 = !{}
!13 = !{!14, !6, i64 216}
!14 = !{!"pass_opt_t", !15, i64 0, !15, 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, !15, i64 24, !16, 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, !17, i64 176, !6, i64 224, !6, i64 232}
!15 = !{!"int", !7, i64 0}
!16 = !{!"long", !7, i64 0}
!17 = !{!"typecheck_t", !6, i64 0, !18, i64 8, !6, i64 40}
!18 = !{!"typecheck_stats_t", !16, i64 0, !16, i64 8, !16, i64 16, !16, i64 24}
!19 = distinct !{!19, !20}
!20 = !{!"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"

@.str.1 = external hidden unnamed_addr constant [74 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [77 x i8], align 1
@__func__.check_constraints = external hidden unnamed_addr constant [18 x i8], align 1

declare i32 @ast_id(ptr noundef) local_unnamed_addr #0

declare void @ponyint_assert_fail(ptr noundef, ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #0

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

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

declare void @ast_error_continue(ptr noundef, ptr noundef, ptr noundef, ...) local_unnamed_addr #0

declare ptr @ast_childidx(ptr noundef, i64 noundef) local_unnamed_addr #0

declare ptr @ast_sibling(ptr noundef) local_unnamed_addr #0

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

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

declare ptr @ast_child(ptr noundef) local_unnamed_addr #0

declare void @ast_free_unattached(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local noundef zeroext i1 @check_constraints(ptr noundef %0, ptr noundef %1, ptr noundef %2, i1 noundef zeroext %3, ptr noundef %4) local_unnamed_addr #2 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = tail call ptr @ast_child(ptr noundef %1) #3
  %9 = tail call ptr @ast_child(ptr noundef %2) #3
  %.not94 = icmp eq ptr %8, null
  br i1 %.not94, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %5
  %. = select i1 %3, ptr %6, ptr null
  br label %10

10:                                               ; preds = %.lr.ph, %.backedge
  %.05696 = phi ptr [ %8, %.lr.ph ], [ %.056.be, %.backedge ]
  %.06095 = phi ptr [ %9, %.lr.ph ], [ %.060.be, %.backedge ]
  %11 = call zeroext i1 @is_bare(ptr noundef %.06095) #3
  br i1 %11, label %12, label %16

12:                                               ; preds = %10
  br i1 %3, label %13, label %58

13:                                               ; preds = %12
  %14 = getelementptr inbounds i8, ptr %4, i64 216
  %15 = load ptr, ptr %14, align 8, !tbaa !5
  call void (ptr, ptr, ptr, ...) @ast_error(ptr noundef %15, ptr noundef %.06095, ptr noundef nonnull @.str.11) #3
  br label %58

16:                                               ; preds = %10
  %17 = call i32 @ast_id(ptr noundef %.06095) #3
  switch i32 %17, label %.critedge [
    i32 151, label %18
    i32 187, label %25
  ]

18:                                               ; preds = %16
  %19 = call ptr @ast_data(ptr noundef %.06095) #3
  %20 = call i32 @ast_id(ptr noundef %19) #3
  %.not67 = icmp eq i32 %20, 75
  br i1 %.not67, label %21, label %.critedge

21:                                               ; preds = %18
  br i1 %3, label %22, label %58

22:                                               ; preds = %21
  %23 = getelementptr inbounds i8, ptr %4, i64 216
  %24 = load ptr, ptr %23, align 8, !tbaa !5
  call void (ptr, ptr, ptr, ...) @ast_error(ptr noundef %24, ptr noundef %.06095, ptr noundef nonnull @.str.12) #3
  br label %58

25:                                               ; preds = %16
  %26 = call ptr @ast_data(ptr noundef %.06095) #3
  %27 = icmp eq ptr %26, %.05696
  br i1 %27, label %28, label %.critedge

28:                                               ; preds = %25
  %29 = call ptr @ast_sibling(ptr noundef nonnull %.05696) #3
  %30 = call ptr @ast_sibling(ptr noundef %.06095) #3
  br label %.backedge

.backedge:                                        ; preds = %28, %53
  %.060.be = phi ptr [ %55, %53 ], [ %30, %28 ]
  %.056.be = phi ptr [ %54, %53 ], [ %29, %28 ]
  %.not = icmp eq ptr %.056.be, null
  br i1 %.not, label %._crit_edge, label %10, !llvm.loop !15

.critedge:                                        ; preds = %25, %18, %16
  %31 = call ptr @ast_childidx(ptr noundef nonnull %.05696, i64 noundef 1) #3
  %32 = call ptr @reify(ptr noundef %31, ptr noundef %1, ptr noundef %2, ptr noundef %4, i1 noundef zeroext true)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #3
  store ptr null, ptr %6, align 8, !tbaa !17
  %33 = call zeroext i1 @is_subtype_constraint(ptr noundef %.06095, ptr noundef %32, ptr noundef %., ptr noundef %4) #3
  br i1 %33, label %41, label %34

34:                                               ; preds = %.critedge
  br i1 %3, label %35, label %40

35:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #3
  store ptr null, ptr %7, align 8, !tbaa !17
  call void (ptr, ptr, ptr, ...) @ast_error_frame(ptr noundef nonnull %7, ptr noundef %0, ptr noundef nonnull @.str.13) #3
  %36 = call ptr @ast_print_type(ptr noundef %.06095) #3
  call void (ptr, ptr, ptr, ...) @ast_error_frame(ptr noundef nonnull %7, ptr noundef %.06095, ptr noundef nonnull @.str.14, ptr noundef %36) #3
  %37 = call ptr @ast_print_type(ptr noundef %32) #3
  call void (ptr, ptr, ptr, ...) @ast_error_frame(ptr noundef nonnull %7, ptr noundef nonnull %.05696, ptr noundef nonnull @.str.15, ptr noundef %37) #3
  call void @errorframe_append(ptr noundef nonnull %7, ptr noundef nonnull %6) #3
  %38 = getelementptr inbounds i8, ptr %4, i64 216
  %39 = load ptr, ptr %38, align 8, !tbaa !5
  call void @errorframe_report(ptr noundef nonnull %7, ptr noundef %39) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #3
  br label %40

40:                                               ; preds = %35, %34
  call void @ast_free_unattached(ptr noundef %32) #3
  br label %.thread73

41:                                               ; preds = %.critedge
  call void @ast_free_unattached(ptr noundef %32) #3
  %42 = call zeroext i1 @is_constructable(ptr noundef %31) #3
  br i1 %42, label %43, label %53

43:                                               ; preds = %41
  %44 = call zeroext i1 @is_concrete(ptr noundef %.06095) #3
  br i1 %44, label %53, label %45

45:                                               ; preds = %43
  br i1 %3, label %46, label %.thread73

46:                                               ; preds = %45
  %47 = getelementptr inbounds i8, ptr %4, i64 216
  %48 = load ptr, ptr %47, align 8, !tbaa !5
  call void (ptr, ptr, ptr, ...) @ast_error(ptr noundef %48, ptr noundef %0, ptr noundef nonnull @.str.16) #3
  %49 = load ptr, ptr %47, align 8, !tbaa !5
  %50 = call ptr @ast_print_type(ptr noundef %.06095) #3
  call void (ptr, ptr, ptr, ...) @ast_error_continue(ptr noundef %49, ptr noundef %.06095, ptr noundef nonnull @.str.14, ptr noundef %50) #3
  %51 = load ptr, ptr %47, align 8, !tbaa !5
  %52 = call ptr @ast_print_type(ptr noundef %31) #3
  call void (ptr, ptr, ptr, ...) @ast_error_continue(ptr noundef %51, ptr noundef nonnull %.05696, ptr noundef nonnull @.str.15, ptr noundef %52) #3
  br label %.thread73

.thread73:                                        ; preds = %40, %46, %45
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #3
  br label %58

53:                                               ; preds = %41, %43
  %54 = call ptr @ast_sibling(ptr noundef nonnull %.05696) #3
  %55 = call ptr @ast_sibling(ptr noundef %.06095) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #3
  br label %.backedge

._crit_edge:                                      ; preds = %.backedge, %5
  %.060.lcssa = phi ptr [ %9, %5 ], [ %.060.be, %.backedge ]
  %56 = icmp eq ptr %.060.lcssa, null
  br i1 %56, label %58, label %57

57:                                               ; preds = %._crit_edge
  call void @ponyint_assert_fail(ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.1, i64 noundef 491, ptr noundef nonnull @__func__.check_constraints) #3
  br label %58

58:                                               ; preds = %.thread73, %22, %21, %57, %._crit_edge, %12, %13
  %.not81 = phi i1 [ false, %.thread73 ], [ false, %22 ], [ false, %21 ], [ true, %57 ], [ true, %._crit_edge ], [ false, %12 ], [ false, %13 ]
  ret i1 %.not81
}

declare zeroext i1 @is_bare(ptr noundef) local_unnamed_addr #0

declare ptr @ast_data(ptr noundef) local_unnamed_addr #0

declare zeroext i1 @is_subtype_constraint(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

declare void @ast_error_frame(ptr noundef, ptr noundef, ptr noundef, ...) local_unnamed_addr #0

declare ptr @ast_print_type(ptr noundef) local_unnamed_addr #0

declare void @errorframe_append(ptr noundef, ptr noundef) local_unnamed_addr #0

declare void @errorframe_report(ptr noundef, ptr noundef) local_unnamed_addr #0

declare zeroext i1 @is_constructable(ptr noundef) local_unnamed_addr #0

declare zeroext i1 @is_concrete(ptr noundef) local_unnamed_addr #0

attributes #0 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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, !12, i64 216}
!6 = !{!"pass_opt_t", !7, i64 0, !7, 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, !7, i64 24, !11, i64 32, !10, i64 40, !10, i64 41, !12, i64 48, !12, i64 56, !12, i64 64, !12, i64 72, !12, i64 80, !12, i64 88, !12, i64 96, !12, i64 104, !12, i64 112, !12, i64 120, !12, i64 128, !12, i64 136, !12, i64 144, !12, i64 152, !12, i64 160, !12, i64 168, !13, i64 176, !12, i64 224, !12, i64 232}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"_Bool", !8, i64 0}
!11 = !{!"long", !8, i64 0}
!12 = !{!"any pointer", !8, i64 0}
!13 = !{!"typecheck_t", !12, i64 0, !14, i64 8, !12, i64 40}
!14 = !{!"typecheck_stats_t", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = !{!12, !12, i64 0}


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