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

; 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._DlsMat = type { i32, i32, i32, i32, i32, i32, i32, ptr, i32, ptr }
%struct.CPDlsMemRec = type { i32, i32, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i64, i64, i64, i32 }

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

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

declare ptr @N_VGetArrayPointer(ptr noundef) #1

declare double @RSqrt(double noundef) #1

declare double @RAbs(double noundef) #1

declare void @N_VSetArrayPointer(ptr noundef, ptr noundef) #1

declare void @N_VLinearSum(double noundef, ptr noundef, double noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
define dso_local i32 @cpDlsDenseDQJacImpl(i32 noundef %0, double noundef %1, double noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %8, ptr noundef %9, ptr noundef %10) #2 {
  %12 = alloca i32, align 4
  %13 = alloca double, align 8
  %14 = alloca double, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca ptr, align 8
  %22 = alloca ptr, align 8
  %23 = alloca double, align 8
  %24 = alloca double, align 8
  %25 = alloca double, align 8
  %26 = alloca double, align 8
  %27 = alloca double, align 8
  %28 = alloca ptr, align 8
  %29 = alloca ptr, align 8
  %30 = alloca ptr, align 8
  %31 = alloca ptr, align 8
  %32 = alloca ptr, align 8
  %33 = alloca ptr, align 8
  %34 = alloca i32, align 4
  %35 = alloca i32, align 4
  %36 = alloca ptr, align 8
  %37 = alloca ptr, align 8
  store i32 %0, ptr %12, align 4, !tbaa !5
  store double %1, ptr %13, align 8, !tbaa !9
  store double %2, ptr %14, align 8, !tbaa !9
  store ptr %3, ptr %15, align 8, !tbaa !11
  store ptr %4, ptr %16, align 8, !tbaa !11
  store ptr %5, ptr %17, align 8, !tbaa !11
  store ptr %6, ptr %18, align 8, !tbaa !11
  store ptr %7, ptr %19, align 8, !tbaa !11
  store ptr %8, ptr %20, align 8, !tbaa !11
  store ptr %9, ptr %21, align 8, !tbaa !11
  store ptr %10, ptr %22, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #4
  store i32 0, ptr %35, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #4
  %38 = load ptr, ptr %19, align 8, !tbaa !11
  store ptr %38, ptr %36, align 8, !tbaa !11
  %39 = load ptr, ptr %36, align 8, !tbaa !11
  %40 = getelementptr inbounds %struct.CPodeMemRec, ptr %39, i32 0, i32 129
  %41 = load ptr, ptr %40, align 8, !tbaa !13
  store ptr %41, ptr %37, align 8, !tbaa !11
  %42 = load ptr, ptr %21, align 8, !tbaa !11
  %43 = call ptr @N_VGetArrayPointer(ptr noundef %42)
  store ptr %43, ptr %28, align 8, !tbaa !11
  %44 = load ptr, ptr %20, align 8, !tbaa !11
  store ptr %44, ptr %32, align 8, !tbaa !11
  %45 = load ptr, ptr %21, align 8, !tbaa !11
  store ptr %45, ptr %33, align 8, !tbaa !11
  %46 = load ptr, ptr %36, align 8, !tbaa !11
  %47 = getelementptr inbounds %struct.CPodeMemRec, ptr %46, i32 0, i32 14
  %48 = load ptr, ptr %47, align 8, !tbaa !16
  %49 = call ptr @N_VGetArrayPointer(ptr noundef %48)
  store ptr %49, ptr %31, align 8, !tbaa !11
  %50 = load ptr, ptr %15, align 8, !tbaa !11
  %51 = call ptr @N_VGetArrayPointer(ptr noundef %50)
  store ptr %51, ptr %29, align 8, !tbaa !11
  %52 = load ptr, ptr %16, align 8, !tbaa !11
  %53 = call ptr @N_VGetArrayPointer(ptr noundef %52)
  store ptr %53, ptr %30, align 8, !tbaa !11
  %54 = load ptr, ptr %36, align 8, !tbaa !11
  %55 = getelementptr inbounds %struct.CPodeMemRec, ptr %54, i32 0, i32 0
  %56 = load double, ptr %55, align 8, !tbaa !17
  %57 = call double @RSqrt(double noundef %56)
  store double %57, ptr %27, align 8, !tbaa !9
  store i32 0, ptr %34, align 4, !tbaa !5
  br label %58

58:                                               ; preds = %221, %11
  %59 = load i32, ptr %34, align 4, !tbaa !5
  %60 = load i32, ptr %12, align 4, !tbaa !5
  %61 = icmp slt i32 %59, %60
  br i1 %61, label %62, label %224

62:                                               ; preds = %58
  %63 = load ptr, ptr %18, align 8, !tbaa !11
  %64 = getelementptr inbounds %struct._DlsMat, ptr %63, i32 0, i32 9
  %65 = load ptr, ptr %64, align 8, !tbaa !18
  %66 = load i32, ptr %34, align 4, !tbaa !5
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds ptr, ptr %65, i64 %67
  %69 = load ptr, ptr %68, align 8, !tbaa !11
  %70 = load ptr, ptr %33, align 8, !tbaa !11
  call void @N_VSetArrayPointer(ptr noundef %69, ptr noundef %70)
  %71 = load ptr, ptr %29, align 8, !tbaa !11
  %72 = load i32, ptr %34, align 4, !tbaa !5
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds double, ptr %71, i64 %73
  %75 = load double, ptr %74, align 8, !tbaa !9
  store double %75, ptr %25, align 8, !tbaa !9
  %76 = load ptr, ptr %30, align 8, !tbaa !11
  %77 = load i32, ptr %34, align 4, !tbaa !5
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds double, ptr %76, i64 %78
  %80 = load double, ptr %79, align 8, !tbaa !9
  store double %80, ptr %26, align 8, !tbaa !9
  %81 = load double, ptr %27, align 8, !tbaa !9
  %82 = load double, ptr %25, align 8, !tbaa !9
  %83 = call double @RAbs(double noundef %82)
  %84 = load ptr, ptr %36, align 8, !tbaa !11
  %85 = getelementptr inbounds %struct.CPodeMemRec, ptr %84, i32 0, i32 26
  %86 = load double, ptr %85, align 8, !tbaa !20
  %87 = load double, ptr %26, align 8, !tbaa !9
  %88 = fmul double %86, %87
  %89 = call double @RAbs(double noundef %88)
  %90 = fcmp ogt double %83, %89
  br i1 %90, label %91, label %94

91:                                               ; preds = %62
  %92 = load double, ptr %25, align 8, !tbaa !9
  %93 = call double @RAbs(double noundef %92)
  br label %101

94:                                               ; preds = %62
  %95 = load ptr, ptr %36, align 8, !tbaa !11
  %96 = getelementptr inbounds %struct.CPodeMemRec, ptr %95, i32 0, i32 26
  %97 = load double, ptr %96, align 8, !tbaa !20
  %98 = load double, ptr %26, align 8, !tbaa !9
  %99 = fmul double %97, %98
  %100 = call double @RAbs(double noundef %99)
  br label %101

101:                                              ; preds = %94, %91
  %102 = phi double [ %93, %91 ], [ %100, %94 ]
  %103 = fmul double %81, %102
  %104 = load ptr, ptr %31, align 8, !tbaa !11
  %105 = load i32, ptr %34, align 4, !tbaa !5
  %106 = sext i32 %105 to i64
  %107 = getelementptr inbounds double, ptr %104, i64 %106
  %108 = load double, ptr %107, align 8, !tbaa !9
  %109 = fdiv double 1.000000e+00, %108
  %110 = fcmp ogt double %103, %109
  br i1 %110, label %111, label %135

111:                                              ; preds = %101
  %112 = load double, ptr %27, align 8, !tbaa !9
  %113 = load double, ptr %25, align 8, !tbaa !9
  %114 = call double @RAbs(double noundef %113)
  %115 = load ptr, ptr %36, align 8, !tbaa !11
  %116 = getelementptr inbounds %struct.CPodeMemRec, ptr %115, i32 0, i32 26
  %117 = load double, ptr %116, align 8, !tbaa !20
  %118 = load double, ptr %26, align 8, !tbaa !9
  %119 = fmul double %117, %118
  %120 = call double @RAbs(double noundef %119)
  %121 = fcmp ogt double %114, %120
  br i1 %121, label %122, label %125

122:                                              ; preds = %111
  %123 = load double, ptr %25, align 8, !tbaa !9
  %124 = call double @RAbs(double noundef %123)
  br label %132

125:                                              ; preds = %111
  %126 = load ptr, ptr %36, align 8, !tbaa !11
  %127 = getelementptr inbounds %struct.CPodeMemRec, ptr %126, i32 0, i32 26
  %128 = load double, ptr %127, align 8, !tbaa !20
  %129 = load double, ptr %26, align 8, !tbaa !9
  %130 = fmul double %128, %129
  %131 = call double @RAbs(double noundef %130)
  br label %132

132:                                              ; preds = %125, %122
  %133 = phi double [ %124, %122 ], [ %131, %125 ]
  %134 = fmul double %112, %133
  br label %142

135:                                              ; preds = %101
  %136 = load ptr, ptr %31, align 8, !tbaa !11
  %137 = load i32, ptr %34, align 4, !tbaa !5
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds double, ptr %136, i64 %138
  %140 = load double, ptr %139, align 8, !tbaa !9
  %141 = fdiv double 1.000000e+00, %140
  br label %142

142:                                              ; preds = %135, %132
  %143 = phi double [ %134, %132 ], [ %141, %135 ]
  store double %143, ptr %23, align 8, !tbaa !9
  %144 = load ptr, ptr %36, align 8, !tbaa !11
  %145 = getelementptr inbounds %struct.CPodeMemRec, ptr %144, i32 0, i32 26
  %146 = load double, ptr %145, align 8, !tbaa !20
  %147 = load double, ptr %26, align 8, !tbaa !9
  %148 = fmul double %146, %147
  %149 = fcmp olt double %148, 0.000000e+00
  br i1 %149, label %150, label %153

150:                                              ; preds = %142
  %151 = load double, ptr %23, align 8, !tbaa !9
  %152 = fneg double %151
  store double %152, ptr %23, align 8, !tbaa !9
  br label %153

153:                                              ; preds = %150, %142
  %154 = load double, ptr %25, align 8, !tbaa !9
  %155 = load double, ptr %23, align 8, !tbaa !9
  %156 = fadd double %154, %155
  %157 = load double, ptr %25, align 8, !tbaa !9
  %158 = fsub double %156, %157
  store double %158, ptr %23, align 8, !tbaa !9
  %159 = load ptr, ptr %36, align 8, !tbaa !11
  %160 = getelementptr inbounds %struct.CPodeMemRec, ptr %159, i32 0, i32 38
  %161 = load double, ptr %160, align 8, !tbaa !21
  %162 = load double, ptr %23, align 8, !tbaa !9
  %163 = load ptr, ptr %29, align 8, !tbaa !11
  %164 = load i32, ptr %34, align 4, !tbaa !5
  %165 = sext i32 %164 to i64
  %166 = getelementptr inbounds double, ptr %163, i64 %165
  %167 = load double, ptr %166, align 8, !tbaa !9
  %168 = call double @llvm.fmuladd.f64(double %161, double %162, double %167)
  store double %168, ptr %166, align 8, !tbaa !9
  %169 = load double, ptr %23, align 8, !tbaa !9
  %170 = load ptr, ptr %30, align 8, !tbaa !11
  %171 = load i32, ptr %34, align 4, !tbaa !5
  %172 = sext i32 %171 to i64
  %173 = getelementptr inbounds double, ptr %170, i64 %172
  %174 = load double, ptr %173, align 8, !tbaa !9
  %175 = fadd double %174, %169
  store double %175, ptr %173, align 8, !tbaa !9
  %176 = load ptr, ptr %36, align 8, !tbaa !11
  %177 = getelementptr inbounds %struct.CPodeMemRec, ptr %176, i32 0, i32 2
  %178 = load ptr, ptr %177, align 8, !tbaa !22
  %179 = load double, ptr %13, align 8, !tbaa !9
  %180 = load ptr, ptr %15, align 8, !tbaa !11
  %181 = load ptr, ptr %16, align 8, !tbaa !11
  %182 = load ptr, ptr %32, align 8, !tbaa !11
  %183 = load ptr, ptr %36, align 8, !tbaa !11
  %184 = getelementptr inbounds %struct.CPodeMemRec, ptr %183, i32 0, i32 4
  %185 = load ptr, ptr %184, align 8, !tbaa !23
  %186 = call i32 %178(double noundef %179, ptr noundef %180, ptr noundef %181, ptr noundef %182, ptr noundef %185)
  store i32 %186, ptr %35, align 4, !tbaa !5
  %187 = load ptr, ptr %37, align 8, !tbaa !11
  %188 = getelementptr inbounds %struct.CPDlsMemRec, ptr %187, i32 0, i32 15
  %189 = load i64, ptr %188, align 8, !tbaa !24
  %190 = add nsw i64 %189, 1
  store i64 %190, ptr %188, align 8, !tbaa !24
  %191 = load i32, ptr %35, align 4, !tbaa !5
  %192 = icmp ne i32 %191, 0
  br i1 %192, label %193, label %194

193:                                              ; preds = %153
  br label %224

194:                                              ; preds = %153
  %195 = load double, ptr %23, align 8, !tbaa !9
  %196 = fdiv double 1.000000e+00, %195
  store double %196, ptr %24, align 8, !tbaa !9
  %197 = load double, ptr %24, align 8, !tbaa !9
  %198 = load ptr, ptr %32, align 8, !tbaa !11
  %199 = load double, ptr %24, align 8, !tbaa !9
  %200 = fneg double %199
  %201 = load ptr, ptr %17, align 8, !tbaa !11
  %202 = load ptr, ptr %33, align 8, !tbaa !11
  call void @N_VLinearSum(double noundef %197, ptr noundef %198, double noundef %200, ptr noundef %201, ptr noundef %202)
  %203 = load ptr, ptr %33, align 8, !tbaa !11
  %204 = call ptr @N_VGetArrayPointer(ptr noundef %203)
  %205 = load ptr, ptr %18, align 8, !tbaa !11
  %206 = getelementptr inbounds %struct._DlsMat, ptr %205, i32 0, i32 9
  %207 = load ptr, ptr %206, align 8, !tbaa !18
  %208 = load i32, ptr %34, align 4, !tbaa !5
  %209 = sext i32 %208 to i64
  %210 = getelementptr inbounds ptr, ptr %207, i64 %209
  store ptr %204, ptr %210, align 8, !tbaa !11
  %211 = load double, ptr %25, align 8, !tbaa !9
  %212 = load ptr, ptr %29, align 8, !tbaa !11
  %213 = load i32, ptr %34, align 4, !tbaa !5
  %214 = sext i32 %213 to i64
  %215 = getelementptr inbounds double, ptr %212, i64 %214
  store double %211, ptr %215, align 8, !tbaa !9
  %216 = load double, ptr %26, align 8, !tbaa !9
  %217 = load ptr, ptr %30, align 8, !tbaa !11
  %218 = load i32, ptr %34, align 4, !tbaa !5
  %219 = sext i32 %218 to i64
  %220 = getelementptr inbounds double, ptr %217, i64 %219
  store double %216, ptr %220, align 8, !tbaa !9
  br label %221

221:                                              ; preds = %194
  %222 = load i32, ptr %34, align 4, !tbaa !5
  %223 = add nsw i32 %222, 1
  store i32 %223, ptr %34, align 4, !tbaa !5
  br label %58, !llvm.loop !26

224:                                              ; preds = %193, %58
  %225 = load ptr, ptr %28, align 8, !tbaa !11
  %226 = load ptr, ptr %21, align 8, !tbaa !11
  call void @N_VSetArrayPointer(ptr noundef %225, ptr noundef %226)
  %227 = load i32, ptr %35, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #4
  ret i32 %227
}

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #3

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


; 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"

declare ptr @N_VGetArrayPointer(ptr noundef) local_unnamed_addr #0

declare double @RSqrt(double noundef) local_unnamed_addr #0

declare double @RAbs(double noundef) local_unnamed_addr #0

declare void @N_VSetArrayPointer(ptr noundef, ptr noundef) local_unnamed_addr #0

declare void @N_VLinearSum(double noundef, ptr noundef, double noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local i32 @cpDlsDenseDQJacImpl(i32 noundef %0, double noundef %1, double noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr nocapture noundef readonly %6, ptr nocapture noundef readonly %7, ptr noundef %8, ptr noundef %9, ptr nocapture noundef readnone %10) local_unnamed_addr #1 {
  %12 = getelementptr inbounds i8, ptr %7, i64 1456
  %13 = load ptr, ptr %12, align 8, !tbaa !5
  %14 = tail call ptr @N_VGetArrayPointer(ptr noundef %9) #3
  %15 = getelementptr inbounds i8, ptr %7, i64 200
  %16 = load ptr, ptr %15, align 8, !tbaa !13
  %17 = tail call ptr @N_VGetArrayPointer(ptr noundef %16) #3
  %18 = tail call ptr @N_VGetArrayPointer(ptr noundef %3) #3
  %19 = tail call ptr @N_VGetArrayPointer(ptr noundef %4) #3
  %20 = load double, ptr %7, align 8, !tbaa !14
  %21 = tail call double @RSqrt(double noundef %20) #3
  %22 = icmp sgt i32 %0, 0
  br i1 %22, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %11
  %23 = getelementptr inbounds i8, ptr %6, i64 48
  %24 = getelementptr inbounds i8, ptr %7, i64 280
  %25 = getelementptr inbounds i8, ptr %7, i64 712
  %26 = getelementptr inbounds i8, ptr %7, i64 16
  %27 = getelementptr inbounds i8, ptr %7, i64 32
  %28 = getelementptr inbounds i8, ptr %13, i64 104
  %wide.trip.count = zext nneg i32 %0 to i64
  br label %29

29:                                               ; preds = %.lr.ph, %82
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %82 ]
  %30 = load ptr, ptr %23, align 8, !tbaa !15
  %31 = getelementptr inbounds ptr, ptr %30, i64 %indvars.iv
  %32 = load ptr, ptr %31, align 8, !tbaa !17
  tail call void @N_VSetArrayPointer(ptr noundef %32, ptr noundef %9) #3
  %33 = getelementptr inbounds double, ptr %18, i64 %indvars.iv
  %34 = load double, ptr %33, align 8, !tbaa !18
  %35 = getelementptr inbounds double, ptr %19, i64 %indvars.iv
  %36 = load double, ptr %35, align 8, !tbaa !18
  %37 = tail call double @RAbs(double noundef %34) #3
  %38 = load double, ptr %24, align 8, !tbaa !19
  %39 = fmul double %36, %38
  %40 = tail call double @RAbs(double noundef %39) #3
  %41 = fcmp ogt double %37, %40
  br i1 %41, label %45, label %42

42:                                               ; preds = %29
  %43 = load double, ptr %24, align 8, !tbaa !19
  %44 = fmul double %36, %43
  br label %45

45:                                               ; preds = %29, %42
  %.sink = phi double [ %44, %42 ], [ %34, %29 ]
  %46 = tail call double @RAbs(double noundef %.sink) #3
  %47 = fmul double %21, %46
  %48 = getelementptr inbounds double, ptr %17, i64 %indvars.iv
  %49 = load double, ptr %48, align 8, !tbaa !18
  %50 = fdiv double 1.000000e+00, %49
  %51 = fcmp ogt double %47, %50
  br i1 %51, label %52, label %64

52:                                               ; preds = %45
  %53 = tail call double @RAbs(double noundef %34) #3
  %54 = load double, ptr %24, align 8, !tbaa !19
  %55 = fmul double %36, %54
  %56 = tail call double @RAbs(double noundef %55) #3
  %57 = fcmp ogt double %53, %56
  br i1 %57, label %61, label %58

58:                                               ; preds = %52
  %59 = load double, ptr %24, align 8, !tbaa !19
  %60 = fmul double %36, %59
  br label %61

61:                                               ; preds = %52, %58
  %.sink84 = phi double [ %60, %58 ], [ %34, %52 ]
  %62 = tail call double @RAbs(double noundef %.sink84) #3
  %63 = fmul double %21, %62
  br label %64

64:                                               ; preds = %45, %61
  %65 = phi double [ %63, %61 ], [ %50, %45 ]
  %66 = load double, ptr %24, align 8, !tbaa !19
  %67 = fmul double %36, %66
  %68 = fcmp olt double %67, 0.000000e+00
  %69 = fneg double %65
  %.0 = select i1 %68, double %69, double %65
  %70 = fadd double %34, %.0
  %71 = fsub double %70, %34
  %72 = load double, ptr %25, align 8, !tbaa !20
  %73 = load double, ptr %33, align 8, !tbaa !18
  %74 = tail call double @llvm.fmuladd.f64(double %72, double %71, double %73)
  store double %74, ptr %33, align 8, !tbaa !18
  %75 = load double, ptr %35, align 8, !tbaa !18
  %76 = fadd double %75, %71
  store double %76, ptr %35, align 8, !tbaa !18
  %77 = load ptr, ptr %26, align 8, !tbaa !21
  %78 = load ptr, ptr %27, align 8, !tbaa !22
  %79 = tail call i32 %77(double noundef %1, ptr noundef %3, ptr noundef %4, ptr noundef %8, ptr noundef %78) #3
  %80 = load i64, ptr %28, align 8, !tbaa !23
  %81 = add nsw i64 %80, 1
  store i64 %81, ptr %28, align 8, !tbaa !23
  %.not = icmp eq i32 %79, 0
  br i1 %.not, label %82, label %._crit_edge

82:                                               ; preds = %64
  %83 = fdiv double 1.000000e+00, %71
  %84 = fneg double %83
  tail call void @N_VLinearSum(double noundef %83, ptr noundef %8, double noundef %84, ptr noundef %5, ptr noundef %9) #3
  %85 = tail call ptr @N_VGetArrayPointer(ptr noundef %9) #3
  %86 = load ptr, ptr %23, align 8, !tbaa !15
  %87 = getelementptr inbounds ptr, ptr %86, i64 %indvars.iv
  store ptr %85, ptr %87, align 8, !tbaa !17
  store double %34, ptr %33, align 8, !tbaa !18
  store double %36, ptr %35, align 8, !tbaa !18
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %29, !llvm.loop !25

._crit_edge:                                      ; preds = %82, %64, %11
  %.1 = phi i32 [ 0, %11 ], [ %79, %64 ], [ 0, %82 ]
  tail call void @N_VSetArrayPointer(ptr noundef %14, ptr noundef %9) #3
  ret i32 %.1
}

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #2

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 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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, !11, i64 1456}
!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 = !{!6, !11, i64 200}
!14 = !{!6, !7, i64 0}
!15 = !{!16, !11, i64 48}
!16 = !{!"_DlsMat", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !11, i64 32, !10, i64 40, !11, i64 48}
!17 = !{!11, !11, i64 0}
!18 = !{!7, !7, i64 0}
!19 = !{!6, !7, i64 280}
!20 = !{!6, !7, i64 712}
!21 = !{!6, !11, i64 16}
!22 = !{!6, !11, i64 32}
!23 = !{!24, !12, i64 104}
!24 = !{!"", !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}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass