; LLVM IR from openssl/openssl :: demos/mac (hmac-sha512)

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

@__const.main.digest_name = external hidden unnamed_addr constant [9 x i8], align 1
@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
@key = external hidden global [64 x i8], align 16
@.str.5 = external hidden unnamed_addr constant [23 x i8], align 1
@data = external hidden constant [756 x i8], align 16
@.str.6 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [73 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [16 x i8], align 1
@stdout = external global ptr, align 8
@.str.11 = external hidden unnamed_addr constant [40 x i8], align 1
@expected_output = external hidden constant [64 x i8], align 16
@.str.12 = external hidden unnamed_addr constant [45 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i64, align 8
  %9 = alloca [4 x %struct.ossl_param_st], align 16
  %10 = alloca ptr, align 8
  %11 = alloca [9 x i8], align 1
  %12 = alloca %struct.ossl_param_st, align 8
  %13 = alloca %struct.ossl_param_st, align 8
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  store i32 1, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #6
  store ptr null, ptr %3, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #6
  store ptr null, ptr %4, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  store ptr null, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  store ptr null, ptr %6, align 8, !tbaa !9
  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 i64 0, ptr %8, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 160, ptr %9) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  %14 = getelementptr inbounds [4 x %struct.ossl_param_st], ptr %9, i64 0, i64 0
  store ptr %14, ptr %10, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 9, ptr %11) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %11, ptr align 1 @__const.main.digest_name, i64 9, i1 false)
  %15 = call ptr @OSSL_LIB_CTX_new()
  store ptr %15, ptr %3, align 8, !tbaa !9
  %16 = load ptr, ptr %3, align 8, !tbaa !9
  %17 = icmp eq ptr %16, null
  br i1 %17, label %18, label %21

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

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

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

30:                                               ; preds = %21
  %31 = load ptr, ptr %4, align 8, !tbaa !9
  %32 = call ptr @EVP_MAC_CTX_new(ptr noundef %31)
  store ptr %32, ptr %5, align 8, !tbaa !9
  %33 = load ptr, ptr %5, align 8, !tbaa !9
  %34 = icmp eq ptr %33, null
  br i1 %34, label %35, label %38

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

38:                                               ; preds = %30
  %39 = load ptr, ptr %10, align 8, !tbaa !9
  %40 = getelementptr inbounds %struct.ossl_param_st, ptr %39, i32 1
  store ptr %40, ptr %10, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 40, ptr %12) #6
  %41 = getelementptr inbounds [9 x i8], ptr %11, i64 0, i64 0
  call void @OSSL_PARAM_construct_utf8_string(ptr dead_on_unwind writable sret(%struct.ossl_param_st) align 8 %12, ptr noundef @.str.4, ptr noundef %41, i64 noundef 9)
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %39, ptr align 8 %12, i64 40, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 40, ptr %12) #6
  %42 = load ptr, ptr %10, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 40, ptr %13) #6
  call void @OSSL_PARAM_construct_end(ptr dead_on_unwind writable sret(%struct.ossl_param_st) align 8 %13)
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %42, ptr align 8 %13, i64 40, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 40, ptr %13) #6
  %43 = load ptr, ptr %5, align 8, !tbaa !9
  %44 = getelementptr inbounds [4 x %struct.ossl_param_st], ptr %9, i64 0, i64 0
  %45 = call i32 @EVP_MAC_init(ptr noundef %43, ptr noundef @key, i64 noundef 64, ptr noundef %44)
  %46 = icmp ne i32 %45, 0
  br i1 %46, label %50, label %47

47:                                               ; preds = %38
  %48 = load ptr, ptr @stderr, align 8, !tbaa !9
  %49 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %48, ptr noundef @.str.5) #6
  br label %102

50:                                               ; preds = %38
  %51 = load ptr, ptr %5, align 8, !tbaa !9
  %52 = call i32 @EVP_MAC_update(ptr noundef %51, ptr noundef @data, i64 noundef 756)
  %53 = icmp ne i32 %52, 0
  br i1 %53, label %57, label %54

54:                                               ; preds = %50
  %55 = load ptr, ptr @stderr, align 8, !tbaa !9
  %56 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %55, ptr noundef @.str.6) #6
  br label %102

57:                                               ; preds = %50
  %58 = load ptr, ptr %5, align 8, !tbaa !9
  %59 = call i32 @EVP_MAC_final(ptr noundef %58, ptr noundef null, ptr noundef %8, i64 noundef 0)
  %60 = icmp ne i32 %59, 0
  br i1 %60, label %64, label %61

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

64:                                               ; preds = %57
  %65 = load i64, ptr %8, align 8, !tbaa !11
  %66 = call ptr @CRYPTO_malloc(i64 noundef %65, ptr noundef @.str.8, i32 noundef 130)
  store ptr %66, ptr %7, align 8, !tbaa !9
  %67 = load ptr, ptr %7, align 8, !tbaa !9
  %68 = icmp eq ptr %67, null
  br i1 %68, label %69, label %72

69:                                               ; preds = %64
  %70 = load ptr, ptr @stderr, align 8, !tbaa !9
  %71 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %70, ptr noundef @.str.9) #6
  br label %102

72:                                               ; preds = %64
  %73 = load ptr, ptr %5, align 8, !tbaa !9
  %74 = load ptr, ptr %7, align 8, !tbaa !9
  %75 = load i64, ptr %8, align 8, !tbaa !11
  %76 = call i32 @EVP_MAC_final(ptr noundef %73, ptr noundef %74, ptr noundef %8, i64 noundef %75)
  %77 = icmp ne i32 %76, 0
  br i1 %77, label %81, label %78

78:                                               ; preds = %72
  %79 = load ptr, ptr @stderr, align 8, !tbaa !9
  %80 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %79, ptr noundef @.str.7) #6
  br label %102

81:                                               ; preds = %72
  %82 = call i32 (ptr, ...) @printf(ptr noundef @.str.10)
  %83 = load ptr, ptr @stdout, align 8, !tbaa !9
  %84 = load ptr, ptr %7, align 8, !tbaa !9
  %85 = load i64, ptr %8, align 8, !tbaa !11
  %86 = trunc i64 %85 to i32
  %87 = call i32 @BIO_dump_indent_fp(ptr noundef %83, ptr noundef %84, i32 noundef %86, i32 noundef 2)
  %88 = call i32 @putchar(i32 noundef 10)
  %89 = load i64, ptr %8, align 8, !tbaa !11
  %90 = icmp ne i64 %89, 64
  br i1 %90, label %91, label %94

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

94:                                               ; preds = %81
  %95 = load ptr, ptr %7, align 8, !tbaa !9
  %96 = call i32 @CRYPTO_memcmp(ptr noundef @expected_output, ptr noundef %95, i64 noundef 64)
  %97 = icmp ne i32 %96, 0
  br i1 %97, label %98, label %101

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

101:                                              ; preds = %94
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %102

102:                                              ; preds = %101, %98, %91, %78, %69, %61, %54, %47, %35, %27, %18
  %103 = load i32, ptr %2, align 4, !tbaa !5
  %104 = icmp ne i32 %103, 0
  br i1 %104, label %105, label %107

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

107:                                              ; preds = %105, %102
  %108 = load ptr, ptr %7, align 8, !tbaa !9
  call void @CRYPTO_free(ptr noundef %108, ptr noundef @.str.8, i32 noundef 160)
  %109 = load ptr, ptr %6, align 8, !tbaa !9
  call void @EVP_MD_CTX_free(ptr noundef %109)
  %110 = load ptr, ptr %5, align 8, !tbaa !9
  call void @EVP_MAC_CTX_free(ptr noundef %110)
  %111 = load ptr, ptr %4, align 8, !tbaa !9
  call void @EVP_MAC_free(ptr noundef %111)
  %112 = load ptr, ptr %3, align 8, !tbaa !9
  call void @OSSL_LIB_CTX_free(ptr noundef %112)
  %113 = load i32, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 9, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 160, 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 8, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  ret i32 %113
}

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

; 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) #2

declare ptr @OSSL_LIB_CTX_new() #3

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

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

declare ptr @EVP_MAC_CTX_new(ptr noundef) #3

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) #3

; 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_end(ptr dead_on_unwind writable sret(%struct.ossl_param_st) align 8) #3

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

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

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

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

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

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

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

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

declare void @ERR_print_errors_fp(ptr noundef) #3

declare void @CRYPTO_free(ptr noundef, ptr noundef, i32 noundef) #3

declare void @EVP_MD_CTX_free(ptr noundef) #3

declare void @EVP_MAC_CTX_free(ptr noundef) #3

declare void @EVP_MAC_free(ptr noundef) #3

declare void @OSSL_LIB_CTX_free(ptr noundef) #3

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

@__const.main.digest_name = external hidden unnamed_addr constant [9 x i8], align 1
@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
@key = external hidden global [64 x i8], align 16
@.str.5 = external hidden unnamed_addr constant [23 x i8], align 1
@data = external hidden constant [756 x i8], align 16
@.str.6 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [73 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [16 x i8], align 1
@stdout = external local_unnamed_addr global ptr, align 8
@.str.11 = external hidden unnamed_addr constant [40 x i8], align 1
@expected_output = external hidden constant [64 x i8], align 16
@.str.12 = external hidden unnamed_addr constant [45 x i8], align 1

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

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

10:                                               ; preds = %0
  %11 = load ptr, ptr @propq, align 8, !tbaa !9
  %12 = tail call ptr @EVP_MAC_fetch(ptr noundef nonnull %5, ptr noundef nonnull @.str.1, ptr noundef %11) #6
  %13 = icmp eq ptr %12, null
  br i1 %13, label %14, label %17

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

17:                                               ; preds = %10
  %18 = tail call ptr @EVP_MAC_CTX_new(ptr noundef nonnull %12) #6
  %19 = icmp eq ptr %18, null
  br i1 %19, label %20, label %23

20:                                               ; preds = %17
  %21 = load ptr, ptr @stderr, align 8, !tbaa !9
  %22 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %21, ptr noundef nonnull @.str.3) #7
  br label %68

23:                                               ; preds = %17
  %24 = getelementptr inbounds i8, ptr %2, i64 40
  call void @OSSL_PARAM_construct_utf8_string(ptr dead_on_unwind nonnull writable sret(%struct.ossl_param_st) align 8 %2, ptr noundef nonnull @.str.4, ptr noundef nonnull %3, i64 noundef 9) #6
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %4) #6
  call void @OSSL_PARAM_construct_end(ptr dead_on_unwind nonnull writable sret(%struct.ossl_param_st) align 8 %4) #6
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(40) %24, ptr noundef nonnull align 8 dereferenceable(40) %4, i64 40, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %4) #6
  %25 = call i32 @EVP_MAC_init(ptr noundef nonnull %18, ptr noundef nonnull @key, i64 noundef 64, ptr noundef nonnull %2) #6
  %.not = icmp eq i32 %25, 0
  br i1 %.not, label %26, label %29

26:                                               ; preds = %23
  %27 = load ptr, ptr @stderr, align 8, !tbaa !9
  %28 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %27, ptr noundef nonnull @.str.5) #7
  br label %68

29:                                               ; preds = %23
  %30 = call i32 @EVP_MAC_update(ptr noundef nonnull %18, ptr noundef nonnull @data, i64 noundef 756) #6
  %.not30 = icmp eq i32 %30, 0
  br i1 %.not30, label %31, label %34

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

34:                                               ; preds = %29
  %35 = call i32 @EVP_MAC_final(ptr noundef nonnull %18, ptr noundef null, ptr noundef nonnull %1, i64 noundef 0) #6
  %.not31 = icmp eq i32 %35, 0
  br i1 %.not31, label %36, label %39

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

39:                                               ; preds = %34
  %40 = load i64, ptr %1, align 8, !tbaa !5
  %41 = call ptr @CRYPTO_malloc(i64 noundef %40, ptr noundef nonnull @.str.8, i32 noundef 130) #6
  %42 = icmp eq ptr %41, null
  br i1 %42, label %43, label %46

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

46:                                               ; preds = %39
  %47 = load i64, ptr %1, align 8, !tbaa !5
  %48 = call i32 @EVP_MAC_final(ptr noundef nonnull %18, ptr noundef nonnull %41, ptr noundef nonnull %1, i64 noundef %47) #6
  %.not32 = icmp eq i32 %48, 0
  br i1 %.not32, label %49, label %52

49:                                               ; preds = %46
  %50 = load ptr, ptr @stderr, align 8, !tbaa !9
  %51 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %50, ptr noundef nonnull @.str.7) #7
  br label %68

52:                                               ; preds = %46
  %53 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.10)
  %54 = load ptr, ptr @stdout, align 8, !tbaa !9
  %55 = load i64, ptr %1, align 8, !tbaa !5
  %56 = trunc i64 %55 to i32
  %57 = call i32 @BIO_dump_indent_fp(ptr noundef %54, ptr noundef nonnull %41, i32 noundef %56, i32 noundef 2) #6
  %58 = call i32 @putchar(i32 noundef 10)
  %59 = load i64, ptr %1, align 8, !tbaa !5
  %.not33 = icmp eq i64 %59, 64
  br i1 %.not33, label %63, label %60

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

63:                                               ; preds = %52
  %64 = call i32 @CRYPTO_memcmp(ptr noundef nonnull @expected_output, ptr noundef nonnull %41, i64 noundef 64) #6
  %.not34 = icmp eq i32 %64, 0
  br i1 %.not34, label %70, label %65

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

68:                                               ; preds = %7, %14, %20, %43, %60, %65, %49, %36, %31, %26
  %.023.ph = phi ptr [ %12, %26 ], [ %12, %31 ], [ %12, %36 ], [ %12, %49 ], [ %12, %65 ], [ %12, %60 ], [ %12, %43 ], [ %12, %20 ], [ null, %14 ], [ null, %7 ]
  %.022.ph = phi ptr [ %18, %26 ], [ %18, %31 ], [ %18, %36 ], [ %18, %49 ], [ %18, %65 ], [ %18, %60 ], [ %18, %43 ], [ null, %20 ], [ null, %14 ], [ null, %7 ]
  %.0.ph = phi ptr [ null, %26 ], [ null, %31 ], [ null, %36 ], [ %41, %49 ], [ %41, %65 ], [ %41, %60 ], [ null, %43 ], [ null, %20 ], [ null, %14 ], [ null, %7 ]
  %69 = load ptr, ptr @stderr, align 8, !tbaa !9
  call void @ERR_print_errors_fp(ptr noundef %69) #6
  br label %70

70:                                               ; preds = %63, %68
  %.048 = phi ptr [ %.0.ph, %68 ], [ %41, %63 ]
  %.02146 = phi i32 [ 1, %68 ], [ 0, %63 ]
  %.02244 = phi ptr [ %.022.ph, %68 ], [ %18, %63 ]
  %.02342 = phi ptr [ %.023.ph, %68 ], [ %12, %63 ]
  call void @CRYPTO_free(ptr noundef %.048, ptr noundef nonnull @.str.8, i32 noundef 160) #6
  call void @EVP_MD_CTX_free(ptr noundef null) #6
  call void @EVP_MAC_CTX_free(ptr noundef %.02244) #6
  call void @EVP_MAC_free(ptr noundef %.02342) #6
  call void @OSSL_LIB_CTX_free(ptr noundef %5) #6
  call void @llvm.lifetime.end.p0(i64 9, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 160, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #6
  ret i32 %.02146
}

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

; 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) #2

declare ptr @OSSL_LIB_CTX_new() local_unnamed_addr #3

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

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

declare ptr @EVP_MAC_CTX_new(ptr noundef) local_unnamed_addr #3

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 #3

; 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_end(ptr dead_on_unwind writable sret(%struct.ossl_param_st) align 8) local_unnamed_addr #3

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

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

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

declare ptr @CRYPTO_malloc(i64 noundef, ptr noundef, i32 noundef) local_unnamed_addr #3

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

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

; 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 #3

declare void @ERR_print_errors_fp(ptr noundef) local_unnamed_addr #3

declare void @CRYPTO_free(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #3

declare void @EVP_MD_CTX_free(ptr noundef) local_unnamed_addr #3

declare void @EVP_MAC_CTX_free(ptr noundef) local_unnamed_addr #3

declare void @EVP_MAC_free(ptr noundef) local_unnamed_addr #3

declare void @OSSL_LIB_CTX_free(ptr noundef) local_unnamed_addr #3

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #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: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,MemCpyOptPass,SROAPass,SimplifyCFGPass,TailCallElimPass