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

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

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

@_ZL15lib_cmproviders = external hidden global %struct.LIB_CMPROVIDERS_ST, align 8
@.str = external hidden unnamed_addr constant [23 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [6 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(...)

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

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

declare noundef i32 @_ZN14CmStorageProxy12providerInfoERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(168), ptr noundef nonnull align 8 dereferenceable(32)) #1

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32)) #2 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 #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN11CmProviders5countEv() #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN11CmProviders7getInfoEmP13json_object_t(i64 noundef %0, ptr noundef %1) #4 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca i64, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca %"class.std::__cxx11::basic_string", align 8
  %9 = alloca %class.ParsonHelper, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  store i64 %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  %13 = load i64, ptr %4, align 8, !tbaa !5
  %14 = call noundef i64 @_ZN11CmProviders5countEv()
  %15 = icmp uge i64 %13, %14
  br i1 %15, label %16, label %17

16:                                               ; preds = %2
  store i32 2, ptr %3, align 4
  br label %127

17:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  store i32 0, ptr %6, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %18 = load i64, ptr %4, align 8, !tbaa !5
  %19 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorI14CM_PROVIDER_STSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) getelementptr inbounds (%struct.LIB_CMPROVIDERS_ST, ptr @_ZL15lib_cmproviders, i32 0, i32 2), i64 noundef %18) #5
  %20 = getelementptr inbounds %struct.CM_PROVIDER_ST, ptr %19, i32 0, i32 1
  %21 = load ptr, ptr %20, align 8, !tbaa !13
  store ptr %21, ptr %7, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 32, ptr %8) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #5
  invoke void @_ZN12ParsonHelperC1Ev(ptr noundef nonnull align 8 dereferenceable(16) %9)
          to label %22 unwind label %32

22:                                               ; preds = %17
  br label %23

23:                                               ; preds = %22
  %24 = load ptr, ptr %7, align 8, !tbaa !9
  %25 = invoke noundef i32 @_ZN14CmStorageProxy12providerInfoERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(168) %24, ptr noundef nonnull align 8 dereferenceable(32) %8)
          to label %26 unwind label %36

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

29:                                               ; preds = %26
  %30 = load i32, ptr %6, align 4, !tbaa !11
  invoke void @stacktrace_add(ptr noundef @.str, i64 noundef 194, i32 noundef %30)
          to label %31 unwind label %36

31:                                               ; preds = %29
  br label %123

32:                                               ; preds = %17
  %33 = landingpad { ptr, i32 }
          cleanup
  %34 = extractvalue { ptr, i32 } %33, 0
  store ptr %34, ptr %10, align 8
  %35 = extractvalue { ptr, i32 } %33, 1
  store i32 %35, ptr %11, align 4
  br label %126

36:                                               ; preds = %101, %96, %93, %88, %85, %80, %77, %72, %69, %64, %61, %56, %53, %48, %42, %29, %23
  %37 = landingpad { ptr, i32 }
          cleanup
  %38 = extractvalue { ptr, i32 } %37, 0
  store ptr %38, ptr %10, align 8
  %39 = extractvalue { ptr, i32 } %37, 1
  store i32 %39, ptr %11, align 4
  br label %125

40:                                               ; preds = %26
  br label %41

41:                                               ; preds = %40
  br label %42

42:                                               ; preds = %41
  %43 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %8) #5
  %44 = invoke noundef ptr @_ZN12ParsonHelper5parseEPKcb(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef %43, i1 noundef zeroext false)
          to label %45 unwind label %36

45:                                               ; preds = %42
  %46 = icmp ne ptr %44, null
  br i1 %46, label %53, label %47

47:                                               ; preds = %45
  br label %48

48:                                               ; preds = %47
  store i32 4099, ptr %6, align 4, !tbaa !11
  %49 = load i32, ptr %6, align 4, !tbaa !11
  invoke void @stacktrace_create(ptr noundef @.str, i64 noundef 197, i32 noundef %49, ptr noundef null)
          to label %50 unwind label %36

50:                                               ; preds = %48
  br label %123

51:                                               ; No predecessors!
  br label %52

52:                                               ; preds = %51
  br label %53

53:                                               ; preds = %52, %45
  %54 = load ptr, ptr %5, align 8, !tbaa !9
  %55 = invoke noundef ptr @_ZN12ParsonHelper9getStringEPKc(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef @.str.1)
          to label %56 unwind label %36

56:                                               ; preds = %53
  %57 = invoke i32 @json_object_set_string(ptr noundef %54, ptr noundef @.str.1, ptr noundef %55)
          to label %58 unwind label %36

58:                                               ; preds = %56
  %59 = icmp ne i32 %57, 0
  br i1 %59, label %60, label %61

60:                                               ; preds = %58
  store i32 4113, ptr %6, align 4, !tbaa !11
  br label %123

61:                                               ; preds = %58
  %62 = load ptr, ptr %5, align 8, !tbaa !9
  %63 = invoke noundef ptr @_ZN12ParsonHelper9getStringEPKc(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef @.str.2)
          to label %64 unwind label %36

64:                                               ; preds = %61
  %65 = invoke i32 @json_object_set_string(ptr noundef %62, ptr noundef @.str.2, ptr noundef %63)
          to label %66 unwind label %36

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

68:                                               ; preds = %66
  store i32 4113, ptr %6, align 4, !tbaa !11
  br label %123

69:                                               ; preds = %66
  %70 = load ptr, ptr %5, align 8, !tbaa !9
  %71 = invoke noundef ptr @_ZN12ParsonHelper9getStringEPKc(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef @.str.3)
          to label %72 unwind label %36

72:                                               ; preds = %69
  %73 = invoke i32 @json_object_set_string(ptr noundef %70, ptr noundef @.str.3, ptr noundef %71)
          to label %74 unwind label %36

74:                                               ; preds = %72
  %75 = icmp ne i32 %73, 0
  br i1 %75, label %76, label %77

76:                                               ; preds = %74
  store i32 4113, ptr %6, align 4, !tbaa !11
  br label %123

77:                                               ; preds = %74
  %78 = load ptr, ptr %5, align 8, !tbaa !9
  %79 = invoke noundef ptr @_ZN12ParsonHelper9getStringEPKc(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef @.str.4)
          to label %80 unwind label %36

80:                                               ; preds = %77
  %81 = invoke i32 @json_object_set_string(ptr noundef %78, ptr noundef @.str.4, ptr noundef %79)
          to label %82 unwind label %36

82:                                               ; preds = %80
  %83 = icmp ne i32 %81, 0
  br i1 %83, label %84, label %85

84:                                               ; preds = %82
  store i32 4113, ptr %6, align 4, !tbaa !11
  br label %123

85:                                               ; preds = %82
  %86 = load ptr, ptr %5, align 8, !tbaa !9
  %87 = invoke noundef ptr @_ZN12ParsonHelper9getStringEPKc(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef @.str.5)
          to label %88 unwind label %36

88:                                               ; preds = %85
  %89 = invoke i32 @json_object_set_string(ptr noundef %86, ptr noundef @.str.5, ptr noundef %87)
          to label %90 unwind label %36

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

92:                                               ; preds = %90
  store i32 4113, ptr %6, align 4, !tbaa !11
  br label %123

93:                                               ; preds = %90
  %94 = load ptr, ptr %5, align 8, !tbaa !9
  %95 = invoke noundef zeroext i1 @_ZN12ParsonHelper10getBooleanEPKcb(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef @.str.6, i1 noundef zeroext false)
          to label %96 unwind label %36

96:                                               ; preds = %93
  %97 = invoke noundef i32 @_ZN12ParsonHelper20jsonObjectSetBooleanEP13json_object_tPKcb(ptr noundef %94, ptr noundef @.str.6, i1 noundef zeroext %95)
          to label %98 unwind label %36

98:                                               ; preds = %96
  %99 = icmp ne i32 %97, 0
  br i1 %99, label %100, label %101

100:                                              ; preds = %98
  store i32 4113, ptr %6, align 4, !tbaa !11
  br label %123

101:                                              ; preds = %98
  %102 = invoke noundef zeroext i1 @_ZN12ParsonHelper8hasValueEPKci(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef @.str.7, i32 noundef 3)
          to label %103 unwind label %36

103:                                              ; preds = %101
  br i1 %102, label %104, label %122

104:                                              ; preds = %103
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  %105 = invoke noundef i32 @_ZN12ParsonHelper6getIntEPKc(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef @.str.7)
          to label %106 unwind label %117

106:                                              ; preds = %104
  store i32 %105, ptr %12, align 4, !tbaa !11
  %107 = load i32, ptr %12, align 4, !tbaa !11
  %108 = icmp sge i32 %107, 0
  br i1 %108, label %109, label %121

109:                                              ; preds = %106
  %110 = load i32, ptr %12, align 4, !tbaa !11
  %111 = icmp ule i32 %110, -1
  br i1 %111, label %112, label %121

112:                                              ; preds = %109
  %113 = load ptr, ptr %5, align 8, !tbaa !9
  %114 = load i32, ptr %12, align 4, !tbaa !11
  %115 = invoke noundef i32 @_ZN12ParsonHelper19jsonObjectSetUint32EP13json_object_tPKcj(ptr noundef %113, ptr noundef @.str.7, i32 noundef %114)
          to label %116 unwind label %117

116:                                              ; preds = %112
  br label %121

117:                                              ; preds = %112, %104
  %118 = landingpad { ptr, i32 }
          cleanup
  %119 = extractvalue { ptr, i32 } %118, 0
  store ptr %119, ptr %10, align 8
  %120 = extractvalue { ptr, i32 } %118, 1
  store i32 %120, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %125

121:                                              ; preds = %116, %109, %106
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %122

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

123:                                              ; preds = %122, %100, %92, %84, %76, %68, %60, %50, %31
  %124 = load i32, ptr %6, align 4, !tbaa !11
  store i32 %124, ptr %3, align 4
  call void @_ZN12ParsonHelperD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %9) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #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 %127

125:                                              ; preds = %117, %36
  call void @_ZN12ParsonHelperD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %9) #5
  br label %126

126:                                              ; preds = %125, %32
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #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 %129

127:                                              ; preds = %123, %16
  %128 = load i32, ptr %3, align 4
  ret i32 %128

129:                                              ; preds = %126
  %130 = load ptr, ptr %10, align 8
  %131 = load i32, ptr %11, align 4
  %132 = insertvalue { ptr, i32 } poison, ptr %130, 0
  %133 = insertvalue { ptr, i32 } %132, i32 %131, 1
  resume { ptr, i32 } %133
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorI14CM_PROVIDER_STSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #2 align 2

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

declare noundef ptr @_ZN12ParsonHelper9getStringEPKc(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) #1

declare noundef i32 @_ZN12ParsonHelper20jsonObjectSetBooleanEP13json_object_tPKcb(ptr noundef, ptr noundef, i1 noundef zeroext) #1

declare noundef zeroext i1 @_ZN12ParsonHelper10getBooleanEPKcb(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef, i1 noundef zeroext) #1

declare noundef zeroext i1 @_ZN12ParsonHelper8hasValueEPKci(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef, i32 noundef) #1

declare noundef i32 @_ZN12ParsonHelper6getIntEPKc(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) #1

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress 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 = { 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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !10, i64 32}
!14 = !{!"_ZTS14CM_PROVIDER_ST", !15, i64 0, !10, i64 32}
!15 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !16, i64 0, !6, i64 8, !7, i64 16}
!16 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !10, 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"

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

@_ZL15lib_cmproviders = external hidden global %struct.LIB_CMPROVIDERS_ST, align 8
@.str = external hidden unnamed_addr constant [23 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [6 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(...)

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #2 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 #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN11CmProviders5countEv() local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN11CmProviders7getInfoEmP13json_object_t(i64 noundef %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 i64 @_ZN11CmProviders5countEv()
  %.not = icmp ugt i64 %5, %0
  br i1 %.not, label %6, label %67

6:                                                ; preds = %2
  %7 = tail call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorI14CM_PROVIDER_STSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) getelementptr inbounds (i8, ptr @_ZL15lib_cmproviders, i64 16), i64 noundef %0) #5
  %8 = getelementptr inbounds i8, ptr %7, i64 32
  %9 = load ptr, ptr %8, 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
  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 %10 unwind label %14

10:                                               ; preds = %6
  %11 = invoke noundef i32 @_ZN14CmStorageProxy12providerInfoERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(168) %9, ptr noundef nonnull align 8 dereferenceable(32) %3)
          to label %12 unwind label %16

12:                                               ; preds = %10
  %.not28 = icmp eq i32 %11, 0
  br i1 %.not28, label %18, label %13

13:                                               ; preds = %12
  invoke void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 194, i32 noundef %11)
          to label %64 unwind label %16

14:                                               ; preds = %6
  %15 = landingpad { ptr, i32 }
          cleanup
  br label %66

16:                                               ; preds = %53, %50, %48, %45, %43, %40, %38, %35, %33, %30, %28, %25, %23, %22, %18, %13, %10
  %17 = landingpad { ptr, i32 }
          cleanup
  br label %65

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

21:                                               ; preds = %18
  %.not29 = icmp eq ptr %20, null
  br i1 %.not29, label %22, label %23

22:                                               ; preds = %21
  invoke void @stacktrace_create(ptr noundef nonnull @.str, i64 noundef 197, i32 noundef 4099, ptr noundef null)
          to label %64 unwind label %16

23:                                               ; preds = %21
  %24 = invoke noundef ptr @_ZN12ParsonHelper9getStringEPKc(ptr noundef nonnull align 8 dereferenceable(16) %4, ptr noundef nonnull @.str.1)
          to label %25 unwind label %16

25:                                               ; preds = %23
  %26 = invoke i32 @json_object_set_string(ptr noundef %1, ptr noundef nonnull @.str.1, ptr noundef %24)
          to label %27 unwind label %16

27:                                               ; preds = %25
  %.not30 = icmp eq i32 %26, 0
  br i1 %.not30, label %28, label %64

28:                                               ; preds = %27
  %29 = invoke noundef ptr @_ZN12ParsonHelper9getStringEPKc(ptr noundef nonnull align 8 dereferenceable(16) %4, ptr noundef nonnull @.str.2)
          to label %30 unwind label %16

30:                                               ; preds = %28
  %31 = invoke i32 @json_object_set_string(ptr noundef %1, ptr noundef nonnull @.str.2, ptr noundef %29)
          to label %32 unwind label %16

32:                                               ; preds = %30
  %.not31 = icmp eq i32 %31, 0
  br i1 %.not31, label %33, label %64

33:                                               ; preds = %32
  %34 = invoke noundef ptr @_ZN12ParsonHelper9getStringEPKc(ptr noundef nonnull align 8 dereferenceable(16) %4, ptr noundef nonnull @.str.3)
          to label %35 unwind label %16

35:                                               ; preds = %33
  %36 = invoke i32 @json_object_set_string(ptr noundef %1, ptr noundef nonnull @.str.3, ptr noundef %34)
          to label %37 unwind label %16

37:                                               ; preds = %35
  %.not32 = icmp eq i32 %36, 0
  br i1 %.not32, label %38, label %64

38:                                               ; preds = %37
  %39 = invoke noundef ptr @_ZN12ParsonHelper9getStringEPKc(ptr noundef nonnull align 8 dereferenceable(16) %4, ptr noundef nonnull @.str.4)
          to label %40 unwind label %16

40:                                               ; preds = %38
  %41 = invoke i32 @json_object_set_string(ptr noundef %1, ptr noundef nonnull @.str.4, ptr noundef %39)
          to label %42 unwind label %16

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

43:                                               ; preds = %42
  %44 = invoke noundef ptr @_ZN12ParsonHelper9getStringEPKc(ptr noundef nonnull align 8 dereferenceable(16) %4, ptr noundef nonnull @.str.5)
          to label %45 unwind label %16

45:                                               ; preds = %43
  %46 = invoke i32 @json_object_set_string(ptr noundef %1, ptr noundef nonnull @.str.5, ptr noundef %44)
          to label %47 unwind label %16

47:                                               ; preds = %45
  %.not34 = icmp eq i32 %46, 0
  br i1 %.not34, label %48, label %64

48:                                               ; preds = %47
  %49 = invoke noundef zeroext i1 @_ZN12ParsonHelper10getBooleanEPKcb(ptr noundef nonnull align 8 dereferenceable(16) %4, ptr noundef nonnull @.str.6, i1 noundef zeroext false)
          to label %50 unwind label %16

50:                                               ; preds = %48
  %51 = invoke noundef i32 @_ZN12ParsonHelper20jsonObjectSetBooleanEP13json_object_tPKcb(ptr noundef %1, ptr noundef nonnull @.str.6, i1 noundef zeroext %49)
          to label %52 unwind label %16

52:                                               ; preds = %50
  %.not35 = icmp eq i32 %51, 0
  br i1 %.not35, label %53, label %64

53:                                               ; preds = %52
  %54 = invoke noundef zeroext i1 @_ZN12ParsonHelper8hasValueEPKci(ptr noundef nonnull align 8 dereferenceable(16) %4, ptr noundef nonnull @.str.7, i32 noundef 3)
          to label %55 unwind label %16

55:                                               ; preds = %53
  br i1 %54, label %56, label %64

56:                                               ; preds = %55
  %57 = invoke noundef i32 @_ZN12ParsonHelper6getIntEPKc(ptr noundef nonnull align 8 dereferenceable(16) %4, ptr noundef nonnull @.str.7)
          to label %58 unwind label %62

58:                                               ; preds = %56
  %59 = icmp sgt i32 %57, -1
  br i1 %59, label %60, label %64

60:                                               ; preds = %58
  %61 = invoke noundef i32 @_ZN12ParsonHelper19jsonObjectSetUint32EP13json_object_tPKcj(ptr noundef %1, ptr noundef nonnull @.str.7, i32 noundef %57)
          to label %64 unwind label %62

62:                                               ; preds = %60, %56
  %63 = landingpad { ptr, i32 }
          cleanup
  br label %65

64:                                               ; preds = %58, %60, %52, %47, %42, %37, %32, %27, %55, %22, %13
  %.023 = phi i32 [ %11, %13 ], [ 0, %55 ], [ 4099, %22 ], [ 4113, %27 ], [ 4113, %32 ], [ 4113, %37 ], [ 4113, %42 ], [ 4113, %47 ], [ 4113, %52 ], [ 0, %60 ], [ 0, %58 ]
  call void @_ZN12ParsonHelperD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %4) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #5
  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 %67

65:                                               ; preds = %62, %16
  %.pn = phi { ptr, i32 } [ %17, %16 ], [ %63, %62 ]
  call void @_ZN12ParsonHelperD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %4) #5
  br label %66

66:                                               ; preds = %65, %14
  %.pn.pn = phi { ptr, i32 } [ %.pn, %65 ], [ %15, %14 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #5
  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

67:                                               ; preds = %2, %64
  %.0 = phi i32 [ %.023, %64 ], [ 2, %2 ]
  ret i32 %.0
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorI14CM_PROVIDER_STSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #2 align 2

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

declare noundef ptr @_ZN12ParsonHelper9getStringEPKc(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) local_unnamed_addr #1

declare noundef i32 @_ZN12ParsonHelper20jsonObjectSetBooleanEP13json_object_tPKcb(ptr noundef, ptr noundef, i1 noundef zeroext) local_unnamed_addr #1

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

declare noundef zeroext i1 @_ZN12ParsonHelper8hasValueEPKci(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef, i32 noundef) local_unnamed_addr #1

declare noundef i32 @_ZN12ParsonHelper6getIntEPKc(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) local_unnamed_addr #1

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress 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 = { 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}


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