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

; 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.R3Vector = type { [3 x double] }
%class.RNArray.13 = type { %class.RNVArray }
%class.RNVArray = type { ptr, i32, i32 }
%class.RNArray.10 = type { %class.RNVArray }
%class.R3Point = type { [3 x double] }
%class.R3Box = type { %class.R3Solid, %class.R3Point, %class.R3Point }
%class.R3Solid = type { %class.R3Shape }
%class.R3Shape = type { ptr }
%class.RNRgb = type { [3 x double] }
%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.R2Viewport = type { i32, i32, i32, i32 }

@stderr = external global ptr, align 8
@.str.42 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.43 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.143 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.144 = external hidden unnamed_addr constant [29 x i8], align 1
@R3posz_vector = external global %class.R3Vector, align 8
@.str.145 = external hidden unnamed_addr constant [10 x i8], align 1

declare i32 @__gxx_personality_v0(...)

declare void @_ZN5RNRgbC1Eddd(ptr noundef nonnull align 8 dereferenceable(24), double noundef, double noundef, double noundef) unnamed_addr #0

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

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

; 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: mustprogress uwtable
declare dso_local void @_ZN7R3Scene14InsertMaterialEP10R3Material(ptr noundef nonnull align 8 dereferenceable(352), ptr noundef) #4 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN7R3Scene17ReadRectangleFileEPKcP11R3SceneNode(ptr noundef nonnull align 8 dereferenceable(352) %0, ptr noundef %1, ptr noundef %2) #4 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 ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca [4096 x i8], align 16
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca [4096 x i8], align 16
  %15 = alloca double, align 8
  %16 = alloca double, align 8
  %17 = alloca double, align 8
  %18 = alloca double, align 8
  %19 = alloca double, align 8
  %20 = alloca double, align 8
  %21 = alloca double, align 8
  %22 = alloca double, align 8
  %23 = alloca double, align 8
  %24 = alloca double, align 8
  %25 = alloca double, align 8
  %26 = alloca ptr, align 8
  %27 = alloca ptr, align 8
  %28 = alloca i32, align 4
  %29 = alloca %class.RNArray.13, align 8
  %30 = alloca %class.RNArray.10, align 8
  %31 = alloca ptr, align 8
  %32 = alloca %class.R3Point, align 8
  %33 = alloca i1, align 1
  %34 = alloca ptr, align 8
  %35 = alloca %class.R3Point, align 8
  %36 = alloca i1, align 1
  %37 = alloca ptr, align 8
  %38 = alloca %class.R3Point, align 8
  %39 = alloca i1, align 1
  %40 = alloca ptr, align 8
  %41 = alloca %class.R3Point, align 8
  %42 = alloca i1, align 1
  %43 = alloca ptr, align 8
  %44 = alloca ptr, align 8
  %45 = alloca ptr, align 8
  %46 = alloca %class.R3Point, align 8
  %47 = alloca %class.R3Box, align 8
  %48 = alloca %class.R3Point, align 8
  %49 = alloca %class.R3Vector, align 8
  %50 = alloca ptr, align 8
  %51 = alloca %class.R3Box, align 8
  %52 = alloca i1, align 1
  %53 = alloca ptr, align 8
  %54 = alloca %class.RNRgb, align 8
  %55 = alloca i1, align 1
  %56 = alloca ptr, align 8
  %57 = alloca ptr, align 8
  %58 = alloca [1024 x i8], align 16
  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
  %59 = load ptr, ptr %5, align 8
  %60 = load ptr, ptr %7, align 8, !tbaa !5
  %61 = icmp ne ptr %60, null
  br i1 %61, label %65, label %62

62:                                               ; preds = %3
  %63 = getelementptr inbounds %class.R3Scene, ptr %59, i32 0, i32 0
  %64 = load ptr, ptr %63, align 8, !tbaa !9
  store ptr %64, ptr %7, align 8, !tbaa !5
  br label %65

65:                                               ; preds = %62, %3
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #8
  %66 = load ptr, ptr %6, align 8, !tbaa !5
  %67 = call noalias ptr @fopen(ptr noundef %66, ptr noundef @.str.42)
  store ptr %67, ptr %8, align 8, !tbaa !5
  %68 = icmp ne ptr %67, null
  br i1 %68, label %73, label %69

69:                                               ; preds = %65
  %70 = load ptr, ptr @stderr, align 8, !tbaa !5
  %71 = load ptr, ptr %6, align 8, !tbaa !5
  %72 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %70, ptr noundef @.str.43, ptr noundef %71) #8
  store i32 0, ptr %4, align 4
  store i32 1, ptr %9, align 4
  br label %405

73:                                               ; preds = %65
  call void @llvm.lifetime.start.p0(i64 4096, ptr %10) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #8
  store i32 0, ptr %11, align 4, !tbaa !29
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #8
  store i32 0, ptr %12, align 4, !tbaa !29
  br label %74

74:                                               ; preds = %249, %247, %73
  %75 = getelementptr inbounds [4096 x i8], ptr %10, i64 0, i64 0
  %76 = load ptr, ptr %8, align 8, !tbaa !5
  %77 = call ptr @fgets(ptr noundef %75, i32 noundef 4096, ptr noundef %76)
  %78 = icmp ne ptr %77, null
  br i1 %78, label %79, label %401

79:                                               ; preds = %74
  %80 = load i32, ptr %11, align 4, !tbaa !29
  %81 = add nsw i32 %80, 1
  store i32 %81, ptr %11, align 4, !tbaa !29
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #8
  %82 = getelementptr inbounds [4096 x i8], ptr %10, i64 0, i64 0
  store ptr %82, ptr %13, align 8, !tbaa !5
  br label %83

83:                                               ; preds = %95, %79
  %84 = load ptr, ptr %13, align 8, !tbaa !5
  %85 = load i8, ptr %84, align 1, !tbaa !30
  %86 = icmp ne i8 %85, 0
  br i1 %86, label %87, label %93

87:                                               ; preds = %83
  %88 = load ptr, ptr %13, align 8, !tbaa !5
  %89 = load i8, ptr %88, align 1, !tbaa !30
  %90 = sext i8 %89 to i32
  %91 = call i32 @isspace(i32 noundef %90) #9
  %92 = icmp ne i32 %91, 0
  br label %93

93:                                               ; preds = %87, %83
  %94 = phi i1 [ false, %83 ], [ %92, %87 ]
  br i1 %94, label %95, label %98

95:                                               ; preds = %93
  %96 = load ptr, ptr %13, align 8, !tbaa !5
  %97 = getelementptr inbounds i8, ptr %96, i32 1
  store ptr %97, ptr %13, align 8, !tbaa !5
  br label %83, !llvm.loop !31

98:                                               ; preds = %93
  %99 = load ptr, ptr %13, align 8, !tbaa !5
  %100 = icmp ne ptr %99, null
  br i1 %100, label %102, label %101

101:                                              ; preds = %98
  store i32 2, ptr %9, align 4
  br label %247, !llvm.loop !33

102:                                              ; preds = %98
  %103 = load ptr, ptr %13, align 8, !tbaa !5
  %104 = load i8, ptr %103, align 1, !tbaa !30
  %105 = sext i8 %104 to i32
  %106 = icmp eq i32 %105, 35
  br i1 %106, label %107, label %108

107:                                              ; preds = %102
  store i32 2, ptr %9, align 4
  br label %247, !llvm.loop !33

108:                                              ; preds = %102
  call void @llvm.lifetime.start.p0(i64 4096, ptr %14) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #8
  %109 = load ptr, ptr %13, align 8, !tbaa !5
  %110 = getelementptr inbounds [4096 x i8], ptr %14, i64 0, i64 0
  %111 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef %109, ptr noundef @.str.143, ptr noundef %15, ptr noundef %16, ptr noundef %17, ptr noundef %18, ptr noundef %19, ptr noundef %20, ptr noundef %21, ptr noundef %22, ptr noundef %23, ptr noundef %24, ptr noundef %25, ptr noundef %110) #8
  %112 = icmp ne i32 %111, 12
  br i1 %112, label %113, label %118

113:                                              ; preds = %108
  %114 = load ptr, ptr @stderr, align 8, !tbaa !5
  %115 = load i32, ptr %11, align 4, !tbaa !29
  %116 = load ptr, ptr %6, align 8, !tbaa !5
  %117 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %114, ptr noundef @.str.144, i32 noundef %115, ptr noundef %116) #8
  store i32 0, ptr %4, align 4
  store i32 1, ptr %9, align 4
  br label %246

118:                                              ; preds = %108
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #8
  %119 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 432) #10
  invoke void @_ZN11R3SceneNodeC1EP7R3Scene(ptr noundef nonnull align 8 dereferenceable(432) %119, ptr noundef %59)
          to label %120 unwind label %250

120:                                              ; preds = %118
  store ptr %119, ptr %26, align 8, !tbaa !5
  %121 = load ptr, ptr %7, align 8, !tbaa !5
  %122 = load ptr, ptr %26, align 8, !tbaa !5
  call void @_ZN11R3SceneNode11InsertChildEPS_(ptr noundef nonnull align 8 dereferenceable(432) %121, ptr noundef %122)
  call void @llvm.lifetime.start.p0(i64 16, ptr %29) #8
  call void @_ZN7RNArrayIP10R3TriangleEC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %29)
  call void @llvm.lifetime.start.p0(i64 16, ptr %30) #8
  invoke void @_ZN7RNArrayIP16R3TriangleVertexEC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %30)
          to label %123 unwind label %254

123:                                              ; preds = %120
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #8
  %124 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 104) #10
          to label %125 unwind label %258

125:                                              ; preds = %123
  store i1 true, ptr %33, align 1
  call void @llvm.lifetime.start.p0(i64 24, ptr %32) #8
  %126 = load double, ptr %15, align 8, !tbaa !34
  %127 = load double, ptr %16, align 8, !tbaa !34
  %128 = load double, ptr %23, align 8, !tbaa !34
  invoke void @_ZN7R3PointC1Eddd(ptr noundef nonnull align 8 dereferenceable(24) %32, double noundef %126, double noundef %127, double noundef %128)
          to label %129 unwind label %262

129:                                              ; preds = %125
  invoke void @_ZN16R3TriangleVertexC1ERK7R3Point(ptr noundef nonnull align 8 dereferenceable(100) %124, ptr noundef nonnull align 8 dereferenceable(24) %32)
          to label %130 unwind label %262

130:                                              ; preds = %129
  store i1 false, ptr %33, align 1
  call void @llvm.lifetime.end.p0(i64 24, ptr %32) #8
  store ptr %124, ptr %31, align 8, !tbaa !5
  %131 = load ptr, ptr %31, align 8, !tbaa !5
  %132 = invoke noundef ptr @_ZN7RNArrayIP16R3TriangleVertexE6InsertES1_(ptr noundef nonnull align 8 dereferenceable(16) %30, ptr noundef %131)
          to label %133 unwind label %258

133:                                              ; preds = %130
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #8
  %134 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 104) #10
          to label %135 unwind label %269

135:                                              ; preds = %133
  store i1 true, ptr %36, align 1
  call void @llvm.lifetime.start.p0(i64 24, ptr %35) #8
  %136 = load double, ptr %17, align 8, !tbaa !34
  %137 = load double, ptr %18, align 8, !tbaa !34
  %138 = load double, ptr %23, align 8, !tbaa !34
  invoke void @_ZN7R3PointC1Eddd(ptr noundef nonnull align 8 dereferenceable(24) %35, double noundef %136, double noundef %137, double noundef %138)
          to label %139 unwind label %273

139:                                              ; preds = %135
  invoke void @_ZN16R3TriangleVertexC1ERK7R3Point(ptr noundef nonnull align 8 dereferenceable(100) %134, ptr noundef nonnull align 8 dereferenceable(24) %35)
          to label %140 unwind label %273

140:                                              ; preds = %139
  store i1 false, ptr %36, align 1
  call void @llvm.lifetime.end.p0(i64 24, ptr %35) #8
  store ptr %134, ptr %34, align 8, !tbaa !5
  %141 = load ptr, ptr %34, align 8, !tbaa !5
  %142 = invoke noundef ptr @_ZN7RNArrayIP16R3TriangleVertexE6InsertES1_(ptr noundef nonnull align 8 dereferenceable(16) %30, ptr noundef %141)
          to label %143 unwind label %269

143:                                              ; preds = %140
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #8
  %144 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 104) #10
          to label %145 unwind label %280

145:                                              ; preds = %143
  store i1 true, ptr %39, align 1
  call void @llvm.lifetime.start.p0(i64 24, ptr %38) #8
  %146 = load double, ptr %19, align 8, !tbaa !34
  %147 = load double, ptr %20, align 8, !tbaa !34
  %148 = load double, ptr %23, align 8, !tbaa !34
  invoke void @_ZN7R3PointC1Eddd(ptr noundef nonnull align 8 dereferenceable(24) %38, double noundef %146, double noundef %147, double noundef %148)
          to label %149 unwind label %284

149:                                              ; preds = %145
  invoke void @_ZN16R3TriangleVertexC1ERK7R3Point(ptr noundef nonnull align 8 dereferenceable(100) %144, ptr noundef nonnull align 8 dereferenceable(24) %38)
          to label %150 unwind label %284

150:                                              ; preds = %149
  store i1 false, ptr %39, align 1
  call void @llvm.lifetime.end.p0(i64 24, ptr %38) #8
  store ptr %144, ptr %37, align 8, !tbaa !5
  %151 = load ptr, ptr %37, align 8, !tbaa !5
  %152 = invoke noundef ptr @_ZN7RNArrayIP16R3TriangleVertexE6InsertES1_(ptr noundef nonnull align 8 dereferenceable(16) %30, ptr noundef %151)
          to label %153 unwind label %280

153:                                              ; preds = %150
  call void @llvm.lifetime.start.p0(i64 8, ptr %40) #8
  %154 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 104) #10
          to label %155 unwind label %291

155:                                              ; preds = %153
  store i1 true, ptr %42, align 1
  call void @llvm.lifetime.start.p0(i64 24, ptr %41) #8
  %156 = load double, ptr %21, align 8, !tbaa !34
  %157 = load double, ptr %22, align 8, !tbaa !34
  %158 = load double, ptr %23, align 8, !tbaa !34
  invoke void @_ZN7R3PointC1Eddd(ptr noundef nonnull align 8 dereferenceable(24) %41, double noundef %156, double noundef %157, double noundef %158)
          to label %159 unwind label %295

159:                                              ; preds = %155
  invoke void @_ZN16R3TriangleVertexC1ERK7R3Point(ptr noundef nonnull align 8 dereferenceable(100) %154, ptr noundef nonnull align 8 dereferenceable(24) %41)
          to label %160 unwind label %295

160:                                              ; preds = %159
  store i1 false, ptr %42, align 1
  call void @llvm.lifetime.end.p0(i64 24, ptr %41) #8
  store ptr %154, ptr %40, align 8, !tbaa !5
  %161 = load ptr, ptr %40, align 8, !tbaa !5
  %162 = invoke noundef ptr @_ZN7RNArrayIP16R3TriangleVertexE6InsertES1_(ptr noundef nonnull align 8 dereferenceable(16) %30, ptr noundef %161)
          to label %163 unwind label %291

163:                                              ; preds = %160
  call void @llvm.lifetime.start.p0(i64 8, ptr %43) #8
  %164 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 136) #10
          to label %165 unwind label %302

165:                                              ; preds = %163
  %166 = load ptr, ptr %31, align 8, !tbaa !5
  %167 = load ptr, ptr %34, align 8, !tbaa !5
  %168 = load ptr, ptr %37, align 8, !tbaa !5
  invoke void @_ZN10R3TriangleC1EP16R3TriangleVertexS1_S1_(ptr noundef nonnull align 8 dereferenceable(132) %164, ptr noundef %166, ptr noundef %167, ptr noundef %168)
          to label %169 unwind label %306

169:                                              ; preds = %165
  store ptr %164, ptr %43, align 8, !tbaa !5
  %170 = load ptr, ptr %43, align 8, !tbaa !5
  %171 = invoke noundef ptr @_ZN7RNArrayIP10R3TriangleE6InsertES1_(ptr noundef nonnull align 8 dereferenceable(16) %29, ptr noundef %170)
          to label %172 unwind label %302

172:                                              ; preds = %169
  call void @llvm.lifetime.start.p0(i64 8, ptr %44) #8
  %173 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 136) #10
          to label %174 unwind label %310

174:                                              ; preds = %172
  %175 = load ptr, ptr %31, align 8, !tbaa !5
  %176 = load ptr, ptr %37, align 8, !tbaa !5
  %177 = load ptr, ptr %40, align 8, !tbaa !5
  invoke void @_ZN10R3TriangleC1EP16R3TriangleVertexS1_S1_(ptr noundef nonnull align 8 dereferenceable(132) %173, ptr noundef %175, ptr noundef %176, ptr noundef %177)
          to label %178 unwind label %314

178:                                              ; preds = %174
  store ptr %173, ptr %44, align 8, !tbaa !5
  %179 = load ptr, ptr %44, align 8, !tbaa !5
  %180 = invoke noundef ptr @_ZN7RNArrayIP10R3TriangleE6InsertES1_(ptr noundef nonnull align 8 dereferenceable(16) %29, ptr noundef %179)
          to label %181 unwind label %310

181:                                              ; preds = %178
  call void @llvm.lifetime.start.p0(i64 8, ptr %45) #8
  %182 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 96) #10
          to label %183 unwind label %318

183:                                              ; preds = %181
  invoke void @_ZN15R3TriangleArrayC1ERK7RNArrayIP16R3TriangleVertexERKS0_IP10R3TriangleE(ptr noundef nonnull align 8 dereferenceable(96) %182, ptr noundef nonnull align 8 dereferenceable(16) %30, ptr noundef nonnull align 8 dereferenceable(16) %29)
          to label %184 unwind label %322

184:                                              ; preds = %183
  store ptr %182, ptr %45, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %46) #8
  call void @llvm.lifetime.start.p0(i64 56, ptr %47) #8
  %185 = load ptr, ptr %45, align 8, !tbaa !5
  %186 = load ptr, ptr %185, align 8, !tbaa !35
  %187 = getelementptr inbounds ptr, ptr %186, i64 17
  %188 = load ptr, ptr %187, align 8
  invoke void %188(ptr dead_on_unwind writable sret(%class.R3Box) align 8 %47, ptr noundef nonnull align 8 dereferenceable(96) %185)
          to label %189 unwind label %326

189:                                              ; preds = %184
  invoke void @_ZNK5R3Box8CentroidEv(ptr dead_on_unwind writable sret(%class.R3Point) align 8 %46, ptr noundef nonnull align 8 dereferenceable(56) %47)
          to label %190 unwind label %330

190:                                              ; preds = %189
  call void @_ZN7R3SolidD2Ev(ptr noundef nonnull align 8 dereferenceable(56) %47) #8
  call void @llvm.lifetime.end.p0(i64 56, ptr %47) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr %48) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr %49) #8
  %191 = load double, ptr %24, align 8, !tbaa !34
  %192 = load double, ptr %23, align 8, !tbaa !34
  %193 = fsub double %191, %192
  invoke void @_ZmldRK8R3Vector(ptr dead_on_unwind writable sret(%class.R3Vector) align 8 %49, double noundef %193, ptr noundef nonnull align 8 dereferenceable(24) @R3posz_vector)
          to label %194 unwind label %335

194:                                              ; preds = %190
  invoke void @_ZplRK7R3PointRK8R3Vector(ptr dead_on_unwind writable sret(%class.R3Point) align 8 %48, ptr noundef nonnull align 8 dereferenceable(24) %46, ptr noundef nonnull align 8 dereferenceable(24) %49)
          to label %195 unwind label %335

195:                                              ; preds = %194
  call void @llvm.lifetime.end.p0(i64 24, ptr %49) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %50) #8
  %196 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 232) #10
          to label %197 unwind label %339

197:                                              ; preds = %195
  store i1 true, ptr %52, align 1
  call void @llvm.lifetime.start.p0(i64 56, ptr %51) #8
  %198 = load ptr, ptr %45, align 8, !tbaa !5
  %199 = load ptr, ptr %198, align 8, !tbaa !35
  %200 = getelementptr inbounds ptr, ptr %199, i64 17
  %201 = load ptr, ptr %200, align 8
  invoke void %201(ptr dead_on_unwind writable sret(%class.R3Box) align 8 %51, ptr noundef nonnull align 8 dereferenceable(96) %198)
          to label %202 unwind label %343

202:                                              ; preds = %197
  %203 = invoke noundef double @_ZNK5R3Box14DiagonalRadiusEv(ptr noundef nonnull align 8 dereferenceable(56) %51)
          to label %204 unwind label %347

204:                                              ; preds = %202
  %205 = fmul double 1.000000e-02, %203
  invoke void @_ZN10R3CylinderC1ERK7R3PointS2_d(ptr noundef nonnull align 8 dereferenceable(232) %196, ptr noundef nonnull align 8 dereferenceable(24) %46, ptr noundef nonnull align 8 dereferenceable(24) %48, double noundef %205)
          to label %206 unwind label %347

206:                                              ; preds = %204
  store i1 false, ptr %52, align 1
  call void @_ZN7R3SolidD2Ev(ptr noundef nonnull align 8 dereferenceable(56) %51) #8
  call void @llvm.lifetime.end.p0(i64 56, ptr %51) #8
  store ptr %196, ptr %50, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %53) #8
  %207 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 184) #10
          to label %208 unwind label %355

208:                                              ; preds = %206
  store i1 true, ptr %55, align 1
  call void @llvm.lifetime.start.p0(i64 24, ptr %54) #8
  %209 = load double, ptr %25, align 8, !tbaa !34
  %210 = fadd double 2.500000e-01, %209
  invoke void @_ZN5RNRgbC1Eddd(ptr noundef nonnull align 8 dereferenceable(24) %54, double noundef 0.000000e+00, double noundef %210, double noundef 0.000000e+00)
          to label %211 unwind label %359

211:                                              ; preds = %208
  invoke void @_ZN6R3BrdfC1ERK5RNRgbdddPKc(ptr noundef nonnull align 8 dereferenceable(180) %207, ptr noundef nonnull align 8 dereferenceable(24) %54, double noundef 0.000000e+00, double noundef 1.000000e+00, double noundef 1.000000e+00, ptr noundef null)
          to label %212 unwind label %359

212:                                              ; preds = %211
  store i1 false, ptr %55, align 1
  call void @llvm.lifetime.end.p0(i64 24, ptr %54) #8
  store ptr %207, ptr %53, align 8, !tbaa !5
  %213 = load ptr, ptr %53, align 8, !tbaa !5
  invoke void @_ZN7R3Scene10InsertBrdfEP6R3Brdf(ptr noundef nonnull align 8 dereferenceable(352) %59, ptr noundef %213)
          to label %214 unwind label %355

214:                                              ; preds = %212
  call void @llvm.lifetime.start.p0(i64 8, ptr %56) #8
  %215 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 48) #10
          to label %216 unwind label %366

216:                                              ; preds = %214
  %217 = load ptr, ptr %53, align 8, !tbaa !5
  invoke void @_ZN10R3MaterialC1EPK6R3BrdfPKc(ptr noundef nonnull align 8 dereferenceable(48) %215, ptr noundef %217, ptr noundef null)
          to label %218 unwind label %370

218:                                              ; preds = %216
  store ptr %215, ptr %56, align 8, !tbaa !5
  %219 = load ptr, ptr %56, align 8, !tbaa !5
  invoke void @_ZN7R3Scene14InsertMaterialEP10R3Material(ptr noundef nonnull align 8 dereferenceable(352) %59, ptr noundef %219)
          to label %220 unwind label %366

220:                                              ; preds = %218
  call void @llvm.lifetime.start.p0(i64 8, ptr %57) #8
  %221 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 96) #10
          to label %222 unwind label %374

222:                                              ; preds = %220
  invoke void @_ZN14R3SceneElementC1EP10R3Material(ptr noundef nonnull align 8 dereferenceable(96) %221, ptr noundef null)
          to label %223 unwind label %378

223:                                              ; preds = %222
  store ptr %221, ptr %57, align 8, !tbaa !5
  %224 = load ptr, ptr %57, align 8, !tbaa !5
  %225 = load ptr, ptr %56, align 8, !tbaa !5
  invoke void @_ZN14R3SceneElement11SetMaterialEP10R3Material(ptr noundef nonnull align 8 dereferenceable(96) %224, ptr noundef %225)
          to label %226 unwind label %374

226:                                              ; preds = %223
  %227 = load ptr, ptr %57, align 8, !tbaa !5
  %228 = load ptr, ptr %45, align 8, !tbaa !5
  invoke void @_ZN14R3SceneElement11InsertShapeEP7R3Shape(ptr noundef nonnull align 8 dereferenceable(96) %227, ptr noundef %228)
          to label %229 unwind label %374

229:                                              ; preds = %226
  %230 = load ptr, ptr %57, align 8, !tbaa !5
  %231 = load ptr, ptr %50, align 8, !tbaa !5
  invoke void @_ZN14R3SceneElement11InsertShapeEP7R3Shape(ptr noundef nonnull align 8 dereferenceable(96) %230, ptr noundef %231)
          to label %232 unwind label %374

232:                                              ; preds = %229
  %233 = load ptr, ptr %26, align 8, !tbaa !5
  %234 = load ptr, ptr %57, align 8, !tbaa !5
  invoke void @_ZN11R3SceneNode13InsertElementEP14R3SceneElement(ptr noundef nonnull align 8 dereferenceable(432) %233, ptr noundef %234)
          to label %235 unwind label %374

235:                                              ; preds = %232
  call void @llvm.lifetime.start.p0(i64 1024, ptr %58) #8
  %236 = getelementptr inbounds [1024 x i8], ptr %58, i64 0, i64 0
  %237 = load i32, ptr %12, align 4, !tbaa !29
  %238 = add nsw i32 %237, 1
  store i32 %238, ptr %12, align 4, !tbaa !29
  %239 = load double, ptr %25, align 8, !tbaa !34
  %240 = fmul double 1.000000e+03, %239
  %241 = fptosi double %240 to i32
  %242 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %236, ptr noundef @.str.145, i32 noundef %237, i32 noundef %241) #8
  %243 = load ptr, ptr %26, align 8, !tbaa !5
  %244 = getelementptr inbounds [1024 x i8], ptr %58, i64 0, i64 0
  invoke void @_ZN11R3SceneNode7SetNameEPKc(ptr noundef nonnull align 8 dereferenceable(432) %243, ptr noundef %244)
          to label %245 unwind label %382

245:                                              ; preds = %235
  call void @llvm.lifetime.end.p0(i64 1024, ptr %58) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %57) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %56) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %53) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %50) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %48) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %46) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %45) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %44) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %43) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %40) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #8
  call void @_ZN8RNVArrayD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %30) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %30) #8
  call void @_ZN8RNVArrayD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %29) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %29) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #8
  store i32 0, ptr %9, align 4
  br label %246

246:                                              ; preds = %245, %113
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 4096, ptr %14) #8
  br label %247

247:                                              ; preds = %246, %107, %101
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #8
  %248 = load i32, ptr %9, align 4
  switch i32 %248, label %404 [
    i32 0, label %249
    i32 2, label %74
  ]

249:                                              ; preds = %247
  br label %74, !llvm.loop !33

250:                                              ; preds = %118
  %251 = landingpad { ptr, i32 }
          cleanup
  %252 = extractvalue { ptr, i32 } %251, 0
  store ptr %252, ptr %27, align 8
  %253 = extractvalue { ptr, i32 } %251, 1
  store i32 %253, ptr %28, align 4
  call void @_ZdlPvm(ptr noundef %119, i64 noundef 432) #11
  br label %400

254:                                              ; preds = %120
  %255 = landingpad { ptr, i32 }
          cleanup
  %256 = extractvalue { ptr, i32 } %255, 0
  store ptr %256, ptr %27, align 8
  %257 = extractvalue { ptr, i32 } %255, 1
  store i32 %257, ptr %28, align 4
  br label %399

258:                                              ; preds = %130, %123
  %259 = landingpad { ptr, i32 }
          cleanup
  %260 = extractvalue { ptr, i32 } %259, 0
  store ptr %260, ptr %27, align 8
  %261 = extractvalue { ptr, i32 } %259, 1
  store i32 %261, ptr %28, align 4
  br label %398

262:                                              ; preds = %129, %125
  %263 = landingpad { ptr, i32 }
          cleanup
  %264 = extractvalue { ptr, i32 } %263, 0
  store ptr %264, ptr %27, align 8
  %265 = extractvalue { ptr, i32 } %263, 1
  store i32 %265, ptr %28, align 4
  call void @llvm.lifetime.end.p0(i64 24, ptr %32) #8
  %266 = load i1, ptr %33, align 1
  br i1 %266, label %267, label %268

267:                                              ; preds = %262
  call void @_ZdlPvm(ptr noundef %124, i64 noundef 104) #11
  br label %268

268:                                              ; preds = %267, %262
  br label %398

269:                                              ; preds = %140, %133
  %270 = landingpad { ptr, i32 }
          cleanup
  %271 = extractvalue { ptr, i32 } %270, 0
  store ptr %271, ptr %27, align 8
  %272 = extractvalue { ptr, i32 } %270, 1
  store i32 %272, ptr %28, align 4
  br label %397

273:                                              ; preds = %139, %135
  %274 = landingpad { ptr, i32 }
          cleanup
  %275 = extractvalue { ptr, i32 } %274, 0
  store ptr %275, ptr %27, align 8
  %276 = extractvalue { ptr, i32 } %274, 1
  store i32 %276, ptr %28, align 4
  call void @llvm.lifetime.end.p0(i64 24, ptr %35) #8
  %277 = load i1, ptr %36, align 1
  br i1 %277, label %278, label %279

278:                                              ; preds = %273
  call void @_ZdlPvm(ptr noundef %134, i64 noundef 104) #11
  br label %279

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

280:                                              ; preds = %150, %143
  %281 = landingpad { ptr, i32 }
          cleanup
  %282 = extractvalue { ptr, i32 } %281, 0
  store ptr %282, ptr %27, align 8
  %283 = extractvalue { ptr, i32 } %281, 1
  store i32 %283, ptr %28, align 4
  br label %396

284:                                              ; preds = %149, %145
  %285 = landingpad { ptr, i32 }
          cleanup
  %286 = extractvalue { ptr, i32 } %285, 0
  store ptr %286, ptr %27, align 8
  %287 = extractvalue { ptr, i32 } %285, 1
  store i32 %287, ptr %28, align 4
  call void @llvm.lifetime.end.p0(i64 24, ptr %38) #8
  %288 = load i1, ptr %39, align 1
  br i1 %288, label %289, label %290

289:                                              ; preds = %284
  call void @_ZdlPvm(ptr noundef %144, i64 noundef 104) #11
  br label %290

290:                                              ; preds = %289, %284
  br label %396

291:                                              ; preds = %160, %153
  %292 = landingpad { ptr, i32 }
          cleanup
  %293 = extractvalue { ptr, i32 } %292, 0
  store ptr %293, ptr %27, align 8
  %294 = extractvalue { ptr, i32 } %292, 1
  store i32 %294, ptr %28, align 4
  br label %395

295:                                              ; preds = %159, %155
  %296 = landingpad { ptr, i32 }
          cleanup
  %297 = extractvalue { ptr, i32 } %296, 0
  store ptr %297, ptr %27, align 8
  %298 = extractvalue { ptr, i32 } %296, 1
  store i32 %298, ptr %28, align 4
  call void @llvm.lifetime.end.p0(i64 24, ptr %41) #8
  %299 = load i1, ptr %42, align 1
  br i1 %299, label %300, label %301

300:                                              ; preds = %295
  call void @_ZdlPvm(ptr noundef %154, i64 noundef 104) #11
  br label %301

301:                                              ; preds = %300, %295
  br label %395

302:                                              ; preds = %169, %163
  %303 = landingpad { ptr, i32 }
          cleanup
  %304 = extractvalue { ptr, i32 } %303, 0
  store ptr %304, ptr %27, align 8
  %305 = extractvalue { ptr, i32 } %303, 1
  store i32 %305, ptr %28, align 4
  br label %394

306:                                              ; preds = %165
  %307 = landingpad { ptr, i32 }
          cleanup
  %308 = extractvalue { ptr, i32 } %307, 0
  store ptr %308, ptr %27, align 8
  %309 = extractvalue { ptr, i32 } %307, 1
  store i32 %309, ptr %28, align 4
  call void @_ZdlPvm(ptr noundef %164, i64 noundef 136) #11
  br label %394

310:                                              ; preds = %178, %172
  %311 = landingpad { ptr, i32 }
          cleanup
  %312 = extractvalue { ptr, i32 } %311, 0
  store ptr %312, ptr %27, align 8
  %313 = extractvalue { ptr, i32 } %311, 1
  store i32 %313, ptr %28, align 4
  br label %393

314:                                              ; preds = %174
  %315 = landingpad { ptr, i32 }
          cleanup
  %316 = extractvalue { ptr, i32 } %315, 0
  store ptr %316, ptr %27, align 8
  %317 = extractvalue { ptr, i32 } %315, 1
  store i32 %317, ptr %28, align 4
  call void @_ZdlPvm(ptr noundef %173, i64 noundef 136) #11
  br label %393

318:                                              ; preds = %181
  %319 = landingpad { ptr, i32 }
          cleanup
  %320 = extractvalue { ptr, i32 } %319, 0
  store ptr %320, ptr %27, align 8
  %321 = extractvalue { ptr, i32 } %319, 1
  store i32 %321, ptr %28, align 4
  br label %392

322:                                              ; preds = %183
  %323 = landingpad { ptr, i32 }
          cleanup
  %324 = extractvalue { ptr, i32 } %323, 0
  store ptr %324, ptr %27, align 8
  %325 = extractvalue { ptr, i32 } %323, 1
  store i32 %325, ptr %28, align 4
  call void @_ZdlPvm(ptr noundef %182, i64 noundef 96) #11
  br label %392

326:                                              ; preds = %184
  %327 = landingpad { ptr, i32 }
          cleanup
  %328 = extractvalue { ptr, i32 } %327, 0
  store ptr %328, ptr %27, align 8
  %329 = extractvalue { ptr, i32 } %327, 1
  store i32 %329, ptr %28, align 4
  br label %334

330:                                              ; preds = %189
  %331 = landingpad { ptr, i32 }
          cleanup
  %332 = extractvalue { ptr, i32 } %331, 0
  store ptr %332, ptr %27, align 8
  %333 = extractvalue { ptr, i32 } %331, 1
  store i32 %333, ptr %28, align 4
  call void @_ZN7R3SolidD2Ev(ptr noundef nonnull align 8 dereferenceable(56) %47) #8
  br label %334

334:                                              ; preds = %330, %326
  call void @llvm.lifetime.end.p0(i64 56, ptr %47) #8
  br label %391

335:                                              ; preds = %194, %190
  %336 = landingpad { ptr, i32 }
          cleanup
  %337 = extractvalue { ptr, i32 } %336, 0
  store ptr %337, ptr %27, align 8
  %338 = extractvalue { ptr, i32 } %336, 1
  store i32 %338, ptr %28, align 4
  call void @llvm.lifetime.end.p0(i64 24, ptr %49) #8
  br label %390

339:                                              ; preds = %195
  %340 = landingpad { ptr, i32 }
          cleanup
  %341 = extractvalue { ptr, i32 } %340, 0
  store ptr %341, ptr %27, align 8
  %342 = extractvalue { ptr, i32 } %340, 1
  store i32 %342, ptr %28, align 4
  br label %389

343:                                              ; preds = %197
  %344 = landingpad { ptr, i32 }
          cleanup
  %345 = extractvalue { ptr, i32 } %344, 0
  store ptr %345, ptr %27, align 8
  %346 = extractvalue { ptr, i32 } %344, 1
  store i32 %346, ptr %28, align 4
  br label %351

347:                                              ; preds = %204, %202
  %348 = landingpad { ptr, i32 }
          cleanup
  %349 = extractvalue { ptr, i32 } %348, 0
  store ptr %349, ptr %27, align 8
  %350 = extractvalue { ptr, i32 } %348, 1
  store i32 %350, ptr %28, align 4
  call void @_ZN7R3SolidD2Ev(ptr noundef nonnull align 8 dereferenceable(56) %51) #8
  br label %351

351:                                              ; preds = %347, %343
  call void @llvm.lifetime.end.p0(i64 56, ptr %51) #8
  %352 = load i1, ptr %52, align 1
  br i1 %352, label %353, label %354

353:                                              ; preds = %351
  call void @_ZdlPvm(ptr noundef %196, i64 noundef 232) #11
  br label %354

354:                                              ; preds = %353, %351
  br label %389

355:                                              ; preds = %212, %206
  %356 = landingpad { ptr, i32 }
          cleanup
  %357 = extractvalue { ptr, i32 } %356, 0
  store ptr %357, ptr %27, align 8
  %358 = extractvalue { ptr, i32 } %356, 1
  store i32 %358, ptr %28, align 4
  br label %388

359:                                              ; preds = %211, %208
  %360 = landingpad { ptr, i32 }
          cleanup
  %361 = extractvalue { ptr, i32 } %360, 0
  store ptr %361, ptr %27, align 8
  %362 = extractvalue { ptr, i32 } %360, 1
  store i32 %362, ptr %28, align 4
  call void @llvm.lifetime.end.p0(i64 24, ptr %54) #8
  %363 = load i1, ptr %55, align 1
  br i1 %363, label %364, label %365

364:                                              ; preds = %359
  call void @_ZdlPvm(ptr noundef %207, i64 noundef 184) #11
  br label %365

365:                                              ; preds = %364, %359
  br label %388

366:                                              ; preds = %218, %214
  %367 = landingpad { ptr, i32 }
          cleanup
  %368 = extractvalue { ptr, i32 } %367, 0
  store ptr %368, ptr %27, align 8
  %369 = extractvalue { ptr, i32 } %367, 1
  store i32 %369, ptr %28, align 4
  br label %387

370:                                              ; preds = %216
  %371 = landingpad { ptr, i32 }
          cleanup
  %372 = extractvalue { ptr, i32 } %371, 0
  store ptr %372, ptr %27, align 8
  %373 = extractvalue { ptr, i32 } %371, 1
  store i32 %373, ptr %28, align 4
  call void @_ZdlPvm(ptr noundef %215, i64 noundef 48) #11
  br label %387

374:                                              ; preds = %232, %229, %226, %223, %220
  %375 = landingpad { ptr, i32 }
          cleanup
  %376 = extractvalue { ptr, i32 } %375, 0
  store ptr %376, ptr %27, align 8
  %377 = extractvalue { ptr, i32 } %375, 1
  store i32 %377, ptr %28, align 4
  br label %386

378:                                              ; preds = %222
  %379 = landingpad { ptr, i32 }
          cleanup
  %380 = extractvalue { ptr, i32 } %379, 0
  store ptr %380, ptr %27, align 8
  %381 = extractvalue { ptr, i32 } %379, 1
  store i32 %381, ptr %28, align 4
  call void @_ZdlPvm(ptr noundef %221, i64 noundef 96) #11
  br label %386

382:                                              ; preds = %235
  %383 = landingpad { ptr, i32 }
          cleanup
  %384 = extractvalue { ptr, i32 } %383, 0
  store ptr %384, ptr %27, align 8
  %385 = extractvalue { ptr, i32 } %383, 1
  store i32 %385, ptr %28, align 4
  call void @llvm.lifetime.end.p0(i64 1024, ptr %58) #8
  br label %386

386:                                              ; preds = %382, %378, %374
  call void @llvm.lifetime.end.p0(i64 8, ptr %57) #8
  br label %387

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

388:                                              ; preds = %387, %365, %355
  call void @llvm.lifetime.end.p0(i64 8, ptr %53) #8
  br label %389

389:                                              ; preds = %388, %354, %339
  call void @llvm.lifetime.end.p0(i64 8, ptr %50) #8
  br label %390

390:                                              ; preds = %389, %335
  call void @llvm.lifetime.end.p0(i64 24, ptr %48) #8
  br label %391

391:                                              ; preds = %390, %334
  call void @llvm.lifetime.end.p0(i64 24, ptr %46) #8
  br label %392

392:                                              ; preds = %391, %322, %318
  call void @llvm.lifetime.end.p0(i64 8, ptr %45) #8
  br label %393

393:                                              ; preds = %392, %314, %310
  call void @llvm.lifetime.end.p0(i64 8, ptr %44) #8
  br label %394

394:                                              ; preds = %393, %306, %302
  call void @llvm.lifetime.end.p0(i64 8, ptr %43) #8
  br label %395

395:                                              ; preds = %394, %301, %291
  call void @llvm.lifetime.end.p0(i64 8, ptr %40) #8
  br label %396

396:                                              ; preds = %395, %290, %280
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #8
  br label %397

397:                                              ; preds = %396, %279, %269
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #8
  br label %398

398:                                              ; preds = %397, %268, %258
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #8
  call void @_ZN8RNVArrayD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %30) #8
  br label %399

399:                                              ; preds = %398, %254
  call void @llvm.lifetime.end.p0(i64 16, ptr %30) #8
  call void @_ZN8RNVArrayD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %29) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %29) #8
  br label %400

400:                                              ; preds = %399, %250
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 4096, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 4096, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #8
  br label %407

401:                                              ; preds = %74
  %402 = load ptr, ptr %8, align 8, !tbaa !5
  %403 = call i32 @fclose(ptr noundef %402)
  store i32 1, ptr %4, align 4
  store i32 1, ptr %9, align 4
  br label %404

404:                                              ; preds = %401, %247
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 4096, ptr %10) #8
  br label %405

405:                                              ; preds = %404, %69
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #8
  %406 = load i32, ptr %4, align 4
  ret i32 %406

407:                                              ; preds = %400
  %408 = load ptr, ptr %27, align 8
  %409 = load i32, ptr %28, align 4
  %410 = insertvalue { ptr, i32 } poison, ptr %408, 0
  %411 = insertvalue { ptr, i32 } %410, i32 %409, 1
  resume { ptr, i32 } %411
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef double @_ZNK5R3Box14DiagonalRadiusEv(ptr noundef nonnull align 8 dereferenceable(56)) #6 align 2

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

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

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

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

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

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

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

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

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

declare void @_ZN14R3SceneElementC1EP10R3Material(ptr noundef nonnull align 8 dereferenceable(96), ptr noundef) unnamed_addr #0

declare void @_ZN14R3SceneElement11InsertShapeEP7R3Shape(ptr noundef nonnull align 8 dereferenceable(96), ptr noundef) #0

declare void @_ZN11R3SceneNode13InsertElementEP14R3SceneElement(ptr noundef nonnull align 8 dereferenceable(432), ptr noundef) #0

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZmldRK8R3Vector(ptr dead_on_unwind noalias writable sret(%class.R3Vector) align 8, double noundef, ptr noundef nonnull align 8 dereferenceable(24)) #6

declare void @_ZplRK7R3PointRK8R3Vector(ptr dead_on_unwind writable sret(%class.R3Point) align 8, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #0

declare void @_ZN10R3CylinderC1ERK7R3PointS2_d(ptr noundef nonnull align 8 dereferenceable(232), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24), double noundef) unnamed_addr #0

declare void @_ZN7R3PointC1Eddd(ptr noundef nonnull align 8 dereferenceable(24), double noundef, double noundef, double noundef) unnamed_addr #0

declare i32 @fclose(ptr noundef) #0

declare ptr @fgets(ptr noundef, i32 noundef, ptr noundef) #0

; Function Attrs: nounwind willreturn memory(read)
declare i32 @isspace(i32 noundef) #7

; Function Attrs: nounwind
declare i32 @__isoc99_sscanf(ptr noundef, ptr noundef, ...) #5

declare void @_ZN14R3SceneElement11SetMaterialEP10R3Material(ptr noundef nonnull align 8 dereferenceable(96), ptr noundef) #0

declare void @_ZN6R3BrdfC1ERK5RNRgbdddPKc(ptr noundef nonnull align 8 dereferenceable(180), ptr noundef nonnull align 8 dereferenceable(24), double noundef, double noundef, double noundef, ptr noundef) unnamed_addr #0

declare void @_ZN10R3MaterialC1EPK6R3BrdfPKc(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef, ptr noundef) unnamed_addr #0

declare void @_ZN15R3TriangleArrayC1ERK7RNArrayIP16R3TriangleVertexERKS0_IP10R3TriangleE(ptr noundef nonnull align 8 dereferenceable(96), ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #0

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

; Function Attrs: nounwind
declare void @_ZN7R3SolidD2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #5

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 0}
!10 = !{!"_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 = !{!7, !7, i64 0}
!31 = distinct !{!31, !32}
!32 = !{!"llvm.loop.mustprogress"}
!33 = distinct !{!33, !32}
!34 = !{!26, !26, i64 0}
!35 = !{!36, !36, i64 0}
!36 = !{!"vtable pointer", !8, i64 0}


; 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.R3Vector = type { [3 x double] }
%class.RNArray.13 = type { %class.RNVArray }
%class.RNVArray = type { ptr, i32, i32 }
%class.RNArray.10 = type { %class.RNVArray }
%class.R3Point = type { [3 x double] }
%class.R3Box = type { %class.R3Solid, %class.R3Point, %class.R3Point }
%class.R3Solid = type { %class.R3Shape }
%class.R3Shape = type { ptr }
%class.RNRgb = type { [3 x double] }

@stderr = external local_unnamed_addr global ptr, align 8
@.str.42 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.43 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.143 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.144 = external hidden unnamed_addr constant [29 x i8], align 1
@R3posz_vector = external global %class.R3Vector, align 8
@.str.145 = external hidden unnamed_addr constant [10 x i8], align 1

declare i32 @__gxx_personality_v0(...)

declare void @_ZN5RNRgbC1Eddd(ptr noundef nonnull align 8 dereferenceable(24), double noundef, double noundef, double noundef) unnamed_addr #0

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

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

; 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: mustprogress uwtable
declare dso_local void @_ZN7R3Scene14InsertMaterialEP10R3Material(ptr noundef nonnull align 8 dereferenceable(352), ptr noundef) local_unnamed_addr #4 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN7R3Scene17ReadRectangleFileEPKcP11R3SceneNode(ptr noundef nonnull align 8 dereferenceable(352) %0, ptr noundef %1, ptr noundef %2) local_unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca [4096 x i8], align 16
  %5 = alloca [4096 x i8], align 16
  %6 = alloca double, align 8
  %7 = alloca double, align 8
  %8 = alloca double, align 8
  %9 = alloca double, align 8
  %10 = alloca double, align 8
  %11 = alloca double, align 8
  %12 = alloca double, align 8
  %13 = alloca double, align 8
  %14 = alloca double, align 8
  %15 = alloca double, align 8
  %16 = alloca double, align 8
  %17 = alloca %class.RNArray.13, align 8
  %18 = alloca %class.RNArray.10, align 8
  %19 = alloca %class.R3Point, align 8
  %20 = alloca %class.R3Point, align 8
  %21 = alloca %class.R3Point, align 8
  %22 = alloca %class.R3Point, align 8
  %23 = alloca %class.R3Point, align 8
  %24 = alloca %class.R3Box, align 8
  %25 = alloca %class.R3Point, align 8
  %26 = alloca %class.R3Vector, align 8
  %27 = alloca %class.R3Box, align 8
  %28 = alloca %class.RNRgb, align 8
  %29 = alloca [1024 x i8], align 16
  %.not = icmp eq ptr %2, null
  %30 = load ptr, ptr %0, align 8
  %spec.select = select i1 %.not, ptr %30, ptr %2
  %31 = tail call noalias ptr @fopen(ptr noundef %1, ptr noundef nonnull @.str.42)
  %.not86 = icmp eq ptr %31, null
  br i1 %.not86, label %32, label %35

32:                                               ; preds = %3
  %33 = load ptr, ptr @stderr, align 8, !tbaa !5
  %34 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %33, ptr noundef nonnull @.str.43, ptr noundef %1) #9
  br label %213

35:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 4096, ptr nonnull %4) #10
  %36 = call ptr @fgets(ptr noundef nonnull %4, i32 noundef 4096, ptr noundef nonnull %31)
  %.not87304 = icmp eq ptr %36, null
  br i1 %.not87304, label %._crit_edge, label %.lr.ph308

.lr.ph308:                                        ; preds = %35, %.backedge
  %.056307 = phi i32 [ %37, %.backedge ], [ 0, %35 ]
  %.057305 = phi i32 [ %.259504, %.backedge ], [ 0, %35 ]
  %37 = add nuw nsw i32 %.056307, 1
  %38 = load i8, ptr %4, align 16, !tbaa !9
  %.not88302 = icmp eq i8 %38, 0
  br i1 %.not88302, label %.critedge.thread, label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph308, %42
  %39 = phi i8 [ %44, %42 ], [ %38, %.lr.ph308 ]
  %.060303 = phi ptr [ %43, %42 ], [ %4, %.lr.ph308 ]
  %40 = sext i8 %39 to i32
  %41 = call i32 @isspace(i32 noundef %40) #11
  %.not89 = icmp eq i32 %41, 0
  br i1 %.not89, label %.critedge, label %42

42:                                               ; preds = %.lr.ph
  %43 = getelementptr inbounds i8, ptr %.060303, i64 1
  %44 = load i8, ptr %43, align 1, !tbaa !9
  %.not88 = icmp eq i8 %44, 0
  br i1 %.not88, label %.critedge.thread, label %.lr.ph, !llvm.loop !10

.critedge:                                        ; preds = %.lr.ph
  %45 = icmp eq i8 %39, 35
  br i1 %45, label %.backedge, label %.critedge.thread, !llvm.loop !12

.critedge.thread:                                 ; preds = %42, %.lr.ph308, %.critedge
  %.060112 = phi ptr [ %.060303, %.critedge ], [ %4, %.lr.ph308 ], [ %43, %42 ]
  call void @llvm.lifetime.start.p0(i64 4096, ptr nonnull %5) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #10
  %46 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef nonnull %.060112, ptr noundef nonnull @.str.143, ptr noundef nonnull %6, ptr noundef nonnull %7, ptr noundef nonnull %8, ptr noundef nonnull %9, ptr noundef nonnull %10, ptr noundef nonnull %11, ptr noundef nonnull %12, ptr noundef nonnull %13, ptr noundef nonnull %14, ptr noundef nonnull %15, ptr noundef nonnull %16, ptr noundef nonnull %5) #10
  %.not90 = icmp eq i32 %46, 12
  br i1 %.not90, label %47, label %.loopexit.loopexit

47:                                               ; preds = %.critedge.thread
  %48 = call noalias noundef nonnull dereferenceable(432) ptr @_Znwm(i64 noundef 432) #12
  invoke void @_ZN11R3SceneNodeC1EP7R3Scene(ptr noundef nonnull align 8 dereferenceable(432) %48, ptr noundef nonnull %0)
          to label %49 unwind label %145

49:                                               ; preds = %47
  call void @_ZN11R3SceneNode11InsertChildEPS_(ptr noundef nonnull align 8 dereferenceable(432) %spec.select, ptr noundef nonnull %48)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %17) #10
  call void @_ZN7RNArrayIP10R3TriangleEC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %17)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %18) #10
  invoke void @_ZN7RNArrayIP16R3TriangleVertexEC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %18)
          to label %50 unwind label %147

50:                                               ; preds = %49
  %51 = invoke noalias noundef nonnull dereferenceable(104) ptr @_Znwm(i64 noundef 104) #12
          to label %52 unwind label %149

52:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %19) #10
  %53 = load double, ptr %6, align 8, !tbaa !13
  %54 = load double, ptr %7, align 8, !tbaa !13
  %55 = load double, ptr %14, align 8, !tbaa !13
  invoke void @_ZN7R3PointC1Eddd(ptr noundef nonnull align 8 dereferenceable(24) %19, double noundef %53, double noundef %54, double noundef %55)
          to label %56 unwind label %151

56:                                               ; preds = %52
  invoke void @_ZN16R3TriangleVertexC1ERK7R3Point(ptr noundef nonnull align 8 dereferenceable(100) %51, ptr noundef nonnull align 8 dereferenceable(24) %19)
          to label %57 unwind label %151

57:                                               ; preds = %56
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %19) #10
  %58 = invoke noundef ptr @_ZN7RNArrayIP16R3TriangleVertexE6InsertES1_(ptr noundef nonnull align 8 dereferenceable(16) %18, ptr noundef nonnull %51)
          to label %59 unwind label %149

59:                                               ; preds = %57
  %60 = invoke noalias noundef nonnull dereferenceable(104) ptr @_Znwm(i64 noundef 104) #12
          to label %61 unwind label %153

61:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %20) #10
  %62 = load double, ptr %8, align 8, !tbaa !13
  %63 = load double, ptr %9, align 8, !tbaa !13
  %64 = load double, ptr %14, align 8, !tbaa !13
  invoke void @_ZN7R3PointC1Eddd(ptr noundef nonnull align 8 dereferenceable(24) %20, double noundef %62, double noundef %63, double noundef %64)
          to label %65 unwind label %155

65:                                               ; preds = %61
  invoke void @_ZN16R3TriangleVertexC1ERK7R3Point(ptr noundef nonnull align 8 dereferenceable(100) %60, ptr noundef nonnull align 8 dereferenceable(24) %20)
          to label %66 unwind label %155

66:                                               ; preds = %65
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %20) #10
  %67 = invoke noundef ptr @_ZN7RNArrayIP16R3TriangleVertexE6InsertES1_(ptr noundef nonnull align 8 dereferenceable(16) %18, ptr noundef nonnull %60)
          to label %68 unwind label %153

68:                                               ; preds = %66
  %69 = invoke noalias noundef nonnull dereferenceable(104) ptr @_Znwm(i64 noundef 104) #12
          to label %70 unwind label %157

70:                                               ; preds = %68
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %21) #10
  %71 = load double, ptr %10, align 8, !tbaa !13
  %72 = load double, ptr %11, align 8, !tbaa !13
  %73 = load double, ptr %14, align 8, !tbaa !13
  invoke void @_ZN7R3PointC1Eddd(ptr noundef nonnull align 8 dereferenceable(24) %21, double noundef %71, double noundef %72, double noundef %73)
          to label %74 unwind label %159

74:                                               ; preds = %70
  invoke void @_ZN16R3TriangleVertexC1ERK7R3Point(ptr noundef nonnull align 8 dereferenceable(100) %69, ptr noundef nonnull align 8 dereferenceable(24) %21)
          to label %75 unwind label %159

75:                                               ; preds = %74
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %21) #10
  %76 = invoke noundef ptr @_ZN7RNArrayIP16R3TriangleVertexE6InsertES1_(ptr noundef nonnull align 8 dereferenceable(16) %18, ptr noundef nonnull %69)
          to label %77 unwind label %157

77:                                               ; preds = %75
  %78 = invoke noalias noundef nonnull dereferenceable(104) ptr @_Znwm(i64 noundef 104) #12
          to label %79 unwind label %161

79:                                               ; preds = %77
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %22) #10
  %80 = load double, ptr %12, align 8, !tbaa !13
  %81 = load double, ptr %13, align 8, !tbaa !13
  %82 = load double, ptr %14, align 8, !tbaa !13
  invoke void @_ZN7R3PointC1Eddd(ptr noundef nonnull align 8 dereferenceable(24) %22, double noundef %80, double noundef %81, double noundef %82)
          to label %83 unwind label %163

83:                                               ; preds = %79
  invoke void @_ZN16R3TriangleVertexC1ERK7R3Point(ptr noundef nonnull align 8 dereferenceable(100) %78, ptr noundef nonnull align 8 dereferenceable(24) %22)
          to label %84 unwind label %163

84:                                               ; preds = %83
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %22) #10
  %85 = invoke noundef ptr @_ZN7RNArrayIP16R3TriangleVertexE6InsertES1_(ptr noundef nonnull align 8 dereferenceable(16) %18, ptr noundef nonnull %78)
          to label %86 unwind label %161

86:                                               ; preds = %84
  %87 = invoke noalias noundef nonnull dereferenceable(136) ptr @_Znwm(i64 noundef 136) #12
          to label %88 unwind label %165

88:                                               ; preds = %86
  invoke void @_ZN10R3TriangleC1EP16R3TriangleVertexS1_S1_(ptr noundef nonnull align 8 dereferenceable(132) %87, ptr noundef nonnull %51, ptr noundef nonnull %60, ptr noundef nonnull %69)
          to label %89 unwind label %167

89:                                               ; preds = %88
  %90 = invoke noundef ptr @_ZN7RNArrayIP10R3TriangleE6InsertES1_(ptr noundef nonnull align 8 dereferenceable(16) %17, ptr noundef nonnull %87)
          to label %91 unwind label %165

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

93:                                               ; preds = %91
  invoke void @_ZN10R3TriangleC1EP16R3TriangleVertexS1_S1_(ptr noundef nonnull align 8 dereferenceable(132) %92, ptr noundef nonnull %51, ptr noundef nonnull %69, ptr noundef nonnull %78)
          to label %94 unwind label %171

94:                                               ; preds = %93
  %95 = invoke noundef ptr @_ZN7RNArrayIP10R3TriangleE6InsertES1_(ptr noundef nonnull align 8 dereferenceable(16) %17, ptr noundef nonnull %92)
          to label %96 unwind label %169

96:                                               ; preds = %94
  %97 = invoke noalias noundef nonnull dereferenceable(96) ptr @_Znwm(i64 noundef 96) #12
          to label %98 unwind label %173

98:                                               ; preds = %96
  invoke void @_ZN15R3TriangleArrayC1ERK7RNArrayIP16R3TriangleVertexERKS0_IP10R3TriangleE(ptr noundef nonnull align 8 dereferenceable(96) %97, ptr noundef nonnull align 8 dereferenceable(16) %18, ptr noundef nonnull align 8 dereferenceable(16) %17)
          to label %99 unwind label %175

99:                                               ; preds = %98
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %23) #10
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %24) #10
  %100 = load ptr, ptr %97, align 8, !tbaa !15
  %101 = getelementptr inbounds i8, ptr %100, i64 136
  %102 = load ptr, ptr %101, align 8
  invoke void %102(ptr dead_on_unwind nonnull writable sret(%class.R3Box) align 8 %24, ptr noundef nonnull align 8 dereferenceable(96) %97)
          to label %103 unwind label %177

103:                                              ; preds = %99
  invoke void @_ZNK5R3Box8CentroidEv(ptr dead_on_unwind nonnull writable sret(%class.R3Point) align 8 %23, ptr noundef nonnull align 8 dereferenceable(56) %24)
          to label %104 unwind label %179

104:                                              ; preds = %103
  call void @_ZN7R3SolidD2Ev(ptr noundef nonnull align 8 dereferenceable(56) %24) #10
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %24) #10
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %25) #10
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %26) #10
  %105 = load double, ptr %15, align 8, !tbaa !13
  %106 = load double, ptr %14, align 8, !tbaa !13
  %107 = fsub double %105, %106
  invoke void @_ZmldRK8R3Vector(ptr dead_on_unwind nonnull writable sret(%class.R3Vector) align 8 %26, double noundef %107, ptr noundef nonnull align 8 dereferenceable(24) @R3posz_vector)
          to label %108 unwind label %182

108:                                              ; preds = %104
  invoke void @_ZplRK7R3PointRK8R3Vector(ptr dead_on_unwind nonnull writable sret(%class.R3Point) align 8 %25, ptr noundef nonnull align 8 dereferenceable(24) %23, ptr noundef nonnull align 8 dereferenceable(24) %26)
          to label %109 unwind label %182

109:                                              ; preds = %108
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %26) #10
  %110 = invoke noalias noundef nonnull dereferenceable(232) ptr @_Znwm(i64 noundef 232) #12
          to label %111 unwind label %184

111:                                              ; preds = %109
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %27) #10
  %112 = load ptr, ptr %97, align 8, !tbaa !15
  %113 = getelementptr inbounds i8, ptr %112, i64 136
  %114 = load ptr, ptr %113, align 8
  invoke void %114(ptr dead_on_unwind nonnull writable sret(%class.R3Box) align 8 %27, ptr noundef nonnull align 8 dereferenceable(96) %97)
          to label %115 unwind label %186

115:                                              ; preds = %111
  %116 = invoke noundef double @_ZNK5R3Box14DiagonalRadiusEv(ptr noundef nonnull align 8 dereferenceable(56) %27)
          to label %117 unwind label %188

117:                                              ; preds = %115
  %118 = fmul double %116, 1.000000e-02
  invoke void @_ZN10R3CylinderC1ERK7R3PointS2_d(ptr noundef nonnull align 8 dereferenceable(232) %110, ptr noundef nonnull align 8 dereferenceable(24) %23, ptr noundef nonnull align 8 dereferenceable(24) %25, double noundef %118)
          to label %119 unwind label %188

119:                                              ; preds = %117
  call void @_ZN7R3SolidD2Ev(ptr noundef nonnull align 8 dereferenceable(56) %27) #10
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %27) #10
  %120 = invoke noalias noundef nonnull dereferenceable(184) ptr @_Znwm(i64 noundef 184) #12
          to label %121 unwind label %191

121:                                              ; preds = %119
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %28) #10
  %122 = load double, ptr %16, align 8, !tbaa !13
  %123 = fadd double %122, 2.500000e-01
  invoke void @_ZN5RNRgbC1Eddd(ptr noundef nonnull align 8 dereferenceable(24) %28, double noundef 0.000000e+00, double noundef %123, double noundef 0.000000e+00)
          to label %124 unwind label %193

124:                                              ; preds = %121
  invoke void @_ZN6R3BrdfC1ERK5RNRgbdddPKc(ptr noundef nonnull align 8 dereferenceable(180) %120, ptr noundef nonnull align 8 dereferenceable(24) %28, double noundef 0.000000e+00, double noundef 1.000000e+00, double noundef 1.000000e+00, ptr noundef null)
          to label %125 unwind label %193

125:                                              ; preds = %124
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %28) #10
  invoke void @_ZN7R3Scene10InsertBrdfEP6R3Brdf(ptr noundef nonnull align 8 dereferenceable(352) %0, ptr noundef nonnull %120)
          to label %126 unwind label %191

126:                                              ; preds = %125
  %127 = invoke noalias noundef nonnull dereferenceable(48) ptr @_Znwm(i64 noundef 48) #12
          to label %128 unwind label %195

128:                                              ; preds = %126
  invoke void @_ZN10R3MaterialC1EPK6R3BrdfPKc(ptr noundef nonnull align 8 dereferenceable(48) %127, ptr noundef nonnull %120, ptr noundef null)
          to label %129 unwind label %197

129:                                              ; preds = %128
  invoke void @_ZN7R3Scene14InsertMaterialEP10R3Material(ptr noundef nonnull align 8 dereferenceable(352) %0, ptr noundef nonnull %127)
          to label %130 unwind label %195

130:                                              ; preds = %129
  %131 = invoke noalias noundef nonnull dereferenceable(96) ptr @_Znwm(i64 noundef 96) #12
          to label %132 unwind label %199

132:                                              ; preds = %130
  invoke void @_ZN14R3SceneElementC1EP10R3Material(ptr noundef nonnull align 8 dereferenceable(96) %131, ptr noundef null)
          to label %133 unwind label %201

133:                                              ; preds = %132
  invoke void @_ZN14R3SceneElement11SetMaterialEP10R3Material(ptr noundef nonnull align 8 dereferenceable(96) %131, ptr noundef nonnull %127)
          to label %134 unwind label %199

134:                                              ; preds = %133
  invoke void @_ZN14R3SceneElement11InsertShapeEP7R3Shape(ptr noundef nonnull align 8 dereferenceable(96) %131, ptr noundef nonnull %97)
          to label %135 unwind label %199

135:                                              ; preds = %134
  invoke void @_ZN14R3SceneElement11InsertShapeEP7R3Shape(ptr noundef nonnull align 8 dereferenceable(96) %131, ptr noundef nonnull %110)
          to label %136 unwind label %199

136:                                              ; preds = %135
  invoke void @_ZN11R3SceneNode13InsertElementEP14R3SceneElement(ptr noundef nonnull align 8 dereferenceable(432) %48, ptr noundef nonnull %131)
          to label %137 unwind label %199

137:                                              ; preds = %136
  call void @llvm.lifetime.start.p0(i64 1024, ptr nonnull %29) #10
  %138 = load double, ptr %16, align 8, !tbaa !13
  %139 = fmul double %138, 1.000000e+03
  %140 = fptosi double %139 to i32
  %141 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %29, ptr noundef nonnull dereferenceable(1) @.str.145, i32 noundef %.057305, i32 noundef %140) #10
  invoke void @_ZN11R3SceneNode7SetNameEPKc(ptr noundef nonnull align 8 dereferenceable(432) %48, ptr noundef nonnull %29)
          to label %142 unwind label %203

142:                                              ; preds = %137
  %143 = add nsw i32 %.057305, 1
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %29) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %25) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %23) #10
  call void @_ZN8RNVArrayD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %18) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %18) #10
  call void @_ZN8RNVArrayD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %17) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %17) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #10
  call void @llvm.lifetime.end.p0(i64 4096, ptr nonnull %5) #10
  br label %.backedge

.backedge:                                        ; preds = %.critedge, %142
  %.259504 = phi i32 [ %143, %142 ], [ %.057305, %.critedge ]
  %144 = call ptr @fgets(ptr noundef nonnull %4, i32 noundef 4096, ptr noundef nonnull %31)
  %.not87 = icmp eq ptr %144, null
  br i1 %.not87, label %._crit_edge, label %.lr.ph308, !llvm.loop !12

145:                                              ; preds = %47
  %146 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %48, i64 noundef 432) #13
  br label %209

147:                                              ; preds = %49
  %148 = landingpad { ptr, i32 }
          cleanup
  br label %208

149:                                              ; preds = %57, %50
  %150 = landingpad { ptr, i32 }
          cleanup
  br label %207

151:                                              ; preds = %56, %52
  %152 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %19) #10
  call void @_ZdlPvm(ptr noundef nonnull %51, i64 noundef 104) #13
  br label %207

153:                                              ; preds = %66, %59
  %154 = landingpad { ptr, i32 }
          cleanup
  br label %207

155:                                              ; preds = %65, %61
  %156 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %20) #10
  call void @_ZdlPvm(ptr noundef nonnull %60, i64 noundef 104) #13
  br label %207

157:                                              ; preds = %75, %68
  %158 = landingpad { ptr, i32 }
          cleanup
  br label %207

159:                                              ; preds = %74, %70
  %160 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %21) #10
  call void @_ZdlPvm(ptr noundef nonnull %69, i64 noundef 104) #13
  br label %207

161:                                              ; preds = %84, %77
  %162 = landingpad { ptr, i32 }
          cleanup
  br label %207

163:                                              ; preds = %83, %79
  %164 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %22) #10
  call void @_ZdlPvm(ptr noundef nonnull %78, i64 noundef 104) #13
  br label %207

165:                                              ; preds = %89, %86
  %166 = landingpad { ptr, i32 }
          cleanup
  br label %207

167:                                              ; preds = %88
  %168 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %87, i64 noundef 136) #13
  br label %207

169:                                              ; preds = %94, %91
  %170 = landingpad { ptr, i32 }
          cleanup
  br label %207

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

173:                                              ; preds = %96
  %174 = landingpad { ptr, i32 }
          cleanup
  br label %207

175:                                              ; preds = %98
  %176 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %97, i64 noundef 96) #13
  br label %207

177:                                              ; preds = %99
  %178 = landingpad { ptr, i32 }
          cleanup
  br label %181

179:                                              ; preds = %103
  %180 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7R3SolidD2Ev(ptr noundef nonnull align 8 dereferenceable(56) %24) #10
  br label %181

181:                                              ; preds = %179, %177
  %.pn = phi { ptr, i32 } [ %180, %179 ], [ %178, %177 ]
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %24) #10
  br label %206

182:                                              ; preds = %108, %104
  %183 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %26) #10
  br label %205

184:                                              ; preds = %109
  %185 = landingpad { ptr, i32 }
          cleanup
  br label %205

186:                                              ; preds = %111
  %187 = landingpad { ptr, i32 }
          cleanup
  br label %190

188:                                              ; preds = %117, %115
  %189 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7R3SolidD2Ev(ptr noundef nonnull align 8 dereferenceable(56) %27) #10
  br label %190

190:                                              ; preds = %188, %186
  %.pn92 = phi { ptr, i32 } [ %189, %188 ], [ %187, %186 ]
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %27) #10
  call void @_ZdlPvm(ptr noundef nonnull %110, i64 noundef 232) #13
  br label %205

191:                                              ; preds = %125, %119
  %192 = landingpad { ptr, i32 }
          cleanup
  br label %205

193:                                              ; preds = %124, %121
  %194 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %28) #10
  call void @_ZdlPvm(ptr noundef nonnull %120, i64 noundef 184) #13
  br label %205

195:                                              ; preds = %129, %126
  %196 = landingpad { ptr, i32 }
          cleanup
  br label %205

197:                                              ; preds = %128
  %198 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %127, i64 noundef 48) #13
  br label %205

199:                                              ; preds = %136, %135, %134, %133, %130
  %200 = landingpad { ptr, i32 }
          cleanup
  br label %205

201:                                              ; preds = %132
  %202 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %131, i64 noundef 96) #13
  br label %205

203:                                              ; preds = %137
  %204 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %29) #10
  br label %205

205:                                              ; preds = %184, %190, %195, %197, %203, %201, %199, %193, %191, %182
  %.pn94.pn.pn.pn.pn = phi { ptr, i32 } [ %183, %182 ], [ %.pn92, %190 ], [ %185, %184 ], [ %192, %191 ], [ %194, %193 ], [ %196, %195 ], [ %198, %197 ], [ %204, %203 ], [ %200, %199 ], [ %202, %201 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %25) #10
  br label %206

206:                                              ; preds = %205, %181
  %.pn94.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn94.pn.pn.pn.pn, %205 ], [ %.pn, %181 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %23) #10
  br label %207

207:                                              ; preds = %153, %155, %161, %163, %169, %171, %206, %175, %173, %167, %165, %159, %157, %151, %149
  %.pn94.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %150, %149 ], [ %152, %151 ], [ %154, %153 ], [ %156, %155 ], [ %158, %157 ], [ %160, %159 ], [ %162, %161 ], [ %164, %163 ], [ %166, %165 ], [ %168, %167 ], [ %170, %169 ], [ %172, %171 ], [ %.pn94.pn.pn.pn.pn.pn, %206 ], [ %176, %175 ], [ %174, %173 ]
  call void @_ZN8RNVArrayD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %18) #10
  br label %208

208:                                              ; preds = %207, %147
  %.pn94.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn94.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn, %207 ], [ %148, %147 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %18) #10
  call void @_ZN8RNVArrayD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %17) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %17) #10
  br label %209

209:                                              ; preds = %208, %145
  %.pn94.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn94.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn, %208 ], [ %146, %145 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #10
  call void @llvm.lifetime.end.p0(i64 4096, ptr nonnull %5) #10
  call void @llvm.lifetime.end.p0(i64 4096, ptr nonnull %4) #10
  resume { ptr, i32 } %.pn94.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn

._crit_edge:                                      ; preds = %.backedge, %35
  %210 = call i32 @fclose(ptr noundef nonnull %31)
  br label %.loopexit

.loopexit.loopexit:                               ; preds = %.critedge.thread
  %211 = load ptr, ptr @stderr, align 8, !tbaa !5
  %212 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %211, ptr noundef nonnull @.str.144, i32 noundef %37, ptr noundef %1) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #10
  call void @llvm.lifetime.end.p0(i64 4096, ptr nonnull %5) #10
  br label %.loopexit

.loopexit:                                        ; preds = %.loopexit.loopexit, %._crit_edge
  %.3 = phi i32 [ 1, %._crit_edge ], [ 0, %.loopexit.loopexit ]
  call void @llvm.lifetime.end.p0(i64 4096, ptr nonnull %4) #10
  br label %213

213:                                              ; preds = %.loopexit, %32
  %.4 = phi i32 [ %.3, %.loopexit ], [ 0, %32 ]
  ret i32 %.4
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef double @_ZNK5R3Box14DiagonalRadiusEv(ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #6 align 2

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

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

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

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

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

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

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

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

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

declare void @_ZN14R3SceneElementC1EP10R3Material(ptr noundef nonnull align 8 dereferenceable(96), ptr noundef) unnamed_addr #0

declare void @_ZN14R3SceneElement11InsertShapeEP7R3Shape(ptr noundef nonnull align 8 dereferenceable(96), ptr noundef) local_unnamed_addr #0

declare void @_ZN11R3SceneNode13InsertElementEP14R3SceneElement(ptr noundef nonnull align 8 dereferenceable(432), ptr noundef) local_unnamed_addr #0

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZmldRK8R3Vector(ptr dead_on_unwind noalias writable sret(%class.R3Vector) align 8, double noundef, ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #6

declare void @_ZplRK7R3PointRK8R3Vector(ptr dead_on_unwind writable sret(%class.R3Point) align 8, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #0

declare void @_ZN10R3CylinderC1ERK7R3PointS2_d(ptr noundef nonnull align 8 dereferenceable(232), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24), double noundef) unnamed_addr #0

declare void @_ZN7R3PointC1Eddd(ptr noundef nonnull align 8 dereferenceable(24), double noundef, double noundef, double noundef) unnamed_addr #0

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

; Function Attrs: nofree nounwind
declare noundef ptr @fgets(ptr noundef, i32 noundef, ptr nocapture noundef) local_unnamed_addr #5

; Function Attrs: mustprogress nofree nounwind willreturn memory(read)
declare i32 @isspace(i32 noundef) local_unnamed_addr #7

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

declare void @_ZN14R3SceneElement11SetMaterialEP10R3Material(ptr noundef nonnull align 8 dereferenceable(96), ptr noundef) local_unnamed_addr #0

declare void @_ZN6R3BrdfC1ERK5RNRgbdddPKc(ptr noundef nonnull align 8 dereferenceable(180), ptr noundef nonnull align 8 dereferenceable(24), double noundef, double noundef, double noundef, ptr noundef) unnamed_addr #0

declare void @_ZN10R3MaterialC1EPK6R3BrdfPKc(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef, ptr noundef) unnamed_addr #0

declare void @_ZN15R3TriangleArrayC1ERK7RNArrayIP16R3TriangleVertexERKS0_IP10R3TriangleE(ptr noundef nonnull align 8 dereferenceable(96), ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #0

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

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

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

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

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

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


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