; 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" }
%"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 } }
%"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] }>

@.str = external hidden unnamed_addr constant [21 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [94 x i8], align 1
@__PRETTY_FUNCTION__._Z15test_asymmetric16symmetric_cipher17asymmetric_cipher24message_digest_algorithm = external hidden unnamed_addr constant [84 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.4 = external hidden unnamed_addr constant [22 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

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

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

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

28:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  %29 = load i32, ptr %5, align 4, !tbaa !9
  %30 = load i32, ptr %4, align 4, !tbaa !5
  invoke void @_ZN9peacemakr3KeyC1E17asymmetric_cipher16symmetric_cipherRNS_12RandomDeviceE(ptr noundef nonnull align 8 dereferenceable(8) %13, i32 noundef %29, i32 noundef %30, ptr noundef nonnull align 8 dereferenceable(16) %12)
          to label %31 unwind label %53

31:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 32, ptr %14) #7
  call void @_ZNSt8functionIFvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEC2IRS8_vEEOT_(ptr noundef nonnull align 8 dereferenceable(32) %15, ptr noundef nonnull @_Z6log_fnRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE) #7
  invoke void @_ZN9peacemakr13CryptoContextC1ESt8functionIFvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEE(ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef %15)
          to label %32 unwind label %57

32:                                               ; preds = %31
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  %33 = invoke noundef ptr @_ZN9peacemakr13CryptoContext7EncryptERKNS_3KeyERKNS_9PlaintextERNS_12RandomDeviceE(ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(64) %7, ptr noundef nonnull align 8 dereferenceable(16) %12)
          to label %34 unwind label %61

34:                                               ; preds = %32
  store ptr %33, ptr %16, align 8, !tbaa !13
  %35 = load ptr, ptr %16, align 8, !tbaa !13
  %36 = icmp eq ptr %35, null
  br i1 %36, label %37, label %65

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

40:                                               ; preds = %37
  store i32 1, ptr %17, align 4
  br label %138

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

45:                                               ; preds = %22
  %46 = landingpad { ptr, i32 }
          cleanup
  %47 = extractvalue { ptr, i32 } %46, 0
  store ptr %47, ptr %9, align 8
  %48 = extractvalue { ptr, i32 } %46, 1
  store i32 %48, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #7
  br label %148

49:                                               ; preds = %25
  %50 = landingpad { ptr, i32 }
          cleanup
  %51 = extractvalue { ptr, i32 } %50, 0
  store ptr %51, ptr %9, align 8
  %52 = extractvalue { ptr, i32 } %50, 1
  store i32 %52, ptr %10, align 4
  br label %147

53:                                               ; preds = %28
  %54 = landingpad { ptr, i32 }
          cleanup
  %55 = extractvalue { ptr, i32 } %54, 0
  store ptr %55, ptr %9, align 8
  %56 = extractvalue { ptr, i32 } %54, 1
  store i32 %56, ptr %10, align 4
  br label %146

57:                                               ; preds = %31
  %58 = landingpad { ptr, i32 }
          cleanup
  %59 = extractvalue { ptr, i32 } %58, 0
  store ptr %59, ptr %9, align 8
  %60 = extractvalue { ptr, i32 } %58, 1
  store i32 %60, ptr %10, align 4
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #7
  br label %145

61:                                               ; preds = %32
  %62 = landingpad { ptr, i32 }
          cleanup
  %63 = extractvalue { ptr, i32 } %62, 0
  store ptr %63, ptr %9, align 8
  %64 = extractvalue { ptr, i32 } %62, 1
  store i32 %64, ptr %10, align 4
  br label %144

65:                                               ; preds = %37, %34
  %66 = load ptr, ptr %16, align 8, !tbaa !13
  %67 = icmp ne ptr %66, null
  br i1 %67, label %68, label %69

68:                                               ; preds = %65
  br label %71

69:                                               ; preds = %65
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 55, ptr noundef @__PRETTY_FUNCTION__._Z15test_asymmetric16symmetric_cipher17asymmetric_cipher24message_digest_algorithm) #8
  unreachable

70:                                               ; No predecessors!
  br label %71

71:                                               ; preds = %70, %68
  br label %72

72:                                               ; preds = %71
  call void @llvm.lifetime.start.p0(i64 32, ptr %18) #7
  %73 = load i32, ptr %6, align 4, !tbaa !11
  %74 = load ptr, ptr %16, align 8, !tbaa !13
  invoke void @_ZN9peacemakr13CryptoContext9SerializeB5cxx11E24message_digest_algorithmPv(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %18, ptr noundef nonnull align 8 dereferenceable(32) %14, i32 noundef %73, ptr noundef %74)
          to label %75 unwind label %80

75:                                               ; preds = %72
  %76 = call noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %18) #7
  %77 = xor i1 %76, true
  br i1 %77, label %78, label %79

78:                                               ; preds = %75
  br label %85

79:                                               ; preds = %75
  call void @__assert_fail(ptr noundef @.str.2, ptr noundef @.str.1, i32 noundef 59, ptr noundef @__PRETTY_FUNCTION__._Z15test_asymmetric16symmetric_cipher17asymmetric_cipher24message_digest_algorithm) #8
  unreachable

80:                                               ; preds = %72
  %81 = landingpad { ptr, i32 }
          cleanup
  %82 = extractvalue { ptr, i32 } %81, 0
  store ptr %82, ptr %9, align 8
  %83 = extractvalue { ptr, i32 } %81, 1
  store i32 %83, ptr %10, align 4
  br label %143

84:                                               ; No predecessors!
  br label %85

85:                                               ; preds = %84, %78
  %86 = getelementptr inbounds %"struct.peacemakr::Plaintext", ptr %7, i32 0, i32 1
  %87 = call noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %86) #7
  br i1 %87, label %101, label %88

88:                                               ; preds = %85
  call void @llvm.lifetime.start.p0(i64 64, ptr %19) #7
  invoke void @_ZN9peacemakr13CryptoContext20ExtractUnverifiedAADERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind writable sret(%"struct.peacemakr::Plaintext") align 8 %19, ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef nonnull align 8 dereferenceable(32) %18)
          to label %89 unwind label %95

89:                                               ; preds = %88
  %90 = getelementptr inbounds %"struct.peacemakr::Plaintext", ptr %7, i32 0, i32 1
  %91 = getelementptr inbounds %"struct.peacemakr::Plaintext", ptr %19, i32 0, i32 1
  %92 = 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) %90, ptr noundef nonnull align 8 dereferenceable(32) %91) #7
  br i1 %92, label %93, label %94

93:                                               ; preds = %89
  br label %100

94:                                               ; preds = %89
  call void @__assert_fail(ptr noundef @.str.3, ptr noundef @.str.1, i32 noundef 63, ptr noundef @__PRETTY_FUNCTION__._Z15test_asymmetric16symmetric_cipher17asymmetric_cipher24message_digest_algorithm) #8
  unreachable

95:                                               ; preds = %88
  %96 = landingpad { ptr, i32 }
          cleanup
  %97 = extractvalue { ptr, i32 } %96, 0
  store ptr %97, ptr %9, align 8
  %98 = extractvalue { ptr, i32 } %96, 1
  store i32 %98, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 64, ptr %19) #7
  br label %142

99:                                               ; No predecessors!
  br label %100

100:                                              ; preds = %99, %93
  call void @_ZN9peacemakr9PlaintextD2Ev(ptr noundef nonnull align 8 dereferenceable(64) %19) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr %19) #7
  br label %101

101:                                              ; preds = %100, %85
  call void @llvm.lifetime.start.p0(i64 24, ptr %20) #7
  invoke void @_ZN9peacemakr13CryptoContext11DeserializeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind writable sret(%"struct.std::pair") align 8 %20, ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef nonnull align 8 dereferenceable(32) %18)
          to label %102 unwind label %112

102:                                              ; preds = %101
  call void @llvm.lifetime.start.p0(i64 72, ptr %21) #7
  %103 = getelementptr inbounds %"struct.std::pair", ptr %20, i32 0, i32 0
  %104 = load ptr, ptr %103, align 8, !tbaa !15
  invoke void @_ZN9peacemakr13CryptoContext7DecryptERKNS_3KeyEPv(ptr dead_on_unwind writable sret(%"struct.std::pair.1") align 8 %21, ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef %104)
          to label %105 unwind label %116

105:                                              ; preds = %102
  %106 = getelementptr inbounds %"struct.std::pair.1", ptr %21, i32 0, i32 1
  %107 = load i8, ptr %106, align 8, !tbaa !19, !range !26, !noundef !27
  %108 = trunc i8 %107 to i1
  %109 = xor i1 %108, true
  br i1 %109, label %110, label %111

110:                                              ; preds = %105
  br label %121

111:                                              ; preds = %105
  call void @__assert_fail(ptr noundef @.str.4, ptr noundef @.str.1, i32 noundef 70, ptr noundef @__PRETTY_FUNCTION__._Z15test_asymmetric16symmetric_cipher17asymmetric_cipher24message_digest_algorithm) #8
  unreachable

112:                                              ; preds = %101
  %113 = landingpad { ptr, i32 }
          cleanup
  %114 = extractvalue { ptr, i32 } %113, 0
  store ptr %114, ptr %9, align 8
  %115 = extractvalue { ptr, i32 } %113, 1
  store i32 %115, ptr %10, align 4
  br label %141

116:                                              ; preds = %102
  %117 = landingpad { ptr, i32 }
          cleanup
  %118 = extractvalue { ptr, i32 } %117, 0
  store ptr %118, ptr %9, align 8
  %119 = extractvalue { ptr, i32 } %117, 1
  store i32 %119, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 72, ptr %21) #7
  br label %141

120:                                              ; No predecessors!
  br label %121

121:                                              ; preds = %120, %110
  %122 = getelementptr inbounds %"struct.peacemakr::Plaintext", ptr %7, i32 0, i32 0
  %123 = getelementptr inbounds %"struct.std::pair.1", ptr %21, i32 0, i32 0
  %124 = getelementptr inbounds %"struct.peacemakr::Plaintext", ptr %123, i32 0, i32 0
  %125 = 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) %122, ptr noundef nonnull align 8 dereferenceable(32) %124) #7
  br i1 %125, label %126, label %127

126:                                              ; preds = %121
  br label %129

127:                                              ; preds = %121
  call void @__assert_fail(ptr noundef @.str.5, ptr noundef @.str.1, i32 noundef 72, ptr noundef @__PRETTY_FUNCTION__._Z15test_asymmetric16symmetric_cipher17asymmetric_cipher24message_digest_algorithm) #8
  unreachable

128:                                              ; No predecessors!
  br label %129

129:                                              ; preds = %128, %126
  %130 = getelementptr inbounds %"struct.peacemakr::Plaintext", ptr %7, i32 0, i32 1
  %131 = getelementptr inbounds %"struct.std::pair.1", ptr %21, i32 0, i32 0
  %132 = getelementptr inbounds %"struct.peacemakr::Plaintext", ptr %131, i32 0, i32 1
  %133 = 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) %130, ptr noundef nonnull align 8 dereferenceable(32) %132) #7
  br i1 %133, label %134, label %135

134:                                              ; preds = %129
  br label %137

135:                                              ; preds = %129
  call void @__assert_fail(ptr noundef @.str.6, ptr noundef @.str.1, i32 noundef 73, ptr noundef @__PRETTY_FUNCTION__._Z15test_asymmetric16symmetric_cipher17asymmetric_cipher24message_digest_algorithm) #8
  unreachable

136:                                              ; No predecessors!
  br label %137

137:                                              ; preds = %136, %134
  call void @_ZNSt4pairIN9peacemakr9PlaintextEbED2Ev(ptr noundef nonnull align 8 dereferenceable(65) %21) #7
  call void @llvm.lifetime.end.p0(i64 72, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %20) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %18) #7
  store i32 0, ptr %17, align 4
  br label %138

138:                                              ; preds = %137, %40
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @_ZN9peacemakr13CryptoContextD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #7
  call void @_ZN9peacemakr3KeyD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #7
  call void @_ZN9peacemakr9PlaintextD2Ev(ptr noundef nonnull align 8 dereferenceable(64) %7) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr %7) #7
  %139 = load i32, ptr %17, align 4
  switch i32 %139, label %154 [
    i32 0, label %140
    i32 1, label %140
  ]

140:                                              ; preds = %138, %138
  ret void

141:                                              ; preds = %116, %112
  call void @llvm.lifetime.end.p0(i64 24, ptr %20) #7
  br label %142

142:                                              ; preds = %141, %95
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #7
  br label %143

143:                                              ; preds = %142, %80
  call void @llvm.lifetime.end.p0(i64 32, ptr %18) #7
  br label %144

144:                                              ; preds = %143, %61
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @_ZN9peacemakr13CryptoContextD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #7
  br label %145

145:                                              ; preds = %144, %57
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #7
  call void @_ZN9peacemakr3KeyD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %13) #7
  br label %146

146:                                              ; preds = %145, %53
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  br label %147

147:                                              ; preds = %146, %49
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #7
  br label %148

148:                                              ; preds = %147, %45, %41
  call void @_ZN9peacemakr9PlaintextD2Ev(ptr noundef nonnull align 8 dereferenceable(64) %7) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr %7) #7
  br label %149

149:                                              ; preds = %148
  %150 = load ptr, ptr %9, align 8
  %151 = load i32, ptr %10, align 4
  %152 = insertvalue { ptr, i32 } poison, ptr %150, 0
  %153 = insertvalue { ptr, i32 } %152, i32 %151, 1
  resume { ptr, i32 } %153

154:                                              ; preds = %138
  unreachable
}

; 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

declare void @_ZN9peacemakr3KeyC1E17asymmetric_cipher16symmetric_cipherRNS_12RandomDeviceE(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef, i32 noundef, 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

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 = !{!"_ZTS17asymmetric_cipher", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"_ZTS24message_digest_algorithm", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"any pointer", !7, i64 0}
!15 = !{!16, !14, i64 0}
!16 = !{!"_ZTSSt4pairIPv15crypto_config_tE", !14, i64 0, !17, i64 8}
!17 = !{!"_ZTS15crypto_config_t", !18, i64 0, !6, i64 4, !10, i64 8, !12, i64 12}
!18 = !{!"_ZTS15encryption_mode", !7, i64 0}
!19 = !{!20, !25, i64 64}
!20 = !{!"_ZTSSt4pairIN9peacemakr9PlaintextEbE", !21, i64 0, !25, i64 64}
!21 = !{!"_ZTSN9peacemakr9PlaintextE", !22, i64 0, !22, i64 32}
!22 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !23, i64 0, !24, i64 8, !7, i64 16}
!23 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !14, i64 0}
!24 = !{!"long", !7, i64 0}
!25 = !{!"bool", !7, i64 0}
!26 = !{i8 0, i8 2}
!27 = !{}


; 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" }
%"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 } }
%"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] }>

@.str = external hidden unnamed_addr constant [21 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [94 x i8], align 1
@__PRETTY_FUNCTION__._Z15test_asymmetric16symmetric_cipher17asymmetric_cipher24message_digest_algorithm = external hidden unnamed_addr constant [84 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.4 = external hidden unnamed_addr constant [22 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

; 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: mustprogress uwtable
define dso_local void @_Z15test_asymmetric16symmetric_cipher17asymmetric_cipher24message_digest_algorithm(i32 noundef %0, i32 noundef %1, i32 noundef %2) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"struct.peacemakr::Plaintext", align 8
  %5 = alloca %"class.std::__cxx11::basic_string", align 8
  %6 = alloca %"class.std::__cxx11::basic_string", align 8
  %7 = alloca %"class.peacemakr::RandomDevice", align 8
  %8 = alloca %"class.peacemakr::Key", align 8
  %9 = alloca %"class.peacemakr::CryptoContext", align 8
  %10 = alloca %"class.std::function", align 8
  %11 = alloca %"class.std::__cxx11::basic_string", align 8
  %12 = alloca %"struct.peacemakr::Plaintext", align 8
  %13 = alloca %"struct.std::pair", align 8
  %14 = alloca %"struct.std::pair.1", align 8
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %4) #7
  call void @_ZN9peacemakr9PlaintextC2Ev(ptr noundef nonnull align 8 dereferenceable(64) %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 %15 unwind label %27

15:                                               ; preds = %3
  %16 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %4, 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 32, ptr nonnull %6) #7
  invoke void @_Z17get_random_stringB5cxx11v(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %6)
          to label %17 unwind label %29

17:                                               ; preds = %15
  %18 = getelementptr inbounds i8, ptr %4, i64 32
  %19 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %18, 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 nonnull %6) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #7
  invoke void @_ZN9peacemakr12RandomDeviceC1Ev(ptr noundef nonnull align 8 dereferenceable(16) %7)
          to label %20 unwind label %31

20:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #7
  invoke void @_ZN9peacemakr3KeyC1E17asymmetric_cipher16symmetric_cipherRNS_12RandomDeviceE(ptr noundef nonnull align 8 dereferenceable(8) %8, i32 noundef %1, i32 noundef %0, ptr noundef nonnull align 8 dereferenceable(16) %7)
          to label %21 unwind label %33

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

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

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

25:                                               ; preds = %24
  %26 = call noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %4) #7
  br i1 %26, label %76, label %39

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

29:                                               ; preds = %15
  %30 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #7
  br label %84

31:                                               ; preds = %17
  %32 = landingpad { ptr, i32 }
          cleanup
  br label %83

33:                                               ; preds = %20
  %34 = landingpad { ptr, i32 }
          cleanup
  br label %82

35:                                               ; preds = %21
  %36 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #7
  br label %81

37:                                               ; preds = %22
  %38 = landingpad { ptr, i32 }
          cleanup
  br label %80

39:                                               ; preds = %25
  call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 55, ptr noundef nonnull @__PRETTY_FUNCTION__._Z15test_asymmetric16symmetric_cipher17asymmetric_cipher24message_digest_algorithm) #8
  unreachable

40:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %11) #7
  invoke void @_ZN9peacemakr13CryptoContext9SerializeB5cxx11E24message_digest_algorithmPv(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %11, ptr noundef nonnull align 8 dereferenceable(32) %9, i32 noundef %2, ptr noundef nonnull %23)
          to label %41 unwind label %44

41:                                               ; preds = %40
  %42 = call noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %11) #7
  br i1 %42, label %43, label %46

43:                                               ; preds = %41
  call void @__assert_fail(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.1, i32 noundef 59, ptr noundef nonnull @__PRETTY_FUNCTION__._Z15test_asymmetric16symmetric_cipher17asymmetric_cipher24message_digest_algorithm) #8
  unreachable

44:                                               ; preds = %40
  %45 = landingpad { ptr, i32 }
          cleanup
  br label %79

46:                                               ; preds = %41
  %47 = call noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %18) #7
  br i1 %47, label %56, label %48

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

49:                                               ; preds = %48
  %50 = getelementptr inbounds i8, ptr %12, i64 32
  %51 = 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) %18, ptr noundef nonnull align 8 dereferenceable(32) %50) #7
  br i1 %51, label %55, label %52

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

53:                                               ; preds = %48
  %54 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %12) #7
  br label %78

55:                                               ; preds = %49
  call void @_ZN9peacemakr9PlaintextD2Ev(ptr noundef nonnull align 8 dereferenceable(64) %12) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %12) #7
  br label %56

56:                                               ; preds = %55, %46
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %13) #7
  invoke void @_ZN9peacemakr13CryptoContext11DeserializeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind nonnull writable sret(%"struct.std::pair") align 8 %13, ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef nonnull align 8 dereferenceable(32) %11)
          to label %57 unwind label %64

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

59:                                               ; preds = %57
  %60 = getelementptr inbounds i8, ptr %14, i64 64
  %61 = load i8, ptr %60, align 8, !tbaa !15, !range !22, !noundef !23
  %62 = trunc nuw i8 %61 to i1
  br i1 %62, label %63, label %68

63:                                               ; preds = %59
  call void @__assert_fail(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.1, i32 noundef 70, ptr noundef nonnull @__PRETTY_FUNCTION__._Z15test_asymmetric16symmetric_cipher17asymmetric_cipher24message_digest_algorithm) #8
  unreachable

64:                                               ; preds = %56
  %65 = landingpad { ptr, i32 }
          cleanup
  br label %77

66:                                               ; preds = %57
  %67 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %14) #7
  br label %77

68:                                               ; preds = %59
  %69 = 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) %4, ptr noundef nonnull align 8 dereferenceable(32) %14) #7
  br i1 %69, label %71, label %70

70:                                               ; preds = %68
  call void @__assert_fail(ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.1, i32 noundef 72, ptr noundef nonnull @__PRETTY_FUNCTION__._Z15test_asymmetric16symmetric_cipher17asymmetric_cipher24message_digest_algorithm) #8
  unreachable

71:                                               ; preds = %68
  %72 = getelementptr inbounds i8, ptr %14, i64 32
  %73 = 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) %18, ptr noundef nonnull align 8 dereferenceable(32) %72) #7
  br i1 %73, label %75, label %74

74:                                               ; preds = %71
  call void @__assert_fail(ptr noundef nonnull @.str.6, ptr noundef nonnull @.str.1, i32 noundef 73, ptr noundef nonnull @__PRETTY_FUNCTION__._Z15test_asymmetric16symmetric_cipher17asymmetric_cipher24message_digest_algorithm) #8
  unreachable

75:                                               ; preds = %71
  call void @_ZNSt4pairIN9peacemakr9PlaintextEbED2Ev(ptr noundef nonnull align 8 dereferenceable(65) %14) #7
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %14) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %13) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #7
  br label %76

76:                                               ; preds = %25, %75
  call void @_ZN9peacemakr13CryptoContextD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #7
  call void @_ZN9peacemakr3KeyD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #7
  call void @_ZN9peacemakr9PlaintextD2Ev(ptr noundef nonnull align 8 dereferenceable(64) %4) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %4) #7
  ret void

77:                                               ; preds = %66, %64
  %.pn = phi { ptr, i32 } [ %67, %66 ], [ %65, %64 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %13) #7
  br label %78

78:                                               ; preds = %77, %53
  %.pn.pn = phi { ptr, i32 } [ %.pn, %77 ], [ %54, %53 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #7
  br label %79

79:                                               ; preds = %78, %44
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %78 ], [ %45, %44 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #7
  br label %80

80:                                               ; preds = %79, %37
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %79 ], [ %38, %37 ]
  call void @_ZN9peacemakr13CryptoContextD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #7
  br label %81

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

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

83:                                               ; preds = %82, %31
  %.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn.pn, %82 ], [ %32, %31 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #7
  br label %84

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

; 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

declare void @_ZN9peacemakr3KeyC1E17asymmetric_cipher16symmetric_cipherRNS_12RandomDeviceE(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef, i32 noundef, 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

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