; LLVM IR from marcobambini/gravity :: src/shared (gravity_hash)

; 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.gravity_value_r = type { i64, i64, ptr }
%struct.gravity_hash_t = type { i32, i32, ptr, ptr, ptr, ptr, ptr, i32, i32 }
%struct.gravity_value_t = type { ptr, %union.anon }
%union.anon = type { i64 }
%struct.hash_node_s = type { i32, %struct.gravity_value_t, %struct.gravity_value_t, ptr }

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

; Function Attrs: nounwind
declare void @free(ptr noundef) #1

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

; Function Attrs: nounwind uwtable
define dso_local zeroext i1 @gravity_hash_compare(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) #3 {
  %5 = alloca i1, align 1
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca %struct.gravity_value_r, align 8
  %11 = alloca %struct.gravity_value_r, align 8
  %12 = alloca %struct.gravity_value_r, align 8
  %13 = alloca %struct.gravity_value_r, align 8
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca ptr, align 8
  %19 = alloca i8, align 1
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store ptr %3, ptr %9, align 8, !tbaa !5
  %22 = load ptr, ptr %6, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.gravity_hash_t, ptr %22, i32 0, i32 1
  %24 = load i32, ptr %23, align 4, !tbaa !9
  %25 = load ptr, ptr %7, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.gravity_hash_t, ptr %25, i32 0, i32 1
  %27 = load i32, ptr %26, align 4, !tbaa !9
  %28 = icmp ne i32 %24, %27
  br i1 %28, label %29, label %30

29:                                               ; preds = %4
  store i1 false, ptr %5, align 1
  br label %407

30:                                               ; preds = %4
  %31 = load ptr, ptr %8, align 8, !tbaa !5
  %32 = icmp ne ptr %31, null
  br i1 %32, label %34, label %33

33:                                               ; preds = %30
  store i1 false, ptr %5, align 1
  br label %407

34:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 24, ptr %10) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr %11) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr %12) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr %13) #5
  %35 = getelementptr inbounds %struct.gravity_value_r, ptr %10, i32 0, i32 1
  store i64 0, ptr %35, align 8, !tbaa !12
  %36 = getelementptr inbounds %struct.gravity_value_r, ptr %10, i32 0, i32 0
  store i64 0, ptr %36, align 8, !tbaa !15
  %37 = getelementptr inbounds %struct.gravity_value_r, ptr %10, i32 0, i32 2
  store ptr null, ptr %37, align 8, !tbaa !16
  %38 = getelementptr inbounds %struct.gravity_value_r, ptr %11, i32 0, i32 1
  store i64 0, ptr %38, align 8, !tbaa !12
  %39 = getelementptr inbounds %struct.gravity_value_r, ptr %11, i32 0, i32 0
  store i64 0, ptr %39, align 8, !tbaa !15
  %40 = getelementptr inbounds %struct.gravity_value_r, ptr %11, i32 0, i32 2
  store ptr null, ptr %40, align 8, !tbaa !16
  %41 = getelementptr inbounds %struct.gravity_value_r, ptr %12, i32 0, i32 1
  store i64 0, ptr %41, align 8, !tbaa !12
  %42 = getelementptr inbounds %struct.gravity_value_r, ptr %12, i32 0, i32 0
  store i64 0, ptr %42, align 8, !tbaa !15
  %43 = getelementptr inbounds %struct.gravity_value_r, ptr %12, i32 0, i32 2
  store ptr null, ptr %43, align 8, !tbaa !16
  %44 = getelementptr inbounds %struct.gravity_value_r, ptr %13, i32 0, i32 1
  store i64 0, ptr %44, align 8, !tbaa !12
  %45 = getelementptr inbounds %struct.gravity_value_r, ptr %13, i32 0, i32 0
  store i64 0, ptr %45, align 8, !tbaa !15
  %46 = getelementptr inbounds %struct.gravity_value_r, ptr %13, i32 0, i32 2
  store ptr null, ptr %46, align 8, !tbaa !16
  %47 = load ptr, ptr %6, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.gravity_hash_t, ptr %47, i32 0, i32 1
  %49 = load i32, ptr %48, align 4, !tbaa !9
  %50 = add i32 %49, 8
  %51 = zext i32 %50 to i64
  %52 = getelementptr inbounds %struct.gravity_value_r, ptr %10, i32 0, i32 1
  %53 = load i64, ptr %52, align 8, !tbaa !12
  %54 = add i64 %53, %51
  store i64 %54, ptr %52, align 8, !tbaa !12
  %55 = getelementptr inbounds %struct.gravity_value_r, ptr %10, i32 0, i32 2
  %56 = load ptr, ptr %55, align 8, !tbaa !16
  %57 = getelementptr inbounds %struct.gravity_value_r, ptr %10, i32 0, i32 1
  %58 = load i64, ptr %57, align 8, !tbaa !12
  %59 = mul i64 16, %58
  %60 = call ptr @realloc(ptr noundef %56, i64 noundef %59) #6
  %61 = getelementptr inbounds %struct.gravity_value_r, ptr %10, i32 0, i32 2
  store ptr %60, ptr %61, align 8, !tbaa !16
  %62 = load ptr, ptr %6, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.gravity_hash_t, ptr %62, i32 0, i32 1
  %64 = load i32, ptr %63, align 4, !tbaa !9
  %65 = add i32 %64, 8
  %66 = zext i32 %65 to i64
  %67 = getelementptr inbounds %struct.gravity_value_r, ptr %12, i32 0, i32 1
  %68 = load i64, ptr %67, align 8, !tbaa !12
  %69 = add i64 %68, %66
  store i64 %69, ptr %67, align 8, !tbaa !12
  %70 = getelementptr inbounds %struct.gravity_value_r, ptr %12, i32 0, i32 2
  %71 = load ptr, ptr %70, align 8, !tbaa !16
  %72 = getelementptr inbounds %struct.gravity_value_r, ptr %12, i32 0, i32 1
  %73 = load i64, ptr %72, align 8, !tbaa !12
  %74 = mul i64 16, %73
  %75 = call ptr @realloc(ptr noundef %71, i64 noundef %74) #6
  %76 = getelementptr inbounds %struct.gravity_value_r, ptr %12, i32 0, i32 2
  store ptr %75, ptr %76, align 8, !tbaa !16
  %77 = load ptr, ptr %6, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.gravity_hash_t, ptr %77, i32 0, i32 1
  %79 = load i32, ptr %78, align 4, !tbaa !9
  %80 = add i32 %79, 8
  %81 = zext i32 %80 to i64
  %82 = getelementptr inbounds %struct.gravity_value_r, ptr %11, i32 0, i32 1
  %83 = load i64, ptr %82, align 8, !tbaa !12
  %84 = add i64 %83, %81
  store i64 %84, ptr %82, align 8, !tbaa !12
  %85 = getelementptr inbounds %struct.gravity_value_r, ptr %11, i32 0, i32 2
  %86 = load ptr, ptr %85, align 8, !tbaa !16
  %87 = getelementptr inbounds %struct.gravity_value_r, ptr %11, i32 0, i32 1
  %88 = load i64, ptr %87, align 8, !tbaa !12
  %89 = mul i64 16, %88
  %90 = call ptr @realloc(ptr noundef %86, i64 noundef %89) #6
  %91 = getelementptr inbounds %struct.gravity_value_r, ptr %11, i32 0, i32 2
  store ptr %90, ptr %91, align 8, !tbaa !16
  %92 = load ptr, ptr %6, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.gravity_hash_t, ptr %92, i32 0, i32 1
  %94 = load i32, ptr %93, align 4, !tbaa !9
  %95 = add i32 %94, 8
  %96 = zext i32 %95 to i64
  %97 = getelementptr inbounds %struct.gravity_value_r, ptr %13, i32 0, i32 1
  %98 = load i64, ptr %97, align 8, !tbaa !12
  %99 = add i64 %98, %96
  store i64 %99, ptr %97, align 8, !tbaa !12
  %100 = getelementptr inbounds %struct.gravity_value_r, ptr %13, i32 0, i32 2
  %101 = load ptr, ptr %100, align 8, !tbaa !16
  %102 = getelementptr inbounds %struct.gravity_value_r, ptr %13, i32 0, i32 1
  %103 = load i64, ptr %102, align 8, !tbaa !12
  %104 = mul i64 16, %103
  %105 = call ptr @realloc(ptr noundef %101, i64 noundef %104) #6
  %106 = getelementptr inbounds %struct.gravity_value_r, ptr %13, i32 0, i32 2
  store ptr %105, ptr %106, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  store i32 0, ptr %14, align 4, !tbaa !17
  br label %107

107:                                              ; preds = %203, %34
  %108 = load i32, ptr %14, align 4, !tbaa !17
  %109 = load ptr, ptr %6, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.gravity_hash_t, ptr %109, i32 0, i32 0
  %111 = load i32, ptr %110, align 8, !tbaa !18
  %112 = icmp ult i32 %108, %111
  br i1 %112, label %114, label %113

113:                                              ; preds = %107
  store i32 2, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  br label %206

114:                                              ; preds = %107
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %115 = load ptr, ptr %6, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.gravity_hash_t, ptr %115, i32 0, i32 2
  %117 = load ptr, ptr %116, align 8, !tbaa !19
  %118 = load i32, ptr %14, align 4, !tbaa !17
  %119 = zext i32 %118 to i64
  %120 = getelementptr inbounds ptr, ptr %117, i64 %119
  %121 = load ptr, ptr %120, align 8, !tbaa !5
  store ptr %121, ptr %16, align 8, !tbaa !5
  %122 = load ptr, ptr %16, align 8, !tbaa !5
  %123 = icmp ne ptr %122, null
  br i1 %123, label %125, label %124

124:                                              ; preds = %114
  store i32 4, ptr %15, align 4
  br label %200

125:                                              ; preds = %114
  br label %126

126:                                              ; preds = %187, %125
  %127 = load ptr, ptr %16, align 8, !tbaa !5
  %128 = icmp ne ptr %127, null
  br i1 %128, label %129, label %199

129:                                              ; preds = %126
  %130 = getelementptr inbounds %struct.gravity_value_r, ptr %10, i32 0, i32 0
  %131 = load i64, ptr %130, align 8, !tbaa !15
  %132 = getelementptr inbounds %struct.gravity_value_r, ptr %10, i32 0, i32 1
  %133 = load i64, ptr %132, align 8, !tbaa !12
  %134 = icmp eq i64 %131, %133
  br i1 %134, label %135, label %154

135:                                              ; preds = %129
  %136 = getelementptr inbounds %struct.gravity_value_r, ptr %10, i32 0, i32 1
  %137 = load i64, ptr %136, align 8, !tbaa !12
  %138 = icmp ne i64 %137, 0
  br i1 %138, label %139, label %143

139:                                              ; preds = %135
  %140 = getelementptr inbounds %struct.gravity_value_r, ptr %10, i32 0, i32 1
  %141 = load i64, ptr %140, align 8, !tbaa !12
  %142 = shl i64 %141, 1
  br label %144

143:                                              ; preds = %135
  br label %144

144:                                              ; preds = %143, %139
  %145 = phi i64 [ %142, %139 ], [ 8, %143 ]
  %146 = getelementptr inbounds %struct.gravity_value_r, ptr %10, i32 0, i32 1
  store i64 %145, ptr %146, align 8, !tbaa !12
  %147 = getelementptr inbounds %struct.gravity_value_r, ptr %10, i32 0, i32 2
  %148 = load ptr, ptr %147, align 8, !tbaa !16
  %149 = getelementptr inbounds %struct.gravity_value_r, ptr %10, i32 0, i32 1
  %150 = load i64, ptr %149, align 8, !tbaa !12
  %151 = mul i64 16, %150
  %152 = call ptr @realloc(ptr noundef %148, i64 noundef %151) #6
  %153 = getelementptr inbounds %struct.gravity_value_r, ptr %10, i32 0, i32 2
  store ptr %152, ptr %153, align 8, !tbaa !16
  br label %154

154:                                              ; preds = %144, %129
  %155 = getelementptr inbounds %struct.gravity_value_r, ptr %10, i32 0, i32 2
  %156 = load ptr, ptr %155, align 8, !tbaa !16
  %157 = getelementptr inbounds %struct.gravity_value_r, ptr %10, i32 0, i32 0
  %158 = load i64, ptr %157, align 8, !tbaa !15
  %159 = add i64 %158, 1
  store i64 %159, ptr %157, align 8, !tbaa !15
  %160 = getelementptr inbounds %struct.gravity_value_t, ptr %156, i64 %158
  %161 = load ptr, ptr %16, align 8, !tbaa !5
  %162 = getelementptr inbounds %struct.hash_node_s, ptr %161, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %160, ptr align 8 %162, i64 16, i1 false), !tbaa.struct !20
  %163 = getelementptr inbounds %struct.gravity_value_r, ptr %11, i32 0, i32 0
  %164 = load i64, ptr %163, align 8, !tbaa !15
  %165 = getelementptr inbounds %struct.gravity_value_r, ptr %11, i32 0, i32 1
  %166 = load i64, ptr %165, align 8, !tbaa !12
  %167 = icmp eq i64 %164, %166
  br i1 %167, label %168, label %187

168:                                              ; preds = %154
  %169 = getelementptr inbounds %struct.gravity_value_r, ptr %11, i32 0, i32 1
  %170 = load i64, ptr %169, align 8, !tbaa !12
  %171 = icmp ne i64 %170, 0
  br i1 %171, label %172, label %176

172:                                              ; preds = %168
  %173 = getelementptr inbounds %struct.gravity_value_r, ptr %11, i32 0, i32 1
  %174 = load i64, ptr %173, align 8, !tbaa !12
  %175 = shl i64 %174, 1
  br label %177

176:                                              ; preds = %168
  br label %177

177:                                              ; preds = %176, %172
  %178 = phi i64 [ %175, %172 ], [ 8, %176 ]
  %179 = getelementptr inbounds %struct.gravity_value_r, ptr %11, i32 0, i32 1
  store i64 %178, ptr %179, align 8, !tbaa !12
  %180 = getelementptr inbounds %struct.gravity_value_r, ptr %11, i32 0, i32 2
  %181 = load ptr, ptr %180, align 8, !tbaa !16
  %182 = getelementptr inbounds %struct.gravity_value_r, ptr %11, i32 0, i32 1
  %183 = load i64, ptr %182, align 8, !tbaa !12
  %184 = mul i64 16, %183
  %185 = call ptr @realloc(ptr noundef %181, i64 noundef %184) #6
  %186 = getelementptr inbounds %struct.gravity_value_r, ptr %11, i32 0, i32 2
  store ptr %185, ptr %186, align 8, !tbaa !16
  br label %187

187:                                              ; preds = %177, %154
  %188 = getelementptr inbounds %struct.gravity_value_r, ptr %11, i32 0, i32 2
  %189 = load ptr, ptr %188, align 8, !tbaa !16
  %190 = getelementptr inbounds %struct.gravity_value_r, ptr %11, i32 0, i32 0
  %191 = load i64, ptr %190, align 8, !tbaa !15
  %192 = add i64 %191, 1
  store i64 %192, ptr %190, align 8, !tbaa !15
  %193 = getelementptr inbounds %struct.gravity_value_t, ptr %189, i64 %191
  %194 = load ptr, ptr %16, align 8, !tbaa !5
  %195 = getelementptr inbounds %struct.hash_node_s, ptr %194, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %193, ptr align 8 %195, i64 16, i1 false), !tbaa.struct !20
  %196 = load ptr, ptr %16, align 8, !tbaa !5
  %197 = getelementptr inbounds %struct.hash_node_s, ptr %196, i32 0, i32 3
  %198 = load ptr, ptr %197, align 8, !tbaa !22
  store ptr %198, ptr %16, align 8, !tbaa !5
  br label %126, !llvm.loop !25

199:                                              ; preds = %126
  store i32 0, ptr %15, align 4
  br label %200

200:                                              ; preds = %199, %124
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  %201 = load i32, ptr %15, align 4
  switch i32 %201, label %409 [
    i32 0, label %202
    i32 4, label %203
  ]

202:                                              ; preds = %200
  br label %203

203:                                              ; preds = %202, %200
  %204 = load i32, ptr %14, align 4, !tbaa !17
  %205 = add i32 %204, 1
  store i32 %205, ptr %14, align 4, !tbaa !17
  br label %107, !llvm.loop !27

206:                                              ; preds = %113
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  store i32 0, ptr %17, align 4, !tbaa !17
  br label %207

207:                                              ; preds = %303, %206
  %208 = load i32, ptr %17, align 4, !tbaa !17
  %209 = load ptr, ptr %7, align 8, !tbaa !5
  %210 = getelementptr inbounds %struct.gravity_hash_t, ptr %209, i32 0, i32 0
  %211 = load i32, ptr %210, align 8, !tbaa !18
  %212 = icmp ult i32 %208, %211
  br i1 %212, label %214, label %213

213:                                              ; preds = %207
  store i32 7, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  br label %306

214:                                              ; preds = %207
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  %215 = load ptr, ptr %7, align 8, !tbaa !5
  %216 = getelementptr inbounds %struct.gravity_hash_t, ptr %215, i32 0, i32 2
  %217 = load ptr, ptr %216, align 8, !tbaa !19
  %218 = load i32, ptr %17, align 4, !tbaa !17
  %219 = zext i32 %218 to i64
  %220 = getelementptr inbounds ptr, ptr %217, i64 %219
  %221 = load ptr, ptr %220, align 8, !tbaa !5
  store ptr %221, ptr %18, align 8, !tbaa !5
  %222 = load ptr, ptr %18, align 8, !tbaa !5
  %223 = icmp ne ptr %222, null
  br i1 %223, label %225, label %224

224:                                              ; preds = %214
  store i32 9, ptr %15, align 4
  br label %300

225:                                              ; preds = %214
  br label %226

226:                                              ; preds = %287, %225
  %227 = load ptr, ptr %18, align 8, !tbaa !5
  %228 = icmp ne ptr %227, null
  br i1 %228, label %229, label %299

229:                                              ; preds = %226
  %230 = getelementptr inbounds %struct.gravity_value_r, ptr %12, i32 0, i32 0
  %231 = load i64, ptr %230, align 8, !tbaa !15
  %232 = getelementptr inbounds %struct.gravity_value_r, ptr %12, i32 0, i32 1
  %233 = load i64, ptr %232, align 8, !tbaa !12
  %234 = icmp eq i64 %231, %233
  br i1 %234, label %235, label %254

235:                                              ; preds = %229
  %236 = getelementptr inbounds %struct.gravity_value_r, ptr %12, i32 0, i32 1
  %237 = load i64, ptr %236, align 8, !tbaa !12
  %238 = icmp ne i64 %237, 0
  br i1 %238, label %239, label %243

239:                                              ; preds = %235
  %240 = getelementptr inbounds %struct.gravity_value_r, ptr %12, i32 0, i32 1
  %241 = load i64, ptr %240, align 8, !tbaa !12
  %242 = shl i64 %241, 1
  br label %244

243:                                              ; preds = %235
  br label %244

244:                                              ; preds = %243, %239
  %245 = phi i64 [ %242, %239 ], [ 8, %243 ]
  %246 = getelementptr inbounds %struct.gravity_value_r, ptr %12, i32 0, i32 1
  store i64 %245, ptr %246, align 8, !tbaa !12
  %247 = getelementptr inbounds %struct.gravity_value_r, ptr %12, i32 0, i32 2
  %248 = load ptr, ptr %247, align 8, !tbaa !16
  %249 = getelementptr inbounds %struct.gravity_value_r, ptr %12, i32 0, i32 1
  %250 = load i64, ptr %249, align 8, !tbaa !12
  %251 = mul i64 16, %250
  %252 = call ptr @realloc(ptr noundef %248, i64 noundef %251) #6
  %253 = getelementptr inbounds %struct.gravity_value_r, ptr %12, i32 0, i32 2
  store ptr %252, ptr %253, align 8, !tbaa !16
  br label %254

254:                                              ; preds = %244, %229
  %255 = getelementptr inbounds %struct.gravity_value_r, ptr %12, i32 0, i32 2
  %256 = load ptr, ptr %255, align 8, !tbaa !16
  %257 = getelementptr inbounds %struct.gravity_value_r, ptr %12, i32 0, i32 0
  %258 = load i64, ptr %257, align 8, !tbaa !15
  %259 = add i64 %258, 1
  store i64 %259, ptr %257, align 8, !tbaa !15
  %260 = getelementptr inbounds %struct.gravity_value_t, ptr %256, i64 %258
  %261 = load ptr, ptr %18, align 8, !tbaa !5
  %262 = getelementptr inbounds %struct.hash_node_s, ptr %261, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %260, ptr align 8 %262, i64 16, i1 false), !tbaa.struct !20
  %263 = getelementptr inbounds %struct.gravity_value_r, ptr %13, i32 0, i32 0
  %264 = load i64, ptr %263, align 8, !tbaa !15
  %265 = getelementptr inbounds %struct.gravity_value_r, ptr %13, i32 0, i32 1
  %266 = load i64, ptr %265, align 8, !tbaa !12
  %267 = icmp eq i64 %264, %266
  br i1 %267, label %268, label %287

268:                                              ; preds = %254
  %269 = getelementptr inbounds %struct.gravity_value_r, ptr %13, i32 0, i32 1
  %270 = load i64, ptr %269, align 8, !tbaa !12
  %271 = icmp ne i64 %270, 0
  br i1 %271, label %272, label %276

272:                                              ; preds = %268
  %273 = getelementptr inbounds %struct.gravity_value_r, ptr %13, i32 0, i32 1
  %274 = load i64, ptr %273, align 8, !tbaa !12
  %275 = shl i64 %274, 1
  br label %277

276:                                              ; preds = %268
  br label %277

277:                                              ; preds = %276, %272
  %278 = phi i64 [ %275, %272 ], [ 8, %276 ]
  %279 = getelementptr inbounds %struct.gravity_value_r, ptr %13, i32 0, i32 1
  store i64 %278, ptr %279, align 8, !tbaa !12
  %280 = getelementptr inbounds %struct.gravity_value_r, ptr %13, i32 0, i32 2
  %281 = load ptr, ptr %280, align 8, !tbaa !16
  %282 = getelementptr inbounds %struct.gravity_value_r, ptr %13, i32 0, i32 1
  %283 = load i64, ptr %282, align 8, !tbaa !12
  %284 = mul i64 16, %283
  %285 = call ptr @realloc(ptr noundef %281, i64 noundef %284) #6
  %286 = getelementptr inbounds %struct.gravity_value_r, ptr %13, i32 0, i32 2
  store ptr %285, ptr %286, align 8, !tbaa !16
  br label %287

287:                                              ; preds = %277, %254
  %288 = getelementptr inbounds %struct.gravity_value_r, ptr %13, i32 0, i32 2
  %289 = load ptr, ptr %288, align 8, !tbaa !16
  %290 = getelementptr inbounds %struct.gravity_value_r, ptr %13, i32 0, i32 0
  %291 = load i64, ptr %290, align 8, !tbaa !15
  %292 = add i64 %291, 1
  store i64 %292, ptr %290, align 8, !tbaa !15
  %293 = getelementptr inbounds %struct.gravity_value_t, ptr %289, i64 %291
  %294 = load ptr, ptr %18, align 8, !tbaa !5
  %295 = getelementptr inbounds %struct.hash_node_s, ptr %294, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %293, ptr align 8 %295, i64 16, i1 false), !tbaa.struct !20
  %296 = load ptr, ptr %18, align 8, !tbaa !5
  %297 = getelementptr inbounds %struct.hash_node_s, ptr %296, i32 0, i32 3
  %298 = load ptr, ptr %297, align 8, !tbaa !22
  store ptr %298, ptr %18, align 8, !tbaa !5
  br label %226, !llvm.loop !28

299:                                              ; preds = %226
  store i32 0, ptr %15, align 4
  br label %300

300:                                              ; preds = %299, %224
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  %301 = load i32, ptr %15, align 4
  switch i32 %301, label %409 [
    i32 0, label %302
    i32 9, label %303
  ]

302:                                              ; preds = %300
  br label %303

303:                                              ; preds = %302, %300
  %304 = load i32, ptr %17, align 4, !tbaa !17
  %305 = add i32 %304, 1
  store i32 %305, ptr %17, align 4, !tbaa !17
  br label %207, !llvm.loop !29

306:                                              ; preds = %213
  call void @llvm.lifetime.start.p0(i64 1, ptr %19) #5
  store i8 0, ptr %19, align 1, !tbaa !30
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  %307 = getelementptr inbounds %struct.gravity_value_r, ptr %10, i32 0, i32 0
  %308 = load i64, ptr %307, align 8, !tbaa !15
  %309 = trunc i64 %308 to i32
  store i32 %309, ptr %20, align 4, !tbaa !17
  %310 = load i32, ptr %20, align 4, !tbaa !17
  %311 = getelementptr inbounds %struct.gravity_value_r, ptr %12, i32 0, i32 0
  %312 = load i64, ptr %311, align 8, !tbaa !15
  %313 = trunc i64 %312 to i32
  %314 = icmp ne i32 %310, %313
  br i1 %314, label %315, label %316

315:                                              ; preds = %306
  br label %375

316:                                              ; preds = %306
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #5
  store i32 0, ptr %21, align 4, !tbaa !17
  br label %317

317:                                              ; preds = %369, %316
  %318 = load i32, ptr %21, align 4, !tbaa !17
  %319 = load i32, ptr %20, align 4, !tbaa !17
  %320 = icmp ult i32 %318, %319
  br i1 %320, label %322, label %321

321:                                              ; preds = %317
  store i32 13, ptr %15, align 4
  br label %372

322:                                              ; preds = %317
  %323 = load ptr, ptr %8, align 8, !tbaa !5
  %324 = getelementptr inbounds %struct.gravity_value_r, ptr %10, i32 0, i32 2
  %325 = load ptr, ptr %324, align 8, !tbaa !16
  %326 = load i32, ptr %21, align 4, !tbaa !17
  %327 = zext i32 %326 to i64
  %328 = getelementptr inbounds %struct.gravity_value_t, ptr %325, i64 %327
  %329 = getelementptr inbounds %struct.gravity_value_r, ptr %12, i32 0, i32 2
  %330 = load ptr, ptr %329, align 8, !tbaa !16
  %331 = load i32, ptr %21, align 4, !tbaa !17
  %332 = zext i32 %331 to i64
  %333 = getelementptr inbounds %struct.gravity_value_t, ptr %330, i64 %332
  %334 = load ptr, ptr %9, align 8, !tbaa !5
  %335 = getelementptr inbounds { ptr, i64 }, ptr %328, i32 0, i32 0
  %336 = load ptr, ptr %335, align 8
  %337 = getelementptr inbounds { ptr, i64 }, ptr %328, i32 0, i32 1
  %338 = load i64, ptr %337, align 8
  %339 = getelementptr inbounds { ptr, i64 }, ptr %333, i32 0, i32 0
  %340 = load ptr, ptr %339, align 8
  %341 = getelementptr inbounds { ptr, i64 }, ptr %333, i32 0, i32 1
  %342 = load i64, ptr %341, align 8
  %343 = call zeroext i1 %323(ptr %336, i64 %338, ptr %340, i64 %342, ptr noundef %334)
  br i1 %343, label %345, label %344

344:                                              ; preds = %322
  store i32 12, ptr %15, align 4
  br label %372

345:                                              ; preds = %322
  %346 = load ptr, ptr %8, align 8, !tbaa !5
  %347 = getelementptr inbounds %struct.gravity_value_r, ptr %11, i32 0, i32 2
  %348 = load ptr, ptr %347, align 8, !tbaa !16
  %349 = load i32, ptr %21, align 4, !tbaa !17
  %350 = zext i32 %349 to i64
  %351 = getelementptr inbounds %struct.gravity_value_t, ptr %348, i64 %350
  %352 = getelementptr inbounds %struct.gravity_value_r, ptr %13, i32 0, i32 2
  %353 = load ptr, ptr %352, align 8, !tbaa !16
  %354 = load i32, ptr %21, align 4, !tbaa !17
  %355 = zext i32 %354 to i64
  %356 = getelementptr inbounds %struct.gravity_value_t, ptr %353, i64 %355
  %357 = load ptr, ptr %9, align 8, !tbaa !5
  %358 = getelementptr inbounds { ptr, i64 }, ptr %351, i32 0, i32 0
  %359 = load ptr, ptr %358, align 8
  %360 = getelementptr inbounds { ptr, i64 }, ptr %351, i32 0, i32 1
  %361 = load i64, ptr %360, align 8
  %362 = getelementptr inbounds { ptr, i64 }, ptr %356, i32 0, i32 0
  %363 = load ptr, ptr %362, align 8
  %364 = getelementptr inbounds { ptr, i64 }, ptr %356, i32 0, i32 1
  %365 = load i64, ptr %364, align 8
  %366 = call zeroext i1 %346(ptr %359, i64 %361, ptr %363, i64 %365, ptr noundef %357)
  br i1 %366, label %368, label %367

367:                                              ; preds = %345
  store i32 12, ptr %15, align 4
  br label %372

368:                                              ; preds = %345
  br label %369

369:                                              ; preds = %368
  %370 = load i32, ptr %21, align 4, !tbaa !17
  %371 = add i32 %370, 1
  store i32 %371, ptr %21, align 4, !tbaa !17
  br label %317, !llvm.loop !32

372:                                              ; preds = %367, %344, %321
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #5
  %373 = load i32, ptr %15, align 4
  switch i32 %373, label %406 [
    i32 13, label %374
    i32 12, label %375
  ]

374:                                              ; preds = %372
  store i8 1, ptr %19, align 1, !tbaa !30
  br label %375

375:                                              ; preds = %374, %372, %315
  %376 = getelementptr inbounds %struct.gravity_value_r, ptr %10, i32 0, i32 2
  %377 = load ptr, ptr %376, align 8, !tbaa !16
  %378 = icmp ne ptr %377, null
  br i1 %378, label %379, label %382

379:                                              ; preds = %375
  %380 = getelementptr inbounds %struct.gravity_value_r, ptr %10, i32 0, i32 2
  %381 = load ptr, ptr %380, align 8, !tbaa !16
  call void @free(ptr noundef %381) #5
  br label %382

382:                                              ; preds = %379, %375
  %383 = getelementptr inbounds %struct.gravity_value_r, ptr %12, i32 0, i32 2
  %384 = load ptr, ptr %383, align 8, !tbaa !16
  %385 = icmp ne ptr %384, null
  br i1 %385, label %386, label %389

386:                                              ; preds = %382
  %387 = getelementptr inbounds %struct.gravity_value_r, ptr %12, i32 0, i32 2
  %388 = load ptr, ptr %387, align 8, !tbaa !16
  call void @free(ptr noundef %388) #5
  br label %389

389:                                              ; preds = %386, %382
  %390 = getelementptr inbounds %struct.gravity_value_r, ptr %11, i32 0, i32 2
  %391 = load ptr, ptr %390, align 8, !tbaa !16
  %392 = icmp ne ptr %391, null
  br i1 %392, label %393, label %396

393:                                              ; preds = %389
  %394 = getelementptr inbounds %struct.gravity_value_r, ptr %11, i32 0, i32 2
  %395 = load ptr, ptr %394, align 8, !tbaa !16
  call void @free(ptr noundef %395) #5
  br label %396

396:                                              ; preds = %393, %389
  %397 = getelementptr inbounds %struct.gravity_value_r, ptr %13, i32 0, i32 2
  %398 = load ptr, ptr %397, align 8, !tbaa !16
  %399 = icmp ne ptr %398, null
  br i1 %399, label %400, label %403

400:                                              ; preds = %396
  %401 = getelementptr inbounds %struct.gravity_value_r, ptr %13, i32 0, i32 2
  %402 = load ptr, ptr %401, align 8, !tbaa !16
  call void @free(ptr noundef %402) #5
  br label %403

403:                                              ; preds = %400, %396
  %404 = load i8, ptr %19, align 1, !tbaa !30, !range !33, !noundef !34
  %405 = trunc i8 %404 to i1
  store i1 %405, ptr %5, align 1
  store i32 1, ptr %15, align 4
  br label %406

406:                                              ; preds = %403, %372
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #5
  br label %407

407:                                              ; preds = %406, %33, %29
  %408 = load i1, ptr %5, align 1
  ret i1 %408

409:                                              ; preds = %300, %200
  unreachable
}

; Function Attrs: nounwind allocsize(1)
declare ptr @realloc(ptr noundef, i64 noundef) #4

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

!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, !11, i64 4}
!10 = !{!"gravity_hash_t", !11, i64 0, !11, i64 4, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !11, i64 48, !11, i64 52}
!11 = !{!"int", !7, i64 0}
!12 = !{!13, !14, i64 8}
!13 = !{!"", !14, i64 0, !14, i64 8, !6, i64 16}
!14 = !{!"long", !7, i64 0}
!15 = !{!13, !14, i64 0}
!16 = !{!13, !6, i64 16}
!17 = !{!11, !11, i64 0}
!18 = !{!10, !11, i64 0}
!19 = !{!10, !6, i64 8}
!20 = !{i64 0, i64 8, !5, i64 8, i64 8, !21}
!21 = !{!7, !7, i64 0}
!22 = !{!23, !6, i64 40}
!23 = !{!"hash_node_s", !11, i64 0, !24, i64 8, !24, i64 24, !6, i64 40}
!24 = !{!"", !6, i64 0, !7, i64 8}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = distinct !{!27, !26}
!28 = distinct !{!28, !26}
!29 = distinct !{!29, !26}
!30 = !{!31, !31, i64 0}
!31 = !{!"_Bool", !7, i64 0}
!32 = distinct !{!32, !26}
!33 = !{i8 0, i8 2}
!34 = !{}


; 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.gravity_value_t = type { ptr, %union.anon }
%union.anon = type { i64 }

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

; Function Attrs: nounwind uwtable
define dso_local noundef zeroext i1 @gravity_hash_compare(ptr nocapture noundef readonly %0, ptr nocapture noundef readonly %1, ptr noundef readonly %2, ptr noundef %3) local_unnamed_addr #2 {
  %5 = getelementptr inbounds i8, ptr %0, i64 4
  %6 = load i32, ptr %5, align 4, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %1, i64 4
  %8 = load i32, ptr %7, align 4, !tbaa !5
  %.not = icmp ne i32 %6, %8
  %.not106 = icmp eq ptr %2, null
  %or.cond = or i1 %.not106, %.not
  br i1 %or.cond, label %107, label %9

9:                                                ; preds = %4
  %10 = add i32 %6, 8
  %11 = zext i32 %10 to i64
  %12 = shl nuw nsw i64 %11, 4
  %malloc = tail call ptr @malloc(i64 %12)
  %malloc107 = tail call ptr @malloc(i64 %12)
  %malloc108 = tail call ptr @malloc(i64 %12)
  %malloc109 = tail call ptr @malloc(i64 %12)
  %13 = load i32, ptr %0, align 8, !tbaa !11
  %.not169 = icmp eq i32 %13, 0
  br i1 %.not169, label %.preheader125, label %.lr.ph

.lr.ph:                                           ; preds = %9
  %14 = getelementptr inbounds i8, ptr %0, i64 8
  br label %18

.preheader125.loopexit:                           ; preds = %.loopexit127
  %15 = trunc i64 %.sroa.063.2 to i32
  br label %.preheader125

.preheader125:                                    ; preds = %.preheader125.loopexit, %9
  %.sroa.1672.0.lcssa = phi ptr [ %malloc, %9 ], [ %.sroa.1672.3, %.preheader125.loopexit ]
  %.sroa.063.0.lcssa = phi i32 [ 0, %9 ], [ %15, %.preheader125.loopexit ]
  %.sroa.1557.0.lcssa = phi ptr [ %malloc108, %9 ], [ %.sroa.1557.3, %.preheader125.loopexit ]
  %16 = load i32, ptr %1, align 8, !tbaa !11
  %.not170 = icmp eq i32 %16, 0
  br i1 %.not170, label %._crit_edge, label %.lr.ph158

.lr.ph158:                                        ; preds = %.preheader125
  %17 = getelementptr inbounds i8, ptr %1, i64 8
  br label %51

18:                                               ; preds = %.lr.ph, %.loopexit127
  %19 = phi i32 [ %13, %.lr.ph ], [ %45, %.loopexit127 ]
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %.loopexit127 ]
  %.sroa.049.0140 = phi i64 [ 0, %.lr.ph ], [ %.sroa.049.2, %.loopexit127 ]
  %.sroa.651.0139 = phi i64 [ %11, %.lr.ph ], [ %.sroa.651.3, %.loopexit127 ]
  %.sroa.1557.0138 = phi ptr [ %malloc108, %.lr.ph ], [ %.sroa.1557.3, %.loopexit127 ]
  %.sroa.063.0137 = phi i64 [ 0, %.lr.ph ], [ %.sroa.063.2, %.loopexit127 ]
  %.sroa.766.0136 = phi i64 [ %11, %.lr.ph ], [ %.sroa.766.3, %.loopexit127 ]
  %.sroa.1672.0135 = phi ptr [ %malloc, %.lr.ph ], [ %.sroa.1672.3, %.loopexit127 ]
  %20 = load ptr, ptr %14, align 8, !tbaa !12
  %21 = getelementptr inbounds ptr, ptr %20, i64 %indvars.iv
  %22 = load ptr, ptr %21, align 8, !tbaa !13
  %.not119 = icmp eq ptr %22, null
  br i1 %.not119, label %.loopexit127, label %.preheader126

.preheader126:                                    ; preds = %18, %39
  %.098134 = phi ptr [ %44, %39 ], [ %22, %18 ]
  %.sroa.049.1133 = phi i64 [ %40, %39 ], [ %.sroa.049.0140, %18 ]
  %.sroa.651.1132 = phi i64 [ %.sroa.651.2, %39 ], [ %.sroa.651.0139, %18 ]
  %.sroa.1557.1131 = phi ptr [ %.sroa.1557.2, %39 ], [ %.sroa.1557.0138, %18 ]
  %.sroa.063.1130 = phi i64 [ %30, %39 ], [ %.sroa.063.0137, %18 ]
  %.sroa.766.1129 = phi i64 [ %.sroa.766.2, %39 ], [ %.sroa.766.0136, %18 ]
  %.sroa.1672.1128 = phi ptr [ %.sroa.1672.2, %39 ], [ %.sroa.1672.0135, %18 ]
  %23 = icmp eq i64 %.sroa.063.1130, %.sroa.766.1129
  br i1 %23, label %24, label %29

24:                                               ; preds = %.preheader126
  %.not121 = icmp eq i64 %.sroa.063.1130, 0
  %25 = shl i64 %.sroa.063.1130, 1
  %26 = select i1 %.not121, i64 8, i64 %25
  %27 = shl i64 %26, 4
  %28 = tail call ptr @realloc(ptr noundef %.sroa.1672.1128, i64 noundef %27) #5
  br label %29

29:                                               ; preds = %24, %.preheader126
  %.sroa.1672.2 = phi ptr [ %28, %24 ], [ %.sroa.1672.1128, %.preheader126 ]
  %.sroa.766.2 = phi i64 [ %26, %24 ], [ %.sroa.766.1129, %.preheader126 ]
  %30 = add i64 %.sroa.063.1130, 1
  %31 = getelementptr inbounds %struct.gravity_value_t, ptr %.sroa.1672.2, i64 %.sroa.063.1130
  %32 = getelementptr inbounds i8, ptr %.098134, i64 8
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %31, ptr noundef nonnull align 8 dereferenceable(16) %32, i64 16, i1 false), !tbaa.struct !14
  %33 = icmp eq i64 %.sroa.049.1133, %.sroa.651.1132
  br i1 %33, label %34, label %39

34:                                               ; preds = %29
  %.not122 = icmp eq i64 %.sroa.049.1133, 0
  %35 = shl i64 %.sroa.049.1133, 1
  %36 = select i1 %.not122, i64 8, i64 %35
  %37 = shl i64 %36, 4
  %38 = tail call ptr @realloc(ptr noundef %.sroa.1557.1131, i64 noundef %37) #5
  br label %39

39:                                               ; preds = %34, %29
  %.sroa.1557.2 = phi ptr [ %38, %34 ], [ %.sroa.1557.1131, %29 ]
  %.sroa.651.2 = phi i64 [ %36, %34 ], [ %.sroa.651.1132, %29 ]
  %40 = add i64 %.sroa.049.1133, 1
  %41 = getelementptr inbounds %struct.gravity_value_t, ptr %.sroa.1557.2, i64 %.sroa.049.1133
  %42 = getelementptr inbounds i8, ptr %.098134, i64 24
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %41, ptr noundef nonnull align 8 dereferenceable(16) %42, i64 16, i1 false), !tbaa.struct !14
  %43 = getelementptr inbounds i8, ptr %.098134, i64 40
  %44 = load ptr, ptr %43, align 8, !tbaa !16
  %.not120 = icmp eq ptr %44, null
  br i1 %.not120, label %.loopexit127.loopexit, label %.preheader126, !llvm.loop !19

.loopexit127.loopexit:                            ; preds = %39
  %.pre = load i32, ptr %0, align 8, !tbaa !11
  br label %.loopexit127

.loopexit127:                                     ; preds = %.loopexit127.loopexit, %18
  %45 = phi i32 [ %19, %18 ], [ %.pre, %.loopexit127.loopexit ]
  %.sroa.1672.3 = phi ptr [ %.sroa.1672.0135, %18 ], [ %.sroa.1672.2, %.loopexit127.loopexit ]
  %.sroa.766.3 = phi i64 [ %.sroa.766.0136, %18 ], [ %.sroa.766.2, %.loopexit127.loopexit ]
  %.sroa.063.2 = phi i64 [ %.sroa.063.0137, %18 ], [ %30, %.loopexit127.loopexit ]
  %.sroa.1557.3 = phi ptr [ %.sroa.1557.0138, %18 ], [ %.sroa.1557.2, %.loopexit127.loopexit ]
  %.sroa.651.3 = phi i64 [ %.sroa.651.0139, %18 ], [ %.sroa.651.2, %.loopexit127.loopexit ]
  %.sroa.049.2 = phi i64 [ %.sroa.049.0140, %18 ], [ %40, %.loopexit127.loopexit ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %46 = zext i32 %45 to i64
  %47 = icmp ult i64 %indvars.iv.next, %46
  br i1 %47, label %18, label %.preheader125.loopexit, !llvm.loop !21

._crit_edge.loopexit:                             ; preds = %.loopexit124
  %48 = trunc i64 %.sroa.036.2 to i32
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.preheader125
  %.sroa.16.0.lcssa = phi ptr [ %malloc107, %.preheader125 ], [ %.sroa.16.3, %._crit_edge.loopexit ]
  %.sroa.036.0.lcssa = phi i32 [ 0, %.preheader125 ], [ %48, %._crit_edge.loopexit ]
  %.sroa.15.0.lcssa = phi ptr [ %malloc109, %.preheader125 ], [ %.sroa.15.3, %._crit_edge.loopexit ]
  %.not110 = icmp eq i32 %.sroa.063.0.lcssa, %.sroa.036.0.lcssa
  %49 = icmp ne i32 %.sroa.063.0.lcssa, 0
  %or.cond196.not = and i1 %49, %.not110
  br i1 %or.cond196.not, label %.lr.ph163.preheader, label %.loopexit

.lr.ph163.preheader:                              ; preds = %._crit_edge
  %50 = zext i32 %.sroa.063.0.lcssa to i64
  br label %.lr.ph163

51:                                               ; preds = %.lr.ph158, %.loopexit124
  %52 = phi i32 [ %16, %.lr.ph158 ], [ %78, %.loopexit124 ]
  %indvars.iv175 = phi i64 [ 0, %.lr.ph158 ], [ %indvars.iv.next176, %.loopexit124 ]
  %.sroa.0.0156 = phi i64 [ 0, %.lr.ph158 ], [ %.sroa.0.2, %.loopexit124 ]
  %.sroa.6.0155 = phi i64 [ %11, %.lr.ph158 ], [ %.sroa.6.3, %.loopexit124 ]
  %.sroa.15.0154 = phi ptr [ %malloc109, %.lr.ph158 ], [ %.sroa.15.3, %.loopexit124 ]
  %.sroa.036.0153 = phi i64 [ 0, %.lr.ph158 ], [ %.sroa.036.2, %.loopexit124 ]
  %.sroa.7.0152 = phi i64 [ %11, %.lr.ph158 ], [ %.sroa.7.3, %.loopexit124 ]
  %.sroa.16.0151 = phi ptr [ %malloc107, %.lr.ph158 ], [ %.sroa.16.3, %.loopexit124 ]
  %53 = load ptr, ptr %17, align 8, !tbaa !12
  %54 = getelementptr inbounds ptr, ptr %53, i64 %indvars.iv175
  %55 = load ptr, ptr %54, align 8, !tbaa !13
  %.not115 = icmp eq ptr %55, null
  br i1 %.not115, label %.loopexit124, label %.preheader123

.preheader123:                                    ; preds = %51, %72
  %.096150 = phi ptr [ %77, %72 ], [ %55, %51 ]
  %.sroa.0.1149 = phi i64 [ %73, %72 ], [ %.sroa.0.0156, %51 ]
  %.sroa.6.1148 = phi i64 [ %.sroa.6.2, %72 ], [ %.sroa.6.0155, %51 ]
  %.sroa.15.1147 = phi ptr [ %.sroa.15.2, %72 ], [ %.sroa.15.0154, %51 ]
  %.sroa.036.1146 = phi i64 [ %63, %72 ], [ %.sroa.036.0153, %51 ]
  %.sroa.7.1145 = phi i64 [ %.sroa.7.2, %72 ], [ %.sroa.7.0152, %51 ]
  %.sroa.16.1144 = phi ptr [ %.sroa.16.2, %72 ], [ %.sroa.16.0151, %51 ]
  %56 = icmp eq i64 %.sroa.036.1146, %.sroa.7.1145
  br i1 %56, label %57, label %62

57:                                               ; preds = %.preheader123
  %.not117 = icmp eq i64 %.sroa.036.1146, 0
  %58 = shl i64 %.sroa.036.1146, 1
  %59 = select i1 %.not117, i64 8, i64 %58
  %60 = shl i64 %59, 4
  %61 = tail call ptr @realloc(ptr noundef %.sroa.16.1144, i64 noundef %60) #5
  br label %62

62:                                               ; preds = %57, %.preheader123
  %.sroa.16.2 = phi ptr [ %61, %57 ], [ %.sroa.16.1144, %.preheader123 ]
  %.sroa.7.2 = phi i64 [ %59, %57 ], [ %.sroa.7.1145, %.preheader123 ]
  %63 = add i64 %.sroa.036.1146, 1
  %64 = getelementptr inbounds %struct.gravity_value_t, ptr %.sroa.16.2, i64 %.sroa.036.1146
  %65 = getelementptr inbounds i8, ptr %.096150, i64 8
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %64, ptr noundef nonnull align 8 dereferenceable(16) %65, i64 16, i1 false), !tbaa.struct !14
  %66 = icmp eq i64 %.sroa.0.1149, %.sroa.6.1148
  br i1 %66, label %67, label %72

67:                                               ; preds = %62
  %.not118 = icmp eq i64 %.sroa.0.1149, 0
  %68 = shl i64 %.sroa.0.1149, 1
  %69 = select i1 %.not118, i64 8, i64 %68
  %70 = shl i64 %69, 4
  %71 = tail call ptr @realloc(ptr noundef %.sroa.15.1147, i64 noundef %70) #5
  br label %72

72:                                               ; preds = %67, %62
  %.sroa.15.2 = phi ptr [ %71, %67 ], [ %.sroa.15.1147, %62 ]
  %.sroa.6.2 = phi i64 [ %69, %67 ], [ %.sroa.6.1148, %62 ]
  %73 = add i64 %.sroa.0.1149, 1
  %74 = getelementptr inbounds %struct.gravity_value_t, ptr %.sroa.15.2, i64 %.sroa.0.1149
  %75 = getelementptr inbounds i8, ptr %.096150, i64 24
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %74, ptr noundef nonnull align 8 dereferenceable(16) %75, i64 16, i1 false), !tbaa.struct !14
  %76 = getelementptr inbounds i8, ptr %.096150, i64 40
  %77 = load ptr, ptr %76, align 8, !tbaa !16
  %.not116 = icmp eq ptr %77, null
  br i1 %.not116, label %.loopexit124.loopexit, label %.preheader123, !llvm.loop !22

.loopexit124.loopexit:                            ; preds = %72
  %.pre181 = load i32, ptr %1, align 8, !tbaa !11
  br label %.loopexit124

.loopexit124:                                     ; preds = %.loopexit124.loopexit, %51
  %78 = phi i32 [ %52, %51 ], [ %.pre181, %.loopexit124.loopexit ]
  %.sroa.16.3 = phi ptr [ %.sroa.16.0151, %51 ], [ %.sroa.16.2, %.loopexit124.loopexit ]
  %.sroa.7.3 = phi i64 [ %.sroa.7.0152, %51 ], [ %.sroa.7.2, %.loopexit124.loopexit ]
  %.sroa.036.2 = phi i64 [ %.sroa.036.0153, %51 ], [ %63, %.loopexit124.loopexit ]
  %.sroa.15.3 = phi ptr [ %.sroa.15.0154, %51 ], [ %.sroa.15.2, %.loopexit124.loopexit ]
  %.sroa.6.3 = phi i64 [ %.sroa.6.0155, %51 ], [ %.sroa.6.2, %.loopexit124.loopexit ]
  %.sroa.0.2 = phi i64 [ %.sroa.0.0156, %51 ], [ %73, %.loopexit124.loopexit ]
  %indvars.iv.next176 = add nuw nsw i64 %indvars.iv175, 1
  %79 = zext i32 %78 to i64
  %80 = icmp ult i64 %indvars.iv.next176, %79
  br i1 %80, label %51, label %._crit_edge.loopexit, !llvm.loop !23

81:                                               ; preds = %91
  %indvars.iv.next179 = add nuw nsw i64 %indvars.iv178, 1
  %exitcond = icmp eq i64 %indvars.iv.next179, %50
  br i1 %exitcond, label %.loopexit.thread, label %.lr.ph163, !llvm.loop !24

.lr.ph163:                                        ; preds = %.lr.ph163.preheader, %81
  %indvars.iv178 = phi i64 [ 0, %.lr.ph163.preheader ], [ %indvars.iv.next179, %81 ]
  %82 = getelementptr inbounds %struct.gravity_value_t, ptr %.sroa.1672.0.lcssa, i64 %indvars.iv178
  %83 = getelementptr inbounds %struct.gravity_value_t, ptr %.sroa.16.0.lcssa, i64 %indvars.iv178
  %84 = load ptr, ptr %82, align 8
  %85 = getelementptr inbounds i8, ptr %82, i64 8
  %86 = load i64, ptr %85, align 8
  %87 = load ptr, ptr %83, align 8
  %88 = getelementptr inbounds i8, ptr %83, i64 8
  %89 = load i64, ptr %88, align 8
  %90 = tail call zeroext i1 %2(ptr %84, i64 %86, ptr %87, i64 %89, ptr noundef %3) #6
  br i1 %90, label %91, label %.loopexit.thread

91:                                               ; preds = %.lr.ph163
  %92 = getelementptr inbounds %struct.gravity_value_t, ptr %.sroa.1557.0.lcssa, i64 %indvars.iv178
  %93 = getelementptr inbounds %struct.gravity_value_t, ptr %.sroa.15.0.lcssa, i64 %indvars.iv178
  %94 = load ptr, ptr %92, align 8
  %95 = getelementptr inbounds i8, ptr %92, i64 8
  %96 = load i64, ptr %95, align 8
  %97 = load ptr, ptr %93, align 8
  %98 = getelementptr inbounds i8, ptr %93, i64 8
  %99 = load i64, ptr %98, align 8
  %100 = tail call zeroext i1 %2(ptr %94, i64 %96, ptr %97, i64 %99, ptr noundef %3) #6
  br i1 %100, label %81, label %.loopexit.thread

.loopexit:                                        ; preds = %._crit_edge
  %.not111 = icmp eq ptr %.sroa.1672.0.lcssa, null
  br i1 %.not111, label %101, label %.loopexit.thread

.loopexit.thread:                                 ; preds = %91, %.lr.ph163, %81, %.loopexit
  %.095184 = phi i1 [ %.not110, %.loopexit ], [ false, %91 ], [ false, %.lr.ph163 ], [ true, %81 ]
  tail call void @free(ptr noundef nonnull %.sroa.1672.0.lcssa) #6
  br label %101

101:                                              ; preds = %.loopexit.thread, %.loopexit
  %.095185 = phi i1 [ %.095184, %.loopexit.thread ], [ %.not110, %.loopexit ]
  %.not112 = icmp eq ptr %.sroa.16.0.lcssa, null
  br i1 %.not112, label %103, label %102

102:                                              ; preds = %101
  tail call void @free(ptr noundef nonnull %.sroa.16.0.lcssa) #6
  br label %103

103:                                              ; preds = %102, %101
  %.not113 = icmp eq ptr %.sroa.1557.0.lcssa, null
  br i1 %.not113, label %105, label %104

104:                                              ; preds = %103
  tail call void @free(ptr noundef nonnull %.sroa.1557.0.lcssa) #6
  br label %105

105:                                              ; preds = %104, %103
  %.not114 = icmp eq ptr %.sroa.15.0.lcssa, null
  br i1 %.not114, label %107, label %106

106:                                              ; preds = %105
  tail call void @free(ptr noundef nonnull %.sroa.15.0.lcssa) #6
  br label %107

107:                                              ; preds = %106, %105, %4
  %.1 = phi i1 [ false, %4 ], [ %.095185, %105 ], [ %.095185, %106 ]
  ret i1 %.1
}

; Function Attrs: mustprogress nounwind willreturn allockind("realloc") allocsize(1) memory(argmem: readwrite, inaccessiblemem: readwrite)
declare noalias noundef ptr @realloc(ptr allocptr nocapture noundef, i64 noundef) local_unnamed_addr #3

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

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

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

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


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