; LLVM IR from INMOST-DEV/INMOST-FEM :: anifem++/fem (fem_space)

; 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.anon.29 = type { i32 }
%class.anon.30 = type { i32 }
%"struct.Ani::BandDenseMatrixX" = type { i64, ptr, ptr, ptr }
%"struct.Ani::AniMemoryX" = type { %"struct.Ani::AniMemory", %"struct.Ani::ArrayView.1", %"struct.Ani::ArrayView.0", %"struct.Ani::ArrayView.0", i64 }
%"struct.Ani::AniMemory" = type { %"struct.Ani::ArrayView", %"struct.Ani::ArrayView", %"struct.Ani::ArrayView", %"struct.Ani::ArrayView", %"struct.Ani::ArrayView", %"struct.Ani::ArrayView", %"struct.Ani::ArrayView", %"struct.Ani::ArrayView", %"struct.Ani::ArrayView", %"struct.Ani::ArrayView", %"struct.Ani::ArrayView", %"struct.Ani::ArrayView", %"struct.Ani::ArrayView", %"struct.Ani::ArrayView.0", i64, i64 }
%"struct.Ani::ArrayView" = type { ptr, i64 }
%"struct.Ani::ArrayView.1" = type { ptr, i64 }
%"struct.Ani::ArrayView.0" = type { ptr, i64 }
%"struct.Ani::DenseMatrix.9" = type { ptr, i64, i64, i64 }

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3Ani14VectorFemSpace15realloc_rep_mtxERNS_10AniMemoryXIdiEERNS_16BandDenseMatrixXIdiEEj(ptr noundef nonnull align 8 dereferenceable(296) %0, ptr noundef nonnull align 8 dereferenceable(32) %1, i32 noundef %2) #1 align 2 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca %class.anon.29, align 4
  %13 = alloca %class.anon.29, align 4
  %14 = alloca %class.anon.30, align 4
  %15 = alloca %class.anon.30, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store i32 %2, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #3
  %16 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %16, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  %17 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %17, ptr %8, align 8, !tbaa !5
  %18 = load i32, ptr %7, align 4, !tbaa !9
  %19 = sub i32 %18, 1
  %20 = zext i32 %19 to i64
  %21 = load ptr, ptr %8, align 8, !tbaa !5
  %22 = getelementptr inbounds %"struct.Ani::BandDenseMatrixX", ptr %21, i32 0, i32 0
  %23 = load i64, ptr %22, align 8, !tbaa !11
  %24 = mul i64 %20, %23
  %25 = load ptr, ptr %4, align 8, !tbaa !5
  %26 = getelementptr inbounds %"struct.Ani::AniMemoryX", ptr %25, i32 0, i32 4
  %27 = load i64, ptr %26, align 8, !tbaa !14
  %28 = add i64 %27, %24
  store i64 %28, ptr %26, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #3
  %29 = load ptr, ptr %8, align 8, !tbaa !5
  %30 = getelementptr inbounds %"struct.Ani::BandDenseMatrixX", ptr %29, i32 0, i32 3
  %31 = load ptr, ptr %30, align 8, !tbaa !20
  %32 = load ptr, ptr %8, align 8, !tbaa !5
  %33 = getelementptr inbounds %"struct.Ani::BandDenseMatrixX", ptr %32, i32 0, i32 0
  %34 = load i64, ptr %33, align 8, !tbaa !11
  %35 = getelementptr inbounds i32, ptr %31, i64 %34
  %36 = load i32, ptr %35, align 4, !tbaa !9
  store i32 %36, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #3
  %37 = load ptr, ptr %8, align 8, !tbaa !5
  %38 = getelementptr inbounds %"struct.Ani::BandDenseMatrixX", ptr %37, i32 0, i32 2
  %39 = load ptr, ptr %38, align 8, !tbaa !21
  %40 = load ptr, ptr %8, align 8, !tbaa !5
  %41 = getelementptr inbounds %"struct.Ani::BandDenseMatrixX", ptr %40, i32 0, i32 0
  %42 = load i64, ptr %41, align 8, !tbaa !11
  %43 = getelementptr inbounds i32, ptr %39, i64 %42
  %44 = load i32, ptr %43, align 4, !tbaa !9
  store i32 %44, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #3
  store i32 1, ptr %11, align 4, !tbaa !9
  br label %45

45:                                               ; preds = %202, %3
  %46 = load i32, ptr %11, align 4, !tbaa !9
  %47 = load i32, ptr %7, align 4, !tbaa !9
  %48 = icmp ult i32 %46, %47
  br i1 %48, label %50, label %49

49:                                               ; preds = %45
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #3
  br label %205

50:                                               ; preds = %45
  %51 = load ptr, ptr %8, align 8, !tbaa !5
  %52 = getelementptr inbounds %"struct.Ani::BandDenseMatrixX", ptr %51, i32 0, i32 1
  %53 = load ptr, ptr %52, align 8, !tbaa !22
  %54 = load ptr, ptr %8, align 8, !tbaa !5
  %55 = getelementptr inbounds %"struct.Ani::BandDenseMatrixX", ptr %54, i32 0, i32 1
  %56 = load ptr, ptr %55, align 8, !tbaa !22
  %57 = load ptr, ptr %8, align 8, !tbaa !5
  %58 = getelementptr inbounds %"struct.Ani::BandDenseMatrixX", ptr %57, i32 0, i32 0
  %59 = load i64, ptr %58, align 8, !tbaa !11
  %60 = getelementptr inbounds %"struct.Ani::DenseMatrix.9", ptr %56, i64 %59
  %61 = load ptr, ptr %8, align 8, !tbaa !5
  %62 = getelementptr inbounds %"struct.Ani::BandDenseMatrixX", ptr %61, i32 0, i32 1
  %63 = load ptr, ptr %62, align 8, !tbaa !22
  %64 = load i32, ptr %11, align 4, !tbaa !9
  %65 = zext i32 %64 to i64
  %66 = load ptr, ptr %8, align 8, !tbaa !5
  %67 = getelementptr inbounds %"struct.Ani::BandDenseMatrixX", ptr %66, i32 0, i32 0
  %68 = load i64, ptr %67, align 8, !tbaa !11
  %69 = mul i64 %65, %68
  %70 = getelementptr inbounds %"struct.Ani::DenseMatrix.9", ptr %63, i64 %69
  %71 = call noundef ptr @_ZSt4copyIPN3Ani11DenseMatrixIdEES3_ET0_T_S5_S4_(ptr noundef %53, ptr noundef %60, ptr noundef %70)
  %72 = load ptr, ptr %8, align 8, !tbaa !5
  %73 = getelementptr inbounds %"struct.Ani::BandDenseMatrixX", ptr %72, i32 0, i32 3
  %74 = load ptr, ptr %73, align 8, !tbaa !20
  %75 = load ptr, ptr %8, align 8, !tbaa !5
  %76 = getelementptr inbounds %"struct.Ani::BandDenseMatrixX", ptr %75, i32 0, i32 3
  %77 = load ptr, ptr %76, align 8, !tbaa !20
  %78 = load ptr, ptr %8, align 8, !tbaa !5
  %79 = getelementptr inbounds %"struct.Ani::BandDenseMatrixX", ptr %78, i32 0, i32 0
  %80 = load i64, ptr %79, align 8, !tbaa !11
  %81 = getelementptr inbounds i32, ptr %77, i64 %80
  %82 = load ptr, ptr %8, align 8, !tbaa !5
  %83 = getelementptr inbounds %"struct.Ani::BandDenseMatrixX", ptr %82, i32 0, i32 3
  %84 = load ptr, ptr %83, align 8, !tbaa !20
  %85 = load i32, ptr %11, align 4, !tbaa !9
  %86 = zext i32 %85 to i64
  %87 = load ptr, ptr %8, align 8, !tbaa !5
  %88 = getelementptr inbounds %"struct.Ani::BandDenseMatrixX", ptr %87, i32 0, i32 0
  %89 = load i64, ptr %88, align 8, !tbaa !11
  %90 = mul i64 %86, %89
  %91 = getelementptr inbounds i32, ptr %84, i64 %90
  %92 = call noundef ptr @_ZSt4copyIPiS0_ET0_T_S2_S1_(ptr noundef %74, ptr noundef %81, ptr noundef %91)
  %93 = load ptr, ptr %8, align 8, !tbaa !5
  %94 = getelementptr inbounds %"struct.Ani::BandDenseMatrixX", ptr %93, i32 0, i32 3
  %95 = load ptr, ptr %94, align 8, !tbaa !20
  %96 = load i32, ptr %11, align 4, !tbaa !9
  %97 = zext i32 %96 to i64
  %98 = load ptr, ptr %8, align 8, !tbaa !5
  %99 = getelementptr inbounds %"struct.Ani::BandDenseMatrixX", ptr %98, i32 0, i32 0
  %100 = load i64, ptr %99, align 8, !tbaa !11
  %101 = mul i64 %97, %100
  %102 = getelementptr inbounds i32, ptr %95, i64 %101
  %103 = load ptr, ptr %8, align 8, !tbaa !5
  %104 = getelementptr inbounds %"struct.Ani::BandDenseMatrixX", ptr %103, i32 0, i32 3
  %105 = load ptr, ptr %104, align 8, !tbaa !20
  %106 = load i32, ptr %11, align 4, !tbaa !9
  %107 = add i32 %106, 1
  %108 = zext i32 %107 to i64
  %109 = load ptr, ptr %8, align 8, !tbaa !5
  %110 = getelementptr inbounds %"struct.Ani::BandDenseMatrixX", ptr %109, i32 0, i32 0
  %111 = load i64, ptr %110, align 8, !tbaa !11
  %112 = mul i64 %108, %111
  %113 = getelementptr inbounds i32, ptr %105, i64 %112
  %114 = getelementptr inbounds %class.anon.29, ptr %12, i32 0, i32 0
  %115 = load i32, ptr %9, align 4, !tbaa !9
  %116 = load i32, ptr %11, align 4, !tbaa !9
  %117 = mul i32 %115, %116
  store i32 %117, ptr %114, align 4, !tbaa !23
  %118 = getelementptr inbounds %class.anon.29, ptr %12, i32 0, i32 0
  %119 = load i32, ptr %118, align 4
  %120 = call i32 @"_ZSt8for_eachIPiZN3Ani14VectorFemSpace15realloc_rep_mtxERNS1_10AniMemoryXIdiEERNS1_16BandDenseMatrixXIdiEEjE3$_0ET0_T_SB_SA_"(ptr noundef %102, ptr noundef %113, i32 %119)
  %121 = getelementptr inbounds %class.anon.29, ptr %13, i32 0, i32 0
  store i32 %120, ptr %121, align 4
  %122 = load i32, ptr %9, align 4, !tbaa !9
  %123 = load i32, ptr %11, align 4, !tbaa !9
  %124 = add i32 %123, 1
  %125 = mul i32 %122, %124
  %126 = load ptr, ptr %8, align 8, !tbaa !5
  %127 = getelementptr inbounds %"struct.Ani::BandDenseMatrixX", ptr %126, i32 0, i32 3
  %128 = load ptr, ptr %127, align 8, !tbaa !20
  %129 = load i32, ptr %11, align 4, !tbaa !9
  %130 = add i32 %129, 1
  %131 = zext i32 %130 to i64
  %132 = load ptr, ptr %8, align 8, !tbaa !5
  %133 = getelementptr inbounds %"struct.Ani::BandDenseMatrixX", ptr %132, i32 0, i32 0
  %134 = load i64, ptr %133, align 8, !tbaa !11
  %135 = mul i64 %131, %134
  %136 = getelementptr inbounds i32, ptr %128, i64 %135
  store i32 %125, ptr %136, align 4, !tbaa !9
  %137 = load ptr, ptr %8, align 8, !tbaa !5
  %138 = getelementptr inbounds %"struct.Ani::BandDenseMatrixX", ptr %137, i32 0, i32 2
  %139 = load ptr, ptr %138, align 8, !tbaa !21
  %140 = load ptr, ptr %8, align 8, !tbaa !5
  %141 = getelementptr inbounds %"struct.Ani::BandDenseMatrixX", ptr %140, i32 0, i32 2
  %142 = load ptr, ptr %141, align 8, !tbaa !21
  %143 = load ptr, ptr %8, align 8, !tbaa !5
  %144 = getelementptr inbounds %"struct.Ani::BandDenseMatrixX", ptr %143, i32 0, i32 0
  %145 = load i64, ptr %144, align 8, !tbaa !11
  %146 = getelementptr inbounds i32, ptr %142, i64 %145
  %147 = load ptr, ptr %8, align 8, !tbaa !5
  %148 = getelementptr inbounds %"struct.Ani::BandDenseMatrixX", ptr %147, i32 0, i32 2
  %149 = load ptr, ptr %148, align 8, !tbaa !21
  %150 = load i32, ptr %11, align 4, !tbaa !9
  %151 = zext i32 %150 to i64
  %152 = load ptr, ptr %8, align 8, !tbaa !5
  %153 = getelementptr inbounds %"struct.Ani::BandDenseMatrixX", ptr %152, i32 0, i32 0
  %154 = load i64, ptr %153, align 8, !tbaa !11
  %155 = mul i64 %151, %154
  %156 = getelementptr inbounds i32, ptr %149, i64 %155
  %157 = call noundef ptr @_ZSt4copyIPiS0_ET0_T_S2_S1_(ptr noundef %139, ptr noundef %146, ptr noundef %156)
  %158 = load ptr, ptr %8, align 8, !tbaa !5
  %159 = getelementptr inbounds %"struct.Ani::BandDenseMatrixX", ptr %158, i32 0, i32 2
  %160 = load ptr, ptr %159, align 8, !tbaa !21
  %161 = load i32, ptr %11, align 4, !tbaa !9
  %162 = zext i32 %161 to i64
  %163 = load ptr, ptr %8, align 8, !tbaa !5
  %164 = getelementptr inbounds %"struct.Ani::BandDenseMatrixX", ptr %163, i32 0, i32 0
  %165 = load i64, ptr %164, align 8, !tbaa !11
  %166 = mul i64 %162, %165
  %167 = getelementptr inbounds i32, ptr %160, i64 %166
  %168 = load ptr, ptr %8, align 8, !tbaa !5
  %169 = getelementptr inbounds %"struct.Ani::BandDenseMatrixX", ptr %168, i32 0, i32 2
  %170 = load ptr, ptr %169, align 8, !tbaa !21
  %171 = load i32, ptr %11, align 4, !tbaa !9
  %172 = add i32 %171, 1
  %173 = zext i32 %172 to i64
  %174 = load ptr, ptr %8, align 8, !tbaa !5
  %175 = getelementptr inbounds %"struct.Ani::BandDenseMatrixX", ptr %174, i32 0, i32 0
  %176 = load i64, ptr %175, align 8, !tbaa !11
  %177 = mul i64 %173, %176
  %178 = getelementptr inbounds i32, ptr %170, i64 %177
  %179 = getelementptr inbounds %class.anon.30, ptr %14, i32 0, i32 0
  %180 = load i32, ptr %10, align 4, !tbaa !9
  %181 = load i32, ptr %11, align 4, !tbaa !9
  %182 = mul i32 %180, %181
  store i32 %182, ptr %179, align 4, !tbaa !25
  %183 = getelementptr inbounds %class.anon.30, ptr %14, i32 0, i32 0
  %184 = load i32, ptr %183, align 4
  %185 = call i32 @"_ZSt8for_eachIPiZN3Ani14VectorFemSpace15realloc_rep_mtxERNS1_10AniMemoryXIdiEERNS1_16BandDenseMatrixXIdiEEjE3$_1ET0_T_SB_SA_"(ptr noundef %167, ptr noundef %178, i32 %184)
  %186 = getelementptr inbounds %class.anon.30, ptr %15, i32 0, i32 0
  store i32 %185, ptr %186, align 4
  %187 = load i32, ptr %10, align 4, !tbaa !9
  %188 = load i32, ptr %11, align 4, !tbaa !9
  %189 = add i32 %188, 1
  %190 = mul i32 %187, %189
  %191 = load ptr, ptr %8, align 8, !tbaa !5
  %192 = getelementptr inbounds %"struct.Ani::BandDenseMatrixX", ptr %191, i32 0, i32 2
  %193 = load ptr, ptr %192, align 8, !tbaa !21
  %194 = load i32, ptr %11, align 4, !tbaa !9
  %195 = add i32 %194, 1
  %196 = zext i32 %195 to i64
  %197 = load ptr, ptr %8, align 8, !tbaa !5
  %198 = getelementptr inbounds %"struct.Ani::BandDenseMatrixX", ptr %197, i32 0, i32 0
  %199 = load i64, ptr %198, align 8, !tbaa !11
  %200 = mul i64 %196, %199
  %201 = getelementptr inbounds i32, ptr %193, i64 %200
  store i32 %190, ptr %201, align 4, !tbaa !9
  br label %202

202:                                              ; preds = %50
  %203 = load i32, ptr %11, align 4, !tbaa !9
  %204 = add i32 %203, 1
  store i32 %204, ptr %11, align 4, !tbaa !9
  br label %45, !llvm.loop !27

205:                                              ; preds = %49
  %206 = load i32, ptr %7, align 4, !tbaa !9
  %207 = zext i32 %206 to i64
  %208 = load ptr, ptr %8, align 8, !tbaa !5
  %209 = getelementptr inbounds %"struct.Ani::BandDenseMatrixX", ptr %208, i32 0, i32 0
  %210 = load i64, ptr %209, align 8, !tbaa !11
  %211 = mul i64 %210, %207
  store i64 %211, ptr %209, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #3
  ret void
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZSt4copyIPN3Ani11DenseMatrixIdEES3_ET0_T_S5_S4_(ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZSt4copyIPiS0_ET0_T_S2_S1_(ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: mustprogress uwtable
declare hidden i32 @"_ZSt8for_eachIPiZN3Ani14VectorFemSpace15realloc_rep_mtxERNS1_10AniMemoryXIdiEERNS1_16BandDenseMatrixXIdiEEjE3$_0ET0_T_SB_SA_"(ptr noundef, ptr noundef, i32) #1

; Function Attrs: mustprogress uwtable
declare hidden i32 @"_ZSt8for_eachIPiZN3Ani14VectorFemSpace15realloc_rep_mtxERNS1_10AniMemoryXIdiEERNS1_16BandDenseMatrixXIdiEEjE3$_1ET0_T_SB_SA_"(ptr noundef, ptr noundef, i32) #1

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { inlinehint 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 #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 = !{!"int", !7, i64 0}
!11 = !{!12, !13, i64 0}
!12 = !{!"_ZTSN3Ani16BandDenseMatrixXIdiEE", !13, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!13 = !{!"long", !7, i64 0}
!14 = !{!15, !13, i64 288}
!15 = !{!"_ZTSN3Ani10AniMemoryXIdiEE", !16, i64 0, !19, i64 240, !18, i64 256, !18, i64 272, !13, i64 288}
!16 = !{!"_ZTSN3Ani9AniMemoryIdiEE", !17, i64 0, !17, i64 16, !17, i64 32, !17, i64 48, !17, i64 64, !17, i64 80, !17, i64 96, !17, i64 112, !17, i64 128, !17, i64 144, !17, i64 160, !17, i64 176, !17, i64 192, !18, i64 208, !13, i64 224, !13, i64 232}
!17 = !{!"_ZTSN3Ani9ArrayViewIdEE", !6, i64 0, !13, i64 8}
!18 = !{!"_ZTSN3Ani9ArrayViewIiEE", !6, i64 0, !13, i64 8}
!19 = !{!"_ZTSN3Ani9ArrayViewINS_11DenseMatrixIdEEEE", !6, i64 0, !13, i64 8}
!20 = !{!12, !6, i64 24}
!21 = !{!12, !6, i64 16}
!22 = !{!12, !6, i64 8}
!23 = !{!24, !10, i64 0}
!24 = !{!"_ZTSZN3Ani14VectorFemSpace15realloc_rep_mtxERNS_10AniMemoryXIdiEERNS_16BandDenseMatrixXIdiEEjE3$_0", !10, i64 0}
!25 = !{!26, !10, i64 0}
!26 = !{!"_ZTSZN3Ani14VectorFemSpace15realloc_rep_mtxERNS_10AniMemoryXIdiEERNS_16BandDenseMatrixXIdiEEjE3$_1", !10, i64 0}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.mustprogress"}


; 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.Ani::DenseMatrix.9" = type { ptr, i64, i64, i64 }

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3Ani14VectorFemSpace15realloc_rep_mtxERNS_10AniMemoryXIdiEERNS_16BandDenseMatrixXIdiEEj(ptr nocapture noundef nonnull align 8 dereferenceable(296) %0, ptr nocapture noundef nonnull align 8 dereferenceable(32) %1, i32 noundef %2) local_unnamed_addr #0 align 2 {
  %4 = add i32 %2, -1
  %5 = zext i32 %4 to i64
  %6 = load i64, ptr %1, align 8, !tbaa !5
  %7 = mul i64 %6, %5
  %8 = getelementptr inbounds i8, ptr %0, i64 288
  %9 = load i64, ptr %8, align 8, !tbaa !11
  %10 = add i64 %9, %7
  store i64 %10, ptr %8, align 8, !tbaa !11
  %11 = getelementptr inbounds i8, ptr %1, i64 24
  %12 = load ptr, ptr %11, align 8, !tbaa !17
  %13 = getelementptr inbounds i32, ptr %12, i64 %6
  %14 = load i32, ptr %13, align 4, !tbaa !18
  %15 = getelementptr inbounds i8, ptr %1, i64 16
  %16 = load ptr, ptr %15, align 8, !tbaa !20
  %17 = getelementptr inbounds i32, ptr %16, i64 %6
  %18 = load i32, ptr %17, align 4, !tbaa !18
  %19 = icmp ugt i32 %2, 1
  br i1 %19, label %.lr.ph, label %.._crit_edge_crit_edge

.._crit_edge_crit_edge:                           ; preds = %3
  %.pre = zext nneg i32 %2 to i64
  br label %._crit_edge

.lr.ph:                                           ; preds = %3
  %20 = getelementptr inbounds i8, ptr %1, i64 8
  %wide.trip.count = zext i32 %2 to i64
  br label %23

._crit_edge:                                      ; preds = %23, %.._crit_edge_crit_edge
  %.pre-phi = phi i64 [ %.pre, %.._crit_edge_crit_edge ], [ %wide.trip.count, %23 ]
  %21 = phi i64 [ %6, %.._crit_edge_crit_edge ], [ %66, %23 ]
  %22 = mul i64 %21, %.pre-phi
  store i64 %22, ptr %1, align 8, !tbaa !5
  ret void

23:                                               ; preds = %.lr.ph, %23
  %24 = phi i64 [ %6, %.lr.ph ], [ %66, %23 ]
  %indvars.iv = phi i64 [ 1, %.lr.ph ], [ %indvars.iv.next, %23 ]
  %25 = load ptr, ptr %20, align 8, !tbaa !21
  %26 = getelementptr inbounds %"struct.Ani::DenseMatrix.9", ptr %25, i64 %24
  %27 = mul i64 %24, %indvars.iv
  %28 = getelementptr inbounds %"struct.Ani::DenseMatrix.9", ptr %25, i64 %27
  %29 = tail call noundef ptr @_ZSt4copyIPN3Ani11DenseMatrixIdEES3_ET0_T_S5_S4_(ptr noundef %25, ptr noundef %26, ptr noundef %28)
  %30 = load ptr, ptr %11, align 8, !tbaa !17
  %31 = load i64, ptr %1, align 8, !tbaa !5
  %32 = getelementptr inbounds i32, ptr %30, i64 %31
  %33 = mul i64 %31, %indvars.iv
  %34 = getelementptr inbounds i32, ptr %30, i64 %33
  %35 = tail call noundef ptr @_ZSt4copyIPiS0_ET0_T_S2_S1_(ptr noundef %30, ptr noundef %32, ptr noundef %34)
  %36 = load ptr, ptr %11, align 8, !tbaa !17
  %37 = load i64, ptr %1, align 8, !tbaa !5
  %38 = mul i64 %37, %indvars.iv
  %39 = getelementptr inbounds i32, ptr %36, i64 %38
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %40 = mul i64 %37, %indvars.iv.next
  %41 = getelementptr inbounds i32, ptr %36, i64 %40
  %42 = trunc nuw i64 %indvars.iv to i32
  %43 = mul i32 %14, %42
  %44 = tail call i32 @"_ZSt8for_eachIPiZN3Ani14VectorFemSpace15realloc_rep_mtxERNS1_10AniMemoryXIdiEERNS1_16BandDenseMatrixXIdiEEjE3$_0ET0_T_SB_SA_"(ptr noundef %39, ptr noundef %41, i32 %43)
  %45 = trunc nuw i64 %indvars.iv.next to i32
  %46 = mul i32 %14, %45
  %47 = load ptr, ptr %11, align 8, !tbaa !17
  %48 = load i64, ptr %1, align 8, !tbaa !5
  %49 = mul i64 %48, %indvars.iv.next
  %50 = getelementptr inbounds i32, ptr %47, i64 %49
  store i32 %46, ptr %50, align 4, !tbaa !18
  %51 = load ptr, ptr %15, align 8, !tbaa !20
  %52 = getelementptr inbounds i32, ptr %51, i64 %48
  %53 = mul i64 %48, %indvars.iv
  %54 = getelementptr inbounds i32, ptr %51, i64 %53
  %55 = tail call noundef ptr @_ZSt4copyIPiS0_ET0_T_S2_S1_(ptr noundef %51, ptr noundef %52, ptr noundef %54)
  %56 = load ptr, ptr %15, align 8, !tbaa !20
  %57 = load i64, ptr %1, align 8, !tbaa !5
  %58 = mul i64 %57, %indvars.iv
  %59 = getelementptr inbounds i32, ptr %56, i64 %58
  %60 = mul i64 %57, %indvars.iv.next
  %61 = getelementptr inbounds i32, ptr %56, i64 %60
  %62 = mul i32 %18, %42
  %63 = tail call i32 @"_ZSt8for_eachIPiZN3Ani14VectorFemSpace15realloc_rep_mtxERNS1_10AniMemoryXIdiEERNS1_16BandDenseMatrixXIdiEEjE3$_1ET0_T_SB_SA_"(ptr noundef %59, ptr noundef %61, i32 %62)
  %64 = mul i32 %18, %45
  %65 = load ptr, ptr %15, align 8, !tbaa !20
  %66 = load i64, ptr %1, align 8, !tbaa !5
  %67 = mul i64 %66, %indvars.iv.next
  %68 = getelementptr inbounds i32, ptr %65, i64 %67
  store i32 %64, ptr %68, align 4, !tbaa !18
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %23, !llvm.loop !22
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZSt4copyIPN3Ani11DenseMatrixIdEES3_ET0_T_S5_S4_(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZSt4copyIPiS0_ET0_T_S2_S1_(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare hidden i32 @"_ZSt8for_eachIPiZN3Ani14VectorFemSpace15realloc_rep_mtxERNS1_10AniMemoryXIdiEERNS1_16BandDenseMatrixXIdiEEjE3$_0ET0_T_SB_SA_"(ptr noundef, ptr noundef, i32) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare hidden i32 @"_ZSt8for_eachIPiZN3Ani14VectorFemSpace15realloc_rep_mtxERNS1_10AniMemoryXIdiEERNS1_16BandDenseMatrixXIdiEEjE3$_1ET0_T_SB_SA_"(ptr noundef, ptr noundef, i32) local_unnamed_addr #0

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 = { inlinehint 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" }

!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 = !{!"_ZTSN3Ani16BandDenseMatrixXIdiEE", !7, i64 0, !10, i64 8, !10, i64 16, !10, i64 24}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!12, !7, i64 288}
!12 = !{!"_ZTSN3Ani10AniMemoryXIdiEE", !13, i64 0, !16, i64 240, !15, i64 256, !15, i64 272, !7, i64 288}
!13 = !{!"_ZTSN3Ani9AniMemoryIdiEE", !14, i64 0, !14, i64 16, !14, i64 32, !14, i64 48, !14, i64 64, !14, i64 80, !14, i64 96, !14, i64 112, !14, i64 128, !14, i64 144, !14, i64 160, !14, i64 176, !14, i64 192, !15, i64 208, !7, i64 224, !7, i64 232}
!14 = !{!"_ZTSN3Ani9ArrayViewIdEE", !10, i64 0, !7, i64 8}
!15 = !{!"_ZTSN3Ani9ArrayViewIiEE", !10, i64 0, !7, i64 8}
!16 = !{!"_ZTSN3Ani9ArrayViewINS_11DenseMatrixIdEEEE", !10, i64 0, !7, i64 8}
!17 = !{!6, !10, i64 24}
!18 = !{!19, !19, i64 0}
!19 = !{!"int", !8, i64 0}
!20 = !{!6, !10, i64 16}
!21 = !{!6, !10, i64 8}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}


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