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

; 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.pool_header = type { %union.anon, ptr, ptr, ptr, i32, i32, i32, i32 }
%union.anon = type { ptr }
%struct.arena_object = type { i64, 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 [85 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [11 x i8], align 1
@__PRETTY_FUNCTION__.PyObject_Malloc = external hidden unnamed_addr constant [30 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

; 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 @PyObject_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
  store i64 %0, ptr %3, align 8, !tbaa !5
  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
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  %9 = load i64, ptr %3, align 8, !tbaa !5
  %10 = icmp ugt i64 %9, 2147483647
  br i1 %10, label %11, label %12

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

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

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

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

42:                                               ; preds = %32
  br label %44

43:                                               ; preds = %32
  call void @__assert_fail(ptr noundef @.str.6, ptr noundef @.str.1, i32 noundef 150, ptr noundef @__PRETTY_FUNCTION__.PyObject_Malloc) #5
  unreachable

44:                                               ; preds = %42
  %45 = load ptr, ptr %4, align 8, !tbaa !11
  %46 = load ptr, ptr %45, align 8, !tbaa !11
  %47 = load ptr, ptr %5, align 8, !tbaa !11
  %48 = getelementptr inbounds %struct.pool_header, ptr %47, i32 0, i32 1
  store ptr %46, ptr %48, align 8, !tbaa !16
  %49 = icmp ne ptr %46, null
  br i1 %49, label %50, label %52

50:                                               ; preds = %44
  %51 = load ptr, ptr %4, align 8, !tbaa !11
  store ptr %51, ptr %2, align 8
  store i32 1, ptr %8, align 4
  br label %362

52:                                               ; preds = %44
  %53 = load ptr, ptr %5, align 8, !tbaa !11
  %54 = getelementptr inbounds %struct.pool_header, ptr %53, i32 0, i32 6
  %55 = load i32, ptr %54, align 8, !tbaa !17
  %56 = load ptr, ptr %5, align 8, !tbaa !11
  %57 = getelementptr inbounds %struct.pool_header, ptr %56, i32 0, i32 7
  %58 = load i32, ptr %57, align 4, !tbaa !18
  %59 = icmp ule i32 %55, %58
  br i1 %59, label %60, label %80

60:                                               ; preds = %52
  %61 = load ptr, ptr %5, align 8, !tbaa !11
  %62 = load ptr, ptr %5, align 8, !tbaa !11
  %63 = getelementptr inbounds %struct.pool_header, ptr %62, i32 0, i32 6
  %64 = load i32, ptr %63, align 8, !tbaa !17
  %65 = zext i32 %64 to i64
  %66 = getelementptr inbounds i8, ptr %61, i64 %65
  %67 = load ptr, ptr %5, align 8, !tbaa !11
  %68 = getelementptr inbounds %struct.pool_header, ptr %67, i32 0, i32 1
  store ptr %66, ptr %68, align 8, !tbaa !16
  %69 = load i32, ptr %7, align 4, !tbaa !9
  %70 = add i32 %69, 1
  %71 = shl i32 %70, 3
  %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 !17
  %75 = add i32 %74, %71
  store i32 %75, ptr %73, align 8, !tbaa !17
  %76 = load ptr, ptr %5, align 8, !tbaa !11
  %77 = getelementptr inbounds %struct.pool_header, ptr %76, i32 0, i32 1
  %78 = load ptr, ptr %77, align 8, !tbaa !16
  store ptr null, ptr %78, align 8, !tbaa !11
  %79 = load ptr, ptr %4, align 8, !tbaa !11
  store ptr %79, ptr %2, align 8
  store i32 1, ptr %8, align 4
  br label %362

80:                                               ; preds = %52
  %81 = load ptr, ptr %5, align 8, !tbaa !11
  %82 = getelementptr inbounds %struct.pool_header, ptr %81, i32 0, i32 2
  %83 = load ptr, ptr %82, align 8, !tbaa !13
  store ptr %83, ptr %6, align 8, !tbaa !11
  %84 = load ptr, ptr %5, align 8, !tbaa !11
  %85 = getelementptr inbounds %struct.pool_header, ptr %84, i32 0, i32 3
  %86 = load ptr, ptr %85, align 8, !tbaa !19
  store ptr %86, ptr %5, align 8, !tbaa !11
  %87 = load ptr, ptr %5, align 8, !tbaa !11
  %88 = load ptr, ptr %6, align 8, !tbaa !11
  %89 = getelementptr inbounds %struct.pool_header, ptr %88, i32 0, i32 3
  store ptr %87, ptr %89, align 8, !tbaa !19
  %90 = load ptr, ptr %6, align 8, !tbaa !11
  %91 = load ptr, ptr %5, align 8, !tbaa !11
  %92 = getelementptr inbounds %struct.pool_header, ptr %91, i32 0, i32 2
  store ptr %90, ptr %92, align 8, !tbaa !13
  %93 = load ptr, ptr %4, align 8, !tbaa !11
  store ptr %93, ptr %2, align 8
  store i32 1, ptr %8, align 4
  br label %362

94:                                               ; preds = %16
  %95 = load ptr, ptr @usable_arenas, align 8, !tbaa !11
  %96 = icmp eq ptr %95, null
  br i1 %96, label %97, label %107

97:                                               ; preds = %94
  %98 = call ptr @new_arena()
  store ptr %98, ptr @usable_arenas, align 8, !tbaa !11
  %99 = load ptr, ptr @usable_arenas, align 8, !tbaa !11
  %100 = icmp eq ptr %99, null
  br i1 %100, label %101, label %102

101:                                              ; preds = %97
  br label %355

102:                                              ; preds = %97
  %103 = load ptr, ptr @usable_arenas, align 8, !tbaa !11
  %104 = getelementptr inbounds %struct.arena_object, ptr %103, i32 0, i32 6
  store ptr null, ptr %104, align 8, !tbaa !20
  %105 = load ptr, ptr @usable_arenas, align 8, !tbaa !11
  %106 = getelementptr inbounds %struct.arena_object, ptr %105, i32 0, i32 5
  store ptr null, ptr %106, align 8, !tbaa !22
  br label %107

107:                                              ; preds = %102, %94
  %108 = load ptr, ptr @usable_arenas, align 8, !tbaa !11
  %109 = getelementptr inbounds %struct.arena_object, ptr %108, i32 0, i32 0
  %110 = load i64, ptr %109, align 8, !tbaa !23
  %111 = icmp ne i64 %110, 0
  br i1 %111, label %112, label %113

112:                                              ; preds = %107
  br label %114

113:                                              ; preds = %107
  call void @__assert_fail(ptr noundef @.str.7, ptr noundef @.str.1, i32 noundef 194, ptr noundef @__PRETTY_FUNCTION__.PyObject_Malloc) #5
  unreachable

114:                                              ; preds = %112
  %115 = load ptr, ptr @usable_arenas, align 8, !tbaa !11
  %116 = getelementptr inbounds %struct.arena_object, ptr %115, i32 0, i32 4
  %117 = load ptr, ptr %116, align 8, !tbaa !24
  store ptr %117, ptr %5, align 8, !tbaa !11
  %118 = load ptr, ptr %5, align 8, !tbaa !11
  %119 = icmp ne ptr %118, null
  br i1 %119, label %120, label %258

120:                                              ; preds = %114
  %121 = load ptr, ptr %5, align 8, !tbaa !11
  %122 = getelementptr inbounds %struct.pool_header, ptr %121, i32 0, i32 2
  %123 = load ptr, ptr %122, align 8, !tbaa !13
  %124 = load ptr, ptr @usable_arenas, align 8, !tbaa !11
  %125 = getelementptr inbounds %struct.arena_object, ptr %124, i32 0, i32 4
  store ptr %123, ptr %125, align 8, !tbaa !24
  %126 = load ptr, ptr @usable_arenas, align 8, !tbaa !11
  %127 = getelementptr inbounds %struct.arena_object, ptr %126, i32 0, i32 2
  %128 = load i32, ptr %127, align 8, !tbaa !25
  %129 = add i32 %128, -1
  store i32 %129, ptr %127, align 8, !tbaa !25
  %130 = load ptr, ptr @usable_arenas, align 8, !tbaa !11
  %131 = getelementptr inbounds %struct.arena_object, ptr %130, i32 0, i32 2
  %132 = load i32, ptr %131, align 8, !tbaa !25
  %133 = icmp eq i32 %132, 0
  br i1 %133, label %134, label %173

134:                                              ; preds = %120
  %135 = load ptr, ptr @usable_arenas, align 8, !tbaa !11
  %136 = getelementptr inbounds %struct.arena_object, ptr %135, i32 0, i32 4
  %137 = load ptr, ptr %136, align 8, !tbaa !24
  %138 = icmp eq ptr %137, null
  br i1 %138, label %139, label %140

139:                                              ; preds = %134
  br label %141

140:                                              ; preds = %134
  call void @__assert_fail(ptr noundef @.str.8, ptr noundef @.str.1, i32 noundef 212, ptr noundef @__PRETTY_FUNCTION__.PyObject_Malloc) #5
  unreachable

141:                                              ; preds = %139
  %142 = load ptr, ptr @usable_arenas, align 8, !tbaa !11
  %143 = getelementptr inbounds %struct.arena_object, ptr %142, i32 0, i32 5
  %144 = load ptr, ptr %143, align 8, !tbaa !22
  %145 = icmp eq ptr %144, null
  br i1 %145, label %154, label %146

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

154:                                              ; preds = %146, %141
  br label %156

155:                                              ; preds = %146
  call void @__assert_fail(ptr noundef @.str.9, ptr noundef @.str.1, i32 noundef 215, ptr noundef @__PRETTY_FUNCTION__.PyObject_Malloc) #5
  unreachable

156:                                              ; preds = %154
  %157 = load ptr, ptr @usable_arenas, align 8, !tbaa !11
  %158 = getelementptr inbounds %struct.arena_object, ptr %157, i32 0, i32 5
  %159 = load ptr, ptr %158, align 8, !tbaa !22
  store ptr %159, ptr @usable_arenas, align 8, !tbaa !11
  %160 = load ptr, ptr @usable_arenas, align 8, !tbaa !11
  %161 = icmp ne ptr %160, null
  br i1 %161, label %162, label %172

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

169:                                              ; preds = %162
  br label %171

170:                                              ; preds = %162
  call void @__assert_fail(ptr noundef @.str.7, ptr noundef @.str.1, i32 noundef 220, ptr noundef @__PRETTY_FUNCTION__.PyObject_Malloc) #5
  unreachable

171:                                              ; preds = %169
  br label %172

172:                                              ; preds = %171, %156
  br label %192

173:                                              ; preds = %120
  %174 = load ptr, ptr @usable_arenas, align 8, !tbaa !11
  %175 = getelementptr inbounds %struct.arena_object, ptr %174, i32 0, i32 4
  %176 = load ptr, ptr %175, align 8, !tbaa !24
  %177 = icmp ne ptr %176, null
  br i1 %177, label %189, label %178

178:                                              ; preds = %173
  %179 = load ptr, ptr @usable_arenas, align 8, !tbaa !11
  %180 = getelementptr inbounds %struct.arena_object, ptr %179, i32 0, i32 1
  %181 = load ptr, ptr %180, align 8, !tbaa !26
  %182 = load ptr, ptr @usable_arenas, align 8, !tbaa !11
  %183 = getelementptr inbounds %struct.arena_object, ptr %182, i32 0, i32 0
  %184 = load i64, ptr %183, align 8, !tbaa !23
  %185 = inttoptr i64 %184 to ptr
  %186 = getelementptr inbounds i8, ptr %185, i64 262144
  %187 = getelementptr inbounds i8, ptr %186, i64 -4096
  %188 = icmp ule ptr %181, %187
  br i1 %188, label %189, label %190

189:                                              ; preds = %178, %173
  br label %191

190:                                              ; preds = %178
  call void @__assert_fail(ptr noundef @.str.10, ptr noundef @.str.1, i32 noundef 232, ptr noundef @__PRETTY_FUNCTION__.PyObject_Malloc) #5
  unreachable

191:                                              ; preds = %189
  br label %192

192:                                              ; preds = %191, %172
  br label %193

193:                                              ; preds = %353, %192
  %194 = load i32, ptr %7, align 4, !tbaa !9
  %195 = load i32, ptr %7, align 4, !tbaa !9
  %196 = add i32 %194, %195
  %197 = zext i32 %196 to i64
  %198 = getelementptr inbounds [64 x ptr], ptr @usedpools, i64 0, i64 %197
  %199 = load ptr, ptr %198, align 8, !tbaa !11
  store ptr %199, ptr %6, align 8, !tbaa !11
  %200 = load ptr, ptr %6, align 8, !tbaa !11
  %201 = load ptr, ptr %5, align 8, !tbaa !11
  %202 = getelementptr inbounds %struct.pool_header, ptr %201, i32 0, i32 2
  store ptr %200, ptr %202, align 8, !tbaa !13
  %203 = load ptr, ptr %6, align 8, !tbaa !11
  %204 = load ptr, ptr %5, align 8, !tbaa !11
  %205 = getelementptr inbounds %struct.pool_header, ptr %204, i32 0, i32 3
  store ptr %203, ptr %205, align 8, !tbaa !19
  %206 = load ptr, ptr %5, align 8, !tbaa !11
  %207 = load ptr, ptr %6, align 8, !tbaa !11
  %208 = getelementptr inbounds %struct.pool_header, ptr %207, i32 0, i32 2
  store ptr %206, ptr %208, align 8, !tbaa !13
  %209 = load ptr, ptr %5, align 8, !tbaa !11
  %210 = load ptr, ptr %6, align 8, !tbaa !11
  %211 = getelementptr inbounds %struct.pool_header, ptr %210, i32 0, i32 3
  store ptr %209, ptr %211, align 8, !tbaa !19
  %212 = load ptr, ptr %5, align 8, !tbaa !11
  %213 = getelementptr inbounds %struct.pool_header, ptr %212, i32 0, i32 0
  store i32 1, ptr %213, align 8, !tbaa !15
  %214 = load ptr, ptr %5, align 8, !tbaa !11
  %215 = getelementptr inbounds %struct.pool_header, ptr %214, i32 0, i32 5
  %216 = load i32, ptr %215, align 4, !tbaa !27
  %217 = load i32, ptr %7, align 4, !tbaa !9
  %218 = icmp eq i32 %216, %217
  br i1 %218, label %219, label %228

219:                                              ; preds = %193
  %220 = load ptr, ptr %5, align 8, !tbaa !11
  %221 = getelementptr inbounds %struct.pool_header, ptr %220, i32 0, i32 1
  %222 = load ptr, ptr %221, align 8, !tbaa !16
  store ptr %222, ptr %4, align 8, !tbaa !11
  %223 = load ptr, ptr %4, align 8, !tbaa !11
  %224 = load ptr, ptr %223, align 8, !tbaa !11
  %225 = load ptr, ptr %5, align 8, !tbaa !11
  %226 = getelementptr inbounds %struct.pool_header, ptr %225, i32 0, i32 1
  store ptr %224, ptr %226, align 8, !tbaa !16
  %227 = load ptr, ptr %4, align 8, !tbaa !11
  store ptr %227, ptr %2, align 8
  store i32 1, ptr %8, align 4
  br label %362

228:                                              ; preds = %193
  %229 = load i32, ptr %7, align 4, !tbaa !9
  %230 = load ptr, ptr %5, align 8, !tbaa !11
  %231 = getelementptr inbounds %struct.pool_header, ptr %230, i32 0, i32 5
  store i32 %229, ptr %231, align 4, !tbaa !27
  %232 = load i32, ptr %7, align 4, !tbaa !9
  %233 = add i32 %232, 1
  %234 = shl i32 %233, 3
  store i32 %234, ptr %7, align 4, !tbaa !9
  %235 = load ptr, ptr %5, align 8, !tbaa !11
  %236 = getelementptr inbounds i8, ptr %235, i64 48
  store ptr %236, ptr %4, align 8, !tbaa !11
  %237 = load i32, ptr %7, align 4, !tbaa !9
  %238 = shl i32 %237, 1
  %239 = zext i32 %238 to i64
  %240 = add i64 48, %239
  %241 = trunc i64 %240 to i32
  %242 = load ptr, ptr %5, align 8, !tbaa !11
  %243 = getelementptr inbounds %struct.pool_header, ptr %242, i32 0, i32 6
  store i32 %241, ptr %243, align 8, !tbaa !17
  %244 = load i32, ptr %7, align 4, !tbaa !9
  %245 = sub i32 4096, %244
  %246 = load ptr, ptr %5, align 8, !tbaa !11
  %247 = getelementptr inbounds %struct.pool_header, ptr %246, i32 0, i32 7
  store i32 %245, ptr %247, align 4, !tbaa !18
  %248 = load ptr, ptr %4, align 8, !tbaa !11
  %249 = load i32, ptr %7, align 4, !tbaa !9
  %250 = zext i32 %249 to i64
  %251 = getelementptr inbounds i8, ptr %248, i64 %250
  %252 = load ptr, ptr %5, align 8, !tbaa !11
  %253 = getelementptr inbounds %struct.pool_header, ptr %252, i32 0, i32 1
  store ptr %251, ptr %253, align 8, !tbaa !16
  %254 = load ptr, ptr %5, align 8, !tbaa !11
  %255 = getelementptr inbounds %struct.pool_header, ptr %254, i32 0, i32 1
  %256 = load ptr, ptr %255, align 8, !tbaa !16
  store ptr null, ptr %256, align 8, !tbaa !11
  %257 = load ptr, ptr %4, align 8, !tbaa !11
  store ptr %257, ptr %2, align 8
  store i32 1, ptr %8, align 4
  br label %362

258:                                              ; preds = %114
  %259 = load ptr, ptr @usable_arenas, align 8, !tbaa !11
  %260 = getelementptr inbounds %struct.arena_object, ptr %259, i32 0, i32 2
  %261 = load i32, ptr %260, align 8, !tbaa !25
  %262 = icmp ugt i32 %261, 0
  br i1 %262, label %263, label %264

263:                                              ; preds = %258
  br label %265

264:                                              ; preds = %258
  call void @__assert_fail(ptr noundef @.str.11, ptr noundef @.str.1, i32 noundef 269, ptr noundef @__PRETTY_FUNCTION__.PyObject_Malloc) #5
  unreachable

265:                                              ; preds = %263
  %266 = load ptr, ptr @usable_arenas, align 8, !tbaa !11
  %267 = getelementptr inbounds %struct.arena_object, ptr %266, i32 0, i32 4
  %268 = load ptr, ptr %267, align 8, !tbaa !24
  %269 = icmp eq ptr %268, null
  br i1 %269, label %270, label %271

270:                                              ; preds = %265
  br label %272

271:                                              ; preds = %265
  call void @__assert_fail(ptr noundef @.str.8, ptr noundef @.str.1, i32 noundef 270, ptr noundef @__PRETTY_FUNCTION__.PyObject_Malloc) #5
  unreachable

272:                                              ; preds = %270
  %273 = load ptr, ptr @usable_arenas, align 8, !tbaa !11
  %274 = getelementptr inbounds %struct.arena_object, ptr %273, i32 0, i32 1
  %275 = load ptr, ptr %274, align 8, !tbaa !26
  store ptr %275, ptr %5, align 8, !tbaa !11
  %276 = load ptr, ptr %5, align 8, !tbaa !11
  %277 = load ptr, ptr @usable_arenas, align 8, !tbaa !11
  %278 = getelementptr inbounds %struct.arena_object, ptr %277, i32 0, i32 0
  %279 = load i64, ptr %278, align 8, !tbaa !23
  %280 = inttoptr i64 %279 to ptr
  %281 = getelementptr inbounds i8, ptr %280, i64 262144
  %282 = getelementptr inbounds i8, ptr %281, i64 -4096
  %283 = icmp ule ptr %276, %282
  br i1 %283, label %284, label %285

284:                                              ; preds = %272
  br label %286

285:                                              ; preds = %272
  call void @__assert_fail(ptr noundef @.str.12, ptr noundef @.str.1, i32 noundef 274, ptr noundef @__PRETTY_FUNCTION__.PyObject_Malloc) #5
  unreachable

286:                                              ; preds = %284
  %287 = load ptr, ptr @usable_arenas, align 8, !tbaa !11
  %288 = load ptr, ptr @arenas, align 8, !tbaa !11
  %289 = ptrtoint ptr %287 to i64
  %290 = ptrtoint ptr %288 to i64
  %291 = sub i64 %289, %290
  %292 = sdiv exact i64 %291, 48
  %293 = trunc i64 %292 to i32
  %294 = load ptr, ptr %5, align 8, !tbaa !11
  %295 = getelementptr inbounds %struct.pool_header, ptr %294, i32 0, i32 4
  store i32 %293, ptr %295, align 8, !tbaa !28
  %296 = load ptr, ptr @arenas, align 8, !tbaa !11
  %297 = load ptr, ptr %5, align 8, !tbaa !11
  %298 = getelementptr inbounds %struct.pool_header, ptr %297, i32 0, i32 4
  %299 = load i32, ptr %298, align 8, !tbaa !28
  %300 = zext i32 %299 to i64
  %301 = getelementptr inbounds %struct.arena_object, ptr %296, i64 %300
  %302 = load ptr, ptr @usable_arenas, align 8, !tbaa !11
  %303 = icmp eq ptr %301, %302
  br i1 %303, label %304, label %305

304:                                              ; preds = %286
  br label %306

305:                                              ; preds = %286
  call void @__assert_fail(ptr noundef @.str.13, ptr noundef @.str.1, i32 noundef 276, ptr noundef @__PRETTY_FUNCTION__.PyObject_Malloc) #5
  unreachable

306:                                              ; preds = %304
  %307 = load ptr, ptr %5, align 8, !tbaa !11
  %308 = getelementptr inbounds %struct.pool_header, ptr %307, i32 0, i32 5
  store i32 65535, ptr %308, align 4, !tbaa !27
  %309 = load ptr, ptr @usable_arenas, align 8, !tbaa !11
  %310 = getelementptr inbounds %struct.arena_object, ptr %309, i32 0, i32 1
  %311 = load ptr, ptr %310, align 8, !tbaa !26
  %312 = getelementptr inbounds i8, ptr %311, i64 4096
  store ptr %312, ptr %310, align 8, !tbaa !26
  %313 = load ptr, ptr @usable_arenas, align 8, !tbaa !11
  %314 = getelementptr inbounds %struct.arena_object, ptr %313, i32 0, i32 2
  %315 = load i32, ptr %314, align 8, !tbaa !25
  %316 = add i32 %315, -1
  store i32 %316, ptr %314, align 8, !tbaa !25
  %317 = load ptr, ptr @usable_arenas, align 8, !tbaa !11
  %318 = getelementptr inbounds %struct.arena_object, ptr %317, i32 0, i32 2
  %319 = load i32, ptr %318, align 8, !tbaa !25
  %320 = icmp eq i32 %319, 0
  br i1 %320, label %321, label %353

321:                                              ; preds = %306
  %322 = load ptr, ptr @usable_arenas, align 8, !tbaa !11
  %323 = getelementptr inbounds %struct.arena_object, ptr %322, i32 0, i32 5
  %324 = load ptr, ptr %323, align 8, !tbaa !22
  %325 = icmp eq ptr %324, null
  br i1 %325, label %334, label %326

326:                                              ; preds = %321
  %327 = load ptr, ptr @usable_arenas, align 8, !tbaa !11
  %328 = getelementptr inbounds %struct.arena_object, ptr %327, i32 0, i32 5
  %329 = load ptr, ptr %328, align 8, !tbaa !22
  %330 = getelementptr inbounds %struct.arena_object, ptr %329, i32 0, i32 6
  %331 = load ptr, ptr %330, align 8, !tbaa !20
  %332 = load ptr, ptr @usable_arenas, align 8, !tbaa !11
  %333 = icmp eq ptr %331, %332
  br i1 %333, label %334, label %335

334:                                              ; preds = %326, %321
  br label %336

335:                                              ; preds = %326
  call void @__assert_fail(ptr noundef @.str.9, ptr noundef @.str.1, i32 noundef 285, ptr noundef @__PRETTY_FUNCTION__.PyObject_Malloc) #5
  unreachable

336:                                              ; preds = %334
  %337 = load ptr, ptr @usable_arenas, align 8, !tbaa !11
  %338 = getelementptr inbounds %struct.arena_object, ptr %337, i32 0, i32 5
  %339 = load ptr, ptr %338, align 8, !tbaa !22
  store ptr %339, ptr @usable_arenas, align 8, !tbaa !11
  %340 = load ptr, ptr @usable_arenas, align 8, !tbaa !11
  %341 = icmp ne ptr %340, null
  br i1 %341, label %342, label %352

342:                                              ; preds = %336
  %343 = load ptr, ptr @usable_arenas, align 8, !tbaa !11
  %344 = getelementptr inbounds %struct.arena_object, ptr %343, i32 0, i32 6
  store ptr null, ptr %344, align 8, !tbaa !20
  %345 = load ptr, ptr @usable_arenas, align 8, !tbaa !11
  %346 = getelementptr inbounds %struct.arena_object, ptr %345, i32 0, i32 0
  %347 = load i64, ptr %346, align 8, !tbaa !23
  %348 = icmp ne i64 %347, 0
  br i1 %348, label %349, label %350

349:                                              ; preds = %342
  br label %351

350:                                              ; preds = %342
  call void @__assert_fail(ptr noundef @.str.7, ptr noundef @.str.1, i32 noundef 291, ptr noundef @__PRETTY_FUNCTION__.PyObject_Malloc) #5
  unreachable

351:                                              ; preds = %349
  br label %352

352:                                              ; preds = %351, %336
  br label %353

353:                                              ; preds = %352, %306
  br label %193

354:                                              ; preds = %12
  br label %355

355:                                              ; preds = %354, %101
  %356 = load i64, ptr %3, align 8, !tbaa !5
  %357 = icmp eq i64 %356, 0
  br i1 %357, label %358, label %359

358:                                              ; preds = %355
  store i64 1, ptr %3, align 8, !tbaa !5
  br label %359

359:                                              ; preds = %358, %355
  %360 = load i64, ptr %3, align 8, !tbaa !5
  %361 = call noalias ptr @malloc(i64 noundef %360) #6
  store ptr %361, ptr %2, align 8
  store i32 1, ptr %8, align 4
  br label %362

362:                                              ; preds = %359, %228, %219, %80, %60, %50, %11
  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
  %363 = load ptr, ptr %2, align 8
  ret ptr %363
}

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 = { nounwind }
attributes #5 = { noreturn nounwind }
attributes #6 = { 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, !10, i64 40}
!18 = !{!14, !10, i64 44}
!19 = !{!14, !12, i64 24}
!20 = !{!21, !12, i64 40}
!21 = !{!"arena_object", !6, i64 0, !12, i64 8, !10, i64 16, !10, i64 20, !12, i64 24, !12, i64 32, !12, i64 40}
!22 = !{!21, !12, i64 32}
!23 = !{!21, !6, i64 0}
!24 = !{!21, !12, i64 24}
!25 = !{!21, !10, i64 16}
!26 = !{!21, !12, i64 8}
!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.arena_object = type { i64, 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 [85 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [11 x i8], align 1
@__PRETTY_FUNCTION__.PyObject_Malloc = external hidden unnamed_addr constant [30 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

; 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 @PyObject_Malloc(i64 noundef %0) local_unnamed_addr #0 {
  %2 = icmp ugt i64 %0, 2147483647
  br i1 %2, label %148, label %3

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

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 %39, 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
  %.not92 = icmp eq ptr %19, null
  br i1 %.not92, label %20, label %21

20:                                               ; preds = %15
  tail call void @__assert_fail(ptr noundef nonnull @.str.6, ptr noundef nonnull @.str.1, i32 noundef 150, ptr noundef nonnull @__PRETTY_FUNCTION__.PyObject_Malloc) #5
  unreachable

21:                                               ; preds = %15
  %22 = load ptr, ptr %19, align 8, !tbaa !5
  store ptr %22, ptr %18, align 8, !tbaa !13
  %.not93 = icmp eq ptr %22, null
  br i1 %.not93, label %23, label %148

23:                                               ; preds = %21
  %24 = getelementptr inbounds i8, ptr %12, i64 40
  %25 = load i32, ptr %24, align 8, !tbaa !14
  %26 = getelementptr inbounds i8, ptr %12, i64 44
  %27 = load i32, ptr %26, align 4, !tbaa !15
  %.not94 = icmp ugt i32 %25, %27
  br i1 %.not94, label %34, label %28

28:                                               ; preds = %23
  %29 = zext i32 %25 to i64
  %30 = getelementptr inbounds i8, ptr %12, i64 %29
  store ptr %30, ptr %18, align 8, !tbaa !13
  %31 = and i32 %7, 248
  %32 = add nuw nsw i32 %31, 8
  %33 = add i32 %32, %25
  store i32 %33, ptr %24, align 8, !tbaa !14
  store ptr null, ptr %30, align 8, !tbaa !5
  br label %148

34:                                               ; preds = %23
  %35 = getelementptr inbounds i8, ptr %12, i64 24
  %36 = load ptr, ptr %35, align 8, !tbaa !16
  %37 = getelementptr inbounds i8, ptr %14, i64 24
  store ptr %36, ptr %37, align 8, !tbaa !16
  %38 = getelementptr inbounds i8, ptr %36, i64 16
  store ptr %14, ptr %38, align 8, !tbaa !9
  br label %148

39:                                               ; preds = %6
  %40 = load ptr, ptr @usable_arenas, align 8, !tbaa !5
  %41 = icmp eq ptr %40, null
  br i1 %41, label %42, label %47

42:                                               ; preds = %39
  %43 = tail call ptr @new_arena()
  store ptr %43, ptr @usable_arenas, align 8, !tbaa !5
  %44 = icmp eq ptr %43, null
  br i1 %44, label %146, label %45

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

47:                                               ; preds = %45, %39
  %48 = phi ptr [ %43, %45 ], [ %40, %39 ]
  %49 = load i64, ptr %48, align 8, !tbaa !17
  %.not82 = icmp eq i64 %49, 0
  br i1 %.not82, label %50, label %51

50:                                               ; preds = %47
  tail call void @__assert_fail(ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.1, i32 noundef 194, ptr noundef nonnull @__PRETTY_FUNCTION__.PyObject_Malloc) #5
  unreachable

51:                                               ; preds = %47
  %52 = getelementptr inbounds i8, ptr %48, i64 24
  %53 = load ptr, ptr %52, align 8, !tbaa !20
  %.not83 = icmp eq ptr %53, null
  br i1 %.not83, label %107, label %54

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

62:                                               ; preds = %54
  br i1 %61, label %64, label %63

63:                                               ; preds = %62
  tail call void @__assert_fail(ptr noundef nonnull @.str.8, ptr noundef nonnull @.str.1, i32 noundef 212, ptr noundef nonnull @__PRETTY_FUNCTION__.PyObject_Malloc) #5
  unreachable

64:                                               ; preds = %62
  %65 = getelementptr inbounds i8, ptr %48, i64 32
  %66 = load ptr, ptr %65, align 8, !tbaa !22
  %67 = icmp eq ptr %66, null
  br i1 %67, label %.sink.split, label %68

68:                                               ; preds = %64
  %69 = getelementptr inbounds i8, ptr %66, i64 40
  %70 = load ptr, ptr %69, align 8, !tbaa !23
  %71 = icmp eq ptr %70, %48
  br i1 %71, label %73, label %72

72:                                               ; preds = %68
  tail call void @__assert_fail(ptr noundef nonnull @.str.9, ptr noundef nonnull @.str.1, i32 noundef 215, ptr noundef nonnull @__PRETTY_FUNCTION__.PyObject_Malloc) #5
  unreachable

73:                                               ; preds = %68
  store ptr %66, ptr @usable_arenas, align 8, !tbaa !5
  store ptr null, ptr %69, align 8, !tbaa !23
  %74 = load i64, ptr %66, align 8, !tbaa !17
  %.not91 = icmp eq i64 %74, 0
  br i1 %.not91, label %75, label %83

75:                                               ; preds = %73
  tail call void @__assert_fail(ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.1, i32 noundef 220, ptr noundef nonnull @__PRETTY_FUNCTION__.PyObject_Malloc) #5
  unreachable

76:                                               ; preds = %54
  br i1 %61, label %77, label %83

77:                                               ; preds = %76
  %78 = getelementptr inbounds i8, ptr %48, i64 8
  %79 = load ptr, ptr %78, align 8, !tbaa !24
  %80 = inttoptr i64 %49 to ptr
  %81 = getelementptr inbounds i8, ptr %80, i64 258048
  %.not89 = icmp ugt ptr %79, %81
  br i1 %.not89, label %82, label %83

82:                                               ; preds = %77
  tail call void @__assert_fail(ptr noundef nonnull @.str.10, ptr noundef nonnull @.str.1, i32 noundef 232, ptr noundef nonnull @__PRETTY_FUNCTION__.PyObject_Malloc) #5
  unreachable

.sink.split:                                      ; preds = %64, %134
  %.0.ph = phi ptr [ %113, %134 ], [ %53, %64 ]
  store ptr null, ptr @usable_arenas, align 8, !tbaa !5
  br label %83

83:                                               ; preds = %.sink.split, %129, %143, %73, %76, %77
  %.0 = phi ptr [ %53, %73 ], [ %53, %76 ], [ %53, %77 ], [ %113, %143 ], [ %113, %129 ], [ %.0.ph, %.sink.split ]
  %84 = load ptr, ptr %11, align 16, !tbaa !5
  %85 = getelementptr inbounds i8, ptr %.0, i64 16
  store ptr %84, ptr %85, align 8, !tbaa !9
  %86 = getelementptr inbounds i8, ptr %.0, i64 24
  store ptr %84, ptr %86, align 8, !tbaa !16
  %87 = getelementptr inbounds i8, ptr %84, i64 16
  store ptr %.0, ptr %87, align 8, !tbaa !9
  %88 = getelementptr inbounds i8, ptr %84, i64 24
  store ptr %.0, ptr %88, align 8, !tbaa !16
  store i32 1, ptr %.0, align 8, !tbaa !12
  %89 = getelementptr inbounds i8, ptr %.0, i64 36
  %90 = load i32, ptr %89, align 4, !tbaa !25
  %91 = icmp eq i32 %90, %8
  br i1 %91, label %92, label %96

92:                                               ; preds = %83
  %93 = getelementptr inbounds i8, ptr %.0, i64 8
  %94 = load ptr, ptr %93, align 8, !tbaa !13
  %95 = load ptr, ptr %94, align 8, !tbaa !5
  store ptr %95, ptr %93, align 8, !tbaa !13
  br label %148

96:                                               ; preds = %83
  store i32 %8, ptr %89, align 4, !tbaa !25
  %97 = and i32 %7, 248
  %98 = add nuw nsw i32 %97, 8
  %99 = getelementptr inbounds i8, ptr %.0, i64 48
  %100 = shl nuw nsw i32 %98, 1
  %narrow = add nuw nsw i32 %100, 48
  %101 = getelementptr inbounds i8, ptr %.0, i64 40
  store i32 %narrow, ptr %101, align 8, !tbaa !14
  %102 = sub nuw nsw i32 4088, %97
  %103 = getelementptr inbounds i8, ptr %.0, i64 44
  store i32 %102, ptr %103, align 4, !tbaa !15
  %104 = zext nneg i32 %98 to i64
  %105 = getelementptr inbounds i8, ptr %99, i64 %104
  %106 = getelementptr inbounds i8, ptr %.0, i64 8
  store ptr %105, ptr %106, align 8, !tbaa !13
  store ptr null, ptr %105, align 8, !tbaa !5
  br label %148

107:                                              ; preds = %51
  %108 = getelementptr inbounds i8, ptr %48, i64 16
  %109 = load i32, ptr %108, align 8, !tbaa !21
  %.not84 = icmp eq i32 %109, 0
  br i1 %.not84, label %110, label %111

110:                                              ; preds = %107
  tail call void @__assert_fail(ptr noundef nonnull @.str.11, ptr noundef nonnull @.str.1, i32 noundef 269, ptr noundef nonnull @__PRETTY_FUNCTION__.PyObject_Malloc) #5
  unreachable

111:                                              ; preds = %107
  %112 = getelementptr inbounds i8, ptr %48, i64 8
  %113 = load ptr, ptr %112, align 8, !tbaa !24
  %114 = inttoptr i64 %49 to ptr
  %115 = getelementptr inbounds i8, ptr %114, i64 258048
  %.not85 = icmp ugt ptr %113, %115
  br i1 %.not85, label %116, label %117

116:                                              ; preds = %111
  tail call void @__assert_fail(ptr noundef nonnull @.str.12, ptr noundef nonnull @.str.1, i32 noundef 274, ptr noundef nonnull @__PRETTY_FUNCTION__.PyObject_Malloc) #5
  unreachable

117:                                              ; preds = %111
  %118 = load ptr, ptr @arenas, align 8, !tbaa !5
  %119 = ptrtoint ptr %48 to i64
  %120 = ptrtoint ptr %118 to i64
  %121 = sub i64 %119, %120
  %122 = sdiv exact i64 %121, 48
  %123 = trunc i64 %122 to i32
  %124 = getelementptr inbounds i8, ptr %113, i64 32
  store i32 %123, ptr %124, align 8, !tbaa !26
  %125 = and i64 %122, 4294967295
  %126 = getelementptr inbounds %struct.arena_object, ptr %118, i64 %125
  %127 = icmp eq ptr %126, %48
  br i1 %127, label %129, label %128

128:                                              ; preds = %117
  tail call void @__assert_fail(ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.1, i32 noundef 276, ptr noundef nonnull @__PRETTY_FUNCTION__.PyObject_Malloc) #5
  unreachable

129:                                              ; preds = %117
  %130 = getelementptr inbounds i8, ptr %113, i64 36
  store i32 65535, ptr %130, align 4, !tbaa !25
  %131 = getelementptr inbounds i8, ptr %113, i64 4096
  store ptr %131, ptr %112, align 8, !tbaa !24
  %132 = add i32 %109, -1
  store i32 %132, ptr %108, align 8, !tbaa !21
  %133 = icmp eq i32 %132, 0
  br i1 %133, label %134, label %83

134:                                              ; preds = %129
  %135 = getelementptr inbounds i8, ptr %48, i64 32
  %136 = load ptr, ptr %135, align 8, !tbaa !22
  %137 = icmp eq ptr %136, null
  br i1 %137, label %.sink.split, label %138

138:                                              ; preds = %134
  %139 = getelementptr inbounds i8, ptr %136, i64 40
  %140 = load ptr, ptr %139, align 8, !tbaa !23
  %141 = icmp eq ptr %140, %48
  br i1 %141, label %143, label %142

142:                                              ; preds = %138
  tail call void @__assert_fail(ptr noundef nonnull @.str.9, ptr noundef nonnull @.str.1, i32 noundef 285, ptr noundef nonnull @__PRETTY_FUNCTION__.PyObject_Malloc) #5
  unreachable

143:                                              ; preds = %138
  store ptr %136, ptr @usable_arenas, align 8, !tbaa !5
  store ptr null, ptr %139, align 8, !tbaa !23
  %144 = load i64, ptr %136, align 8, !tbaa !17
  %.not87 = icmp eq i64 %144, 0
  br i1 %.not87, label %145, label %83

145:                                              ; preds = %143
  tail call void @__assert_fail(ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.1, i32 noundef 291, ptr noundef nonnull @__PRETTY_FUNCTION__.PyObject_Malloc) #5
  unreachable

146:                                              ; preds = %3, %42
  %spec.store.select = tail call i64 @llvm.umax.i64(i64 %0, i64 1)
  %147 = tail call noalias ptr @malloc(i64 noundef %spec.store.select) #6
  br label %148

148:                                              ; preds = %21, %1, %146, %96, %92, %34, %28
  %.067 = phi ptr [ %19, %28 ], [ %19, %34 ], [ %147, %146 ], [ %94, %92 ], [ %99, %96 ], [ null, %1 ], [ %19, %21 ]
  ret ptr %.067
}

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #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 = { 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { noreturn nounwind }
attributes #6 = { 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, !11, i64 40}
!15 = !{!10, !11, i64 44}
!16 = !{!10, !6, i64 24}
!17 = !{!18, !19, i64 0}
!18 = !{!"arena_object", !19, i64 0, !6, i64 8, !11, i64 16, !11, i64 20, !6, i64 24, !6, i64 32, !6, i64 40}
!19 = !{!"long", !7, i64 0}
!20 = !{!18, !6, i64 24}
!21 = !{!18, !11, i64 16}
!22 = !{!18, !6, i64 32}
!23 = !{!18, !6, i64 40}
!24 = !{!18, !6, i64 8}
!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