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

; 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 }

@.str = external hidden unnamed_addr constant [6 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [7 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local i32 @uapki_cert_info(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::SmartBA", align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  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) #6
  store i32 0, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  call void @_ZN7UapkiNS7SmartBAC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %7)
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  invoke void @_ZN7UapkiNS7SmartBAC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %8)
          to label %16 unwind label %33

16:                                               ; preds = %2
  %17 = load ptr, ptr %4, align 8, !tbaa !5
  %18 = invoke ptr @json_object_get_base64(ptr noundef %17, ptr noundef @.str)
          to label %19 unwind label %37

19:                                               ; preds = %16
  %20 = invoke noundef zeroext i1 @_ZN7UapkiNS7SmartBA3setEP12ByteArray_st(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef %18)
          to label %21 unwind label %37

21:                                               ; preds = %19
  br i1 %20, label %22, label %68

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

23:                                               ; preds = %22
  %24 = invoke noundef ptr @_ZNK7UapkiNS7SmartBA3getEv(ptr noundef nonnull align 8 dereferenceable(8) %8)
          to label %25 unwind label %41

25:                                               ; preds = %23
  %26 = invoke noundef i32 @_ZN7UapkiNS4Cert9parseCertEPK12ByteArray_stPPNS0_7CerItemE(ptr noundef %24, ptr noundef %11)
          to label %27 unwind label %41

27:                                               ; preds = %25
  store i32 %26, ptr %6, align 4, !tbaa !9
  %28 = load i32, ptr %6, align 4, !tbaa !9
  %29 = icmp ne i32 %28, 0
  br i1 %29, label %30, label %45

30:                                               ; preds = %27
  %31 = load i32, ptr %6, align 4, !tbaa !9
  invoke void @stacktrace_add(ptr noundef @.str.1, i64 noundef 49, i32 noundef %31)
          to label %32 unwind label %41

32:                                               ; preds = %30
  store i32 4, ptr %12, align 4
  br label %65

33:                                               ; preds = %2
  %34 = landingpad { ptr, i32 }
          cleanup
  %35 = extractvalue { ptr, i32 } %34, 0
  store ptr %35, ptr %9, align 8
  %36 = extractvalue { ptr, i32 } %34, 1
  store i32 %36, ptr %10, align 4
  br label %151

37:                                               ; preds = %19, %16
  %38 = landingpad { ptr, i32 }
          cleanup
  %39 = extractvalue { ptr, i32 } %38, 0
  store ptr %39, ptr %9, align 8
  %40 = extractvalue { ptr, i32 } %38, 1
  store i32 %40, ptr %10, align 4
  br label %150

41:                                               ; preds = %55, %48, %30, %25, %23
  %42 = landingpad { ptr, i32 }
          cleanup
  %43 = extractvalue { ptr, i32 } %42, 0
  store ptr %43, ptr %9, align 8
  %44 = extractvalue { ptr, i32 } %42, 1
  store i32 %44, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  br label %150

45:                                               ; preds = %27
  br label %46

46:                                               ; preds = %45
  br label %47

47:                                               ; preds = %46
  br label %48

48:                                               ; preds = %47
  %49 = load ptr, ptr %5, align 8, !tbaa !5
  %50 = load ptr, ptr %11, align 8, !tbaa !5
  %51 = invoke noundef i32 @_ZN7UapkiNS4Cert16detailInfoToJsonEP13json_object_tPKNS0_7CerItemE(ptr noundef %49, ptr noundef %50)
          to label %52 unwind label %41

52:                                               ; preds = %48
  store i32 %51, ptr %6, align 4, !tbaa !9
  %53 = load i32, ptr %6, align 4, !tbaa !9
  %54 = icmp ne i32 %53, 0
  br i1 %54, label %55, label %58

55:                                               ; preds = %52
  %56 = load i32, ptr %6, align 4, !tbaa !9
  invoke void @stacktrace_add(ptr noundef @.str.1, i64 noundef 51, i32 noundef %56)
          to label %57 unwind label %41

57:                                               ; preds = %55
  store i32 4, ptr %12, align 4
  br label %65

58:                                               ; preds = %52
  br label %59

59:                                               ; preds = %58
  br label %60

60:                                               ; preds = %59
  %61 = load ptr, ptr %11, align 8, !tbaa !5
  %62 = icmp eq ptr %61, null
  br i1 %62, label %64, label %63

63:                                               ; preds = %60
  call void @_ZN7UapkiNS4Cert7CerItemD1Ev(ptr noundef nonnull align 8 dereferenceable(401) %61) #6
  call void @_ZdlPvm(ptr noundef %61, i64 noundef 408) #7
  br label %64

64:                                               ; preds = %63, %60
  store i32 0, ptr %12, align 4
  br label %65

65:                                               ; preds = %64, %57, %32
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  %66 = load i32, ptr %12, align 4
  switch i32 %66, label %148 [
    i32 0, label %67
    i32 4, label %146
  ]

67:                                               ; preds = %65
  br label %145

68:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %69 = invoke noundef ptr @_ZN7UapkiNS10get_configEv()
          to label %70 unwind label %79

70:                                               ; preds = %68
  store ptr %69, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %71 = invoke noundef ptr @_ZN7UapkiNS12get_cerstoreEv()
          to label %72 unwind label %83

72:                                               ; preds = %70
  store ptr %71, ptr %14, align 8, !tbaa !5
  %73 = load ptr, ptr %13, align 8, !tbaa !5
  %74 = icmp ne ptr %73, null
  br i1 %74, label %75, label %78

75:                                               ; preds = %72
  %76 = load ptr, ptr %14, align 8, !tbaa !5
  %77 = icmp ne ptr %76, null
  br i1 %77, label %87, label %78

78:                                               ; preds = %75, %72
  store i32 4097, ptr %3, align 4
  store i32 1, ptr %12, align 4
  br label %140

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

83:                                               ; preds = %134, %95, %92, %87, %70
  %84 = landingpad { ptr, i32 }
          cleanup
  %85 = extractvalue { ptr, i32 } %84, 0
  store ptr %85, ptr %9, align 8
  %86 = extractvalue { ptr, i32 } %84, 1
  store i32 %86, ptr %10, align 4
  br label %143

87:                                               ; preds = %75
  %88 = load ptr, ptr %13, align 8, !tbaa !5
  %89 = invoke noundef zeroext i1 @_ZNK7UapkiNS13LibraryConfig13isInitializedEv(ptr noundef nonnull align 8 dereferenceable(97) %88)
          to label %90 unwind label %83

90:                                               ; preds = %87
  br i1 %89, label %92, label %91

91:                                               ; preds = %90
  store i32 4105, ptr %3, align 4
  store i32 1, ptr %12, align 4
  br label %140

92:                                               ; preds = %90
  %93 = load ptr, ptr %4, align 8, !tbaa !5
  %94 = invoke ptr @json_object_get_base64(ptr noundef %93, ptr noundef @.str.2)
          to label %95 unwind label %83

95:                                               ; preds = %92
  %96 = invoke noundef zeroext i1 @_ZN7UapkiNS7SmartBA3setEP12ByteArray_st(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef %94)
          to label %97 unwind label %83

97:                                               ; preds = %95
  br i1 %96, label %98, label %133

98:                                               ; preds = %97
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  store ptr null, ptr %15, align 8, !tbaa !5
  br label %99

99:                                               ; preds = %98
  %100 = load ptr, ptr %14, align 8, !tbaa !5
  %101 = invoke noundef ptr @_ZNK7UapkiNS7SmartBA3getEv(ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %102 unwind label %110

102:                                              ; preds = %99
  %103 = invoke noundef i32 @_ZN7UapkiNS4Cert8CerStore15getCertByCertIdEPK12ByteArray_stPPNS0_7CerItemE(ptr noundef nonnull align 8 dereferenceable(96) %100, ptr noundef %101, ptr noundef %15)
          to label %104 unwind label %110

104:                                              ; preds = %102
  store i32 %103, ptr %6, align 4, !tbaa !9
  %105 = load i32, ptr %6, align 4, !tbaa !9
  %106 = icmp ne i32 %105, 0
  br i1 %106, label %107, label %114

107:                                              ; preds = %104
  %108 = load i32, ptr %6, align 4, !tbaa !9
  invoke void @stacktrace_add(ptr noundef @.str.1, i64 noundef 63, i32 noundef %108)
          to label %109 unwind label %110

109:                                              ; preds = %107
  store i32 4, ptr %12, align 4
  br label %130

110:                                              ; preds = %124, %117, %107, %102, %99
  %111 = landingpad { ptr, i32 }
          cleanup
  %112 = extractvalue { ptr, i32 } %111, 0
  store ptr %112, ptr %9, align 8
  %113 = extractvalue { ptr, i32 } %111, 1
  store i32 %113, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  br label %143

114:                                              ; preds = %104
  br label %115

115:                                              ; preds = %114
  br label %116

116:                                              ; preds = %115
  br label %117

117:                                              ; preds = %116
  %118 = load ptr, ptr %5, align 8, !tbaa !5
  %119 = load ptr, ptr %15, align 8, !tbaa !5
  %120 = invoke noundef i32 @_ZN7UapkiNS4Cert16detailInfoToJsonEP13json_object_tPKNS0_7CerItemE(ptr noundef %118, ptr noundef %119)
          to label %121 unwind label %110

121:                                              ; preds = %117
  store i32 %120, ptr %6, align 4, !tbaa !9
  %122 = load i32, ptr %6, align 4, !tbaa !9
  %123 = icmp ne i32 %122, 0
  br i1 %123, label %124, label %127

124:                                              ; preds = %121
  %125 = load i32, ptr %6, align 4, !tbaa !9
  invoke void @stacktrace_add(ptr noundef @.str.1, i64 noundef 64, i32 noundef %125)
          to label %126 unwind label %110

126:                                              ; preds = %124
  store i32 4, ptr %12, align 4
  br label %130

127:                                              ; preds = %121
  br label %128

128:                                              ; preds = %127
  br label %129

129:                                              ; preds = %128
  store i32 0, ptr %12, align 4
  br label %130

130:                                              ; preds = %129, %126, %109
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  %131 = load i32, ptr %12, align 4
  switch i32 %131, label %140 [
    i32 0, label %132
  ]

132:                                              ; preds = %130
  br label %139

133:                                              ; preds = %97
  br label %134

134:                                              ; preds = %133
  store i32 4101, ptr %6, align 4, !tbaa !9
  %135 = load i32, ptr %6, align 4, !tbaa !9
  invoke void @stacktrace_create(ptr noundef @.str.1, i64 noundef 67, i32 noundef %135, ptr noundef null)
          to label %136 unwind label %83

136:                                              ; preds = %134
  store i32 4, ptr %12, align 4
  br label %140

137:                                              ; No predecessors!
  br label %138

138:                                              ; preds = %137
  br label %139

139:                                              ; preds = %138, %132
  store i32 0, ptr %12, align 4
  br label %140

140:                                              ; preds = %139, %136, %130, %91, %78
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  %141 = load i32, ptr %12, align 4
  switch i32 %141, label %148 [
    i32 0, label %142
    i32 4, label %146
  ]

142:                                              ; preds = %140
  br label %145

143:                                              ; preds = %110, %83
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  br label %144

144:                                              ; preds = %143, %79
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  br label %150

145:                                              ; preds = %142, %67
  br label %146

146:                                              ; preds = %145, %140, %65
  %147 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %147, ptr %3, align 4
  store i32 1, ptr %12, align 4
  br label %148

148:                                              ; preds = %146, %140, %65
  call void @_ZN7UapkiNS7SmartBAD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @_ZN7UapkiNS7SmartBAD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  %149 = load i32, ptr %3, align 4
  ret i32 %149

150:                                              ; preds = %144, %41, %37
  call void @_ZN7UapkiNS7SmartBAD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #6
  br label %151

151:                                              ; preds = %150, %33
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @_ZN7UapkiNS7SmartBAD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %152

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

; 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 i32 @__gxx_personality_v0(...)

; 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 noundef i32 @_ZN7UapkiNS4Cert9parseCertEPK12ByteArray_stPPNS0_7CerItemE(ptr noundef, 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 void @stacktrace_add(ptr noundef, i64 noundef, i32 noundef) #3

declare noundef i32 @_ZN7UapkiNS4Cert16detailInfoToJsonEP13json_object_tPKNS0_7CerItemE(ptr noundef, ptr noundef) #3

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

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) #5

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

declare noundef ptr @_ZN7UapkiNS10get_configEv() #3

declare noundef ptr @_ZN7UapkiNS12get_cerstoreEv() #3

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

declare noundef i32 @_ZN7UapkiNS4Cert8CerStore15getCertByCertIdEPK12ByteArray_stPPNS0_7CerItemE(ptr noundef nonnull align 8 dereferenceable(96), ptr noundef, ptr noundef) #3

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

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

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 = { nobuiltin nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind }
attributes #7 = { builtin 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}


; 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 }

@.str = external hidden unnamed_addr constant [6 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [7 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @uapki_cert_info(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::SmartBA", align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #6
  call void @_ZN7UapkiNS7SmartBAC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #6
  call void @_ZN7UapkiNS7SmartBAC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4)
  %7 = invoke ptr @json_object_get_base64(ptr noundef %0, ptr noundef nonnull @.str)
          to label %8 unwind label %15

8:                                                ; preds = %2
  %9 = call noundef zeroext i1 @_ZN7UapkiNS7SmartBA3setEP12ByteArray_st(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef %7)
  br i1 %9, label %10, label %29

10:                                               ; preds = %8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #6
  store ptr null, ptr %5, align 8, !tbaa !5
  %11 = call noundef ptr @_ZNK7UapkiNS7SmartBA3getEv(ptr noundef nonnull align 8 dereferenceable(8) %4)
  %12 = invoke noundef i32 @_ZN7UapkiNS4Cert9parseCertEPK12ByteArray_stPPNS0_7CerItemE(ptr noundef %11, ptr noundef nonnull %5)
          to label %13 unwind label %17

13:                                               ; preds = %10
  %.not47 = icmp eq i32 %12, 0
  br i1 %.not47, label %19, label %14

14:                                               ; preds = %13
  invoke void @stacktrace_add(ptr noundef nonnull @.str.1, i64 noundef 49, i32 noundef %12)
          to label %28 unwind label %17

15:                                               ; preds = %2
  %16 = landingpad { ptr, i32 }
          cleanup
  br label %60

17:                                               ; preds = %23, %19, %14, %10
  %18 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  br label %60

19:                                               ; preds = %13
  %20 = load ptr, ptr %5, align 8, !tbaa !5
  %21 = invoke noundef i32 @_ZN7UapkiNS4Cert16detailInfoToJsonEP13json_object_tPKNS0_7CerItemE(ptr noundef %1, ptr noundef %20)
          to label %22 unwind label %17

22:                                               ; preds = %19
  %.not48 = icmp eq i32 %21, 0
  br i1 %.not48, label %24, label %23

23:                                               ; preds = %22
  invoke void @stacktrace_add(ptr noundef nonnull @.str.1, i64 noundef 51, i32 noundef %21)
          to label %28 unwind label %17

24:                                               ; preds = %22
  %25 = load ptr, ptr %5, align 8, !tbaa !5
  %26 = icmp eq ptr %25, null
  br i1 %26, label %28, label %27

27:                                               ; preds = %24
  call void @_ZN7UapkiNS4Cert7CerItemD1Ev(ptr noundef nonnull align 8 dereferenceable(401) %25) #6
  call void @_ZdlPvm(ptr noundef nonnull %25, i64 noundef 408) #7
  br label %28

28:                                               ; preds = %24, %27, %23, %14
  %.024 = phi i32 [ %12, %14 ], [ %21, %23 ], [ 0, %27 ], [ 0, %24 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  br label %.thread54

29:                                               ; preds = %8
  %30 = invoke noundef ptr @_ZN7UapkiNS10get_configEv()
          to label %31 unwind label %36

31:                                               ; preds = %29
  %32 = invoke noundef ptr @_ZN7UapkiNS12get_cerstoreEv()
          to label %33 unwind label %38

33:                                               ; preds = %31
  %34 = icmp ne ptr %30, null
  %35 = icmp ne ptr %32, null
  %or.cond = and i1 %34, %35
  br i1 %or.cond, label %40, label %.thread54

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

38:                                               ; preds = %58, %42, %31
  %39 = landingpad { ptr, i32 }
          cleanup
  br label %60

40:                                               ; preds = %33
  %41 = call noundef zeroext i1 @_ZNK7UapkiNS13LibraryConfig13isInitializedEv(ptr noundef nonnull align 8 dereferenceable(97) %30)
  br i1 %41, label %42, label %.thread54

42:                                               ; preds = %40
  %43 = invoke ptr @json_object_get_base64(ptr noundef %0, ptr noundef nonnull @.str.2)
          to label %44 unwind label %38

44:                                               ; preds = %42
  %45 = call noundef zeroext i1 @_ZN7UapkiNS7SmartBA3setEP12ByteArray_st(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef %43)
  br i1 %45, label %46, label %58

46:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #6
  store ptr null, ptr %6, align 8, !tbaa !5
  %47 = call noundef ptr @_ZNK7UapkiNS7SmartBA3getEv(ptr noundef nonnull align 8 dereferenceable(8) %3)
  %48 = invoke noundef i32 @_ZN7UapkiNS4Cert8CerStore15getCertByCertIdEPK12ByteArray_stPPNS0_7CerItemE(ptr noundef nonnull align 8 dereferenceable(96) %32, ptr noundef %47, ptr noundef nonnull %6)
          to label %49 unwind label %51

49:                                               ; preds = %46
  %.not = icmp eq i32 %48, 0
  br i1 %.not, label %53, label %50

50:                                               ; preds = %49
  invoke void @stacktrace_add(ptr noundef nonnull @.str.1, i64 noundef 63, i32 noundef %48)
          to label %59 unwind label %51

51:                                               ; preds = %57, %53, %50, %46
  %52 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  br label %60

53:                                               ; preds = %49
  %54 = load ptr, ptr %6, align 8, !tbaa !5
  %55 = invoke noundef i32 @_ZN7UapkiNS4Cert16detailInfoToJsonEP13json_object_tPKNS0_7CerItemE(ptr noundef %1, ptr noundef %54)
          to label %56 unwind label %51

56:                                               ; preds = %53
  %.not44 = icmp eq i32 %55, 0
  br i1 %.not44, label %59, label %57

57:                                               ; preds = %56
  invoke void @stacktrace_add(ptr noundef nonnull @.str.1, i64 noundef 64, i32 noundef %55)
          to label %59 unwind label %51

58:                                               ; preds = %44
  invoke void @stacktrace_create(ptr noundef nonnull @.str.1, i64 noundef 67, i32 noundef 4101, ptr noundef null)
          to label %.thread54 unwind label %38

59:                                               ; preds = %50, %57, %56
  %.125 = phi i32 [ %48, %50 ], [ %55, %57 ], [ 0, %56 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  br label %.thread54

.thread54:                                        ; preds = %40, %33, %58, %59, %28
  %.1 = phi i32 [ %.024, %28 ], [ %.125, %59 ], [ 4101, %58 ], [ 4105, %40 ], [ 4097, %33 ]
  call void @_ZN7UapkiNS7SmartBAD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  call void @_ZN7UapkiNS7SmartBAD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  ret i32 %.1

60:                                               ; preds = %36, %51, %38, %17, %15
  %.pn49 = phi { ptr, i32 } [ %18, %17 ], [ %16, %15 ], [ %37, %36 ], [ %52, %51 ], [ %39, %38 ]
  call void @_ZN7UapkiNS7SmartBAD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  call void @_ZN7UapkiNS7SmartBAD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  resume { ptr, i32 } %.pn49
}

; 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 i32 @__gxx_personality_v0(...)

; 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 noundef i32 @_ZN7UapkiNS4Cert9parseCertEPK12ByteArray_stPPNS0_7CerItemE(ptr noundef, 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 void @stacktrace_add(ptr noundef, i64 noundef, i32 noundef) local_unnamed_addr #3

declare noundef i32 @_ZN7UapkiNS4Cert16detailInfoToJsonEP13json_object_tPKNS0_7CerItemE(ptr noundef, ptr noundef) local_unnamed_addr #3

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

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) local_unnamed_addr #5

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

declare noundef ptr @_ZN7UapkiNS10get_configEv() local_unnamed_addr #3

declare noundef ptr @_ZN7UapkiNS12get_cerstoreEv() local_unnamed_addr #3

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

declare noundef i32 @_ZN7UapkiNS4Cert8CerStore15getCertByCertIdEPK12ByteArray_stPPNS0_7CerItemE(ptr noundef nonnull align 8 dereferenceable(96), ptr noundef, ptr noundef) local_unnamed_addr #3

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

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

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 = { nobuiltin nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind }
attributes #7 = { builtin 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"}


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