; LLVM IR from AngelPn/DBMS-Simulator :: src (SHT)

; 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.SHT_info = type { i32, i32, ptr, ptr, i32, i64, i32 }
%struct.SecondaryRecord = type { %struct.record, i32 }
%struct.record = type { i32, [15 x i8], [25 x i8], [50 x i8] }
%struct.SHTrecord = type { [25 x i8], i32 }

@.str.2 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [20 x i8], align 1

declare void @BF_PrintError(ptr noundef) #0

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

declare i32 @BF_AllocateBlock(i32 noundef) #0

declare i32 @BF_ReadBlock(i32 noundef, i32 noundef, ptr noundef) #0

declare i32 @BF_GetBlockCounter(i32 noundef) #0

; Function Attrs: nounwind
declare ptr @strcpy(ptr noundef, ptr noundef) #2

; 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) #3

declare i32 @BF_WriteBlock(i32 noundef, i32 noundef) #0

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @sht_hash(i64 noundef, ptr noundef) #4

; Function Attrs: nounwind uwtable
define dso_local i32 @SHT_SecondaryInsertEntry(ptr noundef byval(%struct.SHT_info) align 8 %0, ptr noundef byval(%struct.SecondaryRecord) align 8 %1) #4 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca ptr, align 8
  %18 = alloca i32, align 4
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca ptr, align 8
  %22 = alloca %struct.SHTrecord, align 4
  %23 = alloca ptr, align 8
  %24 = alloca ptr, align 8
  %25 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #7
  %26 = getelementptr inbounds %struct.SecondaryRecord, ptr %1, i32 0, i32 0
  %27 = getelementptr inbounds %struct.SHT_info, ptr %0, i32 0, i32 3
  %28 = load ptr, ptr %27, align 8, !tbaa !5
  %29 = call ptr @get_key(ptr noundef %26, ptr noundef %28)
  store ptr %29, ptr %4, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  %30 = getelementptr inbounds %struct.SHT_info, ptr %0, i32 0, i32 5
  %31 = load i64, ptr %30, align 8, !tbaa !13
  %32 = load ptr, ptr %4, align 8, !tbaa !12
  %33 = call i32 @sht_hash(i64 noundef %31, ptr noundef %32)
  store i32 %33, ptr %5, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  store ptr null, ptr %6, align 8, !tbaa !12
  %34 = getelementptr inbounds %struct.SHT_info, ptr %0, i32 0, i32 1
  %35 = load i32, ptr %34, align 4, !tbaa !15
  %36 = getelementptr inbounds %struct.SHT_info, ptr %0, i32 0, i32 6
  %37 = load i32, ptr %36, align 8, !tbaa !16
  %38 = call i32 @BF_ReadBlock(i32 noundef %35, i32 noundef %37, ptr noundef %6)
  %39 = icmp slt i32 %38, 0
  br i1 %39, label %40, label %41

40:                                               ; preds = %2
  call void @BF_PrintError(ptr noundef @.str.3)
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %256

41:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  %42 = load ptr, ptr %6, align 8, !tbaa !12
  %43 = getelementptr inbounds i8, ptr %42, i64 512
  %44 = getelementptr inbounds i8, ptr %43, i64 -4
  %45 = load i32, ptr %44, align 4, !tbaa !14
  store i32 %45, ptr %8, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  store ptr null, ptr %9, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  store i32 127, ptr %10, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  store i32 -1, ptr %11, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  br label %46

46:                                               ; preds = %81, %41
  %47 = load i32, ptr %8, align 4, !tbaa !14
  %48 = icmp ne i32 %47, -1
  br i1 %48, label %49, label %86

49:                                               ; preds = %46
  %50 = getelementptr inbounds %struct.SHT_info, ptr %0, i32 0, i32 1
  %51 = load i32, ptr %50, align 4, !tbaa !15
  %52 = load i32, ptr %8, align 4, !tbaa !14
  %53 = call i32 @BF_ReadBlock(i32 noundef %51, i32 noundef %52, ptr noundef %9)
  %54 = icmp slt i32 %53, 0
  br i1 %54, label %55, label %56

55:                                               ; preds = %49
  call void @BF_PrintError(ptr noundef @.str.3)
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %255

56:                                               ; preds = %49
  store i32 0, ptr %12, align 4, !tbaa !14
  br label %57

57:                                               ; preds = %69, %56
  %58 = load i32, ptr %12, align 4, !tbaa !14
  %59 = load i32, ptr %10, align 4, !tbaa !14
  %60 = icmp slt i32 %58, %59
  br i1 %60, label %61, label %72

61:                                               ; preds = %57
  %62 = load i32, ptr %11, align 4, !tbaa !14
  %63 = add nsw i32 %62, 1
  store i32 %63, ptr %11, align 4, !tbaa !14
  %64 = load i32, ptr %5, align 4, !tbaa !14
  %65 = load i32, ptr %11, align 4, !tbaa !14
  %66 = icmp eq i32 %64, %65
  br i1 %66, label %67, label %68

67:                                               ; preds = %61
  br label %72

68:                                               ; preds = %61
  br label %69

69:                                               ; preds = %68
  %70 = load i32, ptr %12, align 4, !tbaa !14
  %71 = add nsw i32 %70, 1
  store i32 %71, ptr %12, align 4, !tbaa !14
  br label %57, !llvm.loop !17

72:                                               ; preds = %67, %57
  %73 = load i32, ptr %5, align 4, !tbaa !14
  %74 = load i32, ptr %11, align 4, !tbaa !14
  %75 = icmp eq i32 %73, %74
  br i1 %75, label %76, label %81

76:                                               ; preds = %72
  %77 = load i32, ptr %12, align 4, !tbaa !14
  %78 = sext i32 %77 to i64
  %79 = mul i64 %78, 4
  %80 = trunc i64 %79 to i32
  store i32 %80, ptr %5, align 4, !tbaa !14
  br label %86

81:                                               ; preds = %72
  %82 = load ptr, ptr %9, align 8, !tbaa !12
  %83 = getelementptr inbounds i8, ptr %82, i64 512
  %84 = getelementptr inbounds i8, ptr %83, i64 -4
  %85 = load i32, ptr %84, align 4, !tbaa !14
  store i32 %85, ptr %8, align 4, !tbaa !14
  br label %46, !llvm.loop !19

86:                                               ; preds = %76, %46
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  store i32 0, ptr %13, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  store i32 -1, ptr %14, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  %87 = load i32, ptr %8, align 4, !tbaa !14
  store i32 %87, ptr %15, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  %88 = load ptr, ptr %9, align 8, !tbaa !12
  %89 = load i32, ptr %5, align 4, !tbaa !14
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds i8, ptr %88, i64 %90
  %92 = load i32, ptr %91, align 4, !tbaa !14
  store i32 %92, ptr %16, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  store ptr null, ptr %17, align 8, !tbaa !12
  br label %93

93:                                               ; preds = %156, %86
  %94 = load i32, ptr %16, align 4, !tbaa !14
  %95 = icmp ne i32 %94, -1
  br i1 %95, label %96, label %162

96:                                               ; preds = %93
  %97 = getelementptr inbounds %struct.SHT_info, ptr %0, i32 0, i32 1
  %98 = load i32, ptr %97, align 4, !tbaa !15
  %99 = load i32, ptr %16, align 4, !tbaa !14
  %100 = call i32 @BF_ReadBlock(i32 noundef %98, i32 noundef %99, ptr noundef %17)
  %101 = icmp slt i32 %100, 0
  br i1 %101, label %102, label %103

102:                                              ; preds = %96
  call void @BF_PrintError(ptr noundef @.str.3)
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %254

103:                                              ; preds = %96
  %104 = load ptr, ptr %17, align 8, !tbaa !12
  %105 = getelementptr inbounds i8, ptr %104, i64 512
  %106 = getelementptr inbounds i8, ptr %105, i64 -4
  %107 = load i32, ptr %106, align 4, !tbaa !14
  store i32 %107, ptr %13, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  store i32 0, ptr %18, align 4, !tbaa !14
  br label %108

108:                                              ; preds = %145, %103
  %109 = load i32, ptr %18, align 4, !tbaa !14
  %110 = load i32, ptr %13, align 4, !tbaa !14
  %111 = icmp slt i32 %109, %110
  br i1 %111, label %113, label %112

112:                                              ; preds = %108
  store i32 9, ptr %7, align 4
  br label %148

113:                                              ; preds = %108
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  %114 = load ptr, ptr %17, align 8, !tbaa !12
  %115 = load i32, ptr %18, align 4, !tbaa !14
  %116 = sext i32 %115 to i64
  %117 = mul i64 %116, 32
  %118 = getelementptr inbounds i8, ptr %114, i64 %117
  store ptr %118, ptr %19, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #7
  %119 = getelementptr inbounds %struct.SecondaryRecord, ptr %1, i32 0, i32 0
  %120 = getelementptr inbounds %struct.SHT_info, ptr %0, i32 0, i32 3
  %121 = load ptr, ptr %120, align 8, !tbaa !5
  %122 = call ptr @get_key(ptr noundef %119, ptr noundef %121)
  store ptr %122, ptr %20, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #7
  %123 = load ptr, ptr %19, align 8, !tbaa !12
  %124 = getelementptr inbounds %struct.SHTrecord, ptr %123, i32 0, i32 0
  %125 = getelementptr inbounds [25 x i8], ptr %124, i64 0, i64 0
  store ptr %125, ptr %21, align 8, !tbaa !12
  %126 = load ptr, ptr %20, align 8, !tbaa !12
  %127 = load ptr, ptr %21, align 8, !tbaa !12
  %128 = getelementptr inbounds %struct.SHT_info, ptr %0, i32 0, i32 4
  %129 = load i32, ptr %128, align 8, !tbaa !20
  %130 = sext i32 %129 to i64
  %131 = call i32 @memcmp(ptr noundef %126, ptr noundef %127, i64 noundef %130) #8
  %132 = icmp eq i32 %131, 0
  br i1 %132, label %133, label %141

133:                                              ; preds = %113
  %134 = getelementptr inbounds %struct.SecondaryRecord, ptr %1, i32 0, i32 1
  %135 = load i32, ptr %134, align 8, !tbaa !21
  %136 = load ptr, ptr %19, align 8, !tbaa !12
  %137 = getelementptr inbounds %struct.SHTrecord, ptr %136, i32 0, i32 1
  %138 = load i32, ptr %137, align 4, !tbaa !24
  %139 = icmp eq i32 %135, %138
  br i1 %139, label %140, label %141

140:                                              ; preds = %133
  store i32 0, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %142

141:                                              ; preds = %133, %113
  store i32 0, ptr %7, align 4
  br label %142

142:                                              ; preds = %141, %140
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  %143 = load i32, ptr %7, align 4
  switch i32 %143, label %148 [
    i32 0, label %144
  ]

144:                                              ; preds = %142
  br label %145

145:                                              ; preds = %144
  %146 = load i32, ptr %18, align 4, !tbaa !14
  %147 = add nsw i32 %146, 1
  store i32 %147, ptr %18, align 4, !tbaa !14
  br label %108, !llvm.loop !26

148:                                              ; preds = %142, %112
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  %149 = load i32, ptr %7, align 4
  switch i32 %149, label %254 [
    i32 9, label %150
  ]

150:                                              ; preds = %148
  %151 = load i32, ptr %13, align 4, !tbaa !14
  %152 = sext i32 %151 to i64
  %153 = icmp ult i64 %152, 15
  br i1 %153, label %154, label %156

154:                                              ; preds = %150
  %155 = load i32, ptr %16, align 4, !tbaa !14
  store i32 %155, ptr %14, align 4, !tbaa !14
  br label %156

156:                                              ; preds = %154, %150
  %157 = load i32, ptr %16, align 4, !tbaa !14
  store i32 %157, ptr %15, align 4, !tbaa !14
  %158 = load ptr, ptr %17, align 8, !tbaa !12
  %159 = getelementptr inbounds i8, ptr %158, i64 512
  %160 = getelementptr inbounds i8, ptr %159, i64 -8
  %161 = load i32, ptr %160, align 4, !tbaa !14
  store i32 %161, ptr %16, align 4, !tbaa !14
  store i32 504, ptr %5, align 4, !tbaa !14
  br label %93, !llvm.loop !27

162:                                              ; preds = %93
  call void @llvm.lifetime.start.p0(i64 32, ptr %22) #7
  call void @llvm.memset.p0.i64(ptr align 4 %22, i8 0, i64 32, i1 false)
  %163 = getelementptr inbounds %struct.SHTrecord, ptr %22, i32 0, i32 0
  %164 = getelementptr inbounds %struct.SHTrecord, ptr %22, i32 0, i32 1
  %165 = getelementptr inbounds %struct.SecondaryRecord, ptr %1, i32 0, i32 1
  %166 = load i32, ptr %165, align 8, !tbaa !21
  store i32 %166, ptr %164, align 4, !tbaa !24
  %167 = getelementptr inbounds %struct.SHTrecord, ptr %22, i32 0, i32 0
  %168 = getelementptr inbounds [25 x i8], ptr %167, i64 0, i64 0
  %169 = getelementptr inbounds %struct.SecondaryRecord, ptr %1, i32 0, i32 0
  %170 = getelementptr inbounds %struct.record, ptr %169, i32 0, i32 2
  %171 = getelementptr inbounds [25 x i8], ptr %170, i64 0, i64 0
  %172 = call ptr @strcpy(ptr noundef %168, ptr noundef %171) #7
  %173 = load i32, ptr %14, align 4, !tbaa !14
  %174 = icmp eq i32 %173, -1
  br i1 %174, label %175, label %222

175:                                              ; preds = %162
  %176 = getelementptr inbounds %struct.SHT_info, ptr %0, i32 0, i32 1
  %177 = load i32, ptr %176, align 4, !tbaa !15
  %178 = call i32 @BF_AllocateBlock(i32 noundef %177)
  %179 = icmp slt i32 %178, 0
  br i1 %179, label %180, label %181

180:                                              ; preds = %175
  call void @BF_PrintError(ptr noundef @.str.2)
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %253

181:                                              ; preds = %175
  %182 = getelementptr inbounds %struct.SHT_info, ptr %0, i32 0, i32 1
  %183 = load i32, ptr %182, align 4, !tbaa !15
  %184 = call i32 @BF_GetBlockCounter(i32 noundef %183)
  %185 = sub nsw i32 %184, 1
  store i32 %185, ptr %16, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #7
  %186 = getelementptr inbounds %struct.SHT_info, ptr %0, i32 0, i32 1
  %187 = load i32, ptr %186, align 4, !tbaa !15
  %188 = load i32, ptr %16, align 4, !tbaa !14
  %189 = call i32 @BF_ReadBlock(i32 noundef %187, i32 noundef %188, ptr noundef %23)
  %190 = icmp slt i32 %189, 0
  br i1 %190, label %191, label %192

191:                                              ; preds = %181
  call void @BF_PrintError(ptr noundef @.str.3)
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %219

192:                                              ; preds = %181
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #7
  %193 = getelementptr inbounds %struct.SHT_info, ptr %0, i32 0, i32 1
  %194 = load i32, ptr %193, align 4, !tbaa !15
  %195 = load i32, ptr %15, align 4, !tbaa !14
  %196 = call i32 @BF_ReadBlock(i32 noundef %194, i32 noundef %195, ptr noundef %24)
  %197 = icmp slt i32 %196, 0
  br i1 %197, label %198, label %199

198:                                              ; preds = %192
  call void @BF_PrintError(ptr noundef @.str.3)
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %218

199:                                              ; preds = %192
  %200 = load ptr, ptr %24, align 8, !tbaa !12
  %201 = load i32, ptr %5, align 4, !tbaa !14
  %202 = sext i32 %201 to i64
  %203 = getelementptr inbounds i8, ptr %200, i64 %202
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %203, ptr align 4 %16, i64 4, i1 false)
  %204 = getelementptr inbounds %struct.SHT_info, ptr %0, i32 0, i32 1
  %205 = load i32, ptr %204, align 4, !tbaa !15
  %206 = load i32, ptr %15, align 4, !tbaa !14
  %207 = call i32 @BF_WriteBlock(i32 noundef %205, i32 noundef %206)
  %208 = icmp slt i32 %207, 0
  br i1 %208, label %209, label %210

209:                                              ; preds = %199
  call void @BF_PrintError(ptr noundef @.str.5)
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %218

210:                                              ; preds = %199
  %211 = load ptr, ptr %23, align 8, !tbaa !12
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %211, ptr align 4 %22, i64 32, i1 false)
  store i32 1, ptr %13, align 4, !tbaa !14
  %212 = load ptr, ptr %23, align 8, !tbaa !12
  %213 = getelementptr inbounds i8, ptr %212, i64 512
  %214 = getelementptr inbounds i8, ptr %213, i64 -4
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %214, ptr align 4 %13, i64 4, i1 false)
  store i32 -1, ptr %13, align 4, !tbaa !14
  %215 = load ptr, ptr %23, align 8, !tbaa !12
  %216 = getelementptr inbounds i8, ptr %215, i64 512
  %217 = getelementptr inbounds i8, ptr %216, i64 -8
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %217, ptr align 4 %13, i64 4, i1 false)
  store i32 0, ptr %7, align 4
  br label %218

218:                                              ; preds = %210, %209, %198
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  br label %219

219:                                              ; preds = %218, %191
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #7
  %220 = load i32, ptr %7, align 4
  switch i32 %220, label %253 [
    i32 0, label %221
  ]

221:                                              ; preds = %219
  br label %245

222:                                              ; preds = %162
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #7
  %223 = getelementptr inbounds %struct.SHT_info, ptr %0, i32 0, i32 1
  %224 = load i32, ptr %223, align 4, !tbaa !15
  %225 = load i32, ptr %14, align 4, !tbaa !14
  %226 = call i32 @BF_ReadBlock(i32 noundef %224, i32 noundef %225, ptr noundef %25)
  %227 = icmp slt i32 %226, 0
  br i1 %227, label %228, label %229

228:                                              ; preds = %222
  call void @BF_PrintError(ptr noundef @.str.3)
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %242

229:                                              ; preds = %222
  %230 = load i32, ptr %13, align 4, !tbaa !14
  %231 = add nsw i32 %230, 1
  store i32 %231, ptr %13, align 4, !tbaa !14
  %232 = load ptr, ptr %25, align 8, !tbaa !12
  %233 = getelementptr inbounds i8, ptr %232, i64 512
  %234 = getelementptr inbounds i8, ptr %233, i64 -4
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %234, ptr align 4 %13, i64 4, i1 false)
  %235 = load ptr, ptr %25, align 8, !tbaa !12
  %236 = load i32, ptr %13, align 4, !tbaa !14
  %237 = sub nsw i32 %236, 1
  %238 = sext i32 %237 to i64
  %239 = mul i64 %238, 32
  %240 = getelementptr inbounds i8, ptr %235, i64 %239
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %240, ptr align 4 %22, i64 32, i1 false)
  %241 = load i32, ptr %14, align 4, !tbaa !14
  store i32 %241, ptr %16, align 4, !tbaa !14
  store i32 0, ptr %7, align 4
  br label %242

242:                                              ; preds = %229, %228
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #7
  %243 = load i32, ptr %7, align 4
  switch i32 %243, label %253 [
    i32 0, label %244
  ]

244:                                              ; preds = %242
  br label %245

245:                                              ; preds = %244, %221
  %246 = getelementptr inbounds %struct.SHT_info, ptr %0, i32 0, i32 1
  %247 = load i32, ptr %246, align 4, !tbaa !15
  %248 = load i32, ptr %16, align 4, !tbaa !14
  %249 = call i32 @BF_WriteBlock(i32 noundef %247, i32 noundef %248)
  %250 = icmp slt i32 %249, 0
  br i1 %250, label %251, label %252

251:                                              ; preds = %245
  call void @BF_PrintError(ptr noundef @.str.5)
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %253

252:                                              ; preds = %245
  store i32 0, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %253

253:                                              ; preds = %252, %251, %242, %219, %180
  call void @llvm.lifetime.end.p0(i64 32, ptr %22) #7
  br label %254

254:                                              ; preds = %253, %148, %102
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  br label %255

255:                                              ; preds = %254, %55
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  br label %256

256:                                              ; preds = %255, %40
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #7
  %257 = load i32, ptr %3, align 4
  ret i32 %257
}

declare ptr @get_key(ptr noundef, ptr noundef) #0

; Function Attrs: nounwind willreturn memory(read)
declare i32 @memcmp(ptr noundef, ptr noundef, i64 noundef) #5

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

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

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

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


; 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.SHT_info = type { i32, i32, ptr, ptr, i32, i64, i32 }
%struct.SecondaryRecord = type { %struct.record, i32 }
%struct.record = type { i32, [15 x i8], [25 x i8], [50 x i8] }
%struct.SHTrecord = type { [25 x i8], i32 }

@.str.2 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [20 x i8], align 1

declare void @BF_PrintError(ptr noundef) local_unnamed_addr #0

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

declare i32 @BF_AllocateBlock(i32 noundef) local_unnamed_addr #0

declare i32 @BF_ReadBlock(i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #0

declare i32 @BF_GetBlockCounter(i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: readwrite)
declare ptr @strcpy(ptr noalias noundef returned writeonly, ptr noalias nocapture noundef readonly) local_unnamed_addr #2

; 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) #3

declare i32 @BF_WriteBlock(i32 noundef, i32 noundef) local_unnamed_addr #0

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @sht_hash(i64 noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @SHT_SecondaryInsertEntry(ptr nocapture noundef readonly byval(%struct.SHT_info) align 8 %0, ptr noundef byval(%struct.SecondaryRecord) align 8 %1) local_unnamed_addr #4 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca %struct.SHTrecord, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = getelementptr inbounds i8, ptr %0, i64 16
  %11 = load ptr, ptr %10, align 8, !tbaa !5
  %12 = call ptr @get_key(ptr noundef nonnull %1, ptr noundef %11) #8
  %13 = getelementptr inbounds i8, ptr %0, i64 32
  %14 = load i64, ptr %13, align 8, !tbaa !12
  %15 = call i32 @sht_hash(i64 noundef %14, ptr noundef %12)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #8
  store ptr null, ptr %3, align 8, !tbaa !13
  %16 = getelementptr inbounds i8, ptr %0, i64 4
  %17 = load i32, ptr %16, align 4, !tbaa !14
  %18 = getelementptr inbounds i8, ptr %0, i64 40
  %19 = load i32, ptr %18, align 8, !tbaa !15
  %20 = call i32 @BF_ReadBlock(i32 noundef %17, i32 noundef %19, ptr noundef nonnull %3) #8
  %21 = icmp slt i32 %20, 0
  br i1 %21, label %22, label %23

22:                                               ; preds = %2
  call void @BF_PrintError(ptr noundef nonnull @.str.3) #8
  br label %124

23:                                               ; preds = %2
  %24 = load ptr, ptr %3, align 8, !tbaa !13
  %25 = getelementptr inbounds i8, ptr %24, i64 508
  %26 = load i32, ptr %25, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #8
  store ptr null, ptr %4, align 8, !tbaa !13
  %.not94 = icmp ne i32 %26, -1
  call void @llvm.assume(i1 %.not94)
  br label %.lr.ph

.lr.ph:                                           ; preds = %23, %47
  %.06396 = phi i32 [ %34, %47 ], [ -1, %23 ]
  %.06695 = phi i32 [ %50, %47 ], [ %26, %23 ]
  %27 = call i32 @BF_ReadBlock(i32 noundef %17, i32 noundef %.06695, ptr noundef nonnull %4) #8
  %28 = icmp slt i32 %27, 0
  br i1 %28, label %29, label %.preheader

29:                                               ; preds = %.lr.ph
  call void @BF_PrintError(ptr noundef nonnull @.str.3) #8
  br label %123

.preheader:                                       ; preds = %.lr.ph, %39
  %.06293 = phi i32 [ %40, %39 ], [ 0, %.lr.ph ]
  %.16492 = phi i32 [ %37, %39 ], [ %.06396, %.lr.ph ]
  %30 = add nsw i32 %.16492, 1
  %31 = icmp eq i32 %15, %30
  br i1 %31, label %.thread118.loopexit, label %.preheader.1

.preheader.1:                                     ; preds = %.preheader
  %32 = add nsw i32 %.16492, 2
  %33 = icmp eq i32 %15, %32
  br i1 %33, label %.thread118.loopexit.split.loop.exit163, label %.preheader.2

.preheader.2:                                     ; preds = %.preheader.1
  %34 = add nsw i32 %.16492, 3
  %35 = icmp eq i32 %15, %34
  br i1 %35, label %.thread118.loopexit.split.loop.exit160, label %36

36:                                               ; preds = %.preheader.2
  %exitcond.not.2 = icmp eq i32 %.06293, 124
  br i1 %exitcond.not.2, label %41, label %.preheader.3, !llvm.loop !17

.preheader.3:                                     ; preds = %36
  %37 = add nsw i32 %.16492, 4
  %38 = icmp eq i32 %15, %37
  br i1 %38, label %.thread118.loopexit.split.loop.exit, label %39

39:                                               ; preds = %.preheader.3
  %40 = add nuw nsw i32 %.06293, 4
  br label %.preheader

41:                                               ; preds = %36
  %42 = icmp eq i32 %15, %34
  br i1 %42, label %.thread118, label %47

.thread118.loopexit.split.loop.exit:              ; preds = %.preheader.3
  %43 = or disjoint i32 %.06293, 3
  br label %.thread118.loopexit

.thread118.loopexit.split.loop.exit160:           ; preds = %.preheader.2
  %44 = or disjoint i32 %.06293, 2
  br label %.thread118.loopexit

.thread118.loopexit.split.loop.exit163:           ; preds = %.preheader.1
  %45 = or disjoint i32 %.06293, 1
  br label %.thread118.loopexit

.thread118.loopexit:                              ; preds = %.preheader, %.thread118.loopexit.split.loop.exit163, %.thread118.loopexit.split.loop.exit160, %.thread118.loopexit.split.loop.exit
  %.06293.lcssa = phi i32 [ %43, %.thread118.loopexit.split.loop.exit ], [ %44, %.thread118.loopexit.split.loop.exit160 ], [ %45, %.thread118.loopexit.split.loop.exit163 ], [ %.06293, %.preheader ]
  %46 = shl i32 %.06293.lcssa, 2
  br label %.thread118

.thread118:                                       ; preds = %41, %.thread118.loopexit
  %.062.lcssa121 = phi i32 [ %46, %.thread118.loopexit ], [ 508, %41 ]
  %.pre = load ptr, ptr %4, align 8, !tbaa !13
  br label %.loopexit80

47:                                               ; preds = %41
  %48 = load ptr, ptr %4, align 8, !tbaa !13
  %49 = getelementptr inbounds i8, ptr %48, i64 508
  %50 = load i32, ptr %49, align 4, !tbaa !16
  %.not = icmp eq i32 %50, -1
  br i1 %.not, label %.loopexit80, label %.lr.ph, !llvm.loop !19

.loopexit80:                                      ; preds = %47, %.thread118
  %51 = phi ptr [ %.pre, %.thread118 ], [ %48, %47 ]
  %.06691 = phi i32 [ %.06695, %.thread118 ], [ -1, %47 ]
  %.047 = phi i32 [ %.062.lcssa121, %.thread118 ], [ %15, %47 ]
  %52 = sext i32 %.047 to i64
  %53 = getelementptr inbounds i8, ptr %51, i64 %52
  %54 = load i32, ptr %53, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #8
  store ptr null, ptr %5, align 8, !tbaa !13
  %.not69100 = icmp eq i32 %54, -1
  br i1 %.not69100, label %._crit_edge, label %.lr.ph103

.lr.ph103:                                        ; preds = %.loopexit80
  %55 = getelementptr inbounds i8, ptr %0, i64 24
  %56 = load i32, ptr %55, align 8
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds i8, ptr %1, i64 96
  br label %59

59:                                               ; preds = %.lr.ph103, %.critedge72
  %.055102 = phi i32 [ %54, %.lr.ph103 ], [ %80, %.critedge72 ]
  %.059101 = phi i32 [ -1, %.lr.ph103 ], [ %spec.select, %.critedge72 ]
  %60 = call i32 @BF_ReadBlock(i32 noundef %17, i32 noundef %.055102, ptr noundef nonnull %5) #8
  %61 = icmp slt i32 %60, 0
  br i1 %61, label %62, label %63

62:                                               ; preds = %59
  call void @BF_PrintError(ptr noundef nonnull @.str.3) #8
  br label %.loopexit

63:                                               ; preds = %59
  %64 = load ptr, ptr %5, align 8, !tbaa !13
  %65 = getelementptr inbounds i8, ptr %64, i64 508
  %66 = load i32, ptr %65, align 4, !tbaa !16
  %.not7097 = icmp sgt i32 %66, 0
  br i1 %.not7097, label %.lr.ph99.preheader, label %.critedge72

.lr.ph99.preheader:                               ; preds = %63
  %wide.trip.count = zext nneg i32 %66 to i64
  br label %.lr.ph99

.lr.ph99:                                         ; preds = %.lr.ph99.preheader, %.critedge
  %indvars.iv = phi i64 [ 0, %.lr.ph99.preheader ], [ %indvars.iv.next, %.critedge ]
  %67 = load ptr, ptr %5, align 8, !tbaa !13
  %68 = shl nuw nsw i64 %indvars.iv, 5
  %69 = getelementptr inbounds i8, ptr %67, i64 %68
  %70 = call ptr @get_key(ptr noundef nonnull %1, ptr noundef %11) #8
  %bcmp = call i32 @bcmp(ptr %70, ptr %69, i64 %57)
  %71 = icmp eq i32 %bcmp, 0
  br i1 %71, label %72, label %.critedge

72:                                               ; preds = %.lr.ph99
  %73 = load i32, ptr %58, align 8, !tbaa !20
  %74 = getelementptr inbounds i8, ptr %69, i64 28
  %75 = load i32, ptr %74, align 4, !tbaa !23
  %76 = icmp eq i32 %73, %75
  br i1 %76, label %.loopexit, label %.critedge

.critedge:                                        ; preds = %72, %.lr.ph99
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond116.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond116.not, label %.critedge72.loopexit, label %.lr.ph99, !llvm.loop !25

.critedge72.loopexit:                             ; preds = %.critedge
  %.pre117 = load ptr, ptr %5, align 8, !tbaa !13
  br label %.critedge72

.critedge72:                                      ; preds = %.critedge72.loopexit, %63
  %77 = phi ptr [ %.pre117, %.critedge72.loopexit ], [ %64, %63 ]
  %78 = icmp ult i32 %66, 15
  %spec.select = select i1 %78, i32 %.055102, i32 %.059101
  %79 = getelementptr inbounds i8, ptr %77, i64 504
  %80 = load i32, ptr %79, align 4, !tbaa !16
  %.not69 = icmp eq i32 %80, -1
  br i1 %.not69, label %._crit_edge, label %59, !llvm.loop !26

._crit_edge:                                      ; preds = %.critedge72, %.loopexit80
  %.061.lcssa = phi i32 [ 0, %.loopexit80 ], [ %66, %.critedge72 ]
  %.059.lcssa = phi i32 [ -1, %.loopexit80 ], [ %spec.select, %.critedge72 ]
  %.058.lcssa = phi i32 [ %.06691, %.loopexit80 ], [ %.055102, %.critedge72 ]
  %.148.lcssa = phi i64 [ %52, %.loopexit80 ], [ 504, %.critedge72 ]
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(32) %6, i8 0, i64 28, i1 false)
  %81 = getelementptr inbounds i8, ptr %6, i64 28
  %82 = getelementptr inbounds i8, ptr %1, i64 96
  %83 = load i32, ptr %82, align 8, !tbaa !20
  store i32 %83, ptr %81, align 4, !tbaa !23
  %84 = getelementptr inbounds i8, ptr %1, i64 19
  %85 = call ptr @strcpy(ptr noundef nonnull dereferenceable(1) %6, ptr noundef nonnull dereferenceable(1) %84) #8
  %86 = icmp eq i32 %.059.lcssa, -1
  br i1 %86, label %87, label %108

87:                                               ; preds = %._crit_edge
  %88 = call i32 @BF_AllocateBlock(i32 noundef %17) #8
  %89 = icmp slt i32 %88, 0
  br i1 %89, label %90, label %91

90:                                               ; preds = %87
  call void @BF_PrintError(ptr noundef nonnull @.str.2) #8
  br label %122

91:                                               ; preds = %87
  %92 = call i32 @BF_GetBlockCounter(i32 noundef %17) #8
  %93 = add nsw i32 %92, -1
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #8
  %94 = call i32 @BF_ReadBlock(i32 noundef %17, i32 noundef %93, ptr noundef nonnull %7) #8
  %95 = icmp slt i32 %94, 0
  br i1 %95, label %.thread, label %96

.thread:                                          ; preds = %91
  call void @BF_PrintError(ptr noundef nonnull @.str.3) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  br label %122

96:                                               ; preds = %91
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #8
  %97 = call i32 @BF_ReadBlock(i32 noundef %17, i32 noundef %.058.lcssa, ptr noundef nonnull %8) #8
  %98 = icmp slt i32 %97, 0
  br i1 %98, label %.thread75, label %99

99:                                               ; preds = %96
  %100 = load ptr, ptr %8, align 8, !tbaa !13
  %101 = getelementptr inbounds i8, ptr %100, i64 %.148.lcssa
  store i32 %93, ptr %101, align 1
  %102 = call i32 @BF_WriteBlock(i32 noundef %17, i32 noundef %.058.lcssa) #8
  %103 = icmp slt i32 %102, 0
  br i1 %103, label %.thread75, label %104

.thread75:                                        ; preds = %99, %96
  %.str.3.sink = phi ptr [ @.str.3, %96 ], [ @.str.5, %99 ]
  call void @BF_PrintError(ptr noundef nonnull %.str.3.sink) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  br label %122

104:                                              ; preds = %99
  %105 = load ptr, ptr %7, align 8, !tbaa !13
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(32) %105, ptr noundef nonnull align 4 dereferenceable(32) %6, i64 32, i1 false)
  %106 = getelementptr inbounds i8, ptr %105, i64 508
  store i32 1, ptr %106, align 1
  %107 = getelementptr inbounds i8, ptr %105, i64 504
  store i32 -1, ptr %107, align 1
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  br label %118

108:                                              ; preds = %._crit_edge
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #8
  %109 = call i32 @BF_ReadBlock(i32 noundef %17, i32 noundef %.059.lcssa, ptr noundef nonnull %9) #8
  %110 = icmp sgt i32 %109, -1
  br i1 %110, label %.thread77, label %117

.thread77:                                        ; preds = %108
  %111 = add nsw i32 %.061.lcssa, 1
  %112 = load ptr, ptr %9, align 8, !tbaa !13
  %113 = getelementptr inbounds i8, ptr %112, i64 508
  store i32 %111, ptr %113, align 1
  %114 = sext i32 %.061.lcssa to i64
  %115 = shl nsw i64 %114, 5
  %116 = getelementptr inbounds i8, ptr %112, i64 %115
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(32) %116, ptr noundef nonnull align 4 dereferenceable(32) %6, i64 32, i1 false)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #8
  br label %118

117:                                              ; preds = %108
  call void @BF_PrintError(ptr noundef nonnull @.str.3) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #8
  br label %122

118:                                              ; preds = %.thread77, %104
  %.257 = phi i32 [ %93, %104 ], [ %.059.lcssa, %.thread77 ]
  %119 = call i32 @BF_WriteBlock(i32 noundef %17, i32 noundef %.257) #8
  %120 = icmp slt i32 %119, 0
  br i1 %120, label %121, label %122

121:                                              ; preds = %118
  call void @BF_PrintError(ptr noundef nonnull @.str.5) #8
  br label %122

122:                                              ; preds = %117, %.thread75, %.thread, %118, %121, %90
  %.7 = phi i32 [ -1, %90 ], [ -1, %121 ], [ -1, %117 ], [ 0, %118 ], [ -1, %.thread ], [ -1, %.thread75 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #8
  br label %.loopexit

.loopexit:                                        ; preds = %72, %122, %62
  %.8 = phi i32 [ -1, %62 ], [ %.7, %122 ], [ 0, %72 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #8
  br label %123

123:                                              ; preds = %.loopexit, %29
  %.9 = phi i32 [ -1, %29 ], [ %.8, %.loopexit ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #8
  br label %124

124:                                              ; preds = %123, %22
  %.10 = phi i32 [ -1, %22 ], [ %.9, %123 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #8
  ret i32 %.10
}

declare ptr @get_key(ptr noundef, ptr noundef) local_unnamed_addr #0

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

; Function Attrs: nofree nounwind willreturn memory(argmem: read)
declare i32 @bcmp(ptr nocapture, ptr nocapture, i64) local_unnamed_addr #6

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: write)
declare void @llvm.assume(i1 noundef) #7

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

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

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


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