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

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

@GC_arrays = external global %struct._GC_arrays, align 8
@GC_manual_vdb = external global i32, align 4
@GC_object_finalized_proc = external hidden global ptr, align 8
@GC_old_dl_entries = external hidden global i64, align 8
@GC_old_ll_entries = external hidden global i64, align 8
@GC_current_warn_proc = external global ptr, align 8
@.str.12 = external hidden unnamed_addr constant [45 x i8], align 1
@GC_java_finalization = external global i32, align 4
@need_unreachable_finalization = external hidden global i32, align 4
@GC_fail_count = external global i32, align 4
@GC_finalizer_nested = external hidden global i32, align 4

; 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 void @GC_dirty_inner(ptr noundef) #1

; Function Attrs: nounwind uwtable
declare hidden void @GC_normal_finalize_mark_proc(ptr noundef) #2

; Function Attrs: nounwind uwtable
declare hidden void @GC_null_finalize_mark_proc(ptr noundef) #2

; Function Attrs: nounwind uwtable
declare hidden void @GC_unreachable_finalize_mark_proc(ptr noundef) #2

; Function Attrs: nounwind uwtable
define dso_local void @GC_finalize() #2 {
  %1 = alloca ptr, align 8
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %1) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  %8 = load ptr, ptr getelementptr inbounds (%struct._GC_arrays, ptr @GC_arrays, i32 0, i32 37), align 8, !tbaa !5
  %9 = icmp eq ptr %8, null
  br i1 %9, label %10, label %11

10:                                               ; preds = %0
  br label %15

11:                                               ; preds = %0
  %12 = load i32, ptr getelementptr inbounds (%struct._GC_arrays, ptr @GC_arrays, i32 0, i32 38), align 8, !tbaa !14
  %13 = zext i32 %12 to i64
  %14 = shl i64 1, %13
  br label %15

15:                                               ; preds = %11, %10
  %16 = phi i64 [ 0, %10 ], [ %14, %11 ]
  store i64 %16, ptr %6, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  store i32 0, ptr %7, align 4, !tbaa !16
  %17 = load i64, ptr getelementptr inbounds (%struct.dl_hashtbl_s, ptr getelementptr inbounds (%struct._GC_arrays, ptr @GC_arrays, i32 0, i32 36), i32 0, i32 1), align 8, !tbaa !17
  store i64 %17, ptr @GC_old_dl_entries, align 8, !tbaa !15
  %18 = load i64, ptr getelementptr inbounds (%struct.dl_hashtbl_s, ptr getelementptr inbounds (%struct._GC_arrays, ptr @GC_arrays, i32 0, i32 35), i32 0, i32 1), align 8, !tbaa !18
  store i64 %18, ptr @GC_old_ll_entries, align 8, !tbaa !15
  call void @GC_mark_togglerefs()
  call void @GC_make_disappearing_links_disappear(ptr noundef getelementptr inbounds (%struct._GC_arrays, ptr @GC_arrays, i32 0, i32 36), i32 noundef 0)
  store i64 0, ptr %5, align 8, !tbaa !15
  br label %19

19:                                               ; preds = %61, %15
  %20 = load i64, ptr %5, align 8, !tbaa !15
  %21 = load i64, ptr %6, align 8, !tbaa !15
  %22 = icmp ult i64 %20, %21
  br i1 %22, label %23, label %64

23:                                               ; preds = %19
  %24 = load ptr, ptr getelementptr inbounds (%struct._GC_arrays, ptr @GC_arrays, i32 0, i32 37), align 8, !tbaa !5
  %25 = load i64, ptr %5, align 8, !tbaa !15
  %26 = getelementptr inbounds ptr, ptr %24, i64 %25
  %27 = load ptr, ptr %26, align 8, !tbaa !19
  store ptr %27, ptr %1, align 8, !tbaa !19
  br label %28

28:                                               ; preds = %55, %23
  %29 = load ptr, ptr %1, align 8, !tbaa !19
  %30 = icmp ne ptr %29, null
  br i1 %30, label %31, label %60

31:                                               ; preds = %28
  %32 = load ptr, ptr %1, align 8, !tbaa !19
  %33 = getelementptr inbounds %struct.finalizable_object, ptr %32, i32 0, i32 0
  %34 = getelementptr inbounds %struct.hash_chain_entry, ptr %33, i32 0, i32 0
  %35 = load i64, ptr %34, align 8, !tbaa !20
  %36 = xor i64 %35, -1
  %37 = inttoptr i64 %36 to ptr
  store ptr %37, ptr %4, align 8, !tbaa !19
  %38 = load ptr, ptr %4, align 8, !tbaa !19
  %39 = call i32 @GC_is_marked(ptr noundef %38)
  %40 = icmp ne i32 %39, 0
  br i1 %40, label %54, label %41

41:                                               ; preds = %31
  %42 = load ptr, ptr %4, align 8, !tbaa !19
  %43 = load ptr, ptr %1, align 8, !tbaa !19
  %44 = getelementptr inbounds %struct.finalizable_object, ptr %43, i32 0, i32 4
  %45 = load ptr, ptr %44, align 8, !tbaa !23
  call void @GC_mark_fo(ptr noundef %42, ptr noundef %45)
  %46 = load ptr, ptr %4, align 8, !tbaa !19
  %47 = call i32 @GC_is_marked(ptr noundef %46)
  %48 = icmp ne i32 %47, 0
  br i1 %48, label %49, label %53

49:                                               ; preds = %41
  %50 = load ptr, ptr @GC_current_warn_proc, align 8, !tbaa !19
  %51 = load ptr, ptr %4, align 8, !tbaa !19
  %52 = ptrtoint ptr %51 to i64
  call void %50(ptr noundef @.str.12, i64 noundef %52)
  br label %53

53:                                               ; preds = %49, %41
  br label %54

54:                                               ; preds = %53, %31
  br label %55

55:                                               ; preds = %54
  %56 = load ptr, ptr %1, align 8, !tbaa !19
  %57 = getelementptr inbounds %struct.finalizable_object, ptr %56, i32 0, i32 0
  %58 = getelementptr inbounds %struct.hash_chain_entry, ptr %57, i32 0, i32 1
  %59 = load ptr, ptr %58, align 8, !tbaa !24
  store ptr %59, ptr %1, align 8, !tbaa !19
  br label %28, !llvm.loop !25

60:                                               ; preds = %28
  br label %61

61:                                               ; preds = %60
  %62 = load i64, ptr %5, align 8, !tbaa !15
  %63 = add i64 %62, 1
  store i64 %63, ptr %5, align 8, !tbaa !15
  br label %19, !llvm.loop !27

64:                                               ; preds = %19
  store i64 0, ptr getelementptr inbounds (%struct._GC_arrays, ptr @GC_arrays, i32 0, i32 11), align 8, !tbaa !28
  store i64 0, ptr %5, align 8, !tbaa !15
  br label %65

65:                                               ; preds = %173, %64
  %66 = load i64, ptr %5, align 8, !tbaa !15
  %67 = load i64, ptr %6, align 8, !tbaa !15
  %68 = icmp ult i64 %66, %67
  br i1 %68, label %69, label %176

69:                                               ; preds = %65
  %70 = load ptr, ptr getelementptr inbounds (%struct._GC_arrays, ptr @GC_arrays, i32 0, i32 37), align 8, !tbaa !5
  %71 = load i64, ptr %5, align 8, !tbaa !15
  %72 = getelementptr inbounds ptr, ptr %70, i64 %71
  %73 = load ptr, ptr %72, align 8, !tbaa !19
  store ptr %73, ptr %1, align 8, !tbaa !19
  store ptr null, ptr %2, align 8, !tbaa !19
  br label %74

74:                                               ; preds = %171, %69
  %75 = load ptr, ptr %1, align 8, !tbaa !19
  %76 = icmp ne ptr %75, null
  br i1 %76, label %77, label %172

77:                                               ; preds = %74
  %78 = load ptr, ptr %1, align 8, !tbaa !19
  %79 = getelementptr inbounds %struct.finalizable_object, ptr %78, i32 0, i32 0
  %80 = getelementptr inbounds %struct.hash_chain_entry, ptr %79, i32 0, i32 0
  %81 = load i64, ptr %80, align 8, !tbaa !20
  %82 = xor i64 %81, -1
  %83 = inttoptr i64 %82 to ptr
  store ptr %83, ptr %4, align 8, !tbaa !19
  %84 = load ptr, ptr %4, align 8, !tbaa !19
  %85 = call i32 @GC_is_marked(ptr noundef %84)
  %86 = icmp ne i32 %85, 0
  br i1 %86, label %165, label %87

87:                                               ; preds = %77
  %88 = load i32, ptr @GC_java_finalization, align 4, !tbaa !16
  %89 = icmp ne i32 %88, 0
  br i1 %89, label %92, label %90

90:                                               ; preds = %87
  %91 = load ptr, ptr %4, align 8, !tbaa !19
  call void @GC_set_mark_bit(ptr noundef %91)
  br label %92

92:                                               ; preds = %90, %87
  %93 = load ptr, ptr %1, align 8, !tbaa !19
  %94 = getelementptr inbounds %struct.finalizable_object, ptr %93, i32 0, i32 0
  %95 = getelementptr inbounds %struct.hash_chain_entry, ptr %94, i32 0, i32 1
  %96 = load ptr, ptr %95, align 8, !tbaa !24
  store ptr %96, ptr %3, align 8, !tbaa !19
  %97 = load ptr, ptr %2, align 8, !tbaa !19
  %98 = icmp eq ptr null, %97
  br i1 %98, label %99, label %117

99:                                               ; preds = %92
  %100 = load ptr, ptr %3, align 8, !tbaa !19
  %101 = load ptr, ptr getelementptr inbounds (%struct._GC_arrays, ptr @GC_arrays, i32 0, i32 37), align 8, !tbaa !5
  %102 = load i64, ptr %5, align 8, !tbaa !15
  %103 = getelementptr inbounds ptr, ptr %101, i64 %102
  store ptr %100, ptr %103, align 8, !tbaa !19
  %104 = load ptr, ptr @GC_object_finalized_proc, align 8, !tbaa !19
  %105 = icmp ne ptr %104, null
  br i1 %105, label %106, label %115

106:                                              ; preds = %99
  %107 = load i32, ptr @GC_manual_vdb, align 4, !tbaa !16
  %108 = icmp ne i32 %107, 0
  br i1 %108, label %109, label %113

109:                                              ; preds = %106
  %110 = load ptr, ptr getelementptr inbounds (%struct._GC_arrays, ptr @GC_arrays, i32 0, i32 37), align 8, !tbaa !5
  %111 = load i64, ptr %5, align 8, !tbaa !15
  %112 = getelementptr inbounds ptr, ptr %110, i64 %111
  call void @GC_dirty_inner(ptr noundef %112)
  br label %114

113:                                              ; preds = %106
  br label %114

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

115:                                              ; preds = %99
  store i32 1, ptr %7, align 4, !tbaa !16
  br label %116

116:                                              ; preds = %115, %114
  br label %128

117:                                              ; preds = %92
  %118 = load ptr, ptr %3, align 8, !tbaa !19
  %119 = load ptr, ptr %2, align 8, !tbaa !19
  %120 = getelementptr inbounds %struct.finalizable_object, ptr %119, i32 0, i32 0
  %121 = getelementptr inbounds %struct.hash_chain_entry, ptr %120, i32 0, i32 1
  store ptr %118, ptr %121, align 8, !tbaa !24
  %122 = load i32, ptr @GC_manual_vdb, align 4, !tbaa !16
  %123 = icmp ne i32 %122, 0
  br i1 %123, label %124, label %126

124:                                              ; preds = %117
  %125 = load ptr, ptr %2, align 8, !tbaa !19
  call void @GC_dirty_inner(ptr noundef %125)
  br label %127

126:                                              ; preds = %117
  br label %127

127:                                              ; preds = %126, %124
  br label %128

128:                                              ; preds = %127, %116
  %129 = load i64, ptr getelementptr inbounds (%struct._GC_arrays, ptr @GC_arrays, i32 0, i32 34), align 8, !tbaa !29
  %130 = add i64 %129, -1
  store i64 %130, ptr getelementptr inbounds (%struct._GC_arrays, ptr @GC_arrays, i32 0, i32 34), align 8, !tbaa !29
  %131 = load ptr, ptr @GC_object_finalized_proc, align 8, !tbaa !19
  %132 = icmp ne ptr %131, null
  br i1 %132, label %133, label %136

133:                                              ; preds = %128
  %134 = load ptr, ptr @GC_object_finalized_proc, align 8, !tbaa !19
  %135 = load ptr, ptr %4, align 8, !tbaa !19
  call void %134(ptr noundef %135)
  br label %136

136:                                              ; preds = %133, %128
  %137 = load ptr, ptr getelementptr inbounds (%struct.fnlz_roots_s, ptr getelementptr inbounds (%struct._GC_arrays, ptr @GC_arrays, i32 0, i32 37), i32 0, i32 1), align 8, !tbaa !30
  %138 = load ptr, ptr %1, align 8, !tbaa !19
  %139 = getelementptr inbounds %struct.finalizable_object, ptr %138, i32 0, i32 0
  %140 = getelementptr inbounds %struct.hash_chain_entry, ptr %139, i32 0, i32 1
  store ptr %137, ptr %140, align 8, !tbaa !24
  %141 = load i32, ptr @GC_manual_vdb, align 4, !tbaa !16
  %142 = icmp ne i32 %141, 0
  br i1 %142, label %143, label %145

143:                                              ; preds = %136
  %144 = load ptr, ptr %1, align 8, !tbaa !19
  call void @GC_dirty_inner(ptr noundef %144)
  br label %146

145:                                              ; preds = %136
  br label %146

146:                                              ; preds = %145, %143
  %147 = load ptr, ptr %1, align 8, !tbaa !19
  store ptr %147, ptr getelementptr inbounds (%struct.fnlz_roots_s, ptr getelementptr inbounds (%struct._GC_arrays, ptr @GC_arrays, i32 0, i32 37), i32 0, i32 1), align 8, !tbaa !30
  %148 = load ptr, ptr %1, align 8, !tbaa !19
  %149 = getelementptr inbounds %struct.finalizable_object, ptr %148, i32 0, i32 0
  %150 = getelementptr inbounds %struct.hash_chain_entry, ptr %149, i32 0, i32 0
  %151 = load i64, ptr %150, align 8, !tbaa !20
  %152 = xor i64 %151, -1
  %153 = inttoptr i64 %152 to ptr
  %154 = ptrtoint ptr %153 to i64
  %155 = load ptr, ptr %1, align 8, !tbaa !19
  %156 = getelementptr inbounds %struct.finalizable_object, ptr %155, i32 0, i32 0
  %157 = getelementptr inbounds %struct.hash_chain_entry, ptr %156, i32 0, i32 0
  store i64 %154, ptr %157, align 8, !tbaa !20
  %158 = load ptr, ptr %1, align 8, !tbaa !19
  %159 = getelementptr inbounds %struct.finalizable_object, ptr %158, i32 0, i32 3
  %160 = load i64, ptr %159, align 8, !tbaa !31
  %161 = add i64 %160, 48
  %162 = load i64, ptr getelementptr inbounds (%struct._GC_arrays, ptr @GC_arrays, i32 0, i32 11), align 8, !tbaa !28
  %163 = add i64 %162, %161
  store i64 %163, ptr getelementptr inbounds (%struct._GC_arrays, ptr @GC_arrays, i32 0, i32 11), align 8, !tbaa !28
  %164 = load ptr, ptr %3, align 8, !tbaa !19
  store ptr %164, ptr %1, align 8, !tbaa !19
  br label %171

165:                                              ; preds = %77
  %166 = load ptr, ptr %1, align 8, !tbaa !19
  store ptr %166, ptr %2, align 8, !tbaa !19
  %167 = load ptr, ptr %1, align 8, !tbaa !19
  %168 = getelementptr inbounds %struct.finalizable_object, ptr %167, i32 0, i32 0
  %169 = getelementptr inbounds %struct.hash_chain_entry, ptr %168, i32 0, i32 1
  %170 = load ptr, ptr %169, align 8, !tbaa !24
  store ptr %170, ptr %1, align 8, !tbaa !19
  br label %171

171:                                              ; preds = %165, %146
  br label %74, !llvm.loop !32

172:                                              ; preds = %74
  br label %173

173:                                              ; preds = %172
  %174 = load i64, ptr %5, align 8, !tbaa !15
  %175 = add i64 %174, 1
  store i64 %175, ptr %5, align 8, !tbaa !15
  br label %65, !llvm.loop !33

176:                                              ; preds = %65
  %177 = load i32, ptr @GC_java_finalization, align 4, !tbaa !16
  %178 = icmp ne i32 %177, 0
  br i1 %178, label %179, label %312

179:                                              ; preds = %176
  %180 = load ptr, ptr getelementptr inbounds (%struct.fnlz_roots_s, ptr getelementptr inbounds (%struct._GC_arrays, ptr @GC_arrays, i32 0, i32 37), i32 0, i32 1), align 8, !tbaa !30
  store ptr %180, ptr %1, align 8, !tbaa !19
  br label %181

181:                                              ; preds = %209, %179
  %182 = load ptr, ptr %1, align 8, !tbaa !19
  %183 = icmp ne ptr %182, null
  br i1 %183, label %184, label %214

184:                                              ; preds = %181
  %185 = load ptr, ptr %1, align 8, !tbaa !19
  %186 = getelementptr inbounds %struct.finalizable_object, ptr %185, i32 0, i32 0
  %187 = getelementptr inbounds %struct.hash_chain_entry, ptr %186, i32 0, i32 0
  %188 = load i64, ptr %187, align 8, !tbaa !20
  %189 = inttoptr i64 %188 to ptr
  store ptr %189, ptr %4, align 8, !tbaa !19
  %190 = load ptr, ptr %4, align 8, !tbaa !19
  %191 = call i32 @GC_is_marked(ptr noundef %190)
  %192 = icmp ne i32 %191, 0
  br i1 %192, label %208, label %193

193:                                              ; preds = %184
  %194 = load ptr, ptr %1, align 8, !tbaa !19
  %195 = getelementptr inbounds %struct.finalizable_object, ptr %194, i32 0, i32 4
  %196 = load ptr, ptr %195, align 8, !tbaa !23
  %197 = icmp eq ptr %196, @GC_null_finalize_mark_proc
  br i1 %197, label %198, label %200

198:                                              ; preds = %193
  %199 = load ptr, ptr %4, align 8, !tbaa !19
  call void @GC_mark_fo(ptr noundef %199, ptr noundef @GC_normal_finalize_mark_proc)
  br label %200

200:                                              ; preds = %198, %193
  %201 = load ptr, ptr %1, align 8, !tbaa !19
  %202 = getelementptr inbounds %struct.finalizable_object, ptr %201, i32 0, i32 4
  %203 = load ptr, ptr %202, align 8, !tbaa !23
  %204 = icmp ne ptr %203, @GC_unreachable_finalize_mark_proc
  br i1 %204, label %205, label %207

205:                                              ; preds = %200
  %206 = load ptr, ptr %4, align 8, !tbaa !19
  call void @GC_set_mark_bit(ptr noundef %206)
  br label %207

207:                                              ; preds = %205, %200
  br label %208

208:                                              ; preds = %207, %184
  br label %209

209:                                              ; preds = %208
  %210 = load ptr, ptr %1, align 8, !tbaa !19
  %211 = getelementptr inbounds %struct.finalizable_object, ptr %210, i32 0, i32 0
  %212 = getelementptr inbounds %struct.hash_chain_entry, ptr %211, i32 0, i32 1
  %213 = load ptr, ptr %212, align 8, !tbaa !24
  store ptr %213, ptr %1, align 8, !tbaa !19
  br label %181, !llvm.loop !34

214:                                              ; preds = %181
  %215 = load i32, ptr @need_unreachable_finalization, align 4, !tbaa !16
  %216 = icmp ne i32 %215, 0
  br i1 %216, label %217, label %311

217:                                              ; preds = %214
  %218 = load ptr, ptr getelementptr inbounds (%struct.fnlz_roots_s, ptr getelementptr inbounds (%struct._GC_arrays, ptr @GC_arrays, i32 0, i32 37), i32 0, i32 1), align 8, !tbaa !30
  store ptr %218, ptr %1, align 8, !tbaa !19
  store ptr null, ptr %2, align 8, !tbaa !19
  br label %219

219:                                              ; preds = %307, %217
  %220 = load ptr, ptr %1, align 8, !tbaa !19
  %221 = icmp ne ptr %220, null
  br i1 %221, label %222, label %310

222:                                              ; preds = %219
  %223 = load ptr, ptr %1, align 8, !tbaa !19
  %224 = getelementptr inbounds %struct.finalizable_object, ptr %223, i32 0, i32 0
  %225 = getelementptr inbounds %struct.hash_chain_entry, ptr %224, i32 0, i32 1
  %226 = load ptr, ptr %225, align 8, !tbaa !24
  store ptr %226, ptr %3, align 8, !tbaa !19
  %227 = load ptr, ptr %1, align 8, !tbaa !19
  %228 = getelementptr inbounds %struct.finalizable_object, ptr %227, i32 0, i32 4
  %229 = load ptr, ptr %228, align 8, !tbaa !23
  %230 = icmp ne ptr %229, @GC_unreachable_finalize_mark_proc
  br i1 %230, label %231, label %232

231:                                              ; preds = %222
  br label %307

232:                                              ; preds = %222
  %233 = load ptr, ptr %1, align 8, !tbaa !19
  %234 = getelementptr inbounds %struct.finalizable_object, ptr %233, i32 0, i32 0
  %235 = getelementptr inbounds %struct.hash_chain_entry, ptr %234, i32 0, i32 0
  %236 = load i64, ptr %235, align 8, !tbaa !20
  %237 = inttoptr i64 %236 to ptr
  store ptr %237, ptr %4, align 8, !tbaa !19
  %238 = load ptr, ptr %4, align 8, !tbaa !19
  %239 = call i32 @GC_is_marked(ptr noundef %238)
  %240 = icmp ne i32 %239, 0
  br i1 %240, label %243, label %241

241:                                              ; preds = %232
  %242 = load ptr, ptr %4, align 8, !tbaa !19
  call void @GC_set_mark_bit(ptr noundef %242)
  br label %307

243:                                              ; preds = %232
  %244 = load ptr, ptr %2, align 8, !tbaa !19
  %245 = icmp eq ptr null, %244
  br i1 %245, label %246, label %248

246:                                              ; preds = %243
  %247 = load ptr, ptr %3, align 8, !tbaa !19
  store ptr %247, ptr getelementptr inbounds (%struct.fnlz_roots_s, ptr getelementptr inbounds (%struct._GC_arrays, ptr @GC_arrays, i32 0, i32 37), i32 0, i32 1), align 8, !tbaa !30
  br label %259

248:                                              ; preds = %243
  %249 = load ptr, ptr %3, align 8, !tbaa !19
  %250 = load ptr, ptr %2, align 8, !tbaa !19
  %251 = getelementptr inbounds %struct.finalizable_object, ptr %250, i32 0, i32 0
  %252 = getelementptr inbounds %struct.hash_chain_entry, ptr %251, i32 0, i32 1
  store ptr %249, ptr %252, align 8, !tbaa !24
  %253 = load i32, ptr @GC_manual_vdb, align 4, !tbaa !16
  %254 = icmp ne i32 %253, 0
  br i1 %254, label %255, label %257

255:                                              ; preds = %248
  %256 = load ptr, ptr %2, align 8, !tbaa !19
  call void @GC_dirty_inner(ptr noundef %256)
  br label %258

257:                                              ; preds = %248
  br label %258

258:                                              ; preds = %257, %255
  br label %259

259:                                              ; preds = %258, %246
  %260 = load ptr, ptr %4, align 8, !tbaa !19
  %261 = ptrtoint ptr %260 to i64
  %262 = xor i64 %261, -1
  %263 = load ptr, ptr %1, align 8, !tbaa !19
  %264 = getelementptr inbounds %struct.finalizable_object, ptr %263, i32 0, i32 0
  %265 = getelementptr inbounds %struct.hash_chain_entry, ptr %264, i32 0, i32 0
  store i64 %262, ptr %265, align 8, !tbaa !20
  %266 = load ptr, ptr %1, align 8, !tbaa !19
  %267 = getelementptr inbounds %struct.finalizable_object, ptr %266, i32 0, i32 3
  %268 = load i64, ptr %267, align 8, !tbaa !31
  %269 = add i64 %268, 48
  %270 = load i64, ptr getelementptr inbounds (%struct._GC_arrays, ptr @GC_arrays, i32 0, i32 11), align 8, !tbaa !28
  %271 = sub i64 %270, %269
  store i64 %271, ptr getelementptr inbounds (%struct._GC_arrays, ptr @GC_arrays, i32 0, i32 11), align 8, !tbaa !28
  %272 = load ptr, ptr %4, align 8, !tbaa !19
  %273 = ptrtoint ptr %272 to i64
  %274 = lshr i64 %273, 3
  %275 = load ptr, ptr %4, align 8, !tbaa !19
  %276 = ptrtoint ptr %275 to i64
  %277 = load i32, ptr getelementptr inbounds (%struct._GC_arrays, ptr @GC_arrays, i32 0, i32 38), align 8, !tbaa !14
  %278 = add i32 3, %277
  %279 = zext i32 %278 to i64
  %280 = lshr i64 %276, %279
  %281 = xor i64 %274, %280
  %282 = load i32, ptr getelementptr inbounds (%struct._GC_arrays, ptr @GC_arrays, i32 0, i32 38), align 8, !tbaa !14
  %283 = zext i32 %282 to i64
  %284 = shl i64 1, %283
  %285 = sub i64 %284, 1
  %286 = and i64 %281, %285
  store i64 %286, ptr %5, align 8, !tbaa !15
  %287 = load ptr, ptr getelementptr inbounds (%struct._GC_arrays, ptr @GC_arrays, i32 0, i32 37), align 8, !tbaa !5
  %288 = load i64, ptr %5, align 8, !tbaa !15
  %289 = getelementptr inbounds ptr, ptr %287, i64 %288
  %290 = load ptr, ptr %289, align 8, !tbaa !19
  %291 = load ptr, ptr %1, align 8, !tbaa !19
  %292 = getelementptr inbounds %struct.finalizable_object, ptr %291, i32 0, i32 0
  %293 = getelementptr inbounds %struct.hash_chain_entry, ptr %292, i32 0, i32 1
  store ptr %290, ptr %293, align 8, !tbaa !24
  %294 = load i32, ptr @GC_manual_vdb, align 4, !tbaa !16
  %295 = icmp ne i32 %294, 0
  br i1 %295, label %296, label %298

296:                                              ; preds = %259
  %297 = load ptr, ptr %1, align 8, !tbaa !19
  call void @GC_dirty_inner(ptr noundef %297)
  br label %299

298:                                              ; preds = %259
  br label %299

299:                                              ; preds = %298, %296
  %300 = load i64, ptr getelementptr inbounds (%struct._GC_arrays, ptr @GC_arrays, i32 0, i32 34), align 8, !tbaa !29
  %301 = add i64 %300, 1
  store i64 %301, ptr getelementptr inbounds (%struct._GC_arrays, ptr @GC_arrays, i32 0, i32 34), align 8, !tbaa !29
  %302 = load ptr, ptr %1, align 8, !tbaa !19
  %303 = load ptr, ptr getelementptr inbounds (%struct._GC_arrays, ptr @GC_arrays, i32 0, i32 37), align 8, !tbaa !5
  %304 = load i64, ptr %5, align 8, !tbaa !15
  %305 = getelementptr inbounds ptr, ptr %303, i64 %304
  store ptr %302, ptr %305, align 8, !tbaa !19
  %306 = load ptr, ptr %2, align 8, !tbaa !19
  store ptr %306, ptr %1, align 8, !tbaa !19
  store i32 1, ptr %7, align 4, !tbaa !16
  br label %307

307:                                              ; preds = %299, %241, %231
  %308 = load ptr, ptr %1, align 8, !tbaa !19
  store ptr %308, ptr %2, align 8, !tbaa !19
  %309 = load ptr, ptr %3, align 8, !tbaa !19
  store ptr %309, ptr %1, align 8, !tbaa !19
  br label %219, !llvm.loop !35

310:                                              ; preds = %219
  br label %311

311:                                              ; preds = %310, %214
  br label %312

312:                                              ; preds = %311, %176
  %313 = load i32, ptr %7, align 4, !tbaa !16
  %314 = icmp ne i32 %313, 0
  br i1 %314, label %315, label %322

315:                                              ; preds = %312
  %316 = load i32, ptr @GC_manual_vdb, align 4, !tbaa !16
  %317 = icmp ne i32 %316, 0
  br i1 %317, label %318, label %320

318:                                              ; preds = %315
  %319 = load ptr, ptr getelementptr inbounds (%struct._GC_arrays, ptr @GC_arrays, i32 0, i32 37), align 8, !tbaa !5
  call void @GC_dirty_inner(ptr noundef %319)
  br label %321

320:                                              ; preds = %315
  br label %321

321:                                              ; preds = %320, %318
  br label %322

322:                                              ; preds = %321, %312
  call void @GC_make_disappearing_links_disappear(ptr noundef getelementptr inbounds (%struct._GC_arrays, ptr @GC_arrays, i32 0, i32 36), i32 noundef 1)
  call void @GC_clear_togglerefs()
  call void @GC_make_disappearing_links_disappear(ptr noundef getelementptr inbounds (%struct._GC_arrays, ptr @GC_arrays, i32 0, i32 35), i32 noundef 0)
  call void @GC_make_disappearing_links_disappear(ptr noundef getelementptr inbounds (%struct._GC_arrays, ptr @GC_arrays, i32 0, i32 35), i32 noundef 1)
  %323 = load i32, ptr @GC_fail_count, align 4, !tbaa !16
  %324 = icmp ne i32 %323, 0
  br i1 %324, label %325, label %326

325:                                              ; preds = %322
  store i32 0, ptr @GC_finalizer_nested, align 4, !tbaa !16
  br label %326

326:                                              ; preds = %325, %322
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #4
  ret void
}

; Function Attrs: nounwind uwtable
declare hidden void @GC_mark_togglerefs() #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @GC_make_disappearing_links_disappear(ptr noundef, i32 noundef) #3

declare i32 @GC_is_marked(ptr noundef) #1

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @GC_mark_fo(ptr noundef, ptr noundef) #3

declare void @GC_set_mark_bit(ptr noundef) #1

; Function Attrs: nounwind uwtable
declare hidden void @GC_clear_togglerefs() #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 = { inlinehint 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 #4 = { 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, !10, i64 320}
!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 = !{!6, !11, i64 336}
!15 = !{!7, !7, i64 0}
!16 = !{!11, !11, i64 0}
!17 = !{!6, !7, i64 304}
!18 = !{!6, !7, i64 280}
!19 = !{!10, !10, i64 0}
!20 = !{!21, !7, i64 0}
!21 = !{!"finalizable_object", !22, i64 0, !10, i64 16, !10, i64 24, !7, i64 32, !10, i64 40}
!22 = !{!"hash_chain_entry", !7, i64 0, !10, i64 8}
!23 = !{!21, !10, i64 40}
!24 = !{!21, !10, i64 8}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = distinct !{!27, !26}
!28 = !{!6, !7, i64 88}
!29 = !{!6, !7, i64 264}
!30 = !{!6, !10, i64 328}
!31 = !{!21, !7, i64 32}
!32 = distinct !{!32, !26}
!33 = distinct !{!33, !26}
!34 = distinct !{!34, !26}
!35 = distinct !{!35, !26}


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

@GC_arrays = external global %struct._GC_arrays, align 8
@GC_manual_vdb = external local_unnamed_addr global i32, align 4
@GC_object_finalized_proc = external hidden local_unnamed_addr global ptr, align 8
@GC_old_dl_entries = external hidden local_unnamed_addr global i64, align 8
@GC_old_ll_entries = external hidden local_unnamed_addr global i64, align 8
@GC_current_warn_proc = external local_unnamed_addr global ptr, align 8
@.str.12 = external hidden unnamed_addr constant [45 x i8], align 1
@GC_java_finalization = external local_unnamed_addr global i32, align 4
@need_unreachable_finalization = external hidden local_unnamed_addr global i32, align 4
@GC_fail_count = external local_unnamed_addr global i32, align 4
@GC_finalizer_nested = external hidden local_unnamed_addr global i32, align 4

declare void @GC_dirty_inner(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden void @GC_normal_finalize_mark_proc(ptr noundef) #1

; Function Attrs: nounwind uwtable
declare hidden void @GC_null_finalize_mark_proc(ptr noundef) #1

; Function Attrs: nounwind uwtable
declare hidden void @GC_unreachable_finalize_mark_proc(ptr noundef) #1

; Function Attrs: nounwind uwtable
define dso_local void @GC_finalize() local_unnamed_addr #1 {
  %1 = load ptr, ptr getelementptr inbounds (i8, ptr @GC_arrays, i64 320), align 8, !tbaa !5
  %2 = icmp eq ptr %1, null
  %3 = load i32, ptr getelementptr inbounds (i8, ptr @GC_arrays, i64 336), align 8
  %4 = zext nneg i32 %3 to i64
  %5 = shl nuw i64 1, %4
  %6 = load i64, ptr getelementptr inbounds (i8, ptr @GC_arrays, i64 304), align 8, !tbaa !14
  store i64 %6, ptr @GC_old_dl_entries, align 8, !tbaa !15
  %7 = load i64, ptr getelementptr inbounds (i8, ptr @GC_arrays, i64 280), align 8, !tbaa !16
  store i64 %7, ptr @GC_old_ll_entries, align 8, !tbaa !15
  tail call void @GC_mark_togglerefs()
  tail call void @GC_make_disappearing_links_disappear(ptr noundef nonnull getelementptr inbounds (i8, ptr @GC_arrays, i64 296), i32 noundef 0)
  br i1 %2, label %._crit_edge120.thread, label %.lr.ph119

._crit_edge120.thread:                            ; preds = %0
  store i64 0, ptr getelementptr inbounds (i8, ptr @GC_arrays, i64 88), align 8, !tbaa !17
  br label %._crit_edge134

.lr.ph119:                                        ; preds = %0, %._crit_edge
  %.077117 = phi i64 [ %22, %._crit_edge ], [ 0, %0 ]
  %8 = load ptr, ptr getelementptr inbounds (i8, ptr @GC_arrays, i64 320), align 8, !tbaa !5
  %9 = getelementptr inbounds ptr, ptr %8, i64 %.077117
  %.071114 = load ptr, ptr %9, align 8, !tbaa !18
  %.not102115 = icmp eq ptr %.071114, null
  br i1 %.not102115, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph119, %20
  %.071116 = phi ptr [ %.071, %20 ], [ %.071114, %.lr.ph119 ]
  %10 = load i64, ptr %.071116, align 8, !tbaa !19
  %11 = xor i64 %10, -1
  %12 = inttoptr i64 %11 to ptr
  %13 = tail call i32 @GC_is_marked(ptr noundef %12) #3
  %.not103 = icmp eq i32 %13, 0
  br i1 %.not103, label %14, label %20

14:                                               ; preds = %.lr.ph
  %15 = getelementptr inbounds i8, ptr %.071116, i64 40
  %16 = load ptr, ptr %15, align 8, !tbaa !22
  tail call void @GC_mark_fo(ptr noundef %12, ptr noundef %16)
  %17 = tail call i32 @GC_is_marked(ptr noundef %12) #3
  %.not104 = icmp eq i32 %17, 0
  br i1 %.not104, label %20, label %18

18:                                               ; preds = %14
  %19 = load ptr, ptr @GC_current_warn_proc, align 8, !tbaa !18
  tail call void %19(ptr noundef nonnull @.str.12, i64 noundef %11) #3
  br label %20

20:                                               ; preds = %.lr.ph, %18, %14
  %21 = getelementptr inbounds i8, ptr %.071116, i64 8
  %.071 = load ptr, ptr %21, align 8, !tbaa !18
  %.not102 = icmp eq ptr %.071, null
  br i1 %.not102, label %._crit_edge, label %.lr.ph, !llvm.loop !23

._crit_edge:                                      ; preds = %20, %.lr.ph119
  %22 = add nuw i64 %.077117, 1
  %exitcond.not = icmp eq i64 %22, %5
  br i1 %exitcond.not, label %._crit_edge120, label %.lr.ph119, !llvm.loop !25

._crit_edge120:                                   ; preds = %._crit_edge
  store i64 0, ptr getelementptr inbounds (i8, ptr @GC_arrays, i64 88), align 8, !tbaa !17
  br i1 %2, label %._crit_edge134, label %.lr.ph133

.lr.ph133:                                        ; preds = %._crit_edge120, %._crit_edge129
  %.0131 = phi i32 [ %.1.lcssa, %._crit_edge129 ], [ 0, %._crit_edge120 ]
  %.178130 = phi i64 [ %75, %._crit_edge129 ], [ 0, %._crit_edge120 ]
  %23 = load ptr, ptr getelementptr inbounds (i8, ptr @GC_arrays, i64 320), align 8, !tbaa !5
  %24 = getelementptr inbounds ptr, ptr %23, i64 %.178130
  %25 = load ptr, ptr %24, align 8, !tbaa !18
  %.not94121 = icmp eq ptr %25, null
  br i1 %.not94121, label %._crit_edge129, label %.lr.ph128

.lr.ph128:                                        ; preds = %.lr.ph133, %74
  %.1126 = phi i32 [ %.3, %74 ], [ %.0131, %.lr.ph133 ]
  %.172125 = phi ptr [ %.273, %74 ], [ %25, %.lr.ph133 ]
  %.079122 = phi ptr [ %.180, %74 ], [ null, %.lr.ph133 ]
  %26 = load i64, ptr %.172125, align 8, !tbaa !19
  %27 = xor i64 %26, -1
  %28 = inttoptr i64 %27 to ptr
  %29 = tail call i32 @GC_is_marked(ptr noundef %28) #3
  %.not95 = icmp eq i32 %29, 0
  br i1 %.not95, label %30, label %71

30:                                               ; preds = %.lr.ph128
  %31 = load i32, ptr @GC_java_finalization, align 4, !tbaa !26
  %.not96 = icmp eq i32 %31, 0
  br i1 %.not96, label %32, label %33

32:                                               ; preds = %30
  tail call void @GC_set_mark_bit(ptr noundef %28) #3
  br label %33

33:                                               ; preds = %32, %30
  %34 = getelementptr inbounds i8, ptr %.172125, i64 8
  %35 = load ptr, ptr %34, align 8, !tbaa !27
  %36 = icmp eq ptr %.079122, null
  br i1 %36, label %37, label %50

37:                                               ; preds = %33
  %38 = load ptr, ptr getelementptr inbounds (i8, ptr @GC_arrays, i64 320), align 8, !tbaa !5
  %39 = getelementptr inbounds ptr, ptr %38, i64 %.178130
  store ptr %35, ptr %39, align 8, !tbaa !18
  %40 = load ptr, ptr @GC_object_finalized_proc, align 8, !tbaa !18
  %.not98 = icmp eq ptr %40, null
  br i1 %.not98, label %.thread, label %43

.thread:                                          ; preds = %37
  %41 = load i64, ptr getelementptr inbounds (i8, ptr @GC_arrays, i64 264), align 8, !tbaa !28
  %42 = add i64 %41, -1
  store i64 %42, ptr getelementptr inbounds (i8, ptr @GC_arrays, i64 264), align 8, !tbaa !28
  br label %59

43:                                               ; preds = %37
  %44 = load i32, ptr @GC_manual_vdb, align 4, !tbaa !26
  %.not99 = icmp eq i32 %44, 0
  br i1 %.not99, label %.thread108, label %47

.thread108:                                       ; preds = %43
  %45 = load i64, ptr getelementptr inbounds (i8, ptr @GC_arrays, i64 264), align 8, !tbaa !28
  %46 = add i64 %45, -1
  store i64 %46, ptr getelementptr inbounds (i8, ptr @GC_arrays, i64 264), align 8, !tbaa !28
  br label %57

47:                                               ; preds = %43
  %48 = load ptr, ptr getelementptr inbounds (i8, ptr @GC_arrays, i64 320), align 8, !tbaa !5
  %49 = getelementptr inbounds ptr, ptr %48, i64 %.178130
  tail call void @GC_dirty_inner(ptr noundef %49) #3
  br label %54

50:                                               ; preds = %33
  %51 = getelementptr inbounds i8, ptr %.079122, i64 8
  store ptr %35, ptr %51, align 8, !tbaa !27
  %52 = load i32, ptr @GC_manual_vdb, align 4, !tbaa !26
  %.not97 = icmp eq i32 %52, 0
  br i1 %.not97, label %54, label %53

53:                                               ; preds = %50
  tail call void @GC_dirty_inner(ptr noundef nonnull %.079122) #3
  br label %54

54:                                               ; preds = %53, %50, %47
  %.pr = load ptr, ptr @GC_object_finalized_proc, align 8, !tbaa !18
  %55 = load i64, ptr getelementptr inbounds (i8, ptr @GC_arrays, i64 264), align 8, !tbaa !28
  %56 = add i64 %55, -1
  store i64 %56, ptr getelementptr inbounds (i8, ptr @GC_arrays, i64 264), align 8, !tbaa !28
  %.not100 = icmp eq ptr %.pr, null
  br i1 %.not100, label %59, label %57

57:                                               ; preds = %.thread108, %54
  %58 = phi ptr [ %40, %.thread108 ], [ %.pr, %54 ]
  tail call void %58(ptr noundef %28) #3
  br label %59

59:                                               ; preds = %.thread, %57, %54
  %.2107 = phi i32 [ 1, %.thread ], [ %.1126, %57 ], [ %.1126, %54 ]
  %60 = load ptr, ptr getelementptr inbounds (i8, ptr @GC_arrays, i64 328), align 8, !tbaa !29
  store ptr %60, ptr %34, align 8, !tbaa !27
  %61 = load i32, ptr @GC_manual_vdb, align 4, !tbaa !26
  %.not101 = icmp eq i32 %61, 0
  br i1 %.not101, label %63, label %62

62:                                               ; preds = %59
  tail call void @GC_dirty_inner(ptr noundef nonnull %.172125) #3
  br label %63

63:                                               ; preds = %59, %62
  store ptr %.172125, ptr getelementptr inbounds (i8, ptr @GC_arrays, i64 328), align 8, !tbaa !29
  %64 = load i64, ptr %.172125, align 8, !tbaa !19
  %65 = xor i64 %64, -1
  store i64 %65, ptr %.172125, align 8, !tbaa !19
  %66 = getelementptr inbounds i8, ptr %.172125, i64 32
  %67 = load i64, ptr %66, align 8, !tbaa !30
  %68 = add i64 %67, 48
  %69 = load i64, ptr getelementptr inbounds (i8, ptr @GC_arrays, i64 88), align 8, !tbaa !17
  %70 = add i64 %68, %69
  store i64 %70, ptr getelementptr inbounds (i8, ptr @GC_arrays, i64 88), align 8, !tbaa !17
  br label %74

71:                                               ; preds = %.lr.ph128
  %72 = getelementptr inbounds i8, ptr %.172125, i64 8
  %73 = load ptr, ptr %72, align 8, !tbaa !27
  br label %74

74:                                               ; preds = %71, %63
  %.180 = phi ptr [ %.172125, %71 ], [ %.079122, %63 ]
  %.273 = phi ptr [ %73, %71 ], [ %35, %63 ]
  %.3 = phi i32 [ %.1126, %71 ], [ %.2107, %63 ]
  %.not94 = icmp eq ptr %.273, null
  br i1 %.not94, label %._crit_edge129, label %.lr.ph128, !llvm.loop !31

._crit_edge129:                                   ; preds = %74, %.lr.ph133
  %.1.lcssa = phi i32 [ %.0131, %.lr.ph133 ], [ %.3, %74 ]
  %75 = add nuw i64 %.178130, 1
  %exitcond152.not = icmp eq i64 %75, %5
  br i1 %exitcond152.not, label %._crit_edge134, label %.lr.ph133, !llvm.loop !32

._crit_edge134:                                   ; preds = %._crit_edge129, %._crit_edge120.thread, %._crit_edge120
  %.0.lcssa = phi i32 [ 0, %._crit_edge120 ], [ 0, %._crit_edge120.thread ], [ %.1.lcssa, %._crit_edge129 ]
  %76 = load i32, ptr @GC_java_finalization, align 4, !tbaa !26
  %.not = icmp eq i32 %76, 0
  %.374136 = load ptr, ptr getelementptr inbounds (i8, ptr @GC_arrays, i64 328), align 8
  %.not84137 = icmp eq ptr %.374136, null
  %or.cond157 = select i1 %.not, i1 true, i1 %.not84137
  br i1 %or.cond157, label %.loopexit, label %.lr.ph139

.lr.ph139:                                        ; preds = %._crit_edge134, %88
  %.374138 = phi ptr [ %.374, %88 ], [ %.374136, %._crit_edge134 ]
  %77 = load i64, ptr %.374138, align 8, !tbaa !19
  %78 = inttoptr i64 %77 to ptr
  %79 = tail call i32 @GC_is_marked(ptr noundef %78) #3
  %.not92 = icmp eq i32 %79, 0
  br i1 %.not92, label %80, label %88

80:                                               ; preds = %.lr.ph139
  %81 = getelementptr inbounds i8, ptr %.374138, i64 40
  %82 = load ptr, ptr %81, align 8, !tbaa !22
  %83 = icmp eq ptr %82, @GC_null_finalize_mark_proc
  br i1 %83, label %84, label %85

84:                                               ; preds = %80
  tail call void @GC_mark_fo(ptr noundef %78, ptr noundef nonnull @GC_normal_finalize_mark_proc)
  %.pr112 = load ptr, ptr %81, align 8, !tbaa !22
  br label %85

85:                                               ; preds = %84, %80
  %86 = phi ptr [ %.pr112, %84 ], [ %82, %80 ]
  %.not93 = icmp eq ptr %86, @GC_unreachable_finalize_mark_proc
  br i1 %.not93, label %88, label %87

87:                                               ; preds = %85
  tail call void @GC_set_mark_bit(ptr noundef %78) #3
  br label %88

88:                                               ; preds = %.lr.ph139, %87, %85
  %89 = getelementptr inbounds i8, ptr %.374138, i64 8
  %.374 = load ptr, ptr %89, align 8, !tbaa !18
  %.not84 = icmp eq ptr %.374, null
  br i1 %.not84, label %._crit_edge140, label %.lr.ph139, !llvm.loop !33

._crit_edge140:                                   ; preds = %88
  %.pre = load ptr, ptr getelementptr inbounds (i8, ptr @GC_arrays, i64 328), align 8
  %90 = load i32, ptr @need_unreachable_finalization, align 4, !tbaa !26
  %.not85 = icmp eq i32 %90, 0
  %.not86141 = icmp eq ptr %.pre, null
  %or.cond148 = select i1 %.not85, i1 true, i1 %.not86141
  br i1 %or.cond148, label %.loopexit, label %.lr.ph146

.lr.ph146:                                        ; preds = %._crit_edge140, %132
  %.4144 = phi i32 [ %.5, %132 ], [ %.0.lcssa, %._crit_edge140 ]
  %.475143 = phi ptr [ %92, %132 ], [ %.pre, %._crit_edge140 ]
  %.281142 = phi ptr [ %.576, %132 ], [ null, %._crit_edge140 ]
  %91 = getelementptr inbounds i8, ptr %.475143, i64 8
  %92 = load ptr, ptr %91, align 8, !tbaa !27
  %93 = getelementptr inbounds i8, ptr %.475143, i64 40
  %94 = load ptr, ptr %93, align 8, !tbaa !22
  %.not88 = icmp eq ptr %94, @GC_unreachable_finalize_mark_proc
  br i1 %.not88, label %95, label %132

95:                                               ; preds = %.lr.ph146
  %96 = load i64, ptr %.475143, align 8, !tbaa !19
  %97 = inttoptr i64 %96 to ptr
  %98 = tail call i32 @GC_is_marked(ptr noundef %97) #3
  %.not89 = icmp eq i32 %98, 0
  br i1 %.not89, label %99, label %100

99:                                               ; preds = %95
  tail call void @GC_set_mark_bit(ptr noundef %97) #3
  br label %132

100:                                              ; preds = %95
  %101 = icmp eq ptr %.281142, null
  br i1 %101, label %102, label %103

102:                                              ; preds = %100
  store ptr %92, ptr getelementptr inbounds (i8, ptr @GC_arrays, i64 328), align 8, !tbaa !29
  br label %107

103:                                              ; preds = %100
  %104 = getelementptr inbounds i8, ptr %.281142, i64 8
  store ptr %92, ptr %104, align 8, !tbaa !27
  %105 = load i32, ptr @GC_manual_vdb, align 4, !tbaa !26
  %.not90 = icmp eq i32 %105, 0
  br i1 %.not90, label %107, label %106

106:                                              ; preds = %103
  tail call void @GC_dirty_inner(ptr noundef nonnull %.281142) #3
  br label %107

107:                                              ; preds = %106, %103, %102
  %108 = xor i64 %96, -1
  store i64 %108, ptr %.475143, align 8, !tbaa !19
  %109 = getelementptr inbounds i8, ptr %.475143, i64 32
  %110 = load i64, ptr %109, align 8, !tbaa !30
  %111 = load i64, ptr getelementptr inbounds (i8, ptr @GC_arrays, i64 88), align 8, !tbaa !17
  %reass.sub = sub i64 %111, %110
  %112 = add i64 %reass.sub, -48
  store i64 %112, ptr getelementptr inbounds (i8, ptr @GC_arrays, i64 88), align 8, !tbaa !17
  %113 = lshr i64 %96, 3
  %114 = load i32, ptr getelementptr inbounds (i8, ptr @GC_arrays, i64 336), align 8, !tbaa !34
  %115 = add i32 %114, 3
  %116 = zext nneg i32 %115 to i64
  %117 = lshr i64 %96, %116
  %118 = xor i64 %117, %113
  %119 = zext nneg i32 %114 to i64
  %notmask = shl nsw i64 -1, %119
  %120 = xor i64 %notmask, -1
  %121 = and i64 %118, %120
  %122 = load ptr, ptr getelementptr inbounds (i8, ptr @GC_arrays, i64 320), align 8, !tbaa !5
  %123 = getelementptr inbounds ptr, ptr %122, i64 %121
  %124 = load ptr, ptr %123, align 8, !tbaa !18
  store ptr %124, ptr %91, align 8, !tbaa !27
  %125 = load i32, ptr @GC_manual_vdb, align 4, !tbaa !26
  %.not91 = icmp eq i32 %125, 0
  br i1 %.not91, label %127, label %126

126:                                              ; preds = %107
  tail call void @GC_dirty_inner(ptr noundef nonnull %.475143) #3
  %.pre153 = load ptr, ptr getelementptr inbounds (i8, ptr @GC_arrays, i64 320), align 8, !tbaa !5
  br label %127

127:                                              ; preds = %107, %126
  %128 = phi ptr [ %122, %107 ], [ %.pre153, %126 ]
  %129 = load i64, ptr getelementptr inbounds (i8, ptr @GC_arrays, i64 264), align 8, !tbaa !28
  %130 = add i64 %129, 1
  store i64 %130, ptr getelementptr inbounds (i8, ptr @GC_arrays, i64 264), align 8, !tbaa !28
  %131 = getelementptr inbounds ptr, ptr %128, i64 %121
  store ptr %.475143, ptr %131, align 8, !tbaa !18
  br label %132

132:                                              ; preds = %.lr.ph146, %127, %99
  %.576 = phi ptr [ %.475143, %.lr.ph146 ], [ %.281142, %127 ], [ %.475143, %99 ]
  %.5 = phi i32 [ %.4144, %.lr.ph146 ], [ 1, %127 ], [ %.4144, %99 ]
  %.not86 = icmp eq ptr %92, null
  br i1 %.not86, label %.loopexit, label %.lr.ph146, !llvm.loop !35

.loopexit:                                        ; preds = %132, %._crit_edge140, %._crit_edge134
  %.6 = phi i32 [ %.0.lcssa, %._crit_edge140 ], [ %.0.lcssa, %._crit_edge134 ], [ %.5, %132 ]
  %133 = icmp ne i32 %.6, 0
  %134 = load i32, ptr @GC_manual_vdb, align 4
  %135 = icmp ne i32 %134, 0
  %or.cond = select i1 %133, i1 %135, i1 false
  br i1 %or.cond, label %136, label %138

136:                                              ; preds = %.loopexit
  %137 = load ptr, ptr getelementptr inbounds (i8, ptr @GC_arrays, i64 320), align 8, !tbaa !5
  tail call void @GC_dirty_inner(ptr noundef %137) #3
  br label %138

138:                                              ; preds = %136, %.loopexit
  tail call void @GC_make_disappearing_links_disappear(ptr noundef nonnull getelementptr inbounds (i8, ptr @GC_arrays, i64 296), i32 noundef 1)
  tail call void @GC_clear_togglerefs()
  tail call void @GC_make_disappearing_links_disappear(ptr noundef nonnull getelementptr inbounds (i8, ptr @GC_arrays, i64 272), i32 noundef 0)
  tail call void @GC_make_disappearing_links_disappear(ptr noundef nonnull getelementptr inbounds (i8, ptr @GC_arrays, i64 272), i32 noundef 1)
  %139 = load i32, ptr @GC_fail_count, align 4, !tbaa !26
  %.not87 = icmp eq i32 %139, 0
  br i1 %.not87, label %141, label %140

140:                                              ; preds = %138
  store i32 0, ptr @GC_finalizer_nested, align 4, !tbaa !26
  br label %141

141:                                              ; preds = %140, %138
  ret void
}

; Function Attrs: nounwind uwtable
declare hidden void @GC_mark_togglerefs() local_unnamed_addr #1

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @GC_make_disappearing_links_disappear(ptr noundef, i32 noundef) local_unnamed_addr #2

declare i32 @GC_is_marked(ptr noundef) local_unnamed_addr #0

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @GC_mark_fo(ptr noundef, ptr noundef) local_unnamed_addr #2

declare void @GC_set_mark_bit(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden void @GC_clear_togglerefs() 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 = { inlinehint 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, !10, i64 320}
!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 = !{!6, !7, i64 304}
!15 = !{!7, !7, i64 0}
!16 = !{!6, !7, i64 280}
!17 = !{!6, !7, i64 88}
!18 = !{!10, !10, i64 0}
!19 = !{!20, !7, i64 0}
!20 = !{!"finalizable_object", !21, i64 0, !10, i64 16, !10, i64 24, !7, i64 32, !10, i64 40}
!21 = !{!"hash_chain_entry", !7, i64 0, !10, i64 8}
!22 = !{!20, !10, i64 40}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}
!25 = distinct !{!25, !24}
!26 = !{!11, !11, i64 0}
!27 = !{!20, !10, i64 8}
!28 = !{!6, !7, i64 264}
!29 = !{!6, !10, i64 328}
!30 = !{!20, !7, i64 32}
!31 = distinct !{!31, !24}
!32 = distinct !{!32, !24}
!33 = distinct !{!33, !24}
!34 = !{!6, !11, i64 336}
!35 = distinct !{!35, !24}


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