; LLVM IR from Lut1n/ImpGears :: src/ImpGears/Geometry/Geometry.ll (ZN3imp8Geometry17generateTexCoordsENS0_10TexGenModeEf)

; 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.imp::Vec" = type <{ %"class.imp::Object", [3 x float], [4 x i8] }>
%"class.imp::Object" = type { ptr, %"class.std::shared_ptr" }
%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.std::vector.5" = type { %"struct.std::_Vector_base.6" }
%"struct.std::_Vector_base.6" = type { %"struct.std::_Vector_base<imp::Vec<2, float>, std::allocator<imp::Vec<2, float>>>::_Vector_impl" }
%"struct.std::_Vector_base<imp::Vec<2, float>, std::allocator<imp::Vec<2, float>>>::_Vector_impl" = type { %"struct.std::_Vector_base<imp::Vec<2, float>, std::allocator<imp::Vec<2, float>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<imp::Vec<2, float>, std::allocator<imp::Vec<2, float>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator.7" = type { i8 }
%"class.imp::Vec3" = type { %"class.imp::Vec.base", [4 x i8] }
%"class.imp::Vec.base" = type <{ %"class.imp::Object", [3 x float] }>
%"class.__gnu_cxx::__normal_iterator.17" = type { ptr }
%"class.imp::Vec.16" = type { %"class.imp::Object", [2 x float] }
%"class.imp::Geometry" = type <{ %"class.imp::Object", i32, [4 x i8], %"class.std::vector", %"class.std::vector.0", %"class.std::vector.0", %"class.std::vector.0", %"class.std::vector.5", i8, i8, i8, i8, [4 x i8] }>
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<imp::Vec3, std::allocator<imp::Vec3>>::_Vector_impl" }
%"struct.std::_Vector_base<imp::Vec3, std::allocator<imp::Vec3>>::_Vector_impl" = type { %"struct.std::_Vector_base<imp::Vec3, std::allocator<imp::Vec3>>::_Vector_impl_data" }
%"struct.std::_Vector_base<imp::Vec3, std::allocator<imp::Vec3>>::_Vector_impl_data" = type { ptr, ptr, ptr }

declare i32 @__gxx_personality_v0(...)

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef float @_ZN3imp3VecILi3EfE9normalizeEv(ptr noundef nonnull align 8 dereferenceable(36)) #3 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3imp8Geometry4sizeEv(ptr noundef nonnull align 8 dereferenceable(156)) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNK3imp3VecILi3EfEmiERKS1_(ptr dead_on_unwind noalias writable sret(%"class.imp::Vec") align 8, ptr noundef nonnull align 8 dereferenceable(36), ptr noundef nonnull align 8 dereferenceable(36)) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNK3imp3VecILi3EfEdvEf(ptr dead_on_unwind noalias writable sret(%"class.imp::Vec") align 8, ptr noundef nonnull align 8 dereferenceable(36), float noundef) #0 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNK3imp3VecILi3EfEplERKS1_(ptr dead_on_unwind noalias writable sret(%"class.imp::Vec") align 8, ptr noundef nonnull align 8 dereferenceable(36), ptr noundef nonnull align 8 dereferenceable(36)) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp8Geometry2atEi(ptr noundef nonnull align 8 dereferenceable(156), i32 noundef) #0 align 2

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp3VecILi3EfEdVEf(ptr noundef nonnull align 8 dereferenceable(36), float noundef) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3imp13getUV_sphericERNS_4Vec3ES1_RfS2_(ptr noundef nonnull align 8 dereferenceable(36), ptr noundef nonnull align 8 dereferenceable(36), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3imp13getUV_cubemapERNS_4Vec3ES1_RfS2_(ptr noundef nonnull align 8 dereferenceable(36), ptr noundef nonnull align 8 dereferenceable(36), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #3

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3imp8Geometry17generateTexCoordsENS0_10TexGenModeEf(ptr noundef nonnull align 8 dereferenceable(156) %0, i32 noundef %1, float noundef %2) #3 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca float, align 4
  %7 = alloca %"class.std::vector.5", align 8
  %8 = alloca %"class.std::allocator.7", align 1
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca %"class.imp::Vec3", align 8
  %12 = alloca ptr, align 8
  %13 = alloca %"class.__gnu_cxx::__normal_iterator.17", align 8
  %14 = alloca %"class.__gnu_cxx::__normal_iterator.17", align 8
  %15 = alloca %"class.imp::Vec3", align 8
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca %"class.imp::Vec3", align 8
  %19 = alloca %"class.imp::Vec", align 8
  %20 = alloca %"class.imp::Vec", align 8
  %21 = alloca %"class.imp::Vec", align 8
  %22 = alloca %"class.imp::Vec", align 8
  %23 = alloca i32, align 4
  %24 = alloca float, align 4
  %25 = alloca float, align 4
  %26 = alloca %"class.imp::Vec3", align 8
  %27 = alloca %"class.imp::Vec", align 8
  %28 = alloca %"class.imp::Vec.16", align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !9
  store float %2, ptr %6, align 4, !tbaa !11
  %29 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr %7) #4
  %30 = call noundef i32 @_ZNK3imp8Geometry4sizeEv(ptr noundef nonnull align 8 dereferenceable(156) %29)
  %31 = sext i32 %30 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #4
  call void @_ZNSaIN3imp3VecILi2EfEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #4
  invoke void @_ZNSt6vectorIN3imp3VecILi2EfEESaIS2_EEC2EmRKS3_(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %31, ptr noundef nonnull align 1 dereferenceable(1) %8)
          to label %32 unwind label %46

32:                                               ; preds = %3
  %33 = getelementptr inbounds %"class.imp::Geometry", ptr %29, i32 0, i32 7
  %34 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIN3imp3VecILi2EfEESaIS2_EEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(24) %33, ptr noundef nonnull align 8 dereferenceable(24) %7) #4
  call void @_ZNSt6vectorIN3imp3VecILi2EfEESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #4
  call void @_ZNSt15__new_allocatorIN3imp3VecILi2EfEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #4
  %35 = getelementptr inbounds %"class.imp::Geometry", ptr %29, i32 0, i32 9
  store i8 1, ptr %35, align 1, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 40, ptr %11) #4
  call void @_ZN3imp4Vec3C2Ev(ptr noundef nonnull align 8 dereferenceable(36) %11)
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  %36 = getelementptr inbounds %"class.imp::Geometry", ptr %29, i32 0, i32 4
  store ptr %36, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  %37 = load ptr, ptr %12, align 8, !tbaa !5
  %38 = call ptr @_ZNSt6vectorIN3imp4Vec3ESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %37) #4
  %39 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.17", ptr %13, i32 0, i32 0
  store ptr %38, ptr %39, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  %40 = load ptr, ptr %12, align 8, !tbaa !5
  %41 = call ptr @_ZNSt6vectorIN3imp4Vec3ESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %40) #4
  %42 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.17", ptr %14, i32 0, i32 0
  store ptr %41, ptr %42, align 8
  br label %43

43:                                               ; preds = %54, %32
  %44 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPN3imp4Vec3ESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %14) #4
  br i1 %44, label %50, label %45

45:                                               ; preds = %43
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  br label %60

46:                                               ; preds = %3
  %47 = landingpad { ptr, i32 }
          cleanup
  %48 = extractvalue { ptr, i32 } %47, 0
  store ptr %48, ptr %9, align 8
  %49 = extractvalue { ptr, i32 } %47, 1
  store i32 %49, ptr %10, align 4
  call void @_ZNSt15__new_allocatorIN3imp3VecILi2EfEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #4
  br label %186

50:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 40, ptr %15) #4
  %51 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPN3imp4Vec3ESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %13) #4
  call void @_ZN3imp4Vec3C2ERKS0_(ptr noundef nonnull align 8 dereferenceable(36) %15, ptr noundef nonnull align 8 dereferenceable(36) %51) #4
  %52 = invoke noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp3VecILi3EfEpLERKS1_(ptr noundef nonnull align 8 dereferenceable(36) %11, ptr noundef nonnull align 8 dereferenceable(36) %15)
          to label %53 unwind label %56

53:                                               ; preds = %50
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %15) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr %15) #4
  br label %54

54:                                               ; preds = %53
  %55 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPN3imp4Vec3ESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %13) #4
  br label %43

56:                                               ; preds = %50
  %57 = landingpad { ptr, i32 }
          cleanup
  %58 = extractvalue { ptr, i32 } %57, 0
  store ptr %58, ptr %9, align 8
  %59 = extractvalue { ptr, i32 } %57, 1
  store i32 %59, ptr %10, align 4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %15) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  br label %185

60:                                               ; preds = %45
  %61 = call noundef i32 @_ZNK3imp8Geometry4sizeEv(ptr noundef nonnull align 8 dereferenceable(156) %29)
  %62 = sitofp i32 %61 to float
  %63 = invoke noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp3VecILi3EfEdVEf(ptr noundef nonnull align 8 dereferenceable(36) %11, float noundef %62)
          to label %64 unwind label %70

64:                                               ; preds = %60
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  store i32 0, ptr %16, align 4, !tbaa !33
  br label %65

65:                                               ; preds = %179, %64
  %66 = load i32, ptr %16, align 4, !tbaa !33
  %67 = call noundef i32 @_ZNK3imp8Geometry4sizeEv(ptr noundef nonnull align 8 dereferenceable(156) %29)
  %68 = icmp slt i32 %66, %67
  br i1 %68, label %74, label %69

69:                                               ; preds = %65
  store i32 4, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  br label %184

70:                                               ; preds = %60
  %71 = landingpad { ptr, i32 }
          cleanup
  %72 = extractvalue { ptr, i32 } %71, 0
  store ptr %72, ptr %9, align 8
  %73 = extractvalue { ptr, i32 } %71, 1
  store i32 %73, ptr %10, align 4
  br label %185

74:                                               ; preds = %65
  call void @llvm.lifetime.start.p0(i64 40, ptr %18) #4
  call void @llvm.lifetime.start.p0(i64 40, ptr %19) #4
  call void @llvm.lifetime.start.p0(i64 40, ptr %20) #4
  call void @llvm.lifetime.start.p0(i64 40, ptr %21) #4
  call void @llvm.lifetime.start.p0(i64 40, ptr %22) #4
  %75 = load i32, ptr %16, align 4, !tbaa !33
  %76 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp8Geometry2atEi(ptr noundef nonnull align 8 dereferenceable(156) %29, i32 noundef %75)
  %77 = load i32, ptr %16, align 4, !tbaa !33
  %78 = add nsw i32 %77, 1
  %79 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp8Geometry2atEi(ptr noundef nonnull align 8 dereferenceable(156) %29, i32 noundef %78)
  invoke void @_ZNK3imp3VecILi3EfEplERKS1_(ptr dead_on_unwind writable sret(%"class.imp::Vec") align 8 %22, ptr noundef nonnull align 8 dereferenceable(36) %76, ptr noundef nonnull align 8 dereferenceable(36) %79)
          to label %80 unwind label %94

80:                                               ; preds = %74
  %81 = load i32, ptr %16, align 4, !tbaa !33
  %82 = add nsw i32 %81, 2
  %83 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp8Geometry2atEi(ptr noundef nonnull align 8 dereferenceable(156) %29, i32 noundef %82)
  invoke void @_ZNK3imp3VecILi3EfEplERKS1_(ptr dead_on_unwind writable sret(%"class.imp::Vec") align 8 %21, ptr noundef nonnull align 8 dereferenceable(36) %22, ptr noundef nonnull align 8 dereferenceable(36) %83)
          to label %84 unwind label %98

84:                                               ; preds = %80
  invoke void @_ZNK3imp3VecILi3EfEdvEf(ptr dead_on_unwind writable sret(%"class.imp::Vec") align 8 %20, ptr noundef nonnull align 8 dereferenceable(36) %21, float noundef 3.000000e+00)
          to label %85 unwind label %102

85:                                               ; preds = %84
  invoke void @_ZNK3imp3VecILi3EfEmiERKS1_(ptr dead_on_unwind writable sret(%"class.imp::Vec") align 8 %19, ptr noundef nonnull align 8 dereferenceable(36) %20, ptr noundef nonnull align 8 dereferenceable(36) %11)
          to label %86 unwind label %106

86:                                               ; preds = %85
  invoke void @_ZN3imp4Vec3C2ILi3EEERKNS_3VecIXT_EfEEf(ptr noundef nonnull align 8 dereferenceable(36) %18, ptr noundef nonnull align 8 dereferenceable(36) %19, float noundef 1.000000e+00)
          to label %87 unwind label %110

87:                                               ; preds = %86
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %19) #4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %20) #4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %21) #4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %22) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr %19) #4
  %88 = invoke noundef float @_ZN3imp3VecILi3EfE9normalizeEv(ptr noundef nonnull align 8 dereferenceable(36) %18)
          to label %89 unwind label %118

89:                                               ; preds = %87
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #4
  store i32 0, ptr %23, align 4, !tbaa !33
  br label %90

90:                                               ; preds = %169, %89
  %91 = load i32, ptr %23, align 4, !tbaa !33
  %92 = icmp slt i32 %91, 3
  br i1 %92, label %122, label %93

93:                                               ; preds = %90
  store i32 7, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #4
  br label %178

94:                                               ; preds = %74
  %95 = landingpad { ptr, i32 }
          cleanup
  %96 = extractvalue { ptr, i32 } %95, 0
  store ptr %96, ptr %9, align 8
  %97 = extractvalue { ptr, i32 } %95, 1
  store i32 %97, ptr %10, align 4
  br label %117

98:                                               ; preds = %80
  %99 = landingpad { ptr, i32 }
          cleanup
  %100 = extractvalue { ptr, i32 } %99, 0
  store ptr %100, ptr %9, align 8
  %101 = extractvalue { ptr, i32 } %99, 1
  store i32 %101, ptr %10, align 4
  br label %116

102:                                              ; preds = %84
  %103 = landingpad { ptr, i32 }
          cleanup
  %104 = extractvalue { ptr, i32 } %103, 0
  store ptr %104, ptr %9, align 8
  %105 = extractvalue { ptr, i32 } %103, 1
  store i32 %105, ptr %10, align 4
  br label %115

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

110:                                              ; preds = %86
  %111 = landingpad { ptr, i32 }
          cleanup
  %112 = extractvalue { ptr, i32 } %111, 0
  store ptr %112, ptr %9, align 8
  %113 = extractvalue { ptr, i32 } %111, 1
  store i32 %113, ptr %10, align 4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %19) #4
  br label %114

114:                                              ; preds = %110, %106
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %20) #4
  br label %115

115:                                              ; preds = %114, %102
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %21) #4
  br label %116

116:                                              ; preds = %115, %98
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %22) #4
  br label %117

117:                                              ; preds = %116, %94
  call void @llvm.lifetime.end.p0(i64 40, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr %19) #4
  br label %183

118:                                              ; preds = %87
  %119 = landingpad { ptr, i32 }
          cleanup
  %120 = extractvalue { ptr, i32 } %119, 0
  store ptr %120, ptr %9, align 8
  %121 = extractvalue { ptr, i32 } %119, 1
  store i32 %121, ptr %10, align 4
  br label %182

122:                                              ; preds = %90
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #4
  call void @llvm.lifetime.start.p0(i64 40, ptr %26) #4
  call void @llvm.lifetime.start.p0(i64 40, ptr %27) #4
  %123 = load i32, ptr %16, align 4, !tbaa !33
  %124 = load i32, ptr %23, align 4, !tbaa !33
  %125 = add nsw i32 %123, %124
  %126 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp8Geometry2atEi(ptr noundef nonnull align 8 dereferenceable(156) %29, i32 noundef %125)
  invoke void @_ZNK3imp3VecILi3EfEmiERKS1_(ptr dead_on_unwind writable sret(%"class.imp::Vec") align 8 %27, ptr noundef nonnull align 8 dereferenceable(36) %126, ptr noundef nonnull align 8 dereferenceable(36) %11)
          to label %127 unwind label %135

127:                                              ; preds = %122
  invoke void @_ZN3imp4Vec3C2ILi3EEERKNS_3VecIXT_EfEEf(ptr noundef nonnull align 8 dereferenceable(36) %26, ptr noundef nonnull align 8 dereferenceable(36) %27, float noundef 1.000000e+00)
          to label %128 unwind label %139

128:                                              ; preds = %127
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %27) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr %27) #4
  %129 = invoke noundef float @_ZN3imp3VecILi3EfE9normalizeEv(ptr noundef nonnull align 8 dereferenceable(36) %26)
          to label %130 unwind label %144

130:                                              ; preds = %128
  %131 = load i32, ptr %5, align 4, !tbaa !9
  %132 = icmp eq i32 %131, 0
  br i1 %132, label %133, label %148

133:                                              ; preds = %130
  invoke void @_ZN3imp13getUV_sphericERNS_4Vec3ES1_RfS2_(ptr noundef nonnull align 8 dereferenceable(36) %18, ptr noundef nonnull align 8 dereferenceable(36) %26, ptr noundef nonnull align 4 dereferenceable(4) %24, ptr noundef nonnull align 4 dereferenceable(4) %25)
          to label %134 unwind label %144

134:                                              ; preds = %133
  br label %154

135:                                              ; preds = %122
  %136 = landingpad { ptr, i32 }
          cleanup
  %137 = extractvalue { ptr, i32 } %136, 0
  store ptr %137, ptr %9, align 8
  %138 = extractvalue { ptr, i32 } %136, 1
  store i32 %138, ptr %10, align 4
  br label %143

139:                                              ; preds = %127
  %140 = landingpad { ptr, i32 }
          cleanup
  %141 = extractvalue { ptr, i32 } %140, 0
  store ptr %141, ptr %9, align 8
  %142 = extractvalue { ptr, i32 } %140, 1
  store i32 %142, ptr %10, align 4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %27) #4
  br label %143

143:                                              ; preds = %139, %135
  call void @llvm.lifetime.end.p0(i64 40, ptr %27) #4
  br label %177

144:                                              ; preds = %151, %133, %128
  %145 = landingpad { ptr, i32 }
          cleanup
  %146 = extractvalue { ptr, i32 } %145, 0
  store ptr %146, ptr %9, align 8
  %147 = extractvalue { ptr, i32 } %145, 1
  store i32 %147, ptr %10, align 4
  br label %176

148:                                              ; preds = %130
  %149 = load i32, ptr %5, align 4, !tbaa !9
  %150 = icmp eq i32 %149, 2
  br i1 %150, label %151, label %153

151:                                              ; preds = %148
  invoke void @_ZN3imp13getUV_cubemapERNS_4Vec3ES1_RfS2_(ptr noundef nonnull align 8 dereferenceable(36) %18, ptr noundef nonnull align 8 dereferenceable(36) %26, ptr noundef nonnull align 4 dereferenceable(4) %24, ptr noundef nonnull align 4 dereferenceable(4) %25)
          to label %152 unwind label %144

152:                                              ; preds = %151
  br label %153

153:                                              ; preds = %152, %148
  br label %154

154:                                              ; preds = %153, %134
  call void @llvm.lifetime.start.p0(i64 32, ptr %28) #4
  %155 = load float, ptr %24, align 4, !tbaa !11
  %156 = load float, ptr %6, align 4, !tbaa !11
  %157 = fmul float %155, %156
  %158 = load float, ptr %25, align 4, !tbaa !11
  %159 = load float, ptr %6, align 4, !tbaa !11
  %160 = fmul float %158, %159
  invoke void @_ZN3imp3VecILi2EfEC2IJfEEEfDpT_(ptr noundef nonnull align 8 dereferenceable(32) %28, float noundef %157, float noundef %160)
          to label %161 unwind label %172

161:                                              ; preds = %154
  %162 = getelementptr inbounds %"class.imp::Geometry", ptr %29, i32 0, i32 7
  %163 = load i32, ptr %16, align 4, !tbaa !33
  %164 = load i32, ptr %23, align 4, !tbaa !33
  %165 = add nsw i32 %163, %164
  %166 = sext i32 %165 to i64
  %167 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorIN3imp3VecILi2EfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %162, i64 noundef %166) #4
  %168 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN3imp3VecILi2EfEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(32) %167, ptr noundef nonnull align 8 dereferenceable(32) %28) #4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %28) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %28) #4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %26) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr %26) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #4
  br label %169

169:                                              ; preds = %161
  %170 = load i32, ptr %23, align 4, !tbaa !33
  %171 = add nsw i32 %170, 1
  store i32 %171, ptr %23, align 4, !tbaa !33
  br label %90, !llvm.loop !35

172:                                              ; preds = %154
  %173 = landingpad { ptr, i32 }
          cleanup
  %174 = extractvalue { ptr, i32 } %173, 0
  store ptr %174, ptr %9, align 8
  %175 = extractvalue { ptr, i32 } %173, 1
  store i32 %175, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 32, ptr %28) #4
  br label %176

176:                                              ; preds = %172, %144
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %26) #4
  br label %177

177:                                              ; preds = %176, %143
  call void @llvm.lifetime.end.p0(i64 40, ptr %26) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #4
  br label %182

178:                                              ; preds = %93
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %18) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr %18) #4
  br label %179

179:                                              ; preds = %178
  %180 = load i32, ptr %16, align 4, !tbaa !33
  %181 = add nsw i32 %180, 3
  store i32 %181, ptr %16, align 4, !tbaa !33
  br label %65, !llvm.loop !37

182:                                              ; preds = %177, %118
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %18) #4
  br label %183

183:                                              ; preds = %182, %117
  call void @llvm.lifetime.end.p0(i64 40, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  br label %185

184:                                              ; preds = %69
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %11) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr %11) #4
  ret void

185:                                              ; preds = %183, %70, %56
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %11) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr %11) #4
  br label %186

186:                                              ; preds = %185, %46
  %187 = load ptr, ptr %9, align 8
  %188 = load i32, ptr %10, align 4
  %189 = insertvalue { ptr, i32 } poison, ptr %187, 0
  %190 = insertvalue { ptr, i32 } %189, i32 %188, 1
  resume { ptr, i32 } %190
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIN3imp3VecILi2EfEESaIS2_EEC2EmRKS3_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

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

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

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

attributes #0 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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, !10, i64 0}
!10 = !{!"_ZTSN3imp8Geometry10TexGenModeE", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = !{!14, !32, i64 153}
!14 = !{!"_ZTSN3imp8GeometryE", !15, i64 0, !19, i64 24, !20, i64 32, !24, i64 56, !24, i64 80, !24, i64 104, !28, i64 128, !32, i64 152, !32, i64 153, !32, i64 154, !32, i64 155}
!15 = !{!"_ZTSN3imp6ObjectE", !16, i64 8}
!16 = !{!"_ZTSSt10shared_ptrIN3imp6ObjectEE", !17, i64 0}
!17 = !{!"_ZTSSt12__shared_ptrIN3imp6ObjectELN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0, !18, i64 8}
!18 = !{!"_ZTSSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0}
!19 = !{!"_ZTSN3imp8Geometry9PrimitiveE", !7, i64 0}
!20 = !{!"_ZTSSt6vectorIjSaIjEE", !21, i64 0}
!21 = !{!"_ZTSSt12_Vector_baseIjSaIjEE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE12_Vector_implE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!24 = !{!"_ZTSSt6vectorIN3imp4Vec3ESaIS1_EE", !25, i64 0}
!25 = !{!"_ZTSSt12_Vector_baseIN3imp4Vec3ESaIS1_EE", !26, i64 0}
!26 = !{!"_ZTSNSt12_Vector_baseIN3imp4Vec3ESaIS1_EE12_Vector_implE", !27, i64 0}
!27 = !{!"_ZTSNSt12_Vector_baseIN3imp4Vec3ESaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!28 = !{!"_ZTSSt6vectorIN3imp3VecILi2EfEESaIS2_EE", !29, i64 0}
!29 = !{!"_ZTSSt12_Vector_baseIN3imp3VecILi2EfEESaIS2_EE", !30, i64 0}
!30 = !{!"_ZTSNSt12_Vector_baseIN3imp3VecILi2EfEESaIS2_EE12_Vector_implE", !31, i64 0}
!31 = !{!"_ZTSNSt12_Vector_baseIN3imp3VecILi2EfEESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!32 = !{!"bool", !7, i64 0}
!33 = !{!34, !34, i64 0}
!34 = !{!"int", !7, i64 0}
!35 = distinct !{!35, !36}
!36 = !{!"llvm.loop.mustprogress"}
!37 = distinct !{!37, !36}


; 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.imp::Vec" = type <{ %"class.imp::Object", [3 x float], [4 x i8] }>
%"class.imp::Object" = type { ptr, %"class.std::shared_ptr" }
%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.std::vector.5" = type { %"struct.std::_Vector_base.6" }
%"struct.std::_Vector_base.6" = type { %"struct.std::_Vector_base<imp::Vec<2, float>, std::allocator<imp::Vec<2, float>>>::_Vector_impl" }
%"struct.std::_Vector_base<imp::Vec<2, float>, std::allocator<imp::Vec<2, float>>>::_Vector_impl" = type { %"struct.std::_Vector_base<imp::Vec<2, float>, std::allocator<imp::Vec<2, float>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<imp::Vec<2, float>, std::allocator<imp::Vec<2, float>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator.7" = type { i8 }
%"class.imp::Vec3" = type { %"class.imp::Vec.base", [4 x i8] }
%"class.imp::Vec.base" = type <{ %"class.imp::Object", [3 x float] }>
%"class.__gnu_cxx::__normal_iterator.17" = type { ptr }
%"class.imp::Vec.16" = type { %"class.imp::Object", [2 x float] }

declare i32 @__gxx_personality_v0(...)

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

; 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef float @_ZN3imp3VecILi3EfE9normalizeEv(ptr noundef nonnull align 8 dereferenceable(36)) local_unnamed_addr #3 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3imp8Geometry4sizeEv(ptr noundef nonnull align 8 dereferenceable(156)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNK3imp3VecILi3EfEmiERKS1_(ptr dead_on_unwind noalias writable sret(%"class.imp::Vec") align 8, ptr noundef nonnull align 8 dereferenceable(36), ptr noundef nonnull align 8 dereferenceable(36)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNK3imp3VecILi3EfEdvEf(ptr dead_on_unwind noalias writable sret(%"class.imp::Vec") align 8, ptr noundef nonnull align 8 dereferenceable(36), float noundef) local_unnamed_addr #0 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNK3imp3VecILi3EfEplERKS1_(ptr dead_on_unwind noalias writable sret(%"class.imp::Vec") align 8, ptr noundef nonnull align 8 dereferenceable(36), ptr noundef nonnull align 8 dereferenceable(36)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp8Geometry2atEi(ptr noundef nonnull align 8 dereferenceable(156), i32 noundef) local_unnamed_addr #0 align 2

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp3VecILi3EfEdVEf(ptr noundef nonnull align 8 dereferenceable(36), float noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3imp13getUV_sphericERNS_4Vec3ES1_RfS2_(ptr noundef nonnull align 8 dereferenceable(36), ptr noundef nonnull align 8 dereferenceable(36), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3imp13getUV_cubemapERNS_4Vec3ES1_RfS2_(ptr noundef nonnull align 8 dereferenceable(36), ptr noundef nonnull align 8 dereferenceable(36), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3imp8Geometry17generateTexCoordsENS0_10TexGenModeEf(ptr noundef nonnull align 8 dereferenceable(156) %0, i32 noundef %1, float noundef %2) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.std::vector.5", align 8
  %5 = alloca %"class.std::allocator.7", align 1
  %6 = alloca %"class.imp::Vec3", align 8
  %7 = alloca %"class.__gnu_cxx::__normal_iterator.17", align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator.17", align 8
  %9 = alloca %"class.imp::Vec3", align 8
  %10 = alloca %"class.imp::Vec3", align 8
  %11 = alloca %"class.imp::Vec", align 8
  %12 = alloca %"class.imp::Vec", align 8
  %13 = alloca %"class.imp::Vec", align 8
  %14 = alloca %"class.imp::Vec", align 8
  %15 = alloca float, align 4
  %16 = alloca float, align 4
  %17 = alloca %"class.imp::Vec3", align 8
  %18 = alloca %"class.imp::Vec", align 8
  %19 = alloca %"class.imp::Vec.16", align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #4
  %20 = tail call noundef i32 @_ZNK3imp8Geometry4sizeEv(ptr noundef nonnull align 8 dereferenceable(156) %0)
  %21 = sext i32 %20 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #4
  call void @_ZNSaIN3imp3VecILi2EfEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #4
  invoke void @_ZNSt6vectorIN3imp3VecILi2EfEESaIS2_EEC2EmRKS3_(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %21, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %22 unwind label %35

22:                                               ; preds = %3
  %23 = getelementptr inbounds i8, ptr %0, i64 128
  %24 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIN3imp3VecILi2EfEESaIS2_EEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(24) %23, ptr noundef nonnull align 8 dereferenceable(24) %4) #4
  call void @_ZNSt6vectorIN3imp3VecILi2EfEESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #4
  call void @_ZNSt15__new_allocatorIN3imp3VecILi2EfEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #4
  %25 = getelementptr inbounds i8, ptr %0, i64 153
  store i8 1, ptr %25, align 1, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %6) #4
  call void @_ZN3imp4Vec3C2Ev(ptr noundef nonnull align 8 dereferenceable(36) %6)
  %26 = getelementptr inbounds i8, ptr %0, i64 56
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #4
  %27 = call ptr @_ZNSt6vectorIN3imp4Vec3ESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %26) #4
  store ptr %27, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #4
  %28 = call ptr @_ZNSt6vectorIN3imp4Vec3ESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %26) #4
  store ptr %28, ptr %8, align 8
  %29 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPN3imp4Vec3ESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #4
  br i1 %29, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %22
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #4
  %30 = call noundef i32 @_ZNK3imp8Geometry4sizeEv(ptr noundef nonnull align 8 dereferenceable(156) %0)
  %31 = sitofp i32 %30 to float
  %32 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp3VecILi3EfEdVEf(ptr noundef nonnull align 8 dereferenceable(36) %6, float noundef %31)
  %33 = call noundef i32 @_ZNK3imp8Geometry4sizeEv(ptr noundef nonnull align 8 dereferenceable(156) %0)
  %34 = icmp sgt i32 %33, 0
  br i1 %34, label %.lr.ph35, label %._crit_edge36

35:                                               ; preds = %3
  %36 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIN3imp3VecILi2EfEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #4
  br label %108

.lr.ph:                                           ; preds = %22, %.lr.ph
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %9) #4
  %37 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPN3imp4Vec3ESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #4
  call void @_ZN3imp4Vec3C2ERKS0_(ptr noundef nonnull align 8 dereferenceable(36) %9, ptr noundef nonnull align 8 dereferenceable(36) %37) #4
  %38 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp3VecILi3EfEpLERKS1_(ptr noundef nonnull align 8 dereferenceable(36) %6, ptr noundef nonnull align 8 dereferenceable(36) %9)
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %9) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %9) #4
  %39 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPN3imp4Vec3ESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #4
  %40 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPN3imp4Vec3ESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #4
  br i1 %40, label %.lr.ph, label %._crit_edge

._crit_edge36:                                    ; preds = %96, %._crit_edge
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %6) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %6) #4
  ret void

.lr.ph35:                                         ; preds = %._crit_edge, %96
  %indvars.iv = phi i64 [ %indvars.iv.next, %96 ], [ 0, %._crit_edge ]
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %10) #4
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %11) #4
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %12) #4
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %13) #4
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %14) #4
  %41 = trunc nuw nsw i64 %indvars.iv to i32
  %42 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp8Geometry2atEi(ptr noundef nonnull align 8 dereferenceable(156) %0, i32 noundef %41)
  %43 = add nuw nsw i64 %indvars.iv, 1
  %44 = trunc nuw i64 %43 to i32
  %45 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp8Geometry2atEi(ptr noundef nonnull align 8 dereferenceable(156) %0, i32 noundef %44)
  call void @_ZNK3imp3VecILi3EfEplERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.imp::Vec") align 8 %14, ptr noundef nonnull align 8 dereferenceable(36) %42, ptr noundef nonnull align 8 dereferenceable(36) %45)
  %46 = add nuw nsw i64 %indvars.iv, 2
  %47 = trunc nuw i64 %46 to i32
  %48 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp8Geometry2atEi(ptr noundef nonnull align 8 dereferenceable(156) %0, i32 noundef %47)
  call void @_ZNK3imp3VecILi3EfEplERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.imp::Vec") align 8 %13, ptr noundef nonnull align 8 dereferenceable(36) %14, ptr noundef nonnull align 8 dereferenceable(36) %48)
  call void @_ZNK3imp3VecILi3EfEdvEf(ptr dead_on_unwind nonnull writable sret(%"class.imp::Vec") align 8 %12, ptr noundef nonnull align 8 dereferenceable(36) %13, float noundef 3.000000e+00)
  call void @_ZNK3imp3VecILi3EfEmiERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.imp::Vec") align 8 %11, ptr noundef nonnull align 8 dereferenceable(36) %12, ptr noundef nonnull align 8 dereferenceable(36) %6)
  invoke void @_ZN3imp4Vec3C2ILi3EEERKNS_3VecIXT_EfEEf(ptr noundef nonnull align 8 dereferenceable(36) %10, ptr noundef nonnull align 8 dereferenceable(36) %11, float noundef 1.000000e+00)
          to label %49 unwind label %52

49:                                               ; preds = %.lr.ph35
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %11) #4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %12) #4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %13) #4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %14) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %14) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %13) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %12) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %11) #4
  %50 = invoke noundef float @_ZN3imp3VecILi3EfE9normalizeEv(ptr noundef nonnull align 8 dereferenceable(36) %10)
          to label %.preheader.preheader unwind label %54

.preheader.preheader:                             ; preds = %49
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #4
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %17) #4
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %18) #4
  %51 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp8Geometry2atEi(ptr noundef nonnull align 8 dereferenceable(156) %0, i32 noundef %41)
  call void @_ZNK3imp3VecILi3EfEmiERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.imp::Vec") align 8 %18, ptr noundef nonnull align 8 dereferenceable(36) %51, ptr noundef nonnull align 8 dereferenceable(36) %6)
  invoke void @_ZN3imp4Vec3C2ILi3EEERKNS_3VecIXT_EfEEf(ptr noundef nonnull align 8 dereferenceable(36) %17, ptr noundef nonnull align 8 dereferenceable(36) %18, float noundef 1.000000e+00)
          to label %56 unwind label %60

52:                                               ; preds = %.lr.ph35
  %53 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %11) #4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %12) #4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %13) #4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %14) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %14) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %13) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %12) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %11) #4
  br label %107

54:                                               ; preds = %49
  %55 = landingpad { ptr, i32 }
          cleanup
  br label %106

56:                                               ; preds = %.preheader.preheader
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %18) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %18) #4
  %57 = invoke noundef float @_ZN3imp3VecILi3EfE9normalizeEv(ptr noundef nonnull align 8 dereferenceable(36) %17)
          to label %58 unwind label %62

58:                                               ; preds = %56
  switch i32 %1, label %65 [
    i32 0, label %59
    i32 2, label %64
  ]

59:                                               ; preds = %58
  invoke void @_ZN3imp13getUV_sphericERNS_4Vec3ES1_RfS2_(ptr noundef nonnull align 8 dereferenceable(36) %10, ptr noundef nonnull align 8 dereferenceable(36) %17, ptr noundef nonnull align 4 dereferenceable(4) %15, ptr noundef nonnull align 4 dereferenceable(4) %16)
          to label %65 unwind label %62

60:                                               ; preds = %.preheader.2, %.preheader.1, %.preheader.preheader
  %61 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %18) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %18) #4
  br label %105

62:                                               ; preds = %90, %89, %86, %77, %76, %73, %64, %59, %56
  %63 = landingpad { ptr, i32 }
          cleanup
  br label %104

64:                                               ; preds = %58
  invoke void @_ZN3imp13getUV_cubemapERNS_4Vec3ES1_RfS2_(ptr noundef nonnull align 8 dereferenceable(36) %10, ptr noundef nonnull align 8 dereferenceable(36) %17, ptr noundef nonnull align 4 dereferenceable(4) %15, ptr noundef nonnull align 4 dereferenceable(4) %16)
          to label %65 unwind label %62

65:                                               ; preds = %58, %64, %59
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %19) #4
  %66 = load float, ptr %15, align 4, !tbaa !28
  %67 = fmul float %66, %2
  %68 = load float, ptr %16, align 4, !tbaa !28
  %69 = fmul float %68, %2
  invoke void @_ZN3imp3VecILi2EfEC2IJfEEEfDpT_(ptr noundef nonnull align 8 dereferenceable(32) %19, float noundef %67, float noundef %69)
          to label %.preheader.1 unwind label %102

.preheader.1:                                     ; preds = %65
  %70 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorIN3imp3VecILi2EfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %23, i64 noundef %indvars.iv) #4
  %71 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN3imp3VecILi2EfEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(32) %70, ptr noundef nonnull align 8 dereferenceable(32) %19) #4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %19) #4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %17) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %17) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #4
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %17) #4
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %18) #4
  %72 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp8Geometry2atEi(ptr noundef nonnull align 8 dereferenceable(156) %0, i32 noundef %44)
  call void @_ZNK3imp3VecILi3EfEmiERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.imp::Vec") align 8 %18, ptr noundef nonnull align 8 dereferenceable(36) %72, ptr noundef nonnull align 8 dereferenceable(36) %6)
  invoke void @_ZN3imp4Vec3C2ILi3EEERKNS_3VecIXT_EfEEf(ptr noundef nonnull align 8 dereferenceable(36) %17, ptr noundef nonnull align 8 dereferenceable(36) %18, float noundef 1.000000e+00)
          to label %73 unwind label %60

73:                                               ; preds = %.preheader.1
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %18) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %18) #4
  %74 = invoke noundef float @_ZN3imp3VecILi3EfE9normalizeEv(ptr noundef nonnull align 8 dereferenceable(36) %17)
          to label %75 unwind label %62

75:                                               ; preds = %73
  switch i32 %1, label %78 [
    i32 0, label %77
    i32 2, label %76
  ]

76:                                               ; preds = %75
  invoke void @_ZN3imp13getUV_cubemapERNS_4Vec3ES1_RfS2_(ptr noundef nonnull align 8 dereferenceable(36) %10, ptr noundef nonnull align 8 dereferenceable(36) %17, ptr noundef nonnull align 4 dereferenceable(4) %15, ptr noundef nonnull align 4 dereferenceable(4) %16)
          to label %78 unwind label %62

77:                                               ; preds = %75
  invoke void @_ZN3imp13getUV_sphericERNS_4Vec3ES1_RfS2_(ptr noundef nonnull align 8 dereferenceable(36) %10, ptr noundef nonnull align 8 dereferenceable(36) %17, ptr noundef nonnull align 4 dereferenceable(4) %15, ptr noundef nonnull align 4 dereferenceable(4) %16)
          to label %78 unwind label %62

78:                                               ; preds = %77, %76, %75
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %19) #4
  %79 = load float, ptr %15, align 4, !tbaa !28
  %80 = fmul float %79, %2
  %81 = load float, ptr %16, align 4, !tbaa !28
  %82 = fmul float %81, %2
  invoke void @_ZN3imp3VecILi2EfEC2IJfEEEfDpT_(ptr noundef nonnull align 8 dereferenceable(32) %19, float noundef %80, float noundef %82)
          to label %.preheader.2 unwind label %102

.preheader.2:                                     ; preds = %78
  %83 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorIN3imp3VecILi2EfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %23, i64 noundef %43) #4
  %84 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN3imp3VecILi2EfEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(32) %83, ptr noundef nonnull align 8 dereferenceable(32) %19) #4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %19) #4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %17) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %17) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #4
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %17) #4
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %18) #4
  %85 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp8Geometry2atEi(ptr noundef nonnull align 8 dereferenceable(156) %0, i32 noundef %47)
  call void @_ZNK3imp3VecILi3EfEmiERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.imp::Vec") align 8 %18, ptr noundef nonnull align 8 dereferenceable(36) %85, ptr noundef nonnull align 8 dereferenceable(36) %6)
  invoke void @_ZN3imp4Vec3C2ILi3EEERKNS_3VecIXT_EfEEf(ptr noundef nonnull align 8 dereferenceable(36) %17, ptr noundef nonnull align 8 dereferenceable(36) %18, float noundef 1.000000e+00)
          to label %86 unwind label %60

86:                                               ; preds = %.preheader.2
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %18) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %18) #4
  %87 = invoke noundef float @_ZN3imp3VecILi3EfE9normalizeEv(ptr noundef nonnull align 8 dereferenceable(36) %17)
          to label %88 unwind label %62

88:                                               ; preds = %86
  switch i32 %1, label %91 [
    i32 0, label %90
    i32 2, label %89
  ]

89:                                               ; preds = %88
  invoke void @_ZN3imp13getUV_cubemapERNS_4Vec3ES1_RfS2_(ptr noundef nonnull align 8 dereferenceable(36) %10, ptr noundef nonnull align 8 dereferenceable(36) %17, ptr noundef nonnull align 4 dereferenceable(4) %15, ptr noundef nonnull align 4 dereferenceable(4) %16)
          to label %91 unwind label %62

90:                                               ; preds = %88
  invoke void @_ZN3imp13getUV_sphericERNS_4Vec3ES1_RfS2_(ptr noundef nonnull align 8 dereferenceable(36) %10, ptr noundef nonnull align 8 dereferenceable(36) %17, ptr noundef nonnull align 4 dereferenceable(4) %15, ptr noundef nonnull align 4 dereferenceable(4) %16)
          to label %91 unwind label %62

91:                                               ; preds = %90, %89, %88
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %19) #4
  %92 = load float, ptr %15, align 4, !tbaa !28
  %93 = fmul float %92, %2
  %94 = load float, ptr %16, align 4, !tbaa !28
  %95 = fmul float %94, %2
  invoke void @_ZN3imp3VecILi2EfEC2IJfEEEfDpT_(ptr noundef nonnull align 8 dereferenceable(32) %19, float noundef %93, float noundef %95)
          to label %96 unwind label %102

96:                                               ; preds = %91
  %97 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorIN3imp3VecILi2EfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %23, i64 noundef %46) #4
  %98 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN3imp3VecILi2EfEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(32) %97, ptr noundef nonnull align 8 dereferenceable(32) %19) #4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %19) #4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %17) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %17) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %10) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %10) #4
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 3
  %99 = call noundef i32 @_ZNK3imp8Geometry4sizeEv(ptr noundef nonnull align 8 dereferenceable(156) %0)
  %100 = trunc nuw i64 %indvars.iv.next to i32
  %101 = icmp sgt i32 %99, %100
  br i1 %101, label %.lr.ph35, label %._crit_edge36, !llvm.loop !30

102:                                              ; preds = %91, %78, %65
  %103 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %19) #4
  br label %104

104:                                              ; preds = %102, %62
  %.pn = phi { ptr, i32 } [ %103, %102 ], [ %63, %62 ]
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %17) #4
  br label %105

105:                                              ; preds = %104, %60
  %.pn.pn = phi { ptr, i32 } [ %.pn, %104 ], [ %61, %60 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %17) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #4
  br label %106

106:                                              ; preds = %105, %54
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %105 ], [ %55, %54 ]
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %10) #4
  br label %107

107:                                              ; preds = %106, %52
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %106 ], [ %53, %52 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %10) #4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %6) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %6) #4
  br label %108

108:                                              ; preds = %107, %35
  %.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn, %107 ], [ %36, %35 ]
  resume { ptr, i32 } %.pn.pn.pn.pn.pn
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIN3imp3VecILi2EfEESaIS2_EEC2EmRKS3_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

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

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

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

attributes #0 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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, !27, i64 153}
!6 = !{!"_ZTSN3imp8GeometryE", !7, i64 0, !14, i64 24, !15, i64 32, !19, i64 56, !19, i64 80, !19, i64 104, !23, i64 128, !27, i64 152, !27, i64 153, !27, i64 154, !27, i64 155}
!7 = !{!"_ZTSN3imp6ObjectE", !8, i64 8}
!8 = !{!"_ZTSSt10shared_ptrIN3imp6ObjectEE", !9, i64 0}
!9 = !{!"_ZTSSt12__shared_ptrIN3imp6ObjectELN9__gnu_cxx12_Lock_policyE2EE", !10, i64 0, !13, i64 8}
!10 = !{!"any pointer", !11, i64 0}
!11 = !{!"omnipotent char", !12, i64 0}
!12 = !{!"Simple C++ TBAA"}
!13 = !{!"_ZTSSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EE", !10, i64 0}
!14 = !{!"_ZTSN3imp8Geometry9PrimitiveE", !11, i64 0}
!15 = !{!"_ZTSSt6vectorIjSaIjEE", !16, i64 0}
!16 = !{!"_ZTSSt12_Vector_baseIjSaIjEE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE12_Vector_implE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE17_Vector_impl_dataE", !10, i64 0, !10, i64 8, !10, i64 16}
!19 = !{!"_ZTSSt6vectorIN3imp4Vec3ESaIS1_EE", !20, i64 0}
!20 = !{!"_ZTSSt12_Vector_baseIN3imp4Vec3ESaIS1_EE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIN3imp4Vec3ESaIS1_EE12_Vector_implE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseIN3imp4Vec3ESaIS1_EE17_Vector_impl_dataE", !10, i64 0, !10, i64 8, !10, i64 16}
!23 = !{!"_ZTSSt6vectorIN3imp3VecILi2EfEESaIS2_EE", !24, i64 0}
!24 = !{!"_ZTSSt12_Vector_baseIN3imp3VecILi2EfEESaIS2_EE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseIN3imp3VecILi2EfEESaIS2_EE12_Vector_implE", !26, i64 0}
!26 = !{!"_ZTSNSt12_Vector_baseIN3imp3VecILi2EfEESaIS2_EE17_Vector_impl_dataE", !10, i64 0, !10, i64 8, !10, i64 16}
!27 = !{!"bool", !11, i64 0}
!28 = !{!29, !29, i64 0}
!29 = !{!"float", !11, i64 0}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.mustprogress"}


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