; LLVM IR from sgtlaugh/algovault :: code_library (freivalds_algorithm)

; 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 { i32, i32, [101 x [101 x i64]] }

@.str = external hidden unnamed_addr constant [16 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [89 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [11 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [17 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z6verify6MatrixS_S_i(ptr noundef byval(%struct.Matrix) align 8, ptr noundef byval(%struct.Matrix) align 8, ptr noundef byval(%struct.Matrix) align 8, 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: mustprogress uwtable
declare dso_local void @_ZN6MatrixC2Eiii(ptr noundef nonnull align 8 dereferenceable(81616), i32 noundef, i32 noundef, i32 noundef) unnamed_addr #0 align 2

; Function Attrs: nounwind
declare i32 @rand() #2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK6MatrixmlERKS_(ptr dead_on_unwind noalias writable sret(%struct.Matrix) align 8, ptr noundef nonnull align 8 dereferenceable(81616), ptr noundef nonnull align 8 dereferenceable(81616)) #0 align 2

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #3 {
  %1 = alloca i32, align 4
  %2 = alloca %struct.Matrix, align 8
  %3 = alloca %struct.Matrix, align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca %struct.Matrix, align 8
  %10 = alloca %struct.Matrix, align 8
  %11 = alloca %struct.Matrix, align 8
  %12 = alloca %struct.Matrix, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca %struct.Matrix, align 8
  %16 = alloca %struct.Matrix, align 8
  %17 = alloca %struct.Matrix, align 8
  %18 = alloca %struct.Matrix, align 8
  %19 = alloca %struct.Matrix, align 8
  %20 = alloca %struct.Matrix, align 8
  store i32 0, ptr %1, align 4
  call void @srand(i32 noundef 0) #6
  call void @llvm.lifetime.start.p0(i64 81616, ptr %2) #6
  call void @_ZN6MatrixC2Eiii(ptr noundef nonnull align 8 dereferenceable(81616) %2, i32 noundef 2, i32 noundef 3, i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 81616, ptr %3) #6
  call void @_ZN6MatrixC2Eiii(ptr noundef nonnull align 8 dereferenceable(81616) %3, i32 noundef 3, i32 noundef 4, i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  store i32 0, ptr %4, align 4, !tbaa !5
  br label %21

21:                                               ; preds = %50, %0
  %22 = load i32, ptr %4, align 4, !tbaa !5
  %23 = getelementptr inbounds %struct.Matrix, ptr %2, i32 0, i32 0
  %24 = load i32, ptr %23, align 8, !tbaa !9
  %25 = icmp slt i32 %22, %24
  br i1 %25, label %27, label %26

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

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

28:                                               ; preds = %46, %27
  %29 = load i32, ptr %6, align 4, !tbaa !5
  %30 = getelementptr inbounds %struct.Matrix, ptr %2, i32 0, i32 1
  %31 = load i32, ptr %30, align 4, !tbaa !11
  %32 = icmp slt i32 %29, %31
  br i1 %32, label %34, label %33

33:                                               ; preds = %28
  store i32 5, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %49

34:                                               ; preds = %28
  %35 = call i32 @rand() #6
  %36 = srem i32 %35, 6
  %37 = sub nsw i32 %36, 3
  %38 = sext i32 %37 to i64
  %39 = getelementptr inbounds %struct.Matrix, ptr %2, i32 0, i32 2
  %40 = load i32, ptr %4, align 4, !tbaa !5
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds [101 x [101 x i64]], ptr %39, i64 0, i64 %41
  %43 = load i32, ptr %6, align 4, !tbaa !5
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds [101 x i64], ptr %42, i64 0, i64 %44
  store i64 %38, ptr %45, align 8, !tbaa !12
  br label %46

46:                                               ; preds = %34
  %47 = load i32, ptr %6, align 4, !tbaa !5
  %48 = add nsw i32 %47, 1
  store i32 %48, ptr %6, align 4, !tbaa !5
  br label %28, !llvm.loop !14

49:                                               ; preds = %33
  br label %50

50:                                               ; preds = %49
  %51 = load i32, ptr %4, align 4, !tbaa !5
  %52 = add nsw i32 %51, 1
  store i32 %52, ptr %4, align 4, !tbaa !5
  br label %21, !llvm.loop !16

53:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %54

54:                                               ; preds = %83, %53
  %55 = load i32, ptr %7, align 4, !tbaa !5
  %56 = getelementptr inbounds %struct.Matrix, ptr %3, i32 0, i32 0
  %57 = load i32, ptr %56, align 8, !tbaa !9
  %58 = icmp slt i32 %55, %57
  br i1 %58, label %60, label %59

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

60:                                               ; preds = %54
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  store i32 0, ptr %8, align 4, !tbaa !5
  br label %61

61:                                               ; preds = %79, %60
  %62 = load i32, ptr %8, align 4, !tbaa !5
  %63 = getelementptr inbounds %struct.Matrix, ptr %3, i32 0, i32 1
  %64 = load i32, ptr %63, align 4, !tbaa !11
  %65 = icmp slt i32 %62, %64
  br i1 %65, label %67, label %66

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

67:                                               ; preds = %61
  %68 = call i32 @rand() #6
  %69 = srem i32 %68, 6
  %70 = sub nsw i32 %69, 3
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds %struct.Matrix, ptr %3, i32 0, i32 2
  %73 = load i32, ptr %7, align 4, !tbaa !5
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds [101 x [101 x i64]], ptr %72, i64 0, i64 %74
  %76 = load i32, ptr %8, align 4, !tbaa !5
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds [101 x i64], ptr %75, i64 0, i64 %77
  store i64 %71, ptr %78, align 8, !tbaa !12
  br label %79

79:                                               ; preds = %67
  %80 = load i32, ptr %8, align 4, !tbaa !5
  %81 = add nsw i32 %80, 1
  store i32 %81, ptr %8, align 4, !tbaa !5
  br label %61, !llvm.loop !17

82:                                               ; preds = %66
  br label %83

83:                                               ; preds = %82
  %84 = load i32, ptr %7, align 4, !tbaa !5
  %85 = add nsw i32 %84, 1
  store i32 %85, ptr %7, align 4, !tbaa !5
  br label %54, !llvm.loop !18

86:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 81616, ptr %9) #6
  call void @_ZNK6MatrixmlERKS_(ptr dead_on_unwind writable sret(%struct.Matrix) align 8 %9, ptr noundef nonnull align 8 dereferenceable(81616) %2, ptr noundef nonnull align 8 dereferenceable(81616) %3)
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %10, ptr align 8 %2, i64 81616, i1 false), !tbaa.struct !19
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %11, ptr align 8 %3, i64 81616, i1 false), !tbaa.struct !19
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %12, ptr align 8 %9, i64 81616, i1 false), !tbaa.struct !19
  %87 = call noundef zeroext i1 @_Z6verify6MatrixS_S_i(ptr noundef byval(%struct.Matrix) align 8 %10, ptr noundef byval(%struct.Matrix) align 8 %11, ptr noundef byval(%struct.Matrix) align 8 %12, i32 noundef 30)
  br i1 %87, label %88, label %89

88:                                               ; preds = %86
  br label %91

89:                                               ; preds = %86
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 88, ptr noundef @__PRETTY_FUNCTION__.main) #7
  unreachable

90:                                               ; No predecessors!
  br label %91

91:                                               ; preds = %90, %88
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  store i32 0, ptr %13, align 4, !tbaa !5
  br label %92

92:                                               ; preds = %149, %91
  %93 = load i32, ptr %13, align 4, !tbaa !5
  %94 = getelementptr inbounds %struct.Matrix, ptr %9, i32 0, i32 0
  %95 = load i32, ptr %94, align 8, !tbaa !9
  %96 = icmp slt i32 %93, %95
  br i1 %96, label %98, label %97

97:                                               ; preds = %92
  store i32 14, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %152

98:                                               ; preds = %92
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  store i32 0, ptr %14, align 4, !tbaa !5
  br label %99

99:                                               ; preds = %145, %98
  %100 = load i32, ptr %14, align 4, !tbaa !5
  %101 = getelementptr inbounds %struct.Matrix, ptr %9, i32 0, i32 1
  %102 = load i32, ptr %101, align 4, !tbaa !11
  %103 = icmp slt i32 %100, %102
  br i1 %103, label %105, label %104

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

105:                                              ; preds = %99
  %106 = getelementptr inbounds %struct.Matrix, ptr %9, i32 0, i32 2
  %107 = load i32, ptr %13, align 4, !tbaa !5
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds [101 x [101 x i64]], ptr %106, i64 0, i64 %108
  %110 = load i32, ptr %14, align 4, !tbaa !5
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds [101 x i64], ptr %109, i64 0, i64 %111
  %113 = load i64, ptr %112, align 8, !tbaa !12
  %114 = add nsw i64 %113, -1
  store i64 %114, ptr %112, align 8, !tbaa !12
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %15, ptr align 8 %2, i64 81616, i1 false), !tbaa.struct !19
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %16, ptr align 8 %3, i64 81616, i1 false), !tbaa.struct !19
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %17, ptr align 8 %9, i64 81616, i1 false), !tbaa.struct !19
  %115 = call noundef zeroext i1 @_Z6verify6MatrixS_S_i(ptr noundef byval(%struct.Matrix) align 8 %15, ptr noundef byval(%struct.Matrix) align 8 %16, ptr noundef byval(%struct.Matrix) align 8 %17, i32 noundef 30)
  %116 = xor i1 %115, true
  br i1 %116, label %117, label %118

117:                                              ; preds = %105
  br label %120

118:                                              ; preds = %105
  call void @__assert_fail(ptr noundef @.str.2, ptr noundef @.str.1, i32 noundef 93, ptr noundef @__PRETTY_FUNCTION__.main) #7
  unreachable

119:                                              ; No predecessors!
  br label %120

120:                                              ; preds = %119, %117
  %121 = getelementptr inbounds %struct.Matrix, ptr %9, i32 0, i32 2
  %122 = load i32, ptr %13, align 4, !tbaa !5
  %123 = sext i32 %122 to i64
  %124 = getelementptr inbounds [101 x [101 x i64]], ptr %121, i64 0, i64 %123
  %125 = load i32, ptr %14, align 4, !tbaa !5
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds [101 x i64], ptr %124, i64 0, i64 %126
  %128 = load i64, ptr %127, align 8, !tbaa !12
  %129 = add nsw i64 %128, 2
  store i64 %129, ptr %127, align 8, !tbaa !12
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %18, ptr align 8 %2, i64 81616, i1 false), !tbaa.struct !19
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %19, ptr align 8 %3, i64 81616, i1 false), !tbaa.struct !19
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %20, ptr align 8 %9, i64 81616, i1 false), !tbaa.struct !19
  %130 = call noundef zeroext i1 @_Z6verify6MatrixS_S_i(ptr noundef byval(%struct.Matrix) align 8 %18, ptr noundef byval(%struct.Matrix) align 8 %19, ptr noundef byval(%struct.Matrix) align 8 %20, i32 noundef 30)
  %131 = xor i1 %130, true
  br i1 %131, label %132, label %133

132:                                              ; preds = %120
  br label %135

133:                                              ; preds = %120
  call void @__assert_fail(ptr noundef @.str.2, ptr noundef @.str.1, i32 noundef 95, ptr noundef @__PRETTY_FUNCTION__.main) #7
  unreachable

134:                                              ; No predecessors!
  br label %135

135:                                              ; preds = %134, %132
  %136 = getelementptr inbounds %struct.Matrix, ptr %9, i32 0, i32 2
  %137 = load i32, ptr %13, align 4, !tbaa !5
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds [101 x [101 x i64]], ptr %136, i64 0, i64 %138
  %140 = load i32, ptr %14, align 4, !tbaa !5
  %141 = sext i32 %140 to i64
  %142 = getelementptr inbounds [101 x i64], ptr %139, i64 0, i64 %141
  %143 = load i64, ptr %142, align 8, !tbaa !12
  %144 = add nsw i64 %143, -1
  store i64 %144, ptr %142, align 8, !tbaa !12
  br label %145

145:                                              ; preds = %135
  %146 = load i32, ptr %14, align 4, !tbaa !5
  %147 = add nsw i32 %146, 1
  store i32 %147, ptr %14, align 4, !tbaa !5
  br label %99, !llvm.loop !21

148:                                              ; preds = %104
  br label %149

149:                                              ; preds = %148
  %150 = load i32, ptr %13, align 4, !tbaa !5
  %151 = add nsw i32 %150, 1
  store i32 %151, ptr %13, align 4, !tbaa !5
  br label %92, !llvm.loop !22

152:                                              ; preds = %97
  store i32 0, ptr %1, align 4
  store i32 1, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 81616, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 81616, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 81616, ptr %2) #6
  %153 = load i32, ptr %1, align 4
  ret i32 %153
}

; Function Attrs: nounwind
declare void @srand(i32 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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #5

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { mustprogress norecurse 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 #4 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { noreturn 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 #6 = { nounwind }
attributes #7 = { noreturn 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 0}
!10 = !{!"_ZTS6Matrix", !6, i64 0, !6, i64 4, !7, i64 8}
!11 = !{!10, !6, i64 4}
!12 = !{!13, !13, i64 0}
!13 = !{!"long long", !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}
!17 = distinct !{!17, !15}
!18 = distinct !{!18, !15}
!19 = !{i64 0, i64 4, !5, i64 4, i64 4, !5, i64 8, i64 81608, !20}
!20 = !{!7, !7, i64 0}
!21 = distinct !{!21, !15}
!22 = distinct !{!22, !15}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.Matrix = type { i32, i32, [101 x [101 x i64]] }

@.str = external hidden unnamed_addr constant [16 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [89 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [11 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [17 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z6verify6MatrixS_S_i(ptr noundef byval(%struct.Matrix) align 8, ptr noundef byval(%struct.Matrix) align 8, ptr noundef byval(%struct.Matrix) align 8, 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 uwtable
declare dso_local void @_ZN6MatrixC2Eiii(ptr noundef nonnull align 8 dereferenceable(81616), i32 noundef, i32 noundef, i32 noundef) unnamed_addr #0 align 2

; Function Attrs: nounwind
declare i32 @rand() local_unnamed_addr #2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK6MatrixmlERKS_(ptr dead_on_unwind noalias writable sret(%struct.Matrix) align 8, ptr noundef nonnull align 8 dereferenceable(81616), ptr noundef nonnull align 8 dereferenceable(81616)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #3 {
  %1 = alloca %struct.Matrix, align 8
  %2 = alloca %struct.Matrix, align 8
  %3 = alloca %struct.Matrix, align 8
  tail call void @srand(i32 noundef 0) #5
  call void @llvm.lifetime.start.p0(i64 81616, ptr nonnull %1) #5
  call void @_ZN6MatrixC2Eiii(ptr noundef nonnull align 8 dereferenceable(81616) %1, i32 noundef 2, i32 noundef 3, i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 81616, ptr nonnull %2) #5
  call void @_ZN6MatrixC2Eiii(ptr noundef nonnull align 8 dereferenceable(81616) %2, i32 noundef 3, i32 noundef 4, i32 noundef 0)
  %4 = load i32, ptr %1, align 8, !tbaa !5
  %5 = icmp sgt i32 %4, 0
  br i1 %5, label %.preheader31.lr.ph, label %.preheader30

.preheader31.lr.ph:                               ; preds = %0
  %6 = getelementptr inbounds i8, ptr %1, i64 4
  %7 = getelementptr inbounds i8, ptr %1, i64 8
  %8 = load i32, ptr %6, align 4, !tbaa !10
  %9 = icmp sgt i32 %8, 0
  br i1 %9, label %.preheader31, label %.preheader30

.preheader31:                                     ; preds = %.preheader31.lr.ph, %._crit_edge
  %10 = phi i32 [ %19, %._crit_edge ], [ %4, %.preheader31.lr.ph ]
  %11 = phi i32 [ %20, %._crit_edge ], [ %8, %.preheader31.lr.ph ]
  %indvars.iv48 = phi i64 [ %indvars.iv.next49, %._crit_edge ], [ 0, %.preheader31.lr.ph ]
  %12 = icmp sgt i32 %11, 0
  br i1 %12, label %.lr.ph, label %._crit_edge

.preheader30:                                     ; preds = %._crit_edge, %.preheader31.lr.ph, %0
  %13 = load i32, ptr %2, align 8, !tbaa !5
  %14 = icmp sgt i32 %13, 0
  br i1 %14, label %.preheader29.lr.ph, label %._crit_edge38

.preheader29.lr.ph:                               ; preds = %.preheader30
  %15 = getelementptr inbounds i8, ptr %2, i64 4
  %16 = getelementptr inbounds i8, ptr %2, i64 8
  %17 = load i32, ptr %15, align 4, !tbaa !10
  %18 = icmp sgt i32 %17, 0
  br i1 %18, label %.preheader29, label %._crit_edge38

._crit_edge.loopexit:                             ; preds = %.lr.ph
  %.pre = load i32, ptr %1, align 8, !tbaa !5
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.preheader31
  %19 = phi i32 [ %.pre, %._crit_edge.loopexit ], [ %10, %.preheader31 ]
  %20 = phi i32 [ %28, %._crit_edge.loopexit ], [ %11, %.preheader31 ]
  %indvars.iv.next49 = add nuw nsw i64 %indvars.iv48, 1
  %21 = sext i32 %19 to i64
  %22 = icmp slt i64 %indvars.iv.next49, %21
  br i1 %22, label %.preheader31, label %.preheader30, !llvm.loop !11

.lr.ph:                                           ; preds = %.preheader31, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %.preheader31 ]
  %23 = call i32 @rand() #5
  %24 = srem i32 %23, 6
  %25 = add nsw i32 %24, -3
  %26 = sext i32 %25 to i64
  %27 = getelementptr inbounds [101 x [101 x i64]], ptr %7, i64 0, i64 %indvars.iv48, i64 %indvars.iv
  store i64 %26, ptr %27, align 8, !tbaa !14
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %28 = load i32, ptr %6, align 4, !tbaa !10
  %29 = sext i32 %28 to i64
  %30 = icmp slt i64 %indvars.iv.next, %29
  br i1 %30, label %.lr.ph, label %._crit_edge.loopexit, !llvm.loop !16

.preheader29:                                     ; preds = %.preheader29.lr.ph, %._crit_edge36
  %31 = phi i32 [ %41, %._crit_edge36 ], [ %13, %.preheader29.lr.ph ]
  %32 = phi i32 [ %42, %._crit_edge36 ], [ %17, %.preheader29.lr.ph ]
  %indvars.iv54 = phi i64 [ %indvars.iv.next55, %._crit_edge36 ], [ 0, %.preheader29.lr.ph ]
  %33 = icmp sgt i32 %32, 0
  br i1 %33, label %.lr.ph35, label %._crit_edge36

._crit_edge38:                                    ; preds = %._crit_edge36, %.preheader29.lr.ph, %.preheader30
  call void @llvm.lifetime.start.p0(i64 81616, ptr nonnull %3) #5
  call void @_ZNK6MatrixmlERKS_(ptr dead_on_unwind nonnull writable sret(%struct.Matrix) align 8 %3, ptr noundef nonnull align 8 dereferenceable(81616) %1, ptr noundef nonnull align 8 dereferenceable(81616) %2)
  %34 = call noundef zeroext i1 @_Z6verify6MatrixS_S_i(ptr noundef nonnull byval(%struct.Matrix) align 8 %1, ptr noundef nonnull byval(%struct.Matrix) align 8 %2, ptr noundef nonnull byval(%struct.Matrix) align 8 %3, i32 noundef 30)
  br i1 %34, label %.preheader28, label %53

.preheader28:                                     ; preds = %._crit_edge38
  %35 = load i32, ptr %3, align 8, !tbaa !5
  %36 = icmp sgt i32 %35, 0
  br i1 %36, label %.preheader.lr.ph, label %._crit_edge43

.preheader.lr.ph:                                 ; preds = %.preheader28
  %37 = getelementptr inbounds i8, ptr %3, i64 4
  %38 = getelementptr inbounds i8, ptr %3, i64 8
  %39 = load i32, ptr %37, align 4, !tbaa !10
  %40 = icmp sgt i32 %39, 0
  br i1 %40, label %.preheader, label %._crit_edge43

._crit_edge36.loopexit:                           ; preds = %.lr.ph35
  %.pre63 = load i32, ptr %2, align 8, !tbaa !5
  br label %._crit_edge36

._crit_edge36:                                    ; preds = %._crit_edge36.loopexit, %.preheader29
  %41 = phi i32 [ %.pre63, %._crit_edge36.loopexit ], [ %31, %.preheader29 ]
  %42 = phi i32 [ %50, %._crit_edge36.loopexit ], [ %32, %.preheader29 ]
  %indvars.iv.next55 = add nuw nsw i64 %indvars.iv54, 1
  %43 = sext i32 %41 to i64
  %44 = icmp slt i64 %indvars.iv.next55, %43
  br i1 %44, label %.preheader29, label %._crit_edge38, !llvm.loop !17

.lr.ph35:                                         ; preds = %.preheader29, %.lr.ph35
  %indvars.iv51 = phi i64 [ %indvars.iv.next52, %.lr.ph35 ], [ 0, %.preheader29 ]
  %45 = call i32 @rand() #5
  %46 = srem i32 %45, 6
  %47 = add nsw i32 %46, -3
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds [101 x [101 x i64]], ptr %16, i64 0, i64 %indvars.iv54, i64 %indvars.iv51
  store i64 %48, ptr %49, align 8, !tbaa !14
  %indvars.iv.next52 = add nuw nsw i64 %indvars.iv51, 1
  %50 = load i32, ptr %15, align 4, !tbaa !10
  %51 = sext i32 %50 to i64
  %52 = icmp slt i64 %indvars.iv.next52, %51
  br i1 %52, label %.lr.ph35, label %._crit_edge36.loopexit, !llvm.loop !18

53:                                               ; preds = %._crit_edge38
  call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 88, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #6
  unreachable

.preheader:                                       ; preds = %.preheader.lr.ph, %._crit_edge41
  %54 = phi i32 [ %57, %._crit_edge41 ], [ %35, %.preheader.lr.ph ]
  %55 = phi i32 [ %58, %._crit_edge41 ], [ %39, %.preheader.lr.ph ]
  %indvars.iv60 = phi i64 [ %indvars.iv.next61, %._crit_edge41 ], [ 0, %.preheader.lr.ph ]
  %56 = icmp sgt i32 %55, 0
  br i1 %56, label %.lr.ph40, label %._crit_edge41

._crit_edge43:                                    ; preds = %._crit_edge41, %.preheader.lr.ph, %.preheader28
  call void @llvm.lifetime.end.p0(i64 81616, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 81616, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 81616, ptr nonnull %1) #5
  ret i32 0

._crit_edge41.loopexit:                           ; preds = %71
  %.pre64 = load i32, ptr %3, align 8, !tbaa !5
  br label %._crit_edge41

._crit_edge41:                                    ; preds = %._crit_edge41.loopexit, %.preheader
  %57 = phi i32 [ %.pre64, %._crit_edge41.loopexit ], [ %54, %.preheader ]
  %58 = phi i32 [ %74, %._crit_edge41.loopexit ], [ %55, %.preheader ]
  %indvars.iv.next61 = add nuw nsw i64 %indvars.iv60, 1
  %59 = sext i32 %57 to i64
  %60 = icmp slt i64 %indvars.iv.next61, %59
  br i1 %60, label %.preheader, label %._crit_edge43, !llvm.loop !19

.lr.ph40:                                         ; preds = %.preheader, %71
  %indvars.iv57 = phi i64 [ %indvars.iv.next58, %71 ], [ 0, %.preheader ]
  %61 = getelementptr inbounds [101 x [101 x i64]], ptr %38, i64 0, i64 %indvars.iv60, i64 %indvars.iv57
  %62 = load i64, ptr %61, align 8, !tbaa !14
  %63 = add nsw i64 %62, -1
  store i64 %63, ptr %61, align 8, !tbaa !14
  %64 = call noundef zeroext i1 @_Z6verify6MatrixS_S_i(ptr noundef nonnull byval(%struct.Matrix) align 8 %1, ptr noundef nonnull byval(%struct.Matrix) align 8 %2, ptr noundef nonnull byval(%struct.Matrix) align 8 %3, i32 noundef 30)
  br i1 %64, label %65, label %66

65:                                               ; preds = %.lr.ph40
  call void @__assert_fail(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.1, i32 noundef 93, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #6
  unreachable

66:                                               ; preds = %.lr.ph40
  %67 = load i64, ptr %61, align 8, !tbaa !14
  %68 = add nsw i64 %67, 2
  store i64 %68, ptr %61, align 8, !tbaa !14
  %69 = call noundef zeroext i1 @_Z6verify6MatrixS_S_i(ptr noundef nonnull byval(%struct.Matrix) align 8 %1, ptr noundef nonnull byval(%struct.Matrix) align 8 %2, ptr noundef nonnull byval(%struct.Matrix) align 8 %3, i32 noundef 30)
  br i1 %69, label %70, label %71

70:                                               ; preds = %66
  call void @__assert_fail(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.1, i32 noundef 95, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #6
  unreachable

71:                                               ; preds = %66
  %72 = load i64, ptr %61, align 8, !tbaa !14
  %73 = add nsw i64 %72, -1
  store i64 %73, ptr %61, align 8, !tbaa !14
  %indvars.iv.next58 = add nuw nsw i64 %indvars.iv57, 1
  %74 = load i32, ptr %37, align 4, !tbaa !10
  %75 = sext i32 %74 to i64
  %76 = icmp slt i64 %indvars.iv.next58, %75
  br i1 %76, label %.lr.ph40, label %._crit_edge41.loopexit, !llvm.loop !20
}

; Function Attrs: nounwind
declare void @srand(i32 noundef) local_unnamed_addr #2

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #4

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { mustprogress norecurse 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 #4 = { noreturn 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 #5 = { nounwind }
attributes #6 = { noreturn 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, !7, i64 0}
!6 = !{!"_ZTS6Matrix", !7, i64 0, !7, i64 4, !8, i64 8}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!6, !7, i64 4}
!11 = distinct !{!11, !12, !13}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!"llvm.loop.unswitch.partial.disable"}
!14 = !{!15, !15, i64 0}
!15 = !{!"long long", !8, i64 0}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12, !13}
!18 = distinct !{!18, !12}
!19 = distinct !{!19, !12, !13}
!20 = distinct !{!20, !12}


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