; LLVM IR from moarseniy/CudaFEMproject :: FEMproject/fem_utils/src/cpu_fem_utils.ll (ZN16CPU_ElementsData17calculateLength3DEv)

; 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.std::unique_ptr" = type { %"struct.std::__uniq_ptr_data" }
%"struct.std::__uniq_ptr_data" = type { %"class.std::__uniq_ptr_impl" }
%"class.std::__uniq_ptr_impl" = type { %"class.std::tuple" }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Head_base.7" }
%"struct.std::_Head_base.7" = type { ptr }
%class.ElementsData = type { ptr, i64, i64, i64, i64, i64, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, %struct.CGMData, ptr, ptr, ptr }
%struct.CGMData = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr }

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

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

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

declare void @_ZNK6Matrix6getRowEm(ptr dead_on_unwind writable sret(%"class.std::unique_ptr") align 8, ptr noundef nonnull align 8 dereferenceable(49), i64 noundef) #2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(49) ptr @_ZNKSt10unique_ptrI6MatrixSt14default_deleteIS0_EEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) #3 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN16CPU_ElementsData17calculateLength3DEv(ptr noundef nonnull align 8 dereferenceable(336) %0) unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca i64, align 8
  %4 = alloca %"class.std::unique_ptr", align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca float, align 4
  %8 = alloca float, align 4
  %9 = alloca float, align 4
  %10 = alloca float, align 4
  %11 = alloca float, align 4
  %12 = alloca float, align 4
  %13 = alloca float, align 4
  %14 = alloca float, align 4
  %15 = alloca float, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %16 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  store i64 0, ptr %3, align 8, !tbaa !9
  br label %17

17:                                               ; preds = %126, %1
  %18 = load i64, ptr %3, align 8, !tbaa !9
  %19 = getelementptr inbounds %class.ElementsData, ptr %16, i32 0, i32 4
  %20 = load i64, ptr %19, align 8, !tbaa !11
  %21 = icmp ult i64 %18, %20
  br i1 %21, label %23, label %22

22:                                               ; preds = %17
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  br label %168

23:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  %24 = getelementptr inbounds %class.ElementsData, ptr %16, i32 0, i32 31
  %25 = load ptr, ptr %24, align 8, !tbaa !15
  %26 = load i64, ptr %3, align 8, !tbaa !9
  call void @_ZNK6Matrix6getRowEm(ptr dead_on_unwind writable sret(%"class.std::unique_ptr") align 8 %4, ptr noundef nonnull align 8 dereferenceable(49) %25, i64 noundef %26)
  %27 = call noundef ptr @_ZNKSt10unique_ptrI6MatrixSt14default_deleteIS0_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #5
  %28 = getelementptr inbounds %class.ElementsData, ptr %16, i32 0, i32 1
  %29 = load i64, ptr %28, align 8, !tbaa !16
  %30 = getelementptr inbounds %class.ElementsData, ptr %16, i32 0, i32 1
  %31 = load i64, ptr %30, align 8, !tbaa !16
  %32 = load ptr, ptr %27, align 8, !tbaa !17
  %33 = getelementptr inbounds ptr, ptr %32, i64 26
  %34 = load ptr, ptr %33, align 8
  invoke void %34(ptr noundef nonnull align 8 dereferenceable(49) %27, i64 noundef %29, i64 noundef %31)
          to label %35 unwind label %129

35:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  %36 = call noundef nonnull align 8 dereferenceable(49) ptr @_ZNKSt10unique_ptrI6MatrixSt14default_deleteIS0_EEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #5
  %37 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN6MatrixixEm(ptr noundef nonnull align 8 dereferenceable(49) %36, i64 noundef 3)
          to label %38 unwind label %133

38:                                               ; preds = %35
  %39 = load float, ptr %37, align 4, !tbaa !19
  %40 = call noundef nonnull align 8 dereferenceable(49) ptr @_ZNKSt10unique_ptrI6MatrixSt14default_deleteIS0_EEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #5
  %41 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN6MatrixixEm(ptr noundef nonnull align 8 dereferenceable(49) %40, i64 noundef 0)
          to label %42 unwind label %133

42:                                               ; preds = %38
  %43 = load float, ptr %41, align 4, !tbaa !19
  %44 = fsub float %39, %43
  store float %44, ptr %7, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  %45 = call noundef nonnull align 8 dereferenceable(49) ptr @_ZNKSt10unique_ptrI6MatrixSt14default_deleteIS0_EEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #5
  %46 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN6MatrixixEm(ptr noundef nonnull align 8 dereferenceable(49) %45, i64 noundef 4)
          to label %47 unwind label %137

47:                                               ; preds = %42
  %48 = load float, ptr %46, align 4, !tbaa !19
  %49 = call noundef nonnull align 8 dereferenceable(49) ptr @_ZNKSt10unique_ptrI6MatrixSt14default_deleteIS0_EEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #5
  %50 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN6MatrixixEm(ptr noundef nonnull align 8 dereferenceable(49) %49, i64 noundef 1)
          to label %51 unwind label %137

51:                                               ; preds = %47
  %52 = load float, ptr %50, align 4, !tbaa !19
  %53 = fsub float %48, %52
  store float %53, ptr %8, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  %54 = call noundef nonnull align 8 dereferenceable(49) ptr @_ZNKSt10unique_ptrI6MatrixSt14default_deleteIS0_EEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #5
  %55 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN6MatrixixEm(ptr noundef nonnull align 8 dereferenceable(49) %54, i64 noundef 5)
          to label %56 unwind label %141

56:                                               ; preds = %51
  %57 = load float, ptr %55, align 4, !tbaa !19
  %58 = call noundef nonnull align 8 dereferenceable(49) ptr @_ZNKSt10unique_ptrI6MatrixSt14default_deleteIS0_EEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #5
  %59 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN6MatrixixEm(ptr noundef nonnull align 8 dereferenceable(49) %58, i64 noundef 2)
          to label %60 unwind label %141

60:                                               ; preds = %56
  %61 = load float, ptr %59, align 4, !tbaa !19
  %62 = fsub float %57, %61
  store float %62, ptr %9, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  %63 = call noundef nonnull align 8 dereferenceable(49) ptr @_ZNKSt10unique_ptrI6MatrixSt14default_deleteIS0_EEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #5
  %64 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN6MatrixixEm(ptr noundef nonnull align 8 dereferenceable(49) %63, i64 noundef 6)
          to label %65 unwind label %145

65:                                               ; preds = %60
  %66 = load float, ptr %64, align 4, !tbaa !19
  %67 = call noundef nonnull align 8 dereferenceable(49) ptr @_ZNKSt10unique_ptrI6MatrixSt14default_deleteIS0_EEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #5
  %68 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN6MatrixixEm(ptr noundef nonnull align 8 dereferenceable(49) %67, i64 noundef 0)
          to label %69 unwind label %145

69:                                               ; preds = %65
  %70 = load float, ptr %68, align 4, !tbaa !19
  %71 = fsub float %66, %70
  store float %71, ptr %10, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  %72 = call noundef nonnull align 8 dereferenceable(49) ptr @_ZNKSt10unique_ptrI6MatrixSt14default_deleteIS0_EEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #5
  %73 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN6MatrixixEm(ptr noundef nonnull align 8 dereferenceable(49) %72, i64 noundef 7)
          to label %74 unwind label %149

74:                                               ; preds = %69
  %75 = load float, ptr %73, align 4, !tbaa !19
  %76 = call noundef nonnull align 8 dereferenceable(49) ptr @_ZNKSt10unique_ptrI6MatrixSt14default_deleteIS0_EEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #5
  %77 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN6MatrixixEm(ptr noundef nonnull align 8 dereferenceable(49) %76, i64 noundef 1)
          to label %78 unwind label %149

78:                                               ; preds = %74
  %79 = load float, ptr %77, align 4, !tbaa !19
  %80 = fsub float %75, %79
  store float %80, ptr %11, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  %81 = call noundef nonnull align 8 dereferenceable(49) ptr @_ZNKSt10unique_ptrI6MatrixSt14default_deleteIS0_EEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #5
  %82 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN6MatrixixEm(ptr noundef nonnull align 8 dereferenceable(49) %81, i64 noundef 8)
          to label %83 unwind label %153

83:                                               ; preds = %78
  %84 = load float, ptr %82, align 4, !tbaa !19
  %85 = call noundef nonnull align 8 dereferenceable(49) ptr @_ZNKSt10unique_ptrI6MatrixSt14default_deleteIS0_EEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #5
  %86 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN6MatrixixEm(ptr noundef nonnull align 8 dereferenceable(49) %85, i64 noundef 2)
          to label %87 unwind label %153

87:                                               ; preds = %83
  %88 = load float, ptr %86, align 4, !tbaa !19
  %89 = fsub float %84, %88
  store float %89, ptr %12, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  %90 = load float, ptr %8, align 4, !tbaa !19
  %91 = load float, ptr %12, align 4, !tbaa !19
  %92 = load float, ptr %9, align 4, !tbaa !19
  %93 = load float, ptr %11, align 4, !tbaa !19
  %94 = fmul float %92, %93
  %95 = fneg float %94
  %96 = call float @llvm.fmuladd.f32(float %90, float %91, float %95)
  store float %96, ptr %13, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  %97 = load float, ptr %9, align 4, !tbaa !19
  %98 = load float, ptr %10, align 4, !tbaa !19
  %99 = load float, ptr %7, align 4, !tbaa !19
  %100 = load float, ptr %12, align 4, !tbaa !19
  %101 = fmul float %99, %100
  %102 = fneg float %101
  %103 = call float @llvm.fmuladd.f32(float %97, float %98, float %102)
  store float %103, ptr %14, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  %104 = load float, ptr %7, align 4, !tbaa !19
  %105 = load float, ptr %11, align 4, !tbaa !19
  %106 = load float, ptr %8, align 4, !tbaa !19
  %107 = load float, ptr %10, align 4, !tbaa !19
  %108 = fmul float %106, %107
  %109 = fneg float %108
  %110 = call float @llvm.fmuladd.f32(float %104, float %105, float %109)
  store float %110, ptr %15, align 4, !tbaa !19
  %111 = load float, ptr %13, align 4, !tbaa !19
  %112 = load float, ptr %13, align 4, !tbaa !19
  %113 = load float, ptr %14, align 4, !tbaa !19
  %114 = load float, ptr %14, align 4, !tbaa !19
  %115 = fmul float %113, %114
  %116 = call float @llvm.fmuladd.f32(float %111, float %112, float %115)
  %117 = load float, ptr %15, align 4, !tbaa !19
  %118 = load float, ptr %15, align 4, !tbaa !19
  %119 = call float @llvm.fmuladd.f32(float %117, float %118, float %116)
  %120 = fmul float 5.000000e-01, %119
  %121 = getelementptr inbounds %class.ElementsData, ptr %16, i32 0, i32 29
  %122 = load ptr, ptr %121, align 8, !tbaa !21
  %123 = load i64, ptr %3, align 8, !tbaa !9
  %124 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN6MatrixixEm(ptr noundef nonnull align 8 dereferenceable(49) %122, i64 noundef %123)
          to label %125 unwind label %157

125:                                              ; preds = %87
  store float %120, ptr %124, align 4, !tbaa !19
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, 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
  call void @_ZNSt10unique_ptrI6MatrixSt14default_deleteIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  br label %126

126:                                              ; preds = %125
  %127 = load i64, ptr %3, align 8, !tbaa !9
  %128 = add i64 %127, 1
  store i64 %128, ptr %3, align 8, !tbaa !9
  br label %17, !llvm.loop !22

129:                                              ; preds = %23
  %130 = landingpad { ptr, i32 }
          cleanup
  %131 = extractvalue { ptr, i32 } %130, 0
  store ptr %131, ptr %5, align 8
  %132 = extractvalue { ptr, i32 } %130, 1
  store i32 %132, ptr %6, align 4
  br label %167

133:                                              ; preds = %38, %35
  %134 = landingpad { ptr, i32 }
          cleanup
  %135 = extractvalue { ptr, i32 } %134, 0
  store ptr %135, ptr %5, align 8
  %136 = extractvalue { ptr, i32 } %134, 1
  store i32 %136, ptr %6, align 4
  br label %166

137:                                              ; preds = %47, %42
  %138 = landingpad { ptr, i32 }
          cleanup
  %139 = extractvalue { ptr, i32 } %138, 0
  store ptr %139, ptr %5, align 8
  %140 = extractvalue { ptr, i32 } %138, 1
  store i32 %140, ptr %6, align 4
  br label %165

141:                                              ; preds = %56, %51
  %142 = landingpad { ptr, i32 }
          cleanup
  %143 = extractvalue { ptr, i32 } %142, 0
  store ptr %143, ptr %5, align 8
  %144 = extractvalue { ptr, i32 } %142, 1
  store i32 %144, ptr %6, align 4
  br label %164

145:                                              ; preds = %65, %60
  %146 = landingpad { ptr, i32 }
          cleanup
  %147 = extractvalue { ptr, i32 } %146, 0
  store ptr %147, ptr %5, align 8
  %148 = extractvalue { ptr, i32 } %146, 1
  store i32 %148, ptr %6, align 4
  br label %163

149:                                              ; preds = %74, %69
  %150 = landingpad { ptr, i32 }
          cleanup
  %151 = extractvalue { ptr, i32 } %150, 0
  store ptr %151, ptr %5, align 8
  %152 = extractvalue { ptr, i32 } %150, 1
  store i32 %152, ptr %6, align 4
  br label %162

153:                                              ; preds = %83, %78
  %154 = landingpad { ptr, i32 }
          cleanup
  %155 = extractvalue { ptr, i32 } %154, 0
  store ptr %155, ptr %5, align 8
  %156 = extractvalue { ptr, i32 } %154, 1
  store i32 %156, ptr %6, align 4
  br label %161

157:                                              ; preds = %87
  %158 = landingpad { ptr, i32 }
          cleanup
  %159 = extractvalue { ptr, i32 } %158, 0
  store ptr %159, ptr %5, align 8
  %160 = extractvalue { ptr, i32 } %158, 1
  store i32 %160, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %161

161:                                              ; preds = %157, %153
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %162

162:                                              ; preds = %161, %149
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %163

163:                                              ; preds = %162, %145
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %164

164:                                              ; preds = %163, %141
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %165

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

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

167:                                              ; preds = %166, %129
  call void @_ZNSt10unique_ptrI6MatrixSt14default_deleteIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  br label %169

168:                                              ; preds = %22
  ret void

169:                                              ; preds = %167
  %170 = load ptr, ptr %5, align 8
  %171 = load i32, ptr %6, align 4
  %172 = insertvalue { ptr, i32 } poison, ptr %170, 0
  %173 = insertvalue { ptr, i32 } %172, i32 %171, 1
  resume { ptr, i32 } %173
}

declare noundef nonnull align 4 dereferenceable(4) ptr @_ZN6MatrixixEm(ptr noundef nonnull align 8 dereferenceable(49), i64 noundef) #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress 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 = !{!"long", !7, i64 0}
!11 = !{!12, !10, i64 32}
!12 = !{!"_ZTS12ElementsData", !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !13, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !6, i64 184, !6, i64 192, !6, i64 200, !6, i64 208, !6, i64 216, !6, i64 224, !6, i64 232, !6, i64 240, !6, i64 248, !14, i64 256, !6, i64 312, !6, i64 320, !6, i64 328}
!13 = !{!"_ZTS11DEVICE_NAME", !7, i64 0}
!14 = !{!"_ZTS7CGMData", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48}
!15 = !{!12, !6, i64 248}
!16 = !{!12, !10, i64 8}
!17 = !{!18, !18, i64 0}
!18 = !{!"vtable pointer", !8, i64 0}
!19 = !{!20, !20, i64 0}
!20 = !{!"float", !7, i64 0}
!21 = !{!12, !6, i64 232}
!22 = distinct !{!22, !23}
!23 = !{!"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"

%"class.std::unique_ptr" = type { %"struct.std::__uniq_ptr_data" }
%"struct.std::__uniq_ptr_data" = type { %"class.std::__uniq_ptr_impl" }
%"class.std::__uniq_ptr_impl" = type { %"class.std::tuple" }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Head_base.7" }
%"struct.std::_Head_base.7" = type { ptr }

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

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

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

declare void @_ZNK6Matrix6getRowEm(ptr dead_on_unwind writable sret(%"class.std::unique_ptr") align 8, ptr noundef nonnull align 8 dereferenceable(49), i64 noundef) local_unnamed_addr #2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(49) ptr @_ZNKSt10unique_ptrI6MatrixSt14default_deleteIS0_EEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN16CPU_ElementsData17calculateLength3DEv(ptr nocapture noundef nonnull readonly align 8 dereferenceable(336) %0) unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.std::unique_ptr", align 8
  %3 = getelementptr inbounds i8, ptr %0, i64 32
  %4 = load i64, ptr %3, align 8, !tbaa !5
  %.not = icmp eq i64 %4, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %1
  %5 = getelementptr inbounds i8, ptr %0, i64 248
  %6 = getelementptr inbounds i8, ptr %0, i64 8
  %7 = getelementptr inbounds i8, ptr %0, i64 232
  br label %8

._crit_edge:                                      ; preds = %71, %1
  ret void

8:                                                ; preds = %.lr.ph, %71
  %.039 = phi i64 [ 0, %.lr.ph ], [ %86, %71 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #5
  %9 = load ptr, ptr %5, align 8, !tbaa !13
  call void @_ZNK6Matrix6getRowEm(ptr dead_on_unwind nonnull writable sret(%"class.std::unique_ptr") align 8 %2, ptr noundef nonnull align 8 dereferenceable(49) %9, i64 noundef %.039)
  %10 = call noundef ptr @_ZNKSt10unique_ptrI6MatrixSt14default_deleteIS0_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %2) #5
  %11 = load i64, ptr %6, align 8, !tbaa !14
  %12 = load ptr, ptr %10, align 8, !tbaa !15
  %13 = getelementptr inbounds i8, ptr %12, i64 208
  %14 = load ptr, ptr %13, align 8
  invoke void %14(ptr noundef nonnull align 8 dereferenceable(49) %10, i64 noundef %11, i64 noundef %11)
          to label %15 unwind label %89

15:                                               ; preds = %8
  %16 = call noundef nonnull align 8 dereferenceable(49) ptr @_ZNKSt10unique_ptrI6MatrixSt14default_deleteIS0_EEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %2) #5
  %17 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN6MatrixixEm(ptr noundef nonnull align 8 dereferenceable(49) %16, i64 noundef 3)
          to label %18 unwind label %91

18:                                               ; preds = %15
  %19 = load float, ptr %17, align 4, !tbaa !17
  %20 = call noundef nonnull align 8 dereferenceable(49) ptr @_ZNKSt10unique_ptrI6MatrixSt14default_deleteIS0_EEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %2) #5
  %21 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN6MatrixixEm(ptr noundef nonnull align 8 dereferenceable(49) %20, i64 noundef 0)
          to label %22 unwind label %91

22:                                               ; preds = %18
  %23 = load float, ptr %21, align 4, !tbaa !17
  %24 = fsub float %19, %23
  %25 = call noundef nonnull align 8 dereferenceable(49) ptr @_ZNKSt10unique_ptrI6MatrixSt14default_deleteIS0_EEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %2) #5
  %26 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN6MatrixixEm(ptr noundef nonnull align 8 dereferenceable(49) %25, i64 noundef 4)
          to label %27 unwind label %93

27:                                               ; preds = %22
  %28 = load float, ptr %26, align 4, !tbaa !17
  %29 = call noundef nonnull align 8 dereferenceable(49) ptr @_ZNKSt10unique_ptrI6MatrixSt14default_deleteIS0_EEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %2) #5
  %30 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN6MatrixixEm(ptr noundef nonnull align 8 dereferenceable(49) %29, i64 noundef 1)
          to label %31 unwind label %93

31:                                               ; preds = %27
  %32 = load float, ptr %30, align 4, !tbaa !17
  %33 = fsub float %28, %32
  %34 = call noundef nonnull align 8 dereferenceable(49) ptr @_ZNKSt10unique_ptrI6MatrixSt14default_deleteIS0_EEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %2) #5
  %35 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN6MatrixixEm(ptr noundef nonnull align 8 dereferenceable(49) %34, i64 noundef 5)
          to label %36 unwind label %95

36:                                               ; preds = %31
  %37 = load float, ptr %35, align 4, !tbaa !17
  %38 = call noundef nonnull align 8 dereferenceable(49) ptr @_ZNKSt10unique_ptrI6MatrixSt14default_deleteIS0_EEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %2) #5
  %39 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN6MatrixixEm(ptr noundef nonnull align 8 dereferenceable(49) %38, i64 noundef 2)
          to label %40 unwind label %95

40:                                               ; preds = %36
  %41 = load float, ptr %39, align 4, !tbaa !17
  %42 = fsub float %37, %41
  %43 = call noundef nonnull align 8 dereferenceable(49) ptr @_ZNKSt10unique_ptrI6MatrixSt14default_deleteIS0_EEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %2) #5
  %44 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN6MatrixixEm(ptr noundef nonnull align 8 dereferenceable(49) %43, i64 noundef 6)
          to label %45 unwind label %97

45:                                               ; preds = %40
  %46 = load float, ptr %44, align 4, !tbaa !17
  %47 = call noundef nonnull align 8 dereferenceable(49) ptr @_ZNKSt10unique_ptrI6MatrixSt14default_deleteIS0_EEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %2) #5
  %48 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN6MatrixixEm(ptr noundef nonnull align 8 dereferenceable(49) %47, i64 noundef 0)
          to label %49 unwind label %97

49:                                               ; preds = %45
  %50 = load float, ptr %48, align 4, !tbaa !17
  %51 = fsub float %46, %50
  %52 = call noundef nonnull align 8 dereferenceable(49) ptr @_ZNKSt10unique_ptrI6MatrixSt14default_deleteIS0_EEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %2) #5
  %53 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN6MatrixixEm(ptr noundef nonnull align 8 dereferenceable(49) %52, i64 noundef 7)
          to label %54 unwind label %99

54:                                               ; preds = %49
  %55 = load float, ptr %53, align 4, !tbaa !17
  %56 = call noundef nonnull align 8 dereferenceable(49) ptr @_ZNKSt10unique_ptrI6MatrixSt14default_deleteIS0_EEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %2) #5
  %57 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN6MatrixixEm(ptr noundef nonnull align 8 dereferenceable(49) %56, i64 noundef 1)
          to label %58 unwind label %99

58:                                               ; preds = %54
  %59 = load float, ptr %57, align 4, !tbaa !17
  %60 = fsub float %55, %59
  %61 = call noundef nonnull align 8 dereferenceable(49) ptr @_ZNKSt10unique_ptrI6MatrixSt14default_deleteIS0_EEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %2) #5
  %62 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN6MatrixixEm(ptr noundef nonnull align 8 dereferenceable(49) %61, i64 noundef 8)
          to label %63 unwind label %101

63:                                               ; preds = %58
  %64 = load float, ptr %62, align 4, !tbaa !17
  %65 = call noundef nonnull align 8 dereferenceable(49) ptr @_ZNKSt10unique_ptrI6MatrixSt14default_deleteIS0_EEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %2) #5
  %66 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN6MatrixixEm(ptr noundef nonnull align 8 dereferenceable(49) %65, i64 noundef 2)
          to label %67 unwind label %101

67:                                               ; preds = %63
  %68 = load float, ptr %66, align 4, !tbaa !17
  %69 = load ptr, ptr %7, align 8, !tbaa !19
  %70 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN6MatrixixEm(ptr noundef nonnull align 8 dereferenceable(49) %69, i64 noundef %.039)
          to label %71 unwind label %103

71:                                               ; preds = %67
  %72 = fneg float %33
  %73 = fmul float %51, %72
  %74 = call float @llvm.fmuladd.f32(float %24, float %60, float %73)
  %75 = fsub float %64, %68
  %76 = fneg float %42
  %77 = fmul float %60, %76
  %78 = call float @llvm.fmuladd.f32(float %33, float %75, float %77)
  %79 = fneg float %24
  %80 = fmul float %75, %79
  %81 = call float @llvm.fmuladd.f32(float %42, float %51, float %80)
  %82 = fmul float %81, %81
  %83 = call float @llvm.fmuladd.f32(float %78, float %78, float %82)
  %84 = call float @llvm.fmuladd.f32(float %74, float %74, float %83)
  %85 = fmul float %84, 5.000000e-01
  store float %85, ptr %70, align 4, !tbaa !17
  call void @_ZNSt10unique_ptrI6MatrixSt14default_deleteIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %2) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #5
  %86 = add nuw i64 %.039, 1
  %87 = load i64, ptr %3, align 8, !tbaa !5
  %88 = icmp ult i64 %86, %87
  br i1 %88, label %8, label %._crit_edge, !llvm.loop !20

89:                                               ; preds = %8
  %90 = landingpad { ptr, i32 }
          cleanup
  br label %105

91:                                               ; preds = %18, %15
  %92 = landingpad { ptr, i32 }
          cleanup
  br label %105

93:                                               ; preds = %27, %22
  %94 = landingpad { ptr, i32 }
          cleanup
  br label %105

95:                                               ; preds = %36, %31
  %96 = landingpad { ptr, i32 }
          cleanup
  br label %105

97:                                               ; preds = %45, %40
  %98 = landingpad { ptr, i32 }
          cleanup
  br label %105

99:                                               ; preds = %54, %49
  %100 = landingpad { ptr, i32 }
          cleanup
  br label %105

101:                                              ; preds = %63, %58
  %102 = landingpad { ptr, i32 }
          cleanup
  br label %105

103:                                              ; preds = %67
  %104 = landingpad { ptr, i32 }
          cleanup
  br label %105

105:                                              ; preds = %91, %95, %99, %103, %101, %97, %93, %89
  %.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %90, %89 ], [ %92, %91 ], [ %94, %93 ], [ %96, %95 ], [ %98, %97 ], [ %100, %99 ], [ %104, %103 ], [ %102, %101 ]
  call void @_ZNSt10unique_ptrI6MatrixSt14default_deleteIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %2) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #5
  resume { ptr, i32 } %.pn.pn.pn.pn.pn.pn.pn
}

declare noundef nonnull align 4 dereferenceable(4) ptr @_ZN6MatrixixEm(ptr noundef nonnull align 8 dereferenceable(49), i64 noundef) local_unnamed_addr #2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress 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, !7, i64 32}
!6 = !{!"_ZTS12ElementsData", !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !10, i64 48, !11, i64 56, !11, i64 64, !11, i64 72, !11, i64 80, !11, i64 88, !11, i64 96, !11, i64 104, !11, i64 112, !11, i64 120, !11, i64 128, !11, i64 136, !11, i64 144, !11, i64 152, !11, i64 160, !11, i64 168, !11, i64 176, !11, i64 184, !11, i64 192, !11, i64 200, !11, i64 208, !11, i64 216, !11, i64 224, !11, i64 232, !11, i64 240, !11, i64 248, !12, i64 256, !11, i64 312, !11, i64 320, !11, i64 328}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTS11DEVICE_NAME", !8, i64 0}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!"_ZTS7CGMData", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !11, i64 40, !11, i64 48}
!13 = !{!6, !11, i64 248}
!14 = !{!6, !7, i64 8}
!15 = !{!16, !16, i64 0}
!16 = !{!"vtable pointer", !9, i64 0}
!17 = !{!18, !18, i64 0}
!18 = !{!"float", !8, i64 0}
!19 = !{!6, !11, i64 232}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}


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