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

@.str = external hidden unnamed_addr constant [151 x i8], align 1
@__const.generalMatrixTest.numbersStr = external hidden unnamed_addr constant [14 x [10 x i8]], align 16
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [5 x i8], align 1

; 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: nounwind uwtable
declare dso_local i32 @compareIntPointersMT(ptr noundef, ptr noundef) #1

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 @destroyMatrix(ptr noundef) #2

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

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

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

declare void @matrixAddRow(ptr noundef) #2

declare void @matrixAddCol(ptr noundef) #2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4

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

declare i32 @matrixGetNumberOfRows(ptr noundef) #2

declare i32 @matrixGetNumberOfCols(ptr noundef) #2

declare i32 @matrixGetSize(ptr noundef) #2

declare i32 @matrixIsEmpty(ptr noundef) #2

declare ptr @matrixToArray(ptr noundef) #2

declare void @clearMatrix(ptr noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local void @freeMatrixTestStruct(ptr noundef) #1

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

; Function Attrs: nounwind uwtable
define dso_local void @generalMatrixTest(ptr noundef %0) #1 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca [14 x [10 x i8]], align 16
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  %17 = call ptr @matrixInitialization(i32 noundef 2, i32 noundef 2, ptr noundef @freeMatrixTestStruct, ptr noundef @compareIntPointersMT)
  store ptr %17, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 140, ptr %4) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %4, ptr align 16 @__const.generalMatrixTest.numbersStr, i64 140, i1 false)
  %18 = load ptr, ptr %2, align 8, !tbaa !5
  %19 = load ptr, ptr %3, align 8, !tbaa !5
  %20 = call i32 @matrixGetNumberOfRows(ptr noundef %19)
  call void @CuAssertIntEquals_LineMsg(ptr noundef %18, ptr noundef @.str, i32 noundef 823, ptr noundef null, i32 noundef 2, i32 noundef %20)
  %21 = load ptr, ptr %2, align 8, !tbaa !5
  %22 = load ptr, ptr %3, align 8, !tbaa !5
  %23 = call i32 @matrixGetNumberOfCols(ptr noundef %22)
  call void @CuAssertIntEquals_LineMsg(ptr noundef %21, ptr noundef @.str, i32 noundef 824, ptr noundef null, i32 noundef 2, i32 noundef %23)
  %24 = load ptr, ptr %2, align 8, !tbaa !5
  %25 = load ptr, ptr %3, align 8, !tbaa !5
  %26 = call i32 @matrixGetSize(ptr noundef %25)
  call void @CuAssertIntEquals_LineMsg(ptr noundef %24, ptr noundef @.str, i32 noundef 825, ptr noundef null, i32 noundef 0, i32 noundef %26)
  %27 = load ptr, ptr %2, align 8, !tbaa !5
  %28 = load ptr, ptr %3, align 8, !tbaa !5
  %29 = call i32 @matrixIsEmpty(ptr noundef %28)
  call void @CuAssertIntEquals_LineMsg(ptr noundef %27, ptr noundef @.str, i32 noundef 826, ptr noundef null, i32 noundef 1, i32 noundef %29)
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  store i32 0, ptr %5, align 4, !tbaa !9
  br label %30

30:                                               ; preds = %60, %1
  %31 = load i32, ptr %5, align 4, !tbaa !9
  %32 = load ptr, ptr %3, align 8, !tbaa !5
  %33 = call i32 @matrixGetNumberOfRows(ptr noundef %32)
  %34 = icmp slt i32 %31, %33
  br i1 %34, label %36, label %35

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

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

37:                                               ; preds = %56, %36
  %38 = load i32, ptr %7, align 4, !tbaa !9
  %39 = load ptr, ptr %3, align 8, !tbaa !5
  %40 = call i32 @matrixGetNumberOfCols(ptr noundef %39)
  %41 = icmp slt i32 %38, %40
  br i1 %41, label %43, label %42

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

43:                                               ; preds = %37
  %44 = load ptr, ptr %2, align 8, !tbaa !5
  %45 = load ptr, ptr %3, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.Matrix, ptr %45, i32 0, i32 0
  %47 = load ptr, ptr %46, align 8, !tbaa !11
  %48 = load i32, ptr %5, align 4, !tbaa !9
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds ptr, ptr %47, i64 %49
  %51 = load ptr, ptr %50, align 8, !tbaa !5
  %52 = load i32, ptr %7, align 4, !tbaa !9
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds ptr, ptr %51, i64 %53
  %55 = load ptr, ptr %54, align 8, !tbaa !5
  call void @CuAssertPtrEquals_LineMsg(ptr noundef %44, ptr noundef @.str, i32 noundef 831, ptr noundef null, ptr noundef null, ptr noundef %55)
  br label %56

56:                                               ; preds = %43
  %57 = load i32, ptr %7, align 4, !tbaa !9
  %58 = add nsw i32 %57, 1
  store i32 %58, ptr %7, align 4, !tbaa !9
  br label %37, !llvm.loop !13

59:                                               ; preds = %42
  br label %60

60:                                               ; preds = %59
  %61 = load i32, ptr %5, align 4, !tbaa !9
  %62 = add nsw i32 %61, 1
  store i32 %62, ptr %5, align 4, !tbaa !9
  br label %30, !llvm.loop !15

63:                                               ; preds = %35
  %64 = load ptr, ptr %3, align 8, !tbaa !5
  %65 = getelementptr inbounds [14 x [10 x i8]], ptr %4, i64 0, i64 0
  %66 = getelementptr inbounds [10 x i8], ptr %65, i64 0, i64 0
  %67 = call ptr @generateMatrixTestStruct(i32 noundef 1, ptr noundef %66)
  call void @matrixInsert(ptr noundef %64, ptr noundef %67, i32 noundef 0, i32 noundef 0)
  %68 = load ptr, ptr %3, align 8, !tbaa !5
  %69 = getelementptr inbounds [14 x [10 x i8]], ptr %4, i64 0, i64 1
  %70 = getelementptr inbounds [10 x i8], ptr %69, i64 0, i64 0
  %71 = call ptr @generateMatrixTestStruct(i32 noundef 2, ptr noundef %70)
  call void @matrixInsert(ptr noundef %68, ptr noundef %71, i32 noundef 0, i32 noundef 1)
  %72 = load ptr, ptr %3, align 8, !tbaa !5
  %73 = getelementptr inbounds [14 x [10 x i8]], ptr %4, i64 0, i64 2
  %74 = getelementptr inbounds [10 x i8], ptr %73, i64 0, i64 0
  %75 = call ptr @generateMatrixTestStruct(i32 noundef 3, ptr noundef %74)
  call void @matrixInsert(ptr noundef %72, ptr noundef %75, i32 noundef 1, i32 noundef 0)
  %76 = load ptr, ptr %3, align 8, !tbaa !5
  %77 = getelementptr inbounds [14 x [10 x i8]], ptr %4, i64 0, i64 3
  %78 = getelementptr inbounds [10 x i8], ptr %77, i64 0, i64 0
  %79 = call ptr @generateMatrixTestStruct(i32 noundef 4, ptr noundef %78)
  call void @matrixInsert(ptr noundef %76, ptr noundef %79, i32 noundef 1, i32 noundef 1)
  %80 = load ptr, ptr %2, align 8, !tbaa !5
  %81 = load ptr, ptr %3, align 8, !tbaa !5
  %82 = call i32 @matrixGetSize(ptr noundef %81)
  call void @CuAssertIntEquals_LineMsg(ptr noundef %80, ptr noundef @.str, i32 noundef 840, ptr noundef null, i32 noundef 4, i32 noundef %82)
  %83 = load ptr, ptr %2, align 8, !tbaa !5
  %84 = load ptr, ptr %3, align 8, !tbaa !5
  %85 = call i32 @matrixIsEmpty(ptr noundef %84)
  call void @CuAssertIntEquals_LineMsg(ptr noundef %83, ptr noundef @.str, i32 noundef 841, ptr noundef null, i32 noundef 0, i32 noundef %85)
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  store i32 0, ptr %8, align 4, !tbaa !9
  br label %86

86:                                               ; preds = %133, %63
  %87 = load i32, ptr %8, align 4, !tbaa !9
  %88 = load ptr, ptr %3, align 8, !tbaa !5
  %89 = call i32 @matrixGetNumberOfRows(ptr noundef %88)
  %90 = icmp slt i32 %87, %89
  br i1 %90, label %92, label %91

91:                                               ; preds = %86
  store i32 8, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  br label %136

92:                                               ; preds = %86
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  %93 = load ptr, ptr %3, align 8, !tbaa !5
  %94 = call i32 @matrixGetNumberOfCols(ptr noundef %93)
  store i32 %94, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %95

95:                                               ; preds = %129, %92
  %96 = load i32, ptr %10, align 4, !tbaa !9
  %97 = load i32, ptr %9, align 4, !tbaa !9
  %98 = icmp slt i32 %96, %97
  br i1 %98, label %100, label %99

99:                                               ; preds = %95
  store i32 11, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %132

100:                                              ; preds = %95
  %101 = load ptr, ptr %2, align 8, !tbaa !5
  %102 = load i32, ptr %8, align 4, !tbaa !9
  %103 = load i32, ptr %9, align 4, !tbaa !9
  %104 = mul nsw i32 %102, %103
  %105 = load i32, ptr %10, align 4, !tbaa !9
  %106 = add nsw i32 %104, %105
  %107 = add nsw i32 %106, 1
  %108 = load ptr, ptr %3, align 8, !tbaa !5
  %109 = load i32, ptr %8, align 4, !tbaa !9
  %110 = load i32, ptr %10, align 4, !tbaa !9
  %111 = call ptr @matrixGet(ptr noundef %108, i32 noundef %109, i32 noundef %110)
  %112 = getelementptr inbounds %struct.MatrixTestStruct, ptr %111, i32 0, i32 0
  %113 = load i32, ptr %112, align 8, !tbaa !16
  call void @CuAssertIntEquals_LineMsg(ptr noundef %101, ptr noundef @.str, i32 noundef 847, ptr noundef null, i32 noundef %107, i32 noundef %113)
  %114 = load ptr, ptr %2, align 8, !tbaa !5
  %115 = load i32, ptr %8, align 4, !tbaa !9
  %116 = load i32, ptr %9, align 4, !tbaa !9
  %117 = mul nsw i32 %115, %116
  %118 = load i32, ptr %10, align 4, !tbaa !9
  %119 = add nsw i32 %117, %118
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds [14 x [10 x i8]], ptr %4, i64 0, i64 %120
  %122 = getelementptr inbounds [10 x i8], ptr %121, i64 0, i64 0
  %123 = load ptr, ptr %3, align 8, !tbaa !5
  %124 = load i32, ptr %8, align 4, !tbaa !9
  %125 = load i32, ptr %10, align 4, !tbaa !9
  %126 = call ptr @matrixGet(ptr noundef %123, i32 noundef %124, i32 noundef %125)
  %127 = getelementptr inbounds %struct.MatrixTestStruct, ptr %126, i32 0, i32 1
  %128 = load ptr, ptr %127, align 8, !tbaa !18
  call void @CuAssertStrEquals_LineMsg(ptr noundef %114, ptr noundef @.str, i32 noundef 849, ptr noundef null, ptr noundef %122, ptr noundef %128)
  br label %129

129:                                              ; preds = %100
  %130 = load i32, ptr %10, align 4, !tbaa !9
  %131 = add nsw i32 %130, 1
  store i32 %131, ptr %10, align 4, !tbaa !9
  br label %95, !llvm.loop !19

132:                                              ; preds = %99
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %133

133:                                              ; preds = %132
  %134 = load i32, ptr %8, align 4, !tbaa !9
  %135 = add nsw i32 %134, 1
  store i32 %135, ptr %8, align 4, !tbaa !9
  br label %86, !llvm.loop !20

136:                                              ; preds = %91
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %137 = call ptr @generateMatrixTestStruct(i32 noundef 5, ptr noundef @.str.2)
  store ptr %137, ptr %11, align 8, !tbaa !5
  %138 = load ptr, ptr %2, align 8, !tbaa !5
  %139 = load ptr, ptr %3, align 8, !tbaa !5
  %140 = load ptr, ptr %11, align 8, !tbaa !5
  %141 = call i32 @matrixContains(ptr noundef %139, ptr noundef %140)
  call void @CuAssertIntEquals_LineMsg(ptr noundef %138, ptr noundef @.str, i32 noundef 859, ptr noundef null, i32 noundef 0, i32 noundef %141)
  %142 = load ptr, ptr %11, align 8, !tbaa !5
  call void @freeMatrixTestStruct(ptr noundef %142)
  %143 = call ptr @generateMatrixTestStruct(i32 noundef 4, ptr noundef @.str.3)
  store ptr %143, ptr %11, align 8, !tbaa !5
  %144 = load ptr, ptr %2, align 8, !tbaa !5
  %145 = load ptr, ptr %3, align 8, !tbaa !5
  %146 = load ptr, ptr %11, align 8, !tbaa !5
  %147 = call i32 @matrixContains(ptr noundef %145, ptr noundef %146)
  call void @CuAssertIntEquals_LineMsg(ptr noundef %144, ptr noundef @.str, i32 noundef 863, ptr noundef null, i32 noundef 1, i32 noundef %147)
  %148 = load ptr, ptr %11, align 8, !tbaa !5
  call void @freeMatrixTestStruct(ptr noundef %148)
  %149 = load ptr, ptr %3, align 8, !tbaa !5
  call void @matrixRemoveRow(ptr noundef %149, i32 noundef 1)
  %150 = load ptr, ptr %2, align 8, !tbaa !5
  %151 = load ptr, ptr %3, align 8, !tbaa !5
  %152 = call i32 @matrixGetSize(ptr noundef %151)
  call void @CuAssertIntEquals_LineMsg(ptr noundef %150, ptr noundef @.str, i32 noundef 867, ptr noundef null, i32 noundef 2, i32 noundef %152)
  %153 = load ptr, ptr %3, align 8, !tbaa !5
  call void @matrixAddCol(ptr noundef %153)
  %154 = load ptr, ptr %3, align 8, !tbaa !5
  call void @matrixAddRow(ptr noundef %154)
  %155 = load ptr, ptr %3, align 8, !tbaa !5
  call void @matrixAddRow(ptr noundef %155)
  %156 = load ptr, ptr %3, align 8, !tbaa !5
  %157 = getelementptr inbounds [14 x [10 x i8]], ptr %4, i64 0, i64 2
  %158 = getelementptr inbounds [10 x i8], ptr %157, i64 0, i64 0
  %159 = call ptr @generateMatrixTestStruct(i32 noundef 3, ptr noundef %158)
  call void @matrixInsert(ptr noundef %156, ptr noundef %159, i32 noundef 0, i32 noundef 2)
  %160 = load ptr, ptr %3, align 8, !tbaa !5
  %161 = getelementptr inbounds [14 x [10 x i8]], ptr %4, i64 0, i64 3
  %162 = getelementptr inbounds [10 x i8], ptr %161, i64 0, i64 0
  %163 = call ptr @generateMatrixTestStruct(i32 noundef 4, ptr noundef %162)
  call void @matrixInsert(ptr noundef %160, ptr noundef %163, i32 noundef 1, i32 noundef 0)
  %164 = load ptr, ptr %3, align 8, !tbaa !5
  %165 = getelementptr inbounds [14 x [10 x i8]], ptr %4, i64 0, i64 4
  %166 = getelementptr inbounds [10 x i8], ptr %165, i64 0, i64 0
  %167 = call ptr @generateMatrixTestStruct(i32 noundef 5, ptr noundef %166)
  call void @matrixInsert(ptr noundef %164, ptr noundef %167, i32 noundef 1, i32 noundef 1)
  %168 = load ptr, ptr %3, align 8, !tbaa !5
  %169 = getelementptr inbounds [14 x [10 x i8]], ptr %4, i64 0, i64 5
  %170 = getelementptr inbounds [10 x i8], ptr %169, i64 0, i64 0
  %171 = call ptr @generateMatrixTestStruct(i32 noundef 6, ptr noundef %170)
  call void @matrixInsert(ptr noundef %168, ptr noundef %171, i32 noundef 1, i32 noundef 2)
  %172 = load ptr, ptr %3, align 8, !tbaa !5
  %173 = getelementptr inbounds [14 x [10 x i8]], ptr %4, i64 0, i64 6
  %174 = getelementptr inbounds [10 x i8], ptr %173, i64 0, i64 0
  %175 = call ptr @generateMatrixTestStruct(i32 noundef 7, ptr noundef %174)
  call void @matrixInsert(ptr noundef %172, ptr noundef %175, i32 noundef 2, i32 noundef 0)
  %176 = load ptr, ptr %3, align 8, !tbaa !5
  %177 = getelementptr inbounds [14 x [10 x i8]], ptr %4, i64 0, i64 7
  %178 = getelementptr inbounds [10 x i8], ptr %177, i64 0, i64 0
  %179 = call ptr @generateMatrixTestStruct(i32 noundef 8, ptr noundef %178)
  call void @matrixInsert(ptr noundef %176, ptr noundef %179, i32 noundef 2, i32 noundef 1)
  %180 = load ptr, ptr %3, align 8, !tbaa !5
  %181 = getelementptr inbounds [14 x [10 x i8]], ptr %4, i64 0, i64 8
  %182 = getelementptr inbounds [10 x i8], ptr %181, i64 0, i64 0
  %183 = call ptr @generateMatrixTestStruct(i32 noundef 9, ptr noundef %182)
  call void @matrixInsert(ptr noundef %180, ptr noundef %183, i32 noundef 2, i32 noundef 2)
  %184 = load ptr, ptr %2, align 8, !tbaa !5
  %185 = load ptr, ptr %3, align 8, !tbaa !5
  %186 = call i32 @matrixGetSize(ptr noundef %185)
  call void @CuAssertIntEquals_LineMsg(ptr noundef %184, ptr noundef @.str, i32 noundef 881, ptr noundef null, i32 noundef 9, i32 noundef %186)
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %187

187:                                              ; preds = %234, %136
  %188 = load i32, ptr %12, align 4, !tbaa !9
  %189 = load ptr, ptr %3, align 8, !tbaa !5
  %190 = call i32 @matrixGetNumberOfRows(ptr noundef %189)
  %191 = icmp slt i32 %188, %190
  br i1 %191, label %193, label %192

192:                                              ; preds = %187
  store i32 14, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %237

193:                                              ; preds = %187
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  %194 = load ptr, ptr %3, align 8, !tbaa !5
  %195 = call i32 @matrixGetNumberOfCols(ptr noundef %194)
  store i32 %195, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  store i32 0, ptr %14, align 4, !tbaa !9
  br label %196

196:                                              ; preds = %230, %193
  %197 = load i32, ptr %14, align 4, !tbaa !9
  %198 = load i32, ptr %13, align 4, !tbaa !9
  %199 = icmp slt i32 %197, %198
  br i1 %199, label %201, label %200

200:                                              ; preds = %196
  store i32 17, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  br label %233

201:                                              ; preds = %196
  %202 = load ptr, ptr %2, align 8, !tbaa !5
  %203 = load i32, ptr %12, align 4, !tbaa !9
  %204 = load i32, ptr %13, align 4, !tbaa !9
  %205 = mul nsw i32 %203, %204
  %206 = load i32, ptr %14, align 4, !tbaa !9
  %207 = add nsw i32 %205, %206
  %208 = add nsw i32 %207, 1
  %209 = load ptr, ptr %3, align 8, !tbaa !5
  %210 = load i32, ptr %12, align 4, !tbaa !9
  %211 = load i32, ptr %14, align 4, !tbaa !9
  %212 = call ptr @matrixGet(ptr noundef %209, i32 noundef %210, i32 noundef %211)
  %213 = getelementptr inbounds %struct.MatrixTestStruct, ptr %212, i32 0, i32 0
  %214 = load i32, ptr %213, align 8, !tbaa !16
  call void @CuAssertIntEquals_LineMsg(ptr noundef %202, ptr noundef @.str, i32 noundef 887, ptr noundef null, i32 noundef %208, i32 noundef %214)
  %215 = load ptr, ptr %2, align 8, !tbaa !5
  %216 = load i32, ptr %12, align 4, !tbaa !9
  %217 = load i32, ptr %13, align 4, !tbaa !9
  %218 = mul nsw i32 %216, %217
  %219 = load i32, ptr %14, align 4, !tbaa !9
  %220 = add nsw i32 %218, %219
  %221 = sext i32 %220 to i64
  %222 = getelementptr inbounds [14 x [10 x i8]], ptr %4, i64 0, i64 %221
  %223 = getelementptr inbounds [10 x i8], ptr %222, i64 0, i64 0
  %224 = load ptr, ptr %3, align 8, !tbaa !5
  %225 = load i32, ptr %12, align 4, !tbaa !9
  %226 = load i32, ptr %14, align 4, !tbaa !9
  %227 = call ptr @matrixGet(ptr noundef %224, i32 noundef %225, i32 noundef %226)
  %228 = getelementptr inbounds %struct.MatrixTestStruct, ptr %227, i32 0, i32 1
  %229 = load ptr, ptr %228, align 8, !tbaa !18
  call void @CuAssertStrEquals_LineMsg(ptr noundef %215, ptr noundef @.str, i32 noundef 889, ptr noundef null, ptr noundef %223, ptr noundef %229)
  br label %230

230:                                              ; preds = %201
  %231 = load i32, ptr %14, align 4, !tbaa !9
  %232 = add nsw i32 %231, 1
  store i32 %232, ptr %14, align 4, !tbaa !9
  br label %196, !llvm.loop !21

233:                                              ; preds = %200
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %234

234:                                              ; preds = %233
  %235 = load i32, ptr %12, align 4, !tbaa !9
  %236 = add nsw i32 %235, 1
  store i32 %236, ptr %12, align 4, !tbaa !9
  br label %187, !llvm.loop !22

237:                                              ; preds = %192
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %238 = load ptr, ptr %3, align 8, !tbaa !5
  %239 = call ptr @matrixToArray(ptr noundef %238)
  store ptr %239, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  store i32 0, ptr %16, align 4, !tbaa !9
  br label %240

240:                                              ; preds = %269, %237
  %241 = load i32, ptr %16, align 4, !tbaa !9
  %242 = load ptr, ptr %3, align 8, !tbaa !5
  %243 = call i32 @matrixGetSize(ptr noundef %242)
  %244 = icmp slt i32 %241, %243
  br i1 %244, label %246, label %245

245:                                              ; preds = %240
  store i32 20, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  br label %272

246:                                              ; preds = %240
  %247 = load ptr, ptr %2, align 8, !tbaa !5
  %248 = load i32, ptr %16, align 4, !tbaa !9
  %249 = add nsw i32 %248, 1
  %250 = load ptr, ptr %15, align 8, !tbaa !5
  %251 = load i32, ptr %16, align 4, !tbaa !9
  %252 = sext i32 %251 to i64
  %253 = getelementptr inbounds ptr, ptr %250, i64 %252
  %254 = load ptr, ptr %253, align 8, !tbaa !5
  %255 = getelementptr inbounds %struct.MatrixTestStruct, ptr %254, i32 0, i32 0
  %256 = load i32, ptr %255, align 8, !tbaa !16
  call void @CuAssertIntEquals_LineMsg(ptr noundef %247, ptr noundef @.str, i32 noundef 898, ptr noundef null, i32 noundef %249, i32 noundef %256)
  %257 = load ptr, ptr %2, align 8, !tbaa !5
  %258 = load i32, ptr %16, align 4, !tbaa !9
  %259 = sext i32 %258 to i64
  %260 = getelementptr inbounds [14 x [10 x i8]], ptr %4, i64 0, i64 %259
  %261 = getelementptr inbounds [10 x i8], ptr %260, i64 0, i64 0
  %262 = load ptr, ptr %15, align 8, !tbaa !5
  %263 = load i32, ptr %16, align 4, !tbaa !9
  %264 = sext i32 %263 to i64
  %265 = getelementptr inbounds ptr, ptr %262, i64 %264
  %266 = load ptr, ptr %265, align 8, !tbaa !5
  %267 = getelementptr inbounds %struct.MatrixTestStruct, ptr %266, i32 0, i32 1
  %268 = load ptr, ptr %267, align 8, !tbaa !18
  call void @CuAssertStrEquals_LineMsg(ptr noundef %257, ptr noundef @.str, i32 noundef 899, ptr noundef null, ptr noundef %261, ptr noundef %268)
  br label %269

269:                                              ; preds = %246
  %270 = load i32, ptr %16, align 4, !tbaa !9
  %271 = add nsw i32 %270, 1
  store i32 %271, ptr %16, align 4, !tbaa !9
  br label %240, !llvm.loop !23

272:                                              ; preds = %245
  %273 = load ptr, ptr %3, align 8, !tbaa !5
  call void @clearMatrix(ptr noundef %273)
  %274 = load ptr, ptr %2, align 8, !tbaa !5
  %275 = load ptr, ptr %3, align 8, !tbaa !5
  %276 = call i32 @matrixGetSize(ptr noundef %275)
  call void @CuAssertIntEquals_LineMsg(ptr noundef %274, ptr noundef @.str, i32 noundef 903, ptr noundef null, i32 noundef 0, i32 noundef %276)
  %277 = load ptr, ptr %2, align 8, !tbaa !5
  %278 = load ptr, ptr %3, align 8, !tbaa !5
  %279 = call i32 @matrixIsEmpty(ptr noundef %278)
  call void @CuAssertIntEquals_LineMsg(ptr noundef %277, ptr noundef @.str, i32 noundef 904, ptr noundef null, i32 noundef 1, i32 noundef %279)
  %280 = load ptr, ptr %15, align 8, !tbaa !5
  call void @free(ptr noundef %280) #5
  %281 = load ptr, ptr %3, align 8, !tbaa !5
  call void @destroyMatrix(ptr noundef %281)
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 140, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  ret void
}

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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: readwrite) }
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, !6, i64 0}
!12 = !{!"Matrix", !6, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !6, i64 24, !6, i64 32}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = !{!17, !10, i64 0}
!17 = !{!"MatrixTestStruct", !10, i64 0, !6, i64 8}
!18 = !{!17, !6, i64 8}
!19 = distinct !{!19, !14}
!20 = distinct !{!20, !14}
!21 = distinct !{!21, !14}
!22 = distinct !{!22, !14}
!23 = distinct !{!23, !14}


; 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
@__const.generalMatrixTest.numbersStr = external hidden unnamed_addr constant [14 x [10 x i8]], align 16
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [5 x i8], align 1

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

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

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

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) local_unnamed_addr #3

declare void @destroyMatrix(ptr noundef) local_unnamed_addr #2

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

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

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

declare void @matrixAddRow(ptr noundef) local_unnamed_addr #2

declare void @matrixAddCol(ptr noundef) local_unnamed_addr #2

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

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

declare i32 @matrixGetNumberOfRows(ptr noundef) local_unnamed_addr #2

declare i32 @matrixGetNumberOfCols(ptr noundef) local_unnamed_addr #2

declare i32 @matrixGetSize(ptr noundef) local_unnamed_addr #2

declare i32 @matrixIsEmpty(ptr noundef) local_unnamed_addr #2

declare ptr @matrixToArray(ptr noundef) local_unnamed_addr #2

declare void @clearMatrix(ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local void @freeMatrixTestStruct(ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local ptr @generateMatrixTestStruct(i32 noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local void @generalMatrixTest(ptr noundef %0) local_unnamed_addr #1 {
  %2 = alloca [14 x [10 x i8]], align 16
  %3 = tail call ptr @matrixInitialization(i32 noundef 2, i32 noundef 2, ptr noundef nonnull @freeMatrixTestStruct, ptr noundef nonnull @compareIntPointersMT) #5
  call void @llvm.lifetime.start.p0(i64 140, ptr nonnull %2) #5
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(140) %2, ptr noundef nonnull align 16 dereferenceable(140) @__const.generalMatrixTest.numbersStr, i64 140, i1 false)
  %4 = tail call i32 @matrixGetNumberOfRows(ptr noundef %3) #5
  tail call void @CuAssertIntEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 823, ptr noundef null, i32 noundef 2, i32 noundef %4) #5
  %5 = tail call i32 @matrixGetNumberOfCols(ptr noundef %3) #5
  tail call void @CuAssertIntEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 824, ptr noundef null, i32 noundef 2, i32 noundef %5) #5
  %6 = tail call i32 @matrixGetSize(ptr noundef %3) #5
  tail call void @CuAssertIntEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 825, ptr noundef null, i32 noundef 0, i32 noundef %6) #5
  %7 = tail call i32 @matrixIsEmpty(ptr noundef %3) #5
  tail call void @CuAssertIntEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 826, ptr noundef null, i32 noundef 1, i32 noundef %7) #5
  %8 = tail call i32 @matrixGetNumberOfRows(ptr noundef %3) #5
  %9 = icmp sgt i32 %8, 0
  br i1 %9, label %.preheader, label %._crit_edge119

.preheader:                                       ; preds = %1, %._crit_edge
  %indvars.iv141 = phi i64 [ %indvars.iv.next142, %._crit_edge ], [ 0, %1 ]
  %10 = tail call i32 @matrixGetNumberOfCols(ptr noundef %3) #5
  %11 = icmp sgt i32 %10, 0
  br i1 %11, label %.lr.ph, label %._crit_edge

._crit_edge119:                                   ; preds = %._crit_edge, %1
  %12 = call ptr @generateMatrixTestStruct(i32 noundef 1, ptr noundef nonnull %2)
  call void @matrixInsert(ptr noundef %3, ptr noundef %12, i32 noundef 0, i32 noundef 0) #5
  %13 = getelementptr inbounds i8, ptr %2, i64 10
  %14 = call ptr @generateMatrixTestStruct(i32 noundef 2, ptr noundef nonnull %13)
  call void @matrixInsert(ptr noundef %3, ptr noundef %14, i32 noundef 0, i32 noundef 1) #5
  %15 = getelementptr inbounds i8, ptr %2, i64 20
  %16 = call ptr @generateMatrixTestStruct(i32 noundef 3, ptr noundef nonnull %15)
  call void @matrixInsert(ptr noundef %3, ptr noundef %16, i32 noundef 1, i32 noundef 0) #5
  %17 = getelementptr inbounds i8, ptr %2, i64 30
  %18 = call ptr @generateMatrixTestStruct(i32 noundef 4, ptr noundef nonnull %17)
  call void @matrixInsert(ptr noundef %3, ptr noundef %18, i32 noundef 1, i32 noundef 1) #5
  %19 = call i32 @matrixGetSize(ptr noundef %3) #5
  call void @CuAssertIntEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 840, ptr noundef null, i32 noundef 4, i32 noundef %19) #5
  %20 = call i32 @matrixIsEmpty(ptr noundef %3) #5
  call void @CuAssertIntEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 841, ptr noundef null, i32 noundef 0, i32 noundef %20) #5
  %21 = call i32 @matrixGetNumberOfRows(ptr noundef %3) #5
  %22 = icmp sgt i32 %21, 0
  br i1 %22, label %.lr.ph126, label %._crit_edge127

._crit_edge:                                      ; preds = %.lr.ph, %.preheader
  %indvars.iv.next142 = add nuw nsw i64 %indvars.iv141, 1
  %23 = tail call i32 @matrixGetNumberOfRows(ptr noundef %3) #5
  %24 = sext i32 %23 to i64
  %25 = icmp slt i64 %indvars.iv.next142, %24
  br i1 %25, label %.preheader, label %._crit_edge119, !llvm.loop !5

.lr.ph:                                           ; preds = %.preheader, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %.preheader ]
  %26 = load ptr, ptr %3, align 8, !tbaa !7
  %27 = getelementptr inbounds ptr, ptr %26, i64 %indvars.iv141
  %28 = load ptr, ptr %27, align 8, !tbaa !13
  %29 = getelementptr inbounds ptr, ptr %28, i64 %indvars.iv
  %30 = load ptr, ptr %29, align 8, !tbaa !13
  tail call void @CuAssertPtrEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 831, ptr noundef null, ptr noundef null, ptr noundef %30) #5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %31 = tail call i32 @matrixGetNumberOfCols(ptr noundef nonnull %3) #5
  %32 = sext i32 %31 to i64
  %33 = icmp slt i64 %indvars.iv.next, %32
  br i1 %33, label %.lr.ph, label %._crit_edge, !llvm.loop !14

._crit_edge127:                                   ; preds = %._crit_edge123, %._crit_edge119
  %34 = call ptr @generateMatrixTestStruct(i32 noundef 5, ptr noundef nonnull @.str.2)
  %35 = call i32 @matrixContains(ptr noundef %3, ptr noundef %34) #5
  call void @CuAssertIntEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 859, ptr noundef null, i32 noundef 0, i32 noundef %35) #5
  call void @freeMatrixTestStruct(ptr noundef %34)
  %36 = call ptr @generateMatrixTestStruct(i32 noundef 4, ptr noundef nonnull @.str.3)
  %37 = call i32 @matrixContains(ptr noundef %3, ptr noundef %36) #5
  call void @CuAssertIntEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 863, ptr noundef null, i32 noundef 1, i32 noundef %37) #5
  call void @freeMatrixTestStruct(ptr noundef %36)
  call void @matrixRemoveRow(ptr noundef %3, i32 noundef 1) #5
  %38 = call i32 @matrixGetSize(ptr noundef %3) #5
  call void @CuAssertIntEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 867, ptr noundef null, i32 noundef 2, i32 noundef %38) #5
  call void @matrixAddCol(ptr noundef %3) #5
  call void @matrixAddRow(ptr noundef %3) #5
  call void @matrixAddRow(ptr noundef %3) #5
  %39 = call ptr @generateMatrixTestStruct(i32 noundef 3, ptr noundef nonnull %15)
  call void @matrixInsert(ptr noundef %3, ptr noundef %39, i32 noundef 0, i32 noundef 2) #5
  %40 = call ptr @generateMatrixTestStruct(i32 noundef 4, ptr noundef nonnull %17)
  call void @matrixInsert(ptr noundef %3, ptr noundef %40, i32 noundef 1, i32 noundef 0) #5
  %41 = getelementptr inbounds i8, ptr %2, i64 40
  %42 = call ptr @generateMatrixTestStruct(i32 noundef 5, ptr noundef nonnull %41)
  call void @matrixInsert(ptr noundef %3, ptr noundef %42, i32 noundef 1, i32 noundef 1) #5
  %43 = getelementptr inbounds i8, ptr %2, i64 50
  %44 = call ptr @generateMatrixTestStruct(i32 noundef 6, ptr noundef nonnull %43)
  call void @matrixInsert(ptr noundef %3, ptr noundef %44, i32 noundef 1, i32 noundef 2) #5
  %45 = getelementptr inbounds i8, ptr %2, i64 60
  %46 = call ptr @generateMatrixTestStruct(i32 noundef 7, ptr noundef nonnull %45)
  call void @matrixInsert(ptr noundef %3, ptr noundef %46, i32 noundef 2, i32 noundef 0) #5
  %47 = getelementptr inbounds i8, ptr %2, i64 70
  %48 = call ptr @generateMatrixTestStruct(i32 noundef 8, ptr noundef nonnull %47)
  call void @matrixInsert(ptr noundef %3, ptr noundef %48, i32 noundef 2, i32 noundef 1) #5
  %49 = getelementptr inbounds i8, ptr %2, i64 80
  %50 = call ptr @generateMatrixTestStruct(i32 noundef 9, ptr noundef nonnull %49)
  call void @matrixInsert(ptr noundef %3, ptr noundef %50, i32 noundef 2, i32 noundef 2) #5
  %51 = call i32 @matrixGetSize(ptr noundef %3) #5
  call void @CuAssertIntEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 881, ptr noundef null, i32 noundef 9, i32 noundef %51) #5
  %52 = call i32 @matrixGetNumberOfRows(ptr noundef %3) #5
  %53 = icmp sgt i32 %52, 0
  br i1 %53, label %.lr.ph134, label %._crit_edge135

.lr.ph126:                                        ; preds = %._crit_edge119, %._crit_edge123
  %.0114124 = phi i32 [ %58, %._crit_edge123 ], [ 0, %._crit_edge119 ]
  %54 = call i32 @matrixGetNumberOfCols(ptr noundef %3) #5
  %55 = icmp sgt i32 %54, 0
  br i1 %55, label %.lr.ph122, label %._crit_edge123

.lr.ph122:                                        ; preds = %.lr.ph126
  %56 = mul nuw nsw i32 %54, %.0114124
  %57 = zext nneg i32 %56 to i64
  %wide.trip.count = zext nneg i32 %54 to i64
  br label %61

._crit_edge123:                                   ; preds = %61, %.lr.ph126
  %58 = add nuw nsw i32 %.0114124, 1
  %59 = call i32 @matrixGetNumberOfRows(ptr noundef %3) #5
  %60 = icmp slt i32 %58, %59
  br i1 %60, label %.lr.ph126, label %._crit_edge127, !llvm.loop !15

61:                                               ; preds = %.lr.ph122, %61
  %indvars.iv144 = phi i64 [ 0, %.lr.ph122 ], [ %indvars.iv.next145, %61 ]
  %62 = add nuw nsw i64 %indvars.iv144, %57
  %63 = trunc nuw nsw i64 %indvars.iv144 to i32
  %64 = call ptr @matrixGet(ptr noundef %3, i32 noundef %.0114124, i32 noundef %63) #5
  %65 = load i32, ptr %64, align 8, !tbaa !16
  %66 = trunc i64 %62 to i32
  %67 = add i32 %66, 1
  call void @CuAssertIntEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 847, ptr noundef null, i32 noundef %67, i32 noundef %65) #5
  %68 = getelementptr inbounds [14 x [10 x i8]], ptr %2, i64 0, i64 %62
  %69 = call ptr @matrixGet(ptr noundef %3, i32 noundef %.0114124, i32 noundef %63) #5
  %70 = getelementptr inbounds i8, ptr %69, i64 8
  %71 = load ptr, ptr %70, align 8, !tbaa !18
  call void @CuAssertStrEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 849, ptr noundef null, ptr noundef nonnull %68, ptr noundef %71) #5
  %indvars.iv.next145 = add nuw nsw i64 %indvars.iv144, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next145, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge123, label %61, !llvm.loop !19

._crit_edge135:                                   ; preds = %._crit_edge131, %._crit_edge127
  %72 = call ptr @matrixToArray(ptr noundef %3) #5
  %73 = call i32 @matrixGetSize(ptr noundef %3) #5
  %74 = icmp sgt i32 %73, 0
  br i1 %74, label %.lr.ph138, label %._crit_edge139

.lr.ph134:                                        ; preds = %._crit_edge127, %._crit_edge131
  %.0111132 = phi i32 [ %79, %._crit_edge131 ], [ 0, %._crit_edge127 ]
  %75 = call i32 @matrixGetNumberOfCols(ptr noundef %3) #5
  %76 = icmp sgt i32 %75, 0
  br i1 %76, label %.lr.ph130, label %._crit_edge131

.lr.ph130:                                        ; preds = %.lr.ph134
  %77 = mul nuw nsw i32 %75, %.0111132
  %78 = zext nneg i32 %77 to i64
  %wide.trip.count150 = zext nneg i32 %75 to i64
  br label %82

._crit_edge131:                                   ; preds = %82, %.lr.ph134
  %79 = add nuw nsw i32 %.0111132, 1
  %80 = call i32 @matrixGetNumberOfRows(ptr noundef %3) #5
  %81 = icmp slt i32 %79, %80
  br i1 %81, label %.lr.ph134, label %._crit_edge135, !llvm.loop !20

82:                                               ; preds = %.lr.ph130, %82
  %indvars.iv147 = phi i64 [ 0, %.lr.ph130 ], [ %indvars.iv.next148, %82 ]
  %83 = add nuw nsw i64 %indvars.iv147, %78
  %84 = trunc nuw nsw i64 %indvars.iv147 to i32
  %85 = call ptr @matrixGet(ptr noundef %3, i32 noundef %.0111132, i32 noundef %84) #5
  %86 = load i32, ptr %85, align 8, !tbaa !16
  %87 = trunc i64 %83 to i32
  %88 = add i32 %87, 1
  call void @CuAssertIntEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 887, ptr noundef null, i32 noundef %88, i32 noundef %86) #5
  %89 = getelementptr inbounds [14 x [10 x i8]], ptr %2, i64 0, i64 %83
  %90 = call ptr @matrixGet(ptr noundef %3, i32 noundef %.0111132, i32 noundef %84) #5
  %91 = getelementptr inbounds i8, ptr %90, i64 8
  %92 = load ptr, ptr %91, align 8, !tbaa !18
  call void @CuAssertStrEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 889, ptr noundef null, ptr noundef nonnull %89, ptr noundef %92) #5
  %indvars.iv.next148 = add nuw nsw i64 %indvars.iv147, 1
  %exitcond151.not = icmp eq i64 %indvars.iv.next148, %wide.trip.count150
  br i1 %exitcond151.not, label %._crit_edge131, label %82, !llvm.loop !21

._crit_edge139:                                   ; preds = %.lr.ph138, %._crit_edge135
  call void @clearMatrix(ptr noundef %3) #5
  %93 = call i32 @matrixGetSize(ptr noundef %3) #5
  call void @CuAssertIntEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 903, ptr noundef null, i32 noundef 0, i32 noundef %93) #5
  %94 = call i32 @matrixIsEmpty(ptr noundef %3) #5
  call void @CuAssertIntEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 904, ptr noundef null, i32 noundef 1, i32 noundef %94) #5
  call void @free(ptr noundef %72) #5
  call void @destroyMatrix(ptr noundef %3) #5
  call void @llvm.lifetime.end.p0(i64 140, ptr nonnull %2) #5
  ret void

.lr.ph138:                                        ; preds = %._crit_edge135, %.lr.ph138
  %indvars.iv152 = phi i64 [ %indvars.iv.next153, %.lr.ph138 ], [ 0, %._crit_edge135 ]
  %indvars.iv.next153 = add nuw nsw i64 %indvars.iv152, 1
  %95 = getelementptr inbounds ptr, ptr %72, i64 %indvars.iv152
  %96 = load ptr, ptr %95, align 8, !tbaa !13
  %97 = load i32, ptr %96, align 8, !tbaa !16
  %98 = trunc nuw nsw i64 %indvars.iv.next153 to i32
  call void @CuAssertIntEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 898, ptr noundef null, i32 noundef %98, i32 noundef %97) #5
  %99 = getelementptr inbounds [14 x [10 x i8]], ptr %2, i64 0, i64 %indvars.iv152
  %100 = load ptr, ptr %95, align 8, !tbaa !13
  %101 = getelementptr inbounds i8, ptr %100, i64 8
  %102 = load ptr, ptr %101, align 8, !tbaa !18
  call void @CuAssertStrEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 899, ptr noundef null, ptr noundef nonnull %99, ptr noundef %102) #5
  %103 = call i32 @matrixGetSize(ptr noundef %3) #5
  %104 = sext i32 %103 to i64
  %105 = icmp slt i64 %indvars.iv.next153, %104
  br i1 %105, label %.lr.ph138, label %._crit_edge139, !llvm.loop !22
}

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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: readwrite) }
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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = !{!8, !9, i64 0}
!8 = !{!"Matrix", !9, i64 0, !12, i64 8, !12, i64 12, !12, i64 16, !12, i64 20, !9, i64 24, !9, i64 32}
!9 = !{!"any pointer", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C/C++ TBAA"}
!12 = !{!"int", !10, i64 0}
!13 = !{!9, !9, i64 0}
!14 = distinct !{!14, !6}
!15 = distinct !{!15, !6}
!16 = !{!17, !12, i64 0}
!17 = !{!"MatrixTestStruct", !12, i64 0, !9, i64 8}
!18 = !{!17, !9, i64 8}
!19 = distinct !{!19, !6}
!20 = distinct !{!20, !6}
!21 = distinct !{!21, !6}
!22 = distinct !{!22, !6}


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