; LLVM IR from microsoft/LightGBM :: src/io (json11)

; 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.json11_internal_lightgbm::Json" = type { %"class.std::shared_ptr" }
%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<json11_internal_lightgbm::Json, std::allocator<json11_internal_lightgbm::Json>>::_Vector_impl" }
%"struct.std::_Vector_base<json11_internal_lightgbm::Json, std::allocator<json11_internal_lightgbm::Json>>::_Vector_impl" = type { %"struct.std::_Vector_base<json11_internal_lightgbm::Json, std::allocator<json11_internal_lightgbm::Json>>::_Vector_impl_data" }
%"struct.std::_Vector_base<json11_internal_lightgbm::Json, std::allocator<json11_internal_lightgbm::Json>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.json11_internal_lightgbm::(anonymous namespace)::JsonParser" = type { ptr, i64, i64, ptr, i8, i32 }

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 noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32)) #1 align 2

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN24json11_internal_lightgbm12_GLOBAL__N_110JsonParser10parse_jsonEi(ptr dead_on_unwind noalias writable sret(%"class.json11_internal_lightgbm::Json") align 8, ptr noundef nonnull align 8 dereferenceable(40), i32 noundef) #2 align 2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN24json11_internal_lightgbm12_GLOBAL__N_110JsonParser15consume_garbageEv(ptr noundef nonnull align 8 dereferenceable(40)) #2 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN24json11_internal_lightgbm4Json11parse_multiERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPmPS6_NS_9JsonParseE(ptr dead_on_unwind noalias writable sret(%"class.std::vector") align 8 %0, ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef %2, ptr noundef %3, i32 noundef %4) #2 align 2 personality ptr @__gxx_personality_v0 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca %"struct.json11_internal_lightgbm::(anonymous namespace)::JsonParser", align 8
  %12 = alloca i1, align 1
  %13 = alloca %"class.json11_internal_lightgbm::Json", align 8
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  store ptr %0, ptr %6, align 8
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store ptr %3, ptr %9, align 8, !tbaa !5
  store i32 %4, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 40, ptr %11) #4
  %16 = getelementptr inbounds %"struct.json11_internal_lightgbm::(anonymous namespace)::JsonParser", ptr %11, i32 0, i32 0
  %17 = load ptr, ptr %7, align 8, !tbaa !5
  %18 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %17) #4
  store ptr %18, ptr %16, align 8, !tbaa !11
  %19 = getelementptr inbounds %"struct.json11_internal_lightgbm::(anonymous namespace)::JsonParser", ptr %11, i32 0, i32 1
  %20 = load ptr, ptr %7, align 8, !tbaa !5
  %21 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %20) #4
  store i64 %21, ptr %19, align 8, !tbaa !15
  %22 = getelementptr inbounds %"struct.json11_internal_lightgbm::(anonymous namespace)::JsonParser", ptr %11, i32 0, i32 2
  store i64 0, ptr %22, align 8, !tbaa !16
  %23 = getelementptr inbounds %"struct.json11_internal_lightgbm::(anonymous namespace)::JsonParser", ptr %11, i32 0, i32 3
  %24 = load ptr, ptr %9, align 8, !tbaa !5
  store ptr %24, ptr %23, align 8, !tbaa !17
  %25 = getelementptr inbounds %"struct.json11_internal_lightgbm::(anonymous namespace)::JsonParser", ptr %11, i32 0, i32 4
  store i8 0, ptr %25, align 8, !tbaa !18
  %26 = getelementptr inbounds %"struct.json11_internal_lightgbm::(anonymous namespace)::JsonParser", ptr %11, i32 0, i32 5
  %27 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %27, ptr %26, align 4, !tbaa !19
  %28 = load ptr, ptr %8, align 8, !tbaa !5
  store i64 0, ptr %28, align 8, !tbaa !20
  store i1 false, ptr %12, align 1
  call void @_ZNSt6vectorIN24json11_internal_lightgbm4JsonESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #4
  br label %29

29:                                               ; preds = %68, %5
  %30 = getelementptr inbounds %"struct.json11_internal_lightgbm::(anonymous namespace)::JsonParser", ptr %11, i32 0, i32 2
  %31 = load i64, ptr %30, align 8, !tbaa !16
  %32 = load ptr, ptr %7, align 8, !tbaa !5
  %33 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %32) #4
  %34 = icmp ne i64 %31, %33
  br i1 %34, label %35, label %40

35:                                               ; preds = %29
  %36 = getelementptr inbounds %"struct.json11_internal_lightgbm::(anonymous namespace)::JsonParser", ptr %11, i32 0, i32 4
  %37 = load i8, ptr %36, align 8, !tbaa !18, !range !21, !noundef !22
  %38 = trunc i8 %37 to i1
  %39 = xor i1 %38, true
  br label %40

40:                                               ; preds = %35, %29
  %41 = phi i1 [ false, %29 ], [ %39, %35 ]
  br i1 %41, label %42, label %72

42:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #4
  invoke void @_ZN24json11_internal_lightgbm12_GLOBAL__N_110JsonParser10parse_jsonEi(ptr dead_on_unwind writable sret(%"class.json11_internal_lightgbm::Json") align 8 %13, ptr noundef nonnull align 8 dereferenceable(40) %11, i32 noundef 0)
          to label %43 unwind label %49

43:                                               ; preds = %42
  invoke void @_ZNSt6vectorIN24json11_internal_lightgbm4JsonESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(16) %13)
          to label %44 unwind label %53

44:                                               ; preds = %43
  call void @_ZN24json11_internal_lightgbm4JsonD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %13) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #4
  %45 = getelementptr inbounds %"struct.json11_internal_lightgbm::(anonymous namespace)::JsonParser", ptr %11, i32 0, i32 4
  %46 = load i8, ptr %45, align 8, !tbaa !18, !range !21, !noundef !22
  %47 = trunc i8 %46 to i1
  br i1 %47, label %48, label %58

48:                                               ; preds = %44
  br label %72

49:                                               ; preds = %42
  %50 = landingpad { ptr, i32 }
          cleanup
  %51 = extractvalue { ptr, i32 } %50, 0
  store ptr %51, ptr %14, align 8
  %52 = extractvalue { ptr, i32 } %50, 1
  store i32 %52, ptr %15, align 4
  br label %57

53:                                               ; preds = %43
  %54 = landingpad { ptr, i32 }
          cleanup
  %55 = extractvalue { ptr, i32 } %54, 0
  store ptr %55, ptr %14, align 8
  %56 = extractvalue { ptr, i32 } %54, 1
  store i32 %56, ptr %15, align 4
  call void @_ZN24json11_internal_lightgbm4JsonD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %13) #4
  br label %57

57:                                               ; preds = %53, %49
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #4
  br label %76

58:                                               ; preds = %44
  invoke void @_ZN24json11_internal_lightgbm12_GLOBAL__N_110JsonParser15consume_garbageEv(ptr noundef nonnull align 8 dereferenceable(40) %11)
          to label %59 unwind label %64

59:                                               ; preds = %58
  %60 = getelementptr inbounds %"struct.json11_internal_lightgbm::(anonymous namespace)::JsonParser", ptr %11, i32 0, i32 4
  %61 = load i8, ptr %60, align 8, !tbaa !18, !range !21, !noundef !22
  %62 = trunc i8 %61 to i1
  br i1 %62, label %63, label %68

63:                                               ; preds = %59
  br label %72

64:                                               ; preds = %58
  %65 = landingpad { ptr, i32 }
          cleanup
  %66 = extractvalue { ptr, i32 } %65, 0
  store ptr %66, ptr %14, align 8
  %67 = extractvalue { ptr, i32 } %65, 1
  store i32 %67, ptr %15, align 4
  br label %76

68:                                               ; preds = %59
  %69 = getelementptr inbounds %"struct.json11_internal_lightgbm::(anonymous namespace)::JsonParser", ptr %11, i32 0, i32 2
  %70 = load i64, ptr %69, align 8, !tbaa !16
  %71 = load ptr, ptr %8, align 8, !tbaa !5
  store i64 %70, ptr %71, align 8, !tbaa !20
  br label %29, !llvm.loop !23

72:                                               ; preds = %63, %48, %40
  store i1 true, ptr %12, align 1
  %73 = load i1, ptr %12, align 1
  br i1 %73, label %75, label %74

74:                                               ; preds = %72
  call void @_ZNSt6vectorIN24json11_internal_lightgbm4JsonESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #4
  br label %75

75:                                               ; preds = %74, %72
  call void @llvm.lifetime.end.p0(i64 40, ptr %11) #4
  ret void

76:                                               ; preds = %64, %57
  call void @_ZNSt6vectorIN24json11_internal_lightgbm4JsonESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr %11) #4
  br label %77

77:                                               ; preds = %76
  %78 = load ptr, ptr %14, align 8
  %79 = load i32, ptr %15, align 4
  %80 = insertvalue { ptr, i32 } poison, ptr %78, 0
  %81 = insertvalue { ptr, i32 } %80, i32 %79, 1
  resume { ptr, i32 } %81
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIN24json11_internal_lightgbm4JsonESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(16)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIN24json11_internal_lightgbm4JsonESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) 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 = { 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 #4 = { 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 = !{!"_ZTSN24json11_internal_lightgbm9JsonParseE", !7, i64 0}
!11 = !{!12, !6, i64 0}
!12 = !{!"_ZTSN24json11_internal_lightgbm12_GLOBAL__N_110JsonParserE", !6, i64 0, !13, i64 8, !13, i64 16, !6, i64 24, !14, i64 32, !10, i64 36}
!13 = !{!"long", !7, i64 0}
!14 = !{!"bool", !7, i64 0}
!15 = !{!12, !13, i64 8}
!16 = !{!12, !13, i64 16}
!17 = !{!12, !6, i64 24}
!18 = !{!12, !14, i64 32}
!19 = !{!12, !10, i64 36}
!20 = !{!13, !13, i64 0}
!21 = !{i8 0, i8 2}
!22 = !{}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}


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

%"class.json11_internal_lightgbm::Json" = type { %"class.std::shared_ptr" }
%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<json11_internal_lightgbm::Json, std::allocator<json11_internal_lightgbm::Json>>::_Vector_impl" }
%"struct.std::_Vector_base<json11_internal_lightgbm::Json, std::allocator<json11_internal_lightgbm::Json>>::_Vector_impl" = type { %"struct.std::_Vector_base<json11_internal_lightgbm::Json, std::allocator<json11_internal_lightgbm::Json>>::_Vector_impl_data" }
%"struct.std::_Vector_base<json11_internal_lightgbm::Json, std::allocator<json11_internal_lightgbm::Json>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.json11_internal_lightgbm::(anonymous namespace)::JsonParser" = type { ptr, i64, i64, ptr, i8, i32 }

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 noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN24json11_internal_lightgbm12_GLOBAL__N_110JsonParser10parse_jsonEi(ptr dead_on_unwind noalias writable sret(%"class.json11_internal_lightgbm::Json") align 8, ptr noundef nonnull align 8 dereferenceable(40), i32 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN24json11_internal_lightgbm12_GLOBAL__N_110JsonParser15consume_garbageEv(ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #2 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN24json11_internal_lightgbm4Json11parse_multiERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPmPS6_NS_9JsonParseE(ptr dead_on_unwind noalias writable sret(%"class.std::vector") align 8 %0, ptr noundef nonnull align 8 dereferenceable(32) %1, ptr nocapture noundef writeonly %2, ptr noundef %3, i32 noundef %4) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %6 = alloca %"struct.json11_internal_lightgbm::(anonymous namespace)::JsonParser", align 8
  %7 = alloca %"class.json11_internal_lightgbm::Json", align 8
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %6) #4
  %8 = tail call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %1) #4
  store ptr %8, ptr %6, align 8, !tbaa !5
  %9 = getelementptr inbounds i8, ptr %6, i64 8
  %10 = tail call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %1) #4
  store i64 %10, ptr %9, align 8, !tbaa !13
  %11 = getelementptr inbounds i8, ptr %6, i64 16
  store i64 0, ptr %11, align 8, !tbaa !14
  %12 = getelementptr inbounds i8, ptr %6, i64 24
  store ptr %3, ptr %12, align 8, !tbaa !15
  %13 = getelementptr inbounds i8, ptr %6, i64 32
  store i8 0, ptr %13, align 8, !tbaa !16
  %14 = getelementptr inbounds i8, ptr %6, i64 36
  store i32 %4, ptr %14, align 4, !tbaa !17
  store i64 0, ptr %2, align 8, !tbaa !18
  tail call void @_ZNSt6vectorIN24json11_internal_lightgbm4JsonESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #4
  %15 = tail call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %1) #4
  %16 = icmp eq i64 %15, 0
  br i1 %16, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %5, %32
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #4
  invoke void @_ZN24json11_internal_lightgbm12_GLOBAL__N_110JsonParser10parse_jsonEi(ptr dead_on_unwind nonnull writable sret(%"class.json11_internal_lightgbm::Json") align 8 %7, ptr noundef nonnull align 8 dereferenceable(40) %6, i32 noundef 0)
          to label %17 unwind label %21

17:                                               ; preds = %.lr.ph
  invoke void @_ZNSt6vectorIN24json11_internal_lightgbm4JsonESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(16) %7)
          to label %18 unwind label %23

18:                                               ; preds = %17
  call void @_ZN24json11_internal_lightgbm4JsonD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %7) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #4
  %19 = load i8, ptr %13, align 8, !tbaa !16, !range !19, !noundef !20
  %20 = trunc nuw i8 %19 to i1
  br i1 %20, label %._crit_edge, label %26

21:                                               ; preds = %.lr.ph
  %22 = landingpad { ptr, i32 }
          cleanup
  br label %25

23:                                               ; preds = %17
  %24 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN24json11_internal_lightgbm4JsonD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %7) #4
  br label %25

25:                                               ; preds = %23, %21
  %.pn = phi { ptr, i32 } [ %24, %23 ], [ %22, %21 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #4
  br label %38

26:                                               ; preds = %18
  invoke void @_ZN24json11_internal_lightgbm12_GLOBAL__N_110JsonParser15consume_garbageEv(ptr noundef nonnull align 8 dereferenceable(40) %6)
          to label %27 unwind label %30

27:                                               ; preds = %26
  %28 = load i8, ptr %13, align 8, !tbaa !16, !range !19, !noundef !20
  %29 = trunc nuw i8 %28 to i1
  br i1 %29, label %._crit_edge, label %32

30:                                               ; preds = %26
  %31 = landingpad { ptr, i32 }
          cleanup
  br label %38

32:                                               ; preds = %27
  %33 = load i64, ptr %11, align 8, !tbaa !14
  store i64 %33, ptr %2, align 8, !tbaa !18
  %34 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %1) #4
  %35 = icmp eq i64 %33, %34
  %36 = load i8, ptr %13, align 8, !range !19
  %37 = trunc nuw i8 %36 to i1
  %.not11 = select i1 %35, i1 true, i1 %37
  br i1 %.not11, label %._crit_edge, label %.lr.ph, !llvm.loop !21

._crit_edge:                                      ; preds = %27, %18, %32, %5
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %6) #4
  ret void

38:                                               ; preds = %30, %25
  %.pn13 = phi { ptr, i32 } [ %31, %30 ], [ %.pn, %25 ]
  call void @_ZNSt6vectorIN24json11_internal_lightgbm4JsonESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %6) #4
  resume { ptr, i32 } %.pn13
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIN24json11_internal_lightgbm4JsonESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #2 align 2

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

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 = { 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 #4 = { 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, !7, i64 0}
!6 = !{!"_ZTSN24json11_internal_lightgbm12_GLOBAL__N_110JsonParserE", !7, i64 0, !10, i64 8, !10, i64 16, !7, i64 24, !11, i64 32, !12, i64 36}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"long", !8, i64 0}
!11 = !{!"bool", !8, i64 0}
!12 = !{!"_ZTSN24json11_internal_lightgbm9JsonParseE", !8, i64 0}
!13 = !{!6, !10, i64 8}
!14 = !{!6, !10, i64 16}
!15 = !{!6, !7, i64 24}
!16 = !{!6, !11, i64 32}
!17 = !{!6, !12, i64 36}
!18 = !{!10, !10, i64 0}
!19 = !{i8 0, i8 2}
!20 = !{}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass