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

; 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.anon = type { i32, i32, i32, ptr, ptr, ptr, i64, ptr }

@.str = external hidden unnamed_addr constant [10 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [16 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 ptr @CPBandPrecAlloc(ptr noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3) #0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store i32 %1, ptr %7, align 4, !tbaa !9
  store i32 %2, ptr %8, align 4, !tbaa !9
  store i32 %3, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  %16 = load ptr, ptr %6, align 8, !tbaa !5
  %17 = icmp eq ptr %16, null
  br i1 %17, label %18, label %19

18:                                               ; preds = %4
  call void (ptr, i32, ptr, ptr, ptr, ...) @cpProcessError(ptr noundef null, i32 noundef 0, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.2)
  store ptr null, ptr %5, align 8
  store i32 1, ptr %15, align 4
  br label %169

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

29:                                               ; preds = %19
  %30 = load ptr, ptr %10, align 8, !tbaa !5
  call void (ptr, i32, ptr, ptr, ptr, ...) @cpProcessError(ptr noundef %30, i32 noundef 0, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.3)
  store ptr null, ptr %5, align 8
  store i32 1, ptr %15, align 4
  br label %169

31:                                               ; preds = %19
  store ptr null, ptr %11, align 8, !tbaa !5
  %32 = call noalias ptr @malloc(i64 noundef 56) #6
  store ptr %32, ptr %11, align 8, !tbaa !5
  %33 = load ptr, ptr %11, align 8, !tbaa !5
  %34 = icmp eq ptr %33, null
  br i1 %34, label %35, label %37

35:                                               ; preds = %31
  %36 = load ptr, ptr %10, align 8, !tbaa !5
  call void (ptr, i32, ptr, ptr, ptr, ...) @cpProcessError(ptr noundef %36, i32 noundef 0, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.4)
  store ptr null, ptr %5, align 8
  store i32 1, ptr %15, align 4
  br label %169

37:                                               ; preds = %31
  %38 = load ptr, ptr %6, align 8, !tbaa !5
  %39 = load ptr, ptr %11, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.anon, ptr %39, i32 0, i32 7
  store ptr %38, ptr %40, align 8, !tbaa !19
  %41 = load i32, ptr %7, align 4, !tbaa !9
  %42 = load ptr, ptr %11, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.anon, ptr %42, i32 0, i32 0
  store i32 %41, ptr %43, align 8, !tbaa !21
  %44 = load i32, ptr %7, align 4, !tbaa !9
  %45 = sub nsw i32 %44, 1
  %46 = load i32, ptr %8, align 4, !tbaa !9
  %47 = icmp sgt i32 0, %46
  br i1 %47, label %48, label %49

48:                                               ; preds = %37
  br label %51

49:                                               ; preds = %37
  %50 = load i32, ptr %8, align 4, !tbaa !9
  br label %51

51:                                               ; preds = %49, %48
  %52 = phi i32 [ 0, %48 ], [ %50, %49 ]
  %53 = icmp slt i32 %45, %52
  br i1 %53, label %54, label %57

54:                                               ; preds = %51
  %55 = load i32, ptr %7, align 4, !tbaa !9
  %56 = sub nsw i32 %55, 1
  br label %65

57:                                               ; preds = %51
  %58 = load i32, ptr %8, align 4, !tbaa !9
  %59 = icmp sgt i32 0, %58
  br i1 %59, label %60, label %61

60:                                               ; preds = %57
  br label %63

61:                                               ; preds = %57
  %62 = load i32, ptr %8, align 4, !tbaa !9
  br label %63

63:                                               ; preds = %61, %60
  %64 = phi i32 [ 0, %60 ], [ %62, %61 ]
  br label %65

65:                                               ; preds = %63, %54
  %66 = phi i32 [ %56, %54 ], [ %64, %63 ]
  store i32 %66, ptr %12, align 4, !tbaa !9
  %67 = load ptr, ptr %11, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.anon, ptr %67, i32 0, i32 2
  store i32 %66, ptr %68, align 8, !tbaa !22
  %69 = load i32, ptr %7, align 4, !tbaa !9
  %70 = sub nsw i32 %69, 1
  %71 = load i32, ptr %9, align 4, !tbaa !9
  %72 = icmp sgt i32 0, %71
  br i1 %72, label %73, label %74

73:                                               ; preds = %65
  br label %76

74:                                               ; preds = %65
  %75 = load i32, ptr %9, align 4, !tbaa !9
  br label %76

76:                                               ; preds = %74, %73
  %77 = phi i32 [ 0, %73 ], [ %75, %74 ]
  %78 = icmp slt i32 %70, %77
  br i1 %78, label %79, label %82

79:                                               ; preds = %76
  %80 = load i32, ptr %7, align 4, !tbaa !9
  %81 = sub nsw i32 %80, 1
  br label %90

82:                                               ; preds = %76
  %83 = load i32, ptr %9, align 4, !tbaa !9
  %84 = icmp sgt i32 0, %83
  br i1 %84, label %85, label %86

85:                                               ; preds = %82
  br label %88

86:                                               ; preds = %82
  %87 = load i32, ptr %9, align 4, !tbaa !9
  br label %88

88:                                               ; preds = %86, %85
  %89 = phi i32 [ 0, %85 ], [ %87, %86 ]
  br label %90

90:                                               ; preds = %88, %79
  %91 = phi i32 [ %81, %79 ], [ %89, %88 ]
  store i32 %91, ptr %13, align 4, !tbaa !9
  %92 = load ptr, ptr %11, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.anon, ptr %92, i32 0, i32 1
  store i32 %91, ptr %93, align 4, !tbaa !23
  %94 = load ptr, ptr %11, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.anon, ptr %94, i32 0, i32 6
  store i64 0, ptr %95, align 8, !tbaa !24
  %96 = load ptr, ptr %11, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.anon, ptr %96, i32 0, i32 3
  store ptr null, ptr %97, align 8, !tbaa !25
  %98 = load i32, ptr %7, align 4, !tbaa !9
  %99 = load i32, ptr %12, align 4, !tbaa !9
  %100 = load i32, ptr %13, align 4, !tbaa !9
  %101 = load i32, ptr %12, align 4, !tbaa !9
  %102 = call ptr @NewBandMat(i32 noundef %98, i32 noundef %99, i32 noundef %100, i32 noundef %101)
  %103 = load ptr, ptr %11, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.anon, ptr %103, i32 0, i32 3
  store ptr %102, ptr %104, align 8, !tbaa !25
  %105 = load ptr, ptr %11, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.anon, ptr %105, i32 0, i32 3
  %107 = load ptr, ptr %106, align 8, !tbaa !25
  %108 = icmp eq ptr %107, null
  br i1 %108, label %109, label %112

109:                                              ; preds = %90
  %110 = load ptr, ptr %11, align 8, !tbaa !5
  call void @free(ptr noundef %110) #5
  store ptr null, ptr %11, align 8, !tbaa !5
  %111 = load ptr, ptr %10, align 8, !tbaa !5
  call void (ptr, i32, ptr, ptr, ptr, ...) @cpProcessError(ptr noundef %111, i32 noundef 0, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.4)
  store ptr null, ptr %5, align 8
  store i32 1, ptr %15, align 4
  br label %169

112:                                              ; preds = %90
  %113 = load i32, ptr %7, align 4, !tbaa !9
  %114 = sub nsw i32 %113, 1
  %115 = load i32, ptr %12, align 4, !tbaa !9
  %116 = load i32, ptr %13, align 4, !tbaa !9
  %117 = add nsw i32 %115, %116
  %118 = icmp slt i32 %114, %117
  br i1 %118, label %119, label %122

119:                                              ; preds = %112
  %120 = load i32, ptr %7, align 4, !tbaa !9
  %121 = sub nsw i32 %120, 1
  br label %126

122:                                              ; preds = %112
  %123 = load i32, ptr %12, align 4, !tbaa !9
  %124 = load i32, ptr %13, align 4, !tbaa !9
  %125 = add nsw i32 %123, %124
  br label %126

126:                                              ; preds = %122, %119
  %127 = phi i32 [ %121, %119 ], [ %125, %122 ]
  store i32 %127, ptr %14, align 4, !tbaa !9
  %128 = load ptr, ptr %11, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.anon, ptr %128, i32 0, i32 4
  store ptr null, ptr %129, align 8, !tbaa !26
  %130 = load i32, ptr %7, align 4, !tbaa !9
  %131 = load i32, ptr %12, align 4, !tbaa !9
  %132 = load i32, ptr %13, align 4, !tbaa !9
  %133 = load i32, ptr %14, align 4, !tbaa !9
  %134 = call ptr @NewBandMat(i32 noundef %130, i32 noundef %131, i32 noundef %132, i32 noundef %133)
  %135 = load ptr, ptr %11, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.anon, ptr %135, i32 0, i32 4
  store ptr %134, ptr %136, align 8, !tbaa !26
  %137 = load ptr, ptr %11, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct.anon, ptr %137, i32 0, i32 4
  %139 = load ptr, ptr %138, align 8, !tbaa !26
  %140 = icmp eq ptr %139, null
  br i1 %140, label %141, label %147

141:                                              ; preds = %126
  %142 = load ptr, ptr %11, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.anon, ptr %142, i32 0, i32 3
  %144 = load ptr, ptr %143, align 8, !tbaa !25
  call void @DestroyMat(ptr noundef %144)
  %145 = load ptr, ptr %11, align 8, !tbaa !5
  call void @free(ptr noundef %145) #5
  store ptr null, ptr %11, align 8, !tbaa !5
  %146 = load ptr, ptr %10, align 8, !tbaa !5
  call void (ptr, i32, ptr, ptr, ptr, ...) @cpProcessError(ptr noundef %146, i32 noundef 0, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.4)
  store ptr null, ptr %5, align 8
  store i32 1, ptr %15, align 4
  br label %169

147:                                              ; preds = %126
  %148 = load ptr, ptr %11, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct.anon, ptr %148, i32 0, i32 5
  store ptr null, ptr %149, align 8, !tbaa !27
  %150 = load i32, ptr %7, align 4, !tbaa !9
  %151 = call ptr @NewIntArray(i32 noundef %150)
  %152 = load ptr, ptr %11, align 8, !tbaa !5
  %153 = getelementptr inbounds %struct.anon, ptr %152, i32 0, i32 5
  store ptr %151, ptr %153, align 8, !tbaa !27
  %154 = load ptr, ptr %11, align 8, !tbaa !5
  %155 = getelementptr inbounds %struct.anon, ptr %154, i32 0, i32 3
  %156 = load ptr, ptr %155, align 8, !tbaa !25
  %157 = icmp eq ptr %156, null
  br i1 %157, label %158, label %167

158:                                              ; preds = %147
  %159 = load ptr, ptr %11, align 8, !tbaa !5
  %160 = getelementptr inbounds %struct.anon, ptr %159, i32 0, i32 4
  %161 = load ptr, ptr %160, align 8, !tbaa !26
  call void @DestroyMat(ptr noundef %161)
  %162 = load ptr, ptr %11, align 8, !tbaa !5
  %163 = getelementptr inbounds %struct.anon, ptr %162, i32 0, i32 3
  %164 = load ptr, ptr %163, align 8, !tbaa !25
  call void @DestroyMat(ptr noundef %164)
  %165 = load ptr, ptr %11, align 8, !tbaa !5
  call void @free(ptr noundef %165) #5
  store ptr null, ptr %11, align 8, !tbaa !5
  %166 = load ptr, ptr %10, align 8, !tbaa !5
  call void (ptr, i32, ptr, ptr, ptr, ...) @cpProcessError(ptr noundef %166, i32 noundef 0, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.4)
  store ptr null, ptr %5, align 8
  store i32 1, ptr %15, align 4
  br label %169

167:                                              ; preds = %147
  %168 = load ptr, ptr %11, align 8, !tbaa !5
  store ptr %168, ptr %5, align 8
  store i32 1, ptr %15, align 4
  br label %169

169:                                              ; preds = %167, %158, %141, %109, %35, %29, %18
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  %170 = load ptr, ptr %5, align 8
  ret ptr %170
}

; 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 allocsize(0)
declare noalias ptr @malloc(i64 noundef) #3

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

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

declare void @DestroyMat(ptr noundef) #2

declare ptr @NewIntArray(i32 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 = !{!20, !6, i64 48}
!20 = !{!"", !10, i64 0, !10, i64 4, !10, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !14, i64 40, !6, i64 48}
!21 = !{!20, !10, i64 0}
!22 = !{!20, !10, i64 8}
!23 = !{!20, !10, i64 4}
!24 = !{!20, !14, i64 40}
!25 = !{!20, !6, i64 16}
!26 = !{!20, !6, i64 24}
!27 = !{!20, !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 [10 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [16 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 noalias noundef ptr @CPBandPrecAlloc(ptr noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3) local_unnamed_addr #0 {
  %5 = icmp eq ptr %0, null
  br i1 %5, label %6, label %7

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

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

15:                                               ; preds = %7
  tail call void (ptr, i32, ptr, ptr, ptr, ...) @cpProcessError(ptr noundef nonnull %0, i32 noundef 0, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.3) #5
  br label %42

16:                                               ; preds = %7
  %17 = tail call noalias dereferenceable_or_null(56) ptr @malloc(i64 noundef 56) #6
  %18 = icmp eq ptr %17, null
  br i1 %18, label %19, label %20

19:                                               ; preds = %16
  tail call void (ptr, i32, ptr, ptr, ptr, ...) @cpProcessError(ptr noundef nonnull %0, i32 noundef 0, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.4) #5
  br label %42

20:                                               ; preds = %16
  %21 = getelementptr inbounds i8, ptr %17, i64 48
  store ptr %0, ptr %21, align 8, !tbaa !17
  store i32 %1, ptr %17, align 8, !tbaa !19
  %22 = add nsw i32 %1, -1
  %23 = tail call i32 @llvm.smax.i32(i32 %2, i32 0)
  %.not = icmp slt i32 %23, %1
  %. = select i1 %.not, i32 %23, i32 %22
  %24 = getelementptr inbounds i8, ptr %17, i64 8
  store i32 %., ptr %24, align 8, !tbaa !20
  %25 = tail call i32 @llvm.smax.i32(i32 %3, i32 0)
  %.not65 = icmp slt i32 %25, %1
  %26 = select i1 %.not65, i32 %25, i32 %22
  %27 = getelementptr inbounds i8, ptr %17, i64 4
  store i32 %26, ptr %27, align 4, !tbaa !21
  %28 = getelementptr inbounds i8, ptr %17, i64 40
  store i64 0, ptr %28, align 8, !tbaa !22
  %29 = getelementptr inbounds i8, ptr %17, i64 16
  %30 = tail call ptr @NewBandMat(i32 noundef %1, i32 noundef %., i32 noundef %26, i32 noundef %.) #5
  store ptr %30, ptr %29, align 8, !tbaa !23
  %31 = icmp eq ptr %30, null
  br i1 %31, label %32, label %33

32:                                               ; preds = %20
  tail call void @free(ptr noundef nonnull %17) #5
  tail call void (ptr, i32, ptr, ptr, ptr, ...) @cpProcessError(ptr noundef nonnull %0, i32 noundef 0, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.4) #5
  br label %42

33:                                               ; preds = %20
  %34 = add nsw i32 %26, %.
  %.not66 = icmp slt i32 %34, %1
  %.67 = select i1 %.not66, i32 %34, i32 %22
  %35 = getelementptr inbounds i8, ptr %17, i64 24
  %36 = tail call ptr @NewBandMat(i32 noundef %1, i32 noundef %., i32 noundef %26, i32 noundef %.67) #5
  store ptr %36, ptr %35, align 8, !tbaa !24
  %37 = icmp eq ptr %36, null
  br i1 %37, label %38, label %39

38:                                               ; preds = %33
  tail call void @DestroyMat(ptr noundef nonnull %30) #5
  tail call void @free(ptr noundef nonnull %17) #5
  tail call void (ptr, i32, ptr, ptr, ptr, ...) @cpProcessError(ptr noundef nonnull %0, i32 noundef 0, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.4) #5
  br label %42

39:                                               ; preds = %33
  %40 = getelementptr inbounds i8, ptr %17, i64 32
  %41 = tail call ptr @NewIntArray(i32 noundef %1) #5
  store ptr %41, ptr %40, align 8, !tbaa !25
  br label %42

42:                                               ; preds = %39, %38, %32, %19, %15, %6
  %.0 = phi ptr [ null, %6 ], [ null, %15 ], [ null, %19 ], [ null, %32 ], [ null, %38 ], [ %17, %39 ]
  ret ptr %.0
}

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

; 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 @NewBandMat(i32 noundef, i32 noundef, 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 void @DestroyMat(ptr noundef) local_unnamed_addr #1

declare ptr @NewIntArray(i32 noundef) local_unnamed_addr #1

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smax.i32(i32, i32) #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 nosync nounwind speculatable willreturn memory(none) }
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 = !{!18, !11, i64 48}
!18 = !{!"", !10, i64 0, !10, i64 4, !10, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !12, i64 40, !11, i64 48}
!19 = !{!18, !10, i64 0}
!20 = !{!18, !10, i64 8}
!21 = !{!18, !10, i64 4}
!22 = !{!18, !12, i64 40}
!23 = !{!18, !11, i64 16}
!24 = !{!18, !11, i64 24}
!25 = !{!18, !11, i64 32}


; Effective O3 passes: CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass