; LLVM IR from openssl/openssl :: demos/mac (poly1305)

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

@stderr = external global ptr, align 8
@.str = external hidden unnamed_addr constant [34 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [9 x i8], align 1
@propq = external hidden global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [36 x i8], align 1
@test_k = external hidden constant [16 x i8], align 16
@.str.7 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [37 x i8], align 1
@test_n = external hidden constant [16 x i8], align 16
@.str.9 = external hidden unnamed_addr constant [28 x i8], align 1
@test_r = external hidden constant [16 x i8], align 16
@.str.10 = external hidden unnamed_addr constant [23 x i8], align 1
@test_m = external hidden constant [2 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [16 x i8], align 1
@stdout = external global ptr, align 8
@.str.14 = external hidden unnamed_addr constant [40 x i8], align 1
@expected_output = external hidden constant [16 x i8], align 16
@.str.15 = external hidden unnamed_addr constant [45 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @main(i32 noundef %0, ptr noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca [32 x i8], align 16
  %12 = alloca [16 x i8], align 16
  %13 = alloca ptr, align 8
  %14 = alloca i64, align 8
  %15 = alloca i32, align 4
  store i32 0, ptr %3, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  store i32 1, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  store ptr null, ptr %7, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  store ptr null, ptr %8, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  store ptr null, ptr %9, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  store ptr null, ptr %10, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 32, ptr %11) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  store ptr null, ptr %13, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  store i64 0, ptr %14, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  store i32 0, ptr %15, align 4, !tbaa !5
  %16 = call ptr @OSSL_LIB_CTX_new()
  store ptr %16, ptr %13, align 8, !tbaa !9
  %17 = load ptr, ptr %13, align 8, !tbaa !9
  %18 = icmp eq ptr %17, null
  br i1 %18, label %19, label %22

19:                                               ; preds = %2
  %20 = load ptr, ptr @stderr, align 8, !tbaa !9
  %21 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %20, ptr noundef @.str) #6
  br label %124

22:                                               ; preds = %2
  %23 = load ptr, ptr %13, align 8, !tbaa !9
  %24 = load ptr, ptr @propq, align 8, !tbaa !9
  %25 = call ptr @EVP_MAC_fetch(ptr noundef %23, ptr noundef @.str.1, ptr noundef %24)
  store ptr %25, ptr %9, align 8, !tbaa !9
  %26 = load ptr, ptr %9, align 8, !tbaa !9
  %27 = icmp eq ptr %26, null
  br i1 %27, label %28, label %31

28:                                               ; preds = %22
  %29 = load ptr, ptr @stderr, align 8, !tbaa !9
  %30 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %29, ptr noundef @.str.2) #6
  br label %124

31:                                               ; preds = %22
  %32 = load ptr, ptr %9, align 8, !tbaa !9
  %33 = call ptr @EVP_MAC_CTX_new(ptr noundef %32)
  store ptr %33, ptr %10, align 8, !tbaa !9
  %34 = load ptr, ptr %10, align 8, !tbaa !9
  %35 = icmp eq ptr %34, null
  br i1 %35, label %36, label %39

36:                                               ; preds = %31
  %37 = load ptr, ptr @stderr, align 8, !tbaa !9
  %38 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %37, ptr noundef @.str.3) #6
  br label %124

39:                                               ; preds = %31
  %40 = load ptr, ptr %13, align 8, !tbaa !9
  %41 = load ptr, ptr @propq, align 8, !tbaa !9
  %42 = call ptr @EVP_CIPHER_fetch(ptr noundef %40, ptr noundef @.str.4, ptr noundef %41)
  store ptr %42, ptr %7, align 8, !tbaa !9
  %43 = load ptr, ptr %7, align 8, !tbaa !9
  %44 = icmp eq ptr %43, null
  br i1 %44, label %45, label %48

45:                                               ; preds = %39
  %46 = load ptr, ptr @stderr, align 8, !tbaa !9
  %47 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %46, ptr noundef @.str.5) #6
  br label %124

48:                                               ; preds = %39
  %49 = call ptr @EVP_CIPHER_CTX_new()
  store ptr %49, ptr %8, align 8, !tbaa !9
  %50 = load ptr, ptr %8, align 8, !tbaa !9
  %51 = icmp eq ptr %50, null
  br i1 %51, label %52, label %55

52:                                               ; preds = %48
  %53 = load ptr, ptr @stderr, align 8, !tbaa !9
  %54 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %53, ptr noundef @.str.6) #6
  br label %124

55:                                               ; preds = %48
  %56 = load ptr, ptr %8, align 8, !tbaa !9
  %57 = load ptr, ptr %7, align 8, !tbaa !9
  %58 = call i32 @EVP_EncryptInit_ex(ptr noundef %56, ptr noundef %57, ptr noundef null, ptr noundef @test_k, ptr noundef null)
  %59 = icmp ne i32 %58, 0
  br i1 %59, label %63, label %60

60:                                               ; preds = %55
  %61 = load ptr, ptr @stderr, align 8, !tbaa !9
  %62 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %61, ptr noundef @.str.7) #6
  br label %124

63:                                               ; preds = %55
  %64 = load ptr, ptr %8, align 8, !tbaa !9
  %65 = call i32 @EVP_CIPHER_CTX_set_padding(ptr noundef %64, i32 noundef 0)
  %66 = icmp ne i32 %65, 0
  br i1 %66, label %70, label %67

67:                                               ; preds = %63
  %68 = load ptr, ptr @stderr, align 8, !tbaa !9
  %69 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %68, ptr noundef @.str.8) #6
  br label %124

70:                                               ; preds = %63
  %71 = load ptr, ptr %8, align 8, !tbaa !9
  %72 = getelementptr inbounds [32 x i8], ptr %11, i64 0, i64 0
  %73 = getelementptr inbounds i8, ptr %72, i64 16
  %74 = call i32 @EVP_EncryptUpdate(ptr noundef %71, ptr noundef %73, ptr noundef %15, ptr noundef @test_n, i32 noundef 16)
  %75 = icmp ne i32 %74, 0
  br i1 %75, label %79, label %76

76:                                               ; preds = %70
  %77 = load ptr, ptr @stderr, align 8, !tbaa !9
  %78 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %77, ptr noundef @.str.9) #6
  br label %124

79:                                               ; preds = %70
  %80 = getelementptr inbounds [32 x i8], ptr %11, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %80, ptr align 16 @test_r, i64 16, i1 false)
  %81 = load ptr, ptr %10, align 8, !tbaa !9
  %82 = getelementptr inbounds [32 x i8], ptr %11, i64 0, i64 0
  %83 = call i32 @EVP_MAC_init(ptr noundef %81, ptr noundef %82, i64 noundef 32, ptr noundef null)
  %84 = icmp ne i32 %83, 0
  br i1 %84, label %88, label %85

85:                                               ; preds = %79
  %86 = load ptr, ptr @stderr, align 8, !tbaa !9
  %87 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %86, ptr noundef @.str.10) #6
  br label %124

88:                                               ; preds = %79
  %89 = load ptr, ptr %10, align 8, !tbaa !9
  %90 = call i32 @EVP_MAC_update(ptr noundef %89, ptr noundef @test_m, i64 noundef 2)
  %91 = icmp ne i32 %90, 0
  br i1 %91, label %95, label %92

92:                                               ; preds = %88
  %93 = load ptr, ptr @stderr, align 8, !tbaa !9
  %94 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %93, ptr noundef @.str.11) #6
  br label %124

95:                                               ; preds = %88
  %96 = load ptr, ptr %10, align 8, !tbaa !9
  %97 = getelementptr inbounds [16 x i8], ptr %12, i64 0, i64 0
  %98 = call i32 @EVP_MAC_final(ptr noundef %96, ptr noundef %97, ptr noundef %14, i64 noundef 16)
  %99 = icmp ne i32 %98, 0
  br i1 %99, label %103, label %100

100:                                              ; preds = %95
  %101 = load ptr, ptr @stderr, align 8, !tbaa !9
  %102 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %101, ptr noundef @.str.12) #6
  br label %124

103:                                              ; preds = %95
  %104 = call i32 (ptr, ...) @printf(ptr noundef @.str.13)
  %105 = load ptr, ptr @stdout, align 8, !tbaa !9
  %106 = getelementptr inbounds [16 x i8], ptr %12, i64 0, i64 0
  %107 = load i64, ptr %14, align 8, !tbaa !11
  %108 = trunc i64 %107 to i32
  %109 = call i32 @BIO_dump_indent_fp(ptr noundef %105, ptr noundef %106, i32 noundef %108, i32 noundef 2)
  %110 = call i32 @putchar(i32 noundef 10)
  %111 = load i64, ptr %14, align 8, !tbaa !11
  %112 = icmp ne i64 %111, 16
  br i1 %112, label %113, label %116

113:                                              ; preds = %103
  %114 = load ptr, ptr @stderr, align 8, !tbaa !9
  %115 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %114, ptr noundef @.str.14) #6
  br label %124

116:                                              ; preds = %103
  %117 = getelementptr inbounds [16 x i8], ptr %12, i64 0, i64 0
  %118 = call i32 @CRYPTO_memcmp(ptr noundef @expected_output, ptr noundef %117, i64 noundef 16)
  %119 = icmp ne i32 %118, 0
  br i1 %119, label %120, label %123

120:                                              ; preds = %116
  %121 = load ptr, ptr @stderr, align 8, !tbaa !9
  %122 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %121, ptr noundef @.str.15) #6
  br label %124

123:                                              ; preds = %116
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %124

124:                                              ; preds = %123, %120, %113, %100, %92, %85, %76, %67, %60, %52, %45, %36, %28, %19
  %125 = load ptr, ptr %8, align 8, !tbaa !9
  call void @EVP_CIPHER_CTX_free(ptr noundef %125)
  %126 = load ptr, ptr %7, align 8, !tbaa !9
  call void @EVP_CIPHER_free(ptr noundef %126)
  %127 = load ptr, ptr %10, align 8, !tbaa !9
  call void @EVP_MAC_CTX_free(ptr noundef %127)
  %128 = load ptr, ptr %9, align 8, !tbaa !9
  call void @EVP_MAC_free(ptr noundef %128)
  %129 = load ptr, ptr %13, align 8, !tbaa !9
  call void @OSSL_LIB_CTX_free(ptr noundef %129)
  %130 = load i32, ptr %6, align 4, !tbaa !5
  %131 = icmp ne i32 %130, 0
  br i1 %131, label %132, label %134

132:                                              ; preds = %124
  %133 = load ptr, ptr @stderr, align 8, !tbaa !9
  call void @ERR_print_errors_fp(ptr noundef %133)
  br label %134

134:                                              ; preds = %132, %124
  %135 = load i32, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, 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
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  ret i32 %135
}

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

declare ptr @OSSL_LIB_CTX_new() #2

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

declare ptr @EVP_MAC_fetch(ptr noundef, ptr noundef, ptr noundef) #2

declare ptr @EVP_MAC_CTX_new(ptr noundef) #2

declare ptr @EVP_CIPHER_fetch(ptr noundef, ptr noundef, ptr noundef) #2

declare ptr @EVP_CIPHER_CTX_new() #2

declare i32 @EVP_EncryptInit_ex(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

declare i32 @EVP_CIPHER_CTX_set_padding(ptr noundef, i32 noundef) #2

declare i32 @EVP_EncryptUpdate(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef) #2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4

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

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

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

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

declare i32 @BIO_dump_indent_fp(ptr noundef, ptr noundef, i32 noundef, i32 noundef) #2

; Function Attrs: inlinehint nounwind uwtable
declare i32 @putchar(i32 noundef) #5

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

declare void @EVP_CIPHER_CTX_free(ptr noundef) #2

declare void @EVP_CIPHER_free(ptr noundef) #2

declare void @EVP_MAC_CTX_free(ptr noundef) #2

declare void @EVP_MAC_free(ptr noundef) #2

declare void @OSSL_LIB_CTX_free(ptr noundef) #2

declare void @ERR_print_errors_fp(ptr noundef) #2

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !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"

@stderr = external local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [34 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [9 x i8], align 1
@propq = external hidden local_unnamed_addr global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [36 x i8], align 1
@test_k = external hidden constant [16 x i8], align 16
@.str.7 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [37 x i8], align 1
@test_n = external hidden constant [16 x i8], align 16
@.str.9 = external hidden unnamed_addr constant [28 x i8], align 1
@test_r = external hidden local_unnamed_addr constant [16 x i8], align 16
@.str.10 = external hidden unnamed_addr constant [23 x i8], align 1
@test_m = external hidden constant [2 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [16 x i8], align 1
@stdout = external local_unnamed_addr global ptr, align 8
@.str.14 = external hidden unnamed_addr constant [40 x i8], align 1
@expected_output = external hidden constant [16 x i8], align 16
@.str.15 = external hidden unnamed_addr constant [45 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 2) i32 @main(i32 noundef %0, ptr nocapture noundef readnone %1) local_unnamed_addr #0 {
  %3 = alloca [32 x i8], align 16
  %4 = alloca [16 x i8], align 16
  %5 = alloca i64, align 8
  %6 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #6
  store i64 0, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #6
  store i32 0, ptr %6, align 4, !tbaa !9
  %7 = tail call ptr @OSSL_LIB_CTX_new() #6
  %8 = icmp eq ptr %7, null
  br i1 %8, label %9, label %12

9:                                                ; preds = %2
  %10 = load ptr, ptr @stderr, align 8, !tbaa !11
  %11 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %10, ptr noundef nonnull @.str) #7
  br label %85

12:                                               ; preds = %2
  %13 = load ptr, ptr @propq, align 8, !tbaa !11
  %14 = tail call ptr @EVP_MAC_fetch(ptr noundef nonnull %7, ptr noundef nonnull @.str.1, ptr noundef %13) #6
  %15 = icmp eq ptr %14, null
  br i1 %15, label %16, label %19

16:                                               ; preds = %12
  %17 = load ptr, ptr @stderr, align 8, !tbaa !11
  %18 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %17, ptr noundef nonnull @.str.2) #7
  br label %85

19:                                               ; preds = %12
  %20 = tail call ptr @EVP_MAC_CTX_new(ptr noundef nonnull %14) #6
  %21 = icmp eq ptr %20, null
  br i1 %21, label %22, label %25

22:                                               ; preds = %19
  %23 = load ptr, ptr @stderr, align 8, !tbaa !11
  %24 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %23, ptr noundef nonnull @.str.3) #7
  br label %85

25:                                               ; preds = %19
  %26 = load ptr, ptr @propq, align 8, !tbaa !11
  %27 = tail call ptr @EVP_CIPHER_fetch(ptr noundef nonnull %7, ptr noundef nonnull @.str.4, ptr noundef %26) #6
  %28 = icmp eq ptr %27, null
  br i1 %28, label %29, label %32

29:                                               ; preds = %25
  %30 = load ptr, ptr @stderr, align 8, !tbaa !11
  %31 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %30, ptr noundef nonnull @.str.5) #7
  br label %85

32:                                               ; preds = %25
  %33 = tail call ptr @EVP_CIPHER_CTX_new() #6
  %34 = icmp eq ptr %33, null
  br i1 %34, label %35, label %38

35:                                               ; preds = %32
  %36 = load ptr, ptr @stderr, align 8, !tbaa !11
  %37 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %36, ptr noundef nonnull @.str.6) #7
  br label %85

38:                                               ; preds = %32
  %39 = tail call i32 @EVP_EncryptInit_ex(ptr noundef nonnull %33, ptr noundef nonnull %27, ptr noundef null, ptr noundef nonnull @test_k, ptr noundef null) #6
  %.not = icmp eq i32 %39, 0
  br i1 %.not, label %40, label %43

40:                                               ; preds = %38
  %41 = load ptr, ptr @stderr, align 8, !tbaa !11
  %42 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %41, ptr noundef nonnull @.str.7) #7
  br label %85

43:                                               ; preds = %38
  %44 = tail call i32 @EVP_CIPHER_CTX_set_padding(ptr noundef nonnull %33, i32 noundef 0) #6
  %.not33 = icmp eq i32 %44, 0
  br i1 %.not33, label %45, label %48

45:                                               ; preds = %43
  %46 = load ptr, ptr @stderr, align 8, !tbaa !11
  %47 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %46, ptr noundef nonnull @.str.8) #7
  br label %85

48:                                               ; preds = %43
  %49 = getelementptr inbounds i8, ptr %3, i64 16
  %50 = call i32 @EVP_EncryptUpdate(ptr noundef nonnull %33, ptr noundef nonnull %49, ptr noundef nonnull %6, ptr noundef nonnull @test_n, i32 noundef 16) #6
  %.not34 = icmp eq i32 %50, 0
  br i1 %.not34, label %51, label %54

51:                                               ; preds = %48
  %52 = load ptr, ptr @stderr, align 8, !tbaa !11
  %53 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %52, ptr noundef nonnull @.str.9) #7
  br label %85

54:                                               ; preds = %48
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %3, ptr noundef nonnull align 16 dereferenceable(16) @test_r, i64 16, i1 false)
  %55 = call i32 @EVP_MAC_init(ptr noundef nonnull %20, ptr noundef nonnull %3, i64 noundef 32, ptr noundef null) #6
  %.not35 = icmp eq i32 %55, 0
  br i1 %.not35, label %56, label %59

56:                                               ; preds = %54
  %57 = load ptr, ptr @stderr, align 8, !tbaa !11
  %58 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %57, ptr noundef nonnull @.str.10) #7
  br label %85

59:                                               ; preds = %54
  %60 = call i32 @EVP_MAC_update(ptr noundef nonnull %20, ptr noundef nonnull @test_m, i64 noundef 2) #6
  %.not36 = icmp eq i32 %60, 0
  br i1 %.not36, label %61, label %64

61:                                               ; preds = %59
  %62 = load ptr, ptr @stderr, align 8, !tbaa !11
  %63 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %62, ptr noundef nonnull @.str.11) #7
  br label %85

64:                                               ; preds = %59
  %65 = call i32 @EVP_MAC_final(ptr noundef nonnull %20, ptr noundef nonnull %4, ptr noundef nonnull %5, i64 noundef 16) #6
  %.not37 = icmp eq i32 %65, 0
  br i1 %.not37, label %66, label %69

66:                                               ; preds = %64
  %67 = load ptr, ptr @stderr, align 8, !tbaa !11
  %68 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %67, ptr noundef nonnull @.str.12) #7
  br label %85

69:                                               ; preds = %64
  %70 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.13)
  %71 = load ptr, ptr @stdout, align 8, !tbaa !11
  %72 = load i64, ptr %5, align 8, !tbaa !5
  %73 = trunc i64 %72 to i32
  %74 = call i32 @BIO_dump_indent_fp(ptr noundef %71, ptr noundef nonnull %4, i32 noundef %73, i32 noundef 2) #6
  %75 = call i32 @putchar(i32 noundef 10)
  %76 = load i64, ptr %5, align 8, !tbaa !5
  %.not38 = icmp eq i64 %76, 16
  br i1 %.not38, label %80, label %77

77:                                               ; preds = %69
  %78 = load ptr, ptr @stderr, align 8, !tbaa !11
  %79 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %78, ptr noundef nonnull @.str.14) #7
  br label %85

80:                                               ; preds = %69
  %81 = call i32 @CRYPTO_memcmp(ptr noundef nonnull @expected_output, ptr noundef nonnull %4, i64 noundef 16) #6
  %.not39 = icmp eq i32 %81, 0
  br i1 %.not39, label %85, label %82

82:                                               ; preds = %80
  %83 = load ptr, ptr @stderr, align 8, !tbaa !11
  %84 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %83, ptr noundef nonnull @.str.15) #7
  br label %85

85:                                               ; preds = %80, %82, %77, %66, %61, %56, %51, %45, %40, %35, %29, %22, %16, %9
  %.not40 = phi i1 [ false, %9 ], [ false, %16 ], [ false, %22 ], [ false, %29 ], [ false, %35 ], [ false, %77 ], [ false, %82 ], [ false, %66 ], [ false, %61 ], [ false, %56 ], [ false, %51 ], [ false, %45 ], [ false, %40 ], [ true, %80 ]
  %.024 = phi i32 [ 1, %9 ], [ 1, %16 ], [ 1, %22 ], [ 1, %29 ], [ 1, %35 ], [ 1, %77 ], [ 1, %82 ], [ 1, %66 ], [ 1, %61 ], [ 1, %56 ], [ 1, %51 ], [ 1, %45 ], [ 1, %40 ], [ 0, %80 ]
  %.023 = phi ptr [ null, %9 ], [ null, %16 ], [ null, %22 ], [ null, %29 ], [ %27, %35 ], [ %27, %77 ], [ %27, %82 ], [ %27, %66 ], [ %27, %61 ], [ %27, %56 ], [ %27, %51 ], [ %27, %45 ], [ %27, %40 ], [ %27, %80 ]
  %.022 = phi ptr [ null, %9 ], [ null, %16 ], [ null, %22 ], [ null, %29 ], [ null, %35 ], [ %33, %77 ], [ %33, %82 ], [ %33, %66 ], [ %33, %61 ], [ %33, %56 ], [ %33, %51 ], [ %33, %45 ], [ %33, %40 ], [ %33, %80 ]
  %.021 = phi ptr [ null, %9 ], [ null, %16 ], [ %14, %22 ], [ %14, %29 ], [ %14, %35 ], [ %14, %77 ], [ %14, %82 ], [ %14, %66 ], [ %14, %61 ], [ %14, %56 ], [ %14, %51 ], [ %14, %45 ], [ %14, %40 ], [ %14, %80 ]
  %.0 = phi ptr [ null, %9 ], [ null, %16 ], [ null, %22 ], [ %20, %29 ], [ %20, %35 ], [ %20, %77 ], [ %20, %82 ], [ %20, %66 ], [ %20, %61 ], [ %20, %56 ], [ %20, %51 ], [ %20, %45 ], [ %20, %40 ], [ %20, %80 ]
  call void @EVP_CIPHER_CTX_free(ptr noundef %.022) #6
  call void @EVP_CIPHER_free(ptr noundef %.023) #6
  call void @EVP_MAC_CTX_free(ptr noundef %.0) #6
  call void @EVP_MAC_free(ptr noundef %.021) #6
  call void @OSSL_LIB_CTX_free(ptr noundef %7) #6
  br i1 %.not40, label %88, label %86

86:                                               ; preds = %85
  %87 = load ptr, ptr @stderr, align 8, !tbaa !11
  call void @ERR_print_errors_fp(ptr noundef %87) #6
  br label %88

88:                                               ; preds = %86, %85
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #6
  ret i32 %.024
}

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

declare ptr @OSSL_LIB_CTX_new() local_unnamed_addr #2

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

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

declare ptr @EVP_MAC_CTX_new(ptr noundef) local_unnamed_addr #2

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

declare ptr @EVP_CIPHER_CTX_new() local_unnamed_addr #2

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

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

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4

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

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

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

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

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

; Function Attrs: inlinehint nofree nounwind uwtable
declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #5

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

declare void @EVP_CIPHER_CTX_free(ptr noundef) local_unnamed_addr #2

declare void @EVP_CIPHER_free(ptr noundef) local_unnamed_addr #2

declare void @EVP_MAC_CTX_free(ptr noundef) local_unnamed_addr #2

declare void @EVP_MAC_free(ptr noundef) local_unnamed_addr #2

declare void @OSSL_LIB_CTX_free(ptr noundef) local_unnamed_addr #2

declare void @ERR_print_errors_fp(ptr noundef) local_unnamed_addr #2

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

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


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass