; LLVM IR from doyubkim/fluid-engine-dev :: src/jet/fdm_jacobi_solver2.ll (ZN3jet16FdmJacobiSolver25solveEPNS_16FdmLinearSystem2E)

; 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::FdmJacobiSolver2" = type { %"class.jet::FdmLinearSystemSolver2", i32, i32, i32, double, double, %"class.jet::Array", %"class.jet::Array", %"class.jet::VectorN", %"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 @_ZN3jet16FdmJacobiSolver25solveEPNS_16FdmLinearSystem2E(ptr noundef nonnull align 8 dereferenceable(168) %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 %"class.jet::Size2", align 8
  %8 = alloca double, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %11 = load ptr, ptr %3, align 8
  call void @_ZN3jet16FdmJacobiSolver222clearCompressedVectorsEv(ptr noundef nonnull align 8 dereferenceable(168) %11)
  %12 = getelementptr inbounds %"class.jet::FdmJacobiSolver2", ptr %11, i32 0, i32 6
  call void @llvm.lifetime.start.p0(i64 16, ptr %5) #3
  %13 = load ptr, ptr %4, align 8, !tbaa !5
  %14 = getelementptr inbounds %"struct.jet::FdmLinearSystem2", ptr %13, 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) %14)
  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) %12, 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
  %15 = getelementptr inbounds %"class.jet::FdmJacobiSolver2", ptr %11, i32 0, i32 7
  call void @llvm.lifetime.start.p0(i64 16, ptr %7) #3
  %16 = load ptr, ptr %4, align 8, !tbaa !5
  %17 = getelementptr inbounds %"struct.jet::FdmLinearSystem2", ptr %16, i32 0, i32 1
  call void @_ZNK3jet5ArrayIdLm2EE4sizeEv(ptr dead_on_unwind writable sret(%"class.jet::Size2") align 8 %7, ptr noundef nonnull align 8 dereferenceable(40) %17)
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  store double 0.000000e+00, ptr %8, align 8, !tbaa !9
  call void @_ZN3jet5ArrayIdLm2EE6resizeERKNS_5Size2ERKd(ptr noundef nonnull align 8 dereferenceable(40) %15, ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 8 dereferenceable(8) %8)
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr %7) #3
  %18 = getelementptr inbounds %"class.jet::FdmJacobiSolver2", ptr %11, i32 0, i32 1
  %19 = load i32, ptr %18, align 8, !tbaa !11
  %20 = getelementptr inbounds %"class.jet::FdmJacobiSolver2", ptr %11, i32 0, i32 2
  store i32 %19, ptr %20, align 4, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #3
  store i32 0, ptr %9, align 4, !tbaa !24
  br label %21

21:                                               ; preds = %65, %2
  %22 = load i32, ptr %9, align 4, !tbaa !24
  %23 = getelementptr inbounds %"class.jet::FdmJacobiSolver2", ptr %11, i32 0, i32 1
  %24 = load i32, ptr %23, align 8, !tbaa !11
  %25 = icmp ult i32 %22, %24
  br i1 %25, label %27, label %26

26:                                               ; preds = %21
  store i32 2, ptr %10, align 4
  br label %68

27:                                               ; preds = %21
  %28 = load ptr, ptr %4, align 8, !tbaa !5
  %29 = getelementptr inbounds %"struct.jet::FdmLinearSystem2", ptr %28, i32 0, i32 0
  %30 = load ptr, ptr %4, align 8, !tbaa !5
  %31 = getelementptr inbounds %"struct.jet::FdmLinearSystem2", ptr %30, i32 0, i32 2
  %32 = load ptr, ptr %4, align 8, !tbaa !5
  %33 = getelementptr inbounds %"struct.jet::FdmLinearSystem2", ptr %32, i32 0, i32 1
  %34 = getelementptr inbounds %"class.jet::FdmJacobiSolver2", ptr %11, i32 0, i32 6
  call void @_ZN3jet16FdmJacobiSolver25relaxERKNS_5ArrayINS_13FdmMatrixRow2ELm2EEERKNS1_IdLm2EEEPS6_S9_(ptr noundef nonnull align 8 dereferenceable(40) %29, ptr noundef nonnull align 8 dereferenceable(40) %31, ptr noundef %33, ptr noundef %34)
  %35 = getelementptr inbounds %"class.jet::FdmJacobiSolver2", ptr %11, i32 0, i32 6
  %36 = load ptr, ptr %4, align 8, !tbaa !5
  %37 = getelementptr inbounds %"struct.jet::FdmLinearSystem2", ptr %36, i32 0, i32 1
  call void @_ZN3jet5ArrayIdLm2EE4swapERS1_(ptr noundef nonnull align 8 dereferenceable(40) %35, ptr noundef nonnull align 8 dereferenceable(40) %37)
  %38 = load i32, ptr %9, align 4, !tbaa !24
  %39 = icmp ne i32 %38, 0
  br i1 %39, label %40, label %64

40:                                               ; preds = %27
  %41 = load i32, ptr %9, align 4, !tbaa !24
  %42 = getelementptr inbounds %"class.jet::FdmJacobiSolver2", ptr %11, i32 0, i32 3
  %43 = load i32, ptr %42, align 8, !tbaa !25
  %44 = urem i32 %41, %43
  %45 = icmp eq i32 %44, 0
  br i1 %45, label %46, label %64

46:                                               ; preds = %40
  %47 = load ptr, ptr %4, align 8, !tbaa !5
  %48 = getelementptr inbounds %"struct.jet::FdmLinearSystem2", ptr %47, i32 0, i32 0
  %49 = load ptr, ptr %4, align 8, !tbaa !5
  %50 = getelementptr inbounds %"struct.jet::FdmLinearSystem2", ptr %49, i32 0, i32 1
  %51 = load ptr, ptr %4, align 8, !tbaa !5
  %52 = getelementptr inbounds %"struct.jet::FdmLinearSystem2", ptr %51, i32 0, i32 2
  %53 = getelementptr inbounds %"class.jet::FdmJacobiSolver2", ptr %11, i32 0, i32 7
  call void @_ZN3jet8FdmBlas28residualERKNS_5ArrayINS_13FdmMatrixRow2ELm2EEERKNS1_IdLm2EEES8_PS6_(ptr noundef nonnull align 8 dereferenceable(40) %48, ptr noundef nonnull align 8 dereferenceable(40) %50, ptr noundef nonnull align 8 dereferenceable(40) %52, ptr noundef %53)
  %54 = getelementptr inbounds %"class.jet::FdmJacobiSolver2", ptr %11, i32 0, i32 7
  %55 = call noundef double @_ZN3jet8FdmBlas26l2NormERKNS_5ArrayIdLm2EEE(ptr noundef nonnull align 8 dereferenceable(40) %54)
  %56 = getelementptr inbounds %"class.jet::FdmJacobiSolver2", ptr %11, i32 0, i32 4
  %57 = load double, ptr %56, align 8, !tbaa !26
  %58 = fcmp olt double %55, %57
  br i1 %58, label %59, label %63

59:                                               ; preds = %46
  %60 = load i32, ptr %9, align 4, !tbaa !24
  %61 = add i32 %60, 1
  %62 = getelementptr inbounds %"class.jet::FdmJacobiSolver2", ptr %11, i32 0, i32 2
  store i32 %61, ptr %62, align 4, !tbaa !23
  store i32 2, ptr %10, align 4
  br label %68

63:                                               ; preds = %46
  br label %64

64:                                               ; preds = %63, %40, %27
  br label %65

65:                                               ; preds = %64
  %66 = load i32, ptr %9, align 4, !tbaa !24
  %67 = add i32 %66, 1
  store i32 %67, ptr %9, align 4, !tbaa !24
  br label %21, !llvm.loop !27

68:                                               ; preds = %59, %26
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #3
  br label %69

69:                                               ; preds = %68
  %70 = load ptr, ptr %4, align 8, !tbaa !5
  %71 = getelementptr inbounds %"struct.jet::FdmLinearSystem2", ptr %70, i32 0, i32 0
  %72 = load ptr, ptr %4, align 8, !tbaa !5
  %73 = getelementptr inbounds %"struct.jet::FdmLinearSystem2", ptr %72, i32 0, i32 1
  %74 = load ptr, ptr %4, align 8, !tbaa !5
  %75 = getelementptr inbounds %"struct.jet::FdmLinearSystem2", ptr %74, i32 0, i32 2
  %76 = getelementptr inbounds %"class.jet::FdmJacobiSolver2", ptr %11, i32 0, i32 7
  call void @_ZN3jet8FdmBlas28residualERKNS_5ArrayINS_13FdmMatrixRow2ELm2EEERKNS1_IdLm2EEES8_PS6_(ptr noundef nonnull align 8 dereferenceable(40) %71, ptr noundef nonnull align 8 dereferenceable(40) %73, ptr noundef nonnull align 8 dereferenceable(40) %75, ptr noundef %76)
  %77 = getelementptr inbounds %"class.jet::FdmJacobiSolver2", ptr %11, i32 0, i32 7
  %78 = call noundef double @_ZN3jet8FdmBlas26l2NormERKNS_5ArrayIdLm2EEE(ptr noundef nonnull align 8 dereferenceable(40) %77)
  %79 = getelementptr inbounds %"class.jet::FdmJacobiSolver2", ptr %11, i32 0, i32 5
  store double %78, ptr %79, align 8, !tbaa !29
  %80 = getelementptr inbounds %"class.jet::FdmJacobiSolver2", ptr %11, i32 0, i32 5
  %81 = load double, ptr %80, align 8, !tbaa !29
  %82 = getelementptr inbounds %"class.jet::FdmJacobiSolver2", ptr %11, i32 0, i32 4
  %83 = load double, ptr %82, align 8, !tbaa !26
  %84 = fcmp olt double %81, %83
  ret i1 %84
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3jet16FdmJacobiSolver222clearCompressedVectorsEv(ptr noundef nonnull align 8 dereferenceable(168)) #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 @_ZN3jet16FdmJacobiSolver25relaxERKNS_5ArrayINS_13FdmMatrixRow2ELm2EEERKNS1_IdLm2EEEPS6_S9_(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(40), ptr noundef, ptr noundef) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3jet5ArrayIdLm2EE4swapERS1_(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(40)) #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 = !{!"_ZTSN3jet16FdmJacobiSolver2E", !13, i64 0, !14, i64 8, !14, i64 12, !14, i64 16, !10, i64 24, !10, i64 32, !15, i64 40, !15, i64 80, !22, i64 120, !22, i64 144}
!13 = !{!"_ZTSN3jet22FdmLinearSystemSolver2E"}
!14 = !{!"int", !7, i64 0}
!15 = !{!"_ZTSN3jet5ArrayIdLm2EEE", !16, i64 0, !18, i64 16}
!16 = !{!"_ZTSN3jet5Size2E", !17, i64 0, !17, i64 8}
!17 = !{!"long", !7, i64 0}
!18 = !{!"_ZTSSt6vectorIdSaIdEE", !19, i64 0}
!19 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!22 = !{!"_ZTSN3jet7VectorNIdEE", !18, i64 0}
!23 = !{!12, !14, i64 12}
!24 = !{!14, !14, i64 0}
!25 = !{!12, !14, i64 16}
!26 = !{!12, !10, i64 24}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.mustprogress"}
!29 = !{!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 @_ZN3jet16FdmJacobiSolver25solveEPNS_16FdmLinearSystem2E(ptr noundef nonnull align 8 dereferenceable(168) %0, ptr noundef %1) unnamed_addr #0 align 2 {
  %3 = alloca %"class.jet::Size2", align 8
  %4 = alloca double, align 8
  %5 = alloca %"class.jet::Size2", align 8
  %6 = alloca double, align 8
  tail call void @_ZN3jet16FdmJacobiSolver222clearCompressedVectorsEv(ptr noundef nonnull align 8 dereferenceable(168) %0)
  %7 = getelementptr inbounds i8, ptr %0, i64 40
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #3
  %8 = 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) %8)
  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) %7, 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
  %9 = getelementptr inbounds i8, ptr %0, i64 80
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #3
  call void @_ZNK3jet5ArrayIdLm2EE4sizeEv(ptr dead_on_unwind nonnull writable sret(%"class.jet::Size2") align 8 %5, ptr noundef nonnull align 8 dereferenceable(40) %8)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #3
  store double 0.000000e+00, ptr %6, align 8, !tbaa !5
  call void @_ZN3jet5ArrayIdLm2EE6resizeERKNS_5Size2ERKd(ptr noundef nonnull align 8 dereferenceable(40) %9, 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 nonnull %6) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #3
  %10 = getelementptr inbounds i8, ptr %0, i64 8
  %11 = load i32, ptr %10, align 8, !tbaa !9
  %12 = getelementptr inbounds i8, ptr %0, i64 12
  store i32 %11, ptr %12, align 4, !tbaa !22
  %.not19 = icmp eq i32 %11, 0
  br i1 %.not19, label %.loopexit, label %13

13:                                               ; preds = %2
  %14 = getelementptr inbounds i8, ptr %1, i64 80
  %15 = getelementptr inbounds i8, ptr %0, i64 16
  %16 = getelementptr inbounds i8, ptr %0, i64 24
  call void @_ZN3jet16FdmJacobiSolver25relaxERKNS_5ArrayINS_13FdmMatrixRow2ELm2EEERKNS1_IdLm2EEEPS6_S9_(ptr noundef nonnull align 8 dereferenceable(40) %1, ptr noundef nonnull align 8 dereferenceable(40) %14, ptr noundef nonnull %8, ptr noundef nonnull %7)
  call void @_ZN3jet5ArrayIdLm2EE4swapERS1_(ptr noundef nonnull align 8 dereferenceable(40) %7, ptr noundef nonnull align 8 dereferenceable(40) %8)
  %17 = load i32, ptr %10, align 8, !tbaa !9
  %18 = icmp ugt i32 %17, 1
  br i1 %18, label %.peel.next, label %.loopexit

.peel.next:                                       ; preds = %13, %27
  %.018 = phi i32 [ %28, %27 ], [ 1, %13 ]
  call void @_ZN3jet16FdmJacobiSolver25relaxERKNS_5ArrayINS_13FdmMatrixRow2ELm2EEERKNS1_IdLm2EEEPS6_S9_(ptr noundef nonnull align 8 dereferenceable(40) %1, ptr noundef nonnull align 8 dereferenceable(40) %14, ptr noundef nonnull %8, ptr noundef nonnull %7)
  call void @_ZN3jet5ArrayIdLm2EE4swapERS1_(ptr noundef nonnull align 8 dereferenceable(40) %7, ptr noundef nonnull align 8 dereferenceable(40) %8)
  %19 = load i32, ptr %15, align 8, !tbaa !23
  %20 = urem i32 %.018, %19
  %21 = icmp eq i32 %20, 0
  br i1 %21, label %22, label %27

22:                                               ; preds = %.peel.next
  call void @_ZN3jet8FdmBlas28residualERKNS_5ArrayINS_13FdmMatrixRow2ELm2EEERKNS1_IdLm2EEES8_PS6_(ptr noundef nonnull align 8 dereferenceable(40) %1, ptr noundef nonnull align 8 dereferenceable(40) %8, ptr noundef nonnull align 8 dereferenceable(40) %14, ptr noundef nonnull %9)
  %23 = call noundef double @_ZN3jet8FdmBlas26l2NormERKNS_5ArrayIdLm2EEE(ptr noundef nonnull align 8 dereferenceable(40) %9)
  %24 = load double, ptr %16, align 8, !tbaa !24
  %25 = fcmp olt double %23, %24
  br i1 %25, label %.loopexit22, label %27

.loopexit22:                                      ; preds = %22
  %26 = add nuw i32 %.018, 1
  store i32 %26, ptr %12, align 4, !tbaa !22
  br label %.loopexit

27:                                               ; preds = %.peel.next, %22
  %28 = add nuw i32 %.018, 1
  %29 = load i32, ptr %10, align 8, !tbaa !9
  %30 = icmp ult i32 %28, %29
  br i1 %30, label %.peel.next, label %.loopexit, !llvm.loop !25

.loopexit:                                        ; preds = %27, %13, %2, %.loopexit22
  %31 = 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) %8, ptr noundef nonnull align 8 dereferenceable(40) %31, ptr noundef nonnull %9)
  %32 = call noundef double @_ZN3jet8FdmBlas26l2NormERKNS_5ArrayIdLm2EEE(ptr noundef nonnull align 8 dereferenceable(40) %9)
  %33 = getelementptr inbounds i8, ptr %0, i64 32
  store double %32, ptr %33, align 8, !tbaa !28
  %34 = getelementptr inbounds i8, ptr %0, i64 24
  %35 = load double, ptr %34, align 8, !tbaa !24
  %36 = fcmp olt double %32, %35
  ret i1 %36
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3jet16FdmJacobiSolver222clearCompressedVectorsEv(ptr noundef nonnull align 8 dereferenceable(168)) 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 @_ZN3jet16FdmJacobiSolver25relaxERKNS_5ArrayINS_13FdmMatrixRow2ELm2EEERKNS1_IdLm2EEEPS6_S9_(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(40), ptr noundef, ptr noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3jet5ArrayIdLm2EE4swapERS1_(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(40)) 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 = !{!"_ZTSN3jet16FdmJacobiSolver2E", !11, i64 0, !12, i64 8, !12, i64 12, !12, i64 16, !6, i64 24, !6, i64 32, !13, i64 40, !13, i64 80, !21, i64 120, !21, i64 144}
!11 = !{!"_ZTSN3jet22FdmLinearSystemSolver2E"}
!12 = !{!"int", !7, i64 0}
!13 = !{!"_ZTSN3jet5ArrayIdLm2EEE", !14, i64 0, !16, i64 16}
!14 = !{!"_ZTSN3jet5Size2E", !15, i64 0, !15, i64 8}
!15 = !{!"long", !7, i64 0}
!16 = !{!"_ZTSSt6vectorIdSaIdEE", !17, i64 0}
!17 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !20, i64 0, !20, i64 8, !20, i64 16}
!20 = !{!"any pointer", !7, i64 0}
!21 = !{!"_ZTSN3jet7VectorNIdEE", !16, i64 0}
!22 = !{!10, !12, i64 12}
!23 = !{!10, !12, i64 16}
!24 = !{!10, !6, i64 24}
!25 = distinct !{!25, !26, !27}
!26 = !{!"llvm.loop.mustprogress"}
!27 = !{!"llvm.loop.peeled.count", i32 1}
!28 = !{!10, !6, i64 32}


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