; LLVM IR from hutusi/rethink-c :: test (test_matrix)

; 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, ptr, ptr, i32 }

@.str = external hidden unnamed_addr constant [46 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [69 x i8], align 1
@__PRETTY_FUNCTION__.test_matrix_2_dimensions = external hidden unnamed_addr constant [32 x i8], align 1
@__const.test_matrix_2_dimensions.values = external hidden unnamed_addr constant [10 x i32], align 16
@.str.2 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [77 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [77 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @test_matrix_2_dimensions() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca [10 x i32], align 16
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #5
  store i32 2, ptr %1, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #5
  store i32 3, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  store i32 5, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  %9 = load i32, ptr %1, align 4, !tbaa !5
  %10 = load i32, ptr %3, align 4, !tbaa !5
  %11 = load i32, ptr %2, align 4, !tbaa !5
  %12 = call ptr (i32, ...) @matrix_new(i32 noundef %9, i32 noundef %10, i32 noundef %11)
  store ptr %12, ptr %4, align 8, !tbaa !9
  %13 = load ptr, ptr %4, align 8, !tbaa !9
  call void @matrix_reset(ptr noundef %13)
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %14

14:                                               ; preds = %39, %0
  %15 = load i32, ptr %5, align 4, !tbaa !5
  %16 = load i32, ptr %3, align 4, !tbaa !5
  %17 = icmp ult i32 %15, %16
  br i1 %17, label %19, label %18

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

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

20:                                               ; preds = %35, %19
  %21 = load i32, ptr %7, align 4, !tbaa !5
  %22 = load i32, ptr %2, align 4, !tbaa !5
  %23 = icmp ult i32 %21, %22
  br i1 %23, label %25, label %24

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

25:                                               ; preds = %20
  %26 = load ptr, ptr %4, align 8, !tbaa !9
  %27 = load i32, ptr %1, align 4, !tbaa !5
  %28 = load i32, ptr %5, align 4, !tbaa !5
  %29 = load i32, ptr %7, align 4, !tbaa !5
  %30 = call ptr (ptr, i32, ...) @matrix_get(ptr noundef %26, i32 noundef %27, i32 noundef %28, i32 noundef %29)
  %31 = icmp eq ptr %30, null
  br i1 %31, label %32, label %33

32:                                               ; preds = %25
  br label %34

33:                                               ; preds = %25
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 21, ptr noundef @__PRETTY_FUNCTION__.test_matrix_2_dimensions) #6
  unreachable

34:                                               ; preds = %32
  br label %35

35:                                               ; preds = %34
  %36 = load i32, ptr %7, align 4, !tbaa !5
  %37 = add nsw i32 %36, 1
  store i32 %37, ptr %7, align 4, !tbaa !5
  br label %20, !llvm.loop !11

38:                                               ; preds = %24
  br label %39

39:                                               ; preds = %38
  %40 = load i32, ptr %5, align 4, !tbaa !5
  %41 = add nsw i32 %40, 1
  store i32 %41, ptr %5, align 4, !tbaa !5
  br label %14, !llvm.loop !13

42:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 40, ptr %8) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %8, ptr align 16 @__const.test_matrix_2_dimensions.values, i64 40, i1 false)
  %43 = load ptr, ptr %4, align 8, !tbaa !9
  %44 = getelementptr inbounds [10 x i32], ptr %8, i64 0, i64 1
  %45 = load i32, ptr %1, align 4, !tbaa !5
  call void (ptr, ptr, i32, ...) @matrix_set(ptr noundef %43, ptr noundef %44, i32 noundef %45, i32 noundef 1, i32 noundef 2)
  %46 = load ptr, ptr %4, align 8, !tbaa !9
  %47 = load i32, ptr %1, align 4, !tbaa !5
  %48 = call ptr (ptr, i32, ...) @matrix_get(ptr noundef %46, i32 noundef %47, i32 noundef 1, i32 noundef 2)
  %49 = getelementptr inbounds [10 x i32], ptr %8, i64 0, i64 1
  %50 = call i32 @int_equal(ptr noundef %48, ptr noundef %49)
  %51 = icmp ne i32 %50, 0
  br i1 %51, label %52, label %53

52:                                               ; preds = %42
  br label %54

53:                                               ; preds = %42
  call void @__assert_fail(ptr noundef @.str.2, ptr noundef @.str.1, i32 noundef 27, ptr noundef @__PRETTY_FUNCTION__.test_matrix_2_dimensions) #6
  unreachable

54:                                               ; preds = %52
  %55 = load ptr, ptr %4, align 8, !tbaa !9
  %56 = load i32, ptr %1, align 4, !tbaa !5
  %57 = call ptr (ptr, i32, ...) @matrix_get(ptr noundef %55, i32 noundef %56, i32 noundef 1, i32 noundef 2)
  %58 = load ptr, ptr %4, align 8, !tbaa !9
  %59 = getelementptr inbounds %struct._Matrix, ptr %58, i32 0, i32 0
  %60 = load ptr, ptr %59, align 8, !tbaa !14
  %61 = load i32, ptr %2, align 4, !tbaa !5
  %62 = mul i32 1, %61
  %63 = add i32 %62, 2
  %64 = zext i32 %63 to i64
  %65 = getelementptr inbounds ptr, ptr %60, i64 %64
  %66 = load ptr, ptr %65, align 8, !tbaa !9
  %67 = call i32 @int_equal(ptr noundef %57, ptr noundef %66)
  %68 = icmp ne i32 %67, 0
  br i1 %68, label %69, label %70

69:                                               ; preds = %54
  br label %71

70:                                               ; preds = %54
  call void @__assert_fail(ptr noundef @.str.3, ptr noundef @.str.1, i32 noundef 29, ptr noundef @__PRETTY_FUNCTION__.test_matrix_2_dimensions) #6
  unreachable

71:                                               ; preds = %69
  %72 = load ptr, ptr %4, align 8, !tbaa !9
  %73 = getelementptr inbounds [10 x i32], ptr %8, i64 0, i64 2
  %74 = load i32, ptr %1, align 4, !tbaa !5
  call void (ptr, ptr, i32, ...) @matrix_set(ptr noundef %72, ptr noundef %73, i32 noundef %74, i32 noundef 4, i32 noundef 2)
  %75 = load ptr, ptr %4, align 8, !tbaa !9
  %76 = load i32, ptr %1, align 4, !tbaa !5
  %77 = call ptr (ptr, i32, ...) @matrix_get(ptr noundef %75, i32 noundef %76, i32 noundef 4, i32 noundef 2)
  %78 = getelementptr inbounds [10 x i32], ptr %8, i64 0, i64 2
  %79 = call i32 @int_equal(ptr noundef %77, ptr noundef %78)
  %80 = icmp ne i32 %79, 0
  br i1 %80, label %81, label %82

81:                                               ; preds = %71
  br label %83

82:                                               ; preds = %71
  call void @__assert_fail(ptr noundef @.str.4, ptr noundef @.str.1, i32 noundef 32, ptr noundef @__PRETTY_FUNCTION__.test_matrix_2_dimensions) #6
  unreachable

83:                                               ; preds = %81
  %84 = load ptr, ptr %4, align 8, !tbaa !9
  %85 = load i32, ptr %1, align 4, !tbaa !5
  %86 = call ptr (ptr, i32, ...) @matrix_get(ptr noundef %84, i32 noundef %85, i32 noundef 4, i32 noundef 2)
  %87 = load ptr, ptr %4, align 8, !tbaa !9
  %88 = getelementptr inbounds %struct._Matrix, ptr %87, i32 0, i32 0
  %89 = load ptr, ptr %88, align 8, !tbaa !14
  %90 = load i32, ptr %2, align 4, !tbaa !5
  %91 = mul i32 4, %90
  %92 = add i32 %91, 2
  %93 = zext i32 %92 to i64
  %94 = getelementptr inbounds ptr, ptr %89, i64 %93
  %95 = load ptr, ptr %94, align 8, !tbaa !9
  %96 = call i32 @int_equal(ptr noundef %86, ptr noundef %95)
  %97 = icmp ne i32 %96, 0
  br i1 %97, label %98, label %99

98:                                               ; preds = %83
  br label %100

99:                                               ; preds = %83
  call void @__assert_fail(ptr noundef @.str.5, ptr noundef @.str.1, i32 noundef 34, ptr noundef @__PRETTY_FUNCTION__.test_matrix_2_dimensions) #6
  unreachable

100:                                              ; preds = %98
  %101 = load ptr, ptr %4, align 8, !tbaa !9
  call void @matrix_free(ptr noundef %101)
  call void @llvm.lifetime.end.p0(i64 40, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #5
  ret void
}

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

declare ptr @matrix_new(i32 noundef, ...) #2

declare void @matrix_reset(ptr noundef) #2

declare ptr @matrix_get(ptr noundef, i32 noundef, ...) #2

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

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

; 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 @matrix_set(ptr noundef, ptr noundef, i32 noundef, ...) #2

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

declare void @matrix_free(ptr 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 = { 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 #4 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = !{!15, !10, i64 0}
!15 = !{!"_Matrix", !10, i64 0, !6, i64 8, !10, i64 16, !10, i64 24, !6, i64 32}


; 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 [46 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [69 x i8], align 1
@__PRETTY_FUNCTION__.test_matrix_2_dimensions = external hidden unnamed_addr constant [32 x i8], align 1
@__const.test_matrix_2_dimensions.values = external hidden unnamed_addr constant [10 x i32], align 16
@.str.2 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [77 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [77 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @test_matrix_2_dimensions() local_unnamed_addr #0 {
.preheader:
  %0 = alloca [10 x i32], align 16
  %1 = tail call ptr (i32, ...) @matrix_new(i32 noundef 2, i32 noundef 5, i32 noundef 3) #5
  tail call void @matrix_reset(ptr noundef %1) #5
  %2 = tail call ptr (ptr, i32, ...) @matrix_get(ptr noundef %1, i32 noundef 2, i32 noundef 0, i32 noundef 0) #5
  %3 = icmp eq ptr %2, null
  br i1 %3, label %4, label %46

4:                                                ; preds = %.preheader
  %5 = tail call ptr (ptr, i32, ...) @matrix_get(ptr noundef %1, i32 noundef 2, i32 noundef 0, i32 noundef 1) #5
  %6 = icmp eq ptr %5, null
  br i1 %6, label %7, label %46

7:                                                ; preds = %4
  %8 = tail call ptr (ptr, i32, ...) @matrix_get(ptr noundef %1, i32 noundef 2, i32 noundef 0, i32 noundef 2) #5
  %9 = icmp eq ptr %8, null
  br i1 %9, label %.preheader.1, label %46

.preheader.1:                                     ; preds = %7
  %10 = tail call ptr (ptr, i32, ...) @matrix_get(ptr noundef %1, i32 noundef 2, i32 noundef 1, i32 noundef 0) #5
  %11 = icmp eq ptr %10, null
  br i1 %11, label %12, label %46

12:                                               ; preds = %.preheader.1
  %13 = tail call ptr (ptr, i32, ...) @matrix_get(ptr noundef %1, i32 noundef 2, i32 noundef 1, i32 noundef 1) #5
  %14 = icmp eq ptr %13, null
  br i1 %14, label %15, label %46

15:                                               ; preds = %12
  %16 = tail call ptr (ptr, i32, ...) @matrix_get(ptr noundef %1, i32 noundef 2, i32 noundef 1, i32 noundef 2) #5
  %17 = icmp eq ptr %16, null
  br i1 %17, label %.preheader.2, label %46

.preheader.2:                                     ; preds = %15
  %18 = tail call ptr (ptr, i32, ...) @matrix_get(ptr noundef %1, i32 noundef 2, i32 noundef 2, i32 noundef 0) #5
  %19 = icmp eq ptr %18, null
  br i1 %19, label %20, label %46

20:                                               ; preds = %.preheader.2
  %21 = tail call ptr (ptr, i32, ...) @matrix_get(ptr noundef %1, i32 noundef 2, i32 noundef 2, i32 noundef 1) #5
  %22 = icmp eq ptr %21, null
  br i1 %22, label %23, label %46

23:                                               ; preds = %20
  %24 = tail call ptr (ptr, i32, ...) @matrix_get(ptr noundef %1, i32 noundef 2, i32 noundef 2, i32 noundef 2) #5
  %25 = icmp eq ptr %24, null
  br i1 %25, label %.preheader.3, label %46

.preheader.3:                                     ; preds = %23
  %26 = tail call ptr (ptr, i32, ...) @matrix_get(ptr noundef %1, i32 noundef 2, i32 noundef 3, i32 noundef 0) #5
  %27 = icmp eq ptr %26, null
  br i1 %27, label %28, label %46

28:                                               ; preds = %.preheader.3
  %29 = tail call ptr (ptr, i32, ...) @matrix_get(ptr noundef %1, i32 noundef 2, i32 noundef 3, i32 noundef 1) #5
  %30 = icmp eq ptr %29, null
  br i1 %30, label %31, label %46

31:                                               ; preds = %28
  %32 = tail call ptr (ptr, i32, ...) @matrix_get(ptr noundef %1, i32 noundef 2, i32 noundef 3, i32 noundef 2) #5
  %33 = icmp eq ptr %32, null
  br i1 %33, label %.preheader.4, label %46

.preheader.4:                                     ; preds = %31
  %34 = tail call ptr (ptr, i32, ...) @matrix_get(ptr noundef %1, i32 noundef 2, i32 noundef 4, i32 noundef 0) #5
  %35 = icmp eq ptr %34, null
  br i1 %35, label %36, label %46

36:                                               ; preds = %.preheader.4
  %37 = tail call ptr (ptr, i32, ...) @matrix_get(ptr noundef %1, i32 noundef 2, i32 noundef 4, i32 noundef 1) #5
  %38 = icmp eq ptr %37, null
  br i1 %38, label %39, label %46

39:                                               ; preds = %36
  %40 = tail call ptr (ptr, i32, ...) @matrix_get(ptr noundef %1, i32 noundef 2, i32 noundef 4, i32 noundef 2) #5
  %41 = icmp eq ptr %40, null
  br i1 %41, label %42, label %46

42:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %0) #5
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(40) %0, ptr noundef nonnull align 16 dereferenceable(40) @__const.test_matrix_2_dimensions.values, i64 40, i1 false)
  %43 = getelementptr inbounds i8, ptr %0, i64 4
  call void (ptr, ptr, i32, ...) @matrix_set(ptr noundef %1, ptr noundef nonnull %43, i32 noundef 2, i32 noundef 1, i32 noundef 2) #5
  %44 = call ptr (ptr, i32, ...) @matrix_get(ptr noundef %1, i32 noundef 2, i32 noundef 1, i32 noundef 2) #5
  %45 = call i32 @int_equal(ptr noundef %44, ptr noundef nonnull %43) #5
  %.not = icmp eq i32 %45, 0
  br i1 %.not, label %47, label %48

46:                                               ; preds = %39, %36, %.preheader.4, %31, %28, %.preheader.3, %23, %20, %.preheader.2, %15, %12, %.preheader.1, %7, %4, %.preheader
  tail call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 21, ptr noundef nonnull @__PRETTY_FUNCTION__.test_matrix_2_dimensions) #6
  unreachable

47:                                               ; preds = %42
  call void @__assert_fail(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.1, i32 noundef 27, ptr noundef nonnull @__PRETTY_FUNCTION__.test_matrix_2_dimensions) #6
  unreachable

48:                                               ; preds = %42
  %49 = call ptr (ptr, i32, ...) @matrix_get(ptr noundef %1, i32 noundef 2, i32 noundef 1, i32 noundef 2) #5
  %50 = load ptr, ptr %1, align 8, !tbaa !5
  %51 = getelementptr inbounds i8, ptr %50, i64 40
  %52 = load ptr, ptr %51, align 8, !tbaa !11
  %53 = call i32 @int_equal(ptr noundef %49, ptr noundef %52) #5
  %.not31 = icmp eq i32 %53, 0
  br i1 %.not31, label %54, label %55

54:                                               ; preds = %48
  call void @__assert_fail(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.1, i32 noundef 29, ptr noundef nonnull @__PRETTY_FUNCTION__.test_matrix_2_dimensions) #6
  unreachable

55:                                               ; preds = %48
  %56 = getelementptr inbounds i8, ptr %0, i64 8
  call void (ptr, ptr, i32, ...) @matrix_set(ptr noundef nonnull %1, ptr noundef nonnull %56, i32 noundef 2, i32 noundef 4, i32 noundef 2) #5
  %57 = call ptr (ptr, i32, ...) @matrix_get(ptr noundef nonnull %1, i32 noundef 2, i32 noundef 4, i32 noundef 2) #5
  %58 = call i32 @int_equal(ptr noundef %57, ptr noundef nonnull %56) #5
  %.not32 = icmp eq i32 %58, 0
  br i1 %.not32, label %59, label %60

59:                                               ; preds = %55
  call void @__assert_fail(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.1, i32 noundef 32, ptr noundef nonnull @__PRETTY_FUNCTION__.test_matrix_2_dimensions) #6
  unreachable

60:                                               ; preds = %55
  %61 = call ptr (ptr, i32, ...) @matrix_get(ptr noundef nonnull %1, i32 noundef 2, i32 noundef 4, i32 noundef 2) #5
  %62 = load ptr, ptr %1, align 8, !tbaa !5
  %63 = getelementptr inbounds i8, ptr %62, i64 112
  %64 = load ptr, ptr %63, align 8, !tbaa !11
  %65 = call i32 @int_equal(ptr noundef %61, ptr noundef %64) #5
  %.not33 = icmp eq i32 %65, 0
  br i1 %.not33, label %66, label %67

66:                                               ; preds = %60
  call void @__assert_fail(ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.1, i32 noundef 34, ptr noundef nonnull @__PRETTY_FUNCTION__.test_matrix_2_dimensions) #6
  unreachable

67:                                               ; preds = %60
  call void @matrix_free(ptr noundef nonnull %1) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %0) #5
  ret void
}

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

declare ptr @matrix_new(i32 noundef, ...) local_unnamed_addr #2

declare void @matrix_reset(ptr noundef) local_unnamed_addr #2

declare ptr @matrix_get(ptr noundef, 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 #3

; 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 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 @matrix_set(ptr noundef, ptr noundef, i32 noundef, ...) local_unnamed_addr #2

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

declare void @matrix_free(ptr 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 = { 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 #4 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = !{!"_Matrix", !7, i64 0, !10, i64 8, !7, i64 16, !7, i64 24, !10, i64 32}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!7, !7, i64 0}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyPass,SROAPass,SimplifyCFGPass,TailCallElimPass