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

; 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.deferred_reification_t = type { ptr, ptr, ptr, ptr, ptr, ptr }
%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 }
%struct.typecheck_frame_t = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }

@.str.1 = external hidden unnamed_addr constant [73 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [13 x i8], align 1
@__func__.find_antecedent_type = external hidden unnamed_addr constant [21 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [35 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_parent(ptr noundef) #1

declare i32 @ast_id(ptr noundef) #1

declare ptr @ast_sibling(ptr noundef) #1

declare ptr @ast_child(ptr noundef) #1

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

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

declare ptr @ast_name(ptr noundef) #1

declare ptr @stringtab(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 dso_local zeroext i1 @is_typecheck_error(ptr noundef) #2

; Function Attrs: nounwind uwtable
define dso_local ptr @find_antecedent_type(ptr noundef %0, ptr noundef %1, ptr noundef %2) #2 {
  %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 [3 x ptr], align 16
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca [4 x ptr], align 16
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca [3 x ptr], align 16
  %20 = alloca ptr, align 8
  %21 = alloca ptr, align 8
  %22 = alloca ptr, align 8
  %23 = alloca ptr, align 8
  %24 = alloca ptr, align 8
  %25 = alloca ptr, align 8
  %26 = alloca ptr, align 8
  %27 = alloca ptr, align 8
  %28 = alloca [5 x ptr], align 16
  %29 = alloca ptr, align 8
  %30 = alloca ptr, align 8
  %31 = alloca ptr, align 8
  %32 = alloca ptr, align 8
  %33 = alloca ptr, align 8
  %34 = alloca ptr, align 8
  %35 = alloca ptr, align 8
  %36 = alloca ptr, align 8
  %37 = alloca [5 x ptr], align 16
  %38 = alloca ptr, align 8
  %39 = alloca ptr, align 8
  %40 = alloca ptr, align 8
  %41 = alloca ptr, align 8
  %42 = alloca ptr, align 8
  %43 = alloca ptr, align 8
  %44 = alloca ptr, align 8
  %45 = alloca ptr, align 8
  %46 = alloca ptr, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  %47 = load ptr, ptr %6, align 8, !tbaa !5
  %48 = call ptr @ast_parent(ptr noundef %47)
  store ptr %48, ptr %8, align 8, !tbaa !5
  %49 = load ptr, ptr %8, align 8, !tbaa !5
  %50 = call i32 @ast_id(ptr noundef %49)
  switch i32 %50, label %365 [
    i32 24, label %51
    i32 165, label %64
    i32 174, label %64
    i32 179, label %77
    i32 169, label %95
    i32 171, label %180
    i32 172, label %180
    i32 89, label %227
    i32 175, label %246
    i32 178, label %267
    i32 103, label %318
    i32 104, label %334
    i32 107, label %350
    i32 108, label %360
    i32 109, label %360
    i32 110, label %360
    i32 111, label %360
    i32 112, label %360
    i32 113, label %360
    i32 116, label %360
    i32 118, label %360
    i32 122, label %360
    i32 180, label %360
    i32 181, label %360
    i32 124, label %360
    i32 125, label %360
    i32 206, label %360
    i32 177, label %360
  ]

51:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.start.p0(i64 24, ptr %11) #3
  store ptr %9, ptr %11, align 8, !tbaa !5
  %52 = getelementptr inbounds ptr, ptr %11, i64 1
  store ptr %10, ptr %52, align 8, !tbaa !5
  %53 = getelementptr inbounds ptr, ptr %11, i64 2
  store ptr null, ptr %53, align 8, !tbaa !5
  %54 = load ptr, ptr %8, align 8, !tbaa !5
  %55 = getelementptr inbounds [3 x ptr], ptr %11, i64 0, i64 0
  call void @ast_get_children(ptr noundef %54, i64 noundef 2, ptr noundef %55)
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #3
  %56 = load ptr, ptr %10, align 8, !tbaa !5
  %57 = load ptr, ptr %6, align 8, !tbaa !5
  %58 = icmp ne ptr %56, %57
  br i1 %58, label %59, label %60

59:                                               ; preds = %51
  store ptr null, ptr %4, align 8
  store i32 1, ptr %12, align 4
  br label %63

60:                                               ; preds = %51
  %61 = load ptr, ptr %9, align 8, !tbaa !5
  %62 = call ptr @ast_type(ptr noundef %61)
  store ptr %62, ptr %4, align 8
  store i32 1, ptr %12, align 4
  br label %63

63:                                               ; preds = %60, %59
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  br label %367

64:                                               ; preds = %3, %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 32, ptr %16) #3
  store ptr %13, ptr %16, align 8, !tbaa !5
  %65 = getelementptr inbounds ptr, ptr %16, i64 1
  store ptr %14, ptr %65, align 8, !tbaa !5
  %66 = getelementptr inbounds ptr, ptr %16, i64 2
  store ptr %15, ptr %66, align 8, !tbaa !5
  %67 = getelementptr inbounds ptr, ptr %16, i64 3
  store ptr null, ptr %67, align 8, !tbaa !5
  %68 = load ptr, ptr %8, align 8, !tbaa !5
  %69 = getelementptr inbounds [4 x ptr], ptr %16, i64 0, i64 0
  call void @ast_get_children(ptr noundef %68, i64 noundef 3, ptr noundef %69)
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #3
  %70 = load ptr, ptr %6, align 8, !tbaa !5
  %71 = load ptr, ptr %15, align 8, !tbaa !5
  %72 = icmp eq ptr %70, %71
  br i1 %72, label %73, label %74

73:                                               ; preds = %64
  br label %75

74:                                               ; preds = %64
  call void @ponyint_assert_fail(ptr noundef @.str.3, ptr noundef @.str.1, i64 noundef 283, ptr noundef @__func__.find_antecedent_type)
  br label %75

75:                                               ; preds = %74, %73
  %76 = load ptr, ptr %14, align 8, !tbaa !5
  store ptr %76, ptr %4, align 8
  store i32 1, ptr %12, align 4
  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
  br label %367

77:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #3
  call void @llvm.lifetime.start.p0(i64 24, ptr %19) #3
  store ptr %17, ptr %19, align 8, !tbaa !5
  %78 = getelementptr inbounds ptr, ptr %19, i64 1
  store ptr %18, ptr %78, align 8, !tbaa !5
  %79 = getelementptr inbounds ptr, ptr %19, i64 2
  store ptr null, ptr %79, align 8, !tbaa !5
  %80 = load ptr, ptr %8, align 8, !tbaa !5
  %81 = getelementptr inbounds [3 x ptr], ptr %19, i64 0, i64 0
  call void @ast_get_children(ptr noundef %80, i64 noundef 2, ptr noundef %81)
  call void @llvm.lifetime.end.p0(i64 24, ptr %19) #3
  %82 = load ptr, ptr %6, align 8, !tbaa !5
  %83 = load ptr, ptr %18, align 8, !tbaa !5
  %84 = icmp eq ptr %82, %83
  br i1 %84, label %85, label %86

85:                                               ; preds = %77
  br label %87

86:                                               ; preds = %77
  call void @ponyint_assert_fail(ptr noundef @.str.4, ptr noundef @.str.1, i64 noundef 291, ptr noundef @__func__.find_antecedent_type)
  br label %87

87:                                               ; preds = %86, %85
  %88 = load ptr, ptr %17, align 8, !tbaa !5
  %89 = call i32 @ast_id(ptr noundef %88)
  %90 = icmp eq i32 %89, 2
  br i1 %90, label %91, label %92

91:                                               ; preds = %87
  store ptr null, ptr %4, align 8
  store i32 1, ptr %12, align 4
  br label %94

92:                                               ; preds = %87
  %93 = load ptr, ptr %17, align 8, !tbaa !5
  store ptr %93, ptr %4, align 8
  store i32 1, ptr %12, align 4
  br label %94

94:                                               ; preds = %92, %91
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #3
  br label %367

95:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #3
  %96 = load ptr, ptr %8, align 8, !tbaa !5
  %97 = call ptr @ast_parent(ptr noundef %96)
  %98 = call ptr @ast_child(ptr noundef %97)
  store ptr %98, ptr %20, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #3
  %99 = load ptr, ptr %20, align 8, !tbaa !5
  %100 = call ptr @ast_type(ptr noundef %99)
  store ptr %100, ptr %21, align 8, !tbaa !5
  %101 = load ptr, ptr %21, align 8, !tbaa !5
  %102 = call zeroext i1 @is_typecheck_error(ptr noundef %101)
  br i1 %102, label %103, label %105

103:                                              ; preds = %95
  %104 = load ptr, ptr %21, align 8, !tbaa !5
  store ptr %104, ptr %4, align 8
  store i32 1, ptr %12, align 4
  br label %179

105:                                              ; preds = %95
  %106 = load ptr, ptr %21, align 8, !tbaa !5
  %107 = call i32 @ast_id(ptr noundef %106)
  %108 = icmp ne i32 %107, 153
  br i1 %108, label %109, label %146

109:                                              ; preds = %105
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #3
  %110 = load ptr, ptr %5, align 8, !tbaa !5
  %111 = load ptr, ptr %20, align 8, !tbaa !5
  %112 = load ptr, ptr %21, align 8, !tbaa !5
  %113 = call ptr @stringtab(ptr noundef @.str.5)
  %114 = call ptr @lookup(ptr noundef %110, ptr noundef %111, ptr noundef %112, ptr noundef %113)
  store ptr %114, ptr %22, align 8, !tbaa !5
  %115 = load ptr, ptr %22, align 8, !tbaa !5
  %116 = icmp eq ptr %115, null
  br i1 %116, label %117, label %118

117:                                              ; preds = %109
  store ptr null, ptr %4, align 8
  store i32 1, ptr %12, align 4
  br label %143

118:                                              ; preds = %109
  %119 = load ptr, ptr %22, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.deferred_reification_t, ptr %119, i32 0, i32 0
  %121 = load ptr, ptr %120, align 8, !tbaa !9
  %122 = call i32 @ast_id(ptr noundef %121)
  %123 = icmp ne i32 %122, 90
  br i1 %123, label %124, label %132

124:                                              ; preds = %118
  %125 = load ptr, ptr %22, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.deferred_reification_t, ptr %125, i32 0, i32 0
  %127 = load ptr, ptr %126, align 8, !tbaa !9
  %128 = call i32 @ast_id(ptr noundef %127)
  %129 = icmp ne i32 %128, 89
  br i1 %129, label %130, label %132

130:                                              ; preds = %124
  %131 = load ptr, ptr %22, align 8, !tbaa !5
  call void @deferred_reify_free(ptr noundef %131)
  store ptr null, ptr %4, align 8
  store i32 1, ptr %12, align 4
  br label %143

132:                                              ; preds = %124, %118
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #3
  %133 = load ptr, ptr %22, align 8, !tbaa !5
  %134 = load ptr, ptr %22, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct.deferred_reification_t, ptr %134, i32 0, i32 0
  %136 = load ptr, ptr %135, align 8, !tbaa !9
  %137 = load ptr, ptr %5, align 8, !tbaa !5
  %138 = call ptr @deferred_reify_method_def(ptr noundef %133, ptr noundef %136, ptr noundef %137)
  store ptr %138, ptr %23, align 8, !tbaa !5
  %139 = load ptr, ptr %23, align 8, !tbaa !5
  %140 = call ptr @type_for_fun(ptr noundef %139)
  store ptr %140, ptr %21, align 8, !tbaa !5
  %141 = load ptr, ptr %23, align 8, !tbaa !5
  call void @ast_free_unattached(ptr noundef %141)
  %142 = load ptr, ptr %22, align 8, !tbaa !5
  call void @deferred_reify_free(ptr noundef %142)
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #3
  store i32 0, ptr %12, align 4
  br label %143

143:                                              ; preds = %132, %130, %117
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #3
  %144 = load i32, ptr %12, align 4
  switch i32 %144, label %179 [
    i32 0, label %145
  ]

145:                                              ; preds = %143
  br label %146

146:                                              ; preds = %145, %105
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #3
  call void @llvm.lifetime.start.p0(i64 40, ptr %28) #3
  store ptr %24, ptr %28, align 8, !tbaa !5
  %147 = getelementptr inbounds ptr, ptr %28, i64 1
  store ptr %25, ptr %147, align 8, !tbaa !5
  %148 = getelementptr inbounds ptr, ptr %28, i64 2
  store ptr %26, ptr %148, align 8, !tbaa !5
  %149 = getelementptr inbounds ptr, ptr %28, i64 3
  store ptr %27, ptr %149, align 8, !tbaa !5
  %150 = getelementptr inbounds ptr, ptr %28, i64 4
  store ptr null, ptr %150, align 8, !tbaa !5
  %151 = load ptr, ptr %21, align 8, !tbaa !5
  %152 = getelementptr inbounds [5 x ptr], ptr %28, i64 0, i64 0
  call void @ast_get_children(ptr noundef %151, i64 noundef 4, ptr noundef %152)
  call void @llvm.lifetime.end.p0(i64 40, ptr %28) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #3
  %153 = load ptr, ptr %8, align 8, !tbaa !5
  %154 = call ptr @ast_child(ptr noundef %153)
  store ptr %154, ptr %29, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #3
  %155 = load ptr, ptr %26, align 8, !tbaa !5
  %156 = call ptr @ast_child(ptr noundef %155)
  store ptr %156, ptr %30, align 8, !tbaa !5
  br label %157

157:                                              ; preds = %172, %146
  %158 = load ptr, ptr %29, align 8, !tbaa !5
  %159 = icmp ne ptr %158, null
  br i1 %159, label %160, label %163

160:                                              ; preds = %157
  %161 = load ptr, ptr %30, align 8, !tbaa !5
  %162 = icmp ne ptr %161, null
  br label %163

163:                                              ; preds = %160, %157
  %164 = phi i1 [ false, %157 ], [ %162, %160 ]
  br i1 %164, label %165, label %177

165:                                              ; preds = %163
  %166 = load ptr, ptr %29, align 8, !tbaa !5
  %167 = load ptr, ptr %6, align 8, !tbaa !5
  %168 = icmp eq ptr %166, %167
  br i1 %168, label %169, label %172

169:                                              ; preds = %165
  %170 = load ptr, ptr %30, align 8, !tbaa !5
  %171 = call ptr @ast_childidx(ptr noundef %170, i64 noundef 1)
  store ptr %171, ptr %4, align 8
  store i32 1, ptr %12, align 4
  br label %178

172:                                              ; preds = %165
  %173 = load ptr, ptr %29, align 8, !tbaa !5
  %174 = call ptr @ast_sibling(ptr noundef %173)
  store ptr %174, ptr %29, align 8, !tbaa !5
  %175 = load ptr, ptr %30, align 8, !tbaa !5
  %176 = call ptr @ast_sibling(ptr noundef %175)
  store ptr %176, ptr %30, align 8, !tbaa !5
  br label %157, !llvm.loop !11

177:                                              ; preds = %163
  store ptr null, ptr %4, align 8
  store i32 1, ptr %12, align 4
  br label %178

178:                                              ; preds = %177, %169
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #3
  br label %179

179:                                              ; preds = %178, %143, %103
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #3
  br label %367

180:                                              ; preds = %3, %3
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #3
  %181 = load ptr, ptr %8, align 8, !tbaa !5
  %182 = call ptr @ast_parent(ptr noundef %181)
  %183 = call ptr @ast_parent(ptr noundef %182)
  %184 = call ptr @ast_child(ptr noundef %183)
  store ptr %184, ptr %31, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #3
  %185 = load ptr, ptr %31, align 8, !tbaa !5
  %186 = call ptr @ast_type(ptr noundef %185)
  store ptr %186, ptr %32, align 8, !tbaa !5
  %187 = load ptr, ptr %32, align 8, !tbaa !5
  %188 = call zeroext i1 @is_typecheck_error(ptr noundef %187)
  br i1 %188, label %189, label %191

189:                                              ; preds = %180
  %190 = load ptr, ptr %32, align 8, !tbaa !5
  store ptr %190, ptr %4, align 8
  store i32 1, ptr %12, align 4
  br label %226

191:                                              ; preds = %180
  %192 = load ptr, ptr %32, align 8, !tbaa !5
  %193 = call i32 @ast_id(ptr noundef %192)
  %194 = icmp eq i32 %193, 153
  br i1 %194, label %195, label %196

195:                                              ; preds = %191
  br label %197

196:                                              ; preds = %191
  call void @ponyint_assert_fail(ptr noundef @.str.6, ptr noundef @.str.1, i64 noundef 358, ptr noundef @__func__.find_antecedent_type)
  br label %197

197:                                              ; preds = %196, %195
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #3
  call void @llvm.lifetime.start.p0(i64 40, ptr %37) #3
  store ptr %33, ptr %37, align 8, !tbaa !5
  %198 = getelementptr inbounds ptr, ptr %37, i64 1
  store ptr %34, ptr %198, align 8, !tbaa !5
  %199 = getelementptr inbounds ptr, ptr %37, i64 2
  store ptr %35, ptr %199, align 8, !tbaa !5
  %200 = getelementptr inbounds ptr, ptr %37, i64 3
  store ptr %36, ptr %200, align 8, !tbaa !5
  %201 = getelementptr inbounds ptr, ptr %37, i64 4
  store ptr null, ptr %201, align 8, !tbaa !5
  %202 = load ptr, ptr %32, align 8, !tbaa !5
  %203 = getelementptr inbounds [5 x ptr], ptr %37, i64 0, i64 0
  call void @ast_get_children(ptr noundef %202, i64 noundef 4, ptr noundef %203)
  call void @llvm.lifetime.end.p0(i64 40, ptr %37) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #3
  %204 = load ptr, ptr %8, align 8, !tbaa !5
  %205 = call ptr @ast_child(ptr noundef %204)
  %206 = call ptr @ast_name(ptr noundef %205)
  store ptr %206, ptr %38, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %39) #3
  %207 = load ptr, ptr %35, align 8, !tbaa !5
  %208 = call ptr @ast_child(ptr noundef %207)
  store ptr %208, ptr %39, align 8, !tbaa !5
  br label %209

209:                                              ; preds = %221, %197
  %210 = load ptr, ptr %39, align 8, !tbaa !5
  %211 = icmp ne ptr %210, null
  br i1 %211, label %212, label %224

212:                                              ; preds = %209
  %213 = load ptr, ptr %39, align 8, !tbaa !5
  %214 = call ptr @ast_child(ptr noundef %213)
  %215 = call ptr @ast_name(ptr noundef %214)
  %216 = load ptr, ptr %38, align 8, !tbaa !5
  %217 = icmp eq ptr %215, %216
  br i1 %217, label %218, label %221

218:                                              ; preds = %212
  %219 = load ptr, ptr %39, align 8, !tbaa !5
  %220 = call ptr @ast_childidx(ptr noundef %219, i64 noundef 1)
  store ptr %220, ptr %4, align 8
  store i32 1, ptr %12, align 4
  br label %225

221:                                              ; preds = %212
  %222 = load ptr, ptr %39, align 8, !tbaa !5
  %223 = call ptr @ast_sibling(ptr noundef %222)
  store ptr %223, ptr %39, align 8, !tbaa !5
  br label %209, !llvm.loop !13

224:                                              ; preds = %209
  store ptr null, ptr %4, align 8
  store i32 1, ptr %12, align 4
  br label %225

225:                                              ; preds = %224, %218
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #3
  br label %226

226:                                              ; preds = %225, %189
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #3
  br label %367

227:                                              ; preds = %3
  call void @llvm.lifetime.start.p0(i64 8, ptr %40) #3
  %228 = load ptr, ptr %8, align 8, !tbaa !5
  %229 = call ptr @ast_childidx(ptr noundef %228, i64 noundef 6)
  store ptr %229, ptr %40, align 8, !tbaa !5
  %230 = load ptr, ptr %40, align 8, !tbaa !5
  %231 = load ptr, ptr %6, align 8, !tbaa !5
  %232 = load ptr, ptr %40, align 8, !tbaa !5
  %233 = icmp eq ptr %231, %232
  br i1 %233, label %234, label %235

234:                                              ; preds = %227
  br label %236

235:                                              ; preds = %227
  call void @ponyint_assert_fail(ptr noundef @.str.7, ptr noundef @.str.1, i64 noundef 381, ptr noundef @__func__.find_antecedent_type)
  br label %236

236:                                              ; preds = %235, %234
  call void @llvm.lifetime.start.p0(i64 8, ptr %41) #3
  %237 = load ptr, ptr %8, align 8, !tbaa !5
  %238 = call ptr @ast_childidx(ptr noundef %237, i64 noundef 4)
  store ptr %238, ptr %41, align 8, !tbaa !5
  %239 = load ptr, ptr %41, align 8, !tbaa !5
  %240 = call i32 @ast_id(ptr noundef %239)
  %241 = icmp eq i32 %240, 2
  br i1 %241, label %242, label %243

242:                                              ; preds = %236
  store ptr null, ptr %4, align 8
  store i32 1, ptr %12, align 4
  br label %245

243:                                              ; preds = %236
  %244 = load ptr, ptr %41, align 8, !tbaa !5
  store ptr %244, ptr %4, align 8
  store i32 1, ptr %12, align 4
  br label %245

245:                                              ; preds = %243, %242
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %40) #3
  br label %367

246:                                              ; preds = %3
  %247 = load ptr, ptr %8, align 8, !tbaa !5
  %248 = call ptr @ast_childlast(ptr noundef %247)
  %249 = load ptr, ptr %6, align 8, !tbaa !5
  %250 = icmp eq ptr %248, %249
  br i1 %250, label %251, label %256

251:                                              ; preds = %246
  %252 = load ptr, ptr %5, align 8, !tbaa !5
  %253 = load ptr, ptr %8, align 8, !tbaa !5
  %254 = load ptr, ptr %7, align 8, !tbaa !5
  %255 = call ptr @find_antecedent_type(ptr noundef %252, ptr noundef %253, ptr noundef %254)
  store ptr %255, ptr %4, align 8
  store i32 1, ptr %12, align 4
  br label %367

256:                                              ; preds = %246
  %257 = load ptr, ptr %8, align 8, !tbaa !5
  %258 = call ptr @ast_parent(ptr noundef %257)
  %259 = call i32 @ast_id(ptr noundef %258)
  %260 = icmp eq i32 %259, 179
  br i1 %260, label %261, label %266

261:                                              ; preds = %256
  %262 = load ptr, ptr %5, align 8, !tbaa !5
  %263 = load ptr, ptr %8, align 8, !tbaa !5
  %264 = load ptr, ptr %7, align 8, !tbaa !5
  %265 = call ptr @find_antecedent_type(ptr noundef %262, ptr noundef %263, ptr noundef %264)
  store ptr %265, ptr %4, align 8
  store i32 1, ptr %12, align 4
  br label %367

266:                                              ; preds = %256
  store ptr null, ptr %4, align 8
  store i32 1, ptr %12, align 4
  br label %367

267:                                              ; preds = %3
  call void @llvm.lifetime.start.p0(i64 8, ptr %42) #3
  %268 = load ptr, ptr %5, align 8, !tbaa !5
  %269 = load ptr, ptr %8, align 8, !tbaa !5
  %270 = load ptr, ptr %7, align 8, !tbaa !5
  %271 = call ptr @find_antecedent_type(ptr noundef %268, ptr noundef %269, ptr noundef %270)
  store ptr %271, ptr %42, align 8, !tbaa !5
  %272 = load ptr, ptr %42, align 8, !tbaa !5
  %273 = icmp eq ptr %272, null
  br i1 %273, label %274, label %275

274:                                              ; preds = %267
  store ptr null, ptr %4, align 8
  store i32 1, ptr %12, align 4
  br label %316

275:                                              ; preds = %267
  %276 = load ptr, ptr %5, align 8, !tbaa !5
  %277 = load ptr, ptr %42, align 8, !tbaa !5
  %278 = load ptr, ptr %8, align 8, !tbaa !5
  %279 = call i64 @ast_childcount(ptr noundef %278)
  %280 = call ptr @find_tuple_type(ptr noundef %276, ptr noundef %277, i64 noundef %279)
  store ptr %280, ptr %42, align 8, !tbaa !5
  %281 = load ptr, ptr %42, align 8, !tbaa !5
  %282 = icmp eq ptr %281, null
  br i1 %282, label %283, label %284

283:                                              ; preds = %275
  store ptr null, ptr %4, align 8
  store i32 1, ptr %12, align 4
  br label %316

284:                                              ; preds = %275
  %285 = load ptr, ptr %42, align 8, !tbaa !5
  %286 = call i32 @ast_id(ptr noundef %285)
  %287 = icmp eq i32 %286, 150
  br i1 %287, label %288, label %289

288:                                              ; preds = %284
  br label %290

289:                                              ; preds = %284
  call void @ponyint_assert_fail(ptr noundef @.str.8, ptr noundef @.str.1, i64 noundef 415, ptr noundef @__func__.find_antecedent_type)
  br label %290

290:                                              ; preds = %289, %288
  call void @llvm.lifetime.start.p0(i64 8, ptr %43) #3
  %291 = load ptr, ptr %8, align 8, !tbaa !5
  %292 = call ptr @ast_child(ptr noundef %291)
  store ptr %292, ptr %43, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %44) #3
  %293 = load ptr, ptr %42, align 8, !tbaa !5
  %294 = call ptr @ast_child(ptr noundef %293)
  store ptr %294, ptr %44, align 8, !tbaa !5
  br label %295

295:                                              ; preds = %309, %290
  %296 = load ptr, ptr %43, align 8, !tbaa !5
  %297 = icmp ne ptr %296, null
  br i1 %297, label %298, label %301

298:                                              ; preds = %295
  %299 = load ptr, ptr %44, align 8, !tbaa !5
  %300 = icmp ne ptr %299, null
  br label %301

301:                                              ; preds = %298, %295
  %302 = phi i1 [ false, %295 ], [ %300, %298 ]
  br i1 %302, label %303, label %314

303:                                              ; preds = %301
  %304 = load ptr, ptr %43, align 8, !tbaa !5
  %305 = load ptr, ptr %6, align 8, !tbaa !5
  %306 = icmp eq ptr %304, %305
  br i1 %306, label %307, label %309

307:                                              ; preds = %303
  %308 = load ptr, ptr %44, align 8, !tbaa !5
  store ptr %308, ptr %4, align 8
  store i32 1, ptr %12, align 4
  br label %315

309:                                              ; preds = %303
  %310 = load ptr, ptr %43, align 8, !tbaa !5
  %311 = call ptr @ast_sibling(ptr noundef %310)
  store ptr %311, ptr %43, align 8, !tbaa !5
  %312 = load ptr, ptr %44, align 8, !tbaa !5
  %313 = call ptr @ast_sibling(ptr noundef %312)
  store ptr %313, ptr %44, align 8, !tbaa !5
  br label %295, !llvm.loop !14

314:                                              ; preds = %301
  store i32 2, ptr %12, align 4
  br label %315

315:                                              ; preds = %314, %307
  call void @llvm.lifetime.end.p0(i64 8, ptr %44) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %43) #3
  br label %316

316:                                              ; preds = %315, %283, %274
  call void @llvm.lifetime.end.p0(i64 8, ptr %42) #3
  %317 = load i32, ptr %12, align 4
  switch i32 %317, label %367 [
    i32 2, label %366
  ]

318:                                              ; preds = %3
  call void @llvm.lifetime.start.p0(i64 8, ptr %45) #3
  %319 = load ptr, ptr %5, align 8, !tbaa !5
  %320 = getelementptr inbounds %struct.pass_opt_t, ptr %319, i32 0, i32 36
  %321 = getelementptr inbounds %struct.typecheck_t, ptr %320, i32 0, i32 0
  %322 = load ptr, ptr %321, align 8, !tbaa !15
  %323 = getelementptr inbounds %struct.typecheck_frame_t, ptr %322, i32 0, i32 7
  %324 = load ptr, ptr %323, align 8, !tbaa !22
  store ptr %324, ptr %45, align 8, !tbaa !5
  %325 = load ptr, ptr %45, align 8, !tbaa !5
  %326 = icmp eq ptr %325, null
  br i1 %326, label %327, label %328

327:                                              ; preds = %318
  store ptr null, ptr %4, align 8
  store i32 1, ptr %12, align 4
  br label %333

328:                                              ; preds = %318
  %329 = load ptr, ptr %5, align 8, !tbaa !5
  %330 = load ptr, ptr %45, align 8, !tbaa !5
  %331 = load ptr, ptr %7, align 8, !tbaa !5
  %332 = call ptr @find_antecedent_type(ptr noundef %329, ptr noundef %330, ptr noundef %331)
  store ptr %332, ptr %4, align 8
  store i32 1, ptr %12, align 4
  br label %333

333:                                              ; preds = %328, %327
  call void @llvm.lifetime.end.p0(i64 8, ptr %45) #3
  br label %367

334:                                              ; preds = %3
  call void @llvm.lifetime.start.p0(i64 8, ptr %46) #3
  %335 = load ptr, ptr %5, align 8, !tbaa !5
  %336 = getelementptr inbounds %struct.pass_opt_t, ptr %335, i32 0, i32 36
  %337 = getelementptr inbounds %struct.typecheck_t, ptr %336, i32 0, i32 0
  %338 = load ptr, ptr %337, align 8, !tbaa !15
  %339 = getelementptr inbounds %struct.typecheck_frame_t, ptr %338, i32 0, i32 17
  %340 = load ptr, ptr %339, align 8, !tbaa !24
  store ptr %340, ptr %46, align 8, !tbaa !5
  %341 = load ptr, ptr %46, align 8, !tbaa !5
  %342 = icmp eq ptr %341, null
  br i1 %342, label %343, label %344

343:                                              ; preds = %334
  store ptr null, ptr %4, align 8
  store i32 1, ptr %12, align 4
  br label %349

344:                                              ; preds = %334
  %345 = load ptr, ptr %5, align 8, !tbaa !5
  %346 = load ptr, ptr %46, align 8, !tbaa !5
  %347 = load ptr, ptr %7, align 8, !tbaa !5
  %348 = call ptr @find_antecedent_type(ptr noundef %345, ptr noundef %346, ptr noundef %347)
  store ptr %348, ptr %4, align 8
  store i32 1, ptr %12, align 4
  br label %349

349:                                              ; preds = %344, %343
  call void @llvm.lifetime.end.p0(i64 8, ptr %46) #3
  br label %367

350:                                              ; preds = %3
  %351 = load ptr, ptr %7, align 8, !tbaa !5
  %352 = icmp ne ptr %351, null
  br i1 %352, label %353, label %355

353:                                              ; preds = %350
  %354 = load ptr, ptr %7, align 8, !tbaa !5
  store i8 1, ptr %354, align 1, !tbaa !25
  br label %355

355:                                              ; preds = %353, %350
  %356 = load ptr, ptr %5, align 8, !tbaa !5
  %357 = load ptr, ptr %8, align 8, !tbaa !5
  %358 = load ptr, ptr %7, align 8, !tbaa !5
  %359 = call ptr @find_antecedent_type(ptr noundef %356, ptr noundef %357, ptr noundef %358)
  store ptr %359, ptr %4, align 8
  store i32 1, ptr %12, align 4
  br label %367

360:                                              ; preds = %3, %3, %3, %3, %3, %3, %3, %3, %3, %3, %3, %3, %3, %3, %3
  %361 = load ptr, ptr %5, align 8, !tbaa !5
  %362 = load ptr, ptr %8, align 8, !tbaa !5
  %363 = load ptr, ptr %7, align 8, !tbaa !5
  %364 = call ptr @find_antecedent_type(ptr noundef %361, ptr noundef %362, ptr noundef %363)
  store ptr %364, ptr %4, align 8
  store i32 1, ptr %12, align 4
  br label %367

365:                                              ; preds = %3
  br label %366

366:                                              ; preds = %365, %316
  store ptr null, ptr %4, align 8
  store i32 1, ptr %12, align 4
  br label %367

367:                                              ; preds = %366, %360, %355, %349, %333, %316, %266, %261, %251, %245, %226, %179, %94, %75, %63
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  %368 = load ptr, ptr %4, align 8
  ret ptr %368
}

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

declare ptr @ast_type(ptr noundef) #1

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

declare void @deferred_reify_free(ptr noundef) #1

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

declare ptr @type_for_fun(ptr noundef) #1

declare void @ast_free_unattached(ptr noundef) #1

declare ptr @ast_childlast(ptr noundef) #1

; Function Attrs: nounwind uwtable
declare hidden ptr @find_tuple_type(ptr noundef, ptr noundef, i64 noundef) #2

declare i64 @ast_childcount(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 0}
!10 = !{!"deferred_reification_t", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = !{!16, !6, i64 176}
!16 = !{!"pass_opt_t", !17, i64 0, !17, i64 4, !18, i64 8, !18, i64 9, !18, i64 10, !18, i64 11, !18, i64 12, !18, i64 13, !18, i64 14, !18, i64 15, !18, i64 16, !18, i64 17, !18, i64 18, !18, i64 19, !18, i64 20, !18, i64 21, !17, i64 24, !19, i64 32, !18, i64 40, !18, 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, !20, i64 176, !6, i64 224, !6, i64 232}
!17 = !{!"int", !7, i64 0}
!18 = !{!"_Bool", !7, i64 0}
!19 = !{!"long", !7, i64 0}
!20 = !{!"typecheck_t", !6, i64 0, !21, i64 8, !6, i64 40}
!21 = !{!"typecheck_stats_t", !19, i64 0, !19, i64 8, !19, i64 16, !19, i64 24}
!22 = !{!23, !6, i64 56}
!23 = !{!"typecheck_frame_t", !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, !6, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !6, i64 184, !6, i64 192, !6, i64 200}
!24 = !{!23, !6, i64 136}
!25 = !{!18, !18, i64 0}


; 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 [73 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [13 x i8], align 1
@__func__.find_antecedent_type = external hidden unnamed_addr constant [21 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [35 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_parent(ptr noundef) local_unnamed_addr #1

declare i32 @ast_id(ptr noundef) local_unnamed_addr #1

declare ptr @ast_sibling(ptr noundef) local_unnamed_addr #1

declare ptr @ast_child(ptr noundef) local_unnamed_addr #1

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

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

declare ptr @ast_name(ptr noundef) local_unnamed_addr #1

declare ptr @stringtab(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 dso_local zeroext i1 @is_typecheck_error(ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local ptr @find_antecedent_type(ptr noundef %0, ptr noundef %1, ptr noundef %2) local_unnamed_addr #2 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca [3 x ptr], align 16
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca [4 x ptr], align 16
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca [3 x ptr], align 16
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca [5 x ptr], align 16
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca ptr, align 8
  %22 = alloca ptr, align 8
  %23 = alloca [5 x ptr], align 16
  %24 = getelementptr inbounds i8, ptr %0, i64 176
  %.not238 = icmp eq ptr %2, null
  br i1 %.not238, label %tailrecurse.us.us, label %tailrecurse

tailrecurse.us.us:                                ; preds = %3, %tailrecurse.us.us.backedge
  %.tr134.us.us = phi ptr [ %.tr134.us.us.be, %tailrecurse.us.us.backedge ], [ %1, %3 ]
  %25 = tail call ptr @ast_parent(ptr noundef %.tr134.us.us) #3
  %26 = tail call i32 @ast_id(ptr noundef %25) #3
  switch i32 %26, label %.loopexit137 [
    i32 24, label %.split.us
    i32 165, label %.split168.us
    i32 174, label %.split168.us
    i32 179, label %.split172.us
    i32 169, label %.split176.us
    i32 171, label %.split180.us
    i32 172, label %.split180.us
    i32 89, label %.split183.us
    i32 175, label %37
    i32 178, label %.split187.us
    i32 103, label %32
    i32 104, label %27
    i32 107, label %tailrecurse.us.us.backedge
    i32 108, label %tailrecurse.us.us.backedge
    i32 109, label %tailrecurse.us.us.backedge
    i32 110, label %tailrecurse.us.us.backedge
    i32 111, label %tailrecurse.us.us.backedge
    i32 112, label %tailrecurse.us.us.backedge
    i32 113, label %tailrecurse.us.us.backedge
    i32 116, label %tailrecurse.us.us.backedge
    i32 118, label %tailrecurse.us.us.backedge
    i32 122, label %tailrecurse.us.us.backedge
    i32 180, label %tailrecurse.us.us.backedge
    i32 181, label %tailrecurse.us.us.backedge
    i32 124, label %tailrecurse.us.us.backedge
    i32 125, label %tailrecurse.us.us.backedge
    i32 206, label %tailrecurse.us.us.backedge
    i32 177, label %tailrecurse.us.us.backedge
  ]

tailrecurse.us.us.backedge:                       ; preds = %tailrecurse.us.us, %tailrecurse.us.us, %tailrecurse.us.us, %tailrecurse.us.us, %tailrecurse.us.us, %tailrecurse.us.us, %tailrecurse.us.us, %tailrecurse.us.us, %tailrecurse.us.us, %tailrecurse.us.us, %tailrecurse.us.us, %tailrecurse.us.us, %tailrecurse.us.us, %tailrecurse.us.us, %tailrecurse.us.us, %tailrecurse.us.us, %40, %37, %32, %27
  %.tr134.us.us.be = phi ptr [ %25, %tailrecurse.us.us ], [ %25, %37 ], [ %25, %40 ], [ %35, %32 ], [ %30, %27 ], [ %25, %tailrecurse.us.us ], [ %25, %tailrecurse.us.us ], [ %25, %tailrecurse.us.us ], [ %25, %tailrecurse.us.us ], [ %25, %tailrecurse.us.us ], [ %25, %tailrecurse.us.us ], [ %25, %tailrecurse.us.us ], [ %25, %tailrecurse.us.us ], [ %25, %tailrecurse.us.us ], [ %25, %tailrecurse.us.us ], [ %25, %tailrecurse.us.us ], [ %25, %tailrecurse.us.us ], [ %25, %tailrecurse.us.us ], [ %25, %tailrecurse.us.us ], [ %25, %tailrecurse.us.us ]
  br label %tailrecurse.us.us

27:                                               ; preds = %tailrecurse.us.us
  %28 = load ptr, ptr %24, align 8, !tbaa !5
  %29 = getelementptr inbounds i8, ptr %28, i64 136
  %30 = load ptr, ptr %29, align 8, !tbaa !15
  %31 = icmp eq ptr %30, null
  br i1 %31, label %.thread, label %tailrecurse.us.us.backedge

32:                                               ; preds = %tailrecurse.us.us
  %33 = load ptr, ptr %24, align 8, !tbaa !5
  %34 = getelementptr inbounds i8, ptr %33, i64 56
  %35 = load ptr, ptr %34, align 8, !tbaa !17
  %36 = icmp eq ptr %35, null
  br i1 %36, label %.thread, label %tailrecurse.us.us.backedge

37:                                               ; preds = %tailrecurse.us.us
  %38 = tail call ptr @ast_childlast(ptr noundef %25) #3
  %39 = icmp eq ptr %38, %.tr134.us.us
  br i1 %39, label %tailrecurse.us.us.backedge, label %40

40:                                               ; preds = %37
  %41 = tail call ptr @ast_parent(ptr noundef %25) #3
  %42 = tail call i32 @ast_id(ptr noundef %41) #3
  %43 = icmp eq i32 %42, 179
  br i1 %43, label %tailrecurse.us.us.backedge, label %.thread

tailrecurse:                                      ; preds = %3, %tailrecurse.backedge
  %.tr134 = phi ptr [ %.tr134.be, %tailrecurse.backedge ], [ %1, %3 ]
  %44 = tail call ptr @ast_parent(ptr noundef %.tr134) #3
  %45 = tail call i32 @ast_id(ptr noundef %44) #3
  switch i32 %45, label %.loopexit137 [
    i32 24, label %.split.us
    i32 165, label %.split168.us
    i32 174, label %.split168.us
    i32 179, label %.split172.us
    i32 169, label %.split176.us
    i32 171, label %.split180.us
    i32 172, label %.split180.us
    i32 89, label %.split183.us
    i32 175, label %144
    i32 178, label %.split187.us
    i32 103, label %172
    i32 104, label %177
    i32 107, label %.split113
    i32 108, label %tailrecurse.backedge
    i32 109, label %tailrecurse.backedge
    i32 110, label %tailrecurse.backedge
    i32 111, label %tailrecurse.backedge
    i32 112, label %tailrecurse.backedge
    i32 113, label %tailrecurse.backedge
    i32 116, label %tailrecurse.backedge
    i32 118, label %tailrecurse.backedge
    i32 122, label %tailrecurse.backedge
    i32 180, label %tailrecurse.backedge
    i32 181, label %tailrecurse.backedge
    i32 124, label %tailrecurse.backedge
    i32 125, label %tailrecurse.backedge
    i32 206, label %tailrecurse.backedge
    i32 177, label %tailrecurse.backedge
  ]

tailrecurse.backedge:                             ; preds = %tailrecurse, %tailrecurse, %tailrecurse, %tailrecurse, %tailrecurse, %tailrecurse, %tailrecurse, %tailrecurse, %tailrecurse, %tailrecurse, %tailrecurse, %tailrecurse, %tailrecurse, %tailrecurse, %tailrecurse, %.split113, %144, %147, %172, %177
  %.tr134.be = phi ptr [ %44, %.split113 ], [ %44, %144 ], [ %44, %147 ], [ %175, %172 ], [ %180, %177 ], [ %44, %tailrecurse ], [ %44, %tailrecurse ], [ %44, %tailrecurse ], [ %44, %tailrecurse ], [ %44, %tailrecurse ], [ %44, %tailrecurse ], [ %44, %tailrecurse ], [ %44, %tailrecurse ], [ %44, %tailrecurse ], [ %44, %tailrecurse ], [ %44, %tailrecurse ], [ %44, %tailrecurse ], [ %44, %tailrecurse ], [ %44, %tailrecurse ], [ %44, %tailrecurse ]
  br label %tailrecurse

.split.us:                                        ; preds = %tailrecurse, %tailrecurse.us.us
  %.us-phi = phi ptr [ %.tr134.us.us, %tailrecurse.us.us ], [ %.tr134, %tailrecurse ]
  %.us-phi166 = phi ptr [ %25, %tailrecurse.us.us ], [ %44, %tailrecurse ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #3
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #3
  store ptr %4, ptr %6, align 16, !tbaa !18
  %46 = getelementptr inbounds i8, ptr %6, i64 8
  store ptr %5, ptr %46, align 8, !tbaa !18
  %47 = getelementptr inbounds i8, ptr %6, i64 16
  store ptr null, ptr %47, align 16, !tbaa !18
  call void @ast_get_children(ptr noundef %.us-phi166, i64 noundef 2, ptr noundef nonnull %6) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #3
  %48 = load ptr, ptr %5, align 8, !tbaa !18
  %.not127 = icmp eq ptr %48, %.us-phi
  br i1 %.not127, label %49, label %52

49:                                               ; preds = %.split.us
  %50 = load ptr, ptr %4, align 8, !tbaa !18
  %51 = call ptr @ast_type(ptr noundef %50) #3
  br label %52

52:                                               ; preds = %.split.us, %49
  %.0 = phi ptr [ %51, %49 ], [ null, %.split.us ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #3
  br label %.thread

.split168.us:                                     ; preds = %tailrecurse, %tailrecurse, %tailrecurse.us.us, %tailrecurse.us.us
  %.us-phi169 = phi ptr [ %.tr134.us.us, %tailrecurse.us.us ], [ %.tr134.us.us, %tailrecurse.us.us ], [ %.tr134, %tailrecurse ], [ %.tr134, %tailrecurse ]
  %.us-phi170 = phi ptr [ %25, %tailrecurse.us.us ], [ %25, %tailrecurse.us.us ], [ %44, %tailrecurse ], [ %44, %tailrecurse ]
  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 32, ptr nonnull %10) #3
  store ptr %7, ptr %10, align 16, !tbaa !18
  %53 = getelementptr inbounds i8, ptr %10, i64 8
  store ptr %8, ptr %53, align 8, !tbaa !18
  %54 = getelementptr inbounds i8, ptr %10, i64 16
  store ptr %9, ptr %54, align 16, !tbaa !18
  %55 = getelementptr inbounds i8, ptr %10, i64 24
  store ptr null, ptr %55, align 8, !tbaa !18
  call void @ast_get_children(ptr noundef %.us-phi170, i64 noundef 3, ptr noundef nonnull %10) #3
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #3
  %56 = load ptr, ptr %9, align 8, !tbaa !18
  %57 = icmp eq ptr %56, %.us-phi169
  br i1 %57, label %59, label %58

58:                                               ; preds = %.split168.us
  call void @ponyint_assert_fail(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.1, i64 noundef 283, ptr noundef nonnull @__func__.find_antecedent_type) #3
  br label %59

59:                                               ; preds = %.split168.us, %58
  %60 = load ptr, ptr %8, align 8, !tbaa !18
  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
  br label %.thread

.split172.us:                                     ; preds = %tailrecurse, %tailrecurse.us.us
  %.us-phi173 = phi ptr [ %.tr134.us.us, %tailrecurse.us.us ], [ %.tr134, %tailrecurse ]
  %.us-phi174 = phi ptr [ %25, %tailrecurse.us.us ], [ %44, %tailrecurse ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #3
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %13) #3
  store ptr %11, ptr %13, align 16, !tbaa !18
  %61 = getelementptr inbounds i8, ptr %13, i64 8
  store ptr %12, ptr %61, align 8, !tbaa !18
  %62 = getelementptr inbounds i8, ptr %13, i64 16
  store ptr null, ptr %62, align 16, !tbaa !18
  call void @ast_get_children(ptr noundef %.us-phi174, i64 noundef 2, ptr noundef nonnull %13) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %13) #3
  %63 = load ptr, ptr %12, align 8, !tbaa !18
  %64 = icmp eq ptr %63, %.us-phi173
  br i1 %64, label %66, label %65

65:                                               ; preds = %.split172.us
  call void @ponyint_assert_fail(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.1, i64 noundef 291, ptr noundef nonnull @__func__.find_antecedent_type) #3
  br label %66

66:                                               ; preds = %.split172.us, %65
  %67 = load ptr, ptr %11, align 8, !tbaa !18
  %68 = call i32 @ast_id(ptr noundef %67) #3
  %69 = icmp eq i32 %68, 2
  %70 = load ptr, ptr %11, align 8
  %.1 = select i1 %69, ptr null, ptr %70
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #3
  br label %.thread

.split176.us:                                     ; preds = %tailrecurse, %tailrecurse.us.us
  %.us-phi177 = phi ptr [ %.tr134.us.us, %tailrecurse.us.us ], [ %.tr134, %tailrecurse ]
  %.us-phi178 = phi ptr [ %25, %tailrecurse.us.us ], [ %44, %tailrecurse ]
  %71 = tail call ptr @ast_parent(ptr noundef %.us-phi178) #3
  %72 = tail call ptr @ast_child(ptr noundef %71) #3
  %73 = tail call ptr @ast_type(ptr noundef %72) #3
  %74 = tail call zeroext i1 @is_typecheck_error(ptr noundef %73)
  br i1 %74, label %.thread, label %75

75:                                               ; preds = %.split176.us
  %76 = tail call i32 @ast_id(ptr noundef %73) #3
  %.not124 = icmp eq i32 %76, 153
  br i1 %.not124, label %92, label %77

77:                                               ; preds = %75
  %78 = tail call ptr @stringtab(ptr noundef nonnull @.str.5) #3
  %79 = tail call ptr @lookup(ptr noundef %0, ptr noundef %72, ptr noundef %73, ptr noundef %78) #3
  %80 = icmp eq ptr %79, null
  br i1 %80, label %.thread, label %81

81:                                               ; preds = %77
  %82 = load ptr, ptr %79, align 8, !tbaa !19
  %83 = tail call i32 @ast_id(ptr noundef %82) #3
  %.not125 = icmp eq i32 %83, 90
  br i1 %.not125, label %88, label %84

84:                                               ; preds = %81
  %85 = load ptr, ptr %79, align 8, !tbaa !19
  %86 = tail call i32 @ast_id(ptr noundef %85) #3
  %.not126 = icmp eq i32 %86, 89
  br i1 %.not126, label %88, label %87

87:                                               ; preds = %84
  tail call void @deferred_reify_free(ptr noundef nonnull %79) #3
  br label %.thread

88:                                               ; preds = %81, %84
  %89 = load ptr, ptr %79, align 8, !tbaa !19
  %90 = tail call ptr @deferred_reify_method_def(ptr noundef nonnull %79, ptr noundef %89, ptr noundef %0) #3
  %91 = tail call ptr @type_for_fun(ptr noundef %90) #3
  tail call void @ast_free_unattached(ptr noundef %90) #3
  tail call void @deferred_reify_free(ptr noundef nonnull %79) #3
  br label %92

92:                                               ; preds = %88, %75
  %.1108 = phi ptr [ %91, %88 ], [ %73, %75 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #3
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %18) #3
  store ptr %14, ptr %18, align 16, !tbaa !18
  %93 = getelementptr inbounds i8, ptr %18, i64 8
  store ptr %15, ptr %93, align 8, !tbaa !18
  %94 = getelementptr inbounds i8, ptr %18, i64 16
  store ptr %16, ptr %94, align 16, !tbaa !18
  %95 = getelementptr inbounds i8, ptr %18, i64 24
  store ptr %17, ptr %95, align 8, !tbaa !18
  %96 = getelementptr inbounds i8, ptr %18, i64 32
  store ptr null, ptr %96, align 16, !tbaa !18
  call void @ast_get_children(ptr noundef %.1108, i64 noundef 4, ptr noundef nonnull %18) #3
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %18) #3
  %97 = call ptr @ast_child(ptr noundef %.us-phi178) #3
  %98 = load ptr, ptr %16, align 8, !tbaa !18
  %99 = call ptr @ast_child(ptr noundef %98) #3
  %100 = icmp ne ptr %97, null
  %101 = icmp ne ptr %99, null
  %102 = select i1 %100, i1 %101, i1 false
  br i1 %102, label %.lr.ph271, label %.loopexit

.lr.ph271:                                        ; preds = %92, %106
  %.0109269 = phi ptr [ %107, %106 ], [ %97, %92 ]
  %.0111268 = phi ptr [ %108, %106 ], [ %99, %92 ]
  %103 = icmp eq ptr %.0109269, %.us-phi177
  br i1 %103, label %104, label %106

104:                                              ; preds = %.lr.ph271
  %105 = call ptr @ast_childidx(ptr noundef nonnull %.0111268, i64 noundef 1) #3
  br label %.loopexit

106:                                              ; preds = %.lr.ph271
  %107 = call ptr @ast_sibling(ptr noundef nonnull %.0109269) #3
  %108 = call ptr @ast_sibling(ptr noundef nonnull %.0111268) #3
  %109 = icmp ne ptr %107, null
  %110 = icmp ne ptr %108, null
  %111 = select i1 %109, i1 %110, i1 false
  br i1 %111, label %.lr.ph271, label %.loopexit, !llvm.loop !21

.loopexit:                                        ; preds = %106, %92, %104
  %.3 = phi ptr [ %105, %104 ], [ null, %92 ], [ null, %106 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #3
  br label %.thread

.split180.us:                                     ; preds = %tailrecurse, %tailrecurse, %tailrecurse.us.us, %tailrecurse.us.us
  %.us-phi181 = phi ptr [ %25, %tailrecurse.us.us ], [ %25, %tailrecurse.us.us ], [ %44, %tailrecurse ], [ %44, %tailrecurse ]
  %112 = tail call ptr @ast_parent(ptr noundef %.us-phi181) #3
  %113 = tail call ptr @ast_parent(ptr noundef %112) #3
  %114 = tail call ptr @ast_child(ptr noundef %113) #3
  %115 = tail call ptr @ast_type(ptr noundef %114) #3
  %116 = tail call zeroext i1 @is_typecheck_error(ptr noundef %115)
  br i1 %116, label %.thread, label %117

117:                                              ; preds = %.split180.us
  %118 = tail call i32 @ast_id(ptr noundef %115) #3
  %119 = icmp eq i32 %118, 153
  br i1 %119, label %121, label %120

120:                                              ; preds = %117
  tail call void @ponyint_assert_fail(ptr noundef nonnull @.str.6, ptr noundef nonnull @.str.1, i64 noundef 358, ptr noundef nonnull @__func__.find_antecedent_type) #3
  br label %121

121:                                              ; preds = %117, %120
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %19) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %20) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %21) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %22) #3
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %23) #3
  store ptr %19, ptr %23, align 16, !tbaa !18
  %122 = getelementptr inbounds i8, ptr %23, i64 8
  store ptr %20, ptr %122, align 8, !tbaa !18
  %123 = getelementptr inbounds i8, ptr %23, i64 16
  store ptr %21, ptr %123, align 16, !tbaa !18
  %124 = getelementptr inbounds i8, ptr %23, i64 24
  store ptr %22, ptr %124, align 8, !tbaa !18
  %125 = getelementptr inbounds i8, ptr %23, i64 32
  store ptr null, ptr %125, align 16, !tbaa !18
  call void @ast_get_children(ptr noundef %115, i64 noundef 4, ptr noundef nonnull %23) #3
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %23) #3
  %126 = call ptr @ast_child(ptr noundef %.us-phi181) #3
  %127 = call ptr @ast_name(ptr noundef %126) #3
  %128 = load ptr, ptr %21, align 8, !tbaa !18
  %129 = call ptr @ast_child(ptr noundef %128) #3
  %.not123264 = icmp eq ptr %129, null
  br i1 %.not123264, label %.loopexit136, label %.lr.ph267

.lr.ph267:                                        ; preds = %121, %135
  %.0110265 = phi ptr [ %136, %135 ], [ %129, %121 ]
  %130 = call ptr @ast_child(ptr noundef nonnull %.0110265) #3
  %131 = call ptr @ast_name(ptr noundef %130) #3
  %132 = icmp eq ptr %131, %127
  br i1 %132, label %133, label %135

133:                                              ; preds = %.lr.ph267
  %134 = call ptr @ast_childidx(ptr noundef nonnull %.0110265, i64 noundef 1) #3
  br label %.loopexit136

135:                                              ; preds = %.lr.ph267
  %136 = call ptr @ast_sibling(ptr noundef nonnull %.0110265) #3
  %.not123 = icmp eq ptr %136, null
  br i1 %.not123, label %.loopexit136, label %.lr.ph267, !llvm.loop !23

.loopexit136:                                     ; preds = %135, %121, %133
  %.5 = phi ptr [ %134, %133 ], [ null, %121 ], [ null, %135 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %22) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %21) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %20) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #3
  br label %.thread

.split183.us:                                     ; preds = %tailrecurse, %tailrecurse.us.us
  %.us-phi184 = phi ptr [ %.tr134.us.us, %tailrecurse.us.us ], [ %.tr134, %tailrecurse ]
  %.us-phi185 = phi ptr [ %25, %tailrecurse.us.us ], [ %44, %tailrecurse ]
  %137 = tail call ptr @ast_childidx(ptr noundef %.us-phi185, i64 noundef 6) #3
  %138 = icmp eq ptr %137, %.us-phi184
  br i1 %138, label %140, label %139

139:                                              ; preds = %.split183.us
  tail call void @ponyint_assert_fail(ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.1, i64 noundef 381, ptr noundef nonnull @__func__.find_antecedent_type) #3
  br label %140

140:                                              ; preds = %.split183.us, %139
  %141 = tail call ptr @ast_childidx(ptr noundef %.us-phi185, i64 noundef 4) #3
  %142 = tail call i32 @ast_id(ptr noundef %141) #3
  %143 = icmp eq i32 %142, 2
  %. = select i1 %143, ptr null, ptr %141
  br label %.thread

144:                                              ; preds = %tailrecurse
  %145 = tail call ptr @ast_childlast(ptr noundef %44) #3
  %146 = icmp eq ptr %145, %.tr134
  br i1 %146, label %tailrecurse.backedge, label %147

147:                                              ; preds = %144
  %148 = tail call ptr @ast_parent(ptr noundef %44) #3
  %149 = tail call i32 @ast_id(ptr noundef %148) #3
  %150 = icmp eq i32 %149, 179
  br i1 %150, label %tailrecurse.backedge, label %.thread

.split187.us:                                     ; preds = %tailrecurse, %tailrecurse.us.us
  %.us-phi188 = phi ptr [ null, %tailrecurse.us.us ], [ %2, %tailrecurse ]
  %.us-phi189 = phi ptr [ %.tr134.us.us, %tailrecurse.us.us ], [ %.tr134, %tailrecurse ]
  %.us-phi190 = phi ptr [ %25, %tailrecurse.us.us ], [ %44, %tailrecurse ]
  %151 = tail call ptr @find_antecedent_type(ptr noundef %0, ptr noundef %.us-phi190, ptr noundef %.us-phi188)
  %152 = icmp eq ptr %151, null
  br i1 %152, label %.thread, label %153

153:                                              ; preds = %.split187.us
  %154 = tail call i64 @ast_childcount(ptr noundef %.us-phi190) #3
  %155 = tail call ptr @find_tuple_type(ptr noundef %0, ptr noundef nonnull %151, i64 noundef %154)
  %156 = icmp eq ptr %155, null
  br i1 %156, label %.thread, label %157

157:                                              ; preds = %153
  %158 = tail call i32 @ast_id(ptr noundef nonnull %155) #3
  %159 = icmp eq i32 %158, 150
  br i1 %159, label %161, label %160

160:                                              ; preds = %157
  tail call void @ponyint_assert_fail(ptr noundef nonnull @.str.8, ptr noundef nonnull @.str.1, i64 noundef 415, ptr noundef nonnull @__func__.find_antecedent_type) #3
  br label %161

161:                                              ; preds = %157, %160
  %162 = tail call ptr @ast_child(ptr noundef %.us-phi190) #3
  %163 = tail call ptr @ast_child(ptr noundef nonnull %155) #3
  %164 = icmp eq ptr %162, null
  %165 = icmp eq ptr %163, null
  %.not122258 = select i1 %164, i1 true, i1 %165
  %166 = icmp eq ptr %162, %.us-phi189
  %or.cond259 = or i1 %166, %.not122258
  br i1 %or.cond259, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %161, %.lr.ph
  %.0105261 = phi ptr [ %168, %.lr.ph ], [ %163, %161 ]
  %.0106260 = phi ptr [ %167, %.lr.ph ], [ %162, %161 ]
  %167 = tail call ptr @ast_sibling(ptr noundef nonnull %.0106260) #3
  %168 = tail call ptr @ast_sibling(ptr noundef nonnull %.0105261) #3
  %169 = icmp eq ptr %167, null
  %170 = icmp eq ptr %168, null
  %.not122 = select i1 %169, i1 true, i1 %170
  %171 = icmp eq ptr %167, %.us-phi189
  %or.cond = or i1 %171, %.not122
  br i1 %or.cond, label %._crit_edge, label %.lr.ph, !llvm.loop !24

._crit_edge:                                      ; preds = %.lr.ph, %161
  %.0105.lcssa = phi ptr [ %163, %161 ], [ %168, %.lr.ph ]
  %.not122.lcssa = phi i1 [ %.not122258, %161 ], [ %.not122, %.lr.ph ]
  br i1 %.not122.lcssa, label %.loopexit137, label %.thread

172:                                              ; preds = %tailrecurse
  %173 = load ptr, ptr %24, align 8, !tbaa !5
  %174 = getelementptr inbounds i8, ptr %173, i64 56
  %175 = load ptr, ptr %174, align 8, !tbaa !17
  %176 = icmp eq ptr %175, null
  br i1 %176, label %.thread, label %tailrecurse.backedge

177:                                              ; preds = %tailrecurse
  %178 = load ptr, ptr %24, align 8, !tbaa !5
  %179 = getelementptr inbounds i8, ptr %178, i64 136
  %180 = load ptr, ptr %179, align 8, !tbaa !15
  %181 = icmp eq ptr %180, null
  br i1 %181, label %.thread, label %tailrecurse.backedge

.split113:                                        ; preds = %tailrecurse
  store i8 1, ptr %2, align 1, !tbaa !25
  br label %tailrecurse.backedge

.loopexit137:                                     ; preds = %tailrecurse, %tailrecurse.us.us, %._crit_edge
  br label %.thread

.thread:                                          ; preds = %147, %172, %177, %27, %32, %40, %153, %.split187.us, %77, %87, %.loopexit136, %.split180.us, %.loopexit, %.split176.us, %._crit_edge, %.loopexit137, %140, %66, %59, %52
  %.12 = phi ptr [ null, %.loopexit137 ], [ %.0105.lcssa, %._crit_edge ], [ %., %140 ], [ %.1, %66 ], [ %60, %59 ], [ %.0, %52 ], [ %.3, %.loopexit ], [ %73, %.split176.us ], [ %.5, %.loopexit136 ], [ %115, %.split180.us ], [ null, %87 ], [ null, %77 ], [ null, %.split187.us ], [ null, %153 ], [ null, %40 ], [ null, %32 ], [ null, %27 ], [ null, %177 ], [ null, %172 ], [ null, %147 ]
  ret ptr %.12
}

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

declare ptr @ast_type(ptr noundef) local_unnamed_addr #1

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

declare void @deferred_reify_free(ptr noundef) local_unnamed_addr #1

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

declare ptr @type_for_fun(ptr noundef) local_unnamed_addr #1

declare void @ast_free_unattached(ptr noundef) local_unnamed_addr #1

declare ptr @ast_childlast(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden ptr @find_tuple_type(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #2

declare i64 @ast_childcount(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, !12, i64 176}
!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 = !{!16, !12, i64 136}
!16 = !{!"typecheck_frame_t", !12, i64 0, !12, i64 8, !12, i64 16, !12, i64 24, !12, i64 32, !12, i64 40, !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, !12, i64 176, !12, i64 184, !12, i64 192, !12, i64 200}
!17 = !{!16, !12, i64 56}
!18 = !{!12, !12, i64 0}
!19 = !{!20, !12, i64 0}
!20 = !{!"deferred_reification_t", !12, i64 0, !12, i64 8, !12, i64 16, !12, i64 24, !12, i64 32, !12, i64 40}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = distinct !{!23, !22}
!24 = distinct !{!24, !22}
!25 = !{!10, !10, i64 0}


; Effective O3 passes: CallSiteSplittingPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass