; LLVM IR from ponylang/ponyc :: src/libponyc/reach (subtype)

; 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.reach_type_t = type { ptr, ptr, ptr, ptr, i32, %struct.reach_method_names_t, ptr, %struct.reach_type_cache_t, i32, i32, i64, i8, i8, i32, ptr, ptr }
%struct.reach_method_names_t = type { %struct.hashmap_t }
%struct.hashmap_t = type { i64, i64, ptr, ptr }
%struct.reach_type_cache_t = type { %struct.hashmap_t }

@.str.1 = external hidden unnamed_addr constant [77 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [13 x i8], align 1
@__func__.subtype_kind_overlap = external hidden unnamed_addr constant [21 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [22 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local i32 @subtype_kind(ptr noundef) #0

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @subtype_kind_overlap(ptr noundef %0, ptr noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i64, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca %struct.reach_type_t, align 8
  %11 = alloca i64, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  %15 = alloca ptr, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %16 = load ptr, ptr %4, align 8, !tbaa !5
  %17 = icmp ne ptr %16, null
  br i1 %17, label %18, label %19

18:                                               ; preds = %2
  br label %20

19:                                               ; preds = %2
  call void @ponyint_assert_fail(ptr noundef @.str.2, ptr noundef @.str.1, i64 noundef 34, ptr noundef @__func__.subtype_kind_overlap)
  br label %20

20:                                               ; preds = %19, %18
  %21 = load ptr, ptr %5, align 8, !tbaa !5
  %22 = icmp eq ptr %21, null
  br i1 %22, label %23, label %26

23:                                               ; preds = %20
  %24 = load ptr, ptr %4, align 8, !tbaa !5
  %25 = call i32 @subtype_kind(ptr noundef %24)
  store i32 %25, ptr %3, align 4
  br label %128

26:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #3
  store i32 0, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #3
  store i64 -1, ptr %7, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  br label %27

27:                                               ; preds = %124, %44, %26
  %28 = load ptr, ptr %4, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.reach_type_t, ptr %28, i32 0, i32 7
  %30 = call ptr @reach_type_cache_next(ptr noundef %29, ptr noundef %7)
  store ptr %30, ptr %8, align 8, !tbaa !5
  %31 = icmp ne ptr %30, null
  br i1 %31, label %32, label %125

32:                                               ; preds = %27
  %33 = load ptr, ptr %8, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.reach_type_t, ptr %33, i32 0, i32 11
  %35 = load i8, ptr %34, align 8, !tbaa !13, !range !19, !noundef !20
  %36 = trunc i8 %35 to i1
  br i1 %36, label %45, label %37

37:                                               ; preds = %32
  %38 = load i32, ptr %6, align 4, !tbaa !9
  %39 = or i32 %38, 4
  store i32 %39, ptr %6, align 4, !tbaa !9
  %40 = load i32, ptr %6, align 4, !tbaa !9
  %41 = icmp eq i32 %40, 7
  br i1 %41, label %42, label %44

42:                                               ; preds = %37
  %43 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %43, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %127

44:                                               ; preds = %37
  br label %27, !llvm.loop !21

45:                                               ; preds = %32
  %46 = load ptr, ptr %8, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.reach_type_t, ptr %46, i32 0, i32 4
  %48 = load i32, ptr %47, align 8, !tbaa !23
  %49 = icmp ne i32 %48, 150
  br i1 %49, label %50, label %84

50:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 152, ptr %10) #3
  %51 = load ptr, ptr %8, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.reach_type_t, ptr %51, i32 0, i32 0
  %53 = load ptr, ptr %52, align 8, !tbaa !24
  %54 = getelementptr inbounds %struct.reach_type_t, ptr %10, i32 0, i32 0
  store ptr %53, ptr %54, align 8, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  store i64 -1, ptr %11, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  %55 = load ptr, ptr %5, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.reach_type_t, ptr %55, i32 0, i32 7
  %57 = call ptr @reach_type_cache_get(ptr noundef %56, ptr noundef %10, ptr noundef %11)
  store ptr %57, ptr %12, align 8, !tbaa !5
  %58 = load ptr, ptr %12, align 8, !tbaa !5
  %59 = icmp ne ptr %58, null
  br i1 %59, label %60, label %80

60:                                               ; preds = %50
  %61 = load ptr, ptr %8, align 8, !tbaa !5
  %62 = load ptr, ptr %12, align 8, !tbaa !5
  %63 = icmp eq ptr %61, %62
  br i1 %63, label %64, label %65

64:                                               ; preds = %60
  br label %66

65:                                               ; preds = %60
  call void @ponyint_assert_fail(ptr noundef @.str.3, ptr noundef @.str.1, i64 noundef 64, ptr noundef @__func__.subtype_kind_overlap)
  br label %66

66:                                               ; preds = %65, %64
  %67 = load ptr, ptr %8, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.reach_type_t, ptr %67, i32 0, i32 4
  %69 = load i32, ptr %68, align 8, !tbaa !23
  %70 = icmp eq i32 %69, 74
  br i1 %70, label %71, label %74

71:                                               ; preds = %66
  %72 = load i32, ptr %6, align 4, !tbaa !9
  %73 = or i32 %72, 1
  store i32 %73, ptr %6, align 4, !tbaa !9
  br label %74

74:                                               ; preds = %71, %66
  %75 = load i32, ptr %6, align 4, !tbaa !9
  %76 = icmp eq i32 %75, 7
  br i1 %76, label %77, label %79

77:                                               ; preds = %74
  %78 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %78, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %81

79:                                               ; preds = %74
  br label %80

80:                                               ; preds = %79, %50
  store i32 0, ptr %9, align 4
  br label %81

81:                                               ; preds = %80, %77
  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 152, ptr %10) #3
  %82 = load i32, ptr %9, align 4
  switch i32 %82, label %127 [
    i32 0, label %83
  ]

83:                                               ; preds = %81
  br label %124

84:                                               ; preds = %45
  %85 = load i32, ptr %6, align 4, !tbaa !9
  %86 = and i32 %85, 2
  %87 = icmp eq i32 %86, 0
  br i1 %87, label %88, label %123

88:                                               ; preds = %84
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #3
  %89 = load ptr, ptr %8, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.reach_type_t, ptr %89, i32 0, i32 3
  %91 = load ptr, ptr %90, align 8, !tbaa !25
  %92 = call i64 @ast_childcount(ptr noundef %91)
  store i64 %92, ptr %13, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #3
  store i64 -1, ptr %14, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #3
  br label %93

93:                                               ; preds = %118, %88
  %94 = load ptr, ptr %5, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.reach_type_t, ptr %94, i32 0, i32 7
  %96 = call ptr @reach_type_cache_next(ptr noundef %95, ptr noundef %14)
  store ptr %96, ptr %15, align 8, !tbaa !5
  %97 = icmp ne ptr %96, null
  br i1 %97, label %98, label %119

98:                                               ; preds = %93
  %99 = load ptr, ptr %15, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.reach_type_t, ptr %99, i32 0, i32 4
  %101 = load i32, ptr %100, align 8, !tbaa !23
  %102 = icmp eq i32 %101, 150
  br i1 %102, label %103, label %118

103:                                              ; preds = %98
  %104 = load ptr, ptr %15, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.reach_type_t, ptr %104, i32 0, i32 3
  %106 = load ptr, ptr %105, align 8, !tbaa !25
  %107 = call i64 @ast_childcount(ptr noundef %106)
  %108 = load i64, ptr %13, align 8, !tbaa !11
  %109 = icmp eq i64 %107, %108
  br i1 %109, label %110, label %118

110:                                              ; preds = %103
  %111 = load i32, ptr %6, align 4, !tbaa !9
  %112 = or i32 %111, 2
  store i32 %112, ptr %6, align 4, !tbaa !9
  %113 = load i32, ptr %6, align 4, !tbaa !9
  %114 = icmp eq i32 %113, 7
  br i1 %114, label %115, label %117

115:                                              ; preds = %110
  %116 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %116, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %120

117:                                              ; preds = %110
  br label %119

118:                                              ; preds = %103, %98
  br label %93, !llvm.loop !26

119:                                              ; preds = %117, %93
  store i32 0, ptr %9, align 4
  br label %120

120:                                              ; preds = %119, %115
  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
  %121 = load i32, ptr %9, align 4
  switch i32 %121, label %127 [
    i32 0, label %122
  ]

122:                                              ; preds = %120
  br label %123

123:                                              ; preds = %122, %84
  br label %124

124:                                              ; preds = %123, %83
  br label %27, !llvm.loop !21

125:                                              ; preds = %27
  %126 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %126, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %127

127:                                              ; preds = %125, %120, %81, %42
  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 4, ptr %6) #3
  br label %128

128:                                              ; preds = %127, %23
  %129 = load i32, ptr %3, align 4
  ret i32 %129
}

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

declare i64 @ast_childcount(ptr noundef) #1

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 = { "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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!14, !18, i64 128}
!14 = !{!"reach_type_t", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !10, i64 32, !15, i64 40, !6, i64 72, !17, i64 80, !10, i64 112, !10, i64 116, !12, i64 120, !18, i64 128, !18, i64 129, !10, i64 132, !6, i64 136, !6, i64 144}
!15 = !{!"reach_method_names_t", !16, i64 0}
!16 = !{!"hashmap_t", !12, i64 0, !12, i64 8, !6, i64 16, !6, i64 24}
!17 = !{!"reach_type_cache_t", !16, i64 0}
!18 = !{!"_Bool", !7, i64 0}
!19 = !{i8 0, i8 2}
!20 = !{}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = !{!14, !10, i64 32}
!24 = !{!14, !6, i64 0}
!25 = !{!14, !6, i64 24}
!26 = distinct !{!26, !22}


; 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"

%struct.reach_type_t = type { ptr, ptr, ptr, ptr, i32, %struct.reach_method_names_t, ptr, %struct.reach_type_cache_t, i32, i32, i64, i8, i8, i32, ptr, ptr }
%struct.reach_method_names_t = type { %struct.hashmap_t }
%struct.hashmap_t = type { i64, i64, ptr, ptr }
%struct.reach_type_cache_t = type { %struct.hashmap_t }

@.str.1 = external hidden unnamed_addr constant [77 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [13 x i8], align 1
@__func__.subtype_kind_overlap = external hidden unnamed_addr constant [21 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [22 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local i32 @subtype_kind(ptr noundef) local_unnamed_addr #0

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

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

declare ptr @reach_type_cache_next(ptr noundef, 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) #2

; Function Attrs: nounwind uwtable
define dso_local i32 @subtype_kind_overlap(ptr noundef %0, ptr noundef %1) local_unnamed_addr #0 {
  %3 = alloca i64, align 8
  %4 = alloca %struct.reach_type_t, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %.not = icmp eq ptr %0, null
  br i1 %.not, label %7, label %8

7:                                                ; preds = %2
  tail call void @ponyint_assert_fail(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.1, i64 noundef 34, ptr noundef nonnull @__func__.subtype_kind_overlap) #3
  br label %8

8:                                                ; preds = %2, %7
  %9 = icmp eq ptr %1, null
  br i1 %9, label %10, label %12

10:                                               ; preds = %8
  %11 = tail call i32 @subtype_kind(ptr noundef %0)
  br label %59

12:                                               ; preds = %8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #3
  store i64 -1, ptr %3, align 8, !tbaa !5
  %13 = getelementptr inbounds i8, ptr %0, i64 80
  %14 = call ptr @reach_type_cache_next(ptr noundef nonnull %13, ptr noundef nonnull %3) #3
  %.not4763 = icmp eq ptr %14, null
  br i1 %.not4763, label %._crit_edge, label %.lr.ph65

.lr.ph65:                                         ; preds = %12
  %15 = getelementptr inbounds i8, ptr %1, i64 80
  br label %16

16:                                               ; preds = %.lr.ph65, %.backedge
  %17 = phi ptr [ %14, %.lr.ph65 ], [ %58, %.backedge ]
  %.03164 = phi i32 [ 0, %.lr.ph65 ], [ %.031.be, %.backedge ]
  %18 = getelementptr inbounds i8, ptr %17, i64 128
  %19 = load i8, ptr %18, align 8, !tbaa !9, !range !17, !noundef !18
  %20 = trunc nuw i8 %19 to i1
  br i1 %20, label %24, label %21

21:                                               ; preds = %16
  %22 = or i32 %.03164, 4
  %23 = icmp eq i32 %22, 7
  br i1 %23, label %._crit_edge, label %.backedge

24:                                               ; preds = %16
  %25 = getelementptr inbounds i8, ptr %17, i64 32
  %26 = load i32, ptr %25, align 8, !tbaa !19
  %.not48 = icmp eq i32 %26, 150
  br i1 %.not48, label %37, label %27

27:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 152, ptr nonnull %4) #3
  %28 = load ptr, ptr %17, align 8, !tbaa !20
  store ptr %28, ptr %4, align 8, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #3
  store i64 -1, ptr %5, align 8, !tbaa !5
  %29 = call ptr @reach_type_cache_get(ptr noundef nonnull %15, ptr noundef nonnull %4, ptr noundef nonnull %5) #3
  %.not50 = icmp eq ptr %29, null
  br i1 %.not50, label %.thread, label %30

.thread:                                          ; preds = %27
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #3
  call void @llvm.lifetime.end.p0(i64 152, ptr nonnull %4) #3
  br label %.backedge

30:                                               ; preds = %27
  %31 = icmp eq ptr %17, %29
  br i1 %31, label %33, label %32

32:                                               ; preds = %30
  call void @ponyint_assert_fail(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.1, i64 noundef 64, ptr noundef nonnull @__func__.subtype_kind_overlap) #3
  br label %33

33:                                               ; preds = %32, %30
  %34 = load i32, ptr %25, align 8, !tbaa !19
  %35 = icmp eq i32 %34, 74
  %36 = zext i1 %35 to i32
  %spec.select = or i32 %.03164, %36
  %.not60 = icmp eq i32 %spec.select, 7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #3
  call void @llvm.lifetime.end.p0(i64 152, ptr nonnull %4) #3
  br i1 %.not60, label %._crit_edge, label %.backedge

37:                                               ; preds = %24
  %38 = and i32 %.03164, 2
  %39 = icmp eq i32 %38, 0
  br i1 %39, label %40, label %.backedge

40:                                               ; preds = %37
  %41 = getelementptr inbounds i8, ptr %17, i64 24
  %42 = load ptr, ptr %41, align 8, !tbaa !21
  %43 = call i64 @ast_childcount(ptr noundef %42) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #3
  store i64 -1, ptr %6, align 8, !tbaa !5
  %44 = call ptr @reach_type_cache_next(ptr noundef nonnull %15, ptr noundef nonnull %6) #3
  %.not4962 = icmp eq ptr %44, null
  br i1 %.not4962, label %.thread57, label %.lr.ph

.thread57:                                        ; preds = %54, %40
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #3
  br label %.backedge

.lr.ph:                                           ; preds = %40, %54
  %45 = phi ptr [ %55, %54 ], [ %44, %40 ]
  %46 = getelementptr inbounds i8, ptr %45, i64 32
  %47 = load i32, ptr %46, align 8, !tbaa !19
  %48 = icmp eq i32 %47, 150
  br i1 %48, label %49, label %54

49:                                               ; preds = %.lr.ph
  %50 = getelementptr inbounds i8, ptr %45, i64 24
  %51 = load ptr, ptr %50, align 8, !tbaa !21
  %52 = call i64 @ast_childcount(ptr noundef %51) #3
  %53 = icmp eq i64 %52, %43
  br i1 %53, label %56, label %54

54:                                               ; preds = %49, %.lr.ph
  %55 = call ptr @reach_type_cache_next(ptr noundef nonnull %15, ptr noundef nonnull %6) #3
  %.not49 = icmp eq ptr %55, null
  br i1 %.not49, label %.thread57, label %.lr.ph, !llvm.loop !22

56:                                               ; preds = %49
  %57 = or disjoint i32 %.03164, 2
  %.not61 = icmp eq i32 %.03164, 5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #3
  br i1 %.not61, label %._crit_edge, label %.backedge

.backedge:                                        ; preds = %33, %56, %37, %.thread, %.thread57, %21
  %.031.be = phi i32 [ %22, %21 ], [ %spec.select, %33 ], [ %57, %56 ], [ %.03164, %37 ], [ %.03164, %.thread ], [ %.03164, %.thread57 ]
  %58 = call ptr @reach_type_cache_next(ptr noundef nonnull %13, ptr noundef nonnull %3) #3
  %.not47 = icmp eq ptr %58, null
  br i1 %.not47, label %._crit_edge, label %16, !llvm.loop !24

._crit_edge:                                      ; preds = %56, %33, %21, %.backedge, %12
  %.4 = phi i32 [ 0, %12 ], [ %.031.be, %.backedge ], [ 7, %21 ], [ 7, %33 ], [ 7, %56 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #3
  br label %59

59:                                               ; preds = %._crit_edge, %10
  %.5 = phi i32 [ %11, %10 ], [ %.4, %._crit_edge ]
  ret i32 %.5
}

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

declare i64 @ast_childcount(ptr noundef) local_unnamed_addr #1

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 = { "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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !16, i64 128}
!10 = !{!"reach_type_t", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !12, i64 32, !13, i64 40, !11, i64 72, !15, i64 80, !12, i64 112, !12, i64 116, !6, i64 120, !16, i64 128, !16, i64 129, !12, i64 132, !11, i64 136, !11, i64 144}
!11 = !{!"any pointer", !7, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!"reach_method_names_t", !14, i64 0}
!14 = !{!"hashmap_t", !6, i64 0, !6, i64 8, !11, i64 16, !11, i64 24}
!15 = !{!"reach_type_cache_t", !14, i64 0}
!16 = !{!"_Bool", !7, i64 0}
!17 = !{i8 0, i8 2}
!18 = !{}
!19 = !{!10, !12, i64 32}
!20 = !{!10, !11, i64 0}
!21 = !{!10, !11, i64 24}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = distinct !{!24, !23}


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