; LLVM IR from humz2k/sugaryc :: ext/bdwgc (allchblk)

; 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_arrays = type { i64, i64, i64, ptr, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, i32, i64, i64, i64, ptr, ptr, i64, i32, i64, i64, i64, %struct.dl_hashtbl_s, %struct.dl_hashtbl_s, %struct.fnlz_roots_s, i32, ptr, i64, i64, i32, i64, i64, i64, ptr, [64 x ptr], [8 x i8], [64 x ptr], [129 x ptr], [129 x ptr], [129 x ptr], [2049 x i64], [129 x ptr], [4096 x i8], [4096 x i64], [4096 x i64], ptr, [2048 x %struct.roots], [512 x %struct.exclusion], [2048 x ptr] }
%struct.dl_hashtbl_s = type { ptr, i64, i32 }
%struct.fnlz_roots_s = type { ptr, ptr }
%struct.roots = type { ptr, ptr, ptr, i32 }
%struct.exclusion = type { ptr, ptr }
%struct.HeapSect = type { ptr, i64 }
%struct.hblkhdr = type { ptr, ptr, ptr, i8, i8, i16, i64, i64, ptr, i64, [5 x i64] }

@GC_arrays = external global %struct._GC_arrays, align 8
@.str.2 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [41 x i8], align 1

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

declare ptr @GC_find_header(ptr noundef) #1

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

declare void @GC_printf(ptr noundef, ...) #1

; Function Attrs: nounwind uwtable
define dso_local void @GC_dump_regions() #2 {
  %1 = alloca i32, align 4
  %2 = alloca ptr, align 8
  %3 = alloca i64, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #3
  store i32 0, ptr %1, align 4, !tbaa !5
  br label %10

10:                                               ; preds = %142, %0
  %11 = load i32, ptr %1, align 4, !tbaa !5
  %12 = zext i32 %11 to i64
  %13 = load i64, ptr getelementptr inbounds (%struct._GC_arrays, ptr @GC_arrays, i32 0, i32 33), align 8, !tbaa !9
  %14 = icmp ult i64 %12, %13
  br i1 %14, label %15, label %145

15:                                               ; preds = %10
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #3
  %16 = load ptr, ptr getelementptr inbounds (%struct._GC_arrays, ptr @GC_arrays, i32 0, i32 58), align 8, !tbaa !15
  %17 = load i32, ptr %1, align 4, !tbaa !5
  %18 = zext i32 %17 to i64
  %19 = getelementptr inbounds %struct.HeapSect, ptr %16, i64 %18
  %20 = getelementptr inbounds %struct.HeapSect, ptr %19, i32 0, i32 0
  %21 = load ptr, ptr %20, align 8, !tbaa !16
  store ptr %21, ptr %2, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #3
  %22 = load ptr, ptr getelementptr inbounds (%struct._GC_arrays, ptr @GC_arrays, i32 0, i32 58), align 8, !tbaa !15
  %23 = load i32, ptr %1, align 4, !tbaa !5
  %24 = zext i32 %23 to i64
  %25 = getelementptr inbounds %struct.HeapSect, ptr %22, i64 %24
  %26 = getelementptr inbounds %struct.HeapSect, ptr %25, i32 0, i32 1
  %27 = load i64, ptr %26, align 8, !tbaa !19
  store i64 %27, ptr %3, align 8, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #3
  %28 = load ptr, ptr %2, align 8, !tbaa !18
  %29 = load i64, ptr %3, align 8, !tbaa !20
  %30 = getelementptr inbounds i8, ptr %28, i64 %29
  store ptr %30, ptr %4, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #3
  br label %31

31:                                               ; preds = %49, %15
  %32 = load i32, ptr %1, align 4, !tbaa !5
  %33 = add i32 %32, 1
  %34 = zext i32 %33 to i64
  %35 = load i64, ptr getelementptr inbounds (%struct._GC_arrays, ptr @GC_arrays, i32 0, i32 33), align 8, !tbaa !9
  %36 = icmp ult i64 %34, %35
  br i1 %36, label %37, label %47

37:                                               ; preds = %31
  %38 = load ptr, ptr getelementptr inbounds (%struct._GC_arrays, ptr @GC_arrays, i32 0, i32 58), align 8, !tbaa !15
  %39 = load i32, ptr %1, align 4, !tbaa !5
  %40 = add i32 %39, 1
  %41 = zext i32 %40 to i64
  %42 = getelementptr inbounds %struct.HeapSect, ptr %38, i64 %41
  %43 = getelementptr inbounds %struct.HeapSect, ptr %42, i32 0, i32 0
  %44 = load ptr, ptr %43, align 8, !tbaa !16
  %45 = load ptr, ptr %4, align 8, !tbaa !18
  %46 = icmp eq ptr %44, %45
  br label %47

47:                                               ; preds = %37, %31
  %48 = phi i1 [ false, %31 ], [ %46, %37 ]
  br i1 %48, label %49, label %65

49:                                               ; preds = %47
  %50 = load i32, ptr %1, align 4, !tbaa !5
  %51 = add i32 %50, 1
  store i32 %51, ptr %1, align 4, !tbaa !5
  %52 = load ptr, ptr getelementptr inbounds (%struct._GC_arrays, ptr @GC_arrays, i32 0, i32 58), align 8, !tbaa !15
  %53 = load i32, ptr %1, align 4, !tbaa !5
  %54 = zext i32 %53 to i64
  %55 = getelementptr inbounds %struct.HeapSect, ptr %52, i64 %54
  %56 = getelementptr inbounds %struct.HeapSect, ptr %55, i32 0, i32 0
  %57 = load ptr, ptr %56, align 8, !tbaa !16
  %58 = load ptr, ptr getelementptr inbounds (%struct._GC_arrays, ptr @GC_arrays, i32 0, i32 58), align 8, !tbaa !15
  %59 = load i32, ptr %1, align 4, !tbaa !5
  %60 = zext i32 %59 to i64
  %61 = getelementptr inbounds %struct.HeapSect, ptr %58, i64 %60
  %62 = getelementptr inbounds %struct.HeapSect, ptr %61, i32 0, i32 1
  %63 = load i64, ptr %62, align 8, !tbaa !19
  %64 = getelementptr inbounds i8, ptr %57, i64 %63
  store ptr %64, ptr %4, align 8, !tbaa !18
  br label %31, !llvm.loop !21

65:                                               ; preds = %47
  %66 = load ptr, ptr %2, align 8, !tbaa !18
  %67 = load ptr, ptr %4, align 8, !tbaa !18
  call void (ptr, ...) @GC_printf(ptr noundef @.str.2, ptr noundef %66, ptr noundef %67)
  %68 = load ptr, ptr %2, align 8, !tbaa !18
  store ptr %68, ptr %5, align 8, !tbaa !18
  br label %69

69:                                               ; preds = %140, %138, %65
  %70 = load ptr, ptr %5, align 8, !tbaa !18
  %71 = ptrtoint ptr %70 to i64
  %72 = load ptr, ptr %4, align 8, !tbaa !18
  %73 = ptrtoint ptr %72 to i64
  %74 = icmp ult i64 %71, %73
  br i1 %74, label %75, label %141

75:                                               ; preds = %69
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #3
  %76 = load ptr, ptr %5, align 8, !tbaa !18
  %77 = call ptr @GC_find_header(ptr noundef %76)
  store ptr %77, ptr %6, align 8, !tbaa !18
  %78 = load ptr, ptr %6, align 8, !tbaa !18
  %79 = ptrtoint ptr %78 to i64
  %80 = icmp ule i64 %79, 4095
  br i1 %80, label %81, label %86

81:                                               ; preds = %75
  %82 = load ptr, ptr %5, align 8, !tbaa !18
  %83 = load ptr, ptr %6, align 8, !tbaa !18
  call void (ptr, ...) @GC_printf(ptr noundef @.str.3, ptr noundef %82, ptr noundef %83)
  %84 = load ptr, ptr %5, align 8, !tbaa !18
  %85 = getelementptr inbounds i8, ptr %84, i64 4096
  store ptr %85, ptr %5, align 8, !tbaa !18
  store i32 8, ptr %7, align 4
  br label %138, !llvm.loop !23

86:                                               ; preds = %75
  %87 = load ptr, ptr %6, align 8, !tbaa !18
  %88 = getelementptr inbounds %struct.hblkhdr, ptr %87, i32 0, i32 4
  %89 = load i8, ptr %88, align 1, !tbaa !24
  %90 = zext i8 %89 to i32
  %91 = and i32 %90, 4
  %92 = icmp ne i32 %91, 0
  br i1 %92, label %93, label %123

93:                                               ; preds = %86
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #3
  %94 = load ptr, ptr %6, align 8, !tbaa !18
  %95 = getelementptr inbounds %struct.hblkhdr, ptr %94, i32 0, i32 6
  %96 = load i64, ptr %95, align 8, !tbaa !27
  %97 = lshr i64 %96, 12
  %98 = call i32 @GC_hblk_fl_from_blocks(i64 noundef %97)
  store i32 %98, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #3
  %99 = load ptr, ptr %5, align 8, !tbaa !18
  %100 = load ptr, ptr %6, align 8, !tbaa !18
  %101 = getelementptr inbounds %struct.hblkhdr, ptr %100, i32 0, i32 6
  %102 = load i64, ptr %101, align 8, !tbaa !27
  call void (ptr, ...) @GC_printf(ptr noundef @.str.4, ptr noundef %99, i64 noundef %102, ptr noundef @.str.5)
  %103 = load ptr, ptr %6, align 8, !tbaa !18
  %104 = call i32 @free_list_index_of(ptr noundef %103)
  store i32 %104, ptr %9, align 4, !tbaa !5
  %105 = load i32, ptr %9, align 4, !tbaa !5
  %106 = icmp eq i32 -1, %105
  br i1 %106, label %107, label %109

107:                                              ; preds = %93
  %108 = load i32, ptr %8, align 4, !tbaa !5
  call void (ptr, ...) @GC_printf(ptr noundef @.str.6, i32 noundef %108)
  br label %117

109:                                              ; preds = %93
  %110 = load i32, ptr %8, align 4, !tbaa !5
  %111 = load i32, ptr %9, align 4, !tbaa !5
  %112 = icmp ne i32 %110, %111
  br i1 %112, label %113, label %116

113:                                              ; preds = %109
  %114 = load i32, ptr %9, align 4, !tbaa !5
  %115 = load i32, ptr %8, align 4, !tbaa !5
  call void (ptr, ...) @GC_printf(ptr noundef @.str.7, i32 noundef %114, i32 noundef %115)
  br label %116

116:                                              ; preds = %113, %109
  br label %117

117:                                              ; preds = %116, %107
  %118 = load ptr, ptr %6, align 8, !tbaa !18
  %119 = getelementptr inbounds %struct.hblkhdr, ptr %118, i32 0, i32 6
  %120 = load i64, ptr %119, align 8, !tbaa !27
  %121 = load ptr, ptr %5, align 8, !tbaa !18
  %122 = getelementptr inbounds i8, ptr %121, i64 %120
  store ptr %122, ptr %5, align 8, !tbaa !18
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #3
  br label %137

123:                                              ; preds = %86
  %124 = load ptr, ptr %5, align 8, !tbaa !18
  %125 = load ptr, ptr %6, align 8, !tbaa !18
  %126 = getelementptr inbounds %struct.hblkhdr, ptr %125, i32 0, i32 6
  %127 = load i64, ptr %126, align 8, !tbaa !27
  call void (ptr, ...) @GC_printf(ptr noundef @.str.8, ptr noundef %124, i64 noundef %127)
  %128 = load ptr, ptr %6, align 8, !tbaa !18
  %129 = getelementptr inbounds %struct.hblkhdr, ptr %128, i32 0, i32 6
  %130 = load i64, ptr %129, align 8, !tbaa !27
  %131 = add i64 %130, 4096
  %132 = sub i64 %131, 1
  %133 = lshr i64 %132, 12
  %134 = mul i64 4096, %133
  %135 = load ptr, ptr %5, align 8, !tbaa !18
  %136 = getelementptr inbounds i8, ptr %135, i64 %134
  store ptr %136, ptr %5, align 8, !tbaa !18
  br label %137

137:                                              ; preds = %123, %117
  store i32 0, ptr %7, align 4
  br label %138

138:                                              ; preds = %137, %81
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  %139 = load i32, ptr %7, align 4
  switch i32 %139, label %146 [
    i32 0, label %140
    i32 8, label %69
  ]

140:                                              ; preds = %138
  br label %69, !llvm.loop !23

141:                                              ; preds = %69
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #3
  br label %142

142:                                              ; preds = %141
  %143 = load i32, ptr %1, align 4, !tbaa !5
  %144 = add i32 %143, 1
  store i32 %144, ptr %1, align 4, !tbaa !5
  br label %10, !llvm.loop !28

145:                                              ; preds = %10
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #3
  ret void

146:                                              ; preds = %138
  unreachable
}

; Function Attrs: nounwind uwtable
declare hidden i32 @GC_hblk_fl_from_blocks(i64 noundef) #2

; Function Attrs: nounwind uwtable
declare hidden i32 @free_list_index_of(ptr noundef) #2

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, !11, i64 256}
!10 = !{!"_GC_arrays", !11, i64 0, !11, i64 8, !11, i64 16, !12, i64 24, !11, i64 32, !11, i64 40, !11, i64 48, !11, i64 56, !11, i64 64, !11, i64 72, !11, i64 80, !11, i64 88, !11, i64 96, !11, i64 104, !12, i64 112, !12, i64 120, !12, i64 128, !12, i64 136, !12, i64 144, !12, i64 152, !12, i64 160, !12, i64 168, !6, i64 176, !6, i64 180, !6, i64 184, !11, i64 192, !11, i64 200, !11, i64 208, !12, i64 216, !12, i64 224, !11, i64 232, !6, i64 240, !11, i64 248, !11, i64 256, !11, i64 264, !13, i64 272, !13, i64 296, !14, i64 320, !6, i64 336, !12, i64 344, !11, i64 352, !11, i64 360, !6, i64 368, !11, i64 376, !11, i64 384, !11, i64 392, !12, i64 400, !7, i64 408, !7, i64 920, !7, i64 928, !7, i64 1440, !7, i64 2472, !7, i64 3504, !7, i64 4536, !7, i64 20928, !7, i64 21960, !7, i64 26056, !7, i64 58824, !12, i64 91592, !7, i64 91600, !7, i64 157136, !7, i64 165328}
!11 = !{!"long", !7, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = !{!"dl_hashtbl_s", !12, i64 0, !11, i64 8, !6, i64 16}
!14 = !{!"fnlz_roots_s", !12, i64 0, !12, i64 8}
!15 = !{!10, !12, i64 91592}
!16 = !{!17, !12, i64 0}
!17 = !{!"HeapSect", !12, i64 0, !11, i64 8}
!18 = !{!12, !12, i64 0}
!19 = !{!17, !11, i64 8}
!20 = !{!11, !11, i64 0}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = distinct !{!23, !22}
!24 = !{!25, !7, i64 25}
!25 = !{!"hblkhdr", !12, i64 0, !12, i64 8, !12, i64 16, !7, i64 24, !7, i64 25, !26, i64 26, !11, i64 32, !11, i64 40, !12, i64 48, !11, i64 56, !7, i64 64}
!26 = !{!"short", !7, i64 0}
!27 = !{!25, !11, i64 32}
!28 = distinct !{!28, !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._GC_arrays = type { i64, i64, i64, ptr, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, i32, i64, i64, i64, ptr, ptr, i64, i32, i64, i64, i64, %struct.dl_hashtbl_s, %struct.dl_hashtbl_s, %struct.fnlz_roots_s, i32, ptr, i64, i64, i32, i64, i64, i64, ptr, [64 x ptr], [8 x i8], [64 x ptr], [129 x ptr], [129 x ptr], [129 x ptr], [2049 x i64], [129 x ptr], [4096 x i8], [4096 x i64], [4096 x i64], ptr, [2048 x %struct.roots], [512 x %struct.exclusion], [2048 x ptr] }
%struct.dl_hashtbl_s = type { ptr, i64, i32 }
%struct.fnlz_roots_s = type { ptr, ptr }
%struct.roots = type { ptr, ptr, ptr, i32 }
%struct.exclusion = type { ptr, ptr }
%struct.HeapSect = type { ptr, i64 }

@GC_arrays = external local_unnamed_addr global %struct._GC_arrays, align 8
@.str.2 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [41 x i8], align 1

declare ptr @GC_find_header(ptr noundef) local_unnamed_addr #0

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

; Function Attrs: nounwind uwtable
define dso_local void @GC_dump_regions() local_unnamed_addr #1 {
  %1 = load i64, ptr getelementptr inbounds (i8, ptr @GC_arrays, i64 256), align 8, !tbaa !5
  %.not56 = icmp eq i64 %1, 0
  br i1 %.not56, label %._crit_edge, label %.lr.ph55

.loopexit:                                        ; preds = %53, %.critedge
  %2 = zext i32 %.lcssa to i64
  %3 = load i64, ptr getelementptr inbounds (i8, ptr @GC_arrays, i64 256), align 8, !tbaa !5
  %4 = icmp ugt i64 %3, %2
  br i1 %4, label %.lr.ph55, label %._crit_edge, !llvm.loop !14

.lr.ph55:                                         ; preds = %0, %.loopexit
  %5 = phi i64 [ %3, %.loopexit ], [ %1, %0 ]
  %6 = phi i64 [ %2, %.loopexit ], [ 0, %0 ]
  %.054 = phi i32 [ %.lcssa, %.loopexit ], [ 0, %0 ]
  %7 = load ptr, ptr getelementptr inbounds (i8, ptr @GC_arrays, i64 91592), align 8, !tbaa !16
  %8 = getelementptr inbounds %struct.HeapSect, ptr %7, i64 %6
  %9 = load ptr, ptr %8, align 8, !tbaa !17
  %10 = getelementptr inbounds i8, ptr %8, i64 8
  %11 = load i64, ptr %10, align 8, !tbaa !19
  %12 = getelementptr inbounds i8, ptr %9, i64 %11
  %13 = add i32 %.054, 1
  %14 = zext i32 %13 to i64
  %15 = icmp ugt i64 %5, %14
  br i1 %15, label %.lr.ph, label %.critedge

.lr.ph:                                           ; preds = %.lr.ph55, %21
  %16 = phi i64 [ %26, %21 ], [ %14, %.lr.ph55 ]
  %17 = phi i32 [ %25, %21 ], [ %13, %.lr.ph55 ]
  %.03847 = phi ptr [ %24, %21 ], [ %12, %.lr.ph55 ]
  %18 = getelementptr inbounds %struct.HeapSect, ptr %7, i64 %16
  %19 = load ptr, ptr %18, align 8, !tbaa !17
  %20 = icmp eq ptr %19, %.03847
  br i1 %20, label %21, label %.critedge

21:                                               ; preds = %.lr.ph
  %22 = getelementptr inbounds i8, ptr %18, i64 8
  %23 = load i64, ptr %22, align 8, !tbaa !19
  %24 = getelementptr inbounds i8, ptr %19, i64 %23
  %25 = add i32 %17, 1
  %26 = zext i32 %25 to i64
  %27 = icmp ugt i64 %5, %26
  br i1 %27, label %.lr.ph, label %.critedge, !llvm.loop !20

.critedge:                                        ; preds = %.lr.ph, %21, %.lr.ph55
  %.038.lcssa = phi ptr [ %12, %.lr.ph55 ], [ %24, %21 ], [ %.03847, %.lr.ph ]
  %.lcssa = phi i32 [ %13, %.lr.ph55 ], [ %25, %21 ], [ %17, %.lr.ph ]
  tail call void (ptr, ...) @GC_printf(ptr noundef nonnull @.str.2, ptr noundef %9, ptr noundef %.038.lcssa) #2
  %28 = icmp ult ptr %9, %.038.lcssa
  br i1 %28, label %.lr.ph53, label %.loopexit

.lr.ph53:                                         ; preds = %.critedge, %53
  %.03952 = phi ptr [ %.140, %53 ], [ %9, %.critedge ]
  %29 = tail call ptr @GC_find_header(ptr noundef %.03952) #2
  %30 = icmp ult ptr %29, inttoptr (i64 4096 to ptr)
  br i1 %30, label %31, label %32

31:                                               ; preds = %.lr.ph53
  tail call void (ptr, ...) @GC_printf(ptr noundef nonnull @.str.3, ptr noundef %.03952, ptr noundef %29) #2
  br label %53, !llvm.loop !21

32:                                               ; preds = %.lr.ph53
  %33 = getelementptr inbounds i8, ptr %29, i64 25
  %34 = load i8, ptr %33, align 1, !tbaa !22
  %35 = and i8 %34, 4
  %.not = icmp eq i8 %35, 0
  %36 = getelementptr inbounds i8, ptr %29, i64 32
  %37 = load i64, ptr %36, align 8, !tbaa !25
  br i1 %.not, label %49, label %38

38:                                               ; preds = %32
  %39 = lshr i64 %37, 12
  %40 = tail call i32 @GC_hblk_fl_from_blocks(i64 noundef %39)
  %41 = load i64, ptr %36, align 8, !tbaa !25
  tail call void (ptr, ...) @GC_printf(ptr noundef nonnull @.str.4, ptr noundef %.03952, i64 noundef %41, ptr noundef nonnull @.str.5) #2
  %42 = tail call i32 @free_list_index_of(ptr noundef nonnull %29)
  %43 = icmp eq i32 %42, -1
  br i1 %43, label %44, label %45

44:                                               ; preds = %38
  tail call void (ptr, ...) @GC_printf(ptr noundef nonnull @.str.6, i32 noundef %40) #2
  br label %47

45:                                               ; preds = %38
  %.not46 = icmp eq i32 %40, %42
  br i1 %.not46, label %47, label %46

46:                                               ; preds = %45
  tail call void (ptr, ...) @GC_printf(ptr noundef nonnull @.str.7, i32 noundef %42, i32 noundef %40) #2
  br label %47

47:                                               ; preds = %45, %46, %44
  %48 = load i64, ptr %36, align 8, !tbaa !25
  br label %53

49:                                               ; preds = %32
  tail call void (ptr, ...) @GC_printf(ptr noundef nonnull @.str.8, ptr noundef %.03952, i64 noundef %37) #2
  %50 = load i64, ptr %36, align 8, !tbaa !25
  %51 = add i64 %50, 4095
  %52 = and i64 %51, -4096
  br label %53

53:                                               ; preds = %47, %49, %31
  %.pn.sink = phi i64 [ 4096, %31 ], [ %48, %47 ], [ %52, %49 ]
  %.140 = getelementptr inbounds i8, ptr %.03952, i64 %.pn.sink
  %54 = icmp ult ptr %.140, %.038.lcssa
  br i1 %54, label %.lr.ph53, label %.loopexit

._crit_edge:                                      ; preds = %.loopexit, %0
  ret void
}

; Function Attrs: nounwind uwtable
declare hidden i32 @GC_hblk_fl_from_blocks(i64 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden i32 @free_list_index_of(ptr noundef) local_unnamed_addr #1

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, !7, i64 256}
!6 = !{!"_GC_arrays", !7, i64 0, !7, i64 8, !7, i64 16, !10, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !7, i64 64, !7, i64 72, !7, i64 80, !7, i64 88, !7, i64 96, !7, i64 104, !10, i64 112, !10, i64 120, !10, i64 128, !10, i64 136, !10, i64 144, !10, i64 152, !10, i64 160, !10, i64 168, !11, i64 176, !11, i64 180, !11, i64 184, !7, i64 192, !7, i64 200, !7, i64 208, !10, i64 216, !10, i64 224, !7, i64 232, !11, i64 240, !7, i64 248, !7, i64 256, !7, i64 264, !12, i64 272, !12, i64 296, !13, i64 320, !11, i64 336, !10, i64 344, !7, i64 352, !7, i64 360, !11, i64 368, !7, i64 376, !7, i64 384, !7, i64 392, !10, i64 400, !8, i64 408, !8, i64 920, !8, i64 928, !8, i64 1440, !8, i64 2472, !8, i64 3504, !8, i64 4536, !8, i64 20928, !8, i64 21960, !8, i64 26056, !8, i64 58824, !10, i64 91592, !8, i64 91600, !8, i64 157136, !8, i64 165328}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"int", !8, i64 0}
!12 = !{!"dl_hashtbl_s", !10, i64 0, !7, i64 8, !11, i64 16}
!13 = !{!"fnlz_roots_s", !10, i64 0, !10, i64 8}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = !{!6, !10, i64 91592}
!17 = !{!18, !10, i64 0}
!18 = !{!"HeapSect", !10, i64 0, !7, i64 8}
!19 = !{!18, !7, i64 8}
!20 = distinct !{!20, !15}
!21 = distinct !{!21, !15}
!22 = !{!23, !8, i64 25}
!23 = !{!"hblkhdr", !10, i64 0, !10, i64 8, !10, i64 16, !8, i64 24, !8, i64 25, !24, i64 26, !7, i64 32, !7, i64 40, !10, i64 48, !7, i64 56, !8, i64 64}
!24 = !{!"short", !8, i64 0}
!25 = !{!23, !7, i64 32}


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