; 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 @testMatrixRemove(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 i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  %9 = call ptr @matrixInitialization(i32 noundef 2, i32 noundef 2, ptr noundef @free, ptr noundef @compareIntPointersMT)
  store ptr %9, ptr %3, align 8, !tbaa !5
  call void @matrixRemove(ptr noundef null, i32 noundef 0, i32 noundef 0)
  %10 = load ptr, ptr %2, align 8, !tbaa !5
  %11 = load ptr, ptr @ERROR_TEST, align 8, !tbaa !5
  %12 = getelementptr inbounds %struct.ErrorTestStruct, ptr %11, i32 0, i32 0
  %13 = load i32, ptr %12, align 4, !tbaa !9
  call void @CuAssertIntEquals_LineMsg(ptr noundef %10, ptr noundef @.str, i32 noundef 117, ptr noundef null, i32 noundef -83386157, i32 noundef %13)
  %14 = load ptr, ptr %3, align 8, !tbaa !5
  call void @matrixRemove(ptr noundef %14, i32 noundef 4, i32 noundef 2)
  %15 = load ptr, ptr %2, align 8, !tbaa !5
  %16 = load ptr, ptr @ERROR_TEST, align 8, !tbaa !5
  %17 = getelementptr inbounds %struct.ErrorTestStruct, ptr %16, i32 0, i32 0
  %18 = load i32, ptr %17, align 4, !tbaa !9
  call void @CuAssertIntEquals_LineMsg(ptr noundef %15, ptr noundef @.str, i32 noundef 120, ptr noundef null, i32 noundef -83385991, i32 noundef %18)
  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)
  %19 = getelementptr inbounds [3 x [3 x i32]], ptr %4, i32 0, i32 0
  %20 = getelementptr inbounds [3 x i32], ptr %19, i32 0, i32 2
  store i32 10, ptr %20, align 8
  %21 = getelementptr inbounds [3 x [3 x i32]], ptr %4, i32 0, i32 1
  %22 = getelementptr inbounds [3 x i32], ptr %21, i32 0, i32 0
  store i32 1, ptr %22, align 4
  %23 = getelementptr inbounds [3 x i32], ptr %21, i32 0, i32 2
  store i32 11, ptr %23, align 4
  %24 = getelementptr inbounds [3 x [3 x i32]], ptr %4, i32 0, i32 2
  %25 = getelementptr inbounds [3 x i32], ptr %24, i32 0, i32 0
  store i32 1, ptr %25, align 8
  %26 = getelementptr inbounds [3 x i32], ptr %24, i32 0, i32 1
  store i32 1, ptr %26, align 4
  %27 = getelementptr inbounds [3 x i32], ptr %24, i32 0, i32 2
  store i32 12, ptr %27, align 8
  %28 = load ptr, ptr %3, align 8, !tbaa !5
  %29 = call ptr @generateIntPointerMT(i32 noundef 10)
  call void @matrixInsert(ptr noundef %28, ptr noundef %29, i32 noundef 0, i32 noundef 0)
  %30 = load ptr, ptr %3, align 8, !tbaa !5
  %31 = call ptr @generateIntPointerMT(i32 noundef 13)
  call void @matrixInsert(ptr noundef %30, ptr noundef %31, i32 noundef 0, i32 noundef 1)
  %32 = load ptr, ptr %3, align 8, !tbaa !5
  %33 = call ptr @generateIntPointerMT(i32 noundef 11)
  call void @matrixInsert(ptr noundef %32, ptr noundef %33, i32 noundef 1, i32 noundef 0)
  %34 = load ptr, ptr %3, align 8, !tbaa !5
  %35 = call ptr @generateIntPointerMT(i32 noundef 12)
  call void @matrixInsert(ptr noundef %34, ptr noundef %35, i32 noundef 1, i32 noundef 1)
  %36 = load ptr, ptr %3, align 8, !tbaa !5
  call void @matrixRemove(ptr noundef %36, i32 noundef 0, i32 noundef 1)
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  store i32 0, ptr %5, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  store i32 0, ptr %6, align 4, !tbaa !12
  br label %37

37:                                               ; preds = %120, %1
  %38 = load i32, ptr %5, align 4, !tbaa !12
  %39 = load ptr, ptr %3, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.Matrix, ptr %39, i32 0, i32 1
  %41 = load i32, ptr %40, align 8, !tbaa !13
  %42 = icmp slt i32 %38, %41
  br i1 %42, label %44, label %43

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

44:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  store i32 0, ptr %8, align 4, !tbaa !12
  br label %45

45:                                               ; preds = %116, %44
  %46 = load i32, ptr %8, align 4, !tbaa !12
  %47 = load ptr, ptr %3, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.Matrix, ptr %47, i32 0, i32 3
  %49 = load i32, ptr %48, align 8, !tbaa !15
  %50 = icmp slt i32 %46, %49
  br i1 %50, label %52, label %51

51:                                               ; preds = %45
  store i32 5, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  br label %119

52:                                               ; preds = %45
  %53 = load i32, ptr %6, align 4, !tbaa !12
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds [3 x [3 x i32]], ptr %4, i64 0, i64 %54
  %56 = getelementptr inbounds [3 x i32], ptr %55, i64 0, i64 0
  %57 = load i32, ptr %56, align 4, !tbaa !12
  %58 = load i32, ptr %5, align 4, !tbaa !12
  %59 = icmp eq i32 %57, %58
  br i1 %59, label %60, label %102

60:                                               ; preds = %52
  %61 = load i32, ptr %6, align 4, !tbaa !12
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds [3 x [3 x i32]], ptr %4, i64 0, i64 %62
  %64 = getelementptr inbounds [3 x i32], ptr %63, i64 0, i64 1
  %65 = load i32, ptr %64, align 4, !tbaa !12
  %66 = load i32, ptr %8, align 4, !tbaa !12
  %67 = icmp eq i32 %65, %66
  br i1 %67, label %68, label %102

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

102:                                              ; preds = %60, %52
  %103 = load ptr, ptr %2, align 8, !tbaa !5
  %104 = load ptr, ptr %3, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.Matrix, ptr %104, i32 0, i32 0
  %106 = load ptr, ptr %105, align 8, !tbaa !16
  %107 = load i32, ptr %5, align 4, !tbaa !12
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds ptr, ptr %106, i64 %108
  %110 = load ptr, ptr %109, align 8, !tbaa !5
  %111 = load i32, ptr %8, align 4, !tbaa !12
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds ptr, ptr %110, i64 %112
  %114 = load ptr, ptr %113, align 8, !tbaa !5
  call void @CuAssertPtrEquals_LineMsg(ptr noundef %103, ptr noundef @.str, i32 noundef 141, ptr noundef null, ptr noundef null, ptr noundef %114)
  br label %115

115:                                              ; preds = %102, %68
  br label %116

116:                                              ; preds = %115
  %117 = load i32, ptr %8, align 4, !tbaa !12
  %118 = add nsw i32 %117, 1
  store i32 %118, ptr %8, align 4, !tbaa !12
  br label %45, !llvm.loop !17

119:                                              ; preds = %51
  br label %120

120:                                              ; preds = %119
  %121 = load i32, ptr %5, align 4, !tbaa !12
  %122 = add nsw i32 %121, 1
  store i32 %122, ptr %5, align 4, !tbaa !12
  br label %37, !llvm.loop !19

123:                                              ; preds = %43
  %124 = load ptr, ptr %3, align 8, !tbaa !5
  call void @destroyMatrix(ptr noundef %124)
  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 @matrixRemove(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 @testMatrixRemove(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 @matrixRemove(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 117, ptr noundef null, i32 noundef -83386157, i32 noundef %5) #5
  tail call void @matrixRemove(ptr noundef %3, i32 noundef 4, i32 noundef 2) #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 120, 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 10)
  tail call void @matrixInsert(ptr noundef %3, ptr noundef %11, i32 noundef 0, i32 noundef 0) #5
  %12 = tail call ptr @generateIntPointerMT(i32 noundef 13)
  tail call void @matrixInsert(ptr noundef %3, ptr noundef %12, 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 @matrixRemove(ptr noundef %3, i32 noundef 0, i32 noundef 1) #5
  %15 = getelementptr inbounds i8, ptr %3, i64 8
  %16 = load i32, ptr %15, align 8, !tbaa !12
  %17 = icmp sgt i32 %16, 0
  br i1 %17, label %.preheader.lr.ph, label %._crit_edge37

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

.preheader:                                       ; preds = %.preheader.lr.ph, %._crit_edge
  %21 = phi i32 [ %24, %._crit_edge ], [ %16, %.preheader.lr.ph ]
  %22 = phi i32 [ %25, %._crit_edge ], [ %19, %.preheader.lr.ph ]
  %indvars.iv40 = phi i64 [ %indvars.iv.next41, %._crit_edge ], [ 0, %.preheader.lr.ph ]
  %.03136 = phi i32 [ %.1.lcssa, %._crit_edge ], [ 0, %.preheader.lr.ph ]
  %23 = icmp sgt i32 %22, 0
  br i1 %23, label %.lr.ph, label %._crit_edge

._crit_edge37:                                    ; preds = %._crit_edge, %.preheader.lr.ph, %1
  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 = %61
  %.pre = load i32, ptr %15, align 8, !tbaa !12
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.preheader
  %24 = phi i32 [ %21, %.preheader ], [ %.pre, %._crit_edge.loopexit ]
  %25 = phi i32 [ %22, %.preheader ], [ %62, %._crit_edge.loopexit ]
  %.1.lcssa = phi i32 [ %.03136, %.preheader ], [ %.2, %._crit_edge.loopexit ]
  %indvars.iv.next41 = add nuw nsw i64 %indvars.iv40, 1
  %26 = sext i32 %24 to i64
  %27 = icmp slt i64 %indvars.iv.next41, %26
  br i1 %27, label %.preheader, label %._crit_edge37, !llvm.loop !15

.lr.ph:                                           ; preds = %.preheader, %61
  %indvars.iv = phi i64 [ %indvars.iv.next, %61 ], [ 0, %.preheader ]
  %.133 = phi i32 [ %.2, %61 ], [ %.03136, %.preheader ]
  %28 = sext i32 %.133 to i64
  %29 = getelementptr inbounds [3 x [3 x i32]], ptr %2, i64 0, i64 %28
  %30 = load i32, ptr %29, align 4, !tbaa !18
  %31 = zext i32 %30 to i64
  %32 = icmp eq i64 %indvars.iv40, %31
  br i1 %32, label %33, label %55

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

38:                                               ; preds = %33
  %39 = load ptr, ptr %3, align 8, !tbaa !19
  %40 = getelementptr inbounds ptr, ptr %39, i64 %indvars.iv40
  %41 = load ptr, ptr %40, align 8, !tbaa !5
  %42 = getelementptr inbounds ptr, ptr %41, i64 %indvars.iv
  %43 = load ptr, ptr %42, align 8, !tbaa !5
  %44 = icmp ne ptr %43, null
  %45 = zext i1 %44 to i32
  tail call void @CuAssert_Line(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 138, ptr noundef nonnull @.str.1, i32 noundef %45) #5
  %46 = add nsw i32 %.133, 1
  %47 = getelementptr inbounds i8, ptr %29, i64 8
  %48 = load i32, ptr %47, align 4, !tbaa !18
  %49 = load ptr, ptr %3, align 8, !tbaa !19
  %50 = getelementptr inbounds ptr, ptr %49, i64 %indvars.iv40
  %51 = load ptr, ptr %50, align 8, !tbaa !5
  %52 = getelementptr inbounds ptr, ptr %51, i64 %indvars.iv
  %53 = load ptr, ptr %52, align 8, !tbaa !5
  %54 = load i32, ptr %53, align 4, !tbaa !18
  tail call void @CuAssertIntEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 139, ptr noundef null, i32 noundef %48, i32 noundef %54) #5
  br label %61

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

61:                                               ; preds = %38, %55
  %.2 = phi i32 [ %46, %38 ], [ %.133, %55 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %62 = load i32, ptr %18, align 8, !tbaa !14
  %63 = sext i32 %62 to i64
  %64 = icmp slt i64 %indvars.iv.next, %63
  br i1 %64, label %.lr.ph, label %._crit_edge.loopexit, !llvm.loop !20
}

declare void @matrixRemove(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 = !{!13, !11, i64 8}
!13 = !{!"Matrix", !6, i64 0, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !6, i64 24, !6, i64 32}
!14 = !{!13, !11, i64 16}
!15 = distinct !{!15, !16, !17}
!16 = !{!"llvm.loop.mustprogress"}
!17 = !{!"llvm.loop.unswitch.partial.disable"}
!18 = !{!11, !11, i64 0}
!19 = !{!13, !6, i64 0}
!20 = distinct !{!20, !16}


; 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