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

; 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.2 = external hidden unnamed_addr constant [77 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [13 x i8], align 1
@__func__.expr_as = external hidden unnamed_addr constant [8 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [61 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [42 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_get_children(ptr noundef, i64 noundef, ptr noundef) #0

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

declare ptr @ast_type(ptr noundef) #0

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

declare zeroext i1 @is_typecheck_error(ptr noundef) #0

declare ptr @ast_print_type(ptr noundef) #0

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

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

declare ptr @ast_child(ptr noundef) #0

; Function Attrs: nounwind uwtable
define dso_local zeroext i1 @expr_as(ptr noundef %0, ptr noundef %1) #2 {
  %3 = alloca i1, align 1
  %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 [3 x ptr], align 16
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %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 ptr, align 8
  %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 ptr, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %38 = load ptr, ptr %5, align 8, !tbaa !5
  %39 = icmp ne ptr %38, null
  br i1 %39, label %40, label %41

40:                                               ; preds = %2
  br label %42

41:                                               ; preds = %2
  call void @ponyint_assert_fail(ptr noundef @.str.19, ptr noundef @.str.2, i64 noundef 606, ptr noundef @__func__.expr_as)
  br label %42

42:                                               ; preds = %41, %40
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #3
  %43 = load ptr, ptr %5, align 8, !tbaa !5
  %44 = load ptr, ptr %43, align 8, !tbaa !5
  store ptr %44, ptr %6, align 8, !tbaa !5
  %45 = load ptr, ptr %6, align 8, !tbaa !5
  %46 = icmp ne ptr %45, null
  br i1 %46, label %47, label %48

47:                                               ; preds = %42
  br label %49

48:                                               ; preds = %42
  call void @ponyint_assert_fail(ptr noundef @.str.20, ptr noundef @.str.2, i64 noundef 608, ptr noundef @__func__.expr_as)
  br label %49

49:                                               ; preds = %48, %47
  %50 = load ptr, ptr %6, align 8, !tbaa !5
  %51 = call i32 @ast_id(ptr noundef %50)
  %52 = icmp eq i32 %51, 81
  br i1 %52, label %53, label %54

53:                                               ; preds = %49
  br label %55

54:                                               ; preds = %49
  call void @ponyint_assert_fail(ptr noundef @.str.21, ptr noundef @.str.2, i64 noundef 610, ptr noundef @__func__.expr_as)
  br label %55

55:                                               ; preds = %54, %53
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.start.p0(i64 24, ptr %9) #3
  store ptr %7, ptr %9, align 8, !tbaa !5
  %56 = getelementptr inbounds ptr, ptr %9, i64 1
  store ptr %8, ptr %56, align 8, !tbaa !5
  %57 = getelementptr inbounds ptr, ptr %9, i64 2
  store ptr null, ptr %57, align 8, !tbaa !5
  %58 = load ptr, ptr %6, align 8, !tbaa !5
  %59 = getelementptr inbounds [3 x ptr], ptr %9, i64 0, i64 0
  call void @ast_get_children(ptr noundef %58, i64 noundef 2, ptr noundef %59)
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  %60 = load ptr, ptr %7, align 8, !tbaa !5
  %61 = call ptr @ast_type(ptr noundef %60)
  store ptr %61, ptr %10, align 8, !tbaa !5
  %62 = load ptr, ptr %10, align 8, !tbaa !5
  %63 = call zeroext i1 @is_typecheck_error(ptr noundef %62)
  br i1 %63, label %64, label %65

64:                                               ; preds = %55
  store i1 false, ptr %3, align 1
  store i32 1, ptr %11, align 4
  br label %405

65:                                               ; preds = %55
  %66 = load ptr, ptr %10, align 8, !tbaa !5
  %67 = call i32 @ast_id(ptr noundef %66)
  %68 = icmp eq i32 %67, 159
  br i1 %68, label %73, label %69

69:                                               ; preds = %65
  %70 = load ptr, ptr %10, align 8, !tbaa !5
  %71 = call i32 @ast_id(ptr noundef %70)
  %72 = icmp eq i32 %71, 161
  br i1 %72, label %73, label %79

73:                                               ; preds = %69, %65
  %74 = load ptr, ptr %4, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.pass_opt_t, ptr %74, i32 0, i32 36
  %76 = getelementptr inbounds %struct.typecheck_t, ptr %75, i32 0, i32 2
  %77 = load ptr, ptr %76, align 8, !tbaa !9
  %78 = load ptr, ptr %7, align 8, !tbaa !5
  call void (ptr, ptr, ptr, ...) @ast_error(ptr noundef %77, ptr noundef %78, ptr noundef @.str.22)
  store i1 false, ptr %3, align 1
  store i32 1, ptr %11, align 4
  br label %405

79:                                               ; preds = %69
  %80 = load ptr, ptr %10, align 8, !tbaa !5
  %81 = load ptr, ptr %8, align 8, !tbaa !5
  %82 = load ptr, ptr %4, align 8, !tbaa !5
  %83 = call zeroext i1 @is_subtype(ptr noundef %80, ptr noundef %81, ptr noundef null, ptr noundef %82)
  br i1 %83, label %84, label %116

84:                                               ; preds = %79
  %85 = load ptr, ptr %8, align 8, !tbaa !5
  %86 = load ptr, ptr %10, align 8, !tbaa !5
  %87 = load ptr, ptr %4, align 8, !tbaa !5
  %88 = call zeroext i1 @is_subtype(ptr noundef %85, ptr noundef %86, ptr noundef null, ptr noundef %87)
  br i1 %88, label %89, label %102

89:                                               ; preds = %84
  %90 = load ptr, ptr %4, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.pass_opt_t, ptr %90, i32 0, i32 36
  %92 = getelementptr inbounds %struct.typecheck_t, ptr %91, i32 0, i32 2
  %93 = load ptr, ptr %92, align 8, !tbaa !9
  %94 = load ptr, ptr %6, align 8, !tbaa !5
  call void (ptr, ptr, ptr, ...) @ast_error(ptr noundef %93, ptr noundef %94, ptr noundef @.str.23)
  %95 = load ptr, ptr %4, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.pass_opt_t, ptr %95, i32 0, i32 36
  %97 = getelementptr inbounds %struct.typecheck_t, ptr %96, i32 0, i32 2
  %98 = load ptr, ptr %97, align 8, !tbaa !9
  %99 = load ptr, ptr %7, align 8, !tbaa !5
  %100 = load ptr, ptr %8, align 8, !tbaa !5
  %101 = call ptr @ast_print_type(ptr noundef %100)
  call void (ptr, ptr, ptr, ...) @ast_error_continue(ptr noundef %98, ptr noundef %99, ptr noundef @.str.24, ptr noundef %101)
  br label %115

102:                                              ; preds = %84
  %103 = load ptr, ptr %4, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.pass_opt_t, ptr %103, i32 0, i32 36
  %105 = getelementptr inbounds %struct.typecheck_t, ptr %104, i32 0, i32 2
  %106 = load ptr, ptr %105, align 8, !tbaa !9
  %107 = load ptr, ptr %6, align 8, !tbaa !5
  call void (ptr, ptr, ptr, ...) @ast_error(ptr noundef %106, ptr noundef %107, ptr noundef @.str.25)
  %108 = load ptr, ptr %4, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.pass_opt_t, ptr %108, i32 0, i32 36
  %110 = getelementptr inbounds %struct.typecheck_t, ptr %109, i32 0, i32 2
  %111 = load ptr, ptr %110, align 8, !tbaa !9
  %112 = load ptr, ptr %7, align 8, !tbaa !5
  %113 = load ptr, ptr %8, align 8, !tbaa !5
  %114 = call ptr @ast_print_type(ptr noundef %113)
  call void (ptr, ptr, ptr, ...) @ast_error_continue(ptr noundef %111, ptr noundef %112, ptr noundef @.str.26, ptr noundef %114)
  br label %115

115:                                              ; preds = %102, %89
  store i1 false, ptr %3, align 1
  store i32 1, ptr %11, align 4
  br label %405

116:                                              ; preds = %79
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  %117 = load ptr, ptr %8, align 8, !tbaa !5
  %118 = call ptr @ast_from(ptr noundef %117, i32 noundef 1)
  store ptr %118, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #3
  %119 = load ptr, ptr %8, align 8, !tbaa !5
  %120 = call ptr @ast_from(ptr noundef %119, i32 noundef 1)
  store ptr %120, ptr %13, align 8, !tbaa !5
  %121 = load ptr, ptr %4, align 8, !tbaa !5
  %122 = load ptr, ptr %6, align 8, !tbaa !5
  %123 = load ptr, ptr %7, align 8, !tbaa !5
  %124 = load ptr, ptr %8, align 8, !tbaa !5
  %125 = load ptr, ptr %12, align 8, !tbaa !5
  %126 = load ptr, ptr %13, align 8, !tbaa !5
  %127 = call zeroext i1 @add_as_type(ptr noundef %121, ptr noundef %122, ptr noundef %123, ptr noundef %124, ptr noundef %125, ptr noundef %126)
  br i1 %127, label %129, label %128

128:                                              ; preds = %116
  store i1 false, ptr %3, align 1
  store i32 1, ptr %11, align 4
  br label %404

129:                                              ; preds = %116
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #3
  %130 = load ptr, ptr %13, align 8, !tbaa !5
  %131 = call ptr @ast_pop(ptr noundef %130)
  store ptr %131, ptr %14, align 8, !tbaa !5
  %132 = load ptr, ptr %13, align 8, !tbaa !5
  call void @ast_free(ptr noundef %132)
  %133 = load ptr, ptr %14, align 8, !tbaa !5
  %134 = icmp eq ptr %133, null
  br i1 %134, label %135, label %142

135:                                              ; preds = %129
  %136 = load ptr, ptr %4, align 8, !tbaa !5
  %137 = getelementptr inbounds %struct.pass_opt_t, ptr %136, i32 0, i32 36
  %138 = getelementptr inbounds %struct.typecheck_t, ptr %137, i32 0, i32 2
  %139 = load ptr, ptr %138, align 8, !tbaa !9
  %140 = load ptr, ptr %6, align 8, !tbaa !5
  call void (ptr, ptr, ptr, ...) @ast_error(ptr noundef %139, ptr noundef %140, ptr noundef @.str.27)
  %141 = load ptr, ptr %12, align 8, !tbaa !5
  call void @ast_free(ptr noundef %141)
  store i1 false, ptr %3, align 1
  store i32 1, ptr %11, align 4
  br label %403

142:                                              ; preds = %129
  %143 = load ptr, ptr %12, align 8, !tbaa !5
  %144 = call ptr @ast_child(ptr noundef %143)
  %145 = call i32 @ast_id(ptr noundef %144)
  %146 = icmp eq i32 %145, 175
  br i1 %146, label %147, label %148

147:                                              ; preds = %142
  br label %149

148:                                              ; preds = %142
  call void @ponyint_assert_fail(ptr noundef @.str.28, ptr noundef @.str.2, i64 noundef 657, ptr noundef @__func__.expr_as)
  br label %149

149:                                              ; preds = %148, %147
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #3
  %150 = load ptr, ptr %12, align 8, !tbaa !5
  %151 = call ptr @ast_child(ptr noundef %150)
  %152 = call ptr @ast_pop(ptr noundef %151)
  store ptr %152, ptr %15, align 8, !tbaa !5
  %153 = load ptr, ptr %12, align 8, !tbaa !5
  call void @ast_free(ptr noundef %153)
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #3
  %154 = load ptr, ptr %5, align 8, !tbaa !5
  %155 = load ptr, ptr %154, align 8, !tbaa !5
  store ptr %155, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #3
  store ptr null, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #3
  store ptr null, 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
  %156 = load ptr, ptr %16, align 8, !tbaa !5
  %157 = call ptr @ast_from(ptr noundef %156, i32 noundef 122)
  store ptr %157, ptr %19, align 8, !tbaa !5
  %158 = load ptr, ptr %17, align 8, !tbaa !5
  %159 = icmp eq ptr %158, null
  br i1 %159, label %160, label %162

160:                                              ; preds = %149
  %161 = load ptr, ptr %19, align 8, !tbaa !5
  store ptr %161, ptr %17, align 8, !tbaa !5
  br label %174

162:                                              ; preds = %149
  %163 = load ptr, ptr %18, align 8, !tbaa !5
  %164 = icmp eq ptr %163, null
  br i1 %164, label %165, label %169

165:                                              ; preds = %162
  %166 = load ptr, ptr %17, align 8, !tbaa !5
  %167 = load ptr, ptr %19, align 8, !tbaa !5
  %168 = call ptr @ast_add(ptr noundef %166, ptr noundef %167)
  store ptr %168, ptr %18, align 8, !tbaa !5
  br label %173

169:                                              ; preds = %162
  %170 = load ptr, ptr %18, align 8, !tbaa !5
  %171 = load ptr, ptr %19, align 8, !tbaa !5
  %172 = call ptr @ast_add_sibling(ptr noundef %170, ptr noundef %171)
  store ptr %172, ptr %18, align 8, !tbaa !5
  br label %173

173:                                              ; preds = %169, %165
  br label %174

174:                                              ; preds = %173, %160
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #3
  %175 = load ptr, ptr %19, align 8, !tbaa !5
  store ptr %175, ptr %20, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #3
  store ptr null, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #3
  store ptr null, ptr %22, align 8, !tbaa !5
  %176 = load ptr, ptr %20, align 8, !tbaa !5
  call void @ast_scope(ptr noundef %176)
  %177 = load ptr, ptr %16, align 8, !tbaa !5
  %178 = call ptr @ast_from(ptr noundef %177, i32 noundef 175)
  store ptr %178, ptr %22, align 8, !tbaa !5
  %179 = load ptr, ptr %20, align 8, !tbaa !5
  %180 = icmp eq ptr %179, null
  br i1 %180, label %181, label %183

181:                                              ; preds = %174
  %182 = load ptr, ptr %22, align 8, !tbaa !5
  store ptr %182, ptr %20, align 8, !tbaa !5
  br label %195

183:                                              ; preds = %174
  %184 = load ptr, ptr %21, align 8, !tbaa !5
  %185 = icmp eq ptr %184, null
  br i1 %185, label %186, label %190

186:                                              ; preds = %183
  %187 = load ptr, ptr %20, align 8, !tbaa !5
  %188 = load ptr, ptr %22, align 8, !tbaa !5
  %189 = call ptr @ast_add(ptr noundef %187, ptr noundef %188)
  store ptr %189, ptr %21, align 8, !tbaa !5
  br label %194

190:                                              ; preds = %183
  %191 = load ptr, ptr %21, align 8, !tbaa !5
  %192 = load ptr, ptr %22, align 8, !tbaa !5
  %193 = call ptr @ast_add_sibling(ptr noundef %191, ptr noundef %192)
  store ptr %193, ptr %21, align 8, !tbaa !5
  br label %194

194:                                              ; preds = %190, %186
  br label %195

195:                                              ; preds = %194, %181
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #3
  %196 = load ptr, ptr %22, align 8, !tbaa !5
  store ptr %196, ptr %23, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #3
  store ptr null, ptr %24, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #3
  store ptr null, ptr %25, align 8, !tbaa !5
  %197 = load ptr, ptr %23, align 8, !tbaa !5
  %198 = icmp eq ptr %197, null
  br i1 %198, label %199, label %201

199:                                              ; preds = %195
  %200 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %200, ptr %23, align 8, !tbaa !5
  br label %213

201:                                              ; preds = %195
  %202 = load ptr, ptr %24, align 8, !tbaa !5
  %203 = icmp eq ptr %202, null
  br i1 %203, label %204, label %208

204:                                              ; preds = %201
  %205 = load ptr, ptr %23, align 8, !tbaa !5
  %206 = load ptr, ptr %7, align 8, !tbaa !5
  %207 = call ptr @ast_add(ptr noundef %205, ptr noundef %206)
  store ptr %207, ptr %24, align 8, !tbaa !5
  br label %212

208:                                              ; preds = %201
  %209 = load ptr, ptr %24, align 8, !tbaa !5
  %210 = load ptr, ptr %7, align 8, !tbaa !5
  %211 = call ptr @ast_add_sibling(ptr noundef %209, ptr noundef %210)
  store ptr %211, ptr %24, align 8, !tbaa !5
  br label %212

212:                                              ; preds = %208, %204
  br label %213

213:                                              ; preds = %212, %199
  %214 = load ptr, ptr %23, align 8, !tbaa !5
  call void @ast_inheritflags(ptr noundef %214)
  %215 = load ptr, ptr %23, align 8, !tbaa !5
  %216 = load ptr, ptr %24, align 8, !tbaa !5
  %217 = load ptr, ptr %25, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #3
  %218 = load ptr, ptr %16, align 8, !tbaa !5
  %219 = call ptr @ast_from(ptr noundef %218, i32 noundef 180)
  store ptr %219, ptr %22, align 8, !tbaa !5
  %220 = load ptr, ptr %20, align 8, !tbaa !5
  %221 = icmp eq ptr %220, null
  br i1 %221, label %222, label %224

222:                                              ; preds = %213
  %223 = load ptr, ptr %22, align 8, !tbaa !5
  store ptr %223, ptr %20, align 8, !tbaa !5
  br label %236

224:                                              ; preds = %213
  %225 = load ptr, ptr %21, align 8, !tbaa !5
  %226 = icmp eq ptr %225, null
  br i1 %226, label %227, label %231

227:                                              ; preds = %224
  %228 = load ptr, ptr %20, align 8, !tbaa !5
  %229 = load ptr, ptr %22, align 8, !tbaa !5
  %230 = call ptr @ast_add(ptr noundef %228, ptr noundef %229)
  store ptr %230, ptr %21, align 8, !tbaa !5
  br label %235

231:                                              ; preds = %224
  %232 = load ptr, ptr %21, align 8, !tbaa !5
  %233 = load ptr, ptr %22, align 8, !tbaa !5
  %234 = call ptr @ast_add_sibling(ptr noundef %232, ptr noundef %233)
  store ptr %234, ptr %21, align 8, !tbaa !5
  br label %235

235:                                              ; preds = %231, %227
  br label %236

236:                                              ; preds = %235, %222
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #3
  %237 = load ptr, ptr %22, align 8, !tbaa !5
  store ptr %237, ptr %26, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #3
  store ptr null, ptr %27, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #3
  store ptr null, ptr %28, align 8, !tbaa !5
  %238 = load ptr, ptr %26, align 8, !tbaa !5
  call void @ast_scope(ptr noundef %238)
  %239 = load ptr, ptr %16, align 8, !tbaa !5
  %240 = call ptr @ast_from(ptr noundef %239, i32 noundef 181)
  store ptr %240, ptr %28, align 8, !tbaa !5
  %241 = load ptr, ptr %26, align 8, !tbaa !5
  %242 = icmp eq ptr %241, null
  br i1 %242, label %243, label %245

243:                                              ; preds = %236
  %244 = load ptr, ptr %28, align 8, !tbaa !5
  store ptr %244, ptr %26, align 8, !tbaa !5
  br label %257

245:                                              ; preds = %236
  %246 = load ptr, ptr %27, align 8, !tbaa !5
  %247 = icmp eq ptr %246, null
  br i1 %247, label %248, label %252

248:                                              ; preds = %245
  %249 = load ptr, ptr %26, align 8, !tbaa !5
  %250 = load ptr, ptr %28, align 8, !tbaa !5
  %251 = call ptr @ast_add(ptr noundef %249, ptr noundef %250)
  store ptr %251, ptr %27, align 8, !tbaa !5
  br label %256

252:                                              ; preds = %245
  %253 = load ptr, ptr %27, align 8, !tbaa !5
  %254 = load ptr, ptr %28, align 8, !tbaa !5
  %255 = call ptr @ast_add_sibling(ptr noundef %253, ptr noundef %254)
  store ptr %255, ptr %27, align 8, !tbaa !5
  br label %256

256:                                              ; preds = %252, %248
  br label %257

257:                                              ; preds = %256, %243
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #3
  %258 = load ptr, ptr %28, align 8, !tbaa !5
  store ptr %258, ptr %29, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #3
  store ptr null, ptr %30, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #3
  store ptr null, ptr %31, align 8, !tbaa !5
  %259 = load ptr, ptr %29, align 8, !tbaa !5
  call void @ast_scope(ptr noundef %259)
  %260 = load ptr, ptr %29, align 8, !tbaa !5
  %261 = icmp eq ptr %260, null
  br i1 %261, label %262, label %264

262:                                              ; preds = %257
  %263 = load ptr, ptr %15, align 8, !tbaa !5
  store ptr %263, ptr %29, align 8, !tbaa !5
  br label %276

264:                                              ; preds = %257
  %265 = load ptr, ptr %30, align 8, !tbaa !5
  %266 = icmp eq ptr %265, null
  br i1 %266, label %267, label %271

267:                                              ; preds = %264
  %268 = load ptr, ptr %29, align 8, !tbaa !5
  %269 = load ptr, ptr %15, align 8, !tbaa !5
  %270 = call ptr @ast_add(ptr noundef %268, ptr noundef %269)
  store ptr %270, ptr %30, align 8, !tbaa !5
  br label %275

271:                                              ; preds = %264
  %272 = load ptr, ptr %30, align 8, !tbaa !5
  %273 = load ptr, ptr %15, align 8, !tbaa !5
  %274 = call ptr @ast_add_sibling(ptr noundef %272, ptr noundef %273)
  store ptr %274, ptr %30, align 8, !tbaa !5
  br label %275

275:                                              ; preds = %271, %267
  br label %276

276:                                              ; preds = %275, %262
  %277 = load ptr, ptr %29, align 8, !tbaa !5
  %278 = icmp eq ptr %277, null
  br i1 %278, label %279, label %282

279:                                              ; preds = %276
  %280 = load ptr, ptr %16, align 8, !tbaa !5
  %281 = call ptr @ast_from(ptr noundef %280, i32 noundef 2)
  store ptr %281, ptr %29, align 8, !tbaa !5
  br label %296

282:                                              ; preds = %276
  %283 = load ptr, ptr %30, align 8, !tbaa !5
  %284 = icmp eq ptr %283, null
  br i1 %284, label %285, label %290

285:                                              ; preds = %282
  %286 = load ptr, ptr %29, align 8, !tbaa !5
  %287 = load ptr, ptr %16, align 8, !tbaa !5
  %288 = call ptr @ast_from(ptr noundef %287, i32 noundef 2)
  %289 = call ptr @ast_add(ptr noundef %286, ptr noundef %288)
  store ptr %289, ptr %30, align 8, !tbaa !5
  br label %295

290:                                              ; preds = %282
  %291 = load ptr, ptr %30, align 8, !tbaa !5
  %292 = load ptr, ptr %16, align 8, !tbaa !5
  %293 = call ptr @ast_from(ptr noundef %292, i32 noundef 2)
  %294 = call ptr @ast_add_sibling(ptr noundef %291, ptr noundef %293)
  store ptr %294, ptr %30, align 8, !tbaa !5
  br label %295

295:                                              ; preds = %290, %285
  br label %296

296:                                              ; preds = %295, %279
  %297 = load ptr, ptr %29, align 8, !tbaa !5
  %298 = icmp eq ptr %297, null
  br i1 %298, label %299, label %301

299:                                              ; preds = %296
  %300 = load ptr, ptr %14, align 8, !tbaa !5
  store ptr %300, ptr %29, align 8, !tbaa !5
  br label %313

301:                                              ; preds = %296
  %302 = load ptr, ptr %30, align 8, !tbaa !5
  %303 = icmp eq ptr %302, null
  br i1 %303, label %304, label %308

304:                                              ; preds = %301
  %305 = load ptr, ptr %29, align 8, !tbaa !5
  %306 = load ptr, ptr %14, align 8, !tbaa !5
  %307 = call ptr @ast_add(ptr noundef %305, ptr noundef %306)
  store ptr %307, ptr %30, align 8, !tbaa !5
  br label %312

308:                                              ; preds = %301
  %309 = load ptr, ptr %30, align 8, !tbaa !5
  %310 = load ptr, ptr %14, align 8, !tbaa !5
  %311 = call ptr @ast_add_sibling(ptr noundef %309, ptr noundef %310)
  store ptr %311, ptr %30, align 8, !tbaa !5
  br label %312

312:                                              ; preds = %308, %304
  br label %313

313:                                              ; preds = %312, %299
  %314 = load ptr, ptr %29, align 8, !tbaa !5
  call void @ast_inheritflags(ptr noundef %314)
  %315 = load ptr, ptr %29, align 8, !tbaa !5
  %316 = load ptr, ptr %30, align 8, !tbaa !5
  %317 = load ptr, ptr %31, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #3
  %318 = load ptr, ptr %26, align 8, !tbaa !5
  call void @ast_inheritflags(ptr noundef %318)
  %319 = load ptr, ptr %26, align 8, !tbaa !5
  %320 = load ptr, ptr %27, align 8, !tbaa !5
  %321 = load ptr, ptr %28, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #3
  %322 = load ptr, ptr %16, align 8, !tbaa !5
  %323 = call ptr @ast_from(ptr noundef %322, i32 noundef 175)
  store ptr %323, ptr %22, align 8, !tbaa !5
  %324 = load ptr, ptr %20, align 8, !tbaa !5
  %325 = icmp eq ptr %324, null
  br i1 %325, label %326, label %328

326:                                              ; preds = %313
  %327 = load ptr, ptr %22, align 8, !tbaa !5
  store ptr %327, ptr %20, align 8, !tbaa !5
  br label %340

328:                                              ; preds = %313
  %329 = load ptr, ptr %21, align 8, !tbaa !5
  %330 = icmp eq ptr %329, null
  br i1 %330, label %331, label %335

331:                                              ; preds = %328
  %332 = load ptr, ptr %20, align 8, !tbaa !5
  %333 = load ptr, ptr %22, align 8, !tbaa !5
  %334 = call ptr @ast_add(ptr noundef %332, ptr noundef %333)
  store ptr %334, ptr %21, align 8, !tbaa !5
  br label %339

335:                                              ; preds = %328
  %336 = load ptr, ptr %21, align 8, !tbaa !5
  %337 = load ptr, ptr %22, align 8, !tbaa !5
  %338 = call ptr @ast_add_sibling(ptr noundef %336, ptr noundef %337)
  store ptr %338, ptr %21, align 8, !tbaa !5
  br label %339

339:                                              ; preds = %335, %331
  br label %340

340:                                              ; preds = %339, %326
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #3
  %341 = load ptr, ptr %22, align 8, !tbaa !5
  store ptr %341, ptr %32, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #3
  store ptr null, ptr %33, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #3
  store ptr null, ptr %34, align 8, !tbaa !5
  %342 = load ptr, ptr %32, align 8, !tbaa !5
  call void @ast_scope(ptr noundef %342)
  %343 = load ptr, ptr %16, align 8, !tbaa !5
  %344 = call ptr @ast_from(ptr noundef %343, i32 noundef 127)
  store ptr %344, ptr %34, align 8, !tbaa !5
  %345 = load ptr, ptr %32, align 8, !tbaa !5
  %346 = icmp eq ptr %345, null
  br i1 %346, label %347, label %349

347:                                              ; preds = %340
  %348 = load ptr, ptr %34, align 8, !tbaa !5
  store ptr %348, ptr %32, align 8, !tbaa !5
  br label %361

349:                                              ; preds = %340
  %350 = load ptr, ptr %33, align 8, !tbaa !5
  %351 = icmp eq ptr %350, null
  br i1 %351, label %352, label %356

352:                                              ; preds = %349
  %353 = load ptr, ptr %32, align 8, !tbaa !5
  %354 = load ptr, ptr %34, align 8, !tbaa !5
  %355 = call ptr @ast_add(ptr noundef %353, ptr noundef %354)
  store ptr %355, ptr %33, align 8, !tbaa !5
  br label %360

356:                                              ; preds = %349
  %357 = load ptr, ptr %33, align 8, !tbaa !5
  %358 = load ptr, ptr %34, align 8, !tbaa !5
  %359 = call ptr @ast_add_sibling(ptr noundef %357, ptr noundef %358)
  store ptr %359, ptr %33, align 8, !tbaa !5
  br label %360

360:                                              ; preds = %356, %352
  br label %361

361:                                              ; preds = %360, %347
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #3
  %362 = load ptr, ptr %34, align 8, !tbaa !5
  store ptr %362, ptr %35, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #3
  store ptr null, ptr %36, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #3
  store ptr null, ptr %37, align 8, !tbaa !5
  %363 = load ptr, ptr %35, align 8, !tbaa !5
  %364 = icmp eq ptr %363, null
  br i1 %364, label %365, label %368

365:                                              ; preds = %361
  %366 = load ptr, ptr %16, align 8, !tbaa !5
  %367 = call ptr @ast_from(ptr noundef %366, i32 noundef 2)
  store ptr %367, ptr %35, align 8, !tbaa !5
  br label %382

368:                                              ; preds = %361
  %369 = load ptr, ptr %36, align 8, !tbaa !5
  %370 = icmp eq ptr %369, null
  br i1 %370, label %371, label %376

371:                                              ; preds = %368
  %372 = load ptr, ptr %35, align 8, !tbaa !5
  %373 = load ptr, ptr %16, align 8, !tbaa !5
  %374 = call ptr @ast_from(ptr noundef %373, i32 noundef 2)
  %375 = call ptr @ast_add(ptr noundef %372, ptr noundef %374)
  store ptr %375, ptr %36, align 8, !tbaa !5
  br label %381

376:                                              ; preds = %368
  %377 = load ptr, ptr %36, align 8, !tbaa !5
  %378 = load ptr, ptr %16, align 8, !tbaa !5
  %379 = call ptr @ast_from(ptr noundef %378, i32 noundef 2)
  %380 = call ptr @ast_add_sibling(ptr noundef %377, ptr noundef %379)
  store ptr %380, ptr %36, align 8, !tbaa !5
  br label %381

381:                                              ; preds = %376, %371
  br label %382

382:                                              ; preds = %381, %365
  %383 = load ptr, ptr %35, align 8, !tbaa !5
  call void @ast_inheritflags(ptr noundef %383)
  %384 = load ptr, ptr %35, align 8, !tbaa !5
  %385 = load ptr, ptr %36, align 8, !tbaa !5
  %386 = load ptr, ptr %37, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #3
  %387 = load ptr, ptr %32, align 8, !tbaa !5
  call void @ast_inheritflags(ptr noundef %387)
  %388 = load ptr, ptr %32, align 8, !tbaa !5
  %389 = load ptr, ptr %33, align 8, !tbaa !5
  %390 = load ptr, ptr %34, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #3
  %391 = load ptr, ptr %20, align 8, !tbaa !5
  call void @ast_inheritflags(ptr noundef %391)
  %392 = load ptr, ptr %20, align 8, !tbaa !5
  %393 = load ptr, ptr %21, align 8, !tbaa !5
  %394 = load ptr, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #3
  %395 = load ptr, ptr %5, align 8, !tbaa !5
  %396 = load ptr, ptr %17, align 8, !tbaa !5
  call void @ast_replace(ptr noundef %395, ptr noundef %396)
  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
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #3
  %397 = load ptr, ptr %5, align 8, !tbaa !5
  %398 = load ptr, ptr %4, align 8, !tbaa !5
  %399 = call zeroext i1 @ast_passes_subtree(ptr noundef %397, ptr noundef %398, i32 noundef 10)
  br i1 %399, label %401, label %400

400:                                              ; preds = %382
  store i1 false, ptr %3, align 1
  store i32 1, ptr %11, align 4
  br label %402

401:                                              ; preds = %382
  store i1 true, ptr %3, align 1
  store i32 1, ptr %11, align 4
  br label %402

402:                                              ; preds = %401, %400
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #3
  br label %403

403:                                              ; preds = %402, %135
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  br label %404

404:                                              ; preds = %403, %128
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  br label %405

405:                                              ; preds = %404, %115, %73, %64
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  %406 = load i1, ptr %3, align 1
  ret i1 %406
}

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

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

declare ptr @ast_pop(ptr noundef) #0

declare void @ast_free(ptr noundef) #0

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

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

declare void @ast_scope(ptr noundef) #0

declare void @ast_inheritflags(ptr noundef) #0

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

declare zeroext i1 @ast_passes_subtree(ptr noundef, ptr noundef, i32 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, !6, i64 216}
!10 = !{!"pass_opt_t", !11, i64 0, !11, i64 4, !12, i64 8, !12, i64 9, !12, i64 10, !12, i64 11, !12, i64 12, !12, i64 13, !12, i64 14, !12, i64 15, !12, i64 16, !12, i64 17, !12, i64 18, !12, i64 19, !12, i64 20, !12, i64 21, !11, i64 24, !13, i64 32, !12, i64 40, !12, i64 41, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !14, i64 176, !6, i64 224, !6, i64 232}
!11 = !{!"int", !7, i64 0}
!12 = !{!"_Bool", !7, i64 0}
!13 = !{!"long", !7, i64 0}
!14 = !{!"typecheck_t", !6, i64 0, !15, i64 8, !6, i64 40}
!15 = !{!"typecheck_stats_t", !13, i64 0, !13, i64 8, !13, i64 16, !13, i64 24}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

@.str.2 = external hidden unnamed_addr constant [77 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [13 x i8], align 1
@__func__.expr_as = external hidden unnamed_addr constant [8 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [61 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [42 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_get_children(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.end.p0(i64 immarg, ptr nocapture) #1

declare ptr @ast_type(ptr noundef) local_unnamed_addr #0

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

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

declare ptr @ast_print_type(ptr noundef) local_unnamed_addr #0

declare zeroext i1 @is_subtype(ptr noundef, 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_child(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local zeroext i1 @expr_as(ptr noundef %0, ptr noundef %1) local_unnamed_addr #2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca [3 x ptr], align 16
  %.not = icmp eq ptr %1, null
  br i1 %.not, label %6, label %7

6:                                                ; preds = %2
  tail call void @ponyint_assert_fail(ptr noundef nonnull @.str.19, ptr noundef nonnull @.str.2, i64 noundef 606, ptr noundef nonnull @__func__.expr_as) #3
  br label %7

7:                                                ; preds = %2, %6
  %8 = load ptr, ptr %1, align 8, !tbaa !5
  %.not180 = icmp eq ptr %8, null
  br i1 %.not180, label %9, label %10

9:                                                ; preds = %7
  tail call void @ponyint_assert_fail(ptr noundef nonnull @.str.20, ptr noundef nonnull @.str.2, i64 noundef 608, ptr noundef nonnull @__func__.expr_as) #3
  br label %10

10:                                               ; preds = %7, %9
  %11 = tail call i32 @ast_id(ptr noundef %8) #3
  %12 = icmp eq i32 %11, 81
  br i1 %12, label %14, label %13

13:                                               ; preds = %10
  tail call void @ponyint_assert_fail(ptr noundef nonnull @.str.21, ptr noundef nonnull @.str.2, i64 noundef 610, ptr noundef nonnull @__func__.expr_as) #3
  br label %14

14:                                               ; preds = %10, %13
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #3
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #3
  store ptr %3, ptr %5, align 16, !tbaa !5
  %15 = getelementptr inbounds i8, ptr %5, i64 8
  store ptr %4, ptr %15, align 8, !tbaa !5
  %16 = getelementptr inbounds i8, ptr %5, i64 16
  store ptr null, ptr %16, align 16, !tbaa !5
  call void @ast_get_children(ptr noundef %8, i64 noundef 2, ptr noundef nonnull %5) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #3
  %17 = load ptr, ptr %3, align 8, !tbaa !5
  %18 = call ptr @ast_type(ptr noundef %17) #3
  %19 = call zeroext i1 @is_typecheck_error(ptr noundef %18) #3
  br i1 %19, label %135, label %20

20:                                               ; preds = %14
  %21 = call i32 @ast_id(ptr noundef %18) #3
  %22 = icmp eq i32 %21, 159
  br i1 %22, label %26, label %23

23:                                               ; preds = %20
  %24 = call i32 @ast_id(ptr noundef %18) #3
  %25 = icmp eq i32 %24, 161
  br i1 %25, label %26, label %30

26:                                               ; preds = %23, %20
  %27 = getelementptr inbounds i8, ptr %0, i64 216
  %28 = load ptr, ptr %27, align 8, !tbaa !9
  %29 = load ptr, ptr %3, align 8, !tbaa !5
  call void (ptr, ptr, ptr, ...) @ast_error(ptr noundef %28, ptr noundef %29, ptr noundef nonnull @.str.22) #3
  br label %135

30:                                               ; preds = %23
  %31 = load ptr, ptr %4, align 8, !tbaa !5
  %32 = call zeroext i1 @is_subtype(ptr noundef %18, ptr noundef %31, ptr noundef null, ptr noundef %0) #3
  %33 = load ptr, ptr %4, align 8, !tbaa !5
  br i1 %32, label %34, label %48

34:                                               ; preds = %30
  %35 = call zeroext i1 @is_subtype(ptr noundef %33, ptr noundef %18, ptr noundef null, ptr noundef %0) #3
  %36 = getelementptr inbounds i8, ptr %0, i64 216
  %37 = load ptr, ptr %36, align 8, !tbaa !9
  br i1 %35, label %38, label %43

38:                                               ; preds = %34
  call void (ptr, ptr, ptr, ...) @ast_error(ptr noundef %37, ptr noundef %8, ptr noundef nonnull @.str.23) #3
  %39 = load ptr, ptr %36, align 8, !tbaa !9
  %40 = load ptr, ptr %3, align 8, !tbaa !5
  %41 = load ptr, ptr %4, align 8, !tbaa !5
  %42 = call ptr @ast_print_type(ptr noundef %41) #3
  call void (ptr, ptr, ptr, ...) @ast_error_continue(ptr noundef %39, ptr noundef %40, ptr noundef nonnull @.str.24, ptr noundef %42) #3
  br label %135

43:                                               ; preds = %34
  call void (ptr, ptr, ptr, ...) @ast_error(ptr noundef %37, ptr noundef %8, ptr noundef nonnull @.str.25) #3
  %44 = load ptr, ptr %36, align 8, !tbaa !9
  %45 = load ptr, ptr %3, align 8, !tbaa !5
  %46 = load ptr, ptr %4, align 8, !tbaa !5
  %47 = call ptr @ast_print_type(ptr noundef %46) #3
  call void (ptr, ptr, ptr, ...) @ast_error_continue(ptr noundef %44, ptr noundef %45, ptr noundef nonnull @.str.26, ptr noundef %47) #3
  br label %135

48:                                               ; preds = %30
  %49 = call ptr @ast_from(ptr noundef %33, i32 noundef 1) #3
  %50 = load ptr, ptr %4, align 8, !tbaa !5
  %51 = call ptr @ast_from(ptr noundef %50, i32 noundef 1) #3
  %52 = load ptr, ptr %3, align 8, !tbaa !5
  %53 = load ptr, ptr %4, align 8, !tbaa !5
  %54 = call zeroext i1 @add_as_type(ptr noundef %0, ptr noundef %8, ptr noundef %52, ptr noundef %53, ptr noundef %49, ptr noundef %51)
  br i1 %54, label %55, label %135

55:                                               ; preds = %48
  %56 = call ptr @ast_pop(ptr noundef %51) #3
  call void @ast_free(ptr noundef %51) #3
  %57 = icmp eq ptr %56, null
  br i1 %57, label %58, label %61

58:                                               ; preds = %55
  %59 = getelementptr inbounds i8, ptr %0, i64 216
  %60 = load ptr, ptr %59, align 8, !tbaa !9
  call void (ptr, ptr, ptr, ...) @ast_error(ptr noundef %60, ptr noundef %8, ptr noundef nonnull @.str.27) #3
  call void @ast_free(ptr noundef %49) #3
  br label %135

61:                                               ; preds = %55
  %62 = call ptr @ast_child(ptr noundef %49) #3
  %63 = call i32 @ast_id(ptr noundef %62) #3
  %64 = icmp eq i32 %63, 175
  br i1 %64, label %66, label %65

65:                                               ; preds = %61
  call void @ponyint_assert_fail(ptr noundef nonnull @.str.28, ptr noundef nonnull @.str.2, i64 noundef 657, ptr noundef nonnull @__func__.expr_as) #3
  br label %66

66:                                               ; preds = %61, %65
  %67 = call ptr @ast_child(ptr noundef %49) #3
  %68 = call ptr @ast_pop(ptr noundef %67) #3
  call void @ast_free(ptr noundef %49) #3
  %69 = load ptr, ptr %1, align 8, !tbaa !5
  %70 = call ptr @ast_from(ptr noundef %69, i32 noundef 122) #3
  call void @ast_scope(ptr noundef %70) #3
  %71 = call ptr @ast_from(ptr noundef %69, i32 noundef 175) #3
  %72 = icmp eq ptr %70, null
  br i1 %72, label %75, label %73

73:                                               ; preds = %66
  %74 = call ptr @ast_add(ptr noundef nonnull %70, ptr noundef %71) #3
  br label %75

75:                                               ; preds = %66, %73
  %.0170 = phi ptr [ %70, %73 ], [ %71, %66 ]
  %.0167 = phi ptr [ %74, %73 ], [ null, %66 ]
  %76 = icmp eq ptr %71, null
  %77 = load ptr, ptr %3, align 8, !tbaa !5
  br i1 %76, label %80, label %78

78:                                               ; preds = %75
  %79 = call ptr @ast_add(ptr noundef nonnull %71, ptr noundef %77) #3
  br label %80

80:                                               ; preds = %75, %78
  %.0166 = phi ptr [ %71, %78 ], [ %77, %75 ]
  call void @ast_inheritflags(ptr noundef %.0166) #3
  %81 = call ptr @ast_from(ptr noundef %69, i32 noundef 180) #3
  %82 = icmp eq ptr %.0170, null
  br i1 %82, label %89, label %83

83:                                               ; preds = %80
  %84 = icmp eq ptr %.0167, null
  br i1 %84, label %85, label %87

85:                                               ; preds = %83
  %86 = call ptr @ast_add(ptr noundef nonnull %.0170, ptr noundef %81) #3
  br label %89

87:                                               ; preds = %83
  %88 = call ptr @ast_add_sibling(ptr noundef nonnull %.0167, ptr noundef %81) #3
  br label %89

89:                                               ; preds = %80, %85, %87
  %.1171 = phi ptr [ %.0170, %85 ], [ %.0170, %87 ], [ %81, %80 ]
  %.1168 = phi ptr [ %86, %85 ], [ %88, %87 ], [ %.0167, %80 ]
  call void @ast_scope(ptr noundef %81) #3
  %90 = call ptr @ast_from(ptr noundef %69, i32 noundef 181) #3
  %91 = icmp eq ptr %81, null
  br i1 %91, label %94, label %92

92:                                               ; preds = %89
  %93 = call ptr @ast_add(ptr noundef nonnull %81, ptr noundef %90) #3
  br label %94

94:                                               ; preds = %89, %92
  %.0163 = phi ptr [ %81, %92 ], [ %90, %89 ]
  call void @ast_scope(ptr noundef %90) #3
  %95 = icmp eq ptr %90, null
  br i1 %95, label %96, label %98

96:                                               ; preds = %94
  %97 = icmp eq ptr %68, null
  br i1 %97, label %106, label %.thread185

98:                                               ; preds = %94
  %99 = call ptr @ast_add(ptr noundef nonnull %90, ptr noundef %68) #3
  %100 = icmp eq ptr %99, null
  br i1 %100, label %.thread185, label %103

.thread185:                                       ; preds = %96, %98
  %.0159183188 = phi ptr [ %90, %98 ], [ %68, %96 ]
  %101 = call ptr @ast_from(ptr noundef %69, i32 noundef 2) #3
  %102 = call ptr @ast_add(ptr noundef nonnull %.0159183188, ptr noundef %101) #3
  br label %109

103:                                              ; preds = %98
  %104 = call ptr @ast_from(ptr noundef %69, i32 noundef 2) #3
  %105 = call ptr @ast_add_sibling(ptr noundef nonnull %99, ptr noundef %104) #3
  br label %109

106:                                              ; preds = %96
  %107 = call ptr @ast_from(ptr noundef %69, i32 noundef 2) #3
  %108 = icmp eq ptr %107, null
  br i1 %108, label %114, label %.thread194

109:                                              ; preds = %.thread185, %103
  %.1160.ph = phi ptr [ %90, %103 ], [ %.0159183188, %.thread185 ]
  %.1157.ph = phi ptr [ %105, %103 ], [ %102, %.thread185 ]
  %110 = icmp eq ptr %.1157.ph, null
  br i1 %110, label %.thread194, label %112

.thread194:                                       ; preds = %106, %109
  %.1160192197 = phi ptr [ %.1160.ph, %109 ], [ %107, %106 ]
  %111 = call ptr @ast_add(ptr noundef nonnull %.1160192197, ptr noundef nonnull %56) #3
  br label %114

112:                                              ; preds = %109
  %113 = call ptr @ast_add_sibling(ptr noundef nonnull %.1157.ph, ptr noundef nonnull %56) #3
  br label %114

114:                                              ; preds = %106, %.thread194, %112
  %.2161 = phi ptr [ %.1160192197, %.thread194 ], [ %.1160.ph, %112 ], [ %56, %106 ]
  call void @ast_inheritflags(ptr noundef nonnull %.2161) #3
  call void @ast_inheritflags(ptr noundef %.0163) #3
  %115 = call ptr @ast_from(ptr noundef %69, i32 noundef 175) #3
  %116 = icmp eq ptr %.1171, null
  br i1 %116, label %123, label %117

117:                                              ; preds = %114
  %118 = icmp eq ptr %.1168, null
  br i1 %118, label %119, label %121

119:                                              ; preds = %117
  %120 = call ptr @ast_add(ptr noundef nonnull %.1171, ptr noundef %115) #3
  br label %123

121:                                              ; preds = %117
  %122 = call ptr @ast_add_sibling(ptr noundef nonnull %.1168, ptr noundef %115) #3
  br label %123

123:                                              ; preds = %114, %119, %121
  %.2172 = phi ptr [ %.1171, %119 ], [ %.1171, %121 ], [ %115, %114 ]
  call void @ast_scope(ptr noundef %115) #3
  %124 = call ptr @ast_from(ptr noundef %69, i32 noundef 127) #3
  %125 = icmp eq ptr %115, null
  br i1 %125, label %128, label %126

126:                                              ; preds = %123
  %127 = call ptr @ast_add(ptr noundef nonnull %115, ptr noundef %124) #3
  br label %128

128:                                              ; preds = %123, %126
  %.0155 = phi ptr [ %115, %126 ], [ %124, %123 ]
  %129 = icmp eq ptr %124, null
  %130 = call ptr @ast_from(ptr noundef %69, i32 noundef 2) #3
  br i1 %129, label %133, label %131

131:                                              ; preds = %128
  %132 = call ptr @ast_add(ptr noundef nonnull %124, ptr noundef %130) #3
  br label %133

133:                                              ; preds = %128, %131
  %.0153 = phi ptr [ %124, %131 ], [ %130, %128 ]
  call void @ast_inheritflags(ptr noundef %.0153) #3
  call void @ast_inheritflags(ptr noundef %.0155) #3
  call void @ast_inheritflags(ptr noundef %.2172) #3
  call void @ast_replace(ptr noundef nonnull %1, ptr noundef %70) #3
  %134 = call zeroext i1 @ast_passes_subtree(ptr noundef nonnull %1, ptr noundef %0, i32 noundef 10) #3
  br label %135

135:                                              ; preds = %48, %133, %58, %38, %43, %14, %26
  %.3 = phi i1 [ false, %26 ], [ false, %14 ], [ false, %43 ], [ false, %38 ], [ false, %48 ], [ false, %58 ], [ %134, %133 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #3
  ret i1 %.3
}

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

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

declare ptr @ast_pop(ptr noundef) local_unnamed_addr #0

declare void @ast_free(ptr noundef) local_unnamed_addr #0

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

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

declare void @ast_scope(ptr noundef) local_unnamed_addr #0

declare void @ast_inheritflags(ptr noundef) local_unnamed_addr #0

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

declare zeroext i1 @ast_passes_subtree(ptr noundef, ptr noundef, i32 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, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !6, i64 216}
!10 = !{!"pass_opt_t", !11, i64 0, !11, i64 4, !12, i64 8, !12, i64 9, !12, i64 10, !12, i64 11, !12, i64 12, !12, i64 13, !12, i64 14, !12, i64 15, !12, i64 16, !12, i64 17, !12, i64 18, !12, i64 19, !12, i64 20, !12, i64 21, !11, i64 24, !13, i64 32, !12, i64 40, !12, i64 41, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !14, i64 176, !6, i64 224, !6, i64 232}
!11 = !{!"int", !7, i64 0}
!12 = !{!"_Bool", !7, i64 0}
!13 = !{!"long", !7, i64 0}
!14 = !{!"typecheck_t", !6, i64 0, !15, i64 8, !6, i64 40}
!15 = !{!"typecheck_stats_t", !13, i64 0, !13, i64 8, !13, i64 16, !13, i64 24}


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