; LLVM IR from p4lang/p4c :: backends/tofino/bf-asm/bson.ll (ZN4jsonrsERSiNS_9bson_wrapINS_6vectorEEE)

; 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::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"struct.json::bson_wrap" = type { ptr }
%"class.std::fpos" = type { i64, %struct.__mbstate_t }
%struct.__mbstate_t = type { i32, %union.anon }
%union.anon = type { i32 }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon.3 }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon.3 = type { i64, [8 x i8] }
%"class.json::map" = type { %"class.json::obj", %"class.P4::ordered_map" }
%"class.json::obj" = type { ptr }
%"class.P4::ordered_map" = type { %"class.std::__cxx11::list", %"class.std::map" }
%"class.std::__cxx11::list" = type { %"class.std::__cxx11::_List_base" }
%"class.std::__cxx11::_List_base" = type { %"struct.std::__cxx11::_List_base<std::pair<json::obj *const, std::unique_ptr<json::obj>>, std::allocator<std::pair<json::obj *const, std::unique_ptr<json::obj>>>>::_List_impl" }
%"struct.std::__cxx11::_List_base<std::pair<json::obj *const, std::unique_ptr<json::obj>>, std::allocator<std::pair<json::obj *const, std::unique_ptr<json::obj>>>>::_List_impl" = type { %"struct.std::__detail::_List_node_header" }
%"struct.std::__detail::_List_node_header" = type { %"struct.std::__detail::_List_node_base", i64 }
%"struct.std::__detail::_List_node_base" = type { ptr, ptr }
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<json::obj *const *, std::pair<json::obj *const *const, std::_List_iterator<std::pair<json::obj *const, std::unique_ptr<json::obj>>>>, std::_Select1st<std::pair<json::obj *const *const, std::_List_iterator<std::pair<json::obj *const, std::unique_ptr<json::obj>>>>>, P4::ordered_map<json::obj *, std::unique_ptr<json::obj>, json::obj::ptrless>::mapcmp>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<json::obj *const *, std::pair<json::obj *const *const, std::_List_iterator<std::pair<json::obj *const, std::unique_ptr<json::obj>>>>, std::_Select1st<std::pair<json::obj *const *const, std::_List_iterator<std::pair<json::obj *const, std::unique_ptr<json::obj>>>>>, P4::ordered_map<json::obj *, std::unique_ptr<json::obj>, json::obj::ptrless>::mapcmp>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"struct.json::bson_wrap.10" = type { ptr }
%"class.json::vector" = type { %"class.json::obj", %"class.std::vector" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::unique_ptr<json::obj>, std::allocator<std::unique_ptr<json::obj>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::unique_ptr<json::obj>, std::allocator<std::unique_ptr<json::obj>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::unique_ptr<json::obj>, std::allocator<std::unique_ptr<json::obj>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::unique_ptr<json::obj>, std::allocator<std::unique_ptr<json::obj>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.P4::hex" = type <{ i64, i32, i8, [3 x i8] }>

@_ZSt4cerr = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [16 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [28 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZN4jsonrsERSiNS_9bson_wrapINS_6vectorEEE(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr %1) #0 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"struct.json::bson_wrap", align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i64, align 8
  %7 = alloca %"class.std::fpos", align 8
  %8 = alloca i64, align 8
  %9 = alloca i8, align 1
  %10 = alloca i32, align 4
  %11 = alloca %"class.std::fpos", align 8
  %12 = alloca %"class.std::__cxx11::basic_string", align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca %"class.std::__cxx11::basic_string", align 8
  %16 = alloca i32, align 4
  %17 = alloca %"class.std::__cxx11::basic_string", align 8
  %18 = alloca %"class.json::map", align 8
  %19 = alloca %"struct.json::bson_wrap.10", align 8
  %20 = alloca %"class.json::vector", align 8
  %21 = alloca %"struct.json::bson_wrap", align 8
  %22 = alloca %"class.P4::hex", align 8
  %23 = alloca %"class.std::fpos", align 8
  %24 = getelementptr inbounds %"struct.json::bson_wrap", ptr %3, i32 0, i32 0
  store ptr %1, ptr %24, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  %25 = getelementptr inbounds %"struct.json::bson_wrap", ptr %3, i32 0, i32 0
  %26 = load ptr, ptr %25, align 8, !tbaa !9
  store ptr %26, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %7) #6
  %27 = load ptr, ptr %4, align 8, !tbaa !5
  %28 = call { i64, i64 } @_ZNSi5tellgEv(ptr noundef nonnull align 8 dereferenceable(16) %27)
  %29 = getelementptr inbounds { i64, i64 }, ptr %7, i32 0, i32 0
  %30 = extractvalue { i64, i64 } %28, 0
  store i64 %30, ptr %29, align 8
  %31 = getelementptr inbounds { i64, i64 }, ptr %7, i32 0, i32 1
  %32 = extractvalue { i64, i64 } %28, 1
  store i64 %32, ptr %31, align 8
  %33 = call noundef i64 @_ZNKSt4fposI11__mbstate_tEcvlEv(ptr noundef nonnull align 8 dereferenceable(16) %7)
  call void @llvm.lifetime.end.p0(i64 16, ptr %7) #6
  store i64 %33, ptr %6, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %34 = load i64, ptr %6, align 8, !tbaa !11
  %35 = load ptr, ptr %4, align 8, !tbaa !5
  %36 = call noundef i32 @_ZN12_GLOBAL__N_15get32ERSi(ptr noundef nonnull align 8 dereferenceable(16) %35)
  %37 = sext i32 %36 to i64
  %38 = add nsw i64 %34, %37
  store i64 %38, ptr %8, align 8, !tbaa !11
  %39 = load ptr, ptr %5, align 8, !tbaa !5
  %40 = getelementptr inbounds i8, ptr %39, i64 8
  call void @_ZNSt6vectorISt10unique_ptrIN4json3objESt14default_deleteIS2_EESaIS5_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %40) #6
  br label %41

41:                                               ; preds = %239, %2
  call void @llvm.lifetime.start.p0(i64 1, ptr %9) #6
  %42 = load ptr, ptr %4, align 8, !tbaa !5
  %43 = call noundef zeroext i8 @_ZN12_GLOBAL__N_14get8ERSi(ptr noundef nonnull align 8 dereferenceable(16) %42)
  store i8 %43, ptr %9, align 1, !tbaa !13
  %44 = load i8, ptr %9, align 1, !tbaa !13
  %45 = icmp ne i8 %44, 0
  br i1 %45, label %47, label %46

46:                                               ; preds = %41
  store i32 3, ptr %10, align 4
  br label %237

47:                                               ; preds = %41
  %48 = load ptr, ptr %4, align 8, !tbaa !5
  %49 = load ptr, ptr %48, align 8, !tbaa !14
  %50 = getelementptr i8, ptr %49, i64 -24
  %51 = load i64, ptr %50, align 8
  %52 = getelementptr inbounds i8, ptr %48, i64 %51
  %53 = call noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEntEv(ptr noundef nonnull align 8 dereferenceable(264) %52)
  br i1 %53, label %54, label %55

54:                                               ; preds = %47
  store i32 3, ptr %10, align 4
  br label %237

55:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #6
  %56 = load ptr, ptr %4, align 8, !tbaa !5
  %57 = call { i64, i64 } @_ZNSi5tellgEv(ptr noundef nonnull align 8 dereferenceable(16) %56)
  %58 = getelementptr inbounds { i64, i64 }, ptr %11, i32 0, i32 0
  %59 = extractvalue { i64, i64 } %57, 0
  store i64 %59, ptr %58, align 8
  %60 = getelementptr inbounds { i64, i64 }, ptr %11, i32 0, i32 1
  %61 = extractvalue { i64, i64 } %57, 1
  store i64 %61, ptr %60, align 8
  %62 = call noundef i64 @_ZNKSt4fposI11__mbstate_tEcvlEv(ptr noundef nonnull align 8 dereferenceable(16) %11)
  %63 = load i64, ptr %8, align 8, !tbaa !11
  %64 = icmp sge i64 %62, %63
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #6
  br i1 %64, label %65, label %73

65:                                               ; preds = %55
  %66 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str)
  %67 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %66, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %68 = load ptr, ptr %4, align 8, !tbaa !5
  %69 = load ptr, ptr %68, align 8, !tbaa !14
  %70 = getelementptr i8, ptr %69, i64 -24
  %71 = load i64, ptr %70, align 8
  %72 = getelementptr inbounds i8, ptr %68, i64 %71
  call void @_ZNSt9basic_iosIcSt11char_traitsIcEE8setstateESt12_Ios_Iostate(ptr noundef nonnull align 8 dereferenceable(264) %72, i32 noundef 4)
  store i32 3, ptr %10, align 4
  br label %237

73:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 32, ptr %12) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #6
  %74 = load ptr, ptr %4, align 8, !tbaa !5
  %75 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EES4_(ptr noundef nonnull align 8 dereferenceable(16) %74, ptr noundef nonnull align 8 dereferenceable(32) %12, i8 noundef signext 0)
          to label %76 unwind label %87

76:                                               ; preds = %73
  call void @llvm.lifetime.start.p0(i64 32, ptr %15) #6
  %77 = load ptr, ptr %5, align 8, !tbaa !5
  %78 = getelementptr inbounds i8, ptr %77, i64 8
  %79 = call noundef i64 @_ZNKSt6vectorISt10unique_ptrIN4json3objESt14default_deleteIS2_EESaIS5_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %78) #6
  invoke void @_ZNSt7__cxx119to_stringEm(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %15, i64 noundef %79)
          to label %80 unwind label %91

80:                                               ; preds = %76
  %81 = call noundef zeroext i1 @_ZStneIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EESA_(ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef nonnull align 8 dereferenceable(32) %15) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #6
  br i1 %81, label %82, label %95

82:                                               ; preds = %80
  %83 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str.1)
          to label %84 unwind label %87

84:                                               ; preds = %82
  %85 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %83, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %86 unwind label %87

86:                                               ; preds = %84
  br label %95

87:                                               ; preds = %222, %219, %215, %213, %209, %206, %198, %196, %194, %191, %188, %183, %84, %82, %73
  %88 = landingpad { ptr, i32 }
          cleanup
  %89 = extractvalue { ptr, i32 } %88, 0
  store ptr %89, ptr %13, align 8
  %90 = extractvalue { ptr, i32 } %88, 1
  store i32 %90, ptr %14, align 4
  br label %240

91:                                               ; preds = %76
  %92 = landingpad { ptr, i32 }
          cleanup
  %93 = extractvalue { ptr, i32 } %92, 0
  store ptr %93, ptr %13, align 8
  %94 = extractvalue { ptr, i32 } %92, 1
  store i32 %94, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #6
  br label %240

95:                                               ; preds = %86, %80
  %96 = load i8, ptr %9, align 1, !tbaa !13
  %97 = zext i8 %96 to i32
  switch i32 %97, label %222 [
    i32 2, label %98
    i32 3, label %141
    i32 4, label %162
    i32 8, label %183
    i32 10, label %206
    i32 16, label %209
    i32 18, label %215
    i32 127, label %221
    i32 255, label %221
  ]

98:                                               ; preds = %95
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  %99 = load ptr, ptr %4, align 8, !tbaa !5
  %100 = invoke noundef i32 @_ZN12_GLOBAL__N_15get32ERSi(ptr noundef nonnull align 8 dereferenceable(16) %99)
          to label %101 unwind label %131

101:                                              ; preds = %98
  %102 = sub nsw i32 %100, 1
  store i32 %102, ptr %16, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 32, ptr %17) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #6
  %103 = load i32, ptr %16, align 4, !tbaa !16
  %104 = zext i32 %103 to i64
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(32) %17, i64 noundef %104)
          to label %105 unwind label %135

105:                                              ; preds = %101
  %106 = load ptr, ptr %4, align 8, !tbaa !5
  %107 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %17, i64 noundef 0)
          to label %108 unwind label %135

108:                                              ; preds = %105
  %109 = load i32, ptr %16, align 4, !tbaa !16
  %110 = zext i32 %109 to i64
  %111 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi4readEPcl(ptr noundef nonnull align 8 dereferenceable(16) %106, ptr noundef %107, i64 noundef %110)
          to label %112 unwind label %135

112:                                              ; preds = %108
  %113 = load ptr, ptr %5, align 8, !tbaa !5
  %114 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %17) #6
  invoke void @_ZN4json6vector9push_backEPKc(ptr noundef nonnull align 8 dereferenceable(32) %113, ptr noundef %114)
          to label %115 unwind label %135

115:                                              ; preds = %112
  %116 = load ptr, ptr %4, align 8, !tbaa !5
  %117 = invoke noundef i32 @_ZNSi3getEv(ptr noundef nonnull align 8 dereferenceable(16) %116)
          to label %118 unwind label %135

118:                                              ; preds = %115
  %119 = icmp ne i32 %117, 0
  br i1 %119, label %120, label %139

120:                                              ; preds = %118
  %121 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str.2)
          to label %122 unwind label %135

122:                                              ; preds = %120
  %123 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %121, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %124 unwind label %135

124:                                              ; preds = %122
  %125 = load ptr, ptr %4, align 8, !tbaa !5
  %126 = load ptr, ptr %125, align 8, !tbaa !14
  %127 = getelementptr i8, ptr %126, i64 -24
  %128 = load i64, ptr %127, align 8
  %129 = getelementptr inbounds i8, ptr %125, i64 %128
  invoke void @_ZNSt9basic_iosIcSt11char_traitsIcEE8setstateESt12_Ios_Iostate(ptr noundef nonnull align 8 dereferenceable(264) %129, i32 noundef 4)
          to label %130 unwind label %135

130:                                              ; preds = %124
  br label %139

131:                                              ; preds = %98
  %132 = landingpad { ptr, i32 }
          cleanup
  %133 = extractvalue { ptr, i32 } %132, 0
  store ptr %133, ptr %13, align 8
  %134 = extractvalue { ptr, i32 } %132, 1
  store i32 %134, ptr %14, align 4
  br label %140

135:                                              ; preds = %124, %122, %120, %115, %112, %108, %105, %101
  %136 = landingpad { ptr, i32 }
          cleanup
  %137 = extractvalue { ptr, i32 } %136, 0
  store ptr %137, ptr %13, align 8
  %138 = extractvalue { ptr, i32 } %136, 1
  store i32 %138, ptr %14, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #6
  br label %140

139:                                              ; preds = %130, %118
  store i32 4, ptr %10, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  br label %236

140:                                              ; preds = %135, %131
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  br label %240

141:                                              ; preds = %95
  call void @llvm.lifetime.start.p0(i64 80, ptr %18) #6
  invoke void @_ZN4json3mapC2Ev(ptr noundef nonnull align 8 dereferenceable(80) %18)
          to label %142 unwind label %153

142:                                              ; preds = %141
  %143 = load ptr, ptr %4, align 8, !tbaa !5
  %144 = invoke ptr @_ZN4json6binaryINS_3mapEEENS_9bson_wrapIT_EERS3_(ptr noundef nonnull align 8 dereferenceable(80) %18)
          to label %145 unwind label %157

145:                                              ; preds = %142
  %146 = getelementptr inbounds %"struct.json::bson_wrap.10", ptr %19, i32 0, i32 0
  store ptr %144, ptr %146, align 8
  %147 = getelementptr inbounds %"struct.json::bson_wrap.10", ptr %19, i32 0, i32 0
  %148 = load ptr, ptr %147, align 8
  %149 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN4jsonrsERSiNS_9bson_wrapINS_3mapEEE(ptr noundef nonnull align 8 dereferenceable(16) %143, ptr %148)
          to label %150 unwind label %157

150:                                              ; preds = %145
  %151 = load ptr, ptr %5, align 8, !tbaa !5
  invoke void @_ZN4json6vector9push_backEONS_3mapE(ptr noundef nonnull align 8 dereferenceable(32) %151, ptr noundef nonnull align 8 dereferenceable(80) %18)
          to label %152 unwind label %157

152:                                              ; preds = %150
  store i32 4, ptr %10, align 4
  call void @_ZN4json3mapD2Ev(ptr noundef nonnull align 8 dereferenceable(80) %18) #6
  call void @llvm.lifetime.end.p0(i64 80, ptr %18) #6
  br label %236

153:                                              ; preds = %141
  %154 = landingpad { ptr, i32 }
          cleanup
  %155 = extractvalue { ptr, i32 } %154, 0
  store ptr %155, ptr %13, align 8
  %156 = extractvalue { ptr, i32 } %154, 1
  store i32 %156, ptr %14, align 4
  br label %161

157:                                              ; preds = %150, %145, %142
  %158 = landingpad { ptr, i32 }
          cleanup
  %159 = extractvalue { ptr, i32 } %158, 0
  store ptr %159, ptr %13, align 8
  %160 = extractvalue { ptr, i32 } %158, 1
  store i32 %160, ptr %14, align 4
  call void @_ZN4json3mapD2Ev(ptr noundef nonnull align 8 dereferenceable(80) %18) #6
  br label %161

161:                                              ; preds = %157, %153
  call void @llvm.lifetime.end.p0(i64 80, ptr %18) #6
  br label %240

162:                                              ; preds = %95
  call void @llvm.lifetime.start.p0(i64 32, ptr %20) #6
  invoke void @_ZN4json6vectorC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20)
          to label %163 unwind label %174

163:                                              ; preds = %162
  %164 = load ptr, ptr %4, align 8, !tbaa !5
  %165 = invoke ptr @_ZN4json6binaryINS_6vectorEEENS_9bson_wrapIT_EERS3_(ptr noundef nonnull align 8 dereferenceable(32) %20)
          to label %166 unwind label %178

166:                                              ; preds = %163
  %167 = getelementptr inbounds %"struct.json::bson_wrap", ptr %21, i32 0, i32 0
  store ptr %165, ptr %167, align 8
  %168 = getelementptr inbounds %"struct.json::bson_wrap", ptr %21, i32 0, i32 0
  %169 = load ptr, ptr %168, align 8
  %170 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN4jsonrsERSiNS_9bson_wrapINS_6vectorEEE(ptr noundef nonnull align 8 dereferenceable(16) %164, ptr %169)
          to label %171 unwind label %178

171:                                              ; preds = %166
  %172 = load ptr, ptr %5, align 8, !tbaa !5
  invoke void @_ZN4json6vector9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(32) %172, ptr noundef nonnull align 8 dereferenceable(32) %20)
          to label %173 unwind label %178

173:                                              ; preds = %171
  store i32 4, ptr %10, align 4
  call void @_ZN4json6vectorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %20) #6
  br label %236

174:                                              ; preds = %162
  %175 = landingpad { ptr, i32 }
          cleanup
  %176 = extractvalue { ptr, i32 } %175, 0
  store ptr %176, ptr %13, align 8
  %177 = extractvalue { ptr, i32 } %175, 1
  store i32 %177, ptr %14, align 4
  br label %182

178:                                              ; preds = %171, %166, %163
  %179 = landingpad { ptr, i32 }
          cleanup
  %180 = extractvalue { ptr, i32 } %179, 0
  store ptr %180, ptr %13, align 8
  %181 = extractvalue { ptr, i32 } %179, 1
  store i32 %181, ptr %14, align 4
  call void @_ZN4json6vectorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #6
  br label %182

182:                                              ; preds = %178, %174
  call void @llvm.lifetime.end.p0(i64 32, ptr %20) #6
  br label %240

183:                                              ; preds = %95
  %184 = load ptr, ptr %4, align 8, !tbaa !5
  %185 = invoke noundef zeroext i8 @_ZN12_GLOBAL__N_14get8ERSi(ptr noundef nonnull align 8 dereferenceable(16) %184)
          to label %186 unwind label %87

186:                                              ; preds = %183
  %187 = zext i8 %185 to i32
  switch i32 %187, label %194 [
    i32 0, label %188
    i32 1, label %191
  ]

188:                                              ; preds = %186
  %189 = load ptr, ptr %5, align 8, !tbaa !5
  invoke void @_ZN4json6vector9push_backEb(ptr noundef nonnull align 8 dereferenceable(32) %189, i1 noundef zeroext false)
          to label %190 unwind label %87

190:                                              ; preds = %188
  br label %205

191:                                              ; preds = %186
  %192 = load ptr, ptr %5, align 8, !tbaa !5
  invoke void @_ZN4json6vector9push_backEb(ptr noundef nonnull align 8 dereferenceable(32) %192, i1 noundef zeroext true)
          to label %193 unwind label %87

193:                                              ; preds = %191
  br label %205

194:                                              ; preds = %186
  %195 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str.3)
          to label %196 unwind label %87

196:                                              ; preds = %194
  %197 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %195, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %198 unwind label %87

198:                                              ; preds = %196
  %199 = load ptr, ptr %4, align 8, !tbaa !5
  %200 = load ptr, ptr %199, align 8, !tbaa !14
  %201 = getelementptr i8, ptr %200, i64 -24
  %202 = load i64, ptr %201, align 8
  %203 = getelementptr inbounds i8, ptr %199, i64 %202
  invoke void @_ZNSt9basic_iosIcSt11char_traitsIcEE8setstateESt12_Ios_Iostate(ptr noundef nonnull align 8 dereferenceable(264) %203, i32 noundef 4)
          to label %204 unwind label %87

204:                                              ; preds = %198
  br label %205

205:                                              ; preds = %204, %193, %190
  br label %236

206:                                              ; preds = %95
  %207 = load ptr, ptr %5, align 8, !tbaa !5
  invoke void @_ZN4json6vector9push_backEDn(ptr noundef nonnull align 8 dereferenceable(32) %207, ptr null)
          to label %208 unwind label %87

208:                                              ; preds = %206
  br label %236

209:                                              ; preds = %95
  %210 = load ptr, ptr %5, align 8, !tbaa !5
  %211 = load ptr, ptr %4, align 8, !tbaa !5
  %212 = invoke noundef i32 @_ZN12_GLOBAL__N_15get32ERSi(ptr noundef nonnull align 8 dereferenceable(16) %211)
          to label %213 unwind label %87

213:                                              ; preds = %209
  invoke void @_ZN4json6vector9push_backEi(ptr noundef nonnull align 8 dereferenceable(32) %210, i32 noundef %212)
          to label %214 unwind label %87

214:                                              ; preds = %213
  br label %236

215:                                              ; preds = %95
  %216 = load ptr, ptr %5, align 8, !tbaa !5
  %217 = load ptr, ptr %4, align 8, !tbaa !5
  %218 = invoke noundef i64 @_ZN12_GLOBAL__N_15get64ERSi(ptr noundef nonnull align 8 dereferenceable(16) %217)
          to label %219 unwind label %87

219:                                              ; preds = %215
  invoke void @_ZN4json6vector9push_backEl(ptr noundef nonnull align 8 dereferenceable(32) %216, i64 noundef %218)
          to label %220 unwind label %87

220:                                              ; preds = %219
  br label %236

221:                                              ; preds = %95, %95
  br label %236

222:                                              ; preds = %95
  %223 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str.4)
          to label %224 unwind label %87

224:                                              ; preds = %222
  call void @llvm.lifetime.start.p0(i64 16, ptr %22) #6
  %225 = load i8, ptr %9, align 1, !tbaa !13
  %226 = zext i8 %225 to i64
  invoke void @_ZN2P43hexC2Elic(ptr noundef nonnull align 8 dereferenceable(13) %22, i64 noundef %226, i32 noundef 0, i8 noundef signext 32)
          to label %227 unwind label %232

227:                                              ; preds = %224
  %228 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN2P4lsERSoRKNS_3hexE(ptr noundef nonnull align 8 dereferenceable(8) %223, ptr noundef nonnull align 8 dereferenceable(13) %22)
          to label %229 unwind label %232

229:                                              ; preds = %227
  %230 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %228, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %231 unwind label %232

231:                                              ; preds = %229
  call void @llvm.lifetime.end.p0(i64 16, ptr %22) #6
  br label %236

232:                                              ; preds = %229, %227, %224
  %233 = landingpad { ptr, i32 }
          cleanup
  %234 = extractvalue { ptr, i32 } %233, 0
  store ptr %234, ptr %13, align 8
  %235 = extractvalue { ptr, i32 } %233, 1
  store i32 %235, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %22) #6
  br label %240

236:                                              ; preds = %231, %221, %220, %214, %208, %205, %173, %152, %139
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #6
  store i32 0, ptr %10, align 4
  br label %237

237:                                              ; preds = %236, %65, %54, %46
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #6
  %238 = load i32, ptr %10, align 4
  switch i32 %238, label %273 [
    i32 0, label %239
    i32 3, label %241
  ]

239:                                              ; preds = %237
  br label %41, !llvm.loop !18

240:                                              ; preds = %232, %182, %161, %140, %91, %87
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  br label %268

241:                                              ; preds = %237
  %242 = load i64, ptr %6, align 8, !tbaa !11
  %243 = icmp ne i64 %242, -1
  call void @llvm.lifetime.start.p0(i64 16, ptr %23) #6
  br i1 %243, label %244, label %261

244:                                              ; preds = %241
  %245 = load ptr, ptr %4, align 8, !tbaa !5
  %246 = load ptr, ptr %245, align 8, !tbaa !14
  %247 = getelementptr i8, ptr %246, i64 -24
  %248 = load i64, ptr %247, align 8
  %249 = getelementptr inbounds i8, ptr %245, i64 %248
  %250 = call noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEcvbEv(ptr noundef nonnull align 8 dereferenceable(264) %249)
  br i1 %250, label %251, label %261

251:                                              ; preds = %244
  %252 = load ptr, ptr %4, align 8, !tbaa !5
  %253 = call { i64, i64 } @_ZNSi5tellgEv(ptr noundef nonnull align 8 dereferenceable(16) %252)
  %254 = getelementptr inbounds { i64, i64 }, ptr %23, i32 0, i32 0
  %255 = extractvalue { i64, i64 } %253, 0
  store i64 %255, ptr %254, align 8
  %256 = getelementptr inbounds { i64, i64 }, ptr %23, i32 0, i32 1
  %257 = extractvalue { i64, i64 } %253, 1
  store i64 %257, ptr %256, align 8
  %258 = call noundef i64 @_ZNKSt4fposI11__mbstate_tEcvlEv(ptr noundef nonnull align 8 dereferenceable(16) %23)
  %259 = load i64, ptr %8, align 8, !tbaa !11
  %260 = icmp ne i64 %258, %259
  br label %261

261:                                              ; preds = %251, %244, %241
  %262 = phi i1 [ false, %244 ], [ false, %241 ], [ %260, %251 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #6
  br i1 %262, label %263, label %266

263:                                              ; preds = %261
  %264 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str.5)
  %265 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %264, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %266

266:                                              ; preds = %263, %261
  %267 = load ptr, ptr %4, align 8, !tbaa !5
  store i32 1, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  ret ptr %267

268:                                              ; preds = %240
  %269 = load ptr, ptr %13, align 8
  %270 = load i32, ptr %14, align 4
  %271 = insertvalue { ptr, i32 } poison, ptr %269, 0
  %272 = insertvalue { ptr, i32 } %271, i32 %270, 1
  resume { ptr, i32 } %272

273:                                              ; preds = %237
  unreachable
}

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

declare { i64, i64 } @_ZNSi5tellgEv(ptr noundef nonnull align 8 dereferenceable(16)) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt4fposI11__mbstate_tEcvlEv(ptr noundef nonnull align 8 dereferenceable(16)) #3 align 2

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

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZN12_GLOBAL__N_15get32ERSi(ptr noundef nonnull align 8 dereferenceable(16)) #0

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

; Function Attrs: mustprogress uwtable
declare hidden noundef zeroext i8 @_ZN12_GLOBAL__N_14get8ERSi(ptr noundef nonnull align 8 dereferenceable(16)) #0

; Function Attrs: mustprogress uwtable
declare noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEntEv(ptr noundef nonnull align 8 dereferenceable(264)) #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #4

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #4

; Function Attrs: mustprogress uwtable
declare void @_ZNSt9basic_iosIcSt11char_traitsIcEE8setstateESt12_Ios_Iostate(ptr noundef nonnull align 8 dereferenceable(264), i32 noundef) #0 align 2

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EES4_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32), i8 noundef signext) #2

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNSt7__cxx119to_stringEm(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, i64 noundef) #4

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

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

; Function Attrs: mustprogress uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) #0 align 2

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

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

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

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

declare noundef i32 @_ZNSi3getEv(ptr noundef nonnull align 8 dereferenceable(16)) #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4json3mapC2Ev(ptr noundef nonnull align 8 dereferenceable(80)) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZN4jsonrsERSiNS_9bson_wrapINS_3mapEEE(ptr noundef nonnull align 8 dereferenceable(16), ptr) #0

; Function Attrs: mustprogress uwtable
declare dso_local ptr @_ZN4json6binaryINS_3mapEEENS_9bson_wrapIT_EERS3_(ptr noundef nonnull align 8 dereferenceable(80)) #0

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN4json6vector9push_backEONS_3mapE(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(80)) #4 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local ptr @_ZN4json6binaryINS_6vectorEEENS_9bson_wrapIT_EERS3_(ptr noundef nonnull align 8 dereferenceable(32)) #0

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4json6vector9push_backEb(ptr noundef nonnull align 8 dereferenceable(32), i1 noundef zeroext) #0 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4json6vector9push_backEi(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4json6vector9push_backEl(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) #0 align 2

; Function Attrs: mustprogress uwtable
declare hidden noundef i64 @_ZN12_GLOBAL__N_15get64ERSi(ptr noundef nonnull align 8 dereferenceable(16)) #0

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN2P4lsERSoRKNS_3hexE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(13)) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN2P43hexC2Elic(ptr noundef nonnull align 8 dereferenceable(13), i64 noundef, i32 noundef, i8 noundef signext) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEcvbEv(ptr noundef nonnull align 8 dereferenceable(264)) #0 align 2

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

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 0}
!10 = !{!"_ZTSN4json9bson_wrapINS_6vectorEEE", !6, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!7, !7, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"vtable pointer", !8, i64 0}
!16 = !{!17, !17, i64 0}
!17 = !{!"int", !7, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}


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

%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::fpos" = type { i64, %struct.__mbstate_t }
%struct.__mbstate_t = type { i32, %union.anon }
%union.anon = type { i32 }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon.3 }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon.3 = type { i64, [8 x i8] }
%"class.json::map" = type { %"class.json::obj", %"class.P4::ordered_map" }
%"class.json::obj" = type { ptr }
%"class.P4::ordered_map" = type { %"class.std::__cxx11::list", %"class.std::map" }
%"class.std::__cxx11::list" = type { %"class.std::__cxx11::_List_base" }
%"class.std::__cxx11::_List_base" = type { %"struct.std::__cxx11::_List_base<std::pair<json::obj *const, std::unique_ptr<json::obj>>, std::allocator<std::pair<json::obj *const, std::unique_ptr<json::obj>>>>::_List_impl" }
%"struct.std::__cxx11::_List_base<std::pair<json::obj *const, std::unique_ptr<json::obj>>, std::allocator<std::pair<json::obj *const, std::unique_ptr<json::obj>>>>::_List_impl" = type { %"struct.std::__detail::_List_node_header" }
%"struct.std::__detail::_List_node_header" = type { %"struct.std::__detail::_List_node_base", i64 }
%"struct.std::__detail::_List_node_base" = type { ptr, ptr }
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<json::obj *const *, std::pair<json::obj *const *const, std::_List_iterator<std::pair<json::obj *const, std::unique_ptr<json::obj>>>>, std::_Select1st<std::pair<json::obj *const *const, std::_List_iterator<std::pair<json::obj *const, std::unique_ptr<json::obj>>>>>, P4::ordered_map<json::obj *, std::unique_ptr<json::obj>, json::obj::ptrless>::mapcmp>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<json::obj *const *, std::pair<json::obj *const *const, std::_List_iterator<std::pair<json::obj *const, std::unique_ptr<json::obj>>>>, std::_Select1st<std::pair<json::obj *const *const, std::_List_iterator<std::pair<json::obj *const, std::unique_ptr<json::obj>>>>>, P4::ordered_map<json::obj *, std::unique_ptr<json::obj>, json::obj::ptrless>::mapcmp>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.json::vector" = type { %"class.json::obj", %"class.std::vector" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::unique_ptr<json::obj>, std::allocator<std::unique_ptr<json::obj>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::unique_ptr<json::obj>, std::allocator<std::unique_ptr<json::obj>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::unique_ptr<json::obj>, std::allocator<std::unique_ptr<json::obj>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::unique_ptr<json::obj>, std::allocator<std::unique_ptr<json::obj>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.P4::hex" = type <{ i64, i32, i8, [3 x i8] }>

@_ZSt4cerr = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [16 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [28 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZN4jsonrsERSiNS_9bson_wrapINS_6vectorEEE(ptr noundef nonnull returned align 8 dereferenceable(16) %0, ptr %1) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.std::fpos", align 8
  %4 = alloca %"class.std::fpos", align 8
  %5 = alloca %"class.std::__cxx11::basic_string", align 8
  %6 = alloca %"class.std::__cxx11::basic_string", align 8
  %7 = alloca %"class.std::__cxx11::basic_string", align 8
  %8 = alloca %"class.json::map", align 8
  %9 = alloca %"class.json::vector", align 8
  %10 = alloca %"class.P4::hex", align 8
  %11 = alloca %"class.std::fpos", align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #6
  %12 = tail call { i64, i64 } @_ZNSi5tellgEv(ptr noundef nonnull align 8 dereferenceable(16) %0)
  %13 = extractvalue { i64, i64 } %12, 0
  store i64 %13, ptr %3, align 8
  %14 = getelementptr inbounds i8, ptr %3, i64 8
  %15 = extractvalue { i64, i64 } %12, 1
  store i64 %15, ptr %14, align 8
  %16 = call noundef i64 @_ZNKSt4fposI11__mbstate_tEcvlEv(ptr noundef nonnull align 8 dereferenceable(16) %3)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #6
  %17 = call noundef i32 @_ZN12_GLOBAL__N_15get32ERSi(ptr noundef nonnull align 8 dereferenceable(16) %0)
  %18 = sext i32 %17 to i64
  %19 = add nsw i64 %16, %18
  %20 = getelementptr inbounds i8, ptr %1, i64 8
  call void @_ZNSt6vectorISt10unique_ptrIN4json3objESt14default_deleteIS2_EESaIS5_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %20) #6
  %21 = call noundef zeroext i8 @_ZN12_GLOBAL__N_14get8ERSi(ptr noundef nonnull align 8 dereferenceable(16) %0)
  %.not59 = icmp eq i8 %21, 0
  br i1 %.not59, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %2
  %22 = getelementptr inbounds i8, ptr %4, i64 8
  br label %23

23:                                               ; preds = %.lr.ph, %135
  %24 = phi i8 [ %21, %.lr.ph ], [ %136, %135 ]
  %25 = load ptr, ptr %0, align 8, !tbaa !5
  %26 = getelementptr i8, ptr %25, i64 -24
  %27 = load i64, ptr %26, align 8
  %28 = getelementptr inbounds i8, ptr %0, i64 %27
  %29 = call noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEntEv(ptr noundef nonnull align 8 dereferenceable(264) %28)
  br i1 %29, label %.loopexit, label %30

30:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #6
  %31 = call { i64, i64 } @_ZNSi5tellgEv(ptr noundef nonnull align 8 dereferenceable(16) %0)
  %32 = extractvalue { i64, i64 } %31, 0
  store i64 %32, ptr %4, align 8
  %33 = extractvalue { i64, i64 } %31, 1
  store i64 %33, ptr %22, align 8
  %34 = call noundef i64 @_ZNKSt4fposI11__mbstate_tEcvlEv(ptr noundef nonnull align 8 dereferenceable(16) %4)
  %.not48 = icmp slt i64 %34, %19
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #6
  br i1 %.not48, label %42, label %35

35:                                               ; preds = %30
  %36 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef nonnull @.str)
  %37 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %36, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %38 = load ptr, ptr %0, align 8, !tbaa !5
  %39 = getelementptr i8, ptr %38, i64 -24
  %40 = load i64, ptr %39, align 8
  %41 = getelementptr inbounds i8, ptr %0, i64 %40
  call void @_ZNSt9basic_iosIcSt11char_traitsIcEE8setstateESt12_Ios_Iostate(ptr noundef nonnull align 8 dereferenceable(264) %41, i32 noundef 4)
  br label %.loopexit

42:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #6
  %43 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EES4_(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef nonnull align 8 dereferenceable(32) %5, i8 noundef signext 0)
          to label %44 unwind label %52

44:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #6
  %45 = call noundef i64 @_ZNKSt6vectorISt10unique_ptrIN4json3objESt14default_deleteIS2_EESaIS5_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %20) #6
  invoke void @_ZNSt7__cxx119to_stringEm(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %6, i64 noundef %45)
          to label %46 unwind label %54

46:                                               ; preds = %44
  %47 = call noundef zeroext i1 @_ZStneIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EESA_(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull align 8 dereferenceable(32) %6) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #6
  br i1 %47, label %48, label %56

48:                                               ; preds = %46
  %49 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef nonnull @.str.1)
          to label %50 unwind label %52

50:                                               ; preds = %48
  %51 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %49, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %56 unwind label %52

52:                                               ; preds = %.invoke, %125, %124, %122, %121, %119, %118, %113, %111, %109, %104, %50, %48, %42
  %53 = landingpad { ptr, i32 }
          cleanup
  br label %137

54:                                               ; preds = %44
  %55 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #6
  br label %137

56:                                               ; preds = %50, %46
  switch i8 %24, label %125 [
    i8 2, label %57
    i8 3, label %84
    i8 4, label %96
    i8 8, label %104
    i8 10, label %118
    i8 16, label %119
    i8 18, label %122
    i8 127, label %135
    i8 -1, label %135
  ]

57:                                               ; preds = %56
  %58 = invoke noundef i32 @_ZN12_GLOBAL__N_15get32ERSi(ptr noundef nonnull align 8 dereferenceable(16) %0)
          to label %59 unwind label %79

59:                                               ; preds = %57
  %60 = add nsw i32 %58, -1
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #6
  %61 = zext i32 %60 to i64
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(32) %7, i64 noundef %61)
          to label %62 unwind label %81

62:                                               ; preds = %59
  %63 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %7, i64 noundef 0)
  %64 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi4readEPcl(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef nonnull %63, i64 noundef %61)
          to label %65 unwind label %81

65:                                               ; preds = %62
  %66 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %7) #6
  invoke void @_ZN4json6vector9push_backEPKc(ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef %66)
          to label %67 unwind label %81

67:                                               ; preds = %65
  %68 = invoke noundef i32 @_ZNSi3getEv(ptr noundef nonnull align 8 dereferenceable(16) %0)
          to label %69 unwind label %81

69:                                               ; preds = %67
  %.not50 = icmp eq i32 %68, 0
  br i1 %.not50, label %83, label %70

70:                                               ; preds = %69
  %71 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef nonnull @.str.2)
          to label %72 unwind label %81

72:                                               ; preds = %70
  %73 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %71, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %74 unwind label %81

74:                                               ; preds = %72
  %75 = load ptr, ptr %0, align 8, !tbaa !5
  %76 = getelementptr i8, ptr %75, i64 -24
  %77 = load i64, ptr %76, align 8
  %78 = getelementptr inbounds i8, ptr %0, i64 %77
  invoke void @_ZNSt9basic_iosIcSt11char_traitsIcEE8setstateESt12_Ios_Iostate(ptr noundef nonnull align 8 dereferenceable(264) %78, i32 noundef 4)
          to label %83 unwind label %81

79:                                               ; preds = %57
  %80 = landingpad { ptr, i32 }
          cleanup
  br label %137

81:                                               ; preds = %74, %72, %70, %67, %65, %62, %59
  %82 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #6
  br label %137

83:                                               ; preds = %74, %69
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #6
  br label %135

84:                                               ; preds = %56
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %8) #6
  invoke void @_ZN4json3mapC2Ev(ptr noundef nonnull align 8 dereferenceable(80) %8)
          to label %85 unwind label %91

85:                                               ; preds = %84
  %86 = invoke ptr @_ZN4json6binaryINS_3mapEEENS_9bson_wrapIT_EERS3_(ptr noundef nonnull align 8 dereferenceable(80) %8)
          to label %87 unwind label %93

87:                                               ; preds = %85
  %88 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN4jsonrsERSiNS_9bson_wrapINS_3mapEEE(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr %86)
          to label %89 unwind label %93

89:                                               ; preds = %87
  invoke void @_ZN4json6vector9push_backEONS_3mapE(ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(80) %8)
          to label %90 unwind label %93

90:                                               ; preds = %89
  call void @_ZN4json3mapD2Ev(ptr noundef nonnull align 8 dereferenceable(80) %8) #6
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %8) #6
  br label %135

91:                                               ; preds = %84
  %92 = landingpad { ptr, i32 }
          cleanup
  br label %95

93:                                               ; preds = %89, %87, %85
  %94 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN4json3mapD2Ev(ptr noundef nonnull align 8 dereferenceable(80) %8) #6
  br label %95

95:                                               ; preds = %93, %91
  %.pn = phi { ptr, i32 } [ %94, %93 ], [ %92, %91 ]
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %8) #6
  br label %137

96:                                               ; preds = %56
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #6
  call void @_ZN4json6vectorC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9)
  %97 = invoke ptr @_ZN4json6binaryINS_6vectorEEENS_9bson_wrapIT_EERS3_(ptr noundef nonnull align 8 dereferenceable(32) %9)
          to label %98 unwind label %102

98:                                               ; preds = %96
  %99 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN4jsonrsERSiNS_9bson_wrapINS_6vectorEEE(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr %97)
          to label %100 unwind label %102

100:                                              ; preds = %98
  invoke void @_ZN4json6vector9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(32) %9)
          to label %101 unwind label %102

101:                                              ; preds = %100
  call void @_ZN4json6vectorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #6
  br label %135

102:                                              ; preds = %100, %98, %96
  %103 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN4json6vectorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #6
  br label %137

104:                                              ; preds = %56
  %105 = invoke noundef zeroext i8 @_ZN12_GLOBAL__N_14get8ERSi(ptr noundef nonnull align 8 dereferenceable(16) %0)
          to label %106 unwind label %52

106:                                              ; preds = %104
  switch i8 %105, label %109 [
    i8 0, label %.invoke
    i8 1, label %107
  ]

107:                                              ; preds = %106
  br label %.invoke

.invoke:                                          ; preds = %106, %107
  %108 = phi i1 [ true, %107 ], [ false, %106 ]
  invoke void @_ZN4json6vector9push_backEb(ptr noundef nonnull align 8 dereferenceable(32) %1, i1 noundef zeroext %108)
          to label %135 unwind label %52

109:                                              ; preds = %106
  %110 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef nonnull @.str.3)
          to label %111 unwind label %52

111:                                              ; preds = %109
  %112 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %110, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %113 unwind label %52

113:                                              ; preds = %111
  %114 = load ptr, ptr %0, align 8, !tbaa !5
  %115 = getelementptr i8, ptr %114, i64 -24
  %116 = load i64, ptr %115, align 8
  %117 = getelementptr inbounds i8, ptr %0, i64 %116
  invoke void @_ZNSt9basic_iosIcSt11char_traitsIcEE8setstateESt12_Ios_Iostate(ptr noundef nonnull align 8 dereferenceable(264) %117, i32 noundef 4)
          to label %135 unwind label %52

118:                                              ; preds = %56
  invoke void @_ZN4json6vector9push_backEDn(ptr noundef nonnull align 8 dereferenceable(32) %1, ptr null)
          to label %135 unwind label %52

119:                                              ; preds = %56
  %120 = invoke noundef i32 @_ZN12_GLOBAL__N_15get32ERSi(ptr noundef nonnull align 8 dereferenceable(16) %0)
          to label %121 unwind label %52

121:                                              ; preds = %119
  invoke void @_ZN4json6vector9push_backEi(ptr noundef nonnull align 8 dereferenceable(32) %1, i32 noundef %120)
          to label %135 unwind label %52

122:                                              ; preds = %56
  %123 = invoke noundef i64 @_ZN12_GLOBAL__N_15get64ERSi(ptr noundef nonnull align 8 dereferenceable(16) %0)
          to label %124 unwind label %52

124:                                              ; preds = %122
  invoke void @_ZN4json6vector9push_backEl(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %123)
          to label %135 unwind label %52

125:                                              ; preds = %56
  %126 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef nonnull @.str.4)
          to label %127 unwind label %52

127:                                              ; preds = %125
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #6
  %128 = zext i8 %24 to i64
  call void @_ZN2P43hexC2Elic(ptr noundef nonnull align 8 dereferenceable(13) %10, i64 noundef %128, i32 noundef 0, i8 noundef signext 32)
  %129 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN2P4lsERSoRKNS_3hexE(ptr noundef nonnull align 8 dereferenceable(8) %126, ptr noundef nonnull align 8 dereferenceable(13) %10)
          to label %130 unwind label %133

130:                                              ; preds = %127
  %131 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %129, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %132 unwind label %133

132:                                              ; preds = %130
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #6
  br label %135

133:                                              ; preds = %130, %127
  %134 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #6
  br label %137

135:                                              ; preds = %.invoke, %83, %90, %101, %132, %113, %118, %121, %124, %56, %56
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #6
  %136 = call noundef zeroext i8 @_ZN12_GLOBAL__N_14get8ERSi(ptr noundef nonnull align 8 dereferenceable(16) %0)
  %.not = icmp eq i8 %136, 0
  br i1 %.not, label %.loopexit, label %23

137:                                              ; preds = %79, %81, %133, %102, %95, %54, %52
  %.pn53 = phi { ptr, i32 } [ %134, %133 ], [ %53, %52 ], [ %103, %102 ], [ %.pn, %95 ], [ %55, %54 ], [ %82, %81 ], [ %80, %79 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #6
  resume { ptr, i32 } %.pn53

.loopexit:                                        ; preds = %23, %135, %2, %35
  %.not55 = icmp eq i64 %16, -1
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %11) #6
  br i1 %.not55, label %.critedge, label %138

138:                                              ; preds = %.loopexit
  %139 = load ptr, ptr %0, align 8, !tbaa !5
  %140 = getelementptr i8, ptr %139, i64 -24
  %141 = load i64, ptr %140, align 8
  %142 = getelementptr inbounds i8, ptr %0, i64 %141
  %143 = call noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEcvbEv(ptr noundef nonnull align 8 dereferenceable(264) %142)
  br i1 %143, label %144, label %.critedge

144:                                              ; preds = %138
  %145 = call { i64, i64 } @_ZNSi5tellgEv(ptr noundef nonnull align 8 dereferenceable(16) %0)
  %146 = extractvalue { i64, i64 } %145, 0
  store i64 %146, ptr %11, align 8
  %147 = getelementptr inbounds i8, ptr %11, i64 8
  %148 = extractvalue { i64, i64 } %145, 1
  store i64 %148, ptr %147, align 8
  %149 = call noundef i64 @_ZNKSt4fposI11__mbstate_tEcvlEv(ptr noundef nonnull align 8 dereferenceable(16) %11)
  %.not56 = icmp eq i64 %149, %19
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #6
  br i1 %.not56, label %153, label %150

150:                                              ; preds = %144
  %151 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef nonnull @.str.5)
  %152 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %151, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %153

.critedge:                                        ; preds = %.loopexit, %138
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #6
  br label %153

153:                                              ; preds = %.critedge, %150, %144
  ret ptr %0
}

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

declare { i64, i64 } @_ZNSi5tellgEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt4fposI11__mbstate_tEcvlEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #3 align 2

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

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZN12_GLOBAL__N_15get32ERSi(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorISt10unique_ptrIN4json3objESt14default_deleteIS2_EESaIS5_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare hidden noundef zeroext i8 @_ZN12_GLOBAL__N_14get8ERSi(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEntEv(ptr noundef nonnull align 8 dereferenceable(264)) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #4

; Function Attrs: mustprogress uwtable
declare void @_ZNSt9basic_iosIcSt11char_traitsIcEE8setstateESt12_Ios_Iostate(ptr noundef nonnull align 8 dereferenceable(264), i32 noundef) local_unnamed_addr #0 align 2

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EES4_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32), i8 noundef signext) local_unnamed_addr #2

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNSt7__cxx119to_stringEm(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, i64 noundef) local_unnamed_addr #4

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

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

; Function Attrs: mustprogress uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) local_unnamed_addr #0 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4json6vector9push_backEPKc(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) local_unnamed_addr #0 align 2

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

declare noundef i32 @_ZNSi3getEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4json3mapC2Ev(ptr noundef nonnull align 8 dereferenceable(80)) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZN4jsonrsERSiNS_9bson_wrapINS_3mapEEE(ptr noundef nonnull align 8 dereferenceable(16), ptr) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare dso_local ptr @_ZN4json6binaryINS_3mapEEENS_9bson_wrapIT_EERS3_(ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #0

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN4json6vector9push_backEONS_3mapE(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #4 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local ptr @_ZN4json6binaryINS_6vectorEEENS_9bson_wrapIT_EERS3_(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4json6vector9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #0 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4json6vector9push_backEb(ptr noundef nonnull align 8 dereferenceable(32), i1 noundef zeroext) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4json6vector9push_backEDn(ptr noundef nonnull align 8 dereferenceable(32), ptr) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4json6vector9push_backEi(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4json6vector9push_backEl(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare hidden noundef i64 @_ZN12_GLOBAL__N_15get64ERSi(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #0

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN2P4lsERSoRKNS_3hexE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(13)) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN2P43hexC2Elic(ptr noundef nonnull align 8 dereferenceable(13), i64 noundef, i32 noundef, i8 noundef signext) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEcvbEv(ptr noundef nonnull align 8 dereferenceable(264)) local_unnamed_addr #0 align 2

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


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