; LLVM IR from litespeedtech/ls-qpack :: lsqpack (lsqpack_enc_end_header)

; 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.lsqpack_enc = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, %struct.lsqpack_enc_head, ptr, %struct.anon, %struct.anon.0, %struct.anon.1, %struct.anon.2, %struct.anon.3, i32, i32, ptr, float, float, ptr, i32, i32, i32 }
%struct.lsqpack_enc_head = type { ptr, ptr }
%struct.anon = type { ptr, ptr }
%struct.anon.0 = type { ptr, ptr }
%struct.anon.1 = type { ptr, ptr }
%struct.anon.2 = type { ptr, ptr, i32, i32, i32, i32 }
%struct.anon.3 = type { %struct.lsqpack_dec_int_state, ptr }
%struct.lsqpack_dec_int_state = type { i32, i32, i32, i64 }
%struct.lsqpack_header_info = type { %struct.anon.6, %struct.anon.7, ptr, i64, i32, i32, i32, i32 }
%struct.anon.6 = type { ptr, ptr }
%struct.anon.7 = type { ptr, ptr }

@.str = external hidden unnamed_addr constant [14 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [67 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [58 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [27 x i8], align 1

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

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #1

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local i64 @lsqpack_enc_end_header(ptr noundef %0, ptr noundef %1, i64 noundef %2, ptr noundef %3) #3 {
  %5 = alloca i64, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i64, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca float, align 4
  %18 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store i64 %2, ptr %8, align 8, !tbaa !9
  store ptr %3, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  %19 = load i64, ptr %8, align 8, !tbaa !9
  %20 = icmp eq i64 %19, 0
  br i1 %20, label %21, label %22

21:                                               ; preds = %4
  store i64 -1, ptr %5, align 8
  store i32 1, ptr %18, align 4
  br label %365

22:                                               ; preds = %4
  %23 = load ptr, ptr %6, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct.lsqpack_enc, ptr %23, i32 0, i32 3
  %25 = load i32, ptr %24, align 4, !tbaa !11
  %26 = and i32 %25, 1
  %27 = icmp ne i32 %26, 0
  br i1 %27, label %29, label %28

28:                                               ; preds = %22
  store i64 -1, ptr %5, align 8
  store i32 1, ptr %18, align 4
  br label %365

29:                                               ; preds = %22
  %30 = load ptr, ptr %6, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.lsqpack_enc, ptr %30, i32 0, i32 26
  %32 = load ptr, ptr %31, align 8, !tbaa !20
  %33 = icmp ne ptr %32, null
  br i1 %33, label %34, label %80

34:                                               ; preds = %29
  %35 = load ptr, ptr %6, align 8, !tbaa !5
  call void @qenc_sample_header_count(ptr noundef %35)
  %36 = load ptr, ptr %6, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.lsqpack_enc, ptr %36, i32 0, i32 24
  %38 = load float, ptr %37, align 8, !tbaa !21
  %39 = fcmp une float %38, 0.000000e+00
  br i1 %39, label %40, label %79

40:                                               ; preds = %34
  %41 = load ptr, ptr %6, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.lsqpack_enc, ptr %41, i32 0, i32 24
  %43 = load float, ptr %42, align 8, !tbaa !21
  %44 = load ptr, ptr %6, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.lsqpack_enc, ptr %44, i32 0, i32 25
  %46 = load float, ptr %45, align 4, !tbaa !22
  %47 = fcmp ogt float %43, %46
  br i1 %47, label %48, label %79

48:                                               ; preds = %40
  %49 = load ptr, ptr %6, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.lsqpack_enc, ptr %49, i32 0, i32 28
  %51 = load i32, ptr %50, align 4, !tbaa !23
  %52 = uitofp i32 %51 to float
  %53 = load ptr, ptr %6, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.lsqpack_enc, ptr %53, i32 0, i32 24
  %55 = load float, ptr %54, align 8, !tbaa !21
  %56 = fsub float %52, %55
  %57 = call float @llvm.fabs.f32(float %56)
  store float %57, ptr %17, align 4, !tbaa !24
  %58 = load float, ptr %17, align 4, !tbaa !24
  %59 = fpext float %58 to double
  %60 = fcmp oge double %59, 1.500000e+00
  br i1 %60, label %69, label %61

61:                                               ; preds = %48
  %62 = load float, ptr %17, align 4, !tbaa !24
  %63 = load ptr, ptr %6, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.lsqpack_enc, ptr %63, i32 0, i32 24
  %65 = load float, ptr %64, align 8, !tbaa !21
  %66 = fdiv float %62, %65
  %67 = fpext float %66 to double
  %68 = fcmp oge double %67, 1.000000e-01
  br i1 %68, label %69, label %78

69:                                               ; preds = %61, %48
  %70 = load ptr, ptr %6, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.lsqpack_enc, ptr %70, i32 0, i32 24
  %72 = load float, ptr %71, align 8, !tbaa !21
  %73 = fpext float %72 to double
  %74 = call double @llvm.round.f64(double %73)
  %75 = fptoui double %74 to i32
  store i32 %75, ptr %16, align 4, !tbaa !25
  %76 = load ptr, ptr %6, align 8, !tbaa !5
  %77 = load i32, ptr %16, align 4, !tbaa !25
  call void @qenc_hist_update_size(ptr noundef %76, i32 noundef %77)
  br label %78

78:                                               ; preds = %69, %61
  br label %79

79:                                               ; preds = %78, %40, %34
  br label %80

80:                                               ; preds = %79, %29
  %81 = load ptr, ptr %6, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.lsqpack_enc, ptr %81, i32 0, i32 19
  %83 = getelementptr inbounds %struct.anon.2, ptr %82, i32 0, i32 0
  %84 = load ptr, ptr %83, align 8, !tbaa !26
  %85 = icmp ne ptr %84, null
  br i1 %85, label %86, label %278

86:                                               ; preds = %80
  %87 = load ptr, ptr %6, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.lsqpack_enc, ptr %87, i32 0, i32 19
  %89 = getelementptr inbounds %struct.anon.2, ptr %88, i32 0, i32 0
  %90 = load ptr, ptr %89, align 8, !tbaa !26
  %91 = getelementptr inbounds %struct.lsqpack_header_info, ptr %90, i32 0, i32 7
  %92 = load i32, ptr %91, align 4, !tbaa !27
  %93 = icmp ne i32 %92, 0
  br i1 %93, label %94, label %278

94:                                               ; preds = %86
  %95 = load ptr, ptr %6, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.lsqpack_enc, ptr %95, i32 0, i32 19
  %97 = getelementptr inbounds %struct.anon.2, ptr %96, i32 0, i32 0
  %98 = load ptr, ptr %97, align 8, !tbaa !26
  store ptr %98, ptr %10, align 8, !tbaa !5
  %99 = load ptr, ptr %7, align 8, !tbaa !5
  %100 = load i64, ptr %8, align 8, !tbaa !9
  %101 = getelementptr inbounds i8, ptr %99, i64 %100
  store ptr %101, ptr %12, align 8, !tbaa !5
  %102 = load ptr, ptr %7, align 8, !tbaa !5
  store i8 0, ptr %102, align 1, !tbaa !29
  %103 = load ptr, ptr %10, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.lsqpack_header_info, ptr %103, i32 0, i32 7
  %105 = load i32, ptr %104, align 4, !tbaa !27
  %106 = load ptr, ptr %6, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.lsqpack_enc, ptr %106, i32 0, i32 7
  %108 = load i32, ptr %107, align 4, !tbaa !30
  %109 = mul i32 2, %108
  %110 = urem i32 %105, %109
  %111 = add i32 %110, 1
  store i32 %111, ptr %14, align 4, !tbaa !25
  br label %112

112:                                              ; preds = %94
  %113 = load ptr, ptr %6, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct.lsqpack_enc, ptr %113, i32 0, i32 23
  %115 = load ptr, ptr %114, align 8, !tbaa !31
  %116 = icmp ne ptr %115, null
  br i1 %116, label %117, label %134

117:                                              ; preds = %112
  %118 = load ptr, ptr %6, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.lsqpack_enc, ptr %118, i32 0, i32 23
  %120 = load ptr, ptr %119, align 8, !tbaa !31
  %121 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %120, ptr noundef @.str) #5
  %122 = load ptr, ptr %6, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.lsqpack_enc, ptr %122, i32 0, i32 23
  %124 = load ptr, ptr %123, align 8, !tbaa !31
  %125 = load ptr, ptr %10, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.lsqpack_header_info, ptr %125, i32 0, i32 3
  %127 = load i64, ptr %126, align 8, !tbaa !32
  %128 = load i32, ptr %14, align 4, !tbaa !25
  %129 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %124, ptr noundef @.str.13, i64 noundef %127, i32 noundef %128) #5
  %130 = load ptr, ptr %6, align 8, !tbaa !5
  %131 = getelementptr inbounds %struct.lsqpack_enc, ptr %130, i32 0, i32 23
  %132 = load ptr, ptr %131, align 8, !tbaa !31
  %133 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %132, ptr noundef @.str.2) #5
  br label %134

134:                                              ; preds = %117, %112
  br label %135

135:                                              ; preds = %134
  br label %136

136:                                              ; preds = %135
  %137 = load ptr, ptr %7, align 8, !tbaa !5
  %138 = load ptr, ptr %12, align 8, !tbaa !5
  %139 = load i32, ptr %14, align 4, !tbaa !25
  %140 = zext i32 %139 to i64
  %141 = call ptr @lsqpack_enc_int(ptr noundef %137, ptr noundef %138, i64 noundef %140, i32 noundef 8)
  store ptr %141, ptr %11, align 8, !tbaa !5
  %142 = load ptr, ptr %11, align 8, !tbaa !5
  %143 = load ptr, ptr %7, align 8, !tbaa !5
  %144 = icmp ule ptr %142, %143
  br i1 %144, label %145, label %146

145:                                              ; preds = %136
  store i64 0, ptr %5, align 8
  store i32 1, ptr %18, align 4
  br label %365

146:                                              ; preds = %136
  %147 = load ptr, ptr %11, align 8, !tbaa !5
  %148 = load ptr, ptr %12, align 8, !tbaa !5
  %149 = icmp uge ptr %147, %148
  br i1 %149, label %150, label %151

150:                                              ; preds = %146
  store i64 0, ptr %5, align 8
  store i32 1, ptr %18, align 4
  br label %365

151:                                              ; preds = %146
  %152 = load ptr, ptr %11, align 8, !tbaa !5
  store ptr %152, ptr %7, align 8, !tbaa !5
  %153 = load ptr, ptr %6, align 8, !tbaa !5
  %154 = getelementptr inbounds %struct.lsqpack_enc, ptr %153, i32 0, i32 19
  %155 = getelementptr inbounds %struct.anon.2, ptr %154, i32 0, i32 5
  %156 = load i32, ptr %155, align 4, !tbaa !33
  %157 = load ptr, ptr %10, align 8, !tbaa !5
  %158 = getelementptr inbounds %struct.lsqpack_header_info, ptr %157, i32 0, i32 7
  %159 = load i32, ptr %158, align 4, !tbaa !27
  %160 = icmp uge i32 %156, %159
  br i1 %160, label %161, label %170

161:                                              ; preds = %151
  store i32 0, ptr %15, align 4, !tbaa !25
  %162 = load ptr, ptr %6, align 8, !tbaa !5
  %163 = getelementptr inbounds %struct.lsqpack_enc, ptr %162, i32 0, i32 19
  %164 = getelementptr inbounds %struct.anon.2, ptr %163, i32 0, i32 5
  %165 = load i32, ptr %164, align 4, !tbaa !33
  %166 = load ptr, ptr %10, align 8, !tbaa !5
  %167 = getelementptr inbounds %struct.lsqpack_header_info, ptr %166, i32 0, i32 7
  %168 = load i32, ptr %167, align 4, !tbaa !27
  %169 = sub i32 %165, %168
  store i32 %169, ptr %13, align 4, !tbaa !25
  br label %180

170:                                              ; preds = %151
  store i32 1, ptr %15, align 4, !tbaa !25
  %171 = load ptr, ptr %10, align 8, !tbaa !5
  %172 = getelementptr inbounds %struct.lsqpack_header_info, ptr %171, i32 0, i32 7
  %173 = load i32, ptr %172, align 4, !tbaa !27
  %174 = load ptr, ptr %6, align 8, !tbaa !5
  %175 = getelementptr inbounds %struct.lsqpack_enc, ptr %174, i32 0, i32 19
  %176 = getelementptr inbounds %struct.anon.2, ptr %175, i32 0, i32 5
  %177 = load i32, ptr %176, align 4, !tbaa !33
  %178 = sub i32 %173, %177
  %179 = sub i32 %178, 1
  store i32 %179, ptr %13, align 4, !tbaa !25
  br label %180

180:                                              ; preds = %170, %161
  %181 = load i32, ptr %15, align 4, !tbaa !25
  %182 = shl i32 %181, 7
  %183 = trunc i32 %182 to i8
  %184 = load ptr, ptr %7, align 8, !tbaa !5
  store i8 %183, ptr %184, align 1, !tbaa !29
  %185 = load ptr, ptr %7, align 8, !tbaa !5
  %186 = load ptr, ptr %12, align 8, !tbaa !5
  %187 = load i32, ptr %13, align 4, !tbaa !25
  %188 = zext i32 %187 to i64
  %189 = call ptr @lsqpack_enc_int(ptr noundef %185, ptr noundef %186, i64 noundef %188, i32 noundef 7)
  store ptr %189, ptr %11, align 8, !tbaa !5
  %190 = load ptr, ptr %11, align 8, !tbaa !5
  %191 = load ptr, ptr %7, align 8, !tbaa !5
  %192 = icmp ule ptr %190, %191
  br i1 %192, label %193, label %194

193:                                              ; preds = %180
  store i64 0, ptr %5, align 8
  store i32 1, ptr %18, align 4
  br label %365

194:                                              ; preds = %180
  %195 = load ptr, ptr %6, align 8, !tbaa !5
  %196 = load ptr, ptr %10, align 8, !tbaa !5
  %197 = call i32 @qenc_hinfo_at_risk(ptr noundef %195, ptr noundef %196)
  %198 = icmp ne i32 %197, 0
  br i1 %198, label %199, label %202

199:                                              ; preds = %194
  %200 = load ptr, ptr %6, align 8, !tbaa !5
  %201 = load ptr, ptr %10, align 8, !tbaa !5
  call void @qenc_add_to_risked_list(ptr noundef %200, ptr noundef %201)
  br label %202

202:                                              ; preds = %199, %194
  br label %203

203:                                              ; preds = %202
  %204 = load ptr, ptr %6, align 8, !tbaa !5
  %205 = getelementptr inbounds %struct.lsqpack_enc, ptr %204, i32 0, i32 23
  %206 = load ptr, ptr %205, align 8, !tbaa !31
  %207 = icmp ne ptr %206, null
  br i1 %207, label %208, label %231

208:                                              ; preds = %203
  %209 = load ptr, ptr %6, align 8, !tbaa !5
  %210 = getelementptr inbounds %struct.lsqpack_enc, ptr %209, i32 0, i32 23
  %211 = load ptr, ptr %210, align 8, !tbaa !31
  %212 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %211, ptr noundef @.str) #5
  %213 = load ptr, ptr %6, align 8, !tbaa !5
  %214 = getelementptr inbounds %struct.lsqpack_enc, ptr %213, i32 0, i32 23
  %215 = load ptr, ptr %214, align 8, !tbaa !31
  %216 = load ptr, ptr %10, align 8, !tbaa !5
  %217 = getelementptr inbounds %struct.lsqpack_header_info, ptr %216, i32 0, i32 3
  %218 = load i64, ptr %217, align 8, !tbaa !32
  %219 = load ptr, ptr %10, align 8, !tbaa !5
  %220 = getelementptr inbounds %struct.lsqpack_header_info, ptr %219, i32 0, i32 7
  %221 = load i32, ptr %220, align 4, !tbaa !27
  %222 = load i32, ptr %14, align 4, !tbaa !25
  %223 = load ptr, ptr %6, align 8, !tbaa !5
  %224 = load ptr, ptr %10, align 8, !tbaa !5
  %225 = call i32 @qenc_hinfo_at_risk(ptr noundef %223, ptr noundef %224)
  %226 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %215, ptr noundef @.str.14, i64 noundef %218, i32 noundef %221, i32 noundef %222, i32 noundef %225) #5
  %227 = load ptr, ptr %6, align 8, !tbaa !5
  %228 = getelementptr inbounds %struct.lsqpack_enc, ptr %227, i32 0, i32 23
  %229 = load ptr, ptr %228, align 8, !tbaa !31
  %230 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %229, ptr noundef @.str.2) #5
  br label %231

231:                                              ; preds = %208, %203
  br label %232

232:                                              ; preds = %231
  br label %233

233:                                              ; preds = %232
  %234 = load ptr, ptr %6, align 8, !tbaa !5
  %235 = getelementptr inbounds %struct.lsqpack_enc, ptr %234, i32 0, i32 19
  %236 = getelementptr inbounds %struct.anon.2, ptr %235, i32 0, i32 0
  store ptr null, ptr %236, align 8, !tbaa !26
  %237 = load ptr, ptr %6, align 8, !tbaa !5
  %238 = getelementptr inbounds %struct.lsqpack_enc, ptr %237, i32 0, i32 3
  %239 = load i32, ptr %238, align 4, !tbaa !11
  %240 = and i32 %239, -2
  store i32 %240, ptr %238, align 4, !tbaa !11
  %241 = load ptr, ptr %9, align 8, !tbaa !5
  %242 = icmp ne ptr %241, null
  br i1 %242, label %243, label %258

243:                                              ; preds = %233
  %244 = load ptr, ptr %6, align 8, !tbaa !5
  %245 = getelementptr inbounds %struct.lsqpack_enc, ptr %244, i32 0, i32 19
  %246 = getelementptr inbounds %struct.anon.2, ptr %245, i32 0, i32 4
  %247 = load i32, ptr %246, align 8, !tbaa !34
  %248 = load ptr, ptr %9, align 8, !tbaa !5
  store i32 %247, ptr %248, align 4, !tbaa !25
  %249 = load ptr, ptr %6, align 8, !tbaa !5
  %250 = load ptr, ptr %10, align 8, !tbaa !5
  %251 = call i32 @qenc_hinfo_at_risk(ptr noundef %249, ptr noundef %250)
  %252 = icmp ne i32 %251, 0
  br i1 %252, label %253, label %257

253:                                              ; preds = %243
  %254 = load ptr, ptr %9, align 8, !tbaa !5
  %255 = load i32, ptr %254, align 4, !tbaa !25
  %256 = or i32 %255, 1
  store i32 %256, ptr %254, align 4, !tbaa !25
  br label %257

257:                                              ; preds = %253, %243
  br label %258

258:                                              ; preds = %257, %233
  %259 = load ptr, ptr %11, align 8, !tbaa !5
  %260 = load ptr, ptr %12, align 8, !tbaa !5
  %261 = ptrtoint ptr %259 to i64
  %262 = ptrtoint ptr %260 to i64
  %263 = sub i64 %261, %262
  %264 = load i64, ptr %8, align 8, !tbaa !9
  %265 = add i64 %263, %264
  %266 = trunc i64 %265 to i32
  %267 = load ptr, ptr %6, align 8, !tbaa !5
  %268 = getelementptr inbounds %struct.lsqpack_enc, ptr %267, i32 0, i32 22
  %269 = load i32, ptr %268, align 4, !tbaa !35
  %270 = add i32 %269, %266
  store i32 %270, ptr %268, align 4, !tbaa !35
  %271 = load ptr, ptr %11, align 8, !tbaa !5
  %272 = load ptr, ptr %12, align 8, !tbaa !5
  %273 = ptrtoint ptr %271 to i64
  %274 = ptrtoint ptr %272 to i64
  %275 = sub i64 %273, %274
  %276 = load i64, ptr %8, align 8, !tbaa !9
  %277 = add i64 %275, %276
  store i64 %277, ptr %5, align 8
  store i32 1, ptr %18, align 4
  br label %365

278:                                              ; preds = %86, %80
  %279 = load i64, ptr %8, align 8, !tbaa !9
  %280 = icmp uge i64 %279, 2
  br i1 %280, label %281, label %364

281:                                              ; preds = %278
  %282 = load ptr, ptr %7, align 8, !tbaa !5
  call void @llvm.memset.p0.i64(ptr align 1 %282, i8 0, i64 2, i1 false)
  %283 = load ptr, ptr %6, align 8, !tbaa !5
  %284 = getelementptr inbounds %struct.lsqpack_enc, ptr %283, i32 0, i32 19
  %285 = getelementptr inbounds %struct.anon.2, ptr %284, i32 0, i32 0
  %286 = load ptr, ptr %285, align 8, !tbaa !26
  %287 = icmp ne ptr %286, null
  br i1 %287, label %288, label %324

288:                                              ; preds = %281
  br label %289

289:                                              ; preds = %288
  %290 = load ptr, ptr %6, align 8, !tbaa !5
  %291 = getelementptr inbounds %struct.lsqpack_enc, ptr %290, i32 0, i32 23
  %292 = load ptr, ptr %291, align 8, !tbaa !31
  %293 = icmp ne ptr %292, null
  br i1 %293, label %294, label %313

294:                                              ; preds = %289
  %295 = load ptr, ptr %6, align 8, !tbaa !5
  %296 = getelementptr inbounds %struct.lsqpack_enc, ptr %295, i32 0, i32 23
  %297 = load ptr, ptr %296, align 8, !tbaa !31
  %298 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %297, ptr noundef @.str) #5
  %299 = load ptr, ptr %6, align 8, !tbaa !5
  %300 = getelementptr inbounds %struct.lsqpack_enc, ptr %299, i32 0, i32 23
  %301 = load ptr, ptr %300, align 8, !tbaa !31
  %302 = load ptr, ptr %6, align 8, !tbaa !5
  %303 = getelementptr inbounds %struct.lsqpack_enc, ptr %302, i32 0, i32 19
  %304 = getelementptr inbounds %struct.anon.2, ptr %303, i32 0, i32 0
  %305 = load ptr, ptr %304, align 8, !tbaa !26
  %306 = getelementptr inbounds %struct.lsqpack_header_info, ptr %305, i32 0, i32 3
  %307 = load i64, ptr %306, align 8, !tbaa !32
  %308 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %301, ptr noundef @.str.15, i64 noundef %307) #5
  %309 = load ptr, ptr %6, align 8, !tbaa !5
  %310 = getelementptr inbounds %struct.lsqpack_enc, ptr %309, i32 0, i32 23
  %311 = load ptr, ptr %310, align 8, !tbaa !31
  %312 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %311, ptr noundef @.str.2) #5
  br label %313

313:                                              ; preds = %294, %289
  br label %314

314:                                              ; preds = %313
  br label %315

315:                                              ; preds = %314
  %316 = load ptr, ptr %6, align 8, !tbaa !5
  %317 = load ptr, ptr %6, align 8, !tbaa !5
  %318 = getelementptr inbounds %struct.lsqpack_enc, ptr %317, i32 0, i32 19
  %319 = getelementptr inbounds %struct.anon.2, ptr %318, i32 0, i32 0
  %320 = load ptr, ptr %319, align 8, !tbaa !26
  call void @enc_free_hinfo(ptr noundef %316, ptr noundef %320)
  %321 = load ptr, ptr %6, align 8, !tbaa !5
  %322 = getelementptr inbounds %struct.lsqpack_enc, ptr %321, i32 0, i32 19
  %323 = getelementptr inbounds %struct.anon.2, ptr %322, i32 0, i32 0
  store ptr null, ptr %323, align 8, !tbaa !26
  br label %346

324:                                              ; preds = %281
  br label %325

325:                                              ; preds = %324
  %326 = load ptr, ptr %6, align 8, !tbaa !5
  %327 = getelementptr inbounds %struct.lsqpack_enc, ptr %326, i32 0, i32 23
  %328 = load ptr, ptr %327, align 8, !tbaa !31
  %329 = icmp ne ptr %328, null
  br i1 %329, label %330, label %343

330:                                              ; preds = %325
  %331 = load ptr, ptr %6, align 8, !tbaa !5
  %332 = getelementptr inbounds %struct.lsqpack_enc, ptr %331, i32 0, i32 23
  %333 = load ptr, ptr %332, align 8, !tbaa !31
  %334 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %333, ptr noundef @.str) #5
  %335 = load ptr, ptr %6, align 8, !tbaa !5
  %336 = getelementptr inbounds %struct.lsqpack_enc, ptr %335, i32 0, i32 23
  %337 = load ptr, ptr %336, align 8, !tbaa !31
  %338 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %337, ptr noundef @.str.16) #5
  %339 = load ptr, ptr %6, align 8, !tbaa !5
  %340 = getelementptr inbounds %struct.lsqpack_enc, ptr %339, i32 0, i32 23
  %341 = load ptr, ptr %340, align 8, !tbaa !31
  %342 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %341, ptr noundef @.str.2) #5
  br label %343

343:                                              ; preds = %330, %325
  br label %344

344:                                              ; preds = %343
  br label %345

345:                                              ; preds = %344
  br label %346

346:                                              ; preds = %345, %315
  %347 = load ptr, ptr %6, align 8, !tbaa !5
  %348 = getelementptr inbounds %struct.lsqpack_enc, ptr %347, i32 0, i32 3
  %349 = load i32, ptr %348, align 4, !tbaa !11
  %350 = and i32 %349, -2
  store i32 %350, ptr %348, align 4, !tbaa !11
  %351 = load ptr, ptr %9, align 8, !tbaa !5
  %352 = icmp ne ptr %351, null
  br i1 %352, label %353, label %359

353:                                              ; preds = %346
  %354 = load ptr, ptr %6, align 8, !tbaa !5
  %355 = getelementptr inbounds %struct.lsqpack_enc, ptr %354, i32 0, i32 19
  %356 = getelementptr inbounds %struct.anon.2, ptr %355, i32 0, i32 4
  %357 = load i32, ptr %356, align 8, !tbaa !34
  %358 = load ptr, ptr %9, align 8, !tbaa !5
  store i32 %357, ptr %358, align 4, !tbaa !25
  br label %359

359:                                              ; preds = %353, %346
  %360 = load ptr, ptr %6, align 8, !tbaa !5
  %361 = getelementptr inbounds %struct.lsqpack_enc, ptr %360, i32 0, i32 22
  %362 = load i32, ptr %361, align 4, !tbaa !35
  %363 = add i32 %362, 2
  store i32 %363, ptr %361, align 4, !tbaa !35
  store i64 2, ptr %5, align 8
  store i32 1, ptr %18, align 4
  br label %365

364:                                              ; preds = %278
  store i64 0, ptr %5, align 8
  store i32 1, ptr %18, align 4
  br label %365

365:                                              ; preds = %364, %359, %258, %193, %150, %145, %28, %21
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  %366 = load i64, ptr %5, align 8
  ret i64 %366
}

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fabs.f32(float) #4

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.round.f64(double) #4

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

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

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

attributes #0 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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 nosync 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !13, i64 12}
!12 = !{!"lsqpack_enc", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12, !13, i64 16, !13, i64 20, !13, i64 24, !13, i64 28, !13, i64 32, !13, i64 36, !13, i64 40, !13, i64 44, !13, i64 48, !13, i64 52, !14, i64 56, !6, i64 72, !15, i64 80, !15, i64 96, !15, i64 112, !16, i64 128, !17, i64 160, !13, i64 192, !13, i64 196, !6, i64 200, !19, i64 208, !19, i64 212, !6, i64 216, !13, i64 224, !13, i64 228, !13, i64 232}
!13 = !{!"int", !7, i64 0}
!14 = !{!"lsqpack_enc_head", !6, i64 0, !6, i64 8}
!15 = !{!"", !6, i64 0, !6, i64 8}
!16 = !{!"", !6, i64 0, !6, i64 8, !13, i64 16, !13, i64 20, !13, i64 24, !13, i64 28}
!17 = !{!"", !18, i64 0, !6, i64 24}
!18 = !{!"lsqpack_dec_int_state", !13, i64 0, !13, i64 4, !13, i64 8, !10, i64 16}
!19 = !{!"float", !7, i64 0}
!20 = !{!12, !6, i64 216}
!21 = !{!12, !19, i64 208}
!22 = !{!12, !19, i64 212}
!23 = !{!12, !13, i64 228}
!24 = !{!19, !19, i64 0}
!25 = !{!13, !13, i64 0}
!26 = !{!12, !6, i64 128}
!27 = !{!28, !13, i64 60}
!28 = !{!"lsqpack_header_info", !15, i64 0, !15, i64 16, !6, i64 32, !10, i64 40, !13, i64 48, !13, i64 52, !13, i64 56, !13, i64 60}
!29 = !{!7, !7, i64 0}
!30 = !{!12, !13, i64 28}
!31 = !{!12, !6, i64 200}
!32 = !{!28, !10, i64 40}
!33 = !{!12, !13, i64 156}
!34 = !{!12, !13, i64 152}
!35 = !{!12, !13, i64 196}


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

@.str = external hidden unnamed_addr constant [14 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [67 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [58 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [27 x i8], align 1

; Function Attrs: nofree nounwind
declare noundef i32 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #0

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

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

; Function Attrs: nounwind uwtable
define dso_local i64 @lsqpack_enc_end_header(ptr noundef %0, ptr noundef %1, i64 noundef %2, ptr noundef %3) local_unnamed_addr #1 {
  %5 = icmp eq i64 %2, 0
  br i1 %5, label %135, label %6

6:                                                ; preds = %4
  %7 = getelementptr inbounds i8, ptr %0, i64 12
  %8 = load i32, ptr %7, align 4, !tbaa !5
  %9 = and i32 %8, 1
  %.not = icmp eq i32 %9, 0
  br i1 %.not, label %135, label %10

10:                                               ; preds = %6
  %11 = getelementptr inbounds i8, ptr %0, i64 216
  %12 = load ptr, ptr %11, align 8, !tbaa !18
  %.not115 = icmp eq ptr %12, null
  br i1 %.not115, label %35, label %13

13:                                               ; preds = %10
  tail call void @qenc_sample_header_count(ptr noundef nonnull %0)
  %14 = getelementptr inbounds i8, ptr %0, i64 208
  %15 = load float, ptr %14, align 8, !tbaa !19
  %16 = fcmp une float %15, 0.000000e+00
  br i1 %16, label %17, label %35

17:                                               ; preds = %13
  %18 = getelementptr inbounds i8, ptr %0, i64 212
  %19 = load float, ptr %18, align 4, !tbaa !20
  %20 = fcmp ogt float %15, %19
  br i1 %20, label %21, label %35

21:                                               ; preds = %17
  %22 = getelementptr inbounds i8, ptr %0, i64 228
  %23 = load i32, ptr %22, align 4, !tbaa !21
  %24 = uitofp i32 %23 to float
  %25 = fsub float %24, %15
  %26 = tail call float @llvm.fabs.f32(float %25)
  %27 = fcmp ult float %26, 1.500000e+00
  br i1 %27, label %28, label %32

28:                                               ; preds = %21
  %29 = fdiv float %26, %15
  %30 = fpext float %29 to double
  %31 = fcmp ult double %30, 1.000000e-01
  br i1 %31, label %35, label %32

32:                                               ; preds = %28, %21
  %33 = tail call float @llvm.round.f32(float %15)
  %34 = fptoui float %33 to i32
  tail call void @qenc_hist_update_size(ptr noundef nonnull %0, i32 noundef %34)
  br label %35

35:                                               ; preds = %13, %17, %32, %28, %10
  %36 = getelementptr inbounds i8, ptr %0, i64 128
  %37 = load ptr, ptr %36, align 8, !tbaa !22
  %.not116 = icmp eq ptr %37, null
  br i1 %.not116, label %102, label %38

38:                                               ; preds = %35
  %39 = getelementptr inbounds i8, ptr %37, i64 60
  %40 = load i32, ptr %39, align 4, !tbaa !23
  %.not117 = icmp eq i32 %40, 0
  br i1 %.not117, label %102, label %41

41:                                               ; preds = %38
  %42 = getelementptr inbounds i8, ptr %1, i64 %2
  store i8 0, ptr %1, align 1, !tbaa !25
  %43 = load i32, ptr %39, align 4, !tbaa !23
  %44 = getelementptr inbounds i8, ptr %0, i64 28
  %45 = load i32, ptr %44, align 4, !tbaa !26
  %46 = shl i32 %45, 1
  %47 = urem i32 %43, %46
  %48 = add nuw i32 %47, 1
  %49 = getelementptr inbounds i8, ptr %0, i64 200
  %50 = load ptr, ptr %49, align 8, !tbaa !27
  %.not123 = icmp eq ptr %50, null
  br i1 %.not123, label %59, label %51

51:                                               ; preds = %41
  %52 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %50, ptr noundef nonnull @.str) #4
  %53 = load ptr, ptr %49, align 8, !tbaa !27
  %54 = getelementptr inbounds i8, ptr %37, i64 40
  %55 = load i64, ptr %54, align 8, !tbaa !28
  %56 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %53, ptr noundef nonnull @.str.13, i64 noundef %55, i32 noundef %48) #4
  %57 = load ptr, ptr %49, align 8, !tbaa !27
  %58 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %57, ptr noundef nonnull @.str.2) #4
  br label %59

59:                                               ; preds = %51, %41
  %60 = zext i32 %48 to i64
  %61 = tail call ptr @lsqpack_enc_int(ptr noundef nonnull %1, ptr noundef nonnull %42, i64 noundef %60, i32 noundef 8)
  %.not124 = icmp ugt ptr %61, %1
  %.not125 = icmp ult ptr %61, %42
  %or.cond = select i1 %.not124, i1 %.not125, i1 false
  br i1 %or.cond, label %62, label %135

62:                                               ; preds = %59
  %63 = getelementptr inbounds i8, ptr %0, i64 156
  %64 = load i32, ptr %63, align 4, !tbaa !29
  %65 = load i32, ptr %39, align 4, !tbaa !23
  %.not126 = icmp ult i32 %64, %65
  %66 = sub i32 %64, %65
  %67 = xor i32 %64, -1
  %68 = add i32 %65, %67
  %.099 = select i1 %.not126, i32 %68, i32 %66
  %.098 = select i1 %.not126, i8 -128, i8 0
  store i8 %.098, ptr %61, align 1, !tbaa !25
  %69 = zext i32 %.099 to i64
  %70 = tail call ptr @lsqpack_enc_int(ptr noundef nonnull %61, ptr noundef nonnull %42, i64 noundef %69, i32 noundef 7)
  %.not127 = icmp ugt ptr %70, %61
  br i1 %.not127, label %71, label %135

71:                                               ; preds = %62
  %72 = tail call i32 @qenc_hinfo_at_risk(ptr noundef nonnull %0, ptr noundef nonnull %37)
  %.not128 = icmp eq i32 %72, 0
  br i1 %.not128, label %74, label %73

73:                                               ; preds = %71
  tail call void @qenc_add_to_risked_list(ptr noundef nonnull %0, ptr noundef nonnull %37)
  br label %74

74:                                               ; preds = %71, %73
  %75 = load ptr, ptr %49, align 8, !tbaa !27
  %.not129 = icmp eq ptr %75, null
  br i1 %.not129, label %86, label %76

76:                                               ; preds = %74
  %77 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %75, ptr noundef nonnull @.str) #4
  %78 = load ptr, ptr %49, align 8, !tbaa !27
  %79 = getelementptr inbounds i8, ptr %37, i64 40
  %80 = load i64, ptr %79, align 8, !tbaa !28
  %81 = load i32, ptr %39, align 4, !tbaa !23
  %82 = tail call i32 @qenc_hinfo_at_risk(ptr noundef nonnull %0, ptr noundef nonnull %37)
  %83 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %78, ptr noundef nonnull @.str.14, i64 noundef %80, i32 noundef %81, i32 noundef %48, i32 noundef %82) #4
  %84 = load ptr, ptr %49, align 8, !tbaa !27
  %85 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %84, ptr noundef nonnull @.str.2) #4
  br label %86

86:                                               ; preds = %76, %74
  store ptr null, ptr %36, align 8, !tbaa !22
  %87 = load i32, ptr %7, align 4, !tbaa !5
  %88 = and i32 %87, -2
  store i32 %88, ptr %7, align 4, !tbaa !5
  %.not130 = icmp eq ptr %3, null
  br i1 %.not130, label %96, label %89

89:                                               ; preds = %86
  %90 = getelementptr inbounds i8, ptr %0, i64 152
  %91 = load i32, ptr %90, align 8, !tbaa !30
  store i32 %91, ptr %3, align 4, !tbaa !31
  %92 = tail call i32 @qenc_hinfo_at_risk(ptr noundef nonnull %0, ptr noundef nonnull %37)
  %.not131 = icmp eq i32 %92, 0
  br i1 %.not131, label %96, label %93

93:                                               ; preds = %89
  %94 = load i32, ptr %3, align 4, !tbaa !31
  %95 = or i32 %94, 1
  store i32 %95, ptr %3, align 4, !tbaa !31
  br label %96

96:                                               ; preds = %89, %93, %86
  %97 = ptrtoint ptr %70 to i64
  %98 = ptrtoint ptr %42 to i64
  %99 = sub i64 %97, %98
  %100 = add i64 %99, %2
  %101 = trunc i64 %100 to i32
  br label %.sink.split

102:                                              ; preds = %38, %35
  %.not118 = icmp eq i64 %2, 1
  br i1 %.not118, label %135, label %103

103:                                              ; preds = %102
  store i16 0, ptr %1, align 1
  %104 = load ptr, ptr %36, align 8, !tbaa !22
  %.not119 = icmp eq ptr %104, null
  %105 = getelementptr inbounds i8, ptr %0, i64 200
  %106 = load ptr, ptr %105, align 8, !tbaa !27
  %.not120 = icmp eq ptr %106, null
  br i1 %.not119, label %119, label %107

107:                                              ; preds = %103
  br i1 %.not120, label %117, label %108

108:                                              ; preds = %107
  %109 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %106, ptr noundef nonnull @.str) #4
  %110 = load ptr, ptr %105, align 8, !tbaa !27
  %111 = load ptr, ptr %36, align 8, !tbaa !22
  %112 = getelementptr inbounds i8, ptr %111, i64 40
  %113 = load i64, ptr %112, align 8, !tbaa !28
  %114 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %110, ptr noundef nonnull @.str.15, i64 noundef %113) #4
  %115 = load ptr, ptr %105, align 8, !tbaa !27
  %116 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %115, ptr noundef nonnull @.str.2) #4
  %.pre = load ptr, ptr %36, align 8, !tbaa !22
  br label %117

117:                                              ; preds = %108, %107
  %118 = phi ptr [ %.pre, %108 ], [ %104, %107 ]
  tail call void @enc_free_hinfo(ptr noundef nonnull %0, ptr noundef %118)
  store ptr null, ptr %36, align 8, !tbaa !22
  br label %126

119:                                              ; preds = %103
  br i1 %.not120, label %126, label %120

120:                                              ; preds = %119
  %121 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %106, ptr noundef nonnull @.str) #4
  %122 = load ptr, ptr %105, align 8, !tbaa !27
  %123 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %122, ptr noundef nonnull @.str.16) #4
  %124 = load ptr, ptr %105, align 8, !tbaa !27
  %125 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %124, ptr noundef nonnull @.str.2) #4
  br label %126

126:                                              ; preds = %119, %120, %117
  %127 = load i32, ptr %7, align 4, !tbaa !5
  %128 = and i32 %127, -2
  store i32 %128, ptr %7, align 4, !tbaa !5
  %.not122 = icmp eq ptr %3, null
  br i1 %.not122, label %.sink.split, label %129

129:                                              ; preds = %126
  %130 = getelementptr inbounds i8, ptr %0, i64 152
  %131 = load i32, ptr %130, align 8, !tbaa !30
  store i32 %131, ptr %3, align 4, !tbaa !31
  br label %.sink.split

.sink.split:                                      ; preds = %126, %129, %96
  %.sink134 = phi i32 [ %101, %96 ], [ 2, %129 ], [ 2, %126 ]
  %.0.ph = phi i64 [ %100, %96 ], [ 2, %129 ], [ 2, %126 ]
  %132 = getelementptr inbounds i8, ptr %0, i64 196
  %133 = load i32, ptr %132, align 4, !tbaa !32
  %134 = add i32 %133, %.sink134
  store i32 %134, ptr %132, align 4, !tbaa !32
  br label %135

135:                                              ; preds = %.sink.split, %102, %62, %59, %6, %4
  %.0 = phi i64 [ -1, %4 ], [ -1, %6 ], [ 0, %59 ], [ 0, %62 ], [ 0, %102 ], [ %.0.ph, %.sink.split ]
  ret i64 %.0
}

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fabs.f32(float) #2

; Function Attrs: nounwind uwtable
declare hidden void @qenc_hist_update_size(ptr noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden i32 @qenc_hinfo_at_risk(ptr noundef, ptr noundef) local_unnamed_addr #1

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.round.f32(float) #3

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 12}
!6 = !{!"lsqpack_enc", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !7, i64 24, !7, i64 28, !7, i64 32, !7, i64 36, !7, i64 40, !7, i64 44, !7, i64 48, !7, i64 52, !10, i64 56, !11, i64 72, !12, i64 80, !12, i64 96, !12, i64 112, !13, i64 128, !14, i64 160, !7, i64 192, !7, i64 196, !11, i64 200, !17, i64 208, !17, i64 212, !11, i64 216, !7, i64 224, !7, i64 228, !7, i64 232}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"lsqpack_enc_head", !11, i64 0, !11, i64 8}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!"", !11, i64 0, !11, i64 8}
!13 = !{!"", !11, i64 0, !11, i64 8, !7, i64 16, !7, i64 20, !7, i64 24, !7, i64 28}
!14 = !{!"", !15, i64 0, !11, i64 24}
!15 = !{!"lsqpack_dec_int_state", !7, i64 0, !7, i64 4, !7, i64 8, !16, i64 16}
!16 = !{!"long", !8, i64 0}
!17 = !{!"float", !8, i64 0}
!18 = !{!6, !11, i64 216}
!19 = !{!6, !17, i64 208}
!20 = !{!6, !17, i64 212}
!21 = !{!6, !7, i64 228}
!22 = !{!6, !11, i64 128}
!23 = !{!24, !7, i64 60}
!24 = !{!"lsqpack_header_info", !12, i64 0, !12, i64 16, !11, i64 32, !16, i64 40, !7, i64 48, !7, i64 52, !7, i64 56, !7, i64 60}
!25 = !{!8, !8, i64 0}
!26 = !{!6, !7, i64 28}
!27 = !{!6, !11, i64 200}
!28 = !{!24, !16, i64 40}
!29 = !{!6, !7, i64 156}
!30 = !{!6, !7, i64 152}
!31 = !{!7, !7, i64 0}
!32 = !{!6, !7, i64 196}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,SimplifyCFGPass,TailCallElimPass