; LLVM IR from Lut1n/ImpGears :: src/ImpGears/Graphics (ImageOperation)

; 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.8" = type <{ %"class.imp::Object", [3 x float], [4 x i8] }>
%"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::Vec.7" = type { %"class.imp::Object", [4 x float] }
%"class.imp::Vec3" = type { %"class.imp::Vec.base.9", [4 x i8] }
%"class.imp::Vec.base.9" = type <{ %"class.imp::Object", [3 x float] }>
%"class.imp::ImageSampler" = type <{ %"class.imp::Sampler.base", [2 x i8], %"class.std::shared_ptr", i32, [4 x i8], %"class.imp::Vec2", i8, [7 x i8] }>
%"class.imp::Sampler.base" = type <{ %"class.imp::Object", i32, i8, i8 }>
%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.imp::Vec2" = type { %"class.imp::Vec" }
%"class.imp::Vec" = type { %"class.imp::Object", [2 x float] }
%"struct.imp::SignalOperation" = type <{ %"struct.imp::ImageOperation", %"class.imp::Vec3", float, float, float, float, float, [4 x i8], %"class.std::shared_ptr", i32, [4 x i8] }>
%"struct.imp::ImageOperation" = type { %"class.imp::Object" }

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt10shared_ptrIN3imp5ImageEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #1 align 2

declare void @_ZN3imp12ImageSamplerC1ESt10shared_ptrINS_5ImageEENS_7SamplerINS_4Vec2ENS_4Vec4EE8WrappingE(ptr noundef nonnull align 8 dereferenceable(89), ptr noundef, i32 noundef) unnamed_addr #2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt12__shared_ptrIN3imp5ImageELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16)) 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: mustprogress nounwind uwtable
declare dso_local void @_ZN3imp12ImageSamplerD2Ev(ptr noundef nonnull align 8 dereferenceable(89)) unnamed_addr #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK3imp3VecILi2EfEixEj(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) #1 align 2

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

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

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

declare void @_ZN3imp12ImageSamplerclERKNS_4Vec2E(ptr dead_on_unwind writable sret(%"class.imp::Vec4") align 8, ptr noundef nonnull align 8 dereferenceable(89), ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi4EfEixEj(ptr noundef nonnull align 8 dereferenceable(40), i32 noundef) #1 align 2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #4

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3imp15SignalOperation5applyERKNS_4Vec2ERNS_4Vec4E(ptr noundef nonnull align 8 dereferenceable(108) %0, ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(40) %2) unnamed_addr #3 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 float, align 4
  %9 = alloca %"class.imp::ImageSampler", align 8
  %10 = alloca %"class.std::shared_ptr", align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca %"class.imp::Vec4", align 8
  %14 = alloca %"class.imp::Vec2", align 8
  %15 = alloca float, align 4
  %16 = alloca %"class.imp::Vec.8", align 8
  %17 = alloca float, align 4
  %18 = alloca float, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %19 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 40, ptr %7) #7
  %20 = load ptr, ptr %5, align 8, !tbaa !5
  %21 = call noundef float @_ZNK3imp3VecILi2EfEixEj(ptr noundef nonnull align 8 dereferenceable(32) %20, i32 noundef 0)
  %22 = load ptr, ptr %5, align 8, !tbaa !5
  %23 = call noundef float @_ZNK3imp3VecILi2EfEixEj(ptr noundef nonnull align 8 dereferenceable(32) %22, i32 noundef 1)
  call void @_ZN3imp4Vec3C2Efff(ptr noundef nonnull align 8 dereferenceable(36) %7, float noundef %21, float noundef %23, float noundef 0.000000e+00)
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  store float 0.000000e+00, ptr %8, align 4, !tbaa !9
  %24 = getelementptr inbounds %"struct.imp::SignalOperation", ptr %19, i32 0, i32 8
  %25 = call noundef zeroext i1 @_ZStneIN3imp5ImageEEbRKSt10shared_ptrIT_EDn(ptr noundef nonnull align 8 dereferenceable(16) %24, ptr null) #7
  br i1 %25, label %26, label %60

26:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 96, ptr %9) #7
  %27 = getelementptr inbounds %"struct.imp::SignalOperation", ptr %19, i32 0, i32 8
  call void @_ZNSt10shared_ptrIN3imp5ImageEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 8 dereferenceable(16) %27) #7
  invoke void @_ZN3imp12ImageSamplerC1ESt10shared_ptrINS_5ImageEENS_7SamplerINS_4Vec2ENS_4Vec4EE8WrappingE(ptr noundef nonnull align 8 dereferenceable(89) %9, ptr noundef %10, i32 noundef 0)
          to label %28 unwind label %41

28:                                               ; preds = %26
  call void @_ZNSt12__shared_ptrIN3imp5ImageELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %10) #7
  call void @llvm.lifetime.start.p0(i64 40, ptr %13) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %14) #7
  invoke void @_ZN3imp4Vec2C2ILi3EEERKNS_3VecIXT_EfEEf(ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef nonnull align 8 dereferenceable(36) %7, float noundef 1.000000e+00)
          to label %29 unwind label %45

29:                                               ; preds = %28
  invoke void @_ZN3imp12ImageSamplerclERKNS_4Vec2E(ptr dead_on_unwind writable sret(%"class.imp::Vec4") align 8 %13, ptr noundef nonnull align 8 dereferenceable(89) %9, ptr noundef nonnull align 8 dereferenceable(32) %14)
          to label %30 unwind label %49

30:                                               ; preds = %29
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #7
  %31 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi4EfEixEj(ptr noundef nonnull align 8 dereferenceable(40) %13, i32 noundef 0)
          to label %32 unwind label %54

32:                                               ; preds = %30
  %33 = load float, ptr %31, align 4, !tbaa !9
  %34 = fpext float %33 to double
  %35 = call double @llvm.fmuladd.f64(double %34, double 2.000000e+00, double -1.000000e+00)
  %36 = getelementptr inbounds %"struct.imp::SignalOperation", ptr %19, i32 0, i32 6
  %37 = load float, ptr %36, align 8, !tbaa !11
  %38 = fpext float %37 to double
  %39 = fmul double %35, %38
  %40 = fptrunc double %39 to float
  store float %40, ptr %8, align 4, !tbaa !9
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %13) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr %13) #7
  call void @_ZN3imp12ImageSamplerD2Ev(ptr noundef nonnull align 8 dereferenceable(89) %9) #7
  call void @llvm.lifetime.end.p0(i64 96, ptr %9) #7
  br label %60

41:                                               ; preds = %26
  %42 = landingpad { ptr, i32 }
          cleanup
  %43 = extractvalue { ptr, i32 } %42, 0
  store ptr %43, ptr %11, align 8
  %44 = extractvalue { ptr, i32 } %42, 1
  store i32 %44, ptr %12, align 4
  call void @_ZNSt12__shared_ptrIN3imp5ImageELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %10) #7
  br label %59

45:                                               ; preds = %28
  %46 = landingpad { ptr, i32 }
          cleanup
  %47 = extractvalue { ptr, i32 } %46, 0
  store ptr %47, ptr %11, align 8
  %48 = extractvalue { ptr, i32 } %46, 1
  store i32 %48, ptr %12, align 4
  br label %53

49:                                               ; preds = %29
  %50 = landingpad { ptr, i32 }
          cleanup
  %51 = extractvalue { ptr, i32 } %50, 0
  store ptr %51, ptr %11, align 8
  %52 = extractvalue { ptr, i32 } %50, 1
  store i32 %52, ptr %12, align 4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #7
  br label %53

53:                                               ; preds = %49, %45
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #7
  br label %58

54:                                               ; preds = %30
  %55 = landingpad { ptr, i32 }
          cleanup
  %56 = extractvalue { ptr, i32 } %55, 0
  store ptr %56, ptr %11, align 8
  %57 = extractvalue { ptr, i32 } %55, 1
  store i32 %57, ptr %12, align 4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %13) #7
  br label %58

58:                                               ; preds = %54, %53
  call void @llvm.lifetime.end.p0(i64 40, ptr %13) #7
  call void @_ZN3imp12ImageSamplerD2Ev(ptr noundef nonnull align 8 dereferenceable(89) %9) #7
  br label %59

59:                                               ; preds = %58, %41
  call void @llvm.lifetime.end.p0(i64 96, ptr %9) #7
  br label %122

60:                                               ; preds = %32, %3
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  store float 0.000000e+00, ptr %15, align 4, !tbaa !9
  %61 = getelementptr inbounds %"struct.imp::SignalOperation", ptr %19, i32 0, i32 9
  %62 = load i32, ptr %61, align 8, !tbaa !23
  %63 = icmp eq i32 %62, 0
  br i1 %63, label %64, label %72

64:                                               ; preds = %60
  %65 = getelementptr inbounds %"struct.imp::SignalOperation", ptr %19, i32 0, i32 1
  %66 = invoke noundef float @_ZNK3imp3VecILi3EfE3dotERKS1_(ptr noundef nonnull align 8 dereferenceable(36) %7, ptr noundef nonnull align 8 dereferenceable(36) %65)
          to label %67 unwind label %68

67:                                               ; preds = %64
  store float %66, ptr %15, align 4, !tbaa !9
  br label %72

68:                                               ; preds = %64
  %69 = landingpad { ptr, i32 }
          cleanup
  %70 = extractvalue { ptr, i32 } %69, 0
  store ptr %70, ptr %11, align 8
  %71 = extractvalue { ptr, i32 } %69, 1
  store i32 %71, ptr %12, align 4
  br label %121

72:                                               ; preds = %67, %60
  %73 = getelementptr inbounds %"struct.imp::SignalOperation", ptr %19, i32 0, i32 9
  %74 = load i32, ptr %73, align 8, !tbaa !23
  %75 = icmp eq i32 %74, 1
  br i1 %75, label %76, label %90

76:                                               ; preds = %72
  call void @llvm.lifetime.start.p0(i64 40, ptr %16) #7
  %77 = getelementptr inbounds %"struct.imp::SignalOperation", ptr %19, i32 0, i32 1
  invoke void @_ZNK3imp3VecILi3EfEmiERKS1_(ptr dead_on_unwind writable sret(%"class.imp::Vec.8") align 8 %16, ptr noundef nonnull align 8 dereferenceable(36) %7, ptr noundef nonnull align 8 dereferenceable(36) %77)
          to label %78 unwind label %81

78:                                               ; preds = %76
  %79 = invoke noundef float @_ZNK3imp3VecILi3EfE6lengthEv(ptr noundef nonnull align 8 dereferenceable(36) %16)
          to label %80 unwind label %85

80:                                               ; preds = %78
  store float %79, ptr %15, align 4, !tbaa !9
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %16) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr %16) #7
  br label %90

81:                                               ; preds = %76
  %82 = landingpad { ptr, i32 }
          cleanup
  %83 = extractvalue { ptr, i32 } %82, 0
  store ptr %83, ptr %11, align 8
  %84 = extractvalue { ptr, i32 } %82, 1
  store i32 %84, ptr %12, align 4
  br label %89

85:                                               ; preds = %78
  %86 = landingpad { ptr, i32 }
          cleanup
  %87 = extractvalue { ptr, i32 } %86, 0
  store ptr %87, ptr %11, align 8
  %88 = extractvalue { ptr, i32 } %86, 1
  store i32 %88, ptr %12, align 4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %16) #7
  br label %89

89:                                               ; preds = %85, %81
  call void @llvm.lifetime.end.p0(i64 40, ptr %16) #7
  br label %121

90:                                               ; preds = %80, %72
  %91 = load float, ptr %8, align 4, !tbaa !9
  %92 = load float, ptr %15, align 4, !tbaa !9
  %93 = fadd float %92, %91
  store float %93, ptr %15, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  %94 = load float, ptr %15, align 4, !tbaa !9
  %95 = getelementptr inbounds %"struct.imp::SignalOperation", ptr %19, i32 0, i32 2
  %96 = load float, ptr %95, align 8, !tbaa !24
  %97 = getelementptr inbounds %"struct.imp::SignalOperation", ptr %19, i32 0, i32 4
  %98 = load float, ptr %97, align 8, !tbaa !25
  %99 = call float @llvm.fmuladd.f32(float %94, float %96, float %98)
  store float %99, ptr %17, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  %100 = getelementptr inbounds %"struct.imp::SignalOperation", ptr %19, i32 0, i32 5
  %101 = load float, ptr %100, align 4, !tbaa !26
  %102 = fpext float %101 to double
  %103 = load float, ptr %17, align 4, !tbaa !9
  %104 = fpext float %103 to double
  %105 = fmul double %104, 0x400921FAFC8B007A
  %106 = call double @sin(double noundef %105) #7
  %107 = getelementptr inbounds %"struct.imp::SignalOperation", ptr %19, i32 0, i32 3
  %108 = load float, ptr %107, align 4, !tbaa !27
  %109 = fpext float %108 to double
  %110 = call double @llvm.fmuladd.f64(double %106, double %109, double %102)
  %111 = fptrunc double %110 to float
  store float %111, ptr %18, align 4, !tbaa !9
  %112 = load ptr, ptr %6, align 8, !tbaa !5
  %113 = load float, ptr %18, align 4, !tbaa !9
  %114 = load float, ptr %18, align 4, !tbaa !9
  %115 = load float, ptr %18, align 4, !tbaa !9
  invoke void @_ZN3imp4Vec43setEffff(ptr noundef nonnull align 8 dereferenceable(40) %112, float noundef %113, float noundef %114, float noundef %115, float noundef 1.000000e+00)
          to label %116 unwind label %117

116:                                              ; preds = %90
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %7) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr %7) #7
  ret void

117:                                              ; preds = %90
  %118 = landingpad { ptr, i32 }
          cleanup
  %119 = extractvalue { ptr, i32 } %118, 0
  store ptr %119, ptr %11, align 8
  %120 = extractvalue { ptr, i32 } %118, 1
  store i32 %120, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  br label %121

121:                                              ; preds = %117, %89, %68
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  br label %122

122:                                              ; preds = %121, %59
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %7) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr %7) #7
  br label %123

123:                                              ; preds = %122
  %124 = load ptr, ptr %11, align 8
  %125 = load i32, ptr %12, align 4
  %126 = insertvalue { ptr, i32 } poison, ptr %124, 0
  %127 = insertvalue { ptr, i32 } %126, i32 %125, 1
  resume { ptr, i32 } %127
}

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #4

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

; Function Attrs: nounwind
declare double @sin(double noundef) #6

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { "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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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 #6 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { 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 = !{!"float", !7, i64 0}
!11 = !{!12, !10, i64 80}
!12 = !{!"_ZTSN3imp15SignalOperationE", !13, i64 0, !18, i64 24, !10, i64 64, !10, i64 68, !10, i64 72, !10, i64 76, !10, i64 80, !20, i64 88, !22, i64 104}
!13 = !{!"_ZTSN3imp14ImageOperationE", !14, i64 0}
!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 = !{!"_ZTSN3imp4Vec3E", !19, i64 0}
!19 = !{!"_ZTSN3imp3VecILi3EfEE", !14, i64 0, !7, i64 24}
!20 = !{!"_ZTSSt10shared_ptrIN3imp5ImageEE", !21, i64 0}
!21 = !{!"_ZTSSt12__shared_ptrIN3imp5ImageELN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0, !17, i64 8}
!22 = !{!"int", !7, i64 0}
!23 = !{!12, !22, i64 104}
!24 = !{!12, !10, i64 64}
!25 = !{!12, !10, i64 72}
!26 = !{!12, !10, i64 76}
!27 = !{!12, !10, i64 68}


; 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.8" = type <{ %"class.imp::Object", [3 x float], [4 x i8] }>
%"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::Vec.7" = type { %"class.imp::Object", [4 x float] }
%"class.imp::Vec3" = type { %"class.imp::Vec.base.9", [4 x i8] }
%"class.imp::Vec.base.9" = type <{ %"class.imp::Object", [3 x float] }>
%"class.imp::ImageSampler" = type <{ %"class.imp::Sampler.base", [2 x i8], %"class.std::shared_ptr", i32, [4 x i8], %"class.imp::Vec2", i8, [7 x i8] }>
%"class.imp::Sampler.base" = type <{ %"class.imp::Object", i32, i8, i8 }>
%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.imp::Vec2" = type { %"class.imp::Vec" }
%"class.imp::Vec" = type { %"class.imp::Object", [2 x float] }

; 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 nounwind uwtable
declare dso_local void @_ZNSt10shared_ptrIN3imp5ImageEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #1 align 2

declare void @_ZN3imp12ImageSamplerC1ESt10shared_ptrINS_5ImageEENS_7SamplerINS_4Vec2ENS_4Vec4EE8WrappingE(ptr noundef nonnull align 8 dereferenceable(89), ptr noundef, i32 noundef) unnamed_addr #2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt12__shared_ptrIN3imp5ImageELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16)) 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: mustprogress nounwind uwtable
declare dso_local void @_ZN3imp12ImageSamplerD2Ev(ptr noundef nonnull align 8 dereferenceable(89)) unnamed_addr #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK3imp3VecILi2EfEixEj(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3imp4Vec43setEffff(ptr noundef nonnull align 8 dereferenceable(40), float noundef, float noundef, float noundef, float noundef) local_unnamed_addr #3 align 2

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

declare void @_ZN3imp12ImageSamplerclERKNS_4Vec2E(ptr dead_on_unwind writable sret(%"class.imp::Vec4") align 8, ptr noundef nonnull align 8 dereferenceable(89), ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2

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

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #4

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3imp15SignalOperation5applyERKNS_4Vec2ERNS_4Vec4E(ptr noundef nonnull align 8 dereferenceable(108) %0, ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(40) %2) unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.imp::Vec3", align 8
  %5 = alloca %"class.imp::ImageSampler", align 8
  %6 = alloca %"class.std::shared_ptr", align 8
  %7 = alloca %"class.imp::Vec4", align 8
  %8 = alloca %"class.imp::Vec2", align 8
  %9 = alloca %"class.imp::Vec.8", align 8
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %4) #7
  %10 = tail call noundef float @_ZNK3imp3VecILi2EfEixEj(ptr noundef nonnull align 8 dereferenceable(32) %1, i32 noundef 0)
  %11 = tail call noundef float @_ZNK3imp3VecILi2EfEixEj(ptr noundef nonnull align 8 dereferenceable(32) %1, i32 noundef 1)
  call void @_ZN3imp4Vec3C2Efff(ptr noundef nonnull align 8 dereferenceable(36) %4, float noundef %10, float noundef %11, float noundef 0.000000e+00)
  %12 = getelementptr inbounds i8, ptr %0, i64 88
  %13 = call noundef zeroext i1 @_ZStneIN3imp5ImageEEbRKSt10shared_ptrIT_EDn(ptr noundef nonnull align 8 dereferenceable(16) %12, ptr null) #7
  br i1 %13, label %14, label %35

14:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 96, ptr nonnull %5) #7
  call void @_ZNSt10shared_ptrIN3imp5ImageEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(16) %12) #7
  invoke void @_ZN3imp12ImageSamplerC1ESt10shared_ptrINS_5ImageEENS_7SamplerINS_4Vec2ENS_4Vec4EE8WrappingE(ptr noundef nonnull align 8 dereferenceable(89) %5, ptr noundef nonnull %6, i32 noundef 0)
          to label %15 unwind label %27

15:                                               ; preds = %14
  call void @_ZNSt12__shared_ptrIN3imp5ImageELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #7
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %7) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #7
  invoke void @_ZN3imp4Vec2C2ILi3EEERKNS_3VecIXT_EfEEf(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull align 8 dereferenceable(36) %4, float noundef 1.000000e+00)
          to label %16 unwind label %29

16:                                               ; preds = %15
  invoke void @_ZN3imp12ImageSamplerclERKNS_4Vec2E(ptr dead_on_unwind nonnull writable sret(%"class.imp::Vec4") align 8 %7, ptr noundef nonnull align 8 dereferenceable(89) %5, ptr noundef nonnull align 8 dereferenceable(32) %8)
          to label %17 unwind label %31

17:                                               ; preds = %16
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #7
  %18 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi4EfEixEj(ptr noundef nonnull align 8 dereferenceable(40) %7, i32 noundef 0)
  %19 = load float, ptr %18, align 4, !tbaa !5
  %20 = fpext float %19 to double
  %21 = call double @llvm.fmuladd.f64(double %20, double 2.000000e+00, double -1.000000e+00)
  %22 = getelementptr inbounds i8, ptr %0, i64 80
  %23 = load float, ptr %22, align 8, !tbaa !9
  %24 = fpext float %23 to double
  %25 = fmul double %21, %24
  %26 = fptrunc double %25 to float
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %7) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %7) #7
  call void @_ZN3imp12ImageSamplerD2Ev(ptr noundef nonnull align 8 dereferenceable(89) %5) #7
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %5) #7
  br label %35

27:                                               ; preds = %14
  %28 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt12__shared_ptrIN3imp5ImageELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #7
  br label %34

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

31:                                               ; preds = %16
  %32 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #7
  br label %33

33:                                               ; preds = %31, %29
  %.pn = phi { ptr, i32 } [ %32, %31 ], [ %30, %29 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %7) #7
  call void @_ZN3imp12ImageSamplerD2Ev(ptr noundef nonnull align 8 dereferenceable(89) %5) #7
  br label %34

34:                                               ; preds = %33, %27
  %.pn.pn = phi { ptr, i32 } [ %.pn, %33 ], [ %28, %27 ]
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %5) #7
  br label %78

35:                                               ; preds = %17, %3
  %.0 = phi float [ %26, %17 ], [ 0.000000e+00, %3 ]
  %36 = getelementptr inbounds i8, ptr %0, i64 104
  %37 = load i32, ptr %36, align 8, !tbaa !22
  %38 = icmp eq i32 %37, 0
  br i1 %38, label %39, label %44

39:                                               ; preds = %35
  %40 = getelementptr inbounds i8, ptr %0, i64 24
  %41 = invoke noundef float @_ZNK3imp3VecILi3EfE3dotERKS1_(ptr noundef nonnull align 8 dereferenceable(36) %4, ptr noundef nonnull align 8 dereferenceable(36) %40)
          to label %thread-pre-split unwind label %42

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

thread-pre-split:                                 ; preds = %39
  %.pr = load i32, ptr %36, align 8, !tbaa !22
  br label %44

44:                                               ; preds = %thread-pre-split, %35
  %45 = phi i32 [ %.pr, %thread-pre-split ], [ %37, %35 ]
  %.013 = phi float [ %41, %thread-pre-split ], [ 0.000000e+00, %35 ]
  %46 = icmp eq i32 %45, 1
  br i1 %46, label %47, label %57

47:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %9) #7
  %48 = getelementptr inbounds i8, ptr %0, i64 24
  invoke void @_ZNK3imp3VecILi3EfEmiERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.imp::Vec.8") align 8 %9, ptr noundef nonnull align 8 dereferenceable(36) %4, ptr noundef nonnull align 8 dereferenceable(36) %48)
          to label %49 unwind label %52

49:                                               ; preds = %47
  %50 = invoke noundef float @_ZNK3imp3VecILi3EfE6lengthEv(ptr noundef nonnull align 8 dereferenceable(36) %9)
          to label %51 unwind label %54

51:                                               ; preds = %49
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %9) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %9) #7
  br label %57

52:                                               ; preds = %47
  %53 = landingpad { ptr, i32 }
          cleanup
  br label %56

54:                                               ; preds = %49
  %55 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %9) #7
  br label %56

56:                                               ; preds = %54, %52
  %.pn22 = phi { ptr, i32 } [ %55, %54 ], [ %53, %52 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %9) #7
  br label %78

57:                                               ; preds = %51, %44
  %.114 = phi float [ %50, %51 ], [ %.013, %44 ]
  %58 = fadd float %.0, %.114
  %59 = getelementptr inbounds i8, ptr %0, i64 64
  %60 = load float, ptr %59, align 8, !tbaa !23
  %61 = getelementptr inbounds i8, ptr %0, i64 72
  %62 = load float, ptr %61, align 8, !tbaa !24
  %63 = call float @llvm.fmuladd.f32(float %58, float %60, float %62)
  %64 = getelementptr inbounds i8, ptr %0, i64 76
  %65 = load float, ptr %64, align 4, !tbaa !25
  %66 = fpext float %65 to double
  %67 = fpext float %63 to double
  %68 = fmul double %67, 0x400921FAFC8B007A
  %69 = call double @sin(double noundef %68) #7
  %70 = getelementptr inbounds i8, ptr %0, i64 68
  %71 = load float, ptr %70, align 4, !tbaa !26
  %72 = fpext float %71 to double
  %73 = call double @llvm.fmuladd.f64(double %69, double %72, double %66)
  %74 = fptrunc double %73 to float
  invoke void @_ZN3imp4Vec43setEffff(ptr noundef nonnull align 8 dereferenceable(40) %2, float noundef %74, float noundef %74, float noundef %74, float noundef 1.000000e+00)
          to label %75 unwind label %76

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

76:                                               ; preds = %57
  %77 = landingpad { ptr, i32 }
          cleanup
  br label %78

78:                                               ; preds = %42, %56, %76, %34
  %.pn24.pn = phi { ptr, i32 } [ %.pn.pn, %34 ], [ %77, %76 ], [ %.pn22, %56 ], [ %43, %42 ]
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %4) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %4) #7
  resume { ptr, i32 } %.pn24.pn
}

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #4

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @sin(double noundef) local_unnamed_addr #6

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

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

!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 = !{!"float", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 80}
!10 = !{!"_ZTSN3imp15SignalOperationE", !11, i64 0, !17, i64 24, !6, i64 64, !6, i64 68, !6, i64 72, !6, i64 76, !6, i64 80, !19, i64 88, !21, i64 104}
!11 = !{!"_ZTSN3imp14ImageOperationE", !12, i64 0}
!12 = !{!"_ZTSN3imp6ObjectE", !13, i64 8}
!13 = !{!"_ZTSSt10shared_ptrIN3imp6ObjectEE", !14, i64 0}
!14 = !{!"_ZTSSt12__shared_ptrIN3imp6ObjectELN9__gnu_cxx12_Lock_policyE2EE", !15, i64 0, !16, i64 8}
!15 = !{!"any pointer", !7, i64 0}
!16 = !{!"_ZTSSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EE", !15, i64 0}
!17 = !{!"_ZTSN3imp4Vec3E", !18, i64 0}
!18 = !{!"_ZTSN3imp3VecILi3EfEE", !12, i64 0, !7, i64 24}
!19 = !{!"_ZTSSt10shared_ptrIN3imp5ImageEE", !20, i64 0}
!20 = !{!"_ZTSSt12__shared_ptrIN3imp5ImageELN9__gnu_cxx12_Lock_policyE2EE", !15, i64 0, !16, i64 8}
!21 = !{!"int", !7, i64 0}
!22 = !{!10, !21, i64 104}
!23 = !{!10, !6, i64 64}
!24 = !{!10, !6, i64 72}
!25 = !{!10, !6, i64 76}
!26 = !{!10, !6, i64 68}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass