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

; 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.anon = type { double, double, double, double }
%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 [2 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [12 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 double, align 8
  %4 = alloca double, align 8
  %5 = alloca double, align 8
  %6 = alloca double, align 8
  %7 = alloca double, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca double, align 8
  %13 = alloca double, align 8
  %14 = alloca double, align 8
  %15 = alloca double, align 8
  %16 = alloca double, align 8
  %17 = alloca double, align 8
  %18 = alloca double, align 8
  %19 = alloca double, align 8
  %20 = alloca double, align 8
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca [1 x i32], align 4
  %25 = alloca [1 x i32], align 4
  %26 = alloca ptr, align 8
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  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 8, ptr %12) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #5
  store double 1.000000e-01, ptr %3, align 8, !tbaa !5
  store double 1.000000e+00, ptr %4, align 8, !tbaa !5
  store double 1.000000e+00, ptr %5, align 8, !tbaa !5
  store double 9.800000e+00, ptr %6, align 8, !tbaa !5
  store double 3.000000e+00, ptr %7, align 8, !tbaa !5
  %27 = call noalias ptr @malloc(i64 noundef 32) #6
  store ptr %27, ptr %2, align 8, !tbaa !9
  %28 = load double, ptr %3, align 8, !tbaa !5
  %29 = load ptr, ptr %2, align 8, !tbaa !9
  %30 = getelementptr inbounds %struct.anon, ptr %29, i32 0, i32 0
  store double %28, ptr %30, align 8, !tbaa !11
  %31 = load double, ptr %4, align 8, !tbaa !5
  %32 = load ptr, ptr %2, align 8, !tbaa !9
  %33 = getelementptr inbounds %struct.anon, ptr %32, i32 0, i32 1
  store double %31, ptr %33, align 8, !tbaa !13
  %34 = load double, ptr %5, align 8, !tbaa !5
  %35 = load ptr, ptr %2, align 8, !tbaa !9
  %36 = getelementptr inbounds %struct.anon, ptr %35, i32 0, i32 2
  store double %34, ptr %36, align 8, !tbaa !14
  %37 = load double, ptr %6, align 8, !tbaa !5
  %38 = load ptr, ptr %2, align 8, !tbaa !9
  %39 = getelementptr inbounds %struct.anon, ptr %38, i32 0, i32 3
  store double %37, ptr %39, align 8, !tbaa !15
  store i32 8, ptr %22, align 4, !tbaa !16
  store i32 4, ptr %23, align 4, !tbaa !16
  %40 = load i32, ptr %22, align 4, !tbaa !16
  %41 = sext i32 %40 to i64
  %42 = call ptr @N_VNew_Serial(i64 noundef %41)
  store ptr %42, ptr %9, align 8, !tbaa !9
  %43 = load i32, ptr %22, align 4, !tbaa !16
  %44 = sext i32 %43 to i64
  %45 = call ptr @N_VNew_Serial(i64 noundef %44)
  store ptr %45, ptr %10, align 8, !tbaa !9
  store double 0.000000e+00, ptr %14, align 8, !tbaa !5
  store double 6.000000e+00, ptr %15, align 8, !tbaa !5
  store double 1.000000e-08, ptr %12, align 8, !tbaa !5
  store double 1.000000e-08, ptr %13, align 8, !tbaa !5
  %46 = load i32, ptr %23, align 4, !tbaa !16
  %47 = sext i32 %46 to i64
  %48 = call ptr @N_VNew_Serial(i64 noundef %47)
  store ptr %48, ptr %11, align 8, !tbaa !9
  %49 = load ptr, ptr %11, align 8, !tbaa !9
  call void @N_VConst(double noundef 1.000000e-08, ptr noundef %49)
  %50 = getelementptr inbounds [1 x i32], ptr %24, i64 0, i64 0
  store i32 -1, ptr %50, align 4, !tbaa !16
  %51 = call noalias ptr @fopen(ptr noundef @.str, ptr noundef @.str.1)
  store ptr %51, ptr %26, align 8, !tbaa !9
  %52 = load double, ptr %3, align 8, !tbaa !5
  %53 = load ptr, ptr %9, align 8, !tbaa !9
  %54 = getelementptr inbounds %struct._generic_N_Vector, ptr %53, i32 0, i32 0
  %55 = load ptr, ptr %54, align 8, !tbaa !18
  %56 = getelementptr inbounds %struct._N_VectorContent_Serial, ptr %55, i32 0, i32 2
  %57 = load ptr, ptr %56, align 8, !tbaa !20
  %58 = getelementptr inbounds double, ptr %57, i64 0
  store double %52, ptr %58, align 8, !tbaa !5
  %59 = load double, ptr %3, align 8, !tbaa !5
  %60 = fneg double %59
  %61 = load ptr, ptr %9, align 8, !tbaa !9
  %62 = getelementptr inbounds %struct._generic_N_Vector, ptr %61, i32 0, i32 0
  %63 = load ptr, ptr %62, align 8, !tbaa !18
  %64 = getelementptr inbounds %struct._N_VectorContent_Serial, ptr %63, i32 0, i32 2
  %65 = load ptr, ptr %64, align 8, !tbaa !20
  %66 = getelementptr inbounds double, ptr %65, i64 4
  store double %60, ptr %66, align 8, !tbaa !5
  %67 = load double, ptr %4, align 8, !tbaa !5
  %68 = fneg double %67
  %69 = load ptr, ptr %9, align 8, !tbaa !9
  %70 = getelementptr inbounds %struct._generic_N_Vector, ptr %69, i32 0, i32 0
  %71 = load ptr, ptr %70, align 8, !tbaa !18
  %72 = getelementptr inbounds %struct._N_VectorContent_Serial, ptr %71, i32 0, i32 2
  %73 = load ptr, ptr %72, align 8, !tbaa !20
  %74 = getelementptr inbounds double, ptr %73, i64 1
  store double %68, ptr %74, align 8, !tbaa !5
  %75 = load double, ptr %4, align 8, !tbaa !5
  %76 = fneg double %75
  %77 = load ptr, ptr %9, align 8, !tbaa !9
  %78 = getelementptr inbounds %struct._generic_N_Vector, ptr %77, i32 0, i32 0
  %79 = load ptr, ptr %78, align 8, !tbaa !18
  %80 = getelementptr inbounds %struct._N_VectorContent_Serial, ptr %79, i32 0, i32 2
  %81 = load ptr, ptr %80, align 8, !tbaa !20
  %82 = getelementptr inbounds double, ptr %81, i64 5
  store double %76, ptr %82, align 8, !tbaa !5
  %83 = load double, ptr %7, align 8, !tbaa !5
  %84 = load ptr, ptr %9, align 8, !tbaa !9
  %85 = getelementptr inbounds %struct._generic_N_Vector, ptr %84, i32 0, i32 0
  %86 = load ptr, ptr %85, align 8, !tbaa !18
  %87 = getelementptr inbounds %struct._N_VectorContent_Serial, ptr %86, i32 0, i32 2
  %88 = load ptr, ptr %87, align 8, !tbaa !20
  %89 = getelementptr inbounds double, ptr %88, i64 2
  store double %83, ptr %89, align 8, !tbaa !5
  %90 = load ptr, ptr %9, align 8, !tbaa !9
  %91 = getelementptr inbounds %struct._generic_N_Vector, ptr %90, i32 0, i32 0
  %92 = load ptr, ptr %91, align 8, !tbaa !18
  %93 = getelementptr inbounds %struct._N_VectorContent_Serial, ptr %92, i32 0, i32 2
  %94 = load ptr, ptr %93, align 8, !tbaa !20
  %95 = getelementptr inbounds double, ptr %94, i64 6
  store double 0.000000e+00, ptr %95, align 8, !tbaa !5
  %96 = load ptr, ptr %9, align 8, !tbaa !9
  %97 = getelementptr inbounds %struct._generic_N_Vector, ptr %96, i32 0, i32 0
  %98 = load ptr, ptr %97, align 8, !tbaa !18
  %99 = getelementptr inbounds %struct._N_VectorContent_Serial, ptr %98, i32 0, i32 2
  %100 = load ptr, ptr %99, align 8, !tbaa !20
  %101 = getelementptr inbounds double, ptr %100, i64 3
  store double 0.000000e+00, ptr %101, align 8, !tbaa !5
  %102 = load ptr, ptr %9, align 8, !tbaa !9
  %103 = getelementptr inbounds %struct._generic_N_Vector, ptr %102, i32 0, i32 0
  %104 = load ptr, ptr %103, align 8, !tbaa !18
  %105 = getelementptr inbounds %struct._N_VectorContent_Serial, ptr %104, i32 0, i32 2
  %106 = load ptr, ptr %105, align 8, !tbaa !20
  %107 = getelementptr inbounds double, ptr %106, i64 7
  store double 0.000000e+00, ptr %107, align 8, !tbaa !5
  %108 = call ptr @CPodeCreate(i32 noundef 1, i32 noundef 2, i32 noundef 2)
  store ptr %108, ptr %8, align 8, !tbaa !9
  %109 = load ptr, ptr %8, align 8, !tbaa !9
  %110 = load ptr, ptr %2, align 8, !tbaa !9
  %111 = load double, ptr %14, align 8, !tbaa !5
  %112 = load ptr, ptr %9, align 8, !tbaa !9
  %113 = load ptr, ptr %10, align 8, !tbaa !9
  %114 = load double, ptr %12, align 8, !tbaa !5
  %115 = call i32 @CPodeInit(ptr noundef %109, ptr noundef @ffun1, ptr noundef %110, double noundef %111, ptr noundef %112, ptr noundef %113, i32 noundef 1, double noundef %114, ptr noundef %13)
  store i32 %115, ptr %21, align 4, !tbaa !16
  %116 = load ptr, ptr %8, align 8, !tbaa !9
  %117 = load i32, ptr %22, align 4, !tbaa !16
  %118 = call i32 @CPDense(ptr noundef %116, i32 noundef %117)
  store i32 %118, ptr %21, align 4, !tbaa !16
  %119 = load ptr, ptr %8, align 8, !tbaa !9
  %120 = load ptr, ptr %2, align 8, !tbaa !9
  %121 = call i32 @CPodeRootInit(ptr noundef %119, i32 noundef 1, ptr noundef @gfun, ptr noundef %120)
  store i32 %121, ptr %21, align 4, !tbaa !16
  %122 = load ptr, ptr %8, align 8, !tbaa !9
  %123 = getelementptr inbounds [1 x i32], ptr %24, i64 0, i64 0
  %124 = call i32 @CPodeSetRootDirection(ptr noundef %122, ptr noundef %123)
  store i32 %124, ptr %21, align 4, !tbaa !16
  %125 = load ptr, ptr %8, align 8, !tbaa !9
  %126 = load ptr, ptr %2, align 8, !tbaa !9
  %127 = load ptr, ptr %11, align 8, !tbaa !9
  %128 = call i32 @CPodeProjInit(ptr noundef %125, i32 noundef 1, i32 noundef 2, ptr noundef @cfun, ptr noundef %126, ptr noundef %127)
  store i32 %128, ptr %21, align 4, !tbaa !16
  %129 = load ptr, ptr %8, align 8, !tbaa !9
  %130 = call i32 @CPodeSetProjTestCnstr(ptr noundef %129, i32 noundef 1)
  store i32 %130, ptr %21, align 4, !tbaa !16
  %131 = load ptr, ptr %8, align 8, !tbaa !9
  %132 = load i32, ptr %23, align 4, !tbaa !16
  %133 = load i32, ptr %22, align 4, !tbaa !16
  %134 = call i32 @CPDenseProj(ptr noundef %131, i32 noundef %132, i32 noundef %133, i32 noundef 1)
  store i32 %134, ptr %21, align 4, !tbaa !16
  %135 = load double, ptr %14, align 8, !tbaa !5
  store double %135, ptr %16, align 8, !tbaa !5
  br label %136

136:                                              ; preds = %212, %0
  %137 = load double, ptr %16, align 8, !tbaa !5
  %138 = load double, ptr %15, align 8, !tbaa !5
  %139 = fcmp olt double %137, %138
  br i1 %139, label %140, label %213

140:                                              ; preds = %136
  %141 = load ptr, ptr %8, align 8, !tbaa !9
  %142 = load double, ptr %15, align 8, !tbaa !5
  %143 = load ptr, ptr %9, align 8, !tbaa !9
  %144 = load ptr, ptr %10, align 8, !tbaa !9
  %145 = call i32 @CPode(ptr noundef %141, double noundef %142, ptr noundef %16, ptr noundef %143, ptr noundef %144, i32 noundef 2)
  store i32 %145, ptr %21, align 4, !tbaa !16
  %146 = load i32, ptr %21, align 4, !tbaa !16
  %147 = icmp slt i32 %146, 0
  br i1 %147, label %148, label %149

148:                                              ; preds = %140
  br label %213

149:                                              ; preds = %140
  %150 = load ptr, ptr %9, align 8, !tbaa !9
  %151 = getelementptr inbounds %struct._generic_N_Vector, ptr %150, i32 0, i32 0
  %152 = load ptr, ptr %151, align 8, !tbaa !18
  %153 = getelementptr inbounds %struct._N_VectorContent_Serial, ptr %152, i32 0, i32 2
  %154 = load ptr, ptr %153, align 8, !tbaa !20
  %155 = getelementptr inbounds double, ptr %154, i64 0
  %156 = load double, ptr %155, align 8, !tbaa !5
  store double %156, ptr %17, align 8, !tbaa !5
  %157 = load ptr, ptr %9, align 8, !tbaa !9
  %158 = getelementptr inbounds %struct._generic_N_Vector, ptr %157, i32 0, i32 0
  %159 = load ptr, ptr %158, align 8, !tbaa !18
  %160 = getelementptr inbounds %struct._N_VectorContent_Serial, ptr %159, i32 0, i32 2
  %161 = load ptr, ptr %160, align 8, !tbaa !20
  %162 = getelementptr inbounds double, ptr %161, i64 4
  %163 = load double, ptr %162, align 8, !tbaa !5
  store double %163, ptr %19, align 8, !tbaa !5
  %164 = load ptr, ptr %9, align 8, !tbaa !9
  %165 = getelementptr inbounds %struct._generic_N_Vector, ptr %164, i32 0, i32 0
  %166 = load ptr, ptr %165, align 8, !tbaa !18
  %167 = getelementptr inbounds %struct._N_VectorContent_Serial, ptr %166, i32 0, i32 2
  %168 = load ptr, ptr %167, align 8, !tbaa !20
  %169 = getelementptr inbounds double, ptr %168, i64 1
  %170 = load double, ptr %169, align 8, !tbaa !5
  store double %170, ptr %18, align 8, !tbaa !5
  %171 = load ptr, ptr %9, align 8, !tbaa !9
  %172 = getelementptr inbounds %struct._generic_N_Vector, ptr %171, i32 0, i32 0
  %173 = load ptr, ptr %172, align 8, !tbaa !18
  %174 = getelementptr inbounds %struct._N_VectorContent_Serial, ptr %173, i32 0, i32 2
  %175 = load ptr, ptr %174, align 8, !tbaa !20
  %176 = getelementptr inbounds double, ptr %175, i64 5
  %177 = load double, ptr %176, align 8, !tbaa !5
  store double %177, ptr %20, align 8, !tbaa !5
  %178 = load ptr, ptr %26, align 8, !tbaa !9
  %179 = load double, ptr %16, align 8, !tbaa !5
  %180 = load double, ptr %17, align 8, !tbaa !5
  %181 = load double, ptr %18, align 8, !tbaa !5
  %182 = load double, ptr %19, align 8, !tbaa !5
  %183 = load double, ptr %20, align 8, !tbaa !5
  %184 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %178, ptr noundef @.str.2, double noundef %179, double noundef %180, double noundef %181, double noundef %182, double noundef %183) #5
  %185 = load i32, ptr %21, align 4, !tbaa !16
  %186 = icmp eq i32 %185, 2
  br i1 %186, label %187, label %209

187:                                              ; preds = %149
  %188 = load ptr, ptr %8, align 8, !tbaa !9
  %189 = getelementptr inbounds [1 x i32], ptr %25, i64 0, i64 0
  %190 = call i32 @CPodeGetRootInfo(ptr noundef %188, ptr noundef %189)
  %191 = load ptr, ptr %26, align 8, !tbaa !9
  %192 = getelementptr inbounds [1 x i32], ptr %25, i64 0, i64 0
  %193 = load i32, ptr %192, align 4, !tbaa !16
  %194 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %191, ptr noundef @.str.3, i32 noundef %193) #5
  %195 = getelementptr inbounds [1 x i32], ptr %25, i64 0, i64 0
  %196 = load i32, ptr %195, align 4, !tbaa !16
  %197 = icmp slt i32 %196, 0
  br i1 %197, label %198, label %208

198:                                              ; preds = %187
  %199 = load ptr, ptr %9, align 8, !tbaa !9
  %200 = load ptr, ptr %2, align 8, !tbaa !9
  call void @contact(ptr noundef %199, ptr noundef %200)
  %201 = load ptr, ptr %8, align 8, !tbaa !9
  %202 = load ptr, ptr %2, align 8, !tbaa !9
  %203 = load double, ptr %16, align 8, !tbaa !5
  %204 = load ptr, ptr %9, align 8, !tbaa !9
  %205 = load ptr, ptr %10, align 8, !tbaa !9
  %206 = load double, ptr %12, align 8, !tbaa !5
  %207 = call i32 @CPodeReInit(ptr noundef %201, ptr noundef @ffun1, ptr noundef %202, double noundef %203, ptr noundef %204, ptr noundef %205, i32 noundef 1, double noundef %206, ptr noundef %13)
  store i32 %207, ptr %21, align 4, !tbaa !16
  br label %208

208:                                              ; preds = %198, %187
  br label %212

209:                                              ; preds = %149
  %210 = load ptr, ptr %26, align 8, !tbaa !9
  %211 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %210, ptr noundef @.str.4) #5
  br label %212

212:                                              ; preds = %209, %208
  br label %136, !llvm.loop !23

213:                                              ; preds = %148, %136
  %214 = load ptr, ptr %8, align 8, !tbaa !9
  call void @PrintFinalStats(ptr noundef %214)
  call void @CPodeFree(ptr noundef %8)
  %215 = load ptr, ptr %26, align 8, !tbaa !9
  %216 = call i32 @fclose(ptr noundef %215)
  %217 = call noalias ptr @fopen(ptr noundef @.str.5, ptr noundef @.str.1)
  store ptr %217, ptr %26, align 8, !tbaa !9
  %218 = load double, ptr %3, align 8, !tbaa !5
  %219 = load ptr, ptr %9, align 8, !tbaa !9
  %220 = getelementptr inbounds %struct._generic_N_Vector, ptr %219, i32 0, i32 0
  %221 = load ptr, ptr %220, align 8, !tbaa !18
  %222 = getelementptr inbounds %struct._N_VectorContent_Serial, ptr %221, i32 0, i32 2
  %223 = load ptr, ptr %222, align 8, !tbaa !20
  %224 = getelementptr inbounds double, ptr %223, i64 0
  store double %218, ptr %224, align 8, !tbaa !5
  %225 = load double, ptr %3, align 8, !tbaa !5
  %226 = fneg double %225
  %227 = load ptr, ptr %9, align 8, !tbaa !9
  %228 = getelementptr inbounds %struct._generic_N_Vector, ptr %227, i32 0, i32 0
  %229 = load ptr, ptr %228, align 8, !tbaa !18
  %230 = getelementptr inbounds %struct._N_VectorContent_Serial, ptr %229, i32 0, i32 2
  %231 = load ptr, ptr %230, align 8, !tbaa !20
  %232 = getelementptr inbounds double, ptr %231, i64 4
  store double %226, ptr %232, align 8, !tbaa !5
  %233 = load double, ptr %4, align 8, !tbaa !5
  %234 = fneg double %233
  %235 = load ptr, ptr %9, align 8, !tbaa !9
  %236 = getelementptr inbounds %struct._generic_N_Vector, ptr %235, i32 0, i32 0
  %237 = load ptr, ptr %236, align 8, !tbaa !18
  %238 = getelementptr inbounds %struct._N_VectorContent_Serial, ptr %237, i32 0, i32 2
  %239 = load ptr, ptr %238, align 8, !tbaa !20
  %240 = getelementptr inbounds double, ptr %239, i64 1
  store double %234, ptr %240, align 8, !tbaa !5
  %241 = load double, ptr %4, align 8, !tbaa !5
  %242 = fneg double %241
  %243 = load ptr, ptr %9, align 8, !tbaa !9
  %244 = getelementptr inbounds %struct._generic_N_Vector, ptr %243, i32 0, i32 0
  %245 = load ptr, ptr %244, align 8, !tbaa !18
  %246 = getelementptr inbounds %struct._N_VectorContent_Serial, ptr %245, i32 0, i32 2
  %247 = load ptr, ptr %246, align 8, !tbaa !20
  %248 = getelementptr inbounds double, ptr %247, i64 5
  store double %242, ptr %248, align 8, !tbaa !5
  %249 = load ptr, ptr %9, align 8, !tbaa !9
  %250 = getelementptr inbounds %struct._generic_N_Vector, ptr %249, i32 0, i32 0
  %251 = load ptr, ptr %250, align 8, !tbaa !18
  %252 = getelementptr inbounds %struct._N_VectorContent_Serial, ptr %251, i32 0, i32 2
  %253 = load ptr, ptr %252, align 8, !tbaa !20
  %254 = getelementptr inbounds double, ptr %253, i64 2
  store double 0.000000e+00, ptr %254, align 8, !tbaa !5
  %255 = load ptr, ptr %9, align 8, !tbaa !9
  %256 = getelementptr inbounds %struct._generic_N_Vector, ptr %255, i32 0, i32 0
  %257 = load ptr, ptr %256, align 8, !tbaa !18
  %258 = getelementptr inbounds %struct._N_VectorContent_Serial, ptr %257, i32 0, i32 2
  %259 = load ptr, ptr %258, align 8, !tbaa !20
  %260 = getelementptr inbounds double, ptr %259, i64 6
  store double 0.000000e+00, ptr %260, align 8, !tbaa !5
  %261 = load ptr, ptr %9, align 8, !tbaa !9
  %262 = getelementptr inbounds %struct._generic_N_Vector, ptr %261, i32 0, i32 0
  %263 = load ptr, ptr %262, align 8, !tbaa !18
  %264 = getelementptr inbounds %struct._N_VectorContent_Serial, ptr %263, i32 0, i32 2
  %265 = load ptr, ptr %264, align 8, !tbaa !20
  %266 = getelementptr inbounds double, ptr %265, i64 3
  store double 0.000000e+00, ptr %266, align 8, !tbaa !5
  %267 = load ptr, ptr %9, align 8, !tbaa !9
  %268 = getelementptr inbounds %struct._generic_N_Vector, ptr %267, i32 0, i32 0
  %269 = load ptr, ptr %268, align 8, !tbaa !18
  %270 = getelementptr inbounds %struct._N_VectorContent_Serial, ptr %269, i32 0, i32 2
  %271 = load ptr, ptr %270, align 8, !tbaa !20
  %272 = getelementptr inbounds double, ptr %271, i64 7
  store double 0.000000e+00, ptr %272, align 8, !tbaa !5
  %273 = call ptr @CPodeCreate(i32 noundef 1, i32 noundef 2, i32 noundef 2)
  store ptr %273, ptr %8, align 8, !tbaa !9
  %274 = load ptr, ptr %8, align 8, !tbaa !9
  %275 = load ptr, ptr %2, align 8, !tbaa !9
  %276 = load double, ptr %14, align 8, !tbaa !5
  %277 = load ptr, ptr %9, align 8, !tbaa !9
  %278 = load ptr, ptr %10, align 8, !tbaa !9
  %279 = load double, ptr %12, align 8, !tbaa !5
  %280 = call i32 @CPodeInit(ptr noundef %274, ptr noundef @ffun2, ptr noundef %275, double noundef %276, ptr noundef %277, ptr noundef %278, i32 noundef 1, double noundef %279, ptr noundef %13)
  store i32 %280, ptr %21, align 4, !tbaa !16
  %281 = load ptr, ptr %8, align 8, !tbaa !9
  %282 = load i32, ptr %22, align 4, !tbaa !16
  %283 = call i32 @CPDense(ptr noundef %281, i32 noundef %282)
  store i32 %283, ptr %21, align 4, !tbaa !16
  %284 = load ptr, ptr %8, align 8, !tbaa !9
  %285 = load ptr, ptr %2, align 8, !tbaa !9
  %286 = call i32 @CPodeRootInit(ptr noundef %284, i32 noundef 1, ptr noundef @gfun, ptr noundef %285)
  store i32 %286, ptr %21, align 4, !tbaa !16
  %287 = load ptr, ptr %8, align 8, !tbaa !9
  %288 = getelementptr inbounds [1 x i32], ptr %24, i64 0, i64 0
  %289 = call i32 @CPodeSetRootDirection(ptr noundef %287, ptr noundef %288)
  store i32 %289, ptr %21, align 4, !tbaa !16
  %290 = load ptr, ptr %8, align 8, !tbaa !9
  %291 = load ptr, ptr %2, align 8, !tbaa !9
  %292 = load ptr, ptr %11, align 8, !tbaa !9
  %293 = call i32 @CPodeProjInit(ptr noundef %290, i32 noundef 1, i32 noundef 2, ptr noundef @cfun, ptr noundef %291, ptr noundef %292)
  store i32 %293, ptr %21, align 4, !tbaa !16
  %294 = load ptr, ptr %8, align 8, !tbaa !9
  %295 = call i32 @CPodeSetProjTestCnstr(ptr noundef %294, i32 noundef 1)
  store i32 %295, ptr %21, align 4, !tbaa !16
  %296 = load ptr, ptr %8, align 8, !tbaa !9
  %297 = load i32, ptr %23, align 4, !tbaa !16
  %298 = load i32, ptr %22, align 4, !tbaa !16
  %299 = call i32 @CPDenseProj(ptr noundef %296, i32 noundef %297, i32 noundef %298, i32 noundef 1)
  store i32 %299, ptr %21, align 4, !tbaa !16
  %300 = load double, ptr %14, align 8, !tbaa !5
  store double %300, ptr %16, align 8, !tbaa !5
  br label %301

301:                                              ; preds = %377, %213
  %302 = load double, ptr %16, align 8, !tbaa !5
  %303 = load double, ptr %15, align 8, !tbaa !5
  %304 = fcmp olt double %302, %303
  br i1 %304, label %305, label %378

305:                                              ; preds = %301
  %306 = load ptr, ptr %8, align 8, !tbaa !9
  %307 = load double, ptr %15, align 8, !tbaa !5
  %308 = load ptr, ptr %9, align 8, !tbaa !9
  %309 = load ptr, ptr %10, align 8, !tbaa !9
  %310 = call i32 @CPode(ptr noundef %306, double noundef %307, ptr noundef %16, ptr noundef %308, ptr noundef %309, i32 noundef 2)
  store i32 %310, ptr %21, align 4, !tbaa !16
  %311 = load i32, ptr %21, align 4, !tbaa !16
  %312 = icmp slt i32 %311, 0
  br i1 %312, label %313, label %314

313:                                              ; preds = %305
  br label %378

314:                                              ; preds = %305
  %315 = load ptr, ptr %9, align 8, !tbaa !9
  %316 = getelementptr inbounds %struct._generic_N_Vector, ptr %315, i32 0, i32 0
  %317 = load ptr, ptr %316, align 8, !tbaa !18
  %318 = getelementptr inbounds %struct._N_VectorContent_Serial, ptr %317, i32 0, i32 2
  %319 = load ptr, ptr %318, align 8, !tbaa !20
  %320 = getelementptr inbounds double, ptr %319, i64 0
  %321 = load double, ptr %320, align 8, !tbaa !5
  store double %321, ptr %17, align 8, !tbaa !5
  %322 = load ptr, ptr %9, align 8, !tbaa !9
  %323 = getelementptr inbounds %struct._generic_N_Vector, ptr %322, i32 0, i32 0
  %324 = load ptr, ptr %323, align 8, !tbaa !18
  %325 = getelementptr inbounds %struct._N_VectorContent_Serial, ptr %324, i32 0, i32 2
  %326 = load ptr, ptr %325, align 8, !tbaa !20
  %327 = getelementptr inbounds double, ptr %326, i64 4
  %328 = load double, ptr %327, align 8, !tbaa !5
  store double %328, ptr %19, align 8, !tbaa !5
  %329 = load ptr, ptr %9, align 8, !tbaa !9
  %330 = getelementptr inbounds %struct._generic_N_Vector, ptr %329, i32 0, i32 0
  %331 = load ptr, ptr %330, align 8, !tbaa !18
  %332 = getelementptr inbounds %struct._N_VectorContent_Serial, ptr %331, i32 0, i32 2
  %333 = load ptr, ptr %332, align 8, !tbaa !20
  %334 = getelementptr inbounds double, ptr %333, i64 1
  %335 = load double, ptr %334, align 8, !tbaa !5
  store double %335, ptr %18, align 8, !tbaa !5
  %336 = load ptr, ptr %9, align 8, !tbaa !9
  %337 = getelementptr inbounds %struct._generic_N_Vector, ptr %336, i32 0, i32 0
  %338 = load ptr, ptr %337, align 8, !tbaa !18
  %339 = getelementptr inbounds %struct._N_VectorContent_Serial, ptr %338, i32 0, i32 2
  %340 = load ptr, ptr %339, align 8, !tbaa !20
  %341 = getelementptr inbounds double, ptr %340, i64 5
  %342 = load double, ptr %341, align 8, !tbaa !5
  store double %342, ptr %20, align 8, !tbaa !5
  %343 = load ptr, ptr %26, align 8, !tbaa !9
  %344 = load double, ptr %16, align 8, !tbaa !5
  %345 = load double, ptr %17, align 8, !tbaa !5
  %346 = load double, ptr %18, align 8, !tbaa !5
  %347 = load double, ptr %19, align 8, !tbaa !5
  %348 = load double, ptr %20, align 8, !tbaa !5
  %349 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %343, ptr noundef @.str.2, double noundef %344, double noundef %345, double noundef %346, double noundef %347, double noundef %348) #5
  %350 = load i32, ptr %21, align 4, !tbaa !16
  %351 = icmp eq i32 %350, 2
  br i1 %351, label %352, label %374

352:                                              ; preds = %314
  %353 = load ptr, ptr %8, align 8, !tbaa !9
  %354 = getelementptr inbounds [1 x i32], ptr %25, i64 0, i64 0
  %355 = call i32 @CPodeGetRootInfo(ptr noundef %353, ptr noundef %354)
  %356 = load ptr, ptr %26, align 8, !tbaa !9
  %357 = getelementptr inbounds [1 x i32], ptr %25, i64 0, i64 0
  %358 = load i32, ptr %357, align 4, !tbaa !16
  %359 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %356, ptr noundef @.str.3, i32 noundef %358) #5
  %360 = getelementptr inbounds [1 x i32], ptr %25, i64 0, i64 0
  %361 = load i32, ptr %360, align 4, !tbaa !16
  %362 = icmp slt i32 %361, 0
  br i1 %362, label %363, label %373

363:                                              ; preds = %352
  %364 = load ptr, ptr %9, align 8, !tbaa !9
  %365 = load ptr, ptr %2, align 8, !tbaa !9
  call void @contact(ptr noundef %364, ptr noundef %365)
  %366 = load ptr, ptr %8, align 8, !tbaa !9
  %367 = load ptr, ptr %2, align 8, !tbaa !9
  %368 = load double, ptr %16, align 8, !tbaa !5
  %369 = load ptr, ptr %9, align 8, !tbaa !9
  %370 = load ptr, ptr %10, align 8, !tbaa !9
  %371 = load double, ptr %12, align 8, !tbaa !5
  %372 = call i32 @CPodeReInit(ptr noundef %366, ptr noundef @ffun2, ptr noundef %367, double noundef %368, ptr noundef %369, ptr noundef %370, i32 noundef 1, double noundef %371, ptr noundef %13)
  store i32 %372, ptr %21, align 4, !tbaa !16
  br label %373

373:                                              ; preds = %363, %352
  br label %377

374:                                              ; preds = %314
  %375 = load ptr, ptr %26, align 8, !tbaa !9
  %376 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %375, ptr noundef @.str.4) #5
  br label %377

377:                                              ; preds = %374, %373
  br label %301, !llvm.loop !25

378:                                              ; preds = %313, %301
  %379 = load ptr, ptr %8, align 8, !tbaa !9
  call void @PrintFinalStats(ptr noundef %379)
  call void @CPodeFree(ptr noundef %8)
  %380 = load ptr, ptr %26, align 8, !tbaa !9
  %381 = call i32 @fclose(ptr noundef %380)
  %382 = load ptr, ptr %2, align 8, !tbaa !9
  call void @free(ptr noundef %382) #5
  %383 = load ptr, ptr %9, align 8, !tbaa !9
  call void @N_VDestroy_Serial(ptr noundef %383)
  %384 = load ptr, ptr %10, align 8, !tbaa !9
  call void @N_VDestroy_Serial(ptr noundef %384)
  %385 = load ptr, ptr %11, align 8, !tbaa !9
  call void @N_VDestroy_Serial(ptr noundef %385)
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, 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
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #5
  ret i32 0
}

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

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

declare ptr @N_VNew_Serial(i64 noundef) #3

declare void @N_VConst(double noundef, ptr noundef) #3

declare noalias ptr @fopen(ptr noundef, ptr noundef) #3

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

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

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

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

declare i32 @CPodeRootInit(ptr noundef, i32 noundef, ptr noundef, ptr noundef) #3

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

declare i32 @CPodeSetRootDirection(ptr noundef, ptr noundef) #3

declare i32 @CPodeProjInit(ptr noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef) #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) #3

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

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

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #4

declare i32 @CPodeGetRootInfo(ptr noundef, ptr noundef) #3

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

declare i32 @CPodeReInit(ptr noundef, ptr noundef, ptr noundef, double noundef, ptr noundef, ptr noundef, i32 noundef, double noundef, ptr noundef) #3

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

declare void @CPodeFree(ptr noundef) #3

declare i32 @fclose(ptr noundef) #3

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

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

declare void @N_VDestroy_Serial(ptr noundef) #3

; 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 = { 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 #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 = { 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 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !6, i64 0}
!12 = !{!"", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!13 = !{!12, !6, i64 8}
!14 = !{!12, !6, i64 16}
!15 = !{!12, !6, i64 24}
!16 = !{!17, !17, i64 0}
!17 = !{!"int", !7, i64 0}
!18 = !{!19, !10, i64 0}
!19 = !{!"_generic_N_Vector", !10, i64 0, !10, i64 8}
!20 = !{!21, !10, i64 16}
!21 = !{!"_N_VectorContent_Serial", !22, i64 0, !17, i64 8, !10, i64 16}
!22 = !{!"long", !7, i64 0}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}
!25 = distinct !{!25, !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 [12 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [12 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
  %4 = alloca [1 x i32], align 4
  %5 = alloca [1 x i32], align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #7
  %6 = tail call noalias dereferenceable_or_null(32) ptr @malloc(i64 noundef 32) #8
  store <2 x double> <double 1.000000e-01, double 1.000000e+00>, ptr %6, align 8, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %6, i64 16
  store <2 x double> <double 1.000000e+00, double 9.800000e+00>, ptr %7, align 8, !tbaa !5
  %8 = tail call ptr @N_VNew_Serial(i64 noundef 8) #7
  %9 = tail call ptr @N_VNew_Serial(i64 noundef 8) #7
  store double 1.000000e-08, ptr %2, align 8, !tbaa !5
  %10 = tail call ptr @N_VNew_Serial(i64 noundef 4) #7
  tail call void @N_VConst(double noundef 1.000000e-08, ptr noundef %10) #7
  store i32 -1, ptr %4, align 4, !tbaa !9
  %11 = tail call noalias ptr @fopen(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1)
  %12 = load ptr, ptr %8, align 8, !tbaa !11
  %13 = getelementptr inbounds i8, ptr %12, i64 16
  %14 = load ptr, ptr %13, align 8, !tbaa !14
  %15 = getelementptr inbounds i8, ptr %14, i64 32
  store <2 x double> <double 1.000000e-01, double -1.000000e+00>, ptr %14, align 8, !tbaa !5
  store <2 x double> <double -1.000000e-01, double -1.000000e+00>, ptr %15, align 8, !tbaa !5
  %16 = getelementptr inbounds i8, ptr %14, i64 16
  %17 = getelementptr inbounds i8, ptr %14, i64 48
  store <2 x double> <double 3.000000e+00, double 0.000000e+00>, ptr %16, align 8, !tbaa !5
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %17, i8 0, i64 16, i1 false)
  %18 = tail call ptr @CPodeCreate(i32 noundef 1, i32 noundef 2, i32 noundef 2) #7
  store ptr %18, ptr %1, align 8, !tbaa !17
  %19 = call i32 @CPodeInit(ptr noundef %18, ptr noundef nonnull @ffun1, ptr noundef nonnull %6, double noundef 0.000000e+00, ptr noundef nonnull %8, ptr noundef %9, i32 noundef 1, double noundef 1.000000e-08, ptr noundef nonnull %2) #7
  %20 = call i32 @CPDense(ptr noundef %18, i32 noundef 8) #7
  %21 = call i32 @CPodeRootInit(ptr noundef %18, i32 noundef 1, ptr noundef nonnull @gfun, ptr noundef nonnull %6) #7
  %22 = call i32 @CPodeSetRootDirection(ptr noundef %18, ptr noundef nonnull %4) #7
  %23 = call i32 @CPodeProjInit(ptr noundef %18, i32 noundef 1, i32 noundef 2, ptr noundef nonnull @cfun, ptr noundef nonnull %6, ptr noundef %10) #7
  %24 = call i32 @CPodeSetProjTestCnstr(ptr noundef %18, i32 noundef 1) #7
  %25 = call i32 @CPDenseProj(ptr noundef %18, i32 noundef 4, i32 noundef 8, i32 noundef 1) #7
  store double 0.000000e+00, ptr %3, align 8, !tbaa !5
  br label %26

26:                                               ; preds = %0, %54
  %27 = call i32 @CPode(ptr noundef %18, double noundef 6.000000e+00, ptr noundef nonnull %3, ptr noundef nonnull %8, ptr noundef %9, i32 noundef 2) #7
  %28 = icmp slt i32 %27, 0
  br i1 %28, label %56, label %29

29:                                               ; preds = %26
  %30 = load ptr, ptr %8, align 8, !tbaa !11
  %31 = getelementptr inbounds i8, ptr %30, i64 16
  %32 = load ptr, ptr %31, align 8, !tbaa !14
  %33 = load double, ptr %32, align 8, !tbaa !5
  %34 = getelementptr inbounds i8, ptr %32, i64 32
  %35 = load double, ptr %34, align 8, !tbaa !5
  %36 = getelementptr inbounds i8, ptr %32, i64 8
  %37 = load double, ptr %36, align 8, !tbaa !5
  %38 = getelementptr inbounds i8, ptr %32, i64 40
  %39 = load double, ptr %38, align 8, !tbaa !5
  %40 = load double, ptr %3, align 8, !tbaa !5
  %41 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %11, ptr noundef nonnull @.str.2, double noundef %40, double noundef %33, double noundef %37, double noundef %35, double noundef %39) #7
  %42 = icmp eq i32 %27, 2
  br i1 %42, label %43, label %52

43:                                               ; preds = %29
  %44 = call i32 @CPodeGetRootInfo(ptr noundef %18, ptr noundef nonnull %5) #7
  %45 = load i32, ptr %5, align 4, !tbaa !9
  %46 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %11, ptr noundef nonnull @.str.3, i32 noundef %45) #7
  %47 = load i32, ptr %5, align 4, !tbaa !9
  %48 = icmp slt i32 %47, 0
  br i1 %48, label %49, label %54

49:                                               ; preds = %43
  call void @contact(ptr noundef nonnull %8, ptr noundef nonnull %6)
  %50 = load double, ptr %3, align 8, !tbaa !5
  %51 = call i32 @CPodeReInit(ptr noundef %18, ptr noundef nonnull @ffun1, ptr noundef nonnull %6, double noundef %50, ptr noundef nonnull %8, ptr noundef %9, i32 noundef 1, double noundef 1.000000e-08, ptr noundef nonnull %2) #7
  br label %54

52:                                               ; preds = %29
  %53 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %11, ptr noundef nonnull @.str.4) #7
  br label %54

54:                                               ; preds = %43, %49, %52
  %.pr = load double, ptr %3, align 8, !tbaa !5
  %55 = fcmp olt double %.pr, 6.000000e+00
  br i1 %55, label %26, label %56, !llvm.loop !18

56:                                               ; preds = %26, %54
  call void @PrintFinalStats(ptr noundef %18)
  call void @CPodeFree(ptr noundef nonnull %1) #7
  %57 = call i32 @fclose(ptr noundef %11)
  %58 = call noalias ptr @fopen(ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.1)
  %59 = load ptr, ptr %8, align 8, !tbaa !11
  %60 = getelementptr inbounds i8, ptr %59, i64 16
  %61 = load ptr, ptr %60, align 8, !tbaa !14
  %62 = getelementptr inbounds i8, ptr %61, i64 32
  store <2 x double> <double 1.000000e-01, double -1.000000e+00>, ptr %61, align 8, !tbaa !5
  store <2 x double> <double -1.000000e-01, double -1.000000e+00>, ptr %62, align 8, !tbaa !5
  %63 = getelementptr inbounds i8, ptr %61, i64 16
  %64 = getelementptr inbounds i8, ptr %61, i64 48
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %63, i8 0, i64 16, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %64, i8 0, i64 16, i1 false)
  %65 = call ptr @CPodeCreate(i32 noundef 1, i32 noundef 2, i32 noundef 2) #7
  store ptr %65, ptr %1, align 8, !tbaa !17
  %66 = call i32 @CPodeInit(ptr noundef %65, ptr noundef nonnull @ffun2, ptr noundef nonnull %6, double noundef 0.000000e+00, ptr noundef nonnull %8, ptr noundef %9, i32 noundef 1, double noundef 1.000000e-08, ptr noundef nonnull %2) #7
  %67 = load ptr, ptr %1, align 8, !tbaa !17
  %68 = call i32 @CPDense(ptr noundef %67, i32 noundef 8) #7
  %69 = load ptr, ptr %1, align 8, !tbaa !17
  %70 = call i32 @CPodeRootInit(ptr noundef %69, i32 noundef 1, ptr noundef nonnull @gfun, ptr noundef nonnull %6) #7
  %71 = load ptr, ptr %1, align 8, !tbaa !17
  %72 = call i32 @CPodeSetRootDirection(ptr noundef %71, ptr noundef nonnull %4) #7
  %73 = load ptr, ptr %1, align 8, !tbaa !17
  %74 = call i32 @CPodeProjInit(ptr noundef %73, i32 noundef 1, i32 noundef 2, ptr noundef nonnull @cfun, ptr noundef nonnull %6, ptr noundef %10) #7
  %75 = load ptr, ptr %1, align 8, !tbaa !17
  %76 = call i32 @CPodeSetProjTestCnstr(ptr noundef %75, i32 noundef 1) #7
  %77 = load ptr, ptr %1, align 8, !tbaa !17
  %78 = call i32 @CPDenseProj(ptr noundef %77, i32 noundef 4, i32 noundef 8, i32 noundef 1) #7
  store double 0.000000e+00, ptr %3, align 8, !tbaa !5
  br label %79

79:                                               ; preds = %56, %110
  %80 = load ptr, ptr %1, align 8, !tbaa !17
  %81 = call i32 @CPode(ptr noundef %80, double noundef 6.000000e+00, ptr noundef nonnull %3, ptr noundef nonnull %8, ptr noundef %9, i32 noundef 2) #7
  %82 = icmp slt i32 %81, 0
  br i1 %82, label %112, label %83

83:                                               ; preds = %79
  %84 = load ptr, ptr %8, align 8, !tbaa !11
  %85 = getelementptr inbounds i8, ptr %84, i64 16
  %86 = load ptr, ptr %85, align 8, !tbaa !14
  %87 = load double, ptr %86, align 8, !tbaa !5
  %88 = getelementptr inbounds i8, ptr %86, i64 32
  %89 = load double, ptr %88, align 8, !tbaa !5
  %90 = getelementptr inbounds i8, ptr %86, i64 8
  %91 = load double, ptr %90, align 8, !tbaa !5
  %92 = getelementptr inbounds i8, ptr %86, i64 40
  %93 = load double, ptr %92, align 8, !tbaa !5
  %94 = load double, ptr %3, align 8, !tbaa !5
  %95 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %58, ptr noundef nonnull @.str.2, double noundef %94, double noundef %87, double noundef %91, double noundef %89, double noundef %93) #7
  %96 = icmp eq i32 %81, 2
  br i1 %96, label %97, label %108

97:                                               ; preds = %83
  %98 = load ptr, ptr %1, align 8, !tbaa !17
  %99 = call i32 @CPodeGetRootInfo(ptr noundef %98, ptr noundef nonnull %5) #7
  %100 = load i32, ptr %5, align 4, !tbaa !9
  %101 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %58, ptr noundef nonnull @.str.3, i32 noundef %100) #7
  %102 = load i32, ptr %5, align 4, !tbaa !9
  %103 = icmp slt i32 %102, 0
  br i1 %103, label %104, label %110

104:                                              ; preds = %97
  call void @contact(ptr noundef nonnull %8, ptr noundef nonnull %6)
  %105 = load ptr, ptr %1, align 8, !tbaa !17
  %106 = load double, ptr %3, align 8, !tbaa !5
  %107 = call i32 @CPodeReInit(ptr noundef %105, ptr noundef nonnull @ffun2, ptr noundef nonnull %6, double noundef %106, ptr noundef nonnull %8, ptr noundef %9, i32 noundef 1, double noundef 1.000000e-08, ptr noundef nonnull %2) #7
  br label %110

108:                                              ; preds = %83
  %109 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %58, ptr noundef nonnull @.str.4) #7
  br label %110

110:                                              ; preds = %97, %104, %108
  %.pr113 = load double, ptr %3, align 8, !tbaa !5
  %111 = fcmp olt double %.pr113, 6.000000e+00
  br i1 %111, label %79, label %112, !llvm.loop !20

112:                                              ; preds = %79, %110
  %113 = load ptr, ptr %1, align 8, !tbaa !17
  call void @PrintFinalStats(ptr noundef %113)
  call void @CPodeFree(ptr noundef nonnull %1) #7
  %114 = call i32 @fclose(ptr noundef %58)
  call void @free(ptr noundef %6) #7
  call void @N_VDestroy_Serial(ptr noundef nonnull %8) #7
  call void @N_VDestroy_Serial(ptr noundef %9) #7
  call void @N_VDestroy_Serial(ptr noundef %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #7
  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: 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 @N_VNew_Serial(i64 noundef) local_unnamed_addr #3

declare void @N_VConst(double noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: nofree nounwind
declare noalias noundef ptr @fopen(ptr nocapture noundef readonly, ptr nocapture noundef readonly) local_unnamed_addr #4

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 @ffun1(double noundef, ptr noundef, ptr noundef, ptr noundef) #0

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

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

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

declare i32 @CPodeSetRootDirection(ptr noundef, ptr 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 @CPode(ptr noundef, double noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #3

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

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

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

declare i32 @CPodeReInit(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 void @PrintFinalStats(ptr noundef) local_unnamed_addr #0

declare void @CPodeFree(ptr noundef) local_unnamed_addr #3

; Function Attrs: nofree nounwind
declare noundef i32 @fclose(ptr nocapture noundef) local_unnamed_addr #4

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

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

declare void @N_VDestroy_Serial(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) #6

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 = { 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 = { "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 = { 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 #5 = { 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 #6 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #7 = { nounwind }
attributes #8 = { 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 = !{!"double", !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, !13, i64 0}
!12 = !{!"_generic_N_Vector", !13, i64 0, !13, i64 8}
!13 = !{!"any pointer", !7, i64 0}
!14 = !{!15, !13, i64 16}
!15 = !{!"_N_VectorContent_Serial", !16, i64 0, !10, i64 8, !13, i64 16}
!16 = !{!"long", !7, i64 0}
!17 = !{!13, !13, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = distinct !{!20, !19}


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