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

@.str = external hidden unnamed_addr constant [151 x i8], align 1
@.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 @testMatrixRemoveColumnWoFr(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 ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  %11 = call ptr @matrixInitialization(i32 noundef 2, i32 noundef 2, ptr noundef @free, ptr noundef @compareIntPointersMT)
  store ptr %11, ptr %3, align 8, !tbaa !5
  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)
  %12 = getelementptr inbounds [3 x [3 x i32]], ptr %4, i32 0, i32 0
  %13 = getelementptr inbounds [3 x i32], ptr %12, i32 0, i32 2
  store i32 10, ptr %13, align 8
  %14 = getelementptr inbounds [3 x [3 x i32]], ptr %4, i32 0, i32 1
  %15 = getelementptr inbounds [3 x i32], ptr %14, i32 0, i32 0
  store i32 1, ptr %15, align 4
  %16 = getelementptr inbounds [3 x i32], ptr %14, i32 0, i32 2
  store i32 11, ptr %16, align 4
  %17 = load ptr, ptr %3, align 8, !tbaa !5
  %18 = call ptr @generateIntPointerMT(i32 noundef 10)
  call void @matrixInsert(ptr noundef %17, ptr noundef %18, i32 noundef 0, i32 noundef 0)
  %19 = load ptr, ptr %3, align 8, !tbaa !5
  %20 = call ptr @generateIntPointerMT(i32 noundef 11)
  call void @matrixInsert(ptr noundef %19, ptr noundef %20, i32 noundef 1, i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  %21 = call ptr @generateIntPointerMT(i32 noundef 12)
  store ptr %21, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  %22 = call ptr @generateIntPointerMT(i32 noundef 13)
  store ptr %22, ptr %6, align 8, !tbaa !5
  %23 = load ptr, ptr %3, align 8, !tbaa !5
  %24 = load ptr, ptr %5, align 8, !tbaa !5
  call void @matrixInsert(ptr noundef %23, ptr noundef %24, i32 noundef 0, i32 noundef 1)
  %25 = load ptr, ptr %3, align 8, !tbaa !5
  %26 = load ptr, ptr %6, align 8, !tbaa !5
  call void @matrixInsert(ptr noundef %25, ptr noundef %26, i32 noundef 1, i32 noundef 1)
  %27 = load ptr, ptr %3, align 8, !tbaa !5
  call void @matrixRemoveColWtoFr(ptr noundef %27, i32 noundef 1)
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  store i32 0, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  store i32 0, ptr %8, align 4, !tbaa !9
  br label %28

28:                                               ; preds = %111, %1
  %29 = load i32, ptr %7, align 4, !tbaa !9
  %30 = load ptr, ptr %3, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.Matrix, ptr %30, i32 0, i32 1
  %32 = load i32, ptr %31, align 8, !tbaa !11
  %33 = icmp slt i32 %29, %32
  br i1 %33, label %35, label %34

34:                                               ; preds = %28
  store i32 2, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  br label %114

35:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %36

36:                                               ; preds = %107, %35
  %37 = load i32, ptr %10, align 4, !tbaa !9
  %38 = load ptr, ptr %3, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.Matrix, ptr %38, i32 0, i32 3
  %40 = load i32, ptr %39, align 8, !tbaa !13
  %41 = icmp slt i32 %37, %40
  br i1 %41, label %43, label %42

42:                                               ; preds = %36
  store i32 5, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %110

43:                                               ; preds = %36
  %44 = load i32, ptr %8, align 4, !tbaa !9
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds [3 x [3 x i32]], ptr %4, i64 0, i64 %45
  %47 = getelementptr inbounds [3 x i32], ptr %46, i64 0, i64 0
  %48 = load i32, ptr %47, align 4, !tbaa !9
  %49 = load i32, ptr %7, align 4, !tbaa !9
  %50 = icmp eq i32 %48, %49
  br i1 %50, label %51, label %93

51:                                               ; preds = %43
  %52 = load i32, ptr %8, align 4, !tbaa !9
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds [3 x [3 x i32]], ptr %4, i64 0, i64 %53
  %55 = getelementptr inbounds [3 x i32], ptr %54, i64 0, i64 1
  %56 = load i32, ptr %55, align 4, !tbaa !9
  %57 = load i32, ptr %10, align 4, !tbaa !9
  %58 = icmp eq i32 %56, %57
  br i1 %58, label %59, label %93

59:                                               ; preds = %51
  %60 = load ptr, ptr %2, align 8, !tbaa !5
  %61 = load ptr, ptr %3, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.Matrix, ptr %61, i32 0, i32 0
  %63 = load ptr, ptr %62, align 8, !tbaa !14
  %64 = load i32, ptr %7, align 4, !tbaa !9
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds ptr, ptr %63, i64 %65
  %67 = load ptr, ptr %66, align 8, !tbaa !5
  %68 = load i32, ptr %10, align 4, !tbaa !9
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds ptr, ptr %67, i64 %69
  %71 = load ptr, ptr %70, align 8, !tbaa !5
  %72 = icmp ne ptr %71, null
  %73 = zext i1 %72 to i32
  call void @CuAssert_Line(ptr noundef %60, ptr noundef @.str, i32 noundef 547, ptr noundef @.str.1, i32 noundef %73)
  %74 = load ptr, ptr %2, align 8, !tbaa !5
  %75 = load i32, ptr %8, align 4, !tbaa !9
  %76 = add nsw i32 %75, 1
  store i32 %76, ptr %8, align 4, !tbaa !9
  %77 = sext i32 %75 to i64
  %78 = getelementptr inbounds [3 x [3 x i32]], ptr %4, i64 0, i64 %77
  %79 = getelementptr inbounds [3 x i32], ptr %78, i64 0, i64 2
  %80 = load i32, ptr %79, align 4, !tbaa !9
  %81 = load ptr, ptr %3, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.Matrix, ptr %81, i32 0, i32 0
  %83 = load ptr, ptr %82, align 8, !tbaa !14
  %84 = load i32, ptr %7, align 4, !tbaa !9
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds ptr, ptr %83, i64 %85
  %87 = load ptr, ptr %86, align 8, !tbaa !5
  %88 = load i32, ptr %10, align 4, !tbaa !9
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds ptr, ptr %87, i64 %89
  %91 = load ptr, ptr %90, align 8, !tbaa !5
  %92 = load i32, ptr %91, align 4, !tbaa !9
  call void @CuAssertIntEquals_LineMsg(ptr noundef %74, ptr noundef @.str, i32 noundef 548, ptr noundef null, i32 noundef %80, i32 noundef %92)
  br label %106

93:                                               ; preds = %51, %43
  %94 = load ptr, ptr %2, align 8, !tbaa !5
  %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 !14
  %98 = load i32, ptr %7, align 4, !tbaa !9
  %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 %10, align 4, !tbaa !9
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds ptr, ptr %101, i64 %103
  %105 = load ptr, ptr %104, align 8, !tbaa !5
  call void @CuAssertPtrEquals_LineMsg(ptr noundef %94, ptr noundef @.str, i32 noundef 550, ptr noundef null, ptr noundef null, ptr noundef %105)
  br label %106

106:                                              ; preds = %93, %59
  br label %107

107:                                              ; preds = %106
  %108 = load i32, ptr %10, align 4, !tbaa !9
  %109 = add nsw i32 %108, 1
  store i32 %109, ptr %10, align 4, !tbaa !9
  br label %36, !llvm.loop !15

110:                                              ; preds = %42
  br label %111

111:                                              ; preds = %110
  %112 = load i32, ptr %7, align 4, !tbaa !9
  %113 = add nsw i32 %112, 1
  store i32 %113, ptr %7, align 4, !tbaa !9
  br label %28, !llvm.loop !17

114:                                              ; preds = %34
  %115 = load ptr, ptr %2, align 8, !tbaa !5
  %116 = load ptr, ptr %5, align 8, !tbaa !5
  %117 = load i32, ptr %116, align 4, !tbaa !9
  call void @CuAssertIntEquals_LineMsg(ptr noundef %115, ptr noundef @.str, i32 noundef 556, ptr noundef null, i32 noundef 12, i32 noundef %117)
  %118 = load ptr, ptr %2, align 8, !tbaa !5
  %119 = load ptr, ptr %6, align 8, !tbaa !5
  %120 = load i32, ptr %119, align 4, !tbaa !9
  call void @CuAssertIntEquals_LineMsg(ptr noundef %118, ptr noundef @.str, i32 noundef 557, ptr noundef null, i32 noundef 13, i32 noundef %120)
  %121 = load ptr, ptr %5, align 8, !tbaa !5
  call void @free(ptr noundef %121) #5
  %122 = load ptr, ptr %6, align 8, !tbaa !5
  call void @free(ptr noundef %122) #5
  %123 = load ptr, ptr %3, align 8, !tbaa !5
  call void @destroyMatrix(ptr noundef %123)
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  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 @matrixRemoveColWtoFr(ptr 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, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 8}
!12 = !{!"Matrix", !6, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !6, i64 24, !6, i64 32}
!13 = !{!12, !10, i64 16}
!14 = !{!12, !6, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}


; 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
@.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 @testMatrixRemoveColumnWoFr(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
  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 36, i1 false)
  %4 = getelementptr inbounds i8, ptr %2, i64 8
  store i32 10, ptr %4, align 8
  %5 = getelementptr inbounds i8, ptr %2, i64 12
  store i32 1, ptr %5, align 4
  %6 = getelementptr inbounds i8, ptr %2, i64 20
  store i32 11, ptr %6, align 4
  %7 = tail call ptr @generateIntPointerMT(i32 noundef 10)
  tail call void @matrixInsert(ptr noundef %3, ptr noundef %7, i32 noundef 0, i32 noundef 0) #5
  %8 = tail call ptr @generateIntPointerMT(i32 noundef 11)
  tail call void @matrixInsert(ptr noundef %3, ptr noundef %8, i32 noundef 1, i32 noundef 0) #5
  %9 = tail call ptr @generateIntPointerMT(i32 noundef 12)
  %10 = tail call ptr @generateIntPointerMT(i32 noundef 13)
  tail call void @matrixInsert(ptr noundef %3, ptr noundef %9, i32 noundef 0, i32 noundef 1) #5
  tail call void @matrixInsert(ptr noundef %3, ptr noundef %10, i32 noundef 1, i32 noundef 1) #5
  tail call void @matrixRemoveColWtoFr(ptr noundef %3, i32 noundef 1) #5
  %11 = getelementptr inbounds i8, ptr %3, i64 8
  %12 = load i32, ptr %11, align 8, !tbaa !5
  %13 = icmp sgt i32 %12, 0
  br i1 %13, label %.preheader.lr.ph, label %._crit_edge42

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

.preheader:                                       ; preds = %.preheader.lr.ph, %._crit_edge
  %17 = phi i32 [ %22, %._crit_edge ], [ %12, %.preheader.lr.ph ]
  %18 = phi i32 [ %23, %._crit_edge ], [ %15, %.preheader.lr.ph ]
  %indvars.iv45 = phi i64 [ %indvars.iv.next46, %._crit_edge ], [ 0, %.preheader.lr.ph ]
  %.03641 = phi i32 [ %.1.lcssa, %._crit_edge ], [ 0, %.preheader.lr.ph ]
  %19 = icmp sgt i32 %18, 0
  br i1 %19, label %.lr.ph, label %._crit_edge

._crit_edge42:                                    ; preds = %._crit_edge, %.preheader.lr.ph, %1
  %20 = load i32, ptr %9, align 4, !tbaa !12
  tail call void @CuAssertIntEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 556, ptr noundef null, i32 noundef 12, i32 noundef %20) #5
  %21 = load i32, ptr %10, align 4, !tbaa !12
  tail call void @CuAssertIntEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 557, ptr noundef null, i32 noundef 13, i32 noundef %21) #5
  tail call void @free(ptr noundef %9) #5
  tail call void @free(ptr noundef %10) #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 = %59
  %.pre = load i32, ptr %11, align 8, !tbaa !5
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.preheader
  %22 = phi i32 [ %17, %.preheader ], [ %.pre, %._crit_edge.loopexit ]
  %23 = phi i32 [ %18, %.preheader ], [ %60, %._crit_edge.loopexit ]
  %.1.lcssa = phi i32 [ %.03641, %.preheader ], [ %.2, %._crit_edge.loopexit ]
  %indvars.iv.next46 = add nuw nsw i64 %indvars.iv45, 1
  %24 = sext i32 %22 to i64
  %25 = icmp slt i64 %indvars.iv.next46, %24
  br i1 %25, label %.preheader, label %._crit_edge42, !llvm.loop !13

.lr.ph:                                           ; preds = %.preheader, %59
  %indvars.iv = phi i64 [ %indvars.iv.next, %59 ], [ 0, %.preheader ]
  %.138 = phi i32 [ %.2, %59 ], [ %.03641, %.preheader ]
  %26 = sext i32 %.138 to i64
  %27 = getelementptr inbounds [3 x [3 x i32]], ptr %2, i64 0, i64 %26
  %28 = load i32, ptr %27, align 4, !tbaa !12
  %29 = zext i32 %28 to i64
  %30 = icmp eq i64 %indvars.iv45, %29
  br i1 %30, label %31, label %53

31:                                               ; preds = %.lr.ph
  %32 = getelementptr inbounds i8, ptr %27, i64 4
  %33 = load i32, ptr %32, align 4, !tbaa !12
  %34 = zext i32 %33 to i64
  %35 = icmp eq i64 %indvars.iv, %34
  br i1 %35, label %36, label %53

36:                                               ; preds = %31
  %37 = load ptr, ptr %3, align 8, !tbaa !16
  %38 = getelementptr inbounds ptr, ptr %37, i64 %indvars.iv45
  %39 = load ptr, ptr %38, align 8, !tbaa !17
  %40 = getelementptr inbounds ptr, ptr %39, i64 %indvars.iv
  %41 = load ptr, ptr %40, align 8, !tbaa !17
  %42 = icmp ne ptr %41, null
  %43 = zext i1 %42 to i32
  tail call void @CuAssert_Line(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 547, ptr noundef nonnull @.str.1, i32 noundef %43) #5
  %44 = add nsw i32 %.138, 1
  %45 = getelementptr inbounds i8, ptr %27, i64 8
  %46 = load i32, ptr %45, align 4, !tbaa !12
  %47 = load ptr, ptr %3, align 8, !tbaa !16
  %48 = getelementptr inbounds ptr, ptr %47, i64 %indvars.iv45
  %49 = load ptr, ptr %48, align 8, !tbaa !17
  %50 = getelementptr inbounds ptr, ptr %49, i64 %indvars.iv
  %51 = load ptr, ptr %50, align 8, !tbaa !17
  %52 = load i32, ptr %51, align 4, !tbaa !12
  tail call void @CuAssertIntEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 548, ptr noundef null, i32 noundef %46, i32 noundef %52) #5
  br label %59

53:                                               ; preds = %31, %.lr.ph
  %54 = load ptr, ptr %3, align 8, !tbaa !16
  %55 = getelementptr inbounds ptr, ptr %54, i64 %indvars.iv45
  %56 = load ptr, ptr %55, align 8, !tbaa !17
  %57 = getelementptr inbounds ptr, ptr %56, i64 %indvars.iv
  %58 = load ptr, ptr %57, align 8, !tbaa !17
  tail call void @CuAssertPtrEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 550, ptr noundef null, ptr noundef null, ptr noundef %58) #5
  br label %59

59:                                               ; preds = %36, %53
  %.2 = phi i32 [ %44, %36 ], [ %.138, %53 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %60 = load i32, ptr %14, align 8, !tbaa !11
  %61 = sext i32 %60 to i64
  %62 = icmp slt i64 %indvars.iv.next, %61
  br i1 %62, label %.lr.ph, label %._crit_edge.loopexit, !llvm.loop !18
}

declare void @matrixRemoveColWtoFr(ptr 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, !10, i64 8}
!6 = !{!"Matrix", !7, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !7, i64 24, !7, i64 32}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!6, !10, i64 16}
!12 = !{!10, !10, i64 0}
!13 = distinct !{!13, !14, !15}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!"llvm.loop.unswitch.partial.disable"}
!16 = !{!6, !7, i64 0}
!17 = !{!7, !7, i64 0}
!18 = distinct !{!18, !14}


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