; LLVM IR from openssl/openssl :: crypto/evp (pbe_scrypt)

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

@.str = external hidden unnamed_addr constant [1 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [73 x i8], align 1
@__func__.EVP_PBE_scrypt_ex = external hidden unnamed_addr constant [18 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [13 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @EVP_PBE_scrypt_ex(ptr noundef %0, i64 noundef %1, ptr noundef %2, i64 noundef %3, i64 noundef %4, i64 noundef %5, i64 noundef %6, i64 noundef %7, ptr noundef %8, i64 noundef %9, ptr noundef %10, ptr noundef %11) #0 {
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca i64, align 8
  %16 = alloca ptr, align 8
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  %19 = alloca i64, align 8
  %20 = alloca i64, align 8
  %21 = alloca i64, align 8
  %22 = alloca ptr, align 8
  %23 = alloca i64, align 8
  %24 = alloca ptr, align 8
  %25 = alloca ptr, align 8
  %26 = alloca ptr, align 8
  %27 = alloca i32, align 4
  %28 = alloca ptr, align 8
  %29 = alloca ptr, align 8
  %30 = alloca [7 x %struct.ossl_param_st], align 16
  %31 = alloca ptr, align 8
  %32 = alloca i32, align 4
  %33 = alloca %struct.ossl_param_st, align 8
  %34 = alloca %struct.ossl_param_st, align 8
  %35 = alloca %struct.ossl_param_st, align 8
  %36 = alloca %struct.ossl_param_st, align 8
  %37 = alloca %struct.ossl_param_st, align 8
  %38 = alloca %struct.ossl_param_st, align 8
  %39 = alloca %struct.ossl_param_st, align 8
  store ptr %0, ptr %14, align 8, !tbaa !5
  store i64 %1, ptr %15, align 8, !tbaa !9
  store ptr %2, ptr %16, align 8, !tbaa !5
  store i64 %3, ptr %17, align 8, !tbaa !9
  store i64 %4, ptr %18, align 8, !tbaa !9
  store i64 %5, ptr %19, align 8, !tbaa !9
  store i64 %6, ptr %20, align 8, !tbaa !9
  store i64 %7, ptr %21, align 8, !tbaa !9
  store ptr %8, ptr %22, align 8, !tbaa !5
  store i64 %9, ptr %23, align 8, !tbaa !9
  store ptr %10, ptr %24, align 8, !tbaa !5
  store ptr %11, ptr %25, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #4
  store ptr @.str, ptr %26, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #4
  store i32 1, ptr %27, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #4
  call void @llvm.lifetime.start.p0(i64 280, ptr %30) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #4
  %40 = getelementptr inbounds [7 x %struct.ossl_param_st], ptr %30, i64 0, i64 0
  store ptr %40, ptr %31, align 8, !tbaa !5
  %41 = load i64, ptr %19, align 8, !tbaa !9
  %42 = icmp ugt i64 %41, 4294967295
  br i1 %42, label %46, label %43

43:                                               ; preds = %12
  %44 = load i64, ptr %20, align 8, !tbaa !9
  %45 = icmp ugt i64 %44, 4294967295
  br i1 %45, label %46, label %47

46:                                               ; preds = %43, %12
  call void @ERR_new()
  call void @ERR_set_debug(ptr noundef @.str.1, i32 noundef 50, ptr noundef @__func__.EVP_PBE_scrypt_ex)
  call void (i32, i32, ptr, ...) @ERR_set_error(i32 noundef 6, i32 noundef 187, ptr noundef null)
  store i32 0, ptr %13, align 4
  store i32 1, ptr %32, align 4
  br label %99

47:                                               ; preds = %43
  %48 = load ptr, ptr %14, align 8, !tbaa !5
  %49 = icmp eq ptr %48, null
  br i1 %49, label %50, label %52

50:                                               ; preds = %47
  %51 = load ptr, ptr %26, align 8, !tbaa !5
  store ptr %51, ptr %14, align 8, !tbaa !5
  store i64 0, ptr %15, align 8, !tbaa !9
  br label %52

52:                                               ; preds = %50, %47
  %53 = load ptr, ptr %16, align 8, !tbaa !5
  %54 = icmp eq ptr %53, null
  br i1 %54, label %55, label %57

55:                                               ; preds = %52
  %56 = load ptr, ptr %26, align 8, !tbaa !5
  store ptr %56, ptr %16, align 8, !tbaa !5
  store i64 0, ptr %17, align 8, !tbaa !9
  br label %57

57:                                               ; preds = %55, %52
  %58 = load i64, ptr %21, align 8, !tbaa !9
  %59 = icmp eq i64 %58, 0
  br i1 %59, label %60, label %61

60:                                               ; preds = %57
  store i64 33554432, ptr %21, align 8, !tbaa !9
  br label %61

61:                                               ; preds = %60, %57
  %62 = load ptr, ptr %24, align 8, !tbaa !5
  %63 = load ptr, ptr %25, align 8, !tbaa !5
  %64 = call ptr @EVP_KDF_fetch(ptr noundef %62, ptr noundef @.str.2, ptr noundef %63)
  store ptr %64, ptr %28, align 8, !tbaa !5
  %65 = load ptr, ptr %28, align 8, !tbaa !5
  %66 = call ptr @EVP_KDF_CTX_new(ptr noundef %65)
  store ptr %66, ptr %29, align 8, !tbaa !5
  %67 = load ptr, ptr %28, align 8, !tbaa !5
  call void @EVP_KDF_free(ptr noundef %67)
  %68 = load ptr, ptr %29, align 8, !tbaa !5
  %69 = icmp eq ptr %68, null
  br i1 %69, label %70, label %71

70:                                               ; preds = %61
  store i32 0, ptr %13, align 4
  store i32 1, ptr %32, align 4
  br label %99

71:                                               ; preds = %61
  %72 = load ptr, ptr %31, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.ossl_param_st, ptr %72, i32 1
  store ptr %73, ptr %31, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 40, ptr %33) #4
  %74 = load ptr, ptr %14, align 8, !tbaa !5
  %75 = load i64, ptr %15, align 8, !tbaa !9
  call void @OSSL_PARAM_construct_octet_string(ptr dead_on_unwind writable sret(%struct.ossl_param_st) align 8 %33, ptr noundef @.str.3, ptr noundef %74, i64 noundef %75)
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %72, ptr align 8 %33, i64 40, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 40, ptr %33) #4
  %76 = load ptr, ptr %31, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.ossl_param_st, ptr %76, i32 1
  store ptr %77, ptr %31, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 40, ptr %34) #4
  %78 = load ptr, ptr %16, align 8, !tbaa !5
  %79 = load i64, ptr %17, align 8, !tbaa !9
  call void @OSSL_PARAM_construct_octet_string(ptr dead_on_unwind writable sret(%struct.ossl_param_st) align 8 %34, ptr noundef @.str.4, ptr noundef %78, i64 noundef %79)
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %76, ptr align 8 %34, i64 40, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 40, ptr %34) #4
  %80 = load ptr, ptr %31, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.ossl_param_st, ptr %80, i32 1
  store ptr %81, ptr %31, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 40, ptr %35) #4
  call void @OSSL_PARAM_construct_uint64(ptr dead_on_unwind writable sret(%struct.ossl_param_st) align 8 %35, ptr noundef @.str.5, ptr noundef %18)
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %80, ptr align 8 %35, i64 40, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 40, ptr %35) #4
  %82 = load ptr, ptr %31, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.ossl_param_st, ptr %82, i32 1
  store ptr %83, ptr %31, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 40, ptr %36) #4
  call void @OSSL_PARAM_construct_uint64(ptr dead_on_unwind writable sret(%struct.ossl_param_st) align 8 %36, ptr noundef @.str.6, ptr noundef %19)
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %82, ptr align 8 %36, i64 40, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 40, ptr %36) #4
  %84 = load ptr, ptr %31, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.ossl_param_st, ptr %84, i32 1
  store ptr %85, ptr %31, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 40, ptr %37) #4
  call void @OSSL_PARAM_construct_uint64(ptr dead_on_unwind writable sret(%struct.ossl_param_st) align 8 %37, ptr noundef @.str.7, ptr noundef %20)
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %84, ptr align 8 %37, i64 40, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 40, ptr %37) #4
  %86 = load ptr, ptr %31, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.ossl_param_st, ptr %86, i32 1
  store ptr %87, ptr %31, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 40, ptr %38) #4
  call void @OSSL_PARAM_construct_uint64(ptr dead_on_unwind writable sret(%struct.ossl_param_st) align 8 %38, ptr noundef @.str.8, ptr noundef %21)
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %86, ptr align 8 %38, i64 40, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 40, ptr %38) #4
  %88 = load ptr, ptr %31, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 40, ptr %39) #4
  call void @OSSL_PARAM_construct_end(ptr dead_on_unwind writable sret(%struct.ossl_param_st) align 8 %39)
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %88, ptr align 8 %39, i64 40, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 40, ptr %39) #4
  %89 = load ptr, ptr %29, align 8, !tbaa !5
  %90 = load ptr, ptr %22, align 8, !tbaa !5
  %91 = load i64, ptr %23, align 8, !tbaa !9
  %92 = getelementptr inbounds [7 x %struct.ossl_param_st], ptr %30, i64 0, i64 0
  %93 = call i32 @EVP_KDF_derive(ptr noundef %89, ptr noundef %90, i64 noundef %91, ptr noundef %92)
  %94 = icmp ne i32 %93, 1
  br i1 %94, label %95, label %96

95:                                               ; preds = %71
  store i32 0, ptr %27, align 4, !tbaa !11
  br label %96

96:                                               ; preds = %95, %71
  %97 = load ptr, ptr %29, align 8, !tbaa !5
  call void @EVP_KDF_CTX_free(ptr noundef %97)
  %98 = load i32, ptr %27, align 4, !tbaa !11
  store i32 %98, ptr %13, align 4
  store i32 1, ptr %32, align 4
  br label %99

99:                                               ; preds = %96, %70, %46
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #4
  call void @llvm.lifetime.end.p0(i64 280, ptr %30) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #4
  %100 = load i32, ptr %13, align 4
  ret i32 %100
}

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

declare void @ERR_new() #2

declare void @ERR_set_debug(ptr noundef, i32 noundef, ptr noundef) #2

declare void @ERR_set_error(i32 noundef, i32 noundef, ptr noundef, ...) #2

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

declare ptr @EVP_KDF_CTX_new(ptr noundef) #2

declare void @EVP_KDF_free(ptr noundef) #2

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

; 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) #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_uint64(ptr dead_on_unwind writable sret(%struct.ossl_param_st) align 8, ptr noundef, ptr noundef) #2

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

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

declare void @EVP_KDF_CTX_free(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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{i64 0, i64 8, !5, i64 8, i64 4, !11, i64 16, i64 8, !5, i64 24, i64 8, !9, i64 32, i64 8, !9}


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

@.str = external hidden unnamed_addr constant [1 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [73 x i8], align 1
@__func__.EVP_PBE_scrypt_ex = external hidden unnamed_addr constant [18 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [13 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 2) i32 @EVP_PBE_scrypt_ex(ptr noundef %0, i64 noundef %1, ptr noundef %2, i64 noundef %3, i64 noundef %4, i64 noundef %5, i64 noundef %6, i64 noundef %7, ptr noundef %8, i64 noundef %9, ptr noundef %10, ptr noundef %11) local_unnamed_addr #0 {
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca [7 x %struct.ossl_param_st], align 16
  %18 = alloca %struct.ossl_param_st, align 8
  %19 = alloca %struct.ossl_param_st, align 8
  %20 = alloca %struct.ossl_param_st, align 8
  %21 = alloca %struct.ossl_param_st, align 8
  %22 = alloca %struct.ossl_param_st, align 8
  %23 = alloca %struct.ossl_param_st, align 8
  store i64 %4, ptr %13, align 8, !tbaa !5
  store i64 %5, ptr %14, align 8, !tbaa !5
  store i64 %6, ptr %15, align 8, !tbaa !5
  store i64 %7, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 280, ptr nonnull %17) #4
  %24 = or i64 %6, %5
  %or.cond.not = icmp ult i64 %24, 4294967296
  br i1 %or.cond.not, label %26, label %25

25:                                               ; preds = %12
  tail call void @ERR_new() #4
  tail call void @ERR_set_debug(ptr noundef nonnull @.str.1, i32 noundef 50, ptr noundef nonnull @__func__.EVP_PBE_scrypt_ex) #4
  tail call void (i32, i32, ptr, ...) @ERR_set_error(i32 noundef 6, i32 noundef 187, ptr noundef null) #4
  br label %43

26:                                               ; preds = %12
  %27 = icmp eq ptr %0, null
  %spec.select = select i1 %27, i64 0, i64 %1
  %spec.select34 = select i1 %27, ptr @.str, ptr %0
  %28 = icmp eq ptr %2, null
  %.030 = select i1 %28, i64 0, i64 %3
  %.029 = select i1 %28, ptr @.str, ptr %2
  %29 = icmp eq i64 %7, 0
  br i1 %29, label %30, label %31

30:                                               ; preds = %26
  store i64 33554432, ptr %16, align 8, !tbaa !5
  br label %31

31:                                               ; preds = %30, %26
  %32 = tail call ptr @EVP_KDF_fetch(ptr noundef %10, ptr noundef nonnull @.str.2, ptr noundef %11) #4
  %33 = tail call ptr @EVP_KDF_CTX_new(ptr noundef %32) #4
  tail call void @EVP_KDF_free(ptr noundef %32) #4
  %34 = icmp eq ptr %33, null
  br i1 %34, label %43, label %35

35:                                               ; preds = %31
  %36 = getelementptr inbounds i8, ptr %17, i64 40
  call void @OSSL_PARAM_construct_octet_string(ptr dead_on_unwind nonnull writable sret(%struct.ossl_param_st) align 8 %17, ptr noundef nonnull @.str.3, ptr noundef nonnull %spec.select34, i64 noundef %spec.select) #4
  %37 = getelementptr inbounds i8, ptr %17, i64 80
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %18) #4
  call void @OSSL_PARAM_construct_octet_string(ptr dead_on_unwind nonnull writable sret(%struct.ossl_param_st) align 8 %18, ptr noundef nonnull @.str.4, ptr noundef nonnull %.029, i64 noundef %.030) #4
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(40) %36, ptr noundef nonnull align 8 dereferenceable(40) %18, i64 40, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %18) #4
  %38 = getelementptr inbounds i8, ptr %17, i64 120
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %19) #4
  call void @OSSL_PARAM_construct_uint64(ptr dead_on_unwind nonnull writable sret(%struct.ossl_param_st) align 8 %19, ptr noundef nonnull @.str.5, ptr noundef nonnull %13) #4
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(40) %37, ptr noundef nonnull align 8 dereferenceable(40) %19, i64 40, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %19) #4
  %39 = getelementptr inbounds i8, ptr %17, i64 160
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %20) #4
  call void @OSSL_PARAM_construct_uint64(ptr dead_on_unwind nonnull writable sret(%struct.ossl_param_st) align 8 %20, ptr noundef nonnull @.str.6, ptr noundef nonnull %14) #4
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(40) %38, ptr noundef nonnull align 8 dereferenceable(40) %20, i64 40, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %20) #4
  %40 = getelementptr inbounds i8, ptr %17, i64 200
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %21) #4
  call void @OSSL_PARAM_construct_uint64(ptr dead_on_unwind nonnull writable sret(%struct.ossl_param_st) align 8 %21, ptr noundef nonnull @.str.7, ptr noundef nonnull %15) #4
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(40) %39, ptr noundef nonnull align 8 dereferenceable(40) %21, i64 40, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %21) #4
  %41 = getelementptr inbounds i8, ptr %17, i64 240
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %22) #4
  call void @OSSL_PARAM_construct_uint64(ptr dead_on_unwind nonnull writable sret(%struct.ossl_param_st) align 8 %22, ptr noundef nonnull @.str.8, ptr noundef nonnull %16) #4
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(40) %40, ptr noundef nonnull align 8 dereferenceable(40) %22, i64 40, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %22) #4
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %23) #4
  call void @OSSL_PARAM_construct_end(ptr dead_on_unwind nonnull writable sret(%struct.ossl_param_st) align 8 %23) #4
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(40) %41, ptr noundef nonnull align 8 dereferenceable(40) %23, i64 40, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %23) #4
  %42 = call i32 @EVP_KDF_derive(ptr noundef nonnull %33, ptr noundef %8, i64 noundef %9, ptr noundef nonnull %17) #4
  %.not = icmp eq i32 %42, 1
  %spec.select35 = zext i1 %.not to i32
  call void @EVP_KDF_CTX_free(ptr noundef nonnull %33) #4
  br label %43

43:                                               ; preds = %31, %35, %25
  %.0 = phi i32 [ 0, %25 ], [ %spec.select35, %35 ], [ 0, %31 ]
  call void @llvm.lifetime.end.p0(i64 280, ptr nonnull %17) #4
  ret i32 %.0
}

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

declare void @ERR_new() local_unnamed_addr #2

declare void @ERR_set_debug(ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #2

declare void @ERR_set_error(i32 noundef, i32 noundef, ptr noundef, ...) local_unnamed_addr #2

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

declare ptr @EVP_KDF_CTX_new(ptr noundef) local_unnamed_addr #2

declare void @EVP_KDF_free(ptr noundef) local_unnamed_addr #2

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

; 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) #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_uint64(ptr dead_on_unwind writable sret(%struct.ossl_param_st) align 8, ptr noundef, ptr 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_KDF_derive(ptr noundef, ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #2

declare void @EVP_KDF_CTX_free(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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 = !{i64 0, i64 8, !10, i64 8, i64 4, !12, i64 16, i64 8, !10, i64 24, i64 8, !5, i64 32, i64 8, !5}
!10 = !{!11, !11, i64 0}
!11 = !{!"any pointer", !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"int", !7, i64 0}


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