; LLVM IR from mncoppola/rpef :: utilities_src/squashfs4.2/lzma465/CPP/7zip/Compress/LZMA_Alone (LzmaBench)

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

%class.CBenchBuffer = type { ptr, i64, ptr }
%class.CBaseRandomGenerator = type { i32, i32 }

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN12CBenchBuffer5AllocEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #1 align 2

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN20CBaseRandomGeneratorC2Ev(ptr noundef nonnull align 4 dereferenceable(8)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z15CrcInternalTestv() #1 personality ptr @__gxx_personality_v0 {
  %1 = alloca i1, align 1
  %2 = alloca %class.CBenchBuffer, align 8
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca %class.CBaseRandomGenerator, align 4
  %13 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 24, ptr %2) #4
  call void @_ZN12CBenchBufferC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #4
  store i32 256, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  store i32 1024, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  store i32 32, ptr %5, align 4, !tbaa !5
  %14 = invoke noundef zeroext i1 @_ZN12CBenchBuffer5AllocEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef 1280)
          to label %15 unwind label %17

15:                                               ; preds = %0
  br i1 %14, label %21, label %16

16:                                               ; preds = %15
  store i1 false, ptr %1, align 1
  store i32 1, ptr %8, align 4
  br label %102

17:                                               ; preds = %0
  %18 = landingpad { ptr, i32 }
          cleanup
  %19 = extractvalue { ptr, i32 } %18, 0
  store ptr %19, ptr %6, align 8
  %20 = extractvalue { ptr, i32 } %18, 1
  store i32 %20, ptr %7, align 4
  br label %104

21:                                               ; preds = %15
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %22 = getelementptr inbounds %class.CBenchBuffer, ptr %2, i32 0, i32 2
  %23 = load ptr, ptr %22, align 8, !tbaa !9
  store ptr %23, ptr %9, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %24

24:                                               ; preds = %34, %21
  %25 = load i32, ptr %10, align 4, !tbaa !5
  %26 = icmp ult i32 %25, 256
  br i1 %26, label %27, label %37

27:                                               ; preds = %24
  %28 = load i32, ptr %10, align 4, !tbaa !5
  %29 = trunc i32 %28 to i8
  %30 = load ptr, ptr %9, align 8, !tbaa !13
  %31 = load i32, ptr %10, align 4, !tbaa !5
  %32 = zext i32 %31 to i64
  %33 = getelementptr inbounds i8, ptr %30, i64 %32
  store i8 %29, ptr %33, align 1, !tbaa !14
  br label %34

34:                                               ; preds = %27
  %35 = load i32, ptr %10, align 4, !tbaa !5
  %36 = add i32 %35, 1
  store i32 %36, ptr %10, align 4, !tbaa !5
  br label %24, !llvm.loop !15

37:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  %38 = load ptr, ptr %9, align 8, !tbaa !13
  %39 = invoke noundef i32 @_ZL8CrcCalc1PKhj(ptr noundef %38, i32 noundef 256)
          to label %40 unwind label %44

40:                                               ; preds = %37
  store i32 %39, ptr %11, align 4, !tbaa !5
  %41 = load i32, ptr %11, align 4, !tbaa !5
  %42 = icmp ne i32 %41, 688229491
  br i1 %42, label %43, label %48

43:                                               ; preds = %40
  store i1 false, ptr %1, align 1
  store i32 1, ptr %8, align 4
  br label %100

44:                                               ; preds = %37
  %45 = landingpad { ptr, i32 }
          cleanup
  %46 = extractvalue { ptr, i32 } %45, 0
  store ptr %46, ptr %6, align 8
  %47 = extractvalue { ptr, i32 } %45, 1
  store i32 %47, ptr %7, align 4
  br label %101

48:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  invoke void @_ZN20CBaseRandomGeneratorC2Ev(ptr noundef nonnull align 4 dereferenceable(8) %12)
          to label %49 unwind label %61

49:                                               ; preds = %48
  %50 = load ptr, ptr %9, align 8, !tbaa !13
  %51 = getelementptr inbounds i8, ptr %50, i64 256
  invoke void @_ZL7RandGenPhjR20CBaseRandomGenerator(ptr noundef %51, i32 noundef 1024, ptr noundef nonnull align 4 dereferenceable(8) %12)
          to label %52 unwind label %61

52:                                               ; preds = %49
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %53

53:                                               ; preds = %94, %52
  %54 = load i32, ptr %10, align 4, !tbaa !5
  %55 = icmp ult i32 %54, 1248
  br i1 %55, label %56, label %97

56:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  store i32 0, ptr %13, align 4, !tbaa !5
  br label %57

57:                                               ; preds = %88, %56
  %58 = load i32, ptr %13, align 4, !tbaa !5
  %59 = icmp ult i32 %58, 32
  br i1 %59, label %65, label %60

60:                                               ; preds = %57
  store i32 8, ptr %8, align 4
  br label %91

61:                                               ; preds = %49, %48
  %62 = landingpad { ptr, i32 }
          cleanup
  %63 = extractvalue { ptr, i32 } %62, 0
  store ptr %63, ptr %6, align 8
  %64 = extractvalue { ptr, i32 } %62, 1
  store i32 %64, ptr %7, align 4
  br label %99

65:                                               ; preds = %57
  %66 = load ptr, ptr %9, align 8, !tbaa !13
  %67 = load i32, ptr %10, align 4, !tbaa !5
  %68 = zext i32 %67 to i64
  %69 = getelementptr inbounds i8, ptr %66, i64 %68
  %70 = load i32, ptr %13, align 4, !tbaa !5
  %71 = invoke noundef i32 @_ZL8CrcCalc1PKhj(ptr noundef %69, i32 noundef %70)
          to label %72 unwind label %83

72:                                               ; preds = %65
  %73 = load ptr, ptr %9, align 8, !tbaa !13
  %74 = load i32, ptr %10, align 4, !tbaa !5
  %75 = zext i32 %74 to i64
  %76 = getelementptr inbounds i8, ptr %73, i64 %75
  %77 = load i32, ptr %13, align 4, !tbaa !5
  %78 = zext i32 %77 to i64
  %79 = invoke i32 @CrcCalc(ptr noundef %76, i64 noundef %78)
          to label %80 unwind label %83

80:                                               ; preds = %72
  %81 = icmp ne i32 %71, %79
  br i1 %81, label %82, label %87

82:                                               ; preds = %80
  store i1 false, ptr %1, align 1
  store i32 1, ptr %8, align 4
  br label %91

83:                                               ; preds = %72, %65
  %84 = landingpad { ptr, i32 }
          cleanup
  %85 = extractvalue { ptr, i32 } %84, 0
  store ptr %85, ptr %6, align 8
  %86 = extractvalue { ptr, i32 } %84, 1
  store i32 %86, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  br label %99

87:                                               ; preds = %80
  br label %88

88:                                               ; preds = %87
  %89 = load i32, ptr %13, align 4, !tbaa !5
  %90 = add i32 %89, 1
  store i32 %90, ptr %13, align 4, !tbaa !5
  br label %57, !llvm.loop !17

91:                                               ; preds = %82, %60
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  %92 = load i32, ptr %8, align 4
  switch i32 %92, label %98 [
    i32 8, label %93
  ]

93:                                               ; preds = %91
  br label %94

94:                                               ; preds = %93
  %95 = load i32, ptr %10, align 4, !tbaa !5
  %96 = add i32 %95, 1
  store i32 %96, ptr %10, align 4, !tbaa !5
  br label %53, !llvm.loop !18

97:                                               ; preds = %53
  store i1 true, ptr %1, align 1
  store i32 1, ptr %8, align 4
  br label %98

98:                                               ; preds = %97, %91
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  br label %100

99:                                               ; preds = %83, %61
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  br label %101

100:                                              ; preds = %98, %43
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  br label %102

101:                                              ; preds = %99, %44
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  br label %104

102:                                              ; preds = %100, %16
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  call void @_ZN12CBenchBufferD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %2) #4
  %103 = load i1, ptr %1, align 1
  ret i1 %103

104:                                              ; preds = %101, %17
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  call void @_ZN12CBenchBufferD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %2) #4
  br label %105

105:                                              ; preds = %104
  %106 = load ptr, ptr %6, align 8
  %107 = load i32, ptr %7, align 4
  %108 = insertvalue { ptr, i32 } poison, ptr %106, 0
  %109 = insertvalue { ptr, i32 } %108, i32 %107, 1
  resume { ptr, i32 } %109
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN12CBenchBufferC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZL7RandGenPhjR20CBaseRandomGenerator(ptr noundef, i32 noundef, ptr noundef nonnull align 4 dereferenceable(8)) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN12CBenchBufferD2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress 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 = { "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 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 = { 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++ TBAA"}
!9 = !{!10, !12, i64 16}
!10 = !{!"_ZTS12CBenchBuffer", !11, i64 8, !12, i64 16}
!11 = !{!"long", !7, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = !{!12, !12, i64 0}
!14 = !{!7, !7, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}
!18 = distinct !{!18, !16}


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

%class.CBenchBuffer = type { ptr, i64, ptr }
%class.CBaseRandomGenerator = type { i32, i32 }

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN12CBenchBuffer5AllocEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #1 align 2

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN20CBaseRandomGeneratorC2Ev(ptr noundef nonnull align 4 dereferenceable(8)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z15CrcInternalTestv() local_unnamed_addr #1 personality ptr @__gxx_personality_v0 {
  %1 = alloca %class.CBenchBuffer, align 8
  %2 = alloca %class.CBaseRandomGenerator, align 4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %1) #4
  call void @_ZN12CBenchBufferC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %1)
  %3 = invoke noundef zeroext i1 @_ZN12CBenchBuffer5AllocEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 1280)
          to label %4 unwind label %5

4:                                                ; preds = %0
  br i1 %3, label %vector.ph, label %164

5:                                                ; preds = %0
  %6 = landingpad { ptr, i32 }
          cleanup
  br label %165

vector.ph:                                        ; preds = %4
  %7 = getelementptr inbounds i8, ptr %1, i64 16
  %8 = load ptr, ptr %7, align 8, !tbaa !5
  store <16 x i8> <i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 8, i8 9, i8 10, i8 11, i8 12, i8 13, i8 14, i8 15>, ptr %8, align 1, !tbaa !11
  %9 = getelementptr inbounds i8, ptr %8, i64 16
  store <16 x i8> <i8 16, i8 17, i8 18, i8 19, i8 20, i8 21, i8 22, i8 23, i8 24, i8 25, i8 26, i8 27, i8 28, i8 29, i8 30, i8 31>, ptr %9, align 1, !tbaa !11
  %10 = getelementptr inbounds i8, ptr %8, i64 32
  store <16 x i8> <i8 32, i8 33, i8 34, i8 35, i8 36, i8 37, i8 38, i8 39, i8 40, i8 41, i8 42, i8 43, i8 44, i8 45, i8 46, i8 47>, ptr %10, align 1, !tbaa !11
  %11 = getelementptr inbounds i8, ptr %8, i64 48
  store <16 x i8> <i8 48, i8 49, i8 50, i8 51, i8 52, i8 53, i8 54, i8 55, i8 56, i8 57, i8 58, i8 59, i8 60, i8 61, i8 62, i8 63>, ptr %11, align 1, !tbaa !11
  %12 = getelementptr inbounds i8, ptr %8, i64 64
  store <16 x i8> <i8 64, i8 65, i8 66, i8 67, i8 68, i8 69, i8 70, i8 71, i8 72, i8 73, i8 74, i8 75, i8 76, i8 77, i8 78, i8 79>, ptr %12, align 1, !tbaa !11
  %13 = getelementptr inbounds i8, ptr %8, i64 80
  store <16 x i8> <i8 80, i8 81, i8 82, i8 83, i8 84, i8 85, i8 86, i8 87, i8 88, i8 89, i8 90, i8 91, i8 92, i8 93, i8 94, i8 95>, ptr %13, align 1, !tbaa !11
  %14 = getelementptr inbounds i8, ptr %8, i64 96
  store <16 x i8> <i8 96, i8 97, i8 98, i8 99, i8 100, i8 101, i8 102, i8 103, i8 104, i8 105, i8 106, i8 107, i8 108, i8 109, i8 110, i8 111>, ptr %14, align 1, !tbaa !11
  %15 = getelementptr inbounds i8, ptr %8, i64 112
  store <16 x i8> <i8 112, i8 113, i8 114, i8 115, i8 116, i8 117, i8 118, i8 119, i8 120, i8 121, i8 122, i8 123, i8 124, i8 125, i8 126, i8 127>, ptr %15, align 1, !tbaa !11
  %16 = getelementptr inbounds i8, ptr %8, i64 128
  store <16 x i8> <i8 -128, i8 -127, i8 -126, i8 -125, i8 -124, i8 -123, i8 -122, i8 -121, i8 -120, i8 -119, i8 -118, i8 -117, i8 -116, i8 -115, i8 -114, i8 -113>, ptr %16, align 1, !tbaa !11
  %17 = getelementptr inbounds i8, ptr %8, i64 144
  store <16 x i8> <i8 -112, i8 -111, i8 -110, i8 -109, i8 -108, i8 -107, i8 -106, i8 -105, i8 -104, i8 -103, i8 -102, i8 -101, i8 -100, i8 -99, i8 -98, i8 -97>, ptr %17, align 1, !tbaa !11
  %18 = getelementptr inbounds i8, ptr %8, i64 160
  store <16 x i8> <i8 -96, i8 -95, i8 -94, i8 -93, i8 -92, i8 -91, i8 -90, i8 -89, i8 -88, i8 -87, i8 -86, i8 -85, i8 -84, i8 -83, i8 -82, i8 -81>, ptr %18, align 1, !tbaa !11
  %19 = getelementptr inbounds i8, ptr %8, i64 176
  store <16 x i8> <i8 -80, i8 -79, i8 -78, i8 -77, i8 -76, i8 -75, i8 -74, i8 -73, i8 -72, i8 -71, i8 -70, i8 -69, i8 -68, i8 -67, i8 -66, i8 -65>, ptr %19, align 1, !tbaa !11
  %20 = getelementptr inbounds i8, ptr %8, i64 192
  store <16 x i8> <i8 -64, i8 -63, i8 -62, i8 -61, i8 -60, i8 -59, i8 -58, i8 -57, i8 -56, i8 -55, i8 -54, i8 -53, i8 -52, i8 -51, i8 -50, i8 -49>, ptr %20, align 1, !tbaa !11
  %21 = getelementptr inbounds i8, ptr %8, i64 208
  store <16 x i8> <i8 -48, i8 -47, i8 -46, i8 -45, i8 -44, i8 -43, i8 -42, i8 -41, i8 -40, i8 -39, i8 -38, i8 -37, i8 -36, i8 -35, i8 -34, i8 -33>, ptr %21, align 1, !tbaa !11
  %22 = getelementptr inbounds i8, ptr %8, i64 224
  store <16 x i8> <i8 -32, i8 -31, i8 -30, i8 -29, i8 -28, i8 -27, i8 -26, i8 -25, i8 -24, i8 -23, i8 -22, i8 -21, i8 -20, i8 -19, i8 -18, i8 -17>, ptr %22, align 1, !tbaa !11
  %23 = getelementptr inbounds i8, ptr %8, i64 240
  store <16 x i8> <i8 -16, i8 -15, i8 -14, i8 -13, i8 -12, i8 -11, i8 -10, i8 -9, i8 -8, i8 -7, i8 -6, i8 -5, i8 -4, i8 -3, i8 -2, i8 -1>, ptr %23, align 1, !tbaa !11
  %24 = call noundef i32 @_ZL8CrcCalc1PKhj(ptr noundef nonnull %8, i32 noundef 256)
  %.not = icmp eq i32 %24, 688229491
  br i1 %.not, label %25, label %164

25:                                               ; preds = %vector.ph
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #4
  invoke void @_ZN20CBaseRandomGeneratorC2Ev(ptr noundef nonnull align 4 dereferenceable(8) %2)
          to label %26 unwind label %157

26:                                               ; preds = %25
  %27 = getelementptr inbounds i8, ptr %8, i64 256
  call void @_ZL7RandGenPhjR20CBaseRandomGenerator(ptr noundef nonnull %27, i32 noundef 1024, ptr noundef nonnull align 4 dereferenceable(8) %2)
  br label %.preheader

.preheader:                                       ; preds = %26, %.critedge
  %indvars.iv47 = phi i64 [ 0, %26 ], [ %indvars.iv.next48, %.critedge ]
  %28 = phi i1 [ false, %26 ], [ %156, %.critedge ]
  %29 = getelementptr inbounds i8, ptr %8, i64 %indvars.iv47
  %30 = call noundef i32 @_ZL8CrcCalc1PKhj(ptr noundef nonnull %29, i32 noundef 0)
  %31 = invoke i32 @CrcCalc(ptr noundef nonnull %29, i64 noundef 0)
          to label %159 unwind label %160

32:                                               ; preds = %159
  %33 = call noundef i32 @_ZL8CrcCalc1PKhj(ptr noundef nonnull %29, i32 noundef 1)
  %34 = invoke i32 @CrcCalc(ptr noundef nonnull %29, i64 noundef 1)
          to label %35 unwind label %160

35:                                               ; preds = %32
  %.not31.1 = icmp eq i32 %33, %34
  br i1 %.not31.1, label %36, label %.loopexit

36:                                               ; preds = %35
  %37 = call noundef i32 @_ZL8CrcCalc1PKhj(ptr noundef nonnull %29, i32 noundef 2)
  %38 = invoke i32 @CrcCalc(ptr noundef nonnull %29, i64 noundef 2)
          to label %39 unwind label %160

39:                                               ; preds = %36
  %.not31.2 = icmp eq i32 %37, %38
  br i1 %.not31.2, label %40, label %.loopexit

40:                                               ; preds = %39
  %41 = call noundef i32 @_ZL8CrcCalc1PKhj(ptr noundef nonnull %29, i32 noundef 3)
  %42 = invoke i32 @CrcCalc(ptr noundef nonnull %29, i64 noundef 3)
          to label %43 unwind label %160

43:                                               ; preds = %40
  %.not31.3 = icmp eq i32 %41, %42
  br i1 %.not31.3, label %44, label %.loopexit

44:                                               ; preds = %43
  %45 = call noundef i32 @_ZL8CrcCalc1PKhj(ptr noundef nonnull %29, i32 noundef 4)
  %46 = invoke i32 @CrcCalc(ptr noundef nonnull %29, i64 noundef 4)
          to label %47 unwind label %160

47:                                               ; preds = %44
  %.not31.4 = icmp eq i32 %45, %46
  br i1 %.not31.4, label %48, label %.loopexit

48:                                               ; preds = %47
  %49 = call noundef i32 @_ZL8CrcCalc1PKhj(ptr noundef nonnull %29, i32 noundef 5)
  %50 = invoke i32 @CrcCalc(ptr noundef nonnull %29, i64 noundef 5)
          to label %51 unwind label %160

51:                                               ; preds = %48
  %.not31.5 = icmp eq i32 %49, %50
  br i1 %.not31.5, label %52, label %.loopexit

52:                                               ; preds = %51
  %53 = call noundef i32 @_ZL8CrcCalc1PKhj(ptr noundef nonnull %29, i32 noundef 6)
  %54 = invoke i32 @CrcCalc(ptr noundef nonnull %29, i64 noundef 6)
          to label %55 unwind label %160

55:                                               ; preds = %52
  %.not31.6 = icmp eq i32 %53, %54
  br i1 %.not31.6, label %56, label %.loopexit

56:                                               ; preds = %55
  %57 = call noundef i32 @_ZL8CrcCalc1PKhj(ptr noundef nonnull %29, i32 noundef 7)
  %58 = invoke i32 @CrcCalc(ptr noundef nonnull %29, i64 noundef 7)
          to label %59 unwind label %160

59:                                               ; preds = %56
  %.not31.7 = icmp eq i32 %57, %58
  br i1 %.not31.7, label %60, label %.loopexit

60:                                               ; preds = %59
  %61 = call noundef i32 @_ZL8CrcCalc1PKhj(ptr noundef nonnull %29, i32 noundef 8)
  %62 = invoke i32 @CrcCalc(ptr noundef nonnull %29, i64 noundef 8)
          to label %63 unwind label %160

63:                                               ; preds = %60
  %.not31.8 = icmp eq i32 %61, %62
  br i1 %.not31.8, label %64, label %.loopexit

64:                                               ; preds = %63
  %65 = call noundef i32 @_ZL8CrcCalc1PKhj(ptr noundef nonnull %29, i32 noundef 9)
  %66 = invoke i32 @CrcCalc(ptr noundef nonnull %29, i64 noundef 9)
          to label %67 unwind label %160

67:                                               ; preds = %64
  %.not31.9 = icmp eq i32 %65, %66
  br i1 %.not31.9, label %68, label %.loopexit

68:                                               ; preds = %67
  %69 = call noundef i32 @_ZL8CrcCalc1PKhj(ptr noundef nonnull %29, i32 noundef 10)
  %70 = invoke i32 @CrcCalc(ptr noundef nonnull %29, i64 noundef 10)
          to label %71 unwind label %160

71:                                               ; preds = %68
  %.not31.10 = icmp eq i32 %69, %70
  br i1 %.not31.10, label %72, label %.loopexit

72:                                               ; preds = %71
  %73 = call noundef i32 @_ZL8CrcCalc1PKhj(ptr noundef nonnull %29, i32 noundef 11)
  %74 = invoke i32 @CrcCalc(ptr noundef nonnull %29, i64 noundef 11)
          to label %75 unwind label %160

75:                                               ; preds = %72
  %.not31.11 = icmp eq i32 %73, %74
  br i1 %.not31.11, label %76, label %.loopexit

76:                                               ; preds = %75
  %77 = call noundef i32 @_ZL8CrcCalc1PKhj(ptr noundef nonnull %29, i32 noundef 12)
  %78 = invoke i32 @CrcCalc(ptr noundef nonnull %29, i64 noundef 12)
          to label %79 unwind label %160

79:                                               ; preds = %76
  %.not31.12 = icmp eq i32 %77, %78
  br i1 %.not31.12, label %80, label %.loopexit

80:                                               ; preds = %79
  %81 = call noundef i32 @_ZL8CrcCalc1PKhj(ptr noundef nonnull %29, i32 noundef 13)
  %82 = invoke i32 @CrcCalc(ptr noundef nonnull %29, i64 noundef 13)
          to label %83 unwind label %160

83:                                               ; preds = %80
  %.not31.13 = icmp eq i32 %81, %82
  br i1 %.not31.13, label %84, label %.loopexit

84:                                               ; preds = %83
  %85 = call noundef i32 @_ZL8CrcCalc1PKhj(ptr noundef nonnull %29, i32 noundef 14)
  %86 = invoke i32 @CrcCalc(ptr noundef nonnull %29, i64 noundef 14)
          to label %87 unwind label %160

87:                                               ; preds = %84
  %.not31.14 = icmp eq i32 %85, %86
  br i1 %.not31.14, label %88, label %.loopexit

88:                                               ; preds = %87
  %89 = call noundef i32 @_ZL8CrcCalc1PKhj(ptr noundef nonnull %29, i32 noundef 15)
  %90 = invoke i32 @CrcCalc(ptr noundef nonnull %29, i64 noundef 15)
          to label %91 unwind label %160

91:                                               ; preds = %88
  %.not31.15 = icmp eq i32 %89, %90
  br i1 %.not31.15, label %92, label %.loopexit

92:                                               ; preds = %91
  %93 = call noundef i32 @_ZL8CrcCalc1PKhj(ptr noundef nonnull %29, i32 noundef 16)
  %94 = invoke i32 @CrcCalc(ptr noundef nonnull %29, i64 noundef 16)
          to label %95 unwind label %160

95:                                               ; preds = %92
  %.not31.16 = icmp eq i32 %93, %94
  br i1 %.not31.16, label %96, label %.loopexit

96:                                               ; preds = %95
  %97 = call noundef i32 @_ZL8CrcCalc1PKhj(ptr noundef nonnull %29, i32 noundef 17)
  %98 = invoke i32 @CrcCalc(ptr noundef nonnull %29, i64 noundef 17)
          to label %99 unwind label %160

99:                                               ; preds = %96
  %.not31.17 = icmp eq i32 %97, %98
  br i1 %.not31.17, label %100, label %.loopexit

100:                                              ; preds = %99
  %101 = call noundef i32 @_ZL8CrcCalc1PKhj(ptr noundef nonnull %29, i32 noundef 18)
  %102 = invoke i32 @CrcCalc(ptr noundef nonnull %29, i64 noundef 18)
          to label %103 unwind label %160

103:                                              ; preds = %100
  %.not31.18 = icmp eq i32 %101, %102
  br i1 %.not31.18, label %104, label %.loopexit

104:                                              ; preds = %103
  %105 = call noundef i32 @_ZL8CrcCalc1PKhj(ptr noundef nonnull %29, i32 noundef 19)
  %106 = invoke i32 @CrcCalc(ptr noundef nonnull %29, i64 noundef 19)
          to label %107 unwind label %160

107:                                              ; preds = %104
  %.not31.19 = icmp eq i32 %105, %106
  br i1 %.not31.19, label %108, label %.loopexit

108:                                              ; preds = %107
  %109 = call noundef i32 @_ZL8CrcCalc1PKhj(ptr noundef nonnull %29, i32 noundef 20)
  %110 = invoke i32 @CrcCalc(ptr noundef nonnull %29, i64 noundef 20)
          to label %111 unwind label %160

111:                                              ; preds = %108
  %.not31.20 = icmp eq i32 %109, %110
  br i1 %.not31.20, label %112, label %.loopexit

112:                                              ; preds = %111
  %113 = call noundef i32 @_ZL8CrcCalc1PKhj(ptr noundef nonnull %29, i32 noundef 21)
  %114 = invoke i32 @CrcCalc(ptr noundef nonnull %29, i64 noundef 21)
          to label %115 unwind label %160

115:                                              ; preds = %112
  %.not31.21 = icmp eq i32 %113, %114
  br i1 %.not31.21, label %116, label %.loopexit

116:                                              ; preds = %115
  %117 = call noundef i32 @_ZL8CrcCalc1PKhj(ptr noundef nonnull %29, i32 noundef 22)
  %118 = invoke i32 @CrcCalc(ptr noundef nonnull %29, i64 noundef 22)
          to label %119 unwind label %160

119:                                              ; preds = %116
  %.not31.22 = icmp eq i32 %117, %118
  br i1 %.not31.22, label %120, label %.loopexit

120:                                              ; preds = %119
  %121 = call noundef i32 @_ZL8CrcCalc1PKhj(ptr noundef nonnull %29, i32 noundef 23)
  %122 = invoke i32 @CrcCalc(ptr noundef nonnull %29, i64 noundef 23)
          to label %123 unwind label %160

123:                                              ; preds = %120
  %.not31.23 = icmp eq i32 %121, %122
  br i1 %.not31.23, label %124, label %.loopexit

124:                                              ; preds = %123
  %125 = call noundef i32 @_ZL8CrcCalc1PKhj(ptr noundef nonnull %29, i32 noundef 24)
  %126 = invoke i32 @CrcCalc(ptr noundef nonnull %29, i64 noundef 24)
          to label %127 unwind label %160

127:                                              ; preds = %124
  %.not31.24 = icmp eq i32 %125, %126
  br i1 %.not31.24, label %128, label %.loopexit

128:                                              ; preds = %127
  %129 = call noundef i32 @_ZL8CrcCalc1PKhj(ptr noundef nonnull %29, i32 noundef 25)
  %130 = invoke i32 @CrcCalc(ptr noundef nonnull %29, i64 noundef 25)
          to label %131 unwind label %160

131:                                              ; preds = %128
  %.not31.25 = icmp eq i32 %129, %130
  br i1 %.not31.25, label %132, label %.loopexit

132:                                              ; preds = %131
  %133 = call noundef i32 @_ZL8CrcCalc1PKhj(ptr noundef nonnull %29, i32 noundef 26)
  %134 = invoke i32 @CrcCalc(ptr noundef nonnull %29, i64 noundef 26)
          to label %135 unwind label %160

135:                                              ; preds = %132
  %.not31.26 = icmp eq i32 %133, %134
  br i1 %.not31.26, label %136, label %.loopexit

136:                                              ; preds = %135
  %137 = call noundef i32 @_ZL8CrcCalc1PKhj(ptr noundef nonnull %29, i32 noundef 27)
  %138 = invoke i32 @CrcCalc(ptr noundef nonnull %29, i64 noundef 27)
          to label %139 unwind label %160

139:                                              ; preds = %136
  %.not31.27 = icmp eq i32 %137, %138
  br i1 %.not31.27, label %140, label %.loopexit

140:                                              ; preds = %139
  %141 = call noundef i32 @_ZL8CrcCalc1PKhj(ptr noundef nonnull %29, i32 noundef 28)
  %142 = invoke i32 @CrcCalc(ptr noundef nonnull %29, i64 noundef 28)
          to label %143 unwind label %160

143:                                              ; preds = %140
  %.not31.28 = icmp eq i32 %141, %142
  br i1 %.not31.28, label %144, label %.loopexit

144:                                              ; preds = %143
  %145 = call noundef i32 @_ZL8CrcCalc1PKhj(ptr noundef nonnull %29, i32 noundef 29)
  %146 = invoke i32 @CrcCalc(ptr noundef nonnull %29, i64 noundef 29)
          to label %147 unwind label %160

147:                                              ; preds = %144
  %.not31.29 = icmp eq i32 %145, %146
  br i1 %.not31.29, label %148, label %.loopexit

148:                                              ; preds = %147
  %149 = call noundef i32 @_ZL8CrcCalc1PKhj(ptr noundef nonnull %29, i32 noundef 30)
  %150 = invoke i32 @CrcCalc(ptr noundef nonnull %29, i64 noundef 30)
          to label %151 unwind label %160

151:                                              ; preds = %148
  %.not31.30 = icmp eq i32 %149, %150
  br i1 %.not31.30, label %152, label %.loopexit

152:                                              ; preds = %151
  %153 = call noundef i32 @_ZL8CrcCalc1PKhj(ptr noundef nonnull %29, i32 noundef 31)
  %154 = invoke i32 @CrcCalc(ptr noundef nonnull %29, i64 noundef 31)
          to label %155 unwind label %160

155:                                              ; preds = %152
  %.not31.31 = icmp eq i32 %153, %154
  br i1 %.not31.31, label %.critedge, label %.loopexit

.critedge:                                        ; preds = %155
  %indvars.iv.next48 = add nuw nsw i64 %indvars.iv47, 1
  %156 = icmp ugt i64 %indvars.iv47, 1246
  %exitcond49 = icmp eq i64 %indvars.iv.next48, 1248
  br i1 %exitcond49, label %.loopexit, label %.preheader, !llvm.loop !12

157:                                              ; preds = %25
  %158 = landingpad { ptr, i32 }
          cleanup
  br label %163

159:                                              ; preds = %.preheader
  %.not31 = icmp eq i32 %30, %31
  br i1 %.not31, label %32, label %.loopexit

160:                                              ; preds = %152, %148, %144, %140, %136, %132, %128, %124, %120, %116, %112, %108, %104, %100, %96, %92, %88, %84, %80, %76, %72, %68, %64, %60, %56, %52, %48, %44, %40, %36, %32, %.preheader
  %161 = landingpad { ptr, i32 }
          cleanup
  br label %163

.loopexit:                                        ; preds = %.critedge, %159, %35, %39, %43, %47, %51, %55, %59, %63, %67, %71, %75, %79, %83, %87, %91, %95, %99, %103, %107, %111, %115, %119, %123, %127, %131, %135, %139, %143, %147, %151, %155
  %162 = phi i1 [ %28, %155 ], [ %28, %151 ], [ %28, %147 ], [ %28, %143 ], [ %28, %139 ], [ %28, %135 ], [ %28, %131 ], [ %28, %127 ], [ %28, %123 ], [ %28, %119 ], [ %28, %115 ], [ %28, %111 ], [ %28, %107 ], [ %28, %103 ], [ %28, %99 ], [ %28, %95 ], [ %28, %91 ], [ %28, %87 ], [ %28, %83 ], [ %28, %79 ], [ %28, %75 ], [ %28, %71 ], [ %28, %67 ], [ %28, %63 ], [ %28, %59 ], [ %28, %55 ], [ %28, %51 ], [ %28, %47 ], [ %28, %43 ], [ %28, %39 ], [ %28, %35 ], [ %28, %159 ], [ %156, %.critedge ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #4
  br label %164

163:                                              ; preds = %160, %157
  %.pn = phi { ptr, i32 } [ %161, %160 ], [ %158, %157 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #4
  br label %165

164:                                              ; preds = %.loopexit, %vector.ph, %4
  %.4 = phi i1 [ false, %4 ], [ %162, %.loopexit ], [ false, %vector.ph ]
  call void @_ZN12CBenchBufferD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %1) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %1) #4
  ret i1 %.4

165:                                              ; preds = %163, %5
  %.pn.pn = phi { ptr, i32 } [ %.pn, %163 ], [ %6, %5 ]
  call void @_ZN12CBenchBufferD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %1) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %1) #4
  resume { ptr, i32 } %.pn.pn
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN12CBenchBufferC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZL7RandGenPhjR20CBaseRandomGenerator(ptr noundef, i32 noundef, ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN12CBenchBufferD2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress 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 = { "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 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 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !10, i64 16}
!6 = !{!"_ZTS12CBenchBuffer", !7, i64 8, !10, i64 16}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!8, !8, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}


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