; LLVM IR from specinfo-ua/UAPKI :: library/common/pkix (dstu-ns)

; 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.UapkiNS::SmartBA" = type { ptr }
%"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] }
%"class.std::allocator" = type { i8 }
%struct.DSTU4145Params = type { %struct.DSTUEllipticCurve, ptr, %struct.asn_struct_ctx_s }
%struct.DSTUEllipticCurve = type { i32, %"union.DSTUEllipticCurve::DSTUEllipticCurve_u", %struct.asn_struct_ctx_s }
%"union.DSTUEllipticCurve::DSTUEllipticCurve_u" = type { %struct.ECBinary }
%struct.ECBinary = type { ptr, %struct.BinaryField, i64, %struct.OCTET_STRING, %struct.ASN__PRIMITIVE_TYPE_s, %struct.OCTET_STRING, %struct.asn_struct_ctx_s }
%struct.BinaryField = type { %struct.ASN__PRIMITIVE_TYPE_s, ptr, %struct.asn_struct_ctx_s }
%struct.ASN__PRIMITIVE_TYPE_s = type { ptr, i32 }
%struct.OCTET_STRING = type { ptr, i32, %struct.asn_struct_ctx_s }
%struct.asn_struct_ctx_s = type { i16, i16, i32, ptr, i64 }

@.str = external hidden unnamed_addr constant [24 x i8], align 1
@OID_DSTU4145_PARAM_M257_PB = external global ptr, align 8
@_ZL27SHEX_DSTU4145_PARAM_M257_PB = external hidden global ptr, align 8
@OID_DSTU4145_PARAM_M431_PB = external global ptr, align 8
@_ZL27SHEX_DSTU4145_PARAM_M431_PB = external hidden global ptr, align 8

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

declare void @stacktrace_create(ptr noundef, i64 noundef, i32 noundef, ptr noundef) #1

declare void @stacktrace_add(ptr noundef, i64 noundef, i32 noundef) #1

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN6DstuNS8Dstu414512decodeParamsEPK12ByteArray_stRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef %0, ptr noundef nonnull align 8 dereferenceable(32) %1) #2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca %"class.UapkiNS::SmartBA", align 8
  %8 = alloca %"class.UapkiNS::SmartBA", align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca %"class.std::__cxx11::basic_string", align 8
  %13 = alloca %"class.std::allocator", align 1
  %14 = alloca %"class.std::__cxx11::basic_string", align 8
  %15 = alloca %"class.std::allocator", align 1
  %16 = alloca %"class.std::__cxx11::basic_string", align 8
  %17 = alloca %"class.std::allocator", align 1
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  store i32 0, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  store ptr null, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  call void @_ZN7UapkiNS7SmartBAC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %7)
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  invoke void @_ZN7UapkiNS7SmartBAC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %8)
          to label %18 unwind label %25

18:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  store ptr null, ptr %11, align 8, !tbaa !5
  br label %19

19:                                               ; preds = %18
  %20 = load ptr, ptr %3, align 8, !tbaa !5
  %21 = icmp ne ptr %20, null
  br i1 %21, label %33, label %22

22:                                               ; preds = %19
  store i32 2, ptr %5, align 4, !tbaa !9
  %23 = load i32, ptr %5, align 4, !tbaa !9
  invoke void @stacktrace_create(ptr noundef @.str, i64 noundef 107, i32 noundef %23, ptr noundef null)
          to label %24 unwind label %29

24:                                               ; preds = %22
  br label %166

25:                                               ; preds = %2
  %26 = landingpad { ptr, i32 }
          cleanup
  %27 = extractvalue { ptr, i32 } %26, 0
  store ptr %27, ptr %9, align 8
  %28 = extractvalue { ptr, i32 } %26, 1
  store i32 %28, ptr %10, align 4
  br label %174

29:                                               ; preds = %168, %166, %159, %152, %145, %143, %141, %136, %132, %125, %120, %111, %106, %101, %96, %91, %86, %84, %63, %55, %43, %38, %36, %22
  %30 = landingpad { ptr, i32 }
          cleanup
  %31 = extractvalue { ptr, i32 } %30, 0
  store ptr %31, ptr %9, align 8
  %32 = extractvalue { ptr, i32 } %30, 1
  store i32 %32, ptr %10, align 4
  br label %173

33:                                               ; preds = %19
  br label %34

34:                                               ; preds = %33
  br label %35

35:                                               ; preds = %34
  br label %36

36:                                               ; preds = %35
  %37 = invoke ptr @get_DSTU4145Params_desc()
          to label %38 unwind label %29

38:                                               ; preds = %36
  %39 = load ptr, ptr %3, align 8, !tbaa !5
  %40 = invoke ptr @asn_decode_ba_with_alloc(ptr noundef %37, ptr noundef %39)
          to label %41 unwind label %29

41:                                               ; preds = %38
  store ptr %40, ptr %6, align 8, !tbaa !5
  %42 = icmp eq ptr null, %40
  br i1 %42, label %43, label %46

43:                                               ; preds = %41
  store i32 2, ptr %5, align 4, !tbaa !9
  %44 = load i32, ptr %5, align 4, !tbaa !9
  invoke void @stacktrace_add(ptr noundef @.str, i64 noundef 109, i32 noundef %44)
          to label %45 unwind label %29

45:                                               ; preds = %43
  br label %166

46:                                               ; preds = %41
  br label %47

47:                                               ; preds = %46
  br label %48

48:                                               ; preds = %47
  %49 = load ptr, ptr %6, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.DSTU4145Params, ptr %49, i32 0, i32 0
  %51 = getelementptr inbounds %struct.DSTUEllipticCurve, ptr %50, i32 0, i32 0
  %52 = load i32, ptr %51, align 8, !tbaa !11
  %53 = icmp eq i32 %52, 2
  br i1 %53, label %54, label %77

54:                                               ; preds = %48
  br label %55

55:                                               ; preds = %54
  %56 = load ptr, ptr %6, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.DSTU4145Params, ptr %56, i32 0, i32 0
  %58 = getelementptr inbounds %struct.DSTUEllipticCurve, ptr %57, i32 0, i32 1
  %59 = invoke i32 @asn_oid_to_text(ptr noundef %58, ptr noundef %11)
          to label %60 unwind label %29

60:                                               ; preds = %55
  store i32 %59, ptr %5, align 4, !tbaa !9
  %61 = load i32, ptr %5, align 4, !tbaa !9
  %62 = icmp ne i32 %61, 0
  br i1 %62, label %63, label %66

63:                                               ; preds = %60
  %64 = load i32, ptr %5, align 4, !tbaa !9
  invoke void @stacktrace_add(ptr noundef @.str, i64 noundef 112, i32 noundef %64)
          to label %65 unwind label %29

65:                                               ; preds = %63
  br label %166

66:                                               ; preds = %60
  br label %67

67:                                               ; preds = %66
  br label %68

68:                                               ; preds = %67
  call void @llvm.lifetime.start.p0(i64 32, ptr %12) #5
  %69 = load ptr, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %13) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef %69, ptr noundef nonnull align 1 dereferenceable(1) %13)
          to label %70 unwind label %73

70:                                               ; preds = %68
  %71 = load ptr, ptr %4, align 8, !tbaa !5
  %72 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %71, ptr noundef nonnull align 8 dereferenceable(32) %12) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #5
  br label %165

73:                                               ; preds = %68
  %74 = landingpad { ptr, i32 }
          cleanup
  %75 = extractvalue { ptr, i32 } %74, 0
  store ptr %75, ptr %9, align 8
  %76 = extractvalue { ptr, i32 } %74, 1
  store i32 %76, ptr %10, align 4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #5
  br label %173

77:                                               ; preds = %48
  %78 = load ptr, ptr %6, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.DSTU4145Params, ptr %78, i32 0, i32 0
  %80 = getelementptr inbounds %struct.DSTUEllipticCurve, ptr %79, i32 0, i32 0
  %81 = load i32, ptr %80, align 8, !tbaa !11
  %82 = icmp eq i32 %81, 1
  br i1 %82, label %83, label %158

83:                                               ; preds = %77
  br label %84

84:                                               ; preds = %83
  %85 = invoke ptr @get_ECBinary_desc()
          to label %86 unwind label %29

86:                                               ; preds = %84
  %87 = load ptr, ptr %6, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.DSTU4145Params, ptr %87, i32 0, i32 0
  %89 = getelementptr inbounds %struct.DSTUEllipticCurve, ptr %88, i32 0, i32 1
  %90 = invoke noundef ptr @_ZN7UapkiNS7SmartBAadEv(ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %91 unwind label %29

91:                                               ; preds = %86
  %92 = invoke i32 @asn_encode_ba(ptr noundef %85, ptr noundef %89, ptr noundef %90)
          to label %93 unwind label %29

93:                                               ; preds = %91
  store i32 %92, ptr %5, align 4, !tbaa !9
  %94 = load i32, ptr %5, align 4, !tbaa !9
  %95 = icmp ne i32 %94, 0
  br i1 %95, label %96, label %99

96:                                               ; preds = %93
  %97 = load i32, ptr %5, align 4, !tbaa !9
  invoke void @stacktrace_add(ptr noundef @.str, i64 noundef 116, i32 noundef %97)
          to label %98 unwind label %29

98:                                               ; preds = %96
  br label %166

99:                                               ; preds = %93
  br label %100

100:                                              ; preds = %99
  br label %101

101:                                              ; preds = %100
  %102 = invoke noundef i64 @_ZNK7UapkiNS7SmartBA4sizeEv(ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %103 unwind label %29

103:                                              ; preds = %101
  switch i64 %102, label %132 [
    i64 119, label %104
    i64 191, label %118
  ]

104:                                              ; preds = %103
  call void @llvm.lifetime.start.p0(i64 32, ptr %14) #5
  %105 = load ptr, ptr @OID_DSTU4145_PARAM_M257_PB, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef %105, ptr noundef nonnull align 1 dereferenceable(1) %15)
          to label %106 unwind label %114

106:                                              ; preds = %104
  %107 = load ptr, ptr %4, align 8, !tbaa !5
  %108 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %107, ptr noundef nonnull align 8 dereferenceable(32) %14) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #5
  %109 = load ptr, ptr @_ZL27SHEX_DSTU4145_PARAM_M257_PB, align 8, !tbaa !5
  %110 = invoke ptr @ba_alloc_from_hex(ptr noundef %109)
          to label %111 unwind label %29

111:                                              ; preds = %106
  %112 = invoke noundef zeroext i1 @_ZN7UapkiNS7SmartBA3setEP12ByteArray_st(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef %110)
          to label %113 unwind label %29

113:                                              ; preds = %111
  br label %132

114:                                              ; preds = %104
  %115 = landingpad { ptr, i32 }
          cleanup
  %116 = extractvalue { ptr, i32 } %115, 0
  store ptr %116, ptr %9, align 8
  %117 = extractvalue { ptr, i32 } %115, 1
  store i32 %117, ptr %10, align 4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #5
  br label %173

118:                                              ; preds = %103
  call void @llvm.lifetime.start.p0(i64 32, ptr %16) #5
  %119 = load ptr, ptr @OID_DSTU4145_PARAM_M431_PB, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %17) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %16, ptr noundef %119, ptr noundef nonnull align 1 dereferenceable(1) %17)
          to label %120 unwind label %128

120:                                              ; preds = %118
  %121 = load ptr, ptr %4, align 8, !tbaa !5
  %122 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %121, ptr noundef nonnull align 8 dereferenceable(32) %16) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #5
  %123 = load ptr, ptr @_ZL27SHEX_DSTU4145_PARAM_M431_PB, align 8, !tbaa !5
  %124 = invoke ptr @ba_alloc_from_hex(ptr noundef %123)
          to label %125 unwind label %29

125:                                              ; preds = %120
  %126 = invoke noundef zeroext i1 @_ZN7UapkiNS7SmartBA3setEP12ByteArray_st(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef %124)
          to label %127 unwind label %29

127:                                              ; preds = %125
  br label %132

128:                                              ; preds = %118
  %129 = landingpad { ptr, i32 }
          cleanup
  %130 = extractvalue { ptr, i32 } %129, 0
  store ptr %130, ptr %9, align 8
  %131 = extractvalue { ptr, i32 } %129, 1
  store i32 %131, ptr %10, align 4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #5
  br label %173

132:                                              ; preds = %127, %113, %103
  %133 = invoke noundef zeroext i1 @_ZNK7UapkiNS7SmartBA5emptyEv(ptr noundef nonnull align 8 dereferenceable(8) %8)
          to label %134 unwind label %29

134:                                              ; preds = %132
  br i1 %133, label %135, label %141

135:                                              ; preds = %134
  br label %136

136:                                              ; preds = %135
  store i32 4097, ptr %5, align 4, !tbaa !9
  %137 = load i32, ptr %5, align 4, !tbaa !9
  invoke void @stacktrace_create(ptr noundef @.str, i64 noundef 130, i32 noundef %137, ptr noundef null)
          to label %138 unwind label %29

138:                                              ; preds = %136
  br label %166

139:                                              ; No predecessors!
  br label %140

140:                                              ; preds = %139
  br label %141

141:                                              ; preds = %140, %134
  %142 = invoke noundef ptr @_ZNK7UapkiNS7SmartBA3getEv(ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %143 unwind label %29

143:                                              ; preds = %141
  %144 = invoke noundef ptr @_ZNK7UapkiNS7SmartBA3getEv(ptr noundef nonnull align 8 dereferenceable(8) %8)
          to label %145 unwind label %29

145:                                              ; preds = %143
  %146 = invoke i32 @ba_cmp(ptr noundef %142, ptr noundef %144)
          to label %147 unwind label %29

147:                                              ; preds = %145
  store i32 %146, ptr %5, align 4, !tbaa !9
  %148 = load i32, ptr %5, align 4, !tbaa !9
  %149 = icmp ne i32 %148, 0
  br i1 %149, label %150, label %157

150:                                              ; preds = %147
  %151 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5clearEv(ptr noundef nonnull align 8 dereferenceable(32) %151) #5
  br label %152

152:                                              ; preds = %150
  store i32 4101, ptr %5, align 4, !tbaa !9
  %153 = load i32, ptr %5, align 4, !tbaa !9
  invoke void @stacktrace_create(ptr noundef @.str, i64 noundef 136, i32 noundef %153, ptr noundef null)
          to label %154 unwind label %29

154:                                              ; preds = %152
  br label %166

155:                                              ; No predecessors!
  br label %156

156:                                              ; preds = %155
  br label %157

157:                                              ; preds = %156, %147
  br label %164

158:                                              ; preds = %77
  br label %159

159:                                              ; preds = %158
  store i32 4101, ptr %5, align 4, !tbaa !9
  %160 = load i32, ptr %5, align 4, !tbaa !9
  invoke void @stacktrace_create(ptr noundef @.str, i64 noundef 140, i32 noundef %160, ptr noundef null)
          to label %161 unwind label %29

161:                                              ; preds = %159
  br label %166

162:                                              ; No predecessors!
  br label %163

163:                                              ; preds = %162
  br label %164

164:                                              ; preds = %163, %157
  br label %165

165:                                              ; preds = %164, %70
  br label %166

166:                                              ; preds = %165, %161, %154, %138, %98, %65, %45, %24
  %167 = invoke ptr @get_DSTU4145Params_desc()
          to label %168 unwind label %29

168:                                              ; preds = %166
  %169 = load ptr, ptr %6, align 8, !tbaa !5
  invoke void @asn_free(ptr noundef %167, ptr noundef %169)
          to label %170 unwind label %29

170:                                              ; preds = %168
  %171 = load ptr, ptr %11, align 8, !tbaa !5
  call void @free(ptr noundef %171) #5
  %172 = load i32, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @_ZN7UapkiNS7SmartBAD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @_ZN7UapkiNS7SmartBAD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  ret i32 %172

173:                                              ; preds = %128, %114, %73, %29
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @_ZN7UapkiNS7SmartBAD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #5
  br label %174

174:                                              ; preds = %173, %25
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @_ZN7UapkiNS7SmartBAD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  br label %175

175:                                              ; preds = %174
  %176 = load ptr, ptr %9, align 8
  %177 = load i32, ptr %10, align 4
  %178 = insertvalue { ptr, i32 } poison, ptr %176, 0
  %179 = insertvalue { ptr, i32 } %178, i32 %177, 1
  resume { ptr, i32 } %179
}

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

declare i32 @__gxx_personality_v0(...)

declare ptr @asn_decode_ba_with_alloc(ptr noundef, ptr noundef) #1

declare ptr @get_DSTU4145Params_desc() #1

declare i32 @asn_oid_to_text(ptr noundef, ptr noundef) #1

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 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)) #3 align 2

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

declare i32 @asn_encode_ba(ptr noundef, ptr noundef, ptr noundef) #1

declare ptr @get_ECBinary_desc() #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN7UapkiNS7SmartBAadEv(ptr noundef nonnull align 8 dereferenceable(8)) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNK7UapkiNS7SmartBA4sizeEv(ptr noundef nonnull align 8 dereferenceable(8)) #2 align 2

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

declare ptr @ba_alloc_from_hex(ptr noundef) #1

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

declare i32 @ba_cmp(ptr noundef, ptr noundef) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK7UapkiNS7SmartBA3getEv(ptr noundef nonnull align 8 dereferenceable(8)) #3 align 2

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

declare void @asn_free(ptr noundef, ptr noundef) #1

; Function Attrs: nounwind
declare void @free(ptr noundef) #4

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 #2 = { 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 #3 = { 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 = { 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 #5 = { 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, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !14, i64 0}
!12 = !{!"_ZTS14DSTU4145Params", !13, i64 0, !6, i64 216, !15, i64 224}
!13 = !{!"_ZTS17DSTUEllipticCurve", !14, i64 0, !7, i64 8, !15, i64 192}
!14 = !{!"_ZTS20DSTUEllipticCurve_PR", !7, i64 0}
!15 = !{!"_ZTS16asn_struct_ctx_s", !16, i64 0, !16, i64 2, !10, i64 4, !6, i64 8, !17, i64 16}
!16 = !{!"short", !7, i64 0}
!17 = !{!"long", !7, i64 0}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.UapkiNS::SmartBA" = type { ptr }
%"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] }
%"class.std::allocator" = type { i8 }

@.str = external hidden unnamed_addr constant [24 x i8], align 1
@OID_DSTU4145_PARAM_M257_PB = external local_unnamed_addr global ptr, align 8
@_ZL27SHEX_DSTU4145_PARAM_M257_PB = external hidden local_unnamed_addr global ptr, align 8
@OID_DSTU4145_PARAM_M431_PB = external local_unnamed_addr global ptr, align 8
@_ZL27SHEX_DSTU4145_PARAM_M431_PB = external hidden local_unnamed_addr global ptr, align 8

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

declare void @stacktrace_create(ptr noundef, i64 noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

declare void @stacktrace_add(ptr noundef, i64 noundef, i32 noundef) local_unnamed_addr #1

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN6DstuNS8Dstu414512decodeParamsEPK12ByteArray_stRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef %0, ptr noundef nonnull align 8 dereferenceable(32) %1) local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.UapkiNS::SmartBA", align 8
  %4 = alloca %"class.UapkiNS::SmartBA", align 8
  %5 = alloca ptr, align 8
  %6 = alloca %"class.std::__cxx11::basic_string", align 8
  %7 = alloca %"class.std::allocator", align 1
  %8 = alloca %"class.std::__cxx11::basic_string", align 8
  %9 = alloca %"class.std::allocator", align 1
  %10 = alloca %"class.std::__cxx11::basic_string", align 8
  %11 = alloca %"class.std::allocator", align 1
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #5
  call void @_ZN7UapkiNS7SmartBAC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #5
  call void @_ZN7UapkiNS7SmartBAC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  store ptr null, ptr %5, align 8, !tbaa !5
  %.not = icmp eq ptr %0, null
  br i1 %.not, label %12, label %15

12:                                               ; preds = %2
  invoke void @stacktrace_create(ptr noundef nonnull @.str, i64 noundef 107, i32 noundef 2, ptr noundef null)
          to label %72 unwind label %13

13:                                               ; preds = %.invoke37, %.invoke, %74, %72, %65, %64, %61, %43, %42, %37, %35, %28, %24, %21, %17, %15, %12
  %14 = landingpad { ptr, i32 }
          cleanup
  br label %77

15:                                               ; preds = %2
  %16 = invoke ptr @get_DSTU4145Params_desc()
          to label %17 unwind label %13

17:                                               ; preds = %15
  %18 = invoke ptr @asn_decode_ba_with_alloc(ptr noundef %16, ptr noundef nonnull %0)
          to label %19 unwind label %13

19:                                               ; preds = %17
  %20 = icmp eq ptr %18, null
  br i1 %20, label %21, label %22

21:                                               ; preds = %19
  invoke void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 109, i32 noundef 2)
          to label %72 unwind label %13

22:                                               ; preds = %19
  %23 = load i32, ptr %18, align 8, !tbaa !9
  switch i32 %23, label %.invoke [
    i32 2, label %24
    i32 1, label %35
  ]

24:                                               ; preds = %22
  %25 = getelementptr inbounds i8, ptr %18, i64 8
  %26 = invoke i32 @asn_oid_to_text(ptr noundef nonnull %25, ptr noundef nonnull %5)
          to label %27 unwind label %13

27:                                               ; preds = %24
  %.not35 = icmp eq i32 %26, 0
  br i1 %.not35, label %29, label %28

28:                                               ; preds = %27
  invoke void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 112, i32 noundef %26)
          to label %72 unwind label %13

29:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #5
  %30 = load ptr, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef %30, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %31 unwind label %33

31:                                               ; preds = %29
  %32 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(32) %6) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #5
  br label %72

33:                                               ; preds = %29
  %34 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #5
  br label %77

35:                                               ; preds = %22
  %36 = invoke ptr @get_ECBinary_desc()
          to label %37 unwind label %13

37:                                               ; preds = %35
  %38 = getelementptr inbounds i8, ptr %18, i64 8
  %39 = call noundef ptr @_ZN7UapkiNS7SmartBAadEv(ptr noundef nonnull align 8 dereferenceable(8) %3)
  %40 = invoke i32 @asn_encode_ba(ptr noundef %36, ptr noundef nonnull %38, ptr noundef %39)
          to label %41 unwind label %13

41:                                               ; preds = %37
  %.not33 = icmp eq i32 %40, 0
  br i1 %.not33, label %43, label %42

42:                                               ; preds = %41
  invoke void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 116, i32 noundef %40)
          to label %72 unwind label %13

43:                                               ; preds = %41
  %44 = invoke noundef i64 @_ZNK7UapkiNS7SmartBA4sizeEv(ptr noundef nonnull align 8 dereferenceable(8) %3)
          to label %45 unwind label %13

45:                                               ; preds = %43
  switch i64 %44, label %61 [
    i64 119, label %46
    i64 191, label %52
  ]

46:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #5
  %47 = load ptr, ptr @OID_DSTU4145_PARAM_M257_PB, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %9) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef %47, ptr noundef nonnull align 1 dereferenceable(1) %9)
          to label %48 unwind label %50

48:                                               ; preds = %46
  %49 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(32) %8) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #5
  br label %.invoke37

50:                                               ; preds = %46
  %51 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #5
  br label %77

52:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %10) #5
  %53 = load ptr, ptr @OID_DSTU4145_PARAM_M431_PB, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %11) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef %53, ptr noundef nonnull align 1 dereferenceable(1) %11)
          to label %54 unwind label %58

54:                                               ; preds = %52
  %55 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(32) %10) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #5
  br label %.invoke37

.invoke37:                                        ; preds = %48, %54
  %_ZL27SHEX_DSTU4145_PARAM_M257_PB.sink = phi ptr [ @_ZL27SHEX_DSTU4145_PARAM_M257_PB, %48 ], [ @_ZL27SHEX_DSTU4145_PARAM_M431_PB, %54 ]
  %56 = load ptr, ptr %_ZL27SHEX_DSTU4145_PARAM_M257_PB.sink, align 8, !tbaa !5
  %57 = invoke ptr @ba_alloc_from_hex(ptr noundef %56)
          to label %.sink.split unwind label %13

58:                                               ; preds = %52
  %59 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #5
  br label %77

.sink.split:                                      ; preds = %.invoke37
  %60 = call noundef zeroext i1 @_ZN7UapkiNS7SmartBA3setEP12ByteArray_st(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef %57)
  br label %61

61:                                               ; preds = %.sink.split, %45
  %62 = invoke noundef zeroext i1 @_ZNK7UapkiNS7SmartBA5emptyEv(ptr noundef nonnull align 8 dereferenceable(8) %4)
          to label %63 unwind label %13

63:                                               ; preds = %61
  br i1 %62, label %64, label %65

64:                                               ; preds = %63
  invoke void @stacktrace_create(ptr noundef nonnull @.str, i64 noundef 130, i32 noundef 4097, ptr noundef null)
          to label %72 unwind label %13

65:                                               ; preds = %63
  %66 = call noundef ptr @_ZNK7UapkiNS7SmartBA3getEv(ptr noundef nonnull align 8 dereferenceable(8) %3)
  %67 = call noundef ptr @_ZNK7UapkiNS7SmartBA3getEv(ptr noundef nonnull align 8 dereferenceable(8) %4)
  %68 = invoke i32 @ba_cmp(ptr noundef %66, ptr noundef %67)
          to label %69 unwind label %13

69:                                               ; preds = %65
  %.not34 = icmp eq i32 %68, 0
  br i1 %.not34, label %72, label %70

70:                                               ; preds = %69
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5clearEv(ptr noundef nonnull align 8 dereferenceable(32) %1) #5
  br label %.invoke

.invoke:                                          ; preds = %22, %70
  %71 = phi i64 [ 136, %70 ], [ 140, %22 ]
  invoke void @stacktrace_create(ptr noundef nonnull @.str, i64 noundef %71, i32 noundef 4101, ptr noundef null)
          to label %72 unwind label %13

72:                                               ; preds = %.invoke, %31, %69, %64, %42, %28, %21, %12
  %.025 = phi i32 [ 2, %21 ], [ %26, %28 ], [ 0, %31 ], [ %40, %42 ], [ 4097, %64 ], [ 0, %69 ], [ 2, %12 ], [ 4101, %.invoke ]
  %.024 = phi ptr [ null, %21 ], [ %18, %28 ], [ %18, %31 ], [ %18, %42 ], [ %18, %64 ], [ %18, %69 ], [ null, %12 ], [ %18, %.invoke ]
  %73 = invoke ptr @get_DSTU4145Params_desc()
          to label %74 unwind label %13

74:                                               ; preds = %72
  invoke void @asn_free(ptr noundef %73, ptr noundef %.024)
          to label %75 unwind label %13

75:                                               ; preds = %74
  %76 = load ptr, ptr %5, align 8, !tbaa !5
  call void @free(ptr noundef %76) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  call void @_ZN7UapkiNS7SmartBAD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  call void @_ZN7UapkiNS7SmartBAD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  ret i32 %.025

77:                                               ; preds = %58, %50, %33, %13
  %.pn = phi { ptr, i32 } [ %14, %13 ], [ %34, %33 ], [ %59, %58 ], [ %51, %50 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  call void @_ZN7UapkiNS7SmartBAD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  call void @_ZN7UapkiNS7SmartBAD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  resume { ptr, i32 } %.pn
}

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

declare i32 @__gxx_personality_v0(...)

declare ptr @asn_decode_ba_with_alloc(ptr noundef, ptr noundef) local_unnamed_addr #1

declare ptr @get_DSTU4145Params_desc() local_unnamed_addr #1

declare i32 @asn_oid_to_text(ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 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 #3 align 2

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

declare i32 @asn_encode_ba(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare ptr @get_ECBinary_desc() local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN7UapkiNS7SmartBAadEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNK7UapkiNS7SmartBA4sizeEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 align 2

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

declare ptr @ba_alloc_from_hex(ptr noundef) local_unnamed_addr #1

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

declare i32 @ba_cmp(ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK7UapkiNS7SmartBA3getEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3 align 2

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

declare void @asn_free(ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #4

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 #2 = { 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 #3 = { 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 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "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 = { 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, !12, i64 0}
!10 = !{!"_ZTS14DSTU4145Params", !11, i64 0, !6, i64 216, !13, i64 224}
!11 = !{!"_ZTS17DSTUEllipticCurve", !12, i64 0, !7, i64 8, !13, i64 192}
!12 = !{!"_ZTS20DSTUEllipticCurve_PR", !7, i64 0}
!13 = !{!"_ZTS16asn_struct_ctx_s", !14, i64 0, !14, i64 2, !15, i64 4, !6, i64 8, !16, i64 16}
!14 = !{!"short", !7, i64 0}
!15 = !{!"int", !7, i64 0}
!16 = !{!"long", !7, i64 0}


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