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

; 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.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
@__PRETTY_FUNCTION__._Z14test_symmetric16symmetric_cipher24message_digest_algorithm = external hidden unnamed_addr constant [64 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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z14test_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
  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 %20 unwind label %38

20:                                               ; preds = %2
  %21 = getelementptr inbounds %"struct.peacemakr::Plaintext", ptr %5, i32 0, i32 0
  %22 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %21, 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 %23 unwind label %42

23:                                               ; preds = %20
  %24 = getelementptr inbounds %"struct.peacemakr::Plaintext", ptr %5, i32 0, i32 1
  %25 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %24, 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 %26 unwind label %46

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

28:                                               ; preds = %26
  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 %29 unwind label %54

29:                                               ; preds = %28
  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
  %30 = 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 %31 unwind label %58

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

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

37:                                               ; preds = %34
  store i32 1, ptr %15, align 4
  br label %135

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

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

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

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

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

58:                                               ; preds = %29
  %59 = landingpad { ptr, i32 }
          cleanup
  %60 = extractvalue { ptr, i32 } %59, 0
  store ptr %60, ptr %7, align 8
  %61 = extractvalue { ptr, i32 } %59, 1
  store i32 %61, ptr %8, align 4
  br label %141

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

65:                                               ; preds = %62
  br label %68

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

67:                                               ; No predecessors!
  br label %68

68:                                               ; preds = %67, %65
  br label %69

69:                                               ; preds = %68
  call void @llvm.lifetime.start.p0(i64 32, ptr %16) #7
  %70 = load i32, ptr %4, align 4, !tbaa !9
  %71 = 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 %70, ptr noundef %71)
          to label %72 unwind label %77

72:                                               ; preds = %69
  %73 = call noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %16) #7
  %74 = xor i1 %73, true
  br i1 %74, label %75, label %76

75:                                               ; preds = %72
  br label %82

76:                                               ; preds = %72
  call void @__assert_fail(ptr noundef @.str.2, ptr noundef @.str.1, i32 noundef 96, ptr noundef @__PRETTY_FUNCTION__._Z14test_symmetric16symmetric_cipher24message_digest_algorithm) #8
  unreachable

77:                                               ; preds = %69
  %78 = landingpad { ptr, i32 }
          cleanup
  %79 = extractvalue { ptr, i32 } %78, 0
  store ptr %79, ptr %7, align 8
  %80 = extractvalue { ptr, i32 } %78, 1
  store i32 %80, ptr %8, align 4
  br label %140

81:                                               ; No predecessors!
  br label %82

82:                                               ; preds = %81, %75
  %83 = getelementptr inbounds %"struct.peacemakr::Plaintext", ptr %5, i32 0, i32 1
  %84 = call noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %83) #7
  br i1 %84, label %98, label %85

85:                                               ; preds = %82
  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 %86 unwind label %92

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

90:                                               ; preds = %86
  br label %97

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

92:                                               ; preds = %85
  %93 = landingpad { ptr, i32 }
          cleanup
  %94 = extractvalue { ptr, i32 } %93, 0
  store ptr %94, ptr %7, align 8
  %95 = extractvalue { ptr, i32 } %93, 1
  store i32 %95, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 64, ptr %17) #7
  br label %139

96:                                               ; No predecessors!
  br label %97

97:                                               ; preds = %96, %90
  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 %98

98:                                               ; preds = %97, %82
  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 %99 unwind label %109

99:                                               ; preds = %98
  call void @llvm.lifetime.start.p0(i64 72, ptr %19) #7
  %100 = getelementptr inbounds %"struct.std::pair", ptr %18, i32 0, i32 0
  %101 = load ptr, ptr %100, 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 %101)
          to label %102 unwind label %113

102:                                              ; preds = %99
  %103 = getelementptr inbounds %"struct.std::pair.1", ptr %19, i32 0, i32 1
  %104 = load i8, ptr %103, align 8, !tbaa !18, !range !25, !noundef !26
  %105 = trunc i8 %104 to i1
  %106 = xor i1 %105, true
  br i1 %106, label %107, label %108

107:                                              ; preds = %102
  br label %118

108:                                              ; preds = %102
  call void @__assert_fail(ptr noundef @.str.4, ptr noundef @.str.1, i32 noundef 107, ptr noundef @__PRETTY_FUNCTION__._Z14test_symmetric16symmetric_cipher24message_digest_algorithm) #8
  unreachable

109:                                              ; preds = %98
  %110 = landingpad { ptr, i32 }
          cleanup
  %111 = extractvalue { ptr, i32 } %110, 0
  store ptr %111, ptr %7, align 8
  %112 = extractvalue { ptr, i32 } %110, 1
  store i32 %112, ptr %8, align 4
  br label %138

113:                                              ; preds = %99
  %114 = landingpad { ptr, i32 }
          cleanup
  %115 = extractvalue { ptr, i32 } %114, 0
  store ptr %115, ptr %7, align 8
  %116 = extractvalue { ptr, i32 } %114, 1
  store i32 %116, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 72, ptr %19) #7
  br label %138

117:                                              ; No predecessors!
  br label %118

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

123:                                              ; preds = %118
  br label %126

124:                                              ; preds = %118
  call void @__assert_fail(ptr noundef @.str.5, ptr noundef @.str.1, i32 noundef 109, ptr noundef @__PRETTY_FUNCTION__._Z14test_symmetric16symmetric_cipher24message_digest_algorithm) #8
  unreachable

125:                                              ; No predecessors!
  br label %126

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

131:                                              ; preds = %126
  br label %134

132:                                              ; preds = %126
  call void @__assert_fail(ptr noundef @.str.6, ptr noundef @.str.1, i32 noundef 110, ptr noundef @__PRETTY_FUNCTION__._Z14test_symmetric16symmetric_cipher24message_digest_algorithm) #8
  unreachable

133:                                              ; No predecessors!
  br label %134

134:                                              ; preds = %133, %131
  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 %135

135:                                              ; preds = %134, %37
  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
  %136 = load i32, ptr %15, align 4
  switch i32 %136, label %151 [
    i32 0, label %137
    i32 1, label %137
  ]

137:                                              ; preds = %135, %135
  ret void

138:                                              ; preds = %113, %109
  call void @llvm.lifetime.end.p0(i64 24, ptr %18) #7
  br label %139

139:                                              ; preds = %138, %92
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #7
  br label %140

140:                                              ; preds = %139, %77
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #7
  br label %141

141:                                              ; preds = %140, %58
  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 %142

142:                                              ; preds = %141, %54
  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 %143

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

144:                                              ; preds = %143, %46
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #7
  br label %145

145:                                              ; preds = %144, %42, %38
  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 %146

146:                                              ; preds = %145
  %147 = load ptr, ptr %7, align 8
  %148 = load i32, ptr %8, align 4
  %149 = insertvalue { ptr, i32 } poison, ptr %147, 0
  %150 = insertvalue { ptr, i32 } %149, i32 %148, 1
  resume { ptr, i32 } %150

151:                                              ; preds = %135
  unreachable
}

declare void @_ZN9peacemakr3KeyC1E16symmetric_cipherRNS_12RandomDeviceE(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef, ptr noundef nonnull align 8 dereferenceable(16)) 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 = { 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 = !{}


; 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.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
@__PRETTY_FUNCTION__._Z14test_symmetric16symmetric_cipher24message_digest_algorithm = external hidden unnamed_addr constant [64 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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z14test_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 %75, label %38

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

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

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

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

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

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

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

39:                                               ; preds = %23
  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 %40 unwind label %43

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

42:                                               ; preds = %40
  call void @__assert_fail(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.1, i32 noundef 96, ptr noundef nonnull @__PRETTY_FUNCTION__._Z14test_symmetric16symmetric_cipher24message_digest_algorithm) #8
  unreachable

43:                                               ; preds = %39
  %44 = landingpad { ptr, i32 }
          cleanup
  br label %78

45:                                               ; preds = %40
  %46 = call noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %17) #7
  br i1 %46, label %55, label %47

47:                                               ; preds = %45
  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 %48 unwind label %52

48:                                               ; preds = %47
  %49 = getelementptr inbounds i8, ptr %11, i64 32
  %50 = 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) %49) #7
  br i1 %50, label %54, label %51

51:                                               ; preds = %48
  call void @__assert_fail(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.1, i32 noundef 100, ptr noundef nonnull @__PRETTY_FUNCTION__._Z14test_symmetric16symmetric_cipher24message_digest_algorithm) #8
  unreachable

52:                                               ; preds = %47
  %53 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %11) #7
  br label %77

54:                                               ; preds = %48
  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 %55

55:                                               ; preds = %54, %45
  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 %56 unwind label %63

56:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %13) #7
  %57 = 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 %57)
          to label %58 unwind label %65

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

62:                                               ; preds = %58
  call void @__assert_fail(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.1, i32 noundef 107, ptr noundef nonnull @__PRETTY_FUNCTION__._Z14test_symmetric16symmetric_cipher24message_digest_algorithm) #8
  unreachable

63:                                               ; preds = %55
  %64 = landingpad { ptr, i32 }
          cleanup
  br label %76

65:                                               ; preds = %56
  %66 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %13) #7
  br label %76

67:                                               ; preds = %58
  %68 = 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 %68, label %70, label %69

69:                                               ; preds = %67
  call void @__assert_fail(ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.1, i32 noundef 109, ptr noundef nonnull @__PRETTY_FUNCTION__._Z14test_symmetric16symmetric_cipher24message_digest_algorithm) #8
  unreachable

70:                                               ; preds = %67
  %71 = getelementptr inbounds i8, ptr %13, i64 32
  %72 = 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) %71) #7
  br i1 %72, label %74, label %73

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

74:                                               ; preds = %70
  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 %75

75:                                               ; preds = %24, %74
  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

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

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

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

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

80:                                               ; preds = %79, %34
  %.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn, %79 ], [ %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 %81

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

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

83:                                               ; preds = %82, %28, %26
  %.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn.pn.pn, %82 ], [ %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
}

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