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

; 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.10 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [14 x i8], align 1
@__PRETTY_FUNCTION__._Z17test_uninit_crashv = external hidden unnamed_addr constant [25 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [84 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [82 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: 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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z17test_uninit_crashv() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"struct.peacemakr::Plaintext", align 8
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca %"class.peacemakr::RandomDevice", align 8
  %5 = alloca %"class.peacemakr::Key", align 8
  %6 = alloca %"class.peacemakr::CryptoContext", align 8
  %7 = alloca %"class.std::function", align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %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 %1) #7
  call void @_ZN9peacemakr9PlaintextC2Ev(ptr noundef nonnull align 8 dereferenceable(64) %1) #7
  %14 = getelementptr inbounds %"struct.peacemakr::Plaintext", ptr %1, i32 0, i32 0
  %15 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef @.str.10)
          to label %16 unwind label %26

16:                                               ; preds = %0
  %17 = getelementptr inbounds %"struct.peacemakr::Plaintext", ptr %1, i32 0, i32 1
  %18 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %17, ptr noundef @.str.11)
          to label %19 unwind label %26

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

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

21:                                               ; preds = %20
  %22 = invoke noundef zeroext i1 @_ZNK9peacemakr3Key7isValidEv(ptr noundef nonnull align 8 dereferenceable(8) %5)
          to label %23 unwind label %38

23:                                               ; preds = %21
  br i1 %22, label %24, label %25

24:                                               ; preds = %23
  br label %43

25:                                               ; preds = %23
  call void @__assert_fail(ptr noundef @.str.12, ptr noundef @.str.1, i32 noundef 207, ptr noundef @__PRETTY_FUNCTION__._Z17test_uninit_crashv) #8
  unreachable

26:                                               ; preds = %16, %0
  %27 = landingpad { ptr, i32 }
          cleanup
  %28 = extractvalue { ptr, i32 } %27, 0
  store ptr %28, ptr %2, align 8
  %29 = extractvalue { ptr, i32 } %27, 1
  store i32 %29, ptr %3, align 4
  br label %155

30:                                               ; preds = %19
  %31 = landingpad { ptr, i32 }
          cleanup
  %32 = extractvalue { ptr, i32 } %31, 0
  store ptr %32, ptr %2, align 8
  %33 = extractvalue { ptr, i32 } %31, 1
  store i32 %33, ptr %3, align 4
  br label %154

34:                                               ; preds = %20
  %35 = landingpad { ptr, i32 }
          cleanup
  %36 = extractvalue { ptr, i32 } %35, 0
  store ptr %36, ptr %2, align 8
  %37 = extractvalue { ptr, i32 } %35, 1
  store i32 %37, ptr %3, align 4
  br label %153

38:                                               ; preds = %21
  %39 = landingpad { ptr, i32 }
          cleanup
  %40 = extractvalue { ptr, i32 } %39, 0
  store ptr %40, ptr %2, align 8
  %41 = extractvalue { ptr, i32 } %39, 1
  store i32 %41, ptr %3, align 4
  br label %152

42:                                               ; No predecessors!
  br label %43

43:                                               ; preds = %42, %24
  call void @llvm.lifetime.start.p0(i64 32, ptr %6) #7
  call void @_ZNSt8functionIFvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEC2IRS8_vEEOT_(ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull @_Z6log_fnRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE) #7
  invoke void @_ZN9peacemakr13CryptoContextC1ESt8functionIFvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEE(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef %7)
          to label %44 unwind label %53

44:                                               ; preds = %43
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  %45 = invoke noundef ptr @_ZN9peacemakr13CryptoContext7EncryptERKNS_3KeyERKNS_9PlaintextERNS_12RandomDeviceE(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(64) %1, ptr noundef nonnull align 8 dereferenceable(16) %4)
          to label %46 unwind label %57

46:                                               ; preds = %44
  store ptr %45, ptr %8, align 8, !tbaa !5
  %47 = load ptr, ptr %8, align 8, !tbaa !5
  %48 = icmp eq ptr %47, null
  br i1 %48, label %49, label %61

49:                                               ; preds = %46
  %50 = getelementptr inbounds %"struct.peacemakr::Plaintext", ptr %1, i32 0, i32 0
  %51 = call noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %50) #7
  br i1 %51, label %52, label %61

52:                                               ; preds = %49
  store i32 1, ptr %9, align 4
  br label %144

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

57:                                               ; preds = %44
  %58 = landingpad { ptr, i32 }
          cleanup
  %59 = extractvalue { ptr, i32 } %58, 0
  store ptr %59, ptr %2, align 8
  %60 = extractvalue { ptr, i32 } %58, 1
  store i32 %60, ptr %3, align 4
  br label %150

61:                                               ; preds = %49, %46
  %62 = load ptr, ptr %8, align 8, !tbaa !5
  %63 = icmp ne ptr %62, null
  br i1 %63, label %64, label %65

64:                                               ; preds = %61
  br label %67

65:                                               ; preds = %61
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 214, ptr noundef @__PRETTY_FUNCTION__._Z17test_uninit_crashv) #8
  unreachable

66:                                               ; No predecessors!
  br label %67

67:                                               ; preds = %66, %64
  br label %68

68:                                               ; preds = %67
  call void @llvm.lifetime.start.p0(i64 32, ptr %10) #7
  %69 = load ptr, ptr %8, align 8, !tbaa !5
  invoke void @_ZN9peacemakr13CryptoContext9SerializeB5cxx11E24message_digest_algorithmPv(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %10, ptr noundef nonnull align 8 dereferenceable(32) %6, i32 noundef 2, ptr noundef %69)
          to label %70 unwind label %75

70:                                               ; preds = %68
  %71 = call noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %10) #7
  %72 = xor i1 %71, true
  br i1 %72, label %73, label %74

73:                                               ; preds = %70
  br label %80

74:                                               ; preds = %70
  call void @__assert_fail(ptr noundef @.str.2, ptr noundef @.str.1, i32 noundef 218, ptr noundef @__PRETTY_FUNCTION__._Z17test_uninit_crashv) #8
  unreachable

75:                                               ; preds = %68
  %76 = landingpad { ptr, i32 }
          cleanup
  %77 = extractvalue { ptr, i32 } %76, 0
  store ptr %77, ptr %2, align 8
  %78 = extractvalue { ptr, i32 } %76, 1
  store i32 %78, ptr %3, align 4
  br label %149

79:                                               ; No predecessors!
  br label %80

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

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

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

88:                                               ; preds = %84
  br label %95

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

90:                                               ; preds = %83
  %91 = landingpad { ptr, i32 }
          cleanup
  %92 = extractvalue { ptr, i32 } %91, 0
  store ptr %92, ptr %2, align 8
  %93 = extractvalue { ptr, i32 } %91, 1
  store i32 %93, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 64, ptr %11) #7
  br label %148

94:                                               ; No predecessors!
  br label %95

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

96:                                               ; preds = %95, %80
  call void @llvm.lifetime.start.p0(i64 24, ptr %12) #7
  invoke void @_ZN9peacemakr13CryptoContext11DeserializeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind writable sret(%"struct.std::pair") align 8 %12, ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull align 8 dereferenceable(32) %10)
          to label %97 unwind label %107

97:                                               ; preds = %96
  call void @llvm.lifetime.start.p0(i64 72, ptr %13) #7
  %98 = getelementptr inbounds %"struct.std::pair", ptr %12, i32 0, i32 0
  %99 = load ptr, ptr %98, align 8, !tbaa !9
  invoke void @_ZN9peacemakr13CryptoContext7DecryptERKNS_3KeyEPv(ptr dead_on_unwind writable sret(%"struct.std::pair.1") align 8 %13, ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef %99)
          to label %100 unwind label %111

100:                                              ; preds = %97
  %101 = getelementptr inbounds %"struct.std::pair.1", ptr %13, i32 0, i32 1
  %102 = load i8, ptr %101, align 8, !tbaa !16, !range !23, !noundef !24
  %103 = trunc i8 %102 to i1
  %104 = xor i1 %103, true
  br i1 %104, label %105, label %106

105:                                              ; preds = %100
  br label %116

106:                                              ; preds = %100
  call void @__assert_fail(ptr noundef @.str.4, ptr noundef @.str.1, i32 noundef 229, ptr noundef @__PRETTY_FUNCTION__._Z17test_uninit_crashv) #8
  unreachable

107:                                              ; preds = %96
  %108 = landingpad { ptr, i32 }
          cleanup
  %109 = extractvalue { ptr, i32 } %108, 0
  store ptr %109, ptr %2, align 8
  %110 = extractvalue { ptr, i32 } %108, 1
  store i32 %110, ptr %3, align 4
  br label %147

111:                                              ; preds = %97
  %112 = landingpad { ptr, i32 }
          cleanup
  %113 = extractvalue { ptr, i32 } %112, 0
  store ptr %113, ptr %2, align 8
  %114 = extractvalue { ptr, i32 } %112, 1
  store i32 %114, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 72, ptr %13) #7
  br label %147

115:                                              ; No predecessors!
  br label %116

116:                                              ; preds = %115, %105
  %117 = getelementptr inbounds %"struct.std::pair.1", ptr %13, i32 0, i32 0
  %118 = getelementptr inbounds %"struct.peacemakr::Plaintext", ptr %117, i32 0, i32 0
  %119 = call noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %118) #7
  br i1 %119, label %120, label %121

120:                                              ; preds = %116
  call void @__assert_fail(ptr noundef @.str.13, ptr noundef @.str.1, i32 noundef 231, ptr noundef @__PRETTY_FUNCTION__._Z17test_uninit_crashv) #8
  unreachable

121:                                              ; preds = %116
  %122 = getelementptr inbounds %"struct.peacemakr::Plaintext", ptr %1, i32 0, i32 0
  %123 = getelementptr inbounds %"struct.std::pair.1", ptr %13, 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 %127

127:                                              ; preds = %126, %121
  %128 = phi i1 [ false, %121 ], [ true, %126 ]
  br i1 %128, label %129, label %130

129:                                              ; preds = %127
  br label %132

130:                                              ; preds = %127
  call void @__assert_fail(ptr noundef @.str.15, ptr noundef @.str.1, i32 noundef 235, ptr noundef @__PRETTY_FUNCTION__._Z17test_uninit_crashv) #8
  unreachable

131:                                              ; No predecessors!
  br label %132

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

137:                                              ; preds = %132
  br label %138

138:                                              ; preds = %137, %132
  %139 = phi i1 [ false, %132 ], [ true, %137 ]
  br i1 %139, label %140, label %141

140:                                              ; preds = %138
  br label %143

141:                                              ; preds = %138
  call void @__assert_fail(ptr noundef @.str.16, ptr noundef @.str.1, i32 noundef 237, ptr noundef @__PRETTY_FUNCTION__._Z17test_uninit_crashv) #8
  unreachable

142:                                              ; No predecessors!
  br label %143

143:                                              ; preds = %142, %140
  call void @_ZNSt4pairIN9peacemakr9PlaintextEbED2Ev(ptr noundef nonnull align 8 dereferenceable(65) %13) #7
  call void @llvm.lifetime.end.p0(i64 72, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %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 %10) #7
  store i32 0, ptr %9, align 4
  br label %144

144:                                              ; preds = %143, %52
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  call void @_ZN9peacemakr13CryptoContextD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %6) #7
  call void @_ZN9peacemakr3KeyD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %4) #7
  call void @_ZN9peacemakr9PlaintextD2Ev(ptr noundef nonnull align 8 dereferenceable(64) %1) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr %1) #7
  %145 = load i32, ptr %9, align 4
  switch i32 %145, label %161 [
    i32 0, label %146
    i32 1, label %146
  ]

146:                                              ; preds = %144, %144
  ret void

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

148:                                              ; preds = %147, %90
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #7
  br label %149

149:                                              ; preds = %148, %75
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #7
  br label %150

150:                                              ; preds = %149, %57
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  call void @_ZN9peacemakr13CryptoContextD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #7
  br label %151

151:                                              ; preds = %150, %53
  call void @llvm.lifetime.end.p0(i64 32, ptr %6) #7
  br label %152

152:                                              ; preds = %151, %38
  call void @_ZN9peacemakr3KeyD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #7
  br label %153

153:                                              ; preds = %152, %34
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  br label %154

154:                                              ; preds = %153, %30
  call void @llvm.lifetime.end.p0(i64 16, ptr %4) #7
  br label %155

155:                                              ; preds = %154, %26
  call void @_ZN9peacemakr9PlaintextD2Ev(ptr noundef nonnull align 8 dereferenceable(64) %1) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr %1) #7
  br label %156

156:                                              ; preds = %155
  %157 = load ptr, ptr %2, align 8
  %158 = load i32, ptr %3, align 4
  %159 = insertvalue { ptr, i32 } poison, ptr %157, 0
  %160 = insertvalue { ptr, i32 } %159, i32 %158, 1
  resume { ptr, i32 } %160

161:                                              ; preds = %144
  unreachable
}

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

declare noundef zeroext i1 @_ZNK9peacemakr3Key7isValidEv(ptr noundef nonnull align 8 dereferenceable(8)) #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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 0}
!10 = !{!"_ZTSSt4pairIPv15crypto_config_tE", !6, i64 0, !11, i64 8}
!11 = !{!"_ZTS15crypto_config_t", !12, i64 0, !13, i64 4, !14, i64 8, !15, i64 12}
!12 = !{!"_ZTS15encryption_mode", !7, i64 0}
!13 = !{!"_ZTS16symmetric_cipher", !7, i64 0}
!14 = !{!"_ZTS17asymmetric_cipher", !7, i64 0}
!15 = !{!"_ZTS24message_digest_algorithm", !7, i64 0}
!16 = !{!17, !22, i64 64}
!17 = !{!"_ZTSSt4pairIN9peacemakr9PlaintextEbE", !18, i64 0, !22, i64 64}
!18 = !{!"_ZTSN9peacemakr9PlaintextE", !19, i64 0, !19, i64 32}
!19 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !20, i64 0, !21, i64 8, !7, i64 16}
!20 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!21 = !{!"long", !7, i64 0}
!22 = !{!"bool", !7, i64 0}
!23 = !{i8 0, i8 2}
!24 = !{}


; 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.10 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [14 x i8], align 1
@__PRETTY_FUNCTION__._Z17test_uninit_crashv = external hidden unnamed_addr constant [25 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [84 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [82 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 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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

11:                                               ; preds = %0
  %12 = getelementptr inbounds i8, ptr %1, i64 32
  %13 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef nonnull @.str.11)
          to label %14 unwind label %20

14:                                               ; preds = %11
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %2) #7
  invoke void @_ZN9peacemakr12RandomDeviceC1Ev(ptr noundef nonnull align 8 dereferenceable(16) %2)
          to label %15 unwind label %22

15:                                               ; preds = %14
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #7
  invoke void @_ZN9peacemakr3KeyC1E16symmetric_cipherRNS_12RandomDeviceE(ptr noundef nonnull align 8 dereferenceable(8) %3, i32 noundef 1, ptr noundef nonnull align 8 dereferenceable(16) %2)
          to label %16 unwind label %24

16:                                               ; preds = %15
  %17 = invoke noundef zeroext i1 @_ZNK9peacemakr3Key7isValidEv(ptr noundef nonnull align 8 dereferenceable(8) %3)
          to label %18 unwind label %26

18:                                               ; preds = %16
  br i1 %17, label %28, label %19

19:                                               ; preds = %18
  call void @__assert_fail(ptr noundef nonnull @.str.12, ptr noundef nonnull @.str.1, i32 noundef 207, ptr noundef nonnull @__PRETTY_FUNCTION__._Z17test_uninit_crashv) #8
  unreachable

20:                                               ; preds = %11, %0
  %21 = landingpad { ptr, i32 }
          cleanup
  br label %87

22:                                               ; preds = %14
  %23 = landingpad { ptr, i32 }
          cleanup
  br label %86

24:                                               ; preds = %15
  %25 = landingpad { ptr, i32 }
          cleanup
  br label %85

26:                                               ; preds = %16
  %27 = landingpad { ptr, i32 }
          cleanup
  br label %84

28:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #7
  call void @_ZNSt8functionIFvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEC2IRS8_vEEOT_(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull @_Z6log_fnRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE) #7
  invoke void @_ZN9peacemakr13CryptoContextC1ESt8functionIFvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEE(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull %5)
          to label %29 unwind label %34

29:                                               ; preds = %28
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #7
  %30 = invoke noundef ptr @_ZN9peacemakr13CryptoContext7EncryptERKNS_3KeyERKNS_9PlaintextERNS_12RandomDeviceE(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(64) %1, ptr noundef nonnull align 8 dereferenceable(16) %2)
          to label %31 unwind label %36

31:                                               ; preds = %29
  %cond = icmp eq ptr %30, null
  br i1 %cond, label %32, label %39

32:                                               ; preds = %31
  %33 = call noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %1) #7
  br i1 %33, label %78, label %38

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

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

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

39:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #7
  invoke void @_ZN9peacemakr13CryptoContext9SerializeB5cxx11E24message_digest_algorithmPv(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %6, ptr noundef nonnull align 8 dereferenceable(32) %4, i32 noundef 2, ptr noundef nonnull %30)
          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) %6) #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 218, ptr noundef nonnull @__PRETTY_FUNCTION__._Z17test_uninit_crashv) #8
  unreachable

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

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

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

48:                                               ; preds = %47
  %49 = getelementptr inbounds i8, ptr %7, 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) %12, 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 222, ptr noundef nonnull @__PRETTY_FUNCTION__._Z17test_uninit_crashv) #8
  unreachable

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

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

55:                                               ; preds = %54, %45
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #7
  invoke void @_ZN9peacemakr13CryptoContext11DeserializeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind nonnull writable sret(%"struct.std::pair") align 8 %8, ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull align 8 dereferenceable(32) %6)
          to label %56 unwind label %63

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

58:                                               ; preds = %56
  %59 = getelementptr inbounds i8, ptr %9, 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 229, ptr noundef nonnull @__PRETTY_FUNCTION__._Z17test_uninit_crashv) #8
  unreachable

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

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

67:                                               ; preds = %58
  %68 = call noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %9) #7
  br i1 %68, label %69, label %70

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

70:                                               ; preds = %67
  %71 = 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) %1, ptr noundef nonnull align 8 dereferenceable(32) %9) #7
  br i1 %71, label %73, label %72

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

73:                                               ; preds = %70
  %74 = getelementptr inbounds i8, ptr %9, i64 32
  %75 = 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) %12, ptr noundef nonnull align 8 dereferenceable(32) %74) #7
  br i1 %75, label %77, label %76

76:                                               ; preds = %73
  call void @__assert_fail(ptr noundef nonnull @.str.16, ptr noundef nonnull @.str.1, i32 noundef 237, ptr noundef nonnull @__PRETTY_FUNCTION__._Z17test_uninit_crashv) #8
  unreachable

77:                                               ; preds = %73
  call void @_ZNSt4pairIN9peacemakr9PlaintextEbED2Ev(ptr noundef nonnull align 8 dereferenceable(65) %9) #7
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #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
  br label %78

78:                                               ; preds = %32, %77
  call void @_ZN9peacemakr13CryptoContextD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #7
  call void @_ZN9peacemakr3KeyD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %2) #7
  call void @_ZN9peacemakr9PlaintextD2Ev(ptr noundef nonnull align 8 dereferenceable(64) %1) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %1) #7
  ret void

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

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

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

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

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

84:                                               ; preds = %83, %26
  %.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn, %83 ], [ %27, %26 ]
  call void @_ZN9peacemakr3KeyD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #7
  br label %85

85:                                               ; preds = %84, %24
  %.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn.pn, %84 ], [ %25, %24 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  br label %86

86:                                               ; preds = %85, %22
  %.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn.pn.pn, %85 ], [ %23, %22 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %2) #7
  br label %87

87:                                               ; preds = %86, %20
  %.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn.pn.pn.pn, %86 ], [ %21, %20 ]
  call void @_ZN9peacemakr9PlaintextD2Ev(ptr noundef nonnull align 8 dereferenceable(64) %1) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %1) #7
  resume { ptr, i32 } %.pn.pn.pn.pn.pn.pn.pn.pn.pn
}

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

declare noundef zeroext i1 @_ZNK9peacemakr3Key7isValidEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4

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

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 0}
!6 = !{!"_ZTSSt4pairIPv15crypto_config_tE", !7, i64 0, !10, i64 8}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTS15crypto_config_t", !11, i64 0, !12, i64 4, !13, i64 8, !14, i64 12}
!11 = !{!"_ZTS15encryption_mode", !8, i64 0}
!12 = !{!"_ZTS16symmetric_cipher", !8, i64 0}
!13 = !{!"_ZTS17asymmetric_cipher", !8, i64 0}
!14 = !{!"_ZTS24message_digest_algorithm", !8, i64 0}
!15 = !{!16, !21, i64 64}
!16 = !{!"_ZTSSt4pairIN9peacemakr9PlaintextEbE", !17, i64 0, !21, i64 64}
!17 = !{!"_ZTSN9peacemakr9PlaintextE", !18, i64 0, !18, i64 32}
!18 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !19, i64 0, !20, i64 8, !8, i64 16}
!19 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !7, i64 0}
!20 = !{!"long", !8, i64 0}
!21 = !{!"bool", !8, i64 0}
!22 = !{i8 0, i8 2}
!23 = !{}


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