; LLVM IR from specinfo-ua/UAPKI :: library/uapki/src (cm-providers)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%class.ParsonHelper = type { ptr, ptr }
%struct.CM_PROVIDER_ST = type { %"class.std::__cxx11::basic_string", ptr }

@.str = external hidden unnamed_addr constant [23 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [9 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

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

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

declare void @_ZN12ParsonHelperC1Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #2

declare noundef ptr @_ZN12ParsonHelper5parseEPKcb(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef, i1 noundef zeroext) #2

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

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

; Function Attrs: nounwind
declare void @_ZN12ParsonHelperD1Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #3

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN11CmProviders12listStoragesERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP13json_object_t(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef %1) #4 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca %"class.std::__cxx11::basic_string", align 8
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca %class.ParsonHelper, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  %19 = alloca ptr, align 8
  %20 = 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 8, ptr %6) #5
  %21 = load ptr, ptr %4, align 8, !tbaa !5
  %22 = call noundef ptr @_ZN11CmProviders15getProviderByIdERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(32) %21)
  store ptr %22, ptr %6, align 8, !tbaa !5
  %23 = load ptr, ptr %6, align 8, !tbaa !5
  %24 = icmp ne ptr %23, null
  br i1 %24, label %26, label %25

25:                                               ; preds = %2
  store i32 4102, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %150

26:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %27 = load ptr, ptr %6, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.CM_PROVIDER_ST, ptr %27, i32 0, i32 1
  %29 = load ptr, ptr %28, align 8, !tbaa !9
  store ptr %29, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %9) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  %30 = load ptr, ptr %8, align 8, !tbaa !5
  %31 = invoke noundef i32 @_ZN14CmStorageProxy11storageListERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(168) %30, ptr noundef nonnull align 8 dereferenceable(32) %9)
          to label %32 unwind label %37

32:                                               ; preds = %26
  store i32 %31, ptr %10, align 4, !tbaa !14
  %33 = load i32, ptr %10, align 4, !tbaa !14
  %34 = icmp ne i32 %33, 0
  br i1 %34, label %35, label %41

35:                                               ; preds = %32
  %36 = load i32, ptr %10, align 4, !tbaa !14
  store i32 %36, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %148

37:                                               ; preds = %26
  %38 = landingpad { ptr, i32 }
          cleanup
  %39 = extractvalue { ptr, i32 } %38, 0
  store ptr %39, ptr %11, align 8
  %40 = extractvalue { ptr, i32 } %38, 1
  store i32 %40, ptr %12, align 4
  br label %149

41:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #5
  invoke void @_ZN12ParsonHelperC1Ev(ptr noundef nonnull align 8 dereferenceable(16) %13)
          to label %42 unwind label %49

42:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %43 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %9) #5
  %44 = invoke noundef ptr @_ZN12ParsonHelper5parseEPKcb(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef %43, i1 noundef zeroext false)
          to label %45 unwind label %53

45:                                               ; preds = %42
  store ptr %44, ptr %14, align 8, !tbaa !5
  %46 = load ptr, ptr %14, align 8, !tbaa !5
  %47 = icmp ne ptr %46, null
  br i1 %47, label %57, label %48

48:                                               ; preds = %45
  store i32 4099, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %145

49:                                               ; preds = %41
  %50 = landingpad { ptr, i32 }
          cleanup
  %51 = extractvalue { ptr, i32 } %50, 0
  store ptr %51, ptr %11, align 8
  %52 = extractvalue { ptr, i32 } %50, 1
  store i32 %52, ptr %12, align 4
  br label %147

53:                                               ; preds = %42
  %54 = landingpad { ptr, i32 }
          cleanup
  %55 = extractvalue { ptr, i32 } %54, 0
  store ptr %55, ptr %11, align 8
  %56 = extractvalue { ptr, i32 } %54, 1
  store i32 %56, ptr %12, align 4
  br label %146

57:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  store ptr null, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %58 = invoke noundef ptr @_ZN12ParsonHelper8getArrayEPKc(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef @.str.8)
          to label %59 unwind label %70

59:                                               ; preds = %57
  store ptr %58, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  %60 = load ptr, ptr %16, align 8, !tbaa !5
  %61 = invoke i64 @json_array_get_count(ptr noundef %60)
          to label %62 unwind label %74

62:                                               ; preds = %59
  store i64 %61, ptr %17, align 8, !tbaa !16
  %63 = load ptr, ptr %5, align 8, !tbaa !5
  %64 = invoke ptr @json_value_init_array()
          to label %65 unwind label %74

65:                                               ; preds = %62
  %66 = invoke i32 @json_object_set_value(ptr noundef %63, ptr noundef @.str.8, ptr noundef %64)
          to label %67 unwind label %74

67:                                               ; preds = %65
  %68 = icmp ne i32 %66, 0
  br i1 %68, label %69, label %78

69:                                               ; preds = %67
  store i32 4113, ptr %10, align 4, !tbaa !14
  br label %140

70:                                               ; preds = %57
  %71 = landingpad { ptr, i32 }
          cleanup
  %72 = extractvalue { ptr, i32 } %71, 0
  store ptr %72, ptr %11, align 8
  %73 = extractvalue { ptr, i32 } %71, 1
  store i32 %73, ptr %12, align 4
  br label %144

74:                                               ; preds = %78, %65, %62, %59
  %75 = landingpad { ptr, i32 }
          cleanup
  %76 = extractvalue { ptr, i32 } %75, 0
  store ptr %76, ptr %11, align 8
  %77 = extractvalue { ptr, i32 } %75, 1
  store i32 %77, ptr %12, align 4
  br label %143

78:                                               ; preds = %67
  %79 = load ptr, ptr %5, align 8, !tbaa !5
  %80 = invoke ptr @json_object_get_array(ptr noundef %79, ptr noundef @.str.8)
          to label %81 unwind label %74

81:                                               ; preds = %78
  store ptr %80, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  store i64 0, ptr %18, align 8, !tbaa !16
  br label %82

82:                                               ; preds = %132, %81
  %83 = load i64, ptr %18, align 8, !tbaa !16
  %84 = load i64, ptr %17, align 8, !tbaa !16
  %85 = icmp ult i64 %83, %84
  br i1 %85, label %87, label %86

86:                                               ; preds = %82
  store i32 3, ptr %7, align 4
  br label %136

87:                                               ; preds = %82
  %88 = load ptr, ptr %15, align 8, !tbaa !5
  %89 = invoke ptr @json_value_init_object()
          to label %90 unwind label %95

90:                                               ; preds = %87
  %91 = invoke i32 @json_array_append_value(ptr noundef %88, ptr noundef %89)
          to label %92 unwind label %95

92:                                               ; preds = %90
  %93 = icmp ne i32 %91, 0
  br i1 %93, label %94, label %99

94:                                               ; preds = %92
  store i32 4113, ptr %10, align 4, !tbaa !14
  store i32 2, ptr %7, align 4
  br label %136

95:                                               ; preds = %90, %87
  %96 = landingpad { ptr, i32 }
          cleanup
  %97 = extractvalue { ptr, i32 } %96, 0
  store ptr %97, ptr %11, align 8
  %98 = extractvalue { ptr, i32 } %96, 1
  store i32 %98, ptr %12, align 4
  br label %138

99:                                               ; preds = %92
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  %100 = load ptr, ptr %15, align 8, !tbaa !5
  %101 = load i64, ptr %18, align 8, !tbaa !16
  %102 = invoke ptr @json_array_get_object(ptr noundef %100, i64 noundef %101)
          to label %103 unwind label %118

103:                                              ; preds = %99
  store ptr %102, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #5
  %104 = load ptr, ptr %16, align 8, !tbaa !5
  %105 = load i64, ptr %18, align 8, !tbaa !16
  %106 = invoke ptr @json_array_get_object(ptr noundef %104, i64 noundef %105)
          to label %107 unwind label %122

107:                                              ; preds = %103
  store ptr %106, ptr %20, align 8, !tbaa !5
  br label %108

108:                                              ; preds = %107
  %109 = load ptr, ptr %19, align 8, !tbaa !5
  %110 = load ptr, ptr %20, align 8, !tbaa !5
  %111 = invoke noundef i32 @_ZL28json_object_copy_storageinfoP13json_object_tS0_(ptr noundef %109, ptr noundef %110)
          to label %112 unwind label %122

112:                                              ; preds = %108
  store i32 %111, ptr %10, align 4, !tbaa !14
  %113 = load i32, ptr %10, align 4, !tbaa !14
  %114 = icmp ne i32 %113, 0
  br i1 %114, label %115, label %126

115:                                              ; preds = %112
  %116 = load i32, ptr %10, align 4, !tbaa !14
  invoke void @stacktrace_add(ptr noundef @.str, i64 noundef 251, i32 noundef %116)
          to label %117 unwind label %122

117:                                              ; preds = %115
  store i32 2, ptr %7, align 4
  br label %129

118:                                              ; preds = %99
  %119 = landingpad { ptr, i32 }
          cleanup
  %120 = extractvalue { ptr, i32 } %119, 0
  store ptr %120, ptr %11, align 8
  %121 = extractvalue { ptr, i32 } %119, 1
  store i32 %121, ptr %12, align 4
  br label %135

122:                                              ; preds = %115, %108, %103
  %123 = landingpad { ptr, i32 }
          cleanup
  %124 = extractvalue { ptr, i32 } %123, 0
  store ptr %124, ptr %11, align 8
  %125 = extractvalue { ptr, i32 } %123, 1
  store i32 %125, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  br label %135

126:                                              ; preds = %112
  br label %127

127:                                              ; preds = %126
  br label %128

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

129:                                              ; preds = %128, %117
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  %130 = load i32, ptr %7, align 4
  switch i32 %130, label %136 [
    i32 0, label %131
  ]

131:                                              ; preds = %129
  br label %132

132:                                              ; preds = %131
  %133 = load i64, ptr %18, align 8, !tbaa !16
  %134 = add i64 %133, 1
  store i64 %134, ptr %18, align 8, !tbaa !16
  br label %82, !llvm.loop !17

135:                                              ; preds = %122, %118
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  br label %138

136:                                              ; preds = %129, %94, %86
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  %137 = load i32, ptr %7, align 4
  switch i32 %137, label %142 [
    i32 3, label %139
    i32 2, label %140
  ]

138:                                              ; preds = %135, %95
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  br label %143

139:                                              ; preds = %136
  br label %140

140:                                              ; preds = %139, %136, %69
  %141 = load i32, ptr %10, align 4, !tbaa !14
  store i32 %141, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %142

142:                                              ; preds = %140, %136
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  br label %145

143:                                              ; preds = %138, %74
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  br label %144

144:                                              ; preds = %143, %70
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  br label %146

145:                                              ; preds = %142, %48
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @_ZN12ParsonHelperD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %13) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #5
  br label %148

146:                                              ; preds = %144, %53
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @_ZN12ParsonHelperD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %13) #5
  br label %147

147:                                              ; preds = %146, %49
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #5
  br label %149

148:                                              ; preds = %145, %35
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  br label %150

149:                                              ; preds = %147, %37
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  br label %152

150:                                              ; preds = %148, %25
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  %151 = load i32, ptr %3, align 4
  ret i32 %151

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

declare noundef i32 @_ZN14CmStorageProxy11storageListERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(168), ptr noundef nonnull align 8 dereferenceable(32)) #2

declare noundef ptr @_ZN12ParsonHelper8getArrayEPKc(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) #2

declare i64 @json_array_get_count(ptr noundef) #2

declare i32 @json_object_set_value(ptr noundef, ptr noundef, ptr noundef) #2

declare ptr @json_value_init_array() #2

declare ptr @json_object_get_array(ptr noundef, ptr noundef) #2

declare i32 @json_array_append_value(ptr noundef, ptr noundef) #2

declare ptr @json_value_init_object() #2

declare ptr @json_array_get_object(ptr noundef, i64 noundef) #2

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL28json_object_copy_storageinfoP13json_object_tS0_(ptr noundef, ptr noundef) #4

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { "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 = { 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 #4 = { 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 #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, !6, i64 32}
!10 = !{!"_ZTS14CM_PROVIDER_ST", !11, i64 0, !6, i64 32}
!11 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !12, i64 0, !13, i64 8, !7, i64 16}
!12 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!13 = !{!"long", !7, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"int", !7, i64 0}
!16 = !{!13, !13, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}


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

%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%class.ParsonHelper = type { ptr, ptr }

@.str = external hidden unnamed_addr constant [23 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [9 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

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

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

declare void @_ZN12ParsonHelperC1Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #2

declare noundef ptr @_ZN12ParsonHelper5parseEPKcb(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef, i1 noundef zeroext) local_unnamed_addr #2

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

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

; Function Attrs: nounwind
declare void @_ZN12ParsonHelperD1Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #3

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN11CmProviders12listStoragesERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP13json_object_t(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef %1) local_unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.std::__cxx11::basic_string", align 8
  %4 = alloca %class.ParsonHelper, align 8
  %5 = tail call noundef ptr @_ZN11CmProviders15getProviderByIdERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(32) %0)
  %.not = icmp eq ptr %5, null
  br i1 %.not, label %58, label %6

6:                                                ; preds = %2
  %7 = getelementptr inbounds i8, ptr %5, i64 32
  %8 = load ptr, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #5
  %9 = invoke noundef i32 @_ZN14CmStorageProxy11storageListERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(168) %8, ptr noundef nonnull align 8 dereferenceable(32) %3)
          to label %10 unwind label %11

10:                                               ; preds = %6
  %.not48 = icmp eq i32 %9, 0
  br i1 %.not48, label %13, label %56

11:                                               ; preds = %6
  %12 = landingpad { ptr, i32 }
          cleanup
  br label %57

13:                                               ; preds = %10
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #5
  invoke void @_ZN12ParsonHelperC1Ev(ptr noundef nonnull align 8 dereferenceable(16) %4)
          to label %14 unwind label %18

14:                                               ; preds = %13
  %15 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %3) #5
  %16 = invoke noundef ptr @_ZN12ParsonHelper5parseEPKcb(ptr noundef nonnull align 8 dereferenceable(16) %4, ptr noundef %15, i1 noundef zeroext false)
          to label %17 unwind label %20

17:                                               ; preds = %14
  %.not49 = icmp eq ptr %16, null
  br i1 %.not49, label %.loopexit, label %22

18:                                               ; preds = %13
  %19 = landingpad { ptr, i32 }
          cleanup
  br label %55

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

22:                                               ; preds = %17
  %23 = invoke noundef ptr @_ZN12ParsonHelper8getArrayEPKc(ptr noundef nonnull align 8 dereferenceable(16) %4, ptr noundef nonnull @.str.8)
          to label %24 unwind label %31

24:                                               ; preds = %22
  %25 = invoke i64 @json_array_get_count(ptr noundef %23)
          to label %26 unwind label %33

26:                                               ; preds = %24
  %27 = invoke ptr @json_value_init_array()
          to label %28 unwind label %33

28:                                               ; preds = %26
  %29 = invoke i32 @json_object_set_value(ptr noundef %1, ptr noundef nonnull @.str.8, ptr noundef %27)
          to label %30 unwind label %33

30:                                               ; preds = %28
  %.not50 = icmp eq i32 %29, 0
  br i1 %.not50, label %35, label %.loopexit

31:                                               ; preds = %22
  %32 = landingpad { ptr, i32 }
          cleanup
  br label %54

33:                                               ; preds = %35, %28, %26, %24
  %34 = landingpad { ptr, i32 }
          cleanup
  br label %54

35:                                               ; preds = %30
  %36 = invoke ptr @json_object_get_array(ptr noundef %1, ptr noundef nonnull @.str.8)
          to label %.preheader unwind label %33

.preheader:                                       ; preds = %35
  %.not64 = icmp eq i64 %25, 0
  br i1 %.not64, label %.loopexit, label %.lr.ph

37:                                               ; preds = %.critedge
  %38 = add nuw i64 %.02961, 1
  %exitcond.not = icmp eq i64 %38, %25
  br i1 %exitcond.not, label %.loopexit, label %.lr.ph, !llvm.loop !13

.lr.ph:                                           ; preds = %.preheader, %37
  %.02961 = phi i64 [ %38, %37 ], [ 0, %.preheader ]
  %39 = invoke ptr @json_value_init_object()
          to label %40 unwind label %43

40:                                               ; preds = %.lr.ph
  %41 = invoke i32 @json_array_append_value(ptr noundef %36, ptr noundef %39)
          to label %42 unwind label %43

42:                                               ; preds = %40
  %.not51 = icmp eq i32 %41, 0
  br i1 %.not51, label %45, label %.loopexit

43:                                               ; preds = %40, %.lr.ph
  %44 = landingpad { ptr, i32 }
          cleanup
  br label %54

45:                                               ; preds = %42
  %46 = invoke ptr @json_array_get_object(ptr noundef %36, i64 noundef %.02961)
          to label %47 unwind label %52

47:                                               ; preds = %45
  %48 = invoke ptr @json_array_get_object(ptr noundef %23, i64 noundef %.02961)
          to label %49 unwind label %.loopexit60

49:                                               ; preds = %47
  %50 = invoke noundef i32 @_ZL28json_object_copy_storageinfoP13json_object_tS0_(ptr noundef %46, ptr noundef %48)
          to label %.critedge unwind label %.loopexit60

.critedge:                                        ; preds = %49
  %.not52 = icmp eq i32 %50, 0
  br i1 %.not52, label %37, label %51

51:                                               ; preds = %.critedge
  invoke void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 251, i32 noundef %50)
          to label %.loopexit unwind label %.loopexit.split-lp

52:                                               ; preds = %45
  %53 = landingpad { ptr, i32 }
          cleanup
  br label %54

.loopexit60:                                      ; preds = %47, %49
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %54

.loopexit.split-lp:                               ; preds = %51
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %54

.loopexit:                                        ; preds = %42, %37, %.preheader, %51, %30, %17
  %.1 = phi i32 [ 4099, %17 ], [ 4113, %30 ], [ %50, %51 ], [ 0, %.preheader ], [ 4113, %42 ], [ 0, %37 ]
  call void @_ZN12ParsonHelperD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %4) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #5
  br label %56

54:                                               ; preds = %.loopexit60, %.loopexit.split-lp, %31, %43, %52, %33, %20
  %.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %21, %20 ], [ %32, %31 ], [ %34, %33 ], [ %44, %43 ], [ %53, %52 ], [ %lpad.loopexit, %.loopexit60 ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @_ZN12ParsonHelperD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %4) #5
  br label %55

55:                                               ; preds = %54, %18
  %.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn, %54 ], [ %19, %18 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #5
  br label %57

56:                                               ; preds = %10, %.loopexit
  %.2 = phi i32 [ %.1, %.loopexit ], [ %9, %10 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #5
  br label %58

57:                                               ; preds = %55, %11
  %.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn.pn, %55 ], [ %12, %11 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #5
  resume { ptr, i32 } %.pn.pn.pn.pn.pn.pn.pn

58:                                               ; preds = %2, %56
  %.3 = phi i32 [ %.2, %56 ], [ 4102, %2 ]
  ret i32 %.3
}

declare noundef i32 @_ZN14CmStorageProxy11storageListERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(168), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #2

declare noundef ptr @_ZN12ParsonHelper8getArrayEPKc(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) local_unnamed_addr #2

declare i64 @json_array_get_count(ptr noundef) local_unnamed_addr #2

declare i32 @json_object_set_value(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare ptr @json_value_init_array() local_unnamed_addr #2

declare ptr @json_object_get_array(ptr noundef, ptr noundef) local_unnamed_addr #2

declare i32 @json_array_append_value(ptr noundef, ptr noundef) local_unnamed_addr #2

declare ptr @json_value_init_object() local_unnamed_addr #2

declare ptr @json_array_get_object(ptr noundef, i64 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL28json_object_copy_storageinfoP13json_object_tS0_(ptr noundef, ptr noundef) local_unnamed_addr #4

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { "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 = { 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 #4 = { 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 #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, !9, i64 32}
!6 = !{!"_ZTS14CM_PROVIDER_ST", !7, i64 0, !9, i64 32}
!7 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !8, i64 0, !12, i64 8, !10, i64 16}
!8 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !9, i64 0}
!9 = !{!"any pointer", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C++ TBAA"}
!12 = !{!"long", !10, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass