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

; 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.CBenchCallback = type <{ %struct.IBenchCallback, %struct.CTotalBenchRes, %struct.CTotalBenchRes, ptr, i32, [4 x i8] }>
%struct.IBenchCallback = type { ptr }
%struct.CTotalBenchRes = type { i64, i64, i64, i64 }

@_ZL4kSep = external hidden global ptr, align 8
@.str = external hidden unnamed_addr constant [7 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [62 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [70 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [6 x i8], align 1

; 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: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #1

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z12LzmaBenchConP8_IO_FILEjjj(ptr noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3) #2 {
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca %struct.CBenchCallback, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca %struct.CTotalBenchRes, align 8
  store ptr %0, ptr %6, align 8, !tbaa !5
  store i32 %1, ptr %7, align 4, !tbaa !9
  store i32 %2, ptr %8, align 4, !tbaa !9
  store i32 %3, ptr %9, align 4, !tbaa !9
  %19 = call noundef zeroext i1 @_Z15CrcInternalTestv()
  br i1 %19, label %21, label %20

20:                                               ; preds = %4
  store i32 1, ptr %5, align 4
  br label %151

21:                                               ; preds = %4
  %22 = load i32, ptr %9, align 4, !tbaa !9
  %23 = icmp eq i32 %22, -1
  br i1 %23, label %24, label %25

24:                                               ; preds = %21
  store i32 4194304, ptr %9, align 4, !tbaa !9
  br label %25

25:                                               ; preds = %24, %21
  store i32 1, ptr %8, align 4, !tbaa !9
  %26 = load ptr, ptr %6, align 8, !tbaa !5
  %27 = load i32, ptr %8, align 4, !tbaa !9
  %28 = load i32, ptr %9, align 4, !tbaa !9
  %29 = call noundef i64 @_Z19GetBenchMemoryUsagejj(i32 noundef %27, i32 noundef %28)
  %30 = load i32, ptr %8, align 4, !tbaa !9
  call void @_ZL17PrintRequirementsP8_IO_FILEPKcyS2_j(ptr noundef %26, ptr noundef @.str, i64 noundef %29, ptr noundef @.str.1, i32 noundef %30)
  call void @llvm.lifetime.start.p0(i64 88, ptr %10) #6
  call void @_ZN14CBenchCallbackC2Ev(ptr noundef nonnull align 8 dereferenceable(84) %10) #6
  call void @_ZN14CBenchCallback4InitEv(ptr noundef nonnull align 8 dereferenceable(84) %10)
  %31 = load ptr, ptr %6, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.CBenchCallback, ptr %10, i32 0, i32 3
  store ptr %31, ptr %32, align 8, !tbaa !11
  %33 = load ptr, ptr %6, align 8, !tbaa !5
  %34 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %33, ptr noundef @.str.2) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %35

35:                                               ; preds = %48, %25
  %36 = load i32, ptr %11, align 4, !tbaa !9
  %37 = icmp slt i32 %36, 2
  br i1 %37, label %38, label %51

38:                                               ; preds = %35
  %39 = load ptr, ptr %6, align 8, !tbaa !5
  %40 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %39, ptr noundef @.str.3) #6
  %41 = load i32, ptr %11, align 4, !tbaa !9
  %42 = icmp eq i32 %41, 0
  br i1 %42, label %43, label %47

43:                                               ; preds = %38
  %44 = load ptr, ptr %6, align 8, !tbaa !5
  %45 = load ptr, ptr @_ZL4kSep, align 8, !tbaa !5
  %46 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %44, ptr noundef %45) #6
  br label %47

47:                                               ; preds = %43, %38
  br label %48

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

51:                                               ; preds = %35
  %52 = load ptr, ptr %6, align 8, !tbaa !5
  %53 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %52, ptr noundef @.str.4) #6
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %54

54:                                               ; preds = %67, %51
  %55 = load i32, ptr %11, align 4, !tbaa !9
  %56 = icmp slt i32 %55, 2
  br i1 %56, label %57, label %70

57:                                               ; preds = %54
  %58 = load ptr, ptr %6, align 8, !tbaa !5
  %59 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %58, ptr noundef @.str.5) #6
  %60 = load i32, ptr %11, align 4, !tbaa !9
  %61 = icmp eq i32 %60, 0
  br i1 %61, label %62, label %66

62:                                               ; preds = %57
  %63 = load ptr, ptr %6, align 8, !tbaa !5
  %64 = load ptr, ptr @_ZL4kSep, align 8, !tbaa !5
  %65 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %63, ptr noundef %64) #6
  br label %66

66:                                               ; preds = %62, %57
  br label %67

67:                                               ; preds = %66
  %68 = load i32, ptr %11, align 4, !tbaa !9
  %69 = add nsw i32 %68, 1
  store i32 %69, ptr %11, align 4, !tbaa !9
  br label %54, !llvm.loop !18

70:                                               ; preds = %54
  %71 = load ptr, ptr %6, align 8, !tbaa !5
  %72 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %71, ptr noundef @.str.6) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %73

73:                                               ; preds = %129, %70
  %74 = load i32, ptr %12, align 4, !tbaa !9
  %75 = load i32, ptr %7, align 4, !tbaa !9
  %76 = icmp ult i32 %74, %75
  br i1 %76, label %78, label %77

77:                                               ; preds = %73
  store i32 8, ptr %13, align 4
  br label %132

78:                                               ; preds = %73
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  store i32 22, ptr %14, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  %79 = load i32, ptr %9, align 4, !tbaa !9
  %80 = icmp ult i32 %79, 4194304
  %81 = zext i1 %80 to i64
  %82 = select i1 %80, i32 18, i32 22
  store i32 %82, ptr %15, align 4, !tbaa !9
  br label %83

83:                                               ; preds = %88, %78
  %84 = load i32, ptr %15, align 4, !tbaa !9
  %85 = shl i32 1, %84
  %86 = load i32, ptr %9, align 4, !tbaa !9
  %87 = icmp ugt i32 %85, %86
  br i1 %87, label %88, label %91

88:                                               ; preds = %83
  %89 = load i32, ptr %15, align 4, !tbaa !9
  %90 = add nsw i32 %89, -1
  store i32 %90, ptr %15, align 4, !tbaa !9
  br label %83, !llvm.loop !19

91:                                               ; preds = %83
  br label %92

92:                                               ; preds = %122, %91
  %93 = load i32, ptr %15, align 4, !tbaa !9
  %94 = shl i32 1, %93
  %95 = load i32, ptr %9, align 4, !tbaa !9
  %96 = icmp ule i32 %94, %95
  br i1 %96, label %97, label %125

97:                                               ; preds = %92
  %98 = load ptr, ptr %6, align 8, !tbaa !5
  %99 = load i32, ptr %15, align 4, !tbaa !9
  %100 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %98, ptr noundef @.str.7, i32 noundef %99) #6
  %101 = load i32, ptr %15, align 4, !tbaa !9
  %102 = shl i32 1, %101
  %103 = getelementptr inbounds %struct.CBenchCallback, ptr %10, i32 0, i32 4
  store i32 %102, ptr %103, align 8, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  %104 = load i32, ptr %8, align 4, !tbaa !9
  %105 = getelementptr inbounds %struct.CBenchCallback, ptr %10, i32 0, i32 4
  %106 = load i32, ptr %105, align 8, !tbaa !20
  %107 = call noundef i32 @_Z9LzmaBenchjjP14IBenchCallback(i32 noundef %104, i32 noundef %106, ptr noundef %10)
  store i32 %107, ptr %16, align 4, !tbaa !9
  %108 = load ptr, ptr %6, align 8, !tbaa !5
  %109 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %108, ptr noundef @.str.8) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  %110 = load i32, ptr %16, align 4, !tbaa !9
  store i32 %110, ptr %17, align 4, !tbaa !9
  %111 = load i32, ptr %17, align 4, !tbaa !9
  %112 = icmp ne i32 %111, 0
  br i1 %112, label %113, label %115

113:                                              ; preds = %97
  %114 = load i32, ptr %17, align 4, !tbaa !9
  store i32 %114, ptr %5, align 4
  store i32 1, ptr %13, align 4
  br label %116

115:                                              ; preds = %97
  store i32 0, ptr %13, align 4
  br label %116

116:                                              ; preds = %115, %113
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  %117 = load i32, ptr %13, align 4
  switch i32 %117, label %119 [
    i32 0, label %118
  ]

118:                                              ; preds = %116
  store i32 0, ptr %13, align 4
  br label %119

119:                                              ; preds = %118, %116
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  %120 = load i32, ptr %13, align 4
  switch i32 %120, label %126 [
    i32 0, label %121
  ]

121:                                              ; preds = %119
  br label %122

122:                                              ; preds = %121
  %123 = load i32, ptr %15, align 4, !tbaa !9
  %124 = add nsw i32 %123, 1
  store i32 %124, ptr %15, align 4, !tbaa !9
  br label %92, !llvm.loop !21

125:                                              ; preds = %92
  store i32 0, ptr %13, align 4
  br label %126

126:                                              ; preds = %125, %119
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  %127 = load i32, ptr %13, align 4
  switch i32 %127, label %132 [
    i32 0, label %128
  ]

128:                                              ; preds = %126
  br label %129

129:                                              ; preds = %128
  %130 = load i32, ptr %12, align 4, !tbaa !9
  %131 = add i32 %130, 1
  store i32 %131, ptr %12, align 4, !tbaa !9
  br label %73, !llvm.loop !22

132:                                              ; preds = %126, %77
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  %133 = load i32, ptr %13, align 4
  switch i32 %133, label %150 [
    i32 8, label %134
  ]

134:                                              ; preds = %132
  call void @_ZN14CBenchCallback9NormalizeEv(ptr noundef nonnull align 8 dereferenceable(84) %10)
  %135 = load ptr, ptr %6, align 8, !tbaa !5
  %136 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %135, ptr noundef @.str.9) #6
  %137 = load ptr, ptr %6, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct.CBenchCallback, ptr %10, i32 0, i32 1
  call void @_ZL11PrintTotalsP8_IO_FILERK14CTotalBenchRes(ptr noundef %137, ptr noundef nonnull align 8 dereferenceable(32) %138)
  %139 = load ptr, ptr %6, align 8, !tbaa !5
  %140 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %139, ptr noundef @.str.10) #6
  %141 = load ptr, ptr %6, align 8, !tbaa !5
  %142 = getelementptr inbounds %struct.CBenchCallback, ptr %10, i32 0, i32 2
  call void @_ZL11PrintTotalsP8_IO_FILERK14CTotalBenchRes(ptr noundef %141, ptr noundef nonnull align 8 dereferenceable(32) %142)
  %143 = load ptr, ptr %6, align 8, !tbaa !5
  %144 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %143, ptr noundef @.str.11) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %18) #6
  %145 = getelementptr inbounds %struct.CBenchCallback, ptr %10, i32 0, i32 1
  %146 = getelementptr inbounds %struct.CBenchCallback, ptr %10, i32 0, i32 2
  call void @_ZN14CTotalBenchRes6SetMidERKS_S1_(ptr noundef nonnull align 8 dereferenceable(32) %18, ptr noundef nonnull align 8 dereferenceable(32) %145, ptr noundef nonnull align 8 dereferenceable(32) %146)
  %147 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZL11PrintTotalsP8_IO_FILERK14CTotalBenchRes(ptr noundef %147, ptr noundef nonnull align 8 dereferenceable(32) %18)
  %148 = load ptr, ptr %6, align 8, !tbaa !5
  %149 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %148, ptr noundef @.str.8) #6
  store i32 0, ptr %5, align 4
  store i32 1, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 32, ptr %18) #6
  br label %150

150:                                              ; preds = %134, %132
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 88, ptr %10) #6
  br label %151

151:                                              ; preds = %150, %20
  %152 = load i32, ptr %5, align 4
  ret i32 %152
}

declare noundef zeroext i1 @_Z15CrcInternalTestv() #3

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL17PrintRequirementsP8_IO_FILEPKcyS2_j(ptr noundef, ptr noundef, i64 noundef, ptr noundef, i32 noundef) #2

declare noundef i64 @_Z19GetBenchMemoryUsagejj(i32 noundef, i32 noundef) #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN14CBenchCallbackC2Ev(ptr noundef nonnull align 8 dereferenceable(84)) unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN14CBenchCallback4InitEv(ptr noundef nonnull align 8 dereferenceable(84)) #2 align 2

declare noundef i32 @_Z9LzmaBenchjjP14IBenchCallback(i32 noundef, i32 noundef, ptr noundef) #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN14CBenchCallback9NormalizeEv(ptr noundef nonnull align 8 dereferenceable(84)) #2 align 2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL11PrintTotalsP8_IO_FILERK14CTotalBenchRes(ptr noundef, ptr noundef nonnull align 8 dereferenceable(32)) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN14CTotalBenchRes6SetMidERKS_S1_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) #5 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 #3 = { "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 = { inlinehint 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 #5 = { 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 #6 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !6, i64 72}
!12 = !{!"_ZTS14CBenchCallback", !13, i64 0, !14, i64 8, !14, i64 40, !6, i64 72, !10, i64 80}
!13 = !{!"_ZTS14IBenchCallback"}
!14 = !{!"_ZTS14CTotalBenchRes", !15, i64 0, !15, i64 8, !15, i64 16, !15, i64 24}
!15 = !{!"long long", !7, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = distinct !{!18, !17}
!19 = distinct !{!19, !17}
!20 = !{!12, !10, i64 80}
!21 = distinct !{!21, !17}
!22 = distinct !{!22, !17}


; 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.CBenchCallback = type <{ %struct.IBenchCallback, %struct.CTotalBenchRes, %struct.CTotalBenchRes, ptr, i32, [4 x i8] }>
%struct.IBenchCallback = type { ptr }
%struct.CTotalBenchRes = type { i64, i64, i64, i64 }

@_ZL4kSep = external hidden local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [7 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [62 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [70 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [6 x i8], align 1

; 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: nofree nounwind
declare noundef i32 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z12LzmaBenchConP8_IO_FILEjjj(ptr noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3) local_unnamed_addr #2 {
  %5 = alloca %struct.CBenchCallback, align 8
  %6 = alloca %struct.CTotalBenchRes, align 8
  %7 = tail call noundef zeroext i1 @_Z15CrcInternalTestv()
  br i1 %7, label %8, label %45

8:                                                ; preds = %4
  %9 = icmp eq i32 %3, -1
  %spec.store.select = select i1 %9, i32 4194304, i32 %3
  %10 = tail call noundef i64 @_Z19GetBenchMemoryUsagejj(i32 noundef 1, i32 noundef %spec.store.select)
  tail call void @_ZL17PrintRequirementsP8_IO_FILEPKcyS2_j(ptr noundef %0, ptr noundef nonnull @.str, i64 noundef %10, ptr noundef nonnull @.str.1, i32 noundef 1)
  call void @llvm.lifetime.start.p0(i64 88, ptr nonnull %5) #6
  call void @_ZN14CBenchCallbackC2Ev(ptr noundef nonnull align 8 dereferenceable(84) %5) #6
  call void @_ZN14CBenchCallback4InitEv(ptr noundef nonnull align 8 dereferenceable(84) %5)
  %11 = getelementptr inbounds i8, ptr %5, i64 72
  store ptr %0, ptr %11, align 8, !tbaa !5
  %12 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %0, ptr noundef nonnull @.str.2) #6
  %13 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %0, ptr noundef nonnull @.str.3) #6
  %14 = load ptr, ptr @_ZL4kSep, align 8, !tbaa !14
  %15 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %0, ptr noundef %14) #6
  %16 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %0, ptr noundef nonnull @.str.3) #6
  %17 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %0, ptr noundef nonnull @.str.4) #6
  %18 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %0, ptr noundef nonnull @.str.5) #6
  %19 = load ptr, ptr @_ZL4kSep, align 8, !tbaa !14
  %20 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %0, ptr noundef %19) #6
  %21 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %0, ptr noundef nonnull @.str.5) #6
  %22 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %0, ptr noundef nonnull @.str.6) #6
  %.not6372.not = icmp eq i32 %1, 0
  br i1 %.not6372.not, label %.thread66, label %.lr.ph75

.lr.ph75:                                         ; preds = %8
  %23 = icmp ult i32 %spec.store.select, 4194304
  %24 = select i1 %23, i32 18, i32 22
  %25 = getelementptr inbounds i8, ptr %5, i64 80
  br label %26

26:                                               ; preds = %.lr.ph75, %._crit_edge
  %.05773 = phi i32 [ 0, %.lr.ph75 ], [ %38, %._crit_edge ]
  br label %27

27:                                               ; preds = %27, %26
  %.052 = phi i32 [ %24, %26 ], [ %29, %27 ]
  %spec.store.select.highbits = lshr i32 %spec.store.select, %.052
  %28 = icmp eq i32 %spec.store.select.highbits, 0
  %29 = add nsw i32 %.052, -1
  br i1 %28, label %27, label %.preheader, !llvm.loop !15

.preheader:                                       ; preds = %27
  %30 = shl nuw i32 1, %.052
  %.not70 = icmp ugt i32 %30, %spec.store.select
  br i1 %.not70, label %._crit_edge, label %.lr.ph

31:                                               ; preds = %.lr.ph
  %32 = add nsw i32 %.15371, 1
  %33 = shl nuw i32 1, %32
  %.not = icmp ugt i32 %33, %spec.store.select
  br i1 %.not, label %._crit_edge, label %.lr.ph, !llvm.loop !17

.lr.ph:                                           ; preds = %.preheader, %31
  %34 = phi i32 [ %33, %31 ], [ %30, %.preheader ]
  %.15371 = phi i32 [ %32, %31 ], [ %.052, %.preheader ]
  %35 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %0, ptr noundef nonnull @.str.7, i32 noundef %.15371) #6
  store i32 %34, ptr %25, align 8, !tbaa !18
  %36 = call noundef i32 @_Z9LzmaBenchjjP14IBenchCallback(i32 noundef 1, i32 noundef %34, ptr noundef nonnull %5)
  %37 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %0, ptr noundef nonnull @.str.8) #6
  %.not62 = icmp eq i32 %36, 0
  br i1 %.not62, label %31, label %.loopexit

._crit_edge:                                      ; preds = %31, %.preheader
  %38 = add nuw i32 %.05773, 1
  %exitcond.not = icmp eq i32 %38, %1
  br i1 %exitcond.not, label %.thread66, label %26, !llvm.loop !19

.thread66:                                        ; preds = %._crit_edge, %8
  call void @_ZN14CBenchCallback9NormalizeEv(ptr noundef nonnull align 8 dereferenceable(84) %5)
  %39 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %0, ptr noundef nonnull @.str.9) #6
  %40 = getelementptr inbounds i8, ptr %5, i64 8
  call void @_ZL11PrintTotalsP8_IO_FILERK14CTotalBenchRes(ptr noundef %0, ptr noundef nonnull align 8 dereferenceable(32) %40)
  %41 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %0, ptr noundef nonnull @.str.10) #6
  %42 = getelementptr inbounds i8, ptr %5, i64 40
  call void @_ZL11PrintTotalsP8_IO_FILERK14CTotalBenchRes(ptr noundef %0, ptr noundef nonnull align 8 dereferenceable(32) %42)
  %43 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %0, ptr noundef nonnull @.str.11) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #6
  call void @_ZN14CTotalBenchRes6SetMidERKS_S1_(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull align 8 dereferenceable(32) %40, ptr noundef nonnull align 8 dereferenceable(32) %42)
  call void @_ZL11PrintTotalsP8_IO_FILERK14CTotalBenchRes(ptr noundef %0, ptr noundef nonnull align 8 dereferenceable(32) %6)
  %44 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %0, ptr noundef nonnull @.str.8) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #6
  br label %.loopexit

.loopexit:                                        ; preds = %.lr.ph, %.thread66
  %.5 = phi i32 [ 0, %.thread66 ], [ %36, %.lr.ph ]
  call void @llvm.lifetime.end.p0(i64 88, ptr nonnull %5) #6
  br label %45

45:                                               ; preds = %4, %.loopexit
  %.6 = phi i32 [ %.5, %.loopexit ], [ 1, %4 ]
  ret i32 %.6
}

declare noundef zeroext i1 @_Z15CrcInternalTestv() local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL17PrintRequirementsP8_IO_FILEPKcyS2_j(ptr noundef, ptr noundef, i64 noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

declare noundef i64 @_Z19GetBenchMemoryUsagejj(i32 noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN14CBenchCallbackC2Ev(ptr noundef nonnull align 8 dereferenceable(84)) unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN14CBenchCallback4InitEv(ptr noundef nonnull align 8 dereferenceable(84)) local_unnamed_addr #2 align 2

declare noundef i32 @_Z9LzmaBenchjjP14IBenchCallback(i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN14CBenchCallback9NormalizeEv(ptr noundef nonnull align 8 dereferenceable(84)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL11PrintTotalsP8_IO_FILERK14CTotalBenchRes(ptr noundef, ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN14CTotalBenchRes6SetMidERKS_S1_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #5 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 #3 = { "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 = { inlinehint 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 #5 = { 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 #6 = { 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, !12, i64 72}
!6 = !{!"_ZTS14CBenchCallback", !7, i64 0, !8, i64 8, !8, i64 40, !12, i64 72, !13, i64 80}
!7 = !{!"_ZTS14IBenchCallback"}
!8 = !{!"_ZTS14CTotalBenchRes", !9, i64 0, !9, i64 8, !9, i64 16, !9, i64 24}
!9 = !{!"long long", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C++ TBAA"}
!12 = !{!"any pointer", !10, i64 0}
!13 = !{!"int", !10, i64 0}
!14 = !{!12, !12, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}
!18 = !{!6, !13, i64 80}
!19 = distinct !{!19, !16}


; Effective O3 passes: ConstraintEliminationPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass