; LLVM IR from PacktPublishing/Demystifying-Cryptography-with-OpenSSL-3 :: Chapter07 (ec-sign)

; 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.8 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [38 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 @sign(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) #2 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i64, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  store ptr %3, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  store i32 0, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  store i32 1, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  store i64 65536, ptr %11, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  store ptr null, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  store ptr null, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  store ptr null, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  store ptr null, ptr %15, align 8, !tbaa !5
  call void @ERR_clear_error()
  %18 = load ptr, ptr %7, align 8, !tbaa !5
  %19 = call ptr @PEM_read_PrivateKey(ptr noundef %18, ptr noundef null, ptr noundef null, ptr noundef null)
  store ptr %19, ptr %12, align 8, !tbaa !5
  %20 = load ptr, ptr %12, align 8, !tbaa !5
  %21 = icmp ne ptr %20, null
  br i1 %21, label %29, label %22

22:                                               ; preds = %4
  %23 = load ptr, ptr %8, align 8, !tbaa !5
  %24 = icmp ne ptr %23, null
  br i1 %24, label %25, label %28

25:                                               ; preds = %22
  %26 = load ptr, ptr %8, align 8, !tbaa !5
  %27 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %26, ptr noundef @.str.8) #5
  br label %28

28:                                               ; preds = %25, %22
  br label %89

29:                                               ; preds = %4
  %30 = call ptr @EVP_MD_CTX_new()
  store ptr %30, ptr %13, align 8, !tbaa !5
  %31 = load ptr, ptr %13, align 8, !tbaa !5
  %32 = load ptr, ptr %12, align 8, !tbaa !5
  %33 = call i32 @EVP_DigestSignInit_ex(ptr noundef %31, ptr noundef null, ptr noundef @.str.9, ptr noundef null, ptr noundef null, ptr noundef %32, ptr noundef null)
  store i32 %33, ptr %10, align 4, !tbaa !9
  %34 = call noalias ptr @malloc(i64 noundef 65536) #6
  store ptr %34, ptr %14, align 8, !tbaa !5
  br label %35

35:                                               ; preds = %40, %29
  %36 = load ptr, ptr %5, align 8, !tbaa !5
  %37 = call i32 @feof(ptr noundef %36) #5
  %38 = icmp ne i32 %37, 0
  %39 = xor i1 %38, true
  br i1 %39, label %40, label %48

40:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %41 = load ptr, ptr %14, align 8, !tbaa !5
  %42 = load ptr, ptr %5, align 8, !tbaa !5
  %43 = call i64 @fread(ptr noundef %41, i64 noundef 1, i64 noundef 65536, ptr noundef %42)
  store i64 %43, ptr %16, align 8, !tbaa !11
  %44 = load ptr, ptr %13, align 8, !tbaa !5
  %45 = load ptr, ptr %14, align 8, !tbaa !5
  %46 = load i64, ptr %16, align 8, !tbaa !11
  %47 = call i32 @EVP_DigestSignUpdate(ptr noundef %44, ptr noundef %45, i64 noundef %46)
  store i32 %47, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  br label %35, !llvm.loop !13

48:                                               ; preds = %35
  store i64 0, ptr %17, align 8, !tbaa !11
  %49 = load ptr, ptr %13, align 8, !tbaa !5
  %50 = call i32 @EVP_DigestSignFinal(ptr noundef %49, ptr noundef null, ptr noundef %17)
  store i32 %50, ptr %10, align 4, !tbaa !9
  %51 = load i64, ptr %17, align 8, !tbaa !11
  %52 = call noalias ptr @malloc(i64 noundef %51) #6
  store ptr %52, ptr %15, align 8, !tbaa !5
  %53 = load ptr, ptr %13, align 8, !tbaa !5
  %54 = load ptr, ptr %15, align 8, !tbaa !5
  %55 = call i32 @EVP_DigestSignFinal(ptr noundef %53, ptr noundef %54, ptr noundef %17)
  store i32 %55, ptr %10, align 4, !tbaa !9
  %56 = load ptr, ptr %15, align 8, !tbaa !5
  %57 = load i64, ptr %17, align 8, !tbaa !11
  %58 = load ptr, ptr %6, align 8, !tbaa !5
  %59 = call i64 @fwrite(ptr noundef %56, i64 noundef 1, i64 noundef %57, ptr noundef %58)
  %60 = load ptr, ptr %5, align 8, !tbaa !5
  %61 = call i32 @ferror(ptr noundef %60) #5
  %62 = icmp ne i32 %61, 0
  br i1 %62, label %71, label %63

63:                                               ; preds = %48
  %64 = load ptr, ptr %6, align 8, !tbaa !5
  %65 = call i32 @ferror(ptr noundef %64) #5
  %66 = icmp ne i32 %65, 0
  br i1 %66, label %71, label %67

67:                                               ; preds = %63
  %68 = load ptr, ptr %7, align 8, !tbaa !5
  %69 = call i32 @ferror(ptr noundef %68) #5
  %70 = icmp ne i32 %69, 0
  br i1 %70, label %71, label %78

71:                                               ; preds = %67, %63, %48
  %72 = load ptr, ptr %8, align 8, !tbaa !5
  %73 = icmp ne ptr %72, null
  br i1 %73, label %74, label %77

74:                                               ; preds = %71
  %75 = load ptr, ptr %8, align 8, !tbaa !5
  %76 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %75, ptr noundef @.str.10) #5
  br label %77

77:                                               ; preds = %74, %71
  br label %89

78:                                               ; preds = %67
  %79 = load i32, ptr %10, align 4, !tbaa !9
  %80 = icmp sle i32 %79, 0
  br i1 %80, label %81, label %88

81:                                               ; preds = %78
  %82 = load ptr, ptr %8, align 8, !tbaa !5
  %83 = icmp ne ptr %82, null
  br i1 %83, label %84, label %87

84:                                               ; preds = %81
  %85 = load ptr, ptr %8, align 8, !tbaa !5
  %86 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %85, ptr noundef @.str.11) #5
  br label %87

87:                                               ; preds = %84, %81
  br label %89

88:                                               ; preds = %78
  br label %90

89:                                               ; preds = %87, %77, %28
  store i32 1, ptr %9, align 4, !tbaa !9
  br label %90

90:                                               ; preds = %89, %88
  %91 = load ptr, ptr %15, align 8, !tbaa !5
  call void @free(ptr noundef %91) #5
  %92 = load ptr, ptr %14, align 8, !tbaa !5
  call void @free(ptr noundef %92) #5
  %93 = load ptr, ptr %13, align 8, !tbaa !5
  call void @EVP_MD_CTX_free(ptr noundef %93)
  %94 = load ptr, ptr %12, align 8, !tbaa !5
  call void @EVP_PKEY_free(ptr noundef %94)
  %95 = call i64 @ERR_peek_error()
  %96 = icmp ne i64 %95, 0
  br i1 %96, label %97, label %105

97:                                               ; preds = %90
  store i32 1, ptr %9, align 4, !tbaa !9
  %98 = load ptr, ptr %8, align 8, !tbaa !5
  %99 = icmp ne ptr %98, null
  br i1 %99, label %100, label %104

100:                                              ; preds = %97
  %101 = load ptr, ptr %8, align 8, !tbaa !5
  %102 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %101, ptr noundef @.str.12) #5
  %103 = load ptr, ptr %8, align 8, !tbaa !5
  call void @ERR_print_errors_fp(ptr noundef %103)
  br label %104

104:                                              ; preds = %100, %97
  call void @ERR_clear_error()
  br label %105

105:                                              ; preds = %104, %90
  %106 = load i32, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  ret i32 %106
}

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

declare void @ERR_clear_error() #3

declare ptr @PEM_read_PrivateKey(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #3

declare ptr @EVP_MD_CTX_new() #3

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

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

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

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

declare i32 @EVP_DigestSignUpdate(ptr noundef, ptr noundef, i64 noundef) #3

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

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

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

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

declare void @EVP_MD_CTX_free(ptr noundef) #3

declare void @EVP_PKEY_free(ptr noundef) #3

declare i64 @ERR_peek_error() #3

declare void @ERR_print_errors_fp(ptr noundef) #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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind 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 = { nounwind }
attributes #6 = { 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 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !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.8 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [38 x i8], align 1

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

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 2) i32 @sign(ptr nocapture noundef %0, ptr nocapture noundef %1, ptr noundef %2, ptr noundef %3) local_unnamed_addr #1 {
  %5 = alloca i64, align 8
  tail call void @ERR_clear_error() #6
  %6 = tail call ptr @PEM_read_PrivateKey(ptr noundef %2, ptr noundef null, ptr noundef null, ptr noundef null) #6
  %.not = icmp eq ptr %6, null
  br i1 %.not, label %7, label %10

7:                                                ; preds = %4
  %.not41 = icmp eq ptr %3, null
  br i1 %.not41, label %37, label %8

8:                                                ; preds = %7
  %9 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %3, ptr noundef nonnull @.str.8) #6
  br label %37

10:                                               ; preds = %4
  %11 = tail call ptr @EVP_MD_CTX_new() #6
  %12 = tail call i32 @EVP_DigestSignInit_ex(ptr noundef %11, ptr noundef null, ptr noundef nonnull @.str.9, ptr noundef null, ptr noundef null, ptr noundef nonnull %6, ptr noundef null) #6
  %13 = tail call noalias dereferenceable_or_null(65536) ptr @malloc(i64 noundef 65536) #7
  %14 = tail call i32 @feof(ptr noundef %0) #6
  %.not4250 = icmp eq i32 %14, 0
  br i1 %.not4250, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %10, %.lr.ph
  %15 = tail call i64 @fread(ptr noundef %13, i64 noundef 1, i64 noundef 65536, ptr noundef %0)
  %16 = tail call i32 @EVP_DigestSignUpdate(ptr noundef %11, ptr noundef %13, i64 noundef %15) #6
  %17 = tail call i32 @feof(ptr noundef %0) #6
  %.not42 = icmp eq i32 %17, 0
  br i1 %.not42, label %.lr.ph, label %._crit_edge, !llvm.loop !5

._crit_edge:                                      ; preds = %.lr.ph, %10
  store i64 0, ptr %5, align 8, !tbaa !7
  %18 = call i32 @EVP_DigestSignFinal(ptr noundef %11, ptr noundef null, ptr noundef nonnull %5) #6
  %19 = load i64, ptr %5, align 8, !tbaa !7
  %20 = call noalias ptr @malloc(i64 noundef %19) #7
  %21 = call i32 @EVP_DigestSignFinal(ptr noundef %11, ptr noundef %20, ptr noundef nonnull %5) #6
  %22 = load i64, ptr %5, align 8, !tbaa !7
  %23 = call i64 @fwrite(ptr noundef %20, i64 noundef 1, i64 noundef %22, ptr noundef %1)
  %24 = call i32 @ferror(ptr noundef %0) #6
  %.not43 = icmp eq i32 %24, 0
  br i1 %.not43, label %25, label %29

25:                                               ; preds = %._crit_edge
  %26 = call i32 @ferror(ptr noundef %1) #6
  %.not44 = icmp eq i32 %26, 0
  br i1 %.not44, label %27, label %29

27:                                               ; preds = %25
  %28 = call i32 @ferror(ptr noundef %2) #6
  %.not45 = icmp eq i32 %28, 0
  br i1 %.not45, label %32, label %29

29:                                               ; preds = %27, %25, %._crit_edge
  %.not47 = icmp eq ptr %3, null
  br i1 %.not47, label %37, label %30

30:                                               ; preds = %29
  %31 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %3, ptr noundef nonnull @.str.10) #6
  br label %37

32:                                               ; preds = %27
  %33 = icmp slt i32 %21, 1
  br i1 %33, label %34, label %37

34:                                               ; preds = %32
  %.not46 = icmp eq ptr %3, null
  br i1 %.not46, label %37, label %35

35:                                               ; preds = %34
  %36 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %3, ptr noundef nonnull @.str.11) #6
  br label %37

37:                                               ; preds = %8, %7, %30, %29, %35, %34, %32
  %.137 = phi ptr [ %11, %32 ], [ %11, %30 ], [ %11, %29 ], [ %11, %35 ], [ %11, %34 ], [ null, %8 ], [ null, %7 ]
  %.135 = phi ptr [ %13, %32 ], [ %13, %30 ], [ %13, %29 ], [ %13, %35 ], [ %13, %34 ], [ null, %8 ], [ null, %7 ]
  %.133 = phi ptr [ %20, %32 ], [ %20, %30 ], [ %20, %29 ], [ %20, %35 ], [ %20, %34 ], [ null, %8 ], [ null, %7 ]
  %.0 = phi i32 [ 0, %32 ], [ 1, %30 ], [ 1, %29 ], [ 1, %35 ], [ 1, %34 ], [ 1, %8 ], [ 1, %7 ]
  call void @free(ptr noundef %.133) #6
  call void @free(ptr noundef %.135) #6
  call void @EVP_MD_CTX_free(ptr noundef %.137) #6
  call void @EVP_PKEY_free(ptr noundef %6) #6
  %38 = call i64 @ERR_peek_error() #6
  %.not48 = icmp eq i64 %38, 0
  br i1 %.not48, label %43, label %39

39:                                               ; preds = %37
  %.not49 = icmp eq ptr %3, null
  br i1 %.not49, label %42, label %40

40:                                               ; preds = %39
  %41 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %3, ptr noundef nonnull @.str.12) #6
  call void @ERR_print_errors_fp(ptr noundef nonnull %3) #6
  br label %42

42:                                               ; preds = %40, %39
  call void @ERR_clear_error() #6
  br label %43

43:                                               ; preds = %42, %37
  %.1 = phi i32 [ 1, %42 ], [ %.0, %37 ]
  ret i32 %.1
}

declare void @ERR_clear_error() local_unnamed_addr #2

declare ptr @PEM_read_PrivateKey(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare ptr @EVP_MD_CTX_new() local_unnamed_addr #2

declare i32 @EVP_DigestSignInit_ex(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

; 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 i32 @feof(ptr nocapture noundef) local_unnamed_addr #0

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

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

declare i32 @EVP_DigestSignFinal(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

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

; Function Attrs: nofree nounwind memory(read)
declare noundef i32 @ferror(ptr nocapture 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 #5

declare void @EVP_MD_CTX_free(ptr noundef) local_unnamed_addr #2

declare void @EVP_PKEY_free(ptr noundef) local_unnamed_addr #2

declare i64 @ERR_peek_error() local_unnamed_addr #2

declare void @ERR_print_errors_fp(ptr noundef) local_unnamed_addr #2

attributes #0 = { 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 #1 = { 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 = { "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 = { 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 #5 = { 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 #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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = !{!8, !8, i64 0}
!8 = !{!"long", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C/C++ TBAA"}


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