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

; 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.RNRgb = type { [3 x double] }
%class.R3Vector = type { [3 x double] }
%class.R3DirectionalLight = type { %class.R3Light.base, %class.R3Vector }
%class.R3Light.base = type <{ ptr, ptr, i32, [4 x i8], ptr, i32, [4 x i8], double, %class.RNRgb, i32 }>
%class.R3Point = type { [3 x double] }
%class.R3PointLight = type { %class.R3Light.base, %class.R3Point, double, double, double }
%class.R3SpotLight = type { %class.R3PointLight, %class.R3Vector, double, double }

@stderr = external global ptr, align 8
@.str.42 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.44 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.79 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.82 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.200 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.201 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.202 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.203 = external hidden unnamed_addr constant [56 x i8], align 1
@.str.204 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.205 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.206 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.207 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.208 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.209 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.210 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.211 = external hidden unnamed_addr constant [45 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1

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

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

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

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

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

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

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

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

declare void @_ZN11R3SpotLightC1ERK7R3PointRK8R3VectorRK5RNRgbdddiddd(ptr noundef nonnull align 8 dereferenceable(168), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24), double noundef, double noundef, double noundef, i32 noundef, 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
declare i32 @__isoc99_sscanf(ptr noundef, ptr noundef, ...) #3

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN7R3Scene19ReadSUNCGLightsFileEPKc(ptr noundef nonnull align 8 dereferenceable(352) %0, ptr noundef %1) #4 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca [4096 x i8], align 16
  %9 = alloca i32, align 4
  %10 = alloca [1024 x i8], align 16
  %11 = alloca [1024 x i8], align 16
  %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 double, align 8
  %18 = alloca double, align 8
  %19 = alloca %class.RNRgb, align 8
  %20 = alloca %class.R3Vector, align 8
  %21 = alloca %class.R3DirectionalLight, align 8
  %22 = alloca ptr, align 8
  %23 = alloca i32, align 4
  %24 = alloca double, align 8
  %25 = alloca double, align 8
  %26 = alloca double, align 8
  %27 = alloca double, align 8
  %28 = alloca double, align 8
  %29 = alloca double, align 8
  %30 = alloca double, align 8
  %31 = alloca double, align 8
  %32 = alloca double, align 8
  %33 = alloca double, align 8
  %34 = alloca %class.RNRgb, align 8
  %35 = alloca %class.R3Point, align 8
  %36 = alloca %class.R3PointLight, align 8
  %37 = alloca double, align 8
  %38 = alloca double, align 8
  %39 = alloca double, align 8
  %40 = alloca double, align 8
  %41 = alloca double, align 8
  %42 = alloca double, align 8
  %43 = alloca double, align 8
  %44 = alloca double, align 8
  %45 = alloca double, align 8
  %46 = alloca double, align 8
  %47 = alloca double, align 8
  %48 = alloca double, align 8
  %49 = alloca double, align 8
  %50 = alloca double, align 8
  %51 = alloca double, align 8
  %52 = alloca %class.RNRgb, align 8
  %53 = alloca %class.R3Point, align 8
  %54 = alloca %class.R3Vector, align 8
  %55 = alloca %class.R3SpotLight, align 8
  %56 = alloca double, align 8
  %57 = alloca double, align 8
  %58 = alloca double, align 8
  %59 = alloca double, align 8
  %60 = alloca double, align 8
  %61 = alloca double, align 8
  %62 = alloca double, align 8
  %63 = alloca double, align 8
  %64 = alloca double, align 8
  %65 = alloca double, align 8
  %66 = alloca double, align 8
  %67 = alloca double, align 8
  %68 = alloca double, align 8
  %69 = alloca double, align 8
  %70 = alloca double, align 8
  %71 = alloca double, align 8
  %72 = alloca double, align 8
  %73 = alloca double, align 8
  %74 = alloca %class.RNRgb, align 8
  %75 = alloca %class.R3Point, align 8
  %76 = alloca %class.R3Point, align 8
  %77 = alloca %class.R3Point, align 8
  %78 = alloca %class.R3Point, align 8
  %79 = alloca %class.R3Vector, align 8
  %80 = alloca %class.R3SpotLight, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %81 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  %82 = load ptr, ptr %5, align 8, !tbaa !5
  %83 = call noalias ptr @fopen(ptr noundef %82, ptr noundef @.str.42)
  store ptr %83, ptr %6, align 8, !tbaa !5
  %84 = load ptr, ptr %6, align 8, !tbaa !5
  %85 = icmp ne ptr %84, null
  br i1 %85, label %90, label %86

86:                                               ; preds = %2
  %87 = load ptr, ptr @stderr, align 8, !tbaa !5
  %88 = load ptr, ptr %5, align 8, !tbaa !5
  %89 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %87, ptr noundef @.str.200, ptr noundef %88) #6
  store i32 0, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %282

90:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 4096, ptr %8) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  store i32 0, ptr %9, align 4, !tbaa !9
  br label %91

91:                                               ; preds = %276, %274, %90
  %92 = getelementptr inbounds [4096 x i8], ptr %8, i64 0, i64 0
  %93 = load ptr, ptr %6, align 8, !tbaa !5
  %94 = call ptr @fgets(ptr noundef %92, i32 noundef 4096, ptr noundef %93)
  %95 = icmp ne ptr %94, null
  br i1 %95, label %96, label %278

96:                                               ; preds = %91
  %97 = load i32, ptr %9, align 4, !tbaa !9
  %98 = add nsw i32 %97, 1
  store i32 %98, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1024, ptr %10) #6
  call void @llvm.lifetime.start.p0(i64 1024, ptr %11) #6
  %99 = getelementptr inbounds [4096 x i8], ptr %8, i64 0, i64 0
  %100 = getelementptr inbounds [1024 x i8], ptr %10, i64 0, i64 0
  %101 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef %99, ptr noundef @.str.44, ptr noundef %100) #6
  %102 = icmp ne i32 %101, 1
  br i1 %102, label %103, label %104

103:                                              ; preds = %96
  store i32 2, ptr %7, align 4
  br label %274, !llvm.loop !11

104:                                              ; preds = %96
  %105 = getelementptr inbounds [1024 x i8], ptr %10, i64 0, i64 0
  %106 = load i8, ptr %105, align 16, !tbaa !13
  %107 = sext i8 %106 to i32
  %108 = icmp eq i32 %107, 35
  br i1 %108, label %109, label %110

109:                                              ; preds = %104
  store i32 2, ptr %7, align 4
  br label %274, !llvm.loop !11

110:                                              ; preds = %104
  %111 = getelementptr inbounds [1024 x i8], ptr %10, i64 0, i64 0
  %112 = call i32 @strcmp(ptr noundef %111, ptr noundef @.str.201) #7
  %113 = icmp ne i32 %112, 0
  br i1 %113, label %143, label %114

114:                                              ; preds = %110
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  %115 = getelementptr inbounds [4096 x i8], ptr %8, i64 0, i64 0
  %116 = getelementptr inbounds [1024 x i8], ptr %10, i64 0, i64 0
  %117 = getelementptr inbounds [1024 x i8], ptr %11, i64 0, i64 0
  %118 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef %115, ptr noundef @.str.202, ptr noundef %116, ptr noundef %117, ptr noundef %12, ptr noundef %13, ptr noundef %14, ptr noundef %15, ptr noundef %16, ptr noundef %17, ptr noundef %18) #6
  %119 = icmp ne i32 %118, 9
  br i1 %119, label %120, label %125

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

125:                                              ; preds = %114
  call void @llvm.lifetime.start.p0(i64 24, ptr %19) #6
  %126 = load double, ptr %13, align 8, !tbaa !14
  %127 = load double, ptr %14, align 8, !tbaa !14
  %128 = load double, ptr %15, align 8, !tbaa !14
  call void @_ZN5RNRgbC1Eddd(ptr noundef nonnull align 8 dereferenceable(24) %19, double noundef %126, double noundef %127, double noundef %128)
  call void @llvm.lifetime.start.p0(i64 24, ptr %20) #6
  %129 = load double, ptr %16, align 8, !tbaa !14
  %130 = load double, ptr %17, align 8, !tbaa !14
  %131 = load double, ptr %18, align 8, !tbaa !14
  call void @_ZN8R3VectorC1Eddd(ptr noundef nonnull align 8 dereferenceable(24) %20, double noundef %129, double noundef %130, double noundef %131)
  call void @llvm.lifetime.start.p0(i64 104, ptr %21) #6
  %132 = load double, ptr %12, align 8, !tbaa !14
  call void @_ZN18R3DirectionalLightC1ERK8R3VectorRK5RNRgbdi(ptr noundef nonnull align 8 dereferenceable(104) %21, ptr noundef nonnull align 8 dereferenceable(24) %20, ptr noundef nonnull align 8 dereferenceable(24) %19, double noundef %132, i32 noundef 1)
  %133 = getelementptr inbounds [1024 x i8], ptr %11, i64 0, i64 0
  %134 = invoke noundef i32 @_ZL19InsertCopiesOfLightP7R3SceneP7R3LightPKc(ptr noundef %81, ptr noundef %21, ptr noundef %133)
          to label %135 unwind label %139

135:                                              ; preds = %125
  call void @_ZN7R3LightD2Ev(ptr noundef nonnull align 8 dereferenceable(104) %21) #6
  call void @llvm.lifetime.end.p0(i64 104, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %19) #6
  store i32 0, ptr %7, align 4
  br label %136

136:                                              ; preds = %135, %120
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  %137 = load i32, ptr %7, align 4
  switch i32 %137, label %274 [
    i32 0, label %138
  ]

138:                                              ; preds = %136
  br label %273

139:                                              ; preds = %125
  %140 = landingpad { ptr, i32 }
          cleanup
  %141 = extractvalue { ptr, i32 } %140, 0
  store ptr %141, ptr %22, align 8
  %142 = extractvalue { ptr, i32 } %140, 1
  store i32 %142, ptr %23, align 4
  call void @_ZN7R3LightD2Ev(ptr noundef nonnull align 8 dereferenceable(104) %21) #6
  call void @llvm.lifetime.end.p0(i64 104, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  br label %277

143:                                              ; preds = %110
  %144 = getelementptr inbounds [1024 x i8], ptr %10, i64 0, i64 0
  %145 = call i32 @strcmp(ptr noundef %144, ptr noundef @.str.79) #7
  %146 = icmp ne i32 %145, 0
  br i1 %146, label %179, label %147

147:                                              ; preds = %143
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #6
  %148 = getelementptr inbounds [4096 x i8], ptr %8, i64 0, i64 0
  %149 = getelementptr inbounds [1024 x i8], ptr %10, i64 0, i64 0
  %150 = getelementptr inbounds [1024 x i8], ptr %11, i64 0, i64 0
  %151 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef %148, ptr noundef @.str.204, ptr noundef %149, ptr noundef %150, ptr noundef %24, ptr noundef %25, ptr noundef %26, ptr noundef %27, ptr noundef %28, ptr noundef %29, ptr noundef %30, ptr noundef %31, ptr noundef %32, ptr noundef %33) #6
  %152 = icmp ne i32 %151, 12
  br i1 %152, label %153, label %158

153:                                              ; preds = %147
  %154 = load ptr, ptr @stderr, align 8, !tbaa !5
  %155 = load i32, ptr %9, align 4, !tbaa !9
  %156 = load ptr, ptr %5, align 8, !tbaa !5
  %157 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %154, ptr noundef @.str.205, i32 noundef %155, ptr noundef %156) #6
  store i32 0, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %172

158:                                              ; preds = %147
  call void @llvm.lifetime.start.p0(i64 24, ptr %34) #6
  %159 = load double, ptr %25, align 8, !tbaa !14
  %160 = load double, ptr %26, align 8, !tbaa !14
  %161 = load double, ptr %27, align 8, !tbaa !14
  call void @_ZN5RNRgbC1Eddd(ptr noundef nonnull align 8 dereferenceable(24) %34, double noundef %159, double noundef %160, double noundef %161)
  call void @llvm.lifetime.start.p0(i64 24, ptr %35) #6
  %162 = load double, ptr %28, align 8, !tbaa !14
  %163 = load double, ptr %29, align 8, !tbaa !14
  %164 = load double, ptr %30, align 8, !tbaa !14
  call void @_ZN7R3PointC1Eddd(ptr noundef nonnull align 8 dereferenceable(24) %35, double noundef %162, double noundef %163, double noundef %164)
  call void @llvm.lifetime.start.p0(i64 128, ptr %36) #6
  %165 = load double, ptr %24, align 8, !tbaa !14
  %166 = load double, ptr %31, align 8, !tbaa !14
  %167 = load double, ptr %32, align 8, !tbaa !14
  %168 = load double, ptr %33, align 8, !tbaa !14
  call void @_ZN12R3PointLightC1ERK7R3PointRK5RNRgbdiddd(ptr noundef nonnull align 8 dereferenceable(128) %36, ptr noundef nonnull align 8 dereferenceable(24) %35, ptr noundef nonnull align 8 dereferenceable(24) %34, double noundef %165, i32 noundef 1, double noundef %166, double noundef %167, double noundef %168)
  %169 = getelementptr inbounds [1024 x i8], ptr %11, i64 0, i64 0
  %170 = invoke noundef i32 @_ZL19InsertCopiesOfLightP7R3SceneP7R3LightPKc(ptr noundef %81, ptr noundef %36, ptr noundef %169)
          to label %171 unwind label %175

171:                                              ; preds = %158
  call void @_ZN7R3LightD2Ev(ptr noundef nonnull align 8 dereferenceable(128) %36) #6
  call void @llvm.lifetime.end.p0(i64 128, ptr %36) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %35) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %34) #6
  store i32 0, ptr %7, align 4
  br label %172

172:                                              ; preds = %171, %153
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #6
  %173 = load i32, ptr %7, align 4
  switch i32 %173, label %274 [
    i32 0, label %174
  ]

174:                                              ; preds = %172
  br label %272

175:                                              ; preds = %158
  %176 = landingpad { ptr, i32 }
          cleanup
  %177 = extractvalue { ptr, i32 } %176, 0
  store ptr %177, ptr %22, align 8
  %178 = extractvalue { ptr, i32 } %176, 1
  store i32 %178, ptr %23, align 4
  call void @_ZN7R3LightD2Ev(ptr noundef nonnull align 8 dereferenceable(128) %36) #6
  call void @llvm.lifetime.end.p0(i64 128, ptr %36) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %35) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %34) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #6
  br label %277

179:                                              ; preds = %143
  %180 = getelementptr inbounds [1024 x i8], ptr %10, i64 0, i64 0
  %181 = call i32 @strcmp(ptr noundef %180, ptr noundef @.str.82) #7
  %182 = icmp ne i32 %181, 0
  br i1 %182, label %220, label %183

183:                                              ; preds = %179
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %39) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %40) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %41) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %42) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %43) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %44) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %45) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %46) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %47) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %48) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %49) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %50) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %51) #6
  %184 = getelementptr inbounds [4096 x i8], ptr %8, i64 0, i64 0
  %185 = getelementptr inbounds [1024 x i8], ptr %10, i64 0, i64 0
  %186 = getelementptr inbounds [1024 x i8], ptr %11, i64 0, i64 0
  %187 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef %184, ptr noundef @.str.206, ptr noundef %185, ptr noundef %186, ptr noundef %37, ptr noundef %38, ptr noundef %39, ptr noundef %40, ptr noundef %41, ptr noundef %42, ptr noundef %43, ptr noundef %44, ptr noundef %45, ptr noundef %46, ptr noundef %47, ptr noundef %48, ptr noundef %49, ptr noundef %50, ptr noundef %51) #6
  %188 = icmp ne i32 %187, 17
  br i1 %188, label %189, label %194

189:                                              ; preds = %183
  %190 = load ptr, ptr @stderr, align 8, !tbaa !5
  %191 = load i32, ptr %9, align 4, !tbaa !9
  %192 = load ptr, ptr %5, align 8, !tbaa !5
  %193 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %190, ptr noundef @.str.207, i32 noundef %191, ptr noundef %192) #6
  store i32 0, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %213

194:                                              ; preds = %183
  call void @llvm.lifetime.start.p0(i64 24, ptr %52) #6
  %195 = load double, ptr %38, align 8, !tbaa !14
  %196 = load double, ptr %39, align 8, !tbaa !14
  %197 = load double, ptr %40, align 8, !tbaa !14
  call void @_ZN5RNRgbC1Eddd(ptr noundef nonnull align 8 dereferenceable(24) %52, double noundef %195, double noundef %196, double noundef %197)
  call void @llvm.lifetime.start.p0(i64 24, ptr %53) #6
  %198 = load double, ptr %41, align 8, !tbaa !14
  %199 = load double, ptr %42, align 8, !tbaa !14
  %200 = load double, ptr %43, align 8, !tbaa !14
  call void @_ZN7R3PointC1Eddd(ptr noundef nonnull align 8 dereferenceable(24) %53, double noundef %198, double noundef %199, double noundef %200)
  call void @llvm.lifetime.start.p0(i64 24, ptr %54) #6
  %201 = load double, ptr %44, align 8, !tbaa !14
  %202 = load double, ptr %45, align 8, !tbaa !14
  %203 = load double, ptr %46, align 8, !tbaa !14
  call void @_ZN8R3VectorC1Eddd(ptr noundef nonnull align 8 dereferenceable(24) %54, double noundef %201, double noundef %202, double noundef %203)
  call void @llvm.lifetime.start.p0(i64 168, ptr %55) #6
  %204 = load double, ptr %47, align 8, !tbaa !14
  %205 = load double, ptr %48, align 8, !tbaa !14
  %206 = load double, ptr %37, align 8, !tbaa !14
  %207 = load double, ptr %49, align 8, !tbaa !14
  %208 = load double, ptr %50, align 8, !tbaa !14
  %209 = load double, ptr %51, align 8, !tbaa !14
  call void @_ZN11R3SpotLightC1ERK7R3PointRK8R3VectorRK5RNRgbdddiddd(ptr noundef nonnull align 8 dereferenceable(168) %55, ptr noundef nonnull align 8 dereferenceable(24) %53, ptr noundef nonnull align 8 dereferenceable(24) %54, ptr noundef nonnull align 8 dereferenceable(24) %52, double noundef %204, double noundef %205, double noundef %206, i32 noundef 1, double noundef %207, double noundef %208, double noundef %209)
  %210 = getelementptr inbounds [1024 x i8], ptr %11, i64 0, i64 0
  %211 = invoke noundef i32 @_ZL19InsertCopiesOfLightP7R3SceneP7R3LightPKc(ptr noundef %81, ptr noundef %55, ptr noundef %210)
          to label %212 unwind label %216

212:                                              ; preds = %194
  call void @_ZN7R3LightD2Ev(ptr noundef nonnull align 8 dereferenceable(168) %55) #6
  call void @llvm.lifetime.end.p0(i64 168, ptr %55) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %54) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %53) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %52) #6
  store i32 0, ptr %7, align 4
  br label %213

213:                                              ; preds = %212, %189
  call void @llvm.lifetime.end.p0(i64 8, ptr %51) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %50) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %49) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %48) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %47) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %46) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %45) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %44) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %43) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %42) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %40) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #6
  %214 = load i32, ptr %7, align 4
  switch i32 %214, label %274 [
    i32 0, label %215
  ]

215:                                              ; preds = %213
  br label %271

216:                                              ; preds = %194
  %217 = landingpad { ptr, i32 }
          cleanup
  %218 = extractvalue { ptr, i32 } %217, 0
  store ptr %218, ptr %22, align 8
  %219 = extractvalue { ptr, i32 } %217, 1
  store i32 %219, ptr %23, align 4
  call void @_ZN7R3LightD2Ev(ptr noundef nonnull align 8 dereferenceable(168) %55) #6
  call void @llvm.lifetime.end.p0(i64 168, ptr %55) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %54) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %53) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %52) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %51) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %50) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %49) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %48) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %47) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %46) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %45) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %44) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %43) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %42) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %40) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #6
  br label %277

220:                                              ; preds = %179
  %221 = getelementptr inbounds [1024 x i8], ptr %10, i64 0, i64 0
  %222 = call i32 @strcmp(ptr noundef %221, ptr noundef @.str.208) #7
  %223 = icmp ne i32 %222, 0
  br i1 %223, label %264, label %224

224:                                              ; preds = %220
  call void @llvm.lifetime.start.p0(i64 8, ptr %56) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %57) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %58) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %59) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %60) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %61) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %62) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %63) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %64) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %65) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %66) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %67) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %68) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %69) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %70) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %71) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %72) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %73) #6
  %225 = getelementptr inbounds [4096 x i8], ptr %8, i64 0, i64 0
  %226 = getelementptr inbounds [1024 x i8], ptr %10, i64 0, i64 0
  %227 = getelementptr inbounds [1024 x i8], ptr %11, i64 0, i64 0
  %228 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef %225, ptr noundef @.str.209, ptr noundef %226, ptr noundef %227, ptr noundef %56, ptr noundef %57, ptr noundef %58, ptr noundef %59, ptr noundef %60, ptr noundef %61, ptr noundef %62, ptr noundef %63, ptr noundef %64, ptr noundef %65, ptr noundef %66, ptr noundef %67, ptr noundef %68, ptr noundef %69, ptr noundef %70, ptr noundef %71, ptr noundef %72, ptr noundef %73) #6
  %229 = icmp ne i32 %228, 20
  br i1 %229, label %230, label %235

230:                                              ; preds = %224
  %231 = load ptr, ptr @stderr, align 8, !tbaa !5
  %232 = load i32, ptr %9, align 4, !tbaa !9
  %233 = load ptr, ptr %5, align 8, !tbaa !5
  %234 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %231, ptr noundef @.str.210, i32 noundef %232, ptr noundef %233) #6
  store i32 0, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %257

235:                                              ; preds = %224
  call void @llvm.lifetime.start.p0(i64 24, ptr %74) #6
  %236 = load double, ptr %57, align 8, !tbaa !14
  %237 = load double, ptr %58, align 8, !tbaa !14
  %238 = load double, ptr %59, align 8, !tbaa !14
  call void @_ZN5RNRgbC1Eddd(ptr noundef nonnull align 8 dereferenceable(24) %74, double noundef %236, double noundef %237, double noundef %238)
  call void @llvm.lifetime.start.p0(i64 24, ptr %75) #6
  %239 = load double, ptr %60, align 8, !tbaa !14
  %240 = load double, ptr %61, align 8, !tbaa !14
  %241 = load double, ptr %62, align 8, !tbaa !14
  call void @_ZN7R3PointC1Eddd(ptr noundef nonnull align 8 dereferenceable(24) %75, double noundef %239, double noundef %240, double noundef %241)
  call void @llvm.lifetime.start.p0(i64 24, ptr %76) #6
  %242 = load double, ptr %63, align 8, !tbaa !14
  %243 = load double, ptr %64, align 8, !tbaa !14
  %244 = load double, ptr %65, align 8, !tbaa !14
  call void @_ZN7R3PointC1Eddd(ptr noundef nonnull align 8 dereferenceable(24) %76, double noundef %242, double noundef %243, double noundef %244)
  call void @llvm.lifetime.start.p0(i64 24, ptr %77) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr %78) #6
  call void @_ZplRK7R3PointS1_(ptr dead_on_unwind writable sret(%class.R3Point) align 8 %78, ptr noundef nonnull align 8 dereferenceable(24) %75, ptr noundef nonnull align 8 dereferenceable(24) %76)
  call void @_ZmldRK7R3Point(ptr dead_on_unwind writable sret(%class.R3Point) align 8 %77, double noundef 5.000000e-01, ptr noundef nonnull align 8 dereferenceable(24) %78)
  call void @llvm.lifetime.end.p0(i64 24, ptr %78) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr %79) #6
  %245 = load double, ptr %66, align 8, !tbaa !14
  %246 = load double, ptr %67, align 8, !tbaa !14
  %247 = load double, ptr %68, align 8, !tbaa !14
  call void @_ZN8R3VectorC1Eddd(ptr noundef nonnull align 8 dereferenceable(24) %79, double noundef %245, double noundef %246, double noundef %247)
  call void @llvm.lifetime.start.p0(i64 168, ptr %80) #6
  %248 = load double, ptr %69, align 8, !tbaa !14
  %249 = load double, ptr %70, align 8, !tbaa !14
  %250 = load double, ptr %56, align 8, !tbaa !14
  %251 = load double, ptr %71, align 8, !tbaa !14
  %252 = load double, ptr %72, align 8, !tbaa !14
  %253 = load double, ptr %73, align 8, !tbaa !14
  call void @_ZN11R3SpotLightC1ERK7R3PointRK8R3VectorRK5RNRgbdddiddd(ptr noundef nonnull align 8 dereferenceable(168) %80, ptr noundef nonnull align 8 dereferenceable(24) %77, ptr noundef nonnull align 8 dereferenceable(24) %79, ptr noundef nonnull align 8 dereferenceable(24) %74, double noundef %248, double noundef %249, double noundef %250, i32 noundef 1, double noundef %251, double noundef %252, double noundef %253)
  %254 = getelementptr inbounds [1024 x i8], ptr %11, i64 0, i64 0
  %255 = invoke noundef i32 @_ZL19InsertCopiesOfLightP7R3SceneP7R3LightPKc(ptr noundef %81, ptr noundef %80, ptr noundef %254)
          to label %256 unwind label %260

256:                                              ; preds = %235
  call void @_ZN7R3LightD2Ev(ptr noundef nonnull align 8 dereferenceable(168) %80) #6
  call void @llvm.lifetime.end.p0(i64 168, ptr %80) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %79) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %77) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %76) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %75) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %74) #6
  store i32 0, ptr %7, align 4
  br label %257

257:                                              ; preds = %256, %230
  call void @llvm.lifetime.end.p0(i64 8, ptr %73) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %72) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %71) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %70) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %69) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %68) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %67) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %66) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %65) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %64) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %63) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %62) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %61) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %60) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %59) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %58) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %57) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %56) #6
  %258 = load i32, ptr %7, align 4
  switch i32 %258, label %274 [
    i32 0, label %259
  ]

259:                                              ; preds = %257
  br label %270

260:                                              ; preds = %235
  %261 = landingpad { ptr, i32 }
          cleanup
  %262 = extractvalue { ptr, i32 } %261, 0
  store ptr %262, ptr %22, align 8
  %263 = extractvalue { ptr, i32 } %261, 1
  store i32 %263, ptr %23, align 4
  call void @_ZN7R3LightD2Ev(ptr noundef nonnull align 8 dereferenceable(168) %80) #6
  call void @llvm.lifetime.end.p0(i64 168, ptr %80) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %79) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %77) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %76) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %75) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %74) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %73) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %72) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %71) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %70) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %69) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %68) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %67) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %66) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %65) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %64) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %63) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %62) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %61) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %60) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %59) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %58) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %57) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %56) #6
  br label %277

264:                                              ; preds = %220
  %265 = load ptr, ptr @stderr, align 8, !tbaa !5
  %266 = getelementptr inbounds [1024 x i8], ptr %10, i64 0, i64 0
  %267 = load i32, ptr %9, align 4, !tbaa !9
  %268 = load ptr, ptr %5, align 8, !tbaa !5
  %269 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %265, ptr noundef @.str.211, ptr noundef %266, i32 noundef %267, ptr noundef %268) #6
  store i32 0, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %274

270:                                              ; preds = %259
  br label %271

271:                                              ; preds = %270, %215
  br label %272

272:                                              ; preds = %271, %174
  br label %273

273:                                              ; preds = %272, %138
  store i32 0, ptr %7, align 4
  br label %274

274:                                              ; preds = %273, %264, %257, %213, %172, %136, %109, %103
  call void @llvm.lifetime.end.p0(i64 1024, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 1024, ptr %10) #6
  %275 = load i32, ptr %7, align 4
  switch i32 %275, label %281 [
    i32 0, label %276
    i32 2, label %91
  ]

276:                                              ; preds = %274
  br label %91, !llvm.loop !11

277:                                              ; preds = %260, %216, %175, %139
  call void @llvm.lifetime.end.p0(i64 1024, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 1024, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4096, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  br label %284

278:                                              ; preds = %91
  %279 = load ptr, ptr %6, align 8, !tbaa !5
  %280 = call i32 @fclose(ptr noundef %279)
  store i32 1, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %281

281:                                              ; preds = %278, %274
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4096, ptr %8) #6
  br label %282

282:                                              ; preds = %281, %86
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  %283 = load i32, ptr %3, align 4
  ret i32 %283

284:                                              ; preds = %277
  %285 = load ptr, ptr %22, align 8
  %286 = load i32, ptr %23, align 4
  %287 = insertvalue { ptr, i32 } poison, ptr %285, 0
  %288 = insertvalue { ptr, i32 } %287, i32 %286, 1
  resume { ptr, i32 } %288
}

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL19InsertCopiesOfLightP7R3SceneP7R3LightPKc(ptr noundef, ptr noundef, ptr noundef) #4

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

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

declare void @_ZplRK7R3PointS1_(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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!7, !7, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"double", !7, 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.RNRgb = type { [3 x double] }
%class.R3Vector = type { [3 x double] }
%class.R3DirectionalLight = type { %class.R3Light.base, %class.R3Vector }
%class.R3Light.base = type <{ ptr, ptr, i32, [4 x i8], ptr, i32, [4 x i8], double, %class.RNRgb, i32 }>
%class.R3Point = type { [3 x double] }
%class.R3PointLight = type { %class.R3Light.base, %class.R3Point, double, double, double }
%class.R3SpotLight = type { %class.R3PointLight, %class.R3Vector, double, double }

@stderr = external local_unnamed_addr global ptr, align 8
@.str.42 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.44 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.79 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.82 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.200 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.201 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.202 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.203 = external hidden unnamed_addr constant [56 x i8], align 1
@.str.204 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.205 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.206 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.207 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.208 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.209 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.210 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.211 = external hidden unnamed_addr constant [45 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: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1

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

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

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

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN7R3Scene19ReadSUNCGLightsFileEPKc(ptr noundef nonnull align 8 dereferenceable(352) %0, ptr noundef %1) local_unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca [4096 x i8], align 16
  %4 = alloca [1024 x i8], align 16
  %5 = alloca [1024 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 %class.RNRgb, align 8
  %14 = alloca %class.R3Vector, align 8
  %15 = alloca %class.R3DirectionalLight, 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 %class.RNRgb, align 8
  %27 = alloca %class.R3Point, align 8
  %28 = alloca %class.R3PointLight, align 8
  %29 = alloca double, align 8
  %30 = alloca double, align 8
  %31 = alloca double, align 8
  %32 = alloca double, align 8
  %33 = alloca double, align 8
  %34 = alloca double, align 8
  %35 = alloca double, align 8
  %36 = alloca double, align 8
  %37 = alloca double, align 8
  %38 = alloca double, align 8
  %39 = alloca double, align 8
  %40 = alloca double, align 8
  %41 = alloca double, align 8
  %42 = alloca double, align 8
  %43 = alloca double, align 8
  %44 = alloca %class.RNRgb, align 8
  %45 = alloca %class.R3Point, align 8
  %46 = alloca %class.R3Vector, align 8
  %47 = alloca %class.R3SpotLight, align 8
  %48 = alloca double, align 8
  %49 = alloca double, align 8
  %50 = alloca double, align 8
  %51 = alloca double, align 8
  %52 = alloca double, align 8
  %53 = alloca double, align 8
  %54 = alloca double, align 8
  %55 = alloca double, align 8
  %56 = alloca double, align 8
  %57 = alloca double, align 8
  %58 = alloca double, align 8
  %59 = alloca double, align 8
  %60 = alloca double, align 8
  %61 = alloca double, align 8
  %62 = alloca double, align 8
  %63 = alloca double, align 8
  %64 = alloca double, align 8
  %65 = alloca double, align 8
  %66 = alloca %class.RNRgb, align 8
  %67 = alloca %class.R3Point, align 8
  %68 = alloca %class.R3Point, align 8
  %69 = alloca %class.R3Point, align 8
  %70 = alloca %class.R3Point, align 8
  %71 = alloca %class.R3Vector, align 8
  %72 = alloca %class.R3SpotLight, align 8
  %73 = tail call noalias ptr @fopen(ptr noundef %1, ptr noundef nonnull @.str.42)
  %.not = icmp eq ptr %73, null
  br i1 %.not, label %74, label %77

74:                                               ; preds = %2
  %75 = load ptr, ptr @stderr, align 8, !tbaa !5
  %76 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %75, ptr noundef nonnull @.str.200, ptr noundef %1) #7
  br label %185

77:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 4096, ptr nonnull %3) #8
  %78 = call ptr @fgets(ptr noundef nonnull %3, i32 noundef 4096, ptr noundef nonnull %73)
  %.not3661 = icmp eq ptr %78, null
  br i1 %.not3661, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %77, %180
  %.02862 = phi i32 [ %79, %180 ], [ 0, %77 ]
  %79 = add nuw nsw i32 %.02862, 1
  call void @llvm.lifetime.start.p0(i64 1024, ptr nonnull %4) #8
  call void @llvm.lifetime.start.p0(i64 1024, ptr nonnull %5) #8
  %80 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef nonnull %3, ptr noundef nonnull @.str.44, ptr noundef nonnull %4) #8
  %.not37 = icmp ne i32 %80, 1
  %81 = load i8, ptr %4, align 16
  %82 = icmp eq i8 %81, 35
  %or.cond = select i1 %.not37, i1 true, i1 %82
  br i1 %or.cond, label %180, label %83, !llvm.loop !9

83:                                               ; preds = %.lr.ph
  %84 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %4, ptr noundef nonnull dereferenceable(1) @.str.201) #9
  %.not38 = icmp eq i32 %84, 0
  br i1 %.not38, label %85, label %101

85:                                               ; preds = %83
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #8
  %86 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef nonnull %3, ptr noundef nonnull @.str.202, ptr noundef nonnull %4, ptr noundef nonnull %5, 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) #8
  %.not39 = icmp eq i32 %86, 9
  br i1 %.not39, label %87, label %96

87:                                               ; preds = %85
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %13) #8
  %88 = load double, ptr %7, align 8, !tbaa !11
  %89 = load double, ptr %8, align 8, !tbaa !11
  %90 = load double, ptr %9, align 8, !tbaa !11
  call void @_ZN5RNRgbC1Eddd(ptr noundef nonnull align 8 dereferenceable(24) %13, double noundef %88, double noundef %89, double noundef %90)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %14) #8
  %91 = load double, ptr %10, align 8, !tbaa !11
  %92 = load double, ptr %11, align 8, !tbaa !11
  %93 = load double, ptr %12, align 8, !tbaa !11
  call void @_ZN8R3VectorC1Eddd(ptr noundef nonnull align 8 dereferenceable(24) %14, double noundef %91, double noundef %92, double noundef %93)
  call void @llvm.lifetime.start.p0(i64 104, ptr nonnull %15) #8
  %94 = load double, ptr %6, align 8, !tbaa !11
  call void @_ZN18R3DirectionalLightC1ERK8R3VectorRK5RNRgbdi(ptr noundef nonnull align 8 dereferenceable(104) %15, ptr noundef nonnull align 8 dereferenceable(24) %14, ptr noundef nonnull align 8 dereferenceable(24) %13, double noundef %94, i32 noundef 1)
  %95 = invoke noundef i32 @_ZL19InsertCopiesOfLightP7R3SceneP7R3LightPKc(ptr noundef nonnull %0, ptr noundef nonnull %15, ptr noundef nonnull %5)
          to label %.thread unwind label %99

.thread:                                          ; preds = %87
  call void @_ZN7R3LightD2Ev(ptr noundef nonnull align 8 dereferenceable(104) %15) #8
  call void @llvm.lifetime.end.p0(i64 104, ptr nonnull %15) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %14) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %13) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #8
  br label %180

96:                                               ; preds = %85
  %97 = load ptr, ptr @stderr, align 8, !tbaa !5
  %98 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %97, ptr noundef nonnull @.str.203, i32 noundef %79, ptr noundef %1) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #8
  br label %.thread51

99:                                               ; preds = %87
  %100 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7R3LightD2Ev(ptr noundef nonnull align 8 dereferenceable(104) %15) #8
  call void @llvm.lifetime.end.p0(i64 104, ptr nonnull %15) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %14) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %13) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #8
  br label %182

101:                                              ; preds = %83
  %102 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %4, ptr noundef nonnull dereferenceable(1) @.str.79) #9
  %.not40 = icmp eq i32 %102, 0
  br i1 %.not40, label %103, label %122

103:                                              ; preds = %101
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %18) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %19) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %20) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %21) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %22) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %23) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %24) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %25) #8
  %104 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef nonnull %3, ptr noundef nonnull @.str.204, ptr noundef nonnull %4, ptr noundef nonnull %5, ptr noundef nonnull %16, ptr noundef nonnull %17, ptr noundef nonnull %18, ptr noundef nonnull %19, ptr noundef nonnull %20, ptr noundef nonnull %21, ptr noundef nonnull %22, ptr noundef nonnull %23, ptr noundef nonnull %24, ptr noundef nonnull %25) #8
  %.not41 = icmp eq i32 %104, 12
  br i1 %.not41, label %105, label %117

105:                                              ; preds = %103
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %26) #8
  %106 = load double, ptr %17, align 8, !tbaa !11
  %107 = load double, ptr %18, align 8, !tbaa !11
  %108 = load double, ptr %19, align 8, !tbaa !11
  call void @_ZN5RNRgbC1Eddd(ptr noundef nonnull align 8 dereferenceable(24) %26, double noundef %106, double noundef %107, double noundef %108)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %27) #8
  %109 = load double, ptr %20, align 8, !tbaa !11
  %110 = load double, ptr %21, align 8, !tbaa !11
  %111 = load double, ptr %22, align 8, !tbaa !11
  call void @_ZN7R3PointC1Eddd(ptr noundef nonnull align 8 dereferenceable(24) %27, double noundef %109, double noundef %110, double noundef %111)
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %28) #8
  %112 = load double, ptr %16, align 8, !tbaa !11
  %113 = load double, ptr %23, align 8, !tbaa !11
  %114 = load double, ptr %24, align 8, !tbaa !11
  %115 = load double, ptr %25, align 8, !tbaa !11
  call void @_ZN12R3PointLightC1ERK7R3PointRK5RNRgbdiddd(ptr noundef nonnull align 8 dereferenceable(128) %28, ptr noundef nonnull align 8 dereferenceable(24) %27, ptr noundef nonnull align 8 dereferenceable(24) %26, double noundef %112, i32 noundef 1, double noundef %113, double noundef %114, double noundef %115)
  %116 = invoke noundef i32 @_ZL19InsertCopiesOfLightP7R3SceneP7R3LightPKc(ptr noundef nonnull %0, ptr noundef nonnull %28, ptr noundef nonnull %5)
          to label %.thread48 unwind label %120

.thread48:                                        ; preds = %105
  call void @_ZN7R3LightD2Ev(ptr noundef nonnull align 8 dereferenceable(128) %28) #8
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %28) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %27) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %26) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %25) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %24) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %23) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %22) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %21) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %20) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #8
  br label %180

117:                                              ; preds = %103
  %118 = load ptr, ptr @stderr, align 8, !tbaa !5
  %119 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %118, ptr noundef nonnull @.str.205, i32 noundef %79, ptr noundef %1) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %25) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %24) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %23) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %22) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %21) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %20) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #8
  br label %.thread51

120:                                              ; preds = %105
  %121 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7R3LightD2Ev(ptr noundef nonnull align 8 dereferenceable(128) %28) #8
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %28) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %27) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %26) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %25) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %24) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %23) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %22) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %21) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %20) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #8
  br label %182

122:                                              ; preds = %101
  %123 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %4, ptr noundef nonnull dereferenceable(1) @.str.82) #9
  %.not42 = icmp eq i32 %123, 0
  br i1 %.not42, label %124, label %148

124:                                              ; preds = %122
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %29) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %30) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %31) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %32) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %33) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %34) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %35) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %36) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %37) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %38) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %39) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %40) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %41) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %42) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %43) #8
  %125 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef nonnull %3, ptr noundef nonnull @.str.206, ptr noundef nonnull %4, ptr noundef nonnull %5, ptr noundef nonnull %29, ptr noundef nonnull %30, ptr noundef nonnull %31, ptr noundef nonnull %32, ptr noundef nonnull %33, ptr noundef nonnull %34, ptr noundef nonnull %35, ptr noundef nonnull %36, ptr noundef nonnull %37, ptr noundef nonnull %38, ptr noundef nonnull %39, ptr noundef nonnull %40, ptr noundef nonnull %41, ptr noundef nonnull %42, ptr noundef nonnull %43) #8
  %.not43 = icmp eq i32 %125, 17
  br i1 %.not43, label %126, label %143

126:                                              ; preds = %124
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %44) #8
  %127 = load double, ptr %30, align 8, !tbaa !11
  %128 = load double, ptr %31, align 8, !tbaa !11
  %129 = load double, ptr %32, align 8, !tbaa !11
  call void @_ZN5RNRgbC1Eddd(ptr noundef nonnull align 8 dereferenceable(24) %44, double noundef %127, double noundef %128, double noundef %129)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %45) #8
  %130 = load double, ptr %33, align 8, !tbaa !11
  %131 = load double, ptr %34, align 8, !tbaa !11
  %132 = load double, ptr %35, align 8, !tbaa !11
  call void @_ZN7R3PointC1Eddd(ptr noundef nonnull align 8 dereferenceable(24) %45, double noundef %130, double noundef %131, double noundef %132)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %46) #8
  %133 = load double, ptr %36, align 8, !tbaa !11
  %134 = load double, ptr %37, align 8, !tbaa !11
  %135 = load double, ptr %38, align 8, !tbaa !11
  call void @_ZN8R3VectorC1Eddd(ptr noundef nonnull align 8 dereferenceable(24) %46, double noundef %133, double noundef %134, double noundef %135)
  call void @llvm.lifetime.start.p0(i64 168, ptr nonnull %47) #8
  %136 = load double, ptr %39, align 8, !tbaa !11
  %137 = load double, ptr %40, align 8, !tbaa !11
  %138 = load double, ptr %29, align 8, !tbaa !11
  %139 = load double, ptr %41, align 8, !tbaa !11
  %140 = load double, ptr %42, align 8, !tbaa !11
  %141 = load double, ptr %43, align 8, !tbaa !11
  call void @_ZN11R3SpotLightC1ERK7R3PointRK8R3VectorRK5RNRgbdddiddd(ptr noundef nonnull align 8 dereferenceable(168) %47, ptr noundef nonnull align 8 dereferenceable(24) %45, ptr noundef nonnull align 8 dereferenceable(24) %46, ptr noundef nonnull align 8 dereferenceable(24) %44, double noundef %136, double noundef %137, double noundef %138, i32 noundef 1, double noundef %139, double noundef %140, double noundef %141)
  %142 = invoke noundef i32 @_ZL19InsertCopiesOfLightP7R3SceneP7R3LightPKc(ptr noundef nonnull %0, ptr noundef nonnull %47, ptr noundef nonnull %5)
          to label %.thread49 unwind label %146

.thread49:                                        ; preds = %126
  call void @_ZN7R3LightD2Ev(ptr noundef nonnull align 8 dereferenceable(168) %47) #8
  call void @llvm.lifetime.end.p0(i64 168, ptr nonnull %47) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %46) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %45) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %44) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %43) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %42) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %41) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %40) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %39) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %38) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %37) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %36) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %35) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %34) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %33) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %32) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %31) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %30) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %29) #8
  br label %180

143:                                              ; preds = %124
  %144 = load ptr, ptr @stderr, align 8, !tbaa !5
  %145 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %144, ptr noundef nonnull @.str.207, i32 noundef %79, ptr noundef %1) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %43) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %42) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %41) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %40) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %39) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %38) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %37) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %36) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %35) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %34) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %33) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %32) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %31) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %30) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %29) #8
  br label %.thread51

146:                                              ; preds = %126
  %147 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7R3LightD2Ev(ptr noundef nonnull align 8 dereferenceable(168) %47) #8
  call void @llvm.lifetime.end.p0(i64 168, ptr nonnull %47) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %46) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %45) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %44) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %43) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %42) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %41) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %40) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %39) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %38) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %37) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %36) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %35) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %34) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %33) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %32) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %31) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %30) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %29) #8
  br label %182

148:                                              ; preds = %122
  %149 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %4, ptr noundef nonnull dereferenceable(1) @.str.208) #9
  %.not44 = icmp eq i32 %149, 0
  br i1 %.not44, label %150, label %177

150:                                              ; preds = %148
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %48) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %49) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %50) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %51) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %52) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %53) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %54) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %55) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %56) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %57) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %58) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %59) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %60) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %61) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %62) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %63) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %64) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %65) #8
  %151 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef nonnull %3, ptr noundef nonnull @.str.209, ptr noundef nonnull %4, ptr noundef nonnull %5, ptr noundef nonnull %48, ptr noundef nonnull %49, ptr noundef nonnull %50, ptr noundef nonnull %51, ptr noundef nonnull %52, ptr noundef nonnull %53, ptr noundef nonnull %54, ptr noundef nonnull %55, ptr noundef nonnull %56, ptr noundef nonnull %57, ptr noundef nonnull %58, ptr noundef nonnull %59, ptr noundef nonnull %60, ptr noundef nonnull %61, ptr noundef nonnull %62, ptr noundef nonnull %63, ptr noundef nonnull %64, ptr noundef nonnull %65) #8
  %.not45 = icmp eq i32 %151, 20
  br i1 %.not45, label %152, label %172

152:                                              ; preds = %150
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %66) #8
  %153 = load double, ptr %49, align 8, !tbaa !11
  %154 = load double, ptr %50, align 8, !tbaa !11
  %155 = load double, ptr %51, align 8, !tbaa !11
  call void @_ZN5RNRgbC1Eddd(ptr noundef nonnull align 8 dereferenceable(24) %66, double noundef %153, double noundef %154, double noundef %155)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %67) #8
  %156 = load double, ptr %52, align 8, !tbaa !11
  %157 = load double, ptr %53, align 8, !tbaa !11
  %158 = load double, ptr %54, align 8, !tbaa !11
  call void @_ZN7R3PointC1Eddd(ptr noundef nonnull align 8 dereferenceable(24) %67, double noundef %156, double noundef %157, double noundef %158)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %68) #8
  %159 = load double, ptr %55, align 8, !tbaa !11
  %160 = load double, ptr %56, align 8, !tbaa !11
  %161 = load double, ptr %57, align 8, !tbaa !11
  call void @_ZN7R3PointC1Eddd(ptr noundef nonnull align 8 dereferenceable(24) %68, double noundef %159, double noundef %160, double noundef %161)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %69) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %70) #8
  call void @_ZplRK7R3PointS1_(ptr dead_on_unwind nonnull writable sret(%class.R3Point) align 8 %70, ptr noundef nonnull align 8 dereferenceable(24) %67, ptr noundef nonnull align 8 dereferenceable(24) %68)
  call void @_ZmldRK7R3Point(ptr dead_on_unwind nonnull writable sret(%class.R3Point) align 8 %69, double noundef 5.000000e-01, ptr noundef nonnull align 8 dereferenceable(24) %70)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %70) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %71) #8
  %162 = load double, ptr %58, align 8, !tbaa !11
  %163 = load double, ptr %59, align 8, !tbaa !11
  %164 = load double, ptr %60, align 8, !tbaa !11
  call void @_ZN8R3VectorC1Eddd(ptr noundef nonnull align 8 dereferenceable(24) %71, double noundef %162, double noundef %163, double noundef %164)
  call void @llvm.lifetime.start.p0(i64 168, ptr nonnull %72) #8
  %165 = load double, ptr %61, align 8, !tbaa !11
  %166 = load double, ptr %62, align 8, !tbaa !11
  %167 = load double, ptr %48, align 8, !tbaa !11
  %168 = load double, ptr %63, align 8, !tbaa !11
  %169 = load double, ptr %64, align 8, !tbaa !11
  %170 = load double, ptr %65, align 8, !tbaa !11
  call void @_ZN11R3SpotLightC1ERK7R3PointRK8R3VectorRK5RNRgbdddiddd(ptr noundef nonnull align 8 dereferenceable(168) %72, ptr noundef nonnull align 8 dereferenceable(24) %69, ptr noundef nonnull align 8 dereferenceable(24) %71, ptr noundef nonnull align 8 dereferenceable(24) %66, double noundef %165, double noundef %166, double noundef %167, i32 noundef 1, double noundef %168, double noundef %169, double noundef %170)
  %171 = invoke noundef i32 @_ZL19InsertCopiesOfLightP7R3SceneP7R3LightPKc(ptr noundef nonnull %0, ptr noundef nonnull %72, ptr noundef nonnull %5)
          to label %.thread50 unwind label %175

.thread50:                                        ; preds = %152
  call void @_ZN7R3LightD2Ev(ptr noundef nonnull align 8 dereferenceable(168) %72) #8
  call void @llvm.lifetime.end.p0(i64 168, ptr nonnull %72) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %71) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %69) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %68) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %67) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %66) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %65) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %64) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %63) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %62) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %61) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %60) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %59) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %58) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %57) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %56) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %55) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %54) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %53) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %52) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %51) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %50) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %49) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %48) #8
  br label %180

172:                                              ; preds = %150
  %173 = load ptr, ptr @stderr, align 8, !tbaa !5
  %174 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %173, ptr noundef nonnull @.str.210, i32 noundef %79, ptr noundef %1) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %65) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %64) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %63) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %62) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %61) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %60) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %59) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %58) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %57) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %56) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %55) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %54) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %53) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %52) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %51) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %50) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %49) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %48) #8
  br label %.thread51

175:                                              ; preds = %152
  %176 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7R3LightD2Ev(ptr noundef nonnull align 8 dereferenceable(168) %72) #8
  call void @llvm.lifetime.end.p0(i64 168, ptr nonnull %72) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %71) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %69) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %68) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %67) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %66) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %65) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %64) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %63) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %62) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %61) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %60) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %59) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %58) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %57) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %56) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %55) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %54) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %53) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %52) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %51) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %50) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %49) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %48) #8
  br label %182

177:                                              ; preds = %148
  %178 = load ptr, ptr @stderr, align 8, !tbaa !5
  %179 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %178, ptr noundef nonnull @.str.211, ptr noundef nonnull %4, i32 noundef %79, ptr noundef %1) #7
  br label %.thread51

.thread51:                                        ; preds = %177, %172, %143, %117, %96
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %4) #8
  br label %184

180:                                              ; preds = %.thread, %.thread48, %.thread49, %.thread50, %.lr.ph
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %4) #8
  %181 = call ptr @fgets(ptr noundef nonnull %3, i32 noundef 4096, ptr noundef nonnull %73)
  %.not36 = icmp eq ptr %181, null
  br i1 %.not36, label %._crit_edge, label %.lr.ph

182:                                              ; preds = %175, %146, %120, %99
  %.pn = phi { ptr, i32 } [ %176, %175 ], [ %147, %146 ], [ %121, %120 ], [ %100, %99 ]
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 4096, ptr nonnull %3) #8
  resume { ptr, i32 } %.pn

._crit_edge:                                      ; preds = %180, %77
  %183 = call i32 @fclose(ptr noundef nonnull %73)
  br label %184

184:                                              ; preds = %.thread51, %._crit_edge
  %.7 = phi i32 [ 1, %._crit_edge ], [ 0, %.thread51 ]
  call void @llvm.lifetime.end.p0(i64 4096, ptr nonnull %3) #8
  br label %185

185:                                              ; preds = %184, %74
  %.8 = phi i32 [ %.7, %184 ], [ 0, %74 ]
  ret i32 %.8
}

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL19InsertCopiesOfLightP7R3SceneP7R3LightPKc(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #4

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

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

declare void @_ZplRK7R3PointS1_(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

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

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

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


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