; LLVM IR from MostafaTwfiq/C-DataStructures-And-Algorithms :: Unit Test/Tests/DataStructuresTests/MatricesTest/MatrixTest (MatrixTest)

; 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.ErrorTestStruct = type { i32 }
%struct.Matrix = type { ptr, i32, i32, i32, i32, ptr, ptr }

@.str = external hidden unnamed_addr constant [151 x i8], align 1
@ERROR_TEST = external dso_local global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [24 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local ptr @generateIntPointerMT(i32 noundef) #0

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

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @compareIntPointersMT(ptr noundef, ptr noundef) #0

declare ptr @matrixInitialization(i32 noundef, i32 noundef, ptr noundef, ptr noundef) #2

declare void @CuAssertIntEquals_LineMsg(ptr noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef, i32 noundef) #2

; Function Attrs: nounwind
declare void @free(ptr noundef) #3

declare void @CuAssert_Line(ptr noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef) #2

declare void @destroyMatrix(ptr noundef) #2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

declare void @matrixInsert(ptr noundef, ptr noundef, i32 noundef, i32 noundef) #2

declare void @CuAssertPtrEquals_LineMsg(ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
define dso_local void @testMatrixRemoveWtoFr(ptr noundef %0) #0 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca [3 x [3 x i32]], align 16
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  %10 = call ptr @matrixInitialization(i32 noundef 2, i32 noundef 2, ptr noundef @free, ptr noundef @compareIntPointersMT)
  store ptr %10, ptr %3, align 8, !tbaa !5
  call void @matrixRemoveWtoFr(ptr noundef null, i32 noundef 0, i32 noundef 0)
  %11 = load ptr, ptr %2, align 8, !tbaa !5
  %12 = load ptr, ptr @ERROR_TEST, align 8, !tbaa !5
  %13 = getelementptr inbounds %struct.ErrorTestStruct, ptr %12, i32 0, i32 0
  %14 = load i32, ptr %13, align 4, !tbaa !9
  call void @CuAssertIntEquals_LineMsg(ptr noundef %11, ptr noundef @.str, i32 noundef 157, ptr noundef null, i32 noundef -83386157, i32 noundef %14)
  %15 = load ptr, ptr %3, align 8, !tbaa !5
  call void @matrixRemoveWtoFr(ptr noundef %15, i32 noundef 3, i32 noundef 1)
  %16 = load ptr, ptr %2, align 8, !tbaa !5
  %17 = load ptr, ptr @ERROR_TEST, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.ErrorTestStruct, ptr %17, i32 0, i32 0
  %19 = load i32, ptr %18, align 4, !tbaa !9
  call void @CuAssertIntEquals_LineMsg(ptr noundef %16, ptr noundef @.str, i32 noundef 160, ptr noundef null, i32 noundef -83385991, i32 noundef %19)
  call void @llvm.lifetime.start.p0(i64 36, ptr %4) #5
  call void @llvm.memset.p0.i64(ptr align 16 %4, i8 0, i64 36, i1 false)
  %20 = getelementptr inbounds [3 x [3 x i32]], ptr %4, i32 0, i32 0
  %21 = getelementptr inbounds [3 x i32], ptr %20, i32 0, i32 2
  store i32 10, ptr %21, align 8
  %22 = getelementptr inbounds [3 x [3 x i32]], ptr %4, i32 0, i32 1
  %23 = getelementptr inbounds [3 x i32], ptr %22, i32 0, i32 0
  store i32 1, ptr %23, align 4
  %24 = getelementptr inbounds [3 x i32], ptr %22, i32 0, i32 2
  store i32 11, ptr %24, align 4
  %25 = getelementptr inbounds [3 x [3 x i32]], ptr %4, i32 0, i32 2
  %26 = getelementptr inbounds [3 x i32], ptr %25, i32 0, i32 0
  store i32 1, ptr %26, align 8
  %27 = getelementptr inbounds [3 x i32], ptr %25, i32 0, i32 1
  store i32 1, ptr %27, align 4
  %28 = getelementptr inbounds [3 x i32], ptr %25, i32 0, i32 2
  store i32 12, ptr %28, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  %29 = call ptr @generateIntPointerMT(i32 noundef 13)
  store ptr %29, ptr %5, align 8, !tbaa !5
  %30 = load ptr, ptr %3, align 8, !tbaa !5
  %31 = call ptr @generateIntPointerMT(i32 noundef 10)
  call void @matrixInsert(ptr noundef %30, ptr noundef %31, i32 noundef 0, i32 noundef 0)
  %32 = load ptr, ptr %3, align 8, !tbaa !5
  %33 = load ptr, ptr %5, align 8, !tbaa !5
  call void @matrixInsert(ptr noundef %32, ptr noundef %33, i32 noundef 0, i32 noundef 1)
  %34 = load ptr, ptr %3, align 8, !tbaa !5
  %35 = call ptr @generateIntPointerMT(i32 noundef 11)
  call void @matrixInsert(ptr noundef %34, ptr noundef %35, i32 noundef 1, i32 noundef 0)
  %36 = load ptr, ptr %3, align 8, !tbaa !5
  %37 = call ptr @generateIntPointerMT(i32 noundef 12)
  call void @matrixInsert(ptr noundef %36, ptr noundef %37, i32 noundef 1, i32 noundef 1)
  %38 = load ptr, ptr %3, align 8, !tbaa !5
  call void @matrixRemoveWtoFr(ptr noundef %38, i32 noundef 0, i32 noundef 1)
  %39 = load ptr, ptr %2, align 8, !tbaa !5
  %40 = load ptr, ptr %5, align 8, !tbaa !5
  %41 = load i32, ptr %40, align 4, !tbaa !12
  call void @CuAssertIntEquals_LineMsg(ptr noundef %39, ptr noundef @.str, i32 noundef 173, ptr noundef null, i32 noundef 13, i32 noundef %41)
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  store i32 0, ptr %6, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  store i32 0, ptr %7, align 4, !tbaa !12
  br label %42

42:                                               ; preds = %125, %1
  %43 = load i32, ptr %6, align 4, !tbaa !12
  %44 = load ptr, ptr %3, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.Matrix, ptr %44, i32 0, i32 1
  %46 = load i32, ptr %45, align 8, !tbaa !13
  %47 = icmp slt i32 %43, %46
  br i1 %47, label %49, label %48

48:                                               ; preds = %42
  store i32 2, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  br label %128

49:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  store i32 0, ptr %9, align 4, !tbaa !12
  br label %50

50:                                               ; preds = %121, %49
  %51 = load i32, ptr %9, align 4, !tbaa !12
  %52 = load ptr, ptr %3, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.Matrix, ptr %52, i32 0, i32 3
  %54 = load i32, ptr %53, align 8, !tbaa !15
  %55 = icmp slt i32 %51, %54
  br i1 %55, label %57, label %56

56:                                               ; preds = %50
  store i32 5, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %124

57:                                               ; preds = %50
  %58 = load i32, ptr %7, align 4, !tbaa !12
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds [3 x [3 x i32]], ptr %4, i64 0, i64 %59
  %61 = getelementptr inbounds [3 x i32], ptr %60, i64 0, i64 0
  %62 = load i32, ptr %61, align 4, !tbaa !12
  %63 = load i32, ptr %6, align 4, !tbaa !12
  %64 = icmp eq i32 %62, %63
  br i1 %64, label %65, label %107

65:                                               ; preds = %57
  %66 = load i32, ptr %7, align 4, !tbaa !12
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds [3 x [3 x i32]], ptr %4, i64 0, i64 %67
  %69 = getelementptr inbounds [3 x i32], ptr %68, i64 0, i64 1
  %70 = load i32, ptr %69, align 4, !tbaa !12
  %71 = load i32, ptr %9, align 4, !tbaa !12
  %72 = icmp eq i32 %70, %71
  br i1 %72, label %73, label %107

73:                                               ; preds = %65
  %74 = load ptr, ptr %2, align 8, !tbaa !5
  %75 = load ptr, ptr %3, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.Matrix, ptr %75, i32 0, i32 0
  %77 = load ptr, ptr %76, align 8, !tbaa !16
  %78 = load i32, ptr %6, align 4, !tbaa !12
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds ptr, ptr %77, i64 %79
  %81 = load ptr, ptr %80, align 8, !tbaa !5
  %82 = load i32, ptr %9, align 4, !tbaa !12
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds ptr, ptr %81, i64 %83
  %85 = load ptr, ptr %84, align 8, !tbaa !5
  %86 = icmp ne ptr %85, null
  %87 = zext i1 %86 to i32
  call void @CuAssert_Line(ptr noundef %74, ptr noundef @.str, i32 noundef 180, ptr noundef @.str.1, i32 noundef %87)
  %88 = load ptr, ptr %2, align 8, !tbaa !5
  %89 = load i32, ptr %7, align 4, !tbaa !12
  %90 = add nsw i32 %89, 1
  store i32 %90, ptr %7, align 4, !tbaa !12
  %91 = sext i32 %89 to i64
  %92 = getelementptr inbounds [3 x [3 x i32]], ptr %4, i64 0, i64 %91
  %93 = getelementptr inbounds [3 x i32], ptr %92, i64 0, i64 2
  %94 = load i32, ptr %93, align 4, !tbaa !12
  %95 = load ptr, ptr %3, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.Matrix, ptr %95, i32 0, i32 0
  %97 = load ptr, ptr %96, align 8, !tbaa !16
  %98 = load i32, ptr %6, align 4, !tbaa !12
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds ptr, ptr %97, i64 %99
  %101 = load ptr, ptr %100, align 8, !tbaa !5
  %102 = load i32, ptr %9, align 4, !tbaa !12
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds ptr, ptr %101, i64 %103
  %105 = load ptr, ptr %104, align 8, !tbaa !5
  %106 = load i32, ptr %105, align 4, !tbaa !12
  call void @CuAssertIntEquals_LineMsg(ptr noundef %88, ptr noundef @.str, i32 noundef 181, ptr noundef null, i32 noundef %94, i32 noundef %106)
  br label %120

107:                                              ; preds = %65, %57
  %108 = load ptr, ptr %2, align 8, !tbaa !5
  %109 = load ptr, ptr %3, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.Matrix, ptr %109, i32 0, i32 0
  %111 = load ptr, ptr %110, align 8, !tbaa !16
  %112 = load i32, ptr %6, align 4, !tbaa !12
  %113 = sext i32 %112 to i64
  %114 = getelementptr inbounds ptr, ptr %111, i64 %113
  %115 = load ptr, ptr %114, align 8, !tbaa !5
  %116 = load i32, ptr %9, align 4, !tbaa !12
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds ptr, ptr %115, i64 %117
  %119 = load ptr, ptr %118, align 8, !tbaa !5
  call void @CuAssertPtrEquals_LineMsg(ptr noundef %108, ptr noundef @.str, i32 noundef 183, ptr noundef null, ptr noundef null, ptr noundef %119)
  br label %120

120:                                              ; preds = %107, %73
  br label %121

121:                                              ; preds = %120
  %122 = load i32, ptr %9, align 4, !tbaa !12
  %123 = add nsw i32 %122, 1
  store i32 %123, ptr %9, align 4, !tbaa !12
  br label %50, !llvm.loop !17

124:                                              ; preds = %56
  br label %125

125:                                              ; preds = %124
  %126 = load i32, ptr %6, align 4, !tbaa !12
  %127 = add nsw i32 %126, 1
  store i32 %127, ptr %6, align 4, !tbaa !12
  br label %42, !llvm.loop !19

128:                                              ; preds = %48
  %129 = load ptr, ptr %5, align 8, !tbaa !5
  call void @free(ptr noundef %129) #5
  %130 = load ptr, ptr %3, align 8, !tbaa !5
  call void @destroyMatrix(ptr noundef %130)
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 36, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  ret void
}

declare void @matrixRemoveWtoFr(ptr noundef, i32 noundef, i32 noundef) #2

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind "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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { 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/C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"ErrorTestStruct", !11, i64 0}
!11 = !{!"int", !7, i64 0}
!12 = !{!11, !11, i64 0}
!13 = !{!14, !11, i64 8}
!14 = !{!"Matrix", !6, i64 0, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !6, i64 24, !6, i64 32}
!15 = !{!14, !11, i64 16}
!16 = !{!14, !6, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = distinct !{!19, !18}


; 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 [151 x i8], align 1
@ERROR_TEST = external dso_local local_unnamed_addr global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [24 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local ptr @generateIntPointerMT(i32 noundef) local_unnamed_addr #0

; 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: nounwind uwtable
declare dso_local i32 @compareIntPointersMT(ptr noundef, ptr noundef) #0

declare ptr @matrixInitialization(i32 noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare void @CuAssertIntEquals_LineMsg(ptr noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) #3

declare void @CuAssert_Line(ptr noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

declare void @destroyMatrix(ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

declare void @matrixInsert(ptr noundef, ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #2

declare void @CuAssertPtrEquals_LineMsg(ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local void @testMatrixRemoveWtoFr(ptr noundef %0) local_unnamed_addr #0 {
  %2 = alloca [3 x [3 x i32]], align 16
  %3 = tail call ptr @matrixInitialization(i32 noundef 2, i32 noundef 2, ptr noundef nonnull @free, ptr noundef nonnull @compareIntPointersMT) #5
  tail call void @matrixRemoveWtoFr(ptr noundef null, i32 noundef 0, i32 noundef 0) #5
  %4 = load ptr, ptr @ERROR_TEST, align 8, !tbaa !5
  %5 = load i32, ptr %4, align 4, !tbaa !9
  tail call void @CuAssertIntEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 157, ptr noundef null, i32 noundef -83386157, i32 noundef %5) #5
  tail call void @matrixRemoveWtoFr(ptr noundef %3, i32 noundef 3, i32 noundef 1) #5
  %6 = load ptr, ptr @ERROR_TEST, align 8, !tbaa !5
  %7 = load i32, ptr %6, align 4, !tbaa !9
  tail call void @CuAssertIntEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 160, ptr noundef null, i32 noundef -83385991, i32 noundef %7) #5
  call void @llvm.lifetime.start.p0(i64 36, ptr nonnull %2) #5
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(36) %2, i8 0, i64 32, i1 false)
  %8 = getelementptr inbounds i8, ptr %2, i64 8
  store i32 10, ptr %8, align 8
  %9 = getelementptr inbounds i8, ptr %2, i64 12
  store i32 1, ptr %9, align 4
  %10 = getelementptr inbounds i8, ptr %2, i64 20
  store <4 x i32> <i32 11, i32 1, i32 1, i32 12>, ptr %10, align 4
  %11 = tail call ptr @generateIntPointerMT(i32 noundef 13)
  %12 = tail call ptr @generateIntPointerMT(i32 noundef 10)
  tail call void @matrixInsert(ptr noundef %3, ptr noundef %12, i32 noundef 0, i32 noundef 0) #5
  tail call void @matrixInsert(ptr noundef %3, ptr noundef %11, i32 noundef 0, i32 noundef 1) #5
  %13 = tail call ptr @generateIntPointerMT(i32 noundef 11)
  tail call void @matrixInsert(ptr noundef %3, ptr noundef %13, i32 noundef 1, i32 noundef 0) #5
  %14 = tail call ptr @generateIntPointerMT(i32 noundef 12)
  tail call void @matrixInsert(ptr noundef %3, ptr noundef %14, i32 noundef 1, i32 noundef 1) #5
  tail call void @matrixRemoveWtoFr(ptr noundef %3, i32 noundef 0, i32 noundef 1) #5
  %15 = load i32, ptr %11, align 4, !tbaa !12
  tail call void @CuAssertIntEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 173, ptr noundef null, i32 noundef 13, i32 noundef %15) #5
  %16 = getelementptr inbounds i8, ptr %3, i64 8
  %17 = load i32, ptr %16, align 8, !tbaa !13
  %18 = icmp sgt i32 %17, 0
  br i1 %18, label %.preheader.lr.ph, label %._crit_edge41

.preheader.lr.ph:                                 ; preds = %1
  %19 = getelementptr inbounds i8, ptr %3, i64 16
  %20 = load i32, ptr %19, align 8, !tbaa !15
  %21 = icmp sgt i32 %20, 0
  br i1 %21, label %.preheader, label %._crit_edge41

.preheader:                                       ; preds = %.preheader.lr.ph, %._crit_edge
  %22 = phi i32 [ %25, %._crit_edge ], [ %17, %.preheader.lr.ph ]
  %23 = phi i32 [ %26, %._crit_edge ], [ %20, %.preheader.lr.ph ]
  %indvars.iv44 = phi i64 [ %indvars.iv.next45, %._crit_edge ], [ 0, %.preheader.lr.ph ]
  %.03540 = phi i32 [ %.1.lcssa, %._crit_edge ], [ 0, %.preheader.lr.ph ]
  %24 = icmp sgt i32 %23, 0
  br i1 %24, label %.lr.ph, label %._crit_edge

._crit_edge41:                                    ; preds = %._crit_edge, %.preheader.lr.ph, %1
  tail call void @free(ptr noundef %11) #5
  tail call void @destroyMatrix(ptr noundef nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 36, ptr nonnull %2) #5
  ret void

._crit_edge.loopexit:                             ; preds = %62
  %.pre = load i32, ptr %16, align 8, !tbaa !13
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.preheader
  %25 = phi i32 [ %22, %.preheader ], [ %.pre, %._crit_edge.loopexit ]
  %26 = phi i32 [ %23, %.preheader ], [ %63, %._crit_edge.loopexit ]
  %.1.lcssa = phi i32 [ %.03540, %.preheader ], [ %.2, %._crit_edge.loopexit ]
  %indvars.iv.next45 = add nuw nsw i64 %indvars.iv44, 1
  %27 = sext i32 %25 to i64
  %28 = icmp slt i64 %indvars.iv.next45, %27
  br i1 %28, label %.preheader, label %._crit_edge41, !llvm.loop !16

.lr.ph:                                           ; preds = %.preheader, %62
  %indvars.iv = phi i64 [ %indvars.iv.next, %62 ], [ 0, %.preheader ]
  %.137 = phi i32 [ %.2, %62 ], [ %.03540, %.preheader ]
  %29 = sext i32 %.137 to i64
  %30 = getelementptr inbounds [3 x [3 x i32]], ptr %2, i64 0, i64 %29
  %31 = load i32, ptr %30, align 4, !tbaa !12
  %32 = zext i32 %31 to i64
  %33 = icmp eq i64 %indvars.iv44, %32
  br i1 %33, label %34, label %56

34:                                               ; preds = %.lr.ph
  %35 = getelementptr inbounds i8, ptr %30, i64 4
  %36 = load i32, ptr %35, align 4, !tbaa !12
  %37 = zext i32 %36 to i64
  %38 = icmp eq i64 %indvars.iv, %37
  br i1 %38, label %39, label %56

39:                                               ; preds = %34
  %40 = load ptr, ptr %3, align 8, !tbaa !19
  %41 = getelementptr inbounds ptr, ptr %40, i64 %indvars.iv44
  %42 = load ptr, ptr %41, align 8, !tbaa !5
  %43 = getelementptr inbounds ptr, ptr %42, i64 %indvars.iv
  %44 = load ptr, ptr %43, align 8, !tbaa !5
  %45 = icmp ne ptr %44, null
  %46 = zext i1 %45 to i32
  tail call void @CuAssert_Line(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 180, ptr noundef nonnull @.str.1, i32 noundef %46) #5
  %47 = add nsw i32 %.137, 1
  %48 = getelementptr inbounds i8, ptr %30, i64 8
  %49 = load i32, ptr %48, align 4, !tbaa !12
  %50 = load ptr, ptr %3, align 8, !tbaa !19
  %51 = getelementptr inbounds ptr, ptr %50, i64 %indvars.iv44
  %52 = load ptr, ptr %51, align 8, !tbaa !5
  %53 = getelementptr inbounds ptr, ptr %52, i64 %indvars.iv
  %54 = load ptr, ptr %53, align 8, !tbaa !5
  %55 = load i32, ptr %54, align 4, !tbaa !12
  tail call void @CuAssertIntEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 181, ptr noundef null, i32 noundef %49, i32 noundef %55) #5
  br label %62

56:                                               ; preds = %34, %.lr.ph
  %57 = load ptr, ptr %3, align 8, !tbaa !19
  %58 = getelementptr inbounds ptr, ptr %57, i64 %indvars.iv44
  %59 = load ptr, ptr %58, align 8, !tbaa !5
  %60 = getelementptr inbounds ptr, ptr %59, i64 %indvars.iv
  %61 = load ptr, ptr %60, align 8, !tbaa !5
  tail call void @CuAssertPtrEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 183, ptr noundef null, ptr noundef null, ptr noundef %61) #5
  br label %62

62:                                               ; preds = %39, %56
  %.2 = phi i32 [ %47, %39 ], [ %.137, %56 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %63 = load i32, ptr %19, align 8, !tbaa !15
  %64 = sext i32 %63 to i64
  %65 = icmp slt i64 %indvars.iv.next, %64
  br i1 %65, label %.lr.ph, label %._crit_edge.loopexit, !llvm.loop !20
}

declare void @matrixRemoveWtoFr(ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #2

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { 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/C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"ErrorTestStruct", !11, i64 0}
!11 = !{!"int", !7, i64 0}
!12 = !{!11, !11, i64 0}
!13 = !{!14, !11, i64 8}
!14 = !{!"Matrix", !6, i64 0, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !6, i64 24, !6, i64 32}
!15 = !{!14, !11, i64 16}
!16 = distinct !{!16, !17, !18}
!17 = !{!"llvm.loop.mustprogress"}
!18 = !{!"llvm.loop.unswitch.partial.disable"}
!19 = !{!14, !6, i64 0}
!20 = distinct !{!20, !17}


; Effective O3 passes: CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,SLPVectorizerPass,SROAPass,SimpleLoopUnswitchPass,SimplifyCFGPass,TailCallElimPass