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

; 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_int_state = type { i32, i32, i32, i64 }
%struct.int_test = type { i32, i32, [20 x i8], i64, i64, i32 }

@.str = external hidden unnamed_addr constant [9 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [72 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [15 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [52 x i8], align 1
@tests = external hidden constant <{ { i32, i32, <{ i8, i8, [18 x i8] }>, i64, i64, i32 }, { i32, i32, <{ i8, i8, [18 x i8] }>, i64, i64, i32 }, { i32, i32, <{ i8, i8, i8, [17 x i8] }>, i64, i64, i32 }, { i32, i32, <{ i8, [19 x i8] }>, i64, i64, i32 }, { i32, i32, <{ i8, i8, i8, i8, [16 x i8] }>, i64, i64, i32 }, { i32, i32, <{ i8, i8, i8, i8, i8, [15 x i8] }>, i64, i64, i32 }, { i32, i32, <{ [10 x i8], [10 x i8] }>, i64, i64, i32 }, { i32, i32, <{ [11 x i8], [9 x i8] }>, i64, i64, i32 }, { i32, i32, <{ [11 x i8], [9 x i8] }>, i64, i64, i32 }, { i32, i32, <{ [11 x i8], [9 x i8] }>, i64, i64, i32 }, { i32, i32, <{ [11 x i8], [9 x i8] }>, i64, i64, i32 }, { i32, i32, <{ [11 x i8], [9 x i8] }>, i64, i64, i32 }, { i32, i32, <{ [11 x i8], [9 x i8] }>, i64, i64, i32 }, { i32, i32, <{ [11 x i8], [9 x i8] }>, i64, i64, i32 } }>, align 16

; Function Attrs: nounwind uwtable
define dso_local i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca [20 x i8], align 16
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca i32, align 4
  %9 = alloca %struct.lsqpack_dec_int_state, align 8
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.start.p0(i64 20, ptr %5) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  store ptr @tests, ptr %2, align 8, !tbaa !5
  br label %10

10:                                               ; preds = %74, %0
  %11 = load ptr, ptr %2, align 8, !tbaa !5
  %12 = icmp ult ptr %11, getelementptr inbounds (%struct.int_test, ptr @tests, i64 14)
  br i1 %12, label %13, label %77

13:                                               ; preds = %10
  call void @llvm.lifetime.start.p0(i64 24, ptr %9) #5
  %14 = getelementptr inbounds %struct.lsqpack_dec_int_state, ptr %9, i32 0, i32 0
  store i32 0, ptr %14, align 8, !tbaa !9
  store i64 0, ptr %7, align 8, !tbaa !13
  br label %15

15:                                               ; preds = %39, %13
  %16 = load i64, ptr %7, align 8, !tbaa !13
  %17 = load ptr, ptr %2, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.int_test, ptr %17, i32 0, i32 3
  %19 = load i64, ptr %18, align 8, !tbaa !14
  %20 = sub i64 %19, 1
  %21 = icmp ult i64 %16, %20
  br i1 %21, label %22, label %42

22:                                               ; preds = %15
  %23 = load ptr, ptr %2, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct.int_test, ptr %23, i32 0, i32 2
  %25 = getelementptr inbounds [20 x i8], ptr %24, i64 0, i64 0
  %26 = load i64, ptr %7, align 8, !tbaa !13
  %27 = getelementptr inbounds i8, ptr %25, i64 %26
  store ptr %27, ptr %3, align 8, !tbaa !5
  %28 = load ptr, ptr %3, align 8, !tbaa !5
  %29 = getelementptr inbounds i8, ptr %28, i64 1
  %30 = load ptr, ptr %2, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.int_test, ptr %30, i32 0, i32 1
  %32 = load i32, ptr %31, align 4, !tbaa !16
  %33 = call i32 @lsqpack_dec_int(ptr noundef %3, ptr noundef %29, i32 noundef %32, ptr noundef %6, ptr noundef %9)
  store i32 %33, ptr %8, align 4, !tbaa !17
  %34 = load i32, ptr %8, align 4, !tbaa !17
  %35 = icmp eq i32 -1, %34
  br i1 %35, label %36, label %37

36:                                               ; preds = %22
  br label %38

37:                                               ; preds = %22
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 188, ptr noundef @__PRETTY_FUNCTION__.main) #6
  unreachable

38:                                               ; preds = %36
  br label %39

39:                                               ; preds = %38
  %40 = load i64, ptr %7, align 8, !tbaa !13
  %41 = add i64 %40, 1
  store i64 %41, ptr %7, align 8, !tbaa !13
  br label %15, !llvm.loop !18

42:                                               ; preds = %15
  %43 = load ptr, ptr %2, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.int_test, ptr %43, i32 0, i32 2
  %45 = getelementptr inbounds [20 x i8], ptr %44, i64 0, i64 0
  %46 = load i64, ptr %7, align 8, !tbaa !13
  %47 = getelementptr inbounds i8, ptr %45, i64 %46
  store ptr %47, ptr %3, align 8, !tbaa !5
  %48 = load ptr, ptr %3, align 8, !tbaa !5
  %49 = getelementptr inbounds i8, ptr %48, i64 1
  %50 = load ptr, ptr %2, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.int_test, ptr %50, i32 0, i32 1
  %52 = load i32, ptr %51, align 4, !tbaa !16
  %53 = call i32 @lsqpack_dec_int(ptr noundef %3, ptr noundef %49, i32 noundef %52, ptr noundef %6, ptr noundef %9)
  store i32 %53, ptr %8, align 4, !tbaa !17
  %54 = load i32, ptr %8, align 4, !tbaa !17
  %55 = load ptr, ptr %2, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.int_test, ptr %55, i32 0, i32 5
  %57 = load i32, ptr %56, align 8, !tbaa !20
  %58 = icmp eq i32 %54, %57
  br i1 %58, label %59, label %60

59:                                               ; preds = %42
  br label %61

60:                                               ; preds = %42
  call void @__assert_fail(ptr noundef @.str.2, ptr noundef @.str.1, i32 noundef 193, ptr noundef @__PRETTY_FUNCTION__.main) #6
  unreachable

61:                                               ; preds = %59
  %62 = load i32, ptr %8, align 4, !tbaa !17
  %63 = icmp eq i32 0, %62
  br i1 %63, label %64, label %73

64:                                               ; preds = %61
  %65 = load i64, ptr %6, align 8, !tbaa !13
  %66 = load ptr, ptr %2, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.int_test, ptr %66, i32 0, i32 4
  %68 = load i64, ptr %67, align 8, !tbaa !21
  %69 = icmp eq i64 %65, %68
  br i1 %69, label %70, label %71

70:                                               ; preds = %64
  br label %72

71:                                               ; preds = %64
  call void @__assert_fail(ptr noundef @.str.3, ptr noundef @.str.1, i32 noundef 195, ptr noundef @__PRETTY_FUNCTION__.main) #6
  unreachable

72:                                               ; preds = %70
  br label %73

73:                                               ; preds = %72, %61
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #5
  br label %74

74:                                               ; preds = %73
  %75 = load ptr, ptr %2, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.int_test, ptr %75, i32 1
  store ptr %76, ptr %2, align 8, !tbaa !5
  br label %10, !llvm.loop !22

77:                                               ; preds = %10
  store ptr @tests, ptr %2, align 8, !tbaa !5
  br label %78

78:                                               ; preds = %160, %77
  %79 = load ptr, ptr %2, align 8, !tbaa !5
  %80 = icmp ult ptr %79, getelementptr inbounds (%struct.int_test, ptr @tests, i64 14)
  br i1 %80, label %81, label %163

81:                                               ; preds = %78
  %82 = load ptr, ptr %2, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.int_test, ptr %82, i32 0, i32 5
  %84 = load i32, ptr %83, align 8, !tbaa !20
  %85 = icmp ne i32 %84, 0
  br i1 %85, label %86, label %87

86:                                               ; preds = %81
  br label %160

87:                                               ; preds = %81
  store i64 1, ptr %7, align 8, !tbaa !13
  br label %88

88:                                               ; preds = %112, %87
  %89 = load i64, ptr %7, align 8, !tbaa !13
  %90 = load ptr, ptr %2, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.int_test, ptr %90, i32 0, i32 3
  %92 = load i64, ptr %91, align 8, !tbaa !14
  %93 = icmp ult i64 %89, %92
  br i1 %93, label %94, label %115

94:                                               ; preds = %88
  %95 = getelementptr inbounds [20 x i8], ptr %5, i64 0, i64 0
  %96 = getelementptr inbounds [20 x i8], ptr %5, i64 0, i64 0
  %97 = load i64, ptr %7, align 8, !tbaa !13
  %98 = getelementptr inbounds i8, ptr %96, i64 %97
  %99 = load ptr, ptr %2, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.int_test, ptr %99, i32 0, i32 4
  %101 = load i64, ptr %100, align 8, !tbaa !21
  %102 = load ptr, ptr %2, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.int_test, ptr %102, i32 0, i32 1
  %104 = load i32, ptr %103, align 4, !tbaa !16
  %105 = call ptr @lsqpack_enc_int(ptr noundef %95, ptr noundef %98, i64 noundef %101, i32 noundef %104)
  store ptr %105, ptr %4, align 8, !tbaa !5
  %106 = load ptr, ptr %4, align 8, !tbaa !5
  %107 = getelementptr inbounds [20 x i8], ptr %5, i64 0, i64 0
  %108 = icmp eq ptr %106, %107
  br i1 %108, label %109, label %110

109:                                              ; preds = %94
  br label %111

110:                                              ; preds = %94
  call void @__assert_fail(ptr noundef @.str.4, ptr noundef @.str.1, i32 noundef 207, ptr noundef @__PRETTY_FUNCTION__.main) #6
  unreachable

111:                                              ; preds = %109
  br label %112

112:                                              ; preds = %111
  %113 = load i64, ptr %7, align 8, !tbaa !13
  %114 = add i64 %113, 1
  store i64 %114, ptr %7, align 8, !tbaa !13
  br label %88, !llvm.loop !23

115:                                              ; preds = %88
  br label %116

116:                                              ; preds = %156, %115
  %117 = load i64, ptr %7, align 8, !tbaa !13
  %118 = icmp ule i64 %117, 20
  br i1 %118, label %119, label %159

119:                                              ; preds = %116
  %120 = getelementptr inbounds [20 x i8], ptr %5, i64 0, i64 0
  store i8 0, ptr %120, align 16, !tbaa !24
  %121 = getelementptr inbounds [20 x i8], ptr %5, i64 0, i64 0
  %122 = getelementptr inbounds [20 x i8], ptr %5, i64 0, i64 0
  %123 = load i64, ptr %7, align 8, !tbaa !13
  %124 = getelementptr inbounds i8, ptr %122, i64 %123
  %125 = load ptr, ptr %2, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.int_test, ptr %125, i32 0, i32 4
  %127 = load i64, ptr %126, align 8, !tbaa !21
  %128 = load ptr, ptr %2, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.int_test, ptr %128, i32 0, i32 1
  %130 = load i32, ptr %129, align 4, !tbaa !16
  %131 = call ptr @lsqpack_enc_int(ptr noundef %121, ptr noundef %124, i64 noundef %127, i32 noundef %130)
  store ptr %131, ptr %4, align 8, !tbaa !5
  %132 = load ptr, ptr %4, align 8, !tbaa !5
  %133 = getelementptr inbounds [20 x i8], ptr %5, i64 0, i64 0
  %134 = ptrtoint ptr %132 to i64
  %135 = ptrtoint ptr %133 to i64
  %136 = sub i64 %134, %135
  %137 = load ptr, ptr %2, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct.int_test, ptr %137, i32 0, i32 3
  %139 = load i64, ptr %138, align 8, !tbaa !14
  %140 = icmp eq i64 %136, %139
  br i1 %140, label %141, label %142

141:                                              ; preds = %119
  br label %143

142:                                              ; preds = %119
  call void @__assert_fail(ptr noundef @.str.5, ptr noundef @.str.1, i32 noundef 214, ptr noundef @__PRETTY_FUNCTION__.main) #6
  unreachable

143:                                              ; preds = %141
  %144 = getelementptr inbounds [20 x i8], ptr %5, i64 0, i64 0
  %145 = load ptr, ptr %2, align 8, !tbaa !5
  %146 = getelementptr inbounds %struct.int_test, ptr %145, i32 0, i32 2
  %147 = getelementptr inbounds [20 x i8], ptr %146, i64 0, i64 0
  %148 = load ptr, ptr %2, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct.int_test, ptr %148, i32 0, i32 3
  %150 = load i64, ptr %149, align 8, !tbaa !14
  %151 = call i32 @memcmp(ptr noundef %144, ptr noundef %147, i64 noundef %150) #7
  %152 = icmp eq i32 0, %151
  br i1 %152, label %153, label %154

153:                                              ; preds = %143
  br label %155

154:                                              ; preds = %143
  call void @__assert_fail(ptr noundef @.str.6, ptr noundef @.str.1, i32 noundef 215, ptr noundef @__PRETTY_FUNCTION__.main) #6
  unreachable

155:                                              ; preds = %153
  br label %156

156:                                              ; preds = %155
  %157 = load i64, ptr %7, align 8, !tbaa !13
  %158 = add i64 %157, 1
  store i64 %158, ptr %7, align 8, !tbaa !13
  br label %116, !llvm.loop !25

159:                                              ; preds = %116
  br label %160

160:                                              ; preds = %159, %86
  %161 = load ptr, ptr %2, align 8, !tbaa !5
  %162 = getelementptr inbounds %struct.int_test, ptr %161, i32 1
  store ptr %162, ptr %2, align 8, !tbaa !5
  br label %78, !llvm.loop !26

163:                                              ; preds = %78
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 20, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #5
  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_dec_int(ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef) #2

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

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

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

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

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { 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 = { 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 #4 = { 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 #5 = { nounwind }
attributes #6 = { noreturn nounwind }
attributes #7 = { 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, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"lsqpack_dec_int_state", !11, i64 0, !11, i64 4, !11, i64 8, !12, i64 16}
!11 = !{!"int", !7, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!12, !12, i64 0}
!14 = !{!15, !12, i64 32}
!15 = !{!"int_test", !11, i64 0, !11, i64 4, !7, i64 8, !12, i64 32, !12, i64 40, !11, i64 48}
!16 = !{!15, !11, i64 4}
!17 = !{!11, !11, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = !{!15, !11, i64 48}
!21 = !{!15, !12, i64 40}
!22 = distinct !{!22, !19}
!23 = distinct !{!23, !19}
!24 = !{!7, !7, i64 0}
!25 = distinct !{!25, !19}
!26 = distinct !{!26, !19}


; 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_int_state = type { i32, i32, i32, i64 }

@.str = external hidden unnamed_addr constant [9 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [72 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [15 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [52 x i8], align 1
@tests = external hidden constant <{ { i32, i32, <{ i8, i8, [18 x i8] }>, i64, i64, i32 }, { i32, i32, <{ i8, i8, [18 x i8] }>, i64, i64, i32 }, { i32, i32, <{ i8, i8, i8, [17 x i8] }>, i64, i64, i32 }, { i32, i32, <{ i8, [19 x i8] }>, i64, i64, i32 }, { i32, i32, <{ i8, i8, i8, i8, [16 x i8] }>, i64, i64, i32 }, { i32, i32, <{ i8, i8, i8, i8, i8, [15 x i8] }>, i64, i64, i32 }, { i32, i32, <{ [10 x i8], [10 x i8] }>, i64, i64, i32 }, { i32, i32, <{ [11 x i8], [9 x i8] }>, i64, i64, i32 }, { i32, i32, <{ [11 x i8], [9 x i8] }>, i64, i64, i32 }, { i32, i32, <{ [11 x i8], [9 x i8] }>, i64, i64, i32 }, { i32, i32, <{ [11 x i8], [9 x i8] }>, i64, i64, i32 }, { i32, i32, <{ [11 x i8], [9 x i8] }>, i64, i64, i32 }, { i32, i32, <{ [11 x i8], [9 x i8] }>, i64, i64, i32 }, { i32, i32, <{ [11 x i8], [9 x i8] }>, i64, i64, i32 } }>, align 16

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca ptr, align 8
  %2 = alloca [20 x i8], align 16
  %3 = alloca i64, align 8
  %4 = alloca %struct.lsqpack_dec_int_state, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #5
  call void @llvm.lifetime.start.p0(i64 20, ptr nonnull %2) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #5
  br label %6

.preheader39:                                     ; preds = %38
  %5 = ptrtoint ptr %2 to i64
  br label %40

6:                                                ; preds = %0, %38
  %.034.idx44 = phi i64 [ 0, %0 ], [ %.034.add, %38 ]
  %.034.ptr45 = getelementptr inbounds i8, ptr @tests, i64 %.034.idx44
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #5
  store i32 0, ptr %4, align 8, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %.034.ptr45, i64 32
  %8 = load i64, ptr %7, align 8, !tbaa !11
  %9 = add i64 %8, -1
  %.not54 = icmp eq i64 %9, 0
  br i1 %.not54, label %.._crit_edge_crit_edge, label %.lr.ph

.._crit_edge_crit_edge:                           ; preds = %6
  %.phi.trans.insert = getelementptr inbounds i8, ptr %.034.ptr45, i64 4
  %.pre = load i32, ptr %.phi.trans.insert, align 4, !tbaa !13
  br label %._crit_edge

.lr.ph:                                           ; preds = %6
  %10 = getelementptr inbounds i8, ptr %.034.ptr45, i64 8
  %11 = getelementptr inbounds i8, ptr %.034.ptr45, i64 4
  %12 = load i32, ptr %11, align 4, !tbaa !13
  br label %13

13:                                               ; preds = %.lr.ph, %19
  %.043 = phi i64 [ 0, %.lr.ph ], [ %20, %19 ]
  %14 = getelementptr inbounds i8, ptr %10, i64 %.043
  store ptr %14, ptr %1, align 8, !tbaa !14
  %15 = getelementptr inbounds i8, ptr %14, i64 1
  %16 = call i32 @lsqpack_dec_int(ptr noundef nonnull %1, ptr noundef nonnull %15, i32 noundef %12, ptr noundef nonnull %3, ptr noundef nonnull %4) #5
  %17 = icmp eq i32 %16, -1
  br i1 %17, label %19, label %18

18:                                               ; preds = %13
  call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 188, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #6
  unreachable

19:                                               ; preds = %13
  %20 = add nuw i64 %.043, 1
  %exitcond.not = icmp eq i64 %20, %9
  br i1 %exitcond.not, label %._crit_edge, label %13, !llvm.loop !16

._crit_edge:                                      ; preds = %19, %.._crit_edge_crit_edge
  %21 = phi i32 [ %.pre, %.._crit_edge_crit_edge ], [ %12, %19 ]
  %22 = getelementptr inbounds i8, ptr %.034.ptr45, i64 8
  %23 = getelementptr inbounds i8, ptr %22, i64 %9
  store ptr %23, ptr %1, align 8, !tbaa !14
  %24 = getelementptr inbounds i8, ptr %22, i64 %8
  %25 = call i32 @lsqpack_dec_int(ptr noundef nonnull %1, ptr noundef nonnull %24, i32 noundef %21, ptr noundef nonnull %3, ptr noundef nonnull %4) #5
  %26 = getelementptr inbounds i8, ptr %.034.ptr45, i64 48
  %27 = load i32, ptr %26, align 8, !tbaa !18
  %28 = icmp eq i32 %25, %27
  br i1 %28, label %30, label %29

29:                                               ; preds = %._crit_edge
  call void @__assert_fail(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.1, i32 noundef 193, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #6
  unreachable

30:                                               ; preds = %._crit_edge
  %31 = icmp eq i32 %25, 0
  br i1 %31, label %32, label %38

32:                                               ; preds = %30
  %33 = load i64, ptr %3, align 8, !tbaa !19
  %34 = getelementptr inbounds i8, ptr %.034.ptr45, i64 40
  %35 = load i64, ptr %34, align 8, !tbaa !20
  %36 = icmp eq i64 %33, %35
  br i1 %36, label %38, label %37

37:                                               ; preds = %32
  call void @__assert_fail(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.1, i32 noundef 195, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #6
  unreachable

38:                                               ; preds = %32, %30
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #5
  %.034.add = add nuw nsw i64 %.034.idx44, 56
  %39 = icmp ult i64 %.034.idx44, 728
  br i1 %39, label %6, label %.preheader39, !llvm.loop !21

40:                                               ; preds = %.preheader39, %.loopexit
  %.135.idx52 = phi i64 [ 0, %.preheader39 ], [ %.135.add, %.loopexit ]
  %.135.ptr53 = getelementptr inbounds i8, ptr @tests, i64 %.135.idx52
  %41 = getelementptr inbounds i8, ptr %.135.ptr53, i64 48
  %42 = load i32, ptr %41, align 8, !tbaa !18
  %.not = icmp eq i32 %42, 0
  br i1 %.not, label %.preheader38, label %.loopexit

.preheader38:                                     ; preds = %40
  %43 = getelementptr inbounds i8, ptr %.135.ptr53, i64 32
  %44 = load i64, ptr %43, align 8, !tbaa !11
  %45 = icmp ugt i64 %44, 1
  br i1 %45, label %.lr.ph47, label %.lr.ph51

.lr.ph47:                                         ; preds = %.preheader38
  %46 = getelementptr inbounds i8, ptr %.135.ptr53, i64 40
  %47 = load i64, ptr %46, align 8, !tbaa !20
  %48 = getelementptr inbounds i8, ptr %.135.ptr53, i64 4
  %49 = load i32, ptr %48, align 4, !tbaa !13
  br label %56

.preheader:                                       ; preds = %61
  %50 = icmp ult i64 %44, 21
  br i1 %50, label %.lr.ph51, label %.loopexit

.lr.ph51:                                         ; preds = %.preheader38, %.preheader
  %.1.lcssa59 = phi i64 [ %44, %.preheader ], [ 1, %.preheader38 ]
  %51 = getelementptr inbounds i8, ptr %.135.ptr53, i64 40
  %52 = load i64, ptr %51, align 8, !tbaa !20
  %53 = getelementptr inbounds i8, ptr %.135.ptr53, i64 4
  %54 = load i32, ptr %53, align 4, !tbaa !13
  %55 = getelementptr inbounds i8, ptr %.135.ptr53, i64 8
  br label %65

56:                                               ; preds = %.lr.ph47, %61
  %.146 = phi i64 [ 1, %.lr.ph47 ], [ %62, %61 ]
  %57 = getelementptr inbounds i8, ptr %2, i64 %.146
  %58 = call ptr @lsqpack_enc_int(ptr noundef nonnull %2, ptr noundef nonnull %57, i64 noundef %47, i32 noundef %49) #5
  %59 = icmp eq ptr %58, %2
  br i1 %59, label %61, label %60

60:                                               ; preds = %56
  call void @__assert_fail(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.1, i32 noundef 207, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #6
  unreachable

61:                                               ; preds = %56
  %62 = add nuw i64 %.146, 1
  %exitcond56.not = icmp eq i64 %62, %44
  br i1 %exitcond56.not, label %.preheader, label %56, !llvm.loop !22

63:                                               ; preds = %72
  %64 = add i64 %.250, 1
  %exitcond57.not = icmp eq i64 %64, 21
  br i1 %exitcond57.not, label %.loopexit, label %65, !llvm.loop !23

65:                                               ; preds = %.lr.ph51, %63
  %.250 = phi i64 [ %.1.lcssa59, %.lr.ph51 ], [ %64, %63 ]
  store i8 0, ptr %2, align 16, !tbaa !24
  %66 = getelementptr inbounds i8, ptr %2, i64 %.250
  %67 = call ptr @lsqpack_enc_int(ptr noundef nonnull %2, ptr noundef nonnull %66, i64 noundef %52, i32 noundef %54) #5
  %68 = ptrtoint ptr %67 to i64
  %69 = sub i64 %68, %5
  %70 = icmp eq i64 %69, %44
  br i1 %70, label %72, label %71

71:                                               ; preds = %65
  call void @__assert_fail(ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.1, i32 noundef 214, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #6
  unreachable

72:                                               ; preds = %65
  %bcmp = call i32 @bcmp(ptr nonnull %2, ptr nonnull %55, i64 %44)
  %73 = icmp eq i32 %bcmp, 0
  br i1 %73, label %63, label %74

74:                                               ; preds = %72
  call void @__assert_fail(ptr noundef nonnull @.str.6, ptr noundef nonnull @.str.1, i32 noundef 215, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #6
  unreachable

.loopexit:                                        ; preds = %63, %.preheader, %40
  %.135.add = add nuw nsw i64 %.135.idx52, 56
  %75 = icmp ult i64 %.135.idx52, 728
  br i1 %75, label %40, label %76, !llvm.loop !25

76:                                               ; preds = %.loopexit
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 20, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #5
  ret i32 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 @lsqpack_dec_int(ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

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

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

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

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

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { 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 = { 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 #4 = { nofree nounwind willreturn memory(argmem: read) }
attributes #5 = { nounwind }
attributes #6 = { 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, !7, i64 0}
!6 = !{!"lsqpack_dec_int_state", !7, i64 0, !7, i64 4, !7, i64 8, !10, i64 16}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"long", !8, i64 0}
!11 = !{!12, !10, i64 32}
!12 = !{!"int_test", !7, i64 0, !7, i64 4, !8, i64 8, !10, i64 32, !10, i64 40, !7, i64 48}
!13 = !{!12, !7, i64 4}
!14 = !{!15, !15, i64 0}
!15 = !{!"any pointer", !8, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = !{!12, !7, i64 48}
!19 = !{!10, !10, i64 0}
!20 = !{!12, !10, i64 40}
!21 = distinct !{!21, !17}
!22 = distinct !{!22, !17}
!23 = distinct !{!23, !17}
!24 = !{!8, !8, i64 0}
!25 = distinct !{!25, !17}


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