; LLVM IR from hpcg-benchmark/hpcg :: src/ComputeMG_ref.ll (Z13ComputeMG_refRK19SparseMatrix_STRUCTRK13Vector_STRUCTRS2_)

; 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.Vector_STRUCT = type { i32, ptr, ptr }
%struct.SparseMatrix_STRUCT = type { ptr, ptr, i64, i64, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, %"class.std::unordered_map", %"class.std::vector", i8, i8, i8, i8, ptr, ptr, ptr, i32, i32, i32, ptr, ptr, ptr, ptr, ptr }
%"class.std::unordered_map" = type { %"class.std::_Hashtable" }
%"class.std::_Hashtable" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.MGData_STRUCT = type { i32, i32, ptr, ptr, ptr, ptr, ptr }

@.str = external hidden unnamed_addr constant [38 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [75 x i8], align 1
@__PRETTY_FUNCTION__._Z13ComputeMG_refRK19SparseMatrix_STRUCTRK13Vector_STRUCTRS2_ = external hidden unnamed_addr constant [66 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z13ComputeMG_refRK19SparseMatrix_STRUCTRK13Vector_STRUCTRS2_(ptr noundef nonnull align 8 dereferenceable(256) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) %2) #0 {
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  %14 = load ptr, ptr %7, align 8, !tbaa !5
  %15 = getelementptr inbounds %struct.Vector_STRUCT, ptr %14, i32 0, i32 0
  %16 = load i32, ptr %15, align 8, !tbaa !9
  %17 = load ptr, ptr %5, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.SparseMatrix_STRUCT, ptr %17, i32 0, i32 5
  %19 = load i32, ptr %18, align 4, !tbaa !12
  %20 = icmp eq i32 %16, %19
  br i1 %20, label %21, label %22

21:                                               ; preds = %3
  br label %24

22:                                               ; preds = %3
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 40, ptr noundef @__PRETTY_FUNCTION__._Z13ComputeMG_refRK19SparseMatrix_STRUCTRK13Vector_STRUCTRS2_) #5
  unreachable

23:                                               ; No predecessors!
  br label %24

24:                                               ; preds = %23, %21
  %25 = load ptr, ptr %7, align 8, !tbaa !5
  call void @_Z10ZeroVectorR13Vector_STRUCT(ptr noundef nonnull align 8 dereferenceable(24) %25)
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  store i32 0, ptr %8, align 4, !tbaa !26
  %26 = load ptr, ptr %5, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.SparseMatrix_STRUCT, ptr %26, i32 0, i32 19
  %28 = load ptr, ptr %27, align 8, !tbaa !27
  %29 = icmp ne ptr %28, null
  br i1 %29, label %30, label %135

30:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  %31 = load ptr, ptr %5, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.SparseMatrix_STRUCT, ptr %31, i32 0, i32 19
  %33 = load ptr, ptr %32, align 8, !tbaa !27
  %34 = getelementptr inbounds %struct.MGData_STRUCT, ptr %33, i32 0, i32 0
  %35 = load i32, ptr %34, align 8, !tbaa !28
  store i32 %35, ptr %9, align 4, !tbaa !26
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  store i32 0, ptr %10, align 4, !tbaa !26
  br label %36

36:                                               ; preds = %48, %30
  %37 = load i32, ptr %10, align 4, !tbaa !26
  %38 = load i32, ptr %9, align 4, !tbaa !26
  %39 = icmp slt i32 %37, %38
  br i1 %39, label %41, label %40

40:                                               ; preds = %36
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %51

41:                                               ; preds = %36
  %42 = load ptr, ptr %5, align 8, !tbaa !5
  %43 = load ptr, ptr %6, align 8, !tbaa !5
  %44 = load ptr, ptr %7, align 8, !tbaa !5
  %45 = call noundef i32 @_Z16ComputeSYMGS_refRK19SparseMatrix_STRUCTRK13Vector_STRUCTRS2_(ptr noundef nonnull align 8 dereferenceable(256) %42, ptr noundef nonnull align 8 dereferenceable(24) %43, ptr noundef nonnull align 8 dereferenceable(24) %44)
  %46 = load i32, ptr %8, align 4, !tbaa !26
  %47 = add nsw i32 %46, %45
  store i32 %47, ptr %8, align 4, !tbaa !26
  br label %48

48:                                               ; preds = %41
  %49 = load i32, ptr %10, align 4, !tbaa !26
  %50 = add nsw i32 %49, 1
  store i32 %50, ptr %10, align 4, !tbaa !26
  br label %36, !llvm.loop !30

51:                                               ; preds = %40
  %52 = load i32, ptr %8, align 4, !tbaa !26
  %53 = icmp ne i32 %52, 0
  br i1 %53, label %54, label %56

54:                                               ; preds = %51
  %55 = load i32, ptr %8, align 4, !tbaa !26
  store i32 %55, ptr %4, align 4
  store i32 1, ptr %11, align 4
  br label %132

56:                                               ; preds = %51
  %57 = load ptr, ptr %5, align 8, !tbaa !5
  %58 = load ptr, ptr %7, align 8, !tbaa !5
  %59 = load ptr, ptr %5, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.SparseMatrix_STRUCT, ptr %59, i32 0, i32 19
  %61 = load ptr, ptr %60, align 8, !tbaa !27
  %62 = getelementptr inbounds %struct.MGData_STRUCT, ptr %61, i32 0, i32 5
  %63 = load ptr, ptr %62, align 8, !tbaa !32
  %64 = call noundef i32 @_Z15ComputeSPMV_refRK19SparseMatrix_STRUCTR13Vector_STRUCTS3_(ptr noundef nonnull align 8 dereferenceable(256) %57, ptr noundef nonnull align 8 dereferenceable(24) %58, ptr noundef nonnull align 8 dereferenceable(24) %63)
  store i32 %64, ptr %8, align 4, !tbaa !26
  %65 = load i32, ptr %8, align 4, !tbaa !26
  %66 = icmp ne i32 %65, 0
  br i1 %66, label %67, label %69

67:                                               ; preds = %56
  %68 = load i32, ptr %8, align 4, !tbaa !26
  store i32 %68, ptr %4, align 4
  store i32 1, ptr %11, align 4
  br label %132

69:                                               ; preds = %56
  %70 = load ptr, ptr %5, align 8, !tbaa !5
  %71 = load ptr, ptr %6, align 8, !tbaa !5
  %72 = call noundef i32 @_Z22ComputeRestriction_refRK19SparseMatrix_STRUCTRK13Vector_STRUCT(ptr noundef nonnull align 8 dereferenceable(256) %70, ptr noundef nonnull align 8 dereferenceable(24) %71)
  store i32 %72, ptr %8, align 4, !tbaa !26
  %73 = load i32, ptr %8, align 4, !tbaa !26
  %74 = icmp ne i32 %73, 0
  br i1 %74, label %75, label %77

75:                                               ; preds = %69
  %76 = load i32, ptr %8, align 4, !tbaa !26
  store i32 %76, ptr %4, align 4
  store i32 1, ptr %11, align 4
  br label %132

77:                                               ; preds = %69
  %78 = load ptr, ptr %5, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.SparseMatrix_STRUCT, ptr %78, i32 0, i32 18
  %80 = load ptr, ptr %79, align 8, !tbaa !33
  %81 = load ptr, ptr %5, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.SparseMatrix_STRUCT, ptr %81, i32 0, i32 19
  %83 = load ptr, ptr %82, align 8, !tbaa !27
  %84 = getelementptr inbounds %struct.MGData_STRUCT, ptr %83, i32 0, i32 3
  %85 = load ptr, ptr %84, align 8, !tbaa !34
  %86 = load ptr, ptr %5, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.SparseMatrix_STRUCT, ptr %86, i32 0, i32 19
  %88 = load ptr, ptr %87, align 8, !tbaa !27
  %89 = getelementptr inbounds %struct.MGData_STRUCT, ptr %88, i32 0, i32 4
  %90 = load ptr, ptr %89, align 8, !tbaa !35
  %91 = call noundef i32 @_Z13ComputeMG_refRK19SparseMatrix_STRUCTRK13Vector_STRUCTRS2_(ptr noundef nonnull align 8 dereferenceable(256) %80, ptr noundef nonnull align 8 dereferenceable(24) %85, ptr noundef nonnull align 8 dereferenceable(24) %90)
  store i32 %91, ptr %8, align 4, !tbaa !26
  %92 = load i32, ptr %8, align 4, !tbaa !26
  %93 = icmp ne i32 %92, 0
  br i1 %93, label %94, label %96

94:                                               ; preds = %77
  %95 = load i32, ptr %8, align 4, !tbaa !26
  store i32 %95, ptr %4, align 4
  store i32 1, ptr %11, align 4
  br label %132

96:                                               ; preds = %77
  %97 = load ptr, ptr %5, align 8, !tbaa !5
  %98 = load ptr, ptr %7, align 8, !tbaa !5
  %99 = call noundef i32 @_Z23ComputeProlongation_refRK19SparseMatrix_STRUCTR13Vector_STRUCT(ptr noundef nonnull align 8 dereferenceable(256) %97, ptr noundef nonnull align 8 dereferenceable(24) %98)
  store i32 %99, ptr %8, align 4, !tbaa !26
  %100 = load i32, ptr %8, align 4, !tbaa !26
  %101 = icmp ne i32 %100, 0
  br i1 %101, label %102, label %104

102:                                              ; preds = %96
  %103 = load i32, ptr %8, align 4, !tbaa !26
  store i32 %103, ptr %4, align 4
  store i32 1, ptr %11, align 4
  br label %132

104:                                              ; preds = %96
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  %105 = load ptr, ptr %5, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.SparseMatrix_STRUCT, ptr %105, i32 0, i32 19
  %107 = load ptr, ptr %106, align 8, !tbaa !27
  %108 = getelementptr inbounds %struct.MGData_STRUCT, ptr %107, i32 0, i32 1
  %109 = load i32, ptr %108, align 4, !tbaa !36
  store i32 %109, ptr %12, align 4, !tbaa !26
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  store i32 0, ptr %13, align 4, !tbaa !26
  br label %110

110:                                              ; preds = %122, %104
  %111 = load i32, ptr %13, align 4, !tbaa !26
  %112 = load i32, ptr %12, align 4, !tbaa !26
  %113 = icmp slt i32 %111, %112
  br i1 %113, label %115, label %114

114:                                              ; preds = %110
  store i32 5, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %125

115:                                              ; preds = %110
  %116 = load ptr, ptr %5, align 8, !tbaa !5
  %117 = load ptr, ptr %6, align 8, !tbaa !5
  %118 = load ptr, ptr %7, align 8, !tbaa !5
  %119 = call noundef i32 @_Z16ComputeSYMGS_refRK19SparseMatrix_STRUCTRK13Vector_STRUCTRS2_(ptr noundef nonnull align 8 dereferenceable(256) %116, ptr noundef nonnull align 8 dereferenceable(24) %117, ptr noundef nonnull align 8 dereferenceable(24) %118)
  %120 = load i32, ptr %8, align 4, !tbaa !26
  %121 = add nsw i32 %120, %119
  store i32 %121, ptr %8, align 4, !tbaa !26
  br label %122

122:                                              ; preds = %115
  %123 = load i32, ptr %13, align 4, !tbaa !26
  %124 = add nsw i32 %123, 1
  store i32 %124, ptr %13, align 4, !tbaa !26
  br label %110, !llvm.loop !37

125:                                              ; preds = %114
  %126 = load i32, ptr %8, align 4, !tbaa !26
  %127 = icmp ne i32 %126, 0
  br i1 %127, label %128, label %130

128:                                              ; preds = %125
  %129 = load i32, ptr %8, align 4, !tbaa !26
  store i32 %129, ptr %4, align 4
  store i32 1, ptr %11, align 4
  br label %131

130:                                              ; preds = %125
  store i32 0, ptr %11, align 4
  br label %131

131:                                              ; preds = %130, %128
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  br label %132

132:                                              ; preds = %131, %102, %94, %75, %67, %54
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  %133 = load i32, ptr %11, align 4
  switch i32 %133, label %146 [
    i32 0, label %134
  ]

134:                                              ; preds = %132
  br label %145

135:                                              ; preds = %24
  %136 = load ptr, ptr %5, align 8, !tbaa !5
  %137 = load ptr, ptr %6, align 8, !tbaa !5
  %138 = load ptr, ptr %7, align 8, !tbaa !5
  %139 = call noundef i32 @_Z16ComputeSYMGS_refRK19SparseMatrix_STRUCTRK13Vector_STRUCTRS2_(ptr noundef nonnull align 8 dereferenceable(256) %136, ptr noundef nonnull align 8 dereferenceable(24) %137, ptr noundef nonnull align 8 dereferenceable(24) %138)
  store i32 %139, ptr %8, align 4, !tbaa !26
  %140 = load i32, ptr %8, align 4, !tbaa !26
  %141 = icmp ne i32 %140, 0
  br i1 %141, label %142, label %144

142:                                              ; preds = %135
  %143 = load i32, ptr %8, align 4, !tbaa !26
  store i32 %143, ptr %4, align 4
  store i32 1, ptr %11, align 4
  br label %146

144:                                              ; preds = %135
  br label %145

145:                                              ; preds = %144, %134
  store i32 0, ptr %4, align 4
  store i32 1, ptr %11, align 4
  br label %146

146:                                              ; preds = %145, %142, %132
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  %147 = load i32, ptr %4, align 4
  ret i32 %147
}

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_Z10ZeroVectorR13Vector_STRUCT(ptr noundef nonnull align 8 dereferenceable(24)) #2

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

declare noundef i32 @_Z16ComputeSYMGS_refRK19SparseMatrix_STRUCTRK13Vector_STRUCTRS2_(ptr noundef nonnull align 8 dereferenceable(256), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #4

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

declare noundef i32 @_Z15ComputeSPMV_refRK19SparseMatrix_STRUCTR13Vector_STRUCTS3_(ptr noundef nonnull align 8 dereferenceable(256), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #4

declare noundef i32 @_Z22ComputeRestriction_refRK19SparseMatrix_STRUCTRK13Vector_STRUCT(ptr noundef nonnull align 8 dereferenceable(256), ptr noundef nonnull align 8 dereferenceable(24)) #4

declare noundef i32 @_Z23ComputeProlongation_refRK19SparseMatrix_STRUCTR13Vector_STRUCT(ptr noundef nonnull align 8 dereferenceable(256), ptr noundef nonnull align 8 dereferenceable(24)) #4

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 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { noreturn nounwind }
attributes #6 = { 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, !11, i64 0}
!10 = !{!"_ZTS13Vector_STRUCT", !11, i64 0, !6, i64 8, !6, i64 16}
!11 = !{!"int", !7, i64 0}
!12 = !{!13, !11, i64 36}
!13 = !{!"_ZTS19SparseMatrix_STRUCT", !6, i64 0, !6, i64 8, !14, i64 16, !14, i64 24, !11, i64 32, !11, i64 36, !11, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !15, i64 88, !21, i64 144, !25, i64 168, !25, i64 169, !25, i64 170, !25, i64 171, !6, i64 176, !6, i64 184, !6, i64 192, !11, i64 200, !11, i64 204, !11, i64 208, !6, i64 216, !6, i64 224, !6, i64 232, !6, i64 240, !6, i64 248}
!14 = !{!"long long", !7, i64 0}
!15 = !{!"_ZTSSt13unordered_mapIxiSt4hashIxESt8equal_toIxESaISt4pairIKxiEEE", !16, i64 0}
!16 = !{!"_ZTSSt10_HashtableIxSt4pairIKxiESaIS2_ENSt8__detail10_Select1stESt8equal_toIxESt4hashIxENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb0ELb1EEEE", !6, i64 0, !17, i64 8, !18, i64 16, !17, i64 24, !19, i64 32, !6, i64 48}
!17 = !{!"long", !7, i64 0}
!18 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !6, i64 0}
!19 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !20, i64 0, !17, i64 8}
!20 = !{!"float", !7, i64 0}
!21 = !{!"_ZTSSt6vectorIxSaIxEE", !22, i64 0}
!22 = !{!"_ZTSSt12_Vector_baseIxSaIxEE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseIxSaIxEE12_Vector_implE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseIxSaIxEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!25 = !{!"bool", !7, i64 0}
!26 = !{!11, !11, i64 0}
!27 = !{!13, !6, i64 184}
!28 = !{!29, !11, i64 0}
!29 = !{!"_ZTS13MGData_STRUCT", !11, i64 0, !11, i64 4, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.mustprogress"}
!32 = !{!29, !6, i64 32}
!33 = !{!13, !6, i64 176}
!34 = !{!29, !6, i64 16}
!35 = !{!29, !6, i64 24}
!36 = !{!29, !11, i64 4}
!37 = distinct !{!37, !31}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

@.str = external hidden unnamed_addr constant [38 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [75 x i8], align 1
@__PRETTY_FUNCTION__._Z13ComputeMG_refRK19SparseMatrix_STRUCTRK13Vector_STRUCTRS2_ = external hidden unnamed_addr constant [66 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z13ComputeMG_refRK19SparseMatrix_STRUCTRK13Vector_STRUCTRS2_(ptr noundef nonnull align 8 dereferenceable(256) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) %2) local_unnamed_addr #0 {
  %4 = load i32, ptr %2, align 8, !tbaa !5
  %5 = getelementptr inbounds i8, ptr %0, i64 36
  %6 = load i32, ptr %5, align 4, !tbaa !11
  %7 = icmp eq i32 %4, %6
  br i1 %7, label %9, label %8

8:                                                ; preds = %3
  tail call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 40, ptr noundef nonnull @__PRETTY_FUNCTION__._Z13ComputeMG_refRK19SparseMatrix_STRUCTRK13Vector_STRUCTRS2_) #4
  unreachable

9:                                                ; preds = %3
  tail call void @_Z10ZeroVectorR13Vector_STRUCT(ptr noundef nonnull align 8 dereferenceable(24) %2)
  %10 = getelementptr inbounds i8, ptr %0, i64 184
  %11 = load ptr, ptr %10, align 8, !tbaa !25
  %.not = icmp eq ptr %11, null
  br i1 %.not, label %43, label %12

12:                                               ; preds = %9
  %13 = load i32, ptr %11, align 8, !tbaa !26
  %14 = icmp sgt i32 %13, 0
  br i1 %14, label %.lr.ph, label %._crit_edge.thread

._crit_edge:                                      ; preds = %.lr.ph
  %.not62 = icmp eq i32 %16, 0
  br i1 %.not62, label %._crit_edge.thread, label %.thread

.lr.ph:                                           ; preds = %12, %.lr.ph
  %.05171 = phi i32 [ %17, %.lr.ph ], [ 0, %12 ]
  %.05270 = phi i32 [ %16, %.lr.ph ], [ 0, %12 ]
  %15 = tail call noundef i32 @_Z16ComputeSYMGS_refRK19SparseMatrix_STRUCTRK13Vector_STRUCTRS2_(ptr noundef nonnull align 8 dereferenceable(256) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) %2)
  %16 = add nsw i32 %15, %.05270
  %17 = add nuw nsw i32 %.05171, 1
  %exitcond.not = icmp eq i32 %17, %13
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !28

._crit_edge.thread:                               ; preds = %12, %._crit_edge
  %18 = load ptr, ptr %10, align 8, !tbaa !25
  %19 = getelementptr inbounds i8, ptr %18, i64 32
  %20 = load ptr, ptr %19, align 8, !tbaa !30
  %21 = tail call noundef i32 @_Z15ComputeSPMV_refRK19SparseMatrix_STRUCTR13Vector_STRUCTS3_(ptr noundef nonnull align 8 dereferenceable(256) %0, ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(24) %20)
  %.not63 = icmp eq i32 %21, 0
  br i1 %.not63, label %22, label %.thread

22:                                               ; preds = %._crit_edge.thread
  %23 = tail call noundef i32 @_Z22ComputeRestriction_refRK19SparseMatrix_STRUCTRK13Vector_STRUCT(ptr noundef nonnull align 8 dereferenceable(256) %0, ptr noundef nonnull align 8 dereferenceable(24) %1)
  %.not64 = icmp eq i32 %23, 0
  br i1 %.not64, label %24, label %.thread

24:                                               ; preds = %22
  %25 = getelementptr inbounds i8, ptr %0, i64 176
  %26 = load ptr, ptr %25, align 8, !tbaa !31
  %27 = load ptr, ptr %10, align 8, !tbaa !25
  %28 = getelementptr inbounds i8, ptr %27, i64 16
  %29 = load ptr, ptr %28, align 8, !tbaa !32
  %30 = getelementptr inbounds i8, ptr %27, i64 24
  %31 = load ptr, ptr %30, align 8, !tbaa !33
  %32 = tail call noundef i32 @_Z13ComputeMG_refRK19SparseMatrix_STRUCTRK13Vector_STRUCTRS2_(ptr noundef nonnull align 8 dereferenceable(256) %26, ptr noundef nonnull align 8 dereferenceable(24) %29, ptr noundef nonnull align 8 dereferenceable(24) %31)
  %.not65 = icmp eq i32 %32, 0
  br i1 %.not65, label %33, label %.thread

33:                                               ; preds = %24
  %34 = tail call noundef i32 @_Z23ComputeProlongation_refRK19SparseMatrix_STRUCTR13Vector_STRUCT(ptr noundef nonnull align 8 dereferenceable(256) %0, ptr noundef nonnull align 8 dereferenceable(24) %2)
  %.not66 = icmp eq i32 %34, 0
  br i1 %.not66, label %35, label %.thread

35:                                               ; preds = %33
  %36 = load ptr, ptr %10, align 8, !tbaa !25
  %37 = getelementptr inbounds i8, ptr %36, i64 4
  %38 = load i32, ptr %37, align 4, !tbaa !34
  %39 = icmp sgt i32 %38, 0
  br i1 %39, label %.lr.ph75, label %._crit_edge76.thread

.lr.ph75:                                         ; preds = %35, %.lr.ph75
  %.073 = phi i32 [ %42, %.lr.ph75 ], [ 0, %35 ]
  %.15372 = phi i32 [ %41, %.lr.ph75 ], [ 0, %35 ]
  %40 = tail call noundef i32 @_Z16ComputeSYMGS_refRK19SparseMatrix_STRUCTRK13Vector_STRUCTRS2_(ptr noundef nonnull align 8 dereferenceable(256) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) %2)
  %41 = add nsw i32 %40, %.15372
  %42 = add nuw nsw i32 %.073, 1
  %exitcond79.not = icmp eq i32 %42, %38
  br i1 %exitcond79.not, label %._crit_edge76, label %.lr.ph75, !llvm.loop !35

._crit_edge76:                                    ; preds = %.lr.ph75
  %.not67 = icmp eq i32 %41, 0
  br i1 %.not67, label %._crit_edge76.thread, label %.thread

43:                                               ; preds = %9
  %44 = tail call noundef i32 @_Z16ComputeSYMGS_refRK19SparseMatrix_STRUCTRK13Vector_STRUCTRS2_(ptr noundef nonnull align 8 dereferenceable(256) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) %2)
  %.not61 = icmp eq i32 %44, 0
  br i1 %.not61, label %._crit_edge76.thread, label %.thread

._crit_edge76.thread:                             ; preds = %35, %43, %._crit_edge76
  br label %.thread

.thread:                                          ; preds = %33, %24, %22, %._crit_edge.thread, %._crit_edge, %43, %._crit_edge76, %._crit_edge76.thread
  %.2 = phi i32 [ 0, %._crit_edge76.thread ], [ %41, %._crit_edge76 ], [ %44, %43 ], [ %34, %33 ], [ %32, %24 ], [ %23, %22 ], [ %21, %._crit_edge.thread ], [ %16, %._crit_edge ]
  ret i32 %.2
}

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_Z10ZeroVectorR13Vector_STRUCT(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2

declare noundef i32 @_Z16ComputeSYMGS_refRK19SparseMatrix_STRUCTRK13Vector_STRUCTRS2_(ptr noundef nonnull align 8 dereferenceable(256), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #3

declare noundef i32 @_Z15ComputeSPMV_refRK19SparseMatrix_STRUCTR13Vector_STRUCTS3_(ptr noundef nonnull align 8 dereferenceable(256), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #3

declare noundef i32 @_Z22ComputeRestriction_refRK19SparseMatrix_STRUCTRK13Vector_STRUCT(ptr noundef nonnull align 8 dereferenceable(256), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #3

declare noundef i32 @_Z23ComputeProlongation_refRK19SparseMatrix_STRUCTR13Vector_STRUCT(ptr noundef nonnull align 8 dereferenceable(256), ptr noundef nonnull align 8 dereferenceable(24)) 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 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "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 = { noreturn 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, !7, i64 0}
!6 = !{!"_ZTS13Vector_STRUCT", !7, i64 0, !10, i64 8, !10, i64 16}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!12, !7, i64 36}
!12 = !{!"_ZTS19SparseMatrix_STRUCT", !10, i64 0, !10, i64 8, !13, i64 16, !13, i64 24, !7, i64 32, !7, i64 36, !7, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !14, i64 88, !20, i64 144, !24, i64 168, !24, i64 169, !24, i64 170, !24, i64 171, !10, i64 176, !10, i64 184, !10, i64 192, !7, i64 200, !7, i64 204, !7, i64 208, !10, i64 216, !10, i64 224, !10, i64 232, !10, i64 240, !10, i64 248}
!13 = !{!"long long", !8, i64 0}
!14 = !{!"_ZTSSt13unordered_mapIxiSt4hashIxESt8equal_toIxESaISt4pairIKxiEEE", !15, i64 0}
!15 = !{!"_ZTSSt10_HashtableIxSt4pairIKxiESaIS2_ENSt8__detail10_Select1stESt8equal_toIxESt4hashIxENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb0ELb1EEEE", !10, i64 0, !16, i64 8, !17, i64 16, !16, i64 24, !18, i64 32, !10, i64 48}
!16 = !{!"long", !8, i64 0}
!17 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !10, i64 0}
!18 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !19, i64 0, !16, i64 8}
!19 = !{!"float", !8, i64 0}
!20 = !{!"_ZTSSt6vectorIxSaIxEE", !21, i64 0}
!21 = !{!"_ZTSSt12_Vector_baseIxSaIxEE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseIxSaIxEE12_Vector_implE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseIxSaIxEE17_Vector_impl_dataE", !10, i64 0, !10, i64 8, !10, i64 16}
!24 = !{!"bool", !8, i64 0}
!25 = !{!12, !10, i64 184}
!26 = !{!27, !7, i64 0}
!27 = !{!"_ZTS13MGData_STRUCT", !7, i64 0, !7, i64 4, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40}
!28 = distinct !{!28, !29}
!29 = !{!"llvm.loop.mustprogress"}
!30 = !{!27, !10, i64 32}
!31 = !{!12, !10, i64 176}
!32 = !{!27, !10, i64 16}
!33 = !{!27, !10, i64 24}
!34 = !{!27, !7, i64 4}
!35 = distinct !{!35, !29}


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