; LLVM IR from doyubkim/fluid-engine-dev :: src/jet (fdm_gauss_seidel_solver2)

; 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.jet::Size2" = type { i64, i64 }
%"class.jet::FdmGaussSeidelSolver2" = type { %"class.jet::FdmLinearSystemSolver2", i32, i32, i32, double, double, double, i8, %"class.jet::Array", %"class.jet::VectorN" }
%"class.jet::FdmLinearSystemSolver2" = type { ptr }
%"class.jet::Array" = type { %"class.jet::Size2", %"class.std::vector" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = 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.jet::VectorN" = type { %"class.std::vector" }
%"struct.jet::FdmLinearSystem2" = type { %"class.jet::Array.0", %"class.jet::Array", %"class.jet::Array" }
%"class.jet::Array.0" = type { %"class.jet::Size2", %"class.std::vector.1" }
%"class.std::vector.1" = type { %"struct.std::_Vector_base.2" }
%"struct.std::_Vector_base.2" = type { %"struct.std::_Vector_base<jet::FdmMatrixRow2, std::allocator<jet::FdmMatrixRow2>>::_Vector_impl" }
%"struct.std::_Vector_base<jet::FdmMatrixRow2, std::allocator<jet::FdmMatrixRow2>>::_Vector_impl" = type { %"struct.std::_Vector_base<jet::FdmMatrixRow2, std::allocator<jet::FdmMatrixRow2>>::_Vector_impl_data" }
%"struct.std::_Vector_base<jet::FdmMatrixRow2, std::allocator<jet::FdmMatrixRow2>>::_Vector_impl_data" = type { ptr, ptr, ptr }

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN3jet21FdmGaussSeidelSolver25solveEPNS_16FdmLinearSystem2E(ptr noundef nonnull align 8 dereferenceable(120) %0, ptr noundef %1) unnamed_addr #0 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %"class.jet::Size2", align 8
  %6 = alloca double, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %9 = load ptr, ptr %3, align 8
  call void @_ZN3jet21FdmGaussSeidelSolver222clearCompressedVectorsEv(ptr noundef nonnull align 8 dereferenceable(120) %9)
  %10 = getelementptr inbounds %"class.jet::FdmGaussSeidelSolver2", ptr %9, i32 0, i32 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %5) #3
  %11 = load ptr, ptr %4, align 8, !tbaa !5
  %12 = getelementptr inbounds %"struct.jet::FdmLinearSystem2", ptr %11, i32 0, i32 1
  call void @_ZNK3jet5ArrayIdLm2EE4sizeEv(ptr dead_on_unwind writable sret(%"class.jet::Size2") align 8 %5, ptr noundef nonnull align 8 dereferenceable(40) %12)
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #3
  store double 0.000000e+00, ptr %6, align 8, !tbaa !9
  call void @_ZN3jet5ArrayIdLm2EE6resizeERKNS_5Size2ERKd(ptr noundef nonnull align 8 dereferenceable(40) %10, ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 8 dereferenceable(8) %6)
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr %5) #3
  %13 = getelementptr inbounds %"class.jet::FdmGaussSeidelSolver2", ptr %9, i32 0, i32 1
  %14 = load i32, ptr %13, align 8, !tbaa !11
  %15 = getelementptr inbounds %"class.jet::FdmGaussSeidelSolver2", ptr %9, i32 0, i32 2
  store i32 %14, ptr %15, align 4, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #3
  store i32 0, ptr %7, align 4, !tbaa !25
  br label %16

16:                                               ; preds = %72, %2
  %17 = load i32, ptr %7, align 4, !tbaa !25
  %18 = getelementptr inbounds %"class.jet::FdmGaussSeidelSolver2", ptr %9, i32 0, i32 1
  %19 = load i32, ptr %18, align 8, !tbaa !11
  %20 = icmp ult i32 %17, %19
  br i1 %20, label %22, label %21

21:                                               ; preds = %16
  store i32 2, ptr %8, align 4
  br label %75

22:                                               ; preds = %16
  %23 = getelementptr inbounds %"class.jet::FdmGaussSeidelSolver2", ptr %9, i32 0, i32 7
  %24 = load i8, ptr %23, align 8, !tbaa !26, !range !27, !noundef !28
  %25 = trunc i8 %24 to i1
  br i1 %25, label %26, label %35

26:                                               ; preds = %22
  %27 = load ptr, ptr %4, align 8, !tbaa !5
  %28 = getelementptr inbounds %"struct.jet::FdmLinearSystem2", ptr %27, i32 0, i32 0
  %29 = load ptr, ptr %4, align 8, !tbaa !5
  %30 = getelementptr inbounds %"struct.jet::FdmLinearSystem2", ptr %29, i32 0, i32 2
  %31 = getelementptr inbounds %"class.jet::FdmGaussSeidelSolver2", ptr %9, i32 0, i32 6
  %32 = load double, ptr %31, align 8, !tbaa !29
  %33 = load ptr, ptr %4, align 8, !tbaa !5
  %34 = getelementptr inbounds %"struct.jet::FdmLinearSystem2", ptr %33, i32 0, i32 1
  call void @_ZN3jet21FdmGaussSeidelSolver213relaxRedBlackERKNS_5ArrayINS_13FdmMatrixRow2ELm2EEERKNS1_IdLm2EEEdPS6_(ptr noundef nonnull align 8 dereferenceable(40) %28, ptr noundef nonnull align 8 dereferenceable(40) %30, double noundef %32, ptr noundef %34)
  br label %44

35:                                               ; preds = %22
  %36 = load ptr, ptr %4, align 8, !tbaa !5
  %37 = getelementptr inbounds %"struct.jet::FdmLinearSystem2", ptr %36, i32 0, i32 0
  %38 = load ptr, ptr %4, align 8, !tbaa !5
  %39 = getelementptr inbounds %"struct.jet::FdmLinearSystem2", ptr %38, i32 0, i32 2
  %40 = getelementptr inbounds %"class.jet::FdmGaussSeidelSolver2", ptr %9, i32 0, i32 6
  %41 = load double, ptr %40, align 8, !tbaa !29
  %42 = load ptr, ptr %4, align 8, !tbaa !5
  %43 = getelementptr inbounds %"struct.jet::FdmLinearSystem2", ptr %42, i32 0, i32 1
  call void @_ZN3jet21FdmGaussSeidelSolver25relaxERKNS_5ArrayINS_13FdmMatrixRow2ELm2EEERKNS1_IdLm2EEEdPS6_(ptr noundef nonnull align 8 dereferenceable(40) %37, ptr noundef nonnull align 8 dereferenceable(40) %39, double noundef %41, ptr noundef %43)
  br label %44

44:                                               ; preds = %35, %26
  %45 = load i32, ptr %7, align 4, !tbaa !25
  %46 = icmp ne i32 %45, 0
  br i1 %46, label %47, label %71

47:                                               ; preds = %44
  %48 = load i32, ptr %7, align 4, !tbaa !25
  %49 = getelementptr inbounds %"class.jet::FdmGaussSeidelSolver2", ptr %9, i32 0, i32 3
  %50 = load i32, ptr %49, align 8, !tbaa !30
  %51 = urem i32 %48, %50
  %52 = icmp eq i32 %51, 0
  br i1 %52, label %53, label %71

53:                                               ; preds = %47
  %54 = load ptr, ptr %4, align 8, !tbaa !5
  %55 = getelementptr inbounds %"struct.jet::FdmLinearSystem2", ptr %54, i32 0, i32 0
  %56 = load ptr, ptr %4, align 8, !tbaa !5
  %57 = getelementptr inbounds %"struct.jet::FdmLinearSystem2", ptr %56, i32 0, i32 1
  %58 = load ptr, ptr %4, align 8, !tbaa !5
  %59 = getelementptr inbounds %"struct.jet::FdmLinearSystem2", ptr %58, i32 0, i32 2
  %60 = getelementptr inbounds %"class.jet::FdmGaussSeidelSolver2", ptr %9, i32 0, i32 8
  call void @_ZN3jet8FdmBlas28residualERKNS_5ArrayINS_13FdmMatrixRow2ELm2EEERKNS1_IdLm2EEES8_PS6_(ptr noundef nonnull align 8 dereferenceable(40) %55, ptr noundef nonnull align 8 dereferenceable(40) %57, ptr noundef nonnull align 8 dereferenceable(40) %59, ptr noundef %60)
  %61 = getelementptr inbounds %"class.jet::FdmGaussSeidelSolver2", ptr %9, i32 0, i32 8
  %62 = call noundef double @_ZN3jet8FdmBlas26l2NormERKNS_5ArrayIdLm2EEE(ptr noundef nonnull align 8 dereferenceable(40) %61)
  %63 = getelementptr inbounds %"class.jet::FdmGaussSeidelSolver2", ptr %9, i32 0, i32 4
  %64 = load double, ptr %63, align 8, !tbaa !31
  %65 = fcmp olt double %62, %64
  br i1 %65, label %66, label %70

66:                                               ; preds = %53
  %67 = load i32, ptr %7, align 4, !tbaa !25
  %68 = add i32 %67, 1
  %69 = getelementptr inbounds %"class.jet::FdmGaussSeidelSolver2", ptr %9, i32 0, i32 2
  store i32 %68, ptr %69, align 4, !tbaa !24
  store i32 2, ptr %8, align 4
  br label %75

70:                                               ; preds = %53
  br label %71

71:                                               ; preds = %70, %47, %44
  br label %72

72:                                               ; preds = %71
  %73 = load i32, ptr %7, align 4, !tbaa !25
  %74 = add i32 %73, 1
  store i32 %74, ptr %7, align 4, !tbaa !25
  br label %16, !llvm.loop !32

75:                                               ; preds = %66, %21
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #3
  br label %76

76:                                               ; preds = %75
  %77 = load ptr, ptr %4, align 8, !tbaa !5
  %78 = getelementptr inbounds %"struct.jet::FdmLinearSystem2", ptr %77, i32 0, i32 0
  %79 = load ptr, ptr %4, align 8, !tbaa !5
  %80 = getelementptr inbounds %"struct.jet::FdmLinearSystem2", ptr %79, i32 0, i32 1
  %81 = load ptr, ptr %4, align 8, !tbaa !5
  %82 = getelementptr inbounds %"struct.jet::FdmLinearSystem2", ptr %81, i32 0, i32 2
  %83 = getelementptr inbounds %"class.jet::FdmGaussSeidelSolver2", ptr %9, i32 0, i32 8
  call void @_ZN3jet8FdmBlas28residualERKNS_5ArrayINS_13FdmMatrixRow2ELm2EEERKNS1_IdLm2EEES8_PS6_(ptr noundef nonnull align 8 dereferenceable(40) %78, ptr noundef nonnull align 8 dereferenceable(40) %80, ptr noundef nonnull align 8 dereferenceable(40) %82, ptr noundef %83)
  %84 = getelementptr inbounds %"class.jet::FdmGaussSeidelSolver2", ptr %9, i32 0, i32 8
  %85 = call noundef double @_ZN3jet8FdmBlas26l2NormERKNS_5ArrayIdLm2EEE(ptr noundef nonnull align 8 dereferenceable(40) %84)
  %86 = getelementptr inbounds %"class.jet::FdmGaussSeidelSolver2", ptr %9, i32 0, i32 5
  store double %85, ptr %86, align 8, !tbaa !34
  %87 = getelementptr inbounds %"class.jet::FdmGaussSeidelSolver2", ptr %9, i32 0, i32 5
  %88 = load double, ptr %87, align 8, !tbaa !34
  %89 = getelementptr inbounds %"class.jet::FdmGaussSeidelSolver2", ptr %9, i32 0, i32 4
  %90 = load double, ptr %89, align 8, !tbaa !31
  %91 = fcmp olt double %88, %90
  ret i1 %91
}

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK3jet5ArrayIdLm2EE4sizeEv(ptr dead_on_unwind noalias writable sret(%"class.jet::Size2") align 8, ptr noundef nonnull align 8 dereferenceable(40)) #0 align 2

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

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

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

declare void @_ZN3jet8FdmBlas28residualERKNS_5ArrayINS_13FdmMatrixRow2ELm2EEERKNS1_IdLm2EEES8_PS6_(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(40), ptr noundef) #2

declare noundef double @_ZN3jet8FdmBlas26l2NormERKNS_5ArrayIdLm2EEE(ptr noundef nonnull align 8 dereferenceable(40)) #2

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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, !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, !14, i64 8}
!12 = !{!"_ZTSN3jet21FdmGaussSeidelSolver2E", !13, i64 0, !14, i64 8, !14, i64 12, !14, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !15, i64 48, !16, i64 56, !23, i64 96}
!13 = !{!"_ZTSN3jet22FdmLinearSystemSolver2E"}
!14 = !{!"int", !7, i64 0}
!15 = !{!"bool", !7, i64 0}
!16 = !{!"_ZTSN3jet5ArrayIdLm2EEE", !17, i64 0, !19, i64 16}
!17 = !{!"_ZTSN3jet5Size2E", !18, i64 0, !18, i64 8}
!18 = !{!"long", !7, i64 0}
!19 = !{!"_ZTSSt6vectorIdSaIdEE", !20, i64 0}
!20 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!23 = !{!"_ZTSN3jet7VectorNIdEE", !19, i64 0}
!24 = !{!12, !14, i64 12}
!25 = !{!14, !14, i64 0}
!26 = !{!12, !15, i64 48}
!27 = !{i8 0, i8 2}
!28 = !{}
!29 = !{!12, !10, i64 40}
!30 = !{!12, !14, i64 16}
!31 = !{!12, !10, i64 24}
!32 = distinct !{!32, !33}
!33 = !{!"llvm.loop.mustprogress"}
!34 = !{!12, !10, i64 32}


; 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.jet::Size2" = type { i64, i64 }

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN3jet21FdmGaussSeidelSolver25solveEPNS_16FdmLinearSystem2E(ptr noundef nonnull align 8 dereferenceable(120) %0, ptr noundef %1) unnamed_addr #0 align 2 {
  %3 = alloca %"class.jet::Size2", align 8
  %4 = alloca double, align 8
  tail call void @_ZN3jet21FdmGaussSeidelSolver222clearCompressedVectorsEv(ptr noundef nonnull align 8 dereferenceable(120) %0)
  %5 = getelementptr inbounds i8, ptr %0, i64 56
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #3
  %6 = getelementptr inbounds i8, ptr %1, i64 40
  call void @_ZNK3jet5ArrayIdLm2EE4sizeEv(ptr dead_on_unwind nonnull writable sret(%"class.jet::Size2") align 8 %3, ptr noundef nonnull align 8 dereferenceable(40) %6)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #3
  store double 0.000000e+00, ptr %4, align 8, !tbaa !5
  call void @_ZN3jet5ArrayIdLm2EE6resizeERKNS_5Size2ERKd(ptr noundef nonnull align 8 dereferenceable(40) %5, ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef nonnull align 8 dereferenceable(8) %4)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #3
  %7 = getelementptr inbounds i8, ptr %0, i64 8
  %8 = load i32, ptr %7, align 8, !tbaa !9
  %9 = getelementptr inbounds i8, ptr %0, i64 12
  store i32 %8, ptr %9, align 4, !tbaa !23
  %.not20 = icmp eq i32 %8, 0
  br i1 %.not20, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %2
  %10 = getelementptr inbounds i8, ptr %0, i64 48
  %11 = getelementptr inbounds i8, ptr %1, i64 80
  %12 = getelementptr inbounds i8, ptr %0, i64 40
  %13 = getelementptr inbounds i8, ptr %0, i64 16
  %14 = getelementptr inbounds i8, ptr %0, i64 24
  %15 = load i8, ptr %10, align 8, !tbaa !24, !range !25, !noundef !26
  %16 = trunc nuw i8 %15 to i1
  %17 = load double, ptr %12, align 8, !tbaa !27
  br i1 %16, label %19, label %18

18:                                               ; preds = %.lr.ph
  call void @_ZN3jet21FdmGaussSeidelSolver25relaxERKNS_5ArrayINS_13FdmMatrixRow2ELm2EEERKNS1_IdLm2EEEdPS6_(ptr noundef nonnull align 8 dereferenceable(40) %1, ptr noundef nonnull align 8 dereferenceable(40) %11, double noundef %17, ptr noundef nonnull %6)
  br label %20

19:                                               ; preds = %.lr.ph
  call void @_ZN3jet21FdmGaussSeidelSolver213relaxRedBlackERKNS_5ArrayINS_13FdmMatrixRow2ELm2EEERKNS1_IdLm2EEEdPS6_(ptr noundef nonnull align 8 dereferenceable(40) %1, ptr noundef nonnull align 8 dereferenceable(40) %11, double noundef %17, ptr noundef nonnull %6)
  br label %20

20:                                               ; preds = %18, %19
  %21 = load i32, ptr %7, align 8, !tbaa !9
  %22 = icmp ugt i32 %21, 1
  br i1 %22, label %.peel.next, label %.loopexit

.peel.next:                                       ; preds = %20, %37
  %.019 = phi i32 [ %38, %37 ], [ 1, %20 ]
  %23 = load i8, ptr %10, align 8, !tbaa !24, !range !25, !noundef !26
  %24 = trunc nuw i8 %23 to i1
  %25 = load double, ptr %12, align 8, !tbaa !27
  br i1 %24, label %26, label %27

26:                                               ; preds = %.peel.next
  call void @_ZN3jet21FdmGaussSeidelSolver213relaxRedBlackERKNS_5ArrayINS_13FdmMatrixRow2ELm2EEERKNS1_IdLm2EEEdPS6_(ptr noundef nonnull align 8 dereferenceable(40) %1, ptr noundef nonnull align 8 dereferenceable(40) %11, double noundef %25, ptr noundef nonnull %6)
  br label %28

27:                                               ; preds = %.peel.next
  call void @_ZN3jet21FdmGaussSeidelSolver25relaxERKNS_5ArrayINS_13FdmMatrixRow2ELm2EEERKNS1_IdLm2EEEdPS6_(ptr noundef nonnull align 8 dereferenceable(40) %1, ptr noundef nonnull align 8 dereferenceable(40) %11, double noundef %25, ptr noundef nonnull %6)
  br label %28

28:                                               ; preds = %26, %27
  %29 = load i32, ptr %13, align 8, !tbaa !28
  %30 = urem i32 %.019, %29
  %31 = icmp eq i32 %30, 0
  br i1 %31, label %32, label %37

32:                                               ; preds = %28
  call void @_ZN3jet8FdmBlas28residualERKNS_5ArrayINS_13FdmMatrixRow2ELm2EEERKNS1_IdLm2EEES8_PS6_(ptr noundef nonnull align 8 dereferenceable(40) %1, ptr noundef nonnull align 8 dereferenceable(40) %6, ptr noundef nonnull align 8 dereferenceable(40) %11, ptr noundef nonnull %5)
  %33 = call noundef double @_ZN3jet8FdmBlas26l2NormERKNS_5ArrayIdLm2EEE(ptr noundef nonnull align 8 dereferenceable(40) %5)
  %34 = load double, ptr %14, align 8, !tbaa !29
  %35 = fcmp olt double %33, %34
  br i1 %35, label %.loopexit23, label %37

.loopexit23:                                      ; preds = %32
  %36 = add nuw i32 %.019, 1
  store i32 %36, ptr %9, align 4, !tbaa !23
  br label %.loopexit

37:                                               ; preds = %28, %32
  %38 = add nuw i32 %.019, 1
  %39 = load i32, ptr %7, align 8, !tbaa !9
  %40 = icmp ult i32 %38, %39
  br i1 %40, label %.peel.next, label %.loopexit, !llvm.loop !30

.loopexit:                                        ; preds = %37, %20, %2, %.loopexit23
  %41 = getelementptr inbounds i8, ptr %1, i64 80
  call void @_ZN3jet8FdmBlas28residualERKNS_5ArrayINS_13FdmMatrixRow2ELm2EEERKNS1_IdLm2EEES8_PS6_(ptr noundef nonnull align 8 dereferenceable(40) %1, ptr noundef nonnull align 8 dereferenceable(40) %6, ptr noundef nonnull align 8 dereferenceable(40) %41, ptr noundef nonnull %5)
  %42 = call noundef double @_ZN3jet8FdmBlas26l2NormERKNS_5ArrayIdLm2EEE(ptr noundef nonnull align 8 dereferenceable(40) %5)
  %43 = getelementptr inbounds i8, ptr %0, i64 32
  store double %42, ptr %43, align 8, !tbaa !33
  %44 = getelementptr inbounds i8, ptr %0, i64 24
  %45 = load double, ptr %44, align 8, !tbaa !29
  %46 = fcmp olt double %42, %45
  ret i1 %46
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3jet21FdmGaussSeidelSolver222clearCompressedVectorsEv(ptr noundef nonnull align 8 dereferenceable(120)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3jet5ArrayIdLm2EE6resizeERKNS_5Size2ERKd(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK3jet5ArrayIdLm2EE4sizeEv(ptr dead_on_unwind noalias writable sret(%"class.jet::Size2") align 8, ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #0 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3jet21FdmGaussSeidelSolver213relaxRedBlackERKNS_5ArrayINS_13FdmMatrixRow2ELm2EEERKNS1_IdLm2EEEdPS6_(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(40), double noundef, ptr noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3jet21FdmGaussSeidelSolver25relaxERKNS_5ArrayINS_13FdmMatrixRow2ELm2EEERKNS1_IdLm2EEEdPS6_(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(40), double noundef, ptr noundef) local_unnamed_addr #0 align 2

declare void @_ZN3jet8FdmBlas28residualERKNS_5ArrayINS_13FdmMatrixRow2ELm2EEERKNS1_IdLm2EEES8_PS6_(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(40), ptr noundef) local_unnamed_addr #2

declare noundef double @_ZN3jet8FdmBlas26l2NormERKNS_5ArrayIdLm2EEE(ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #2

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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, !6, i64 0}
!6 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !12, i64 8}
!10 = !{!"_ZTSN3jet21FdmGaussSeidelSolver2E", !11, i64 0, !12, i64 8, !12, i64 12, !12, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !13, i64 48, !14, i64 56, !22, i64 96}
!11 = !{!"_ZTSN3jet22FdmLinearSystemSolver2E"}
!12 = !{!"int", !7, i64 0}
!13 = !{!"bool", !7, i64 0}
!14 = !{!"_ZTSN3jet5ArrayIdLm2EEE", !15, i64 0, !17, i64 16}
!15 = !{!"_ZTSN3jet5Size2E", !16, i64 0, !16, i64 8}
!16 = !{!"long", !7, 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", !21, i64 0, !21, i64 8, !21, i64 16}
!21 = !{!"any pointer", !7, i64 0}
!22 = !{!"_ZTSN3jet7VectorNIdEE", !17, i64 0}
!23 = !{!10, !12, i64 12}
!24 = !{!10, !13, i64 48}
!25 = !{i8 0, i8 2}
!26 = !{}
!27 = !{!10, !6, i64 40}
!28 = !{!10, !12, i64 16}
!29 = !{!10, !6, i64 24}
!30 = distinct !{!30, !31, !32}
!31 = !{!"llvm.loop.mustprogress"}
!32 = !{!"llvm.loop.peeled.count", i32 1}
!33 = !{!10, !6, i64 32}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopFullUnrollPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass