; LLVM IR from HRI-EU/Rcs :: src/RcsCore/ViaPointSequence.ll (ZNK3Rcs16ViaPointSequence10computeRHSEP6_MatNdd)

; 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.Rcs::ViaPointSequence" = type { ptr, ptr, ptr, ptr, ptr, ptr, i8, i32, %"class.std::vector", %"class.std::vector.0" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct._MatNd = type { ptr, i32, i32, i32, i8 }

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

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

declare void @MatNd_reshape(ptr noundef, i32 noundef, i32 noundef) #1

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK3Rcs16ViaPointSequence10computeRHSEP6_MatNdd(ptr noundef nonnull align 8 dereferenceable(104) %0, ptr noundef %1, double noundef %2) #3 align 2 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca double, align 8
  %7 = alloca double, align 8
  %8 = alloca double, align 8
  %9 = alloca double, align 8
  %10 = alloca double, align 8
  %11 = alloca i64, align 8
  %12 = alloca double, align 8
  %13 = alloca double, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store double %2, ptr %6, align 8, !tbaa !9
  %14 = load ptr, ptr %4, align 8
  %15 = load ptr, ptr %5, align 8, !tbaa !5
  %16 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %14, i32 0, i32 8
  %17 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %16) #4
  %18 = trunc i64 %17 to i32
  call void @MatNd_reshape(ptr noundef %15, i32 noundef %18, i32 noundef 1)
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  %19 = load double, ptr %6, align 8, !tbaa !9
  %20 = load double, ptr %6, align 8, !tbaa !9
  %21 = fmul double %19, %20
  store double %21, ptr %7, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  %22 = load double, ptr %7, align 8, !tbaa !9
  %23 = load double, ptr %6, align 8, !tbaa !9
  %24 = fmul double %22, %23
  store double %24, ptr %8, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %25 = load double, ptr %7, align 8, !tbaa !9
  %26 = load double, ptr %7, align 8, !tbaa !9
  %27 = fmul double %25, %26
  store double %27, ptr %9, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  %28 = load double, ptr %8, align 8, !tbaa !9
  %29 = load double, ptr %7, align 8, !tbaa !9
  %30 = fmul double %28, %29
  store double %30, ptr %10, align 8, !tbaa !9
  %31 = load double, ptr %10, align 8, !tbaa !9
  %32 = load ptr, ptr %5, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct._MatNd, ptr %32, i32 0, i32 0
  %34 = load ptr, ptr %33, align 8, !tbaa !11
  %35 = load ptr, ptr %5, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct._MatNd, ptr %35, i32 0, i32 2
  %37 = load i32, ptr %36, align 4, !tbaa !15
  %38 = mul i32 0, %37
  %39 = add i32 %38, 0
  %40 = zext i32 %39 to i64
  %41 = getelementptr inbounds double, ptr %34, i64 %40
  store double %31, ptr %41, align 8, !tbaa !9
  %42 = load double, ptr %9, align 8, !tbaa !9
  %43 = load ptr, ptr %5, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct._MatNd, ptr %43, i32 0, i32 0
  %45 = load ptr, ptr %44, align 8, !tbaa !11
  %46 = load ptr, ptr %5, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct._MatNd, ptr %46, i32 0, i32 2
  %48 = load i32, ptr %47, align 4, !tbaa !15
  %49 = mul i32 1, %48
  %50 = add i32 %49, 0
  %51 = zext i32 %50 to i64
  %52 = getelementptr inbounds double, ptr %45, i64 %51
  store double %42, ptr %52, align 8, !tbaa !9
  %53 = load double, ptr %8, align 8, !tbaa !9
  %54 = load ptr, ptr %5, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct._MatNd, ptr %54, i32 0, i32 0
  %56 = load ptr, ptr %55, align 8, !tbaa !11
  %57 = load ptr, ptr %5, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct._MatNd, ptr %57, i32 0, i32 2
  %59 = load i32, ptr %58, align 4, !tbaa !15
  %60 = mul i32 2, %59
  %61 = add i32 %60, 0
  %62 = zext i32 %61 to i64
  %63 = getelementptr inbounds double, ptr %56, i64 %62
  store double %53, ptr %63, align 8, !tbaa !9
  %64 = load double, ptr %7, align 8, !tbaa !9
  %65 = load ptr, ptr %5, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct._MatNd, ptr %65, i32 0, i32 0
  %67 = load ptr, ptr %66, align 8, !tbaa !11
  %68 = load ptr, ptr %5, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct._MatNd, ptr %68, i32 0, i32 2
  %70 = load i32, ptr %69, align 4, !tbaa !15
  %71 = mul i32 3, %70
  %72 = add i32 %71, 0
  %73 = zext i32 %72 to i64
  %74 = getelementptr inbounds double, ptr %67, i64 %73
  store double %64, ptr %74, align 8, !tbaa !9
  %75 = load double, ptr %6, align 8, !tbaa !9
  %76 = load ptr, ptr %5, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct._MatNd, ptr %76, i32 0, i32 0
  %78 = load ptr, ptr %77, align 8, !tbaa !11
  %79 = load ptr, ptr %5, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct._MatNd, ptr %79, i32 0, i32 2
  %81 = load i32, ptr %80, align 4, !tbaa !15
  %82 = mul i32 4, %81
  %83 = add i32 %82, 0
  %84 = zext i32 %83 to i64
  %85 = getelementptr inbounds double, ptr %78, i64 %84
  store double %75, ptr %85, align 8, !tbaa !9
  %86 = load ptr, ptr %5, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct._MatNd, ptr %86, i32 0, i32 0
  %88 = load ptr, ptr %87, align 8, !tbaa !11
  %89 = load ptr, ptr %5, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct._MatNd, ptr %89, i32 0, i32 2
  %91 = load i32, ptr %90, align 4, !tbaa !15
  %92 = mul i32 5, %91
  %93 = add i32 %92, 0
  %94 = zext i32 %93 to i64
  %95 = getelementptr inbounds double, ptr %88, i64 %94
  store double 1.000000e+00, ptr %95, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  store i64 3, ptr %11, align 8, !tbaa !16
  br label %96

96:                                               ; preds = %187, %3
  %97 = load i64, ptr %11, align 8, !tbaa !16
  %98 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %14, i32 0, i32 8
  %99 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %98) #4
  %100 = sub i64 %99, 3
  %101 = icmp ult i64 %97, %100
  br i1 %101, label %103, label %102

102:                                              ; preds = %96
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  br label %190

103:                                              ; preds = %96
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  %104 = load double, ptr %6, align 8, !tbaa !9
  %105 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %14, i32 0, i32 9
  %106 = load i64, ptr %11, align 8, !tbaa !16
  %107 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %105, i64 noundef %106) #4
  %108 = load double, ptr %107, align 8, !tbaa !9
  %109 = fsub double %104, %108
  store double %109, ptr %12, align 8, !tbaa !9
  %110 = load double, ptr %12, align 8, !tbaa !9
  %111 = fcmp ogt double %110, 0.000000e+00
  br i1 %111, label %112, label %186

112:                                              ; preds = %103
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  %113 = load double, ptr %12, align 8, !tbaa !9
  %114 = load double, ptr %12, align 8, !tbaa !9
  %115 = fmul double %113, %114
  store double %115, ptr %13, align 8, !tbaa !9
  %116 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %14, i32 0, i32 8
  %117 = load i64, ptr %11, align 8, !tbaa !16
  %118 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %116, i64 noundef %117) #4
  %119 = load i32, ptr %118, align 4, !tbaa !18
  %120 = icmp eq i32 %119, 0
  br i1 %120, label %121, label %139

121:                                              ; preds = %112
  %122 = load double, ptr %13, align 8, !tbaa !9
  %123 = load double, ptr %13, align 8, !tbaa !9
  %124 = fmul double %122, %123
  %125 = load double, ptr %12, align 8, !tbaa !9
  %126 = fmul double %124, %125
  %127 = load ptr, ptr %5, align 8, !tbaa !5
  %128 = getelementptr inbounds %struct._MatNd, ptr %127, i32 0, i32 0
  %129 = load ptr, ptr %128, align 8, !tbaa !11
  %130 = load i64, ptr %11, align 8, !tbaa !16
  %131 = add i64 %130, 3
  %132 = load ptr, ptr %5, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct._MatNd, ptr %132, i32 0, i32 2
  %134 = load i32, ptr %133, align 4, !tbaa !15
  %135 = zext i32 %134 to i64
  %136 = mul i64 %131, %135
  %137 = add i64 %136, 0
  %138 = getelementptr inbounds double, ptr %129, i64 %137
  store double %126, ptr %138, align 8, !tbaa !9
  br label %185

139:                                              ; preds = %112
  %140 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %14, i32 0, i32 8
  %141 = load i64, ptr %11, align 8, !tbaa !16
  %142 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %140, i64 noundef %141) #4
  %143 = load i32, ptr %142, align 4, !tbaa !18
  %144 = icmp eq i32 %143, 1
  br i1 %144, label %145, label %161

145:                                              ; preds = %139
  %146 = load double, ptr %13, align 8, !tbaa !9
  %147 = load double, ptr %13, align 8, !tbaa !9
  %148 = fmul double %146, %147
  %149 = load ptr, ptr %5, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct._MatNd, ptr %149, i32 0, i32 0
  %151 = load ptr, ptr %150, align 8, !tbaa !11
  %152 = load i64, ptr %11, align 8, !tbaa !16
  %153 = add i64 %152, 3
  %154 = load ptr, ptr %5, align 8, !tbaa !5
  %155 = getelementptr inbounds %struct._MatNd, ptr %154, i32 0, i32 2
  %156 = load i32, ptr %155, align 4, !tbaa !15
  %157 = zext i32 %156 to i64
  %158 = mul i64 %153, %157
  %159 = add i64 %158, 0
  %160 = getelementptr inbounds double, ptr %151, i64 %159
  store double %148, ptr %160, align 8, !tbaa !9
  br label %184

161:                                              ; preds = %139
  %162 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %14, i32 0, i32 8
  %163 = load i64, ptr %11, align 8, !tbaa !16
  %164 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %162, i64 noundef %163) #4
  %165 = load i32, ptr %164, align 4, !tbaa !18
  %166 = icmp eq i32 %165, 2
  br i1 %166, label %167, label %183

167:                                              ; preds = %161
  %168 = load double, ptr %13, align 8, !tbaa !9
  %169 = load double, ptr %12, align 8, !tbaa !9
  %170 = fmul double %168, %169
  %171 = load ptr, ptr %5, align 8, !tbaa !5
  %172 = getelementptr inbounds %struct._MatNd, ptr %171, i32 0, i32 0
  %173 = load ptr, ptr %172, align 8, !tbaa !11
  %174 = load i64, ptr %11, align 8, !tbaa !16
  %175 = add i64 %174, 3
  %176 = load ptr, ptr %5, align 8, !tbaa !5
  %177 = getelementptr inbounds %struct._MatNd, ptr %176, i32 0, i32 2
  %178 = load i32, ptr %177, align 4, !tbaa !15
  %179 = zext i32 %178 to i64
  %180 = mul i64 %175, %179
  %181 = add i64 %180, 0
  %182 = getelementptr inbounds double, ptr %173, i64 %181
  store double %170, ptr %182, align 8, !tbaa !9
  br label %183

183:                                              ; preds = %167, %161
  br label %184

184:                                              ; preds = %183, %145
  br label %185

185:                                              ; preds = %184, %121
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  br label %186

186:                                              ; preds = %185, %103
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  br label %187

187:                                              ; preds = %186
  %188 = load i64, ptr %11, align 8, !tbaa !16
  %189 = add i64 %188, 1
  store i64 %189, ptr %11, align 8, !tbaa !16
  br label %96, !llvm.loop !19

190:                                              ; preds = %102
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  ret void
}

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

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = !{!12, !6, i64 0}
!12 = !{!"_ZTS6_MatNd", !6, i64 0, !13, i64 8, !13, i64 12, !13, i64 16, !14, i64 20}
!13 = !{!"int", !7, i64 0}
!14 = !{!"bool", !7, i64 0}
!15 = !{!12, !13, i64 12}
!16 = !{!17, !17, i64 0}
!17 = !{!"long", !7, i64 0}
!18 = !{!13, !13, i64 0}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}


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

declare void @MatNd_reshape(ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK3Rcs16ViaPointSequence10computeRHSEP6_MatNdd(ptr noundef nonnull align 8 dereferenceable(104) %0, ptr noundef %1, double noundef %2) local_unnamed_addr #2 align 2 {
  %4 = getelementptr inbounds i8, ptr %0, i64 56
  %5 = tail call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #3
  %6 = trunc i64 %5 to i32
  tail call void @MatNd_reshape(ptr noundef %1, i32 noundef %6, i32 noundef 1)
  %7 = fmul double %2, %2
  %8 = fmul double %7, %2
  %9 = fmul double %7, %7
  %10 = fmul double %7, %8
  %11 = load ptr, ptr %1, align 8, !tbaa !5
  %12 = getelementptr inbounds i8, ptr %1, i64 12
  store double %10, ptr %11, align 8, !tbaa !12
  %13 = load i32, ptr %12, align 4, !tbaa !14
  %14 = zext i32 %13 to i64
  %15 = getelementptr inbounds double, ptr %11, i64 %14
  store double %9, ptr %15, align 8, !tbaa !12
  %16 = shl i32 %13, 1
  %17 = zext i32 %16 to i64
  %18 = getelementptr inbounds double, ptr %11, i64 %17
  store double %8, ptr %18, align 8, !tbaa !12
  %19 = mul i32 %13, 3
  %20 = zext i32 %19 to i64
  %21 = getelementptr inbounds double, ptr %11, i64 %20
  store double %7, ptr %21, align 8, !tbaa !12
  %22 = shl i32 %13, 2
  %23 = zext i32 %22 to i64
  %24 = getelementptr inbounds double, ptr %11, i64 %23
  store double %2, ptr %24, align 8, !tbaa !12
  %25 = mul i32 %13, 5
  %26 = zext i32 %25 to i64
  %27 = getelementptr inbounds double, ptr %11, i64 %26
  store double 1.000000e+00, ptr %27, align 8, !tbaa !12
  %28 = tail call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #3
  %29 = add i64 %28, -7
  %30 = icmp ult i64 %29, -4
  br i1 %30, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %3
  %31 = getelementptr inbounds i8, ptr %0, i64 80
  br label %32

._crit_edge:                                      ; preds = %63, %3
  ret void

32:                                               ; preds = %.lr.ph, %63
  %.053 = phi i64 [ 3, %.lr.ph ], [ %64, %63 ]
  %33 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %31, i64 noundef %.053) #3
  %34 = load double, ptr %33, align 8, !tbaa !12
  %35 = fsub double %2, %34
  %36 = fcmp ogt double %35, 0.000000e+00
  br i1 %36, label %37, label %63

37:                                               ; preds = %32
  %38 = fmul double %35, %35
  %39 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %.053) #3
  %40 = load i32, ptr %39, align 4, !tbaa !15
  %41 = icmp eq i32 %40, 0
  br i1 %41, label %42, label %45

42:                                               ; preds = %37
  %43 = fmul double %38, %38
  %44 = fmul double %35, %43
  br label %.sink.split

45:                                               ; preds = %37
  %46 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %.053) #3
  %47 = load i32, ptr %46, align 4, !tbaa !15
  %48 = icmp eq i32 %47, 1
  br i1 %48, label %49, label %51

49:                                               ; preds = %45
  %50 = fmul double %38, %38
  br label %.sink.split

51:                                               ; preds = %45
  %52 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %.053) #3
  %53 = load i32, ptr %52, align 4, !tbaa !15
  %54 = icmp eq i32 %53, 2
  br i1 %54, label %55, label %63

55:                                               ; preds = %51
  %56 = fmul double %35, %38
  br label %.sink.split

.sink.split:                                      ; preds = %49, %55, %42
  %.sink = phi double [ %44, %42 ], [ %56, %55 ], [ %50, %49 ]
  %57 = load ptr, ptr %1, align 8, !tbaa !5
  %58 = add i64 %.053, 3
  %59 = load i32, ptr %12, align 4, !tbaa !14
  %60 = zext i32 %59 to i64
  %61 = mul i64 %58, %60
  %62 = getelementptr inbounds double, ptr %57, i64 %61
  store double %.sink, ptr %62, align 8, !tbaa !12
  br label %63

63:                                               ; preds = %.sink.split, %51, %32
  %64 = add nuw i64 %.053, 1
  %65 = tail call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #3
  %66 = add i64 %65, -3
  %67 = icmp ult i64 %64, %66
  br i1 %67, label %32, label %._crit_edge, !llvm.loop !16
}

attributes #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 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 = { 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 #3 = { 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 = !{!"_ZTS6_MatNd", !7, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !11, i64 20}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"bool", !8, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"double", !8, i64 0}
!14 = !{!6, !10, i64 12}
!15 = !{!10, !10, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass