; LLVM IR from stan-dev/math :: lib/sundials_6.1.1/src/idas (idas_ls)

; 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.IDAMemRec = type { ptr, double, ptr, ptr, i32, double, double, ptr, i32, i32, ptr, ptr, i32, i32, i32, ptr, ptr, i32, i32, double, double, ptr, i32, i32, i32, i32, ptr, ptr, i32, ptr, ptr, ptr, i32, double, i32, i32, double, ptr, ptr, ptr, i32, ptr, ptr, i32, i32, i32, double, ptr, ptr, ptr, [6 x ptr], [6 x double], [6 x double], [6 x double], [6 x double], [6 x double], ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, [6 x ptr], ptr, ptr, ptr, ptr, [6 x ptr], ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, [6 x ptr], ptr, ptr, ptr, ptr, ptr, double, ptr, ptr, i32, i32, i32, i32, i32, i32, i32, i32, double, double, double, i32, double, i32, i32, i32, i32, i32, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, i32, i32, i32, i32, i64, double, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, double, ptr, ptr, ptr, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, ptr, i32, ptr, i32, ptr, i32, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, ptr, i32, ptr, ptr, double, double, double, ptr, ptr, ptr, double, double, i32, i32, i64, ptr, i32, ptr, [5 x double], ptr, ptr, i32, ptr, i32 }
%struct.IDALsMemRec = type { i32, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, double, double, double, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i32, ptr, ptr, ptr, ptr, i32, ptr, ptr, ptr, ptr }

@.str = external hidden unnamed_addr constant [7 x i8], align 1
@.str.54 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.59 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.60 = external hidden unnamed_addr constant [58 x i8], align 1
@.str.61 = external hidden unnamed_addr constant [56 x i8], align 1

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

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

declare i32 @SUNLinSolGetType(ptr noundef) #1

; Function Attrs: nounwind uwtable
define dso_local i32 @idaLsSetup(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6) #2 {
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  store ptr %0, ptr %9, align 8, !tbaa !5
  store ptr %1, ptr %10, align 8, !tbaa !5
  store ptr %2, ptr %11, align 8, !tbaa !5
  store ptr %3, ptr %12, align 8, !tbaa !5
  store ptr %4, ptr %13, align 8, !tbaa !5
  store ptr %5, ptr %14, align 8, !tbaa !5
  store ptr %6, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #3
  %19 = load ptr, ptr %9, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct.IDAMemRec, ptr %19, i32 0, i32 206
  %21 = load ptr, ptr %20, align 8, !tbaa !9
  %22 = icmp eq ptr %21, null
  br i1 %22, label %23, label %25

23:                                               ; preds = %7
  %24 = load ptr, ptr %9, align 8, !tbaa !5
  call void (ptr, i32, ptr, ptr, ptr, ...) @IDAProcessError(ptr noundef %24, i32 noundef -2, ptr noundef @.str, ptr noundef @.str.59, ptr noundef @.str.54)
  store i32 -2, ptr %8, align 4
  store i32 1, ptr %18, align 4
  br label %128

25:                                               ; preds = %7
  %26 = load ptr, ptr %9, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.IDAMemRec, ptr %26, i32 0, i32 206
  %28 = load ptr, ptr %27, align 8, !tbaa !9
  store ptr %28, ptr %16, align 8, !tbaa !5
  %29 = load ptr, ptr %16, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.IDALsMemRec, ptr %29, i32 0, i32 5
  %31 = load ptr, ptr %30, align 8, !tbaa !14
  %32 = call i32 @SUNLinSolGetType(ptr noundef %31)
  %33 = icmp eq i32 %32, 3
  br i1 %33, label %34, label %40

34:                                               ; preds = %25
  %35 = load ptr, ptr %16, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.IDALsMemRec, ptr %35, i32 0, i32 30
  store i32 0, ptr %36, align 8, !tbaa !16
  %37 = load ptr, ptr %16, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.IDALsMemRec, ptr %37, i32 0, i32 30
  %39 = load i32, ptr %38, align 8, !tbaa !16
  store i32 %39, ptr %8, align 4
  store i32 1, ptr %18, align 4
  br label %128

40:                                               ; preds = %25
  %41 = load ptr, ptr %10, align 8, !tbaa !5
  %42 = load ptr, ptr %16, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.IDALsMemRec, ptr %42, i32 0, i32 10
  store ptr %41, ptr %43, align 8, !tbaa !17
  %44 = load ptr, ptr %11, align 8, !tbaa !5
  %45 = load ptr, ptr %16, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.IDALsMemRec, ptr %45, i32 0, i32 11
  store ptr %44, ptr %46, align 8, !tbaa !18
  %47 = load ptr, ptr %12, align 8, !tbaa !5
  %48 = load ptr, ptr %16, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.IDALsMemRec, ptr %48, i32 0, i32 12
  store ptr %47, ptr %49, align 8, !tbaa !19
  %50 = load ptr, ptr %16, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.IDALsMemRec, ptr %50, i32 0, i32 6
  %52 = load ptr, ptr %51, align 8, !tbaa !20
  %53 = icmp ne ptr %52, null
  br i1 %53, label %54, label %115

54:                                               ; preds = %40
  %55 = load ptr, ptr %16, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.IDALsMemRec, ptr %55, i32 0, i32 17
  %57 = load i64, ptr %56, align 8, !tbaa !21
  %58 = add nsw i64 %57, 1
  store i64 %58, ptr %56, align 8, !tbaa !21
  %59 = load ptr, ptr %16, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.IDALsMemRec, ptr %59, i32 0, i32 5
  %61 = load ptr, ptr %60, align 8, !tbaa !14
  %62 = call i32 @SUNLinSolGetType(ptr noundef %61)
  %63 = icmp eq i32 %62, 0
  br i1 %63, label %64, label %79

64:                                               ; preds = %54
  %65 = load ptr, ptr %16, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.IDALsMemRec, ptr %65, i32 0, i32 6
  %67 = load ptr, ptr %66, align 8, !tbaa !20
  %68 = call i32 @SUNMatZero(ptr noundef %67)
  store i32 %68, ptr %17, align 4, !tbaa !22
  %69 = load i32, ptr %17, align 4, !tbaa !22
  %70 = icmp ne i32 %69, 0
  br i1 %70, label %71, label %78

71:                                               ; preds = %64
  %72 = load ptr, ptr %9, align 8, !tbaa !5
  call void (ptr, i32, ptr, ptr, ptr, ...) @IDAProcessError(ptr noundef %72, i32 noundef -8, ptr noundef @.str, ptr noundef @.str.59, ptr noundef @.str.60)
  %73 = load ptr, ptr %16, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.IDALsMemRec, ptr %73, i32 0, i32 30
  store i32 -8, ptr %74, align 8, !tbaa !16
  %75 = load ptr, ptr %16, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.IDALsMemRec, ptr %75, i32 0, i32 30
  %77 = load i32, ptr %76, align 8, !tbaa !16
  store i32 %77, ptr %8, align 4
  store i32 1, ptr %18, align 4
  br label %128

78:                                               ; preds = %64
  br label %79

79:                                               ; preds = %78, %54
  %80 = load ptr, ptr %16, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.IDALsMemRec, ptr %80, i32 0, i32 3
  %82 = load ptr, ptr %81, align 8, !tbaa !23
  %83 = load ptr, ptr %9, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.IDAMemRec, ptr %83, i32 0, i32 127
  %85 = load double, ptr %84, align 8, !tbaa !24
  %86 = load ptr, ptr %9, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.IDAMemRec, ptr %86, i32 0, i32 129
  %88 = load double, ptr %87, align 8, !tbaa !25
  %89 = load ptr, ptr %10, align 8, !tbaa !5
  %90 = load ptr, ptr %11, align 8, !tbaa !5
  %91 = load ptr, ptr %12, align 8, !tbaa !5
  %92 = load ptr, ptr %16, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.IDALsMemRec, ptr %92, i32 0, i32 6
  %94 = load ptr, ptr %93, align 8, !tbaa !20
  %95 = load ptr, ptr %16, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.IDALsMemRec, ptr %95, i32 0, i32 4
  %97 = load ptr, ptr %96, align 8, !tbaa !26
  %98 = load ptr, ptr %13, align 8, !tbaa !5
  %99 = load ptr, ptr %14, align 8, !tbaa !5
  %100 = load ptr, ptr %15, align 8, !tbaa !5
  %101 = call i32 %82(double noundef %85, double noundef %88, ptr noundef %89, ptr noundef %90, ptr noundef %91, ptr noundef %94, ptr noundef %97, ptr noundef %98, ptr noundef %99, ptr noundef %100)
  store i32 %101, ptr %17, align 4, !tbaa !22
  %102 = load i32, ptr %17, align 4, !tbaa !22
  %103 = icmp slt i32 %102, 0
  br i1 %103, label %104, label %108

104:                                              ; preds = %79
  %105 = load ptr, ptr %9, align 8, !tbaa !5
  call void (ptr, i32, ptr, ptr, ptr, ...) @IDAProcessError(ptr noundef %105, i32 noundef -6, ptr noundef @.str, ptr noundef @.str.59, ptr noundef @.str.61)
  %106 = load ptr, ptr %16, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.IDALsMemRec, ptr %106, i32 0, i32 30
  store i32 -6, ptr %107, align 8, !tbaa !16
  store i32 -1, ptr %8, align 4
  store i32 1, ptr %18, align 4
  br label %128

108:                                              ; preds = %79
  %109 = load i32, ptr %17, align 4, !tbaa !22
  %110 = icmp sgt i32 %109, 0
  br i1 %110, label %111, label %114

111:                                              ; preds = %108
  %112 = load ptr, ptr %16, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.IDALsMemRec, ptr %112, i32 0, i32 30
  store i32 -7, ptr %113, align 8, !tbaa !16
  store i32 1, ptr %8, align 4
  store i32 1, ptr %18, align 4
  br label %128

114:                                              ; preds = %108
  br label %115

115:                                              ; preds = %114, %40
  %116 = load ptr, ptr %16, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.IDALsMemRec, ptr %116, i32 0, i32 5
  %118 = load ptr, ptr %117, align 8, !tbaa !14
  %119 = load ptr, ptr %16, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.IDALsMemRec, ptr %119, i32 0, i32 6
  %121 = load ptr, ptr %120, align 8, !tbaa !20
  %122 = call i32 @SUNLinSolSetup(ptr noundef %118, ptr noundef %121)
  %123 = load ptr, ptr %16, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct.IDALsMemRec, ptr %123, i32 0, i32 30
  store i32 %122, ptr %124, align 8, !tbaa !16
  %125 = load ptr, ptr %16, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.IDALsMemRec, ptr %125, i32 0, i32 30
  %127 = load i32, ptr %126, align 8, !tbaa !16
  store i32 %127, ptr %8, align 4
  store i32 1, ptr %18, align 4
  br label %128

128:                                              ; preds = %115, %111, %104, %71, %34, %23
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #3
  %129 = load i32, ptr %8, align 4
  ret i32 %129
}

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

declare i32 @SUNMatZero(ptr noundef) #1

declare i32 @SUNLinSolSetup(ptr noundef, ptr noundef) #1

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #3 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !6, i64 1832}
!10 = !{!"IDAMemRec", !6, i64 0, !11, i64 8, !6, i64 16, !6, i64 24, !12, i64 32, !11, i64 40, !11, i64 48, !6, i64 56, !12, i64 64, !12, i64 68, !6, i64 72, !6, i64 80, !12, i64 88, !12, i64 92, !12, i64 96, !6, i64 104, !6, i64 112, !12, i64 120, !12, i64 124, !11, i64 128, !11, i64 136, !6, i64 144, !12, i64 152, !12, i64 156, !12, i64 160, !12, i64 164, !6, i64 168, !6, i64 176, !12, i64 184, !6, i64 192, !6, i64 200, !6, i64 208, !12, i64 216, !11, i64 224, !12, i64 232, !12, i64 236, !11, i64 240, !6, i64 248, !6, i64 256, !6, i64 264, !12, i64 272, !6, i64 280, !6, i64 288, !12, i64 296, !12, i64 300, !12, i64 304, !11, i64 312, !6, i64 320, !6, i64 328, !6, i64 336, !7, i64 344, !7, i64 392, !7, i64 440, !7, i64 488, !7, i64 536, !7, i64 584, !6, i64 632, !6, i64 640, !6, i64 648, !6, i64 656, !6, i64 664, !6, i64 672, !6, i64 680, !6, i64 688, !6, i64 696, !6, i64 704, !6, i64 712, !6, i64 720, !6, i64 728, !6, i64 736, !6, i64 744, !6, i64 752, !6, i64 760, !7, i64 768, !6, i64 816, !6, i64 824, !6, i64 832, !6, i64 840, !7, i64 848, !6, i64 896, !6, i64 904, !6, i64 912, !6, i64 920, !6, i64 928, !6, i64 936, !6, i64 944, !6, i64 952, !6, i64 960, !6, i64 968, !6, i64 976, !6, i64 984, !6, i64 992, !6, i64 1000, !6, i64 1008, !6, i64 1016, !7, i64 1024, !6, i64 1072, !6, i64 1080, !6, i64 1088, !6, i64 1096, !6, i64 1104, !11, i64 1112, !6, i64 1120, !6, i64 1128, !12, i64 1136, !12, i64 1140, !12, i64 1144, !12, i64 1148, !12, i64 1152, !12, i64 1156, !12, i64 1160, !12, i64 1164, !11, i64 1168, !11, i64 1176, !11, i64 1184, !12, i64 1192, !11, i64 1200, !12, i64 1208, !12, i64 1212, !12, i64 1216, !12, i64 1220, !12, i64 1224, !11, i64 1232, !11, i64 1240, !11, i64 1248, !11, i64 1256, !11, i64 1264, !11, i64 1272, !11, i64 1280, !11, i64 1288, !11, i64 1296, !11, i64 1304, !11, i64 1312, !11, i64 1320, !11, i64 1328, !11, i64 1336, !11, i64 1344, !11, i64 1352, !11, i64 1360, !12, i64 1368, !12, i64 1372, !12, i64 1376, !12, i64 1380, !13, i64 1384, !11, i64 1392, !13, i64 1400, !13, i64 1408, !13, i64 1416, !13, i64 1424, !13, i64 1432, !13, i64 1440, !13, i64 1448, !13, i64 1456, !13, i64 1464, !13, i64 1472, !13, i64 1480, !13, i64 1488, !13, i64 1496, !13, i64 1504, !13, i64 1512, !13, i64 1520, !13, i64 1528, !13, i64 1536, !13, i64 1544, !13, i64 1552, !13, i64 1560, !13, i64 1568, !13, i64 1576, !13, i64 1584, !11, i64 1592, !6, i64 1600, !6, i64 1608, !6, i64 1616, !12, i64 1624, !12, i64 1628, !12, i64 1632, !12, i64 1636, !12, i64 1640, !12, i64 1644, !12, i64 1648, !12, i64 1652, !12, i64 1656, !12, i64 1660, !12, i64 1664, !12, i64 1668, !12, i64 1672, !6, i64 1680, !12, i64 1688, !6, i64 1696, !12, i64 1704, !6, i64 1712, !12, i64 1720, !6, i64 1728, !6, i64 1736, !6, i64 1744, !6, i64 1752, !6, i64 1760, !6, i64 1768, !12, i64 1776, !12, i64 1780, !6, i64 1784, !6, i64 1792, !6, i64 1800, !6, i64 1808, !6, i64 1816, !6, i64 1824, !6, i64 1832, !12, i64 1840, !12, i64 1844, !6, i64 1848, !12, i64 1856, !6, i64 1864, !6, i64 1872, !11, i64 1880, !11, i64 1888, !11, i64 1896, !6, i64 1904, !6, i64 1912, !6, i64 1920, !11, i64 1928, !11, i64 1936, !12, i64 1944, !12, i64 1948, !13, i64 1952, !6, i64 1960, !12, i64 1968, !6, i64 1976, !7, i64 1984, !6, i64 2024, !6, i64 2032, !12, i64 2040, !6, i64 2048, !12, i64 2056}
!11 = !{!"double", !7, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!"long", !7, i64 0}
!14 = !{!15, !6, i64 32}
!15 = !{!"IDALsMemRec", !12, i64 0, !12, i64 4, !12, 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, !12, i64 96, !11, i64 104, !11, i64 112, !11, i64 120, !13, i64 128, !13, i64 136, !13, i64 144, !13, i64 152, !13, i64 160, !13, i64 168, !13, i64 176, !13, i64 184, !13, i64 192, !13, i64 200, !13, i64 208, !13, i64 216, !13, i64 224, !12, i64 232, !6, i64 240, !6, i64 248, !6, i64 256, !6, i64 264, !12, i64 272, !6, i64 280, !6, i64 288, !6, i64 296, !6, i64 304}
!16 = !{!15, !12, i64 232}
!17 = !{!15, !6, i64 72}
!18 = !{!15, !6, i64 80}
!19 = !{!15, !6, i64 88}
!20 = !{!15, !6, i64 40}
!21 = !{!15, !13, i64 128}
!22 = !{!12, !12, i64 0}
!23 = !{!15, !6, i64 16}
!24 = !{!10, !11, i64 1272}
!25 = !{!10, !11, i64 1288}
!26 = !{!15, !6, i64 24}


; 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 [7 x i8], align 1
@.str.54 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.59 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.60 = external hidden unnamed_addr constant [58 x i8], align 1
@.str.61 = external hidden unnamed_addr constant [56 x i8], align 1

declare void @IDAProcessError(ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, ...) local_unnamed_addr #0

declare i32 @SUNLinSolGetType(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local i32 @idaLsSetup(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6) local_unnamed_addr #1 {
  %8 = getelementptr inbounds i8, ptr %0, i64 1832
  %9 = load ptr, ptr %8, align 8, !tbaa !5
  %10 = icmp eq ptr %9, null
  br i1 %10, label %11, label %12

11:                                               ; preds = %7
  tail call void (ptr, i32, ptr, ptr, ptr, ...) @IDAProcessError(ptr noundef nonnull %0, i32 noundef -2, ptr noundef nonnull @.str, ptr noundef nonnull @.str.59, ptr noundef nonnull @.str.54) #2
  br label %59

12:                                               ; preds = %7
  %13 = getelementptr inbounds i8, ptr %9, i64 32
  %14 = load ptr, ptr %13, align 8, !tbaa !13
  %15 = tail call i32 @SUNLinSolGetType(ptr noundef %14) #2
  %16 = icmp eq i32 %15, 3
  br i1 %16, label %17, label %19

17:                                               ; preds = %12
  %18 = getelementptr inbounds i8, ptr %9, i64 232
  store i32 0, ptr %18, align 8, !tbaa !15
  br label %59

19:                                               ; preds = %12
  %20 = getelementptr inbounds i8, ptr %9, i64 72
  store ptr %1, ptr %20, align 8, !tbaa !16
  %21 = getelementptr inbounds i8, ptr %9, i64 80
  store ptr %2, ptr %21, align 8, !tbaa !17
  %22 = getelementptr inbounds i8, ptr %9, i64 88
  store ptr %3, ptr %22, align 8, !tbaa !18
  %23 = getelementptr inbounds i8, ptr %9, i64 40
  %24 = load ptr, ptr %23, align 8, !tbaa !19
  %.not = icmp eq ptr %24, null
  br i1 %.not, label %54, label %25

25:                                               ; preds = %19
  %26 = getelementptr inbounds i8, ptr %9, i64 128
  %27 = load i64, ptr %26, align 8, !tbaa !20
  %28 = add nsw i64 %27, 1
  store i64 %28, ptr %26, align 8, !tbaa !20
  %29 = load ptr, ptr %13, align 8, !tbaa !13
  %30 = tail call i32 @SUNLinSolGetType(ptr noundef %29) #2
  %31 = icmp eq i32 %30, 0
  br i1 %31, label %32, label %37

32:                                               ; preds = %25
  %33 = load ptr, ptr %23, align 8, !tbaa !19
  %34 = tail call i32 @SUNMatZero(ptr noundef %33) #2
  %.not42 = icmp eq i32 %34, 0
  br i1 %.not42, label %37, label %35

35:                                               ; preds = %32
  tail call void (ptr, i32, ptr, ptr, ptr, ...) @IDAProcessError(ptr noundef nonnull %0, i32 noundef -8, ptr noundef nonnull @.str, ptr noundef nonnull @.str.59, ptr noundef nonnull @.str.60) #2
  %36 = getelementptr inbounds i8, ptr %9, i64 232
  store i32 -8, ptr %36, align 8, !tbaa !15
  br label %59

37:                                               ; preds = %32, %25
  %38 = getelementptr inbounds i8, ptr %9, i64 16
  %39 = load ptr, ptr %38, align 8, !tbaa !21
  %40 = getelementptr inbounds i8, ptr %0, i64 1272
  %41 = load double, ptr %40, align 8, !tbaa !22
  %42 = getelementptr inbounds i8, ptr %0, i64 1288
  %43 = load double, ptr %42, align 8, !tbaa !23
  %44 = load ptr, ptr %23, align 8, !tbaa !19
  %45 = getelementptr inbounds i8, ptr %9, i64 24
  %46 = load ptr, ptr %45, align 8, !tbaa !24
  %47 = tail call i32 %39(double noundef %41, double noundef %43, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %44, ptr noundef %46, ptr noundef %4, ptr noundef %5, ptr noundef %6) #2
  %48 = icmp slt i32 %47, 0
  br i1 %48, label %49, label %51

49:                                               ; preds = %37
  tail call void (ptr, i32, ptr, ptr, ptr, ...) @IDAProcessError(ptr noundef nonnull %0, i32 noundef -6, ptr noundef nonnull @.str, ptr noundef nonnull @.str.59, ptr noundef nonnull @.str.61) #2
  %50 = getelementptr inbounds i8, ptr %9, i64 232
  store i32 -6, ptr %50, align 8, !tbaa !15
  br label %59

51:                                               ; preds = %37
  %.not43 = icmp eq i32 %47, 0
  br i1 %.not43, label %._crit_edge, label %52

._crit_edge:                                      ; preds = %51
  %.pre = load ptr, ptr %23, align 8, !tbaa !19
  br label %54

52:                                               ; preds = %51
  %53 = getelementptr inbounds i8, ptr %9, i64 232
  store i32 -7, ptr %53, align 8, !tbaa !15
  br label %59

54:                                               ; preds = %._crit_edge, %19
  %55 = phi ptr [ %.pre, %._crit_edge ], [ null, %19 ]
  %56 = load ptr, ptr %13, align 8, !tbaa !13
  %57 = tail call i32 @SUNLinSolSetup(ptr noundef %56, ptr noundef %55) #2
  %58 = getelementptr inbounds i8, ptr %9, i64 232
  store i32 %57, ptr %58, align 8, !tbaa !15
  br label %59

59:                                               ; preds = %54, %52, %49, %35, %17, %11
  %.0 = phi i32 [ -2, %11 ], [ 0, %17 ], [ -8, %35 ], [ -1, %49 ], [ 1, %52 ], [ %57, %54 ]
  ret i32 %.0
}

declare i32 @SUNMatZero(ptr noundef) local_unnamed_addr #0

declare i32 @SUNLinSolSetup(ptr noundef, ptr noundef) local_unnamed_addr #0

attributes #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 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 1832}
!6 = !{!"IDAMemRec", !7, i64 0, !10, i64 8, !7, i64 16, !7, i64 24, !11, i64 32, !10, i64 40, !10, i64 48, !7, i64 56, !11, i64 64, !11, i64 68, !7, i64 72, !7, i64 80, !11, i64 88, !11, i64 92, !11, i64 96, !7, i64 104, !7, i64 112, !11, i64 120, !11, i64 124, !10, i64 128, !10, i64 136, !7, i64 144, !11, i64 152, !11, i64 156, !11, i64 160, !11, i64 164, !7, i64 168, !7, i64 176, !11, i64 184, !7, i64 192, !7, i64 200, !7, i64 208, !11, i64 216, !10, i64 224, !11, i64 232, !11, i64 236, !10, i64 240, !7, i64 248, !7, i64 256, !7, i64 264, !11, i64 272, !7, i64 280, !7, i64 288, !11, i64 296, !11, i64 300, !11, i64 304, !10, i64 312, !7, i64 320, !7, i64 328, !7, i64 336, !8, i64 344, !8, i64 392, !8, i64 440, !8, i64 488, !8, i64 536, !8, i64 584, !7, i64 632, !7, i64 640, !7, i64 648, !7, i64 656, !7, i64 664, !7, i64 672, !7, i64 680, !7, i64 688, !7, i64 696, !7, i64 704, !7, i64 712, !7, i64 720, !7, i64 728, !7, i64 736, !7, i64 744, !7, i64 752, !7, i64 760, !8, i64 768, !7, i64 816, !7, i64 824, !7, i64 832, !7, i64 840, !8, i64 848, !7, i64 896, !7, i64 904, !7, i64 912, !7, i64 920, !7, i64 928, !7, i64 936, !7, i64 944, !7, i64 952, !7, i64 960, !7, i64 968, !7, i64 976, !7, i64 984, !7, i64 992, !7, i64 1000, !7, i64 1008, !7, i64 1016, !8, i64 1024, !7, i64 1072, !7, i64 1080, !7, i64 1088, !7, i64 1096, !7, i64 1104, !10, i64 1112, !7, i64 1120, !7, i64 1128, !11, i64 1136, !11, i64 1140, !11, i64 1144, !11, i64 1148, !11, i64 1152, !11, i64 1156, !11, i64 1160, !11, i64 1164, !10, i64 1168, !10, i64 1176, !10, i64 1184, !11, i64 1192, !10, i64 1200, !11, i64 1208, !11, i64 1212, !11, i64 1216, !11, i64 1220, !11, i64 1224, !10, i64 1232, !10, i64 1240, !10, i64 1248, !10, i64 1256, !10, i64 1264, !10, i64 1272, !10, i64 1280, !10, i64 1288, !10, i64 1296, !10, i64 1304, !10, i64 1312, !10, i64 1320, !10, i64 1328, !10, i64 1336, !10, i64 1344, !10, i64 1352, !10, i64 1360, !11, i64 1368, !11, i64 1372, !11, i64 1376, !11, i64 1380, !12, i64 1384, !10, i64 1392, !12, i64 1400, !12, i64 1408, !12, i64 1416, !12, i64 1424, !12, i64 1432, !12, i64 1440, !12, i64 1448, !12, i64 1456, !12, i64 1464, !12, i64 1472, !12, i64 1480, !12, i64 1488, !12, i64 1496, !12, i64 1504, !12, i64 1512, !12, i64 1520, !12, i64 1528, !12, i64 1536, !12, i64 1544, !12, i64 1552, !12, i64 1560, !12, i64 1568, !12, i64 1576, !12, i64 1584, !10, i64 1592, !7, i64 1600, !7, i64 1608, !7, i64 1616, !11, i64 1624, !11, i64 1628, !11, i64 1632, !11, i64 1636, !11, i64 1640, !11, i64 1644, !11, i64 1648, !11, i64 1652, !11, i64 1656, !11, i64 1660, !11, i64 1664, !11, i64 1668, !11, i64 1672, !7, i64 1680, !11, i64 1688, !7, i64 1696, !11, i64 1704, !7, i64 1712, !11, i64 1720, !7, i64 1728, !7, i64 1736, !7, i64 1744, !7, i64 1752, !7, i64 1760, !7, i64 1768, !11, i64 1776, !11, i64 1780, !7, i64 1784, !7, i64 1792, !7, i64 1800, !7, i64 1808, !7, i64 1816, !7, i64 1824, !7, i64 1832, !11, i64 1840, !11, i64 1844, !7, i64 1848, !11, i64 1856, !7, i64 1864, !7, i64 1872, !10, i64 1880, !10, i64 1888, !10, i64 1896, !7, i64 1904, !7, i64 1912, !7, i64 1920, !10, i64 1928, !10, i64 1936, !11, i64 1944, !11, i64 1948, !12, i64 1952, !7, i64 1960, !11, i64 1968, !7, i64 1976, !8, i64 1984, !7, i64 2024, !7, i64 2032, !11, i64 2040, !7, i64 2048, !11, i64 2056}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"double", !8, i64 0}
!11 = !{!"int", !8, i64 0}
!12 = !{!"long", !8, i64 0}
!13 = !{!14, !7, i64 32}
!14 = !{!"IDALsMemRec", !11, i64 0, !11, i64 4, !11, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !7, i64 64, !7, i64 72, !7, i64 80, !7, i64 88, !11, i64 96, !10, i64 104, !10, i64 112, !10, i64 120, !12, i64 128, !12, i64 136, !12, i64 144, !12, i64 152, !12, i64 160, !12, i64 168, !12, i64 176, !12, i64 184, !12, i64 192, !12, i64 200, !12, i64 208, !12, i64 216, !12, i64 224, !11, i64 232, !7, i64 240, !7, i64 248, !7, i64 256, !7, i64 264, !11, i64 272, !7, i64 280, !7, i64 288, !7, i64 296, !7, i64 304}
!15 = !{!14, !11, i64 232}
!16 = !{!14, !7, i64 72}
!17 = !{!14, !7, i64 80}
!18 = !{!14, !7, i64 88}
!19 = !{!14, !7, i64 40}
!20 = !{!14, !12, i64 128}
!21 = !{!14, !7, i64 16}
!22 = !{!6, !10, i64 1272}
!23 = !{!6, !10, i64 1288}
!24 = !{!14, !7, i64 24}


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