; LLVM IR from ebiggers/libdeflate :: programs (test_litrunlen_overflow)

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

@main.levels = external hidden constant [3 x i32], align 4
@.str = external hidden unnamed_addr constant [15 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [88 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [53 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 i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca i64, align 8
  %17 = alloca i32, align 4
  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 4, ptr %6) #7
  store i32 125500, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  store i32 0, ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %18 = load ptr, ptr %5, align 8, !tbaa !9
  call void @begin_program(ptr noundef %18)
  %19 = call ptr @xmalloc(i64 noundef 125500)
  store ptr %19, ptr %7, align 8, !tbaa !9
  %20 = call ptr @xmalloc(i64 noundef 125500)
  store ptr %20, ptr %8, align 8, !tbaa !9
  %21 = call ptr @xmalloc(i64 noundef 125500)
  store ptr %21, ptr %9, align 8, !tbaa !9
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %22

22:                                               ; preds = %52, %2
  %23 = load i32, ptr %10, align 4, !tbaa !5
  %24 = icmp slt i32 %23, 2
  br i1 %24, label %25, label %55

25:                                               ; preds = %22
  store i32 1, ptr %11, align 4, !tbaa !5
  br label %26

26:                                               ; preds = %48, %25
  %27 = load i32, ptr %11, align 4, !tbaa !5
  %28 = icmp slt i32 %27, 251
  br i1 %28, label %29, label %51

29:                                               ; preds = %26
  store i32 0, ptr %12, align 4, !tbaa !5
  br label %30

30:                                               ; preds = %44, %29
  %31 = load i32, ptr %12, align 4, !tbaa !5
  %32 = icmp slt i32 %31, 251
  br i1 %32, label %33, label %47

33:                                               ; preds = %30
  %34 = load i32, ptr %11, align 4, !tbaa !5
  %35 = load i32, ptr %12, align 4, !tbaa !5
  %36 = mul nsw i32 %34, %35
  %37 = srem i32 %36, 251
  %38 = trunc i32 %37 to i8
  %39 = load ptr, ptr %7, align 8, !tbaa !9
  %40 = load i32, ptr %13, align 4, !tbaa !5
  %41 = add nsw i32 %40, 1
  store i32 %41, ptr %13, align 4, !tbaa !5
  %42 = sext i32 %40 to i64
  %43 = getelementptr inbounds i8, ptr %39, i64 %42
  store i8 %38, ptr %43, align 1, !tbaa !11
  br label %44

44:                                               ; preds = %33
  %45 = load i32, ptr %12, align 4, !tbaa !5
  %46 = add nsw i32 %45, 1
  store i32 %46, ptr %12, align 4, !tbaa !5
  br label %30, !llvm.loop !12

47:                                               ; preds = %30
  br label %48

48:                                               ; preds = %47
  %49 = load i32, ptr %11, align 4, !tbaa !5
  %50 = add nsw i32 %49, 1
  store i32 %50, ptr %11, align 4, !tbaa !5
  br label %26, !llvm.loop !14

51:                                               ; preds = %26
  br label %52

52:                                               ; preds = %51
  %53 = load i32, ptr %10, align 4, !tbaa !5
  %54 = add nsw i32 %53, 1
  store i32 %54, ptr %10, align 4, !tbaa !5
  br label %22, !llvm.loop !15

55:                                               ; preds = %22
  %56 = load i32, ptr %13, align 4, !tbaa !5
  %57 = icmp eq i32 %56, 125500
  %58 = xor i1 %57, true
  %59 = xor i1 %58, true
  %60 = xor i1 %59, true
  %61 = zext i1 %60 to i32
  %62 = sext i32 %61 to i64
  %63 = call i64 @llvm.expect.i64(i64 %62, i64 0)
  %64 = icmp ne i64 %63, 0
  br i1 %64, label %65, label %66

65:                                               ; preds = %55
  call void @assertion_failed(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 41) #8
  unreachable

66:                                               ; preds = %55
  %67 = call ptr @libdeflate_alloc_decompressor()
  store ptr %67, ptr %14, align 8, !tbaa !9
  %68 = load ptr, ptr %14, align 8, !tbaa !9
  %69 = icmp ne ptr %68, null
  %70 = xor i1 %69, true
  %71 = xor i1 %70, true
  %72 = xor i1 %71, true
  %73 = zext i1 %72 to i32
  %74 = sext i32 %73 to i64
  %75 = call i64 @llvm.expect.i64(i64 %74, i64 0)
  %76 = icmp ne i64 %75, 0
  br i1 %76, label %77, label %78

77:                                               ; preds = %66
  call void @assertion_failed(ptr noundef @.str.2, ptr noundef @.str.1, i32 noundef 44) #8
  unreachable

78:                                               ; preds = %66
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %79

79:                                               ; preds = %150, %78
  %80 = load i32, ptr %10, align 4, !tbaa !5
  %81 = sext i32 %80 to i64
  %82 = icmp ult i64 %81, 3
  br i1 %82, label %83, label %153

83:                                               ; preds = %79
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  %84 = load i32, ptr %10, align 4, !tbaa !5
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds [3 x i32], ptr @main.levels, i64 0, i64 %85
  %87 = load i32, ptr %86, align 4, !tbaa !5
  %88 = call ptr @libdeflate_alloc_compressor(i32 noundef %87)
  store ptr %88, ptr %15, align 8, !tbaa !9
  %89 = load ptr, ptr %15, align 8, !tbaa !9
  %90 = icmp ne ptr %89, null
  %91 = xor i1 %90, true
  %92 = xor i1 %91, true
  %93 = xor i1 %92, true
  %94 = zext i1 %93 to i32
  %95 = sext i32 %94 to i64
  %96 = call i64 @llvm.expect.i64(i64 %95, i64 0)
  %97 = icmp ne i64 %96, 0
  br i1 %97, label %98, label %99

98:                                               ; preds = %83
  call void @assertion_failed(ptr noundef @.str.3, ptr noundef @.str.1, i32 noundef 52) #8
  unreachable

99:                                               ; preds = %83
  %100 = load ptr, ptr %15, align 8, !tbaa !9
  %101 = load ptr, ptr %7, align 8, !tbaa !9
  %102 = load ptr, ptr %8, align 8, !tbaa !9
  %103 = call i64 @libdeflate_deflate_compress(ptr noundef %100, ptr noundef %101, i64 noundef 125500, ptr noundef %102, i64 noundef 125500)
  store i64 %103, ptr %16, align 8, !tbaa !16
  %104 = load i64, ptr %16, align 8, !tbaa !16
  %105 = icmp ugt i64 %104, 0
  br i1 %105, label %106, label %109

106:                                              ; preds = %99
  %107 = load i64, ptr %16, align 8, !tbaa !16
  %108 = icmp ult i64 %107, 125500
  br label %109

109:                                              ; preds = %106, %99
  %110 = phi i1 [ false, %99 ], [ %108, %106 ]
  %111 = xor i1 %110, true
  %112 = xor i1 %111, true
  %113 = xor i1 %112, true
  %114 = zext i1 %113 to i32
  %115 = sext i32 %114 to i64
  %116 = call i64 @llvm.expect.i64(i64 %115, i64 0)
  %117 = icmp ne i64 %116, 0
  br i1 %117, label %118, label %119

118:                                              ; preds = %109
  call void @assertion_failed(ptr noundef @.str.4, ptr noundef @.str.1, i32 noundef 56) #8
  unreachable

119:                                              ; preds = %109
  %120 = load ptr, ptr %14, align 8, !tbaa !9
  %121 = load ptr, ptr %8, align 8, !tbaa !9
  %122 = load i64, ptr %16, align 8, !tbaa !16
  %123 = load ptr, ptr %9, align 8, !tbaa !9
  %124 = call i32 @libdeflate_deflate_decompress(ptr noundef %120, ptr noundef %121, i64 noundef %122, ptr noundef %123, i64 noundef 125500, ptr noundef null)
  store i32 %124, ptr %17, align 4, !tbaa !5
  %125 = load i32, ptr %17, align 4, !tbaa !5
  %126 = icmp eq i32 %125, 0
  %127 = xor i1 %126, true
  %128 = xor i1 %127, true
  %129 = xor i1 %128, true
  %130 = zext i1 %129 to i32
  %131 = sext i32 %130 to i64
  %132 = call i64 @llvm.expect.i64(i64 %131, i64 0)
  %133 = icmp ne i64 %132, 0
  br i1 %133, label %134, label %135

134:                                              ; preds = %119
  call void @assertion_failed(ptr noundef @.str.5, ptr noundef @.str.1, i32 noundef 61) #8
  unreachable

135:                                              ; preds = %119
  %136 = load ptr, ptr %7, align 8, !tbaa !9
  %137 = load ptr, ptr %9, align 8, !tbaa !9
  %138 = call i32 @memcmp(ptr noundef %136, ptr noundef %137, i64 noundef 125500) #9
  %139 = icmp eq i32 %138, 0
  %140 = xor i1 %139, true
  %141 = xor i1 %140, true
  %142 = xor i1 %141, true
  %143 = zext i1 %142 to i32
  %144 = sext i32 %143 to i64
  %145 = call i64 @llvm.expect.i64(i64 %144, i64 0)
  %146 = icmp ne i64 %145, 0
  br i1 %146, label %147, label %148

147:                                              ; preds = %135
  call void @assertion_failed(ptr noundef @.str.6, ptr noundef @.str.1, i32 noundef 62) #8
  unreachable

148:                                              ; preds = %135
  %149 = load ptr, ptr %15, align 8, !tbaa !9
  call void @libdeflate_free_compressor(ptr noundef %149)
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  br label %150

150:                                              ; preds = %148
  %151 = load i32, ptr %10, align 4, !tbaa !5
  %152 = add nsw i32 %151, 1
  store i32 %152, ptr %10, align 4, !tbaa !5
  br label %79, !llvm.loop !18

153:                                              ; preds = %79
  %154 = load ptr, ptr %14, align 8, !tbaa !9
  call void @libdeflate_free_decompressor(ptr noundef %154)
  %155 = load ptr, ptr %7, align 8, !tbaa !9
  call void @free(ptr noundef %155) #7
  %156 = load ptr, ptr %8, align 8, !tbaa !9
  call void @free(ptr noundef %156) #7
  %157 = load ptr, ptr %9, align 8, !tbaa !9
  call void @free(ptr noundef %157) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  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 void @begin_program(ptr noundef) #2

declare ptr @xmalloc(i64 noundef) #2

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(none)
declare i64 @llvm.expect.i64(i64, i64) #3

; Function Attrs: noreturn
declare void @assertion_failed(ptr noundef, ptr noundef, i32 noundef) #4

declare ptr @libdeflate_alloc_decompressor() #2

declare ptr @libdeflate_alloc_compressor(i32 noundef) #2

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

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

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

declare void @libdeflate_free_compressor(ptr noundef) #2

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

declare void @libdeflate_free_decompressor(ptr noundef) #2

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

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 nosync nounwind willreturn memory(none) }
attributes #4 = { noreturn "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind willreturn memory(read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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 #7 = { nounwind }
attributes #8 = { noreturn }
attributes #9 = { 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 = !{!"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 = !{!7, !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !13}
!15 = distinct !{!15, !13}
!16 = !{!17, !17, i64 0}
!17 = !{!"long", !7, i64 0}
!18 = distinct !{!18, !13}


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

@main.levels = external hidden local_unnamed_addr constant [3 x i32], align 4
@.str = external hidden unnamed_addr constant [15 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [88 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [53 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr noundef %1) local_unnamed_addr #0 {
.preheader43:
  tail call void @begin_program(ptr noundef %1) #5
  %2 = tail call ptr @xmalloc(i64 noundef 125500) #5
  %3 = tail call ptr @xmalloc(i64 noundef 125500) #5
  %4 = tail call ptr @xmalloc(i64 noundef 125500) #5
  %invariant.gep = getelementptr i8, ptr %2, i64 240
  %invariant.gep77 = getelementptr i8, ptr %2, i64 241
  %invariant.gep79 = getelementptr i8, ptr %2, i64 242
  %invariant.gep81 = getelementptr i8, ptr %2, i64 243
  %invariant.gep83 = getelementptr i8, ptr %2, i64 244
  %invariant.gep85 = getelementptr i8, ptr %2, i64 245
  %invariant.gep87 = getelementptr i8, ptr %2, i64 246
  %invariant.gep89 = getelementptr i8, ptr %2, i64 247
  %invariant.gep91 = getelementptr i8, ptr %2, i64 248
  %invariant.gep93 = getelementptr i8, ptr %2, i64 249
  %invariant.gep95 = getelementptr i8, ptr %2, i64 250
  br label %.preheader42

.preheader42:                                     ; preds = %.preheader43, %scalar.ph
  %.03347 = phi i32 [ 1, %.preheader43 ], [ %45, %scalar.ph ]
  %.13646 = phi i64 [ 0, %.preheader43 ], [ %indvars.iv.next.10, %scalar.ph ]
  %sext = shl i64 %.13646, 32
  %5 = ashr exact i64 %sext, 32
  %broadcast.splatinsert = insertelement <16 x i32> poison, i32 %.03347, i64 0
  %broadcast.splat = shufflevector <16 x i32> %broadcast.splatinsert, <16 x i32> poison, <16 x i32> zeroinitializer
  %6 = getelementptr i8, ptr %2, i64 %5
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %.preheader42
  %index = phi i64 [ 0, %.preheader42 ], [ %index.next, %vector.body ]
  %vec.ind = phi <16 x i32> [ <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15>, %.preheader42 ], [ %vec.ind.next, %vector.body ]
  %7 = mul nuw nsw <16 x i32> %vec.ind, %broadcast.splat
  %8 = urem <16 x i32> %7, <i32 251, i32 251, i32 251, i32 251, i32 251, i32 251, i32 251, i32 251, i32 251, i32 251, i32 251, i32 251, i32 251, i32 251, i32 251, i32 251>
  %9 = trunc nuw <16 x i32> %8 to <16 x i8>
  %10 = getelementptr i8, ptr %6, i64 %index
  store <16 x i8> %9, ptr %10, align 1, !tbaa !5
  %index.next = add nuw i64 %index, 16
  %vec.ind.next = add <16 x i32> %vec.ind, <i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16>
  %11 = icmp eq i64 %index.next, 240
  br i1 %11, label %scalar.ph, label %vector.body, !llvm.loop !8

scalar.ph:                                        ; preds = %vector.body
  %12 = mul nuw nsw i32 %.03347, 240
  %13 = urem i32 %12, 251
  %14 = trunc nuw i32 %13 to i8
  %gep = getelementptr i8, ptr %invariant.gep, i64 %5
  store i8 %14, ptr %gep, align 1, !tbaa !5
  %15 = mul nuw nsw i32 %.03347, 241
  %16 = urem i32 %15, 251
  %17 = trunc nuw i32 %16 to i8
  %gep78 = getelementptr i8, ptr %invariant.gep77, i64 %5
  store i8 %17, ptr %gep78, align 1, !tbaa !5
  %18 = mul nuw nsw i32 %.03347, 242
  %19 = urem i32 %18, 251
  %20 = trunc nuw i32 %19 to i8
  %gep80 = getelementptr i8, ptr %invariant.gep79, i64 %5
  store i8 %20, ptr %gep80, align 1, !tbaa !5
  %21 = mul nuw nsw i32 %.03347, 243
  %22 = urem i32 %21, 251
  %23 = trunc nuw i32 %22 to i8
  %gep82 = getelementptr i8, ptr %invariant.gep81, i64 %5
  store i8 %23, ptr %gep82, align 1, !tbaa !5
  %24 = mul nuw nsw i32 %.03347, 244
  %25 = urem i32 %24, 251
  %26 = trunc nuw i32 %25 to i8
  %gep84 = getelementptr i8, ptr %invariant.gep83, i64 %5
  store i8 %26, ptr %gep84, align 1, !tbaa !5
  %27 = mul nuw nsw i32 %.03347, 245
  %28 = urem i32 %27, 251
  %29 = trunc nuw i32 %28 to i8
  %gep86 = getelementptr i8, ptr %invariant.gep85, i64 %5
  store i8 %29, ptr %gep86, align 1, !tbaa !5
  %30 = mul nuw nsw i32 %.03347, 246
  %31 = urem i32 %30, 251
  %32 = trunc nuw i32 %31 to i8
  %gep88 = getelementptr i8, ptr %invariant.gep87, i64 %5
  store i8 %32, ptr %gep88, align 1, !tbaa !5
  %33 = mul nuw nsw i32 %.03347, 247
  %34 = urem i32 %33, 251
  %35 = trunc nuw i32 %34 to i8
  %gep90 = getelementptr i8, ptr %invariant.gep89, i64 %5
  store i8 %35, ptr %gep90, align 1, !tbaa !5
  %36 = mul nuw nsw i32 %.03347, 248
  %37 = urem i32 %36, 251
  %38 = trunc nuw i32 %37 to i8
  %gep92 = getelementptr i8, ptr %invariant.gep91, i64 %5
  store i8 %38, ptr %gep92, align 1, !tbaa !5
  %39 = mul nuw nsw i32 %.03347, 249
  %40 = urem i32 %39, 251
  %41 = trunc nuw i32 %40 to i8
  %gep94 = getelementptr i8, ptr %invariant.gep93, i64 %5
  store i8 %41, ptr %gep94, align 1, !tbaa !5
  %42 = mul nuw nsw i32 %.03347, 250
  %43 = urem i32 %42, 251
  %44 = trunc nuw i32 %43 to i8
  %indvars.iv.next.10 = add nsw i64 %5, 251
  %gep96 = getelementptr i8, ptr %invariant.gep95, i64 %5
  store i8 %44, ptr %gep96, align 1, !tbaa !5
  %45 = add nuw nsw i32 %.03347, 1
  %exitcond52.not = icmp eq i32 %45, 251
  br i1 %exitcond52.not, label %.preheader42.1.preheader, label %.preheader42, !llvm.loop !12

.preheader42.1.preheader:                         ; preds = %scalar.ph
  %invariant.gep97 = getelementptr i8, ptr %2, i64 240
  %invariant.gep99 = getelementptr i8, ptr %2, i64 241
  %invariant.gep101 = getelementptr i8, ptr %2, i64 242
  %invariant.gep103 = getelementptr i8, ptr %2, i64 243
  %invariant.gep105 = getelementptr i8, ptr %2, i64 244
  %invariant.gep107 = getelementptr i8, ptr %2, i64 245
  %invariant.gep109 = getelementptr i8, ptr %2, i64 246
  %invariant.gep111 = getelementptr i8, ptr %2, i64 247
  %invariant.gep113 = getelementptr i8, ptr %2, i64 248
  %invariant.gep115 = getelementptr i8, ptr %2, i64 249
  %invariant.gep117 = getelementptr i8, ptr %2, i64 250
  br label %.preheader42.1

.preheader42.1:                                   ; preds = %.preheader42.1.preheader, %scalar.ph60
  %.03347.1 = phi i32 [ %86, %scalar.ph60 ], [ 1, %.preheader42.1.preheader ]
  %.13646.1 = phi i64 [ %indvars.iv.next.1.10, %scalar.ph60 ], [ %indvars.iv.next.10, %.preheader42.1.preheader ]
  %sext57 = shl i64 %.13646.1, 32
  %46 = ashr exact i64 %sext57, 32
  %broadcast.splatinsert70 = insertelement <16 x i32> poison, i32 %.03347.1, i64 0
  %broadcast.splat71 = shufflevector <16 x i32> %broadcast.splatinsert70, <16 x i32> poison, <16 x i32> zeroinitializer
  %47 = getelementptr i8, ptr %2, i64 %46
  br label %vector.body65

vector.body65:                                    ; preds = %vector.body65, %.preheader42.1
  %index66 = phi i64 [ 0, %.preheader42.1 ], [ %index.next72, %vector.body65 ]
  %vec.ind67 = phi <16 x i32> [ <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15>, %.preheader42.1 ], [ %vec.ind.next68, %vector.body65 ]
  %48 = mul nuw nsw <16 x i32> %vec.ind67, %broadcast.splat71
  %49 = urem <16 x i32> %48, <i32 251, i32 251, i32 251, i32 251, i32 251, i32 251, i32 251, i32 251, i32 251, i32 251, i32 251, i32 251, i32 251, i32 251, i32 251, i32 251>
  %50 = trunc nuw <16 x i32> %49 to <16 x i8>
  %51 = getelementptr i8, ptr %47, i64 %index66
  store <16 x i8> %50, ptr %51, align 1, !tbaa !5
  %index.next72 = add nuw i64 %index66, 16
  %vec.ind.next68 = add <16 x i32> %vec.ind67, <i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16>
  %52 = icmp eq i64 %index.next72, 240
  br i1 %52, label %scalar.ph60, label %vector.body65, !llvm.loop !13

scalar.ph60:                                      ; preds = %vector.body65
  %53 = mul nuw nsw i32 %.03347.1, 240
  %54 = urem i32 %53, 251
  %55 = trunc nuw i32 %54 to i8
  %gep98 = getelementptr i8, ptr %invariant.gep97, i64 %46
  store i8 %55, ptr %gep98, align 1, !tbaa !5
  %56 = mul nuw nsw i32 %.03347.1, 241
  %57 = urem i32 %56, 251
  %58 = trunc nuw i32 %57 to i8
  %gep100 = getelementptr i8, ptr %invariant.gep99, i64 %46
  store i8 %58, ptr %gep100, align 1, !tbaa !5
  %59 = mul nuw nsw i32 %.03347.1, 242
  %60 = urem i32 %59, 251
  %61 = trunc nuw i32 %60 to i8
  %gep102 = getelementptr i8, ptr %invariant.gep101, i64 %46
  store i8 %61, ptr %gep102, align 1, !tbaa !5
  %62 = mul nuw nsw i32 %.03347.1, 243
  %63 = urem i32 %62, 251
  %64 = trunc nuw i32 %63 to i8
  %gep104 = getelementptr i8, ptr %invariant.gep103, i64 %46
  store i8 %64, ptr %gep104, align 1, !tbaa !5
  %65 = mul nuw nsw i32 %.03347.1, 244
  %66 = urem i32 %65, 251
  %67 = trunc nuw i32 %66 to i8
  %gep106 = getelementptr i8, ptr %invariant.gep105, i64 %46
  store i8 %67, ptr %gep106, align 1, !tbaa !5
  %68 = mul nuw nsw i32 %.03347.1, 245
  %69 = urem i32 %68, 251
  %70 = trunc nuw i32 %69 to i8
  %gep108 = getelementptr i8, ptr %invariant.gep107, i64 %46
  store i8 %70, ptr %gep108, align 1, !tbaa !5
  %71 = mul nuw nsw i32 %.03347.1, 246
  %72 = urem i32 %71, 251
  %73 = trunc nuw i32 %72 to i8
  %gep110 = getelementptr i8, ptr %invariant.gep109, i64 %46
  store i8 %73, ptr %gep110, align 1, !tbaa !5
  %74 = mul nuw nsw i32 %.03347.1, 247
  %75 = urem i32 %74, 251
  %76 = trunc nuw i32 %75 to i8
  %gep112 = getelementptr i8, ptr %invariant.gep111, i64 %46
  store i8 %76, ptr %gep112, align 1, !tbaa !5
  %77 = mul nuw nsw i32 %.03347.1, 248
  %78 = urem i32 %77, 251
  %79 = trunc nuw i32 %78 to i8
  %gep114 = getelementptr i8, ptr %invariant.gep113, i64 %46
  store i8 %79, ptr %gep114, align 1, !tbaa !5
  %80 = mul nuw nsw i32 %.03347.1, 249
  %81 = urem i32 %80, 251
  %82 = trunc nuw i32 %81 to i8
  %gep116 = getelementptr i8, ptr %invariant.gep115, i64 %46
  store i8 %82, ptr %gep116, align 1, !tbaa !5
  %83 = mul nuw nsw i32 %.03347.1, 250
  %84 = urem i32 %83, 251
  %85 = trunc nuw i32 %84 to i8
  %indvars.iv.next.1.10 = add nsw i64 %46, 251
  %gep118 = getelementptr i8, ptr %invariant.gep117, i64 %46
  store i8 %85, ptr %gep118, align 1, !tbaa !5
  %86 = add nuw nsw i32 %.03347.1, 1
  %exitcond52.1.not = icmp eq i32 %86, 251
  br i1 %exitcond52.1.not, label %87, label %.preheader42.1, !llvm.loop !12

87:                                               ; preds = %scalar.ph60
  %.not = icmp eq i64 %indvars.iv.next.1.10, 125500
  br i1 %.not, label %89, label %88, !prof !14

88:                                               ; preds = %87
  tail call void @assertion_failed(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 41) #6
  unreachable

89:                                               ; preds = %87
  %90 = tail call ptr @libdeflate_alloc_decompressor() #5
  %.not38 = icmp eq ptr %90, null
  br i1 %.not38, label %93, label %.preheader.preheader, !prof !15

.preheader.preheader:                             ; preds = %89
  %91 = load i32, ptr @main.levels, align 4, !tbaa !16
  %92 = tail call ptr @libdeflate_alloc_compressor(i32 noundef %91) #5
  %.not39 = icmp eq ptr %92, null
  br i1 %.not39, label %94, label %95, !prof !15

93:                                               ; preds = %89
  tail call void @assertion_failed(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.1, i32 noundef 44) #6
  unreachable

94:                                               ; preds = %.preheader.2, %.preheader.1, %.preheader.preheader
  tail call void @assertion_failed(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.1, i32 noundef 52) #6
  unreachable

95:                                               ; preds = %.preheader.preheader
  %96 = tail call i64 @libdeflate_deflate_compress(ptr noundef nonnull %92, ptr noundef nonnull %2, i64 noundef 125500, ptr noundef %3, i64 noundef 125500) #5
  %97 = add i64 %96, -125500
  %98 = icmp ult i64 %97, -125499
  br i1 %98, label %99, label %100, !prof !15

99:                                               ; preds = %116, %107, %95
  tail call void @assertion_failed(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.1, i32 noundef 56) #6
  unreachable

100:                                              ; preds = %95
  %101 = tail call i32 @libdeflate_deflate_decompress(ptr noundef nonnull %90, ptr noundef %3, i64 noundef %96, ptr noundef %4, i64 noundef 125500, ptr noundef null) #5
  %.not40 = icmp eq i32 %101, 0
  br i1 %.not40, label %103, label %102, !prof !14

102:                                              ; preds = %120, %111, %100
  tail call void @assertion_failed(ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.1, i32 noundef 61) #6
  unreachable

103:                                              ; preds = %100
  %bcmp = tail call i32 @bcmp(ptr noundef nonnull dereferenceable(125500) %2, ptr noundef nonnull dereferenceable(125500) %4, i64 125500)
  %.not41 = icmp eq i32 %bcmp, 0
  br i1 %.not41, label %.preheader.1, label %104, !prof !14

104:                                              ; preds = %122, %113, %103
  tail call void @assertion_failed(ptr noundef nonnull @.str.6, ptr noundef nonnull @.str.1, i32 noundef 62) #6
  unreachable

.preheader.1:                                     ; preds = %103
  tail call void @libdeflate_free_compressor(ptr noundef nonnull %92) #5
  %105 = load i32, ptr getelementptr inbounds (i8, ptr @main.levels, i64 4), align 4, !tbaa !16
  %106 = tail call ptr @libdeflate_alloc_compressor(i32 noundef %105) #5
  %.not39.1 = icmp eq ptr %106, null
  br i1 %.not39.1, label %94, label %107, !prof !15

107:                                              ; preds = %.preheader.1
  %108 = tail call i64 @libdeflate_deflate_compress(ptr noundef nonnull %106, ptr noundef nonnull %2, i64 noundef 125500, ptr noundef %3, i64 noundef 125500) #5
  %109 = add i64 %108, -125500
  %110 = icmp ult i64 %109, -125499
  br i1 %110, label %99, label %111, !prof !15

111:                                              ; preds = %107
  %112 = tail call i32 @libdeflate_deflate_decompress(ptr noundef nonnull %90, ptr noundef %3, i64 noundef %108, ptr noundef %4, i64 noundef 125500, ptr noundef null) #5
  %.not40.1 = icmp eq i32 %112, 0
  br i1 %.not40.1, label %113, label %102, !prof !14

113:                                              ; preds = %111
  %bcmp.1 = tail call i32 @bcmp(ptr noundef nonnull dereferenceable(125500) %2, ptr noundef nonnull dereferenceable(125500) %4, i64 125500)
  %.not41.1 = icmp eq i32 %bcmp.1, 0
  br i1 %.not41.1, label %.preheader.2, label %104, !prof !14

.preheader.2:                                     ; preds = %113
  tail call void @libdeflate_free_compressor(ptr noundef nonnull %106) #5
  %114 = load i32, ptr getelementptr inbounds (i8, ptr @main.levels, i64 8), align 4, !tbaa !16
  %115 = tail call ptr @libdeflate_alloc_compressor(i32 noundef %114) #5
  %.not39.2 = icmp eq ptr %115, null
  br i1 %.not39.2, label %94, label %116, !prof !15

116:                                              ; preds = %.preheader.2
  %117 = tail call i64 @libdeflate_deflate_compress(ptr noundef nonnull %115, ptr noundef nonnull %2, i64 noundef 125500, ptr noundef %3, i64 noundef 125500) #5
  %118 = add i64 %117, -125500
  %119 = icmp ult i64 %118, -125499
  br i1 %119, label %99, label %120, !prof !15

120:                                              ; preds = %116
  %121 = tail call i32 @libdeflate_deflate_decompress(ptr noundef nonnull %90, ptr noundef %3, i64 noundef %117, ptr noundef %4, i64 noundef 125500, ptr noundef null) #5
  %.not40.2 = icmp eq i32 %121, 0
  br i1 %.not40.2, label %122, label %102, !prof !14

122:                                              ; preds = %120
  %bcmp.2 = tail call i32 @bcmp(ptr noundef nonnull dereferenceable(125500) %2, ptr noundef nonnull dereferenceable(125500) %4, i64 125500)
  %.not41.2 = icmp eq i32 %bcmp.2, 0
  br i1 %.not41.2, label %123, label %104, !prof !14

123:                                              ; preds = %122
  tail call void @libdeflate_free_compressor(ptr noundef nonnull %115) #5
  tail call void @libdeflate_free_decompressor(ptr noundef nonnull %90) #5
  tail call void @free(ptr noundef nonnull %2) #5
  tail call void @free(ptr noundef %3) #5
  tail call void @free(ptr noundef %4) #5
  ret i32 0
}

declare void @begin_program(ptr noundef) local_unnamed_addr #1

declare ptr @xmalloc(i64 noundef) local_unnamed_addr #1

; Function Attrs: noreturn
declare void @assertion_failed(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

declare ptr @libdeflate_alloc_decompressor() local_unnamed_addr #1

declare ptr @libdeflate_alloc_compressor(i32 noundef) local_unnamed_addr #1

declare i64 @libdeflate_deflate_compress(ptr noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef) local_unnamed_addr #1

declare i32 @libdeflate_deflate_decompress(ptr noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #1

declare void @libdeflate_free_compressor(ptr noundef) local_unnamed_addr #1

declare void @libdeflate_free_decompressor(ptr noundef) local_unnamed_addr #1

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

; 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 = { "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 = { noreturn "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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, !6, i64 0}
!6 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C/C++ TBAA"}
!8 = distinct !{!8, !9, !10, !11}
!9 = !{!"llvm.loop.mustprogress"}
!10 = !{!"llvm.loop.isvectorized", i32 1}
!11 = !{!"llvm.loop.unroll.runtime.disable"}
!12 = distinct !{!12, !9}
!13 = distinct !{!13, !9, !10, !11}
!14 = !{!"branch_weights", !"expected", i32 2000, i32 1}
!15 = !{!"branch_weights", !"expected", i32 1, i32 2000}
!16 = !{!17, !17, i64 0}
!17 = !{!"int", !6, i64 0}


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