; LLVM IR from peacemakr-io/peacemakr-core-crypto :: src/ffi/cpp/test (test)

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

%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"struct.peacemakr::Plaintext" = type { %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string" }
%"struct.std::pair" = type { ptr, %struct.crypto_config_t }
%struct.crypto_config_t = type { i32, i32, i32, i32 }
%"struct.std::pair.1" = type <{ %"struct.peacemakr::Plaintext", i8, [7 x i8] }>
%"class.peacemakr::RandomDevice" = type { %struct.random_device_t }
%struct.random_device_t = type { ptr, ptr }
%"class.peacemakr::Key" = type { ptr }
%"class.peacemakr::CryptoContext" = type { %"class.std::function" }
%"class.std::function" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }

@.str = external hidden unnamed_addr constant [21 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [94 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [44 x i8], align 1
@__PRETTY_FUNCTION__._Z19test_sign_symmetric16symmetric_cipher24message_digest_algorithm = external hidden unnamed_addr constant [69 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [9 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z6log_fnRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(32)) #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z17get_random_stringB5cxx11v(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8) #0

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN9peacemakr9PlaintextC2Ev(ptr noundef nonnull align 8 dereferenceable(64)) unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) #2 align 2

declare void @_ZN9peacemakr12RandomDeviceC1Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt8functionIFvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEC2IRS8_vEEOT_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull) unnamed_addr #2 align 2

declare void @_ZN9peacemakr13CryptoContextC1ESt8functionIFvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEE(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 align 2

declare noundef ptr @_ZN9peacemakr13CryptoContext7EncryptERKNS_3KeyERKNS_9PlaintextERNS_12RandomDeviceE(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(64), ptr noundef nonnull align 8 dereferenceable(16)) #4

; Function Attrs: mustprogress nounwind uwtable
declare noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32)) #2 align 2

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #5

declare void @_ZN9peacemakr13CryptoContext9SerializeB5cxx11E24message_digest_algorithmPv(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, ptr noundef) #4

declare void @_ZN9peacemakr13CryptoContext20ExtractUnverifiedAADERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind writable sret(%"struct.peacemakr::Plaintext") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZSteqIcEN9__gnu_cxx11__enable_ifIXsr9__is_charIT_EE7__valueEbE6__typeERKNSt7__cxx1112basic_stringIS2_St11char_traitsIS2_ESaIS2_EEESC_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN9peacemakr9PlaintextD2Ev(ptr noundef nonnull align 8 dereferenceable(64)) unnamed_addr #3 align 2

declare void @_ZN9peacemakr13CryptoContext11DeserializeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind writable sret(%"struct.std::pair") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) #4

declare void @_ZN9peacemakr13CryptoContext7DecryptERKNS_3KeyEPv(ptr dead_on_unwind writable sret(%"struct.std::pair.1") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt4pairIN9peacemakr9PlaintextEbED2Ev(ptr noundef nonnull align 8 dereferenceable(65)) unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN9peacemakr13CryptoContextD2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2 align 2

; Function Attrs: nounwind
declare void @_ZN9peacemakr3KeyD1Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #6

declare void @_ZN9peacemakr3KeyC1E16symmetric_cipherRNS_12RandomDeviceE(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef, ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #4

; Function Attrs: mustprogress uwtable
define dso_local void @_Z19test_sign_symmetric16symmetric_cipher24message_digest_algorithm(i32 noundef %0, i32 noundef %1) #0 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca %"struct.peacemakr::Plaintext", align 8
  %6 = alloca %"class.std::__cxx11::basic_string", align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca %"class.std::__cxx11::basic_string", align 8
  %10 = alloca %"class.peacemakr::RandomDevice", align 8
  %11 = alloca %"class.peacemakr::Key", align 8
  %12 = alloca %"class.peacemakr::CryptoContext", align 8
  %13 = alloca %"class.std::function", align 8
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca %"class.std::__cxx11::basic_string", align 8
  %17 = alloca %"struct.peacemakr::Plaintext", align 8
  %18 = alloca %"struct.std::pair", align 8
  %19 = alloca %"struct.std::pair.1", align 8
  %20 = alloca i8, align 1
  store i32 %0, ptr %3, align 4, !tbaa !5
  store i32 %1, ptr %4, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 64, ptr %5) #7
  call void @_ZN9peacemakr9PlaintextC2Ev(ptr noundef nonnull align 8 dereferenceable(64) %5) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %6) #7
  invoke void @_Z17get_random_stringB5cxx11v(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %6)
          to label %21 unwind label %39

21:                                               ; preds = %2
  %22 = getelementptr inbounds %"struct.peacemakr::Plaintext", ptr %5, i32 0, i32 0
  %23 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %22, ptr noundef nonnull align 8 dereferenceable(32) %6) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %6) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %9) #7
  invoke void @_Z17get_random_stringB5cxx11v(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %9)
          to label %24 unwind label %43

24:                                               ; preds = %21
  %25 = getelementptr inbounds %"struct.peacemakr::Plaintext", ptr %5, i32 0, i32 1
  %26 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %25, ptr noundef nonnull align 8 dereferenceable(32) %9) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #7
  invoke void @_ZN9peacemakr12RandomDeviceC1Ev(ptr noundef nonnull align 8 dereferenceable(16) %10)
          to label %27 unwind label %47

27:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  %28 = load i32, ptr %3, align 4, !tbaa !5
  invoke void @_ZN9peacemakr3KeyC1E16symmetric_cipherRNS_12RandomDeviceE(ptr noundef nonnull align 8 dereferenceable(8) %11, i32 noundef %28, ptr noundef nonnull align 8 dereferenceable(16) %10)
          to label %29 unwind label %51

29:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 32, ptr %12) #7
  call void @_ZNSt8functionIFvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEC2IRS8_vEEOT_(ptr noundef nonnull align 8 dereferenceable(32) %13, ptr noundef nonnull @_Z6log_fnRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE) #7
  invoke void @_ZN9peacemakr13CryptoContextC1ESt8functionIFvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEE(ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef %13)
          to label %30 unwind label %55

30:                                               ; preds = %29
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %31 = invoke noundef ptr @_ZN9peacemakr13CryptoContext7EncryptERKNS_3KeyERKNS_9PlaintextERNS_12RandomDeviceE(ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(64) %5, ptr noundef nonnull align 8 dereferenceable(16) %10)
          to label %32 unwind label %59

32:                                               ; preds = %30
  store ptr %31, ptr %14, align 8, !tbaa !11
  %33 = load ptr, ptr %14, align 8, !tbaa !11
  %34 = icmp eq ptr %33, null
  br i1 %34, label %35, label %63

35:                                               ; preds = %32
  %36 = getelementptr inbounds %"struct.peacemakr::Plaintext", ptr %5, i32 0, i32 0
  %37 = call noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %36) #7
  br i1 %37, label %38, label %63

38:                                               ; preds = %35
  store i32 1, ptr %15, align 4
  br label %159

39:                                               ; preds = %2
  %40 = landingpad { ptr, i32 }
          cleanup
  %41 = extractvalue { ptr, i32 } %40, 0
  store ptr %41, ptr %7, align 8
  %42 = extractvalue { ptr, i32 } %40, 1
  store i32 %42, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 32, ptr %6) #7
  br label %170

43:                                               ; preds = %21
  %44 = landingpad { ptr, i32 }
          cleanup
  %45 = extractvalue { ptr, i32 } %44, 0
  store ptr %45, ptr %7, align 8
  %46 = extractvalue { ptr, i32 } %44, 1
  store i32 %46, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #7
  br label %170

47:                                               ; preds = %24
  %48 = landingpad { ptr, i32 }
          cleanup
  %49 = extractvalue { ptr, i32 } %48, 0
  store ptr %49, ptr %7, align 8
  %50 = extractvalue { ptr, i32 } %48, 1
  store i32 %50, ptr %8, align 4
  br label %169

51:                                               ; preds = %27
  %52 = landingpad { ptr, i32 }
          cleanup
  %53 = extractvalue { ptr, i32 } %52, 0
  store ptr %53, ptr %7, align 8
  %54 = extractvalue { ptr, i32 } %52, 1
  store i32 %54, ptr %8, align 4
  br label %168

55:                                               ; preds = %29
  %56 = landingpad { ptr, i32 }
          cleanup
  %57 = extractvalue { ptr, i32 } %56, 0
  store ptr %57, ptr %7, align 8
  %58 = extractvalue { ptr, i32 } %56, 1
  store i32 %58, ptr %8, align 4
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #7
  br label %167

59:                                               ; preds = %70, %30
  %60 = landingpad { ptr, i32 }
          cleanup
  %61 = extractvalue { ptr, i32 } %60, 0
  store ptr %61, ptr %7, align 8
  %62 = extractvalue { ptr, i32 } %60, 1
  store i32 %62, ptr %8, align 4
  br label %166

63:                                               ; preds = %35, %32
  %64 = load ptr, ptr %14, align 8, !tbaa !11
  %65 = icmp ne ptr %64, null
  br i1 %65, label %66, label %67

66:                                               ; preds = %63
  br label %69

67:                                               ; preds = %63
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 129, ptr noundef @__PRETTY_FUNCTION__._Z19test_sign_symmetric16symmetric_cipher24message_digest_algorithm) #8
  unreachable

68:                                               ; No predecessors!
  br label %69

69:                                               ; preds = %68, %66
  br label %70

70:                                               ; preds = %69
  %71 = load i32, ptr %4, align 4, !tbaa !9
  %72 = load ptr, ptr %14, align 8, !tbaa !11
  %73 = invoke noundef zeroext i1 @_ZN9peacemakr13CryptoContext4SignERKNS_3KeyERKNS_9PlaintextE24message_digest_algorithmPv(ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(64) %5, i32 noundef %71, ptr noundef %72)
          to label %74 unwind label %59

74:                                               ; preds = %70
  br i1 %73, label %75, label %76

75:                                               ; preds = %74
  br label %78

76:                                               ; preds = %74
  call void @__assert_fail(ptr noundef @.str.7, ptr noundef @.str.1, i32 noundef 131, ptr noundef @__PRETTY_FUNCTION__._Z19test_sign_symmetric16symmetric_cipher24message_digest_algorithm) #8
  unreachable

77:                                               ; No predecessors!
  br label %78

78:                                               ; preds = %77, %75
  call void @llvm.lifetime.start.p0(i64 32, ptr %16) #7
  %79 = load i32, ptr %4, align 4, !tbaa !9
  %80 = load ptr, ptr %14, align 8, !tbaa !11
  invoke void @_ZN9peacemakr13CryptoContext9SerializeB5cxx11E24message_digest_algorithmPv(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %16, ptr noundef nonnull align 8 dereferenceable(32) %12, i32 noundef %79, ptr noundef %80)
          to label %81 unwind label %86

81:                                               ; preds = %78
  %82 = call noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %16) #7
  %83 = xor i1 %82, true
  br i1 %83, label %84, label %85

84:                                               ; preds = %81
  br label %91

85:                                               ; preds = %81
  call void @__assert_fail(ptr noundef @.str.2, ptr noundef @.str.1, i32 noundef 134, ptr noundef @__PRETTY_FUNCTION__._Z19test_sign_symmetric16symmetric_cipher24message_digest_algorithm) #8
  unreachable

86:                                               ; preds = %78
  %87 = landingpad { ptr, i32 }
          cleanup
  %88 = extractvalue { ptr, i32 } %87, 0
  store ptr %88, ptr %7, align 8
  %89 = extractvalue { ptr, i32 } %87, 1
  store i32 %89, ptr %8, align 4
  br label %165

90:                                               ; No predecessors!
  br label %91

91:                                               ; preds = %90, %84
  %92 = getelementptr inbounds %"struct.peacemakr::Plaintext", ptr %5, i32 0, i32 1
  %93 = call noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %92) #7
  br i1 %93, label %107, label %94

94:                                               ; preds = %91
  call void @llvm.lifetime.start.p0(i64 64, ptr %17) #7
  invoke void @_ZN9peacemakr13CryptoContext20ExtractUnverifiedAADERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind writable sret(%"struct.peacemakr::Plaintext") align 8 %17, ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef nonnull align 8 dereferenceable(32) %16)
          to label %95 unwind label %101

95:                                               ; preds = %94
  %96 = getelementptr inbounds %"struct.peacemakr::Plaintext", ptr %5, i32 0, i32 1
  %97 = getelementptr inbounds %"struct.peacemakr::Plaintext", ptr %17, i32 0, i32 1
  %98 = call noundef zeroext i1 @_ZSteqIcEN9__gnu_cxx11__enable_ifIXsr9__is_charIT_EE7__valueEbE6__typeERKNSt7__cxx1112basic_stringIS2_St11char_traitsIS2_ESaIS2_EEESC_(ptr noundef nonnull align 8 dereferenceable(32) %96, ptr noundef nonnull align 8 dereferenceable(32) %97) #7
  br i1 %98, label %99, label %100

99:                                               ; preds = %95
  br label %106

100:                                              ; preds = %95
  call void @__assert_fail(ptr noundef @.str.3, ptr noundef @.str.1, i32 noundef 138, ptr noundef @__PRETTY_FUNCTION__._Z19test_sign_symmetric16symmetric_cipher24message_digest_algorithm) #8
  unreachable

101:                                              ; preds = %94
  %102 = landingpad { ptr, i32 }
          cleanup
  %103 = extractvalue { ptr, i32 } %102, 0
  store ptr %103, ptr %7, align 8
  %104 = extractvalue { ptr, i32 } %102, 1
  store i32 %104, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 64, ptr %17) #7
  br label %164

105:                                              ; No predecessors!
  br label %106

106:                                              ; preds = %105, %99
  call void @_ZN9peacemakr9PlaintextD2Ev(ptr noundef nonnull align 8 dereferenceable(64) %17) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr %17) #7
  br label %107

107:                                              ; preds = %106, %91
  call void @llvm.lifetime.start.p0(i64 24, ptr %18) #7
  invoke void @_ZN9peacemakr13CryptoContext11DeserializeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind writable sret(%"struct.std::pair") align 8 %18, ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef nonnull align 8 dereferenceable(32) %16)
          to label %108 unwind label %117

108:                                              ; preds = %107
  call void @llvm.lifetime.start.p0(i64 72, ptr %19) #7
  %109 = getelementptr inbounds %"struct.std::pair", ptr %18, i32 0, i32 0
  %110 = load ptr, ptr %109, align 8, !tbaa !13
  invoke void @_ZN9peacemakr13CryptoContext7DecryptERKNS_3KeyEPv(ptr dead_on_unwind writable sret(%"struct.std::pair.1") align 8 %19, ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef %110)
          to label %111 unwind label %121

111:                                              ; preds = %108
  %112 = getelementptr inbounds %"struct.std::pair.1", ptr %19, i32 0, i32 1
  %113 = load i8, ptr %112, align 8, !tbaa !18, !range !25, !noundef !26
  %114 = trunc i8 %113 to i1
  br i1 %114, label %115, label %116

115:                                              ; preds = %111
  br label %126

116:                                              ; preds = %111
  call void @__assert_fail(ptr noundef @.str.8, ptr noundef @.str.1, i32 noundef 145, ptr noundef @__PRETTY_FUNCTION__._Z19test_sign_symmetric16symmetric_cipher24message_digest_algorithm) #8
  unreachable

117:                                              ; preds = %107
  %118 = landingpad { ptr, i32 }
          cleanup
  %119 = extractvalue { ptr, i32 } %118, 0
  store ptr %119, ptr %7, align 8
  %120 = extractvalue { ptr, i32 } %118, 1
  store i32 %120, ptr %8, align 4
  br label %163

121:                                              ; preds = %108
  %122 = landingpad { ptr, i32 }
          cleanup
  %123 = extractvalue { ptr, i32 } %122, 0
  store ptr %123, ptr %7, align 8
  %124 = extractvalue { ptr, i32 } %122, 1
  store i32 %124, ptr %8, align 4
  br label %162

125:                                              ; No predecessors!
  br label %126

126:                                              ; preds = %125, %115
  call void @llvm.lifetime.start.p0(i64 1, ptr %20) #7
  %127 = getelementptr inbounds %"struct.std::pair.1", ptr %19, i32 0, i32 0
  %128 = getelementptr inbounds %"struct.std::pair", ptr %18, i32 0, i32 0
  %129 = load ptr, ptr %128, align 8, !tbaa !13
  %130 = invoke noundef zeroext i1 @_ZN9peacemakr13CryptoContext6VerifyERKNS_3KeyERKNS_9PlaintextEPv(ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(64) %127, ptr noundef %129)
          to label %131 unwind label %137

131:                                              ; preds = %126
  %132 = zext i1 %130 to i8
  store i8 %132, ptr %20, align 1, !tbaa !27
  %133 = load i8, ptr %20, align 1, !tbaa !27, !range !25, !noundef !26
  %134 = trunc i8 %133 to i1
  br i1 %134, label %135, label %136

135:                                              ; preds = %131
  br label %142

136:                                              ; preds = %131
  call void @__assert_fail(ptr noundef @.str.9, ptr noundef @.str.1, i32 noundef 147, ptr noundef @__PRETTY_FUNCTION__._Z19test_sign_symmetric16symmetric_cipher24message_digest_algorithm) #8
  unreachable

137:                                              ; preds = %126
  %138 = landingpad { ptr, i32 }
          cleanup
  %139 = extractvalue { ptr, i32 } %138, 0
  store ptr %139, ptr %7, align 8
  %140 = extractvalue { ptr, i32 } %138, 1
  store i32 %140, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #7
  call void @_ZNSt4pairIN9peacemakr9PlaintextEbED2Ev(ptr noundef nonnull align 8 dereferenceable(65) %19) #7
  br label %162

141:                                              ; No predecessors!
  br label %142

142:                                              ; preds = %141, %135
  %143 = getelementptr inbounds %"struct.peacemakr::Plaintext", ptr %5, i32 0, i32 0
  %144 = getelementptr inbounds %"struct.std::pair.1", ptr %19, i32 0, i32 0
  %145 = getelementptr inbounds %"struct.peacemakr::Plaintext", ptr %144, i32 0, i32 0
  %146 = call noundef zeroext i1 @_ZSteqIcEN9__gnu_cxx11__enable_ifIXsr9__is_charIT_EE7__valueEbE6__typeERKNSt7__cxx1112basic_stringIS2_St11char_traitsIS2_ESaIS2_EEESC_(ptr noundef nonnull align 8 dereferenceable(32) %143, ptr noundef nonnull align 8 dereferenceable(32) %145) #7
  br i1 %146, label %147, label %148

147:                                              ; preds = %142
  br label %150

148:                                              ; preds = %142
  call void @__assert_fail(ptr noundef @.str.5, ptr noundef @.str.1, i32 noundef 149, ptr noundef @__PRETTY_FUNCTION__._Z19test_sign_symmetric16symmetric_cipher24message_digest_algorithm) #8
  unreachable

149:                                              ; No predecessors!
  br label %150

150:                                              ; preds = %149, %147
  %151 = getelementptr inbounds %"struct.peacemakr::Plaintext", ptr %5, i32 0, i32 1
  %152 = getelementptr inbounds %"struct.std::pair.1", ptr %19, i32 0, i32 0
  %153 = getelementptr inbounds %"struct.peacemakr::Plaintext", ptr %152, i32 0, i32 1
  %154 = call noundef zeroext i1 @_ZSteqIcEN9__gnu_cxx11__enable_ifIXsr9__is_charIT_EE7__valueEbE6__typeERKNSt7__cxx1112basic_stringIS2_St11char_traitsIS2_ESaIS2_EEESC_(ptr noundef nonnull align 8 dereferenceable(32) %151, ptr noundef nonnull align 8 dereferenceable(32) %153) #7
  br i1 %154, label %155, label %156

155:                                              ; preds = %150
  br label %158

156:                                              ; preds = %150
  call void @__assert_fail(ptr noundef @.str.6, ptr noundef @.str.1, i32 noundef 150, ptr noundef @__PRETTY_FUNCTION__._Z19test_sign_symmetric16symmetric_cipher24message_digest_algorithm) #8
  unreachable

157:                                              ; No predecessors!
  br label %158

158:                                              ; preds = %157, %155
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #7
  call void @_ZNSt4pairIN9peacemakr9PlaintextEbED2Ev(ptr noundef nonnull align 8 dereferenceable(65) %19) #7
  call void @llvm.lifetime.end.p0(i64 72, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %18) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #7
  store i32 0, ptr %15, align 4
  br label %159

159:                                              ; preds = %158, %38
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @_ZN9peacemakr13CryptoContextD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #7
  call void @_ZN9peacemakr3KeyD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #7
  call void @_ZN9peacemakr9PlaintextD2Ev(ptr noundef nonnull align 8 dereferenceable(64) %5) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr %5) #7
  %160 = load i32, ptr %15, align 4
  switch i32 %160, label %176 [
    i32 0, label %161
    i32 1, label %161
  ]

161:                                              ; preds = %159, %159
  ret void

162:                                              ; preds = %137, %121
  call void @llvm.lifetime.end.p0(i64 72, ptr %19) #7
  br label %163

163:                                              ; preds = %162, %117
  call void @llvm.lifetime.end.p0(i64 24, ptr %18) #7
  br label %164

164:                                              ; preds = %163, %101
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #7
  br label %165

165:                                              ; preds = %164, %86
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #7
  br label %166

166:                                              ; preds = %165, %59
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @_ZN9peacemakr13CryptoContextD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #7
  br label %167

167:                                              ; preds = %166, %55
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #7
  call void @_ZN9peacemakr3KeyD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %11) #7
  br label %168

168:                                              ; preds = %167, %51
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  br label %169

169:                                              ; preds = %168, %47
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #7
  br label %170

170:                                              ; preds = %169, %43, %39
  call void @_ZN9peacemakr9PlaintextD2Ev(ptr noundef nonnull align 8 dereferenceable(64) %5) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr %5) #7
  br label %171

171:                                              ; preds = %170
  %172 = load ptr, ptr %7, align 8
  %173 = load i32, ptr %8, align 4
  %174 = insertvalue { ptr, i32 } poison, ptr %172, 0
  %175 = insertvalue { ptr, i32 } %174, i32 %173, 1
  resume { ptr, i32 } %175

176:                                              ; preds = %159
  unreachable
}

declare noundef zeroext i1 @_ZN9peacemakr13CryptoContext4SignERKNS_3KeyERKNS_9PlaintextE24message_digest_algorithmPv(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(64), i32 noundef, ptr noundef) #4

declare noundef zeroext i1 @_ZN9peacemakr13CryptoContext6VerifyERKNS_3KeyERKNS_9PlaintextEPv(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(64), ptr noundef) #4

attributes #0 = { mustprogress 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 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint mustprogress 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 #4 = { "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 = { noreturn 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 #6 = { 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 #7 = { nounwind }
attributes #8 = { noreturn 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 = !{!"_ZTS16symmetric_cipher", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"_ZTS24message_digest_algorithm", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = !{!14, !12, i64 0}
!14 = !{!"_ZTSSt4pairIPv15crypto_config_tE", !12, i64 0, !15, i64 8}
!15 = !{!"_ZTS15crypto_config_t", !16, i64 0, !6, i64 4, !17, i64 8, !10, i64 12}
!16 = !{!"_ZTS15encryption_mode", !7, i64 0}
!17 = !{!"_ZTS17asymmetric_cipher", !7, i64 0}
!18 = !{!19, !24, i64 64}
!19 = !{!"_ZTSSt4pairIN9peacemakr9PlaintextEbE", !20, i64 0, !24, i64 64}
!20 = !{!"_ZTSN9peacemakr9PlaintextE", !21, i64 0, !21, i64 32}
!21 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !22, i64 0, !23, i64 8, !7, i64 16}
!22 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !12, i64 0}
!23 = !{!"long", !7, i64 0}
!24 = !{!"bool", !7, i64 0}
!25 = !{i8 0, i8 2}
!26 = !{}
!27 = !{!24, !24, 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"

%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"struct.peacemakr::Plaintext" = type { %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string" }
%"struct.std::pair" = type { ptr, %struct.crypto_config_t }
%struct.crypto_config_t = type { i32, i32, i32, i32 }
%"struct.std::pair.1" = type <{ %"struct.peacemakr::Plaintext", i8, [7 x i8] }>
%"class.peacemakr::RandomDevice" = type { %struct.random_device_t }
%struct.random_device_t = type { ptr, ptr }
%"class.peacemakr::Key" = type { ptr }
%"class.peacemakr::CryptoContext" = type { %"class.std::function" }
%"class.std::function" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }

@.str = external hidden unnamed_addr constant [21 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [94 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [44 x i8], align 1
@__PRETTY_FUNCTION__._Z19test_sign_symmetric16symmetric_cipher24message_digest_algorithm = external hidden unnamed_addr constant [69 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [9 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z6log_fnRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(32)) #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z17get_random_stringB5cxx11v(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8) local_unnamed_addr #0

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN9peacemakr9PlaintextC2Ev(ptr noundef nonnull align 8 dereferenceable(64)) unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #2 align 2

declare void @_ZN9peacemakr12RandomDeviceC1Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt8functionIFvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEC2IRS8_vEEOT_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull) unnamed_addr #2 align 2

declare void @_ZN9peacemakr13CryptoContextC1ESt8functionIFvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEE(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 align 2

declare noundef ptr @_ZN9peacemakr13CryptoContext7EncryptERKNS_3KeyERKNS_9PlaintextERNS_12RandomDeviceE(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(64), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #2 align 2

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #5

declare void @_ZN9peacemakr13CryptoContext9SerializeB5cxx11E24message_digest_algorithmPv(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, ptr noundef) local_unnamed_addr #4

declare void @_ZN9peacemakr13CryptoContext20ExtractUnverifiedAADERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind writable sret(%"struct.peacemakr::Plaintext") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZSteqIcEN9__gnu_cxx11__enable_ifIXsr9__is_charIT_EE7__valueEbE6__typeERKNSt7__cxx1112basic_stringIS2_St11char_traitsIS2_ESaIS2_EEESC_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN9peacemakr9PlaintextD2Ev(ptr noundef nonnull align 8 dereferenceable(64)) unnamed_addr #3 align 2

declare void @_ZN9peacemakr13CryptoContext11DeserializeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind writable sret(%"struct.std::pair") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #4

declare void @_ZN9peacemakr13CryptoContext7DecryptERKNS_3KeyEPv(ptr dead_on_unwind writable sret(%"struct.std::pair.1") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt4pairIN9peacemakr9PlaintextEbED2Ev(ptr noundef nonnull align 8 dereferenceable(65)) unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN9peacemakr13CryptoContextD2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2 align 2

; Function Attrs: nounwind
declare void @_ZN9peacemakr3KeyD1Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #6

declare void @_ZN9peacemakr3KeyC1E16symmetric_cipherRNS_12RandomDeviceE(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef, ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #4

; Function Attrs: mustprogress uwtable
define dso_local void @_Z19test_sign_symmetric16symmetric_cipher24message_digest_algorithm(i32 noundef %0, i32 noundef %1) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"struct.peacemakr::Plaintext", align 8
  %4 = alloca %"class.std::__cxx11::basic_string", align 8
  %5 = alloca %"class.std::__cxx11::basic_string", align 8
  %6 = alloca %"class.peacemakr::RandomDevice", align 8
  %7 = alloca %"class.peacemakr::Key", align 8
  %8 = alloca %"class.peacemakr::CryptoContext", align 8
  %9 = alloca %"class.std::function", align 8
  %10 = alloca %"class.std::__cxx11::basic_string", align 8
  %11 = alloca %"struct.peacemakr::Plaintext", align 8
  %12 = alloca %"struct.std::pair", align 8
  %13 = alloca %"struct.std::pair.1", align 8
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %3) #7
  call void @_ZN9peacemakr9PlaintextC2Ev(ptr noundef nonnull align 8 dereferenceable(64) %3) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #7
  invoke void @_Z17get_random_stringB5cxx11v(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %4)
          to label %14 unwind label %26

14:                                               ; preds = %2
  %15 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef nonnull align 8 dereferenceable(32) %4) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #7
  invoke void @_Z17get_random_stringB5cxx11v(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %5)
          to label %16 unwind label %28

16:                                               ; preds = %14
  %17 = getelementptr inbounds i8, ptr %3, i64 32
  %18 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %17, ptr noundef nonnull align 8 dereferenceable(32) %5) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #7
  invoke void @_ZN9peacemakr12RandomDeviceC1Ev(ptr noundef nonnull align 8 dereferenceable(16) %6)
          to label %19 unwind label %30

19:                                               ; preds = %16
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  invoke void @_ZN9peacemakr3KeyC1E16symmetric_cipherRNS_12RandomDeviceE(ptr noundef nonnull align 8 dereferenceable(8) %7, i32 noundef %0, ptr noundef nonnull align 8 dereferenceable(16) %6)
          to label %20 unwind label %32

20:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #7
  call void @_ZNSt8functionIFvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEC2IRS8_vEEOT_(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef nonnull @_Z6log_fnRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE) #7
  invoke void @_ZN9peacemakr13CryptoContextC1ESt8functionIFvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEE(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull %9)
          to label %21 unwind label %34

21:                                               ; preds = %20
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #7
  %22 = invoke noundef ptr @_ZN9peacemakr13CryptoContext7EncryptERKNS_3KeyERKNS_9PlaintextERNS_12RandomDeviceE(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(64) %3, ptr noundef nonnull align 8 dereferenceable(16) %6)
          to label %23 unwind label %36

23:                                               ; preds = %21
  %cond = icmp eq ptr %22, null
  br i1 %cond, label %24, label %39

24:                                               ; preds = %23
  %25 = call noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %3) #7
  br i1 %25, label %86, label %38

26:                                               ; preds = %2
  %27 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #7
  br label %95

28:                                               ; preds = %14
  %29 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #7
  br label %95

30:                                               ; preds = %16
  %31 = landingpad { ptr, i32 }
          cleanup
  br label %94

32:                                               ; preds = %19
  %33 = landingpad { ptr, i32 }
          cleanup
  br label %93

34:                                               ; preds = %20
  %35 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #7
  br label %92

36:                                               ; preds = %39, %21
  %37 = landingpad { ptr, i32 }
          cleanup
  br label %91

38:                                               ; preds = %24
  call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 129, ptr noundef nonnull @__PRETTY_FUNCTION__._Z19test_sign_symmetric16symmetric_cipher24message_digest_algorithm) #8
  unreachable

39:                                               ; preds = %23
  %40 = invoke noundef zeroext i1 @_ZN9peacemakr13CryptoContext4SignERKNS_3KeyERKNS_9PlaintextE24message_digest_algorithmPv(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(64) %3, i32 noundef %1, ptr noundef nonnull %22)
          to label %41 unwind label %36

41:                                               ; preds = %39
  br i1 %40, label %43, label %42

42:                                               ; preds = %41
  call void @__assert_fail(ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.1, i32 noundef 131, ptr noundef nonnull @__PRETTY_FUNCTION__._Z19test_sign_symmetric16symmetric_cipher24message_digest_algorithm) #8
  unreachable

43:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %10) #7
  invoke void @_ZN9peacemakr13CryptoContext9SerializeB5cxx11E24message_digest_algorithmPv(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %10, ptr noundef nonnull align 8 dereferenceable(32) %8, i32 noundef %1, ptr noundef nonnull %22)
          to label %44 unwind label %47

44:                                               ; preds = %43
  %45 = call noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %10) #7
  br i1 %45, label %46, label %49

46:                                               ; preds = %44
  call void @__assert_fail(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.1, i32 noundef 134, ptr noundef nonnull @__PRETTY_FUNCTION__._Z19test_sign_symmetric16symmetric_cipher24message_digest_algorithm) #8
  unreachable

47:                                               ; preds = %43
  %48 = landingpad { ptr, i32 }
          cleanup
  br label %90

49:                                               ; preds = %44
  %50 = call noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %17) #7
  br i1 %50, label %59, label %51

51:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %11) #7
  invoke void @_ZN9peacemakr13CryptoContext20ExtractUnverifiedAADERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind nonnull writable sret(%"struct.peacemakr::Plaintext") align 8 %11, ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull align 8 dereferenceable(32) %10)
          to label %52 unwind label %56

52:                                               ; preds = %51
  %53 = getelementptr inbounds i8, ptr %11, i64 32
  %54 = call noundef zeroext i1 @_ZSteqIcEN9__gnu_cxx11__enable_ifIXsr9__is_charIT_EE7__valueEbE6__typeERKNSt7__cxx1112basic_stringIS2_St11char_traitsIS2_ESaIS2_EEESC_(ptr noundef nonnull align 8 dereferenceable(32) %17, ptr noundef nonnull align 8 dereferenceable(32) %53) #7
  br i1 %54, label %58, label %55

55:                                               ; preds = %52
  call void @__assert_fail(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.1, i32 noundef 138, ptr noundef nonnull @__PRETTY_FUNCTION__._Z19test_sign_symmetric16symmetric_cipher24message_digest_algorithm) #8
  unreachable

56:                                               ; preds = %51
  %57 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %11) #7
  br label %89

58:                                               ; preds = %52
  call void @_ZN9peacemakr9PlaintextD2Ev(ptr noundef nonnull align 8 dereferenceable(64) %11) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %11) #7
  br label %59

59:                                               ; preds = %58, %49
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %12) #7
  invoke void @_ZN9peacemakr13CryptoContext11DeserializeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind nonnull writable sret(%"struct.std::pair") align 8 %12, ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull align 8 dereferenceable(32) %10)
          to label %60 unwind label %67

60:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %13) #7
  %61 = load ptr, ptr %12, align 8, !tbaa !5
  invoke void @_ZN9peacemakr13CryptoContext7DecryptERKNS_3KeyEPv(ptr dead_on_unwind nonnull writable sret(%"struct.std::pair.1") align 8 %13, ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef %61)
          to label %62 unwind label %69

62:                                               ; preds = %60
  %63 = getelementptr inbounds i8, ptr %13, i64 64
  %64 = load i8, ptr %63, align 8, !tbaa !15, !range !22, !noundef !23
  %65 = trunc nuw i8 %64 to i1
  br i1 %65, label %71, label %66

66:                                               ; preds = %62
  call void @__assert_fail(ptr noundef nonnull @.str.8, ptr noundef nonnull @.str.1, i32 noundef 145, ptr noundef nonnull @__PRETTY_FUNCTION__._Z19test_sign_symmetric16symmetric_cipher24message_digest_algorithm) #8
  unreachable

67:                                               ; preds = %59
  %68 = landingpad { ptr, i32 }
          cleanup
  br label %88

69:                                               ; preds = %60
  %70 = landingpad { ptr, i32 }
          cleanup
  br label %87

71:                                               ; preds = %62
  %72 = load ptr, ptr %12, align 8, !tbaa !5
  %73 = invoke noundef zeroext i1 @_ZN9peacemakr13CryptoContext6VerifyERKNS_3KeyERKNS_9PlaintextEPv(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(64) %13, ptr noundef %72)
          to label %74 unwind label %76

74:                                               ; preds = %71
  br i1 %73, label %78, label %75

75:                                               ; preds = %74
  call void @__assert_fail(ptr noundef nonnull @.str.9, ptr noundef nonnull @.str.1, i32 noundef 147, ptr noundef nonnull @__PRETTY_FUNCTION__._Z19test_sign_symmetric16symmetric_cipher24message_digest_algorithm) #8
  unreachable

76:                                               ; preds = %71
  %77 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt4pairIN9peacemakr9PlaintextEbED2Ev(ptr noundef nonnull align 8 dereferenceable(65) %13) #7
  br label %87

78:                                               ; preds = %74
  %79 = call noundef zeroext i1 @_ZSteqIcEN9__gnu_cxx11__enable_ifIXsr9__is_charIT_EE7__valueEbE6__typeERKNSt7__cxx1112basic_stringIS2_St11char_traitsIS2_ESaIS2_EEESC_(ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef nonnull align 8 dereferenceable(32) %13) #7
  br i1 %79, label %81, label %80

80:                                               ; preds = %78
  call void @__assert_fail(ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.1, i32 noundef 149, ptr noundef nonnull @__PRETTY_FUNCTION__._Z19test_sign_symmetric16symmetric_cipher24message_digest_algorithm) #8
  unreachable

81:                                               ; preds = %78
  %82 = getelementptr inbounds i8, ptr %13, i64 32
  %83 = call noundef zeroext i1 @_ZSteqIcEN9__gnu_cxx11__enable_ifIXsr9__is_charIT_EE7__valueEbE6__typeERKNSt7__cxx1112basic_stringIS2_St11char_traitsIS2_ESaIS2_EEESC_(ptr noundef nonnull align 8 dereferenceable(32) %17, ptr noundef nonnull align 8 dereferenceable(32) %82) #7
  br i1 %83, label %85, label %84

84:                                               ; preds = %81
  call void @__assert_fail(ptr noundef nonnull @.str.6, ptr noundef nonnull @.str.1, i32 noundef 150, ptr noundef nonnull @__PRETTY_FUNCTION__._Z19test_sign_symmetric16symmetric_cipher24message_digest_algorithm) #8
  unreachable

85:                                               ; preds = %81
  call void @_ZNSt4pairIN9peacemakr9PlaintextEbED2Ev(ptr noundef nonnull align 8 dereferenceable(65) %13) #7
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %13) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #7
  br label %86

86:                                               ; preds = %24, %85
  call void @_ZN9peacemakr13CryptoContextD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #7
  call void @_ZN9peacemakr3KeyD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #7
  call void @_ZN9peacemakr9PlaintextD2Ev(ptr noundef nonnull align 8 dereferenceable(64) %3) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %3) #7
  ret void

87:                                               ; preds = %76, %69
  %.pn = phi { ptr, i32 } [ %77, %76 ], [ %70, %69 ]
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %13) #7
  br label %88

88:                                               ; preds = %87, %67
  %.pn.pn = phi { ptr, i32 } [ %.pn, %87 ], [ %68, %67 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #7
  br label %89

89:                                               ; preds = %88, %56
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %88 ], [ %57, %56 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #7
  br label %90

90:                                               ; preds = %89, %47
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %89 ], [ %48, %47 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #7
  br label %91

91:                                               ; preds = %90, %36
  %.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn, %90 ], [ %37, %36 ]
  call void @_ZN9peacemakr13CryptoContextD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #7
  br label %92

92:                                               ; preds = %91, %34
  %.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn, %91 ], [ %35, %34 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #7
  call void @_ZN9peacemakr3KeyD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #7
  br label %93

93:                                               ; preds = %92, %32
  %.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn.pn, %92 ], [ %33, %32 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  br label %94

94:                                               ; preds = %93, %30
  %.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn.pn.pn, %93 ], [ %31, %30 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #7
  br label %95

95:                                               ; preds = %94, %28, %26
  %.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn.pn.pn.pn, %94 ], [ %29, %28 ], [ %27, %26 ]
  call void @_ZN9peacemakr9PlaintextD2Ev(ptr noundef nonnull align 8 dereferenceable(64) %3) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %3) #7
  resume { ptr, i32 } %.pn.pn.pn.pn.pn.pn.pn.pn.pn
}

declare noundef zeroext i1 @_ZN9peacemakr13CryptoContext4SignERKNS_3KeyERKNS_9PlaintextE24message_digest_algorithmPv(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(64), i32 noundef, ptr noundef) local_unnamed_addr #4

declare noundef zeroext i1 @_ZN9peacemakr13CryptoContext6VerifyERKNS_3KeyERKNS_9PlaintextEPv(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(64), ptr noundef) local_unnamed_addr #4

attributes #0 = { mustprogress 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 nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint mustprogress 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 #4 = { "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 = { noreturn 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 #6 = { 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 #7 = { nounwind }
attributes #8 = { noreturn 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, !7, i64 0}
!6 = !{!"_ZTSSt4pairIPv15crypto_config_tE", !7, i64 0, !10, i64 8}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTS15crypto_config_t", !11, i64 0, !12, i64 4, !13, i64 8, !14, i64 12}
!11 = !{!"_ZTS15encryption_mode", !8, i64 0}
!12 = !{!"_ZTS16symmetric_cipher", !8, i64 0}
!13 = !{!"_ZTS17asymmetric_cipher", !8, i64 0}
!14 = !{!"_ZTS24message_digest_algorithm", !8, i64 0}
!15 = !{!16, !21, i64 64}
!16 = !{!"_ZTSSt4pairIN9peacemakr9PlaintextEbE", !17, i64 0, !21, i64 64}
!17 = !{!"_ZTSN9peacemakr9PlaintextE", !18, i64 0, !18, i64 32}
!18 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !19, i64 0, !20, i64 8, !8, i64 16}
!19 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !7, i64 0}
!20 = !{!"long", !8, i64 0}
!21 = !{!"bool", !8, i64 0}
!22 = !{i8 0, i8 2}
!23 = !{}


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