; LLVM IR from Razakhel/RaZ :: extern/openxr/src/external/jsoncpp/src/lib_json/json_value.ll (ZNK4Json5ValueeqERKS0_)

; 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.2 }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon.2 = type { i64, [8 x i8] }
%"class.std::allocator" = type { i8 }
%"class.Json::Value" = type { %"union.Json::Value::ValueHolder", %struct.anon, %"class.Json::Value::Comments", i64, i64 }
%"union.Json::Value::ValueHolder" = type { i64 }
%struct.anon = type { i16, [2 x i8] }
%"class.Json::Value::Comments" = type { %"class.std::unique_ptr" }
%"class.std::unique_ptr" = type { %"struct.std::__uniq_ptr_data" }
%"struct.std::__uniq_ptr_data" = type { %"class.std::__uniq_ptr_impl" }
%"class.std::__uniq_ptr_impl" = type { %"class.std::tuple" }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Head_base.1" }
%"struct.std::_Head_base.1" = type { ptr }

@.str.4 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [109 x i8], align 1
@__PRETTY_FUNCTION__._ZNK4Json5ValueeqERKS0_ = external hidden unnamed_addr constant [50 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

; Function Attrs: mustprogress noreturn uwtable
declare dso_local void @_ZN4Json15throwLogicErrorERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(32)) #3

; Function Attrs: nounwind willreturn memory(read)
declare i32 @memcmp(ptr noundef, ptr noundef, i64 noundef) #4

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #5

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden void @_ZN4JsonL20decodePrefixedStringEbPKcPjPS1_(i1 noundef zeroext, ptr noundef, ptr noundef, ptr noundef) #6

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZNK4Json5ValueeqERKS0_(ptr noundef nonnull align 8 dereferenceable(40) %0, ptr noundef nonnull align 8 dereferenceable(40) %1) #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca i1, align 1
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca %"class.std::__cxx11::basic_string", align 8
  %12 = alloca %"class.std::allocator", align 1
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %16 = load ptr, ptr %4, align 8
  %17 = call noundef i32 @_ZNK4Json5Value4typeEv(ptr noundef nonnull align 8 dereferenceable(40) %16)
  %18 = load ptr, ptr %5, align 8, !tbaa !5
  %19 = call noundef i32 @_ZNK4Json5Value4typeEv(ptr noundef nonnull align 8 dereferenceable(40) %18)
  %20 = icmp ne i32 %17, %19
  br i1 %20, label %21, label %22

21:                                               ; preds = %2
  store i1 false, ptr %3, align 1
  br label %135

22:                                               ; preds = %2
  %23 = call noundef i32 @_ZNK4Json5Value4typeEv(ptr noundef nonnull align 8 dereferenceable(40) %16)
  switch i32 %23, label %134 [
    i32 0, label %24
    i32 1, label %25
    i32 2, label %32
    i32 3, label %39
    i32 5, label %46
    i32 4, label %57
    i32 6, label %116
    i32 7, label %116
  ]

24:                                               ; preds = %22
  store i1 true, ptr %3, align 1
  br label %135

25:                                               ; preds = %22
  %26 = getelementptr inbounds %"class.Json::Value", ptr %16, i32 0, i32 0
  %27 = load i64, ptr %26, align 8, !tbaa !9
  %28 = load ptr, ptr %5, align 8, !tbaa !5
  %29 = getelementptr inbounds %"class.Json::Value", ptr %28, i32 0, i32 0
  %30 = load i64, ptr %29, align 8, !tbaa !9
  %31 = icmp eq i64 %27, %30
  store i1 %31, ptr %3, align 1
  br label %135

32:                                               ; preds = %22
  %33 = getelementptr inbounds %"class.Json::Value", ptr %16, i32 0, i32 0
  %34 = load i64, ptr %33, align 8, !tbaa !9
  %35 = load ptr, ptr %5, align 8, !tbaa !5
  %36 = getelementptr inbounds %"class.Json::Value", ptr %35, i32 0, i32 0
  %37 = load i64, ptr %36, align 8, !tbaa !9
  %38 = icmp eq i64 %34, %37
  store i1 %38, ptr %3, align 1
  br label %135

39:                                               ; preds = %22
  %40 = getelementptr inbounds %"class.Json::Value", ptr %16, i32 0, i32 0
  %41 = load double, ptr %40, align 8, !tbaa !9
  %42 = load ptr, ptr %5, align 8, !tbaa !5
  %43 = getelementptr inbounds %"class.Json::Value", ptr %42, i32 0, i32 0
  %44 = load double, ptr %43, align 8, !tbaa !9
  %45 = fcmp oeq double %41, %44
  store i1 %45, ptr %3, align 1
  br label %135

46:                                               ; preds = %22
  %47 = getelementptr inbounds %"class.Json::Value", ptr %16, i32 0, i32 0
  %48 = load i8, ptr %47, align 8, !tbaa !9, !range !10, !noundef !11
  %49 = trunc i8 %48 to i1
  %50 = zext i1 %49 to i32
  %51 = load ptr, ptr %5, align 8, !tbaa !5
  %52 = getelementptr inbounds %"class.Json::Value", ptr %51, i32 0, i32 0
  %53 = load i8, ptr %52, align 8, !tbaa !9, !range !10, !noundef !11
  %54 = trunc i8 %53 to i1
  %55 = zext i1 %54 to i32
  %56 = icmp eq i32 %50, %55
  store i1 %56, ptr %3, align 1
  br label %135

57:                                               ; preds = %22
  %58 = getelementptr inbounds %"class.Json::Value", ptr %16, i32 0, i32 0
  %59 = load ptr, ptr %58, align 8, !tbaa !9
  %60 = icmp eq ptr %59, null
  br i1 %60, label %66, label %61

61:                                               ; preds = %57
  %62 = load ptr, ptr %5, align 8, !tbaa !5
  %63 = getelementptr inbounds %"class.Json::Value", ptr %62, i32 0, i32 0
  %64 = load ptr, ptr %63, align 8, !tbaa !9
  %65 = icmp eq ptr %64, null
  br i1 %65, label %66, label %73

66:                                               ; preds = %61, %57
  %67 = getelementptr inbounds %"class.Json::Value", ptr %16, i32 0, i32 0
  %68 = load ptr, ptr %67, align 8, !tbaa !9
  %69 = load ptr, ptr %5, align 8, !tbaa !5
  %70 = getelementptr inbounds %"class.Json::Value", ptr %69, i32 0, i32 0
  %71 = load ptr, ptr %70, align 8, !tbaa !9
  %72 = icmp eq ptr %68, %71
  store i1 %72, ptr %3, align 1
  br label %135

73:                                               ; preds = %61
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #8
  %74 = call noundef zeroext i1 @_ZNK4Json5Value11isAllocatedEv(ptr noundef nonnull align 8 dereferenceable(40) %16)
  %75 = getelementptr inbounds %"class.Json::Value", ptr %16, i32 0, i32 0
  %76 = load ptr, ptr %75, align 8, !tbaa !9
  call void @_ZN4JsonL20decodePrefixedStringEbPKcPjPS1_(i1 noundef zeroext %74, ptr noundef %76, ptr noundef %6, ptr noundef %8)
  %77 = load ptr, ptr %5, align 8, !tbaa !5
  %78 = call noundef zeroext i1 @_ZNK4Json5Value11isAllocatedEv(ptr noundef nonnull align 8 dereferenceable(40) %77)
  %79 = load ptr, ptr %5, align 8, !tbaa !5
  %80 = getelementptr inbounds %"class.Json::Value", ptr %79, i32 0, i32 0
  %81 = load ptr, ptr %80, align 8, !tbaa !9
  call void @_ZN4JsonL20decodePrefixedStringEbPKcPjPS1_(i1 noundef zeroext %78, ptr noundef %81, ptr noundef %7, ptr noundef %9)
  %82 = load i32, ptr %6, align 4, !tbaa !12
  %83 = load i32, ptr %7, align 4, !tbaa !12
  %84 = icmp ne i32 %82, %83
  br i1 %84, label %85, label %86

85:                                               ; preds = %73
  store i1 false, ptr %3, align 1
  store i32 1, ptr %10, align 4
  br label %115

86:                                               ; preds = %73
  br label %87

87:                                               ; preds = %86
  %88 = load ptr, ptr %8, align 8, !tbaa !5
  %89 = icmp ne ptr %88, null
  br i1 %89, label %90, label %93

90:                                               ; preds = %87
  %91 = load ptr, ptr %9, align 8, !tbaa !5
  %92 = icmp ne ptr %91, null
  br i1 %92, label %105, label %93

93:                                               ; preds = %90, %87
  call void @llvm.lifetime.start.p0(i64 32, ptr %11) #8
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #8
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #8
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef @.str.4, ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %94 unwind label %96

94:                                               ; preds = %93
  invoke void @_ZN4Json15throwLogicErrorERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(32) %11) #9
          to label %95 unwind label %100

95:                                               ; preds = %94
  unreachable

96:                                               ; preds = %93
  %97 = landingpad { ptr, i32 }
          cleanup
  %98 = extractvalue { ptr, i32 } %97, 0
  store ptr %98, ptr %13, align 8
  %99 = extractvalue { ptr, i32 } %97, 1
  store i32 %99, ptr %14, align 4
  br label %104

100:                                              ; preds = %94
  %101 = landingpad { ptr, i32 }
          cleanup
  %102 = extractvalue { ptr, i32 } %101, 0
  store ptr %102, ptr %13, align 8
  %103 = extractvalue { ptr, i32 } %101, 1
  store i32 %103, ptr %14, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #8
  br label %104

104:                                              ; preds = %100, %96
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #8
  br label %137

105:                                              ; preds = %90
  br label %106

106:                                              ; preds = %105
  br label %107

107:                                              ; preds = %106
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #8
  %108 = load ptr, ptr %8, align 8, !tbaa !5
  %109 = load ptr, ptr %9, align 8, !tbaa !5
  %110 = load i32, ptr %6, align 4, !tbaa !12
  %111 = zext i32 %110 to i64
  %112 = call i32 @memcmp(ptr noundef %108, ptr noundef %109, i64 noundef %111) #10
  store i32 %112, ptr %15, align 4, !tbaa !12
  %113 = load i32, ptr %15, align 4, !tbaa !12
  %114 = icmp eq i32 %113, 0
  store i1 %114, ptr %3, align 1
  store i32 1, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #8
  br label %115

115:                                              ; preds = %107, %85
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #8
  br label %135

116:                                              ; preds = %22, %22
  %117 = getelementptr inbounds %"class.Json::Value", ptr %16, i32 0, i32 0
  %118 = load ptr, ptr %117, align 8, !tbaa !9
  %119 = call noundef i64 @_ZNKSt3mapIN4Json5Value8CZStringES1_St4lessIS2_ESaISt4pairIKS2_S1_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %118) #8
  %120 = load ptr, ptr %5, align 8, !tbaa !5
  %121 = getelementptr inbounds %"class.Json::Value", ptr %120, i32 0, i32 0
  %122 = load ptr, ptr %121, align 8, !tbaa !9
  %123 = call noundef i64 @_ZNKSt3mapIN4Json5Value8CZStringES1_St4lessIS2_ESaISt4pairIKS2_S1_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %122) #8
  %124 = icmp eq i64 %119, %123
  br i1 %124, label %125, label %132

125:                                              ; preds = %116
  %126 = getelementptr inbounds %"class.Json::Value", ptr %16, i32 0, i32 0
  %127 = load ptr, ptr %126, align 8, !tbaa !9
  %128 = load ptr, ptr %5, align 8, !tbaa !5
  %129 = getelementptr inbounds %"class.Json::Value", ptr %128, i32 0, i32 0
  %130 = load ptr, ptr %129, align 8, !tbaa !9
  %131 = call noundef zeroext i1 @_ZSteqIN4Json5Value8CZStringES1_St4lessIS2_ESaISt4pairIKS2_S1_EEEbRKSt3mapIT_T0_T1_T2_ESG_(ptr noundef nonnull align 8 dereferenceable(48) %127, ptr noundef nonnull align 8 dereferenceable(48) %130)
  br label %132

132:                                              ; preds = %125, %116
  %133 = phi i1 [ false, %116 ], [ %131, %125 ]
  store i1 %133, ptr %3, align 1
  br label %135

134:                                              ; preds = %22
  call void @__assert_fail(ptr noundef @.str.5, ptr noundef @.str.6, i32 noundef 583, ptr noundef @__PRETTY_FUNCTION__._ZNK4Json5ValueeqERKS0_) #11
  unreachable

135:                                              ; preds = %132, %115, %66, %46, %39, %32, %25, %24, %21
  %136 = load i1, ptr %3, align 1
  ret i1 %136

137:                                              ; preds = %104
  %138 = load ptr, ptr %13, align 8
  %139 = load i32, ptr %14, align 4
  %140 = insertvalue { ptr, i32 } poison, ptr %138, 0
  %141 = insertvalue { ptr, i32 } %140, i32 %139, 1
  resume { ptr, i32 } %141
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZSteqIN4Json5Value8CZStringES1_St4lessIS2_ESaISt4pairIKS2_S1_EEEbRKSt3mapIT_T0_T1_T2_ESG_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(48)) #7

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

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 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress noreturn uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind willreturn memory(read) "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 = { noreturn 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 = { inlinehint 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 #7 = { inlinehint 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 #8 = { nounwind }
attributes #9 = { noreturn }
attributes #10 = { nounwind willreturn memory(read) }
attributes #11 = { noreturn 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 = !{!7, !7, i64 0}
!10 = !{i8 0, i8 2}
!11 = !{}
!12 = !{!13, !13, i64 0}
!13 = !{!"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.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon.2 }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon.2 = type { i64, [8 x i8] }
%"class.std::allocator" = type { i8 }

@.str.4 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [109 x i8], align 1
@__PRETTY_FUNCTION__._ZNK4Json5ValueeqERKS0_ = external hidden unnamed_addr constant [50 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

; Function Attrs: mustprogress noreturn uwtable
declare dso_local void @_ZN4Json15throwLogicErrorERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #3

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #4

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden void @_ZN4JsonL20decodePrefixedStringEbPKcPjPS1_(i1 noundef zeroext, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #5

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZNK4Json5ValueeqERKS0_(ptr noundef nonnull align 8 dereferenceable(40) %0, ptr noundef nonnull align 8 dereferenceable(40) %1) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca %"class.std::__cxx11::basic_string", align 8
  %8 = alloca %"class.std::allocator", align 1
  %9 = tail call noundef i32 @_ZNK4Json5Value4typeEv(ptr noundef nonnull align 8 dereferenceable(40) %0)
  %10 = tail call noundef i32 @_ZNK4Json5Value4typeEv(ptr noundef nonnull align 8 dereferenceable(40) %1)
  %.not = icmp eq i32 %9, %10
  br i1 %.not, label %11, label %71

11:                                               ; preds = %2
  %12 = tail call noundef i32 @_ZNK4Json5Value4typeEv(ptr noundef nonnull align 8 dereferenceable(40) %0)
  switch i32 %12, label %70 [
    i32 0, label %71
    i32 1, label %13
    i32 2, label %17
    i32 3, label %21
    i32 5, label %25
    i32 4, label %29
    i32 6, label %60
    i32 7, label %60
  ]

13:                                               ; preds = %11
  %14 = load i64, ptr %0, align 8, !tbaa !5
  %15 = load i64, ptr %1, align 8, !tbaa !5
  %16 = icmp eq i64 %14, %15
  br label %71

17:                                               ; preds = %11
  %18 = load i64, ptr %0, align 8, !tbaa !5
  %19 = load i64, ptr %1, align 8, !tbaa !5
  %20 = icmp eq i64 %18, %19
  br label %71

21:                                               ; preds = %11
  %22 = load double, ptr %0, align 8, !tbaa !5
  %23 = load double, ptr %1, align 8, !tbaa !5
  %24 = fcmp oeq double %22, %23
  br label %71

25:                                               ; preds = %11
  %26 = load i8, ptr %0, align 8, !tbaa !5, !range !8, !noundef !9
  %27 = load i8, ptr %1, align 8, !tbaa !5, !range !8, !noundef !9
  %28 = icmp eq i8 %26, %27
  br label %71

29:                                               ; preds = %11
  %30 = load ptr, ptr %0, align 8, !tbaa !5
  %31 = icmp eq ptr %30, null
  %32 = load ptr, ptr %1, align 8
  %33 = icmp eq ptr %32, null
  %or.cond24 = select i1 %31, i1 true, i1 %33
  br i1 %or.cond24, label %34, label %36

34:                                               ; preds = %29
  %35 = icmp eq ptr %30, %32
  br label %71

36:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #8
  %37 = tail call noundef zeroext i1 @_ZNK4Json5Value11isAllocatedEv(ptr noundef nonnull align 8 dereferenceable(40) %0)
  %38 = load ptr, ptr %0, align 8, !tbaa !5
  call void @_ZN4JsonL20decodePrefixedStringEbPKcPjPS1_(i1 noundef zeroext %37, ptr noundef %38, ptr noundef nonnull %3, ptr noundef nonnull %5)
  %39 = call noundef zeroext i1 @_ZNK4Json5Value11isAllocatedEv(ptr noundef nonnull align 8 dereferenceable(40) %1)
  %40 = load ptr, ptr %1, align 8, !tbaa !5
  call void @_ZN4JsonL20decodePrefixedStringEbPKcPjPS1_(i1 noundef zeroext %39, ptr noundef %40, ptr noundef nonnull %4, ptr noundef nonnull %6)
  %41 = load i32, ptr %3, align 4, !tbaa !10
  %42 = load i32, ptr %4, align 4, !tbaa !10
  %.not21 = icmp eq i32 %41, %42
  br i1 %.not21, label %43, label %59

43:                                               ; preds = %36
  %44 = load ptr, ptr %5, align 8, !tbaa !12
  %45 = icmp ne ptr %44, null
  %46 = load ptr, ptr %6, align 8
  %47 = icmp ne ptr %46, null
  %or.cond = select i1 %45, i1 %47, i1 false
  br i1 %or.cond, label %56, label %48

48:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #8
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %8) #8
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #8
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull @.str.4, ptr noundef nonnull align 1 dereferenceable(1) %8)
          to label %49 unwind label %51

49:                                               ; preds = %48
  invoke void @_ZN4Json15throwLogicErrorERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(32) %7) #9
          to label %50 unwind label %53

50:                                               ; preds = %49
  unreachable

51:                                               ; preds = %48
  %52 = landingpad { ptr, i32 }
          cleanup
  br label %55

53:                                               ; preds = %49
  %54 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #8
  br label %55

55:                                               ; preds = %53, %51
  %.pn = phi { ptr, i32 } [ %54, %53 ], [ %52, %51 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #8
  resume { ptr, i32 } %.pn

56:                                               ; preds = %43
  %57 = zext i32 %41 to i64
  %bcmp = call i32 @bcmp(ptr nonnull %44, ptr nonnull %46, i64 %57)
  %58 = icmp eq i32 %bcmp, 0
  br label %59

59:                                               ; preds = %36, %56
  %.0 = phi i1 [ %58, %56 ], [ false, %36 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #8
  br label %71

60:                                               ; preds = %11, %11
  %61 = load ptr, ptr %0, align 8, !tbaa !5
  %62 = tail call noundef i64 @_ZNKSt3mapIN4Json5Value8CZStringES1_St4lessIS2_ESaISt4pairIKS2_S1_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %61) #8
  %63 = load ptr, ptr %1, align 8, !tbaa !5
  %64 = tail call noundef i64 @_ZNKSt3mapIN4Json5Value8CZStringES1_St4lessIS2_ESaISt4pairIKS2_S1_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %63) #8
  %65 = icmp eq i64 %62, %64
  br i1 %65, label %66, label %71

66:                                               ; preds = %60
  %67 = load ptr, ptr %0, align 8, !tbaa !5
  %68 = load ptr, ptr %1, align 8, !tbaa !5
  %69 = tail call noundef zeroext i1 @_ZSteqIN4Json5Value8CZStringES1_St4lessIS2_ESaISt4pairIKS2_S1_EEEbRKSt3mapIT_T0_T1_T2_ESG_(ptr noundef nonnull align 8 dereferenceable(48) %67, ptr noundef nonnull align 8 dereferenceable(48) %68)
  br label %71

70:                                               ; preds = %11
  tail call void @__assert_fail(ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.6, i32 noundef 583, ptr noundef nonnull @__PRETTY_FUNCTION__._ZNK4Json5ValueeqERKS0_) #10
  unreachable

71:                                               ; preds = %60, %66, %11, %2, %59, %34, %25, %21, %17, %13
  %.1 = phi i1 [ %35, %34 ], [ %.0, %59 ], [ %28, %25 ], [ %24, %21 ], [ %20, %17 ], [ %16, %13 ], [ false, %2 ], [ true, %11 ], [ false, %60 ], [ %69, %66 ]
  ret i1 %.1
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZSteqIN4Json5Value8CZStringES1_St4lessIS2_ESaISt4pairIKS2_S1_EEEbRKSt3mapIT_T0_T1_T2_ESG_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #6

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

; Function Attrs: nofree nounwind willreturn memory(argmem: read)
declare i32 @bcmp(ptr nocapture, ptr nocapture, i64) local_unnamed_addr #7

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 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress noreturn uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { noreturn 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 = { inlinehint 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 #6 = { inlinehint 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 #7 = { nofree nounwind willreturn memory(argmem: read) }
attributes #8 = { nounwind }
attributes #9 = { noreturn }
attributes #10 = { noreturn 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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{i8 0, i8 2}
!9 = !{}
!10 = !{!11, !11, i64 0}
!11 = !{!"int", !6, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"any pointer", !6, i64 0}


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