; LLVM IR from IlyaGrebnov/libbsc :: bsc.ll (Z11CompressionPPc)

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

@bscFileSign = external dso_local global [4 x i8], align 1
@paramBlockSize = external dso_local global i32, align 4
@paramEnableLZP = external dso_local global i32, align 4
@paramLZPHashSize = external dso_local global i32, align 4
@paramLZPMinLen = external dso_local global i32, align 4
@stderr = external global ptr, align 8
@stdout = external global ptr, align 8
@.str.10 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [50 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: mustprogress nounwind uwtable
declare dso_local noundef double @_Z9BSC_CLOCKv() #1

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

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #3

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #4

declare i64 @ftello64(ptr noundef) #5

declare i32 @fseeko64(ptr noundef, i64 noundef, i32 noundef) #5

declare i64 @fwrite(ptr noundef, i64 noundef, i64 noundef, ptr noundef) #5

; Function Attrs: mustprogress uwtable
define dso_local void @_Z11CompressionPPc(ptr noundef %0) #2 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i32, align 4
  %8 = alloca double, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %11 = load i32, ptr @paramEnableLZP, align 4, !tbaa !9
  %12 = icmp ne i32 %11, 0
  br i1 %12, label %14, label %13

13:                                               ; preds = %1
  store i32 0, ptr @paramLZPHashSize, align 4, !tbaa !9
  store i32 0, ptr @paramLZPMinLen, align 4, !tbaa !9
  br label %14

14:                                               ; preds = %13, %1
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #6
  %15 = load ptr, ptr %2, align 8, !tbaa !5
  %16 = getelementptr inbounds ptr, ptr %15, i64 2
  %17 = load ptr, ptr %16, align 8, !tbaa !5
  %18 = call noalias ptr @fopen(ptr noundef %17, ptr noundef @.str.10)
  store ptr %18, ptr %3, align 8, !tbaa !5
  %19 = load ptr, ptr %3, align 8, !tbaa !5
  %20 = icmp eq ptr %19, null
  br i1 %20, label %21, label %27

21:                                               ; preds = %14
  %22 = load ptr, ptr @stderr, align 8, !tbaa !5
  %23 = load ptr, ptr %2, align 8, !tbaa !5
  %24 = getelementptr inbounds ptr, ptr %23, i64 2
  %25 = load ptr, ptr %24, align 8, !tbaa !5
  %26 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %22, ptr noundef @.str.11, ptr noundef %25) #6
  call void @exit(i32 noundef 1) #7
  unreachable

27:                                               ; preds = %14
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #6
  %28 = load ptr, ptr %2, align 8, !tbaa !5
  %29 = getelementptr inbounds ptr, ptr %28, i64 3
  %30 = load ptr, ptr %29, align 8, !tbaa !5
  %31 = call noalias ptr @fopen(ptr noundef %30, ptr noundef @.str.12)
  store ptr %31, ptr %4, align 8, !tbaa !5
  %32 = load ptr, ptr %4, align 8, !tbaa !5
  %33 = icmp eq ptr %32, null
  br i1 %33, label %34, label %40

34:                                               ; preds = %27
  %35 = load ptr, ptr @stderr, align 8, !tbaa !5
  %36 = load ptr, ptr %2, align 8, !tbaa !5
  %37 = getelementptr inbounds ptr, ptr %36, i64 3
  %38 = load ptr, ptr %37, align 8, !tbaa !5
  %39 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %35, ptr noundef @.str.13, ptr noundef %38) #6
  call void @exit(i32 noundef 1) #7
  unreachable

40:                                               ; preds = %27
  %41 = load ptr, ptr %3, align 8, !tbaa !5
  %42 = call i32 @fseeko64(ptr noundef %41, i64 noundef 0, i32 noundef 2)
  %43 = icmp ne i32 %42, 0
  br i1 %43, label %44, label %50

44:                                               ; preds = %40
  %45 = load ptr, ptr @stderr, align 8, !tbaa !5
  %46 = load ptr, ptr %2, align 8, !tbaa !5
  %47 = getelementptr inbounds ptr, ptr %46, i64 2
  %48 = load ptr, ptr %47, align 8, !tbaa !5
  %49 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %45, ptr noundef @.str.14, ptr noundef %48) #6
  call void @exit(i32 noundef 1) #7
  unreachable

50:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  %51 = load ptr, ptr %3, align 8, !tbaa !5
  %52 = call i64 @ftello64(ptr noundef %51)
  store i64 %52, ptr %5, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  store i64 0, ptr %6, align 8, !tbaa !11
  %53 = load i64, ptr %5, align 8, !tbaa !11
  %54 = icmp slt i64 %53, 0
  br i1 %54, label %55, label %61

55:                                               ; preds = %50
  %56 = load ptr, ptr @stderr, align 8, !tbaa !5
  %57 = load ptr, ptr %2, align 8, !tbaa !5
  %58 = getelementptr inbounds ptr, ptr %57, i64 2
  %59 = load ptr, ptr %58, align 8, !tbaa !5
  %60 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %56, ptr noundef @.str.14, ptr noundef %59) #6
  call void @exit(i32 noundef 1) #7
  unreachable

61:                                               ; preds = %50
  %62 = load ptr, ptr %3, align 8, !tbaa !5
  %63 = call i32 @fseeko64(ptr noundef %62, i64 noundef 0, i32 noundef 0)
  %64 = icmp ne i32 %63, 0
  br i1 %64, label %65, label %71

65:                                               ; preds = %61
  %66 = load ptr, ptr @stderr, align 8, !tbaa !5
  %67 = load ptr, ptr %2, align 8, !tbaa !5
  %68 = getelementptr inbounds ptr, ptr %67, i64 2
  %69 = load ptr, ptr %68, align 8, !tbaa !5
  %70 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %66, ptr noundef @.str.14, ptr noundef %69) #6
  call void @exit(i32 noundef 1) #7
  unreachable

71:                                               ; preds = %61
  %72 = load i32, ptr @paramBlockSize, align 4, !tbaa !9
  %73 = sext i32 %72 to i64
  %74 = load i64, ptr %5, align 8, !tbaa !11
  %75 = icmp sgt i64 %73, %74
  br i1 %75, label %76, label %79

76:                                               ; preds = %71
  %77 = load i64, ptr %5, align 8, !tbaa !11
  %78 = trunc i64 %77 to i32
  store i32 %78, ptr @paramBlockSize, align 4, !tbaa !9
  br label %79

79:                                               ; preds = %76, %71
  %80 = load ptr, ptr %4, align 8, !tbaa !5
  %81 = call i64 @fwrite(ptr noundef @bscFileSign, i64 noundef 4, i64 noundef 1, ptr noundef %80)
  %82 = icmp ne i64 %81, 1
  br i1 %82, label %83, label %89

83:                                               ; preds = %79
  %84 = load ptr, ptr @stderr, align 8, !tbaa !5
  %85 = load ptr, ptr %2, align 8, !tbaa !5
  %86 = getelementptr inbounds ptr, ptr %85, i64 3
  %87 = load ptr, ptr %86, align 8, !tbaa !5
  %88 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %84, ptr noundef @.str.14, ptr noundef %87) #6
  call void @exit(i32 noundef 1) #7
  unreachable

89:                                               ; preds = %79
  %90 = load i64, ptr %6, align 8, !tbaa !11
  %91 = add nsw i64 %90, 4
  store i64 %91, ptr %6, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  %92 = load i32, ptr @paramBlockSize, align 4, !tbaa !9
  %93 = icmp sgt i32 %92, 0
  br i1 %93, label %94, label %104

94:                                               ; preds = %89
  %95 = load i64, ptr %5, align 8, !tbaa !11
  %96 = load i32, ptr @paramBlockSize, align 4, !tbaa !9
  %97 = sext i32 %96 to i64
  %98 = add nsw i64 %95, %97
  %99 = sub nsw i64 %98, 1
  %100 = load i32, ptr @paramBlockSize, align 4, !tbaa !9
  %101 = sext i32 %100 to i64
  %102 = sdiv i64 %99, %101
  %103 = trunc i64 %102 to i32
  br label %105

104:                                              ; preds = %89
  br label %105

105:                                              ; preds = %104, %94
  %106 = phi i32 [ %103, %94 ], [ 0, %104 ]
  store i32 %106, ptr %7, align 4, !tbaa !9
  %107 = load ptr, ptr %4, align 8, !tbaa !5
  %108 = call i64 @fwrite(ptr noundef %7, i64 noundef 4, i64 noundef 1, ptr noundef %107)
  %109 = icmp ne i64 %108, 1
  br i1 %109, label %110, label %116

110:                                              ; preds = %105
  %111 = load ptr, ptr @stderr, align 8, !tbaa !5
  %112 = load ptr, ptr %2, align 8, !tbaa !5
  %113 = getelementptr inbounds ptr, ptr %112, i64 3
  %114 = load ptr, ptr %113, align 8, !tbaa !5
  %115 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %111, ptr noundef @.str.14, ptr noundef %114) #6
  call void @exit(i32 noundef 1) #7
  unreachable

116:                                              ; preds = %105
  %117 = load i64, ptr %6, align 8, !tbaa !11
  %118 = add nsw i64 %117, 4
  store i64 %118, ptr %6, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %119 = call noundef double @_Z9BSC_CLOCKv()
  store double %119, ptr %8, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  store i32 0, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  store i32 0, ptr %10, align 4, !tbaa !9
  %120 = load ptr, ptr %2, align 8, !tbaa !5
  %121 = getelementptr inbounds ptr, ptr %120, i64 2
  %122 = load ptr, ptr %121, align 8, !tbaa !5
  %123 = load ptr, ptr %3, align 8, !tbaa !5
  %124 = load ptr, ptr %2, align 8, !tbaa !5
  %125 = getelementptr inbounds ptr, ptr %124, i64 4
  %126 = load ptr, ptr %125, align 8, !tbaa !5
  %127 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_Z15compression_ompPcP8_IO_FILERlS_S1_S2_RiS3_(ptr noundef %122, ptr noundef %123, ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef %126, ptr noundef %127, ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 4 dereferenceable(4) %10)
  %128 = call noundef double @_Z9BSC_CLOCKv()
  %129 = load double, ptr %8, align 8, !tbaa !13
  %130 = fsub double %128, %129
  store double %130, ptr %8, align 8, !tbaa !13
  %131 = load ptr, ptr @stdout, align 8, !tbaa !5
  %132 = load ptr, ptr %2, align 8, !tbaa !5
  %133 = getelementptr inbounds ptr, ptr %132, i64 2
  %134 = load ptr, ptr %133, align 8, !tbaa !5
  %135 = load i64, ptr %5, align 8, !tbaa !11
  %136 = sitofp i64 %135 to double
  %137 = load i64, ptr %6, align 8, !tbaa !11
  %138 = sitofp i64 %137 to double
  %139 = load double, ptr %8, align 8, !tbaa !13
  %140 = load i64, ptr %5, align 8, !tbaa !11
  %141 = sitofp i64 %140 to double
  %142 = fdiv double %141, 1.000000e+06
  %143 = load double, ptr %8, align 8, !tbaa !13
  %144 = fdiv double %142, %143
  %145 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %131, ptr noundef @.str.15, ptr noundef %134, double noundef %136, double noundef %138, double noundef %139, double noundef %144) #6
  %146 = load ptr, ptr %3, align 8, !tbaa !5
  %147 = call i32 @fclose(ptr noundef %146)
  %148 = load ptr, ptr %4, align 8, !tbaa !5
  %149 = call i32 @fclose(ptr noundef %148)
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #6
  ret void
}

declare noalias ptr @fopen(ptr noundef, ptr noundef) #5

declare i32 @fclose(ptr noundef) #5

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"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, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"double", !7, i64 0}


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

@bscFileSign = external dso_local global [4 x i8], align 1
@paramBlockSize = external dso_local local_unnamed_addr global i32, align 4
@paramEnableLZP = external dso_local local_unnamed_addr global i32, align 4
@paramLZPHashSize = external dso_local local_unnamed_addr global i32, align 4
@paramLZPMinLen = external dso_local local_unnamed_addr global i32, align 4
@stderr = external local_unnamed_addr global ptr, align 8
@stdout = external local_unnamed_addr global ptr, align 8
@.str.10 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [50 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: mustprogress nounwind uwtable
declare dso_local noundef double @_Z9BSC_CLOCKv() local_unnamed_addr #1

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

; Function Attrs: nofree nounwind
declare noundef i32 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #3

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #4

; Function Attrs: nofree nounwind
declare noundef i64 @ftello64(ptr nocapture noundef) local_unnamed_addr #3

; Function Attrs: nofree nounwind
declare noundef i32 @fseeko64(ptr nocapture noundef, i64 noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: nofree nounwind
declare noundef i64 @fwrite(ptr nocapture noundef, i64 noundef, i64 noundef, ptr nocapture noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
define dso_local void @_Z11CompressionPPc(ptr nocapture noundef readonly %0) local_unnamed_addr #2 {
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = load i32, ptr @paramEnableLZP, align 4, !tbaa !5
  %.not = icmp eq i32 %7, 0
  br i1 %.not, label %8, label %9

8:                                                ; preds = %1
  store i32 0, ptr @paramLZPHashSize, align 4, !tbaa !5
  store i32 0, ptr @paramLZPMinLen, align 4, !tbaa !5
  br label %9

9:                                                ; preds = %8, %1
  %10 = getelementptr inbounds i8, ptr %0, i64 16
  %11 = load ptr, ptr %10, align 8, !tbaa !9
  %12 = tail call noalias ptr @fopen(ptr noundef %11, ptr noundef nonnull @.str.10)
  %13 = icmp eq ptr %12, null
  br i1 %13, label %14, label %18

14:                                               ; preds = %9
  %15 = load ptr, ptr @stderr, align 8, !tbaa !9
  %16 = load ptr, ptr %10, align 8, !tbaa !9
  %17 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %15, ptr noundef nonnull @.str.11, ptr noundef %16) #5
  tail call void @exit(i32 noundef 1) #6
  unreachable

18:                                               ; preds = %9
  %19 = getelementptr inbounds i8, ptr %0, i64 24
  %20 = load ptr, ptr %19, align 8, !tbaa !9
  %21 = tail call noalias ptr @fopen(ptr noundef %20, ptr noundef nonnull @.str.12)
  %22 = icmp eq ptr %21, null
  br i1 %22, label %23, label %27

23:                                               ; preds = %18
  %24 = load ptr, ptr @stderr, align 8, !tbaa !9
  %25 = load ptr, ptr %19, align 8, !tbaa !9
  %26 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %24, ptr noundef nonnull @.str.13, ptr noundef %25) #5
  tail call void @exit(i32 noundef 1) #6
  unreachable

27:                                               ; preds = %18
  %28 = tail call i32 @fseeko64(ptr noundef nonnull %12, i64 noundef 0, i32 noundef 2)
  %.not29 = icmp eq i32 %28, 0
  br i1 %.not29, label %33, label %29

29:                                               ; preds = %27
  %30 = load ptr, ptr @stderr, align 8, !tbaa !9
  %31 = load ptr, ptr %10, align 8, !tbaa !9
  %32 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %30, ptr noundef nonnull @.str.14, ptr noundef %31) #5
  tail call void @exit(i32 noundef 1) #6
  unreachable

33:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #7
  %34 = tail call i64 @ftello64(ptr noundef nonnull %12)
  store i64 %34, ptr %2, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #7
  %35 = icmp slt i64 %34, 0
  br i1 %35, label %36, label %40

36:                                               ; preds = %33
  %37 = load ptr, ptr @stderr, align 8, !tbaa !9
  %38 = load ptr, ptr %10, align 8, !tbaa !9
  %39 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %37, ptr noundef nonnull @.str.14, ptr noundef %38) #5
  tail call void @exit(i32 noundef 1) #6
  unreachable

40:                                               ; preds = %33
  %41 = tail call i32 @fseeko64(ptr noundef nonnull %12, i64 noundef 0, i32 noundef 0)
  %.not30 = icmp eq i32 %41, 0
  br i1 %.not30, label %46, label %42

42:                                               ; preds = %40
  %43 = load ptr, ptr @stderr, align 8, !tbaa !9
  %44 = load ptr, ptr %10, align 8, !tbaa !9
  %45 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %43, ptr noundef nonnull @.str.14, ptr noundef %44) #5
  tail call void @exit(i32 noundef 1) #6
  unreachable

46:                                               ; preds = %40
  %47 = load i32, ptr @paramBlockSize, align 4, !tbaa !5
  %48 = sext i32 %47 to i64
  %49 = icmp slt i64 %34, %48
  br i1 %49, label %50, label %52

50:                                               ; preds = %46
  %51 = trunc i64 %34 to i32
  store i32 %51, ptr @paramBlockSize, align 4, !tbaa !5
  br label %52

52:                                               ; preds = %50, %46
  %53 = tail call i64 @fwrite(ptr noundef nonnull @bscFileSign, i64 noundef 4, i64 noundef 1, ptr noundef nonnull %21)
  %.not31 = icmp eq i64 %53, 1
  br i1 %.not31, label %58, label %54

54:                                               ; preds = %52
  %55 = load ptr, ptr @stderr, align 8, !tbaa !9
  %56 = load ptr, ptr %19, align 8, !tbaa !9
  %57 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %55, ptr noundef nonnull @.str.14, ptr noundef %56) #5
  tail call void @exit(i32 noundef 1) #6
  unreachable

58:                                               ; preds = %52
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #7
  %59 = load i32, ptr @paramBlockSize, align 4, !tbaa !5
  %60 = icmp sgt i32 %59, 0
  br i1 %60, label %61, label %67

61:                                               ; preds = %58
  %62 = zext nneg i32 %59 to i64
  %63 = add nsw i64 %62, -1
  %64 = add nuw i64 %63, %34
  %65 = sdiv i64 %64, %62
  %66 = trunc i64 %65 to i32
  br label %67

67:                                               ; preds = %58, %61
  %68 = phi i32 [ %66, %61 ], [ 0, %58 ]
  store i32 %68, ptr %4, align 4, !tbaa !5
  %69 = call i64 @fwrite(ptr noundef nonnull %4, i64 noundef 4, i64 noundef 1, ptr noundef nonnull %21)
  %.not32 = icmp eq i64 %69, 1
  br i1 %.not32, label %74, label %70

70:                                               ; preds = %67
  %71 = load ptr, ptr @stderr, align 8, !tbaa !9
  %72 = load ptr, ptr %19, align 8, !tbaa !9
  %73 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %71, ptr noundef nonnull @.str.14, ptr noundef %72) #5
  tail call void @exit(i32 noundef 1) #6
  unreachable

74:                                               ; preds = %67
  store i64 8, ptr %3, align 8, !tbaa !11
  %75 = tail call noundef double @_Z9BSC_CLOCKv()
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #7
  store i32 0, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #7
  store i32 0, ptr %6, align 4, !tbaa !5
  %76 = load ptr, ptr %10, align 8, !tbaa !9
  %77 = getelementptr inbounds i8, ptr %0, i64 32
  %78 = load ptr, ptr %77, align 8, !tbaa !9
  call void @_Z15compression_ompPcP8_IO_FILERlS_S1_S2_RiS3_(ptr noundef %76, ptr noundef nonnull %12, ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef %78, ptr noundef nonnull %21, ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %79 = call noundef double @_Z9BSC_CLOCKv()
  %80 = fsub double %79, %75
  %81 = load ptr, ptr @stdout, align 8, !tbaa !9
  %82 = load ptr, ptr %10, align 8, !tbaa !9
  %83 = load i64, ptr %2, align 8, !tbaa !11
  %84 = sitofp i64 %83 to double
  %85 = load i64, ptr %3, align 8, !tbaa !11
  %86 = sitofp i64 %85 to double
  %87 = fdiv double %84, 1.000000e+06
  %88 = fdiv double %87, %80
  %89 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %81, ptr noundef nonnull @.str.15, ptr noundef %82, double noundef %84, double noundef %86, double noundef %80, double noundef %88) #7
  %90 = call i32 @fclose(ptr noundef nonnull %12)
  %91 = call i32 @fclose(ptr noundef nonnull %21)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #7
  ret void
}

; Function Attrs: nofree nounwind
declare noalias noundef ptr @fopen(ptr nocapture noundef readonly, ptr nocapture noundef readonly) local_unnamed_addr #3

; Function Attrs: nofree nounwind
declare noundef i32 @fclose(ptr nocapture noundef) local_unnamed_addr #3

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { 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 #4 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { cold nounwind }
attributes #6 = { noreturn nounwind }
attributes #7 = { 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, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass