; LLVM IR from goldest-star/seawave-animation :: src/vcl/opengl/texture/image/image.ll (ZNK3vcl9image_raw13to_buffer_rgbEv)

; 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"

%"struct.vcl::buffer2D" = type { %"struct.std::array", %"struct.vcl::buffer" }
%"struct.std::array" = type { [2 x i64] }
%"struct.vcl::buffer" = type { %"class.std::vector.0" }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<vcl::buffer_stack<float, 3>, std::allocator<vcl::buffer_stack<float, 3>>>::_Vector_impl" }
%"struct.std::_Vector_base<vcl::buffer_stack<float, 3>, std::allocator<vcl::buffer_stack<float, 3>>>::_Vector_impl" = type { %"struct.std::_Vector_base<vcl::buffer_stack<float, 3>, std::allocator<vcl::buffer_stack<float, 3>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<vcl::buffer_stack<float, 3>, std::allocator<vcl::buffer_stack<float, 3>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.vcl::buffer_stack" = type { float, float, float }
%"struct.vcl::image_raw" = type { i32, i32, i32, %"class.std::vector" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" = type { ptr, ptr, ptr }

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK3vcl9image_raw13to_buffer_rgbEv(ptr dead_on_unwind noalias writable sret(%"struct.vcl::buffer2D") align 8 %0, ptr noundef nonnull align 8 dereferenceable(40) %1) #0 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i1, align 1
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i64, align 8
  %9 = alloca i32, align 4
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca %"struct.vcl::buffer_stack", align 4
  %13 = alloca %"struct.vcl::buffer_stack", align 4
  store ptr %0, ptr %3, align 8
  store ptr %1, ptr %4, align 8, !tbaa !5
  %14 = load ptr, ptr %4, align 8
  store i1 false, ptr %5, align 1
  call void @_ZN3vcl8buffer2DINS_12buffer_stackIfLm3EEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(40) %0)
  %15 = getelementptr inbounds %"struct.vcl::image_raw", ptr %14, i32 0, i32 0
  %16 = load i32, ptr %15, align 8, !tbaa !9
  %17 = zext i32 %16 to i64
  %18 = getelementptr inbounds %"struct.vcl::image_raw", ptr %14, i32 0, i32 1
  %19 = load i32, ptr %18, align 4, !tbaa !17
  %20 = zext i32 %19 to i64
  invoke void @_ZN3vcl8buffer2DINS_12buffer_stackIfLm3EEEE6resizeEmm(ptr noundef nonnull align 8 dereferenceable(40) %0, i64 noundef %17, i64 noundef %20)
          to label %21 unwind label %29

21:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  store i64 0, ptr %8, align 8, !tbaa !18
  br label %22

22:                                               ; preds = %140, %21
  %23 = load i64, ptr %8, align 8, !tbaa !18
  %24 = getelementptr inbounds %"struct.vcl::image_raw", ptr %14, i32 0, i32 0
  %25 = load i32, ptr %24, align 8, !tbaa !9
  %26 = zext i32 %25 to i64
  %27 = icmp ult i64 %23, %26
  br i1 %27, label %33, label %28

28:                                               ; preds = %22
  store i32 2, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  br label %143

29:                                               ; preds = %2
  %30 = landingpad { ptr, i32 }
          cleanup
  %31 = extractvalue { ptr, i32 } %30, 0
  store ptr %31, ptr %6, align 8
  %32 = extractvalue { ptr, i32 } %30, 1
  store i32 %32, ptr %7, align 4
  br label %147

33:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  store i64 0, ptr %10, align 8, !tbaa !18
  br label %34

34:                                               ; preds = %135, %33
  %35 = load i64, ptr %10, align 8, !tbaa !18
  %36 = getelementptr inbounds %"struct.vcl::image_raw", ptr %14, i32 0, i32 1
  %37 = load i32, ptr %36, align 4, !tbaa !17
  %38 = zext i32 %37 to i64
  %39 = icmp ult i64 %35, %38
  br i1 %39, label %41, label %40

40:                                               ; preds = %34
  store i32 5, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  br label %139

41:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  %42 = load i64, ptr %8, align 8, !tbaa !18
  %43 = getelementptr inbounds %"struct.vcl::image_raw", ptr %14, i32 0, i32 0
  %44 = load i32, ptr %43, align 8, !tbaa !9
  %45 = zext i32 %44 to i64
  %46 = load i64, ptr %10, align 8, !tbaa !18
  %47 = mul i64 %45, %46
  %48 = add i64 %42, %47
  store i64 %48, ptr %11, align 8, !tbaa !18
  %49 = getelementptr inbounds %"struct.vcl::image_raw", ptr %14, i32 0, i32 2
  %50 = load i32, ptr %49, align 8, !tbaa !20
  %51 = icmp eq i32 %50, 0
  br i1 %51, label %52, label %93

52:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 12, ptr %12) #6
  %53 = getelementptr inbounds %"struct.vcl::image_raw", ptr %14, i32 0, i32 3
  %54 = load i64, ptr %11, align 8, !tbaa !18
  %55 = mul i64 3, %54
  %56 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %53, i64 noundef %55) #6
  %57 = load i8, ptr %56, align 1, !tbaa !21
  %58 = zext i8 %57 to i32
  %59 = sitofp i32 %58 to float
  %60 = fdiv float %59, 2.550000e+02
  %61 = getelementptr inbounds %"struct.vcl::image_raw", ptr %14, i32 0, i32 3
  %62 = load i64, ptr %11, align 8, !tbaa !18
  %63 = mul i64 3, %62
  %64 = add i64 %63, 1
  %65 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %61, i64 noundef %64) #6
  %66 = load i8, ptr %65, align 1, !tbaa !21
  %67 = zext i8 %66 to i32
  %68 = sitofp i32 %67 to float
  %69 = fdiv float %68, 2.550000e+02
  %70 = getelementptr inbounds %"struct.vcl::image_raw", ptr %14, i32 0, i32 3
  %71 = load i64, ptr %11, align 8, !tbaa !18
  %72 = mul i64 3, %71
  %73 = add i64 %72, 2
  %74 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %70, i64 noundef %73) #6
  %75 = load i8, ptr %74, align 1, !tbaa !21
  %76 = zext i8 %75 to i32
  %77 = sitofp i32 %76 to float
  %78 = fdiv float %77, 2.550000e+02
  invoke void @_ZN3vcl12buffer_stackIfLm3EEC1Efff(ptr noundef nonnull align 4 dereferenceable(12) %12, float noundef %60, float noundef %69, float noundef %78)
          to label %79 unwind label %89

79:                                               ; preds = %52
  %80 = load i64, ptr %8, align 8, !tbaa !18
  %81 = getelementptr inbounds %"struct.vcl::image_raw", ptr %14, i32 0, i32 1
  %82 = load i32, ptr %81, align 4, !tbaa !17
  %83 = sub i32 %82, 1
  %84 = zext i32 %83 to i64
  %85 = load i64, ptr %10, align 8, !tbaa !18
  %86 = sub i64 %84, %85
  %87 = invoke noundef nonnull align 4 dereferenceable(12) ptr @_ZN3vcl8buffer2DINS_12buffer_stackIfLm3EEEEclEmm(ptr noundef nonnull align 8 dereferenceable(40) %0, i64 noundef %80, i64 noundef %86)
          to label %88 unwind label %89

88:                                               ; preds = %79
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %87, ptr align 4 %12, i64 12, i1 false), !tbaa.struct !22
  call void @llvm.lifetime.end.p0(i64 12, ptr %12) #6
  br label %134

89:                                               ; preds = %79, %52
  %90 = landingpad { ptr, i32 }
          cleanup
  %91 = extractvalue { ptr, i32 } %90, 0
  store ptr %91, ptr %6, align 8
  %92 = extractvalue { ptr, i32 } %90, 1
  store i32 %92, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 12, ptr %12) #6
  br label %138

93:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 12, ptr %13) #6
  %94 = getelementptr inbounds %"struct.vcl::image_raw", ptr %14, i32 0, i32 3
  %95 = load i64, ptr %11, align 8, !tbaa !18
  %96 = mul i64 4, %95
  %97 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %94, i64 noundef %96) #6
  %98 = load i8, ptr %97, align 1, !tbaa !21
  %99 = zext i8 %98 to i32
  %100 = sitofp i32 %99 to float
  %101 = fdiv float %100, 2.550000e+02
  %102 = getelementptr inbounds %"struct.vcl::image_raw", ptr %14, i32 0, i32 3
  %103 = load i64, ptr %11, align 8, !tbaa !18
  %104 = mul i64 4, %103
  %105 = add i64 %104, 1
  %106 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %102, i64 noundef %105) #6
  %107 = load i8, ptr %106, align 1, !tbaa !21
  %108 = zext i8 %107 to i32
  %109 = sitofp i32 %108 to float
  %110 = fdiv float %109, 2.550000e+02
  %111 = getelementptr inbounds %"struct.vcl::image_raw", ptr %14, i32 0, i32 3
  %112 = load i64, ptr %11, align 8, !tbaa !18
  %113 = mul i64 4, %112
  %114 = add i64 %113, 2
  %115 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %111, i64 noundef %114) #6
  %116 = load i8, ptr %115, align 1, !tbaa !21
  %117 = zext i8 %116 to i32
  %118 = sitofp i32 %117 to float
  %119 = fdiv float %118, 2.550000e+02
  invoke void @_ZN3vcl12buffer_stackIfLm3EEC1Efff(ptr noundef nonnull align 4 dereferenceable(12) %13, float noundef %101, float noundef %110, float noundef %119)
          to label %120 unwind label %130

120:                                              ; preds = %93
  %121 = load i64, ptr %8, align 8, !tbaa !18
  %122 = getelementptr inbounds %"struct.vcl::image_raw", ptr %14, i32 0, i32 1
  %123 = load i32, ptr %122, align 4, !tbaa !17
  %124 = sub i32 %123, 1
  %125 = zext i32 %124 to i64
  %126 = load i64, ptr %10, align 8, !tbaa !18
  %127 = sub i64 %125, %126
  %128 = invoke noundef nonnull align 4 dereferenceable(12) ptr @_ZN3vcl8buffer2DINS_12buffer_stackIfLm3EEEEclEmm(ptr noundef nonnull align 8 dereferenceable(40) %0, i64 noundef %121, i64 noundef %127)
          to label %129 unwind label %130

129:                                              ; preds = %120
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %128, ptr align 4 %13, i64 12, i1 false), !tbaa.struct !22
  call void @llvm.lifetime.end.p0(i64 12, ptr %13) #6
  br label %134

130:                                              ; preds = %120, %93
  %131 = landingpad { ptr, i32 }
          cleanup
  %132 = extractvalue { ptr, i32 } %131, 0
  store ptr %132, ptr %6, align 8
  %133 = extractvalue { ptr, i32 } %131, 1
  store i32 %133, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 12, ptr %13) #6
  br label %138

134:                                              ; preds = %129, %88
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  br label %135

135:                                              ; preds = %134
  %136 = load i64, ptr %10, align 8, !tbaa !18
  %137 = add i64 %136, 1
  store i64 %137, ptr %10, align 8, !tbaa !18
  br label %34, !llvm.loop !25

138:                                              ; preds = %130, %89
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  br label %147

139:                                              ; preds = %40
  br label %140

140:                                              ; preds = %139
  %141 = load i64, ptr %8, align 8, !tbaa !18
  %142 = add i64 %141, 1
  store i64 %142, ptr %8, align 8, !tbaa !18
  br label %22, !llvm.loop !27

143:                                              ; preds = %28
  store i1 true, ptr %5, align 1
  store i32 1, ptr %9, align 4
  %144 = load i1, ptr %5, align 1
  br i1 %144, label %146, label %145

145:                                              ; preds = %143
  call void @_ZN3vcl8buffer2DINS_12buffer_stackIfLm3EEEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %0) #6
  br label %146

146:                                              ; preds = %145, %143
  ret void

147:                                              ; preds = %138, %29
  call void @_ZN3vcl8buffer2DINS_12buffer_stackIfLm3EEEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %0) #6
  br label %148

148:                                              ; preds = %147
  %149 = load ptr, ptr %6, align 8
  %150 = load i32, ptr %7, align 4
  %151 = insertvalue { ptr, i32 } poison, ptr %149, 0
  %152 = insertvalue { ptr, i32 } %151, i32 %150, 1
  resume { ptr, i32 } %152
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3vcl8buffer2DINS_12buffer_stackIfLm3EEEE6resizeEmm(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef, i64 noundef) #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 nonnull align 1 dereferenceable(1) ptr @_ZNKSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #2 align 2

declare void @_ZN3vcl12buffer_stackIfLm3EEC1Efff(ptr noundef nonnull align 4 dereferenceable(12), float noundef, float noundef, float noundef) unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZN3vcl8buffer2DINS_12buffer_stackIfLm3EEEEclEmm(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef, i64 noundef) #0 align 2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4

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

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

!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, !11, i64 0}
!10 = !{!"_ZTSN3vcl9image_rawE", !11, i64 0, !11, i64 4, !12, i64 8, !13, i64 16}
!11 = !{!"int", !7, i64 0}
!12 = !{!"_ZTSN3vcl16image_color_typeE", !7, i64 0}
!13 = !{!"_ZTSSt6vectorIhSaIhEE", !14, i64 0}
!14 = !{!"_ZTSSt12_Vector_baseIhSaIhEE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseIhSaIhEE12_Vector_implE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseIhSaIhEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!17 = !{!10, !11, i64 4}
!18 = !{!19, !19, i64 0}
!19 = !{!"long", !7, i64 0}
!20 = !{!10, !12, i64 8}
!21 = !{!7, !7, i64 0}
!22 = !{i64 0, i64 4, !23, i64 4, i64 4, !23, i64 8, i64 4, !23}
!23 = !{!24, !24, i64 0}
!24 = !{!"float", !7, i64 0}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = distinct !{!27, !26}


; 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"

%"struct.vcl::buffer2D" = type { %"struct.std::array", %"struct.vcl::buffer" }
%"struct.std::array" = type { [2 x i64] }
%"struct.vcl::buffer" = type { %"class.std::vector.0" }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<vcl::buffer_stack<float, 3>, std::allocator<vcl::buffer_stack<float, 3>>>::_Vector_impl" }
%"struct.std::_Vector_base<vcl::buffer_stack<float, 3>, std::allocator<vcl::buffer_stack<float, 3>>>::_Vector_impl" = type { %"struct.std::_Vector_base<vcl::buffer_stack<float, 3>, std::allocator<vcl::buffer_stack<float, 3>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<vcl::buffer_stack<float, 3>, std::allocator<vcl::buffer_stack<float, 3>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.vcl::buffer_stack" = type { float, float, float }

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK3vcl9image_raw13to_buffer_rgbEv(ptr dead_on_unwind noalias nonnull writable sret(%"struct.vcl::buffer2D") align 8 %0, ptr noundef nonnull align 8 dereferenceable(40) %1) local_unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"struct.vcl::buffer_stack", align 4
  %4 = alloca %"struct.vcl::buffer_stack", align 4
  tail call void @_ZN3vcl8buffer2DINS_12buffer_stackIfLm3EEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(40) %0)
  %5 = load i32, ptr %1, align 8, !tbaa !5
  %6 = zext i32 %5 to i64
  %7 = getelementptr inbounds i8, ptr %1, i64 4
  %8 = load i32, ptr %7, align 4, !tbaa !16
  %9 = zext i32 %8 to i64
  invoke void @_ZN3vcl8buffer2DINS_12buffer_stackIfLm3EEEE6resizeEmm(ptr noundef nonnull align 8 dereferenceable(40) %0, i64 noundef %6, i64 noundef %9)
          to label %.preheader25 unwind label %15

.preheader25:                                     ; preds = %2
  %10 = load i32, ptr %1, align 8, !tbaa !5
  %.not = icmp eq i32 %10, 0
  br i1 %.not, label %._crit_edge28, label %.preheader.lr.ph

.preheader.lr.ph:                                 ; preds = %.preheader25
  %11 = getelementptr inbounds i8, ptr %1, i64 8
  %12 = getelementptr inbounds i8, ptr %1, i64 16
  %.pre = load i32, ptr %7, align 4, !tbaa !16
  br label %.preheader

.preheader:                                       ; preds = %.preheader.lr.ph, %._crit_edge
  %13 = phi i32 [ %10, %.preheader.lr.ph ], [ %17, %._crit_edge ]
  %14 = phi i32 [ %.pre, %.preheader.lr.ph ], [ %18, %._crit_edge ]
  %.01927 = phi i64 [ 0, %.preheader.lr.ph ], [ %19, %._crit_edge ]
  %.not29 = icmp eq i32 %14, 0
  br i1 %.not29, label %._crit_edge, label %.lr.ph

15:                                               ; preds = %2
  %16 = landingpad { ptr, i32 }
          cleanup
  br label %83

._crit_edge.loopexit:                             ; preds = %78
  %.pre30 = load i32, ptr %1, align 8, !tbaa !5
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.preheader
  %17 = phi i32 [ %.pre30, %._crit_edge.loopexit ], [ %13, %.preheader ]
  %18 = phi i32 [ %80, %._crit_edge.loopexit ], [ 0, %.preheader ]
  %19 = add nuw nsw i64 %.01927, 1
  %20 = zext i32 %17 to i64
  %21 = icmp ult i64 %19, %20
  br i1 %21, label %.preheader, label %._crit_edge28, !llvm.loop !17

.lr.ph:                                           ; preds = %.preheader, %78
  %.026 = phi i64 [ %79, %78 ], [ 0, %.preheader ]
  %22 = load i32, ptr %1, align 8, !tbaa !5
  %23 = zext i32 %22 to i64
  %24 = mul nuw i64 %.026, %23
  %25 = add nuw i64 %24, %.01927
  %26 = load i32, ptr %11, align 8, !tbaa !19
  %27 = icmp eq i32 %26, 0
  br i1 %27, label %28, label %53

28:                                               ; preds = %.lr.ph
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %3) #6
  %29 = mul i64 %25, 3
  %30 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %29) #6
  %31 = load i8, ptr %30, align 1, !tbaa !20
  %32 = uitofp i8 %31 to float
  %33 = fdiv float %32, 2.550000e+02
  %34 = add i64 %29, 1
  %35 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %34) #6
  %36 = load i8, ptr %35, align 1, !tbaa !20
  %37 = uitofp i8 %36 to float
  %38 = fdiv float %37, 2.550000e+02
  %39 = add i64 %29, 2
  %40 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %39) #6
  %41 = load i8, ptr %40, align 1, !tbaa !20
  %42 = uitofp i8 %41 to float
  %43 = fdiv float %42, 2.550000e+02
  invoke void @_ZN3vcl12buffer_stackIfLm3EEC1Efff(ptr noundef nonnull align 4 dereferenceable(12) %3, float noundef %33, float noundef %38, float noundef %43)
          to label %44 unwind label %51

44:                                               ; preds = %28
  %45 = load i32, ptr %7, align 4, !tbaa !16
  %46 = add i32 %45, -1
  %47 = zext i32 %46 to i64
  %48 = sub nsw i64 %47, %.026
  %49 = invoke noundef nonnull align 4 dereferenceable(12) ptr @_ZN3vcl8buffer2DINS_12buffer_stackIfLm3EEEEclEmm(ptr noundef nonnull align 8 dereferenceable(40) %0, i64 noundef %.01927, i64 noundef %48)
          to label %50 unwind label %51

50:                                               ; preds = %44
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %49, ptr noundef nonnull align 4 dereferenceable(12) %3, i64 12, i1 false), !tbaa.struct !21
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %3) #6
  br label %78

51:                                               ; preds = %44, %28
  %52 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %3) #6
  br label %83

53:                                               ; preds = %.lr.ph
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %4) #6
  %54 = shl i64 %25, 2
  %55 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %54) #6
  %56 = load i8, ptr %55, align 1, !tbaa !20
  %57 = uitofp i8 %56 to float
  %58 = fdiv float %57, 2.550000e+02
  %59 = or disjoint i64 %54, 1
  %60 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %59) #6
  %61 = load i8, ptr %60, align 1, !tbaa !20
  %62 = uitofp i8 %61 to float
  %63 = fdiv float %62, 2.550000e+02
  %64 = or disjoint i64 %54, 2
  %65 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %64) #6
  %66 = load i8, ptr %65, align 1, !tbaa !20
  %67 = uitofp i8 %66 to float
  %68 = fdiv float %67, 2.550000e+02
  invoke void @_ZN3vcl12buffer_stackIfLm3EEC1Efff(ptr noundef nonnull align 4 dereferenceable(12) %4, float noundef %58, float noundef %63, float noundef %68)
          to label %69 unwind label %76

69:                                               ; preds = %53
  %70 = load i32, ptr %7, align 4, !tbaa !16
  %71 = add i32 %70, -1
  %72 = zext i32 %71 to i64
  %73 = sub nsw i64 %72, %.026
  %74 = invoke noundef nonnull align 4 dereferenceable(12) ptr @_ZN3vcl8buffer2DINS_12buffer_stackIfLm3EEEEclEmm(ptr noundef nonnull align 8 dereferenceable(40) %0, i64 noundef %.01927, i64 noundef %73)
          to label %75 unwind label %76

75:                                               ; preds = %69
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %74, ptr noundef nonnull align 4 dereferenceable(12) %4, i64 12, i1 false), !tbaa.struct !21
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %4) #6
  br label %78

76:                                               ; preds = %69, %53
  %77 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %4) #6
  br label %83

78:                                               ; preds = %75, %50
  %79 = add nuw nsw i64 %.026, 1
  %80 = load i32, ptr %7, align 4, !tbaa !16
  %81 = zext i32 %80 to i64
  %82 = icmp ult i64 %79, %81
  br i1 %82, label %.lr.ph, label %._crit_edge.loopexit, !llvm.loop !24

._crit_edge28:                                    ; preds = %._crit_edge, %.preheader25
  ret void

83:                                               ; preds = %51, %76, %15
  %.pn.pn = phi { ptr, i32 } [ %16, %15 ], [ %52, %51 ], [ %77, %76 ]
  call void @_ZN3vcl8buffer2DINS_12buffer_stackIfLm3EEEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %0) #6
  resume { ptr, i32 } %.pn.pn
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3vcl8buffer2DINS_12buffer_stackIfLm3EEEE6resizeEmm(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef, i64 noundef) local_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 nonnull align 1 dereferenceable(1) ptr @_ZNKSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #2 align 2

declare void @_ZN3vcl12buffer_stackIfLm3EEC1Efff(ptr noundef nonnull align 4 dereferenceable(12), float noundef, float noundef, float noundef) unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZN3vcl8buffer2DINS_12buffer_stackIfLm3EEEEclEmm(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef, i64 noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4

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

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

!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, !7, i64 0}
!6 = !{!"_ZTSN3vcl9image_rawE", !7, i64 0, !7, i64 4, !10, i64 8, !11, i64 16}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSN3vcl16image_color_typeE", !8, i64 0}
!11 = !{!"_ZTSSt6vectorIhSaIhEE", !12, i64 0}
!12 = !{!"_ZTSSt12_Vector_baseIhSaIhEE", !13, i64 0}
!13 = !{!"_ZTSNSt12_Vector_baseIhSaIhEE12_Vector_implE", !14, i64 0}
!14 = !{!"_ZTSNSt12_Vector_baseIhSaIhEE17_Vector_impl_dataE", !15, i64 0, !15, i64 8, !15, i64 16}
!15 = !{!"any pointer", !8, i64 0}
!16 = !{!6, !7, i64 4}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = !{!6, !10, i64 8}
!20 = !{!8, !8, i64 0}
!21 = !{i64 0, i64 4, !22, i64 4, i64 4, !22, i64 8, i64 4, !22}
!22 = !{!23, !23, i64 0}
!23 = !{!"float", !8, i64 0}
!24 = distinct !{!24, !18}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass