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

; 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::Vec4" = type { %"class.imp::Vec.7" }
%"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::Vec2" = type { %"class.imp::Vec" }
%"class.imp::Vec" = type { %"class.imp::Object", [2 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" }

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

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) #1

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

; 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 #0 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3imp12ImageSampler3getERKNS_4Vec2E(ptr dead_on_unwind noalias writable sret(%"class.imp::Vec4") align 8 %0, ptr noundef nonnull align 8 dereferenceable(89) %1, ptr noundef nonnull align 8 dereferenceable(32) %2) #0 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::Vec2", align 8
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca %"class.imp::Vec2", align 8
  %12 = alloca %"class.imp::Vec", align 8
  %13 = alloca %"class.imp::Vec4", align 8
  %14 = alloca %"class.imp::Vec4", align 8
  %15 = alloca %"class.imp::Vec2", align 8
  %16 = alloca %"class.imp::Vec2", align 8
  %17 = alloca i32, align 4
  %18 = alloca %"class.imp::Vec4", align 8
  %19 = alloca %"class.imp::Vec4", align 8
  %20 = alloca %"class.imp::Vec4", align 8
  %21 = alloca %"class.imp::Vec4", align 8
  %22 = alloca i32, align 4
  %23 = alloca %"class.imp::Vec4", align 8
  %24 = alloca %"class.imp::Vec4", align 8
  %25 = alloca %"class.imp::Vec4", align 8
  %26 = alloca %"class.imp::Vec4", align 8
  %27 = alloca %"class.imp::Vec4", align 8
  %28 = 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
  %29 = load ptr, ptr %5, align 8
  %30 = getelementptr inbounds %"class.imp::ImageSampler", ptr %29, i32 0, i32 2
  %31 = call noundef zeroext i1 @_ZSteqIN3imp5ImageEEbRKSt10shared_ptrIT_EDn(ptr noundef nonnull align 8 dereferenceable(16) %30, ptr null) #6
  br i1 %31, label %32, label %33

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

33:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 32, ptr %7) #6
  %34 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN3imp4Vec2C2ERKS0_(ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull align 8 dereferenceable(32) %34) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  store i32 0, ptr %8, align 4, !tbaa !9
  br label %35

35:                                               ; preds = %50, %33
  %36 = load i32, ptr %8, align 4, !tbaa !9
  %37 = icmp slt i32 %36, 2
  br i1 %37, label %39, label %38

38:                                               ; preds = %35
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  br label %57

39:                                               ; preds = %35
  %40 = load i32, ptr %8, align 4, !tbaa !9
  %41 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi2EfEixEj(ptr noundef nonnull align 8 dereferenceable(32) %7, i32 noundef %40)
          to label %42 unwind label %53

42:                                               ; preds = %39
  %43 = getelementptr inbounds %"class.imp::ImageSampler", ptr %29, i32 0, i32 3
  %44 = load i32, ptr %43, align 8, !tbaa !11
  %45 = invoke noundef float @_ZN3imp13applyWrappingERfNS_7SamplerINS_4Vec2ENS_4Vec4EE8WrappingE(ptr noundef nonnull align 4 dereferenceable(4) %41, i32 noundef %44)
          to label %46 unwind label %53

46:                                               ; preds = %42
  %47 = load i32, ptr %8, align 4, !tbaa !9
  %48 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi2EfEixEj(ptr noundef nonnull align 8 dereferenceable(32) %7, i32 noundef %47)
          to label %49 unwind label %53

49:                                               ; preds = %46
  store float %45, ptr %48, align 4, !tbaa !25
  br label %50

50:                                               ; preds = %49
  %51 = load i32, ptr %8, align 4, !tbaa !9
  %52 = add nsw i32 %51, 1
  store i32 %52, ptr %8, align 4, !tbaa !9
  br label %35, !llvm.loop !27

53:                                               ; preds = %46, %42, %39
  %54 = landingpad { ptr, i32 }
          cleanup
  %55 = extractvalue { ptr, i32 } %54, 0
  store ptr %55, ptr %9, align 8
  %56 = extractvalue { ptr, i32 } %54, 1
  store i32 %56, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  br label %287

57:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 32, ptr %11) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %12) #6
  %58 = getelementptr inbounds %"class.imp::ImageSampler", ptr %29, i32 0, i32 5
  invoke void @_ZNK3imp3VecILi2EfEmlERKS1_(ptr dead_on_unwind writable sret(%"class.imp::Vec") align 8 %12, ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull align 8 dereferenceable(32) %58)
          to label %59 unwind label %78

59:                                               ; preds = %57
  invoke void @_ZN3imp4Vec2C2ILi2EEERKNS_3VecIXT_EfEEf(ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef nonnull align 8 dereferenceable(32) %12, float noundef 1.000000e+00)
          to label %60 unwind label %82

60:                                               ; preds = %59
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #6
  call void @llvm.lifetime.start.p0(i64 40, ptr %13) #6
  invoke void @_ZN3imp4Vec4C2Ev(ptr noundef nonnull align 8 dereferenceable(40) %13)
          to label %61 unwind label %87

61:                                               ; preds = %60
  %62 = invoke noundef i32 @_ZNK3imp7SamplerINS_4Vec2ENS_4Vec4EE12getFilteringEv(ptr noundef nonnull align 8 dereferenceable(30) %29)
          to label %63 unwind label %91

63:                                               ; preds = %61
  %64 = icmp eq i32 %62, 0
  br i1 %64, label %65, label %99

65:                                               ; preds = %63
  call void @llvm.lifetime.start.p0(i64 40, ptr %14) #6
  %66 = getelementptr inbounds %"class.imp::ImageSampler", ptr %29, i32 0, i32 2
  %67 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3imp5ImageELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %66) #6
  %68 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi2EfEixEj(ptr noundef nonnull align 8 dereferenceable(32) %11, i32 noundef 0)
          to label %69 unwind label %95

69:                                               ; preds = %65
  %70 = load float, ptr %68, align 4, !tbaa !25
  %71 = fptosi float %70 to i32
  %72 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi2EfEixEj(ptr noundef nonnull align 8 dereferenceable(32) %11, i32 noundef 1)
          to label %73 unwind label %95

73:                                               ; preds = %69
  %74 = load float, ptr %72, align 4, !tbaa !25
  %75 = fptosi float %74 to i32
  invoke void @_ZNK3imp5Image8getPixelEii(ptr dead_on_unwind writable sret(%"class.imp::Vec4") align 8 %14, ptr noundef nonnull align 8 dereferenceable(88) %67, i32 noundef %71, i32 noundef %75)
          to label %76 unwind label %95

76:                                               ; preds = %73
  %77 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZN3imp4Vec4aSEOS0_(ptr noundef nonnull align 8 dereferenceable(40) %13, ptr noundef nonnull align 8 dereferenceable(40) %14) #6
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %14) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr %14) #6
  br label %272

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

82:                                               ; preds = %59
  %83 = landingpad { ptr, i32 }
          cleanup
  %84 = extractvalue { ptr, i32 } %83, 0
  store ptr %84, ptr %9, align 8
  %85 = extractvalue { ptr, i32 } %83, 1
  store i32 %85, ptr %10, align 4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #6
  br label %86

86:                                               ; preds = %82, %78
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #6
  br label %286

87:                                               ; preds = %60
  %88 = landingpad { ptr, i32 }
          cleanup
  %89 = extractvalue { ptr, i32 } %88, 0
  store ptr %89, ptr %9, align 8
  %90 = extractvalue { ptr, i32 } %88, 1
  store i32 %90, ptr %10, align 4
  br label %285

91:                                               ; preds = %61
  %92 = landingpad { ptr, i32 }
          cleanup
  %93 = extractvalue { ptr, i32 } %92, 0
  store ptr %93, ptr %9, align 8
  %94 = extractvalue { ptr, i32 } %92, 1
  store i32 %94, ptr %10, align 4
  br label %284

95:                                               ; preds = %73, %69, %65
  %96 = landingpad { ptr, i32 }
          cleanup
  %97 = extractvalue { ptr, i32 } %96, 0
  store ptr %97, ptr %9, align 8
  %98 = extractvalue { ptr, i32 } %96, 1
  store i32 %98, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 40, ptr %14) #6
  br label %284

99:                                               ; preds = %63
  call void @llvm.lifetime.start.p0(i64 32, ptr %15) #6
  invoke void @_ZN3imp4Vec2C2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15)
          to label %100 unwind label %106

100:                                              ; preds = %99
  call void @llvm.lifetime.start.p0(i64 32, ptr %16) #6
  invoke void @_ZN3imp4Vec2C2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16)
          to label %101 unwind label %110

101:                                              ; preds = %100
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  store i32 0, ptr %17, align 4, !tbaa !9
  br label %102

102:                                              ; preds = %136, %101
  %103 = load i32, ptr %17, align 4, !tbaa !9
  %104 = icmp slt i32 %103, 2
  br i1 %104, label %114, label %105

105:                                              ; preds = %102
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  br label %143

106:                                              ; preds = %99
  %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 %271

110:                                              ; preds = %100
  %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
  br label %270

114:                                              ; preds = %102
  %115 = load i32, ptr %17, align 4, !tbaa !9
  %116 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi2EfEixEj(ptr noundef nonnull align 8 dereferenceable(32) %11, i32 noundef %115)
          to label %117 unwind label %139

117:                                              ; preds = %114
  %118 = load float, ptr %116, align 4, !tbaa !25
  %119 = invoke noundef float @_ZSt5floorf(float noundef %118)
          to label %120 unwind label %139

120:                                              ; preds = %117
  %121 = load i32, ptr %17, align 4, !tbaa !9
  %122 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi2EfEixEj(ptr noundef nonnull align 8 dereferenceable(32) %15, i32 noundef %121)
          to label %123 unwind label %139

123:                                              ; preds = %120
  store float %119, ptr %122, align 4, !tbaa !25
  %124 = load i32, ptr %17, align 4, !tbaa !9
  %125 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi2EfEixEj(ptr noundef nonnull align 8 dereferenceable(32) %11, i32 noundef %124)
          to label %126 unwind label %139

126:                                              ; preds = %123
  %127 = load float, ptr %125, align 4, !tbaa !25
  %128 = load i32, ptr %17, align 4, !tbaa !9
  %129 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi2EfEixEj(ptr noundef nonnull align 8 dereferenceable(32) %15, i32 noundef %128)
          to label %130 unwind label %139

130:                                              ; preds = %126
  %131 = load float, ptr %129, align 4, !tbaa !25
  %132 = fsub float %127, %131
  %133 = load i32, ptr %17, align 4, !tbaa !9
  %134 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi2EfEixEj(ptr noundef nonnull align 8 dereferenceable(32) %16, i32 noundef %133)
          to label %135 unwind label %139

135:                                              ; preds = %130
  store float %132, ptr %134, align 4, !tbaa !25
  br label %136

136:                                              ; preds = %135
  %137 = load i32, ptr %17, align 4, !tbaa !9
  %138 = add nsw i32 %137, 1
  store i32 %138, ptr %17, align 4, !tbaa !9
  br label %102, !llvm.loop !29

139:                                              ; preds = %130, %126, %123, %120, %117, %114
  %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 @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  br label %269

143:                                              ; preds = %105
  call void @llvm.lifetime.start.p0(i64 40, ptr %18) #6
  %144 = getelementptr inbounds %"class.imp::ImageSampler", ptr %29, i32 0, i32 2
  %145 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3imp5ImageELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %144) #6
  %146 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi2EfEixEj(ptr noundef nonnull align 8 dereferenceable(32) %15, i32 noundef 0)
          to label %147 unwind label %212

147:                                              ; preds = %143
  %148 = load float, ptr %146, align 4, !tbaa !25
  %149 = fpext float %148 to double
  %150 = fadd double %149, 0.000000e+00
  %151 = fptosi double %150 to i32
  %152 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi2EfEixEj(ptr noundef nonnull align 8 dereferenceable(32) %15, i32 noundef 1)
          to label %153 unwind label %212

153:                                              ; preds = %147
  %154 = load float, ptr %152, align 4, !tbaa !25
  %155 = fpext float %154 to double
  %156 = fadd double %155, 0.000000e+00
  %157 = fptosi double %156 to i32
  invoke void @_ZNK3imp5Image8getPixelEii(ptr dead_on_unwind writable sret(%"class.imp::Vec4") align 8 %18, ptr noundef nonnull align 8 dereferenceable(88) %145, i32 noundef %151, i32 noundef %157)
          to label %158 unwind label %212

158:                                              ; preds = %153
  call void @llvm.lifetime.start.p0(i64 40, ptr %19) #6
  %159 = getelementptr inbounds %"class.imp::ImageSampler", ptr %29, i32 0, i32 2
  %160 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3imp5ImageELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %159) #6
  %161 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi2EfEixEj(ptr noundef nonnull align 8 dereferenceable(32) %15, i32 noundef 0)
          to label %162 unwind label %216

162:                                              ; preds = %158
  %163 = load float, ptr %161, align 4, !tbaa !25
  %164 = fpext float %163 to double
  %165 = fadd double %164, 0.000000e+00
  %166 = fptosi double %165 to i32
  %167 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi2EfEixEj(ptr noundef nonnull align 8 dereferenceable(32) %15, i32 noundef 1)
          to label %168 unwind label %216

168:                                              ; preds = %162
  %169 = load float, ptr %167, align 4, !tbaa !25
  %170 = fpext float %169 to double
  %171 = fadd double %170, 1.000000e+00
  %172 = fptosi double %171 to i32
  invoke void @_ZNK3imp5Image8getPixelEii(ptr dead_on_unwind writable sret(%"class.imp::Vec4") align 8 %19, ptr noundef nonnull align 8 dereferenceable(88) %160, i32 noundef %166, i32 noundef %172)
          to label %173 unwind label %216

173:                                              ; preds = %168
  call void @llvm.lifetime.start.p0(i64 40, ptr %20) #6
  %174 = getelementptr inbounds %"class.imp::ImageSampler", ptr %29, i32 0, i32 2
  %175 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3imp5ImageELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %174) #6
  %176 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi2EfEixEj(ptr noundef nonnull align 8 dereferenceable(32) %15, i32 noundef 0)
          to label %177 unwind label %220

177:                                              ; preds = %173
  %178 = load float, ptr %176, align 4, !tbaa !25
  %179 = fpext float %178 to double
  %180 = fadd double %179, 1.000000e+00
  %181 = fptosi double %180 to i32
  %182 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi2EfEixEj(ptr noundef nonnull align 8 dereferenceable(32) %15, i32 noundef 1)
          to label %183 unwind label %220

183:                                              ; preds = %177
  %184 = load float, ptr %182, align 4, !tbaa !25
  %185 = fpext float %184 to double
  %186 = fadd double %185, 0.000000e+00
  %187 = fptosi double %186 to i32
  invoke void @_ZNK3imp5Image8getPixelEii(ptr dead_on_unwind writable sret(%"class.imp::Vec4") align 8 %20, ptr noundef nonnull align 8 dereferenceable(88) %175, i32 noundef %181, i32 noundef %187)
          to label %188 unwind label %220

188:                                              ; preds = %183
  call void @llvm.lifetime.start.p0(i64 40, ptr %21) #6
  %189 = getelementptr inbounds %"class.imp::ImageSampler", ptr %29, i32 0, i32 2
  %190 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3imp5ImageELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %189) #6
  %191 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi2EfEixEj(ptr noundef nonnull align 8 dereferenceable(32) %15, i32 noundef 0)
          to label %192 unwind label %224

192:                                              ; preds = %188
  %193 = load float, ptr %191, align 4, !tbaa !25
  %194 = fpext float %193 to double
  %195 = fadd double %194, 1.000000e+00
  %196 = fptosi double %195 to i32
  %197 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi2EfEixEj(ptr noundef nonnull align 8 dereferenceable(32) %15, i32 noundef 1)
          to label %198 unwind label %224

198:                                              ; preds = %192
  %199 = load float, ptr %197, align 4, !tbaa !25
  %200 = fpext float %199 to double
  %201 = fadd double %200, 1.000000e+00
  %202 = fptosi double %201 to i32
  invoke void @_ZNK3imp5Image8getPixelEii(ptr dead_on_unwind writable sret(%"class.imp::Vec4") align 8 %21, ptr noundef nonnull align 8 dereferenceable(88) %190, i32 noundef %196, i32 noundef %202)
          to label %203 unwind label %224

203:                                              ; preds = %198
  %204 = invoke noundef i32 @_ZNK3imp7SamplerINS_4Vec2ENS_4Vec4EE12getFilteringEv(ptr noundef nonnull align 8 dereferenceable(30) %29)
          to label %205 unwind label %228

205:                                              ; preds = %203
  %206 = icmp eq i32 %204, 2
  br i1 %206, label %207, label %251

207:                                              ; preds = %205
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #6
  store i32 0, ptr %22, align 4, !tbaa !9
  br label %208

208:                                              ; preds = %243, %207
  %209 = load i32, ptr %22, align 4, !tbaa !9
  %210 = icmp slt i32 %209, 2
  br i1 %210, label %232, label %211

211:                                              ; preds = %208
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  br label %250

212:                                              ; preds = %153, %147, %143
  %213 = landingpad { ptr, i32 }
          cleanup
  %214 = extractvalue { ptr, i32 } %213, 0
  store ptr %214, ptr %9, align 8
  %215 = extractvalue { ptr, i32 } %213, 1
  store i32 %215, ptr %10, align 4
  br label %268

216:                                              ; preds = %168, %162, %158
  %217 = landingpad { ptr, i32 }
          cleanup
  %218 = extractvalue { ptr, i32 } %217, 0
  store ptr %218, ptr %9, align 8
  %219 = extractvalue { ptr, i32 } %217, 1
  store i32 %219, ptr %10, align 4
  br label %267

220:                                              ; preds = %183, %177, %173
  %221 = landingpad { ptr, i32 }
          cleanup
  %222 = extractvalue { ptr, i32 } %221, 0
  store ptr %222, ptr %9, align 8
  %223 = extractvalue { ptr, i32 } %221, 1
  store i32 %223, ptr %10, align 4
  br label %266

224:                                              ; preds = %198, %192, %188
  %225 = landingpad { ptr, i32 }
          cleanup
  %226 = extractvalue { ptr, i32 } %225, 0
  store ptr %226, ptr %9, align 8
  %227 = extractvalue { ptr, i32 } %225, 1
  store i32 %227, ptr %10, align 4
  br label %265

228:                                              ; preds = %203
  %229 = landingpad { ptr, i32 }
          cleanup
  %230 = extractvalue { ptr, i32 } %229, 0
  store ptr %230, ptr %9, align 8
  %231 = extractvalue { ptr, i32 } %229, 1
  store i32 %231, ptr %10, align 4
  br label %264

232:                                              ; preds = %208
  %233 = load i32, ptr %22, align 4, !tbaa !9
  %234 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi2EfEixEj(ptr noundef nonnull align 8 dereferenceable(32) %16, i32 noundef %233)
          to label %235 unwind label %246

235:                                              ; preds = %232
  %236 = load float, ptr %234, align 4, !tbaa !25
  %237 = invoke noundef double @_ZN3imp10smoothstepIdEET_S1_S1_f(double noundef 0.000000e+00, double noundef 1.000000e+00, float noundef %236)
          to label %238 unwind label %246

238:                                              ; preds = %235
  %239 = fptrunc double %237 to float
  %240 = load i32, ptr %22, align 4, !tbaa !9
  %241 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi2EfEixEj(ptr noundef nonnull align 8 dereferenceable(32) %16, i32 noundef %240)
          to label %242 unwind label %246

242:                                              ; preds = %238
  store float %239, ptr %241, align 4, !tbaa !25
  br label %243

243:                                              ; preds = %242
  %244 = load i32, ptr %22, align 4, !tbaa !9
  %245 = add nsw i32 %244, 1
  store i32 %245, ptr %22, align 4, !tbaa !9
  br label %208, !llvm.loop !30

246:                                              ; preds = %238, %235, %232
  %247 = landingpad { ptr, i32 }
          cleanup
  %248 = extractvalue { ptr, i32 } %247, 0
  store ptr %248, ptr %9, align 8
  %249 = extractvalue { ptr, i32 } %247, 1
  store i32 %249, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  br label %264

250:                                              ; preds = %211
  br label %251

251:                                              ; preds = %250, %205
  call void @llvm.lifetime.start.p0(i64 40, ptr %23) #6
  call void @_ZN3imp4Vec4C2ERKS0_(ptr noundef nonnull align 8 dereferenceable(40) %24, ptr noundef nonnull align 8 dereferenceable(40) %18) #6
  call void @_ZN3imp4Vec4C2ERKS0_(ptr noundef nonnull align 8 dereferenceable(40) %25, ptr noundef nonnull align 8 dereferenceable(40) %20) #6
  call void @_ZN3imp4Vec4C2ERKS0_(ptr noundef nonnull align 8 dereferenceable(40) %26, ptr noundef nonnull align 8 dereferenceable(40) %19) #6
  call void @_ZN3imp4Vec4C2ERKS0_(ptr noundef nonnull align 8 dereferenceable(40) %27, ptr noundef nonnull align 8 dereferenceable(40) %21) #6
  %252 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi2EfEixEj(ptr noundef nonnull align 8 dereferenceable(32) %16, i32 noundef 0)
          to label %253 unwind label %260

253:                                              ; preds = %251
  %254 = load float, ptr %252, align 4, !tbaa !25
  %255 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi2EfEixEj(ptr noundef nonnull align 8 dereferenceable(32) %16, i32 noundef 1)
          to label %256 unwind label %260

256:                                              ; preds = %253
  %257 = load float, ptr %255, align 4, !tbaa !25
  invoke void @_ZN3imp5mix2dINS_4Vec4EEET_S2_S2_S2_S2_ff(ptr dead_on_unwind writable sret(%"class.imp::Vec4") align 8 %23, ptr noundef %24, ptr noundef %25, ptr noundef %26, ptr noundef %27, float noundef %254, float noundef %257)
          to label %258 unwind label %260

258:                                              ; preds = %256
  %259 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZN3imp4Vec4aSEOS0_(ptr noundef nonnull align 8 dereferenceable(40) %13, ptr noundef nonnull align 8 dereferenceable(40) %23) #6
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %23) #6
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %27) #6
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %26) #6
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %25) #6
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %24) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr %23) #6
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %21) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr %21) #6
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %20) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr %20) #6
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %19) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr %19) #6
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %18) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr %18) #6
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #6
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #6
  br label %272

260:                                              ; preds = %256, %253, %251
  %261 = landingpad { ptr, i32 }
          cleanup
  %262 = extractvalue { ptr, i32 } %261, 0
  store ptr %262, ptr %9, align 8
  %263 = extractvalue { ptr, i32 } %261, 1
  store i32 %263, ptr %10, align 4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %27) #6
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %26) #6
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %25) #6
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %24) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr %23) #6
  br label %264

264:                                              ; preds = %260, %246, %228
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %21) #6
  br label %265

265:                                              ; preds = %264, %224
  call void @llvm.lifetime.end.p0(i64 40, ptr %21) #6
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %20) #6
  br label %266

266:                                              ; preds = %265, %220
  call void @llvm.lifetime.end.p0(i64 40, ptr %20) #6
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %19) #6
  br label %267

267:                                              ; preds = %266, %216
  call void @llvm.lifetime.end.p0(i64 40, ptr %19) #6
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %18) #6
  br label %268

268:                                              ; preds = %267, %212
  call void @llvm.lifetime.end.p0(i64 40, ptr %18) #6
  br label %269

269:                                              ; preds = %268, %139
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #6
  br label %270

270:                                              ; preds = %269, %110
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #6
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #6
  br label %271

271:                                              ; preds = %270, %106
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #6
  br label %284

272:                                              ; preds = %258, %76
  call void @llvm.lifetime.start.p0(i64 40, ptr %28) #6
  invoke void @_ZNK3imp3VecILi4EfEdvEf(ptr dead_on_unwind writable sret(%"class.imp::Vec.7") align 8 %28, ptr noundef nonnull align 8 dereferenceable(40) %13, float noundef 2.550000e+02)
          to label %273 unwind label %275

273:                                              ; preds = %272
  invoke void @_ZN3imp4Vec4C2ILi4EEERKNS_3VecIXT_EfEEf(ptr noundef nonnull align 8 dereferenceable(40) %0, ptr noundef nonnull align 8 dereferenceable(40) %28, float noundef 1.000000e+00)
          to label %274 unwind label %279

274:                                              ; preds = %273
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %28) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr %28) #6
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %13) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr %13) #6
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #6
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %7) #6
  br label %288

275:                                              ; preds = %272
  %276 = landingpad { ptr, i32 }
          cleanup
  %277 = extractvalue { ptr, i32 } %276, 0
  store ptr %277, ptr %9, align 8
  %278 = extractvalue { ptr, i32 } %276, 1
  store i32 %278, ptr %10, align 4
  br label %283

279:                                              ; preds = %273
  %280 = landingpad { ptr, i32 }
          cleanup
  %281 = extractvalue { ptr, i32 } %280, 0
  store ptr %281, ptr %9, align 8
  %282 = extractvalue { ptr, i32 } %280, 1
  store i32 %282, ptr %10, align 4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %28) #6
  br label %283

283:                                              ; preds = %279, %275
  call void @llvm.lifetime.end.p0(i64 40, ptr %28) #6
  br label %284

284:                                              ; preds = %283, %271, %95, %91
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %13) #6
  br label %285

285:                                              ; preds = %284, %87
  call void @llvm.lifetime.end.p0(i64 40, ptr %13) #6
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #6
  br label %286

286:                                              ; preds = %285, %86
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #6
  br label %287

287:                                              ; preds = %286, %53
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %7) #6
  br label %289

288:                                              ; preds = %274, %32
  ret void

289:                                              ; preds = %287
  %290 = load ptr, ptr %9, align 8
  %291 = load i32, ptr %10, align 4
  %292 = insertvalue { ptr, i32 } poison, ptr %290, 0
  %293 = insertvalue { ptr, i32 } %292, i32 %291, 1
  resume { ptr, i32 } %293
}

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef float @_ZN3imp13applyWrappingERfNS_7SamplerINS_4Vec2ENS_4Vec4EE8WrappingE(ptr noundef nonnull align 4 dereferenceable(4), i32 noundef) #4

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

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

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

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

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

declare void @_ZNK3imp5Image8getPixelEii(ptr dead_on_unwind writable sret(%"class.imp::Vec4") align 8, ptr noundef nonnull align 8 dereferenceable(88), i32 noundef, i32 noundef) #5

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt5floorf(float noundef) #3

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_ZN3imp10smoothstepIdEET_S1_S1_f(double noundef, double noundef, float noundef) #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3imp5mix2dINS_4Vec4EEET_S2_S2_S2_S2_ff(ptr dead_on_unwind noalias writable sret(%"class.imp::Vec4") align 8, ptr noundef, ptr noundef, ptr noundef, ptr noundef, float noundef, float noundef) #0

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3imp4Vec4C2ERKS0_(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #3 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) #2 align 2

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

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

!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, !22, i64 48}
!12 = !{!"_ZTSN3imp12ImageSamplerE", !13, i64 0, !20, i64 32, !22, i64 48, !23, i64 56, !19, i64 88}
!13 = !{!"_ZTSN3imp7SamplerINS_4Vec2ENS_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_4Vec2ENS_4Vec4EE9FilteringE", !7, i64 0}
!19 = !{!"bool", !7, i64 0}
!20 = !{!"_ZTSSt10shared_ptrIN3imp5ImageEE", !21, i64 0}
!21 = !{!"_ZTSSt12__shared_ptrIN3imp5ImageELN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0, !17, i64 8}
!22 = !{!"_ZTSN3imp7SamplerINS_4Vec2ENS_4Vec4EE8WrappingE", !7, i64 0}
!23 = !{!"_ZTSN3imp4Vec2E", !24, i64 0}
!24 = !{!"_ZTSN3imp3VecILi2EfEE", !14, i64 0, !7, i64 24}
!25 = !{!26, !26, i64 0}
!26 = !{!"float", !7, i64 0}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.mustprogress"}
!29 = distinct !{!29, !28}
!30 = distinct !{!30, !28}


; 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::Vec4" = type { %"class.imp::Vec.7" }
%"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::Vec2" = type { %"class.imp::Vec" }
%"class.imp::Vec" = type { %"class.imp::Object", [2 x float] }

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

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) #1

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

; 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 #0 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3imp12ImageSampler3getERKNS_4Vec2E(ptr dead_on_unwind noalias writable sret(%"class.imp::Vec4") align 8 %0, ptr noundef nonnull align 8 dereferenceable(89) %1, ptr noundef nonnull align 8 dereferenceable(32) %2) local_unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.imp::Vec2", align 8
  %5 = alloca %"class.imp::Vec2", align 8
  %6 = alloca %"class.imp::Vec", align 8
  %7 = alloca %"class.imp::Vec4", align 8
  %8 = alloca %"class.imp::Vec4", align 8
  %9 = alloca %"class.imp::Vec2", align 8
  %10 = alloca %"class.imp::Vec2", align 8
  %11 = alloca %"class.imp::Vec4", align 8
  %12 = alloca %"class.imp::Vec4", align 8
  %13 = alloca %"class.imp::Vec4", align 8
  %14 = alloca %"class.imp::Vec4", align 8
  %15 = alloca %"class.imp::Vec4", align 8
  %16 = alloca %"class.imp::Vec4", align 8
  %17 = alloca %"class.imp::Vec4", align 8
  %18 = alloca %"class.imp::Vec4", align 8
  %19 = alloca %"class.imp::Vec4", align 8
  %20 = alloca %"class.imp::Vec.7", align 8
  %21 = getelementptr inbounds i8, ptr %1, i64 32
  %22 = tail call noundef zeroext i1 @_ZSteqIN3imp5ImageEEbRKSt10shared_ptrIT_EDn(ptr noundef nonnull align 8 dereferenceable(16) %21, ptr null) #6
  br i1 %22, label %23, label %24

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

24:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #6
  call void @_ZN3imp4Vec2C2ERKS0_(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull align 8 dereferenceable(32) %2) #6
  %25 = getelementptr inbounds i8, ptr %1, i64 48
  %26 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi2EfEixEj(ptr noundef nonnull align 8 dereferenceable(32) %4, i32 noundef 0)
  %27 = load i32, ptr %25, align 8, !tbaa !5
  %28 = invoke noundef float @_ZN3imp13applyWrappingERfNS_7SamplerINS_4Vec2ENS_4Vec4EE8WrappingE(ptr noundef nonnull align 4 dereferenceable(4) %26, i32 noundef %27)
          to label %29 unwind label %37

29:                                               ; preds = %24
  %30 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi2EfEixEj(ptr noundef nonnull align 8 dereferenceable(32) %4, i32 noundef 0)
  store float %28, ptr %30, align 4, !tbaa !22
  %31 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi2EfEixEj(ptr noundef nonnull align 8 dereferenceable(32) %4, i32 noundef 1)
  %32 = load i32, ptr %25, align 8, !tbaa !5
  %33 = invoke noundef float @_ZN3imp13applyWrappingERfNS_7SamplerINS_4Vec2ENS_4Vec4EE8WrappingE(ptr noundef nonnull align 4 dereferenceable(4) %31, i32 noundef %32)
          to label %34 unwind label %37

34:                                               ; preds = %29
  %35 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi2EfEixEj(ptr noundef nonnull align 8 dereferenceable(32) %4, i32 noundef 1)
  store float %33, ptr %35, align 4, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #6
  %36 = getelementptr inbounds i8, ptr %1, i64 56
  invoke void @_ZNK3imp3VecILi2EfEmlERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.imp::Vec") align 8 %6, ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull align 8 dereferenceable(32) %36)
          to label %39 unwind label %54

37:                                               ; preds = %29, %24
  %38 = landingpad { ptr, i32 }
          cleanup
  br label %181

39:                                               ; preds = %34
  invoke void @_ZN3imp4Vec2C2ILi2EEERKNS_3VecIXT_EfEEf(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull align 8 dereferenceable(32) %6, float noundef 1.000000e+00)
          to label %40 unwind label %56

40:                                               ; preds = %39
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #6
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %7) #6
  invoke void @_ZN3imp4Vec4C2Ev(ptr noundef nonnull align 8 dereferenceable(40) %7)
          to label %41 unwind label %59

41:                                               ; preds = %40
  %42 = call noundef i32 @_ZNK3imp7SamplerINS_4Vec2ENS_4Vec4EE12getFilteringEv(ptr noundef nonnull align 8 dereferenceable(30) %1)
  %43 = icmp eq i32 %42, 0
  br i1 %43, label %44, label %63

44:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %8) #6
  %45 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3imp5ImageELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %21) #6
  %46 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi2EfEixEj(ptr noundef nonnull align 8 dereferenceable(32) %5, i32 noundef 0)
  %47 = load float, ptr %46, align 4, !tbaa !22
  %48 = fptosi float %47 to i32
  %49 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi2EfEixEj(ptr noundef nonnull align 8 dereferenceable(32) %5, i32 noundef 1)
  %50 = load float, ptr %49, align 4, !tbaa !22
  %51 = fptosi float %50 to i32
  invoke void @_ZNK3imp5Image8getPixelEii(ptr dead_on_unwind nonnull writable sret(%"class.imp::Vec4") align 8 %8, ptr noundef nonnull align 8 dereferenceable(88) %45, i32 noundef %48, i32 noundef %51)
          to label %52 unwind label %61

52:                                               ; preds = %44
  %53 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZN3imp4Vec4aSEOS0_(ptr noundef nonnull align 8 dereferenceable(40) %7, ptr noundef nonnull align 8 dereferenceable(40) %8) #6
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %8) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %8) #6
  br label %174

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

56:                                               ; preds = %39
  %57 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #6
  br label %58

58:                                               ; preds = %56, %54
  %.pn = phi { ptr, i32 } [ %57, %56 ], [ %55, %54 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #6
  br label %180

59:                                               ; preds = %40
  %60 = landingpad { ptr, i32 }
          cleanup
  br label %179

61:                                               ; preds = %44
  %62 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %8) #6
  br label %178

63:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #6
  invoke void @_ZN3imp4Vec2C2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9)
          to label %64 unwind label %96

64:                                               ; preds = %63
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %10) #6
  invoke void @_ZN3imp4Vec2C2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10)
          to label %.preheader48.preheader unwind label %98

.preheader48.preheader:                           ; preds = %64
  %65 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi2EfEixEj(ptr noundef nonnull align 8 dereferenceable(32) %5, i32 noundef 0)
  %66 = load float, ptr %65, align 4, !tbaa !22
  %67 = call noundef float @_ZSt5floorf(float noundef %66)
  %68 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi2EfEixEj(ptr noundef nonnull align 8 dereferenceable(32) %9, i32 noundef 0)
  store float %67, ptr %68, align 4, !tbaa !22
  %69 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi2EfEixEj(ptr noundef nonnull align 8 dereferenceable(32) %5, i32 noundef 0)
  %70 = load float, ptr %69, align 4, !tbaa !22
  %71 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi2EfEixEj(ptr noundef nonnull align 8 dereferenceable(32) %9, i32 noundef 0)
  %72 = load float, ptr %71, align 4, !tbaa !22
  %73 = fsub float %70, %72
  %74 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi2EfEixEj(ptr noundef nonnull align 8 dereferenceable(32) %10, i32 noundef 0)
  store float %73, ptr %74, align 4, !tbaa !22
  %75 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi2EfEixEj(ptr noundef nonnull align 8 dereferenceable(32) %5, i32 noundef 1)
  %76 = load float, ptr %75, align 4, !tbaa !22
  %77 = call noundef float @_ZSt5floorf(float noundef %76)
  %78 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi2EfEixEj(ptr noundef nonnull align 8 dereferenceable(32) %9, i32 noundef 1)
  store float %77, ptr %78, align 4, !tbaa !22
  %79 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi2EfEixEj(ptr noundef nonnull align 8 dereferenceable(32) %5, i32 noundef 1)
  %80 = load float, ptr %79, align 4, !tbaa !22
  %81 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi2EfEixEj(ptr noundef nonnull align 8 dereferenceable(32) %9, i32 noundef 1)
  %82 = load float, ptr %81, align 4, !tbaa !22
  %83 = fsub float %80, %82
  %84 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi2EfEixEj(ptr noundef nonnull align 8 dereferenceable(32) %10, i32 noundef 1)
  store float %83, ptr %84, align 4, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %11) #6
  %85 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3imp5ImageELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %21) #6
  %86 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi2EfEixEj(ptr noundef nonnull align 8 dereferenceable(32) %9, i32 noundef 0)
  %87 = load float, ptr %86, align 4, !tbaa !22
  %88 = fpext float %87 to double
  %89 = fadd double %88, 0.000000e+00
  %90 = fptosi double %89 to i32
  %91 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi2EfEixEj(ptr noundef nonnull align 8 dereferenceable(32) %9, i32 noundef 1)
  %92 = load float, ptr %91, align 4, !tbaa !22
  %93 = fpext float %92 to double
  %94 = fadd double %93, 0.000000e+00
  %95 = fptosi double %94 to i32
  invoke void @_ZNK3imp5Image8getPixelEii(ptr dead_on_unwind nonnull writable sret(%"class.imp::Vec4") align 8 %11, ptr noundef nonnull align 8 dereferenceable(88) %85, i32 noundef %90, i32 noundef %95)
          to label %100 unwind label %142

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

98:                                               ; preds = %64
  %99 = landingpad { ptr, i32 }
          cleanup
  br label %172

100:                                              ; preds = %.preheader48.preheader
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %12) #6
  %101 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3imp5ImageELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %21) #6
  %102 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi2EfEixEj(ptr noundef nonnull align 8 dereferenceable(32) %9, i32 noundef 0)
  %103 = load float, ptr %102, align 4, !tbaa !22
  %104 = fpext float %103 to double
  %105 = fadd double %104, 0.000000e+00
  %106 = fptosi double %105 to i32
  %107 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi2EfEixEj(ptr noundef nonnull align 8 dereferenceable(32) %9, i32 noundef 1)
  %108 = load float, ptr %107, align 4, !tbaa !22
  %109 = fpext float %108 to double
  %110 = fadd double %109, 1.000000e+00
  %111 = fptosi double %110 to i32
  invoke void @_ZNK3imp5Image8getPixelEii(ptr dead_on_unwind nonnull writable sret(%"class.imp::Vec4") align 8 %12, ptr noundef nonnull align 8 dereferenceable(88) %101, i32 noundef %106, i32 noundef %111)
          to label %112 unwind label %144

112:                                              ; preds = %100
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %13) #6
  %113 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3imp5ImageELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %21) #6
  %114 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi2EfEixEj(ptr noundef nonnull align 8 dereferenceable(32) %9, i32 noundef 0)
  %115 = load float, ptr %114, align 4, !tbaa !22
  %116 = fpext float %115 to double
  %117 = fadd double %116, 1.000000e+00
  %118 = fptosi double %117 to i32
  %119 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi2EfEixEj(ptr noundef nonnull align 8 dereferenceable(32) %9, i32 noundef 1)
  %120 = load float, ptr %119, align 4, !tbaa !22
  %121 = fpext float %120 to double
  %122 = fadd double %121, 0.000000e+00
  %123 = fptosi double %122 to i32
  invoke void @_ZNK3imp5Image8getPixelEii(ptr dead_on_unwind nonnull writable sret(%"class.imp::Vec4") align 8 %13, ptr noundef nonnull align 8 dereferenceable(88) %113, i32 noundef %118, i32 noundef %123)
          to label %124 unwind label %146

124:                                              ; preds = %112
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %14) #6
  %125 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3imp5ImageELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %21) #6
  %126 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi2EfEixEj(ptr noundef nonnull align 8 dereferenceable(32) %9, i32 noundef 0)
  %127 = load float, ptr %126, align 4, !tbaa !22
  %128 = fpext float %127 to double
  %129 = fadd double %128, 1.000000e+00
  %130 = fptosi double %129 to i32
  %131 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi2EfEixEj(ptr noundef nonnull align 8 dereferenceable(32) %9, i32 noundef 1)
  %132 = load float, ptr %131, align 4, !tbaa !22
  %133 = fpext float %132 to double
  %134 = fadd double %133, 1.000000e+00
  %135 = fptosi double %134 to i32
  invoke void @_ZNK3imp5Image8getPixelEii(ptr dead_on_unwind nonnull writable sret(%"class.imp::Vec4") align 8 %14, ptr noundef nonnull align 8 dereferenceable(88) %125, i32 noundef %130, i32 noundef %135)
          to label %136 unwind label %148

136:                                              ; preds = %124
  %137 = call noundef i32 @_ZNK3imp7SamplerINS_4Vec2ENS_4Vec4EE12getFilteringEv(ptr noundef nonnull align 8 dereferenceable(30) %1)
  %138 = icmp eq i32 %137, 2
  br i1 %138, label %.preheader.preheader, label %.loopexit

.preheader.preheader:                             ; preds = %136
  %139 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi2EfEixEj(ptr noundef nonnull align 8 dereferenceable(32) %10, i32 noundef 0)
  %140 = load float, ptr %139, align 4, !tbaa !22
  %141 = invoke noundef double @_ZN3imp10smoothstepIdEET_S1_S1_f(double noundef 0.000000e+00, double noundef 1.000000e+00, float noundef %140)
          to label %.preheader.1 unwind label %157

142:                                              ; preds = %.preheader48.preheader
  %143 = landingpad { ptr, i32 }
          cleanup
  br label %171

144:                                              ; preds = %100
  %145 = landingpad { ptr, i32 }
          cleanup
  br label %170

146:                                              ; preds = %112
  %147 = landingpad { ptr, i32 }
          cleanup
  br label %169

148:                                              ; preds = %124
  %149 = landingpad { ptr, i32 }
          cleanup
  br label %168

.preheader.1:                                     ; preds = %.preheader.preheader
  %150 = fptrunc double %141 to float
  %151 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi2EfEixEj(ptr noundef nonnull align 8 dereferenceable(32) %10, i32 noundef 0)
  store float %150, ptr %151, align 4, !tbaa !22
  %152 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi2EfEixEj(ptr noundef nonnull align 8 dereferenceable(32) %10, i32 noundef 1)
  %153 = load float, ptr %152, align 4, !tbaa !22
  %154 = invoke noundef double @_ZN3imp10smoothstepIdEET_S1_S1_f(double noundef 0.000000e+00, double noundef 1.000000e+00, float noundef %153)
          to label %.loopexit.loopexit unwind label %157

.loopexit.loopexit:                               ; preds = %.preheader.1
  %155 = fptrunc double %154 to float
  %156 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi2EfEixEj(ptr noundef nonnull align 8 dereferenceable(32) %10, i32 noundef 1)
  store float %155, ptr %156, align 4, !tbaa !22
  br label %.loopexit

157:                                              ; preds = %.preheader.1, %.preheader.preheader
  %158 = landingpad { ptr, i32 }
          cleanup
  br label %167

.loopexit:                                        ; preds = %.loopexit.loopexit, %136
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %15) #6
  call void @_ZN3imp4Vec4C2ERKS0_(ptr noundef nonnull align 8 dereferenceable(40) %16, ptr noundef nonnull align 8 dereferenceable(40) %11) #6
  call void @_ZN3imp4Vec4C2ERKS0_(ptr noundef nonnull align 8 dereferenceable(40) %17, ptr noundef nonnull align 8 dereferenceable(40) %13) #6
  call void @_ZN3imp4Vec4C2ERKS0_(ptr noundef nonnull align 8 dereferenceable(40) %18, ptr noundef nonnull align 8 dereferenceable(40) %12) #6
  call void @_ZN3imp4Vec4C2ERKS0_(ptr noundef nonnull align 8 dereferenceable(40) %19, ptr noundef nonnull align 8 dereferenceable(40) %14) #6
  %159 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi2EfEixEj(ptr noundef nonnull align 8 dereferenceable(32) %10, i32 noundef 0)
  %160 = load float, ptr %159, align 4, !tbaa !22
  %161 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi2EfEixEj(ptr noundef nonnull align 8 dereferenceable(32) %10, i32 noundef 1)
  %162 = load float, ptr %161, align 4, !tbaa !22
  invoke void @_ZN3imp5mix2dINS_4Vec4EEET_S2_S2_S2_S2_ff(ptr dead_on_unwind nonnull writable sret(%"class.imp::Vec4") align 8 %15, ptr noundef nonnull %16, ptr noundef nonnull %17, ptr noundef nonnull %18, ptr noundef nonnull %19, float noundef %160, float noundef %162)
          to label %163 unwind label %165

163:                                              ; preds = %.loopexit
  %164 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZN3imp4Vec4aSEOS0_(ptr noundef nonnull align 8 dereferenceable(40) %7, ptr noundef nonnull align 8 dereferenceable(40) %15) #6
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %15) #6
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %19) #6
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %18) #6
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %17) #6
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %16) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %15) #6
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %14) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %14) #6
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %13) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %13) #6
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %12) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %12) #6
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %11) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %11) #6
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #6
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #6
  br label %174

165:                                              ; preds = %.loopexit
  %166 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %19) #6
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %18) #6
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %17) #6
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %16) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %15) #6
  br label %167

167:                                              ; preds = %165, %157
  %.pn34 = phi { ptr, i32 } [ %158, %157 ], [ %166, %165 ]
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %14) #6
  br label %168

168:                                              ; preds = %167, %148
  %.pn34.pn = phi { ptr, i32 } [ %.pn34, %167 ], [ %149, %148 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %14) #6
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %13) #6
  br label %169

169:                                              ; preds = %168, %146
  %.pn34.pn.pn = phi { ptr, i32 } [ %.pn34.pn, %168 ], [ %147, %146 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %13) #6
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %12) #6
  br label %170

170:                                              ; preds = %169, %144
  %.pn34.pn.pn.pn = phi { ptr, i32 } [ %.pn34.pn.pn, %169 ], [ %145, %144 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %12) #6
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %11) #6
  br label %171

171:                                              ; preds = %170, %142
  %.pn34.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn34.pn.pn.pn, %170 ], [ %143, %142 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %11) #6
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #6
  br label %172

172:                                              ; preds = %171, %98
  %.pn34.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn34.pn.pn.pn.pn, %171 ], [ %99, %98 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #6
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #6
  br label %173

173:                                              ; preds = %172, %96
  %.pn34.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn34.pn.pn.pn.pn.pn, %172 ], [ %97, %96 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #6
  br label %178

174:                                              ; preds = %163, %52
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %20) #6
  call void @_ZNK3imp3VecILi4EfEdvEf(ptr dead_on_unwind nonnull writable sret(%"class.imp::Vec.7") align 8 %20, ptr noundef nonnull align 8 dereferenceable(40) %7, 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) %20, float noundef 1.000000e+00)
          to label %175 unwind label %176

175:                                              ; preds = %174
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %20) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %20) #6
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %7) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %7) #6
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #6
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #6
  br label %182

176:                                              ; preds = %174
  %177 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %20) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %20) #6
  br label %178

178:                                              ; preds = %176, %173, %61
  %.pn42 = phi { ptr, i32 } [ %177, %176 ], [ %62, %61 ], [ %.pn34.pn.pn.pn.pn.pn.pn, %173 ]
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %7) #6
  br label %179

179:                                              ; preds = %178, %59
  %.pn42.pn = phi { ptr, i32 } [ %.pn42, %178 ], [ %60, %59 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %7) #6
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #6
  br label %180

180:                                              ; preds = %179, %58
  %.pn42.pn.pn = phi { ptr, i32 } [ %.pn42.pn, %179 ], [ %.pn, %58 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #6
  br label %181

181:                                              ; preds = %180, %37
  %.pn46 = phi { ptr, i32 } [ %38, %37 ], [ %.pn42.pn.pn, %180 ]
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #6
  resume { ptr, i32 } %.pn46

182:                                              ; preds = %175, %23
  ret void
}

; 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 #3

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef float @_ZN3imp13applyWrappingERfNS_7SamplerINS_4Vec2ENS_4Vec4EE8WrappingE(ptr noundef nonnull align 4 dereferenceable(4), i32 noundef) local_unnamed_addr #4

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

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

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

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

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

declare void @_ZNK3imp5Image8getPixelEii(ptr dead_on_unwind writable sret(%"class.imp::Vec4") align 8, ptr noundef nonnull align 8 dereferenceable(88), i32 noundef, i32 noundef) local_unnamed_addr #5

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt5floorf(float noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_ZN3imp10smoothstepIdEET_S1_S1_f(double noundef, double noundef, float noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3imp5mix2dINS_4Vec4EEET_S2_S2_S2_S2_ff(ptr dead_on_unwind noalias writable sret(%"class.imp::Vec4") align 8, ptr noundef, ptr noundef, ptr noundef, ptr noundef, float noundef, float noundef) local_unnamed_addr #0

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3imp4Vec4C2ERKS0_(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #3 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 #2 align 2

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

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

!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, !19, i64 48}
!6 = !{!"_ZTSN3imp12ImageSamplerE", !7, i64 0, !17, i64 32, !19, i64 48, !20, i64 56, !16, i64 88}
!7 = !{!"_ZTSN3imp7SamplerINS_4Vec2ENS_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_4Vec2ENS_4Vec4EE9FilteringE", !12, i64 0}
!16 = !{!"bool", !12, i64 0}
!17 = !{!"_ZTSSt10shared_ptrIN3imp5ImageEE", !18, i64 0}
!18 = !{!"_ZTSSt12__shared_ptrIN3imp5ImageELN9__gnu_cxx12_Lock_policyE2EE", !11, i64 0, !14, i64 8}
!19 = !{!"_ZTSN3imp7SamplerINS_4Vec2ENS_4Vec4EE8WrappingE", !12, i64 0}
!20 = !{!"_ZTSN3imp4Vec2E", !21, i64 0}
!21 = !{!"_ZTSN3imp3VecILi2EfEE", !8, i64 0, !12, i64 24}
!22 = !{!23, !23, i64 0}
!23 = !{!"float", !12, i64 0}


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