; LLVM IR from ponylang/ponyc :: src/libponyc/verify (fun)

; 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 }
%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.2 = external hidden unnamed_addr constant [77 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [74 x i8], align 1
@__func__.verify_fun = external hidden unnamed_addr constant [11 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [84 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [85 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local zeroext i1 @verify_fields_are_defined_in_constructor(ptr 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 i32 @ast_id(ptr noundef) #2

declare ptr @ast_child(ptr noundef) #2

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

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

declare ptr @ast_sibling(ptr noundef) #2

; Function Attrs: nounwind uwtable
define dso_local zeroext i1 @verify_fun(ptr noundef %0, ptr noundef %1) #0 {
  %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 ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca [8 x ptr], align 16
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca i8, align 1
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %18 = load ptr, ptr %5, align 8, !tbaa !5
  %19 = call i32 @ast_id(ptr noundef %18)
  %20 = icmp eq i32 %19, 90
  br i1 %20, label %29, label %21

21:                                               ; preds = %2
  %22 = load ptr, ptr %5, align 8, !tbaa !5
  %23 = call i32 @ast_id(ptr noundef %22)
  %24 = icmp eq i32 %23, 89
  br i1 %24, label %29, label %25

25:                                               ; preds = %21
  %26 = load ptr, ptr %5, align 8, !tbaa !5
  %27 = call i32 @ast_id(ptr noundef %26)
  %28 = icmp eq i32 %27, 88
  br i1 %28, label %29, label %30

29:                                               ; preds = %25, %21, %2
  br label %31

30:                                               ; preds = %25
  call void @ponyint_assert_fail(ptr noundef @.str.2, ptr noundef @.str.3, i64 noundef 541, ptr noundef @__func__.verify_fun)
  br label %31

31:                                               ; preds = %30, %29
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #3
  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 8, ptr %9) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.start.p0(i64 64, ptr %13) #3
  store ptr %6, ptr %13, align 8, !tbaa !5
  %32 = getelementptr inbounds ptr, ptr %13, i64 1
  store ptr %7, ptr %32, align 8, !tbaa !5
  %33 = getelementptr inbounds ptr, ptr %13, i64 2
  store ptr %8, ptr %33, align 8, !tbaa !5
  %34 = getelementptr inbounds ptr, ptr %13, i64 3
  store ptr %9, ptr %34, align 8, !tbaa !5
  %35 = getelementptr inbounds ptr, ptr %13, i64 4
  store ptr %10, ptr %35, align 8, !tbaa !5
  %36 = getelementptr inbounds ptr, ptr %13, i64 5
  store ptr %11, ptr %36, align 8, !tbaa !5
  %37 = getelementptr inbounds ptr, ptr %13, i64 6
  store ptr %12, ptr %37, align 8, !tbaa !5
  %38 = getelementptr inbounds ptr, ptr %13, i64 7
  store ptr null, ptr %38, align 8, !tbaa !5
  %39 = load ptr, ptr %5, align 8, !tbaa !5
  %40 = getelementptr inbounds [8 x ptr], ptr %13, i64 0, i64 0
  call void @ast_get_children(ptr noundef %39, i64 noundef 7, ptr noundef %40)
  call void @llvm.lifetime.end.p0(i64 64, ptr %13) #3
  %41 = load ptr, ptr %4, align 8, !tbaa !5
  %42 = load ptr, ptr %5, align 8, !tbaa !5
  %43 = call zeroext i1 @verify_main_create(ptr noundef %41, ptr noundef %42)
  br i1 %43, label %44, label %64

44:                                               ; preds = %31
  %45 = load ptr, ptr %4, align 8, !tbaa !5
  %46 = load ptr, ptr %5, align 8, !tbaa !5
  %47 = call zeroext i1 @verify_main_runtime_override_defaults(ptr noundef %45, ptr noundef %46)
  br i1 %47, label %48, label %64

48:                                               ; preds = %44
  %49 = load ptr, ptr %4, align 8, !tbaa !5
  %50 = load ptr, ptr %5, align 8, !tbaa !5
  %51 = call zeroext i1 @verify_primitive_init(ptr noundef %49, ptr noundef %50)
  br i1 %51, label %52, label %64

52:                                               ; preds = %48
  %53 = load ptr, ptr %4, align 8, !tbaa !5
  %54 = load ptr, ptr %5, align 8, !tbaa !5
  %55 = call zeroext i1 @verify_any_final(ptr noundef %53, ptr noundef %54)
  br i1 %55, label %56, label %64

56:                                               ; preds = %52
  %57 = load ptr, ptr %4, align 8, !tbaa !5
  %58 = load ptr, ptr %5, align 8, !tbaa !5
  %59 = call zeroext i1 @verify_any_serialise(ptr noundef %57, ptr noundef %58)
  br i1 %59, label %60, label %64

60:                                               ; preds = %56
  %61 = load ptr, ptr %4, align 8, !tbaa !5
  %62 = load ptr, ptr %5, align 8, !tbaa !5
  %63 = call zeroext i1 @verify_fields_are_defined_in_constructor(ptr noundef %61, ptr noundef %62)
  br i1 %63, label %65, label %64

64:                                               ; preds = %60, %56, %52, %48, %44, %31
  store i1 false, ptr %3, align 1
  store i32 1, ptr %14, align 4
  br label %193

65:                                               ; preds = %60
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #3
  %66 = load ptr, ptr %9, align 8, !tbaa !5
  %67 = call ptr @ast_child(ptr noundef %66)
  store ptr %67, ptr %15, align 8, !tbaa !5
  br label %68

68:                                               ; preds = %88, %65
  %69 = load ptr, ptr %15, align 8, !tbaa !5
  %70 = icmp ne ptr %69, null
  br i1 %70, label %72, label %71

71:                                               ; preds = %68
  store i32 2, ptr %14, align 4
  br label %91

72:                                               ; preds = %68
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #3
  %73 = load ptr, ptr %15, align 8, !tbaa !5
  %74 = call ptr @ast_type(ptr noundef %73)
  store ptr %74, ptr %16, align 8, !tbaa !5
  %75 = load ptr, ptr %16, align 8, !tbaa !5
  %76 = call ptr @consume_type(ptr noundef %75, i32 noundef 2, i1 noundef zeroext false)
  %77 = icmp eq ptr %76, null
  br i1 %77, label %78, label %84

78:                                               ; preds = %72
  %79 = load ptr, ptr %4, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.pass_opt_t, ptr %79, i32 0, i32 36
  %81 = getelementptr inbounds %struct.typecheck_t, ptr %80, i32 0, i32 2
  %82 = load ptr, ptr %81, align 8, !tbaa !9
  %83 = load ptr, ptr %16, align 8, !tbaa !5
  call void (ptr, ptr, ptr, ...) @ast_error(ptr noundef %82, ptr noundef %83, ptr noundef @.str.4)
  store i1 false, ptr %3, align 1
  store i32 1, ptr %14, align 4
  br label %85

84:                                               ; preds = %72
  store i32 0, ptr %14, align 4
  br label %85

85:                                               ; preds = %84, %78
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #3
  %86 = load i32, ptr %14, align 4
  switch i32 %86, label %91 [
    i32 0, label %87
  ]

87:                                               ; preds = %85
  br label %88

88:                                               ; preds = %87
  %89 = load ptr, ptr %15, align 8, !tbaa !5
  %90 = call ptr @ast_sibling(ptr noundef %89)
  store ptr %90, ptr %15, align 8, !tbaa !5
  br label %68, !llvm.loop !16

91:                                               ; preds = %85, %71
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #3
  %92 = load i32, ptr %14, align 4
  switch i32 %92, label %193 [
    i32 2, label %93
  ]

93:                                               ; preds = %91
  %94 = load ptr, ptr %11, align 8, !tbaa !5
  %95 = call i32 @ast_id(ptr noundef %94)
  %96 = icmp eq i32 %95, 60
  br i1 %96, label %97, label %148

97:                                               ; preds = %93
  call void @llvm.lifetime.start.p0(i64 1, ptr %17) #3
  %98 = load ptr, ptr %4, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.pass_opt_t, ptr %98, i32 0, i32 36
  %100 = getelementptr inbounds %struct.typecheck_t, ptr %99, i32 0, i32 0
  %101 = load ptr, ptr %100, align 8, !tbaa !18
  %102 = getelementptr inbounds %struct.typecheck_frame_t, ptr %101, i32 0, i32 2
  %103 = load ptr, ptr %102, align 8, !tbaa !19
  %104 = call i32 @ast_id(ptr noundef %103)
  %105 = icmp eq i32 %104, 73
  br i1 %105, label %125, label %106

106:                                              ; preds = %97
  %107 = load ptr, ptr %4, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.pass_opt_t, ptr %107, i32 0, i32 36
  %109 = getelementptr inbounds %struct.typecheck_t, ptr %108, i32 0, i32 0
  %110 = load ptr, ptr %109, align 8, !tbaa !18
  %111 = getelementptr inbounds %struct.typecheck_frame_t, ptr %110, i32 0, i32 2
  %112 = load ptr, ptr %111, align 8, !tbaa !19
  %113 = call i32 @ast_id(ptr noundef %112)
  %114 = icmp eq i32 %113, 72
  br i1 %114, label %125, label %115

115:                                              ; preds = %106
  %116 = load ptr, ptr %5, align 8, !tbaa !5
  %117 = call ptr @ast_data(ptr noundef %116)
  %118 = call i32 @ast_id(ptr noundef %117)
  %119 = icmp eq i32 %118, 73
  br i1 %119, label %125, label %120

120:                                              ; preds = %115
  %121 = load ptr, ptr %5, align 8, !tbaa !5
  %122 = call ptr @ast_data(ptr noundef %121)
  %123 = call i32 @ast_id(ptr noundef %122)
  %124 = icmp eq i32 %123, 72
  br label %125

125:                                              ; preds = %120, %115, %106, %97
  %126 = phi i1 [ true, %115 ], [ true, %106 ], [ true, %97 ], [ %124, %120 ]
  %127 = zext i1 %126 to i8
  store i8 %127, ptr %17, align 1, !tbaa !21
  %128 = load i8, ptr %17, align 1, !tbaa !21, !range !22, !noundef !23
  %129 = trunc i8 %128 to i1
  br i1 %129, label %144, label %130

130:                                              ; preds = %125
  %131 = load ptr, ptr %12, align 8, !tbaa !5
  %132 = call zeroext i1 @ast_canerror(ptr noundef %131)
  br i1 %132, label %144, label %133

133:                                              ; preds = %130
  %134 = load ptr, ptr %12, align 8, !tbaa !5
  %135 = call ptr @ast_type(ptr noundef %134)
  %136 = call i32 @ast_id(ptr noundef %135)
  %137 = icmp ne i32 %136, 69
  br i1 %137, label %138, label %144

138:                                              ; preds = %133
  %139 = load ptr, ptr %4, align 8, !tbaa !5
  %140 = getelementptr inbounds %struct.pass_opt_t, ptr %139, i32 0, i32 36
  %141 = getelementptr inbounds %struct.typecheck_t, ptr %140, i32 0, i32 2
  %142 = load ptr, ptr %141, align 8, !tbaa !9
  %143 = load ptr, ptr %11, align 8, !tbaa !5
  call void (ptr, ptr, ptr, ...) @ast_error(ptr noundef %142, ptr noundef %143, ptr noundef @.str.5)
  store i1 false, ptr %3, align 1
  store i32 1, ptr %14, align 4
  br label %145

144:                                              ; preds = %133, %130, %125
  store i32 0, ptr %14, align 4
  br label %145

145:                                              ; preds = %144, %138
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #3
  %146 = load i32, ptr %14, align 4
  switch i32 %146, label %193 [
    i32 0, label %147
  ]

147:                                              ; preds = %145
  br label %192

148:                                              ; preds = %93
  %149 = load ptr, ptr %12, align 8, !tbaa !5
  %150 = call zeroext i1 @ast_canerror(ptr noundef %149)
  br i1 %150, label %151, label %191

151:                                              ; preds = %148
  %152 = load ptr, ptr %5, align 8, !tbaa !5
  %153 = call i32 @ast_id(ptr noundef %152)
  %154 = icmp eq i32 %153, 90
  br i1 %154, label %155, label %161

155:                                              ; preds = %151
  %156 = load ptr, ptr %4, align 8, !tbaa !5
  %157 = getelementptr inbounds %struct.pass_opt_t, ptr %156, i32 0, i32 36
  %158 = getelementptr inbounds %struct.typecheck_t, ptr %157, i32 0, i32 2
  %159 = load ptr, ptr %158, align 8, !tbaa !9
  %160 = load ptr, ptr %11, align 8, !tbaa !5
  call void (ptr, ptr, ptr, ...) @ast_error(ptr noundef %159, ptr noundef %160, ptr noundef @.str.6)
  br label %187

161:                                              ; preds = %151
  %162 = load ptr, ptr %5, align 8, !tbaa !5
  %163 = call i32 @ast_id(ptr noundef %162)
  %164 = icmp eq i32 %163, 88
  br i1 %164, label %165, label %180

165:                                              ; preds = %161
  %166 = load ptr, ptr %4, align 8, !tbaa !5
  %167 = getelementptr inbounds %struct.pass_opt_t, ptr %166, i32 0, i32 36
  %168 = getelementptr inbounds %struct.typecheck_t, ptr %167, i32 0, i32 0
  %169 = load ptr, ptr %168, align 8, !tbaa !18
  %170 = getelementptr inbounds %struct.typecheck_frame_t, ptr %169, i32 0, i32 2
  %171 = load ptr, ptr %170, align 8, !tbaa !19
  %172 = call i32 @ast_id(ptr noundef %171)
  %173 = icmp eq i32 %172, 77
  br i1 %173, label %174, label %180

174:                                              ; preds = %165
  %175 = load ptr, ptr %4, align 8, !tbaa !5
  %176 = getelementptr inbounds %struct.pass_opt_t, ptr %175, i32 0, i32 36
  %177 = getelementptr inbounds %struct.typecheck_t, ptr %176, i32 0, i32 2
  %178 = load ptr, ptr %177, align 8, !tbaa !9
  %179 = load ptr, ptr %11, align 8, !tbaa !5
  call void (ptr, ptr, ptr, ...) @ast_error(ptr noundef %178, ptr noundef %179, ptr noundef @.str.7)
  br label %186

180:                                              ; preds = %165, %161
  %181 = load ptr, ptr %4, align 8, !tbaa !5
  %182 = getelementptr inbounds %struct.pass_opt_t, ptr %181, i32 0, i32 36
  %183 = getelementptr inbounds %struct.typecheck_t, ptr %182, i32 0, i32 2
  %184 = load ptr, ptr %183, align 8, !tbaa !9
  %185 = load ptr, ptr %11, align 8, !tbaa !5
  call void (ptr, ptr, ptr, ...) @ast_error(ptr noundef %184, ptr noundef %185, ptr noundef @.str.8)
  br label %186

186:                                              ; preds = %180, %174
  br label %187

187:                                              ; preds = %186, %155
  %188 = load ptr, ptr %4, align 8, !tbaa !5
  %189 = load ptr, ptr %12, align 8, !tbaa !5
  %190 = call zeroext i1 @show_partiality(ptr noundef %188, ptr noundef %189)
  store i1 false, ptr %3, align 1
  store i32 1, ptr %14, align 4
  br label %193

191:                                              ; preds = %148
  br label %192

192:                                              ; preds = %191, %147
  store i1 true, ptr %3, align 1
  store i32 1, ptr %14, align 4
  br label %193

193:                                              ; preds = %192, %187, %145, %91, %64
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  %194 = load i1, ptr %3, align 1
  ret i1 %194
}

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

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

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

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

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

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

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

declare ptr @ast_type(ptr noundef) #2

declare ptr @consume_type(ptr noundef, i32 noundef, i1 noundef zeroext) #2

declare ptr @ast_data(ptr noundef) #2

declare zeroext i1 @ast_canerror(ptr noundef) #2

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = !{!10, !6, i64 176}
!19 = !{!20, !6, i64 16}
!20 = !{!"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}
!21 = !{!12, !12, i64 0}
!22 = !{i8 0, i8 2}
!23 = !{}


; 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.3 = external hidden unnamed_addr constant [74 x i8], align 1
@__func__.verify_fun = external hidden unnamed_addr constant [11 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [84 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [85 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local zeroext i1 @verify_fields_are_defined_in_constructor(ptr 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 i32 @ast_id(ptr noundef) local_unnamed_addr #2

declare ptr @ast_child(ptr noundef) local_unnamed_addr #2

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

; 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_sibling(ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local noundef zeroext i1 @verify_fun(ptr noundef %0, ptr noundef %1) local_unnamed_addr #0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca [8 x ptr], align 16
  %11 = tail call i32 @ast_id(ptr noundef %1) #3
  %12 = icmp eq i32 %11, 90
  br i1 %12, label %20, label %13

13:                                               ; preds = %2
  %14 = tail call i32 @ast_id(ptr noundef %1) #3
  %15 = icmp eq i32 %14, 89
  br i1 %15, label %20, label %16

16:                                               ; preds = %13
  %17 = tail call i32 @ast_id(ptr noundef %1) #3
  %18 = icmp eq i32 %17, 88
  br i1 %18, label %20, label %19

19:                                               ; preds = %16
  tail call void @ponyint_assert_fail(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.3, i64 noundef 541, ptr noundef nonnull @__func__.verify_fun) #3
  br label %20

20:                                               ; preds = %2, %13, %16, %19
  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 8, ptr nonnull %5) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #3
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %10) #3
  store ptr %3, ptr %10, align 16, !tbaa !5
  %21 = getelementptr inbounds i8, ptr %10, i64 8
  store ptr %4, ptr %21, align 8, !tbaa !5
  %22 = getelementptr inbounds i8, ptr %10, i64 16
  store ptr %5, ptr %22, align 16, !tbaa !5
  %23 = getelementptr inbounds i8, ptr %10, i64 24
  store ptr %6, ptr %23, align 8, !tbaa !5
  %24 = getelementptr inbounds i8, ptr %10, i64 32
  store ptr %7, ptr %24, align 16, !tbaa !5
  %25 = getelementptr inbounds i8, ptr %10, i64 40
  store ptr %8, ptr %25, align 8, !tbaa !5
  %26 = getelementptr inbounds i8, ptr %10, i64 48
  store ptr %9, ptr %26, align 16, !tbaa !5
  %27 = getelementptr inbounds i8, ptr %10, i64 56
  store ptr null, ptr %27, align 8, !tbaa !5
  call void @ast_get_children(ptr noundef %1, i64 noundef 7, ptr noundef nonnull %10) #3
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %10) #3
  %28 = call zeroext i1 @verify_main_create(ptr noundef %0, ptr noundef %1)
  br i1 %28, label %29, label %.critedge49

29:                                               ; preds = %20
  %30 = call zeroext i1 @verify_main_runtime_override_defaults(ptr noundef %0, ptr noundef %1)
  br i1 %30, label %31, label %.critedge49

31:                                               ; preds = %29
  %32 = call zeroext i1 @verify_primitive_init(ptr noundef %0, ptr noundef %1)
  br i1 %32, label %33, label %.critedge49

33:                                               ; preds = %31
  %34 = call zeroext i1 @verify_any_final(ptr noundef %0, ptr noundef %1)
  br i1 %34, label %35, label %.critedge49

35:                                               ; preds = %33
  %36 = call zeroext i1 @verify_any_serialise(ptr noundef %0, ptr noundef %1)
  br i1 %36, label %37, label %.critedge49

37:                                               ; preds = %35
  %38 = call zeroext i1 @verify_fields_are_defined_in_constructor(ptr noundef %0, ptr noundef %1)
  br i1 %38, label %39, label %.critedge49

39:                                               ; preds = %37
  %40 = load ptr, ptr %6, align 8, !tbaa !5
  %41 = call ptr @ast_child(ptr noundef %40) #3
  %.not51 = icmp eq ptr %41, null
  br i1 %.not51, label %.critedge47, label %.lr.ph

.lr.ph:                                           ; preds = %39, %.critedge
  %.04352 = phi ptr [ %47, %.critedge ], [ %41, %39 ]
  %42 = call ptr @ast_type(ptr noundef nonnull %.04352) #3
  %43 = call ptr @consume_type(ptr noundef %42, i32 noundef 2, i1 noundef zeroext false) #3
  %.not44 = icmp eq ptr %43, null
  br i1 %.not44, label %44, label %.critedge

44:                                               ; preds = %.lr.ph
  %45 = getelementptr inbounds i8, ptr %0, i64 216
  %46 = load ptr, ptr %45, align 8, !tbaa !9
  call void (ptr, ptr, ptr, ...) @ast_error(ptr noundef %46, ptr noundef %42, ptr noundef nonnull @.str.4) #3
  br label %.critedge49

.critedge:                                        ; preds = %.lr.ph
  %47 = call ptr @ast_sibling(ptr noundef nonnull %.04352) #3
  %.not = icmp eq ptr %47, null
  br i1 %.not, label %.critedge47, label %.lr.ph, !llvm.loop !16

.critedge47:                                      ; preds = %.critedge, %39
  %48 = load ptr, ptr %8, align 8, !tbaa !5
  %49 = call i32 @ast_id(ptr noundef %48) #3
  %50 = icmp eq i32 %49, 60
  br i1 %50, label %51, label %82

51:                                               ; preds = %.critedge47
  %52 = getelementptr inbounds i8, ptr %0, i64 176
  %53 = load ptr, ptr %52, align 8, !tbaa !18
  %54 = getelementptr inbounds i8, ptr %53, i64 16
  %55 = load ptr, ptr %54, align 8, !tbaa !19
  %56 = call i32 @ast_id(ptr noundef %55) #3
  %57 = icmp eq i32 %56, 73
  br i1 %57, label %.critedge49, label %58

58:                                               ; preds = %51
  %59 = load ptr, ptr %52, align 8, !tbaa !18
  %60 = getelementptr inbounds i8, ptr %59, i64 16
  %61 = load ptr, ptr %60, align 8, !tbaa !19
  %62 = call i32 @ast_id(ptr noundef %61) #3
  %63 = icmp eq i32 %62, 72
  br i1 %63, label %.critedge49, label %64

64:                                               ; preds = %58
  %65 = call ptr @ast_data(ptr noundef %1) #3
  %66 = call i32 @ast_id(ptr noundef %65) #3
  %67 = icmp eq i32 %66, 73
  br i1 %67, label %.critedge49, label %68

68:                                               ; preds = %64
  %69 = call ptr @ast_data(ptr noundef %1) #3
  %70 = call i32 @ast_id(ptr noundef %69) #3
  %71 = icmp eq i32 %70, 72
  br i1 %71, label %.critedge49, label %72

72:                                               ; preds = %68
  %73 = load ptr, ptr %9, align 8, !tbaa !5
  %74 = call zeroext i1 @ast_canerror(ptr noundef %73) #3
  br i1 %74, label %.critedge49, label %75

75:                                               ; preds = %72
  %76 = load ptr, ptr %9, align 8, !tbaa !5
  %77 = call ptr @ast_type(ptr noundef %76) #3
  %78 = call i32 @ast_id(ptr noundef %77) #3
  %.not45 = icmp eq i32 %78, 69
  br i1 %.not45, label %.critedge49, label %.critedge50

.critedge50:                                      ; preds = %75
  %79 = getelementptr inbounds i8, ptr %0, i64 216
  %80 = load ptr, ptr %79, align 8, !tbaa !9
  %81 = load ptr, ptr %8, align 8, !tbaa !5
  call void (ptr, ptr, ptr, ...) @ast_error(ptr noundef %80, ptr noundef %81, ptr noundef nonnull @.str.5) #3
  br label %.critedge49

82:                                               ; preds = %.critedge47
  %83 = load ptr, ptr %9, align 8, !tbaa !5
  %84 = call zeroext i1 @ast_canerror(ptr noundef %83) #3
  br i1 %84, label %85, label %.critedge49

85:                                               ; preds = %82
  %86 = call i32 @ast_id(ptr noundef %1) #3
  %87 = icmp eq i32 %86, 90
  br i1 %87, label %88, label %92

88:                                               ; preds = %85
  %89 = getelementptr inbounds i8, ptr %0, i64 216
  %90 = load ptr, ptr %89, align 8, !tbaa !9
  %91 = load ptr, ptr %8, align 8, !tbaa !5
  call void (ptr, ptr, ptr, ...) @ast_error(ptr noundef %90, ptr noundef %91, ptr noundef nonnull @.str.6) #3
  br label %110

92:                                               ; preds = %85
  %93 = call i32 @ast_id(ptr noundef %1) #3
  %94 = icmp eq i32 %93, 88
  br i1 %94, label %95, label %106

95:                                               ; preds = %92
  %96 = getelementptr inbounds i8, ptr %0, i64 176
  %97 = load ptr, ptr %96, align 8, !tbaa !18
  %98 = getelementptr inbounds i8, ptr %97, i64 16
  %99 = load ptr, ptr %98, align 8, !tbaa !19
  %100 = call i32 @ast_id(ptr noundef %99) #3
  %101 = icmp eq i32 %100, 77
  br i1 %101, label %102, label %106

102:                                              ; preds = %95
  %103 = getelementptr inbounds i8, ptr %0, i64 216
  %104 = load ptr, ptr %103, align 8, !tbaa !9
  %105 = load ptr, ptr %8, align 8, !tbaa !5
  call void (ptr, ptr, ptr, ...) @ast_error(ptr noundef %104, ptr noundef %105, ptr noundef nonnull @.str.7) #3
  br label %110

106:                                              ; preds = %95, %92
  %107 = getelementptr inbounds i8, ptr %0, i64 216
  %108 = load ptr, ptr %107, align 8, !tbaa !9
  %109 = load ptr, ptr %8, align 8, !tbaa !5
  call void (ptr, ptr, ptr, ...) @ast_error(ptr noundef %108, ptr noundef %109, ptr noundef nonnull @.str.8) #3
  br label %110

110:                                              ; preds = %102, %106, %88
  %111 = load ptr, ptr %9, align 8, !tbaa !5
  %112 = call zeroext i1 @show_partiality(ptr noundef nonnull %0, ptr noundef %111)
  br label %.critedge49

.critedge49:                                      ; preds = %44, %82, %68, %72, %75, %51, %58, %64, %.critedge50, %20, %29, %31, %33, %35, %37, %110
  %.4 = phi i1 [ false, %110 ], [ false, %44 ], [ false, %37 ], [ false, %35 ], [ false, %33 ], [ false, %31 ], [ false, %29 ], [ false, %20 ], [ false, %.critedge50 ], [ true, %64 ], [ true, %58 ], [ true, %51 ], [ true, %75 ], [ true, %72 ], [ true, %68 ], [ true, %82 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #3
  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 %.4
}

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

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

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

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

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

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

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

declare ptr @ast_type(ptr noundef) local_unnamed_addr #2

declare ptr @consume_type(ptr noundef, i32 noundef, i1 noundef zeroext) local_unnamed_addr #2

declare ptr @ast_data(ptr noundef) local_unnamed_addr #2

declare zeroext i1 @ast_canerror(ptr noundef) local_unnamed_addr #2

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

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = !{!10, !6, i64 176}
!19 = !{!20, !6, i64 16}
!20 = !{!"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}


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