; LLVM IR from niessner/Matterport :: code/gaps/apps/mpview/mp.ll (ZN7MPHouse15ReadSegmentFileEPKc)

; 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.RNTime = type { %struct.timeval }
%struct.timeval = type { i64, i64 }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.Json::Value" = type { %"union.Json::Value::ValueHolder", i16, ptr, i64, i64 }
%"union.Json::Value::ValueHolder" = type { i64 }
%"class.Json::Reader" = type <{ %"class.std::stack", %"class.std::deque.27", %"class.std::__cxx11::basic_string", ptr, ptr, ptr, ptr, ptr, %"class.std::__cxx11::basic_string", %"class.Json::Features", i8, [3 x i8] }>
%"class.std::stack" = type { %"class.std::deque" }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<Json::Value *, std::allocator<Json::Value *>>::_Deque_impl" }
%"struct.std::_Deque_base<Json::Value *, std::allocator<Json::Value *>>::_Deque_impl" = type { %"struct.std::_Deque_base<Json::Value *, std::allocator<Json::Value *>>::_Deque_impl_data" }
%"struct.std::_Deque_base<Json::Value *, std::allocator<Json::Value *>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }
%"class.std::deque.27" = type { %"class.std::_Deque_base.28" }
%"class.std::_Deque_base.28" = type { %"struct.std::_Deque_base<Json::Reader::ErrorInfo, std::allocator<Json::Reader::ErrorInfo>>::_Deque_impl" }
%"struct.std::_Deque_base<Json::Reader::ErrorInfo, std::allocator<Json::Reader::ErrorInfo>>::_Deque_impl" = type { %"struct.std::_Deque_base<Json::Reader::ErrorInfo, std::allocator<Json::Reader::ErrorInfo>>::_Deque_impl_data" }
%"struct.std::_Deque_base<Json::Reader::ErrorInfo, std::allocator<Json::Reader::ErrorInfo>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator.32", %"struct.std::_Deque_iterator.32" }
%"struct.std::_Deque_iterator.32" = type { ptr, ptr, ptr, ptr }
%"class.Json::Features" = type { i8, i8, i8, i8 }
%class.RNMap.22 = type { ptr }
%class.R3Point = type { [3 x double] }
%struct.MPHouse = type { %class.RNArray.0, %class.RNArray.1, %class.RNArray.2, %class.RNArray.3, %class.RNArray.4, %class.RNArray.5, %class.RNArray.6, %class.RNArray.7, %class.RNArray.8, %class.RNArray.9, %class.RGBDConfiguration, ptr, ptr, %class.R3Box, ptr, ptr }
%class.RNArray.0 = type { %class.RNVArray }
%class.RNVArray = type { ptr, i32, i32 }
%class.RNArray.1 = type { %class.RNVArray }
%class.RNArray.2 = type { %class.RNVArray }
%class.RNArray.3 = type { %class.RNVArray }
%class.RNArray.4 = type { %class.RNVArray }
%class.RNArray.5 = type { %class.RNVArray }
%class.RNArray.6 = type { %class.RNVArray }
%class.RNArray.7 = type { %class.RNVArray }
%class.RNArray.8 = type { %class.RNVArray }
%class.RNArray.9 = type { %class.RNVArray }
%class.RGBDConfiguration = type { ptr, %class.RNArray.10, %class.RNArray.11, ptr, ptr, ptr, ptr, %class.R3Box }
%class.RNArray.10 = type { %class.RNVArray }
%class.RNArray.11 = type { %class.RNVArray }
%class.R3Box = type { %class.R3Solid, %class.R3Point, %class.R3Point }
%class.R3Solid = type { %class.R3Shape }
%class.R3Shape = type { ptr }
%struct.MPSegment = type <{ ptr, i32, [4 x i8], ptr, i32, [4 x i8], ptr, %class.RNArray.12, double, %class.R3Point, %class.R3Box, i32, [4 x i8] }>
%class.RNArray.12 = type { %class.RNVArray }

@stderr = external global ptr, align 8
@.str.75 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.76 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.77 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.78 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.79 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.80 = external hidden unnamed_addr constant [35 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) #1

declare void @_ZN5R3Box5UnionERKS_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7MPHouse13InsertSegmentEP9MPSegment(ptr noundef nonnull align 8 dereferenceable(376), ptr noundef) #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK6R3Mesh6NFacesEv(ptr noundef nonnull align 8 dereferenceable(272)) #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZNK6R3Mesh4FaceEi(ptr noundef nonnull align 8 dereferenceable(272), i32 noundef) #5 align 2

declare noalias ptr @fopen(ptr noundef, ptr noundef) #2

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #6

declare i32 @fclose(ptr noundef) #2

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) #7

declare noundef nonnull align 8 dereferenceable(24) ptr @_ZN7R3PointaSERKS_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK5RNMapIiP9MPSegmentE4FindEiPS1_(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef, ptr noundef) #3 align 2

declare noundef nonnull align 8 dereferenceable(56) ptr @_ZNK6R3Mesh8FaceBBoxEPK10R3MeshFace(ptr noundef nonnull align 8 dereferenceable(272), ptr noundef) #2

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

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

declare void @_ZN6RNTimeC1Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #2

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

; Function Attrs: inlinehint mustprogress nounwind willreturn memory(read) uwtable
declare i32 @atoi(ptr noundef nonnull) #9

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN7MPHouse15ReadSegmentFileEPKc(ptr noundef nonnull align 8 dereferenceable(376) %0, ptr noundef %1) #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca %class.RNTime, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca %"class.std::__cxx11::basic_string", align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i64, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i64, align 8
  %15 = alloca %"class.Json::Value", align 8
  %16 = alloca %"class.Json::Reader", align 8
  %17 = alloca %"class.Json::Value", align 8
  %18 = alloca %class.RNMap.22, align 8
  %19 = alloca i32, align 4
  %20 = alloca %"class.Json::Value", align 8
  %21 = alloca i32, align 4
  %22 = alloca ptr, align 8
  %23 = alloca i32, align 4
  %24 = alloca %"class.std::__cxx11::basic_string", align 8
  %25 = alloca ptr, align 8
  %26 = alloca %class.R3Point, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %27 = load ptr, ptr %4, align 8
  %28 = getelementptr inbounds %struct.MPHouse, ptr %27, i32 0, i32 12
  %29 = load ptr, ptr %28, align 8, !tbaa !9
  %30 = icmp ne ptr %29, null
  br i1 %30, label %32, label %31

31:                                               ; preds = %2
  store i32 0, ptr %3, align 4
  br label %277

32:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 16, ptr %6) #10
  call void @_ZN6RNTimeC1Ev(ptr noundef nonnull align 8 dereferenceable(16) %6)
  call void @_ZN6RNTime4ReadEv(ptr noundef nonnull align 8 dereferenceable(16) %6)
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #10
  %33 = load ptr, ptr %5, align 8, !tbaa !5
  %34 = call noalias ptr @fopen(ptr noundef %33, ptr noundef @.str.75)
  store ptr %34, ptr %7, align 8, !tbaa !5
  %35 = load ptr, ptr %7, align 8, !tbaa !5
  %36 = icmp ne ptr %35, null
  br i1 %36, label %41, label %37

37:                                               ; preds = %32
  %38 = load ptr, ptr @stderr, align 8, !tbaa !5
  %39 = load ptr, ptr %5, align 8, !tbaa !5
  %40 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %38, ptr noundef @.str.76, ptr noundef %39) #10
  store i32 0, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %276

41:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 32, ptr %9) #10
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #10
  %42 = load ptr, ptr %7, align 8, !tbaa !5
  %43 = invoke i32 @fseek(ptr noundef %42, i64 noundef 0, i32 noundef 2)
          to label %44 unwind label %67

44:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #10
  %45 = load ptr, ptr %7, align 8, !tbaa !5
  %46 = invoke i64 @ftell(ptr noundef %45)
          to label %47 unwind label %71

47:                                               ; preds = %44
  store i64 %46, ptr %12, align 8, !tbaa !30
  %48 = load ptr, ptr %7, align 8, !tbaa !5
  %49 = invoke i32 @fseek(ptr noundef %48, i64 noundef 0, i32 noundef 0)
          to label %50 unwind label %71

50:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #10
  %51 = load i64, ptr %12, align 8, !tbaa !30
  %52 = add nsw i64 %51, 1
  %53 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %52) #11
          to label %54 unwind label %75

54:                                               ; preds = %50
  store ptr %53, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #10
  %55 = load i64, ptr %12, align 8, !tbaa !30
  store i64 %55, ptr %14, align 8, !tbaa !30
  %56 = load ptr, ptr %13, align 8, !tbaa !5
  %57 = load i64, ptr %14, align 8, !tbaa !30
  %58 = load ptr, ptr %7, align 8, !tbaa !5
  %59 = invoke i64 @fread(ptr noundef %56, i64 noundef 1, i64 noundef %57, ptr noundef %58)
          to label %60 unwind label %79

60:                                               ; preds = %54
  %61 = load i64, ptr %14, align 8, !tbaa !30
  %62 = icmp ne i64 %59, %61
  br i1 %62, label %63, label %83

63:                                               ; preds = %60
  %64 = load ptr, ptr @stderr, align 8, !tbaa !5
  %65 = load ptr, ptr %5, align 8, !tbaa !5
  %66 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %64, ptr noundef @.str.77, ptr noundef %65) #10
  store i32 0, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %271

67:                                               ; preds = %41
  %68 = landingpad { ptr, i32 }
          cleanup
  %69 = extractvalue { ptr, i32 } %68, 0
  store ptr %69, ptr %10, align 8
  %70 = extractvalue { ptr, i32 } %68, 1
  store i32 %70, ptr %11, align 4
  br label %275

71:                                               ; preds = %47, %44
  %72 = landingpad { ptr, i32 }
          cleanup
  %73 = extractvalue { ptr, i32 } %72, 0
  store ptr %73, ptr %10, align 8
  %74 = extractvalue { ptr, i32 } %72, 1
  store i32 %74, ptr %11, align 4
  br label %274

75:                                               ; preds = %50
  %76 = landingpad { ptr, i32 }
          cleanup
  %77 = extractvalue { ptr, i32 } %76, 0
  store ptr %77, ptr %10, align 8
  %78 = extractvalue { ptr, i32 } %76, 1
  store i32 %78, ptr %11, align 4
  br label %273

79:                                               ; preds = %94, %83, %54
  %80 = landingpad { ptr, i32 }
          cleanup
  %81 = extractvalue { ptr, i32 } %80, 0
  store ptr %81, ptr %10, align 8
  %82 = extractvalue { ptr, i32 } %80, 1
  store i32 %82, ptr %11, align 4
  br label %272

83:                                               ; preds = %60
  %84 = load ptr, ptr %13, align 8, !tbaa !5
  %85 = load i64, ptr %12, align 8, !tbaa !30
  %86 = getelementptr inbounds i8, ptr %84, i64 %85
  store i8 0, ptr %86, align 1, !tbaa !32
  %87 = load ptr, ptr %13, align 8, !tbaa !5
  %88 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef %87)
          to label %89 unwind label %79

89:                                               ; preds = %83
  br label %90

90:                                               ; preds = %89
  %91 = load ptr, ptr %13, align 8, !tbaa !5
  %92 = icmp eq ptr %91, null
  br i1 %92, label %94, label %93

93:                                               ; preds = %90
  call void @_ZdaPv(ptr noundef %91) #12
  br label %94

94:                                               ; preds = %93, %90
  %95 = load ptr, ptr %7, align 8, !tbaa !5
  %96 = invoke i32 @fclose(ptr noundef %95)
          to label %97 unwind label %79

97:                                               ; preds = %94
  call void @llvm.lifetime.start.p0(i64 40, ptr %15) #10
  invoke void @_ZN4Json5ValueC1ENS_9ValueTypeE(ptr noundef nonnull align 8 dereferenceable(40) %15, i32 noundef 0)
          to label %98 unwind label %106

98:                                               ; preds = %97
  call void @llvm.lifetime.start.p0(i64 272, ptr %16) #10
  invoke void @_ZN4Json6ReaderC1Ev(ptr noundef nonnull align 8 dereferenceable(269) %16)
          to label %99 unwind label %110

99:                                               ; preds = %98
  %100 = invoke noundef zeroext i1 @_ZN4Json6Reader5parseERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERNS_5ValueEb(ptr noundef nonnull align 8 dereferenceable(269) %16, ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef nonnull align 8 dereferenceable(40) %15, i1 noundef zeroext false)
          to label %101 unwind label %114

101:                                              ; preds = %99
  br i1 %100, label %118, label %102

102:                                              ; preds = %101
  %103 = load ptr, ptr @stderr, align 8, !tbaa !5
  %104 = load ptr, ptr %5, align 8, !tbaa !5
  %105 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %103, ptr noundef @.str.78, ptr noundef %104) #10
  store i32 0, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %267

106:                                              ; preds = %97
  %107 = landingpad { ptr, i32 }
          cleanup
  %108 = extractvalue { ptr, i32 } %107, 0
  store ptr %108, ptr %10, align 8
  %109 = extractvalue { ptr, i32 } %107, 1
  store i32 %109, ptr %11, align 4
  br label %270

110:                                              ; preds = %98
  %111 = landingpad { ptr, i32 }
          cleanup
  %112 = extractvalue { ptr, i32 } %111, 0
  store ptr %112, ptr %10, align 8
  %113 = extractvalue { ptr, i32 } %111, 1
  store i32 %113, ptr %11, align 4
  br label %269

114:                                              ; preds = %118, %99
  %115 = landingpad { ptr, i32 }
          cleanup
  %116 = extractvalue { ptr, i32 } %115, 0
  store ptr %116, ptr %10, align 8
  %117 = extractvalue { ptr, i32 } %115, 1
  store i32 %117, ptr %11, align 4
  br label %268

118:                                              ; preds = %101
  %119 = invoke noundef zeroext i1 @_ZNK4Json5Value8isMemberEPKc(ptr noundef nonnull align 8 dereferenceable(40) %15, ptr noundef @.str.79)
          to label %120 unwind label %114

120:                                              ; preds = %118
  br i1 %119, label %125, label %121

121:                                              ; preds = %120
  %122 = load ptr, ptr @stderr, align 8, !tbaa !5
  %123 = load ptr, ptr %5, align 8, !tbaa !5
  %124 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %122, ptr noundef @.str.80, ptr noundef %123) #10
  store i32 0, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %267

125:                                              ; preds = %120
  call void @llvm.lifetime.start.p0(i64 40, ptr %17) #10
  %126 = invoke noundef nonnull align 8 dereferenceable(40) ptr @_ZN4Json5ValueixEPKc(ptr noundef nonnull align 8 dereferenceable(40) %15, ptr noundef @.str.79)
          to label %127 unwind label %136

127:                                              ; preds = %125
  invoke void @_ZN4Json5ValueC1ERKS0_(ptr noundef nonnull align 8 dereferenceable(40) %17, ptr noundef nonnull align 8 dereferenceable(40) %126)
          to label %128 unwind label %136

128:                                              ; preds = %127
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #10
  invoke void @_ZN5RNMapIiP9MPSegmentEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %18)
          to label %129 unwind label %140

129:                                              ; preds = %128
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #10
  store i32 0, ptr %19, align 4, !tbaa !33
  br label %130

130:                                              ; preds = %258, %129
  %131 = load i32, ptr %19, align 4, !tbaa !33
  %132 = invoke noundef i32 @_ZNK4Json5Value4sizeEv(ptr noundef nonnull align 8 dereferenceable(40) %17)
          to label %133 unwind label %144

133:                                              ; preds = %130
  %134 = icmp ult i32 %131, %132
  br i1 %134, label %148, label %135

135:                                              ; preds = %133
  store i32 2, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #10
  br label %264

136:                                              ; preds = %127, %125
  %137 = landingpad { ptr, i32 }
          cleanup
  %138 = extractvalue { ptr, i32 } %137, 0
  store ptr %138, ptr %10, align 8
  %139 = extractvalue { ptr, i32 } %137, 1
  store i32 %139, ptr %11, align 4
  br label %266

140:                                              ; preds = %128
  %141 = landingpad { ptr, i32 }
          cleanup
  %142 = extractvalue { ptr, i32 } %141, 0
  store ptr %142, ptr %10, align 8
  %143 = extractvalue { ptr, i32 } %141, 1
  store i32 %143, ptr %11, align 4
  br label %265

144:                                              ; preds = %130
  %145 = landingpad { ptr, i32 }
          cleanup
  %146 = extractvalue { ptr, i32 } %145, 0
  store ptr %146, ptr %10, align 8
  %147 = extractvalue { ptr, i32 } %145, 1
  store i32 %147, ptr %11, align 4
  br label %263

148:                                              ; preds = %133
  call void @llvm.lifetime.start.p0(i64 40, ptr %20) #10
  %149 = load i32, ptr %19, align 4, !tbaa !33
  %150 = invoke noundef nonnull align 8 dereferenceable(40) ptr @_ZN4Json5ValueixEj(ptr noundef nonnull align 8 dereferenceable(40) %17, i32 noundef %149)
          to label %151 unwind label %187

151:                                              ; preds = %148
  invoke void @_ZN4Json5ValueC1ERKS0_(ptr noundef nonnull align 8 dereferenceable(40) %20, ptr noundef nonnull align 8 dereferenceable(40) %150)
          to label %152 unwind label %187

152:                                              ; preds = %151
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #10
  %153 = load i32, ptr %19, align 4, !tbaa !33
  store i32 %153, ptr %21, align 4, !tbaa !33
  %154 = load i32, ptr %21, align 4, !tbaa !33
  %155 = icmp sge i32 %154, 0
  br i1 %155, label %156, label %257

156:                                              ; preds = %152
  %157 = load i32, ptr %21, align 4, !tbaa !33
  %158 = getelementptr inbounds %struct.MPHouse, ptr %27, i32 0, i32 12
  %159 = load ptr, ptr %158, align 8, !tbaa !9
  %160 = invoke noundef i32 @_ZNK6R3Mesh6NFacesEv(ptr noundef nonnull align 8 dereferenceable(272) %159)
          to label %161 unwind label %191

161:                                              ; preds = %156
  %162 = icmp slt i32 %157, %160
  br i1 %162, label %163, label %257

163:                                              ; preds = %161
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #10
  store ptr null, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #10
  call void @llvm.lifetime.start.p0(i64 32, ptr %24) #10
  invoke void @_ZNK4Json5Value8asStringB5cxx11Ev(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %24, ptr noundef nonnull align 8 dereferenceable(40) %20)
          to label %164 unwind label %195

164:                                              ; preds = %163
  %165 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %24) #10
  %166 = call i32 @atoi(ptr noundef %165) #13
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %24) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr %24) #10
  store i32 %166, ptr %23, align 4, !tbaa !33
  %167 = load i32, ptr %23, align 4, !tbaa !33
  %168 = invoke noundef i32 @_ZNK5RNMapIiP9MPSegmentE4FindEiPS1_(ptr noundef nonnull align 8 dereferenceable(8) %18, i32 noundef %167, ptr noundef %22)
          to label %169 unwind label %199

169:                                              ; preds = %164
  %170 = icmp ne i32 %168, 0
  br i1 %170, label %207, label %171

171:                                              ; preds = %169
  %172 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 152) #11
          to label %173 unwind label %199

173:                                              ; preds = %171
  invoke void @_ZN9MPSegmentC1Ev(ptr noundef nonnull align 8 dereferenceable(148) %172)
          to label %174 unwind label %203

174:                                              ; preds = %173
  store ptr %172, ptr %22, align 8, !tbaa !5
  %175 = load i32, ptr %23, align 4, !tbaa !33
  %176 = load ptr, ptr %22, align 8, !tbaa !5
  %177 = getelementptr inbounds %struct.MPSegment, ptr %176, i32 0, i32 11
  store i32 %175, ptr %177, align 8, !tbaa !34
  %178 = getelementptr inbounds %struct.MPHouse, ptr %27, i32 0, i32 12
  %179 = load ptr, ptr %178, align 8, !tbaa !9
  %180 = load ptr, ptr %22, align 8, !tbaa !5
  %181 = getelementptr inbounds %struct.MPSegment, ptr %180, i32 0, i32 6
  store ptr %179, ptr %181, align 8, !tbaa !38
  %182 = load ptr, ptr %22, align 8, !tbaa !5
  invoke void @_ZN7MPHouse13InsertSegmentEP9MPSegment(ptr noundef nonnull align 8 dereferenceable(376) %27, ptr noundef %182)
          to label %183 unwind label %199

183:                                              ; preds = %174
  %184 = load i32, ptr %23, align 4, !tbaa !33
  %185 = load ptr, ptr %22, align 8, !tbaa !5
  invoke void @_ZN5RNMapIiP9MPSegmentE6InsertEiS1_(ptr noundef nonnull align 8 dereferenceable(8) %18, i32 noundef %184, ptr noundef %185)
          to label %186 unwind label %199

186:                                              ; preds = %183
  br label %207

187:                                              ; preds = %151, %148
  %188 = landingpad { ptr, i32 }
          cleanup
  %189 = extractvalue { ptr, i32 } %188, 0
  store ptr %189, ptr %10, align 8
  %190 = extractvalue { ptr, i32 } %188, 1
  store i32 %190, ptr %11, align 4
  br label %262

191:                                              ; preds = %156
  %192 = landingpad { ptr, i32 }
          cleanup
  %193 = extractvalue { ptr, i32 } %192, 0
  store ptr %193, ptr %10, align 8
  %194 = extractvalue { ptr, i32 } %192, 1
  store i32 %194, ptr %11, align 4
  br label %261

195:                                              ; preds = %163
  %196 = landingpad { ptr, i32 }
          cleanup
  %197 = extractvalue { ptr, i32 } %196, 0
  store ptr %197, ptr %10, align 8
  %198 = extractvalue { ptr, i32 } %196, 1
  store i32 %198, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 32, ptr %24) #10
  br label %256

199:                                              ; preds = %183, %174, %171, %164
  %200 = landingpad { ptr, i32 }
          cleanup
  %201 = extractvalue { ptr, i32 } %200, 0
  store ptr %201, ptr %10, align 8
  %202 = extractvalue { ptr, i32 } %200, 1
  store i32 %202, ptr %11, align 4
  br label %256

203:                                              ; preds = %173
  %204 = landingpad { ptr, i32 }
          cleanup
  %205 = extractvalue { ptr, i32 } %204, 0
  store ptr %205, ptr %10, align 8
  %206 = extractvalue { ptr, i32 } %204, 1
  store i32 %206, ptr %11, align 4
  call void @_ZdlPvm(ptr noundef %172, i64 noundef 152) #12
  br label %256

207:                                              ; preds = %186, %169
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #10
  %208 = getelementptr inbounds %struct.MPHouse, ptr %27, i32 0, i32 12
  %209 = load ptr, ptr %208, align 8, !tbaa !9
  %210 = load i32, ptr %21, align 4, !tbaa !33
  %211 = invoke noundef ptr @_ZNK6R3Mesh4FaceEi(ptr noundef nonnull align 8 dereferenceable(272) %209, i32 noundef %210)
          to label %212 unwind label %247

212:                                              ; preds = %207
  store ptr %211, ptr %25, align 8, !tbaa !5
  %213 = getelementptr inbounds %struct.MPHouse, ptr %27, i32 0, i32 12
  %214 = load ptr, ptr %213, align 8, !tbaa !9
  %215 = load ptr, ptr %25, align 8, !tbaa !5
  %216 = load i32, ptr %23, align 4, !tbaa !33
  invoke void @_ZN6R3Mesh15SetFaceMaterialEP10R3MeshFacei(ptr noundef nonnull align 8 dereferenceable(272) %214, ptr noundef %215, i32 noundef %216)
          to label %217 unwind label %247

217:                                              ; preds = %212
  %218 = load ptr, ptr %22, align 8, !tbaa !5
  %219 = getelementptr inbounds %struct.MPSegment, ptr %218, i32 0, i32 7
  %220 = load ptr, ptr %25, align 8, !tbaa !5
  %221 = invoke noundef ptr @_ZN7RNArrayIP10R3MeshFaceE6InsertES1_(ptr noundef nonnull align 8 dereferenceable(16) %219, ptr noundef %220)
          to label %222 unwind label %247

222:                                              ; preds = %217
  %223 = getelementptr inbounds %struct.MPHouse, ptr %27, i32 0, i32 12
  %224 = load ptr, ptr %223, align 8, !tbaa !9
  %225 = load ptr, ptr %25, align 8, !tbaa !5
  %226 = invoke noundef double @_ZNK6R3Mesh8FaceAreaEPK10R3MeshFace(ptr noundef nonnull align 8 dereferenceable(272) %224, ptr noundef %225)
          to label %227 unwind label %247

227:                                              ; preds = %222
  %228 = load ptr, ptr %22, align 8, !tbaa !5
  %229 = getelementptr inbounds %struct.MPSegment, ptr %228, i32 0, i32 8
  %230 = load double, ptr %229, align 8, !tbaa !39
  %231 = fadd double %230, %226
  store double %231, ptr %229, align 8, !tbaa !39
  %232 = load ptr, ptr %22, align 8, !tbaa !5
  %233 = getelementptr inbounds %struct.MPSegment, ptr %232, i32 0, i32 10
  %234 = getelementptr inbounds %struct.MPHouse, ptr %27, i32 0, i32 12
  %235 = load ptr, ptr %234, align 8, !tbaa !9
  %236 = load ptr, ptr %25, align 8, !tbaa !5
  %237 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZNK6R3Mesh8FaceBBoxEPK10R3MeshFace(ptr noundef nonnull align 8 dereferenceable(272) %235, ptr noundef %236)
          to label %238 unwind label %247

238:                                              ; preds = %227
  invoke void @_ZN5R3Box5UnionERKS_(ptr noundef nonnull align 8 dereferenceable(56) %233, ptr noundef nonnull align 8 dereferenceable(56) %237)
          to label %239 unwind label %247

239:                                              ; preds = %238
  call void @llvm.lifetime.start.p0(i64 24, ptr %26) #10
  %240 = load ptr, ptr %22, align 8, !tbaa !5
  %241 = getelementptr inbounds %struct.MPSegment, ptr %240, i32 0, i32 10
  invoke void @_ZNK5R3Box8CentroidEv(ptr dead_on_unwind writable sret(%class.R3Point) align 8 %26, ptr noundef nonnull align 8 dereferenceable(56) %241)
          to label %242 unwind label %251

242:                                              ; preds = %239
  %243 = load ptr, ptr %22, align 8, !tbaa !5
  %244 = getelementptr inbounds %struct.MPSegment, ptr %243, i32 0, i32 9
  %245 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN7R3PointaSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %244, ptr noundef nonnull align 8 dereferenceable(24) %26)
          to label %246 unwind label %251

246:                                              ; preds = %242
  call void @llvm.lifetime.end.p0(i64 24, ptr %26) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #10
  br label %257

247:                                              ; preds = %238, %227, %222, %217, %212, %207
  %248 = landingpad { ptr, i32 }
          cleanup
  %249 = extractvalue { ptr, i32 } %248, 0
  store ptr %249, ptr %10, align 8
  %250 = extractvalue { ptr, i32 } %248, 1
  store i32 %250, ptr %11, align 4
  br label %255

251:                                              ; preds = %242, %239
  %252 = landingpad { ptr, i32 }
          cleanup
  %253 = extractvalue { ptr, i32 } %252, 0
  store ptr %253, ptr %10, align 8
  %254 = extractvalue { ptr, i32 } %252, 1
  store i32 %254, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 24, ptr %26) #10
  br label %255

255:                                              ; preds = %251, %247
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #10
  br label %256

256:                                              ; preds = %255, %203, %199, %195
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #10
  br label %261

257:                                              ; preds = %246, %161, %152
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #10
  call void @_ZN4Json5ValueD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %20) #10
  call void @llvm.lifetime.end.p0(i64 40, ptr %20) #10
  br label %258

258:                                              ; preds = %257
  %259 = load i32, ptr %19, align 4, !tbaa !33
  %260 = add i32 %259, 1
  store i32 %260, ptr %19, align 4, !tbaa !33
  br label %130, !llvm.loop !40

261:                                              ; preds = %256, %191
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #10
  call void @_ZN4Json5ValueD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %20) #10
  br label %262

262:                                              ; preds = %261, %187
  call void @llvm.lifetime.end.p0(i64 40, ptr %20) #10
  br label %263

263:                                              ; preds = %262, %144
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #10
  call void @_ZN5RNMapIiP9MPSegmentED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %18) #10
  br label %265

264:                                              ; preds = %135
  store i32 1, ptr %3, align 4
  store i32 1, ptr %8, align 4
  call void @_ZN5RNMapIiP9MPSegmentED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %18) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #10
  call void @_ZN4Json5ValueD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %17) #10
  call void @llvm.lifetime.end.p0(i64 40, ptr %17) #10
  br label %267

265:                                              ; preds = %263, %140
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #10
  call void @_ZN4Json5ValueD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %17) #10
  br label %266

266:                                              ; preds = %265, %136
  call void @llvm.lifetime.end.p0(i64 40, ptr %17) #10
  br label %268

267:                                              ; preds = %264, %121, %102
  call void @_ZN4Json6ReaderD2Ev(ptr noundef nonnull align 8 dereferenceable(269) %16) #10
  call void @llvm.lifetime.end.p0(i64 272, ptr %16) #10
  call void @_ZN4Json5ValueD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %15) #10
  call void @llvm.lifetime.end.p0(i64 40, ptr %15) #10
  br label %271

268:                                              ; preds = %266, %114
  call void @_ZN4Json6ReaderD2Ev(ptr noundef nonnull align 8 dereferenceable(269) %16) #10
  br label %269

269:                                              ; preds = %268, %110
  call void @llvm.lifetime.end.p0(i64 272, ptr %16) #10
  call void @_ZN4Json5ValueD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %15) #10
  br label %270

270:                                              ; preds = %269, %106
  call void @llvm.lifetime.end.p0(i64 40, ptr %15) #10
  br label %272

271:                                              ; preds = %267, %63
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #10
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #10
  br label %276

272:                                              ; preds = %270, %79
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #10
  br label %273

273:                                              ; preds = %272, %75
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #10
  br label %274

274:                                              ; preds = %273, %71
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #10
  br label %275

275:                                              ; preds = %274, %67
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr %6) #10
  br label %279

276:                                              ; preds = %271, %37
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr %6) #10
  br label %277

277:                                              ; preds = %276, %31
  %278 = load i32, ptr %3, align 4
  ret i32 %278

279:                                              ; preds = %275
  %280 = load ptr, ptr %10, align 8
  %281 = load i32, ptr %11, align 4
  %282 = insertvalue { ptr, i32 } poison, ptr %280, 0
  %283 = insertvalue { ptr, i32 } %282, i32 %281, 1
  resume { ptr, i32 } %283
}

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

declare i32 @fseek(ptr noundef, i64 noundef, i32 noundef) #2

declare i64 @ftell(ptr noundef) #2

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) #7

declare i64 @fread(ptr noundef, i64 noundef, i64 noundef, ptr noundef) #2

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

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPv(ptr noundef) #1

declare void @_ZN4Json5ValueC1ENS_9ValueTypeE(ptr noundef nonnull align 8 dereferenceable(40), i32 noundef) unnamed_addr #2

declare void @_ZN4Json6ReaderC1Ev(ptr noundef nonnull align 8 dereferenceable(269)) unnamed_addr #2

declare noundef zeroext i1 @_ZN4Json6Reader5parseERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERNS_5ValueEb(ptr noundef nonnull align 8 dereferenceable(269), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(40), i1 noundef zeroext) #2

declare noundef zeroext i1 @_ZNK4Json5Value8isMemberEPKc(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef) #2

declare noundef nonnull align 8 dereferenceable(40) ptr @_ZN4Json5ValueixEPKc(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef) #2

declare void @_ZN4Json5ValueC1ERKS0_(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #2

declare noundef i32 @_ZNK4Json5Value4sizeEv(ptr noundef nonnull align 8 dereferenceable(40)) #2

declare noundef nonnull align 8 dereferenceable(40) ptr @_ZN4Json5ValueixEj(ptr noundef nonnull align 8 dereferenceable(40), i32 noundef) #2

declare void @_ZNK4Json5Value8asStringB5cxx11Ev(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(40)) #2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6R3Mesh15SetFaceMaterialEP10R3MeshFacei(ptr noundef nonnull align 8 dereferenceable(272), ptr noundef, i32 noundef) #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef double @_ZNK6R3Mesh8FaceAreaEPK10R3MeshFace(ptr noundef nonnull align 8 dereferenceable(272), ptr noundef) #5 align 2

declare void @_ZNK5R3Box8CentroidEv(ptr dead_on_unwind writable sret(%class.R3Point) align 8, ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #2

; Function Attrs: nounwind
declare void @_ZN4Json5ValueD1Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #6

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN4Json6ReaderD2Ev(ptr noundef nonnull align 8 dereferenceable(269)) unnamed_addr #4 align 2

declare void @_ZN9MPSegmentC1Ev(ptr)

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nobuiltin nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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 uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 #6 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nobuiltin allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { 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 #9 = { inlinehint mustprogress nounwind willreturn memory(read) 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 #10 = { nounwind }
attributes #11 = { builtin allocsize(0) }
attributes #12 = { builtin nounwind }
attributes #13 = { nounwind willreturn memory(read) }

!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 296}
!10 = !{!"_ZTS7MPHouse", !11, i64 0, !14, i64 16, !15, i64 32, !16, i64 48, !17, i64 64, !18, i64 80, !19, i64 96, !20, i64 112, !21, i64 128, !22, i64 144, !23, i64 160, !6, i64 288, !6, i64 296, !26, i64 304, !6, i64 360, !6, i64 368}
!11 = !{!"_ZTS7RNArrayIP7MPImageE", !12, i64 0}
!12 = !{!"_ZTS8RNVArray", !6, i64 0, !13, i64 8, !13, i64 12}
!13 = !{!"int", !7, i64 0}
!14 = !{!"_ZTS7RNArrayIP10MPPanoramaE", !12, i64 0}
!15 = !{!"_ZTS7RNArrayIP10MPCategoryE", !12, i64 0}
!16 = !{!"_ZTS7RNArrayIP9MPSegmentE", !12, i64 0}
!17 = !{!"_ZTS7RNArrayIP8MPObjectE", !12, i64 0}
!18 = !{!"_ZTS7RNArrayIP8MPVertexE", !12, i64 0}
!19 = !{!"_ZTS7RNArrayIP9MPSurfaceE", !12, i64 0}
!20 = !{!"_ZTS7RNArrayIP8MPRegionE", !12, i64 0}
!21 = !{!"_ZTS7RNArrayIP8MPPortalE", !12, i64 0}
!22 = !{!"_ZTS7RNArrayIP7MPLevelE", !12, i64 0}
!23 = !{!"_ZTS17RGBDConfiguration", !24, i64 8, !25, i64 24, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !26, i64 72}
!24 = !{!"_ZTS7RNArrayIP9RGBDImageE", !12, i64 0}
!25 = !{!"_ZTS7RNArrayIP11RGBDSurfaceE", !12, i64 0}
!26 = !{!"_ZTS5R3Box", !27, i64 0, !29, i64 8, !29, i64 32}
!27 = !{!"_ZTS7R3Solid", !28, i64 0}
!28 = !{!"_ZTS7R3Shape"}
!29 = !{!"_ZTS7R3Point", !7, i64 0}
!30 = !{!31, !31, i64 0}
!31 = !{!"long", !7, i64 0}
!32 = !{!7, !7, i64 0}
!33 = !{!13, !13, i64 0}
!34 = !{!35, !13, i64 144}
!35 = !{!"_ZTS9MPSegment", !6, i64 0, !13, i64 8, !6, i64 16, !13, i64 24, !6, i64 32, !36, i64 40, !37, i64 56, !29, i64 64, !26, i64 88, !13, i64 144}
!36 = !{!"_ZTS7RNArrayIP10R3MeshFaceE", !12, i64 0}
!37 = !{!"double", !7, i64 0}
!38 = !{!35, !6, i64 32}
!39 = !{!35, !37, i64 56}
!40 = distinct !{!40, !41}
!41 = !{!"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.RNTime = type { %struct.timeval }
%struct.timeval = type { i64, i64 }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.Json::Value" = type { %"union.Json::Value::ValueHolder", i16, ptr, i64, i64 }
%"union.Json::Value::ValueHolder" = type { i64 }
%"class.Json::Reader" = type <{ %"class.std::stack", %"class.std::deque.27", %"class.std::__cxx11::basic_string", ptr, ptr, ptr, ptr, ptr, %"class.std::__cxx11::basic_string", %"class.Json::Features", i8, [3 x i8] }>
%"class.std::stack" = type { %"class.std::deque" }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<Json::Value *, std::allocator<Json::Value *>>::_Deque_impl" }
%"struct.std::_Deque_base<Json::Value *, std::allocator<Json::Value *>>::_Deque_impl" = type { %"struct.std::_Deque_base<Json::Value *, std::allocator<Json::Value *>>::_Deque_impl_data" }
%"struct.std::_Deque_base<Json::Value *, std::allocator<Json::Value *>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }
%"class.std::deque.27" = type { %"class.std::_Deque_base.28" }
%"class.std::_Deque_base.28" = type { %"struct.std::_Deque_base<Json::Reader::ErrorInfo, std::allocator<Json::Reader::ErrorInfo>>::_Deque_impl" }
%"struct.std::_Deque_base<Json::Reader::ErrorInfo, std::allocator<Json::Reader::ErrorInfo>>::_Deque_impl" = type { %"struct.std::_Deque_base<Json::Reader::ErrorInfo, std::allocator<Json::Reader::ErrorInfo>>::_Deque_impl_data" }
%"struct.std::_Deque_base<Json::Reader::ErrorInfo, std::allocator<Json::Reader::ErrorInfo>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator.32", %"struct.std::_Deque_iterator.32" }
%"struct.std::_Deque_iterator.32" = type { ptr, ptr, ptr, ptr }
%"class.Json::Features" = type { i8, i8, i8, i8 }
%class.RNMap.22 = type { ptr }
%class.R3Point = type { [3 x double] }

@stderr = external local_unnamed_addr global ptr, align 8
@.str.75 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.76 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.77 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.78 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.79 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.80 = external hidden unnamed_addr constant [35 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) local_unnamed_addr #1

declare void @_ZN5R3Box5UnionERKS_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7MPHouse13InsertSegmentEP9MPSegment(ptr noundef nonnull align 8 dereferenceable(376), ptr noundef) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK6R3Mesh6NFacesEv(ptr noundef nonnull align 8 dereferenceable(272)) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZNK6R3Mesh4FaceEi(ptr noundef nonnull align 8 dereferenceable(272), i32 noundef) local_unnamed_addr #5 align 2

; Function Attrs: nofree nounwind
declare noalias noundef ptr @fopen(ptr nocapture noundef readonly, ptr nocapture noundef readonly) local_unnamed_addr #6

; Function Attrs: nofree nounwind
declare noundef i32 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #6

; Function Attrs: nofree nounwind
declare noundef i32 @fclose(ptr nocapture noundef) local_unnamed_addr #6

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) local_unnamed_addr #7

declare noundef nonnull align 8 dereferenceable(24) ptr @_ZN7R3PointaSERKS_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK5RNMapIiP9MPSegmentE4FindEiPS1_(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef, ptr noundef) local_unnamed_addr #3 align 2

declare noundef nonnull align 8 dereferenceable(56) ptr @_ZNK6R3Mesh8FaceBBoxEPK10R3MeshFace(ptr noundef nonnull align 8 dereferenceable(272), ptr noundef) local_unnamed_addr #2

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

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

declare void @_ZN6RNTimeC1Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6RNTime4ReadEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nofree nounwind willreturn memory(read) uwtable
declare i32 @atoi(ptr nocapture noundef nonnull) local_unnamed_addr #9

; Function Attrs: mustprogress uwtable
define dso_local noundef range(i32 0, 2) i32 @_ZN7MPHouse15ReadSegmentFileEPKc(ptr noundef nonnull align 8 dereferenceable(376) %0, ptr noundef %1) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %class.RNTime, align 8
  %4 = alloca %"class.std::__cxx11::basic_string", align 8
  %5 = alloca %"class.Json::Value", align 8
  %6 = alloca %"class.Json::Reader", align 8
  %7 = alloca %"class.Json::Value", align 8
  %8 = alloca %class.RNMap.22, align 8
  %9 = alloca %"class.Json::Value", align 8
  %10 = alloca ptr, align 8
  %11 = alloca %"class.std::__cxx11::basic_string", align 8
  %12 = alloca %class.R3Point, align 8
  %13 = getelementptr inbounds i8, ptr %0, i64 296
  %14 = load ptr, ptr %13, align 8, !tbaa !5
  %.not = icmp eq ptr %14, null
  br i1 %.not, label %151, label %15

15:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #11
  call void @_ZN6RNTimeC1Ev(ptr noundef nonnull align 8 dereferenceable(16) %3)
  call void @_ZN6RNTime4ReadEv(ptr noundef nonnull align 8 dereferenceable(16) %3)
  %16 = call noalias ptr @fopen(ptr noundef %1, ptr noundef nonnull @.str.75)
  %.not56 = icmp eq ptr %16, null
  br i1 %.not56, label %17, label %20

17:                                               ; preds = %15
  %18 = load ptr, ptr @stderr, align 8, !tbaa !29
  %19 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %18, ptr noundef nonnull @.str.76, ptr noundef %1) #12
  br label %150

20:                                               ; preds = %15
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #11
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #11
  %21 = call i32 @fseek(ptr noundef nonnull %16, i64 noundef 0, i32 noundef 2)
  %22 = call i64 @ftell(ptr noundef nonnull %16)
  %23 = call i32 @fseek(ptr noundef nonnull %16, i64 noundef 0, i32 noundef 0)
  %24 = add nsw i64 %22, 1
  %25 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %24) #13
          to label %26 unwind label %31

26:                                               ; preds = %20
  %27 = call i64 @fread(ptr noundef nonnull %25, i64 noundef 1, i64 noundef %22, ptr noundef nonnull %16)
  %.not57 = icmp eq i64 %27, %22
  br i1 %.not57, label %35, label %28

28:                                               ; preds = %26
  %29 = load ptr, ptr @stderr, align 8, !tbaa !29
  %30 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %29, ptr noundef nonnull @.str.77, ptr noundef %1) #12
  br label %148

31:                                               ; preds = %20
  %32 = landingpad { ptr, i32 }
          cleanup
  br label %149

33:                                               ; preds = %35
  %34 = landingpad { ptr, i32 }
          cleanup
  br label %149

35:                                               ; preds = %26
  %36 = getelementptr inbounds i8, ptr %25, i64 %22
  store i8 0, ptr %36, align 1, !tbaa !30
  %37 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull %25)
          to label %38 unwind label %33

38:                                               ; preds = %35
  call void @_ZdaPv(ptr noundef nonnull %25) #14
  %39 = call i32 @fclose(ptr noundef nonnull %16)
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %5) #11
  invoke void @_ZN4Json5ValueC1ENS_9ValueTypeE(ptr noundef nonnull align 8 dereferenceable(40) %5, i32 noundef 0)
          to label %40 unwind label %47

40:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 272, ptr nonnull %6) #11
  invoke void @_ZN4Json6ReaderC1Ev(ptr noundef nonnull align 8 dereferenceable(269) %6)
          to label %41 unwind label %49

41:                                               ; preds = %40
  %42 = invoke noundef zeroext i1 @_ZN4Json6Reader5parseERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERNS_5ValueEb(ptr noundef nonnull align 8 dereferenceable(269) %6, ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull align 8 dereferenceable(40) %5, i1 noundef zeroext false)
          to label %43 unwind label %51

43:                                               ; preds = %41
  br i1 %42, label %53, label %44

44:                                               ; preds = %43
  %45 = load ptr, ptr @stderr, align 8, !tbaa !29
  %46 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %45, ptr noundef nonnull @.str.78, ptr noundef %1) #12
  br label %144

47:                                               ; preds = %38
  %48 = landingpad { ptr, i32 }
          cleanup
  br label %147

49:                                               ; preds = %40
  %50 = landingpad { ptr, i32 }
          cleanup
  br label %146

51:                                               ; preds = %53, %41
  %52 = landingpad { ptr, i32 }
          cleanup
  br label %145

53:                                               ; preds = %43
  %54 = invoke noundef zeroext i1 @_ZNK4Json5Value8isMemberEPKc(ptr noundef nonnull align 8 dereferenceable(40) %5, ptr noundef nonnull @.str.79)
          to label %55 unwind label %51

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

56:                                               ; preds = %55
  %57 = load ptr, ptr @stderr, align 8, !tbaa !29
  %58 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %57, ptr noundef nonnull @.str.80, ptr noundef %1) #12
  br label %144

59:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %7) #11
  %60 = invoke noundef nonnull align 8 dereferenceable(40) ptr @_ZN4Json5ValueixEPKc(ptr noundef nonnull align 8 dereferenceable(40) %5, ptr noundef nonnull @.str.79)
          to label %61 unwind label %67

61:                                               ; preds = %59
  invoke void @_ZN4Json5ValueC1ERKS0_(ptr noundef nonnull align 8 dereferenceable(40) %7, ptr noundef nonnull align 8 dereferenceable(40) %60)
          to label %62 unwind label %67

62:                                               ; preds = %61
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #11
  invoke void @_ZN5RNMapIiP9MPSegmentEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %8)
          to label %.preheader unwind label %69

.preheader:                                       ; preds = %62, %138
  %.042 = phi i32 [ %139, %138 ], [ 0, %62 ]
  %63 = invoke noundef i32 @_ZNK4Json5Value4sizeEv(ptr noundef nonnull align 8 dereferenceable(40) %7)
          to label %64 unwind label %71

64:                                               ; preds = %.preheader
  %65 = icmp ult i32 %.042, %63
  br i1 %65, label %73, label %66

66:                                               ; preds = %64
  call void @_ZN5RNMapIiP9MPSegmentED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #11
  call void @_ZN4Json5ValueD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %7) #11
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %7) #11
  br label %144

67:                                               ; preds = %61, %59
  %68 = landingpad { ptr, i32 }
          cleanup
  br label %143

69:                                               ; preds = %62
  %70 = landingpad { ptr, i32 }
          cleanup
  br label %142

71:                                               ; preds = %.preheader
  %72 = landingpad { ptr, i32 }
          cleanup
  br label %141

73:                                               ; preds = %64
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %9) #11
  %74 = invoke noundef nonnull align 8 dereferenceable(40) ptr @_ZN4Json5ValueixEj(ptr noundef nonnull align 8 dereferenceable(40) %7, i32 noundef %.042)
          to label %75 unwind label %97

75:                                               ; preds = %73
  invoke void @_ZN4Json5ValueC1ERKS0_(ptr noundef nonnull align 8 dereferenceable(40) %9, ptr noundef nonnull align 8 dereferenceable(40) %74)
          to label %76 unwind label %97

76:                                               ; preds = %75
  %77 = icmp sgt i32 %.042, -1
  br i1 %77, label %78, label %138

78:                                               ; preds = %76
  %79 = load ptr, ptr %13, align 8, !tbaa !5
  %80 = call noundef i32 @_ZNK6R3Mesh6NFacesEv(ptr noundef nonnull align 8 dereferenceable(272) %79)
  %81 = icmp slt i32 %.042, %80
  br i1 %81, label %82, label %138

82:                                               ; preds = %78
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #11
  store ptr null, ptr %10, align 8, !tbaa !29
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %11) #11
  invoke void @_ZNK4Json5Value8asStringB5cxx11Ev(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %11, ptr noundef nonnull align 8 dereferenceable(40) %9)
          to label %83 unwind label %99

83:                                               ; preds = %82
  %84 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %11) #11
  %85 = call i32 @atoi(ptr nocapture noundef %84) #15
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #11
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #11
  %86 = invoke noundef i32 @_ZNK5RNMapIiP9MPSegmentE4FindEiPS1_(ptr noundef nonnull align 8 dereferenceable(8) %8, i32 noundef %85, ptr noundef nonnull %10)
          to label %87 unwind label %101

87:                                               ; preds = %83
  %.not58 = icmp eq i32 %86, 0
  br i1 %.not58, label %88, label %105

88:                                               ; preds = %87
  %89 = invoke noalias noundef nonnull dereferenceable(152) ptr @_Znwm(i64 noundef 152) #13
          to label %90 unwind label %101

90:                                               ; preds = %88
  invoke void @_ZN9MPSegmentC1Ev(ptr noundef nonnull align 8 dereferenceable(148) %89)
          to label %91 unwind label %103

91:                                               ; preds = %90
  store ptr %89, ptr %10, align 8, !tbaa !29
  %92 = getelementptr inbounds i8, ptr %89, i64 144
  store i32 %85, ptr %92, align 8, !tbaa !31
  %93 = load ptr, ptr %13, align 8, !tbaa !5
  %94 = getelementptr inbounds i8, ptr %89, i64 32
  store ptr %93, ptr %94, align 8, !tbaa !35
  invoke void @_ZN7MPHouse13InsertSegmentEP9MPSegment(ptr noundef nonnull align 8 dereferenceable(376) %0, ptr noundef nonnull %89)
          to label %95 unwind label %101

95:                                               ; preds = %91
  %96 = load ptr, ptr %10, align 8, !tbaa !29
  invoke void @_ZN5RNMapIiP9MPSegmentE6InsertEiS1_(ptr noundef nonnull align 8 dereferenceable(8) %8, i32 noundef %85, ptr noundef %96)
          to label %105 unwind label %101

97:                                               ; preds = %75, %73
  %98 = landingpad { ptr, i32 }
          cleanup
  br label %140

99:                                               ; preds = %82
  %100 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #11
  br label %137

101:                                              ; preds = %95, %91, %88, %83
  %102 = landingpad { ptr, i32 }
          cleanup
  br label %137

103:                                              ; preds = %90
  %104 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %89, i64 noundef 152) #14
  br label %137

105:                                              ; preds = %95, %87
  %106 = load ptr, ptr %13, align 8, !tbaa !5
  %107 = invoke noundef ptr @_ZNK6R3Mesh4FaceEi(ptr noundef nonnull align 8 dereferenceable(272) %106, i32 noundef %.042)
          to label %108 unwind label %133

108:                                              ; preds = %105
  %109 = load ptr, ptr %13, align 8, !tbaa !5
  call void @_ZN6R3Mesh15SetFaceMaterialEP10R3MeshFacei(ptr noundef nonnull align 8 dereferenceable(272) %109, ptr noundef %107, i32 noundef %85)
  %110 = load ptr, ptr %10, align 8, !tbaa !29
  %111 = getelementptr inbounds i8, ptr %110, i64 40
  %112 = invoke noundef ptr @_ZN7RNArrayIP10R3MeshFaceE6InsertES1_(ptr noundef nonnull align 8 dereferenceable(16) %111, ptr noundef %107)
          to label %113 unwind label %133

113:                                              ; preds = %108
  %114 = load ptr, ptr %13, align 8, !tbaa !5
  %115 = invoke noundef double @_ZNK6R3Mesh8FaceAreaEPK10R3MeshFace(ptr noundef nonnull align 8 dereferenceable(272) %114, ptr noundef %107)
          to label %116 unwind label %133

116:                                              ; preds = %113
  %117 = load ptr, ptr %10, align 8, !tbaa !29
  %118 = getelementptr inbounds i8, ptr %117, i64 56
  %119 = load double, ptr %118, align 8, !tbaa !36
  %120 = fadd double %115, %119
  store double %120, ptr %118, align 8, !tbaa !36
  %121 = load ptr, ptr %13, align 8, !tbaa !5
  %122 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZNK6R3Mesh8FaceBBoxEPK10R3MeshFace(ptr noundef nonnull align 8 dereferenceable(272) %121, ptr noundef %107)
          to label %123 unwind label %133

123:                                              ; preds = %116
  %124 = getelementptr inbounds i8, ptr %117, i64 88
  invoke void @_ZN5R3Box5UnionERKS_(ptr noundef nonnull align 8 dereferenceable(56) %124, ptr noundef nonnull align 8 dereferenceable(56) %122)
          to label %125 unwind label %133

125:                                              ; preds = %123
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %12) #11
  %126 = load ptr, ptr %10, align 8, !tbaa !29
  %127 = getelementptr inbounds i8, ptr %126, i64 88
  invoke void @_ZNK5R3Box8CentroidEv(ptr dead_on_unwind nonnull writable sret(%class.R3Point) align 8 %12, ptr noundef nonnull align 8 dereferenceable(56) %127)
          to label %128 unwind label %135

128:                                              ; preds = %125
  %129 = load ptr, ptr %10, align 8, !tbaa !29
  %130 = getelementptr inbounds i8, ptr %129, i64 64
  %131 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN7R3PointaSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %130, ptr noundef nonnull align 8 dereferenceable(24) %12)
          to label %132 unwind label %135

132:                                              ; preds = %128
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #11
  br label %138

133:                                              ; preds = %123, %116, %113, %108, %105
  %134 = landingpad { ptr, i32 }
          cleanup
  br label %137

135:                                              ; preds = %128, %125
  %136 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #11
  br label %137

137:                                              ; preds = %133, %135, %103, %101, %99
  %.pn.pn = phi { ptr, i32 } [ %102, %101 ], [ %104, %103 ], [ %100, %99 ], [ %136, %135 ], [ %134, %133 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #11
  call void @_ZN4Json5ValueD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %9) #11
  br label %140

138:                                              ; preds = %132, %78, %76
  call void @_ZN4Json5ValueD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %9) #11
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %9) #11
  %139 = add i32 %.042, 1
  br label %.preheader, !llvm.loop !37

140:                                              ; preds = %137, %97
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %137 ], [ %98, %97 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %9) #11
  br label %141

141:                                              ; preds = %140, %71
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %140 ], [ %72, %71 ]
  call void @_ZN5RNMapIiP9MPSegmentED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #11
  br label %142

142:                                              ; preds = %141, %69
  %.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn, %141 ], [ %70, %69 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #11
  call void @_ZN4Json5ValueD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %7) #11
  br label %143

143:                                              ; preds = %142, %67
  %.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn, %142 ], [ %68, %67 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %7) #11
  br label %145

144:                                              ; preds = %66, %56, %44
  %.0 = phi i32 [ 1, %66 ], [ 0, %56 ], [ 0, %44 ]
  call void @_ZN4Json6ReaderD2Ev(ptr noundef nonnull align 8 dereferenceable(269) %6) #11
  call void @llvm.lifetime.end.p0(i64 272, ptr nonnull %6) #11
  call void @_ZN4Json5ValueD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %5) #11
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %5) #11
  br label %148

145:                                              ; preds = %143, %51
  %.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn.pn, %143 ], [ %52, %51 ]
  call void @_ZN4Json6ReaderD2Ev(ptr noundef nonnull align 8 dereferenceable(269) %6) #11
  br label %146

146:                                              ; preds = %145, %49
  %.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn.pn.pn, %145 ], [ %50, %49 ]
  call void @llvm.lifetime.end.p0(i64 272, ptr nonnull %6) #11
  call void @_ZN4Json5ValueD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %5) #11
  br label %147

147:                                              ; preds = %146, %47
  %.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn.pn.pn.pn, %146 ], [ %48, %47 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %5) #11
  br label %149

148:                                              ; preds = %144, %28
  %.1 = phi i32 [ 0, %28 ], [ %.0, %144 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #11
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #11
  br label %150

149:                                              ; preds = %33, %147, %31
  %.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %32, %31 ], [ %.pn.pn.pn.pn.pn.pn.pn.pn.pn, %147 ], [ %34, %33 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #11
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #11
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #11
  resume { ptr, i32 } %.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn

150:                                              ; preds = %148, %17
  %.2 = phi i32 [ %.1, %148 ], [ 0, %17 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #11
  br label %151

151:                                              ; preds = %2, %150
  %.3 = phi i32 [ %.2, %150 ], [ 0, %2 ]
  ret i32 %.3
}

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

; Function Attrs: nofree nounwind
declare noundef i32 @fseek(ptr nocapture noundef, i64 noundef, i32 noundef) local_unnamed_addr #6

; Function Attrs: nofree nounwind
declare noundef i64 @ftell(ptr nocapture noundef) local_unnamed_addr #6

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) local_unnamed_addr #7

; Function Attrs: nofree nounwind
declare noundef i64 @fread(ptr nocapture noundef, i64 noundef, i64 noundef, ptr nocapture noundef) local_unnamed_addr #6

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

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPv(ptr noundef) local_unnamed_addr #1

declare void @_ZN4Json5ValueC1ENS_9ValueTypeE(ptr noundef nonnull align 8 dereferenceable(40), i32 noundef) unnamed_addr #2

declare void @_ZN4Json6ReaderC1Ev(ptr noundef nonnull align 8 dereferenceable(269)) unnamed_addr #2

declare noundef zeroext i1 @_ZN4Json6Reader5parseERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERNS_5ValueEb(ptr noundef nonnull align 8 dereferenceable(269), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(40), i1 noundef zeroext) local_unnamed_addr #2

declare noundef zeroext i1 @_ZNK4Json5Value8isMemberEPKc(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef) local_unnamed_addr #2

declare noundef nonnull align 8 dereferenceable(40) ptr @_ZN4Json5ValueixEPKc(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef) local_unnamed_addr #2

declare void @_ZN4Json5ValueC1ERKS0_(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #2

declare noundef i32 @_ZNK4Json5Value4sizeEv(ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #2

declare noundef nonnull align 8 dereferenceable(40) ptr @_ZN4Json5ValueixEj(ptr noundef nonnull align 8 dereferenceable(40), i32 noundef) local_unnamed_addr #2

declare void @_ZNK4Json5Value8asStringB5cxx11Ev(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6R3Mesh15SetFaceMaterialEP10R3MeshFacei(ptr noundef nonnull align 8 dereferenceable(272), ptr noundef, i32 noundef) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef double @_ZNK6R3Mesh8FaceAreaEPK10R3MeshFace(ptr noundef nonnull align 8 dereferenceable(272), ptr noundef) local_unnamed_addr #5 align 2

declare void @_ZNK5R3Box8CentroidEv(ptr dead_on_unwind writable sret(%class.R3Point) align 8, ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #2

; Function Attrs: nounwind
declare void @_ZN4Json5ValueD1Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #10

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN4Json6ReaderD2Ev(ptr noundef nonnull align 8 dereferenceable(269)) unnamed_addr #4 align 2

declare void @_ZN9MPSegmentC1Ev(ptr) local_unnamed_addr

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nobuiltin nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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 uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 #6 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nobuiltin allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { 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 #9 = { inlinehint mustprogress nofree nounwind willreturn memory(read) 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 #10 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #11 = { nounwind }
attributes #12 = { cold nounwind }
attributes #13 = { builtin allocsize(0) }
attributes #14 = { builtin nounwind }
attributes #15 = { nounwind willreturn memory(read) }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !9, i64 296}
!6 = !{!"_ZTS7MPHouse", !7, i64 0, !13, i64 16, !14, i64 32, !15, i64 48, !16, i64 64, !17, i64 80, !18, i64 96, !19, i64 112, !20, i64 128, !21, i64 144, !22, i64 160, !9, i64 288, !9, i64 296, !25, i64 304, !9, i64 360, !9, i64 368}
!7 = !{!"_ZTS7RNArrayIP7MPImageE", !8, i64 0}
!8 = !{!"_ZTS8RNVArray", !9, i64 0, !12, i64 8, !12, i64 12}
!9 = !{!"any pointer", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C++ TBAA"}
!12 = !{!"int", !10, i64 0}
!13 = !{!"_ZTS7RNArrayIP10MPPanoramaE", !8, i64 0}
!14 = !{!"_ZTS7RNArrayIP10MPCategoryE", !8, i64 0}
!15 = !{!"_ZTS7RNArrayIP9MPSegmentE", !8, i64 0}
!16 = !{!"_ZTS7RNArrayIP8MPObjectE", !8, i64 0}
!17 = !{!"_ZTS7RNArrayIP8MPVertexE", !8, i64 0}
!18 = !{!"_ZTS7RNArrayIP9MPSurfaceE", !8, i64 0}
!19 = !{!"_ZTS7RNArrayIP8MPRegionE", !8, i64 0}
!20 = !{!"_ZTS7RNArrayIP8MPPortalE", !8, i64 0}
!21 = !{!"_ZTS7RNArrayIP7MPLevelE", !8, i64 0}
!22 = !{!"_ZTS17RGBDConfiguration", !23, i64 8, !24, i64 24, !9, i64 40, !9, i64 48, !9, i64 56, !9, i64 64, !25, i64 72}
!23 = !{!"_ZTS7RNArrayIP9RGBDImageE", !8, i64 0}
!24 = !{!"_ZTS7RNArrayIP11RGBDSurfaceE", !8, i64 0}
!25 = !{!"_ZTS5R3Box", !26, i64 0, !28, i64 8, !28, i64 32}
!26 = !{!"_ZTS7R3Solid", !27, i64 0}
!27 = !{!"_ZTS7R3Shape"}
!28 = !{!"_ZTS7R3Point", !10, i64 0}
!29 = !{!9, !9, i64 0}
!30 = !{!10, !10, i64 0}
!31 = !{!32, !12, i64 144}
!32 = !{!"_ZTS9MPSegment", !9, i64 0, !12, i64 8, !9, i64 16, !12, i64 24, !9, i64 32, !33, i64 40, !34, i64 56, !28, i64 64, !25, i64 88, !12, i64 144}
!33 = !{!"_ZTS7RNArrayIP10R3MeshFaceE", !8, i64 0}
!34 = !{!"double", !10, i64 0}
!35 = !{!32, !9, i64 32}
!36 = !{!32, !34, i64 56}
!37 = distinct !{!37, !38}
!38 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,LCSSAPass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass