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

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

@stderr = external global ptr, align 8
@.str = external hidden unnamed_addr constant [34 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 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 [7 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [3 x i8], align 1
@iv = external hidden global [12 x i8], align 1
@key = external hidden global [16 x i8], align 16
@.str.8 = external hidden unnamed_addr constant [23 x i8], align 1
@data = external hidden global [16 x i8], align 16
@.str.9 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [16 x i8], align 1
@stdout = external global ptr, align 8
@.str.12 = external hidden unnamed_addr constant [40 x i8], align 1
@expected_output = external hidden constant [16 x i8], align 16
@.str.13 = 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 [16 x i8], align 16
  %10 = alloca [4 x %struct.ossl_param_st], align 16
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i64, align 8
  %14 = alloca %struct.ossl_param_st, align 8
  %15 = alloca %struct.ossl_param_st, align 8
  %16 = alloca %struct.ossl_param_st, align 8
  %17 = alloca %struct.ossl_param_st, align 8
  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 16, ptr %9) #6
  call void @llvm.lifetime.start.p0(i64 160, ptr %10) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  %18 = getelementptr inbounds [4 x %struct.ossl_param_st], ptr %10, i64 0, i64 0
  store ptr %18, ptr %11, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  store ptr null, ptr %12, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  store i64 0, ptr %13, align 8, !tbaa !11
  %19 = call ptr @OSSL_LIB_CTX_new()
  store ptr %19, ptr %12, align 8, !tbaa !9
  %20 = load ptr, ptr %12, align 8, !tbaa !9
  %21 = icmp eq ptr %20, null
  br i1 %21, label %22, label %25

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

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

31:                                               ; preds = %25
  %32 = load ptr, ptr @stderr, align 8, !tbaa !9
  %33 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %32, ptr noundef @.str.2) #6
  br label %98

34:                                               ; preds = %25
  %35 = load ptr, ptr %7, align 8, !tbaa !9
  %36 = call ptr @EVP_MAC_CTX_new(ptr noundef %35)
  store ptr %36, ptr %8, align 8, !tbaa !9
  %37 = load ptr, ptr %8, align 8, !tbaa !9
  %38 = icmp eq ptr %37, null
  br i1 %38, label %39, label %42

39:                                               ; preds = %34
  %40 = load ptr, ptr @stderr, align 8, !tbaa !9
  %41 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %40, ptr noundef @.str.3) #6
  br label %98

42:                                               ; preds = %34
  %43 = load ptr, ptr %11, align 8, !tbaa !9
  %44 = getelementptr inbounds %struct.ossl_param_st, ptr %43, i32 1
  store ptr %44, ptr %11, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 40, ptr %14) #6
  call void @OSSL_PARAM_construct_utf8_string(ptr dead_on_unwind writable sret(%struct.ossl_param_st) align 8 %14, ptr noundef @.str.4, ptr noundef @.str.5, i64 noundef 0)
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %43, ptr align 8 %14, i64 40, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 40, ptr %14) #6
  %45 = load ptr, ptr @propq, align 8, !tbaa !9
  %46 = icmp ne ptr %45, null
  br i1 %46, label %47, label %51

47:                                               ; preds = %42
  %48 = load ptr, ptr %11, align 8, !tbaa !9
  %49 = getelementptr inbounds %struct.ossl_param_st, ptr %48, i32 1
  store ptr %49, ptr %11, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 40, ptr %15) #6
  %50 = load ptr, ptr @propq, align 8, !tbaa !9
  call void @OSSL_PARAM_construct_utf8_string(ptr dead_on_unwind writable sret(%struct.ossl_param_st) align 8 %15, ptr noundef @.str.6, ptr noundef %50, i64 noundef 0)
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %48, ptr align 8 %15, i64 40, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 40, ptr %15) #6
  br label %51

51:                                               ; preds = %47, %42
  %52 = load ptr, ptr %11, align 8, !tbaa !9
  %53 = getelementptr inbounds %struct.ossl_param_st, ptr %52, i32 1
  store ptr %53, ptr %11, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 40, ptr %16) #6
  call void @OSSL_PARAM_construct_octet_string(ptr dead_on_unwind writable sret(%struct.ossl_param_st) align 8 %16, ptr noundef @.str.7, ptr noundef @iv, i64 noundef 12)
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %52, ptr align 8 %16, i64 40, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 40, ptr %16) #6
  %54 = load ptr, ptr %11, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 40, ptr %17) #6
  call void @OSSL_PARAM_construct_end(ptr dead_on_unwind writable sret(%struct.ossl_param_st) align 8 %17)
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %54, ptr align 8 %17, i64 40, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 40, ptr %17) #6
  %55 = load ptr, ptr %8, align 8, !tbaa !9
  %56 = getelementptr inbounds [4 x %struct.ossl_param_st], ptr %10, i64 0, i64 0
  %57 = call i32 @EVP_MAC_init(ptr noundef %55, ptr noundef @key, i64 noundef 16, ptr noundef %56)
  %58 = icmp ne i32 %57, 0
  br i1 %58, label %62, label %59

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

62:                                               ; preds = %51
  %63 = load ptr, ptr %8, align 8, !tbaa !9
  %64 = call i32 @EVP_MAC_update(ptr noundef %63, ptr noundef @data, i64 noundef 16)
  %65 = icmp ne i32 %64, 0
  br i1 %65, label %69, label %66

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

69:                                               ; preds = %62
  %70 = load ptr, ptr %8, align 8, !tbaa !9
  %71 = getelementptr inbounds [16 x i8], ptr %9, i64 0, i64 0
  %72 = call i32 @EVP_MAC_final(ptr noundef %70, ptr noundef %71, ptr noundef %13, i64 noundef 16)
  %73 = icmp ne i32 %72, 0
  br i1 %73, label %77, label %74

74:                                               ; preds = %69
  %75 = load ptr, ptr @stderr, align 8, !tbaa !9
  %76 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %75, ptr noundef @.str.10) #6
  br label %98

77:                                               ; preds = %69
  %78 = call i32 (ptr, ...) @printf(ptr noundef @.str.11)
  %79 = load ptr, ptr @stdout, align 8, !tbaa !9
  %80 = getelementptr inbounds [16 x i8], ptr %9, i64 0, i64 0
  %81 = load i64, ptr %13, align 8, !tbaa !11
  %82 = trunc i64 %81 to i32
  %83 = call i32 @BIO_dump_indent_fp(ptr noundef %79, ptr noundef %80, i32 noundef %82, i32 noundef 2)
  %84 = call i32 @putchar(i32 noundef 10)
  %85 = load i64, ptr %13, align 8, !tbaa !11
  %86 = icmp ne i64 %85, 16
  br i1 %86, label %87, label %90

87:                                               ; preds = %77
  %88 = load ptr, ptr @stderr, align 8, !tbaa !9
  %89 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %88, ptr noundef @.str.12) #6
  br label %98

90:                                               ; preds = %77
  %91 = getelementptr inbounds [16 x i8], ptr %9, i64 0, i64 0
  %92 = call i32 @CRYPTO_memcmp(ptr noundef @expected_output, ptr noundef %91, i64 noundef 16)
  %93 = icmp ne i32 %92, 0
  br i1 %93, label %94, label %97

94:                                               ; preds = %90
  %95 = load ptr, ptr @stderr, align 8, !tbaa !9
  %96 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %95, ptr noundef @.str.13) #6
  br label %98

97:                                               ; preds = %90
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %98

98:                                               ; preds = %97, %94, %87, %74, %66, %59, %39, %31, %22
  %99 = load ptr, ptr %8, align 8, !tbaa !9
  call void @EVP_MAC_CTX_free(ptr noundef %99)
  %100 = load ptr, ptr %7, align 8, !tbaa !9
  call void @EVP_MAC_free(ptr noundef %100)
  %101 = load ptr, ptr %12, align 8, !tbaa !9
  call void @OSSL_LIB_CTX_free(ptr noundef %101)
  %102 = load i32, ptr %6, align 4, !tbaa !5
  %103 = icmp ne i32 %102, 0
  br i1 %103, label %104, label %106

104:                                              ; preds = %98
  %105 = load ptr, ptr @stderr, align 8, !tbaa !9
  call void @ERR_print_errors_fp(ptr noundef %105)
  br label %106

106:                                              ; preds = %104, %98
  %107 = load i32, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 160, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 16, 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 %107
}

; 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 void @OSSL_PARAM_construct_utf8_string(ptr dead_on_unwind writable sret(%struct.ossl_param_st) align 8, ptr noundef, ptr noundef, i64 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

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

declare void @OSSL_PARAM_construct_octet_string(ptr dead_on_unwind writable sret(%struct.ossl_param_st) align 8, ptr noundef, ptr noundef, i64 noundef) #2

declare void @OSSL_PARAM_construct_end(ptr dead_on_unwind writable sret(%struct.ossl_param_st) align 8) #2

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_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

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}
!13 = !{i64 0, i64 8, !9, i64 8, i64 4, !5, i64 16, i64 8, !9, i64 24, i64 8, !11, i64 32, i64 8, !11}


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

%struct.ossl_param_st = type { ptr, i32, ptr, i64, i64 }

@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 [5 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 [7 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [3 x i8], align 1
@iv = external hidden global [12 x i8], align 1
@key = external hidden global [16 x i8], align 16
@.str.8 = external hidden unnamed_addr constant [23 x i8], align 1
@data = external hidden global [16 x i8], align 16
@.str.9 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [16 x i8], align 1
@stdout = external local_unnamed_addr global ptr, align 8
@.str.12 = external hidden unnamed_addr constant [40 x i8], align 1
@expected_output = external hidden constant [16 x i8], align 16
@.str.13 = 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 [16 x i8], align 16
  %4 = alloca [4 x %struct.ossl_param_st], align 16
  %5 = alloca i64, align 8
  %6 = alloca %struct.ossl_param_st, align 8
  %7 = alloca %struct.ossl_param_st, align 8
  %8 = alloca %struct.ossl_param_st, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #6
  call void @llvm.lifetime.start.p0(i64 160, 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
  %9 = tail call ptr @OSSL_LIB_CTX_new() #6
  %10 = icmp eq ptr %9, null
  br i1 %10, label %11, label %14

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

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

18:                                               ; preds = %14
  %19 = load ptr, ptr @stderr, align 8, !tbaa !9
  %20 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %19, ptr noundef nonnull @.str.2) #7
  br label %64

21:                                               ; preds = %14
  %22 = tail call ptr @EVP_MAC_CTX_new(ptr noundef nonnull %16) #6
  %23 = icmp eq ptr %22, null
  br i1 %23, label %24, label %27

24:                                               ; preds = %21
  %25 = load ptr, ptr @stderr, align 8, !tbaa !9
  %26 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %25, ptr noundef nonnull @.str.3) #7
  br label %64

27:                                               ; preds = %21
  %28 = getelementptr inbounds i8, ptr %4, i64 40
  call void @OSSL_PARAM_construct_utf8_string(ptr dead_on_unwind nonnull writable sret(%struct.ossl_param_st) align 8 %4, ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.5, i64 noundef 0) #6
  %29 = load ptr, ptr @propq, align 8, !tbaa !9
  %.not = icmp eq ptr %29, null
  br i1 %.not, label %32, label %30

30:                                               ; preds = %27
  %31 = getelementptr inbounds i8, ptr %4, i64 80
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %6) #6
  call void @OSSL_PARAM_construct_utf8_string(ptr dead_on_unwind nonnull writable sret(%struct.ossl_param_st) align 8 %6, ptr noundef nonnull @.str.6, ptr noundef nonnull %29, i64 noundef 0) #6
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(40) %28, ptr noundef nonnull align 8 dereferenceable(40) %6, i64 40, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %6) #6
  br label %32

32:                                               ; preds = %30, %27
  %.0 = phi ptr [ %31, %30 ], [ %28, %27 ]
  %33 = getelementptr inbounds i8, ptr %.0, i64 40
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %7) #6
  call void @OSSL_PARAM_construct_octet_string(ptr dead_on_unwind nonnull writable sret(%struct.ossl_param_st) align 8 %7, ptr noundef nonnull @.str.7, ptr noundef nonnull @iv, i64 noundef 12) #6
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(40) %.0, ptr noundef nonnull align 8 dereferenceable(40) %7, i64 40, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %7) #6
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %8) #6
  call void @OSSL_PARAM_construct_end(ptr dead_on_unwind nonnull writable sret(%struct.ossl_param_st) align 8 %8) #6
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(40) %33, ptr noundef nonnull align 8 dereferenceable(40) %8, i64 40, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %8) #6
  %34 = call i32 @EVP_MAC_init(ptr noundef nonnull %22, ptr noundef nonnull @key, i64 noundef 16, ptr noundef nonnull %4) #6
  %.not23 = icmp eq i32 %34, 0
  br i1 %.not23, label %35, label %38

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

38:                                               ; preds = %32
  %39 = call i32 @EVP_MAC_update(ptr noundef nonnull %22, ptr noundef nonnull @data, i64 noundef 16) #6
  %.not24 = icmp eq i32 %39, 0
  br i1 %.not24, label %40, label %43

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

43:                                               ; preds = %38
  %44 = call i32 @EVP_MAC_final(ptr noundef nonnull %22, ptr noundef nonnull %3, ptr noundef nonnull %5, i64 noundef 16) #6
  %.not25 = icmp eq i32 %44, 0
  br i1 %.not25, label %45, label %48

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

48:                                               ; preds = %43
  %49 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.11)
  %50 = load ptr, ptr @stdout, align 8, !tbaa !9
  %51 = load i64, ptr %5, align 8, !tbaa !5
  %52 = trunc i64 %51 to i32
  %53 = call i32 @BIO_dump_indent_fp(ptr noundef %50, ptr noundef nonnull %3, i32 noundef %52, i32 noundef 2) #6
  %54 = call i32 @putchar(i32 noundef 10)
  %55 = load i64, ptr %5, align 8, !tbaa !5
  %.not26 = icmp eq i64 %55, 16
  br i1 %.not26, label %59, label %56

56:                                               ; preds = %48
  %57 = load ptr, ptr @stderr, align 8, !tbaa !9
  %58 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %57, ptr noundef nonnull @.str.12) #7
  br label %64

59:                                               ; preds = %48
  %60 = call i32 @CRYPTO_memcmp(ptr noundef nonnull @expected_output, ptr noundef nonnull %3, i64 noundef 16) #6
  %.not27 = icmp eq i32 %60, 0
  br i1 %.not27, label %64, label %61

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

64:                                               ; preds = %59, %61, %56, %45, %40, %35, %24, %18, %11
  %.not28 = phi i1 [ false, %11 ], [ false, %18 ], [ false, %24 ], [ false, %56 ], [ false, %61 ], [ false, %45 ], [ false, %40 ], [ false, %35 ], [ true, %59 ]
  %.018 = phi i32 [ 1, %11 ], [ 1, %18 ], [ 1, %24 ], [ 1, %56 ], [ 1, %61 ], [ 1, %45 ], [ 1, %40 ], [ 1, %35 ], [ 0, %59 ]
  %.017 = phi ptr [ null, %11 ], [ null, %18 ], [ %16, %24 ], [ %16, %56 ], [ %16, %61 ], [ %16, %45 ], [ %16, %40 ], [ %16, %35 ], [ %16, %59 ]
  %.016 = phi ptr [ null, %11 ], [ null, %18 ], [ null, %24 ], [ %22, %56 ], [ %22, %61 ], [ %22, %45 ], [ %22, %40 ], [ %22, %35 ], [ %22, %59 ]
  call void @EVP_MAC_CTX_free(ptr noundef %.016) #6
  call void @EVP_MAC_free(ptr noundef %.017) #6
  call void @OSSL_LIB_CTX_free(ptr noundef %9) #6
  br i1 %.not28, label %67, label %65

65:                                               ; preds = %64
  %66 = load ptr, ptr @stderr, align 8, !tbaa !9
  call void @ERR_print_errors_fp(ptr noundef %66) #6
  br label %67

67:                                               ; preds = %65, %64
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 160, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #6
  ret i32 %.018
}

; 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 void @OSSL_PARAM_construct_utf8_string(ptr dead_on_unwind writable sret(%struct.ossl_param_st) align 8, ptr noundef, ptr noundef, i64 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

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

declare void @OSSL_PARAM_construct_octet_string(ptr dead_on_unwind writable sret(%struct.ossl_param_st) align 8, ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #2

declare void @OSSL_PARAM_construct_end(ptr dead_on_unwind writable sret(%struct.ossl_param_st) align 8) local_unnamed_addr #2

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_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

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 = !{!"any pointer", !7, i64 0}
!11 = !{i64 0, i64 8, !9, i64 8, i64 4, !12, i64 16, i64 8, !9, i64 24, i64 8, !5, i64 32, i64 8, !5}
!12 = !{!13, !13, i64 0}
!13 = !{!"int", !7, i64 0}


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