; LLVM IR from yangfengzzz/DigitalVox3 :: vox.geometry/fdm_solvers (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.vox::geometry::Matrix" = type { i64, i64 }
%"class.vox::geometry::FdmGaussSeidelSolver2" = type { %"class.vox::geometry::FdmLinearSystemSolver2", i32, i32, i32, double, double, double, i8, %"class.vox::geometry::Array", %"class.vox::geometry::Matrix.0" }
%"class.vox::geometry::FdmLinearSystemSolver2" = type { ptr }
%"class.vox::geometry::Array" = type { %"class.vox::geometry::ArrayBase", %"class.std::vector" }
%"class.vox::geometry::ArrayBase" = type { ptr, ptr, %"class.vox::geometry::Matrix" }
%"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.vox::geometry::Matrix.0" = type { %"class.std::vector" }
%"struct.vox::geometry::FdmLinearSystem2" = type { %"class.vox::geometry::Array.3", %"class.vox::geometry::Array", %"class.vox::geometry::Array" }
%"class.vox::geometry::Array.3" = type { %"class.vox::geometry::ArrayBase.4", %"class.std::vector.5" }
%"class.vox::geometry::ArrayBase.4" = type { ptr, ptr, %"class.vox::geometry::Matrix" }
%"class.std::vector.5" = type { %"struct.std::_Vector_base.6" }
%"struct.std::_Vector_base.6" = type { %"struct.std::_Vector_base<vox::geometry::FdmMatrixRow2, std::allocator<vox::geometry::FdmMatrixRow2>>::_Vector_impl" }
%"struct.std::_Vector_base<vox::geometry::FdmMatrixRow2, std::allocator<vox::geometry::FdmMatrixRow2>>::_Vector_impl" = type { %"struct.std::_Vector_base<vox::geometry::FdmMatrixRow2, std::allocator<vox::geometry::FdmMatrixRow2>>::_Vector_impl_data" }
%"struct.std::_Vector_base<vox::geometry::FdmMatrixRow2, std::allocator<vox::geometry::FdmMatrixRow2>>::_Vector_impl_data" = type { ptr, ptr, ptr }

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN3vox8geometry21FdmGaussSeidelSolver25solveEPNS0_16FdmLinearSystem2E(ptr noundef nonnull align 8 dereferenceable(136) %0, ptr noundef %1) unnamed_addr #0 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %"class.vox::geometry::Matrix", 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 @_ZN3vox8geometry21FdmGaussSeidelSolver222clearCompressedVectorsEv(ptr noundef nonnull align 8 dereferenceable(136) %9)
  %10 = getelementptr inbounds %"class.vox::geometry::FdmGaussSeidelSolver2", ptr %9, i32 0, i32 8
  %11 = load ptr, ptr %4, align 8, !tbaa !5
  %12 = getelementptr inbounds %"struct.vox::geometry::FdmLinearSystem2", ptr %11, i32 0, i32 1
  %13 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK3vox8geometry9ArrayBaseIdLm2ENS0_5ArrayIdLm2EEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %12)
  call void @_ZN3vox8geometry6MatrixImLm2ELm1EEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 8 dereferenceable(16) %13)
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  store double 0.000000e+00, ptr %6, align 8, !tbaa !9
  call void @_ZN3vox8geometry5ArrayIdLm2EE6resizeENS0_6MatrixImLm2ELm1EEERKd(ptr noundef nonnull align 8 dereferenceable(56) %10, ptr noundef %5, ptr noundef nonnull align 8 dereferenceable(8) %6)
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  %14 = getelementptr inbounds %"class.vox::geometry::FdmGaussSeidelSolver2", ptr %9, i32 0, i32 1
  %15 = load i32, ptr %14, align 8, !tbaa !11
  %16 = getelementptr inbounds %"class.vox::geometry::FdmGaussSeidelSolver2", ptr %9, i32 0, i32 2
  store i32 %15, ptr %16, align 4, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  store i32 0, ptr %7, align 4, !tbaa !26
  br label %17

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

22:                                               ; preds = %17
  store i32 2, ptr %8, align 4
  br label %76

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

27:                                               ; preds = %23
  %28 = load ptr, ptr %4, align 8, !tbaa !5
  %29 = getelementptr inbounds %"struct.vox::geometry::FdmLinearSystem2", ptr %28, i32 0, i32 0
  %30 = load ptr, ptr %4, align 8, !tbaa !5
  %31 = getelementptr inbounds %"struct.vox::geometry::FdmLinearSystem2", ptr %30, i32 0, i32 2
  %32 = getelementptr inbounds %"class.vox::geometry::FdmGaussSeidelSolver2", ptr %9, i32 0, i32 6
  %33 = load double, ptr %32, align 8, !tbaa !30
  %34 = load ptr, ptr %4, align 8, !tbaa !5
  %35 = getelementptr inbounds %"struct.vox::geometry::FdmLinearSystem2", ptr %34, i32 0, i32 1
  call void @_ZN3vox8geometry21FdmGaussSeidelSolver213relaxRedBlackERKNS0_5ArrayINS0_13FdmMatrixRow2ELm2EEERKNS2_IdLm2EEEdPS7_(ptr noundef nonnull align 8 dereferenceable(56) %29, ptr noundef nonnull align 8 dereferenceable(56) %31, double noundef %33, ptr noundef %35)
  br label %45

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

45:                                               ; preds = %36, %27
  %46 = load i32, ptr %7, align 4, !tbaa !26
  %47 = icmp ne i32 %46, 0
  br i1 %47, label %48, label %72

48:                                               ; preds = %45
  %49 = load i32, ptr %7, align 4, !tbaa !26
  %50 = getelementptr inbounds %"class.vox::geometry::FdmGaussSeidelSolver2", ptr %9, i32 0, i32 3
  %51 = load i32, ptr %50, align 8, !tbaa !31
  %52 = urem i32 %49, %51
  %53 = icmp eq i32 %52, 0
  br i1 %53, label %54, label %72

54:                                               ; preds = %48
  %55 = load ptr, ptr %4, align 8, !tbaa !5
  %56 = getelementptr inbounds %"struct.vox::geometry::FdmLinearSystem2", ptr %55, i32 0, i32 0
  %57 = load ptr, ptr %4, align 8, !tbaa !5
  %58 = getelementptr inbounds %"struct.vox::geometry::FdmLinearSystem2", ptr %57, i32 0, i32 1
  %59 = load ptr, ptr %4, align 8, !tbaa !5
  %60 = getelementptr inbounds %"struct.vox::geometry::FdmLinearSystem2", ptr %59, i32 0, i32 2
  %61 = getelementptr inbounds %"class.vox::geometry::FdmGaussSeidelSolver2", ptr %9, i32 0, i32 8
  call void @_ZN3vox8geometry8FdmBlas28residualERKNS0_5ArrayINS0_13FdmMatrixRow2ELm2EEERKNS2_IdLm2EEES9_PS7_(ptr noundef nonnull align 8 dereferenceable(56) %56, ptr noundef nonnull align 8 dereferenceable(56) %58, ptr noundef nonnull align 8 dereferenceable(56) %60, ptr noundef %61)
  %62 = getelementptr inbounds %"class.vox::geometry::FdmGaussSeidelSolver2", ptr %9, i32 0, i32 8
  %63 = call noundef double @_ZN3vox8geometry8FdmBlas26l2NormERKNS0_5ArrayIdLm2EEE(ptr noundef nonnull align 8 dereferenceable(56) %62)
  %64 = getelementptr inbounds %"class.vox::geometry::FdmGaussSeidelSolver2", ptr %9, i32 0, i32 4
  %65 = load double, ptr %64, align 8, !tbaa !32
  %66 = fcmp olt double %63, %65
  br i1 %66, label %67, label %71

67:                                               ; preds = %54
  %68 = load i32, ptr %7, align 4, !tbaa !26
  %69 = add i32 %68, 1
  %70 = getelementptr inbounds %"class.vox::geometry::FdmGaussSeidelSolver2", ptr %9, i32 0, i32 2
  store i32 %69, ptr %70, align 4, !tbaa !25
  store i32 2, ptr %8, align 4
  br label %76

71:                                               ; preds = %54
  br label %72

72:                                               ; preds = %71, %48, %45
  br label %73

73:                                               ; preds = %72
  %74 = load i32, ptr %7, align 4, !tbaa !26
  %75 = add i32 %74, 1
  store i32 %75, ptr %7, align 4, !tbaa !26
  br label %17, !llvm.loop !33

76:                                               ; preds = %67, %22
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  br label %77

77:                                               ; preds = %76
  %78 = load ptr, ptr %4, align 8, !tbaa !5
  %79 = getelementptr inbounds %"struct.vox::geometry::FdmLinearSystem2", ptr %78, i32 0, i32 0
  %80 = load ptr, ptr %4, align 8, !tbaa !5
  %81 = getelementptr inbounds %"struct.vox::geometry::FdmLinearSystem2", ptr %80, i32 0, i32 1
  %82 = load ptr, ptr %4, align 8, !tbaa !5
  %83 = getelementptr inbounds %"struct.vox::geometry::FdmLinearSystem2", ptr %82, i32 0, i32 2
  %84 = getelementptr inbounds %"class.vox::geometry::FdmGaussSeidelSolver2", ptr %9, i32 0, i32 8
  call void @_ZN3vox8geometry8FdmBlas28residualERKNS0_5ArrayINS0_13FdmMatrixRow2ELm2EEERKNS2_IdLm2EEES9_PS7_(ptr noundef nonnull align 8 dereferenceable(56) %79, ptr noundef nonnull align 8 dereferenceable(56) %81, ptr noundef nonnull align 8 dereferenceable(56) %83, ptr noundef %84)
  %85 = getelementptr inbounds %"class.vox::geometry::FdmGaussSeidelSolver2", ptr %9, i32 0, i32 8
  %86 = call noundef double @_ZN3vox8geometry8FdmBlas26l2NormERKNS0_5ArrayIdLm2EEE(ptr noundef nonnull align 8 dereferenceable(56) %85)
  %87 = getelementptr inbounds %"class.vox::geometry::FdmGaussSeidelSolver2", ptr %9, i32 0, i32 5
  store double %86, ptr %87, align 8, !tbaa !35
  %88 = getelementptr inbounds %"class.vox::geometry::FdmGaussSeidelSolver2", ptr %9, i32 0, i32 5
  %89 = load double, ptr %88, align 8, !tbaa !35
  %90 = getelementptr inbounds %"class.vox::geometry::FdmGaussSeidelSolver2", ptr %9, i32 0, i32 4
  %91 = load double, ptr %90, align 8, !tbaa !32
  %92 = fcmp olt double %89, %91
  ret i1 %92
}

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNK3vox8geometry9ArrayBaseIdLm2ENS0_5ArrayIdLm2EEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3vox8geometry6MatrixImLm2ELm1EEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #1 align 2

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

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

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

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

declare void @_ZN3vox8geometry8FdmBlas28residualERKNS0_5ArrayINS0_13FdmMatrixRow2ELm2EEERKNS2_IdLm2EEES9_PS7_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(56), ptr noundef) #3

declare noundef double @_ZN3vox8geometry8FdmBlas26l2NormERKNS0_5ArrayIdLm2EEE(ptr noundef nonnull align 8 dereferenceable(56)) #3

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = !{!12, !14, i64 8}
!12 = !{!"_ZTSN3vox8geometry21FdmGaussSeidelSolver2E", !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, !24, i64 112}
!13 = !{!"_ZTSN3vox8geometry22FdmLinearSystemSolver2E"}
!14 = !{!"int", !7, i64 0}
!15 = !{!"bool", !7, i64 0}
!16 = !{!"_ZTSN3vox8geometry5ArrayIdLm2EEE", !17, i64 0, !20, i64 32}
!17 = !{!"_ZTSN3vox8geometry9ArrayBaseIdLm2ENS0_5ArrayIdLm2EEEEE", !6, i64 8, !18, i64 16}
!18 = !{!"_ZTSN3vox8geometry6MatrixImLm2ELm1EEE", !19, i64 0, !19, i64 8}
!19 = !{!"long", !7, i64 0}
!20 = !{!"_ZTSSt6vectorIdSaIdEE", !21, i64 0}
!21 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!24 = !{!"_ZTSN3vox8geometry6MatrixIdLm0ELm1EEE", !20, i64 0}
!25 = !{!12, !14, i64 12}
!26 = !{!14, !14, i64 0}
!27 = !{!12, !15, i64 48}
!28 = !{i8 0, i8 2}
!29 = !{}
!30 = !{!12, !10, i64 40}
!31 = !{!12, !14, i64 16}
!32 = !{!12, !10, i64 24}
!33 = distinct !{!33, !34}
!34 = !{!"llvm.loop.mustprogress"}
!35 = !{!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.vox::geometry::Matrix" = type { i64, i64 }

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN3vox8geometry21FdmGaussSeidelSolver25solveEPNS0_16FdmLinearSystem2E(ptr noundef nonnull align 8 dereferenceable(136) %0, ptr noundef %1) unnamed_addr #0 align 2 {
  %3 = alloca %"class.vox::geometry::Matrix", align 8
  %4 = alloca double, align 8
  tail call void @_ZN3vox8geometry21FdmGaussSeidelSolver222clearCompressedVectorsEv(ptr noundef nonnull align 8 dereferenceable(136) %0)
  %5 = getelementptr inbounds i8, ptr %0, i64 56
  %6 = getelementptr inbounds i8, ptr %1, i64 56
  %7 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK3vox8geometry9ArrayBaseIdLm2ENS0_5ArrayIdLm2EEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %6)
  call void @_ZN3vox8geometry6MatrixImLm2ELm1EEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef nonnull align 8 dereferenceable(16) %7)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #4
  store double 0.000000e+00, ptr %4, align 8, !tbaa !5
  call void @_ZN3vox8geometry5ArrayIdLm2EE6resizeENS0_6MatrixImLm2ELm1EEERKd(ptr noundef nonnull align 8 dereferenceable(56) %5, ptr noundef nonnull %3, ptr noundef nonnull align 8 dereferenceable(8) %4)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  %8 = getelementptr inbounds i8, ptr %0, i64 8
  %9 = load i32, ptr %8, align 8, !tbaa !9
  %10 = getelementptr inbounds i8, ptr %0, i64 12
  store i32 %9, ptr %10, align 4, !tbaa !24
  %.not20 = icmp eq i32 %9, 0
  br i1 %.not20, label %.loopexit, label %.lr.ph

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

19:                                               ; preds = %.lr.ph
  call void @_ZN3vox8geometry21FdmGaussSeidelSolver25relaxERKNS0_5ArrayINS0_13FdmMatrixRow2ELm2EEERKNS2_IdLm2EEEdPS7_(ptr noundef nonnull align 8 dereferenceable(56) %1, ptr noundef nonnull align 8 dereferenceable(56) %12, double noundef %18, ptr noundef nonnull %6)
  br label %21

20:                                               ; preds = %.lr.ph
  call void @_ZN3vox8geometry21FdmGaussSeidelSolver213relaxRedBlackERKNS0_5ArrayINS0_13FdmMatrixRow2ELm2EEERKNS2_IdLm2EEEdPS7_(ptr noundef nonnull align 8 dereferenceable(56) %1, ptr noundef nonnull align 8 dereferenceable(56) %12, double noundef %18, ptr noundef nonnull %6)
  br label %21

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

.peel.next:                                       ; preds = %21, %38
  %.019 = phi i32 [ %39, %38 ], [ 1, %21 ]
  %24 = load i8, ptr %11, align 8, !tbaa !25, !range !26, !noundef !27
  %25 = trunc nuw i8 %24 to i1
  %26 = load double, ptr %13, align 8, !tbaa !28
  br i1 %25, label %27, label %28

27:                                               ; preds = %.peel.next
  call void @_ZN3vox8geometry21FdmGaussSeidelSolver213relaxRedBlackERKNS0_5ArrayINS0_13FdmMatrixRow2ELm2EEERKNS2_IdLm2EEEdPS7_(ptr noundef nonnull align 8 dereferenceable(56) %1, ptr noundef nonnull align 8 dereferenceable(56) %12, double noundef %26, ptr noundef nonnull %6)
  br label %29

28:                                               ; preds = %.peel.next
  call void @_ZN3vox8geometry21FdmGaussSeidelSolver25relaxERKNS0_5ArrayINS0_13FdmMatrixRow2ELm2EEERKNS2_IdLm2EEEdPS7_(ptr noundef nonnull align 8 dereferenceable(56) %1, ptr noundef nonnull align 8 dereferenceable(56) %12, double noundef %26, ptr noundef nonnull %6)
  br label %29

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

33:                                               ; preds = %29
  call void @_ZN3vox8geometry8FdmBlas28residualERKNS0_5ArrayINS0_13FdmMatrixRow2ELm2EEERKNS2_IdLm2EEES9_PS7_(ptr noundef nonnull align 8 dereferenceable(56) %1, ptr noundef nonnull align 8 dereferenceable(56) %6, ptr noundef nonnull align 8 dereferenceable(56) %12, ptr noundef nonnull %5)
  %34 = call noundef double @_ZN3vox8geometry8FdmBlas26l2NormERKNS0_5ArrayIdLm2EEE(ptr noundef nonnull align 8 dereferenceable(56) %5)
  %35 = load double, ptr %15, align 8, !tbaa !30
  %36 = fcmp olt double %34, %35
  br i1 %36, label %.loopexit23, label %38

.loopexit23:                                      ; preds = %33
  %37 = add nuw i32 %.019, 1
  store i32 %37, ptr %10, align 4, !tbaa !24
  br label %.loopexit

38:                                               ; preds = %29, %33
  %39 = add nuw i32 %.019, 1
  %40 = load i32, ptr %8, align 8, !tbaa !9
  %41 = icmp ult i32 %39, %40
  br i1 %41, label %.peel.next, label %.loopexit, !llvm.loop !31

.loopexit:                                        ; preds = %38, %21, %2, %.loopexit23
  %42 = getelementptr inbounds i8, ptr %1, i64 112
  call void @_ZN3vox8geometry8FdmBlas28residualERKNS0_5ArrayINS0_13FdmMatrixRow2ELm2EEERKNS2_IdLm2EEES9_PS7_(ptr noundef nonnull align 8 dereferenceable(56) %1, ptr noundef nonnull align 8 dereferenceable(56) %6, ptr noundef nonnull align 8 dereferenceable(56) %42, ptr noundef nonnull %5)
  %43 = call noundef double @_ZN3vox8geometry8FdmBlas26l2NormERKNS0_5ArrayIdLm2EEE(ptr noundef nonnull align 8 dereferenceable(56) %5)
  %44 = getelementptr inbounds i8, ptr %0, i64 32
  store double %43, ptr %44, align 8, !tbaa !34
  %45 = getelementptr inbounds i8, ptr %0, i64 24
  %46 = load double, ptr %45, align 8, !tbaa !30
  %47 = fcmp olt double %43, %46
  ret i1 %47
}

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3vox8geometry6MatrixImLm2ELm1EEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #1 align 2

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

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

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

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

declare void @_ZN3vox8geometry8FdmBlas28residualERKNS0_5ArrayINS0_13FdmMatrixRow2ELm2EEERKNS2_IdLm2EEES9_PS7_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(56), ptr noundef) local_unnamed_addr #3

declare noundef double @_ZN3vox8geometry8FdmBlas26l2NormERKNS0_5ArrayIdLm2EEE(ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #3

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !12, i64 8}
!10 = !{!"_ZTSN3vox8geometry21FdmGaussSeidelSolver2E", !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, !23, i64 112}
!11 = !{!"_ZTSN3vox8geometry22FdmLinearSystemSolver2E"}
!12 = !{!"int", !7, i64 0}
!13 = !{!"bool", !7, i64 0}
!14 = !{!"_ZTSN3vox8geometry5ArrayIdLm2EEE", !15, i64 0, !19, i64 32}
!15 = !{!"_ZTSN3vox8geometry9ArrayBaseIdLm2ENS0_5ArrayIdLm2EEEEE", !16, i64 8, !17, i64 16}
!16 = !{!"any pointer", !7, i64 0}
!17 = !{!"_ZTSN3vox8geometry6MatrixImLm2ELm1EEE", !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", !16, i64 0, !16, i64 8, !16, i64 16}
!23 = !{!"_ZTSN3vox8geometry6MatrixIdLm0ELm1EEE", !19, i64 0}
!24 = !{!10, !12, i64 12}
!25 = !{!10, !13, i64 48}
!26 = !{i8 0, i8 2}
!27 = !{}
!28 = !{!10, !6, i64 40}
!29 = !{!10, !12, i64 16}
!30 = !{!10, !6, i64 24}
!31 = distinct !{!31, !32, !33}
!32 = !{!"llvm.loop.mustprogress"}
!33 = !{!"llvm.loop.peeled.count", i32 1}
!34 = !{!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