; LLVM IR from brewlin/garbage-collect :: compact-two-finger (compact)

; 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.gc_heap = type { ptr, i64 }
%struct.root_ = type { ptr, ptr }
%struct.header = type { i64, i64, i64, i64, ptr, ptr }

@gc_heaps_used = external global i64, align 8
@gc_heaps = external global [100000 x %struct.gc_heap], align 16
@free_list = external global ptr, align 8
@root_used = external global i64, align 8
@roots = external global [100000 x %struct.root_], align 16

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

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

declare ptr @is_pointer_to_heap(ptr noundef) #1

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

; Function Attrs: nounwind uwtable
define dso_local void @adjust_ptr() #2 {
  %1 = alloca i32, align 4
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca i64, 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 i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #3
  store i32 0, ptr %1, align 4, !tbaa !5
  br label %13

13:                                               ; preds = %47, %0
  %14 = load i32, ptr %1, align 4, !tbaa !5
  %15 = sext i32 %14 to i64
  %16 = load i64, ptr @root_used, align 8, !tbaa !9
  %17 = icmp ult i64 %15, %16
  br i1 %17, label %19, label %18

18:                                               ; preds = %13
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #3
  br label %50

19:                                               ; preds = %13
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #3
  %20 = load i32, ptr %1, align 4, !tbaa !5
  %21 = sext i32 %20 to i64
  %22 = getelementptr inbounds [100000 x %struct.root_], ptr @roots, i64 0, i64 %21
  %23 = getelementptr inbounds %struct.root_, ptr %22, i32 0, i32 0
  %24 = load ptr, ptr %23, align 16, !tbaa !11
  %25 = getelementptr inbounds %struct.header, ptr %24, i64 -1
  store ptr %25, ptr %2, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #3
  %26 = load ptr, ptr %2, align 8, !tbaa !14
  %27 = getelementptr inbounds %struct.header, ptr %26, i32 0, i32 5
  %28 = load ptr, ptr %27, align 8, !tbaa !15
  store ptr %28, ptr %3, align 8, !tbaa !14
  %29 = load ptr, ptr %2, align 8, !tbaa !14
  %30 = load ptr, ptr @free_list, align 8, !tbaa !14
  %31 = icmp uge ptr %29, %30
  br i1 %31, label %32, label %46

32:                                               ; preds = %19
  %33 = load ptr, ptr %3, align 8, !tbaa !14
  %34 = getelementptr inbounds %struct.header, ptr %33, i64 1
  %35 = load i32, ptr %1, align 4, !tbaa !5
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds [100000 x %struct.root_], ptr @roots, i64 0, i64 %36
  %38 = getelementptr inbounds %struct.root_, ptr %37, i32 0, i32 0
  store ptr %34, ptr %38, align 16, !tbaa !11
  %39 = load ptr, ptr %3, align 8, !tbaa !14
  %40 = getelementptr inbounds %struct.header, ptr %39, i64 1
  %41 = load i32, ptr %1, align 4, !tbaa !5
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds [100000 x %struct.root_], ptr @roots, i64 0, i64 %42
  %44 = getelementptr inbounds %struct.root_, ptr %43, i32 0, i32 1
  %45 = load ptr, ptr %44, align 8, !tbaa !17
  store ptr %40, ptr %45, align 8, !tbaa !14
  br label %46

46:                                               ; preds = %32, %19
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #3
  br label %47

47:                                               ; preds = %46
  %48 = load i32, ptr %1, align 4, !tbaa !5
  %49 = add nsw i32 %48, 1
  store i32 %49, ptr %1, align 4, !tbaa !5
  br label %13, !llvm.loop !18

50:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #3
  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
  store i64 0, ptr %4, align 8, !tbaa !9
  br label %51

51:                                               ; preds = %128, %50
  %52 = load i64, ptr %4, align 8, !tbaa !9
  %53 = load i64, ptr @gc_heaps_used, align 8, !tbaa !9
  %54 = icmp ult i64 %52, %53
  br i1 %54, label %55, label %131

55:                                               ; preds = %51
  %56 = load i64, ptr %4, align 8, !tbaa !9
  %57 = getelementptr inbounds [100000 x %struct.gc_heap], ptr @gc_heaps, i64 0, i64 %56
  %58 = getelementptr inbounds %struct.gc_heap, ptr %57, i32 0, i32 0
  %59 = load ptr, ptr %58, align 16, !tbaa !20
  %60 = ptrtoint ptr %59 to i64
  %61 = load i64, ptr %4, align 8, !tbaa !9
  %62 = getelementptr inbounds [100000 x %struct.gc_heap], ptr @gc_heaps, i64 0, i64 %61
  %63 = getelementptr inbounds %struct.gc_heap, ptr %62, i32 0, i32 1
  %64 = load i64, ptr %63, align 8, !tbaa !22
  %65 = add i64 %60, %64
  %66 = inttoptr i64 %65 to ptr
  store ptr %66, ptr %6, align 8, !tbaa !14
  %67 = load i64, ptr %4, align 8, !tbaa !9
  %68 = getelementptr inbounds [100000 x %struct.gc_heap], ptr @gc_heaps, i64 0, i64 %67
  %69 = getelementptr inbounds %struct.gc_heap, ptr %68, i32 0, i32 0
  %70 = load ptr, ptr %69, align 16, !tbaa !20
  store ptr %70, ptr %5, align 8, !tbaa !14
  br label %71

71:                                               ; preds = %117, %55
  %72 = load ptr, ptr %5, align 8, !tbaa !14
  %73 = load ptr, ptr %6, align 8, !tbaa !14
  %74 = icmp ult ptr %72, %73
  br i1 %74, label %75, label %127

75:                                               ; preds = %71
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  %76 = load ptr, ptr %5, align 8, !tbaa !14
  %77 = getelementptr inbounds %struct.header, ptr %76, i64 1
  store ptr %77, ptr %9, align 8, !tbaa !14
  br label %78

78:                                               ; preds = %113, %75
  %79 = load ptr, ptr %9, align 8, !tbaa !14
  %80 = load ptr, ptr %5, align 8, !tbaa !14
  %81 = getelementptr inbounds %struct.header, ptr %80, i64 1
  %82 = ptrtoint ptr %81 to i64
  %83 = load ptr, ptr %5, align 8, !tbaa !14
  %84 = getelementptr inbounds %struct.header, ptr %83, i32 0, i32 2
  %85 = load i64, ptr %84, align 8, !tbaa !23
  %86 = sub i64 %85, 48
  %87 = add i64 %82, %86
  %88 = inttoptr i64 %87 to ptr
  %89 = icmp ult ptr %79, %88
  br i1 %89, label %91, label %90

90:                                               ; preds = %78
  store i32 11, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  br label %116

91:                                               ; preds = %78
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  %92 = load ptr, ptr %9, align 8, !tbaa !14
  %93 = load ptr, ptr %92, align 8, !tbaa !14
  %94 = call ptr @is_pointer_to_heap(ptr noundef %93)
  store ptr %94, ptr %11, align 8, !tbaa !14
  %95 = icmp ne ptr %94, null
  br i1 %95, label %97, label %96

96:                                               ; preds = %91
  store i32 13, ptr %10, align 4
  br label %110

97:                                               ; preds = %91
  %98 = load ptr, ptr %11, align 8, !tbaa !14
  %99 = load ptr, ptr %9, align 8, !tbaa !14
  %100 = load ptr, ptr %99, align 8, !tbaa !14
  %101 = call ptr @get_header(ptr noundef %98, ptr noundef %100)
  store ptr %101, ptr %12, align 8, !tbaa !14
  %102 = icmp ne ptr %101, null
  br i1 %102, label %103, label %109

103:                                              ; preds = %97
  %104 = load ptr, ptr %12, align 8, !tbaa !14
  %105 = getelementptr inbounds %struct.header, ptr %104, i32 0, i32 5
  %106 = load ptr, ptr %105, align 8, !tbaa !15
  %107 = getelementptr inbounds %struct.header, ptr %106, i64 1
  %108 = load ptr, ptr %9, align 8, !tbaa !14
  store ptr %107, ptr %108, align 8, !tbaa !14
  br label %109

109:                                              ; preds = %103, %97
  store i32 0, ptr %10, align 4
  br label %110

110:                                              ; preds = %109, %96
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  %111 = load i32, ptr %10, align 4
  switch i32 %111, label %132 [
    i32 0, label %112
    i32 13, label %113
  ]

112:                                              ; preds = %110
  br label %113

113:                                              ; preds = %112, %110
  %114 = load ptr, ptr %9, align 8, !tbaa !14
  %115 = getelementptr inbounds i8, ptr %114, i32 1
  store ptr %115, ptr %9, align 8, !tbaa !14
  br label %78, !llvm.loop !24

116:                                              ; preds = %90
  br label %117

117:                                              ; preds = %116
  %118 = load ptr, ptr %5, align 8, !tbaa !14
  %119 = getelementptr inbounds %struct.header, ptr %118, i64 1
  %120 = ptrtoint ptr %119 to i64
  %121 = load ptr, ptr %5, align 8, !tbaa !14
  %122 = getelementptr inbounds %struct.header, ptr %121, i32 0, i32 2
  %123 = load i64, ptr %122, align 8, !tbaa !23
  %124 = sub i64 %123, 48
  %125 = add i64 %120, %124
  %126 = inttoptr i64 %125 to ptr
  store ptr %126, ptr %5, align 8, !tbaa !14
  br label %71, !llvm.loop !25

127:                                              ; preds = %71
  br label %128

128:                                              ; preds = %127
  %129 = load i64, ptr %4, align 8, !tbaa !9
  %130 = add i64 %129, 1
  store i64 %130, ptr %4, align 8, !tbaa !9
  br label %51, !llvm.loop !26

131:                                              ; preds = %51
  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
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #3
  ret void

132:                                              ; preds = %110
  unreachable
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !13, i64 0}
!12 = !{!"root_", !13, i64 0, !13, i64 8}
!13 = !{!"any pointer", !7, i64 0}
!14 = !{!13, !13, i64 0}
!15 = !{!16, !13, i64 40}
!16 = !{!"header", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !13, i64 32, !13, i64 40}
!17 = !{!12, !13, i64 8}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = !{!21, !13, i64 0}
!21 = !{!"gc_heap", !13, i64 0, !10, i64 8}
!22 = !{!21, !10, i64 8}
!23 = !{!16, !10, i64 16}
!24 = distinct !{!24, !19}
!25 = distinct !{!25, !19}
!26 = distinct !{!26, !19}


; 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.gc_heap = type { ptr, i64 }
%struct.root_ = type { ptr, ptr }

@gc_heaps_used = external local_unnamed_addr global i64, align 8
@gc_heaps = external local_unnamed_addr global [100000 x %struct.gc_heap], align 16
@free_list = external local_unnamed_addr global ptr, align 8
@root_used = external local_unnamed_addr global i64, align 8
@roots = external local_unnamed_addr global [100000 x %struct.root_], align 16

declare ptr @is_pointer_to_heap(ptr noundef) local_unnamed_addr #0

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

; Function Attrs: nounwind uwtable
define dso_local void @adjust_ptr() local_unnamed_addr #1 {
  %1 = load i64, ptr @root_used, align 8, !tbaa !5
  %.not44 = icmp eq i64 %1, 0
  br i1 %.not44, label %.preheader, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %0
  %.pre48 = load ptr, ptr @free_list, align 8, !tbaa !9
  %xtraiter = and i64 %1, 1
  %2 = icmp eq i64 %1, 1
  br i1 %2, label %.preheader.loopexit.unr-lcssa, label %.lr.ph.preheader.new

.lr.ph.preheader.new:                             ; preds = %.lr.ph.preheader
  %unroll_iter = and i64 %1, -2
  br label %.lr.ph

.preheader.loopexit.unr-lcssa:                    ; preds = %33, %.lr.ph.preheader
  %.unr = phi ptr [ %.pre48, %.lr.ph.preheader ], [ %34, %33 ]
  %indvars.iv.unr = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next.1, %33 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader, label %.lr.ph.epil

.lr.ph.epil:                                      ; preds = %.preheader.loopexit.unr-lcssa
  %3 = getelementptr inbounds [100000 x %struct.root_], ptr @roots, i64 0, i64 %indvars.iv.unr
  %4 = load ptr, ptr %3, align 16, !tbaa !11
  %5 = getelementptr inbounds i8, ptr %4, i64 -48
  %.not35.epil = icmp ult ptr %5, %.unr
  br i1 %.not35.epil, label %.preheader, label %6

6:                                                ; preds = %.lr.ph.epil
  %7 = getelementptr inbounds i8, ptr %4, i64 -8
  %8 = load ptr, ptr %7, align 8, !tbaa !13
  %9 = getelementptr inbounds i8, ptr %8, i64 48
  store ptr %9, ptr %3, align 16, !tbaa !11
  %10 = getelementptr inbounds i8, ptr %3, i64 8
  %11 = load ptr, ptr %10, align 8, !tbaa !15
  store ptr %9, ptr %11, align 8, !tbaa !9
  br label %.preheader

.preheader:                                       ; preds = %.preheader.loopexit.unr-lcssa, %6, %.lr.ph.epil, %0
  %12 = load i64, ptr @gc_heaps_used, align 8, !tbaa !5
  %.not45 = icmp eq i64 %12, 0
  br i1 %.not45, label %._crit_edge43, label %.lr.ph42

.lr.ph:                                           ; preds = %33, %.lr.ph.preheader.new
  %13 = phi ptr [ %.pre48, %.lr.ph.preheader.new ], [ %34, %33 ]
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader.new ], [ %indvars.iv.next.1, %33 ]
  %niter = phi i64 [ 0, %.lr.ph.preheader.new ], [ %niter.next.1, %33 ]
  %14 = getelementptr inbounds [100000 x %struct.root_], ptr @roots, i64 0, i64 %indvars.iv
  %15 = load ptr, ptr %14, align 16, !tbaa !11
  %16 = getelementptr inbounds i8, ptr %15, i64 -48
  %.not35 = icmp ult ptr %16, %13
  br i1 %.not35, label %.lr.ph.1, label %17

17:                                               ; preds = %.lr.ph
  %18 = getelementptr inbounds i8, ptr %15, i64 -8
  %19 = load ptr, ptr %18, align 8, !tbaa !13
  %20 = getelementptr inbounds i8, ptr %19, i64 48
  store ptr %20, ptr %14, align 16, !tbaa !11
  %21 = getelementptr inbounds i8, ptr %14, i64 8
  %22 = load ptr, ptr %21, align 8, !tbaa !15
  store ptr %20, ptr %22, align 8, !tbaa !9
  %.pre = load ptr, ptr @free_list, align 8, !tbaa !9
  br label %.lr.ph.1

.lr.ph.1:                                         ; preds = %17, %.lr.ph
  %23 = phi ptr [ %.pre, %17 ], [ %13, %.lr.ph ]
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %24 = getelementptr inbounds [100000 x %struct.root_], ptr @roots, i64 0, i64 %indvars.iv.next
  %25 = load ptr, ptr %24, align 16, !tbaa !11
  %26 = getelementptr inbounds i8, ptr %25, i64 -48
  %.not35.1 = icmp ult ptr %26, %23
  br i1 %.not35.1, label %33, label %27

27:                                               ; preds = %.lr.ph.1
  %28 = getelementptr inbounds i8, ptr %25, i64 -8
  %29 = load ptr, ptr %28, align 8, !tbaa !13
  %30 = getelementptr inbounds i8, ptr %29, i64 48
  store ptr %30, ptr %24, align 16, !tbaa !11
  %31 = getelementptr inbounds i8, ptr %24, i64 8
  %32 = load ptr, ptr %31, align 8, !tbaa !15
  store ptr %30, ptr %32, align 8, !tbaa !9
  %.pre.1 = load ptr, ptr @free_list, align 8, !tbaa !9
  br label %33

33:                                               ; preds = %27, %.lr.ph.1
  %34 = phi ptr [ %.pre.1, %27 ], [ %23, %.lr.ph.1 ]
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %.preheader.loopexit.unr-lcssa, label %.lr.ph, !llvm.loop !16

.lr.ph42:                                         ; preds = %.preheader, %._crit_edge
  %35 = phi i64 [ %68, %._crit_edge ], [ %12, %.preheader ]
  %.02741 = phi i64 [ %69, %._crit_edge ], [ 0, %.preheader ]
  %36 = getelementptr inbounds [100000 x %struct.gc_heap], ptr @gc_heaps, i64 0, i64 %.02741
  %37 = load ptr, ptr %36, align 16, !tbaa !18
  %38 = ptrtoint ptr %37 to i64
  %39 = getelementptr inbounds i8, ptr %36, i64 8
  %40 = load i64, ptr %39, align 8, !tbaa !20
  %41 = add i64 %40, %38
  %42 = inttoptr i64 %41 to ptr
  %43 = icmp ult ptr %37, %42
  br i1 %43, label %.lr.ph40, label %._crit_edge

.loopexit:                                        ; preds = %62, %.lr.ph40
  %.lcssa = phi ptr [ %51, %.lr.ph40 ], [ %66, %62 ]
  %44 = icmp ult ptr %.lcssa, %42
  br i1 %44, label %.lr.ph40, label %._crit_edge.loopexit, !llvm.loop !21

.lr.ph40:                                         ; preds = %.lr.ph42, %.loopexit
  %.02939 = phi ptr [ %.lcssa, %.loopexit ], [ %37, %.lr.ph42 ]
  %45 = getelementptr inbounds i8, ptr %.02939, i64 48
  %46 = ptrtoint ptr %45 to i64
  %47 = getelementptr inbounds i8, ptr %.02939, i64 16
  %48 = add i64 %46, -48
  %49 = load i64, ptr %47, align 8, !tbaa !22
  %50 = add i64 %48, %49
  %51 = inttoptr i64 %50 to ptr
  %52 = icmp ult ptr %45, %51
  br i1 %52, label %.lr.ph38, label %.loopexit

.lr.ph38:                                         ; preds = %.lr.ph40, %62
  %.02837 = phi ptr [ %63, %62 ], [ %45, %.lr.ph40 ]
  %53 = load ptr, ptr %.02837, align 8, !tbaa !9
  %54 = tail call ptr @is_pointer_to_heap(ptr noundef %53) #2
  %.not = icmp eq ptr %54, null
  br i1 %.not, label %62, label %55

55:                                               ; preds = %.lr.ph38
  %56 = load ptr, ptr %.02837, align 8, !tbaa !9
  %57 = tail call ptr @get_header(ptr noundef nonnull %54, ptr noundef %56) #2
  %.not34 = icmp eq ptr %57, null
  br i1 %.not34, label %62, label %58

58:                                               ; preds = %55
  %59 = getelementptr inbounds i8, ptr %57, i64 40
  %60 = load ptr, ptr %59, align 8, !tbaa !13
  %61 = getelementptr inbounds i8, ptr %60, i64 48
  store ptr %61, ptr %.02837, align 8, !tbaa !9
  br label %62

62:                                               ; preds = %55, %58, %.lr.ph38
  %63 = getelementptr inbounds i8, ptr %.02837, i64 1
  %64 = load i64, ptr %47, align 8, !tbaa !22
  %65 = add i64 %48, %64
  %66 = inttoptr i64 %65 to ptr
  %67 = icmp ult ptr %63, %66
  br i1 %67, label %.lr.ph38, label %.loopexit, !llvm.loop !23

._crit_edge.loopexit:                             ; preds = %.loopexit
  %.pre49 = load i64, ptr @gc_heaps_used, align 8, !tbaa !5
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.lr.ph42
  %68 = phi i64 [ %.pre49, %._crit_edge.loopexit ], [ %35, %.lr.ph42 ]
  %69 = add nuw i64 %.02741, 1
  %70 = icmp ult i64 %69, %68
  br i1 %70, label %.lr.ph42, label %._crit_edge43, !llvm.loop !24

._crit_edge43:                                    ; preds = %._crit_edge, %.preheader
  ret void
}

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 = { 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 #2 = { 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, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !10, i64 0}
!12 = !{!"root_", !10, i64 0, !10, i64 8}
!13 = !{!14, !10, i64 40}
!14 = !{!"header", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !10, i64 32, !10, i64 40}
!15 = !{!12, !10, i64 8}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = !{!19, !10, i64 0}
!19 = !{!"gc_heap", !10, i64 0, !6, i64 8}
!20 = !{!19, !6, i64 8}
!21 = distinct !{!21, !17}
!22 = !{!14, !6, i64 16}
!23 = distinct !{!23, !17}
!24 = distinct !{!24, !17}


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