; LLVM IR from yangfengzzz/Arche-webgpu :: vox.geometry (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"

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN3vox21FdmGaussSeidelSolver25solveEPNS_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 %"struct.vox::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 @_ZN3vox21FdmGaussSeidelSolver222clearCompressedVectorsEv(ptr noundef nonnull align 8 dereferenceable(120) %9)
  %10 = getelementptr inbounds %"class.vox::FdmGaussSeidelSolver2", ptr %9, i32 0, i32 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %5) #4
  %11 = load ptr, ptr %4, align 8, !tbaa !5
  %12 = getelementptr inbounds %"struct.vox::FdmLinearSystem2", ptr %11, i32 0, i32 1
  %13 = call { i64, i64 } @_ZNK3vox5ArrayIdLm2EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(40) %12)
  %14 = getelementptr inbounds { i64, i64 }, ptr %5, i32 0, i32 0
  %15 = extractvalue { i64, i64 } %13, 0
  store i64 %15, ptr %14, align 8
  %16 = getelementptr inbounds { i64, i64 }, ptr %5, i32 0, i32 1
  %17 = extractvalue { i64, i64 } %13, 1
  store i64 %17, ptr %16, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  store double 0.000000e+00, ptr %6, align 8, !tbaa !9
  call void @_ZN3vox5ArrayIdLm2EE6resizeERKNS_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) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %5) #4
  %18 = getelementptr inbounds %"class.vox::FdmGaussSeidelSolver2", ptr %9, i32 0, i32 1
  %19 = load i32, ptr %18, align 8, !tbaa !11
  %20 = getelementptr inbounds %"class.vox::FdmGaussSeidelSolver2", ptr %9, i32 0, i32 2
  store i32 %19, ptr %20, align 4, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  store i32 0, ptr %7, align 4, !tbaa !25
  br label %21

21:                                               ; preds = %77, %2
  %22 = load i32, ptr %7, align 4, !tbaa !25
  %23 = getelementptr inbounds %"class.vox::FdmGaussSeidelSolver2", ptr %9, 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 %8, align 4
  br label %80

27:                                               ; preds = %21
  %28 = getelementptr inbounds %"class.vox::FdmGaussSeidelSolver2", ptr %9, i32 0, i32 7
  %29 = load i8, ptr %28, align 8, !tbaa !26, !range !27, !noundef !28
  %30 = trunc i8 %29 to i1
  br i1 %30, label %31, label %40

31:                                               ; preds = %27
  %32 = load ptr, ptr %4, align 8, !tbaa !5
  %33 = getelementptr inbounds %"struct.vox::FdmLinearSystem2", ptr %32, i32 0, i32 0
  %34 = load ptr, ptr %4, align 8, !tbaa !5
  %35 = getelementptr inbounds %"struct.vox::FdmLinearSystem2", ptr %34, i32 0, i32 2
  %36 = getelementptr inbounds %"class.vox::FdmGaussSeidelSolver2", ptr %9, i32 0, i32 6
  %37 = load double, ptr %36, align 8, !tbaa !29
  %38 = load ptr, ptr %4, align 8, !tbaa !5
  %39 = getelementptr inbounds %"struct.vox::FdmLinearSystem2", ptr %38, i32 0, i32 1
  call void @_ZN3vox21FdmGaussSeidelSolver213relaxRedBlackERKNS_5ArrayINS_13FdmMatrixRow2ELm2EEERKNS1_IdLm2EEEdPS6_(ptr noundef nonnull align 8 dereferenceable(40) %33, ptr noundef nonnull align 8 dereferenceable(40) %35, double noundef %37, ptr noundef %39)
  br label %49

40:                                               ; preds = %27
  %41 = load ptr, ptr %4, align 8, !tbaa !5
  %42 = getelementptr inbounds %"struct.vox::FdmLinearSystem2", ptr %41, i32 0, i32 0
  %43 = load ptr, ptr %4, align 8, !tbaa !5
  %44 = getelementptr inbounds %"struct.vox::FdmLinearSystem2", ptr %43, i32 0, i32 2
  %45 = getelementptr inbounds %"class.vox::FdmGaussSeidelSolver2", ptr %9, i32 0, i32 6
  %46 = load double, ptr %45, align 8, !tbaa !29
  %47 = load ptr, ptr %4, align 8, !tbaa !5
  %48 = getelementptr inbounds %"struct.vox::FdmLinearSystem2", ptr %47, i32 0, i32 1
  call void @_ZN3vox21FdmGaussSeidelSolver25relaxERKNS_5ArrayINS_13FdmMatrixRow2ELm2EEERKNS1_IdLm2EEEdPS6_(ptr noundef nonnull align 8 dereferenceable(40) %42, ptr noundef nonnull align 8 dereferenceable(40) %44, double noundef %46, ptr noundef %48)
  br label %49

49:                                               ; preds = %40, %31
  %50 = load i32, ptr %7, align 4, !tbaa !25
  %51 = icmp ne i32 %50, 0
  br i1 %51, label %52, label %76

52:                                               ; preds = %49
  %53 = load i32, ptr %7, align 4, !tbaa !25
  %54 = getelementptr inbounds %"class.vox::FdmGaussSeidelSolver2", ptr %9, i32 0, i32 3
  %55 = load i32, ptr %54, align 8, !tbaa !30
  %56 = urem i32 %53, %55
  %57 = icmp eq i32 %56, 0
  br i1 %57, label %58, label %76

58:                                               ; preds = %52
  %59 = load ptr, ptr %4, align 8, !tbaa !5
  %60 = getelementptr inbounds %"struct.vox::FdmLinearSystem2", ptr %59, i32 0, i32 0
  %61 = load ptr, ptr %4, align 8, !tbaa !5
  %62 = getelementptr inbounds %"struct.vox::FdmLinearSystem2", ptr %61, i32 0, i32 1
  %63 = load ptr, ptr %4, align 8, !tbaa !5
  %64 = getelementptr inbounds %"struct.vox::FdmLinearSystem2", ptr %63, i32 0, i32 2
  %65 = getelementptr inbounds %"class.vox::FdmGaussSeidelSolver2", ptr %9, i32 0, i32 8
  call void @_ZN3vox8FdmBlas28residualERKNS_5ArrayINS_13FdmMatrixRow2ELm2EEERKNS1_IdLm2EEES8_PS6_(ptr noundef nonnull align 8 dereferenceable(40) %60, ptr noundef nonnull align 8 dereferenceable(40) %62, ptr noundef nonnull align 8 dereferenceable(40) %64, ptr noundef %65)
  %66 = getelementptr inbounds %"class.vox::FdmGaussSeidelSolver2", ptr %9, i32 0, i32 8
  %67 = call noundef double @_ZN3vox8FdmBlas26l2NormERKNS_5ArrayIdLm2EEE(ptr noundef nonnull align 8 dereferenceable(40) %66)
  %68 = getelementptr inbounds %"class.vox::FdmGaussSeidelSolver2", ptr %9, i32 0, i32 4
  %69 = load double, ptr %68, align 8, !tbaa !31
  %70 = fcmp olt double %67, %69
  br i1 %70, label %71, label %75

71:                                               ; preds = %58
  %72 = load i32, ptr %7, align 4, !tbaa !25
  %73 = add i32 %72, 1
  %74 = getelementptr inbounds %"class.vox::FdmGaussSeidelSolver2", ptr %9, i32 0, i32 2
  store i32 %73, ptr %74, align 4, !tbaa !24
  store i32 2, ptr %8, align 4
  br label %80

75:                                               ; preds = %58
  br label %76

76:                                               ; preds = %75, %52, %49
  br label %77

77:                                               ; preds = %76
  %78 = load i32, ptr %7, align 4, !tbaa !25
  %79 = add i32 %78, 1
  store i32 %79, ptr %7, align 4, !tbaa !25
  br label %21, !llvm.loop !32

80:                                               ; preds = %71, %26
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  br label %81

81:                                               ; preds = %80
  %82 = load ptr, ptr %4, align 8, !tbaa !5
  %83 = getelementptr inbounds %"struct.vox::FdmLinearSystem2", ptr %82, i32 0, i32 0
  %84 = load ptr, ptr %4, align 8, !tbaa !5
  %85 = getelementptr inbounds %"struct.vox::FdmLinearSystem2", ptr %84, i32 0, i32 1
  %86 = load ptr, ptr %4, align 8, !tbaa !5
  %87 = getelementptr inbounds %"struct.vox::FdmLinearSystem2", ptr %86, i32 0, i32 2
  %88 = getelementptr inbounds %"class.vox::FdmGaussSeidelSolver2", ptr %9, i32 0, i32 8
  call void @_ZN3vox8FdmBlas28residualERKNS_5ArrayINS_13FdmMatrixRow2ELm2EEERKNS1_IdLm2EEES8_PS6_(ptr noundef nonnull align 8 dereferenceable(40) %83, ptr noundef nonnull align 8 dereferenceable(40) %85, ptr noundef nonnull align 8 dereferenceable(40) %87, ptr noundef %88)
  %89 = getelementptr inbounds %"class.vox::FdmGaussSeidelSolver2", ptr %9, i32 0, i32 8
  %90 = call noundef double @_ZN3vox8FdmBlas26l2NormERKNS_5ArrayIdLm2EEE(ptr noundef nonnull align 8 dereferenceable(40) %89)
  %91 = getelementptr inbounds %"class.vox::FdmGaussSeidelSolver2", ptr %9, i32 0, i32 5
  store double %90, ptr %91, align 8, !tbaa !34
  %92 = getelementptr inbounds %"class.vox::FdmGaussSeidelSolver2", ptr %9, i32 0, i32 5
  %93 = load double, ptr %92, align 8, !tbaa !34
  %94 = getelementptr inbounds %"class.vox::FdmGaussSeidelSolver2", ptr %9, i32 0, i32 4
  %95 = load double, ptr %94, align 8, !tbaa !31
  %96 = fcmp olt double %93, %95
  ret i1 %96
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3vox5ArrayIdLm2EE6resizeERKNS_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 nounwind uwtable
declare dso_local { i64, i64 } @_ZNK3vox5ArrayIdLm2EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(40)) #2 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 @_ZN3vox21FdmGaussSeidelSolver213relaxRedBlackERKNS_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 @_ZN3vox21FdmGaussSeidelSolver25relaxERKNS_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 @_ZN3vox8FdmBlas28residualERKNS_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) #3

declare noundef double @_ZN3vox8FdmBlas26l2NormERKNS_5ArrayIdLm2EEE(ptr noundef nonnull align 8 dereferenceable(40)) #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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 = { "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 = !{!"_ZTSN3vox21FdmGaussSeidelSolver2E", !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 = !{!"_ZTSN3vox22FdmLinearSystemSolver2E"}
!14 = !{!"int", !7, i64 0}
!15 = !{!"bool", !7, i64 0}
!16 = !{!"_ZTSN3vox5ArrayIdLm2EEE", !17, i64 0, !19, i64 16}
!17 = !{!"_ZTSN3vox5Size2E", !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 = !{!"_ZTSN3vox7VectorNIdEE", !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"

%"struct.vox::Size2" = type { i64, i64 }

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN3vox21FdmGaussSeidelSolver25solveEPNS_16FdmLinearSystem2E(ptr noundef nonnull align 8 dereferenceable(120) %0, ptr noundef %1) unnamed_addr #0 align 2 {
  %3 = alloca %"struct.vox::Size2", align 8
  %4 = alloca double, align 8
  tail call void @_ZN3vox21FdmGaussSeidelSolver222clearCompressedVectorsEv(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) #4
  %6 = getelementptr inbounds i8, ptr %1, i64 40
  %7 = tail call { i64, i64 } @_ZNK3vox5ArrayIdLm2EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(40) %6)
  %8 = extractvalue { i64, i64 } %7, 0
  store i64 %8, ptr %3, align 8
  %9 = getelementptr inbounds i8, ptr %3, i64 8
  %10 = extractvalue { i64, i64 } %7, 1
  store i64 %10, ptr %9, align 8
  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 @_ZN3vox5ArrayIdLm2EE6resizeERKNS_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) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #4
  %11 = getelementptr inbounds i8, ptr %0, i64 8
  %12 = load i32, ptr %11, align 8, !tbaa !9
  %13 = getelementptr inbounds i8, ptr %0, i64 12
  store i32 %12, ptr %13, align 4, !tbaa !23
  %.not20 = icmp eq i32 %12, 0
  br i1 %.not20, label %.loopexit, label %.lr.ph

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

22:                                               ; preds = %.lr.ph
  call void @_ZN3vox21FdmGaussSeidelSolver25relaxERKNS_5ArrayINS_13FdmMatrixRow2ELm2EEERKNS1_IdLm2EEEdPS6_(ptr noundef nonnull align 8 dereferenceable(40) %1, ptr noundef nonnull align 8 dereferenceable(40) %15, double noundef %21, ptr noundef nonnull %6)
  br label %24

23:                                               ; preds = %.lr.ph
  call void @_ZN3vox21FdmGaussSeidelSolver213relaxRedBlackERKNS_5ArrayINS_13FdmMatrixRow2ELm2EEERKNS1_IdLm2EEEdPS6_(ptr noundef nonnull align 8 dereferenceable(40) %1, ptr noundef nonnull align 8 dereferenceable(40) %15, double noundef %21, ptr noundef nonnull %6)
  br label %24

24:                                               ; preds = %22, %23
  %25 = load i32, ptr %11, align 8, !tbaa !9
  %26 = icmp ugt i32 %25, 1
  br i1 %26, label %.peel.next, label %.loopexit

.peel.next:                                       ; preds = %24, %41
  %.019 = phi i32 [ %42, %41 ], [ 1, %24 ]
  %27 = load i8, ptr %14, align 8, !tbaa !24, !range !25, !noundef !26
  %28 = trunc nuw i8 %27 to i1
  %29 = load double, ptr %16, align 8, !tbaa !27
  br i1 %28, label %30, label %31

30:                                               ; preds = %.peel.next
  call void @_ZN3vox21FdmGaussSeidelSolver213relaxRedBlackERKNS_5ArrayINS_13FdmMatrixRow2ELm2EEERKNS1_IdLm2EEEdPS6_(ptr noundef nonnull align 8 dereferenceable(40) %1, ptr noundef nonnull align 8 dereferenceable(40) %15, double noundef %29, ptr noundef nonnull %6)
  br label %32

31:                                               ; preds = %.peel.next
  call void @_ZN3vox21FdmGaussSeidelSolver25relaxERKNS_5ArrayINS_13FdmMatrixRow2ELm2EEERKNS1_IdLm2EEEdPS6_(ptr noundef nonnull align 8 dereferenceable(40) %1, ptr noundef nonnull align 8 dereferenceable(40) %15, double noundef %29, ptr noundef nonnull %6)
  br label %32

32:                                               ; preds = %30, %31
  %33 = load i32, ptr %17, align 8, !tbaa !28
  %34 = urem i32 %.019, %33
  %35 = icmp eq i32 %34, 0
  br i1 %35, label %36, label %41

36:                                               ; preds = %32
  call void @_ZN3vox8FdmBlas28residualERKNS_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) %15, ptr noundef nonnull %5)
  %37 = call noundef double @_ZN3vox8FdmBlas26l2NormERKNS_5ArrayIdLm2EEE(ptr noundef nonnull align 8 dereferenceable(40) %5)
  %38 = load double, ptr %18, align 8, !tbaa !29
  %39 = fcmp olt double %37, %38
  br i1 %39, label %.loopexit23, label %41

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

41:                                               ; preds = %32, %36
  %42 = add nuw i32 %.019, 1
  %43 = load i32, ptr %11, align 8, !tbaa !9
  %44 = icmp ult i32 %42, %43
  br i1 %44, label %.peel.next, label %.loopexit, !llvm.loop !30

.loopexit:                                        ; preds = %41, %24, %2, %.loopexit23
  %45 = getelementptr inbounds i8, ptr %1, i64 80
  call void @_ZN3vox8FdmBlas28residualERKNS_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) %45, ptr noundef nonnull %5)
  %46 = call noundef double @_ZN3vox8FdmBlas26l2NormERKNS_5ArrayIdLm2EEE(ptr noundef nonnull align 8 dereferenceable(40) %5)
  %47 = getelementptr inbounds i8, ptr %0, i64 32
  store double %46, ptr %47, align 8, !tbaa !33
  %48 = getelementptr inbounds i8, ptr %0, i64 24
  %49 = load double, ptr %48, align 8, !tbaa !29
  %50 = fcmp olt double %46, %49
  ret i1 %50
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3vox5ArrayIdLm2EE6resizeERKNS_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 nounwind uwtable
declare dso_local { i64, i64 } @_ZNK3vox5ArrayIdLm2EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #2 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 @_ZN3vox21FdmGaussSeidelSolver213relaxRedBlackERKNS_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 @_ZN3vox21FdmGaussSeidelSolver25relaxERKNS_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 @_ZN3vox8FdmBlas28residualERKNS_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 #3

declare noundef double @_ZN3vox8FdmBlas26l2NormERKNS_5ArrayIdLm2EEE(ptr noundef nonnull align 8 dereferenceable(40)) 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 = { "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 = !{!"_ZTSN3vox21FdmGaussSeidelSolver2E", !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 = !{!"_ZTSN3vox22FdmLinearSystemSolver2E"}
!12 = !{!"int", !7, i64 0}
!13 = !{!"bool", !7, i64 0}
!14 = !{!"_ZTSN3vox5ArrayIdLm2EEE", !15, i64 0, !17, i64 16}
!15 = !{!"_ZTSN3vox5Size2E", !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 = !{!"_ZTSN3vox7VectorNIdEE", !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