; LLVM IR from Lut1n/ImpGears :: src/ImpGears/Graphics/Sampler.ll (ZN3imp14CubeMapSampler3getERKNS_4Vec3E)

; 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.7" = type { %"class.imp::Object", [4 x float] }
%"class.imp::Object" = type { ptr, %"class.std::shared_ptr.0" }
%"class.std::shared_ptr.0" = type { %"class.std::__shared_ptr.1" }
%"class.std::__shared_ptr.1" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.imp::Vec4" = type { %"class.imp::Vec.7" }
%"class.imp::Vec3" = type { %"class.imp::Vec.base.11", [4 x i8] }
%"class.imp::Vec.base.11" = type <{ %"class.imp::Object", [3 x float] }>
%"class.imp::Vec.10" = type <{ %"class.imp::Object", [3 x float], [4 x i8] }>
%"class.imp::CubeMapSampler" = type { %"class.imp::Sampler.base.9", %"class.std::vector", i32, %"class.imp::Vec2" }
%"class.imp::Sampler.base.9" = type <{ %"class.imp::Object", i32, i8, i8 }>
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::shared_ptr<imp::Image>, std::allocator<std::shared_ptr<imp::Image>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::shared_ptr<imp::Image>, std::allocator<std::shared_ptr<imp::Image>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::shared_ptr<imp::Image>, std::allocator<std::shared_ptr<imp::Image>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::shared_ptr<imp::Image>, std::allocator<std::shared_ptr<imp::Image>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.imp::Vec2" = type { %"class.imp::Vec" }
%"class.imp::Vec" = type { %"class.imp::Object", [2 x float] }

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3imp4Vec4C2ILi4EEERKNS_3VecIXT_EfEEf(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(40), float noundef) unnamed_addr #1 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3imp4Vec4C2Ef(ptr noundef nonnull align 8 dereferenceable(40), float noundef) unnamed_addr #1 align 2

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3imp14CubeMapSampler3getERKNS_4Vec3E(ptr dead_on_unwind noalias writable sret(%"class.imp::Vec4") align 8 %0, ptr noundef nonnull align 8 dereferenceable(96) %1, ptr noundef nonnull align 8 dereferenceable(36) %2) #1 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca %"class.imp::Vec3", align 8
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca %"class.imp::Vec3", align 8
  %12 = alloca %"class.imp::Vec.10", align 8
  %13 = alloca %"class.imp::Vec.10", align 8
  %14 = alloca %"class.imp::Vec4", align 8
  %15 = alloca %"class.imp::Vec.7", align 8
  store ptr %0, ptr %4, align 8
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %16 = load ptr, ptr %5, align 8
  %17 = getelementptr inbounds %"class.imp::CubeMapSampler", ptr %16, i32 0, i32 1
  %18 = call noundef i64 @_ZNKSt6vectorISt10shared_ptrIN3imp5ImageEESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %17) #4
  %19 = icmp eq i64 %18, 0
  br i1 %19, label %24, label %20

20:                                               ; preds = %3
  %21 = getelementptr inbounds %"class.imp::CubeMapSampler", ptr %16, i32 0, i32 1
  %22 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt10shared_ptrIN3imp5ImageEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %21, i64 noundef 0) #4
  %23 = call noundef zeroext i1 @_ZSteqIN3imp5ImageEEbRKSt10shared_ptrIT_EDn(ptr noundef nonnull align 8 dereferenceable(16) %22, ptr null) #4
  br i1 %23, label %24, label %25

24:                                               ; preds = %20, %3
  call void @_ZN3imp4Vec4C2Ef(ptr noundef nonnull align 8 dereferenceable(40) %0, float noundef 1.000000e+00)
  br label %98

25:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 40, ptr %7) #4
  %26 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN3imp4Vec3C2ERKS0_(ptr noundef nonnull align 8 dereferenceable(36) %7, ptr noundef nonnull align 8 dereferenceable(36) %26) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  store i32 0, ptr %8, align 4, !tbaa !9
  br label %27

27:                                               ; preds = %42, %25
  %28 = load i32, ptr %8, align 4, !tbaa !9
  %29 = icmp slt i32 %28, 3
  br i1 %29, label %31, label %30

30:                                               ; preds = %27
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  br label %49

31:                                               ; preds = %27
  %32 = load i32, ptr %8, align 4, !tbaa !9
  %33 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi3EfEixEj(ptr noundef nonnull align 8 dereferenceable(36) %7, i32 noundef %32)
          to label %34 unwind label %45

34:                                               ; preds = %31
  %35 = getelementptr inbounds %"class.imp::CubeMapSampler", ptr %16, i32 0, i32 2
  %36 = load i32, ptr %35, align 8, !tbaa !11
  %37 = invoke noundef float @_ZN3imp13applyWrappingERfNS_7SamplerINS_4Vec3ENS_4Vec4EE8WrappingE(ptr noundef nonnull align 4 dereferenceable(4) %33, i32 noundef %36)
          to label %38 unwind label %45

38:                                               ; preds = %34
  %39 = load i32, ptr %8, align 4, !tbaa !9
  %40 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi3EfEixEj(ptr noundef nonnull align 8 dereferenceable(36) %7, i32 noundef %39)
          to label %41 unwind label %45

41:                                               ; preds = %38
  store float %37, ptr %40, align 4, !tbaa !27
  br label %42

42:                                               ; preds = %41
  %43 = load i32, ptr %8, align 4, !tbaa !9
  %44 = add nsw i32 %43, 1
  store i32 %44, ptr %8, align 4, !tbaa !9
  br label %27, !llvm.loop !29

45:                                               ; preds = %38, %34, %31
  %46 = landingpad { ptr, i32 }
          cleanup
  %47 = extractvalue { ptr, i32 } %46, 0
  store ptr %47, ptr %9, align 8
  %48 = extractvalue { ptr, i32 } %46, 1
  store i32 %48, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  br label %97

49:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 40, ptr %11) #4
  call void @llvm.lifetime.start.p0(i64 40, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 40, ptr %13) #4
  %50 = getelementptr inbounds %"class.imp::CubeMapSampler", ptr %16, i32 0, i32 3
  invoke void @_ZNK3imp3VecILi2EfEcvNS0_IXT_EfEEILi3EEEv(ptr dead_on_unwind writable sret(%"class.imp::Vec.10") align 8 %13, ptr noundef nonnull align 8 dereferenceable(32) %50)
          to label %51 unwind label %59

51:                                               ; preds = %49
  invoke void @_ZNK3imp3VecILi3EfEmlERKS1_(ptr dead_on_unwind writable sret(%"class.imp::Vec.10") align 8 %12, ptr noundef nonnull align 8 dereferenceable(36) %7, ptr noundef nonnull align 8 dereferenceable(36) %13)
          to label %52 unwind label %63

52:                                               ; preds = %51
  invoke void @_ZN3imp4Vec3C2ILi3EEERKNS_3VecIXT_EfEEf(ptr noundef nonnull align 8 dereferenceable(36) %11, ptr noundef nonnull align 8 dereferenceable(36) %12, float noundef 1.000000e+00)
          to label %53 unwind label %67

53:                                               ; preds = %52
  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 @llvm.lifetime.end.p0(i64 40, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 40, ptr %14) #4
  invoke void @_ZN3imp4Vec4C2Ev(ptr noundef nonnull align 8 dereferenceable(40) %14)
          to label %54 unwind label %73

54:                                               ; preds = %53
  %55 = invoke noundef i32 @_ZNK3imp7SamplerINS_4Vec3ENS_4Vec4EE12getFilteringEv(ptr noundef nonnull align 8 dereferenceable(30) %16)
          to label %56 unwind label %77

56:                                               ; preds = %54
  %57 = icmp eq i32 %55, 0
  br i1 %57, label %58, label %81

58:                                               ; preds = %56
  br label %82

59:                                               ; preds = %49
  %60 = landingpad { ptr, i32 }
          cleanup
  %61 = extractvalue { ptr, i32 } %60, 0
  store ptr %61, ptr %9, align 8
  %62 = extractvalue { ptr, i32 } %60, 1
  store i32 %62, ptr %10, align 4
  br label %72

63:                                               ; preds = %51
  %64 = landingpad { ptr, i32 }
          cleanup
  %65 = extractvalue { ptr, i32 } %64, 0
  store ptr %65, ptr %9, align 8
  %66 = extractvalue { ptr, i32 } %64, 1
  store i32 %66, ptr %10, align 4
  br label %71

67:                                               ; preds = %52
  %68 = landingpad { ptr, i32 }
          cleanup
  %69 = extractvalue { ptr, i32 } %68, 0
  store ptr %69, ptr %9, align 8
  %70 = extractvalue { ptr, i32 } %68, 1
  store i32 %70, ptr %10, align 4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %12) #4
  br label %71

71:                                               ; preds = %67, %63
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %13) #4
  br label %72

72:                                               ; preds = %71, %59
  call void @llvm.lifetime.end.p0(i64 40, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr %12) #4
  br label %96

73:                                               ; preds = %53
  %74 = landingpad { ptr, i32 }
          cleanup
  %75 = extractvalue { ptr, i32 } %74, 0
  store ptr %75, ptr %9, align 8
  %76 = extractvalue { ptr, i32 } %74, 1
  store i32 %76, ptr %10, align 4
  br label %95

77:                                               ; preds = %54
  %78 = landingpad { ptr, i32 }
          cleanup
  %79 = extractvalue { ptr, i32 } %78, 0
  store ptr %79, ptr %9, align 8
  %80 = extractvalue { ptr, i32 } %78, 1
  store i32 %80, ptr %10, align 4
  br label %94

81:                                               ; preds = %56
  br label %82

82:                                               ; preds = %81, %58
  call void @llvm.lifetime.start.p0(i64 40, ptr %15) #4
  invoke void @_ZNK3imp3VecILi4EfEdvEf(ptr dead_on_unwind writable sret(%"class.imp::Vec.7") align 8 %15, ptr noundef nonnull align 8 dereferenceable(40) %14, float noundef 2.550000e+02)
          to label %83 unwind label %85

83:                                               ; preds = %82
  invoke void @_ZN3imp4Vec4C2ILi4EEERKNS_3VecIXT_EfEEf(ptr noundef nonnull align 8 dereferenceable(40) %0, ptr noundef nonnull align 8 dereferenceable(40) %15, float noundef 1.000000e+00)
          to label %84 unwind label %89

84:                                               ; preds = %83
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %15) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr %15) #4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %14) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr %14) #4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %11) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr %11) #4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %7) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr %7) #4
  br label %98

85:                                               ; preds = %82
  %86 = landingpad { ptr, i32 }
          cleanup
  %87 = extractvalue { ptr, i32 } %86, 0
  store ptr %87, ptr %9, align 8
  %88 = extractvalue { ptr, i32 } %86, 1
  store i32 %88, ptr %10, align 4
  br label %93

89:                                               ; preds = %83
  %90 = landingpad { ptr, i32 }
          cleanup
  %91 = extractvalue { ptr, i32 } %90, 0
  store ptr %91, ptr %9, align 8
  %92 = extractvalue { ptr, i32 } %90, 1
  store i32 %92, ptr %10, align 4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %15) #4
  br label %93

93:                                               ; preds = %89, %85
  call void @llvm.lifetime.end.p0(i64 40, ptr %15) #4
  br label %94

94:                                               ; preds = %93, %77
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %14) #4
  br label %95

95:                                               ; preds = %94, %73
  call void @llvm.lifetime.end.p0(i64 40, ptr %14) #4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %11) #4
  br label %96

96:                                               ; preds = %95, %72
  call void @llvm.lifetime.end.p0(i64 40, ptr %11) #4
  br label %97

97:                                               ; preds = %96, %45
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %7) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr %7) #4
  br label %99

98:                                               ; preds = %84, %24
  ret void

99:                                               ; preds = %97
  %100 = load ptr, ptr %9, align 8
  %101 = load i32, ptr %10, align 4
  %102 = insertvalue { ptr, i32 } poison, ptr %100, 0
  %103 = insertvalue { ptr, i32 } %102, i32 %101, 1
  resume { ptr, i32 } %103
}

; 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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZN3imp13applyWrappingERfNS_7SamplerINS_4Vec3ENS_4Vec4EE8WrappingE(ptr noundef nonnull align 4 dereferenceable(4), i32 noundef) #2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK3imp3VecILi2EfEcvNS0_IXT_EfEEILi3EEEv(ptr dead_on_unwind noalias writable sret(%"class.imp::Vec.10") align 8, ptr noundef nonnull align 8 dereferenceable(32)) #1 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 #1 align 2

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 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 #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 = !{!"int", !7, i64 0}
!11 = !{!12, !24, i64 56}
!12 = !{!"_ZTSN3imp14CubeMapSamplerE", !13, i64 0, !20, i64 32, !24, i64 56, !25, i64 64}
!13 = !{!"_ZTSN3imp7SamplerINS_4Vec3ENS_4Vec4EEE", !14, i64 0, !18, i64 24, !19, i64 28, !19, i64 29}
!14 = !{!"_ZTSN3imp6ObjectE", !15, i64 8}
!15 = !{!"_ZTSSt10shared_ptrIN3imp6ObjectEE", !16, i64 0}
!16 = !{!"_ZTSSt12__shared_ptrIN3imp6ObjectELN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0, !17, i64 8}
!17 = !{!"_ZTSSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0}
!18 = !{!"_ZTSN3imp7SamplerINS_4Vec3ENS_4Vec4EE9FilteringE", !7, i64 0}
!19 = !{!"bool", !7, i64 0}
!20 = !{!"_ZTSSt6vectorISt10shared_ptrIN3imp5ImageEESaIS3_EE", !21, i64 0}
!21 = !{!"_ZTSSt12_Vector_baseISt10shared_ptrIN3imp5ImageEESaIS3_EE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseISt10shared_ptrIN3imp5ImageEESaIS3_EE12_Vector_implE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseISt10shared_ptrIN3imp5ImageEESaIS3_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!24 = !{!"_ZTSN3imp7SamplerINS_4Vec3ENS_4Vec4EE8WrappingE", !7, i64 0}
!25 = !{!"_ZTSN3imp4Vec2E", !26, i64 0}
!26 = !{!"_ZTSN3imp3VecILi2EfEE", !14, i64 0, !7, i64 24}
!27 = !{!28, !28, i64 0}
!28 = !{!"float", !7, i64 0}
!29 = distinct !{!29, !30}
!30 = !{!"llvm.loop.mustprogress"}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.imp::Vec.7" = type { %"class.imp::Object", [4 x float] }
%"class.imp::Object" = type { ptr, %"class.std::shared_ptr.0" }
%"class.std::shared_ptr.0" = type { %"class.std::__shared_ptr.1" }
%"class.std::__shared_ptr.1" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.imp::Vec4" = type { %"class.imp::Vec.7" }
%"class.imp::Vec3" = type { %"class.imp::Vec.base.11", [4 x i8] }
%"class.imp::Vec.base.11" = type <{ %"class.imp::Object", [3 x float] }>
%"class.imp::Vec.10" = type <{ %"class.imp::Object", [3 x float], [4 x i8] }>

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3imp4Vec4C2ILi4EEERKNS_3VecIXT_EfEEf(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(40), float noundef) unnamed_addr #1 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3imp4Vec4C2Ef(ptr noundef nonnull align 8 dereferenceable(40), float noundef) unnamed_addr #1 align 2

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3imp14CubeMapSampler3getERKNS_4Vec3E(ptr dead_on_unwind noalias writable sret(%"class.imp::Vec4") align 8 %0, ptr noundef nonnull align 8 dereferenceable(96) %1, ptr noundef nonnull align 8 dereferenceable(36) %2) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.imp::Vec3", align 8
  %5 = alloca %"class.imp::Vec3", align 8
  %6 = alloca %"class.imp::Vec.10", align 8
  %7 = alloca %"class.imp::Vec.10", align 8
  %8 = alloca %"class.imp::Vec4", align 8
  %9 = alloca %"class.imp::Vec.7", align 8
  %10 = getelementptr inbounds i8, ptr %1, i64 32
  %11 = tail call noundef i64 @_ZNKSt6vectorISt10shared_ptrIN3imp5ImageEESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %10) #4
  %12 = icmp eq i64 %11, 0
  br i1 %12, label %16, label %13

13:                                               ; preds = %3
  %14 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt10shared_ptrIN3imp5ImageEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef 0) #4
  %15 = tail call noundef zeroext i1 @_ZSteqIN3imp5ImageEEbRKSt10shared_ptrIT_EDn(ptr noundef nonnull align 8 dereferenceable(16) %14, ptr null) #4
  br i1 %15, label %16, label %17

16:                                               ; preds = %13, %3
  tail call void @_ZN3imp4Vec4C2Ef(ptr noundef nonnull align 8 dereferenceable(40) %0, float noundef 1.000000e+00)
  br label %52

17:                                               ; preds = %13
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %4) #4
  call void @_ZN3imp4Vec3C2ERKS0_(ptr noundef nonnull align 8 dereferenceable(36) %4, ptr noundef nonnull align 8 dereferenceable(36) %2) #4
  %18 = getelementptr inbounds i8, ptr %1, i64 56
  %19 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi3EfEixEj(ptr noundef nonnull align 8 dereferenceable(36) %4, i32 noundef 0)
  %20 = load i32, ptr %18, align 8, !tbaa !5
  %21 = call noundef float @_ZN3imp13applyWrappingERfNS_7SamplerINS_4Vec3ENS_4Vec4EE8WrappingE(ptr noundef nonnull align 4 dereferenceable(4) %19, i32 noundef %20)
  %22 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi3EfEixEj(ptr noundef nonnull align 8 dereferenceable(36) %4, i32 noundef 0)
  store float %21, ptr %22, align 4, !tbaa !24
  %23 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi3EfEixEj(ptr noundef nonnull align 8 dereferenceable(36) %4, i32 noundef 1)
  %24 = load i32, ptr %18, align 8, !tbaa !5
  %25 = call noundef float @_ZN3imp13applyWrappingERfNS_7SamplerINS_4Vec3ENS_4Vec4EE8WrappingE(ptr noundef nonnull align 4 dereferenceable(4) %23, i32 noundef %24)
  %26 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi3EfEixEj(ptr noundef nonnull align 8 dereferenceable(36) %4, i32 noundef 1)
  store float %25, ptr %26, align 4, !tbaa !24
  %27 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi3EfEixEj(ptr noundef nonnull align 8 dereferenceable(36) %4, i32 noundef 2)
  %28 = load i32, ptr %18, align 8, !tbaa !5
  %29 = call noundef float @_ZN3imp13applyWrappingERfNS_7SamplerINS_4Vec3ENS_4Vec4EE8WrappingE(ptr noundef nonnull align 4 dereferenceable(4) %27, i32 noundef %28)
  %30 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi3EfEixEj(ptr noundef nonnull align 8 dereferenceable(36) %4, i32 noundef 2)
  store float %29, ptr %30, align 4, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %5) #4
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %6) #4
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %7) #4
  %31 = getelementptr inbounds i8, ptr %1, i64 64
  invoke void @_ZNK3imp3VecILi2EfEcvNS0_IXT_EfEEILi3EEEv(ptr dead_on_unwind nonnull writable sret(%"class.imp::Vec.10") align 8 %7, ptr noundef nonnull align 8 dereferenceable(32) %31)
          to label %32 unwind label %37

32:                                               ; preds = %17
  invoke void @_ZNK3imp3VecILi3EfEmlERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.imp::Vec.10") align 8 %6, ptr noundef nonnull align 8 dereferenceable(36) %4, ptr noundef nonnull align 8 dereferenceable(36) %7)
          to label %33 unwind label %39

33:                                               ; preds = %32
  invoke void @_ZN3imp4Vec3C2ILi3EEERKNS_3VecIXT_EfEEf(ptr noundef nonnull align 8 dereferenceable(36) %5, ptr noundef nonnull align 8 dereferenceable(36) %6, float noundef 1.000000e+00)
          to label %34 unwind label %41

34:                                               ; preds = %33
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %6) #4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %7) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %6) #4
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %8) #4
  invoke void @_ZN3imp4Vec4C2Ev(ptr noundef nonnull align 8 dereferenceable(40) %8)
          to label %35 unwind label %45

35:                                               ; preds = %34
  %36 = call noundef i32 @_ZNK3imp7SamplerINS_4Vec3ENS_4Vec4EE12getFilteringEv(ptr noundef nonnull align 8 dereferenceable(30) %1)
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %9) #4
  call void @_ZNK3imp3VecILi4EfEdvEf(ptr dead_on_unwind nonnull writable sret(%"class.imp::Vec.7") align 8 %9, ptr noundef nonnull align 8 dereferenceable(40) %8, float noundef 2.550000e+02)
  invoke void @_ZN3imp4Vec4C2ILi4EEERKNS_3VecIXT_EfEEf(ptr noundef nonnull align 8 dereferenceable(40) %0, ptr noundef nonnull align 8 dereferenceable(40) %9, float noundef 1.000000e+00)
          to label %47 unwind label %48

37:                                               ; preds = %17
  %38 = landingpad { ptr, i32 }
          cleanup
  br label %44

39:                                               ; preds = %32
  %40 = landingpad { ptr, i32 }
          cleanup
  br label %43

41:                                               ; preds = %33
  %42 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %6) #4
  br label %43

43:                                               ; preds = %41, %39
  %.pn = phi { ptr, i32 } [ %42, %41 ], [ %40, %39 ]
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %7) #4
  br label %44

44:                                               ; preds = %43, %37
  %.pn.pn = phi { ptr, i32 } [ %.pn, %43 ], [ %38, %37 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %6) #4
  br label %51

45:                                               ; preds = %34
  %46 = landingpad { ptr, i32 }
          cleanup
  br label %50

47:                                               ; preds = %35
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %9) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %9) #4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %8) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %8) #4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %5) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %5) #4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %4) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %4) #4
  br label %52

48:                                               ; preds = %35
  %49 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %9) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %9) #4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %8) #4
  br label %50

50:                                               ; preds = %48, %45
  %.pn14 = phi { ptr, i32 } [ %49, %48 ], [ %46, %45 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %8) #4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %5) #4
  br label %51

51:                                               ; preds = %50, %44
  %.pn14.pn = phi { ptr, i32 } [ %.pn14, %50 ], [ %.pn.pn, %44 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %5) #4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %4) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %4) #4
  resume { ptr, i32 } %.pn14.pn

52:                                               ; preds = %47, %16
  ret void
}

; 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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZN3imp13applyWrappingERfNS_7SamplerINS_4Vec3ENS_4Vec4EE8WrappingE(ptr noundef nonnull align 4 dereferenceable(4), i32 noundef) local_unnamed_addr #2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK3imp3VecILi2EfEcvNS0_IXT_EfEEILi3EEEv(ptr dead_on_unwind noalias writable sret(%"class.imp::Vec.10") align 8, ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #1 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 #1 align 2

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 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 #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, !21, i64 56}
!6 = !{!"_ZTSN3imp14CubeMapSamplerE", !7, i64 0, !17, i64 32, !21, i64 56, !22, i64 64}
!7 = !{!"_ZTSN3imp7SamplerINS_4Vec3ENS_4Vec4EEE", !8, i64 0, !15, i64 24, !16, i64 28, !16, i64 29}
!8 = !{!"_ZTSN3imp6ObjectE", !9, i64 8}
!9 = !{!"_ZTSSt10shared_ptrIN3imp6ObjectEE", !10, i64 0}
!10 = !{!"_ZTSSt12__shared_ptrIN3imp6ObjectELN9__gnu_cxx12_Lock_policyE2EE", !11, i64 0, !14, i64 8}
!11 = !{!"any pointer", !12, i64 0}
!12 = !{!"omnipotent char", !13, i64 0}
!13 = !{!"Simple C++ TBAA"}
!14 = !{!"_ZTSSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EE", !11, i64 0}
!15 = !{!"_ZTSN3imp7SamplerINS_4Vec3ENS_4Vec4EE9FilteringE", !12, i64 0}
!16 = !{!"bool", !12, i64 0}
!17 = !{!"_ZTSSt6vectorISt10shared_ptrIN3imp5ImageEESaIS3_EE", !18, i64 0}
!18 = !{!"_ZTSSt12_Vector_baseISt10shared_ptrIN3imp5ImageEESaIS3_EE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseISt10shared_ptrIN3imp5ImageEESaIS3_EE12_Vector_implE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseISt10shared_ptrIN3imp5ImageEESaIS3_EE17_Vector_impl_dataE", !11, i64 0, !11, i64 8, !11, i64 16}
!21 = !{!"_ZTSN3imp7SamplerINS_4Vec3ENS_4Vec4EE8WrappingE", !12, i64 0}
!22 = !{!"_ZTSN3imp4Vec2E", !23, i64 0}
!23 = !{!"_ZTSN3imp3VecILi2EfEE", !8, i64 0, !12, i64 24}
!24 = !{!25, !25, i64 0}
!25 = !{!"float", !12, i64 0}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,LICMPass,LoopRotatePass,SROAPass,SimplifyCFGPass,TailCallElimPass