; LLVM IR from litespeedtech/ls-qpack :: test (test_circ_list)

; 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_dec_hset_if = type { ptr, ptr, ptr }
%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_dec = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, ptr, ptr, %struct.lsqpack_ringbuf, %struct.anon.4, [8 x %struct.anon.5], i32, float, %struct.anon.6, %struct.lsqpack_dec_err }
%struct.lsqpack_ringbuf = type { i32, i32, i32, ptr }
%struct.anon.4 = type { ptr, ptr }
%struct.anon.5 = type { ptr, ptr }
%struct.anon.6 = type { i32, %union.anon }
%union.anon = type { %struct.anon.7 }
%struct.anon.7 = type { %struct.lsqpack_dec_int_state, %struct.lsqpack_huff_decode_state, i32, i32, ptr, ptr, ptr, i32, i32, i32, i32, i8, i8 }
%struct.lsqpack_huff_decode_state = type { i32, %struct.lsqpack_decode_status }
%struct.lsqpack_decode_status = type { i8, i8 }
%struct.lsqpack_dec_err = type { i32, i32, i64, i64 }
%struct.lsxpack_header = type { ptr, i32, i32, i32, i32, i16, i16, i16, i8, i8, i8, i8, i8, i8 }

@main.callbacks = external hidden global %struct.lsqpack_dec_hset_if, align 8
@stdout = external global ptr, align 8
@.str = external hidden unnamed_addr constant [20 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [78 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [29 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @main(i32 noundef %0, ptr noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca %struct.lsqpack_enc, align 8
  %7 = alloca %struct.lsqpack_dec, align 8
  %8 = alloca [6 x i8], align 1
  %9 = alloca i64, align 8
  %10 = alloca [6 x i8], align 1
  %11 = alloca i64, align 8
  %12 = alloca i32, align 4
  %13 = alloca [1024 x i8], align 16
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  %16 = alloca [1024 x i8], align 16
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  %19 = alloca %struct.lsxpack_header, align 8
  %20 = alloca ptr, align 8
  %21 = alloca ptr, align 8
  %22 = alloca i32, align 4
  %23 = alloca [22 x i8], align 16
  store i32 0, ptr %3, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 240, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 352, ptr %7) #6
  call void @llvm.lifetime.start.p0(i64 6, ptr %8) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  store i64 6, ptr %9, align 8, !tbaa !11
  %24 = getelementptr inbounds [6 x i8], ptr %8, i64 0, i64 0
  %25 = call i32 @lsqpack_enc_init(ptr noundef %6, ptr noundef null, i32 noundef 4096, i32 noundef 4096, i32 noundef 100, i32 noundef 1, ptr noundef %24, ptr noundef %9)
  %26 = load ptr, ptr @stdout, align 8, !tbaa !9
  call void @lsqpack_dec_init(ptr noundef %7, ptr noundef %26, i32 noundef 4096, i32 noundef 100, ptr noundef @main.callbacks, i32 noundef 0)
  %27 = getelementptr inbounds [6 x i8], ptr %8, i64 0, i64 0
  %28 = load i64, ptr %9, align 8, !tbaa !11
  %29 = call i32 @lsqpack_dec_enc_in(ptr noundef %7, ptr noundef %27, i64 noundef %28)
  call void @llvm.lifetime.start.p0(i64 6, ptr %10) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  store i64 0, ptr %11, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  store i32 0, ptr %12, align 4, !tbaa !5
  br label %30

30:                                               ; preds = %73, %2
  %31 = load i32, ptr %12, align 4, !tbaa !5
  %32 = icmp ult i32 %31, 6
  br i1 %32, label %34, label %33

33:                                               ; preds = %30
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  br label %76

34:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 1024, ptr %13) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  store i64 0, ptr %14, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  store i64 1024, ptr %15, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 1024, ptr %16) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  store i64 0, ptr %17, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  store i64 1024, ptr %18, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 40, ptr %19) #6
  call void @llvm.memset.p0.i64(ptr align 8 %19, i8 0, i64 40, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #6
  %35 = load i32, ptr %12, align 4, !tbaa !5
  %36 = call i32 @lsqpack_enc_start_header(ptr noundef %6, i64 noundef 0, i32 noundef %35)
  store ptr @.str, ptr %20, align 8, !tbaa !9
  %37 = load ptr, ptr %20, align 8, !tbaa !9
  call void @lsxpack_header_set_offset2(ptr noundef %19, ptr noundef %37, i64 noundef 0, i64 noundef 10, i64 noundef 10, i64 noundef 9)
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #6
  %38 = load i64, ptr %14, align 8, !tbaa !11
  %39 = getelementptr inbounds [1024 x i8], ptr %13, i64 0, i64 %38
  %40 = load i64, ptr %17, align 8, !tbaa !11
  %41 = getelementptr inbounds [1024 x i8], ptr %16, i64 0, i64 %40
  %42 = call i32 @lsqpack_enc_encode(ptr noundef %6, ptr noundef %39, ptr noundef %15, ptr noundef %41, ptr noundef %18, ptr noundef %19, i32 noundef 0)
  store i32 %42, ptr %22, align 4, !tbaa !5
  %43 = load i32, ptr %22, align 4, !tbaa !5
  %44 = icmp eq i32 %43, 0
  br i1 %44, label %45, label %46

45:                                               ; preds = %34
  br label %47

46:                                               ; preds = %34
  call void @__assert_fail(ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 75, ptr noundef @__PRETTY_FUNCTION__.main) #7
  unreachable

47:                                               ; preds = %45
  %48 = load i64, ptr %15, align 8, !tbaa !11
  %49 = load i64, ptr %14, align 8, !tbaa !11
  %50 = add i64 %49, %48
  store i64 %50, ptr %14, align 8, !tbaa !11
  %51 = load i64, ptr %18, align 8, !tbaa !11
  %52 = load i64, ptr %17, align 8, !tbaa !11
  %53 = add i64 %52, %51
  store i64 %53, ptr %17, align 8, !tbaa !11
  %54 = load i64, ptr %14, align 8, !tbaa !11
  %55 = sub i64 1024, %54
  store i64 %55, ptr %15, align 8, !tbaa !11
  %56 = load i64, ptr %17, align 8, !tbaa !11
  %57 = sub i64 1024, %56
  store i64 %57, ptr %18, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 22, ptr %23) #6
  %58 = getelementptr inbounds [22 x i8], ptr %23, i64 0, i64 0
  %59 = call i64 @lsqpack_enc_end_header(ptr noundef %6, ptr noundef %58, i64 noundef 22, ptr noundef null)
  %60 = load i64, ptr %14, align 8, !tbaa !11
  %61 = icmp ugt i64 %60, 0
  br i1 %61, label %62, label %72

62:                                               ; preds = %47
  %63 = getelementptr inbounds [1024 x i8], ptr %13, i64 0, i64 0
  %64 = load i64, ptr %14, align 8, !tbaa !11
  %65 = call i32 @lsqpack_dec_enc_in(ptr noundef %7, ptr noundef %63, i64 noundef %64)
  %66 = call i32 @lsqpack_dec_ici_pending(ptr noundef %7)
  %67 = icmp ne i32 %66, 0
  br i1 %67, label %68, label %71

68:                                               ; preds = %62
  %69 = getelementptr inbounds [6 x i8], ptr %10, i64 0, i64 0
  %70 = call i64 @lsqpack_dec_write_ici(ptr noundef %7, ptr noundef %69, i64 noundef 6)
  store i64 %70, ptr %11, align 8, !tbaa !11
  br label %71

71:                                               ; preds = %68, %62
  br label %72

72:                                               ; preds = %71, %47
  call void @llvm.lifetime.end.p0(i64 22, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 1024, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 1024, ptr %13) #6
  br label %73

73:                                               ; preds = %72
  %74 = load i32, ptr %12, align 4, !tbaa !5
  %75 = add i32 %74, 1
  store i32 %75, ptr %12, align 4, !tbaa !5
  br label %30, !llvm.loop !13

76:                                               ; preds = %33
  %77 = getelementptr inbounds [6 x i8], ptr %10, i64 0, i64 0
  %78 = load i64, ptr %11, align 8, !tbaa !11
  %79 = call i32 @lsqpack_enc_decoder_in(ptr noundef %6, ptr noundef %77, i64 noundef %78)
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 6, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 6, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 352, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 240, ptr %6) #6
  ret i32 0
}

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

declare i32 @lsqpack_enc_init(ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef) #2

declare void @lsqpack_dec_init(ptr noundef, ptr noundef, i32 noundef, i32 noundef, ptr noundef, i32 noundef) #2

declare i32 @lsqpack_dec_enc_in(ptr noundef, ptr noundef, i64 noundef) #2

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

declare i32 @lsqpack_enc_start_header(ptr noundef, i64 noundef, i32 noundef) #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @lsxpack_header_set_offset2(ptr noundef, ptr noundef, i64 noundef, i64 noundef, i64 noundef, i64 noundef) #4

declare i32 @lsqpack_enc_encode(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef) #2

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

declare i64 @lsqpack_enc_end_header(ptr noundef, ptr noundef, i64 noundef, ptr noundef) #2

declare i32 @lsqpack_dec_ici_pending(ptr noundef) #2

declare i64 @lsqpack_dec_write_ici(ptr noundef, ptr noundef, i64 noundef) #2

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

declare i32 @lsqpack_enc_decoder_in(ptr noundef, ptr noundef, i64 noundef) #2

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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: write) }
attributes #4 = { inlinehint 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 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind }
attributes #7 = { noreturn 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}


; 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.lsqpack_dec_hset_if = type { ptr, ptr, ptr }
%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_dec = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, ptr, ptr, %struct.lsqpack_ringbuf, %struct.anon.4, [8 x %struct.anon.5], i32, float, %struct.anon.6, %struct.lsqpack_dec_err }
%struct.lsqpack_ringbuf = type { i32, i32, i32, ptr }
%struct.anon.4 = type { ptr, ptr }
%struct.anon.5 = type { ptr, ptr }
%struct.anon.6 = type { i32, %union.anon }
%union.anon = type { %struct.anon.7 }
%struct.anon.7 = type { %struct.lsqpack_dec_int_state, %struct.lsqpack_huff_decode_state, i32, i32, ptr, ptr, ptr, i32, i32, i32, i32, i8, i8 }
%struct.lsqpack_huff_decode_state = type { i32, %struct.lsqpack_decode_status }
%struct.lsqpack_decode_status = type { i8, i8 }
%struct.lsqpack_dec_err = type { i32, i32, i64, i64 }
%struct.lsxpack_header = type { ptr, i32, i32, i32, i32, i16, i16, i16, i8, i8, i8, i8, i8, i8 }

@main.callbacks = external hidden global %struct.lsqpack_dec_hset_if, align 8
@stdout = external local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [20 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [78 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [29 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr nocapture noundef readnone %1) local_unnamed_addr #0 {
  %3 = alloca %struct.lsqpack_enc, align 8
  %4 = alloca %struct.lsqpack_dec, align 8
  %5 = alloca [6 x i8], align 1
  %6 = alloca i64, align 8
  %7 = alloca [6 x i8], align 1
  %8 = alloca [1024 x i8], align 16
  %9 = alloca i64, align 8
  %10 = alloca [1024 x i8], align 16
  %11 = alloca i64, align 8
  %12 = alloca %struct.lsxpack_header, align 8
  %13 = alloca [22 x i8], align 16
  call void @llvm.lifetime.start.p0(i64 240, ptr nonnull %3) #6
  call void @llvm.lifetime.start.p0(i64 352, ptr nonnull %4) #6
  call void @llvm.lifetime.start.p0(i64 6, ptr nonnull %5) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #6
  store i64 6, ptr %6, align 8, !tbaa !5
  %14 = call i32 @lsqpack_enc_init(ptr noundef nonnull %3, ptr noundef null, i32 noundef 4096, i32 noundef 4096, i32 noundef 100, i32 noundef 1, ptr noundef nonnull %5, ptr noundef nonnull %6) #6
  %15 = load ptr, ptr @stdout, align 8, !tbaa !9
  call void @lsqpack_dec_init(ptr noundef nonnull %4, ptr noundef %15, i32 noundef 4096, i32 noundef 100, ptr noundef nonnull @main.callbacks, i32 noundef 0) #6
  %16 = load i64, ptr %6, align 8, !tbaa !5
  %17 = call i32 @lsqpack_dec_enc_in(ptr noundef nonnull %4, ptr noundef nonnull %5, i64 noundef %16) #6
  call void @llvm.lifetime.start.p0(i64 6, ptr nonnull %7) #6
  br label %20

18:                                               ; preds = %36
  %19 = call i32 @lsqpack_enc_decoder_in(ptr noundef nonnull %3, ptr noundef nonnull %7, i64 noundef %.1) #6
  call void @llvm.lifetime.end.p0(i64 6, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 6, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 352, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 240, ptr nonnull %3) #6
  ret i32 0

20:                                               ; preds = %2, %36
  %.018 = phi i64 [ 0, %2 ], [ %.1, %36 ]
  %.01317 = phi i32 [ 0, %2 ], [ %37, %36 ]
  call void @llvm.lifetime.start.p0(i64 1024, ptr nonnull %8) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #6
  store i64 1024, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1024, ptr nonnull %10) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #6
  store i64 1024, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %12) #6
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(40) %12, i8 0, i64 40, i1 false)
  %21 = call i32 @lsqpack_enc_start_header(ptr noundef nonnull %3, i64 noundef 0, i32 noundef %.01317) #6
  call void @lsxpack_header_set_offset2(ptr noundef nonnull %12, ptr noundef nonnull @.str, i64 noundef 0, i64 noundef 10, i64 noundef 10, i64 noundef 9)
  %22 = call i32 @lsqpack_enc_encode(ptr noundef nonnull %3, ptr noundef nonnull %8, ptr noundef nonnull %9, ptr noundef nonnull %10, ptr noundef nonnull %11, ptr noundef nonnull %12, i32 noundef 0) #6
  %23 = icmp eq i32 %22, 0
  br i1 %23, label %25, label %24

24:                                               ; preds = %20
  call void @__assert_fail(ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef 75, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #7
  unreachable

25:                                               ; preds = %20
  %26 = load i64, ptr %9, align 8, !tbaa !5
  %27 = load i64, ptr %11, align 8, !tbaa !5
  %28 = sub i64 1024, %26
  store i64 %28, ptr %9, align 8, !tbaa !5
  %29 = sub i64 1024, %27
  store i64 %29, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 22, ptr nonnull %13) #6
  %30 = call i64 @lsqpack_enc_end_header(ptr noundef nonnull %3, ptr noundef nonnull %13, i64 noundef 22, ptr noundef null) #6
  %.not = icmp eq i64 %26, 0
  br i1 %.not, label %36, label %31

31:                                               ; preds = %25
  %32 = call i32 @lsqpack_dec_enc_in(ptr noundef nonnull %4, ptr noundef nonnull %8, i64 noundef %26) #6
  %33 = call i32 @lsqpack_dec_ici_pending(ptr noundef nonnull %4) #6
  %.not15 = icmp eq i32 %33, 0
  br i1 %.not15, label %36, label %34

34:                                               ; preds = %31
  %35 = call i64 @lsqpack_dec_write_ici(ptr noundef nonnull %4, ptr noundef nonnull %7, i64 noundef 6) #6
  br label %36

36:                                               ; preds = %31, %34, %25
  %.1 = phi i64 [ %35, %34 ], [ %.018, %31 ], [ %.018, %25 ]
  call void @llvm.lifetime.end.p0(i64 22, ptr nonnull %13) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #6
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %8) #6
  %37 = add nuw nsw i32 %.01317, 1
  %exitcond.not = icmp eq i32 %37, 6
  br i1 %exitcond.not, label %18, label %20, !llvm.loop !11
}

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

declare i32 @lsqpack_enc_init(ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare void @lsqpack_dec_init(ptr noundef, ptr noundef, i32 noundef, i32 noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

declare i32 @lsqpack_dec_enc_in(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #2

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

declare i32 @lsqpack_enc_start_header(ptr noundef, i64 noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @lsxpack_header_set_offset2(ptr noundef, ptr noundef, i64 noundef, i64 noundef, i64 noundef, i64 noundef) local_unnamed_addr #4

declare i32 @lsqpack_enc_encode(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

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

declare i64 @lsqpack_enc_end_header(ptr noundef, ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #2

declare i32 @lsqpack_dec_ici_pending(ptr noundef) local_unnamed_addr #2

declare i64 @lsqpack_dec_write_ici(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #2

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

declare i32 @lsqpack_enc_decoder_in(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #2

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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: write) }
attributes #4 = { inlinehint 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 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind }
attributes #7 = { noreturn 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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}


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