; LLVM IR from niessner/Matterport :: code/gaps/pkgs/R3Graphics/R3Scene.ll (ZN7R3Scene11ReadPlyFileEPKcP11R3SceneNode)

; 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.R3Mesh = type { ptr, %class.RNArray.7, %class.RNArray.8, %class.RNArray.9, ptr, ptr, ptr, [128 x i8], %class.R3Box, ptr }
%class.RNArray.7 = type { %class.RNVArray }
%class.RNVArray = type { ptr, i32, i32 }
%class.RNArray.8 = type { %class.RNVArray }
%class.RNArray.9 = type { %class.RNVArray }
%class.R3Box = type { %class.R3Solid, %class.R3Point, %class.R3Point }
%class.R3Solid = type { %class.R3Shape }
%class.R3Shape = type { ptr }
%class.R3Point = type { [3 x double] }
%class.RNArray.10 = type { %class.RNVArray }
%class.RNSymbolTable.11 = type { %class.RNMap.12 }
%class.RNMap.12 = type { ptr }
%"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.std::allocator" = type { i8 }
%"struct.std::_Rb_tree_iterator" = type { ptr }
%class.R3Scene = type { ptr, %class.RNArray, %class.RNArray.0, %class.RNArray.1, %class.RNArray.2, %class.RNArray.3, %class.RNArray.4, %class.RNSymbolTable, %class.R3Viewer, %class.RNRgb, %class.RNRgb, ptr, ptr, ptr }
%class.RNArray = type { %class.RNVArray }
%class.RNArray.0 = type { %class.RNVArray }
%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.RNSymbolTable = type { %class.RNMap }
%class.RNMap = type { ptr }
%class.R3Viewer = type { ptr, %class.R3Camera, %class.R2Viewport }
%class.R3Camera = type { %class.R3CoordSystem, double, double, double, double, double, ptr }
%class.R3CoordSystem = type { %class.R3Point, %class.R3Triad }
%class.R3Triad = type { [3 x %class.R3Vector] }
%class.R3Vector = type { [3 x double] }
%class.R2Viewport = type { i32, i32, i32, i32 }
%class.RNRgb = type { [3 x double] }
%"struct.std::pair" = type { %"class.std::__cxx11::basic_string", ptr }

@stderr = external global ptr, align 8
@.str.39 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.41 = external hidden unnamed_addr constant [6 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

declare void @_ZN11R3SceneNodeC1EP7R3Scene(ptr noundef nonnull align 8 dereferenceable(432), ptr noundef) unnamed_addr #1

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

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

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

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

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

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

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

; Function Attrs: nounwind
declare noalias ptr @strdup(ptr noundef) #7

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #8

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN7R3Scene11ReadPlyFileEPKcP11R3SceneNode(ptr noundef nonnull align 8 dereferenceable(352) %0, ptr noundef %1, ptr noundef %2) #6 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca %class.R3Mesh, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca %class.RNArray.10, align 8
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca ptr, align 8
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca [1024 x i8], align 16
  %24 = alloca ptr, align 8
  %25 = alloca %class.RNSymbolTable.11, align 8
  %26 = alloca i32, align 4
  %27 = alloca ptr, align 8
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca i32, align 4
  %31 = alloca i32, align 4
  %32 = alloca i32, align 4
  %33 = alloca ptr, align 8
  %34 = alloca ptr, align 8
  %35 = alloca ptr, align 8
  %36 = alloca ptr, align 8
  %37 = alloca ptr, align 8
  %38 = alloca %"class.std::__cxx11::basic_string", align 8
  %39 = alloca %"class.std::allocator", align 1
  %40 = alloca %"class.std::__cxx11::basic_string", align 8
  %41 = alloca %"class.std::allocator", align 1
  %42 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %43 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %44 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %45 = alloca %"class.std::__cxx11::basic_string", align 8
  %46 = alloca ptr, align 8
  %47 = alloca ptr, align 8
  %48 = alloca ptr, align 8
  %49 = alloca i32, align 4
  %50 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %51 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  %52 = load ptr, ptr %5, align 8
  %53 = load ptr, ptr %7, align 8, !tbaa !5
  %54 = icmp ne ptr %53, null
  br i1 %54, label %58, label %55

55:                                               ; preds = %3
  %56 = getelementptr inbounds %class.R3Scene, ptr %52, i32 0, i32 0
  %57 = load ptr, ptr %56, align 8, !tbaa !9
  store ptr %57, ptr %7, align 8, !tbaa !5
  br label %58

58:                                               ; preds = %55, %3
  call void @llvm.lifetime.start.p0(i64 272, ptr %8) #11
  call void @_ZN6R3MeshC1Ev(ptr noundef nonnull align 8 dereferenceable(272) %8)
  %59 = load ptr, ptr %6, align 8, !tbaa !5
  %60 = invoke noundef i32 @_ZN6R3Mesh8ReadFileEPKc(ptr noundef nonnull align 8 dereferenceable(272) %8, ptr noundef %59)
          to label %61 unwind label %67

61:                                               ; preds = %58
  %62 = icmp ne i32 %60, 0
  br i1 %62, label %71, label %63

63:                                               ; preds = %61
  %64 = load ptr, ptr @stderr, align 8, !tbaa !5
  %65 = load ptr, ptr %6, align 8, !tbaa !5
  %66 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %64, ptr noundef @.str.39, ptr noundef %65) #11
  store i32 0, ptr %4, align 4
  store i32 1, ptr %11, align 4
  br label %535

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

71:                                               ; preds = %61
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #11
  invoke void @_ZN7RNArrayIP16R3TriangleVertexEC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %12)
          to label %72 unwind label %79

72:                                               ; preds = %71
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #11
  store i32 0, ptr %13, align 4, !tbaa !29
  br label %73

73:                                               ; preds = %137, %72
  %74 = load i32, ptr %13, align 4, !tbaa !29
  %75 = invoke noundef i32 @_ZNK6R3Mesh9NVerticesEv(ptr noundef nonnull align 8 dereferenceable(272) %8)
          to label %76 unwind label %83

76:                                               ; preds = %73
  %77 = icmp slt i32 %74, %75
  br i1 %77, label %87, label %78

78:                                               ; preds = %76
  store i32 2, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #11
  br label %144

79:                                               ; preds = %71
  %80 = landingpad { ptr, i32 }
          cleanup
  %81 = extractvalue { ptr, i32 } %80, 0
  store ptr %81, ptr %9, align 8
  %82 = extractvalue { ptr, i32 } %80, 1
  store i32 %82, ptr %10, align 4
  br label %534

83:                                               ; preds = %73
  %84 = landingpad { ptr, i32 }
          cleanup
  %85 = extractvalue { ptr, i32 } %84, 0
  store ptr %85, ptr %9, align 8
  %86 = extractvalue { ptr, i32 } %84, 1
  store i32 %86, ptr %10, align 4
  br label %143

87:                                               ; preds = %76
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #11
  %88 = load i32, ptr %13, align 4, !tbaa !29
  %89 = invoke noundef ptr @_ZNK6R3Mesh6VertexEi(ptr noundef nonnull align 8 dereferenceable(272) %8, i32 noundef %88)
          to label %90 unwind label %110

90:                                               ; preds = %87
  store ptr %89, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #11
  %91 = load ptr, ptr %14, align 8, !tbaa !5
  %92 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6R3Mesh14VertexPositionEPK12R3MeshVertex(ptr noundef nonnull align 8 dereferenceable(272) %8, ptr noundef %91)
          to label %93 unwind label %114

93:                                               ; preds = %90
  store ptr %92, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #11
  %94 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 104) #12
          to label %95 unwind label %118

95:                                               ; preds = %93
  %96 = load ptr, ptr %15, align 8, !tbaa !5
  invoke void @_ZN16R3TriangleVertexC1ERK7R3Point(ptr noundef nonnull align 8 dereferenceable(100) %94, ptr noundef nonnull align 8 dereferenceable(24) %96)
          to label %97 unwind label %122

97:                                               ; preds = %95
  store ptr %94, ptr %16, align 8, !tbaa !5
  %98 = load ptr, ptr %14, align 8, !tbaa !5
  %99 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6R3Mesh11VertexColorEPK12R3MeshVertex(ptr noundef nonnull align 8 dereferenceable(272) %8, ptr noundef %98)
          to label %100 unwind label %118

100:                                              ; preds = %97
  %101 = invoke noundef i32 @_ZNK5RNRgb7IsBlackEv(ptr noundef nonnull align 8 dereferenceable(24) %99)
          to label %102 unwind label %118

102:                                              ; preds = %100
  %103 = icmp ne i32 %101, 0
  br i1 %103, label %126, label %104

104:                                              ; preds = %102
  %105 = load ptr, ptr %16, align 8, !tbaa !5
  %106 = load ptr, ptr %14, align 8, !tbaa !5
  %107 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6R3Mesh11VertexColorEPK12R3MeshVertex(ptr noundef nonnull align 8 dereferenceable(272) %8, ptr noundef %106)
          to label %108 unwind label %118

108:                                              ; preds = %104
  invoke void @_ZN16R3TriangleVertex8SetColorERK5RNRgb(ptr noundef nonnull align 8 dereferenceable(100) %105, ptr noundef nonnull align 8 dereferenceable(24) %107)
          to label %109 unwind label %118

109:                                              ; preds = %108
  br label %126

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

114:                                              ; preds = %90
  %115 = landingpad { ptr, i32 }
          cleanup
  %116 = extractvalue { ptr, i32 } %115, 0
  store ptr %116, ptr %9, align 8
  %117 = extractvalue { ptr, i32 } %115, 1
  store i32 %117, ptr %10, align 4
  br label %141

118:                                              ; preds = %133, %131, %130, %126, %108, %104, %100, %97, %93
  %119 = landingpad { ptr, i32 }
          cleanup
  %120 = extractvalue { ptr, i32 } %119, 0
  store ptr %120, ptr %9, align 8
  %121 = extractvalue { ptr, i32 } %119, 1
  store i32 %121, ptr %10, align 4
  br label %140

122:                                              ; preds = %95
  %123 = landingpad { ptr, i32 }
          cleanup
  %124 = extractvalue { ptr, i32 } %123, 0
  store ptr %124, ptr %9, align 8
  %125 = extractvalue { ptr, i32 } %123, 1
  store i32 %125, ptr %10, align 4
  call void @_ZdlPvm(ptr noundef %94, i64 noundef 104) #13
  br label %140

126:                                              ; preds = %109, %102
  %127 = load ptr, ptr %16, align 8, !tbaa !5
  %128 = load ptr, ptr %14, align 8, !tbaa !5
  %129 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNK6R3Mesh19VertexTextureCoordsEPK12R3MeshVertex(ptr noundef nonnull align 8 dereferenceable(272) %8, ptr noundef %128)
          to label %130 unwind label %118

130:                                              ; preds = %126
  invoke void @_ZN16R3TriangleVertex16SetTextureCoordsERK7R2Point(ptr noundef nonnull align 8 dereferenceable(100) %127, ptr noundef nonnull align 8 dereferenceable(16) %129)
          to label %131 unwind label %118

131:                                              ; preds = %130
  %132 = load ptr, ptr %16, align 8, !tbaa !5
  invoke void @_ZN16R3TriangleVertex13SetSharedFlagEv(ptr noundef nonnull align 8 dereferenceable(100) %132)
          to label %133 unwind label %118

133:                                              ; preds = %131
  %134 = load ptr, ptr %16, align 8, !tbaa !5
  %135 = invoke noundef ptr @_ZN7RNArrayIP16R3TriangleVertexE6InsertES1_(ptr noundef nonnull align 8 dereferenceable(16) %12, ptr noundef %134)
          to label %136 unwind label %118

136:                                              ; preds = %133
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #11
  br label %137

137:                                              ; preds = %136
  %138 = load i32, ptr %13, align 4, !tbaa !29
  %139 = add nsw i32 %138, 1
  store i32 %139, ptr %13, align 4, !tbaa !29
  br label %73, !llvm.loop !30

140:                                              ; preds = %122, %118
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #11
  br label %141

141:                                              ; preds = %140, %114
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #11
  br label %142

142:                                              ; preds = %141, %110
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #11
  br label %143

143:                                              ; preds = %142, %83
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #11
  br label %533

144:                                              ; preds = %78
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #11
  store i32 0, ptr %17, align 4, !tbaa !29
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #11
  store i32 0, ptr %18, align 4, !tbaa !29
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #11
  store i32 0, ptr %19, align 4, !tbaa !29
  br label %145

145:                                              ; preds = %189, %144
  %146 = load i32, ptr %19, align 4, !tbaa !29
  %147 = invoke noundef i32 @_ZNK6R3Mesh6NFacesEv(ptr noundef nonnull align 8 dereferenceable(272) %8)
          to label %148 unwind label %151

148:                                              ; preds = %145
  %149 = icmp slt i32 %146, %147
  br i1 %149, label %155, label %150

150:                                              ; preds = %148
  store i32 5, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #11
  br label %195

151:                                              ; preds = %145
  %152 = landingpad { ptr, i32 }
          cleanup
  %153 = extractvalue { ptr, i32 } %152, 0
  store ptr %153, ptr %9, align 8
  %154 = extractvalue { ptr, i32 } %152, 1
  store i32 %154, ptr %10, align 4
  br label %194

155:                                              ; preds = %148
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #11
  %156 = load i32, ptr %19, align 4, !tbaa !29
  %157 = invoke noundef ptr @_ZNK6R3Mesh4FaceEi(ptr noundef nonnull align 8 dereferenceable(272) %8, i32 noundef %156)
          to label %158 unwind label %170

158:                                              ; preds = %155
  store ptr %157, ptr %20, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #11
  %159 = load ptr, ptr %20, align 8, !tbaa !5
  %160 = invoke noundef i32 @_ZNK6R3Mesh11FaceSegmentEPK10R3MeshFace(ptr noundef nonnull align 8 dereferenceable(272) %8, ptr noundef %159)
          to label %161 unwind label %174

161:                                              ; preds = %158
  store i32 %160, ptr %21, align 4, !tbaa !29
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #11
  %162 = load ptr, ptr %20, align 8, !tbaa !5
  %163 = invoke noundef i32 @_ZNK6R3Mesh12FaceMaterialEPK10R3MeshFace(ptr noundef nonnull align 8 dereferenceable(272) %8, ptr noundef %162)
          to label %164 unwind label %178

164:                                              ; preds = %161
  store i32 %163, ptr %22, align 4, !tbaa !29
  %165 = load i32, ptr %21, align 4, !tbaa !29
  %166 = load i32, ptr %17, align 4, !tbaa !29
  %167 = icmp sgt i32 %165, %166
  br i1 %167, label %168, label %182

168:                                              ; preds = %164
  %169 = load i32, ptr %21, align 4, !tbaa !29
  store i32 %169, ptr %17, align 4, !tbaa !29
  br label %182

170:                                              ; preds = %155
  %171 = landingpad { ptr, i32 }
          cleanup
  %172 = extractvalue { ptr, i32 } %171, 0
  store ptr %172, ptr %9, align 8
  %173 = extractvalue { ptr, i32 } %171, 1
  store i32 %173, ptr %10, align 4
  br label %193

174:                                              ; preds = %158
  %175 = landingpad { ptr, i32 }
          cleanup
  %176 = extractvalue { ptr, i32 } %175, 0
  store ptr %176, ptr %9, align 8
  %177 = extractvalue { ptr, i32 } %175, 1
  store i32 %177, ptr %10, align 4
  br label %192

178:                                              ; preds = %161
  %179 = landingpad { ptr, i32 }
          cleanup
  %180 = extractvalue { ptr, i32 } %179, 0
  store ptr %180, ptr %9, align 8
  %181 = extractvalue { ptr, i32 } %179, 1
  store i32 %181, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #11
  br label %192

182:                                              ; preds = %168, %164
  %183 = load i32, ptr %22, align 4, !tbaa !29
  %184 = load i32, ptr %18, align 4, !tbaa !29
  %185 = icmp sgt i32 %183, %184
  br i1 %185, label %186, label %188

186:                                              ; preds = %182
  %187 = load i32, ptr %22, align 4, !tbaa !29
  store i32 %187, ptr %18, align 4, !tbaa !29
  br label %188

188:                                              ; preds = %186, %182
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #11
  br label %189

189:                                              ; preds = %188
  %190 = load i32, ptr %19, align 4, !tbaa !29
  %191 = add nsw i32 %190, 1
  store i32 %191, ptr %19, align 4, !tbaa !29
  br label %145, !llvm.loop !32

192:                                              ; preds = %178, %174
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #11
  br label %193

193:                                              ; preds = %192, %170
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #11
  br label %194

194:                                              ; preds = %193, %151
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #11
  br label %532

195:                                              ; preds = %150
  call void @llvm.lifetime.start.p0(i64 1024, ptr %23) #11
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #11
  store ptr null, ptr %24, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #11
  invoke void @_ZN13RNSymbolTableIP7RNArrayIP10R3TriangleEEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %25)
          to label %196 unwind label %203

196:                                              ; preds = %195
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #11
  store i32 0, ptr %26, align 4, !tbaa !29
  br label %197

197:                                              ; preds = %374, %196
  %198 = load i32, ptr %26, align 4, !tbaa !29
  %199 = invoke noundef i32 @_ZNK6R3Mesh6NFacesEv(ptr noundef nonnull align 8 dereferenceable(272) %8)
          to label %200 unwind label %207

200:                                              ; preds = %197
  %201 = icmp slt i32 %198, %199
  br i1 %201, label %211, label %202

202:                                              ; preds = %200
  store i32 8, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #11
  br label %389

203:                                              ; preds = %195
  %204 = landingpad { ptr, i32 }
          cleanup
  %205 = extractvalue { ptr, i32 } %204, 0
  store ptr %205, ptr %9, align 8
  %206 = extractvalue { ptr, i32 } %204, 1
  store i32 %206, ptr %10, align 4
  br label %531

207:                                              ; preds = %197
  %208 = landingpad { ptr, i32 }
          cleanup
  %209 = extractvalue { ptr, i32 } %208, 0
  store ptr %209, ptr %9, align 8
  %210 = extractvalue { ptr, i32 } %208, 1
  store i32 %210, ptr %10, align 4
  br label %388

211:                                              ; preds = %200
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #11
  %212 = load i32, ptr %26, align 4, !tbaa !29
  %213 = invoke noundef ptr @_ZNK6R3Mesh4FaceEi(ptr noundef nonnull align 8 dereferenceable(272) %8, i32 noundef %212)
          to label %214 unwind label %221

214:                                              ; preds = %211
  store ptr %213, ptr %27, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #11
  %215 = load ptr, ptr %27, align 8, !tbaa !5
  %216 = invoke noundef i32 @_ZNK6R3Mesh11FaceSegmentEPK10R3MeshFace(ptr noundef nonnull align 8 dereferenceable(272) %8, ptr noundef %215)
          to label %217 unwind label %225

217:                                              ; preds = %214
  store i32 %216, ptr %28, align 4, !tbaa !29
  %218 = load i32, ptr %28, align 4, !tbaa !29
  %219 = icmp slt i32 %218, 0
  br i1 %219, label %220, label %229

220:                                              ; preds = %217
  store i32 0, ptr %28, align 4, !tbaa !29
  br label %229

221:                                              ; preds = %211
  %222 = landingpad { ptr, i32 }
          cleanup
  %223 = extractvalue { ptr, i32 } %222, 0
  store ptr %223, ptr %9, align 8
  %224 = extractvalue { ptr, i32 } %222, 1
  store i32 %224, ptr %10, align 4
  br label %387

225:                                              ; preds = %214
  %226 = landingpad { ptr, i32 }
          cleanup
  %227 = extractvalue { ptr, i32 } %226, 0
  store ptr %227, ptr %9, align 8
  %228 = extractvalue { ptr, i32 } %226, 1
  store i32 %228, ptr %10, align 4
  br label %386

229:                                              ; preds = %220, %217
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #11
  %230 = load ptr, ptr %27, align 8, !tbaa !5
  %231 = invoke noundef i32 @_ZNK6R3Mesh12FaceCategoryEPK10R3MeshFace(ptr noundef nonnull align 8 dereferenceable(272) %8, ptr noundef %230)
          to label %232 unwind label %236

232:                                              ; preds = %229
  store i32 %231, ptr %29, align 4, !tbaa !29
  %233 = load i32, ptr %29, align 4, !tbaa !29
  %234 = icmp slt i32 %233, 0
  br i1 %234, label %235, label %240

235:                                              ; preds = %232
  store i32 0, ptr %29, align 4, !tbaa !29
  br label %240

236:                                              ; preds = %229
  %237 = landingpad { ptr, i32 }
          cleanup
  %238 = extractvalue { ptr, i32 } %237, 0
  store ptr %238, ptr %9, align 8
  %239 = extractvalue { ptr, i32 } %237, 1
  store i32 %239, ptr %10, align 4
  br label %385

240:                                              ; preds = %235, %232
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #11
  %241 = load ptr, ptr %27, align 8, !tbaa !5
  %242 = invoke noundef ptr @_ZNK6R3Mesh12VertexOnFaceEPK10R3MeshFacei(ptr noundef nonnull align 8 dereferenceable(272) %8, ptr noundef %241, i32 noundef 0)
          to label %243 unwind label %305

243:                                              ; preds = %240
  %244 = invoke noundef i32 @_ZNK6R3Mesh8VertexIDEPK12R3MeshVertex(ptr noundef nonnull align 8 dereferenceable(272) %8, ptr noundef %242)
          to label %245 unwind label %305

245:                                              ; preds = %243
  store i32 %244, ptr %30, align 4, !tbaa !29
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #11
  %246 = load ptr, ptr %27, align 8, !tbaa !5
  %247 = invoke noundef ptr @_ZNK6R3Mesh12VertexOnFaceEPK10R3MeshFacei(ptr noundef nonnull align 8 dereferenceable(272) %8, ptr noundef %246, i32 noundef 1)
          to label %248 unwind label %309

248:                                              ; preds = %245
  %249 = invoke noundef i32 @_ZNK6R3Mesh8VertexIDEPK12R3MeshVertex(ptr noundef nonnull align 8 dereferenceable(272) %8, ptr noundef %247)
          to label %250 unwind label %309

250:                                              ; preds = %248
  store i32 %249, ptr %31, align 4, !tbaa !29
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #11
  %251 = load ptr, ptr %27, align 8, !tbaa !5
  %252 = invoke noundef ptr @_ZNK6R3Mesh12VertexOnFaceEPK10R3MeshFacei(ptr noundef nonnull align 8 dereferenceable(272) %8, ptr noundef %251, i32 noundef 2)
          to label %253 unwind label %313

253:                                              ; preds = %250
  %254 = invoke noundef i32 @_ZNK6R3Mesh8VertexIDEPK12R3MeshVertex(ptr noundef nonnull align 8 dereferenceable(272) %8, ptr noundef %252)
          to label %255 unwind label %313

255:                                              ; preds = %253
  store i32 %254, ptr %32, align 4, !tbaa !29
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #11
  %256 = load i32, ptr %30, align 4, !tbaa !29
  %257 = invoke noundef ptr @_ZNK7RNArrayIP16R3TriangleVertexE3KthEi(ptr noundef nonnull align 8 dereferenceable(16) %12, i32 noundef %256)
          to label %258 unwind label %317

258:                                              ; preds = %255
  store ptr %257, ptr %33, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #11
  %259 = load i32, ptr %31, align 4, !tbaa !29
  %260 = invoke noundef ptr @_ZNK7RNArrayIP16R3TriangleVertexE3KthEi(ptr noundef nonnull align 8 dereferenceable(16) %12, i32 noundef %259)
          to label %261 unwind label %321

261:                                              ; preds = %258
  store ptr %260, ptr %34, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #11
  %262 = load i32, ptr %32, align 4, !tbaa !29
  %263 = invoke noundef ptr @_ZNK7RNArrayIP16R3TriangleVertexE3KthEi(ptr noundef nonnull align 8 dereferenceable(16) %12, i32 noundef %262)
          to label %264 unwind label %325

264:                                              ; preds = %261
  store ptr %263, ptr %35, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #11
  %265 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 136) #12
          to label %266 unwind label %329

266:                                              ; preds = %264
  %267 = load ptr, ptr %33, align 8, !tbaa !5
  %268 = load ptr, ptr %34, align 8, !tbaa !5
  %269 = load ptr, ptr %35, align 8, !tbaa !5
  invoke void @_ZN10R3TriangleC1EP16R3TriangleVertexS1_S1_(ptr noundef nonnull align 8 dereferenceable(132) %265, ptr noundef %267, ptr noundef %268, ptr noundef %269)
          to label %270 unwind label %333

270:                                              ; preds = %266
  store ptr %265, ptr %36, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #11
  %271 = load i32, ptr %28, align 4, !tbaa !29
  %272 = icmp eq i32 %271, 0
  br i1 %272, label %273, label %278

273:                                              ; preds = %270
  %274 = load i32, ptr %29, align 4, !tbaa !29
  %275 = icmp eq i32 %274, 0
  br i1 %275, label %276, label %278

276:                                              ; preds = %273
  %277 = load ptr, ptr %24, align 8, !tbaa !5
  br label %279

278:                                              ; preds = %273, %270
  br label %279

279:                                              ; preds = %278, %276
  %280 = phi ptr [ %277, %276 ], [ null, %278 ]
  store ptr %280, ptr %37, align 8, !tbaa !5
  %281 = load ptr, ptr %37, align 8, !tbaa !5
  %282 = icmp ne ptr %281, null
  br i1 %282, label %369, label %283

283:                                              ; preds = %279
  %284 = getelementptr inbounds [1024 x i8], ptr %23, i64 0, i64 0
  %285 = load i32, ptr %28, align 4, !tbaa !29
  %286 = load i32, ptr %29, align 4, !tbaa !29
  %287 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %284, ptr noundef @.str.40, i32 noundef %285, i32 noundef %286) #11
  %288 = getelementptr inbounds [1024 x i8], ptr %23, i64 0, i64 0
  call void @llvm.lifetime.start.p0(i64 1, ptr %39) #11
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %39) #11
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %38, ptr noundef %288, ptr noundef nonnull align 1 dereferenceable(1) %39)
          to label %289 unwind label %337

289:                                              ; preds = %283
  %290 = invoke noundef i32 @_ZNK5RNMapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP7RNArrayIP10R3TriangleEE4FindES5_PSA_(ptr noundef nonnull align 8 dereferenceable(8) %25, ptr noundef %38, ptr noundef %37)
          to label %291 unwind label %341

291:                                              ; preds = %289
  %292 = icmp ne i32 %290, 0
  %293 = xor i1 %292, true
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %38) #11
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %39) #11
  call void @llvm.lifetime.end.p0(i64 1, ptr %39) #11
  br i1 %293, label %294, label %368

294:                                              ; preds = %291
  %295 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 16) #12
          to label %296 unwind label %346

296:                                              ; preds = %294
  invoke void @_ZN7RNArrayIP10R3TriangleEC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %295)
          to label %297 unwind label %350

297:                                              ; preds = %296
  store ptr %295, ptr %37, align 8, !tbaa !5
  %298 = load i32, ptr %28, align 4, !tbaa !29
  %299 = icmp eq i32 %298, 0
  br i1 %299, label %300, label %354

300:                                              ; preds = %297
  %301 = load i32, ptr %29, align 4, !tbaa !29
  %302 = icmp eq i32 %301, 0
  br i1 %302, label %303, label %354

303:                                              ; preds = %300
  %304 = load ptr, ptr %37, align 8, !tbaa !5
  store ptr %304, ptr %24, align 8, !tbaa !5
  br label %354

305:                                              ; preds = %243, %240
  %306 = landingpad { ptr, i32 }
          cleanup
  %307 = extractvalue { ptr, i32 } %306, 0
  store ptr %307, ptr %9, align 8
  %308 = extractvalue { ptr, i32 } %306, 1
  store i32 %308, ptr %10, align 4
  br label %384

309:                                              ; preds = %248, %245
  %310 = landingpad { ptr, i32 }
          cleanup
  %311 = extractvalue { ptr, i32 } %310, 0
  store ptr %311, ptr %9, align 8
  %312 = extractvalue { ptr, i32 } %310, 1
  store i32 %312, ptr %10, align 4
  br label %383

313:                                              ; preds = %253, %250
  %314 = landingpad { ptr, i32 }
          cleanup
  %315 = extractvalue { ptr, i32 } %314, 0
  store ptr %315, ptr %9, align 8
  %316 = extractvalue { ptr, i32 } %314, 1
  store i32 %316, ptr %10, align 4
  br label %382

317:                                              ; preds = %255
  %318 = landingpad { ptr, i32 }
          cleanup
  %319 = extractvalue { ptr, i32 } %318, 0
  store ptr %319, ptr %9, align 8
  %320 = extractvalue { ptr, i32 } %318, 1
  store i32 %320, ptr %10, align 4
  br label %381

321:                                              ; preds = %258
  %322 = landingpad { ptr, i32 }
          cleanup
  %323 = extractvalue { ptr, i32 } %322, 0
  store ptr %323, ptr %9, align 8
  %324 = extractvalue { ptr, i32 } %322, 1
  store i32 %324, ptr %10, align 4
  br label %380

325:                                              ; preds = %261
  %326 = landingpad { ptr, i32 }
          cleanup
  %327 = extractvalue { ptr, i32 } %326, 0
  store ptr %327, ptr %9, align 8
  %328 = extractvalue { ptr, i32 } %326, 1
  store i32 %328, ptr %10, align 4
  br label %379

329:                                              ; preds = %264
  %330 = landingpad { ptr, i32 }
          cleanup
  %331 = extractvalue { ptr, i32 } %330, 0
  store ptr %331, ptr %9, align 8
  %332 = extractvalue { ptr, i32 } %330, 1
  store i32 %332, ptr %10, align 4
  br label %378

333:                                              ; preds = %266
  %334 = landingpad { ptr, i32 }
          cleanup
  %335 = extractvalue { ptr, i32 } %334, 0
  store ptr %335, ptr %9, align 8
  %336 = extractvalue { ptr, i32 } %334, 1
  store i32 %336, ptr %10, align 4
  call void @_ZdlPvm(ptr noundef %265, i64 noundef 136) #13
  br label %378

337:                                              ; preds = %283
  %338 = landingpad { ptr, i32 }
          cleanup
  %339 = extractvalue { ptr, i32 } %338, 0
  store ptr %339, ptr %9, align 8
  %340 = extractvalue { ptr, i32 } %338, 1
  store i32 %340, ptr %10, align 4
  br label %345

341:                                              ; preds = %289
  %342 = landingpad { ptr, i32 }
          cleanup
  %343 = extractvalue { ptr, i32 } %342, 0
  store ptr %343, ptr %9, align 8
  %344 = extractvalue { ptr, i32 } %342, 1
  store i32 %344, ptr %10, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %38) #11
  br label %345

345:                                              ; preds = %341, %337
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %39) #11
  call void @llvm.lifetime.end.p0(i64 1, ptr %39) #11
  br label %377

346:                                              ; preds = %369, %294
  %347 = landingpad { ptr, i32 }
          cleanup
  %348 = extractvalue { ptr, i32 } %347, 0
  store ptr %348, ptr %9, align 8
  %349 = extractvalue { ptr, i32 } %347, 1
  store i32 %349, ptr %10, align 4
  br label %377

350:                                              ; preds = %296
  %351 = landingpad { ptr, i32 }
          cleanup
  %352 = extractvalue { ptr, i32 } %351, 0
  store ptr %352, ptr %9, align 8
  %353 = extractvalue { ptr, i32 } %351, 1
  store i32 %353, ptr %10, align 4
  call void @_ZdlPvm(ptr noundef %295, i64 noundef 16) #13
  br label %377

354:                                              ; preds = %303, %300, %297
  %355 = getelementptr inbounds [1024 x i8], ptr %23, i64 0, i64 0
  call void @llvm.lifetime.start.p0(i64 1, ptr %41) #11
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %41) #11
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %40, ptr noundef %355, ptr noundef nonnull align 1 dereferenceable(1) %41)
          to label %356 unwind label %359

356:                                              ; preds = %354
  %357 = load ptr, ptr %37, align 8, !tbaa !5
  invoke void @_ZN5RNMapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP7RNArrayIP10R3TriangleEE6InsertES5_SA_(ptr noundef nonnull align 8 dereferenceable(8) %25, ptr noundef %40, ptr noundef %357)
          to label %358 unwind label %363

358:                                              ; preds = %356
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %40) #11
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %41) #11
  call void @llvm.lifetime.end.p0(i64 1, ptr %41) #11
  br label %368

359:                                              ; preds = %354
  %360 = landingpad { ptr, i32 }
          cleanup
  %361 = extractvalue { ptr, i32 } %360, 0
  store ptr %361, ptr %9, align 8
  %362 = extractvalue { ptr, i32 } %360, 1
  store i32 %362, ptr %10, align 4
  br label %367

363:                                              ; preds = %356
  %364 = landingpad { ptr, i32 }
          cleanup
  %365 = extractvalue { ptr, i32 } %364, 0
  store ptr %365, ptr %9, align 8
  %366 = extractvalue { ptr, i32 } %364, 1
  store i32 %366, ptr %10, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %40) #11
  br label %367

367:                                              ; preds = %363, %359
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %41) #11
  call void @llvm.lifetime.end.p0(i64 1, ptr %41) #11
  br label %377

368:                                              ; preds = %358, %291
  br label %369

369:                                              ; preds = %368, %279
  %370 = load ptr, ptr %37, align 8, !tbaa !5
  %371 = load ptr, ptr %36, align 8, !tbaa !5
  %372 = invoke noundef ptr @_ZN7RNArrayIP10R3TriangleE6InsertES1_(ptr noundef nonnull align 8 dereferenceable(16) %370, ptr noundef %371)
          to label %373 unwind label %346

373:                                              ; preds = %369
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #11
  br label %374

374:                                              ; preds = %373
  %375 = load i32, ptr %26, align 4, !tbaa !29
  %376 = add nsw i32 %375, 1
  store i32 %376, ptr %26, align 4, !tbaa !29
  br label %197, !llvm.loop !33

377:                                              ; preds = %367, %350, %346, %345
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #11
  br label %378

378:                                              ; preds = %377, %333, %329
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #11
  br label %379

379:                                              ; preds = %378, %325
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #11
  br label %380

380:                                              ; preds = %379, %321
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #11
  br label %381

381:                                              ; preds = %380, %317
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #11
  br label %382

382:                                              ; preds = %381, %313
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #11
  br label %383

383:                                              ; preds = %382, %309
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #11
  br label %384

384:                                              ; preds = %383, %305
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #11
  br label %385

385:                                              ; preds = %384, %236
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #11
  br label %386

386:                                              ; preds = %385, %225
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #11
  br label %387

387:                                              ; preds = %386, %221
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #11
  br label %388

388:                                              ; preds = %387, %207
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #11
  br label %530

389:                                              ; preds = %202
  call void @llvm.lifetime.start.p0(i64 8, ptr %42) #11
  call void @_ZNSt17_Rb_tree_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP7RNArrayIP10R3TriangleEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %42) #11
  call void @llvm.lifetime.start.p0(i64 8, ptr %43) #11
  %390 = getelementptr inbounds %class.RNMap.12, ptr %25, i32 0, i32 0
  %391 = load ptr, ptr %390, align 8, !tbaa !34
  %392 = call ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP7RNArrayIP10R3TriangleE15RNMapComparatorIS5_ESaISt4pairIKS5_SA_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %391) #11
  %393 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %43, i32 0, i32 0
  store ptr %392, ptr %393, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %42, ptr align 8 %43, i64 8, i1 false), !tbaa.struct !36
  call void @llvm.lifetime.end.p0(i64 8, ptr %43) #11
  br label %394

394:                                              ; preds = %498, %389
  call void @llvm.lifetime.start.p0(i64 8, ptr %44) #11
  %395 = getelementptr inbounds %class.RNMap.12, ptr %25, i32 0, i32 0
  %396 = load ptr, ptr %395, align 8, !tbaa !34
  %397 = call ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP7RNArrayIP10R3TriangleE15RNMapComparatorIS5_ESaISt4pairIKS5_SA_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %396) #11
  %398 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %44, i32 0, i32 0
  store ptr %397, ptr %398, align 8
  %399 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP7RNArrayIP10R3TriangleEEESG_(ptr noundef nonnull align 8 dereferenceable(8) %42, ptr noundef nonnull align 8 dereferenceable(8) %44) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %44) #11
  br i1 %399, label %400, label %505

400:                                              ; preds = %394
  call void @llvm.lifetime.start.p0(i64 32, ptr %45) #11
  %401 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP7RNArrayIP10R3TriangleEEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %42) #11
  %402 = getelementptr inbounds %"struct.std::pair", ptr %401, i32 0, i32 0
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %45, ptr noundef nonnull align 8 dereferenceable(32) %402)
          to label %403 unwind label %416

403:                                              ; preds = %400
  call void @llvm.lifetime.start.p0(i64 8, ptr %46) #11
  %404 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP7RNArrayIP10R3TriangleEEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %42) #11
  %405 = getelementptr inbounds %"struct.std::pair", ptr %404, i32 0, i32 1
  %406 = load ptr, ptr %405, align 8, !tbaa !37
  store ptr %406, ptr %46, align 8, !tbaa !5
  %407 = load ptr, ptr %46, align 8, !tbaa !5
  %408 = invoke noundef i32 @_ZNK8RNVArray7IsEmptyEv(ptr noundef nonnull align 8 dereferenceable(16) %407)
          to label %409 unwind label %420

409:                                              ; preds = %403
  %410 = icmp ne i32 %408, 0
  br i1 %410, label %411, label %424

411:                                              ; preds = %409
  %412 = load ptr, ptr %46, align 8, !tbaa !5
  %413 = icmp eq ptr %412, null
  br i1 %413, label %415, label %414

414:                                              ; preds = %411
  call void @_ZN8RNVArrayD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %412) #11
  call void @_ZdlPvm(ptr noundef %412, i64 noundef 16) #13
  br label %415

415:                                              ; preds = %414, %411
  store i32 13, ptr %11, align 4
  br label %495

416:                                              ; preds = %400
  %417 = landingpad { ptr, i32 }
          cleanup
  %418 = extractvalue { ptr, i32 } %417, 0
  store ptr %418, ptr %9, align 8
  %419 = extractvalue { ptr, i32 } %417, 1
  store i32 %419, ptr %10, align 4
  br label %504

420:                                              ; preds = %403
  %421 = landingpad { ptr, i32 }
          cleanup
  %422 = extractvalue { ptr, i32 } %421, 0
  store ptr %422, ptr %9, align 8
  %423 = extractvalue { ptr, i32 } %421, 1
  store i32 %423, ptr %10, align 4
  br label %503

424:                                              ; preds = %409
  call void @llvm.lifetime.start.p0(i64 8, ptr %47) #11
  %425 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 432) #12
          to label %426 unwind label %434

426:                                              ; preds = %424
  invoke void @_ZN11R3SceneNodeC1EP7R3Scene(ptr noundef nonnull align 8 dereferenceable(432) %425, ptr noundef %52)
          to label %427 unwind label %438

427:                                              ; preds = %426
  store ptr %425, ptr %47, align 8, !tbaa !5
  %428 = load ptr, ptr %47, align 8, !tbaa !5
  %429 = load ptr, ptr %46, align 8, !tbaa !5
  %430 = invoke noundef i32 @_ZL18InsertSceneElementP7R3SceneP11R3SceneNodeP10R3MaterialRK7RNArrayIP16R3TriangleVertexERKS5_IP10R3TriangleE(ptr noundef %52, ptr noundef %428, ptr noundef null, ptr noundef nonnull align 8 dereferenceable(16) %12, ptr noundef nonnull align 8 dereferenceable(16) %429)
          to label %431 unwind label %434

431:                                              ; preds = %427
  %432 = icmp ne i32 %430, 0
  br i1 %432, label %442, label %433

433:                                              ; preds = %431
  store i32 0, ptr %4, align 4
  store i32 1, ptr %11, align 4
  br label %494

434:                                              ; preds = %442, %427, %424
  %435 = landingpad { ptr, i32 }
          cleanup
  %436 = extractvalue { ptr, i32 } %435, 0
  store ptr %436, ptr %9, align 8
  %437 = extractvalue { ptr, i32 } %435, 1
  store i32 %437, ptr %10, align 4
  br label %502

438:                                              ; preds = %426
  %439 = landingpad { ptr, i32 }
          cleanup
  %440 = extractvalue { ptr, i32 } %439, 0
  store ptr %440, ptr %9, align 8
  %441 = extractvalue { ptr, i32 } %439, 1
  store i32 %441, ptr %10, align 4
  call void @_ZdlPvm(ptr noundef %425, i64 noundef 432) #13
  br label %502

442:                                              ; preds = %431
  %443 = load ptr, ptr %47, align 8, !tbaa !5
  %444 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %45) #11
  invoke void @_ZN11R3SceneNode7SetNameEPKc(ptr noundef nonnull align 8 dereferenceable(432) %443, ptr noundef %444)
          to label %445 unwind label %434

445:                                              ; preds = %442
  call void @llvm.lifetime.start.p0(i64 8, ptr %48) #11
  %446 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %45) #11
  %447 = call noundef ptr @strchr(ptr noundef %446, i32 noundef 95) #14
  store ptr %447, ptr %48, align 8, !tbaa !5
  %448 = load ptr, ptr %48, align 8, !tbaa !5
  %449 = icmp ne ptr %448, null
  br i1 %449, label %450, label %460

450:                                              ; preds = %445
  %451 = load ptr, ptr %47, align 8, !tbaa !5
  %452 = load ptr, ptr %48, align 8, !tbaa !5
  %453 = getelementptr inbounds i8, ptr %452, i64 1
  %454 = call noalias ptr @strdup(ptr noundef %453) #11
  invoke void @_ZN11R3SceneNode10InsertInfoEPKcS1_(ptr noundef nonnull align 8 dereferenceable(432) %451, ptr noundef @.str.41, ptr noundef %454)
          to label %455 unwind label %456

455:                                              ; preds = %450
  br label %460

456:                                              ; preds = %460, %450
  %457 = landingpad { ptr, i32 }
          cleanup
  %458 = extractvalue { ptr, i32 } %457, 0
  store ptr %458, ptr %9, align 8
  %459 = extractvalue { ptr, i32 } %457, 1
  store i32 %459, ptr %10, align 4
  br label %501

460:                                              ; preds = %455, %445
  %461 = load ptr, ptr %7, align 8, !tbaa !5
  %462 = load ptr, ptr %47, align 8, !tbaa !5
  invoke void @_ZN11R3SceneNode11InsertChildEPS_(ptr noundef nonnull align 8 dereferenceable(432) %461, ptr noundef %462)
          to label %463 unwind label %456

463:                                              ; preds = %460
  call void @llvm.lifetime.start.p0(i64 4, ptr %49) #11
  store i32 0, ptr %49, align 4, !tbaa !29
  br label %464

464:                                              ; preds = %486, %463
  %465 = load i32, ptr %49, align 4, !tbaa !29
  %466 = load ptr, ptr %46, align 8, !tbaa !5
  %467 = invoke noundef i32 @_ZNK8RNVArray8NEntriesEv(ptr noundef nonnull align 8 dereferenceable(16) %466)
          to label %468 unwind label %471

468:                                              ; preds = %464
  %469 = icmp slt i32 %465, %467
  br i1 %469, label %475, label %470

470:                                              ; preds = %468
  store i32 14, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %49) #11
  br label %489

471:                                              ; preds = %475, %464
  %472 = landingpad { ptr, i32 }
          cleanup
  %473 = extractvalue { ptr, i32 } %472, 0
  store ptr %473, ptr %9, align 8
  %474 = extractvalue { ptr, i32 } %472, 1
  store i32 %474, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %49) #11
  br label %501

475:                                              ; preds = %468
  %476 = load ptr, ptr %46, align 8, !tbaa !5
  %477 = load i32, ptr %49, align 4, !tbaa !29
  %478 = invoke noundef ptr @_ZNK7RNArrayIP10R3TriangleE3KthEi(ptr noundef nonnull align 8 dereferenceable(16) %476, i32 noundef %477)
          to label %479 unwind label %471

479:                                              ; preds = %475
  %480 = icmp eq ptr %478, null
  br i1 %480, label %485, label %481

481:                                              ; preds = %479
  %482 = load ptr, ptr %478, align 8, !tbaa !42
  %483 = getelementptr inbounds ptr, ptr %482, i64 1
  %484 = load ptr, ptr %483, align 8
  call void %484(ptr noundef nonnull align 8 dereferenceable(132) %478) #11
  br label %485

485:                                              ; preds = %481, %479
  br label %486

486:                                              ; preds = %485
  %487 = load i32, ptr %49, align 4, !tbaa !29
  %488 = add nsw i32 %487, 1
  store i32 %488, ptr %49, align 4, !tbaa !29
  br label %464, !llvm.loop !44

489:                                              ; preds = %470
  %490 = load ptr, ptr %46, align 8, !tbaa !5
  %491 = icmp eq ptr %490, null
  br i1 %491, label %493, label %492

492:                                              ; preds = %489
  call void @_ZN8RNVArrayD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %490) #11
  call void @_ZdlPvm(ptr noundef %490, i64 noundef 16) #13
  br label %493

493:                                              ; preds = %492, %489
  call void @llvm.lifetime.end.p0(i64 8, ptr %48) #11
  store i32 0, ptr %11, align 4
  br label %494

494:                                              ; preds = %493, %433
  call void @llvm.lifetime.end.p0(i64 8, ptr %47) #11
  br label %495

495:                                              ; preds = %494, %415
  call void @llvm.lifetime.end.p0(i64 8, ptr %46) #11
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %45) #11
  call void @llvm.lifetime.end.p0(i64 32, ptr %45) #11
  %496 = load i32, ptr %11, align 4
  switch i32 %496, label %528 [
    i32 0, label %497
    i32 13, label %498
  ]

497:                                              ; preds = %495
  br label %498

498:                                              ; preds = %497, %495
  %499 = call ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP7RNArrayIP10R3TriangleEEEppEi(ptr noundef nonnull align 8 dereferenceable(8) %42, i32 noundef 0) #11
  %500 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %50, i32 0, i32 0
  store ptr %499, ptr %500, align 8
  br label %394, !llvm.loop !45

501:                                              ; preds = %471, %456
  call void @llvm.lifetime.end.p0(i64 8, ptr %48) #11
  br label %502

502:                                              ; preds = %501, %438, %434
  call void @llvm.lifetime.end.p0(i64 8, ptr %47) #11
  br label %503

503:                                              ; preds = %502, %420
  call void @llvm.lifetime.end.p0(i64 8, ptr %46) #11
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %45) #11
  br label %504

504:                                              ; preds = %503, %416
  call void @llvm.lifetime.end.p0(i64 32, ptr %45) #11
  br label %529

505:                                              ; preds = %394
  call void @llvm.lifetime.start.p0(i64 4, ptr %51) #11
  store i32 0, ptr %51, align 4, !tbaa !29
  br label %506

506:                                              ; preds = %524, %505
  %507 = load i32, ptr %51, align 4, !tbaa !29
  %508 = invoke noundef i32 @_ZNK8RNVArray8NEntriesEv(ptr noundef nonnull align 8 dereferenceable(16) %12)
          to label %509 unwind label %512

509:                                              ; preds = %506
  %510 = icmp slt i32 %507, %508
  br i1 %510, label %516, label %511

511:                                              ; preds = %509
  store i32 17, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %51) #11
  br label %527

512:                                              ; preds = %516, %506
  %513 = landingpad { ptr, i32 }
          cleanup
  %514 = extractvalue { ptr, i32 } %513, 0
  store ptr %514, ptr %9, align 8
  %515 = extractvalue { ptr, i32 } %513, 1
  store i32 %515, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %51) #11
  br label %529

516:                                              ; preds = %509
  %517 = load i32, ptr %51, align 4, !tbaa !29
  %518 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7RNArrayIP16R3TriangleVertexEixEi(ptr noundef nonnull align 8 dereferenceable(16) %12, i32 noundef %517)
          to label %519 unwind label %512

519:                                              ; preds = %516
  %520 = load ptr, ptr %518, align 8, !tbaa !5
  %521 = icmp eq ptr %520, null
  br i1 %521, label %523, label %522

522:                                              ; preds = %519
  call void @_ZdlPvm(ptr noundef %520, i64 noundef 104) #13
  br label %523

523:                                              ; preds = %522, %519
  br label %524

524:                                              ; preds = %523
  %525 = load i32, ptr %51, align 4, !tbaa !29
  %526 = add nsw i32 %525, 1
  store i32 %526, ptr %51, align 4, !tbaa !29
  br label %506, !llvm.loop !46

527:                                              ; preds = %511
  store i32 1, ptr %4, align 4
  store i32 1, ptr %11, align 4
  br label %528

528:                                              ; preds = %527, %495
  call void @llvm.lifetime.end.p0(i64 8, ptr %42) #11
  call void @_ZN5RNMapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP7RNArrayIP10R3TriangleEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %25) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #11
  call void @llvm.lifetime.end.p0(i64 1024, ptr %23) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #11
  call void @_ZN8RNVArrayD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %12) #11
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #11
  br label %535

529:                                              ; preds = %512, %504
  call void @llvm.lifetime.end.p0(i64 8, ptr %42) #11
  br label %530

530:                                              ; preds = %529, %388
  call void @_ZN5RNMapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP7RNArrayIP10R3TriangleEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %25) #11
  br label %531

531:                                              ; preds = %530, %203
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #11
  call void @llvm.lifetime.end.p0(i64 1024, ptr %23) #11
  br label %532

532:                                              ; preds = %531, %194
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #11
  br label %533

533:                                              ; preds = %532, %143
  call void @_ZN8RNVArrayD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %12) #11
  br label %534

534:                                              ; preds = %533, %79
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #11
  br label %537

535:                                              ; preds = %528, %63
  call void @_ZN6R3MeshD1Ev(ptr noundef nonnull align 8 dereferenceable(272) %8) #11
  call void @llvm.lifetime.end.p0(i64 272, ptr %8) #11
  %536 = load i32, ptr %4, align 4
  ret i32 %536

537:                                              ; preds = %534, %67
  call void @_ZN6R3MeshD1Ev(ptr noundef nonnull align 8 dereferenceable(272) %8) #11
  call void @llvm.lifetime.end.p0(i64 272, ptr %8) #11
  br label %538

538:                                              ; preds = %537
  %539 = load ptr, ptr %9, align 8
  %540 = load i32, ptr %10, align 4
  %541 = insertvalue { ptr, i32 } poison, ptr %539, 0
  %542 = insertvalue { ptr, i32 } %541, i32 %540, 1
  resume { ptr, i32 } %542
}

declare void @_ZN6R3MeshC1Ev(ptr noundef nonnull align 8 dereferenceable(272)) unnamed_addr #1

declare noundef i32 @_ZN6R3Mesh8ReadFileEPKc(ptr noundef nonnull align 8 dereferenceable(272), ptr noundef) unnamed_addr #1

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

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

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

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

declare void @_ZN16R3TriangleVertexC1ERK7R3Point(ptr noundef nonnull align 8 dereferenceable(100), ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN16R3TriangleVertex8SetColorERK5RNRgb(ptr noundef nonnull align 8 dereferenceable(100), ptr noundef nonnull align 8 dereferenceable(24)) #9 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN16R3TriangleVertex16SetTextureCoordsERK7R2Point(ptr noundef nonnull align 8 dereferenceable(100), ptr noundef nonnull align 8 dereferenceable(16)) #9 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN16R3TriangleVertex13SetSharedFlagEv(ptr noundef nonnull align 8 dereferenceable(100)) #9 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN7RNArrayIP16R3TriangleVertexE6InsertES1_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) #6 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) #9 align 2

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

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

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

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

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

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

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

declare void @_ZN10R3TriangleC1EP16R3TriangleVertexS1_S1_(ptr noundef nonnull align 8 dereferenceable(132), ptr noundef, ptr noundef, ptr noundef) unnamed_addr #1

; Function Attrs: nounwind
declare i32 @sprintf(ptr noundef, ptr noundef, ...) #7

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

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

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

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

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

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

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

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

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

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

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

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

declare void @_ZN11R3SceneNode7SetNameEPKc(ptr noundef nonnull align 8 dereferenceable(432), ptr noundef) #1

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

; Function Attrs: nounwind willreturn memory(read)
declare noundef ptr @strchr(ptr noundef, i32 noundef) #10

declare void @_ZN11R3SceneNode10InsertInfoEPKcS1_(ptr noundef nonnull align 8 dereferenceable(432), ptr noundef, ptr noundef) #1

declare void @_ZN11R3SceneNode11InsertChildEPS_(ptr noundef nonnull align 8 dereferenceable(432), ptr noundef) #1

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

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

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

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

; Function Attrs: nounwind
declare void @_ZN6R3MeshD1Ev(ptr noundef nonnull align 8 dereferenceable(272)) unnamed_addr #7

; Function Attrs: nounwind
declare void @_ZN8RNVArrayD2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #7

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

attributes #0 = { 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 #1 = { "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 = { 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 #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { 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 #8 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #9 = { 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 #10 = { nounwind willreturn memory(read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #11 = { nounwind }
attributes #12 = { builtin allocsize(0) }
attributes #13 = { builtin nounwind }
attributes #14 = { 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 0}
!10 = !{!"_ZTS7R3Scene", !6, i64 0, !11, i64 8, !14, i64 24, !15, i64 40, !16, i64 56, !17, i64 72, !18, i64 88, !19, i64 104, !21, i64 112, !28, i64 280, !28, i64 304, !6, i64 328, !6, i64 336, !6, i64 344}
!11 = !{!"_ZTS7RNArrayIP11R3SceneNodeE", !12, i64 0}
!12 = !{!"_ZTS8RNVArray", !6, i64 0, !13, i64 8, !13, i64 12}
!13 = !{!"int", !7, i64 0}
!14 = !{!"_ZTS7RNArrayIP7R3LightE", !12, i64 0}
!15 = !{!"_ZTS7RNArrayIP10R3MaterialE", !12, i64 0}
!16 = !{!"_ZTS7RNArrayIP6R3BrdfE", !12, i64 0}
!17 = !{!"_ZTS7RNArrayIP9R2TextureE", !12, i64 0}
!18 = !{!"_ZTS7RNArrayIP7R3SceneE", !12, i64 0}
!19 = !{!"_ZTS13RNSymbolTableIPKcE", !20, i64 0}
!20 = !{!"_ZTS5RNMapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKcE", !6, i64 0}
!21 = !{!"_ZTS8R3Viewer", !22, i64 8, !27, i64 152}
!22 = !{!"_ZTS8R3Camera", !23, i64 0, !26, i64 96, !26, i64 104, !26, i64 112, !26, i64 120, !26, i64 128, !6, i64 136}
!23 = !{!"_ZTS13R3CoordSystem", !24, i64 0, !25, i64 24}
!24 = !{!"_ZTS7R3Point", !7, i64 0}
!25 = !{!"_ZTS7R3Triad", !7, i64 0}
!26 = !{!"double", !7, i64 0}
!27 = !{!"_ZTS10R2Viewport", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12}
!28 = !{!"_ZTS5RNRgb", !7, i64 0}
!29 = !{!13, !13, i64 0}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.mustprogress"}
!32 = distinct !{!32, !31}
!33 = distinct !{!33, !31}
!34 = !{!35, !6, i64 0}
!35 = !{!"_ZTS5RNMapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP7RNArrayIP10R3TriangleEE", !6, i64 0}
!36 = !{i64 0, i64 8, !5}
!37 = !{!38, !6, i64 32}
!38 = !{!"_ZTSSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP7RNArrayIP10R3TriangleEE", !39, i64 0, !6, i64 32}
!39 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !40, i64 0, !41, i64 8, !7, i64 16}
!40 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!41 = !{!"long", !7, i64 0}
!42 = !{!43, !43, i64 0}
!43 = !{!"vtable pointer", !8, i64 0}
!44 = distinct !{!44, !31}
!45 = distinct !{!45, !31}
!46 = distinct !{!46, !31}


; 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.R3Mesh = type { ptr, %class.RNArray.7, %class.RNArray.8, %class.RNArray.9, ptr, ptr, ptr, [128 x i8], %class.R3Box, ptr }
%class.RNArray.7 = type { %class.RNVArray }
%class.RNVArray = type { ptr, i32, i32 }
%class.RNArray.8 = type { %class.RNVArray }
%class.RNArray.9 = type { %class.RNVArray }
%class.R3Box = type { %class.R3Solid, %class.R3Point, %class.R3Point }
%class.R3Solid = type { %class.R3Shape }
%class.R3Shape = type { ptr }
%class.R3Point = type { [3 x double] }
%class.RNArray.10 = type { %class.RNVArray }
%class.RNSymbolTable.11 = type { %class.RNMap.12 }
%class.RNMap.12 = type { ptr }
%"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.std::allocator" = type { i8 }
%"struct.std::_Rb_tree_iterator" = type { ptr }

@stderr = external local_unnamed_addr global ptr, align 8
@.str.39 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.41 = external hidden unnamed_addr constant [6 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

declare void @_ZN11R3SceneNodeC1EP7R3Scene(ptr noundef nonnull align 8 dereferenceable(432), ptr noundef) unnamed_addr #1

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

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

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

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

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

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

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: readwrite, inaccessiblemem: readwrite)
declare noalias ptr @strdup(ptr nocapture noundef readonly) local_unnamed_addr #7

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN7R3Scene11ReadPlyFileEPKcP11R3SceneNode(ptr noundef nonnull align 8 dereferenceable(352) %0, ptr noundef %1, ptr noundef %2) local_unnamed_addr #6 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %class.R3Mesh, align 8
  %5 = alloca %class.RNArray.10, align 8
  %6 = alloca [1024 x i8], align 16
  %7 = alloca %class.RNSymbolTable.11, align 8
  %8 = alloca ptr, align 8
  %9 = alloca %"class.std::__cxx11::basic_string", align 8
  %10 = alloca %"class.std::allocator", align 1
  %11 = alloca %"class.std::__cxx11::basic_string", align 8
  %12 = alloca %"class.std::allocator", align 1
  %13 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %14 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %15 = alloca %"class.std::__cxx11::basic_string", align 8
  %.not = icmp eq ptr %2, null
  %16 = load ptr, ptr %0, align 8
  %spec.select = select i1 %.not, ptr %16, ptr %2
  call void @llvm.lifetime.start.p0(i64 272, ptr nonnull %4) #13
  call void @_ZN6R3MeshC1Ev(ptr noundef nonnull align 8 dereferenceable(272) %4)
  %17 = invoke noundef i32 @_ZN6R3Mesh8ReadFileEPKc(ptr noundef nonnull align 8 dereferenceable(272) %4, ptr noundef %1)
          to label %18 unwind label %22

18:                                               ; preds = %3
  %.not124 = icmp eq i32 %17, 0
  br i1 %.not124, label %19, label %24

19:                                               ; preds = %18
  %20 = load ptr, ptr @stderr, align 8, !tbaa !5
  %21 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %20, ptr noundef nonnull @.str.39, ptr noundef %1) #14
  br label %211

22:                                               ; preds = %3
  %23 = landingpad { ptr, i32 }
          cleanup
  br label %212

24:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #13
  invoke void @_ZN7RNArrayIP16R3TriangleVertexEC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %5)
          to label %.preheader162 unwind label %29

.preheader162:                                    ; preds = %24
  %25 = call noundef i32 @_ZNK6R3Mesh9NVerticesEv(ptr noundef nonnull align 8 dereferenceable(272) %4)
  %26 = icmp sgt i32 %25, 0
  br i1 %26, label %.lr.ph, label %.preheader161

.preheader161:                                    ; preds = %52, %.preheader162
  %27 = call noundef i32 @_ZNK6R3Mesh6NFacesEv(ptr noundef nonnull align 8 dereferenceable(272) %4)
  %28 = icmp sgt i32 %27, 0
  br i1 %28, label %.lr.ph181, label %._crit_edge

29:                                               ; preds = %24
  %30 = landingpad { ptr, i32 }
          cleanup
  br label %210

.lr.ph:                                           ; preds = %.preheader162, %52
  %.0108177 = phi i32 [ %53, %52 ], [ 0, %.preheader162 ]
  %31 = invoke noundef ptr @_ZNK6R3Mesh6VertexEi(ptr noundef nonnull align 8 dereferenceable(272) %4, i32 noundef %.0108177)
          to label %32 unwind label %41

32:                                               ; preds = %.lr.ph
  %33 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6R3Mesh14VertexPositionEPK12R3MeshVertex(ptr noundef nonnull align 8 dereferenceable(272) %4, ptr noundef %31)
  %34 = invoke noalias noundef nonnull dereferenceable(104) ptr @_Znwm(i64 noundef 104) #15
          to label %35 unwind label %43

35:                                               ; preds = %32
  invoke void @_ZN16R3TriangleVertexC1ERK7R3Point(ptr noundef nonnull align 8 dereferenceable(100) %34, ptr noundef nonnull align 8 dereferenceable(24) %33)
          to label %36 unwind label %45

36:                                               ; preds = %35
  %37 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6R3Mesh11VertexColorEPK12R3MeshVertex(ptr noundef nonnull align 8 dereferenceable(272) %4, ptr noundef %31)
  %38 = call noundef i32 @_ZNK5RNRgb7IsBlackEv(ptr noundef nonnull align 8 dereferenceable(24) %37)
  %.not149 = icmp eq i32 %38, 0
  br i1 %.not149, label %39, label %47

39:                                               ; preds = %36
  %40 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6R3Mesh11VertexColorEPK12R3MeshVertex(ptr noundef nonnull align 8 dereferenceable(272) %4, ptr noundef %31)
  invoke void @_ZN16R3TriangleVertex8SetColorERK5RNRgb(ptr noundef nonnull align 8 dereferenceable(100) %34, ptr noundef nonnull align 8 dereferenceable(24) %40)
          to label %47 unwind label %43

41:                                               ; preds = %.lr.ph
  %42 = landingpad { ptr, i32 }
          cleanup
  br label %209

43:                                               ; preds = %50, %49, %47, %39, %32
  %44 = landingpad { ptr, i32 }
          cleanup
  br label %209

45:                                               ; preds = %35
  %46 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %34, i64 noundef 104) #16
  br label %209

47:                                               ; preds = %39, %36
  %48 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK6R3Mesh19VertexTextureCoordsEPK12R3MeshVertex(ptr noundef nonnull align 8 dereferenceable(272) %4, ptr noundef %31)
  invoke void @_ZN16R3TriangleVertex16SetTextureCoordsERK7R2Point(ptr noundef nonnull align 8 dereferenceable(100) %34, ptr noundef nonnull align 8 dereferenceable(16) %48)
          to label %49 unwind label %43

49:                                               ; preds = %47
  invoke void @_ZN16R3TriangleVertex13SetSharedFlagEv(ptr noundef nonnull align 8 dereferenceable(100) %34)
          to label %50 unwind label %43

50:                                               ; preds = %49
  %51 = invoke noundef ptr @_ZN7RNArrayIP16R3TriangleVertexE6InsertES1_(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull %34)
          to label %52 unwind label %43

52:                                               ; preds = %50
  %53 = add nuw nsw i32 %.0108177, 1
  %54 = call noundef i32 @_ZNK6R3Mesh9NVerticesEv(ptr noundef nonnull align 8 dereferenceable(272) %4)
  %55 = icmp slt i32 %53, %54
  br i1 %55, label %.lr.ph, label %.preheader161, !llvm.loop !9

._crit_edge:                                      ; preds = %59, %.preheader161
  call void @llvm.lifetime.start.p0(i64 1024, ptr nonnull %6) #13
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #13
  invoke void @_ZN13RNSymbolTableIP7RNArrayIP10R3TriangleEEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %.preheader160 unwind label %72

.preheader160:                                    ; preds = %._crit_edge
  %56 = call noundef i32 @_ZNK6R3Mesh6NFacesEv(ptr noundef nonnull align 8 dereferenceable(272) %4)
  %57 = icmp sgt i32 %56, 0
  br i1 %57, label %.lr.ph184, label %._crit_edge185

.lr.ph181:                                        ; preds = %.preheader161, %59
  %.0113178 = phi i32 [ %62, %59 ], [ 0, %.preheader161 ]
  %58 = invoke noundef ptr @_ZNK6R3Mesh4FaceEi(ptr noundef nonnull align 8 dereferenceable(272) %4, i32 noundef %.0113178)
          to label %59 unwind label %65

59:                                               ; preds = %.lr.ph181
  %60 = call noundef i32 @_ZNK6R3Mesh11FaceSegmentEPK10R3MeshFace(ptr noundef nonnull align 8 dereferenceable(272) %4, ptr noundef %58)
  %61 = call noundef i32 @_ZNK6R3Mesh12FaceMaterialEPK10R3MeshFace(ptr noundef nonnull align 8 dereferenceable(272) %4, ptr noundef %58)
  %62 = add nuw nsw i32 %.0113178, 1
  %63 = call noundef i32 @_ZNK6R3Mesh6NFacesEv(ptr noundef nonnull align 8 dereferenceable(272) %4)
  %64 = icmp slt i32 %62, %63
  br i1 %64, label %.lr.ph181, label %._crit_edge, !llvm.loop !11

65:                                               ; preds = %.lr.ph181
  %66 = landingpad { ptr, i32 }
          cleanup
  br label %209

._crit_edge185:                                   ; preds = %137, %.preheader160
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #13
  call void @_ZNSt17_Rb_tree_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP7RNArrayIP10R3TriangleEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %13) #13
  %67 = load ptr, ptr %7, align 8, !tbaa !12
  %68 = call ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP7RNArrayIP10R3TriangleE15RNMapComparatorIS5_ESaISt4pairIKS5_SA_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %67) #13
  store ptr %68, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #13
  %69 = load ptr, ptr %7, align 8, !tbaa !12
  %70 = call ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP7RNArrayIP10R3TriangleE15RNMapComparatorIS5_ESaISt4pairIKS5_SA_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %69) #13
  store ptr %70, ptr %14, align 8
  %71 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP7RNArrayIP10R3TriangleEEESG_(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %14) #13
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #13
  br i1 %71, label %.lr.ph190, label %.preheader

72:                                               ; preds = %._crit_edge
  %73 = landingpad { ptr, i32 }
          cleanup
  br label %208

.lr.ph184:                                        ; preds = %.preheader160, %137
  %.0114183 = phi ptr [ %.2116, %137 ], [ null, %.preheader160 ]
  %.0117182 = phi i32 [ %138, %137 ], [ 0, %.preheader160 ]
  %74 = invoke noundef ptr @_ZNK6R3Mesh4FaceEi(ptr noundef nonnull align 8 dereferenceable(272) %4, i32 noundef %.0117182)
          to label %75 unwind label %85

75:                                               ; preds = %.lr.ph184
  %76 = call noundef i32 @_ZNK6R3Mesh11FaceSegmentEPK10R3MeshFace(ptr noundef nonnull align 8 dereferenceable(272) %4, ptr noundef %74)
  %spec.store.select = call i32 @llvm.smax.i32(i32 %76, i32 0)
  %77 = call noundef i32 @_ZNK6R3Mesh12FaceCategoryEPK10R3MeshFace(ptr noundef nonnull align 8 dereferenceable(272) %4, ptr noundef %74)
  %spec.store.select4 = call i32 @llvm.smax.i32(i32 %77, i32 0)
  %78 = call noundef ptr @_ZNK6R3Mesh12VertexOnFaceEPK10R3MeshFacei(ptr noundef nonnull align 8 dereferenceable(272) %4, ptr noundef %74, i32 noundef 0)
  %79 = call noundef i32 @_ZNK6R3Mesh8VertexIDEPK12R3MeshVertex(ptr noundef nonnull align 8 dereferenceable(272) %4, ptr noundef %78)
  %80 = call noundef ptr @_ZNK6R3Mesh12VertexOnFaceEPK10R3MeshFacei(ptr noundef nonnull align 8 dereferenceable(272) %4, ptr noundef %74, i32 noundef 1)
  %81 = call noundef i32 @_ZNK6R3Mesh8VertexIDEPK12R3MeshVertex(ptr noundef nonnull align 8 dereferenceable(272) %4, ptr noundef %80)
  %82 = call noundef ptr @_ZNK6R3Mesh12VertexOnFaceEPK10R3MeshFacei(ptr noundef nonnull align 8 dereferenceable(272) %4, ptr noundef %74, i32 noundef 2)
  %83 = call noundef i32 @_ZNK6R3Mesh8VertexIDEPK12R3MeshVertex(ptr noundef nonnull align 8 dereferenceable(272) %4, ptr noundef %82)
  %84 = invoke noundef ptr @_ZNK7RNArrayIP16R3TriangleVertexE3KthEi(ptr noundef nonnull align 8 dereferenceable(16) %5, i32 noundef %79)
          to label %87 unwind label %107

85:                                               ; preds = %.lr.ph184
  %86 = landingpad { ptr, i32 }
          cleanup
  br label %207

87:                                               ; preds = %75
  %88 = invoke noundef ptr @_ZNK7RNArrayIP16R3TriangleVertexE3KthEi(ptr noundef nonnull align 8 dereferenceable(16) %5, i32 noundef %81)
          to label %89 unwind label %109

89:                                               ; preds = %87
  %90 = invoke noundef ptr @_ZNK7RNArrayIP16R3TriangleVertexE3KthEi(ptr noundef nonnull align 8 dereferenceable(16) %5, i32 noundef %83)
          to label %91 unwind label %111

91:                                               ; preds = %89
  %92 = invoke noalias noundef nonnull dereferenceable(136) ptr @_Znwm(i64 noundef 136) #15
          to label %93 unwind label %113

93:                                               ; preds = %91
  invoke void @_ZN10R3TriangleC1EP16R3TriangleVertexS1_S1_(ptr noundef nonnull align 8 dereferenceable(132) %92, ptr noundef %84, ptr noundef %88, ptr noundef %90)
          to label %94 unwind label %115

94:                                               ; preds = %93
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #13
  %95 = icmp slt i32 %76, 1
  %96 = icmp slt i32 %77, 1
  %or.cond = and i1 %95, %96
  %97 = select i1 %or.cond, ptr %.0114183, ptr null
  store ptr %97, ptr %8, align 8, !tbaa !5
  %.not132 = icmp eq ptr %97, null
  br i1 %.not132, label %98, label %134

98:                                               ; preds = %94
  %99 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %6, ptr noundef nonnull dereferenceable(1) @.str.40, i32 noundef %spec.store.select, i32 noundef %spec.store.select4) #13
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %10) #13
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #13
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef nonnull %6, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %100 unwind label %117

100:                                              ; preds = %98
  %101 = invoke noundef i32 @_ZNK5RNMapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP7RNArrayIP10R3TriangleEE4FindES5_PSA_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull %9, ptr noundef nonnull %8)
          to label %102 unwind label %119

102:                                              ; preds = %100
  %.not135 = icmp eq i32 %101, 0
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #13
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #13
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #13
  br i1 %.not135, label %103, label %134

103:                                              ; preds = %102
  %104 = invoke noalias noundef nonnull dereferenceable(16) ptr @_Znwm(i64 noundef 16) #15
          to label %105 unwind label %122

105:                                              ; preds = %103
  invoke void @_ZN7RNArrayIP10R3TriangleEC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %104)
          to label %106 unwind label %124

106:                                              ; preds = %105
  store ptr %104, ptr %8, align 8, !tbaa !5
  %spec.select157 = select i1 %or.cond, ptr %104, ptr %.0114183
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %12) #13
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #13
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef nonnull %6, ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %126 unwind label %129

107:                                              ; preds = %75
  %108 = landingpad { ptr, i32 }
          cleanup
  br label %207

109:                                              ; preds = %87
  %110 = landingpad { ptr, i32 }
          cleanup
  br label %207

111:                                              ; preds = %89
  %112 = landingpad { ptr, i32 }
          cleanup
  br label %207

113:                                              ; preds = %91
  %114 = landingpad { ptr, i32 }
          cleanup
  br label %207

115:                                              ; preds = %93
  %116 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %92, i64 noundef 136) #16
  br label %207

117:                                              ; preds = %98
  %118 = landingpad { ptr, i32 }
          cleanup
  br label %121

119:                                              ; preds = %100
  %120 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #13
  br label %121

121:                                              ; preds = %119, %117
  %.pn133 = phi { ptr, i32 } [ %120, %119 ], [ %118, %117 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #13
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #13
  br label %141

122:                                              ; preds = %134, %103
  %123 = landingpad { ptr, i32 }
          cleanup
  br label %141

124:                                              ; preds = %105
  %125 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %104, i64 noundef 16) #16
  br label %141

126:                                              ; preds = %106
  %127 = load ptr, ptr %8, align 8, !tbaa !5
  invoke void @_ZN5RNMapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP7RNArrayIP10R3TriangleEE6InsertES5_SA_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull %11, ptr noundef %127)
          to label %128 unwind label %131

128:                                              ; preds = %126
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #13
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #13
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #13
  br label %134

129:                                              ; preds = %106
  %130 = landingpad { ptr, i32 }
          cleanup
  br label %133

131:                                              ; preds = %126
  %132 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #13
  br label %133

133:                                              ; preds = %131, %129
  %.pn136 = phi { ptr, i32 } [ %132, %131 ], [ %130, %129 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #13
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #13
  br label %141

134:                                              ; preds = %102, %128, %94
  %.2116 = phi ptr [ %.0114183, %94 ], [ %spec.select157, %128 ], [ %.0114183, %102 ]
  %135 = load ptr, ptr %8, align 8, !tbaa !5
  %136 = invoke noundef ptr @_ZN7RNArrayIP10R3TriangleE6InsertES1_(ptr noundef nonnull align 8 dereferenceable(16) %135, ptr noundef nonnull %92)
          to label %137 unwind label %122

137:                                              ; preds = %134
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #13
  %138 = add nuw nsw i32 %.0117182, 1
  %139 = call noundef i32 @_ZNK6R3Mesh6NFacesEv(ptr noundef nonnull align 8 dereferenceable(272) %4)
  %140 = icmp slt i32 %138, %139
  br i1 %140, label %.lr.ph184, label %._crit_edge185, !llvm.loop !14

141:                                              ; preds = %133, %124, %122, %121
  %.pn138 = phi { ptr, i32 } [ %123, %122 ], [ %.pn136, %133 ], [ %125, %124 ], [ %.pn133, %121 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #13
  br label %207

.preheader:                                       ; preds = %._crit_edge188, %._crit_edge185
  %142 = call noundef i32 @_ZNK8RNVArray8NEntriesEv(ptr noundef nonnull align 8 dereferenceable(16) %5)
  %143 = icmp sgt i32 %142, 0
  br i1 %143, label %.lr.ph192, label %.loopexit

.lr.ph190:                                        ; preds = %._crit_edge185, %._crit_edge188
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %15) #13
  %144 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP7RNArrayIP10R3TriangleEEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %13) #13
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %15, ptr noundef nonnull align 8 dereferenceable(32) %144)
          to label %145 unwind label %150

145:                                              ; preds = %.lr.ph190
  %146 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP7RNArrayIP10R3TriangleEEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %13) #13
  %147 = getelementptr inbounds i8, ptr %146, i64 32
  %148 = load ptr, ptr %147, align 8, !tbaa !15
  %149 = call noundef i32 @_ZNK8RNVArray7IsEmptyEv(ptr noundef nonnull align 8 dereferenceable(16) %148)
  %.not125 = icmp eq i32 %149, 0
  br i1 %.not125, label %152, label %._crit_edge188

150:                                              ; preds = %.lr.ph190
  %151 = landingpad { ptr, i32 }
          cleanup
  br label %194

152:                                              ; preds = %145
  %153 = invoke noalias noundef nonnull dereferenceable(432) ptr @_Znwm(i64 noundef 432) #15
          to label %154 unwind label %158

154:                                              ; preds = %152
  invoke void @_ZN11R3SceneNodeC1EP7R3Scene(ptr noundef nonnull align 8 dereferenceable(432) %153, ptr noundef nonnull %0)
          to label %155 unwind label %160

155:                                              ; preds = %154
  %156 = invoke noundef i32 @_ZL18InsertSceneElementP7R3SceneP11R3SceneNodeP10R3MaterialRK7RNArrayIP16R3TriangleVertexERKS5_IP10R3TriangleE(ptr noundef nonnull %0, ptr noundef nonnull %153, ptr noundef null, ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 8 dereferenceable(16) %148)
          to label %157 unwind label %158

157:                                              ; preds = %155
  %.not126 = icmp eq i32 %156, 0
  br i1 %.not126, label %188, label %162

158:                                              ; preds = %162, %155, %152
  %159 = landingpad { ptr, i32 }
          cleanup
  br label %193

160:                                              ; preds = %154
  %161 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %153, i64 noundef 432) #16
  br label %193

162:                                              ; preds = %157
  %163 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %15) #13
  invoke void @_ZN11R3SceneNode7SetNameEPKc(ptr noundef nonnull align 8 dereferenceable(432) %153, ptr noundef %163)
          to label %164 unwind label %158

164:                                              ; preds = %162
  %165 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %15) #13
  %166 = call noundef ptr @strchr(ptr noundef nonnull dereferenceable(1) %165, i32 noundef 95) #17
  %.not127 = icmp eq ptr %166, null
  br i1 %.not127, label %172, label %167

167:                                              ; preds = %164
  %168 = getelementptr inbounds i8, ptr %166, i64 1
  %169 = call noalias ptr @strdup(ptr noundef nonnull %168) #13
  invoke void @_ZN11R3SceneNode10InsertInfoEPKcS1_(ptr noundef nonnull align 8 dereferenceable(432) %153, ptr noundef nonnull @.str.41, ptr noundef %169)
          to label %172 unwind label %170

170:                                              ; preds = %172, %167
  %171 = landingpad { ptr, i32 }
          cleanup
  br label %193

172:                                              ; preds = %167, %164
  invoke void @_ZN11R3SceneNode11InsertChildEPS_(ptr noundef nonnull align 8 dereferenceable(432) %spec.select, ptr noundef nonnull %153)
          to label %.preheader159 unwind label %170

.preheader159:                                    ; preds = %172
  %173 = call noundef i32 @_ZNK8RNVArray8NEntriesEv(ptr noundef nonnull align 8 dereferenceable(16) %148)
  %174 = icmp sgt i32 %173, 0
  br i1 %174, label %.lr.ph187, label %._crit_edge188

175:                                              ; preds = %.lr.ph187
  %176 = landingpad { ptr, i32 }
          cleanup
  br label %193

.lr.ph187:                                        ; preds = %.preheader159, %184
  %.079186 = phi i32 [ %185, %184 ], [ 0, %.preheader159 ]
  %177 = invoke noundef ptr @_ZNK7RNArrayIP10R3TriangleE3KthEi(ptr noundef nonnull align 8 dereferenceable(16) %148, i32 noundef %.079186)
          to label %178 unwind label %175

178:                                              ; preds = %.lr.ph187
  %179 = icmp eq ptr %177, null
  br i1 %179, label %184, label %180

180:                                              ; preds = %178
  %181 = load ptr, ptr %177, align 8, !tbaa !20
  %182 = getelementptr inbounds i8, ptr %181, i64 8
  %183 = load ptr, ptr %182, align 8
  call void %183(ptr noundef nonnull align 8 dereferenceable(132) %177) #13
  br label %184

184:                                              ; preds = %178, %180
  %185 = add nuw nsw i32 %.079186, 1
  %186 = call noundef i32 @_ZNK8RNVArray8NEntriesEv(ptr noundef nonnull align 8 dereferenceable(16) %148)
  %187 = icmp slt i32 %185, %186
  br i1 %187, label %.lr.ph187, label %._crit_edge188, !llvm.loop !22

188:                                              ; preds = %157
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #13
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %15) #13
  br label %.loopexit

._crit_edge188:                                   ; preds = %184, %.preheader159, %145
  call void @_ZN8RNVArrayD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %148) #13
  call void @_ZdlPvm(ptr noundef %148, i64 noundef 16) #16
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #13
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %15) #13
  %189 = call ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP7RNArrayIP10R3TriangleEEEppEi(ptr noundef nonnull align 8 dereferenceable(8) %13, i32 noundef 0) #13
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #13
  %190 = load ptr, ptr %7, align 8, !tbaa !12
  %191 = call ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP7RNArrayIP10R3TriangleE15RNMapComparatorIS5_ESaISt4pairIKS5_SA_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %190) #13
  store ptr %191, ptr %14, align 8
  %192 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP7RNArrayIP10R3TriangleEEESG_(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %14) #13
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #13
  br i1 %192, label %.lr.ph190, label %.preheader, !llvm.loop !23

193:                                              ; preds = %170, %175, %160, %158
  %.pn.pn = phi { ptr, i32 } [ %159, %158 ], [ %161, %160 ], [ %176, %175 ], [ %171, %170 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #13
  br label %194

194:                                              ; preds = %193, %150
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %193 ], [ %151, %150 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %15) #13
  br label %206

195:                                              ; preds = %.lr.ph192
  %196 = landingpad { ptr, i32 }
          cleanup
  br label %206

.lr.ph192:                                        ; preds = %.preheader, %202
  %.0191 = phi i32 [ %203, %202 ], [ 0, %.preheader ]
  %197 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7RNArrayIP16R3TriangleVertexEixEi(ptr noundef nonnull align 8 dereferenceable(16) %5, i32 noundef %.0191)
          to label %198 unwind label %195

198:                                              ; preds = %.lr.ph192
  %199 = load ptr, ptr %197, align 8, !tbaa !5
  %200 = icmp eq ptr %199, null
  br i1 %200, label %202, label %201

201:                                              ; preds = %198
  call void @_ZdlPvm(ptr noundef nonnull %199, i64 noundef 104) #16
  br label %202

202:                                              ; preds = %198, %201
  %203 = add nuw nsw i32 %.0191, 1
  %204 = call noundef i32 @_ZNK8RNVArray8NEntriesEv(ptr noundef nonnull align 8 dereferenceable(16) %5)
  %205 = icmp slt i32 %203, %204
  br i1 %205, label %.lr.ph192, label %.loopexit, !llvm.loop !24

.loopexit:                                        ; preds = %202, %.preheader, %188
  %.3 = phi i32 [ 0, %188 ], [ 1, %.preheader ], [ 1, %202 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #13
  call void @_ZN5RNMapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP7RNArrayIP10R3TriangleEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #13
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #13
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %6) #13
  call void @_ZN8RNVArrayD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #13
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #13
  br label %211

206:                                              ; preds = %195, %194
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %194 ], [ %196, %195 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #13
  br label %207

207:                                              ; preds = %85, %109, %113, %115, %141, %111, %107, %206
  %.pn138.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn, %206 ], [ %86, %85 ], [ %108, %107 ], [ %110, %109 ], [ %112, %111 ], [ %.pn138, %141 ], [ %116, %115 ], [ %114, %113 ]
  call void @_ZN5RNMapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP7RNArrayIP10R3TriangleEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #13
  br label %208

208:                                              ; preds = %207, %72
  %.pn138.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn138.pn.pn.pn.pn.pn.pn, %207 ], [ %73, %72 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #13
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %6) #13
  br label %209

209:                                              ; preds = %65, %208, %41, %45, %43
  %.pn150.pn.pn = phi { ptr, i32 } [ %42, %41 ], [ %44, %43 ], [ %46, %45 ], [ %66, %65 ], [ %.pn138.pn.pn.pn.pn.pn.pn.pn, %208 ]
  call void @_ZN8RNVArrayD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #13
  br label %210

210:                                              ; preds = %209, %29
  %.pn150.pn.pn.pn = phi { ptr, i32 } [ %.pn150.pn.pn, %209 ], [ %30, %29 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #13
  br label %212

211:                                              ; preds = %.loopexit, %19
  %.4 = phi i32 [ %.3, %.loopexit ], [ 0, %19 ]
  call void @_ZN6R3MeshD1Ev(ptr noundef nonnull align 8 dereferenceable(272) %4) #13
  call void @llvm.lifetime.end.p0(i64 272, ptr nonnull %4) #13
  ret i32 %.4

212:                                              ; preds = %210, %22
  %.pn150.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn150.pn.pn.pn, %210 ], [ %23, %22 ]
  call void @_ZN6R3MeshD1Ev(ptr noundef nonnull align 8 dereferenceable(272) %4) #13
  call void @llvm.lifetime.end.p0(i64 272, ptr nonnull %4) #13
  resume { ptr, i32 } %.pn150.pn.pn.pn.pn
}

declare void @_ZN6R3MeshC1Ev(ptr noundef nonnull align 8 dereferenceable(272)) unnamed_addr #1

declare noundef i32 @_ZN6R3Mesh8ReadFileEPKc(ptr noundef nonnull align 8 dereferenceable(272), ptr noundef) unnamed_addr #1

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

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

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

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

declare void @_ZN16R3TriangleVertexC1ERK7R3Point(ptr noundef nonnull align 8 dereferenceable(100), ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN16R3TriangleVertex8SetColorERK5RNRgb(ptr noundef nonnull align 8 dereferenceable(100), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #9 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN16R3TriangleVertex16SetTextureCoordsERK7R2Point(ptr noundef nonnull align 8 dereferenceable(100), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #9 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN16R3TriangleVertex13SetSharedFlagEv(ptr noundef nonnull align 8 dereferenceable(100)) local_unnamed_addr #9 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN7RNArrayIP16R3TriangleVertexE6InsertES1_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) local_unnamed_addr #6 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 #9 align 2

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

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

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

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

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

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

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

declare void @_ZN10R3TriangleC1EP16R3TriangleVertexS1_S1_(ptr noundef nonnull align 8 dereferenceable(132), ptr noundef, ptr noundef, ptr noundef) unnamed_addr #1

; Function Attrs: nofree nounwind
declare noundef i32 @sprintf(ptr noalias nocapture noundef writeonly, ptr nocapture noundef readonly, ...) local_unnamed_addr #8

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

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

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

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

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

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

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

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

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

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

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

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

declare void @_ZN11R3SceneNode7SetNameEPKc(ptr noundef nonnull align 8 dereferenceable(432), ptr noundef) local_unnamed_addr #1

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare noundef ptr @strchr(ptr noundef, i32 noundef) local_unnamed_addr #10

declare void @_ZN11R3SceneNode10InsertInfoEPKcS1_(ptr noundef nonnull align 8 dereferenceable(432), ptr noundef, ptr noundef) local_unnamed_addr #1

declare void @_ZN11R3SceneNode11InsertChildEPS_(ptr noundef nonnull align 8 dereferenceable(432), ptr noundef) local_unnamed_addr #1

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

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

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

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

; Function Attrs: nounwind
declare void @_ZN6R3MeshD1Ev(ptr noundef nonnull align 8 dereferenceable(272)) unnamed_addr #11

; Function Attrs: nounwind
declare void @_ZN8RNVArrayD2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #11

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smax.i32(i32, i32) #12

attributes #0 = { 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 #1 = { "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 = { 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 #3 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { mustprogress nofree nounwind willreturn memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "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 = { 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 #9 = { 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 #10 = { mustprogress nofree nounwind willreturn memory(argmem: read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #11 = { 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 #12 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #13 = { nounwind }
attributes #14 = { cold nounwind }
attributes #15 = { builtin allocsize(0) }
attributes #16 = { builtin nounwind }
attributes #17 = { 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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = !{!13, !6, i64 0}
!13 = !{!"_ZTS5RNMapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP7RNArrayIP10R3TriangleEE", !6, i64 0}
!14 = distinct !{!14, !10}
!15 = !{!16, !6, i64 32}
!16 = !{!"_ZTSSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP7RNArrayIP10R3TriangleEE", !17, i64 0, !6, i64 32}
!17 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !18, i64 0, !19, i64 8, !7, i64 16}
!18 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!19 = !{!"long", !7, i64 0}
!20 = !{!21, !21, i64 0}
!21 = !{!"vtable pointer", !8, i64 0}
!22 = distinct !{!22, !10}
!23 = distinct !{!23, !10}
!24 = distinct !{!24, !10}


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