; LLVM IR from ERGO-Code/HiGHS :: src/ipm/ipx/model.ll (ZNK3ipx5Model24MultiplyWithScaledMatrixERKSt8valarrayIdEdRS2_c)

; 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.ipx::Model" = type { i8, i32, i32, i32, i32, %"class.ipx::SparseMatrix", %"class.ipx::SparseMatrix", %"class.std::valarray", %"class.std::valarray", %"class.std::valarray", %"class.std::valarray", double, double, i32, i32, i32, i32, i32, %"class.std::vector", %"class.std::vector.8", double, double, double, %"class.std::valarray", %"class.std::valarray", %"class.std::valarray", %"class.std::valarray", %"class.ipx::SparseMatrix", %"class.std::vector", %"class.std::valarray", %"class.std::valarray" }
%"class.std::vector.8" = type { %"struct.std::_Vector_base.9" }
%"struct.std::_Vector_base.9" = type { %"struct.std::_Vector_base<char, std::allocator<char>>::_Vector_impl" }
%"struct.std::_Vector_base<char, std::allocator<char>>::_Vector_impl" = type { %"struct.std::_Vector_base<char, std::allocator<char>>::_Vector_impl_data" }
%"struct.std::_Vector_base<char, std::allocator<char>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.ipx::SparseMatrix" = type { i32, %"class.std::vector", %"class.std::vector", %"class.std::vector.3", %"class.std::vector", %"class.std::vector.3" }
%"class.std::vector.3" = type { %"struct.std::_Vector_base.4" }
%"struct.std::_Vector_base.4" = 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 }
%"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::valarray" = type { i64, ptr }

@.str.18 = external hidden unnamed_addr constant [70 x i8], align 1
@.str.73 = external hidden unnamed_addr constant [31 x i8], align 1
@__PRETTY_FUNCTION__._ZNK3ipx5Model24MultiplyWithScaledMatrixERKSt8valarrayIdEdRS2_c = external hidden unnamed_addr constant [88 x i8], align 1
@.str.74 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.75 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.76 = external hidden unnamed_addr constant [31 x i8], align 1

; 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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #1

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK3ipx5Model24MultiplyWithScaledMatrixERKSt8valarrayIdEdRS2_c(ptr noundef nonnull align 8 dereferenceable(704) %0, ptr noundef nonnull align 8 dereferenceable(16) %1, double noundef %2, ptr noundef nonnull align 8 dereferenceable(16) %3, i8 noundef signext %4) #3 align 2 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca double, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i8, align 1
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store double %2, ptr %8, align 8, !tbaa !9
  store ptr %3, ptr %9, align 8, !tbaa !5
  store i8 %4, ptr %10, align 1, !tbaa !11
  %15 = load ptr, ptr %6, align 8
  %16 = load i8, ptr %10, align 1, !tbaa !11
  %17 = sext i8 %16 to i32
  %18 = icmp eq i32 %17, 116
  br i1 %18, label %23, label %19

19:                                               ; preds = %5
  %20 = load i8, ptr %10, align 1, !tbaa !11
  %21 = sext i8 %20 to i32
  %22 = icmp eq i32 %21, 84
  br i1 %22, label %23, label %91

23:                                               ; preds = %19, %5
  %24 = load ptr, ptr %7, align 8, !tbaa !5
  %25 = call noundef i64 @_ZNKSt8valarrayIdE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %24)
  %26 = trunc i64 %25 to i32
  %27 = getelementptr inbounds %"class.ipx::Model", ptr %15, i32 0, i32 13
  %28 = load i32, ptr %27, align 8, !tbaa !12
  %29 = icmp eq i32 %26, %28
  br i1 %29, label %30, label %31

30:                                               ; preds = %23
  br label %33

31:                                               ; preds = %23
  call void @__assert_fail(ptr noundef @.str.73, ptr noundef @.str.18, i32 noundef 1437, ptr noundef @__PRETTY_FUNCTION__._ZNK3ipx5Model24MultiplyWithScaledMatrixERKSt8valarrayIdEdRS2_c) #7
  unreachable

32:                                               ; No predecessors!
  br label %33

33:                                               ; preds = %32, %30
  %34 = load ptr, ptr %9, align 8, !tbaa !5
  %35 = call noundef i64 @_ZNKSt8valarrayIdE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %34)
  %36 = trunc i64 %35 to i32
  %37 = getelementptr inbounds %"class.ipx::Model", ptr %15, i32 0, i32 15
  %38 = load i32, ptr %37, align 8, !tbaa !31
  %39 = icmp eq i32 %36, %38
  br i1 %39, label %40, label %41

40:                                               ; preds = %33
  br label %43

41:                                               ; preds = %33
  call void @__assert_fail(ptr noundef @.str.74, ptr noundef @.str.18, i32 noundef 1438, ptr noundef @__PRETTY_FUNCTION__._ZNK3ipx5Model24MultiplyWithScaledMatrixERKSt8valarrayIdEdRS2_c) #7
  unreachable

42:                                               ; No predecessors!
  br label %43

43:                                               ; preds = %42, %40
  %44 = call noundef zeroext i1 @_ZNK3ipx5Model8dualizedEv(ptr noundef nonnull align 8 dereferenceable(704) %15)
  br i1 %44, label %45, label %67

45:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #8
  store i32 0, ptr %11, align 4, !tbaa !32
  br label %46

46:                                               ; preds = %63, %45
  %47 = load i32, ptr %11, align 4, !tbaa !32
  %48 = getelementptr inbounds %"class.ipx::Model", ptr %15, i32 0, i32 13
  %49 = load i32, ptr %48, align 8, !tbaa !12
  %50 = icmp slt i32 %47, %49
  br i1 %50, label %52, label %51

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

52:                                               ; preds = %46
  %53 = getelementptr inbounds %"class.ipx::Model", ptr %15, i32 0, i32 5
  %54 = load i32, ptr %11, align 4, !tbaa !32
  %55 = load double, ptr %8, align 8, !tbaa !9
  %56 = load ptr, ptr %7, align 8, !tbaa !5
  %57 = load i32, ptr %11, align 4, !tbaa !32
  %58 = sext i32 %57 to i64
  %59 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %56, i64 noundef %58) #8
  %60 = load double, ptr %59, align 8, !tbaa !9
  %61 = fmul double %55, %60
  %62 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN3ipx13ScatterColumnERKNS_12SparseMatrixEidRSt8valarrayIdE(ptr noundef nonnull align 8 dereferenceable(128) %53, i32 noundef %54, double noundef %61, ptr noundef nonnull align 8 dereferenceable(16) %62)
  br label %63

63:                                               ; preds = %52
  %64 = load i32, ptr %11, align 4, !tbaa !32
  %65 = add nsw i32 %64, 1
  store i32 %65, ptr %11, align 4, !tbaa !32
  br label %46, !llvm.loop !33

66:                                               ; preds = %51
  br label %90

67:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #8
  store i32 0, ptr %12, align 4, !tbaa !32
  br label %68

68:                                               ; preds = %86, %67
  %69 = load i32, ptr %12, align 4, !tbaa !32
  %70 = getelementptr inbounds %"class.ipx::Model", ptr %15, i32 0, i32 15
  %71 = load i32, ptr %70, align 8, !tbaa !31
  %72 = icmp slt i32 %69, %71
  br i1 %72, label %74, label %73

73:                                               ; preds = %68
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  br label %89

74:                                               ; preds = %68
  %75 = load double, ptr %8, align 8, !tbaa !9
  %76 = getelementptr inbounds %"class.ipx::Model", ptr %15, i32 0, i32 5
  %77 = load i32, ptr %12, align 4, !tbaa !32
  %78 = load ptr, ptr %7, align 8, !tbaa !5
  %79 = call noundef double @_ZN3ipx9DotColumnERKNS_12SparseMatrixEiRKSt8valarrayIdE(ptr noundef nonnull align 8 dereferenceable(128) %76, i32 noundef %77, ptr noundef nonnull align 8 dereferenceable(16) %78)
  %80 = load ptr, ptr %9, align 8, !tbaa !5
  %81 = load i32, ptr %12, align 4, !tbaa !32
  %82 = sext i32 %81 to i64
  %83 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %80, i64 noundef %82) #8
  %84 = load double, ptr %83, align 8, !tbaa !9
  %85 = call double @llvm.fmuladd.f64(double %75, double %79, double %84)
  store double %85, ptr %83, align 8, !tbaa !9
  br label %86

86:                                               ; preds = %74
  %87 = load i32, ptr %12, align 4, !tbaa !32
  %88 = add nsw i32 %87, 1
  store i32 %88, ptr %12, align 4, !tbaa !32
  br label %68, !llvm.loop !35

89:                                               ; preds = %73
  br label %90

90:                                               ; preds = %89, %66
  br label %159

91:                                               ; preds = %19
  %92 = load ptr, ptr %7, align 8, !tbaa !5
  %93 = call noundef i64 @_ZNKSt8valarrayIdE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %92)
  %94 = trunc i64 %93 to i32
  %95 = getelementptr inbounds %"class.ipx::Model", ptr %15, i32 0, i32 15
  %96 = load i32, ptr %95, align 8, !tbaa !31
  %97 = icmp eq i32 %94, %96
  br i1 %97, label %98, label %99

98:                                               ; preds = %91
  br label %101

99:                                               ; preds = %91
  call void @__assert_fail(ptr noundef @.str.75, ptr noundef @.str.18, i32 noundef 1447, ptr noundef @__PRETTY_FUNCTION__._ZNK3ipx5Model24MultiplyWithScaledMatrixERKSt8valarrayIdEdRS2_c) #7
  unreachable

100:                                              ; No predecessors!
  br label %101

101:                                              ; preds = %100, %98
  %102 = load ptr, ptr %9, align 8, !tbaa !5
  %103 = call noundef i64 @_ZNKSt8valarrayIdE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %102)
  %104 = trunc i64 %103 to i32
  %105 = getelementptr inbounds %"class.ipx::Model", ptr %15, i32 0, i32 13
  %106 = load i32, ptr %105, align 8, !tbaa !12
  %107 = icmp eq i32 %104, %106
  br i1 %107, label %108, label %109

108:                                              ; preds = %101
  br label %111

109:                                              ; preds = %101
  call void @__assert_fail(ptr noundef @.str.76, ptr noundef @.str.18, i32 noundef 1448, ptr noundef @__PRETTY_FUNCTION__._ZNK3ipx5Model24MultiplyWithScaledMatrixERKSt8valarrayIdEdRS2_c) #7
  unreachable

110:                                              ; No predecessors!
  br label %111

111:                                              ; preds = %110, %108
  %112 = call noundef zeroext i1 @_ZNK3ipx5Model8dualizedEv(ptr noundef nonnull align 8 dereferenceable(704) %15)
  br i1 %112, label %113, label %136

113:                                              ; preds = %111
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #8
  store i32 0, ptr %13, align 4, !tbaa !32
  br label %114

114:                                              ; preds = %132, %113
  %115 = load i32, ptr %13, align 4, !tbaa !32
  %116 = getelementptr inbounds %"class.ipx::Model", ptr %15, i32 0, i32 13
  %117 = load i32, ptr %116, align 8, !tbaa !12
  %118 = icmp slt i32 %115, %117
  br i1 %118, label %120, label %119

119:                                              ; preds = %114
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  br label %135

120:                                              ; preds = %114
  %121 = load double, ptr %8, align 8, !tbaa !9
  %122 = getelementptr inbounds %"class.ipx::Model", ptr %15, i32 0, i32 5
  %123 = load i32, ptr %13, align 4, !tbaa !32
  %124 = load ptr, ptr %7, align 8, !tbaa !5
  %125 = call noundef double @_ZN3ipx9DotColumnERKNS_12SparseMatrixEiRKSt8valarrayIdE(ptr noundef nonnull align 8 dereferenceable(128) %122, i32 noundef %123, ptr noundef nonnull align 8 dereferenceable(16) %124)
  %126 = load ptr, ptr %9, align 8, !tbaa !5
  %127 = load i32, ptr %13, align 4, !tbaa !32
  %128 = sext i32 %127 to i64
  %129 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %126, i64 noundef %128) #8
  %130 = load double, ptr %129, align 8, !tbaa !9
  %131 = call double @llvm.fmuladd.f64(double %121, double %125, double %130)
  store double %131, ptr %129, align 8, !tbaa !9
  br label %132

132:                                              ; preds = %120
  %133 = load i32, ptr %13, align 4, !tbaa !32
  %134 = add nsw i32 %133, 1
  store i32 %134, ptr %13, align 4, !tbaa !32
  br label %114, !llvm.loop !36

135:                                              ; preds = %119
  br label %158

136:                                              ; preds = %111
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #8
  store i32 0, ptr %14, align 4, !tbaa !32
  br label %137

137:                                              ; preds = %154, %136
  %138 = load i32, ptr %14, align 4, !tbaa !32
  %139 = getelementptr inbounds %"class.ipx::Model", ptr %15, i32 0, i32 15
  %140 = load i32, ptr %139, align 8, !tbaa !31
  %141 = icmp slt i32 %138, %140
  br i1 %141, label %143, label %142

142:                                              ; preds = %137
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #8
  br label %157

143:                                              ; preds = %137
  %144 = getelementptr inbounds %"class.ipx::Model", ptr %15, i32 0, i32 5
  %145 = load i32, ptr %14, align 4, !tbaa !32
  %146 = load double, ptr %8, align 8, !tbaa !9
  %147 = load ptr, ptr %7, align 8, !tbaa !5
  %148 = load i32, ptr %14, align 4, !tbaa !32
  %149 = sext i32 %148 to i64
  %150 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %147, i64 noundef %149) #8
  %151 = load double, ptr %150, align 8, !tbaa !9
  %152 = fmul double %146, %151
  %153 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN3ipx13ScatterColumnERKNS_12SparseMatrixEidRSt8valarrayIdE(ptr noundef nonnull align 8 dereferenceable(128) %144, i32 noundef %145, double noundef %152, ptr noundef nonnull align 8 dereferenceable(16) %153)
  br label %154

154:                                              ; preds = %143
  %155 = load i32, ptr %14, align 4, !tbaa !32
  %156 = add nsw i32 %155, 1
  store i32 %156, ptr %14, align 4, !tbaa !32
  br label %137, !llvm.loop !37

157:                                              ; preds = %142
  br label %158

158:                                              ; preds = %157, %135
  br label %159

159:                                              ; preds = %158, %90
  ret void
}

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3ipx5Model8dualizedEv(ptr noundef nonnull align 8 dereferenceable(704)) #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3ipx13ScatterColumnERKNS_12SparseMatrixEidRSt8valarrayIdE(ptr noundef nonnull align 8 dereferenceable(128), i32 noundef, double noundef, ptr noundef nonnull align 8 dereferenceable(16)) #6

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZN3ipx9DotColumnERKNS_12SparseMatrixEiRKSt8valarrayIdE(ptr noundef nonnull align 8 dereferenceable(128), i32 noundef, ptr noundef nonnull align 8 dereferenceable(16)) #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { noreturn nounwind "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 = { 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 #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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { noreturn nounwind }
attributes #8 = { 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 = !{!7, !7, i64 0}
!12 = !{!13, !15, i64 360}
!13 = !{!"_ZTSN3ipx5ModelE", !14, i64 0, !15, i64 4, !15, i64 8, !15, i64 12, !15, i64 16, !16, i64 24, !16, i64 152, !25, i64 280, !25, i64 296, !25, i64 312, !25, i64 328, !10, i64 344, !10, i64 352, !15, i64 360, !15, i64 364, !15, i64 368, !15, i64 372, !15, i64 376, !17, i64 384, !27, i64 408, !10, i64 432, !10, i64 440, !10, i64 448, !25, i64 456, !25, i64 472, !25, i64 488, !25, i64 504, !16, i64 520, !17, i64 648, !25, i64 672, !25, i64 688}
!14 = !{!"bool", !7, i64 0}
!15 = !{!"int", !7, i64 0}
!16 = !{!"_ZTSN3ipx12SparseMatrixE", !15, i64 0, !17, i64 8, !17, i64 32, !21, i64 56, !17, i64 80, !21, i64 104}
!17 = !{!"_ZTSSt6vectorIiSaIiEE", !18, i64 0}
!18 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!21 = !{!"_ZTSSt6vectorIdSaIdEE", !22, i64 0}
!22 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!25 = !{!"_ZTSSt8valarrayIdE", !26, i64 0, !6, i64 8}
!26 = !{!"long", !7, i64 0}
!27 = !{!"_ZTSSt6vectorIcSaIcEE", !28, i64 0}
!28 = !{!"_ZTSSt12_Vector_baseIcSaIcEE", !29, i64 0}
!29 = !{!"_ZTSNSt12_Vector_baseIcSaIcEE12_Vector_implE", !30, i64 0}
!30 = !{!"_ZTSNSt12_Vector_baseIcSaIcEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!31 = !{!13, !15, i64 368}
!32 = !{!15, !15, i64 0}
!33 = distinct !{!33, !34}
!34 = !{!"llvm.loop.mustprogress"}
!35 = distinct !{!35, !34}
!36 = distinct !{!36, !34}
!37 = distinct !{!37, !34}


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

@.str.18 = external hidden unnamed_addr constant [70 x i8], align 1
@.str.73 = external hidden unnamed_addr constant [31 x i8], align 1
@__PRETTY_FUNCTION__._ZNK3ipx5Model24MultiplyWithScaledMatrixERKSt8valarrayIdEdRS2_c = external hidden unnamed_addr constant [88 x i8], align 1
@.str.74 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.75 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.76 = external hidden unnamed_addr constant [31 x i8], align 1

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #0

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK3ipx5Model24MultiplyWithScaledMatrixERKSt8valarrayIdEdRS2_c(ptr noundef nonnull align 8 dereferenceable(704) %0, ptr noundef nonnull align 8 dereferenceable(16) %1, double noundef %2, ptr noundef nonnull align 8 dereferenceable(16) %3, i8 noundef signext %4) local_unnamed_addr #2 align 2 {
  %6 = and i8 %4, -33
  %or.cond = icmp eq i8 %6, 84
  %7 = tail call noundef i64 @_ZNKSt8valarrayIdE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %1)
  %8 = trunc i64 %7 to i32
  br i1 %or.cond, label %9, label %46

9:                                                ; preds = %5
  %10 = getelementptr inbounds i8, ptr %0, i64 360
  %11 = load i32, ptr %10, align 8, !tbaa !5
  %12 = icmp eq i32 %11, %8
  br i1 %12, label %14, label %13

13:                                               ; preds = %9
  tail call void @__assert_fail(ptr noundef nonnull @.str.73, ptr noundef nonnull @.str.18, i32 noundef 1437, ptr noundef nonnull @__PRETTY_FUNCTION__._ZNK3ipx5Model24MultiplyWithScaledMatrixERKSt8valarrayIdEdRS2_c) #6
  unreachable

14:                                               ; preds = %9
  %15 = tail call noundef i64 @_ZNKSt8valarrayIdE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %3)
  %16 = trunc i64 %15 to i32
  %17 = getelementptr inbounds i8, ptr %0, i64 368
  %18 = load i32, ptr %17, align 8, !tbaa !28
  %19 = icmp eq i32 %18, %16
  br i1 %19, label %21, label %20

20:                                               ; preds = %14
  tail call void @__assert_fail(ptr noundef nonnull @.str.74, ptr noundef nonnull @.str.18, i32 noundef 1438, ptr noundef nonnull @__PRETTY_FUNCTION__._ZNK3ipx5Model24MultiplyWithScaledMatrixERKSt8valarrayIdEdRS2_c) #6
  unreachable

21:                                               ; preds = %14
  %22 = tail call noundef zeroext i1 @_ZNK3ipx5Model8dualizedEv(ptr noundef nonnull align 8 dereferenceable(704) %0)
  br i1 %22, label %.preheader, label %.preheader39

.preheader39:                                     ; preds = %21
  %23 = load i32, ptr %17, align 8, !tbaa !28
  %24 = icmp sgt i32 %23, 0
  br i1 %24, label %.lr.ph49, label %.loopexit

.lr.ph49:                                         ; preds = %.preheader39
  %25 = getelementptr inbounds i8, ptr %0, i64 24
  br label %37

.preheader:                                       ; preds = %21
  %26 = load i32, ptr %10, align 8, !tbaa !5
  %27 = icmp sgt i32 %26, 0
  br i1 %27, label %.lr.ph51, label %.loopexit

.lr.ph51:                                         ; preds = %.preheader
  %28 = getelementptr inbounds i8, ptr %0, i64 24
  br label %29

29:                                               ; preds = %.lr.ph51, %29
  %indvars.iv62 = phi i64 [ 0, %.lr.ph51 ], [ %indvars.iv.next63, %29 ]
  %30 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %1, i64 noundef %indvars.iv62) #7
  %31 = load double, ptr %30, align 8, !tbaa !29
  %32 = fmul double %31, %2
  %33 = trunc nuw nsw i64 %indvars.iv62 to i32
  tail call void @_ZN3ipx13ScatterColumnERKNS_12SparseMatrixEidRSt8valarrayIdE(ptr noundef nonnull align 8 dereferenceable(128) %28, i32 noundef %33, double noundef %32, ptr noundef nonnull align 8 dereferenceable(16) %3)
  %indvars.iv.next63 = add nuw nsw i64 %indvars.iv62, 1
  %34 = load i32, ptr %10, align 8, !tbaa !5
  %35 = sext i32 %34 to i64
  %36 = icmp slt i64 %indvars.iv.next63, %35
  br i1 %36, label %29, label %.loopexit, !llvm.loop !30

37:                                               ; preds = %.lr.ph49, %37
  %indvars.iv59 = phi i64 [ 0, %.lr.ph49 ], [ %indvars.iv.next60, %37 ]
  %38 = trunc nuw nsw i64 %indvars.iv59 to i32
  %39 = tail call noundef double @_ZN3ipx9DotColumnERKNS_12SparseMatrixEiRKSt8valarrayIdE(ptr noundef nonnull align 8 dereferenceable(128) %25, i32 noundef %38, ptr noundef nonnull align 8 dereferenceable(16) %1)
  %40 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %3, i64 noundef %indvars.iv59) #7
  %41 = load double, ptr %40, align 8, !tbaa !29
  %42 = tail call double @llvm.fmuladd.f64(double %2, double %39, double %41)
  store double %42, ptr %40, align 8, !tbaa !29
  %indvars.iv.next60 = add nuw nsw i64 %indvars.iv59, 1
  %43 = load i32, ptr %17, align 8, !tbaa !28
  %44 = sext i32 %43 to i64
  %45 = icmp slt i64 %indvars.iv.next60, %44
  br i1 %45, label %37, label %.loopexit, !llvm.loop !32

46:                                               ; preds = %5
  %47 = getelementptr inbounds i8, ptr %0, i64 368
  %48 = load i32, ptr %47, align 8, !tbaa !28
  %49 = icmp eq i32 %48, %8
  br i1 %49, label %51, label %50

50:                                               ; preds = %46
  tail call void @__assert_fail(ptr noundef nonnull @.str.75, ptr noundef nonnull @.str.18, i32 noundef 1447, ptr noundef nonnull @__PRETTY_FUNCTION__._ZNK3ipx5Model24MultiplyWithScaledMatrixERKSt8valarrayIdEdRS2_c) #6
  unreachable

51:                                               ; preds = %46
  %52 = tail call noundef i64 @_ZNKSt8valarrayIdE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %3)
  %53 = trunc i64 %52 to i32
  %54 = getelementptr inbounds i8, ptr %0, i64 360
  %55 = load i32, ptr %54, align 8, !tbaa !5
  %56 = icmp eq i32 %55, %53
  br i1 %56, label %58, label %57

57:                                               ; preds = %51
  tail call void @__assert_fail(ptr noundef nonnull @.str.76, ptr noundef nonnull @.str.18, i32 noundef 1448, ptr noundef nonnull @__PRETTY_FUNCTION__._ZNK3ipx5Model24MultiplyWithScaledMatrixERKSt8valarrayIdEdRS2_c) #6
  unreachable

58:                                               ; preds = %51
  %59 = tail call noundef zeroext i1 @_ZNK3ipx5Model8dualizedEv(ptr noundef nonnull align 8 dereferenceable(704) %0)
  br i1 %59, label %.preheader41, label %.preheader43

.preheader43:                                     ; preds = %58
  %60 = load i32, ptr %47, align 8, !tbaa !28
  %61 = icmp sgt i32 %60, 0
  br i1 %61, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %.preheader43
  %62 = getelementptr inbounds i8, ptr %0, i64 24
  br label %75

.preheader41:                                     ; preds = %58
  %63 = load i32, ptr %54, align 8, !tbaa !5
  %64 = icmp sgt i32 %63, 0
  br i1 %64, label %.lr.ph47, label %.loopexit

.lr.ph47:                                         ; preds = %.preheader41
  %65 = getelementptr inbounds i8, ptr %0, i64 24
  br label %66

66:                                               ; preds = %.lr.ph47, %66
  %indvars.iv56 = phi i64 [ 0, %.lr.ph47 ], [ %indvars.iv.next57, %66 ]
  %67 = trunc nuw nsw i64 %indvars.iv56 to i32
  %68 = tail call noundef double @_ZN3ipx9DotColumnERKNS_12SparseMatrixEiRKSt8valarrayIdE(ptr noundef nonnull align 8 dereferenceable(128) %65, i32 noundef %67, ptr noundef nonnull align 8 dereferenceable(16) %1)
  %69 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %3, i64 noundef %indvars.iv56) #7
  %70 = load double, ptr %69, align 8, !tbaa !29
  %71 = tail call double @llvm.fmuladd.f64(double %2, double %68, double %70)
  store double %71, ptr %69, align 8, !tbaa !29
  %indvars.iv.next57 = add nuw nsw i64 %indvars.iv56, 1
  %72 = load i32, ptr %54, align 8, !tbaa !5
  %73 = sext i32 %72 to i64
  %74 = icmp slt i64 %indvars.iv.next57, %73
  br i1 %74, label %66, label %.loopexit, !llvm.loop !33

75:                                               ; preds = %.lr.ph, %75
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %75 ]
  %76 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %1, i64 noundef %indvars.iv) #7
  %77 = load double, ptr %76, align 8, !tbaa !29
  %78 = fmul double %77, %2
  %79 = trunc nuw nsw i64 %indvars.iv to i32
  tail call void @_ZN3ipx13ScatterColumnERKNS_12SparseMatrixEidRSt8valarrayIdE(ptr noundef nonnull align 8 dereferenceable(128) %62, i32 noundef %79, double noundef %78, ptr noundef nonnull align 8 dereferenceable(16) %3)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %80 = load i32, ptr %47, align 8, !tbaa !28
  %81 = sext i32 %80 to i64
  %82 = icmp slt i64 %indvars.iv.next, %81
  br i1 %82, label %75, label %.loopexit, !llvm.loop !34

.loopexit:                                        ; preds = %75, %66, %37, %29, %.preheader43, %.preheader41, %.preheader39, %.preheader
  ret void
}

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3ipx5Model8dualizedEv(ptr noundef nonnull align 8 dereferenceable(704)) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3ipx13ScatterColumnERKNS_12SparseMatrixEidRSt8valarrayIdE(ptr noundef nonnull align 8 dereferenceable(128), i32 noundef, double noundef, ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZN3ipx9DotColumnERKNS_12SparseMatrixEiRKSt8valarrayIdE(ptr noundef nonnull align 8 dereferenceable(128), i32 noundef, ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #1

attributes #0 = { noreturn nounwind "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 = { 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 #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 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { 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 #5 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { noreturn nounwind }
attributes #7 = { 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, !10, i64 360}
!6 = !{!"_ZTSN3ipx5ModelE", !7, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !11, i64 24, !11, i64 152, !21, i64 280, !21, i64 296, !21, i64 312, !21, i64 328, !23, i64 344, !23, i64 352, !10, i64 360, !10, i64 364, !10, i64 368, !10, i64 372, !10, i64 376, !12, i64 384, !24, i64 408, !23, i64 432, !23, i64 440, !23, i64 448, !21, i64 456, !21, i64 472, !21, i64 488, !21, i64 504, !11, i64 520, !12, i64 648, !21, i64 672, !21, i64 688}
!7 = !{!"bool", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"_ZTSN3ipx12SparseMatrixE", !10, i64 0, !12, i64 8, !12, i64 32, !17, i64 56, !12, i64 80, !17, i64 104}
!12 = !{!"_ZTSSt6vectorIiSaIiEE", !13, i64 0}
!13 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !14, i64 0}
!14 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !16, i64 0, !16, i64 8, !16, i64 16}
!16 = !{!"any pointer", !8, i64 0}
!17 = !{!"_ZTSSt6vectorIdSaIdEE", !18, i64 0}
!18 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !16, i64 0, !16, i64 8, !16, i64 16}
!21 = !{!"_ZTSSt8valarrayIdE", !22, i64 0, !16, i64 8}
!22 = !{!"long", !8, i64 0}
!23 = !{!"double", !8, i64 0}
!24 = !{!"_ZTSSt6vectorIcSaIcEE", !25, i64 0}
!25 = !{!"_ZTSSt12_Vector_baseIcSaIcEE", !26, i64 0}
!26 = !{!"_ZTSNSt12_Vector_baseIcSaIcEE12_Vector_implE", !27, i64 0}
!27 = !{!"_ZTSNSt12_Vector_baseIcSaIcEE17_Vector_impl_dataE", !16, i64 0, !16, i64 8, !16, i64 16}
!28 = !{!6, !10, i64 368}
!29 = !{!23, !23, i64 0}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.mustprogress"}
!32 = distinct !{!32, !31}
!33 = distinct !{!33, !31}
!34 = distinct !{!34, !31}


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