; LLVM IR from simbody/simbody :: SimTKmath/Integrators/src/CPodes/sundials/tests (pend)

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

@.str = external hidden unnamed_addr constant [12 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [73 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca double, align 8
  %7 = alloca double, align 8
  %8 = alloca double, align 8
  %9 = alloca double, align 8
  %10 = alloca double, align 8
  %11 = alloca double, align 8
  %12 = alloca double, align 8
  %13 = alloca double, align 8
  %14 = alloca double, align 8
  %15 = alloca double, align 8
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #4
  %19 = call i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef 8)
  %20 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, i32 noundef 16)
  %21 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i32 noundef 4)
  %22 = call i32 (ptr, ...) @printf(ptr noundef @.str.3, i32 noundef 8)
  %23 = call ptr @N_VNew_Serial(i64 noundef 4)
  store ptr %23, ptr %3, align 8, !tbaa !5
  %24 = call ptr @N_VNew_Serial(i64 noundef 4)
  store ptr %24, ptr %4, align 8, !tbaa !5
  %25 = load ptr, ptr %3, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct._generic_N_Vector, ptr %25, i32 0, i32 0
  %27 = load ptr, ptr %26, align 8, !tbaa !9
  %28 = getelementptr inbounds %struct._N_VectorContent_Serial, ptr %27, i32 0, i32 2
  %29 = load ptr, ptr %28, align 8, !tbaa !11
  %30 = getelementptr inbounds double, ptr %29, i64 0
  store double 1.000000e+00, ptr %30, align 8, !tbaa !15
  %31 = load ptr, ptr %3, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct._generic_N_Vector, ptr %31, i32 0, i32 0
  %33 = load ptr, ptr %32, align 8, !tbaa !9
  %34 = getelementptr inbounds %struct._N_VectorContent_Serial, ptr %33, i32 0, i32 2
  %35 = load ptr, ptr %34, align 8, !tbaa !11
  %36 = getelementptr inbounds double, ptr %35, i64 1
  store double 0.000000e+00, ptr %36, align 8, !tbaa !15
  %37 = load ptr, ptr %3, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct._generic_N_Vector, ptr %37, i32 0, i32 0
  %39 = load ptr, ptr %38, align 8, !tbaa !9
  %40 = getelementptr inbounds %struct._N_VectorContent_Serial, ptr %39, i32 0, i32 2
  %41 = load ptr, ptr %40, align 8, !tbaa !11
  %42 = getelementptr inbounds double, ptr %41, i64 2
  store double 0.000000e+00, ptr %42, align 8, !tbaa !15
  %43 = load ptr, ptr %3, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct._generic_N_Vector, ptr %43, i32 0, i32 0
  %45 = load ptr, ptr %44, align 8, !tbaa !9
  %46 = getelementptr inbounds %struct._N_VectorContent_Serial, ptr %45, i32 0, i32 2
  %47 = load ptr, ptr %46, align 8, !tbaa !11
  %48 = getelementptr inbounds double, ptr %47, i64 3
  store double 0.000000e+00, ptr %48, align 8, !tbaa !15
  store double 1.000000e-08, ptr %6, align 8, !tbaa !15
  store double 1.000000e-08, ptr %7, align 8, !tbaa !15
  store i32 30, ptr %17, align 4, !tbaa !17
  %49 = load i32, ptr %17, align 4, !tbaa !17
  %50 = sitofp i32 %49 to double
  %51 = fmul double %50, 1.000000e+00
  store double %51, ptr %10, align 8, !tbaa !15
  %52 = call ptr @CPodeCreate(i32 noundef 1, i32 noundef 2, i32 noundef 2)
  store ptr %52, ptr %2, align 8, !tbaa !5
  %53 = load ptr, ptr %2, align 8, !tbaa !5
  %54 = load ptr, ptr %3, align 8, !tbaa !5
  %55 = load ptr, ptr %4, align 8, !tbaa !5
  %56 = load double, ptr %6, align 8, !tbaa !15
  %57 = call i32 @CPodeInit(ptr noundef %53, ptr noundef @f, ptr noundef null, double noundef 0.000000e+00, ptr noundef %54, ptr noundef %55, i32 noundef 1, double noundef %56, ptr noundef %7)
  store i32 %57, ptr %18, align 4, !tbaa !17
  %58 = load ptr, ptr %2, align 8, !tbaa !5
  %59 = call i32 @CPodeSetMaxNumSteps(ptr noundef %58, i64 noundef 5000)
  store i32 %59, ptr %18, align 4, !tbaa !17
  %60 = load ptr, ptr %2, align 8, !tbaa !5
  %61 = load double, ptr %10, align 8, !tbaa !15
  %62 = call i32 @CPodeSetStopTime(ptr noundef %60, double noundef %61)
  store i32 %62, ptr %18, align 4, !tbaa !17
  %63 = load ptr, ptr %2, align 8, !tbaa !5
  %64 = call i32 @CPDense(ptr noundef %63, i32 noundef 4)
  store i32 %64, ptr %18, align 4, !tbaa !17
  %65 = call ptr @N_VNew_Serial(i64 noundef 2)
  store ptr %65, ptr %5, align 8, !tbaa !5
  %66 = load ptr, ptr %5, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct._generic_N_Vector, ptr %66, i32 0, i32 0
  %68 = load ptr, ptr %67, align 8, !tbaa !9
  %69 = getelementptr inbounds %struct._N_VectorContent_Serial, ptr %68, i32 0, i32 2
  %70 = load ptr, ptr %69, align 8, !tbaa !11
  %71 = getelementptr inbounds double, ptr %70, i64 0
  store double 1.000000e-08, ptr %71, align 8, !tbaa !15
  %72 = load ptr, ptr %5, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct._generic_N_Vector, ptr %72, i32 0, i32 0
  %74 = load ptr, ptr %73, align 8, !tbaa !9
  %75 = getelementptr inbounds %struct._N_VectorContent_Serial, ptr %74, i32 0, i32 2
  %76 = load ptr, ptr %75, align 8, !tbaa !11
  %77 = getelementptr inbounds double, ptr %76, i64 1
  store double 1.000000e-08, ptr %77, align 8, !tbaa !15
  %78 = load ptr, ptr %2, align 8, !tbaa !5
  %79 = load ptr, ptr %5, align 8, !tbaa !5
  %80 = call i32 @CPodeProjInit(ptr noundef %78, i32 noundef 1, i32 noundef 2, ptr noundef @cfun, ptr noundef null, ptr noundef %79)
  store i32 %80, ptr %18, align 4, !tbaa !17
  %81 = load ptr, ptr %2, align 8, !tbaa !5
  %82 = call i32 @CPodeSetProjTestCnstr(ptr noundef %81, i32 noundef 1)
  store i32 %82, ptr %18, align 4, !tbaa !17
  %83 = load ptr, ptr %2, align 8, !tbaa !5
  %84 = call i32 @CPDenseProj(ptr noundef %83, i32 noundef 2, i32 noundef 4, i32 noundef 1)
  store i32 %84, ptr %18, align 4, !tbaa !17
  %85 = load ptr, ptr %2, align 8, !tbaa !5
  %86 = call i32 @CPodeSetProjUpdateErrEst(ptr noundef %85, i32 noundef 0)
  store i32 %86, ptr %18, align 4, !tbaa !17
  store double 0.000000e+00, ptr %8, align 8, !tbaa !15
  store i32 1, ptr %16, align 4, !tbaa !17
  br label %87

87:                                               ; preds = %146, %0
  %88 = load i32, ptr %16, align 4, !tbaa !17
  %89 = load i32, ptr %17, align 4, !tbaa !17
  %90 = icmp sle i32 %88, %89
  br i1 %90, label %91, label %149

91:                                               ; preds = %87
  %92 = load i32, ptr %16, align 4, !tbaa !17
  %93 = sitofp i32 %92 to double
  %94 = fmul double %93, 1.000000e+00
  store double %94, ptr %9, align 8, !tbaa !15
  %95 = load ptr, ptr %2, align 8, !tbaa !5
  %96 = load double, ptr %9, align 8, !tbaa !15
  %97 = load ptr, ptr %3, align 8, !tbaa !5
  %98 = load ptr, ptr %4, align 8, !tbaa !5
  %99 = call i32 @CPode(ptr noundef %95, double noundef %96, ptr noundef %8, ptr noundef %97, ptr noundef %98, i32 noundef 3)
  store i32 %99, ptr %18, align 4, !tbaa !17
  %100 = load i32, ptr %18, align 4, !tbaa !17
  %101 = icmp slt i32 %100, 0
  br i1 %101, label %102, label %103

102:                                              ; preds = %91
  br label %149

103:                                              ; preds = %91
  %104 = load ptr, ptr %3, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct._generic_N_Vector, ptr %104, i32 0, i32 0
  %106 = load ptr, ptr %105, align 8, !tbaa !9
  %107 = getelementptr inbounds %struct._N_VectorContent_Serial, ptr %106, i32 0, i32 2
  %108 = load ptr, ptr %107, align 8, !tbaa !11
  %109 = getelementptr inbounds double, ptr %108, i64 0
  %110 = load double, ptr %109, align 8, !tbaa !15
  store double %110, ptr %11, align 8, !tbaa !15
  %111 = load ptr, ptr %3, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct._generic_N_Vector, ptr %111, i32 0, i32 0
  %113 = load ptr, ptr %112, align 8, !tbaa !9
  %114 = getelementptr inbounds %struct._N_VectorContent_Serial, ptr %113, i32 0, i32 2
  %115 = load ptr, ptr %114, align 8, !tbaa !11
  %116 = getelementptr inbounds double, ptr %115, i64 1
  %117 = load double, ptr %116, align 8, !tbaa !15
  store double %117, ptr %12, align 8, !tbaa !15
  %118 = load ptr, ptr %3, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct._generic_N_Vector, ptr %118, i32 0, i32 0
  %120 = load ptr, ptr %119, align 8, !tbaa !9
  %121 = getelementptr inbounds %struct._N_VectorContent_Serial, ptr %120, i32 0, i32 2
  %122 = load ptr, ptr %121, align 8, !tbaa !11
  %123 = getelementptr inbounds double, ptr %122, i64 2
  %124 = load double, ptr %123, align 8, !tbaa !15
  store double %124, ptr %13, align 8, !tbaa !15
  %125 = load ptr, ptr %3, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct._generic_N_Vector, ptr %125, i32 0, i32 0
  %127 = load ptr, ptr %126, align 8, !tbaa !9
  %128 = getelementptr inbounds %struct._N_VectorContent_Serial, ptr %127, i32 0, i32 2
  %129 = load ptr, ptr %128, align 8, !tbaa !11
  %130 = getelementptr inbounds double, ptr %129, i64 3
  %131 = load double, ptr %130, align 8, !tbaa !15
  store double %131, ptr %14, align 8, !tbaa !15
  %132 = load double, ptr %11, align 8, !tbaa !15
  %133 = load double, ptr %11, align 8, !tbaa !15
  %134 = load double, ptr %12, align 8, !tbaa !15
  %135 = load double, ptr %12, align 8, !tbaa !15
  %136 = fmul double %134, %135
  %137 = call double @llvm.fmuladd.f64(double %132, double %133, double %136)
  %138 = fsub double %137, 1.000000e+00
  store double %138, ptr %15, align 8, !tbaa !15
  %139 = load double, ptr %8, align 8, !tbaa !15
  %140 = load double, ptr %11, align 8, !tbaa !15
  %141 = load double, ptr %12, align 8, !tbaa !15
  %142 = load double, ptr %13, align 8, !tbaa !15
  %143 = load double, ptr %14, align 8, !tbaa !15
  %144 = load double, ptr %15, align 8, !tbaa !15
  %145 = call i32 (ptr, ...) @printf(ptr noundef @.str.4, double noundef %139, double noundef %140, double noundef %141, double noundef %142, double noundef %143, double noundef %144)
  br label %146

146:                                              ; preds = %103
  %147 = load i32, ptr %16, align 4, !tbaa !17
  %148 = add nsw i32 %147, 1
  store i32 %148, ptr %16, align 4, !tbaa !17
  br label %87, !llvm.loop !18

149:                                              ; preds = %102, %87
  %150 = load ptr, ptr %2, align 8, !tbaa !5
  call void @PrintFinalStats(ptr noundef %150)
  %151 = load ptr, ptr %3, align 8, !tbaa !5
  call void @N_VDestroy_Serial(ptr noundef %151)
  %152 = load ptr, ptr %4, align 8, !tbaa !5
  call void @N_VDestroy_Serial(ptr noundef %152)
  %153 = load ptr, ptr %5, align 8, !tbaa !5
  call void @N_VDestroy_Serial(ptr noundef %153)
  call void @CPodeFree(ptr noundef %2)
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #4
  ret i32 0
}

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

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

declare ptr @N_VNew_Serial(i64 noundef) #2

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

declare i32 @CPodeInit(ptr noundef, ptr noundef, ptr noundef, double noundef, ptr noundef, ptr noundef, i32 noundef, double noundef, ptr noundef) #2

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

declare i32 @CPodeSetMaxNumSteps(ptr noundef, i64 noundef) #2

declare i32 @CPodeSetStopTime(ptr noundef, double noundef) #2

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

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

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

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

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

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

declare i32 @CPode(ptr noundef, double noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef) #2

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

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

declare void @N_VDestroy_Serial(ptr noundef) #2

declare void @CPodeFree(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 = { 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !6, i64 0}
!10 = !{!"_generic_N_Vector", !6, i64 0, !6, i64 8}
!11 = !{!12, !6, i64 16}
!12 = !{!"_N_VectorContent_Serial", !13, i64 0, !14, i64 8, !6, i64 16}
!13 = !{!"long", !7, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = !{!16, !16, i64 0}
!16 = !{!"double", !7, i64 0}
!17 = !{!14, !14, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"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"

@.str = external hidden unnamed_addr constant [12 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [73 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca ptr, align 8
  %2 = alloca double, align 8
  %3 = alloca double, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #6
  %4 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef 8)
  %5 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 16)
  %6 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 4)
  %7 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 8)
  %8 = tail call ptr @N_VNew_Serial(i64 noundef 4) #6
  %9 = tail call ptr @N_VNew_Serial(i64 noundef 4) #6
  %10 = load ptr, ptr %8, align 8, !tbaa !5
  %11 = getelementptr inbounds i8, ptr %10, i64 16
  %12 = load ptr, ptr %11, align 8, !tbaa !10
  store double 1.000000e+00, ptr %12, align 8, !tbaa !14
  %13 = getelementptr inbounds i8, ptr %12, i64 8
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %13, i8 0, i64 24, i1 false)
  store double 1.000000e-08, ptr %2, align 8, !tbaa !14
  %14 = tail call ptr @CPodeCreate(i32 noundef 1, i32 noundef 2, i32 noundef 2) #6
  store ptr %14, ptr %1, align 8, !tbaa !16
  %15 = call i32 @CPodeInit(ptr noundef %14, ptr noundef nonnull @f, ptr noundef null, double noundef 0.000000e+00, ptr noundef nonnull %8, ptr noundef %9, i32 noundef 1, double noundef 1.000000e-08, ptr noundef nonnull %2) #6
  %16 = call i32 @CPodeSetMaxNumSteps(ptr noundef %14, i64 noundef 5000) #6
  %17 = call i32 @CPodeSetStopTime(ptr noundef %14, double noundef 3.000000e+01) #6
  %18 = call i32 @CPDense(ptr noundef %14, i32 noundef 4) #6
  %19 = call ptr @N_VNew_Serial(i64 noundef 2) #6
  %20 = load ptr, ptr %19, align 8, !tbaa !5
  %21 = getelementptr inbounds i8, ptr %20, i64 16
  %22 = load ptr, ptr %21, align 8, !tbaa !10
  store <2 x double> <double 1.000000e-08, double 1.000000e-08>, ptr %22, align 8, !tbaa !14
  %23 = call i32 @CPodeProjInit(ptr noundef %14, i32 noundef 1, i32 noundef 2, ptr noundef nonnull @cfun, ptr noundef null, ptr noundef nonnull %19) #6
  %24 = call i32 @CPodeSetProjTestCnstr(ptr noundef %14, i32 noundef 1) #6
  %25 = call i32 @CPDenseProj(ptr noundef %14, i32 noundef 2, i32 noundef 4, i32 noundef 1) #6
  %26 = call i32 @CPodeSetProjUpdateErrEst(ptr noundef %14, i32 noundef 0) #6
  store double 0.000000e+00, ptr %3, align 8, !tbaa !14
  br label %27

27:                                               ; preds = %0, %31
  %.035 = phi i32 [ 1, %0 ], [ %47, %31 ]
  %28 = uitofp nneg i32 %.035 to double
  %29 = call i32 @CPode(ptr noundef %14, double noundef %28, ptr noundef nonnull %3, ptr noundef nonnull %8, ptr noundef %9, i32 noundef 3) #6
  %30 = icmp slt i32 %29, 0
  br i1 %30, label %48, label %31

31:                                               ; preds = %27
  %32 = load ptr, ptr %8, align 8, !tbaa !5
  %33 = getelementptr inbounds i8, ptr %32, i64 16
  %34 = load ptr, ptr %33, align 8, !tbaa !10
  %35 = load double, ptr %34, align 8, !tbaa !14
  %36 = getelementptr inbounds i8, ptr %34, i64 8
  %37 = load double, ptr %36, align 8, !tbaa !14
  %38 = getelementptr inbounds i8, ptr %34, i64 16
  %39 = load double, ptr %38, align 8, !tbaa !14
  %40 = getelementptr inbounds i8, ptr %34, i64 24
  %41 = load double, ptr %40, align 8, !tbaa !14
  %42 = fmul double %37, %37
  %43 = call double @llvm.fmuladd.f64(double %35, double %35, double %42)
  %44 = fadd double %43, -1.000000e+00
  %45 = load double, ptr %3, align 8, !tbaa !14
  %46 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, double noundef %45, double noundef %35, double noundef %37, double noundef %39, double noundef %41, double noundef %44)
  %47 = add nuw nsw i32 %.035, 1
  %exitcond.not = icmp eq i32 %47, 31
  br i1 %exitcond.not, label %48, label %27, !llvm.loop !17

48:                                               ; preds = %27, %31
  call void @PrintFinalStats(ptr noundef %14)
  call void @N_VDestroy_Serial(ptr noundef nonnull %8) #6
  call void @N_VDestroy_Serial(ptr noundef %9) #6
  call void @N_VDestroy_Serial(ptr noundef nonnull %19) #6
  call void @CPodeFree(ptr noundef nonnull %1) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #6
  ret i32 0
}

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

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2

declare ptr @N_VNew_Serial(i64 noundef) local_unnamed_addr #3

declare ptr @CPodeCreate(i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #3

declare i32 @CPodeInit(ptr noundef, ptr noundef, ptr noundef, double noundef, ptr noundef, ptr noundef, i32 noundef, double noundef, ptr noundef) local_unnamed_addr #3

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

declare i32 @CPodeSetMaxNumSteps(ptr noundef, i64 noundef) local_unnamed_addr #3

declare i32 @CPodeSetStopTime(ptr noundef, double noundef) local_unnamed_addr #3

declare i32 @CPDense(ptr noundef, i32 noundef) local_unnamed_addr #3

declare i32 @CPodeProjInit(ptr noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

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

declare i32 @CPodeSetProjTestCnstr(ptr noundef, i32 noundef) local_unnamed_addr #3

declare i32 @CPDenseProj(ptr noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #3

declare i32 @CPodeSetProjUpdateErrEst(ptr noundef, i32 noundef) local_unnamed_addr #3

declare i32 @CPode(ptr noundef, double noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #3

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

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

declare void @N_VDestroy_Serial(ptr noundef) local_unnamed_addr #3

declare void @CPodeFree(ptr noundef) local_unnamed_addr #3

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 0}
!6 = !{!"_generic_N_Vector", !7, i64 0, !7, i64 8}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!11, !7, i64 16}
!11 = !{!"_N_VectorContent_Serial", !12, i64 0, !13, i64 8, !7, i64 16}
!12 = !{!"long", !8, i64 0}
!13 = !{!"int", !8, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"double", !8, i64 0}
!16 = !{!7, !7, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,LoopRotatePass,MemCpyOptPass,PostOrderFunctionAttrsPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass