; LLVM IR from brewlin/garbage-collect :: gc-python (gc)

; 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.list = type { ptr }
%struct.pool_header = type { %union.anon, ptr, ptr, ptr, i32, i32, i32, i32 }
%union.anon = type { ptr }
%struct.arena_object = type { i64, ptr, ptr, i32, i32, ptr, ptr, ptr }

@usedpools = external dso_local global [64 x ptr], align 16
@arenas = external dso_local global ptr, align 8
@usable_arenas = external dso_local global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [72 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [11 x i8], align 1
@__PRETTY_FUNCTION__.Malloc = external hidden unnamed_addr constant [21 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [89 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [123 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [72 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [43 x i8], align 1
@Hugmem = external dso_local global %struct.list, align 8

; Function Attrs: nounwind uwtable
declare dso_local ptr @new_arena() #0

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #2

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

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #3

; Function Attrs: nounwind uwtable
define dso_local ptr @Malloc(i64 noundef %0) #0 {
  %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 ptr, align 8
  %10 = alloca ptr, align 8
  store i64 %0, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  %11 = load i64, ptr %3, align 8, !tbaa !5
  %12 = icmp ugt i64 %11, 2147483647
  br i1 %12, label %13, label %14

13:                                               ; preds = %1
  store ptr null, ptr %2, align 8
  store i32 1, ptr %8, align 4
  br label %378

14:                                               ; preds = %1
  %15 = load i64, ptr %3, align 8, !tbaa !5
  %16 = sub i64 %15, 1
  %17 = icmp ult i64 %16, 256
  br i1 %17, label %18, label %365

18:                                               ; preds = %14
  %19 = load i64, ptr %3, align 8, !tbaa !5
  %20 = sub i64 %19, 1
  %21 = trunc i64 %20 to i32
  %22 = lshr i32 %21, 3
  store i32 %22, ptr %7, align 4, !tbaa !9
  %23 = load i32, ptr %7, align 4, !tbaa !9
  %24 = load i32, ptr %7, align 4, !tbaa !9
  %25 = add i32 %23, %24
  %26 = zext i32 %25 to i64
  %27 = getelementptr inbounds [64 x ptr], ptr @usedpools, i64 0, i64 %26
  %28 = load ptr, ptr %27, align 8, !tbaa !11
  store ptr %28, ptr %5, align 8, !tbaa !11
  %29 = load ptr, ptr %5, align 8, !tbaa !11
  %30 = load ptr, ptr %5, align 8, !tbaa !11
  %31 = getelementptr inbounds %struct.pool_header, ptr %30, i32 0, i32 2
  %32 = load ptr, ptr %31, align 8, !tbaa !13
  %33 = icmp ne ptr %29, %32
  br i1 %33, label %34, label %102

34:                                               ; preds = %18
  %35 = load ptr, ptr %5, align 8, !tbaa !11
  %36 = getelementptr inbounds %struct.pool_header, ptr %35, i32 0, i32 0
  %37 = load i32, ptr %36, align 8, !tbaa !15
  %38 = add i32 %37, 1
  store i32 %38, ptr %36, align 8, !tbaa !15
  %39 = load ptr, ptr %5, align 8, !tbaa !11
  %40 = getelementptr inbounds %struct.pool_header, ptr %39, i32 0, i32 1
  %41 = load ptr, ptr %40, align 8, !tbaa !16
  store ptr %41, ptr %4, align 8, !tbaa !11
  %42 = load ptr, ptr %4, align 8, !tbaa !11
  %43 = icmp eq ptr %42, null
  br i1 %43, label %44, label %57

44:                                               ; preds = %34
  %45 = load ptr, ptr %5, align 8, !tbaa !11
  %46 = getelementptr inbounds %struct.pool_header, ptr %45, i32 0, i32 2
  %47 = load ptr, ptr %46, align 8, !tbaa !13
  store ptr %47, ptr %6, align 8, !tbaa !11
  %48 = load ptr, ptr %5, align 8, !tbaa !11
  %49 = getelementptr inbounds %struct.pool_header, ptr %48, i32 0, i32 3
  %50 = load ptr, ptr %49, align 8, !tbaa !17
  store ptr %50, ptr %5, align 8, !tbaa !11
  %51 = load ptr, ptr %5, align 8, !tbaa !11
  %52 = load ptr, ptr %6, align 8, !tbaa !11
  %53 = getelementptr inbounds %struct.pool_header, ptr %52, i32 0, i32 3
  store ptr %51, ptr %53, align 8, !tbaa !17
  %54 = load ptr, ptr %6, align 8, !tbaa !11
  %55 = load ptr, ptr %5, align 8, !tbaa !11
  %56 = getelementptr inbounds %struct.pool_header, ptr %55, i32 0, i32 2
  store ptr %54, ptr %56, align 8, !tbaa !13
  br label %103

57:                                               ; preds = %34
  %58 = load ptr, ptr %4, align 8, !tbaa !11
  %59 = icmp ne ptr %58, null
  br i1 %59, label %60, label %61

60:                                               ; preds = %57
  br label %62

61:                                               ; preds = %57
  call void @__assert_fail(ptr noundef @.str.6, ptr noundef @.str.1, i32 noundef 150, ptr noundef @__PRETTY_FUNCTION__.Malloc) #6
  unreachable

62:                                               ; preds = %60
  %63 = load ptr, ptr %4, align 8, !tbaa !11
  %64 = getelementptr inbounds i8, ptr %63, i64 8
  %65 = load ptr, ptr %64, align 8, !tbaa !11
  %66 = load ptr, ptr %5, align 8, !tbaa !11
  %67 = getelementptr inbounds %struct.pool_header, ptr %66, i32 0, i32 1
  store ptr %65, ptr %67, align 8, !tbaa !16
  %68 = icmp ne ptr %65, null
  br i1 %68, label %69, label %71

69:                                               ; preds = %62
  %70 = load ptr, ptr %4, align 8, !tbaa !11
  store ptr %70, ptr %2, align 8
  store i32 1, ptr %8, align 4
  br label %378

71:                                               ; preds = %62
  %72 = load ptr, ptr %5, align 8, !tbaa !11
  %73 = getelementptr inbounds %struct.pool_header, ptr %72, i32 0, i32 6
  %74 = load i32, ptr %73, align 8, !tbaa !18
  %75 = load ptr, ptr %5, align 8, !tbaa !11
  %76 = getelementptr inbounds %struct.pool_header, ptr %75, i32 0, i32 7
  %77 = load i32, ptr %76, align 4, !tbaa !19
  %78 = icmp ule i32 %74, %77
  br i1 %78, label %79, label %100

79:                                               ; preds = %71
  %80 = load ptr, ptr %5, align 8, !tbaa !11
  %81 = load ptr, ptr %5, align 8, !tbaa !11
  %82 = getelementptr inbounds %struct.pool_header, ptr %81, i32 0, i32 6
  %83 = load i32, ptr %82, align 8, !tbaa !18
  %84 = zext i32 %83 to i64
  %85 = getelementptr inbounds i8, ptr %80, i64 %84
  %86 = load ptr, ptr %5, align 8, !tbaa !11
  %87 = getelementptr inbounds %struct.pool_header, ptr %86, i32 0, i32 1
  store ptr %85, ptr %87, align 8, !tbaa !16
  %88 = load i32, ptr %7, align 4, !tbaa !9
  %89 = add i32 %88, 1
  %90 = shl i32 %89, 3
  %91 = load ptr, ptr %5, align 8, !tbaa !11
  %92 = getelementptr inbounds %struct.pool_header, ptr %91, i32 0, i32 6
  %93 = load i32, ptr %92, align 8, !tbaa !18
  %94 = add i32 %93, %90
  store i32 %94, ptr %92, align 8, !tbaa !18
  %95 = load ptr, ptr %5, align 8, !tbaa !11
  %96 = getelementptr inbounds %struct.pool_header, ptr %95, i32 0, i32 1
  %97 = load ptr, ptr %96, align 8, !tbaa !16
  %98 = getelementptr inbounds i8, ptr %97, i64 8
  store ptr null, ptr %98, align 8, !tbaa !11
  %99 = load ptr, ptr %4, align 8, !tbaa !11
  store ptr %99, ptr %2, align 8
  store i32 1, ptr %8, align 4
  br label %378

100:                                              ; preds = %71
  call void (...) @gc()
  %101 = load ptr, ptr %4, align 8, !tbaa !11
  store ptr %101, ptr %2, align 8
  store i32 1, ptr %8, align 4
  br label %378

102:                                              ; preds = %18
  br label %103

103:                                              ; preds = %102, %44
  %104 = load ptr, ptr @usable_arenas, align 8, !tbaa !11
  %105 = icmp eq ptr %104, null
  br i1 %105, label %106, label %116

106:                                              ; preds = %103
  %107 = call ptr @new_arena()
  store ptr %107, ptr @usable_arenas, align 8, !tbaa !11
  %108 = load ptr, ptr @usable_arenas, align 8, !tbaa !11
  %109 = icmp eq ptr %108, null
  br i1 %109, label %110, label %111

110:                                              ; preds = %106
  br label %366

111:                                              ; preds = %106
  %112 = load ptr, ptr @usable_arenas, align 8, !tbaa !11
  %113 = getelementptr inbounds %struct.arena_object, ptr %112, i32 0, i32 7
  store ptr null, ptr %113, align 8, !tbaa !20
  %114 = load ptr, ptr @usable_arenas, align 8, !tbaa !11
  %115 = getelementptr inbounds %struct.arena_object, ptr %114, i32 0, i32 6
  store ptr null, ptr %115, align 8, !tbaa !22
  br label %116

116:                                              ; preds = %111, %103
  %117 = load ptr, ptr @usable_arenas, align 8, !tbaa !11
  %118 = getelementptr inbounds %struct.arena_object, ptr %117, i32 0, i32 0
  %119 = load i64, ptr %118, align 8, !tbaa !23
  %120 = icmp ne i64 %119, 0
  br i1 %120, label %121, label %122

121:                                              ; preds = %116
  br label %123

122:                                              ; preds = %116
  call void @__assert_fail(ptr noundef @.str.7, ptr noundef @.str.1, i32 noundef 196, ptr noundef @__PRETTY_FUNCTION__.Malloc) #6
  unreachable

123:                                              ; preds = %121
  %124 = load ptr, ptr @usable_arenas, align 8, !tbaa !11
  %125 = getelementptr inbounds %struct.arena_object, ptr %124, i32 0, i32 5
  %126 = load ptr, ptr %125, align 8, !tbaa !24
  store ptr %126, ptr %5, align 8, !tbaa !11
  %127 = load ptr, ptr %5, align 8, !tbaa !11
  %128 = icmp ne ptr %127, null
  br i1 %128, label %129, label %269

129:                                              ; preds = %123
  %130 = load ptr, ptr %5, align 8, !tbaa !11
  %131 = getelementptr inbounds %struct.pool_header, ptr %130, i32 0, i32 2
  %132 = load ptr, ptr %131, align 8, !tbaa !13
  %133 = load ptr, ptr @usable_arenas, align 8, !tbaa !11
  %134 = getelementptr inbounds %struct.arena_object, ptr %133, i32 0, i32 5
  store ptr %132, ptr %134, align 8, !tbaa !24
  %135 = load ptr, ptr @usable_arenas, align 8, !tbaa !11
  %136 = getelementptr inbounds %struct.arena_object, ptr %135, i32 0, i32 3
  %137 = load i32, ptr %136, align 8, !tbaa !25
  %138 = add i32 %137, -1
  store i32 %138, ptr %136, align 8, !tbaa !25
  %139 = load ptr, ptr @usable_arenas, align 8, !tbaa !11
  %140 = getelementptr inbounds %struct.arena_object, ptr %139, i32 0, i32 3
  %141 = load i32, ptr %140, align 8, !tbaa !25
  %142 = icmp eq i32 %141, 0
  br i1 %142, label %143, label %182

143:                                              ; preds = %129
  %144 = load ptr, ptr @usable_arenas, align 8, !tbaa !11
  %145 = getelementptr inbounds %struct.arena_object, ptr %144, i32 0, i32 5
  %146 = load ptr, ptr %145, align 8, !tbaa !24
  %147 = icmp eq ptr %146, null
  br i1 %147, label %148, label %149

148:                                              ; preds = %143
  br label %150

149:                                              ; preds = %143
  call void @__assert_fail(ptr noundef @.str.8, ptr noundef @.str.1, i32 noundef 208, ptr noundef @__PRETTY_FUNCTION__.Malloc) #6
  unreachable

150:                                              ; preds = %148
  %151 = load ptr, ptr @usable_arenas, align 8, !tbaa !11
  %152 = getelementptr inbounds %struct.arena_object, ptr %151, i32 0, i32 6
  %153 = load ptr, ptr %152, align 8, !tbaa !22
  %154 = icmp eq ptr %153, null
  br i1 %154, label %163, label %155

155:                                              ; preds = %150
  %156 = load ptr, ptr @usable_arenas, align 8, !tbaa !11
  %157 = getelementptr inbounds %struct.arena_object, ptr %156, i32 0, i32 6
  %158 = load ptr, ptr %157, align 8, !tbaa !22
  %159 = getelementptr inbounds %struct.arena_object, ptr %158, i32 0, i32 7
  %160 = load ptr, ptr %159, align 8, !tbaa !20
  %161 = load ptr, ptr @usable_arenas, align 8, !tbaa !11
  %162 = icmp eq ptr %160, %161
  br i1 %162, label %163, label %164

163:                                              ; preds = %155, %150
  br label %165

164:                                              ; preds = %155
  call void @__assert_fail(ptr noundef @.str.9, ptr noundef @.str.1, i32 noundef 211, ptr noundef @__PRETTY_FUNCTION__.Malloc) #6
  unreachable

165:                                              ; preds = %163
  %166 = load ptr, ptr @usable_arenas, align 8, !tbaa !11
  %167 = getelementptr inbounds %struct.arena_object, ptr %166, i32 0, i32 6
  %168 = load ptr, ptr %167, align 8, !tbaa !22
  store ptr %168, ptr @usable_arenas, align 8, !tbaa !11
  %169 = load ptr, ptr @usable_arenas, align 8, !tbaa !11
  %170 = icmp ne ptr %169, null
  br i1 %170, label %171, label %181

171:                                              ; preds = %165
  %172 = load ptr, ptr @usable_arenas, align 8, !tbaa !11
  %173 = getelementptr inbounds %struct.arena_object, ptr %172, i32 0, i32 7
  store ptr null, ptr %173, align 8, !tbaa !20
  %174 = load ptr, ptr @usable_arenas, align 8, !tbaa !11
  %175 = getelementptr inbounds %struct.arena_object, ptr %174, i32 0, i32 0
  %176 = load i64, ptr %175, align 8, !tbaa !23
  %177 = icmp ne i64 %176, 0
  br i1 %177, label %178, label %179

178:                                              ; preds = %171
  br label %180

179:                                              ; preds = %171
  call void @__assert_fail(ptr noundef @.str.7, ptr noundef @.str.1, i32 noundef 216, ptr noundef @__PRETTY_FUNCTION__.Malloc) #6
  unreachable

180:                                              ; preds = %178
  br label %181

181:                                              ; preds = %180, %165
  br label %201

182:                                              ; preds = %129
  %183 = load ptr, ptr @usable_arenas, align 8, !tbaa !11
  %184 = getelementptr inbounds %struct.arena_object, ptr %183, i32 0, i32 5
  %185 = load ptr, ptr %184, align 8, !tbaa !24
  %186 = icmp ne ptr %185, null
  br i1 %186, label %198, label %187

187:                                              ; preds = %182
  %188 = load ptr, ptr @usable_arenas, align 8, !tbaa !11
  %189 = getelementptr inbounds %struct.arena_object, ptr %188, i32 0, i32 2
  %190 = load ptr, ptr %189, align 8, !tbaa !26
  %191 = load ptr, ptr @usable_arenas, align 8, !tbaa !11
  %192 = getelementptr inbounds %struct.arena_object, ptr %191, i32 0, i32 0
  %193 = load i64, ptr %192, align 8, !tbaa !23
  %194 = inttoptr i64 %193 to ptr
  %195 = getelementptr inbounds i8, ptr %194, i64 262144
  %196 = getelementptr inbounds i8, ptr %195, i64 -4096
  %197 = icmp ule ptr %190, %196
  br i1 %197, label %198, label %199

198:                                              ; preds = %187, %182
  br label %200

199:                                              ; preds = %187
  call void @__assert_fail(ptr noundef @.str.10, ptr noundef @.str.1, i32 noundef 224, ptr noundef @__PRETTY_FUNCTION__.Malloc) #6
  unreachable

200:                                              ; preds = %198
  br label %201

201:                                              ; preds = %200, %181
  br label %202

202:                                              ; preds = %364, %201
  %203 = load i32, ptr %7, align 4, !tbaa !9
  %204 = load i32, ptr %7, align 4, !tbaa !9
  %205 = add i32 %203, %204
  %206 = zext i32 %205 to i64
  %207 = getelementptr inbounds [64 x ptr], ptr @usedpools, i64 0, i64 %206
  %208 = load ptr, ptr %207, align 8, !tbaa !11
  store ptr %208, ptr %6, align 8, !tbaa !11
  %209 = load ptr, ptr %6, align 8, !tbaa !11
  %210 = load ptr, ptr %5, align 8, !tbaa !11
  %211 = getelementptr inbounds %struct.pool_header, ptr %210, i32 0, i32 2
  store ptr %209, ptr %211, align 8, !tbaa !13
  %212 = load ptr, ptr %6, align 8, !tbaa !11
  %213 = load ptr, ptr %5, align 8, !tbaa !11
  %214 = getelementptr inbounds %struct.pool_header, ptr %213, i32 0, i32 3
  store ptr %212, ptr %214, align 8, !tbaa !17
  %215 = load ptr, ptr %5, align 8, !tbaa !11
  %216 = load ptr, ptr %6, align 8, !tbaa !11
  %217 = getelementptr inbounds %struct.pool_header, ptr %216, i32 0, i32 2
  store ptr %215, ptr %217, align 8, !tbaa !13
  %218 = load ptr, ptr %5, align 8, !tbaa !11
  %219 = load ptr, ptr %6, align 8, !tbaa !11
  %220 = getelementptr inbounds %struct.pool_header, ptr %219, i32 0, i32 3
  store ptr %218, ptr %220, align 8, !tbaa !17
  %221 = load ptr, ptr %5, align 8, !tbaa !11
  %222 = getelementptr inbounds %struct.pool_header, ptr %221, i32 0, i32 0
  store i32 1, ptr %222, align 8, !tbaa !15
  %223 = load ptr, ptr %5, align 8, !tbaa !11
  %224 = getelementptr inbounds %struct.pool_header, ptr %223, i32 0, i32 5
  %225 = load i32, ptr %224, align 4, !tbaa !27
  %226 = load i32, ptr %7, align 4, !tbaa !9
  %227 = icmp eq i32 %225, %226
  br i1 %227, label %228, label %238

228:                                              ; preds = %202
  %229 = load ptr, ptr %5, align 8, !tbaa !11
  %230 = getelementptr inbounds %struct.pool_header, ptr %229, i32 0, i32 1
  %231 = load ptr, ptr %230, align 8, !tbaa !16
  store ptr %231, ptr %4, align 8, !tbaa !11
  %232 = load ptr, ptr %4, align 8, !tbaa !11
  %233 = getelementptr inbounds i8, ptr %232, i64 8
  %234 = load ptr, ptr %233, align 8, !tbaa !11
  %235 = load ptr, ptr %5, align 8, !tbaa !11
  %236 = getelementptr inbounds %struct.pool_header, ptr %235, i32 0, i32 1
  store ptr %234, ptr %236, align 8, !tbaa !16
  %237 = load ptr, ptr %4, align 8, !tbaa !11
  store ptr %237, ptr %2, align 8
  store i32 1, ptr %8, align 4
  br label %378

238:                                              ; preds = %202
  %239 = load i32, ptr %7, align 4, !tbaa !9
  %240 = load ptr, ptr %5, align 8, !tbaa !11
  %241 = getelementptr inbounds %struct.pool_header, ptr %240, i32 0, i32 5
  store i32 %239, ptr %241, align 4, !tbaa !27
  %242 = load i32, ptr %7, align 4, !tbaa !9
  %243 = add i32 %242, 1
  %244 = shl i32 %243, 3
  store i32 %244, ptr %7, align 4, !tbaa !9
  %245 = load ptr, ptr %5, align 8, !tbaa !11
  %246 = getelementptr inbounds i8, ptr %245, i64 48
  store ptr %246, ptr %4, align 8, !tbaa !11
  %247 = load i32, ptr %7, align 4, !tbaa !9
  %248 = shl i32 %247, 1
  %249 = zext i32 %248 to i64
  %250 = add i64 48, %249
  %251 = trunc i64 %250 to i32
  %252 = load ptr, ptr %5, align 8, !tbaa !11
  %253 = getelementptr inbounds %struct.pool_header, ptr %252, i32 0, i32 6
  store i32 %251, ptr %253, align 8, !tbaa !18
  %254 = load i32, ptr %7, align 4, !tbaa !9
  %255 = sub i32 4096, %254
  %256 = load ptr, ptr %5, align 8, !tbaa !11
  %257 = getelementptr inbounds %struct.pool_header, ptr %256, i32 0, i32 7
  store i32 %255, ptr %257, align 4, !tbaa !19
  %258 = load ptr, ptr %4, align 8, !tbaa !11
  %259 = load i32, ptr %7, align 4, !tbaa !9
  %260 = zext i32 %259 to i64
  %261 = getelementptr inbounds i8, ptr %258, i64 %260
  %262 = load ptr, ptr %5, align 8, !tbaa !11
  %263 = getelementptr inbounds %struct.pool_header, ptr %262, i32 0, i32 1
  store ptr %261, ptr %263, align 8, !tbaa !16
  %264 = load ptr, ptr %5, align 8, !tbaa !11
  %265 = getelementptr inbounds %struct.pool_header, ptr %264, i32 0, i32 1
  %266 = load ptr, ptr %265, align 8, !tbaa !16
  %267 = getelementptr inbounds i8, ptr %266, i64 8
  store ptr null, ptr %267, align 8, !tbaa !11
  %268 = load ptr, ptr %4, align 8, !tbaa !11
  store ptr %268, ptr %2, align 8
  store i32 1, ptr %8, align 4
  br label %378

269:                                              ; preds = %123
  %270 = load ptr, ptr @usable_arenas, align 8, !tbaa !11
  %271 = getelementptr inbounds %struct.arena_object, ptr %270, i32 0, i32 3
  %272 = load i32, ptr %271, align 8, !tbaa !25
  %273 = icmp ugt i32 %272, 0
  br i1 %273, label %274, label %275

274:                                              ; preds = %269
  br label %276

275:                                              ; preds = %269
  call void @__assert_fail(ptr noundef @.str.11, ptr noundef @.str.1, i32 noundef 259, ptr noundef @__PRETTY_FUNCTION__.Malloc) #6
  unreachable

276:                                              ; preds = %274
  %277 = load ptr, ptr @usable_arenas, align 8, !tbaa !11
  %278 = getelementptr inbounds %struct.arena_object, ptr %277, i32 0, i32 5
  %279 = load ptr, ptr %278, align 8, !tbaa !24
  %280 = icmp eq ptr %279, null
  br i1 %280, label %281, label %282

281:                                              ; preds = %276
  br label %283

282:                                              ; preds = %276
  call void @__assert_fail(ptr noundef @.str.8, ptr noundef @.str.1, i32 noundef 260, ptr noundef @__PRETTY_FUNCTION__.Malloc) #6
  unreachable

283:                                              ; preds = %281
  %284 = load ptr, ptr @usable_arenas, align 8, !tbaa !11
  %285 = getelementptr inbounds %struct.arena_object, ptr %284, i32 0, i32 2
  %286 = load ptr, ptr %285, align 8, !tbaa !26
  store ptr %286, ptr %5, align 8, !tbaa !11
  %287 = load ptr, ptr %5, align 8, !tbaa !11
  %288 = load ptr, ptr @usable_arenas, align 8, !tbaa !11
  %289 = getelementptr inbounds %struct.arena_object, ptr %288, i32 0, i32 0
  %290 = load i64, ptr %289, align 8, !tbaa !23
  %291 = inttoptr i64 %290 to ptr
  %292 = getelementptr inbounds i8, ptr %291, i64 262144
  %293 = getelementptr inbounds i8, ptr %292, i64 -4096
  %294 = icmp ule ptr %287, %293
  br i1 %294, label %295, label %296

295:                                              ; preds = %283
  br label %297

296:                                              ; preds = %283
  call void @__assert_fail(ptr noundef @.str.12, ptr noundef @.str.1, i32 noundef 264, ptr noundef @__PRETTY_FUNCTION__.Malloc) #6
  unreachable

297:                                              ; preds = %295
  %298 = load ptr, ptr @usable_arenas, align 8, !tbaa !11
  %299 = load ptr, ptr @arenas, align 8, !tbaa !11
  %300 = ptrtoint ptr %298 to i64
  %301 = ptrtoint ptr %299 to i64
  %302 = sub i64 %300, %301
  %303 = sdiv exact i64 %302, 56
  %304 = trunc i64 %303 to i32
  %305 = load ptr, ptr %5, align 8, !tbaa !11
  %306 = getelementptr inbounds %struct.pool_header, ptr %305, i32 0, i32 4
  store i32 %304, ptr %306, align 8, !tbaa !28
  %307 = load ptr, ptr @arenas, align 8, !tbaa !11
  %308 = load ptr, ptr %5, align 8, !tbaa !11
  %309 = getelementptr inbounds %struct.pool_header, ptr %308, i32 0, i32 4
  %310 = load i32, ptr %309, align 8, !tbaa !28
  %311 = zext i32 %310 to i64
  %312 = getelementptr inbounds %struct.arena_object, ptr %307, i64 %311
  %313 = load ptr, ptr @usable_arenas, align 8, !tbaa !11
  %314 = icmp eq ptr %312, %313
  br i1 %314, label %315, label %316

315:                                              ; preds = %297
  br label %317

316:                                              ; preds = %297
  call void @__assert_fail(ptr noundef @.str.13, ptr noundef @.str.1, i32 noundef 266, ptr noundef @__PRETTY_FUNCTION__.Malloc) #6
  unreachable

317:                                              ; preds = %315
  %318 = load ptr, ptr %5, align 8, !tbaa !11
  %319 = getelementptr inbounds %struct.pool_header, ptr %318, i32 0, i32 5
  store i32 65535, ptr %319, align 4, !tbaa !27
  %320 = load ptr, ptr @usable_arenas, align 8, !tbaa !11
  %321 = getelementptr inbounds %struct.arena_object, ptr %320, i32 0, i32 2
  %322 = load ptr, ptr %321, align 8, !tbaa !26
  %323 = getelementptr inbounds i8, ptr %322, i64 4096
  store ptr %323, ptr %321, align 8, !tbaa !26
  %324 = load ptr, ptr @usable_arenas, align 8, !tbaa !11
  %325 = getelementptr inbounds %struct.arena_object, ptr %324, i32 0, i32 3
  %326 = load i32, ptr %325, align 8, !tbaa !25
  %327 = add i32 %326, -1
  store i32 %327, ptr %325, align 8, !tbaa !25
  %328 = load ptr, ptr @usable_arenas, align 8, !tbaa !11
  %329 = getelementptr inbounds %struct.arena_object, ptr %328, i32 0, i32 3
  %330 = load i32, ptr %329, align 8, !tbaa !25
  %331 = icmp eq i32 %330, 0
  br i1 %331, label %332, label %364

332:                                              ; preds = %317
  %333 = load ptr, ptr @usable_arenas, align 8, !tbaa !11
  %334 = getelementptr inbounds %struct.arena_object, ptr %333, i32 0, i32 6
  %335 = load ptr, ptr %334, align 8, !tbaa !22
  %336 = icmp eq ptr %335, null
  br i1 %336, label %345, label %337

337:                                              ; preds = %332
  %338 = load ptr, ptr @usable_arenas, align 8, !tbaa !11
  %339 = getelementptr inbounds %struct.arena_object, ptr %338, i32 0, i32 6
  %340 = load ptr, ptr %339, align 8, !tbaa !22
  %341 = getelementptr inbounds %struct.arena_object, ptr %340, i32 0, i32 7
  %342 = load ptr, ptr %341, align 8, !tbaa !20
  %343 = load ptr, ptr @usable_arenas, align 8, !tbaa !11
  %344 = icmp eq ptr %342, %343
  br i1 %344, label %345, label %346

345:                                              ; preds = %337, %332
  br label %347

346:                                              ; preds = %337
  call void @__assert_fail(ptr noundef @.str.9, ptr noundef @.str.1, i32 noundef 275, ptr noundef @__PRETTY_FUNCTION__.Malloc) #6
  unreachable

347:                                              ; preds = %345
  %348 = load ptr, ptr @usable_arenas, align 8, !tbaa !11
  %349 = getelementptr inbounds %struct.arena_object, ptr %348, i32 0, i32 6
  %350 = load ptr, ptr %349, align 8, !tbaa !22
  store ptr %350, ptr @usable_arenas, align 8, !tbaa !11
  %351 = load ptr, ptr @usable_arenas, align 8, !tbaa !11
  %352 = icmp ne ptr %351, null
  br i1 %352, label %353, label %363

353:                                              ; preds = %347
  %354 = load ptr, ptr @usable_arenas, align 8, !tbaa !11
  %355 = getelementptr inbounds %struct.arena_object, ptr %354, i32 0, i32 7
  store ptr null, ptr %355, align 8, !tbaa !20
  %356 = load ptr, ptr @usable_arenas, align 8, !tbaa !11
  %357 = getelementptr inbounds %struct.arena_object, ptr %356, i32 0, i32 0
  %358 = load i64, ptr %357, align 8, !tbaa !23
  %359 = icmp ne i64 %358, 0
  br i1 %359, label %360, label %361

360:                                              ; preds = %353
  br label %362

361:                                              ; preds = %353
  call void @__assert_fail(ptr noundef @.str.7, ptr noundef @.str.1, i32 noundef 281, ptr noundef @__PRETTY_FUNCTION__.Malloc) #6
  unreachable

362:                                              ; preds = %360
  br label %363

363:                                              ; preds = %362, %347
  br label %364

364:                                              ; preds = %363, %317
  br label %202

365:                                              ; preds = %14
  br label %366

366:                                              ; preds = %365, %110
  %367 = load i64, ptr %3, align 8, !tbaa !5
  %368 = icmp eq i64 %367, 0
  br i1 %368, label %369, label %370

369:                                              ; preds = %366
  store i64 1, ptr %3, align 8, !tbaa !5
  br label %370

370:                                              ; preds = %369, %366
  %371 = load i64, ptr %3, align 8, !tbaa !5
  %372 = call noalias ptr @malloc(i64 noundef %371) #7
  store ptr %372, ptr %10, align 8, !tbaa !11
  %373 = load ptr, ptr %10, align 8, !tbaa !11
  %374 = getelementptr inbounds i8, ptr %373, i64 8
  %375 = load i64, ptr %3, align 8, !tbaa !5
  %376 = trunc i64 %375 to i32
  call void @push(ptr noundef @Hugmem, ptr noundef %374, i32 noundef %376)
  %377 = load ptr, ptr %10, align 8, !tbaa !11
  store ptr %377, ptr %2, align 8
  store i32 1, ptr %8, align 4
  br label %378

378:                                              ; preds = %370, %238, %228, %100, %79, %69, %13
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  %379 = load ptr, ptr %2, align 8
  ret ptr %379
}

declare void @gc(...) #4

declare void @push(ptr noundef, ptr noundef, i32 noundef) #4

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

!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 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = !{!14, !12, i64 16}
!14 = !{!"pool_header", !7, i64 0, !12, i64 8, !12, i64 16, !12, i64 24, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 44}
!15 = !{!7, !7, i64 0}
!16 = !{!14, !12, i64 8}
!17 = !{!14, !12, i64 24}
!18 = !{!14, !10, i64 40}
!19 = !{!14, !10, i64 44}
!20 = !{!21, !12, i64 48}
!21 = !{!"arena_object", !6, i64 0, !12, i64 8, !12, i64 16, !10, i64 24, !10, i64 28, !12, i64 32, !12, i64 40, !12, i64 48}
!22 = !{!21, !12, i64 40}
!23 = !{!21, !6, i64 0}
!24 = !{!21, !12, i64 32}
!25 = !{!21, !10, i64 24}
!26 = !{!21, !12, i64 16}
!27 = !{!14, !10, i64 36}
!28 = !{!14, !10, i64 32}


; 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.list = type { ptr }
%struct.arena_object = type { i64, ptr, ptr, i32, i32, ptr, ptr, ptr }

@usedpools = external dso_local local_unnamed_addr global [64 x ptr], align 16
@arenas = external dso_local local_unnamed_addr global ptr, align 8
@usable_arenas = external dso_local local_unnamed_addr global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [72 x i8], align 1
@__PRETTY_FUNCTION__.Malloc = external hidden unnamed_addr constant [21 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [89 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [123 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [72 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [43 x i8], align 1
@Hugmem = external dso_local global %struct.list, align 8

; Function Attrs: nounwind uwtable
declare dso_local ptr @new_arena() local_unnamed_addr #0

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local ptr @Malloc(i64 noundef %0) local_unnamed_addr #0 {
  %2 = icmp ugt i64 %0, 2147483647
  br i1 %2, label %155, label %3

3:                                                ; preds = %1
  %4 = add nsw i64 %0, -1
  %5 = icmp ult i64 %4, 256
  br i1 %5, label %6, label %151

6:                                                ; preds = %3
  %7 = trunc nuw nsw i64 %4 to i32
  %8 = lshr i32 %7, 3
  %9 = shl nuw nsw i32 %8, 1
  %10 = zext nneg i32 %9 to i64
  %11 = getelementptr inbounds [64 x ptr], ptr @usedpools, i64 0, i64 %10
  %12 = load ptr, ptr %11, align 16, !tbaa !5
  %13 = getelementptr inbounds i8, ptr %12, i64 16
  %14 = load ptr, ptr %13, align 8, !tbaa !9
  %.not = icmp eq ptr %12, %14
  br i1 %.not, label %42, label %15

15:                                               ; preds = %6
  %16 = load i32, ptr %12, align 8, !tbaa !12
  %17 = add i32 %16, 1
  store i32 %17, ptr %12, align 8, !tbaa !12
  %18 = getelementptr inbounds i8, ptr %12, i64 8
  %19 = load ptr, ptr %18, align 8, !tbaa !13
  %20 = icmp eq ptr %19, null
  br i1 %20, label %21, label %26

21:                                               ; preds = %15
  %22 = getelementptr inbounds i8, ptr %12, i64 24
  %23 = load ptr, ptr %22, align 8, !tbaa !14
  %24 = getelementptr inbounds i8, ptr %14, i64 24
  store ptr %23, ptr %24, align 8, !tbaa !14
  %25 = getelementptr inbounds i8, ptr %23, i64 16
  store ptr %14, ptr %25, align 8, !tbaa !9
  br label %42

26:                                               ; preds = %15
  %27 = getelementptr inbounds i8, ptr %19, i64 8
  %28 = load ptr, ptr %27, align 8, !tbaa !5
  store ptr %28, ptr %18, align 8, !tbaa !13
  %.not86 = icmp eq ptr %28, null
  br i1 %.not86, label %29, label %155

29:                                               ; preds = %26
  %30 = getelementptr inbounds i8, ptr %12, i64 40
  %31 = load i32, ptr %30, align 8, !tbaa !15
  %32 = getelementptr inbounds i8, ptr %12, i64 44
  %33 = load i32, ptr %32, align 4, !tbaa !16
  %.not87 = icmp ugt i32 %31, %33
  br i1 %.not87, label %41, label %34

34:                                               ; preds = %29
  %35 = zext i32 %31 to i64
  %36 = getelementptr inbounds i8, ptr %12, i64 %35
  store ptr %36, ptr %18, align 8, !tbaa !13
  %37 = and i32 %7, 248
  %38 = add nuw nsw i32 %37, 8
  %39 = add i32 %38, %31
  store i32 %39, ptr %30, align 8, !tbaa !15
  %40 = getelementptr inbounds i8, ptr %36, i64 8
  store ptr null, ptr %40, align 8, !tbaa !5
  br label %155

41:                                               ; preds = %29
  tail call void (...) @gc() #6
  br label %155

42:                                               ; preds = %6, %21
  %43 = load ptr, ptr @usable_arenas, align 8, !tbaa !5
  %44 = icmp eq ptr %43, null
  br i1 %44, label %45, label %50

45:                                               ; preds = %42
  %46 = tail call ptr @new_arena()
  store ptr %46, ptr @usable_arenas, align 8, !tbaa !5
  %47 = icmp eq ptr %46, null
  br i1 %47, label %151, label %48

48:                                               ; preds = %45
  %49 = getelementptr inbounds i8, ptr %46, i64 40
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %49, i8 0, i64 16, i1 false)
  br label %50

50:                                               ; preds = %48, %42
  %51 = phi ptr [ %46, %48 ], [ %43, %42 ]
  %52 = load i64, ptr %51, align 8, !tbaa !17
  %.not88 = icmp eq i64 %52, 0
  br i1 %.not88, label %53, label %54

53:                                               ; preds = %50
  tail call void @__assert_fail(ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.1, i32 noundef 196, ptr noundef nonnull @__PRETTY_FUNCTION__.Malloc) #7
  unreachable

54:                                               ; preds = %50
  %55 = getelementptr inbounds i8, ptr %51, i64 32
  %56 = load ptr, ptr %55, align 8, !tbaa !20
  %.not89 = icmp eq ptr %56, null
  br i1 %.not89, label %112, label %57

57:                                               ; preds = %54
  %58 = getelementptr inbounds i8, ptr %56, i64 16
  %59 = load ptr, ptr %58, align 8, !tbaa !9
  store ptr %59, ptr %55, align 8, !tbaa !20
  %60 = getelementptr inbounds i8, ptr %51, i64 24
  %61 = load i32, ptr %60, align 8, !tbaa !21
  %62 = add i32 %61, -1
  store i32 %62, ptr %60, align 8, !tbaa !21
  %63 = icmp eq i32 %62, 0
  %64 = icmp eq ptr %59, null
  br i1 %63, label %65, label %79

65:                                               ; preds = %57
  br i1 %64, label %67, label %66

66:                                               ; preds = %65
  tail call void @__assert_fail(ptr noundef nonnull @.str.8, ptr noundef nonnull @.str.1, i32 noundef 208, ptr noundef nonnull @__PRETTY_FUNCTION__.Malloc) #7
  unreachable

67:                                               ; preds = %65
  %68 = getelementptr inbounds i8, ptr %51, i64 40
  %69 = load ptr, ptr %68, align 8, !tbaa !22
  %70 = icmp eq ptr %69, null
  br i1 %70, label %.sink.split, label %71

71:                                               ; preds = %67
  %72 = getelementptr inbounds i8, ptr %69, i64 48
  %73 = load ptr, ptr %72, align 8, !tbaa !23
  %74 = icmp eq ptr %73, %51
  br i1 %74, label %76, label %75

75:                                               ; preds = %71
  tail call void @__assert_fail(ptr noundef nonnull @.str.9, ptr noundef nonnull @.str.1, i32 noundef 211, ptr noundef nonnull @__PRETTY_FUNCTION__.Malloc) #7
  unreachable

76:                                               ; preds = %71
  store ptr %69, ptr @usable_arenas, align 8, !tbaa !5
  store ptr null, ptr %72, align 8, !tbaa !23
  %77 = load i64, ptr %69, align 8, !tbaa !17
  %.not97 = icmp eq i64 %77, 0
  br i1 %.not97, label %78, label %86

78:                                               ; preds = %76
  tail call void @__assert_fail(ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.1, i32 noundef 216, ptr noundef nonnull @__PRETTY_FUNCTION__.Malloc) #7
  unreachable

79:                                               ; preds = %57
  br i1 %64, label %80, label %86

80:                                               ; preds = %79
  %81 = getelementptr inbounds i8, ptr %51, i64 16
  %82 = load ptr, ptr %81, align 8, !tbaa !24
  %83 = inttoptr i64 %52 to ptr
  %84 = getelementptr inbounds i8, ptr %83, i64 258048
  %.not95 = icmp ugt ptr %82, %84
  br i1 %.not95, label %85, label %86

85:                                               ; preds = %80
  tail call void @__assert_fail(ptr noundef nonnull @.str.10, ptr noundef nonnull @.str.1, i32 noundef 224, ptr noundef nonnull @__PRETTY_FUNCTION__.Malloc) #7
  unreachable

.sink.split:                                      ; preds = %67, %139
  %.071.ph = phi ptr [ %118, %139 ], [ %56, %67 ]
  store ptr null, ptr @usable_arenas, align 8, !tbaa !5
  br label %86

86:                                               ; preds = %.sink.split, %134, %148, %76, %79, %80
  %.071 = phi ptr [ %56, %76 ], [ %56, %79 ], [ %56, %80 ], [ %118, %148 ], [ %118, %134 ], [ %.071.ph, %.sink.split ]
  %87 = load ptr, ptr %11, align 16, !tbaa !5
  %88 = getelementptr inbounds i8, ptr %.071, i64 16
  store ptr %87, ptr %88, align 8, !tbaa !9
  %89 = getelementptr inbounds i8, ptr %.071, i64 24
  store ptr %87, ptr %89, align 8, !tbaa !14
  %90 = getelementptr inbounds i8, ptr %87, i64 16
  store ptr %.071, ptr %90, align 8, !tbaa !9
  %91 = getelementptr inbounds i8, ptr %87, i64 24
  store ptr %.071, ptr %91, align 8, !tbaa !14
  store i32 1, ptr %.071, align 8, !tbaa !12
  %92 = getelementptr inbounds i8, ptr %.071, i64 36
  %93 = load i32, ptr %92, align 4, !tbaa !25
  %94 = icmp eq i32 %93, %8
  br i1 %94, label %95, label %100

95:                                               ; preds = %86
  %96 = getelementptr inbounds i8, ptr %.071, i64 8
  %97 = load ptr, ptr %96, align 8, !tbaa !13
  %98 = getelementptr inbounds i8, ptr %97, i64 8
  %99 = load ptr, ptr %98, align 8, !tbaa !5
  store ptr %99, ptr %96, align 8, !tbaa !13
  br label %155

100:                                              ; preds = %86
  store i32 %8, ptr %92, align 4, !tbaa !25
  %101 = and i32 %7, 248
  %102 = add nuw nsw i32 %101, 8
  %103 = getelementptr inbounds i8, ptr %.071, i64 48
  %104 = shl nuw nsw i32 %102, 1
  %narrow = add nuw nsw i32 %104, 48
  %105 = getelementptr inbounds i8, ptr %.071, i64 40
  store i32 %narrow, ptr %105, align 8, !tbaa !15
  %106 = sub nuw nsw i32 4088, %101
  %107 = getelementptr inbounds i8, ptr %.071, i64 44
  store i32 %106, ptr %107, align 4, !tbaa !16
  %108 = zext nneg i32 %102 to i64
  %109 = getelementptr inbounds i8, ptr %103, i64 %108
  %110 = getelementptr inbounds i8, ptr %.071, i64 8
  store ptr %109, ptr %110, align 8, !tbaa !13
  %111 = getelementptr inbounds i8, ptr %109, i64 8
  store ptr null, ptr %111, align 8, !tbaa !5
  br label %155

112:                                              ; preds = %54
  %113 = getelementptr inbounds i8, ptr %51, i64 24
  %114 = load i32, ptr %113, align 8, !tbaa !21
  %.not90 = icmp eq i32 %114, 0
  br i1 %.not90, label %115, label %116

115:                                              ; preds = %112
  tail call void @__assert_fail(ptr noundef nonnull @.str.11, ptr noundef nonnull @.str.1, i32 noundef 259, ptr noundef nonnull @__PRETTY_FUNCTION__.Malloc) #7
  unreachable

116:                                              ; preds = %112
  %117 = getelementptr inbounds i8, ptr %51, i64 16
  %118 = load ptr, ptr %117, align 8, !tbaa !24
  %119 = inttoptr i64 %52 to ptr
  %120 = getelementptr inbounds i8, ptr %119, i64 258048
  %.not91 = icmp ugt ptr %118, %120
  br i1 %.not91, label %121, label %122

121:                                              ; preds = %116
  tail call void @__assert_fail(ptr noundef nonnull @.str.12, ptr noundef nonnull @.str.1, i32 noundef 264, ptr noundef nonnull @__PRETTY_FUNCTION__.Malloc) #7
  unreachable

122:                                              ; preds = %116
  %123 = load ptr, ptr @arenas, align 8, !tbaa !5
  %124 = ptrtoint ptr %51 to i64
  %125 = ptrtoint ptr %123 to i64
  %126 = sub i64 %124, %125
  %127 = sdiv exact i64 %126, 56
  %128 = trunc i64 %127 to i32
  %129 = getelementptr inbounds i8, ptr %118, i64 32
  store i32 %128, ptr %129, align 8, !tbaa !26
  %130 = and i64 %127, 4294967295
  %131 = getelementptr inbounds %struct.arena_object, ptr %123, i64 %130
  %132 = icmp eq ptr %131, %51
  br i1 %132, label %134, label %133

133:                                              ; preds = %122
  tail call void @__assert_fail(ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.1, i32 noundef 266, ptr noundef nonnull @__PRETTY_FUNCTION__.Malloc) #7
  unreachable

134:                                              ; preds = %122
  %135 = getelementptr inbounds i8, ptr %118, i64 36
  store i32 65535, ptr %135, align 4, !tbaa !25
  %136 = getelementptr inbounds i8, ptr %118, i64 4096
  store ptr %136, ptr %117, align 8, !tbaa !24
  %137 = add i32 %114, -1
  store i32 %137, ptr %113, align 8, !tbaa !21
  %138 = icmp eq i32 %137, 0
  br i1 %138, label %139, label %86

139:                                              ; preds = %134
  %140 = getelementptr inbounds i8, ptr %51, i64 40
  %141 = load ptr, ptr %140, align 8, !tbaa !22
  %142 = icmp eq ptr %141, null
  br i1 %142, label %.sink.split, label %143

143:                                              ; preds = %139
  %144 = getelementptr inbounds i8, ptr %141, i64 48
  %145 = load ptr, ptr %144, align 8, !tbaa !23
  %146 = icmp eq ptr %145, %51
  br i1 %146, label %148, label %147

147:                                              ; preds = %143
  tail call void @__assert_fail(ptr noundef nonnull @.str.9, ptr noundef nonnull @.str.1, i32 noundef 275, ptr noundef nonnull @__PRETTY_FUNCTION__.Malloc) #7
  unreachable

148:                                              ; preds = %143
  store ptr %141, ptr @usable_arenas, align 8, !tbaa !5
  store ptr null, ptr %144, align 8, !tbaa !23
  %149 = load i64, ptr %141, align 8, !tbaa !17
  %.not93 = icmp eq i64 %149, 0
  br i1 %.not93, label %150, label %86

150:                                              ; preds = %148
  tail call void @__assert_fail(ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.1, i32 noundef 281, ptr noundef nonnull @__PRETTY_FUNCTION__.Malloc) #7
  unreachable

151:                                              ; preds = %3, %45
  %spec.store.select = tail call i64 @llvm.umax.i64(i64 %0, i64 1)
  %152 = tail call noalias ptr @malloc(i64 noundef %spec.store.select) #8
  %153 = getelementptr inbounds i8, ptr %152, i64 8
  %154 = trunc nuw nsw i64 %spec.store.select to i32
  tail call void @push(ptr noundef nonnull @Hugmem, ptr noundef nonnull %153, i32 noundef %154) #6
  br label %155

155:                                              ; preds = %26, %1, %151, %100, %95, %41, %34
  %.0 = phi ptr [ %152, %151 ], [ %97, %95 ], [ %103, %100 ], [ %19, %34 ], [ %19, %41 ], [ null, %1 ], [ %19, %26 ]
  ret ptr %.0
}

declare void @gc(...) local_unnamed_addr #3

declare void @push(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.umax.i64(i64, i64) #4

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #5

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "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 = { "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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { nounwind }
attributes #7 = { noreturn nounwind }
attributes #8 = { nounwind allocsize(0) }

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

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


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,MemCpyOptPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass