; LLVM IR from niessner/Matterport :: code/gaps/pkgs/RNBasics/json.ll (ZNK4Json5Value15isConvertibleToENS_9ValueTypeE)

; 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.Json::Value" = type { %"union.Json::Value::ValueHolder", i16, ptr, i64, i64 }
%"union.Json::Value::ValueHolder" = type { i64 }

@.str = external hidden unnamed_addr constant [1 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [86 x i8], align 1
@.str.48 = external hidden unnamed_addr constant [6 x i8], align 1
@__PRETTY_FUNCTION__._ZNK4Json5Value15isConvertibleToENS_9ValueTypeE = external hidden unnamed_addr constant [51 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK4Json5Value8asStringB5cxx11Ev(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(40)) #3 align 2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZN4JsonL7InRangeIiiEEbdT_T0_(double noundef, i32 noundef, i32 noundef) #4

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZN4JsonL7InRangeIijEEbdT_T0_(double noundef, i32 noundef, i32 noundef) #4

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_ZNK4Json5Value8asDoubleEv(ptr noundef nonnull align 8 dereferenceable(40)) #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZNK4Json5Value15isConvertibleToENS_9ValueTypeE(ptr noundef nonnull align 8 dereferenceable(40) %0, i32 noundef %1) #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca i1, align 1
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca %"class.std::__cxx11::basic_string", align 8
  %7 = alloca i1, align 1
  %8 = alloca i1, align 1
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !9
  %11 = load ptr, ptr %4, align 8
  %12 = load i32, ptr %5, align 4, !tbaa !9
  switch i32 %12, label %219 [
    i32 0, label %13
    i32 1, label %85
    i32 2, label %111
    i32 3, label %137
    i32 5, label %153
    i32 4, label %169
    i32 6, label %191
    i32 7, label %205
  ]

13:                                               ; preds = %2
  %14 = call noundef zeroext i1 @_ZNK4Json5Value9isNumericEv(ptr noundef nonnull align 8 dereferenceable(40) %11)
  store i1 false, ptr %7, align 1
  store i1 false, ptr %8, align 1
  br i1 %14, label %15, label %18

15:                                               ; preds = %13
  %16 = call noundef double @_ZNK4Json5Value8asDoubleEv(ptr noundef nonnull align 8 dereferenceable(40) %11)
  %17 = fcmp oeq double %16, 0.000000e+00
  br i1 %17, label %67, label %18

18:                                               ; preds = %15, %13
  %19 = getelementptr inbounds %"class.Json::Value", ptr %11, i32 0, i32 1
  %20 = load i16, ptr %19, align 8
  %21 = and i16 %20, 255
  %22 = zext i16 %21 to i32
  %23 = icmp eq i32 %22, 5
  br i1 %23, label %24, label %30

24:                                               ; preds = %18
  %25 = getelementptr inbounds %"class.Json::Value", ptr %11, i32 0, i32 0
  %26 = load i8, ptr %25, align 8, !tbaa !11, !range !12, !noundef !13
  %27 = trunc i8 %26 to i1
  %28 = zext i1 %27 to i32
  %29 = icmp eq i32 %28, 0
  br i1 %29, label %67, label %30

30:                                               ; preds = %24, %18
  %31 = getelementptr inbounds %"class.Json::Value", ptr %11, i32 0, i32 1
  %32 = load i16, ptr %31, align 8
  %33 = and i16 %32, 255
  %34 = zext i16 %33 to i32
  %35 = icmp eq i32 %34, 4
  br i1 %35, label %36, label %39

36:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 32, ptr %6) #5
  store i1 true, ptr %7, align 1
  call void @_ZNK4Json5Value8asStringB5cxx11Ev(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %6, ptr noundef nonnull align 8 dereferenceable(40) %11)
  store i1 true, ptr %8, align 1
  %37 = invoke noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef @.str)
          to label %38 unwind label %75

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

39:                                               ; preds = %38, %30
  %40 = getelementptr inbounds %"class.Json::Value", ptr %11, i32 0, i32 1
  %41 = load i16, ptr %40, align 8
  %42 = and i16 %41, 255
  %43 = zext i16 %42 to i32
  %44 = icmp eq i32 %43, 6
  br i1 %44, label %45, label %50

45:                                               ; preds = %39
  %46 = getelementptr inbounds %"class.Json::Value", ptr %11, i32 0, i32 0
  %47 = load ptr, ptr %46, align 8, !tbaa !11
  %48 = call noundef i64 @_ZNKSt3mapIN4Json5Value8CZStringES1_St4lessIS2_ESaISt4pairIKS2_S1_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %47) #5
  %49 = icmp eq i64 %48, 0
  br i1 %49, label %67, label %50

50:                                               ; preds = %45, %39
  %51 = getelementptr inbounds %"class.Json::Value", ptr %11, i32 0, i32 1
  %52 = load i16, ptr %51, align 8
  %53 = and i16 %52, 255
  %54 = zext i16 %53 to i32
  %55 = icmp eq i32 %54, 7
  br i1 %55, label %56, label %61

56:                                               ; preds = %50
  %57 = getelementptr inbounds %"class.Json::Value", ptr %11, i32 0, i32 0
  %58 = load ptr, ptr %57, align 8, !tbaa !11
  %59 = call noundef i64 @_ZNKSt3mapIN4Json5Value8CZStringES1_St4lessIS2_ESaISt4pairIKS2_S1_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %58) #5
  %60 = icmp eq i64 %59, 0
  br i1 %60, label %67, label %61

61:                                               ; preds = %56, %50
  %62 = getelementptr inbounds %"class.Json::Value", ptr %11, i32 0, i32 1
  %63 = load i16, ptr %62, align 8
  %64 = and i16 %63, 255
  %65 = zext i16 %64 to i32
  %66 = icmp eq i32 %65, 0
  br label %67

67:                                               ; preds = %61, %56, %45, %38, %24, %15
  %68 = phi i1 [ true, %56 ], [ true, %45 ], [ true, %38 ], [ true, %24 ], [ true, %15 ], [ %66, %61 ]
  store i1 %68, ptr %3, align 1
  %69 = load i1, ptr %8, align 1
  br i1 %69, label %70, label %71

70:                                               ; preds = %67
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #5
  br label %71

71:                                               ; preds = %70, %67
  %72 = load i1, ptr %7, align 1
  br i1 %72, label %73, label %74

73:                                               ; preds = %71
  call void @llvm.lifetime.end.p0(i64 32, ptr %6) #5
  br label %74

74:                                               ; preds = %73, %71
  br label %220

75:                                               ; preds = %36
  %76 = landingpad { ptr, i32 }
          cleanup
  %77 = extractvalue { ptr, i32 } %76, 0
  store ptr %77, ptr %9, align 8
  %78 = extractvalue { ptr, i32 } %76, 1
  store i32 %78, ptr %10, align 4
  %79 = load i1, ptr %8, align 1
  br i1 %79, label %80, label %81

80:                                               ; preds = %75
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #5
  br label %81

81:                                               ; preds = %80, %75
  %82 = load i1, ptr %7, align 1
  br i1 %82, label %83, label %84

83:                                               ; preds = %81
  call void @llvm.lifetime.end.p0(i64 32, ptr %6) #5
  br label %84

84:                                               ; preds = %83, %81
  br label %222

85:                                               ; preds = %2
  %86 = call noundef zeroext i1 @_ZNK4Json5Value5isIntEv(ptr noundef nonnull align 8 dereferenceable(40) %11)
  br i1 %86, label %109, label %87

87:                                               ; preds = %85
  %88 = getelementptr inbounds %"class.Json::Value", ptr %11, i32 0, i32 1
  %89 = load i16, ptr %88, align 8
  %90 = and i16 %89, 255
  %91 = zext i16 %90 to i32
  %92 = icmp eq i32 %91, 3
  br i1 %92, label %93, label %97

93:                                               ; preds = %87
  %94 = getelementptr inbounds %"class.Json::Value", ptr %11, i32 0, i32 0
  %95 = load double, ptr %94, align 8, !tbaa !11
  %96 = call noundef zeroext i1 @_ZN4JsonL7InRangeIiiEEbdT_T0_(double noundef %95, i32 noundef -2147483648, i32 noundef 2147483647)
  br i1 %96, label %109, label %97

97:                                               ; preds = %93, %87
  %98 = getelementptr inbounds %"class.Json::Value", ptr %11, i32 0, i32 1
  %99 = load i16, ptr %98, align 8
  %100 = and i16 %99, 255
  %101 = zext i16 %100 to i32
  %102 = icmp eq i32 %101, 5
  br i1 %102, label %109, label %103

103:                                              ; preds = %97
  %104 = getelementptr inbounds %"class.Json::Value", ptr %11, i32 0, i32 1
  %105 = load i16, ptr %104, align 8
  %106 = and i16 %105, 255
  %107 = zext i16 %106 to i32
  %108 = icmp eq i32 %107, 0
  br label %109

109:                                              ; preds = %103, %97, %93, %85
  %110 = phi i1 [ true, %97 ], [ true, %93 ], [ true, %85 ], [ %108, %103 ]
  store i1 %110, ptr %3, align 1
  br label %220

111:                                              ; preds = %2
  %112 = call noundef zeroext i1 @_ZNK4Json5Value6isUIntEv(ptr noundef nonnull align 8 dereferenceable(40) %11)
  br i1 %112, label %135, label %113

113:                                              ; preds = %111
  %114 = getelementptr inbounds %"class.Json::Value", ptr %11, i32 0, i32 1
  %115 = load i16, ptr %114, align 8
  %116 = and i16 %115, 255
  %117 = zext i16 %116 to i32
  %118 = icmp eq i32 %117, 3
  br i1 %118, label %119, label %123

119:                                              ; preds = %113
  %120 = getelementptr inbounds %"class.Json::Value", ptr %11, i32 0, i32 0
  %121 = load double, ptr %120, align 8, !tbaa !11
  %122 = call noundef zeroext i1 @_ZN4JsonL7InRangeIijEEbdT_T0_(double noundef %121, i32 noundef 0, i32 noundef -1)
  br i1 %122, label %135, label %123

123:                                              ; preds = %119, %113
  %124 = getelementptr inbounds %"class.Json::Value", ptr %11, i32 0, i32 1
  %125 = load i16, ptr %124, align 8
  %126 = and i16 %125, 255
  %127 = zext i16 %126 to i32
  %128 = icmp eq i32 %127, 5
  br i1 %128, label %135, label %129

129:                                              ; preds = %123
  %130 = getelementptr inbounds %"class.Json::Value", ptr %11, i32 0, i32 1
  %131 = load i16, ptr %130, align 8
  %132 = and i16 %131, 255
  %133 = zext i16 %132 to i32
  %134 = icmp eq i32 %133, 0
  br label %135

135:                                              ; preds = %129, %123, %119, %111
  %136 = phi i1 [ true, %123 ], [ true, %119 ], [ true, %111 ], [ %134, %129 ]
  store i1 %136, ptr %3, align 1
  br label %220

137:                                              ; preds = %2
  %138 = call noundef zeroext i1 @_ZNK4Json5Value9isNumericEv(ptr noundef nonnull align 8 dereferenceable(40) %11)
  br i1 %138, label %151, label %139

139:                                              ; preds = %137
  %140 = getelementptr inbounds %"class.Json::Value", ptr %11, i32 0, i32 1
  %141 = load i16, ptr %140, align 8
  %142 = and i16 %141, 255
  %143 = zext i16 %142 to i32
  %144 = icmp eq i32 %143, 5
  br i1 %144, label %151, label %145

145:                                              ; preds = %139
  %146 = getelementptr inbounds %"class.Json::Value", ptr %11, i32 0, i32 1
  %147 = load i16, ptr %146, align 8
  %148 = and i16 %147, 255
  %149 = zext i16 %148 to i32
  %150 = icmp eq i32 %149, 0
  br label %151

151:                                              ; preds = %145, %139, %137
  %152 = phi i1 [ true, %139 ], [ true, %137 ], [ %150, %145 ]
  store i1 %152, ptr %3, align 1
  br label %220

153:                                              ; preds = %2
  %154 = call noundef zeroext i1 @_ZNK4Json5Value9isNumericEv(ptr noundef nonnull align 8 dereferenceable(40) %11)
  br i1 %154, label %167, label %155

155:                                              ; preds = %153
  %156 = getelementptr inbounds %"class.Json::Value", ptr %11, i32 0, i32 1
  %157 = load i16, ptr %156, align 8
  %158 = and i16 %157, 255
  %159 = zext i16 %158 to i32
  %160 = icmp eq i32 %159, 5
  br i1 %160, label %167, label %161

161:                                              ; preds = %155
  %162 = getelementptr inbounds %"class.Json::Value", ptr %11, i32 0, i32 1
  %163 = load i16, ptr %162, align 8
  %164 = and i16 %163, 255
  %165 = zext i16 %164 to i32
  %166 = icmp eq i32 %165, 0
  br label %167

167:                                              ; preds = %161, %155, %153
  %168 = phi i1 [ true, %155 ], [ true, %153 ], [ %166, %161 ]
  store i1 %168, ptr %3, align 1
  br label %220

169:                                              ; preds = %2
  %170 = call noundef zeroext i1 @_ZNK4Json5Value9isNumericEv(ptr noundef nonnull align 8 dereferenceable(40) %11)
  br i1 %170, label %189, label %171

171:                                              ; preds = %169
  %172 = getelementptr inbounds %"class.Json::Value", ptr %11, i32 0, i32 1
  %173 = load i16, ptr %172, align 8
  %174 = and i16 %173, 255
  %175 = zext i16 %174 to i32
  %176 = icmp eq i32 %175, 5
  br i1 %176, label %189, label %177

177:                                              ; preds = %171
  %178 = getelementptr inbounds %"class.Json::Value", ptr %11, i32 0, i32 1
  %179 = load i16, ptr %178, align 8
  %180 = and i16 %179, 255
  %181 = zext i16 %180 to i32
  %182 = icmp eq i32 %181, 4
  br i1 %182, label %189, label %183

183:                                              ; preds = %177
  %184 = getelementptr inbounds %"class.Json::Value", ptr %11, i32 0, i32 1
  %185 = load i16, ptr %184, align 8
  %186 = and i16 %185, 255
  %187 = zext i16 %186 to i32
  %188 = icmp eq i32 %187, 0
  br label %189

189:                                              ; preds = %183, %177, %171, %169
  %190 = phi i1 [ true, %177 ], [ true, %171 ], [ true, %169 ], [ %188, %183 ]
  store i1 %190, ptr %3, align 1
  br label %220

191:                                              ; preds = %2
  %192 = getelementptr inbounds %"class.Json::Value", ptr %11, i32 0, i32 1
  %193 = load i16, ptr %192, align 8
  %194 = and i16 %193, 255
  %195 = zext i16 %194 to i32
  %196 = icmp eq i32 %195, 6
  br i1 %196, label %203, label %197

197:                                              ; preds = %191
  %198 = getelementptr inbounds %"class.Json::Value", ptr %11, i32 0, i32 1
  %199 = load i16, ptr %198, align 8
  %200 = and i16 %199, 255
  %201 = zext i16 %200 to i32
  %202 = icmp eq i32 %201, 0
  br label %203

203:                                              ; preds = %197, %191
  %204 = phi i1 [ true, %191 ], [ %202, %197 ]
  store i1 %204, ptr %3, align 1
  br label %220

205:                                              ; preds = %2
  %206 = getelementptr inbounds %"class.Json::Value", ptr %11, i32 0, i32 1
  %207 = load i16, ptr %206, align 8
  %208 = and i16 %207, 255
  %209 = zext i16 %208 to i32
  %210 = icmp eq i32 %209, 7
  br i1 %210, label %217, label %211

211:                                              ; preds = %205
  %212 = getelementptr inbounds %"class.Json::Value", ptr %11, i32 0, i32 1
  %213 = load i16, ptr %212, align 8
  %214 = and i16 %213, 255
  %215 = zext i16 %214 to i32
  %216 = icmp eq i32 %215, 0
  br label %217

217:                                              ; preds = %211, %205
  %218 = phi i1 [ true, %205 ], [ %216, %211 ]
  store i1 %218, ptr %3, align 1
  br label %220

219:                                              ; preds = %2
  call void @__assert_fail(ptr noundef @.str.48, ptr noundef @.str.8, i32 noundef 3269, ptr noundef @__PRETTY_FUNCTION__._ZNK4Json5Value15isConvertibleToENS_9ValueTypeE) #6
  unreachable

220:                                              ; preds = %217, %203, %189, %167, %151, %135, %109, %74
  %221 = load i1, ptr %3, align 1
  ret i1 %221

222:                                              ; preds = %84
  %223 = load ptr, ptr %9, align 8
  %224 = load i32, ptr %10, align 4
  %225 = insertvalue { ptr, i32 } poison, ptr %223, 0
  %226 = insertvalue { ptr, i32 } %225, i32 %224, 1
  resume { ptr, i32 } %226
}

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) #4

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 #4 = { 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 #5 = { nounwind }
attributes #6 = { 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 = !{!10, !10, i64 0}
!10 = !{!"_ZTSN4Json9ValueTypeE", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = !{i8 0, i8 2}
!13 = !{}


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

@.str = external hidden unnamed_addr constant [1 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [86 x i8], align 1
@.str.48 = external hidden unnamed_addr constant [6 x i8], align 1
@__PRETTY_FUNCTION__._ZNK4Json5Value15isConvertibleToENS_9ValueTypeE = external hidden unnamed_addr constant [51 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK4Json5Value8asStringB5cxx11Ev(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #3 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 #0 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZN4JsonL7InRangeIiiEEbdT_T0_(double noundef, i32 noundef, i32 noundef) local_unnamed_addr #4

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZN4JsonL7InRangeIijEEbdT_T0_(double noundef, i32 noundef, i32 noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_ZNK4Json5Value8asDoubleEv(ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZNK4Json5Value15isConvertibleToENS_9ValueTypeE(ptr noundef nonnull align 8 dereferenceable(40) %0, i32 noundef %1) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.std::__cxx11::basic_string", align 8
  switch i32 %1, label %100 [
    i32 0, label %4
    i32 1, label %40
    i32 2, label %53
    i32 3, label %66
    i32 5, label %74
    i32 4, label %82
    i32 6, label %88
    i32 7, label %94
  ]

4:                                                ; preds = %2
  %5 = tail call noundef zeroext i1 @_ZNK4Json5Value9isNumericEv(ptr noundef nonnull align 8 dereferenceable(40) %0)
  br i1 %5, label %6, label %9

6:                                                ; preds = %4
  %7 = tail call noundef double @_ZNK4Json5Value8asDoubleEv(ptr noundef nonnull align 8 dereferenceable(40) %0)
  %8 = fcmp oeq double %7, 0.000000e+00
  br i1 %8, label %.critedge, label %9

9:                                                ; preds = %6, %4
  %10 = getelementptr inbounds i8, ptr %0, i64 8
  %11 = load i16, ptr %10, align 8
  %12 = and i16 %11, 255
  %13 = icmp eq i16 %12, 5
  %14 = load i8, ptr %0, align 8, !range !5
  %15 = icmp eq i8 %14, 0
  %or.cond = select i1 %13, i1 %15, i1 false
  br i1 %or.cond, label %.critedge, label %16

16:                                               ; preds = %9
  %17 = icmp eq i16 %12, 4
  br i1 %17, label %18, label %20

18:                                               ; preds = %16
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #5
  call void @_ZNK4Json5Value8asStringB5cxx11Ev(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %3, ptr noundef nonnull align 8 dereferenceable(40) %0)
  %19 = call noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef nonnull @.str)
  br i1 %19, label %.thread21, label %._crit_edge25

._crit_edge25:                                    ; preds = %18
  %.pre26 = load i16, ptr %10, align 8
  br label %20

20:                                               ; preds = %._crit_edge25, %16
  %21 = phi i16 [ %.pre26, %._crit_edge25 ], [ %11, %16 ]
  %22 = and i16 %21, 255
  %23 = icmp eq i16 %22, 6
  br i1 %23, label %24, label %28

24:                                               ; preds = %20
  %25 = load ptr, ptr %0, align 8, !tbaa !6
  %26 = call noundef i64 @_ZNKSt3mapIN4Json5Value8CZStringES1_St4lessIS2_ESaISt4pairIKS2_S1_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %25) #5
  %27 = icmp eq i64 %26, 0
  br i1 %27, label %38, label %._crit_edge27

._crit_edge27:                                    ; preds = %24
  %.pre28 = load i16, ptr %10, align 8
  br label %28

28:                                               ; preds = %._crit_edge27, %20
  %29 = phi i16 [ %.pre28, %._crit_edge27 ], [ %21, %20 ]
  %30 = and i16 %29, 255
  %31 = icmp eq i16 %30, 7
  br i1 %31, label %32, label %36

32:                                               ; preds = %28
  %33 = load ptr, ptr %0, align 8, !tbaa !6
  %34 = call noundef i64 @_ZNKSt3mapIN4Json5Value8CZStringES1_St4lessIS2_ESaISt4pairIKS2_S1_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %33) #5
  %35 = icmp eq i64 %34, 0
  br i1 %35, label %38, label %._crit_edge29

._crit_edge29:                                    ; preds = %32
  %.pre30 = load i16, ptr %10, align 8
  %.pre31 = and i16 %.pre30, 255
  br label %36

36:                                               ; preds = %._crit_edge29, %28
  %.pre-phi = phi i16 [ %.pre31, %._crit_edge29 ], [ %30, %28 ]
  %37 = icmp eq i16 %.pre-phi, 0
  br i1 %17, label %.thread21, label %.critedge

38:                                               ; preds = %32, %24
  br i1 %17, label %.thread21, label %.critedge

.thread21:                                        ; preds = %18, %36, %38
  %39 = phi i1 [ true, %38 ], [ %37, %36 ], [ true, %18 ]
  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 %.critedge

40:                                               ; preds = %2
  %41 = tail call noundef zeroext i1 @_ZNK4Json5Value5isIntEv(ptr noundef nonnull align 8 dereferenceable(40) %0)
  br i1 %41, label %.critedge, label %42

42:                                               ; preds = %40
  %43 = getelementptr inbounds i8, ptr %0, i64 8
  %44 = load i16, ptr %43, align 8
  %45 = and i16 %44, 255
  %46 = icmp eq i16 %45, 3
  br i1 %46, label %47, label %50

47:                                               ; preds = %42
  %48 = load double, ptr %0, align 8, !tbaa !6
  %49 = tail call noundef zeroext i1 @_ZN4JsonL7InRangeIiiEEbdT_T0_(double noundef %48, i32 noundef -2147483648, i32 noundef 2147483647)
  br i1 %49, label %.critedge, label %._crit_edge23

._crit_edge23:                                    ; preds = %47
  %.pre24 = load i16, ptr %43, align 8
  %.pre32 = and i16 %.pre24, 255
  br label %50

50:                                               ; preds = %._crit_edge23, %42
  %.pre-phi33 = phi i16 [ %.pre32, %._crit_edge23 ], [ %45, %42 ]
  %51 = icmp eq i16 %.pre-phi33, 5
  %52 = icmp eq i16 %.pre-phi33, 0
  %spec.select = or i1 %51, %52
  br label %.critedge

53:                                               ; preds = %2
  %54 = tail call noundef zeroext i1 @_ZNK4Json5Value6isUIntEv(ptr noundef nonnull align 8 dereferenceable(40) %0)
  br i1 %54, label %.critedge, label %55

55:                                               ; preds = %53
  %56 = getelementptr inbounds i8, ptr %0, i64 8
  %57 = load i16, ptr %56, align 8
  %58 = and i16 %57, 255
  %59 = icmp eq i16 %58, 3
  br i1 %59, label %60, label %63

60:                                               ; preds = %55
  %61 = load double, ptr %0, align 8, !tbaa !6
  %62 = tail call noundef zeroext i1 @_ZN4JsonL7InRangeIijEEbdT_T0_(double noundef %61, i32 noundef 0, i32 noundef -1)
  br i1 %62, label %.critedge, label %._crit_edge

._crit_edge:                                      ; preds = %60
  %.pre = load i16, ptr %56, align 8
  %.pre34 = and i16 %.pre, 255
  br label %63

63:                                               ; preds = %._crit_edge, %55
  %.pre-phi35 = phi i16 [ %.pre34, %._crit_edge ], [ %58, %55 ]
  %64 = icmp eq i16 %.pre-phi35, 5
  %65 = icmp eq i16 %.pre-phi35, 0
  %spec.select15 = or i1 %64, %65
  br label %.critedge

66:                                               ; preds = %2
  %67 = tail call noundef zeroext i1 @_ZNK4Json5Value9isNumericEv(ptr noundef nonnull align 8 dereferenceable(40) %0)
  br i1 %67, label %.critedge, label %68

68:                                               ; preds = %66
  %69 = getelementptr inbounds i8, ptr %0, i64 8
  %70 = load i16, ptr %69, align 8
  %71 = and i16 %70, 255
  %72 = icmp eq i16 %71, 5
  %73 = icmp eq i16 %71, 0
  %spec.select16 = or i1 %72, %73
  br label %.critedge

74:                                               ; preds = %2
  %75 = tail call noundef zeroext i1 @_ZNK4Json5Value9isNumericEv(ptr noundef nonnull align 8 dereferenceable(40) %0)
  br i1 %75, label %.critedge, label %76

76:                                               ; preds = %74
  %77 = getelementptr inbounds i8, ptr %0, i64 8
  %78 = load i16, ptr %77, align 8
  %79 = and i16 %78, 255
  %80 = icmp eq i16 %79, 5
  %81 = icmp eq i16 %79, 0
  %spec.select17 = or i1 %80, %81
  br label %.critedge

82:                                               ; preds = %2
  %83 = tail call noundef zeroext i1 @_ZNK4Json5Value9isNumericEv(ptr noundef nonnull align 8 dereferenceable(40) %0)
  br i1 %83, label %.critedge, label %84

84:                                               ; preds = %82
  %85 = getelementptr inbounds i8, ptr %0, i64 8
  %86 = load i16, ptr %85, align 8
  %trunc = trunc i16 %86 to i8
  %87 = icmp ult i8 %trunc, 6
  br i1 %87, label %switch.lookup, label %.critedge

88:                                               ; preds = %2
  %89 = getelementptr inbounds i8, ptr %0, i64 8
  %90 = load i16, ptr %89, align 8
  %91 = and i16 %90, 255
  %92 = icmp eq i16 %91, 6
  %93 = icmp eq i16 %91, 0
  %spec.select18 = or i1 %92, %93
  br label %.critedge

94:                                               ; preds = %2
  %95 = getelementptr inbounds i8, ptr %0, i64 8
  %96 = load i16, ptr %95, align 8
  %97 = and i16 %96, 255
  %98 = icmp eq i16 %97, 7
  %99 = icmp eq i16 %97, 0
  %spec.select19 = or i1 %98, %99
  br label %.critedge

100:                                              ; preds = %2
  tail call void @__assert_fail(ptr noundef nonnull @.str.48, ptr noundef nonnull @.str.8, i32 noundef 3269, ptr noundef nonnull @__PRETTY_FUNCTION__._ZNK4Json5Value15isConvertibleToENS_9ValueTypeE) #6
  unreachable

switch.lookup:                                    ; preds = %84
  %switch.cast = trunc i16 %86 to i6
  %switch.downshift = lshr i6 -15, %switch.cast
  %switch.masked = trunc i6 %switch.downshift to i1
  br label %.critedge

.critedge:                                        ; preds = %84, %switch.lookup, %9, %6, %36, %76, %68, %63, %50, %38, %82, %74, %66, %53, %60, %40, %47, %.thread21, %94, %88
  %.06 = phi i1 [ %spec.select19, %94 ], [ %spec.select18, %88 ], [ %39, %.thread21 ], [ true, %47 ], [ true, %40 ], [ %spec.select, %50 ], [ true, %60 ], [ true, %53 ], [ %spec.select15, %63 ], [ true, %66 ], [ %spec.select16, %68 ], [ true, %74 ], [ %spec.select17, %76 ], [ true, %82 ], [ true, %38 ], [ %37, %36 ], [ true, %6 ], [ true, %9 ], [ %switch.masked, %switch.lookup ], [ false, %84 ]
  ret i1 %.06
}

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) local_unnamed_addr #4

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 #4 = { 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 #5 = { nounwind }
attributes #6 = { 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 = !{i8 0, i8 2}
!6 = !{!7, !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}


; Effective O3 passes: BDCEPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,SROAPass,SimplifyCFGPass,TailCallElimPass