; LLVM IR from simbody/simbody :: SimTKmath/Integrators/src/CPodes/sundials/src/cpodes (cpodes_dense)

; 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.CPodeMemRec = type { double, i32, ptr, ptr, ptr, i32, i32, i32, double, double, ptr, ptr, ptr, [13 x ptr], ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, i32, i32, i32, double, double, double, double, double, double, double, double, [14 x double], [6 x double], [13 x double], [13 x double], double, double, double, double, double, double, double, i32, i32, i32, i32, i64, i64, i32, i32, ptr, ptr, ptr, ptr, double, ptr, ptr, ptr, i64, i64, double, i32, i32, i32, ptr, ptr, ptr, ptr, i32, i64, i64, i64, i64, i32, i32, ptr, ptr, i32, i32, double, double, ptr, [13 x ptr], ptr, ptr, ptr, ptr, double, i64, i64, i32, i32, i32, i64, i64, i32, i32, double, i32, i64, i32, i32, i32, i32, double, double, double, i64, i64, i64, i64, i64, i64, i32, double, double, double, i64, i64, i64, i64, i64, i64, ptr, ptr, ptr, ptr, ptr, i32, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, i64, double, double, double, i32, double, i32, i32, i32, i32, i32, i32, ptr, ptr, ptr, i32, [6 x [4 x double]], i32, i64, i32, ptr, i32, ptr, ptr, ptr, ptr, double, double, double, ptr, ptr, ptr, double, i32, i32, i64, double, double, i32, i32, ptr, ptr }
%struct._generic_N_Vector = type { ptr, ptr }
%struct._generic_N_Vector_Ops = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.CPDlsMemRec = type { i32, i32, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i64, i64, i64, i32 }

@.str = external hidden unnamed_addr constant [8 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [25 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @CPDense(ptr noundef %0, i32 noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %9 = load ptr, ptr %4, align 8, !tbaa !5
  %10 = icmp eq ptr %9, null
  br i1 %10, label %11, label %12

11:                                               ; preds = %2
  call void (ptr, i32, ptr, ptr, ptr, ...) @cpProcessError(ptr noundef null, i32 noundef -1, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.2)
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %135

12:                                               ; preds = %2
  %13 = load ptr, ptr %4, align 8, !tbaa !5
  store ptr %13, ptr %6, align 8, !tbaa !5
  %14 = load ptr, ptr %6, align 8, !tbaa !5
  %15 = getelementptr inbounds %struct.CPodeMemRec, ptr %14, i32 0, i32 18
  %16 = load ptr, ptr %15, align 8, !tbaa !11
  %17 = getelementptr inbounds %struct._generic_N_Vector, ptr %16, i32 0, i32 1
  %18 = load ptr, ptr %17, align 8, !tbaa !15
  %19 = getelementptr inbounds %struct._generic_N_Vector_Ops, ptr %18, i32 0, i32 4
  %20 = load ptr, ptr %19, align 8, !tbaa !17
  %21 = icmp eq ptr %20, null
  br i1 %21, label %31, label %22

22:                                               ; preds = %12
  %23 = load ptr, ptr %6, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct.CPodeMemRec, ptr %23, i32 0, i32 18
  %25 = load ptr, ptr %24, align 8, !tbaa !11
  %26 = getelementptr inbounds %struct._generic_N_Vector, ptr %25, i32 0, i32 1
  %27 = load ptr, ptr %26, align 8, !tbaa !15
  %28 = getelementptr inbounds %struct._generic_N_Vector_Ops, ptr %27, i32 0, i32 5
  %29 = load ptr, ptr %28, align 8, !tbaa !19
  %30 = icmp eq ptr %29, null
  br i1 %30, label %31, label %33

31:                                               ; preds = %22, %12
  %32 = load ptr, ptr %6, align 8, !tbaa !5
  call void (ptr, i32, ptr, ptr, ptr, ...) @cpProcessError(ptr noundef %32, i32 noundef -3, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.3)
  store i32 -3, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %135

33:                                               ; preds = %22
  %34 = load ptr, ptr %6, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.CPodeMemRec, ptr %34, i32 0, i32 128
  %36 = load ptr, ptr %35, align 8, !tbaa !20
  %37 = icmp ne ptr %36, null
  br i1 %37, label %38, label %43

38:                                               ; preds = %33
  %39 = load ptr, ptr %6, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.CPodeMemRec, ptr %39, i32 0, i32 128
  %41 = load ptr, ptr %40, align 8, !tbaa !20
  %42 = load ptr, ptr %6, align 8, !tbaa !5
  call void %41(ptr noundef %42)
  br label %43

43:                                               ; preds = %38, %33
  %44 = load ptr, ptr %6, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.CPodeMemRec, ptr %44, i32 0, i32 125
  store ptr @cpDenseInit, ptr %45, align 8, !tbaa !21
  %46 = load ptr, ptr %6, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.CPodeMemRec, ptr %46, i32 0, i32 126
  store ptr @cpDenseSetup, ptr %47, align 8, !tbaa !22
  %48 = load ptr, ptr %6, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.CPodeMemRec, ptr %48, i32 0, i32 127
  store ptr @cpDenseSolve, ptr %49, align 8, !tbaa !23
  %50 = load ptr, ptr %6, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.CPodeMemRec, ptr %50, i32 0, i32 128
  store ptr @cpDenseFree, ptr %51, align 8, !tbaa !20
  store ptr null, ptr %7, align 8, !tbaa !5
  %52 = call noalias ptr @malloc(i64 noundef 120) #6
  store ptr %52, ptr %7, align 8, !tbaa !5
  %53 = load ptr, ptr %7, align 8, !tbaa !5
  %54 = icmp eq ptr %53, null
  br i1 %54, label %55, label %57

55:                                               ; preds = %43
  %56 = load ptr, ptr %6, align 8, !tbaa !5
  call void (ptr, i32, ptr, ptr, ptr, ...) @cpProcessError(ptr noundef %56, i32 noundef -4, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.4)
  store i32 -4, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %135

57:                                               ; preds = %43
  %58 = load ptr, ptr %7, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.CPDlsMemRec, ptr %58, i32 0, i32 0
  store i32 1, ptr %59, align 8, !tbaa !24
  %60 = load ptr, ptr %7, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.CPDlsMemRec, ptr %60, i32 0, i32 5
  store ptr null, ptr %61, align 8, !tbaa !26
  %62 = load ptr, ptr %7, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.CPDlsMemRec, ptr %62, i32 0, i32 6
  store ptr null, ptr %63, align 8, !tbaa !27
  %64 = load ptr, ptr %7, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.CPDlsMemRec, ptr %64, i32 0, i32 9
  store ptr null, ptr %65, align 8, !tbaa !28
  %66 = load ptr, ptr %7, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.CPDlsMemRec, ptr %66, i32 0, i32 16
  store i32 0, ptr %67, align 8, !tbaa !29
  %68 = load ptr, ptr %6, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.CPodeMemRec, ptr %68, i32 0, i32 130
  store i32 1, ptr %69, align 8, !tbaa !30
  %70 = load i32, ptr %5, align 4, !tbaa !9
  %71 = load ptr, ptr %7, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.CPDlsMemRec, ptr %71, i32 0, i32 1
  store i32 %70, ptr %72, align 4, !tbaa !31
  %73 = load ptr, ptr %7, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.CPDlsMemRec, ptr %73, i32 0, i32 10
  store ptr null, ptr %74, align 8, !tbaa !32
  %75 = load ptr, ptr %7, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.CPDlsMemRec, ptr %75, i32 0, i32 12
  store ptr null, ptr %76, align 8, !tbaa !33
  %77 = load ptr, ptr %7, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.CPDlsMemRec, ptr %77, i32 0, i32 11
  store ptr null, ptr %78, align 8, !tbaa !34
  %79 = load i32, ptr %5, align 4, !tbaa !9
  %80 = load i32, ptr %5, align 4, !tbaa !9
  %81 = call ptr @NewDenseMat(i32 noundef %79, i32 noundef %80)
  %82 = load ptr, ptr %7, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.CPDlsMemRec, ptr %82, i32 0, i32 10
  store ptr %81, ptr %83, align 8, !tbaa !32
  %84 = load ptr, ptr %7, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.CPDlsMemRec, ptr %84, i32 0, i32 10
  %86 = load ptr, ptr %85, align 8, !tbaa !32
  %87 = icmp eq ptr %86, null
  br i1 %87, label %88, label %91

88:                                               ; preds = %57
  %89 = load ptr, ptr %6, align 8, !tbaa !5
  call void (ptr, i32, ptr, ptr, ptr, ...) @cpProcessError(ptr noundef %89, i32 noundef -4, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.4)
  %90 = load ptr, ptr %7, align 8, !tbaa !5
  call void @free(ptr noundef %90) #5
  store i32 -4, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %135

91:                                               ; preds = %57
  %92 = load i32, ptr %5, align 4, !tbaa !9
  %93 = call ptr @NewIntArray(i32 noundef %92)
  %94 = load ptr, ptr %7, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.CPDlsMemRec, ptr %94, i32 0, i32 12
  store ptr %93, ptr %95, align 8, !tbaa !33
  %96 = load ptr, ptr %7, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.CPDlsMemRec, ptr %96, i32 0, i32 12
  %98 = load ptr, ptr %97, align 8, !tbaa !33
  %99 = icmp eq ptr %98, null
  br i1 %99, label %100, label %106

100:                                              ; preds = %91
  %101 = load ptr, ptr %6, align 8, !tbaa !5
  call void (ptr, i32, ptr, ptr, ptr, ...) @cpProcessError(ptr noundef %101, i32 noundef -4, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.4)
  %102 = load ptr, ptr %7, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.CPDlsMemRec, ptr %102, i32 0, i32 10
  %104 = load ptr, ptr %103, align 8, !tbaa !32
  call void @DestroyMat(ptr noundef %104)
  %105 = load ptr, ptr %7, align 8, !tbaa !5
  call void @free(ptr noundef %105) #5
  store i32 -4, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %135

106:                                              ; preds = %91
  %107 = load ptr, ptr %6, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.CPodeMemRec, ptr %107, i32 0, i32 1
  %109 = load i32, ptr %108, align 8, !tbaa !35
  %110 = icmp eq i32 %109, 1
  br i1 %110, label %111, label %131

111:                                              ; preds = %106
  %112 = load i32, ptr %5, align 4, !tbaa !9
  %113 = load i32, ptr %5, align 4, !tbaa !9
  %114 = call ptr @NewDenseMat(i32 noundef %112, i32 noundef %113)
  %115 = load ptr, ptr %7, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.CPDlsMemRec, ptr %115, i32 0, i32 11
  store ptr %114, ptr %116, align 8, !tbaa !34
  %117 = load ptr, ptr %7, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.CPDlsMemRec, ptr %117, i32 0, i32 11
  %119 = load ptr, ptr %118, align 8, !tbaa !34
  %120 = icmp eq ptr %119, null
  br i1 %120, label %121, label %130

121:                                              ; preds = %111
  %122 = load ptr, ptr %6, align 8, !tbaa !5
  call void (ptr, i32, ptr, ptr, ptr, ...) @cpProcessError(ptr noundef %122, i32 noundef -4, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.4)
  %123 = load ptr, ptr %7, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct.CPDlsMemRec, ptr %123, i32 0, i32 10
  %125 = load ptr, ptr %124, align 8, !tbaa !32
  call void @DestroyMat(ptr noundef %125)
  %126 = load ptr, ptr %7, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.CPDlsMemRec, ptr %126, i32 0, i32 12
  %128 = load ptr, ptr %127, align 8, !tbaa !33
  call void @DestroyArray(ptr noundef %128)
  %129 = load ptr, ptr %7, align 8, !tbaa !5
  call void @free(ptr noundef %129) #5
  store i32 -4, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %135

130:                                              ; preds = %111
  br label %131

131:                                              ; preds = %130, %106
  %132 = load ptr, ptr %7, align 8, !tbaa !5
  %133 = load ptr, ptr %6, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.CPodeMemRec, ptr %133, i32 0, i32 129
  store ptr %132, ptr %134, align 8, !tbaa !36
  store i32 0, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %135

135:                                              ; preds = %131, %121, %100, %88, %55, %31, %11
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  %136 = load i32, ptr %3, align 4
  ret i32 %136
}

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

declare void @cpProcessError(ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, ...) #2

; Function Attrs: nounwind uwtable
declare hidden i32 @cpDenseInit(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @cpDenseSetup(ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @cpDenseSolve(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden void @cpDenseFree(ptr noundef) #0

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #3

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

; Function Attrs: nounwind
declare void @free(ptr noundef) #4

declare ptr @NewIntArray(i32 noundef) #2

declare void @DestroyMat(ptr noundef) #2

declare void @DestroyArray(ptr noundef) #2

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

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind allocsize(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 = { 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 = { nounwind allocsize(0) }

!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 232}
!12 = !{!"CPodeMemRec", !13, i64 0, !10, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !10, i64 40, !10, i64 44, !10, i64 48, !13, i64 56, !13, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !7, i64 96, !6, i64 200, !6, i64 208, !6, i64 216, !6, i64 224, !6, i64 232, !6, i64 240, !10, i64 248, !10, i64 252, !10, i64 256, !10, i64 260, !10, i64 264, !13, i64 272, !13, i64 280, !13, i64 288, !13, i64 296, !13, i64 304, !13, i64 312, !13, i64 320, !13, i64 328, !7, i64 336, !7, i64 448, !7, i64 496, !7, i64 600, !13, i64 704, !13, i64 712, !13, i64 720, !13, i64 728, !13, i64 736, !13, i64 744, !13, i64 752, !10, i64 760, !10, i64 764, !10, i64 768, !10, i64 772, !14, i64 776, !14, i64 784, !10, i64 792, !10, i64 796, !6, i64 800, !6, i64 808, !6, i64 816, !6, i64 824, !13, i64 832, !6, i64 840, !6, i64 848, !6, i64 856, !14, i64 864, !14, i64 872, !13, i64 880, !10, i64 888, !10, i64 892, !10, i64 896, !6, i64 904, !6, i64 912, !6, i64 920, !6, i64 928, !10, i64 936, !14, i64 944, !14, i64 952, !14, i64 960, !14, i64 968, !10, i64 976, !10, i64 980, !6, i64 984, !6, i64 992, !10, i64 1000, !10, i64 1004, !13, i64 1008, !13, i64 1016, !6, i64 1024, !7, i64 1032, !6, i64 1136, !6, i64 1144, !6, i64 1152, !6, i64 1160, !13, i64 1168, !14, i64 1176, !14, i64 1184, !10, i64 1192, !10, i64 1196, !10, i64 1200, !14, i64 1208, !14, i64 1216, !10, i64 1224, !10, i64 1228, !13, i64 1232, !10, i64 1240, !14, i64 1248, !10, i64 1256, !10, i64 1260, !10, i64 1264, !10, i64 1268, !13, i64 1272, !13, i64 1280, !13, i64 1288, !14, i64 1296, !14, i64 1304, !14, i64 1312, !14, i64 1320, !14, i64 1328, !14, i64 1336, !10, i64 1344, !13, i64 1352, !13, i64 1360, !13, i64 1368, !14, i64 1376, !14, i64 1384, !14, i64 1392, !14, i64 1400, !14, i64 1408, !14, i64 1416, !6, i64 1424, !6, i64 1432, !6, i64 1440, !6, i64 1448, !6, i64 1456, !10, i64 1464, !6, i64 1472, !6, i64 1480, !6, i64 1488, !6, i64 1496, !6, i64 1504, !6, i64 1512, !10, i64 1520, !10, i64 1524, !14, i64 1528, !13, i64 1536, !13, i64 1544, !13, i64 1552, !10, i64 1560, !13, i64 1568, !10, i64 1576, !10, i64 1580, !10, i64 1584, !10, i64 1588, !10, i64 1592, !10, i64 1596, !6, i64 1600, !6, i64 1608, !6, i64 1616, !10, i64 1624, !7, i64 1632, !10, i64 1824, !14, i64 1832, !10, i64 1840, !6, i64 1848, !10, i64 1856, !6, i64 1864, !6, i64 1872, !6, i64 1880, !6, i64 1888, !13, i64 1896, !13, i64 1904, !13, i64 1912, !6, i64 1920, !6, i64 1928, !6, i64 1936, !13, i64 1944, !10, i64 1952, !10, i64 1956, !14, i64 1960, !13, i64 1968, !13, i64 1976, !10, i64 1984, !10, i64 1988, !6, i64 1992, !6, i64 2000}
!13 = !{!"double", !7, i64 0}
!14 = !{!"long", !7, i64 0}
!15 = !{!16, !6, i64 8}
!16 = !{!"_generic_N_Vector", !6, i64 0, !6, i64 8}
!17 = !{!18, !6, i64 32}
!18 = !{!"_generic_N_Vector_Ops", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !6, i64 184, !6, i64 192}
!19 = !{!18, !6, i64 40}
!20 = !{!12, !6, i64 1448}
!21 = !{!12, !6, i64 1424}
!22 = !{!12, !6, i64 1432}
!23 = !{!12, !6, i64 1440}
!24 = !{!25, !10, i64 0}
!25 = !{!"", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !14, i64 88, !14, i64 96, !14, i64 104, !10, i64 112}
!26 = !{!25, !6, i64 24}
!27 = !{!25, !6, i64 32}
!28 = !{!25, !6, i64 56}
!29 = !{!25, !10, i64 112}
!30 = !{!12, !10, i64 1464}
!31 = !{!25, !10, i64 4}
!32 = !{!25, !6, i64 64}
!33 = !{!25, !6, i64 80}
!34 = !{!25, !6, i64 72}
!35 = !{!12, !10, i64 8}
!36 = !{!12, !6, i64 1456}


; 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 [8 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [25 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local range(i32 -4, 1) i32 @CPDense(ptr noundef %0, i32 noundef %1) local_unnamed_addr #0 {
  %3 = icmp eq ptr %0, null
  br i1 %3, label %4, label %5

4:                                                ; preds = %2
  tail call void (ptr, i32, ptr, ptr, ptr, ...) @cpProcessError(ptr noundef null, i32 noundef -1, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2) #5
  br label %56

5:                                                ; preds = %2
  %6 = getelementptr inbounds i8, ptr %0, i64 232
  %7 = load ptr, ptr %6, align 8, !tbaa !5
  %8 = getelementptr inbounds i8, ptr %7, i64 8
  %9 = load ptr, ptr %8, align 8, !tbaa !13
  %10 = getelementptr inbounds i8, ptr %9, i64 32
  %11 = load ptr, ptr %10, align 8, !tbaa !15
  %12 = icmp eq ptr %11, null
  br i1 %12, label %17, label %13

13:                                               ; preds = %5
  %14 = getelementptr inbounds i8, ptr %9, i64 40
  %15 = load ptr, ptr %14, align 8, !tbaa !17
  %16 = icmp eq ptr %15, null
  br i1 %16, label %17, label %18

17:                                               ; preds = %13, %5
  tail call void (ptr, i32, ptr, ptr, ptr, ...) @cpProcessError(ptr noundef nonnull %0, i32 noundef -3, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.3) #5
  br label %56

18:                                               ; preds = %13
  %19 = getelementptr inbounds i8, ptr %0, i64 1448
  %20 = load ptr, ptr %19, align 8, !tbaa !18
  %.not = icmp eq ptr %20, null
  br i1 %.not, label %22, label %21

21:                                               ; preds = %18
  tail call void %20(ptr noundef nonnull %0) #5
  br label %22

22:                                               ; preds = %21, %18
  %23 = getelementptr inbounds i8, ptr %0, i64 1424
  store ptr @cpDenseInit, ptr %23, align 8, !tbaa !19
  %24 = getelementptr inbounds i8, ptr %0, i64 1432
  store ptr @cpDenseSetup, ptr %24, align 8, !tbaa !20
  %25 = getelementptr inbounds i8, ptr %0, i64 1440
  store ptr @cpDenseSolve, ptr %25, align 8, !tbaa !21
  store ptr @cpDenseFree, ptr %19, align 8, !tbaa !18
  %26 = tail call noalias dereferenceable_or_null(120) ptr @malloc(i64 noundef 120) #6
  %27 = icmp eq ptr %26, null
  br i1 %27, label %28, label %29

28:                                               ; preds = %22
  tail call void (ptr, i32, ptr, ptr, ptr, ...) @cpProcessError(ptr noundef nonnull %0, i32 noundef -4, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.4) #5
  br label %56

29:                                               ; preds = %22
  store i32 1, ptr %26, align 8, !tbaa !22
  %30 = getelementptr inbounds i8, ptr %26, i64 24
  %31 = getelementptr inbounds i8, ptr %26, i64 56
  store ptr null, ptr %31, align 8, !tbaa !24
  %32 = getelementptr inbounds i8, ptr %26, i64 112
  store i32 0, ptr %32, align 8, !tbaa !25
  %33 = getelementptr inbounds i8, ptr %0, i64 1464
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %30, i8 0, i64 16, i1 false)
  store i32 1, ptr %33, align 8, !tbaa !26
  %34 = getelementptr inbounds i8, ptr %26, i64 4
  store i32 %1, ptr %34, align 4, !tbaa !27
  %35 = getelementptr inbounds i8, ptr %26, i64 64
  %36 = getelementptr inbounds i8, ptr %26, i64 72
  %37 = getelementptr inbounds i8, ptr %26, i64 72
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %37, i8 0, i64 16, i1 false)
  %38 = tail call ptr @NewDenseMat(i32 noundef %1, i32 noundef %1) #5
  store ptr %38, ptr %35, align 8, !tbaa !28
  %39 = icmp eq ptr %38, null
  br i1 %39, label %40, label %41

40:                                               ; preds = %29
  tail call void (ptr, i32, ptr, ptr, ptr, ...) @cpProcessError(ptr noundef nonnull %0, i32 noundef -4, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.4) #5
  tail call void @free(ptr noundef nonnull %26) #5
  br label %56

41:                                               ; preds = %29
  %42 = getelementptr inbounds i8, ptr %26, i64 80
  %43 = tail call ptr @NewIntArray(i32 noundef %1) #5
  store ptr %43, ptr %42, align 8, !tbaa !29
  %44 = icmp eq ptr %43, null
  br i1 %44, label %45, label %46

45:                                               ; preds = %41
  tail call void (ptr, i32, ptr, ptr, ptr, ...) @cpProcessError(ptr noundef nonnull %0, i32 noundef -4, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.4) #5
  tail call void @DestroyMat(ptr noundef nonnull %38) #5
  tail call void @free(ptr noundef nonnull %26) #5
  br label %56

46:                                               ; preds = %41
  %47 = getelementptr inbounds i8, ptr %0, i64 8
  %48 = load i32, ptr %47, align 8, !tbaa !30
  %49 = icmp eq i32 %48, 1
  br i1 %49, label %50, label %54

50:                                               ; preds = %46
  %51 = tail call ptr @NewDenseMat(i32 noundef %1, i32 noundef %1) #5
  store ptr %51, ptr %36, align 8, !tbaa !31
  %52 = icmp eq ptr %51, null
  br i1 %52, label %53, label %54

53:                                               ; preds = %50
  tail call void (ptr, i32, ptr, ptr, ptr, ...) @cpProcessError(ptr noundef nonnull %0, i32 noundef -4, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.4) #5
  tail call void @DestroyMat(ptr noundef nonnull %38) #5
  tail call void @DestroyArray(ptr noundef nonnull %43) #5
  tail call void @free(ptr noundef nonnull %26) #5
  br label %56

54:                                               ; preds = %50, %46
  %55 = getelementptr inbounds i8, ptr %0, i64 1456
  store ptr %26, ptr %55, align 8, !tbaa !32
  br label %56

56:                                               ; preds = %54, %53, %45, %40, %28, %17, %4
  %.0 = phi i32 [ -1, %4 ], [ -3, %17 ], [ -4, %28 ], [ -4, %40 ], [ -4, %45 ], [ -4, %53 ], [ 0, %54 ]
  ret i32 %.0
}

declare void @cpProcessError(ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, ...) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden i32 @cpDenseInit(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @cpDenseSetup(ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @cpDenseSolve(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden void @cpDenseFree(ptr noundef) #0

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #2

declare ptr @NewDenseMat(i32 noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #3

declare ptr @NewIntArray(i32 noundef) local_unnamed_addr #1

declare void @DestroyMat(ptr noundef) local_unnamed_addr #1

declare void @DestroyArray(ptr noundef) local_unnamed_addr #1

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

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 = { "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 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(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 #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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { nounwind }
attributes #6 = { nounwind allocsize(0) }

!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, !11, i64 232}
!6 = !{!"CPodeMemRec", !7, i64 0, !10, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !10, i64 40, !10, i64 44, !10, i64 48, !7, i64 56, !7, i64 64, !11, i64 72, !11, i64 80, !11, i64 88, !8, i64 96, !11, i64 200, !11, i64 208, !11, i64 216, !11, i64 224, !11, i64 232, !11, i64 240, !10, i64 248, !10, i64 252, !10, i64 256, !10, i64 260, !10, i64 264, !7, i64 272, !7, i64 280, !7, i64 288, !7, i64 296, !7, i64 304, !7, i64 312, !7, i64 320, !7, i64 328, !8, i64 336, !8, i64 448, !8, i64 496, !8, i64 600, !7, i64 704, !7, i64 712, !7, i64 720, !7, i64 728, !7, i64 736, !7, i64 744, !7, i64 752, !10, i64 760, !10, i64 764, !10, i64 768, !10, i64 772, !12, i64 776, !12, i64 784, !10, i64 792, !10, i64 796, !11, i64 800, !11, i64 808, !11, i64 816, !11, i64 824, !7, i64 832, !11, i64 840, !11, i64 848, !11, i64 856, !12, i64 864, !12, i64 872, !7, i64 880, !10, i64 888, !10, i64 892, !10, i64 896, !11, i64 904, !11, i64 912, !11, i64 920, !11, i64 928, !10, i64 936, !12, i64 944, !12, i64 952, !12, i64 960, !12, i64 968, !10, i64 976, !10, i64 980, !11, i64 984, !11, i64 992, !10, i64 1000, !10, i64 1004, !7, i64 1008, !7, i64 1016, !11, i64 1024, !8, i64 1032, !11, i64 1136, !11, i64 1144, !11, i64 1152, !11, i64 1160, !7, i64 1168, !12, i64 1176, !12, i64 1184, !10, i64 1192, !10, i64 1196, !10, i64 1200, !12, i64 1208, !12, i64 1216, !10, i64 1224, !10, i64 1228, !7, i64 1232, !10, i64 1240, !12, i64 1248, !10, i64 1256, !10, i64 1260, !10, i64 1264, !10, i64 1268, !7, i64 1272, !7, i64 1280, !7, i64 1288, !12, i64 1296, !12, i64 1304, !12, i64 1312, !12, i64 1320, !12, i64 1328, !12, i64 1336, !10, i64 1344, !7, i64 1352, !7, i64 1360, !7, i64 1368, !12, i64 1376, !12, i64 1384, !12, i64 1392, !12, i64 1400, !12, i64 1408, !12, i64 1416, !11, i64 1424, !11, i64 1432, !11, i64 1440, !11, i64 1448, !11, i64 1456, !10, i64 1464, !11, i64 1472, !11, i64 1480, !11, i64 1488, !11, i64 1496, !11, i64 1504, !11, i64 1512, !10, i64 1520, !10, i64 1524, !12, i64 1528, !7, i64 1536, !7, i64 1544, !7, i64 1552, !10, i64 1560, !7, i64 1568, !10, i64 1576, !10, i64 1580, !10, i64 1584, !10, i64 1588, !10, i64 1592, !10, i64 1596, !11, i64 1600, !11, i64 1608, !11, i64 1616, !10, i64 1624, !8, i64 1632, !10, i64 1824, !12, i64 1832, !10, i64 1840, !11, i64 1848, !10, i64 1856, !11, i64 1864, !11, i64 1872, !11, i64 1880, !11, i64 1888, !7, i64 1896, !7, i64 1904, !7, i64 1912, !11, i64 1920, !11, i64 1928, !11, i64 1936, !7, i64 1944, !10, i64 1952, !10, i64 1956, !12, i64 1960, !7, i64 1968, !7, i64 1976, !10, i64 1984, !10, i64 1988, !11, i64 1992, !11, i64 2000}
!7 = !{!"double", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!"long", !8, i64 0}
!13 = !{!14, !11, i64 8}
!14 = !{!"_generic_N_Vector", !11, i64 0, !11, i64 8}
!15 = !{!16, !11, i64 32}
!16 = !{!"_generic_N_Vector_Ops", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !11, i64 40, !11, i64 48, !11, i64 56, !11, i64 64, !11, i64 72, !11, i64 80, !11, i64 88, !11, i64 96, !11, i64 104, !11, i64 112, !11, i64 120, !11, i64 128, !11, i64 136, !11, i64 144, !11, i64 152, !11, i64 160, !11, i64 168, !11, i64 176, !11, i64 184, !11, i64 192}
!17 = !{!16, !11, i64 40}
!18 = !{!6, !11, i64 1448}
!19 = !{!6, !11, i64 1424}
!20 = !{!6, !11, i64 1432}
!21 = !{!6, !11, i64 1440}
!22 = !{!23, !10, i64 0}
!23 = !{!"", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !11, i64 24, !11, i64 32, !11, i64 40, !11, i64 48, !11, i64 56, !11, i64 64, !11, i64 72, !11, i64 80, !12, i64 88, !12, i64 96, !12, i64 104, !10, i64 112}
!24 = !{!23, !11, i64 56}
!25 = !{!23, !10, i64 112}
!26 = !{!6, !10, i64 1464}
!27 = !{!23, !10, i64 4}
!28 = !{!23, !11, i64 64}
!29 = !{!23, !11, i64 80}
!30 = !{!6, !10, i64 8}
!31 = !{!23, !11, i64 72}
!32 = !{!6, !11, i64 1456}


; Effective O3 passes: CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,MemCpyOptPass,SROAPass,SimplifyCFGPass,TailCallElimPass