; LLVM IR from a-earthperson/Android-NDK-FileCrypto-AES-CBC :: encrypt (zlib_encrypt)

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

@RAW_in = external hidden global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [20 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local ptr @do_zlib_encrypt(ptr noundef) #0

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

; Function Attrs: nounwind uwtable
define dso_local i64 @zlib_encrypt(ptr noundef %0, ptr noundef %1, i64 noundef %2, ptr noundef %3, i64 noundef %4, i32 noundef %5, i32 noundef %6) #0 {
  %8 = alloca i64, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i64, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i64, align 8
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  %19 = alloca i64, align 8
  %20 = alloca ptr, align 8
  %21 = alloca i32, align 4
  %22 = alloca ptr, align 8
  %23 = alloca ptr, align 8
  %24 = alloca ptr, align 8
  %25 = alloca i64, align 8
  %26 = alloca float, align 4
  store ptr %0, ptr %9, align 8, !tbaa !5
  store ptr %1, ptr %10, align 8, !tbaa !5
  store i64 %2, ptr %11, align 8, !tbaa !9
  store ptr %3, ptr %12, align 8, !tbaa !5
  store i64 %4, ptr %13, align 8, !tbaa !9
  store i32 %5, ptr %14, align 4, !tbaa !11
  store i32 %6, ptr %15, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  store i64 12, ptr %16, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  %27 = load i64, ptr %11, align 8, !tbaa !9
  %28 = srem i64 %27, 12
  store i64 %28, ptr %17, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  %29 = load i64, ptr %11, align 8, !tbaa !9
  %30 = sdiv i64 %29, 12
  store i64 %30, ptr %18, align 8, !tbaa !9
  %31 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, i64 noundef 12)
  %32 = load ptr, ptr %10, align 8, !tbaa !5
  store ptr %32, ptr @RAW_in, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #6
  %33 = call noalias ptr @calloc(i64 noundef 12, i64 noundef 56) #7
  store ptr %33, ptr %20, align 8, !tbaa !5
  %34 = load ptr, ptr %20, align 8, !tbaa !5
  %35 = icmp eq ptr %34, null
  br i1 %35, label %36, label %37

36:                                               ; preds = %7
  store i64 -1, ptr %8, align 8
  store i32 1, ptr %21, align 4
  br label %166

37:                                               ; preds = %7
  %38 = call ptr @llvm.stacksave.p0()
  store ptr %38, ptr %22, align 8
  %39 = alloca i64, i64 12, align 16
  store i64 0, ptr %19, align 8, !tbaa !9
  br label %40

40:                                               ; preds = %96, %37
  %41 = load i64, ptr %19, align 8, !tbaa !9
  %42 = icmp slt i64 %41, 12
  br i1 %42, label %43, label %99

43:                                               ; preds = %40
  %44 = load i64, ptr %19, align 8, !tbaa !9
  %45 = load ptr, ptr %20, align 8, !tbaa !5
  %46 = load i64, ptr %19, align 8, !tbaa !9
  %47 = getelementptr inbounds %struct.params, ptr %45, i64 %46
  %48 = getelementptr inbounds %struct.params, ptr %47, i32 0, i32 0
  store i64 %44, ptr %48, align 8, !tbaa !13
  %49 = load i32, ptr %15, align 4, !tbaa !11
  %50 = load ptr, ptr %20, align 8, !tbaa !5
  %51 = load i64, ptr %19, align 8, !tbaa !9
  %52 = getelementptr inbounds %struct.params, ptr %50, i64 %51
  %53 = getelementptr inbounds %struct.params, ptr %52, i32 0, i32 3
  store i32 %49, ptr %53, align 8, !tbaa !15
  %54 = load i64, ptr %18, align 8, !tbaa !9
  %55 = load i64, ptr %19, align 8, !tbaa !9
  %56 = icmp eq i64 %55, 0
  br i1 %56, label %57, label %59

57:                                               ; preds = %43
  %58 = load i64, ptr %17, align 8, !tbaa !9
  br label %60

59:                                               ; preds = %43
  br label %60

60:                                               ; preds = %59, %57
  %61 = phi i64 [ %58, %57 ], [ 0, %59 ]
  %62 = add nsw i64 %54, %61
  %63 = load ptr, ptr %20, align 8, !tbaa !5
  %64 = load i64, ptr %19, align 8, !tbaa !9
  %65 = getelementptr inbounds %struct.params, ptr %63, i64 %64
  %66 = getelementptr inbounds %struct.params, ptr %65, i32 0, i32 2
  store i64 %62, ptr %66, align 8, !tbaa !16
  %67 = load i64, ptr %19, align 8, !tbaa !9
  %68 = icmp eq i64 %67, 0
  br i1 %68, label %69, label %70

69:                                               ; preds = %60
  br label %81

70:                                               ; preds = %60
  %71 = load i64, ptr %19, align 8, !tbaa !9
  %72 = load ptr, ptr %20, align 8, !tbaa !5
  %73 = load i64, ptr %19, align 8, !tbaa !9
  %74 = getelementptr inbounds %struct.params, ptr %72, i64 %73
  %75 = getelementptr inbounds %struct.params, ptr %74, i32 0, i32 2
  %76 = load i64, ptr %75, align 8, !tbaa !16
  %77 = mul nsw i64 %71, %76
  %78 = load i64, ptr %17, align 8, !tbaa !9
  %79 = add nsw i64 %77, %78
  %80 = add nsw i64 %79, 1
  br label %81

81:                                               ; preds = %70, %69
  %82 = phi i64 [ 0, %69 ], [ %80, %70 ]
  %83 = load ptr, ptr %20, align 8, !tbaa !5
  %84 = load i64, ptr %19, align 8, !tbaa !9
  %85 = getelementptr inbounds %struct.params, ptr %83, i64 %84
  %86 = getelementptr inbounds %struct.params, ptr %85, i32 0, i32 1
  store i64 %82, ptr %86, align 8, !tbaa !17
  %87 = load i64, ptr %19, align 8, !tbaa !9
  %88 = getelementptr inbounds i64, ptr %39, i64 %87
  %89 = load ptr, ptr %20, align 8, !tbaa !5
  %90 = load i64, ptr %19, align 8, !tbaa !9
  %91 = getelementptr inbounds %struct.params, ptr %89, i64 %90
  %92 = call i32 @pthread_create(ptr noundef %88, ptr noundef null, ptr noundef @do_zlib_encrypt, ptr noundef %91) #6
  %93 = icmp ne i32 %92, 0
  br i1 %93, label %94, label %95

94:                                               ; preds = %81
  store i64 -1, ptr %8, align 8
  store i32 1, ptr %21, align 4
  br label %164

95:                                               ; preds = %81
  br label %96

96:                                               ; preds = %95
  %97 = load i64, ptr %19, align 8, !tbaa !9
  %98 = add nsw i64 %97, 1
  store i64 %98, ptr %19, align 8, !tbaa !9
  br label %40, !llvm.loop !18

99:                                               ; preds = %40
  store i64 0, ptr %19, align 8, !tbaa !9
  br label %100

100:                                              ; preds = %108, %99
  %101 = load i64, ptr %19, align 8, !tbaa !9
  %102 = icmp slt i64 %101, 12
  br i1 %102, label %103, label %111

103:                                              ; preds = %100
  %104 = load i64, ptr %19, align 8, !tbaa !9
  %105 = getelementptr inbounds i64, ptr %39, i64 %104
  %106 = load i64, ptr %105, align 8, !tbaa !9
  %107 = call i32 @pthread_join(i64 noundef %106, ptr noundef null)
  br label %108

108:                                              ; preds = %103
  %109 = load i64, ptr %19, align 8, !tbaa !9
  %110 = add nsw i64 %109, 1
  store i64 %110, ptr %19, align 8, !tbaa !9
  br label %100, !llvm.loop !20

111:                                              ; preds = %100
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #6
  %112 = load i32, ptr %14, align 4, !tbaa !11
  %113 = icmp ne i32 %112, 0
  %114 = zext i1 %113 to i64
  %115 = select i1 %113, ptr @.str.2, ptr @.str.3
  store ptr %115, ptr %23, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #6
  %116 = load ptr, ptr %9, align 8, !tbaa !5
  %117 = load ptr, ptr %23, align 8, !tbaa !5
  %118 = call noalias ptr @fopen(ptr noundef %116, ptr noundef %117)
  store ptr %118, ptr %24, align 8, !tbaa !5
  %119 = load ptr, ptr %24, align 8, !tbaa !5
  %120 = icmp eq ptr %119, null
  br i1 %120, label %121, label %122

121:                                              ; preds = %111
  store i64 -1, ptr %8, align 8
  store i32 1, ptr %21, align 4
  br label %163

122:                                              ; preds = %111
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #6
  store i64 0, ptr %25, align 8, !tbaa !9
  store i64 0, ptr %19, align 8, !tbaa !9
  br label %123

123:                                              ; preds = %141, %122
  %124 = load i64, ptr %19, align 8, !tbaa !9
  %125 = icmp slt i64 %124, 12
  br i1 %125, label %126, label %144

126:                                              ; preds = %123
  %127 = load ptr, ptr %20, align 8, !tbaa !5
  %128 = load i64, ptr %19, align 8, !tbaa !9
  %129 = getelementptr inbounds %struct.params, ptr %127, i64 %128
  %130 = getelementptr inbounds %struct.params, ptr %129, i32 0, i32 6
  %131 = load ptr, ptr %130, align 8, !tbaa !21
  %132 = load ptr, ptr %20, align 8, !tbaa !5
  %133 = load i64, ptr %19, align 8, !tbaa !9
  %134 = getelementptr inbounds %struct.params, ptr %132, i64 %133
  %135 = getelementptr inbounds %struct.params, ptr %134, i32 0, i32 4
  %136 = load i64, ptr %135, align 8, !tbaa !22
  %137 = load ptr, ptr %24, align 8, !tbaa !5
  %138 = call i64 @fwrite(ptr noundef %131, i64 noundef 1, i64 noundef %136, ptr noundef %137)
  %139 = load i64, ptr %25, align 8, !tbaa !9
  %140 = add i64 %139, %138
  store i64 %140, ptr %25, align 8, !tbaa !9
  br label %141

141:                                              ; preds = %126
  %142 = load i64, ptr %19, align 8, !tbaa !9
  %143 = add nsw i64 %142, 1
  store i64 %143, ptr %19, align 8, !tbaa !9
  br label %123, !llvm.loop !23

144:                                              ; preds = %123
  %145 = load ptr, ptr %20, align 8, !tbaa !5
  call void @free(ptr noundef %145) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #6
  %146 = load i64, ptr %25, align 8, !tbaa !9
  %147 = sitofp i64 %146 to float
  %148 = fmul float 1.000000e+02, %147
  %149 = load i64, ptr %11, align 8, !tbaa !9
  %150 = sitofp i64 %149 to float
  %151 = fdiv float %148, %150
  store float %151, ptr %26, align 4, !tbaa !24
  %152 = load ptr, ptr %9, align 8, !tbaa !5
  %153 = load i64, ptr %25, align 8, !tbaa !9
  %154 = call i32 (ptr, ...) @printf(ptr noundef @.str.4, ptr noundef %152, i64 noundef %153)
  %155 = load float, ptr %26, align 4, !tbaa !24
  %156 = fpext float %155 to double
  %157 = call i32 (ptr, ...) @printf(ptr noundef @.str.5, double noundef %156)
  %158 = load i64, ptr %25, align 8, !tbaa !9
  %159 = call i32 (ptr, ...) @printf(ptr noundef @.str.6, i64 noundef %158)
  %160 = load i64, ptr %11, align 8, !tbaa !9
  %161 = call i32 (ptr, ...) @printf(ptr noundef @.str.7, i64 noundef %160)
  %162 = load i64, ptr %25, align 8, !tbaa !9
  store i64 %162, ptr %8, align 8
  store i32 1, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #6
  br label %163

163:                                              ; preds = %144, %121
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #6
  br label %164

164:                                              ; preds = %163, %94
  %165 = load ptr, ptr %22, align 8
  call void @llvm.stackrestore.p0(ptr %165)
  br label %166

166:                                              ; preds = %164, %36
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  %167 = load i64, ptr %8, align 8
  ret i64 %167
}

declare i32 @printf(ptr noundef, ...) #2

; Function Attrs: nounwind allocsize(0,1)
declare noalias ptr @calloc(i64 noundef, i64 noundef) #3

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #4

; Function Attrs: nounwind
declare i32 @pthread_create(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #5

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

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

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

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

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

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #4

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

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

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

@RAW_in = external hidden local_unnamed_addr global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [20 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local ptr @do_zlib_encrypt(ptr noundef) #0

; Function Attrs: nounwind uwtable
define dso_local noundef i64 @zlib_encrypt(ptr noundef %0, ptr noundef %1, i64 noundef %2, ptr nocapture noundef readnone %3, i64 noundef %4, i32 noundef %5, i32 noundef %6) local_unnamed_addr #0 {
  %8 = sdiv i64 %2, 12
  %9 = srem i64 %2, 12
  %10 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef 12)
  store ptr %1, ptr @RAW_in, align 8, !tbaa !5
  %11 = tail call noalias dereferenceable_or_null(672) ptr @calloc(i64 noundef 12, i64 noundef 56) #7
  %12 = icmp eq ptr %11, null
  br i1 %12, label %227, label %13

13:                                               ; preds = %7
  %14 = tail call ptr @llvm.stacksave.p0()
  %15 = alloca [12 x i64], align 16
  %16 = add nsw i64 %9, 1
  store i64 0, ptr %11, align 8, !tbaa !9
  %17 = getelementptr inbounds i8, ptr %11, i64 24
  store i32 %6, ptr %17, align 8, !tbaa !13
  %18 = add nsw i64 %9, %8
  %19 = getelementptr inbounds i8, ptr %11, i64 16
  store i64 %18, ptr %19, align 8, !tbaa !14
  %20 = getelementptr inbounds i8, ptr %11, i64 8
  store i64 0, ptr %20, align 8, !tbaa !15
  %21 = call i32 @pthread_create(ptr noundef nonnull %15, ptr noundef null, ptr noundef nonnull @do_zlib_encrypt, ptr noundef nonnull %11) #8
  %.not58 = icmp eq i32 %21, 0
  br i1 %.not58, label %22, label %.loopexit

22:                                               ; preds = %13
  %23 = getelementptr inbounds i8, ptr %11, i64 56
  store i64 1, ptr %23, align 8, !tbaa !9
  %24 = getelementptr inbounds i8, ptr %11, i64 80
  store i32 %6, ptr %24, align 8, !tbaa !13
  %25 = getelementptr inbounds i8, ptr %11, i64 72
  store i64 %8, ptr %25, align 8, !tbaa !14
  %26 = add nsw i64 %16, %8
  %27 = getelementptr inbounds i8, ptr %11, i64 64
  store i64 %26, ptr %27, align 8, !tbaa !15
  %28 = getelementptr inbounds i8, ptr %15, i64 8
  %29 = call i32 @pthread_create(ptr noundef nonnull %28, ptr noundef null, ptr noundef nonnull @do_zlib_encrypt, ptr noundef nonnull %23) #8
  %.not58.1 = icmp eq i32 %29, 0
  br i1 %.not58.1, label %30, label %.loopexit

30:                                               ; preds = %22
  %31 = getelementptr inbounds i8, ptr %11, i64 112
  store i64 2, ptr %31, align 8, !tbaa !9
  %32 = getelementptr inbounds i8, ptr %11, i64 136
  store i32 %6, ptr %32, align 8, !tbaa !13
  %33 = getelementptr inbounds i8, ptr %11, i64 128
  store i64 %8, ptr %33, align 8, !tbaa !14
  %34 = shl nsw i64 %8, 1
  %35 = add nsw i64 %16, %34
  %36 = getelementptr inbounds i8, ptr %11, i64 120
  store i64 %35, ptr %36, align 8, !tbaa !15
  %37 = getelementptr inbounds i8, ptr %15, i64 16
  %38 = call i32 @pthread_create(ptr noundef nonnull %37, ptr noundef null, ptr noundef nonnull @do_zlib_encrypt, ptr noundef nonnull %31) #8
  %.not58.2 = icmp eq i32 %38, 0
  br i1 %.not58.2, label %39, label %.loopexit

39:                                               ; preds = %30
  %40 = getelementptr inbounds i8, ptr %11, i64 168
  store i64 3, ptr %40, align 8, !tbaa !9
  %41 = getelementptr inbounds i8, ptr %11, i64 192
  store i32 %6, ptr %41, align 8, !tbaa !13
  %42 = getelementptr inbounds i8, ptr %11, i64 184
  store i64 %8, ptr %42, align 8, !tbaa !14
  %43 = mul nsw i64 %8, 3
  %44 = add nsw i64 %16, %43
  %45 = getelementptr inbounds i8, ptr %11, i64 176
  store i64 %44, ptr %45, align 8, !tbaa !15
  %46 = getelementptr inbounds i8, ptr %15, i64 24
  %47 = call i32 @pthread_create(ptr noundef nonnull %46, ptr noundef null, ptr noundef nonnull @do_zlib_encrypt, ptr noundef nonnull %40) #8
  %.not58.3 = icmp eq i32 %47, 0
  br i1 %.not58.3, label %48, label %.loopexit

48:                                               ; preds = %39
  %49 = getelementptr inbounds i8, ptr %11, i64 224
  store i64 4, ptr %49, align 8, !tbaa !9
  %50 = getelementptr inbounds i8, ptr %11, i64 248
  store i32 %6, ptr %50, align 8, !tbaa !13
  %51 = getelementptr inbounds i8, ptr %11, i64 240
  store i64 %8, ptr %51, align 8, !tbaa !14
  %52 = shl nsw i64 %8, 2
  %53 = add nsw i64 %16, %52
  %54 = getelementptr inbounds i8, ptr %11, i64 232
  store i64 %53, ptr %54, align 8, !tbaa !15
  %55 = getelementptr inbounds i8, ptr %15, i64 32
  %56 = call i32 @pthread_create(ptr noundef nonnull %55, ptr noundef null, ptr noundef nonnull @do_zlib_encrypt, ptr noundef nonnull %49) #8
  %.not58.4 = icmp eq i32 %56, 0
  br i1 %.not58.4, label %57, label %.loopexit

57:                                               ; preds = %48
  %58 = getelementptr inbounds i8, ptr %11, i64 280
  store i64 5, ptr %58, align 8, !tbaa !9
  %59 = getelementptr inbounds i8, ptr %11, i64 304
  store i32 %6, ptr %59, align 8, !tbaa !13
  %60 = getelementptr inbounds i8, ptr %11, i64 296
  store i64 %8, ptr %60, align 8, !tbaa !14
  %61 = mul nsw i64 %8, 5
  %62 = add nsw i64 %16, %61
  %63 = getelementptr inbounds i8, ptr %11, i64 288
  store i64 %62, ptr %63, align 8, !tbaa !15
  %64 = getelementptr inbounds i8, ptr %15, i64 40
  %65 = call i32 @pthread_create(ptr noundef nonnull %64, ptr noundef null, ptr noundef nonnull @do_zlib_encrypt, ptr noundef nonnull %58) #8
  %.not58.5 = icmp eq i32 %65, 0
  br i1 %.not58.5, label %66, label %.loopexit

66:                                               ; preds = %57
  %67 = getelementptr inbounds i8, ptr %11, i64 336
  store i64 6, ptr %67, align 8, !tbaa !9
  %68 = getelementptr inbounds i8, ptr %11, i64 360
  store i32 %6, ptr %68, align 8, !tbaa !13
  %69 = getelementptr inbounds i8, ptr %11, i64 352
  store i64 %8, ptr %69, align 8, !tbaa !14
  %70 = mul nsw i64 %8, 6
  %71 = add nsw i64 %16, %70
  %72 = getelementptr inbounds i8, ptr %11, i64 344
  store i64 %71, ptr %72, align 8, !tbaa !15
  %73 = getelementptr inbounds i8, ptr %15, i64 48
  %74 = call i32 @pthread_create(ptr noundef nonnull %73, ptr noundef null, ptr noundef nonnull @do_zlib_encrypt, ptr noundef nonnull %67) #8
  %.not58.6 = icmp eq i32 %74, 0
  br i1 %.not58.6, label %75, label %.loopexit

75:                                               ; preds = %66
  %76 = getelementptr inbounds i8, ptr %11, i64 392
  store i64 7, ptr %76, align 8, !tbaa !9
  %77 = getelementptr inbounds i8, ptr %11, i64 416
  store i32 %6, ptr %77, align 8, !tbaa !13
  %78 = getelementptr inbounds i8, ptr %11, i64 408
  store i64 %8, ptr %78, align 8, !tbaa !14
  %79 = mul nsw i64 %8, 7
  %80 = add nsw i64 %16, %79
  %81 = getelementptr inbounds i8, ptr %11, i64 400
  store i64 %80, ptr %81, align 8, !tbaa !15
  %82 = getelementptr inbounds i8, ptr %15, i64 56
  %83 = call i32 @pthread_create(ptr noundef nonnull %82, ptr noundef null, ptr noundef nonnull @do_zlib_encrypt, ptr noundef nonnull %76) #8
  %.not58.7 = icmp eq i32 %83, 0
  br i1 %.not58.7, label %84, label %.loopexit

84:                                               ; preds = %75
  %85 = getelementptr inbounds i8, ptr %11, i64 448
  store i64 8, ptr %85, align 8, !tbaa !9
  %86 = getelementptr inbounds i8, ptr %11, i64 472
  store i32 %6, ptr %86, align 8, !tbaa !13
  %87 = getelementptr inbounds i8, ptr %11, i64 464
  store i64 %8, ptr %87, align 8, !tbaa !14
  %88 = shl nsw i64 %8, 3
  %89 = add nsw i64 %16, %88
  %90 = getelementptr inbounds i8, ptr %11, i64 456
  store i64 %89, ptr %90, align 8, !tbaa !15
  %91 = getelementptr inbounds i8, ptr %15, i64 64
  %92 = call i32 @pthread_create(ptr noundef nonnull %91, ptr noundef null, ptr noundef nonnull @do_zlib_encrypt, ptr noundef nonnull %85) #8
  %.not58.8 = icmp eq i32 %92, 0
  br i1 %.not58.8, label %93, label %.loopexit

93:                                               ; preds = %84
  %94 = getelementptr inbounds i8, ptr %11, i64 504
  store i64 9, ptr %94, align 8, !tbaa !9
  %95 = getelementptr inbounds i8, ptr %11, i64 528
  store i32 %6, ptr %95, align 8, !tbaa !13
  %96 = getelementptr inbounds i8, ptr %11, i64 520
  store i64 %8, ptr %96, align 8, !tbaa !14
  %97 = mul nsw i64 %8, 9
  %98 = add nsw i64 %16, %97
  %99 = getelementptr inbounds i8, ptr %11, i64 512
  store i64 %98, ptr %99, align 8, !tbaa !15
  %100 = getelementptr inbounds i8, ptr %15, i64 72
  %101 = call i32 @pthread_create(ptr noundef nonnull %100, ptr noundef null, ptr noundef nonnull @do_zlib_encrypt, ptr noundef nonnull %94) #8
  %.not58.9 = icmp eq i32 %101, 0
  br i1 %.not58.9, label %102, label %.loopexit

102:                                              ; preds = %93
  %103 = getelementptr inbounds i8, ptr %11, i64 560
  store i64 10, ptr %103, align 8, !tbaa !9
  %104 = getelementptr inbounds i8, ptr %11, i64 584
  store i32 %6, ptr %104, align 8, !tbaa !13
  %105 = getelementptr inbounds i8, ptr %11, i64 576
  store i64 %8, ptr %105, align 8, !tbaa !14
  %106 = mul nsw i64 %8, 10
  %107 = add nsw i64 %16, %106
  %108 = getelementptr inbounds i8, ptr %11, i64 568
  store i64 %107, ptr %108, align 8, !tbaa !15
  %109 = getelementptr inbounds i8, ptr %15, i64 80
  %110 = call i32 @pthread_create(ptr noundef nonnull %109, ptr noundef null, ptr noundef nonnull @do_zlib_encrypt, ptr noundef nonnull %103) #8
  %.not58.10 = icmp eq i32 %110, 0
  br i1 %.not58.10, label %111, label %.loopexit

111:                                              ; preds = %102
  %112 = getelementptr inbounds i8, ptr %11, i64 616
  store i64 11, ptr %112, align 8, !tbaa !9
  %113 = getelementptr inbounds i8, ptr %11, i64 640
  store i32 %6, ptr %113, align 8, !tbaa !13
  %114 = getelementptr inbounds i8, ptr %11, i64 632
  store i64 %8, ptr %114, align 8, !tbaa !14
  %115 = mul nsw i64 %8, 11
  %116 = add nsw i64 %16, %115
  %117 = getelementptr inbounds i8, ptr %11, i64 624
  store i64 %116, ptr %117, align 8, !tbaa !15
  %118 = getelementptr inbounds i8, ptr %15, i64 88
  %119 = call i32 @pthread_create(ptr noundef nonnull %118, ptr noundef null, ptr noundef nonnull @do_zlib_encrypt, ptr noundef nonnull %112) #8
  %.not58.11 = icmp eq i32 %119, 0
  br i1 %.not58.11, label %.preheader59.preheader, label %.loopexit

.preheader59.preheader:                           ; preds = %111
  %120 = load i64, ptr %15, align 16, !tbaa !16
  %121 = call i32 @pthread_join(i64 noundef %120, ptr noundef null) #8
  %122 = load i64, ptr %28, align 8, !tbaa !16
  %123 = call i32 @pthread_join(i64 noundef %122, ptr noundef null) #8
  %124 = load i64, ptr %37, align 16, !tbaa !16
  %125 = call i32 @pthread_join(i64 noundef %124, ptr noundef null) #8
  %126 = load i64, ptr %46, align 8, !tbaa !16
  %127 = call i32 @pthread_join(i64 noundef %126, ptr noundef null) #8
  %128 = load i64, ptr %55, align 16, !tbaa !16
  %129 = call i32 @pthread_join(i64 noundef %128, ptr noundef null) #8
  %130 = load i64, ptr %64, align 8, !tbaa !16
  %131 = call i32 @pthread_join(i64 noundef %130, ptr noundef null) #8
  %132 = load i64, ptr %73, align 16, !tbaa !16
  %133 = call i32 @pthread_join(i64 noundef %132, ptr noundef null) #8
  %134 = load i64, ptr %82, align 8, !tbaa !16
  %135 = call i32 @pthread_join(i64 noundef %134, ptr noundef null) #8
  %136 = load i64, ptr %91, align 16, !tbaa !16
  %137 = call i32 @pthread_join(i64 noundef %136, ptr noundef null) #8
  %138 = load i64, ptr %100, align 8, !tbaa !16
  %139 = call i32 @pthread_join(i64 noundef %138, ptr noundef null) #8
  %140 = load i64, ptr %109, align 16, !tbaa !16
  %141 = call i32 @pthread_join(i64 noundef %140, ptr noundef null) #8
  %142 = load i64, ptr %118, align 8, !tbaa !16
  %143 = call i32 @pthread_join(i64 noundef %142, ptr noundef null) #8
  %.not = icmp eq i32 %5, 0
  %144 = select i1 %.not, ptr @.str.3, ptr @.str.2
  %145 = call noalias ptr @fopen(ptr noundef %0, ptr noundef nonnull %144)
  %146 = icmp eq ptr %145, null
  br i1 %146, label %.loopexit, label %.preheader.preheader

.preheader.preheader:                             ; preds = %.preheader59.preheader
  %147 = getelementptr inbounds i8, ptr %11, i64 48
  %148 = load ptr, ptr %147, align 8, !tbaa !17
  %149 = getelementptr inbounds i8, ptr %11, i64 32
  %150 = load i64, ptr %149, align 8, !tbaa !18
  %151 = call i64 @fwrite(ptr noundef %148, i64 noundef 1, i64 noundef %150, ptr noundef nonnull %145)
  %152 = getelementptr inbounds i8, ptr %11, i64 104
  %153 = load ptr, ptr %152, align 8, !tbaa !17
  %154 = getelementptr inbounds i8, ptr %11, i64 88
  %155 = load i64, ptr %154, align 8, !tbaa !18
  %156 = call i64 @fwrite(ptr noundef %153, i64 noundef 1, i64 noundef %155, ptr noundef nonnull %145)
  %157 = add i64 %156, %151
  %158 = getelementptr inbounds i8, ptr %11, i64 160
  %159 = load ptr, ptr %158, align 8, !tbaa !17
  %160 = getelementptr inbounds i8, ptr %11, i64 144
  %161 = load i64, ptr %160, align 8, !tbaa !18
  %162 = call i64 @fwrite(ptr noundef %159, i64 noundef 1, i64 noundef %161, ptr noundef nonnull %145)
  %163 = add i64 %162, %157
  %164 = getelementptr inbounds i8, ptr %11, i64 216
  %165 = load ptr, ptr %164, align 8, !tbaa !17
  %166 = getelementptr inbounds i8, ptr %11, i64 200
  %167 = load i64, ptr %166, align 8, !tbaa !18
  %168 = call i64 @fwrite(ptr noundef %165, i64 noundef 1, i64 noundef %167, ptr noundef nonnull %145)
  %169 = add i64 %168, %163
  %170 = getelementptr inbounds i8, ptr %11, i64 272
  %171 = load ptr, ptr %170, align 8, !tbaa !17
  %172 = getelementptr inbounds i8, ptr %11, i64 256
  %173 = load i64, ptr %172, align 8, !tbaa !18
  %174 = call i64 @fwrite(ptr noundef %171, i64 noundef 1, i64 noundef %173, ptr noundef nonnull %145)
  %175 = add i64 %174, %169
  %176 = getelementptr inbounds i8, ptr %11, i64 328
  %177 = load ptr, ptr %176, align 8, !tbaa !17
  %178 = getelementptr inbounds i8, ptr %11, i64 312
  %179 = load i64, ptr %178, align 8, !tbaa !18
  %180 = call i64 @fwrite(ptr noundef %177, i64 noundef 1, i64 noundef %179, ptr noundef nonnull %145)
  %181 = add i64 %180, %175
  %182 = getelementptr inbounds i8, ptr %11, i64 384
  %183 = load ptr, ptr %182, align 8, !tbaa !17
  %184 = getelementptr inbounds i8, ptr %11, i64 368
  %185 = load i64, ptr %184, align 8, !tbaa !18
  %186 = call i64 @fwrite(ptr noundef %183, i64 noundef 1, i64 noundef %185, ptr noundef nonnull %145)
  %187 = add i64 %186, %181
  %188 = getelementptr inbounds i8, ptr %11, i64 440
  %189 = load ptr, ptr %188, align 8, !tbaa !17
  %190 = getelementptr inbounds i8, ptr %11, i64 424
  %191 = load i64, ptr %190, align 8, !tbaa !18
  %192 = call i64 @fwrite(ptr noundef %189, i64 noundef 1, i64 noundef %191, ptr noundef nonnull %145)
  %193 = add i64 %192, %187
  %194 = getelementptr inbounds i8, ptr %11, i64 496
  %195 = load ptr, ptr %194, align 8, !tbaa !17
  %196 = getelementptr inbounds i8, ptr %11, i64 480
  %197 = load i64, ptr %196, align 8, !tbaa !18
  %198 = call i64 @fwrite(ptr noundef %195, i64 noundef 1, i64 noundef %197, ptr noundef nonnull %145)
  %199 = add i64 %198, %193
  %200 = getelementptr inbounds i8, ptr %11, i64 552
  %201 = load ptr, ptr %200, align 8, !tbaa !17
  %202 = getelementptr inbounds i8, ptr %11, i64 536
  %203 = load i64, ptr %202, align 8, !tbaa !18
  %204 = call i64 @fwrite(ptr noundef %201, i64 noundef 1, i64 noundef %203, ptr noundef nonnull %145)
  %205 = add i64 %204, %199
  %206 = getelementptr inbounds i8, ptr %11, i64 608
  %207 = load ptr, ptr %206, align 8, !tbaa !17
  %208 = getelementptr inbounds i8, ptr %11, i64 592
  %209 = load i64, ptr %208, align 8, !tbaa !18
  %210 = call i64 @fwrite(ptr noundef %207, i64 noundef 1, i64 noundef %209, ptr noundef nonnull %145)
  %211 = add i64 %210, %205
  %212 = getelementptr inbounds i8, ptr %11, i64 664
  %213 = load ptr, ptr %212, align 8, !tbaa !17
  %214 = getelementptr inbounds i8, ptr %11, i64 648
  %215 = load i64, ptr %214, align 8, !tbaa !18
  %216 = call i64 @fwrite(ptr noundef %213, i64 noundef 1, i64 noundef %215, ptr noundef nonnull %145)
  %217 = add i64 %216, %211
  call void @free(ptr noundef nonnull %11) #8
  %218 = sitofp i64 %217 to float
  %219 = fmul float %218, 1.000000e+02
  %220 = sitofp i64 %2 to float
  %221 = fdiv float %219, %220
  %222 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, ptr noundef %0, i64 noundef %217)
  %223 = fpext float %221 to double
  %224 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, double noundef %223)
  %225 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i64 noundef %217)
  %226 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i64 noundef %2)
  br label %.loopexit

.loopexit:                                        ; preds = %13, %22, %30, %39, %48, %57, %66, %75, %84, %93, %102, %111, %.preheader.preheader, %.preheader59.preheader
  %.1 = phi i64 [ %217, %.preheader.preheader ], [ -1, %.preheader59.preheader ], [ -1, %111 ], [ -1, %102 ], [ -1, %93 ], [ -1, %84 ], [ -1, %75 ], [ -1, %66 ], [ -1, %57 ], [ -1, %48 ], [ -1, %39 ], [ -1, %30 ], [ -1, %22 ], [ -1, %13 ]
  call void @llvm.stackrestore.p0(ptr %14)
  br label %227

227:                                              ; preds = %7, %.loopexit
  %.2 = phi i64 [ %.1, %.loopexit ], [ -1, %7 ]
  ret i64 %.2
}

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

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @calloc(i64 noundef, i64 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #3

; Function Attrs: nounwind
declare i32 @pthread_create(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #4

declare i32 @pthread_join(i64 noundef, ptr noundef) local_unnamed_addr #5

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

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

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #3

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { 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 nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nocallback nofree nosync nounwind willreturn }
attributes #4 = { 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 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind allocsize(0,1) }
attributes #8 = { 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/C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"", !11, i64 0, !11, i64 8, !11, i64 16, !12, i64 24, !11, i64 32, !11, i64 40, !6, i64 48}
!11 = !{!"long", !7, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!10, !12, i64 24}
!14 = !{!10, !11, i64 16}
!15 = !{!10, !11, i64 8}
!16 = !{!11, !11, i64 0}
!17 = !{!10, !6, i64 48}
!18 = !{!10, !11, i64 32}


; Effective O3 passes: CorrelatedValuePropagationPass,DivRemPairsPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,PostOrderFunctionAttrsPass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass