; LLVM IR from PacktPublishing/Demystifying-Cryptography-with-OpenSSL-3 :: Chapter02 (decrypt)

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

@.str.11 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [18 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: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #1

; Function Attrs: nounwind uwtable
define dso_local i32 @decrypt(ptr noundef %0, ptr noundef %1, ptr noundef %2, i64 noundef %3, ptr noundef %4) #2 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i64, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca i64, align 8
  %19 = alloca i64, align 8
  %20 = alloca i32, align 4
  %21 = alloca i64, align 8
  %22 = alloca i64, align 8
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store i64 %3, ptr %9, align 8, !tbaa !9
  store ptr %4, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 0, ptr %11, align 4, !tbaa !11
  %25 = call ptr @llvm.stacksave.p0()
  store ptr %25, ptr %12, align 8
  %26 = alloca i8, i64 12, align 16
  %27 = alloca i8, i64 16, align 16
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  store ptr null, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  store i64 65536, ptr %14, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  store i64 16, ptr %15, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  %28 = call noalias ptr @malloc(i64 noundef 65536) #7
  store ptr %28, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  %29 = call noalias ptr @malloc(i64 noundef 65552) #7
  store ptr %29, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  %30 = load ptr, ptr %6, align 8, !tbaa !5
  %31 = call i64 @fread(ptr noundef %26, i64 noundef 1, i64 noundef 12, ptr noundef %30)
  store i64 %31, ptr %18, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #6
  %32 = load i64, ptr %18, align 8, !tbaa !9
  store i64 %32, ptr %19, align 8, !tbaa !9
  %33 = call ptr @EVP_CIPHER_CTX_new()
  store ptr %33, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #6
  %34 = load ptr, ptr %13, align 8, !tbaa !5
  %35 = call ptr @EVP_aes_256_gcm()
  %36 = load ptr, ptr %8, align 8, !tbaa !5
  %37 = call i32 @EVP_DecryptInit(ptr noundef %34, ptr noundef %35, ptr noundef %36, ptr noundef %26)
  store i32 %37, ptr %20, align 4, !tbaa !11
  br label %38

38:                                               ; preds = %51, %5
  %39 = load i64, ptr %19, align 8, !tbaa !9
  %40 = load i64, ptr %9, align 8, !tbaa !9
  %41 = icmp ult i64 %39, %40
  br i1 %41, label %42, label %71

42:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #6
  %43 = load i64, ptr %9, align 8, !tbaa !9
  %44 = load i64, ptr %19, align 8, !tbaa !9
  %45 = sub i64 %43, %44
  store i64 %45, ptr %21, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #6
  %46 = load i64, ptr %21, align 8, !tbaa !9
  %47 = icmp ult i64 %46, 65536
  br i1 %47, label %48, label %50

48:                                               ; preds = %42
  %49 = load i64, ptr %21, align 8, !tbaa !9
  br label %51

50:                                               ; preds = %42
  br label %51

51:                                               ; preds = %50, %48
  %52 = phi i64 [ %49, %48 ], [ 65536, %50 ]
  store i64 %52, ptr %22, align 8, !tbaa !9
  %53 = load ptr, ptr %16, align 8, !tbaa !5
  %54 = load i64, ptr %22, align 8, !tbaa !9
  %55 = load ptr, ptr %6, align 8, !tbaa !5
  %56 = call i64 @fread(ptr noundef %53, i64 noundef 1, i64 noundef %54, ptr noundef %55)
  store i64 %56, ptr %18, align 8, !tbaa !9
  %57 = load i64, ptr %18, align 8, !tbaa !9
  %58 = load i64, ptr %19, align 8, !tbaa !9
  %59 = add i64 %58, %57
  store i64 %59, ptr %19, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #6
  store i32 0, ptr %23, align 4, !tbaa !11
  %60 = load ptr, ptr %13, align 8, !tbaa !5
  %61 = load ptr, ptr %17, align 8, !tbaa !5
  %62 = load ptr, ptr %16, align 8, !tbaa !5
  %63 = load i64, ptr %18, align 8, !tbaa !9
  %64 = trunc i64 %63 to i32
  %65 = call i32 @EVP_DecryptUpdate(ptr noundef %60, ptr noundef %61, ptr noundef %23, ptr noundef %62, i32 noundef %64)
  %66 = load ptr, ptr %17, align 8, !tbaa !5
  %67 = load i32, ptr %23, align 4, !tbaa !11
  %68 = sext i32 %67 to i64
  %69 = load ptr, ptr %7, align 8, !tbaa !5
  %70 = call i64 @fwrite(ptr noundef %66, i64 noundef 1, i64 noundef %68, ptr noundef %69)
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  br label %38, !llvm.loop !13

71:                                               ; preds = %38
  %72 = load ptr, ptr %6, align 8, !tbaa !5
  %73 = call i64 @fread(ptr noundef %27, i64 noundef 1, i64 noundef 16, ptr noundef %72)
  store i64 %73, ptr %18, align 8, !tbaa !9
  %74 = load ptr, ptr %13, align 8, !tbaa !5
  %75 = call i32 @EVP_CIPHER_CTX_ctrl(ptr noundef %74, i32 noundef 17, i32 noundef 16, ptr noundef %27)
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #6
  store i32 0, ptr %24, align 4, !tbaa !11
  %76 = load ptr, ptr %13, align 8, !tbaa !5
  %77 = load ptr, ptr %17, align 8, !tbaa !5
  %78 = call i32 @EVP_DecryptFinal(ptr noundef %76, ptr noundef %77, ptr noundef %24)
  store i32 %78, ptr %20, align 4, !tbaa !11
  %79 = load ptr, ptr %17, align 8, !tbaa !5
  %80 = load i32, ptr %24, align 4, !tbaa !11
  %81 = sext i32 %80 to i64
  %82 = load ptr, ptr %7, align 8, !tbaa !5
  %83 = call i64 @fwrite(ptr noundef %79, i64 noundef 1, i64 noundef %81, ptr noundef %82)
  %84 = load ptr, ptr %6, align 8, !tbaa !5
  %85 = call i32 @ferror(ptr noundef %84) #6
  %86 = icmp ne i32 %85, 0
  br i1 %86, label %91, label %87

87:                                               ; preds = %71
  %88 = load ptr, ptr %7, align 8, !tbaa !5
  %89 = call i32 @ferror(ptr noundef %88) #6
  %90 = icmp ne i32 %89, 0
  br i1 %90, label %91, label %98

91:                                               ; preds = %87, %71
  %92 = load ptr, ptr %10, align 8, !tbaa !5
  %93 = icmp ne ptr %92, null
  br i1 %93, label %94, label %97

94:                                               ; preds = %91
  %95 = load ptr, ptr %10, align 8, !tbaa !5
  %96 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %95, ptr noundef @.str.11) #6
  br label %97

97:                                               ; preds = %94, %91
  br label %109

98:                                               ; preds = %87
  %99 = load i32, ptr %20, align 4, !tbaa !11
  %100 = icmp ne i32 %99, 0
  br i1 %100, label %108, label %101

101:                                              ; preds = %98
  %102 = load ptr, ptr %10, align 8, !tbaa !5
  %103 = icmp ne ptr %102, null
  br i1 %103, label %104, label %107

104:                                              ; preds = %101
  %105 = load ptr, ptr %10, align 8, !tbaa !5
  %106 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %105, ptr noundef @.str.12) #6
  br label %107

107:                                              ; preds = %104, %101
  br label %109

108:                                              ; preds = %98
  br label %110

109:                                              ; preds = %107, %97
  store i32 1, ptr %11, align 4, !tbaa !11
  br label %110

110:                                              ; preds = %109, %108
  %111 = load ptr, ptr %13, align 8, !tbaa !5
  call void @EVP_CIPHER_CTX_free(ptr noundef %111)
  %112 = load ptr, ptr %17, align 8, !tbaa !5
  call void @free(ptr noundef %112) #6
  %113 = load ptr, ptr %16, align 8, !tbaa !5
  call void @free(ptr noundef %113) #6
  %114 = load i32, ptr %11, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 4, 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
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  %115 = load ptr, ptr %12, align 8
  call void @llvm.stackrestore.p0(ptr %115)
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  ret i32 %114
}

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

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

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #4

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

declare ptr @EVP_CIPHER_CTX_new() #5

declare i32 @EVP_DecryptInit(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #5

declare ptr @EVP_aes_256_gcm() #5

declare i32 @EVP_DecryptUpdate(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef) #5

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

declare i32 @EVP_CIPHER_CTX_ctrl(ptr noundef, i32 noundef, i32 noundef, ptr noundef) #5

declare i32 @EVP_DecryptFinal(ptr noundef, ptr noundef, ptr noundef) #5

; Function Attrs: nounwind
declare i32 @ferror(ptr noundef) #1

declare void @EVP_CIPHER_CTX_free(ptr noundef) #5

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

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

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 = { 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 #3 = { nocallback nofree nosync nounwind willreturn }
attributes #4 = { nounwind allocsize(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 = { "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) }

!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 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}


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

@.str.11 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [18 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: nofree nounwind
declare noundef i32 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 2) i32 @decrypt(ptr nocapture noundef %0, ptr nocapture noundef %1, ptr noundef %2, i64 noundef %3, ptr noundef %4) local_unnamed_addr #2 {
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca [12 x i8], align 16
  %9 = alloca [16 x i8], align 16
  %10 = tail call noalias dereferenceable_or_null(65536) ptr @malloc(i64 noundef 65536) #8
  %11 = tail call noalias dereferenceable_or_null(65552) ptr @malloc(i64 noundef 65552) #8
  %12 = call i64 @fread(ptr noundef nonnull %8, i64 noundef 1, i64 noundef 12, ptr noundef %0)
  %13 = tail call ptr @EVP_CIPHER_CTX_new() #9
  %14 = tail call ptr @EVP_aes_256_gcm() #9
  %15 = call i32 @EVP_DecryptInit(ptr noundef %13, ptr noundef %14, ptr noundef %2, ptr noundef nonnull %8) #9
  %16 = icmp ult i64 %12, %3
  br i1 %16, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %5, %.lr.ph
  %.03845 = phi i64 [ %20, %.lr.ph ], [ %12, %5 ]
  %17 = sub i64 %3, %.03845
  %18 = call i64 @llvm.umin.i64(i64 %17, i64 65536)
  %19 = call i64 @fread(ptr noundef %10, i64 noundef 1, i64 noundef %18, ptr noundef %0)
  %20 = add i64 %19, %.03845
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #9
  store i32 0, ptr %6, align 4, !tbaa !5
  %21 = trunc i64 %19 to i32
  %22 = call i32 @EVP_DecryptUpdate(ptr noundef %13, ptr noundef %11, ptr noundef nonnull %6, ptr noundef %10, i32 noundef %21) #9
  %23 = load i32, ptr %6, align 4, !tbaa !5
  %24 = sext i32 %23 to i64
  %25 = call i64 @fwrite(ptr noundef %11, i64 noundef 1, i64 noundef %24, ptr noundef %1)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #9
  %26 = icmp ult i64 %20, %3
  br i1 %26, label %.lr.ph, label %._crit_edge, !llvm.loop !9

._crit_edge:                                      ; preds = %.lr.ph, %5
  %27 = call i64 @fread(ptr noundef nonnull %9, i64 noundef 1, i64 noundef 16, ptr noundef %0)
  %28 = call i32 @EVP_CIPHER_CTX_ctrl(ptr noundef %13, i32 noundef 17, i32 noundef 16, ptr noundef nonnull %9) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #9
  store i32 0, ptr %7, align 4, !tbaa !5
  %29 = call i32 @EVP_DecryptFinal(ptr noundef %13, ptr noundef %11, ptr noundef nonnull %7) #9
  %30 = load i32, ptr %7, align 4, !tbaa !5
  %31 = sext i32 %30 to i64
  %32 = call i64 @fwrite(ptr noundef %11, i64 noundef 1, i64 noundef %31, ptr noundef %1)
  %33 = call i32 @ferror(ptr noundef %0) #9
  %.not = icmp eq i32 %33, 0
  br i1 %.not, label %34, label %36

34:                                               ; preds = %._crit_edge
  %35 = call i32 @ferror(ptr noundef %1) #9
  %.not41 = icmp eq i32 %35, 0
  br i1 %.not41, label %37, label %36

36:                                               ; preds = %34, %._crit_edge
  %.not44 = icmp eq ptr %4, null
  br i1 %.not44, label %40, label %.sink.split

37:                                               ; preds = %34
  %.not42 = icmp eq i32 %29, 0
  br i1 %.not42, label %38, label %40

38:                                               ; preds = %37
  %.not43 = icmp eq ptr %4, null
  br i1 %.not43, label %40, label %.sink.split

.sink.split:                                      ; preds = %38, %36
  %.str.11.sink = phi ptr [ @.str.11, %36 ], [ @.str.12, %38 ]
  %39 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %4, ptr noundef nonnull %.str.11.sink) #9
  br label %40

40:                                               ; preds = %.sink.split, %36, %38, %37
  %.0 = phi i32 [ 0, %37 ], [ 1, %38 ], [ 1, %36 ], [ 1, %.sink.split ]
  call void @EVP_CIPHER_CTX_free(ptr noundef %13) #9
  call void @free(ptr noundef %11) #9
  call void @free(ptr noundef %10) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #9
  ret i32 %.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 nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #3

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

declare ptr @EVP_CIPHER_CTX_new() local_unnamed_addr #4

declare i32 @EVP_DecryptInit(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #4

declare ptr @EVP_aes_256_gcm() local_unnamed_addr #4

declare i32 @EVP_DecryptUpdate(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #4

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

declare i32 @EVP_CIPHER_CTX_ctrl(ptr noundef, i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #4

declare i32 @EVP_DecryptFinal(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: nofree nounwind memory(read)
declare noundef i32 @ferror(ptr nocapture noundef) local_unnamed_addr #5

declare void @EVP_CIPHER_CTX_free(ptr noundef) local_unnamed_addr #4

; 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: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.umin.i64(i64, i64) #7

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 = { 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 #3 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) 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 #4 = { "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 = { nofree nounwind memory(read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #8 = { nounwind allocsize(0) }
attributes #9 = { 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/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass