; LLVM IR from specinfo-ua/UAPKI :: library/uapki/src/api (verify)

; 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.UapkiNS::ContentHasher" = type { i32, i32, ptr, i8, %"class.std::__cxx11::basic_string", ptr, i64, %"class.UapkiNS::SmartBA" }
%"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.UapkiNS::Doc::Verify::VerifyOptions" = type { i32, i8, i32 }

@.str = external hidden unnamed_addr constant [10 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [8 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local i32 @uapki_verify_signature(ptr noundef %0, ptr noundef %1) #0 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca %"class.UapkiNS::SmartBA", align 8
  %8 = alloca %"class.UapkiNS::ContentHasher", align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i8, align 1
  %15 = alloca %"class.UapkiNS::SmartBA", align 8
  %16 = alloca ptr, align 8
  %17 = alloca i64, align 8
  %18 = alloca i32, align 4
  %19 = alloca %"struct.UapkiNS::Doc::Verify::VerifyOptions", align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  store i32 0, ptr %6, align 4, !tbaa !9
  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 80, ptr %8) #5
  invoke void @_ZN7UapkiNS13ContentHasherC1Ev(ptr noundef nonnull align 8 dereferenceable(80) %8)
          to label %20 unwind label %43

20:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  store ptr null, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  store ptr null, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  store ptr null, ptr %13, align 8, !tbaa !5
  %21 = load ptr, ptr %4, align 8, !tbaa !5
  %22 = invoke ptr @json_object_get_object(ptr noundef %21, ptr noundef @.str)
          to label %23 unwind label %47

23:                                               ; preds = %20
  store ptr %22, ptr %11, align 8, !tbaa !5
  %24 = load ptr, ptr %4, align 8, !tbaa !5
  %25 = invoke ptr @json_object_get_object(ptr noundef %24, ptr noundef @.str.1)
          to label %26 unwind label %47

26:                                               ; preds = %23
  store ptr %25, ptr %12, align 8, !tbaa !5
  %27 = load ptr, ptr %4, align 8, !tbaa !5
  %28 = invoke ptr @json_object_get_object(ptr noundef %27, ptr noundef @.str.2)
          to label %29 unwind label %47

29:                                               ; preds = %26
  store ptr %28, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #5
  %30 = load ptr, ptr %11, align 8, !tbaa !5
  %31 = invoke noundef zeroext i1 @_ZN12ParsonHelper20jsonObjectGetBooleanEP13json_object_tPKcb(ptr noundef %30, ptr noundef @.str.3, i1 noundef zeroext false)
          to label %32 unwind label %51

32:                                               ; preds = %29
  %33 = zext i1 %31 to i8
  store i8 %33, ptr %14, align 1, !tbaa !11
  %34 = load ptr, ptr %11, align 8, !tbaa !5
  %35 = invoke ptr @json_object_get_base64(ptr noundef %34, ptr noundef @.str.4)
          to label %36 unwind label %51

36:                                               ; preds = %32
  %37 = invoke noundef zeroext i1 @_ZN7UapkiNS7SmartBA3setEP12ByteArray_st(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef %35)
          to label %38 unwind label %51

38:                                               ; preds = %36
  br i1 %37, label %57, label %39

39:                                               ; preds = %38
  br label %40

40:                                               ; preds = %39
  store i32 4101, ptr %6, align 4, !tbaa !9
  %41 = load i32, ptr %6, align 4, !tbaa !9
  invoke void @stacktrace_create(ptr noundef @.str.5, i64 noundef 827, i32 noundef %41, ptr noundef null)
          to label %42 unwind label %51

42:                                               ; preds = %40
  br label %266

43:                                               ; preds = %2
  %44 = landingpad { ptr, i32 }
          cleanup
  %45 = extractvalue { ptr, i32 } %44, 0
  store ptr %45, ptr %9, align 8
  %46 = extractvalue { ptr, i32 } %44, 1
  store i32 %46, ptr %10, align 4
  br label %272

47:                                               ; preds = %26, %23, %20
  %48 = landingpad { ptr, i32 }
          cleanup
  %49 = extractvalue { ptr, i32 } %48, 0
  store ptr %49, ptr %9, align 8
  %50 = extractvalue { ptr, i32 } %48, 1
  store i32 %50, ptr %10, align 4
  br label %271

51:                                               ; preds = %259, %252, %242, %240, %234, %223, %99, %95, %89, %84, %81, %76, %70, %65, %62, %57, %40, %36, %32, %29
  %52 = landingpad { ptr, i32 }
          cleanup
  %53 = extractvalue { ptr, i32 } %52, 0
  store ptr %53, ptr %9, align 8
  %54 = extractvalue { ptr, i32 } %52, 1
  store i32 %54, ptr %10, align 4
  br label %270

55:                                               ; No predecessors!
  br label %56

56:                                               ; preds = %55
  br label %57

57:                                               ; preds = %56, %38
  %58 = load ptr, ptr %11, align 8, !tbaa !5
  %59 = invoke noundef zeroext i1 @_ZN12ParsonHelper18jsonObjectHasValueEP13json_object_tPKci(ptr noundef %58, ptr noundef @.str.6, i32 noundef 2)
          to label %60 unwind label %51

60:                                               ; preds = %57
  br i1 %59, label %61, label %76

61:                                               ; preds = %60
  br label %62

62:                                               ; preds = %61
  %63 = load ptr, ptr %11, align 8, !tbaa !5
  %64 = invoke ptr @json_object_get_base64(ptr noundef %63, ptr noundef @.str.6)
          to label %65 unwind label %51

65:                                               ; preds = %62
  %66 = invoke noundef i32 @_ZN7UapkiNS13ContentHasher10setContentEPK12ByteArray_stb(ptr noundef nonnull align 8 dereferenceable(80) %8, ptr noundef %64, i1 noundef zeroext true)
          to label %67 unwind label %51

67:                                               ; preds = %65
  store i32 %66, ptr %6, align 4, !tbaa !9
  %68 = load i32, ptr %6, align 4, !tbaa !9
  %69 = icmp ne i32 %68, 0
  br i1 %69, label %70, label %73

70:                                               ; preds = %67
  %71 = load i32, ptr %6, align 4, !tbaa !9
  invoke void @stacktrace_add(ptr noundef @.str.5, i64 noundef 831, i32 noundef %71)
          to label %72 unwind label %51

72:                                               ; preds = %70
  br label %266

73:                                               ; preds = %67
  br label %74

74:                                               ; preds = %73
  br label %75

75:                                               ; preds = %74
  br label %166

76:                                               ; preds = %60
  %77 = load ptr, ptr %11, align 8, !tbaa !5
  %78 = invoke noundef zeroext i1 @_ZN12ParsonHelper18jsonObjectHasValueEP13json_object_tPKci(ptr noundef %77, ptr noundef @.str.7, i32 noundef 2)
          to label %79 unwind label %51

79:                                               ; preds = %76
  br i1 %78, label %80, label %95

80:                                               ; preds = %79
  br label %81

81:                                               ; preds = %80
  %82 = load ptr, ptr %11, align 8, !tbaa !5
  %83 = invoke ptr @json_object_get_string(ptr noundef %82, ptr noundef @.str.7)
          to label %84 unwind label %51

84:                                               ; preds = %81
  %85 = invoke noundef i32 @_ZN7UapkiNS13ContentHasher10setContentEPKc(ptr noundef nonnull align 8 dereferenceable(80) %8, ptr noundef %83)
          to label %86 unwind label %51

86:                                               ; preds = %84
  store i32 %85, ptr %6, align 4, !tbaa !9
  %87 = load i32, ptr %6, align 4, !tbaa !9
  %88 = icmp ne i32 %87, 0
  br i1 %88, label %89, label %92

89:                                               ; preds = %86
  %90 = load i32, ptr %6, align 4, !tbaa !9
  invoke void @stacktrace_add(ptr noundef @.str.5, i64 noundef 834, i32 noundef %90)
          to label %91 unwind label %51

91:                                               ; preds = %89
  br label %266

92:                                               ; preds = %86
  br label %93

93:                                               ; preds = %92
  br label %94

94:                                               ; preds = %93
  br label %165

95:                                               ; preds = %79
  %96 = load ptr, ptr %11, align 8, !tbaa !5
  %97 = invoke noundef zeroext i1 @_ZN12ParsonHelper18jsonObjectHasValueEP13json_object_tPKci(ptr noundef %96, ptr noundef @.str.8, i32 noundef 2)
          to label %98 unwind label %51

98:                                               ; preds = %95
  br i1 %97, label %99, label %164

99:                                               ; preds = %98
  %100 = load ptr, ptr %11, align 8, !tbaa !5
  %101 = invoke noundef zeroext i1 @_ZN12ParsonHelper18jsonObjectHasValueEP13json_object_tPKci(ptr noundef %100, ptr noundef @.str.9, i32 noundef 3)
          to label %102 unwind label %51

102:                                              ; preds = %99
  br i1 %101, label %103, label %164

103:                                              ; preds = %102
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  invoke void @_ZN7UapkiNS7SmartBAC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %15)
          to label %104 unwind label %126

104:                                              ; preds = %103
  %105 = load ptr, ptr %11, align 8, !tbaa !5
  %106 = invoke ptr @json_object_get_hex(ptr noundef %105, ptr noundef @.str.8)
          to label %107 unwind label %130

107:                                              ; preds = %104
  %108 = invoke noundef zeroext i1 @_ZN7UapkiNS7SmartBA3setEP12ByteArray_st(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef %106)
          to label %109 unwind label %130

109:                                              ; preds = %107
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %110 = invoke noundef ptr @_ZNK7UapkiNS7SmartBA3getEv(ptr noundef nonnull align 8 dereferenceable(8) %15)
          to label %111 unwind label %134

111:                                              ; preds = %109
  %112 = invoke noundef ptr @_ZN7UapkiNS13ContentHasher7baToPtrEPK12ByteArray_st(ptr noundef %110)
          to label %113 unwind label %134

113:                                              ; preds = %111
  store ptr %112, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  store i64 0, ptr %17, align 8, !tbaa !13
  %114 = load ptr, ptr %16, align 8, !tbaa !5
  %115 = icmp ne ptr %114, null
  br i1 %115, label %116, label %122

116:                                              ; preds = %113
  %117 = load ptr, ptr %11, align 8, !tbaa !5
  %118 = invoke double @json_object_get_number(ptr noundef %117, ptr noundef @.str.9)
          to label %119 unwind label %138

119:                                              ; preds = %116
  %120 = invoke noundef zeroext i1 @_ZN7UapkiNS13ContentHasher12numberToSizeEdRm(double noundef %118, ptr noundef nonnull align 8 dereferenceable(8) %17)
          to label %121 unwind label %138

121:                                              ; preds = %119
  br i1 %120, label %144, label %122

122:                                              ; preds = %121, %113
  br label %123

123:                                              ; preds = %122
  store i32 4101, ptr %6, align 4, !tbaa !9
  %124 = load i32, ptr %6, align 4, !tbaa !9
  invoke void @stacktrace_create(ptr noundef @.str.5, i64 noundef 845, i32 noundef %124, ptr noundef null)
          to label %125 unwind label %138

125:                                              ; preds = %123
  store i32 4, ptr %18, align 4
  br label %158

126:                                              ; preds = %103
  %127 = landingpad { ptr, i32 }
          cleanup
  %128 = extractvalue { ptr, i32 } %127, 0
  store ptr %128, ptr %9, align 8
  %129 = extractvalue { ptr, i32 } %127, 1
  store i32 %129, ptr %10, align 4
  br label %163

130:                                              ; preds = %107, %104
  %131 = landingpad { ptr, i32 }
          cleanup
  %132 = extractvalue { ptr, i32 } %131, 0
  store ptr %132, ptr %9, align 8
  %133 = extractvalue { ptr, i32 } %131, 1
  store i32 %133, ptr %10, align 4
  br label %162

134:                                              ; preds = %111, %109
  %135 = landingpad { ptr, i32 }
          cleanup
  %136 = extractvalue { ptr, i32 } %135, 0
  store ptr %136, ptr %9, align 8
  %137 = extractvalue { ptr, i32 } %135, 1
  store i32 %137, ptr %10, align 4
  br label %161

138:                                              ; preds = %152, %145, %123, %119, %116
  %139 = landingpad { ptr, i32 }
          cleanup
  %140 = extractvalue { ptr, i32 } %139, 0
  store ptr %140, ptr %9, align 8
  %141 = extractvalue { ptr, i32 } %139, 1
  store i32 %141, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  br label %161

142:                                              ; No predecessors!
  br label %143

143:                                              ; preds = %142
  br label %144

144:                                              ; preds = %143, %121
  br label %145

145:                                              ; preds = %144
  %146 = load ptr, ptr %16, align 8, !tbaa !5
  %147 = load i64, ptr %17, align 8, !tbaa !13
  %148 = invoke noundef i32 @_ZN7UapkiNS13ContentHasher10setContentEPKhm(ptr noundef nonnull align 8 dereferenceable(80) %8, ptr noundef %146, i64 noundef %147)
          to label %149 unwind label %138

149:                                              ; preds = %145
  store i32 %148, ptr %6, align 4, !tbaa !9
  %150 = load i32, ptr %6, align 4, !tbaa !9
  %151 = icmp ne i32 %150, 0
  br i1 %151, label %152, label %155

152:                                              ; preds = %149
  %153 = load i32, ptr %6, align 4, !tbaa !9
  invoke void @stacktrace_add(ptr noundef @.str.5, i64 noundef 847, i32 noundef %153)
          to label %154 unwind label %138

154:                                              ; preds = %152
  store i32 4, ptr %18, align 4
  br label %158

155:                                              ; preds = %149
  br label %156

156:                                              ; preds = %155
  br label %157

157:                                              ; preds = %156
  store i32 0, ptr %18, align 4
  br label %158

158:                                              ; preds = %157, %154, %125
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  call void @_ZN7UapkiNS7SmartBAD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  %159 = load i32, ptr %18, align 4
  switch i32 %159, label %268 [
    i32 0, label %160
    i32 4, label %266
  ]

160:                                              ; preds = %158
  br label %164

161:                                              ; preds = %138, %134
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  br label %162

162:                                              ; preds = %161, %130
  call void @_ZN7UapkiNS7SmartBAD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %15) #5
  br label %163

163:                                              ; preds = %162, %126
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  br label %270

164:                                              ; preds = %160, %102, %98
  br label %165

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

166:                                              ; preds = %165, %75
  %167 = load ptr, ptr %12, align 8, !tbaa !5
  %168 = icmp ne ptr %167, null
  br i1 %168, label %217, label %169

169:                                              ; preds = %166
  %170 = load ptr, ptr %13, align 8, !tbaa !5
  %171 = icmp ne ptr %170, null
  br i1 %171, label %217, label %172

172:                                              ; preds = %169
  call void @llvm.lifetime.start.p0(i64 12, ptr %19) #5
  invoke void @_ZN7UapkiNS3Doc6Verify13VerifyOptionsC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %19)
          to label %173 unwind label %191

173:                                              ; preds = %172
  %174 = invoke noundef ptr @_ZN7UapkiNS10get_configEv()
          to label %175 unwind label %191

175:                                              ; preds = %173
  %176 = invoke noundef zeroext i1 @_ZNK7UapkiNS13LibraryConfig18getValidationByCrlEv(ptr noundef nonnull align 8 dereferenceable(97) %174)
          to label %177 unwind label %191

177:                                              ; preds = %175
  %178 = getelementptr inbounds %"struct.UapkiNS::Doc::Verify::VerifyOptions", ptr %19, i32 0, i32 1
  %179 = zext i1 %176 to i8
  store i8 %179, ptr %178, align 4, !tbaa !15
  br label %180

180:                                              ; preds = %177
  %181 = load ptr, ptr %4, align 8, !tbaa !5
  %182 = invoke ptr @json_object_get_object(ptr noundef %181, ptr noundef @.str.10)
          to label %183 unwind label %191

183:                                              ; preds = %180
  %184 = invoke noundef i32 @_ZL20parse_verify_optionsP13json_object_tRN7UapkiNS3Doc6Verify13VerifyOptionsE(ptr noundef %182, ptr noundef nonnull align 4 dereferenceable(12) %19)
          to label %185 unwind label %191

185:                                              ; preds = %183
  store i32 %184, ptr %6, align 4, !tbaa !9
  %186 = load i32, ptr %6, align 4, !tbaa !9
  %187 = icmp ne i32 %186, 0
  br i1 %187, label %188, label %195

188:                                              ; preds = %185
  %189 = load i32, ptr %6, align 4, !tbaa !9
  invoke void @stacktrace_add(ptr noundef @.str.5, i64 noundef 854, i32 noundef %189)
          to label %190 unwind label %191

190:                                              ; preds = %188
  store i32 4, ptr %18, align 4
  br label %214

191:                                              ; preds = %208, %200, %198, %188, %183, %180, %175, %173, %172
  %192 = landingpad { ptr, i32 }
          cleanup
  %193 = extractvalue { ptr, i32 } %192, 0
  store ptr %193, ptr %9, align 8
  %194 = extractvalue { ptr, i32 } %192, 1
  store i32 %194, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 12, ptr %19) #5
  br label %270

195:                                              ; preds = %185
  br label %196

196:                                              ; preds = %195
  br label %197

197:                                              ; preds = %196
  br label %198

198:                                              ; preds = %197
  %199 = invoke noundef ptr @_ZNK7UapkiNS7SmartBA3getEv(ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %200 unwind label %191

200:                                              ; preds = %198
  %201 = load i8, ptr %14, align 1, !tbaa !11, !range !18, !noundef !19
  %202 = trunc i8 %201 to i1
  %203 = load ptr, ptr %5, align 8, !tbaa !5
  %204 = invoke noundef i32 @_ZL10verify_p7sPK12ByteArray_stRN7UapkiNS13ContentHasherEbRKNS2_3Doc6Verify13VerifyOptionsEP13json_object_t(ptr noundef %199, ptr noundef nonnull align 8 dereferenceable(80) %8, i1 noundef zeroext %202, ptr noundef nonnull align 4 dereferenceable(12) %19, ptr noundef %203)
          to label %205 unwind label %191

205:                                              ; preds = %200
  store i32 %204, ptr %6, align 4, !tbaa !9
  %206 = load i32, ptr %6, align 4, !tbaa !9
  %207 = icmp ne i32 %206, 0
  br i1 %207, label %208, label %211

208:                                              ; preds = %205
  %209 = load i32, ptr %6, align 4, !tbaa !9
  invoke void @stacktrace_add(ptr noundef @.str.5, i64 noundef 861, i32 noundef %209)
          to label %210 unwind label %191

210:                                              ; preds = %208
  store i32 4, ptr %18, align 4
  br label %214

211:                                              ; preds = %205
  br label %212

212:                                              ; preds = %211
  br label %213

213:                                              ; preds = %212
  store i32 0, ptr %18, align 4
  br label %214

214:                                              ; preds = %213, %210, %190
  call void @llvm.lifetime.end.p0(i64 12, ptr %19) #5
  %215 = load i32, ptr %18, align 4
  switch i32 %215, label %268 [
    i32 0, label %216
    i32 4, label %266
  ]

216:                                              ; preds = %214
  br label %265

217:                                              ; preds = %169, %166
  %218 = load ptr, ptr %12, align 8, !tbaa !5
  %219 = icmp ne ptr %218, null
  br i1 %219, label %220, label %258

220:                                              ; preds = %217
  %221 = load ptr, ptr %13, align 8, !tbaa !5
  %222 = icmp ne ptr %221, null
  br i1 %222, label %223, label %258

223:                                              ; preds = %220
  %224 = invoke noundef ptr @_ZNK7UapkiNS13ContentHasher15getContentBytesEv(ptr noundef nonnull align 8 dereferenceable(80) %8)
          to label %225 unwind label %51

225:                                              ; preds = %223
  %226 = icmp ne ptr %224, null
  br i1 %226, label %227, label %233

227:                                              ; preds = %225
  %228 = load ptr, ptr %12, align 8, !tbaa !5
  %229 = icmp ne ptr %228, null
  br i1 %229, label %230, label %233

230:                                              ; preds = %227
  %231 = load ptr, ptr %13, align 8, !tbaa !5
  %232 = icmp ne ptr %231, null
  br i1 %232, label %239, label %233

233:                                              ; preds = %230, %227, %225
  br label %234

234:                                              ; preds = %233
  store i32 4101, ptr %6, align 4, !tbaa !9
  %235 = load i32, ptr %6, align 4, !tbaa !9
  invoke void @stacktrace_create(ptr noundef @.str.5, i64 noundef 866, i32 noundef %235, ptr noundef null)
          to label %236 unwind label %51

236:                                              ; preds = %234
  br label %266

237:                                              ; No predecessors!
  br label %238

238:                                              ; preds = %237
  br label %239

239:                                              ; preds = %238, %230
  br label %240

240:                                              ; preds = %239
  %241 = invoke noundef ptr @_ZNK7UapkiNS7SmartBA3getEv(ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %242 unwind label %51

242:                                              ; preds = %240
  %243 = load i8, ptr %14, align 1, !tbaa !11, !range !18, !noundef !19
  %244 = trunc i8 %243 to i1
  %245 = load ptr, ptr %12, align 8, !tbaa !5
  %246 = load ptr, ptr %13, align 8, !tbaa !5
  %247 = load ptr, ptr %5, align 8, !tbaa !5
  %248 = invoke noundef i32 @_ZL10verify_rawPK12ByteArray_stRN7UapkiNS13ContentHasherEbP13json_object_tS6_S6_(ptr noundef %241, ptr noundef nonnull align 8 dereferenceable(80) %8, i1 noundef zeroext %244, ptr noundef %245, ptr noundef %246, ptr noundef %247)
          to label %249 unwind label %51

249:                                              ; preds = %242
  store i32 %248, ptr %6, align 4, !tbaa !9
  %250 = load i32, ptr %6, align 4, !tbaa !9
  %251 = icmp ne i32 %250, 0
  br i1 %251, label %252, label %255

252:                                              ; preds = %249
  %253 = load i32, ptr %6, align 4, !tbaa !9
  invoke void @stacktrace_add(ptr noundef @.str.5, i64 noundef 875, i32 noundef %253)
          to label %254 unwind label %51

254:                                              ; preds = %252
  br label %266

255:                                              ; preds = %249
  br label %256

256:                                              ; preds = %255
  br label %257

257:                                              ; preds = %256
  br label %264

258:                                              ; preds = %220, %217
  br label %259

259:                                              ; preds = %258
  store i32 4101, ptr %6, align 4, !tbaa !9
  %260 = load i32, ptr %6, align 4, !tbaa !9
  invoke void @stacktrace_create(ptr noundef @.str.5, i64 noundef 878, i32 noundef %260, ptr noundef null)
          to label %261 unwind label %51

261:                                              ; preds = %259
  br label %266

262:                                              ; No predecessors!
  br label %263

263:                                              ; preds = %262
  br label %264

264:                                              ; preds = %263, %257
  br label %265

265:                                              ; preds = %264, %216
  br label %266

266:                                              ; preds = %265, %261, %254, %236, %214, %158, %91, %72, %42
  %267 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %267, ptr %3, align 4
  store i32 1, ptr %18, align 4
  br label %268

268:                                              ; preds = %266, %214, %158
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @_ZN7UapkiNS13ContentHasherD1Ev(ptr noundef nonnull align 8 dereferenceable(80) %8) #5
  call void @llvm.lifetime.end.p0(i64 80, 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 4, ptr %6) #5
  %269 = load i32, ptr %3, align 4
  ret i32 %269

270:                                              ; preds = %191, %163, %51
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #5
  br label %271

271:                                              ; preds = %270, %47
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @_ZN7UapkiNS13ContentHasherD1Ev(ptr noundef nonnull align 8 dereferenceable(80) %8) #5
  br label %272

272:                                              ; preds = %271, %43
  call void @llvm.lifetime.end.p0(i64 80, 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 4, ptr %6) #5
  br label %273

273:                                              ; preds = %272
  %274 = load ptr, ptr %9, align 8
  %275 = load i32, ptr %10, align 4
  %276 = insertvalue { ptr, i32 } poison, ptr %274, 0
  %277 = insertvalue { ptr, i32 } %276, i32 %275, 1
  resume { ptr, i32 } %277
}

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

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

declare void @_ZN7UapkiNS13ContentHasherC1Ev(ptr noundef nonnull align 8 dereferenceable(80)) unnamed_addr #3

declare i32 @__gxx_personality_v0(...)

declare ptr @json_object_get_object(ptr noundef, ptr noundef) #3

declare noundef zeroext i1 @_ZN12ParsonHelper20jsonObjectGetBooleanEP13json_object_tPKcb(ptr noundef, ptr noundef, i1 noundef zeroext) #3

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

declare ptr @json_object_get_base64(ptr noundef, ptr noundef) #3

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

declare noundef zeroext i1 @_ZN12ParsonHelper18jsonObjectHasValueEP13json_object_tPKci(ptr noundef, ptr noundef, i32 noundef) #3

declare noundef i32 @_ZN7UapkiNS13ContentHasher10setContentEPK12ByteArray_stb(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef, i1 noundef zeroext) #3

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

declare noundef i32 @_ZN7UapkiNS13ContentHasher10setContentEPKc(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef) #3

declare ptr @json_object_get_string(ptr noundef, ptr noundef) #3

declare ptr @json_object_get_hex(ptr noundef, ptr noundef) #3

declare noundef ptr @_ZN7UapkiNS13ContentHasher7baToPtrEPK12ByteArray_st(ptr noundef) #3

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

declare noundef zeroext i1 @_ZN7UapkiNS13ContentHasher12numberToSizeEdRm(double noundef, ptr noundef nonnull align 8 dereferenceable(8)) #3

declare double @json_object_get_number(ptr noundef, ptr noundef) #3

declare noundef i32 @_ZN7UapkiNS13ContentHasher10setContentEPKhm(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef, i64 noundef) #3

; 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 dso_local void @_ZN7UapkiNS7SmartBAD2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7UapkiNS3Doc6Verify13VerifyOptionsC2Ev(ptr noundef nonnull align 4 dereferenceable(12)) unnamed_addr #2 align 2

declare noundef ptr @_ZN7UapkiNS10get_configEv() #3

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

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL20parse_verify_optionsP13json_object_tRN7UapkiNS3Doc6Verify13VerifyOptionsE(ptr noundef, ptr noundef nonnull align 4 dereferenceable(12)) #0

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL10verify_p7sPK12ByteArray_stRN7UapkiNS13ContentHasherEbRKNS2_3Doc6Verify13VerifyOptionsEP13json_object_t(ptr noundef, ptr noundef nonnull align 8 dereferenceable(80), i1 noundef zeroext, ptr noundef nonnull align 4 dereferenceable(12), ptr noundef) #0

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

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL10verify_rawPK12ByteArray_stRN7UapkiNS13ContentHasherEbP13json_object_tS6_S6_(ptr noundef, ptr noundef nonnull align 8 dereferenceable(80), i1 noundef zeroext, ptr noundef, ptr noundef, ptr noundef) #0

; Function Attrs: nounwind
declare void @_ZN7UapkiNS13ContentHasherD1Ev(ptr noundef nonnull align 8 dereferenceable(80)) unnamed_addr #4

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "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, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"long", !7, i64 0}
!15 = !{!16, !12, i64 4}
!16 = !{!"_ZTSN7UapkiNS3Doc6Verify13VerifyOptionsE", !17, i64 0, !12, i64 4, !10, i64 8}
!17 = !{!"_ZTSN7UapkiNS3Doc6Verify13VerifyOptions14ValidationTypeE", !7, i64 0}
!18 = !{i8 0, i8 2}
!19 = !{}


; 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.UapkiNS::ContentHasher" = type { i32, i32, ptr, i8, %"class.std::__cxx11::basic_string", ptr, i64, %"class.UapkiNS::SmartBA" }
%"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.UapkiNS::Doc::Verify::VerifyOptions" = type { i32, i8, i32 }

@.str = external hidden unnamed_addr constant [10 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [8 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @uapki_verify_signature(ptr noundef %0, ptr noundef %1) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.UapkiNS::SmartBA", align 8
  %4 = alloca %"class.UapkiNS::ContentHasher", align 8
  %5 = alloca %"class.UapkiNS::SmartBA", align 8
  %6 = alloca i64, align 8
  %7 = alloca %"struct.UapkiNS::Doc::Verify::VerifyOptions", align 4
  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 80, ptr nonnull %4) #5
  invoke void @_ZN7UapkiNS13ContentHasherC1Ev(ptr noundef nonnull align 8 dereferenceable(80) %4)
          to label %8 unwind label %20

8:                                                ; preds = %2
  %9 = invoke ptr @json_object_get_object(ptr noundef %0, ptr noundef nonnull @.str)
          to label %10 unwind label %22

10:                                               ; preds = %8
  %11 = invoke ptr @json_object_get_object(ptr noundef %0, ptr noundef nonnull @.str.1)
          to label %12 unwind label %22

12:                                               ; preds = %10
  %13 = invoke ptr @json_object_get_object(ptr noundef %0, ptr noundef nonnull @.str.2)
          to label %14 unwind label %22

14:                                               ; preds = %12
  %15 = invoke noundef zeroext i1 @_ZN12ParsonHelper20jsonObjectGetBooleanEP13json_object_tPKcb(ptr noundef %9, ptr noundef nonnull @.str.3, i1 noundef zeroext false)
          to label %16 unwind label %24

16:                                               ; preds = %14
  %17 = invoke ptr @json_object_get_base64(ptr noundef %9, ptr noundef nonnull @.str.4)
          to label %18 unwind label %24

18:                                               ; preds = %16
  %19 = call noundef zeroext i1 @_ZN7UapkiNS7SmartBA3setEP12ByteArray_st(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef %17)
  br i1 %19, label %26, label %.invoke

20:                                               ; preds = %2
  %21 = landingpad { ptr, i32 }
          cleanup
  br label %109

22:                                               ; preds = %12, %10, %8
  %23 = landingpad { ptr, i32 }
          cleanup
  br label %108

24:                                               ; preds = %.invoke, %105, %101, %47, %44, %43, %40, %38, %35, %34, %31, %29, %26, %16, %14
  %25 = landingpad { ptr, i32 }
          cleanup
  br label %108

26:                                               ; preds = %18
  %27 = invoke noundef zeroext i1 @_ZN12ParsonHelper18jsonObjectHasValueEP13json_object_tPKci(ptr noundef %9, ptr noundef nonnull @.str.6, i32 noundef 2)
          to label %28 unwind label %24

28:                                               ; preds = %26
  br i1 %27, label %29, label %35

29:                                               ; preds = %28
  %30 = invoke ptr @json_object_get_base64(ptr noundef %9, ptr noundef nonnull @.str.6)
          to label %31 unwind label %24

31:                                               ; preds = %29
  %32 = invoke noundef i32 @_ZN7UapkiNS13ContentHasher10setContentEPK12ByteArray_stb(ptr noundef nonnull align 8 dereferenceable(80) %4, ptr noundef %30, i1 noundef zeroext true)
          to label %33 unwind label %24

33:                                               ; preds = %31
  %.not83 = icmp eq i32 %32, 0
  br i1 %.not83, label %76, label %34

34:                                               ; preds = %33
  invoke void @stacktrace_add(ptr noundef nonnull @.str.5, i64 noundef 831, i32 noundef %32)
          to label %107 unwind label %24

35:                                               ; preds = %28
  %36 = invoke noundef zeroext i1 @_ZN12ParsonHelper18jsonObjectHasValueEP13json_object_tPKci(ptr noundef %9, ptr noundef nonnull @.str.7, i32 noundef 2)
          to label %37 unwind label %24

37:                                               ; preds = %35
  br i1 %36, label %38, label %44

38:                                               ; preds = %37
  %39 = invoke ptr @json_object_get_string(ptr noundef %9, ptr noundef nonnull @.str.7)
          to label %40 unwind label %24

40:                                               ; preds = %38
  %41 = invoke noundef i32 @_ZN7UapkiNS13ContentHasher10setContentEPKc(ptr noundef nonnull align 8 dereferenceable(80) %4, ptr noundef %39)
          to label %42 unwind label %24

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

43:                                               ; preds = %42
  invoke void @stacktrace_add(ptr noundef nonnull @.str.5, i64 noundef 834, i32 noundef %41)
          to label %107 unwind label %24

44:                                               ; preds = %37
  %45 = invoke noundef zeroext i1 @_ZN12ParsonHelper18jsonObjectHasValueEP13json_object_tPKci(ptr noundef %9, ptr noundef nonnull @.str.8, i32 noundef 2)
          to label %46 unwind label %24

46:                                               ; preds = %44
  br i1 %45, label %47, label %76

47:                                               ; preds = %46
  %48 = invoke noundef zeroext i1 @_ZN12ParsonHelper18jsonObjectHasValueEP13json_object_tPKci(ptr noundef %9, ptr noundef nonnull @.str.9, i32 noundef 3)
          to label %49 unwind label %24

49:                                               ; preds = %47
  br i1 %48, label %50, label %76

50:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  call void @_ZN7UapkiNS7SmartBAC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5)
  %51 = invoke ptr @json_object_get_hex(ptr noundef %9, ptr noundef nonnull @.str.8)
          to label %52 unwind label %63

52:                                               ; preds = %50
  %53 = call noundef zeroext i1 @_ZN7UapkiNS7SmartBA3setEP12ByteArray_st(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef %51)
  %54 = call noundef ptr @_ZNK7UapkiNS7SmartBA3getEv(ptr noundef nonnull align 8 dereferenceable(8) %5)
  %55 = invoke noundef ptr @_ZN7UapkiNS13ContentHasher7baToPtrEPK12ByteArray_st(ptr noundef %54)
          to label %56 unwind label %65

56:                                               ; preds = %52
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #5
  store i64 0, ptr %6, align 8, !tbaa !5
  %.not = icmp eq ptr %55, null
  br i1 %.not, label %62, label %57

57:                                               ; preds = %56
  %58 = invoke double @json_object_get_number(ptr noundef %9, ptr noundef nonnull @.str.9)
          to label %59 unwind label %67

59:                                               ; preds = %57
  %60 = invoke noundef zeroext i1 @_ZN7UapkiNS13ContentHasher12numberToSizeEdRm(double noundef %58, ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %61 unwind label %67

61:                                               ; preds = %59
  br i1 %60, label %69, label %62

62:                                               ; preds = %56, %61
  invoke void @stacktrace_create(ptr noundef nonnull @.str.5, i64 noundef 845, i32 noundef 4101, ptr noundef null)
          to label %.thread unwind label %67

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

65:                                               ; preds = %52
  %66 = landingpad { ptr, i32 }
          cleanup
  br label %75

67:                                               ; preds = %73, %69, %62, %59, %57
  %68 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  br label %75

69:                                               ; preds = %61
  %70 = load i64, ptr %6, align 8, !tbaa !5
  %71 = invoke noundef i32 @_ZN7UapkiNS13ContentHasher10setContentEPKhm(ptr noundef nonnull align 8 dereferenceable(80) %4, ptr noundef nonnull %55, i64 noundef %70)
          to label %72 unwind label %67

72:                                               ; preds = %69
  %.not79 = icmp eq i32 %71, 0
  br i1 %.not79, label %74, label %73

73:                                               ; preds = %72
  invoke void @stacktrace_add(ptr noundef nonnull @.str.5, i64 noundef 847, i32 noundef %71)
          to label %.thread unwind label %67

.thread:                                          ; preds = %62, %73
  %.057.ph = phi i32 [ %71, %73 ], [ 4101, %62 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  call void @_ZN7UapkiNS7SmartBAD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  br label %107

74:                                               ; preds = %72
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  call void @_ZN7UapkiNS7SmartBAD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  br label %76

75:                                               ; preds = %65, %67, %63
  %.pn.pn = phi { ptr, i32 } [ %64, %63 ], [ %68, %67 ], [ %66, %65 ]
  call void @_ZN7UapkiNS7SmartBAD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  br label %108

76:                                               ; preds = %74, %42, %49, %46, %33
  %77 = icmp ne ptr %11, null
  %78 = icmp ne ptr %13, null
  %or.cond = select i1 %77, i1 true, i1 %78
  br i1 %or.cond, label %98, label %79

79:                                               ; preds = %76
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %7) #5
  call void @_ZN7UapkiNS3Doc6Verify13VerifyOptionsC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %7)
  %80 = invoke noundef ptr @_ZN7UapkiNS10get_configEv()
          to label %81 unwind label %90

81:                                               ; preds = %79
  %82 = call noundef zeroext i1 @_ZNK7UapkiNS13LibraryConfig18getValidationByCrlEv(ptr noundef nonnull align 8 dereferenceable(97) %80)
  %83 = getelementptr inbounds i8, ptr %7, i64 4
  %84 = zext i1 %82 to i8
  store i8 %84, ptr %83, align 4, !tbaa !9
  %85 = invoke ptr @json_object_get_object(ptr noundef %0, ptr noundef nonnull @.str.10)
          to label %86 unwind label %90

86:                                               ; preds = %81
  %87 = invoke noundef i32 @_ZL20parse_verify_optionsP13json_object_tRN7UapkiNS3Doc6Verify13VerifyOptionsE(ptr noundef %85, ptr noundef nonnull align 4 dereferenceable(12) %7)
          to label %88 unwind label %90

88:                                               ; preds = %86
  %.not84 = icmp eq i32 %87, 0
  br i1 %.not84, label %92, label %89

89:                                               ; preds = %88
  invoke void @stacktrace_add(ptr noundef nonnull @.str.5, i64 noundef 854, i32 noundef %87)
          to label %97 unwind label %90

90:                                               ; preds = %96, %92, %89, %86, %81, %79
  %91 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %7) #5
  br label %108

92:                                               ; preds = %88
  %93 = call noundef ptr @_ZNK7UapkiNS7SmartBA3getEv(ptr noundef nonnull align 8 dereferenceable(8) %3)
  %94 = invoke noundef i32 @_ZL10verify_p7sPK12ByteArray_stRN7UapkiNS13ContentHasherEbRKNS2_3Doc6Verify13VerifyOptionsEP13json_object_t(ptr noundef %93, ptr noundef nonnull align 8 dereferenceable(80) %4, i1 noundef zeroext %15, ptr noundef nonnull align 4 dereferenceable(12) %7, ptr noundef %1)
          to label %95 unwind label %90

95:                                               ; preds = %92
  %.not85 = icmp eq i32 %94, 0
  br i1 %.not85, label %97, label %96

96:                                               ; preds = %95
  invoke void @stacktrace_add(ptr noundef nonnull @.str.5, i64 noundef 861, i32 noundef %94)
          to label %97 unwind label %90

97:                                               ; preds = %95, %96, %89
  %.158 = phi i32 [ %87, %89 ], [ %94, %96 ], [ 0, %95 ]
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %7) #5
  br label %107

98:                                               ; preds = %76
  %or.cond3 = select i1 %77, i1 %78, i1 false
  br i1 %or.cond3, label %99, label %.invoke

99:                                               ; preds = %98
  %100 = call noundef ptr @_ZNK7UapkiNS13ContentHasher15getContentBytesEv(ptr noundef nonnull align 8 dereferenceable(80) %4)
  %.not86 = icmp eq ptr %100, null
  br i1 %.not86, label %.invoke, label %101

101:                                              ; preds = %99
  %102 = call noundef ptr @_ZNK7UapkiNS7SmartBA3getEv(ptr noundef nonnull align 8 dereferenceable(8) %3)
  %103 = invoke noundef i32 @_ZL10verify_rawPK12ByteArray_stRN7UapkiNS13ContentHasherEbP13json_object_tS6_S6_(ptr noundef %102, ptr noundef nonnull align 8 dereferenceable(80) %4, i1 noundef zeroext %15, ptr noundef nonnull %11, ptr noundef nonnull %13, ptr noundef %1)
          to label %104 unwind label %24

104:                                              ; preds = %101
  %.not87 = icmp eq i32 %103, 0
  br i1 %.not87, label %107, label %105

105:                                              ; preds = %104
  invoke void @stacktrace_add(ptr noundef nonnull @.str.5, i64 noundef 875, i32 noundef %103)
          to label %107 unwind label %24

.invoke:                                          ; preds = %18, %98, %99
  %106 = phi i64 [ 866, %99 ], [ 878, %98 ], [ 827, %18 ]
  invoke void @stacktrace_create(ptr noundef nonnull @.str.5, i64 noundef %106, i32 noundef 4101, ptr noundef null)
          to label %107 unwind label %24

107:                                              ; preds = %.invoke, %.thread, %34, %43, %105, %104, %97
  %.2 = phi i32 [ %32, %34 ], [ %103, %105 ], [ 0, %104 ], [ %.158, %97 ], [ %41, %43 ], [ %.057.ph, %.thread ], [ 4101, %.invoke ]
  call void @_ZN7UapkiNS13ContentHasherD1Ev(ptr noundef nonnull align 8 dereferenceable(80) %4) #5
  call void @llvm.lifetime.end.p0(i64 80, 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 %.2

108:                                              ; preds = %24, %75, %90, %22
  %.pn88.pn = phi { ptr, i32 } [ %23, %22 ], [ %25, %24 ], [ %91, %90 ], [ %.pn.pn, %75 ]
  call void @_ZN7UapkiNS13ContentHasherD1Ev(ptr noundef nonnull align 8 dereferenceable(80) %4) #5
  br label %109

109:                                              ; preds = %108, %20
  %.pn88.pn.pn = phi { ptr, i32 } [ %.pn88.pn, %108 ], [ %21, %20 ]
  call void @llvm.lifetime.end.p0(i64 80, 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 } %.pn88.pn.pn
}

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

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

declare void @_ZN7UapkiNS13ContentHasherC1Ev(ptr noundef nonnull align 8 dereferenceable(80)) unnamed_addr #3

declare i32 @__gxx_personality_v0(...)

declare ptr @json_object_get_object(ptr noundef, ptr noundef) local_unnamed_addr #3

declare noundef zeroext i1 @_ZN12ParsonHelper20jsonObjectGetBooleanEP13json_object_tPKcb(ptr noundef, ptr noundef, i1 noundef zeroext) local_unnamed_addr #3

; 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 #2 align 2

declare ptr @json_object_get_base64(ptr noundef, ptr noundef) local_unnamed_addr #3

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

declare noundef zeroext i1 @_ZN12ParsonHelper18jsonObjectHasValueEP13json_object_tPKci(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #3

declare noundef i32 @_ZN7UapkiNS13ContentHasher10setContentEPK12ByteArray_stb(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef, i1 noundef zeroext) local_unnamed_addr #3

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

declare noundef i32 @_ZN7UapkiNS13ContentHasher10setContentEPKc(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef) local_unnamed_addr #3

declare ptr @json_object_get_string(ptr noundef, ptr noundef) local_unnamed_addr #3

declare ptr @json_object_get_hex(ptr noundef, ptr noundef) local_unnamed_addr #3

declare noundef ptr @_ZN7UapkiNS13ContentHasher7baToPtrEPK12ByteArray_st(ptr noundef) local_unnamed_addr #3

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

declare noundef zeroext i1 @_ZN7UapkiNS13ContentHasher12numberToSizeEdRm(double noundef, ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3

declare double @json_object_get_number(ptr noundef, ptr noundef) local_unnamed_addr #3

declare noundef i32 @_ZN7UapkiNS13ContentHasher10setContentEPKhm(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef, i64 noundef) local_unnamed_addr #3

; 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 dso_local void @_ZN7UapkiNS7SmartBAD2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7UapkiNS3Doc6Verify13VerifyOptionsC2Ev(ptr noundef nonnull align 4 dereferenceable(12)) unnamed_addr #2 align 2

declare noundef ptr @_ZN7UapkiNS10get_configEv() local_unnamed_addr #3

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

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL20parse_verify_optionsP13json_object_tRN7UapkiNS3Doc6Verify13VerifyOptionsE(ptr noundef, ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL10verify_p7sPK12ByteArray_stRN7UapkiNS13ContentHasherEbRKNS2_3Doc6Verify13VerifyOptionsEP13json_object_t(ptr noundef, ptr noundef nonnull align 8 dereferenceable(80), i1 noundef zeroext, ptr noundef nonnull align 4 dereferenceable(12), ptr noundef) local_unnamed_addr #0

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

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL10verify_rawPK12ByteArray_stRN7UapkiNS13ContentHasherEbP13json_object_tS6_S6_(ptr noundef, ptr noundef nonnull align 8 dereferenceable(80), i1 noundef zeroext, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind
declare void @_ZN7UapkiNS13ContentHasherD1Ev(ptr noundef nonnull align 8 dereferenceable(80)) 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 = { "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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !12, i64 4}
!10 = !{!"_ZTSN7UapkiNS3Doc6Verify13VerifyOptionsE", !11, i64 0, !12, i64 4, !13, i64 8}
!11 = !{!"_ZTSN7UapkiNS3Doc6Verify13VerifyOptions14ValidationTypeE", !7, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{!"int", !7, i64 0}


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