; 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::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::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::MorphoOperation" = type <{ %"struct.imp::ImageOperation", %"class.std::shared_ptr", %"class.imp::Matrix3", i32, [4 x i8] }>
%"struct.imp::ImageOperation" = type { %"class.imp::Object" }
%"class.imp::Matrix3" = type { %"class.imp::Matrix.base", [4 x i8] }
%"class.imp::Matrix.base" = type <{ %"class.imp::Object", [9 x float] }>

; 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 noundef ptr @_ZNKSt19__shared_ptr_accessIN3imp5ImageELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1)) #1 align 2

declare noundef i32 @_ZNK3imp5Image5widthEv(ptr noundef nonnull align 8 dereferenceable(88)) #2

declare noundef i32 @_ZNK3imp5Image6heightEv(ptr noundef nonnull align 8 dereferenceable(88)) #2

; 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 nounwind uwtable
declare dso_local noundef float @_ZNK3imp3VecILi2EfEixEj(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) #1 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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #3

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3imp15MorphoOperation5applyERKNS_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 #4 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca %"class.imp::ImageSampler", align 8
  %12 = alloca %"class.std::shared_ptr", align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca %"class.imp::Vec4", align 8
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca float, align 4
  %20 = alloca float, align 4
  %21 = alloca %"class.imp::Vec4", align 8
  %22 = alloca %"class.imp::Vec.7", align 8
  %23 = alloca %"class.imp::Vec4", align 8
  %24 = alloca i32, 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
  %25 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  store i32 3, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  store i32 3, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  %26 = load i32, ptr %7, align 4, !tbaa !9
  %27 = sdiv i32 %26, 2
  store i32 %27, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  %28 = load i32, ptr %8, align 4, !tbaa !9
  %29 = sdiv i32 %28, 2
  store i32 %29, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 96, ptr %11) #5
  %30 = getelementptr inbounds %"struct.imp::MorphoOperation", ptr %25, i32 0, i32 1
  call void @_ZNSt10shared_ptrIN3imp5ImageEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %12, ptr noundef nonnull align 8 dereferenceable(16) %30) #5
  invoke void @_ZN3imp12ImageSamplerC1ESt10shared_ptrINS_5ImageEENS_7SamplerINS_4Vec2ENS_4Vec4EE8WrappingE(ptr noundef nonnull align 8 dereferenceable(89) %11, ptr noundef %12, i32 noundef 1)
          to label %31 unwind label %45

31:                                               ; preds = %3
  call void @_ZNSt12__shared_ptrIN3imp5ImageELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %12) #5
  call void @llvm.lifetime.start.p0(i64 40, ptr %15) #5
  %32 = getelementptr inbounds %"struct.imp::MorphoOperation", ptr %25, i32 0, i32 3
  %33 = load i32, ptr %32, align 8, !tbaa !11
  %34 = icmp slt i32 %33, 0
  br i1 %34, label %35, label %37

35:                                               ; preds = %31
  invoke void @_ZN3imp4Vec4C2Ef(ptr noundef nonnull align 8 dereferenceable(40) %15, float noundef 1.000000e+00)
          to label %36 unwind label %49

36:                                               ; preds = %35
  br label %39

37:                                               ; preds = %31
  invoke void @_ZN3imp4Vec4C2Ef(ptr noundef nonnull align 8 dereferenceable(40) %15, float noundef 0.000000e+00)
          to label %38 unwind label %49

38:                                               ; preds = %37
  br label %39

39:                                               ; preds = %38, %36
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  store i32 0, ptr %16, align 4, !tbaa !9
  br label %40

40:                                               ; preds = %169, %39
  %41 = load i32, ptr %16, align 4, !tbaa !9
  %42 = load i32, ptr %7, align 4, !tbaa !9
  %43 = icmp slt i32 %41, %42
  br i1 %43, label %53, label %44

44:                                               ; preds = %40
  store i32 2, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  br label %172

45:                                               ; preds = %3
  %46 = landingpad { ptr, i32 }
          cleanup
  %47 = extractvalue { ptr, i32 } %46, 0
  store ptr %47, ptr %13, align 8
  %48 = extractvalue { ptr, i32 } %46, 1
  store i32 %48, ptr %14, align 4
  call void @_ZNSt12__shared_ptrIN3imp5ImageELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %12) #5
  br label %183

49:                                               ; preds = %37, %35
  %50 = landingpad { ptr, i32 }
          cleanup
  %51 = extractvalue { ptr, i32 } %50, 0
  store ptr %51, ptr %13, align 8
  %52 = extractvalue { ptr, i32 } %50, 1
  store i32 %52, ptr %14, align 4
  br label %182

53:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  store i32 0, ptr %18, align 4, !tbaa !9
  br label %54

54:                                               ; preds = %162, %53
  %55 = load i32, ptr %18, align 4, !tbaa !9
  %56 = load i32, ptr %8, align 4, !tbaa !9
  %57 = icmp slt i32 %55, %56
  br i1 %57, label %59, label %58

58:                                               ; preds = %54
  store i32 5, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  br label %168

59:                                               ; preds = %54
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #5
  %60 = load i32, ptr %16, align 4, !tbaa !9
  %61 = load i32, ptr %9, align 4, !tbaa !9
  %62 = sub nsw i32 %60, %61
  %63 = sitofp i32 %62 to float
  %64 = getelementptr inbounds %"struct.imp::MorphoOperation", ptr %25, i32 0, i32 1
  %65 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3imp5ImageELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %64) #5
  %66 = invoke noundef i32 @_ZNK3imp5Image5widthEv(ptr noundef nonnull align 8 dereferenceable(88) %65)
          to label %67 unwind label %103

67:                                               ; preds = %59
  %68 = sitofp i32 %66 to float
  %69 = fdiv float %63, %68
  store float %69, ptr %19, align 4, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  %70 = load i32, ptr %18, align 4, !tbaa !9
  %71 = load i32, ptr %10, align 4, !tbaa !9
  %72 = sub nsw i32 %70, %71
  %73 = sitofp i32 %72 to float
  %74 = getelementptr inbounds %"struct.imp::MorphoOperation", ptr %25, i32 0, i32 1
  %75 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3imp5ImageELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %74) #5
  %76 = invoke noundef i32 @_ZNK3imp5Image6heightEv(ptr noundef nonnull align 8 dereferenceable(88) %75)
          to label %77 unwind label %107

77:                                               ; preds = %67
  %78 = sitofp i32 %76 to float
  %79 = fdiv float %73, %78
  store float %79, ptr %20, align 4, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 40, ptr %21) #5
  call void @llvm.lifetime.start.p0(i64 40, ptr %22) #5
  call void @llvm.lifetime.start.p0(i64 40, ptr %23) #5
  %80 = load ptr, ptr %5, align 8, !tbaa !5
  %81 = invoke noundef float @_ZNK3imp3VecILi2EfEixEj(ptr noundef nonnull align 8 dereferenceable(32) %80, i32 noundef 0)
          to label %82 unwind label %111

82:                                               ; preds = %77
  %83 = load float, ptr %19, align 4, !tbaa !22
  %84 = fadd float %81, %83
  %85 = load ptr, ptr %5, align 8, !tbaa !5
  %86 = invoke noundef float @_ZNK3imp3VecILi2EfEixEj(ptr noundef nonnull align 8 dereferenceable(32) %85, i32 noundef 1)
          to label %87 unwind label %111

87:                                               ; preds = %82
  %88 = load float, ptr %20, align 4, !tbaa !22
  %89 = fadd float %86, %88
  invoke void @_ZN3imp12ImageSampler3getEff(ptr dead_on_unwind writable sret(%"class.imp::Vec4") align 8 %23, ptr noundef nonnull align 8 dereferenceable(89) %11, float noundef %84, float noundef %89)
          to label %90 unwind label %111

90:                                               ; preds = %87
  %91 = getelementptr inbounds %"struct.imp::MorphoOperation", ptr %25, i32 0, i32 2
  %92 = load i32, ptr %16, align 4, !tbaa !9
  %93 = load i32, ptr %18, align 4, !tbaa !9
  %94 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp6MatrixILi3ELi3EfEclEii(ptr noundef nonnull align 8 dereferenceable(60) %91, i32 noundef %92, i32 noundef %93)
          to label %95 unwind label %115

95:                                               ; preds = %90
  %96 = load float, ptr %94, align 4, !tbaa !22
  invoke void @_ZNK3imp3VecILi4EfEmlEf(ptr dead_on_unwind writable sret(%"class.imp::Vec.7") align 8 %22, ptr noundef nonnull align 8 dereferenceable(40) %23, float noundef %96)
          to label %97 unwind label %115

97:                                               ; preds = %95
  invoke void @_ZN3imp4Vec4C2ILi4EEERKNS_3VecIXT_EfEEf(ptr noundef nonnull align 8 dereferenceable(40) %21, ptr noundef nonnull align 8 dereferenceable(40) %22, float noundef 1.000000e+00)
          to label %98 unwind label %119

98:                                               ; preds = %97
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %22) #5
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %23) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr %22) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #5
  store i32 0, ptr %24, align 4, !tbaa !9
  br label %99

99:                                               ; preds = %154, %98
  %100 = load i32, ptr %24, align 4, !tbaa !9
  %101 = icmp slt i32 %100, 3
  br i1 %101, label %125, label %102

102:                                              ; preds = %99
  store i32 8, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #5
  br label %161

103:                                              ; preds = %59
  %104 = landingpad { ptr, i32 }
          cleanup
  %105 = extractvalue { ptr, i32 } %104, 0
  store ptr %105, ptr %13, align 8
  %106 = extractvalue { ptr, i32 } %104, 1
  store i32 %106, ptr %14, align 4
  br label %167

107:                                              ; preds = %67
  %108 = landingpad { ptr, i32 }
          cleanup
  %109 = extractvalue { ptr, i32 } %108, 0
  store ptr %109, ptr %13, align 8
  %110 = extractvalue { ptr, i32 } %108, 1
  store i32 %110, ptr %14, align 4
  br label %166

111:                                              ; preds = %87, %82, %77
  %112 = landingpad { ptr, i32 }
          cleanup
  %113 = extractvalue { ptr, i32 } %112, 0
  store ptr %113, ptr %13, align 8
  %114 = extractvalue { ptr, i32 } %112, 1
  store i32 %114, ptr %14, align 4
  br label %124

115:                                              ; preds = %95, %90
  %116 = landingpad { ptr, i32 }
          cleanup
  %117 = extractvalue { ptr, i32 } %116, 0
  store ptr %117, ptr %13, align 8
  %118 = extractvalue { ptr, i32 } %116, 1
  store i32 %118, ptr %14, align 4
  br label %123

119:                                              ; preds = %97
  %120 = landingpad { ptr, i32 }
          cleanup
  %121 = extractvalue { ptr, i32 } %120, 0
  store ptr %121, ptr %13, align 8
  %122 = extractvalue { ptr, i32 } %120, 1
  store i32 %122, ptr %14, align 4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %22) #5
  br label %123

123:                                              ; preds = %119, %115
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %23) #5
  br label %124

124:                                              ; preds = %123, %111
  call void @llvm.lifetime.end.p0(i64 40, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr %22) #5
  br label %165

125:                                              ; preds = %99
  %126 = getelementptr inbounds %"struct.imp::MorphoOperation", ptr %25, i32 0, i32 3
  %127 = load i32, ptr %126, align 8, !tbaa !11
  %128 = icmp slt i32 %127, 0
  br i1 %128, label %129, label %139

129:                                              ; preds = %125
  %130 = load i32, ptr %24, align 4, !tbaa !9
  %131 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi4EfEixEj(ptr noundef nonnull align 8 dereferenceable(40) %21, i32 noundef %130)
          to label %132 unwind label %157

132:                                              ; preds = %129
  %133 = load i32, ptr %24, align 4, !tbaa !9
  %134 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi4EfEixEj(ptr noundef nonnull align 8 dereferenceable(40) %15, i32 noundef %133)
          to label %135 unwind label %157

135:                                              ; preds = %132
  %136 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %131, ptr noundef nonnull align 4 dereferenceable(4) %134)
          to label %137 unwind label %157

137:                                              ; preds = %135
  %138 = load float, ptr %136, align 4, !tbaa !22
  br label %149

139:                                              ; preds = %125
  %140 = load i32, ptr %24, align 4, !tbaa !9
  %141 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi4EfEixEj(ptr noundef nonnull align 8 dereferenceable(40) %21, i32 noundef %140)
          to label %142 unwind label %157

142:                                              ; preds = %139
  %143 = load i32, ptr %24, align 4, !tbaa !9
  %144 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi4EfEixEj(ptr noundef nonnull align 8 dereferenceable(40) %15, i32 noundef %143)
          to label %145 unwind label %157

145:                                              ; preds = %142
  %146 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %141, ptr noundef nonnull align 4 dereferenceable(4) %144)
          to label %147 unwind label %157

147:                                              ; preds = %145
  %148 = load float, ptr %146, align 4, !tbaa !22
  br label %149

149:                                              ; preds = %147, %137
  %150 = phi float [ %138, %137 ], [ %148, %147 ]
  %151 = load i32, ptr %24, align 4, !tbaa !9
  %152 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi4EfEixEj(ptr noundef nonnull align 8 dereferenceable(40) %15, i32 noundef %151)
          to label %153 unwind label %157

153:                                              ; preds = %149
  store float %150, ptr %152, align 4, !tbaa !22
  br label %154

154:                                              ; preds = %153
  %155 = load i32, ptr %24, align 4, !tbaa !9
  %156 = add nsw i32 %155, 1
  store i32 %156, ptr %24, align 4, !tbaa !9
  br label %99, !llvm.loop !24

157:                                              ; preds = %149, %145, %142, %139, %135, %132, %129
  %158 = landingpad { ptr, i32 }
          cleanup
  %159 = extractvalue { ptr, i32 } %158, 0
  store ptr %159, ptr %13, align 8
  %160 = extractvalue { ptr, i32 } %158, 1
  store i32 %160, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #5
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %21) #5
  br label %165

161:                                              ; preds = %102
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %21) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  br label %162

162:                                              ; preds = %161
  %163 = load i32, ptr %18, align 4, !tbaa !9
  %164 = add nsw i32 %163, 1
  store i32 %164, ptr %18, align 4, !tbaa !9
  br label %54, !llvm.loop !26

165:                                              ; preds = %157, %124
  call void @llvm.lifetime.end.p0(i64 40, ptr %21) #5
  br label %166

166:                                              ; preds = %165, %107
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  br label %167

167:                                              ; preds = %166, %103
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  br label %181

168:                                              ; preds = %58
  br label %169

169:                                              ; preds = %168
  %170 = load i32, ptr %16, align 4, !tbaa !9
  %171 = add nsw i32 %170, 1
  store i32 %171, ptr %16, align 4, !tbaa !9
  br label %40, !llvm.loop !27

172:                                              ; preds = %44
  %173 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi4EfEixEj(ptr noundef nonnull align 8 dereferenceable(40) %15, i32 noundef 3)
          to label %174 unwind label %177

174:                                              ; preds = %172
  store float 1.000000e+00, ptr %173, align 4, !tbaa !22
  %175 = load ptr, ptr %6, align 8, !tbaa !5
  %176 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZN3imp4Vec4aSERKS0_(ptr noundef nonnull align 8 dereferenceable(40) %175, ptr noundef nonnull align 8 dereferenceable(40) %15) #5
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %15) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr %15) #5
  call void @_ZN3imp12ImageSamplerD2Ev(ptr noundef nonnull align 8 dereferenceable(89) %11) #5
  call void @llvm.lifetime.end.p0(i64 96, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  ret void

177:                                              ; preds = %172
  %178 = landingpad { ptr, i32 }
          cleanup
  %179 = extractvalue { ptr, i32 } %178, 0
  store ptr %179, ptr %13, align 8
  %180 = extractvalue { ptr, i32 } %178, 1
  store i32 %180, ptr %14, align 4
  br label %181

181:                                              ; preds = %177, %167
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %15) #5
  br label %182

182:                                              ; preds = %181, %49
  call void @llvm.lifetime.end.p0(i64 40, ptr %15) #5
  call void @_ZN3imp12ImageSamplerD2Ev(ptr noundef nonnull align 8 dereferenceable(89) %11) #5
  br label %183

183:                                              ; preds = %182, %45
  call void @llvm.lifetime.end.p0(i64 96, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  br label %184

184:                                              ; preds = %183
  %185 = load ptr, ptr %13, align 8
  %186 = load i32, ptr %14, align 4
  %187 = insertvalue { ptr, i32 } poison, ptr %185, 0
  %188 = insertvalue { ptr, i32 } %187, i32 %186, 1
  resume { ptr, i32 } %188
}

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp6MatrixILi3ELi3EfEclEii(ptr noundef nonnull align 8 dereferenceable(60), i32 noundef, i32 noundef) #4 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 #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(40) ptr @_ZN3imp4Vec4aSERKS0_(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(40)) #3 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 = { 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 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }

!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, !10, i64 104}
!12 = !{!"_ZTSN3imp15MorphoOperationE", !13, i64 0, !18, i64 24, !20, i64 40, !10, 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 = !{!"_ZTSSt10shared_ptrIN3imp5ImageEE", !19, i64 0}
!19 = !{!"_ZTSSt12__shared_ptrIN3imp5ImageELN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0, !17, i64 8}
!20 = !{!"_ZTSN3imp7Matrix3E", !21, i64 0}
!21 = !{!"_ZTSN3imp6MatrixILi3ELi3EfEE", !14, i64 0, !7, i64 24}
!22 = !{!23, !23, i64 0}
!23 = !{!"float", !7, i64 0}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}
!26 = distinct !{!26, !25}
!27 = distinct !{!27, !25}


; 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::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 noundef ptr @_ZNKSt19__shared_ptr_accessIN3imp5ImageELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #1 align 2

declare noundef i32 @_ZNK3imp5Image5widthEv(ptr noundef nonnull align 8 dereferenceable(88)) local_unnamed_addr #2

declare noundef i32 @_ZNK3imp5Image6heightEv(ptr noundef nonnull align 8 dereferenceable(88)) local_unnamed_addr #2

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3imp15MorphoOperation5applyERKNS_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 #4 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.imp::ImageSampler", align 8
  %5 = alloca %"class.std::shared_ptr", align 8
  %6 = alloca %"class.imp::Vec4", align 8
  %7 = alloca %"class.imp::Vec4", align 8
  %8 = alloca %"class.imp::Vec.7", align 8
  %9 = alloca %"class.imp::Vec4", align 8
  call void @llvm.lifetime.start.p0(i64 96, ptr nonnull %4) #5
  %10 = getelementptr inbounds i8, ptr %0, i64 24
  call void @_ZNSt10shared_ptrIN3imp5ImageEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 8 dereferenceable(16) %10) #5
  invoke void @_ZN3imp12ImageSamplerC1ESt10shared_ptrINS_5ImageEENS_7SamplerINS_4Vec2ENS_4Vec4EE8WrappingE(ptr noundef nonnull align 8 dereferenceable(89) %4, ptr noundef nonnull %5, i32 noundef 1)
          to label %.invoke unwind label %21

.invoke:                                          ; preds = %3
  call void @_ZNSt12__shared_ptrIN3imp5ImageELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #5
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %6) #5
  %11 = getelementptr inbounds i8, ptr %0, i64 104
  %12 = load i32, ptr %11, align 8, !tbaa !5
  %13 = icmp slt i32 %12, 0
  %. = select i1 %13, float 1.000000e+00, float 0.000000e+00
  invoke void @_ZN3imp4Vec4C2Ef(ptr noundef nonnull align 8 dereferenceable(40) %6, float noundef %.)
          to label %14 unwind label %23

14:                                               ; preds = %.invoke
  %15 = getelementptr inbounds i8, ptr %0, i64 40
  br label %.preheader

.preheader:                                       ; preds = %14, %25
  %.03645 = phi i32 [ 0, %14 ], [ %26, %25 ]
  %16 = add nsw i32 %.03645, -1
  %17 = sitofp i32 %16 to float
  br label %27

18:                                               ; preds = %25
  %19 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi4EfEixEj(ptr noundef nonnull align 8 dereferenceable(40) %6, i32 noundef 3)
  store float 1.000000e+00, ptr %19, align 4, !tbaa !20
  %20 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZN3imp4Vec4aSERKS0_(ptr noundef nonnull align 8 dereferenceable(40) %2, ptr noundef nonnull align 8 dereferenceable(40) %6) #5
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %6) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %6) #5
  call void @_ZN3imp12ImageSamplerD2Ev(ptr noundef nonnull align 8 dereferenceable(89) %4) #5
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %4) #5
  ret void

21:                                               ; preds = %3
  %22 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt12__shared_ptrIN3imp5ImageELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #5
  br label %97

23:                                               ; preds = %.invoke
  %24 = landingpad { ptr, i32 }
          cleanup
  br label %96

25:                                               ; preds = %91
  %26 = add nuw nsw i32 %.03645, 1
  %exitcond46.not = icmp eq i32 %26, 3
  br i1 %exitcond46.not, label %18, label %.preheader, !llvm.loop !22

27:                                               ; preds = %.preheader, %91
  %.03544 = phi i32 [ 0, %.preheader ], [ %94, %91 ]
  %28 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3imp5ImageELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %10) #5
  %29 = invoke noundef i32 @_ZNK3imp5Image5widthEv(ptr noundef nonnull align 8 dereferenceable(88) %28)
          to label %30 unwind label %53

30:                                               ; preds = %27
  %31 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3imp5ImageELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %10) #5
  %32 = invoke noundef i32 @_ZNK3imp5Image6heightEv(ptr noundef nonnull align 8 dereferenceable(88) %31)
          to label %33 unwind label %55

33:                                               ; preds = %30
  %34 = add nsw i32 %.03544, -1
  %35 = sitofp i32 %34 to float
  %36 = sitofp i32 %29 to float
  %37 = fdiv float %17, %36
  %38 = sitofp i32 %32 to float
  %39 = fdiv float %35, %38
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %7) #5
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %8) #5
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %9) #5
  %40 = call noundef float @_ZNK3imp3VecILi2EfEixEj(ptr noundef nonnull align 8 dereferenceable(32) %1, i32 noundef 0)
  %41 = fadd float %37, %40
  %42 = call noundef float @_ZNK3imp3VecILi2EfEixEj(ptr noundef nonnull align 8 dereferenceable(32) %1, i32 noundef 1)
  %43 = fadd float %39, %42
  invoke void @_ZN3imp12ImageSampler3getEff(ptr dead_on_unwind nonnull writable sret(%"class.imp::Vec4") align 8 %9, ptr noundef nonnull align 8 dereferenceable(89) %4, float noundef %41, float noundef %43)
          to label %44 unwind label %57

44:                                               ; preds = %33
  %45 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp6MatrixILi3ELi3EfEclEii(ptr noundef nonnull align 8 dereferenceable(60) %15, i32 noundef %.03645, i32 noundef %.03544)
          to label %46 unwind label %59

46:                                               ; preds = %44
  %47 = load float, ptr %45, align 4, !tbaa !20
  call void @_ZNK3imp3VecILi4EfEmlEf(ptr dead_on_unwind nonnull writable sret(%"class.imp::Vec.7") align 8 %8, ptr noundef nonnull align 8 dereferenceable(40) %9, float noundef %47)
  invoke void @_ZN3imp4Vec4C2ILi4EEERKNS_3VecIXT_EfEEf(ptr noundef nonnull align 8 dereferenceable(40) %7, ptr noundef nonnull align 8 dereferenceable(40) %8, float noundef 1.000000e+00)
          to label %48 unwind label %61

48:                                               ; preds = %46
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %8) #5
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %9) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %8) #5
  %49 = load i32, ptr %11, align 8, !tbaa !5
  %50 = icmp slt i32 %49, 0
  %51 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi4EfEixEj(ptr noundef nonnull align 8 dereferenceable(40) %7, i32 noundef 0)
  %52 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi4EfEixEj(ptr noundef nonnull align 8 dereferenceable(40) %6, i32 noundef 0)
  br i1 %50, label %65, label %67

53:                                               ; preds = %27
  %54 = landingpad { ptr, i32 }
          cleanup
  br label %95

55:                                               ; preds = %30
  %56 = landingpad { ptr, i32 }
          cleanup
  br label %95

57:                                               ; preds = %33
  %58 = landingpad { ptr, i32 }
          cleanup
  br label %64

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

61:                                               ; preds = %46
  %62 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %8) #5
  br label %63

63:                                               ; preds = %61, %59
  %.pn = phi { ptr, i32 } [ %62, %61 ], [ %60, %59 ]
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %9) #5
  br label %64

64:                                               ; preds = %63, %57
  %.pn.pn = phi { ptr, i32 } [ %.pn, %63 ], [ %58, %57 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %7) #5
  br label %95

65:                                               ; preds = %48
  %66 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %51, ptr noundef nonnull align 4 dereferenceable(4) %52)
  br label %69

67:                                               ; preds = %48
  %68 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %51, ptr noundef nonnull align 4 dereferenceable(4) %52)
  br label %69

69:                                               ; preds = %67, %65
  %.in = phi ptr [ %66, %65 ], [ %68, %67 ]
  %70 = load float, ptr %.in, align 4, !tbaa !20
  %71 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi4EfEixEj(ptr noundef nonnull align 8 dereferenceable(40) %6, i32 noundef 0)
  store float %70, ptr %71, align 4, !tbaa !20
  %72 = load i32, ptr %11, align 8, !tbaa !5
  %73 = icmp slt i32 %72, 0
  %74 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi4EfEixEj(ptr noundef nonnull align 8 dereferenceable(40) %7, i32 noundef 1)
  %75 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi4EfEixEj(ptr noundef nonnull align 8 dereferenceable(40) %6, i32 noundef 1)
  br i1 %73, label %78, label %76

76:                                               ; preds = %69
  %77 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %74, ptr noundef nonnull align 4 dereferenceable(4) %75)
  br label %80

78:                                               ; preds = %69
  %79 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %74, ptr noundef nonnull align 4 dereferenceable(4) %75)
  br label %80

80:                                               ; preds = %78, %76
  %.in.1 = phi ptr [ %79, %78 ], [ %77, %76 ]
  %81 = load float, ptr %.in.1, align 4, !tbaa !20
  %82 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi4EfEixEj(ptr noundef nonnull align 8 dereferenceable(40) %6, i32 noundef 1)
  store float %81, ptr %82, align 4, !tbaa !20
  %83 = load i32, ptr %11, align 8, !tbaa !5
  %84 = icmp slt i32 %83, 0
  %85 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi4EfEixEj(ptr noundef nonnull align 8 dereferenceable(40) %7, i32 noundef 2)
  %86 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi4EfEixEj(ptr noundef nonnull align 8 dereferenceable(40) %6, i32 noundef 2)
  br i1 %84, label %89, label %87

87:                                               ; preds = %80
  %88 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %85, ptr noundef nonnull align 4 dereferenceable(4) %86)
  br label %91

89:                                               ; preds = %80
  %90 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %85, ptr noundef nonnull align 4 dereferenceable(4) %86)
  br label %91

91:                                               ; preds = %89, %87
  %.in.2 = phi ptr [ %90, %89 ], [ %88, %87 ]
  %92 = load float, ptr %.in.2, align 4, !tbaa !20
  %93 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp3VecILi4EfEixEj(ptr noundef nonnull align 8 dereferenceable(40) %6, i32 noundef 2)
  store float %92, ptr %93, align 4, !tbaa !20
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %7) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %7) #5
  %94 = add nuw nsw i32 %.03544, 1
  %exitcond.not = icmp eq i32 %94, 3
  br i1 %exitcond.not, label %25, label %27, !llvm.loop !24

95:                                               ; preds = %55, %64, %53
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %54, %53 ], [ %.pn.pn, %64 ], [ %56, %55 ]
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %6) #5
  br label %96

96:                                               ; preds = %95, %23
  %.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn, %95 ], [ %24, %23 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %6) #5
  call void @_ZN3imp12ImageSamplerD2Ev(ptr noundef nonnull align 8 dereferenceable(89) %4) #5
  br label %97

97:                                               ; preds = %96, %21
  %.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn, %96 ], [ %22, %21 ]
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %4) #5
  resume { ptr, i32 } %.pn.pn.pn.pn.pn.pn
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNK3imp3VecILi4EfEmlEf(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 #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZN3imp6MatrixILi3ELi3EfEclEii(ptr noundef nonnull align 8 dereferenceable(60), i32 noundef, i32 noundef) local_unnamed_addr #4 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 #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(40) ptr @_ZN3imp4Vec4aSERKS0_(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #3 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 = { 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 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }

!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 104}
!6 = !{!"_ZTSN3imp15MorphoOperationE", !7, i64 0, !15, i64 24, !17, i64 40, !19, i64 104}
!7 = !{!"_ZTSN3imp14ImageOperationE", !8, i64 0}
!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 = !{!"_ZTSSt10shared_ptrIN3imp5ImageEE", !16, i64 0}
!16 = !{!"_ZTSSt12__shared_ptrIN3imp5ImageELN9__gnu_cxx12_Lock_policyE2EE", !11, i64 0, !14, i64 8}
!17 = !{!"_ZTSN3imp7Matrix3E", !18, i64 0}
!18 = !{!"_ZTSN3imp6MatrixILi3ELi3EfEE", !8, i64 0, !12, i64 24}
!19 = !{!"int", !12, i64 0}
!20 = !{!21, !21, i64 0}
!21 = !{!"float", !12, i64 0}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = distinct !{!24, !23}


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