; LLVM IR from Derek-TH-Wang/quadruped_ctrl :: src/osqp/src (auxil)

; 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.OSQPWorkspace = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i64, i64 }
%struct.OSQPSettings = type { double, double, i64, i64, i64, double, double, i64, double, double, double, double, double, i32, double, i64, i64, i64, i64, i64, i64, double }
%struct.OSQPInfo = type { i64, [32 x i8], i64, i64, double, double, double, double, double, double, double, double, i64, double }
%struct.OSQPData = type { i64, i64, ptr, ptr, ptr, ptr, ptr }
%struct.OSQPScaling = type { double, ptr, ptr, double, ptr, ptr }

; 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

; Function Attrs: nounwind uwtable
declare dso_local double @compute_pri_tol(ptr noundef, double noundef, double noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local double @compute_dua_tol(ptr noundef, double noundef, double noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local i64 @is_primal_infeasible(ptr noundef, double noundef) #1

declare void @vec_ew_prod(ptr noundef, ptr noundef, ptr noundef, i64 noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local i64 @is_dual_infeasible(ptr noundef, double noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local void @update_status(ptr noundef, i64 noundef) #1

; Function Attrs: nounwind uwtable
define dso_local i64 @check_termination(ptr noundef %0, i64 noundef %1) #1 {
  %3 = alloca i64, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i64, align 8
  %6 = alloca double, align 8
  %7 = alloca double, align 8
  %8 = alloca double, align 8
  %9 = alloca double, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  %15 = alloca double, align 8
  %16 = alloca double, align 8
  %17 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i64 %1, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #3
  store i64 0, ptr %10, align 8, !tbaa !9
  store i64 0, ptr %11, align 8, !tbaa !9
  store i64 0, ptr %12, align 8, !tbaa !9
  store i64 0, ptr %13, align 8, !tbaa !9
  store i64 0, ptr %14, align 8, !tbaa !9
  %18 = load ptr, ptr %4, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct.OSQPWorkspace, ptr %18, i32 0, i32 23
  %20 = load ptr, ptr %19, align 8, !tbaa !11
  %21 = getelementptr inbounds %struct.OSQPSettings, ptr %20, i32 0, i32 8
  %22 = load double, ptr %21, align 8, !tbaa !13
  store double %22, ptr %15, align 8, !tbaa !17
  %23 = load ptr, ptr %4, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct.OSQPWorkspace, ptr %23, i32 0, i32 23
  %25 = load ptr, ptr %24, align 8, !tbaa !11
  %26 = getelementptr inbounds %struct.OSQPSettings, ptr %25, i32 0, i32 9
  %27 = load double, ptr %26, align 8, !tbaa !18
  store double %27, ptr %16, align 8, !tbaa !17
  %28 = load ptr, ptr %4, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.OSQPWorkspace, ptr %28, i32 0, i32 23
  %30 = load ptr, ptr %29, align 8, !tbaa !11
  %31 = getelementptr inbounds %struct.OSQPSettings, ptr %30, i32 0, i32 10
  %32 = load double, ptr %31, align 8, !tbaa !19
  store double %32, ptr %8, align 8, !tbaa !17
  %33 = load ptr, ptr %4, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.OSQPWorkspace, ptr %33, i32 0, i32 23
  %35 = load ptr, ptr %34, align 8, !tbaa !11
  %36 = getelementptr inbounds %struct.OSQPSettings, ptr %35, i32 0, i32 11
  %37 = load double, ptr %36, align 8, !tbaa !20
  store double %37, ptr %9, align 8, !tbaa !17
  %38 = load ptr, ptr %4, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.OSQPWorkspace, ptr %38, i32 0, i32 26
  %40 = load ptr, ptr %39, align 8, !tbaa !21
  %41 = getelementptr inbounds %struct.OSQPInfo, ptr %40, i32 0, i32 5
  %42 = load double, ptr %41, align 8, !tbaa !22
  %43 = fcmp ogt double %42, 2.000000e+20
  br i1 %43, label %51, label %44

44:                                               ; preds = %2
  %45 = load ptr, ptr %4, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.OSQPWorkspace, ptr %45, i32 0, i32 26
  %47 = load ptr, ptr %46, align 8, !tbaa !21
  %48 = getelementptr inbounds %struct.OSQPInfo, ptr %47, i32 0, i32 6
  %49 = load double, ptr %48, align 8, !tbaa !24
  %50 = fcmp ogt double %49, 2.000000e+20
  br i1 %50, label %51, label %59

51:                                               ; preds = %44, %2
  %52 = load ptr, ptr %4, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.OSQPWorkspace, ptr %52, i32 0, i32 26
  %54 = load ptr, ptr %53, align 8, !tbaa !21
  call void @update_status(ptr noundef %54, i64 noundef -7)
  %55 = load ptr, ptr %4, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.OSQPWorkspace, ptr %55, i32 0, i32 26
  %57 = load ptr, ptr %56, align 8, !tbaa !21
  %58 = getelementptr inbounds %struct.OSQPInfo, ptr %57, i32 0, i32 4
  store double 0x41DFF00000000000, ptr %58, align 8, !tbaa !25
  store i64 1, ptr %3, align 8
  store i32 1, ptr %17, align 4
  br label %236

59:                                               ; preds = %44
  %60 = load i64, ptr %5, align 8, !tbaa !9
  %61 = icmp ne i64 %60, 0
  br i1 %61, label %62, label %71

62:                                               ; preds = %59
  %63 = load double, ptr %15, align 8, !tbaa !17
  %64 = fmul double %63, 1.000000e+01
  store double %64, ptr %15, align 8, !tbaa !17
  %65 = load double, ptr %16, align 8, !tbaa !17
  %66 = fmul double %65, 1.000000e+01
  store double %66, ptr %16, align 8, !tbaa !17
  %67 = load double, ptr %8, align 8, !tbaa !17
  %68 = fmul double %67, 1.000000e+01
  store double %68, ptr %8, align 8, !tbaa !17
  %69 = load double, ptr %9, align 8, !tbaa !17
  %70 = fmul double %69, 1.000000e+01
  store double %70, ptr %9, align 8, !tbaa !17
  br label %71

71:                                               ; preds = %62, %59
  %72 = load ptr, ptr %4, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.OSQPWorkspace, ptr %72, i32 0, i32 0
  %74 = load ptr, ptr %73, align 8, !tbaa !26
  %75 = getelementptr inbounds %struct.OSQPData, ptr %74, i32 0, i32 1
  %76 = load i64, ptr %75, align 8, !tbaa !27
  %77 = icmp eq i64 %76, 0
  br i1 %77, label %78, label %79

78:                                               ; preds = %71
  store i64 1, ptr %11, align 8, !tbaa !9
  br label %97

79:                                               ; preds = %71
  %80 = load ptr, ptr %4, align 8, !tbaa !5
  %81 = load double, ptr %15, align 8, !tbaa !17
  %82 = load double, ptr %16, align 8, !tbaa !17
  %83 = call double @compute_pri_tol(ptr noundef %80, double noundef %81, double noundef %82)
  store double %83, ptr %6, align 8, !tbaa !17
  %84 = load ptr, ptr %4, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.OSQPWorkspace, ptr %84, i32 0, i32 26
  %86 = load ptr, ptr %85, align 8, !tbaa !21
  %87 = getelementptr inbounds %struct.OSQPInfo, ptr %86, i32 0, i32 5
  %88 = load double, ptr %87, align 8, !tbaa !22
  %89 = load double, ptr %6, align 8, !tbaa !17
  %90 = fcmp olt double %88, %89
  br i1 %90, label %91, label %92

91:                                               ; preds = %79
  store i64 1, ptr %11, align 8, !tbaa !9
  br label %96

92:                                               ; preds = %79
  %93 = load ptr, ptr %4, align 8, !tbaa !5
  %94 = load double, ptr %8, align 8, !tbaa !17
  %95 = call i64 @is_primal_infeasible(ptr noundef %93, double noundef %94)
  store i64 %95, ptr %13, align 8, !tbaa !9
  br label %96

96:                                               ; preds = %92, %91
  br label %97

97:                                               ; preds = %96, %78
  %98 = load ptr, ptr %4, align 8, !tbaa !5
  %99 = load double, ptr %15, align 8, !tbaa !17
  %100 = load double, ptr %16, align 8, !tbaa !17
  %101 = call double @compute_dua_tol(ptr noundef %98, double noundef %99, double noundef %100)
  store double %101, ptr %7, align 8, !tbaa !17
  %102 = load ptr, ptr %4, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.OSQPWorkspace, ptr %102, i32 0, i32 26
  %104 = load ptr, ptr %103, align 8, !tbaa !21
  %105 = getelementptr inbounds %struct.OSQPInfo, ptr %104, i32 0, i32 6
  %106 = load double, ptr %105, align 8, !tbaa !24
  %107 = load double, ptr %7, align 8, !tbaa !17
  %108 = fcmp olt double %106, %107
  br i1 %108, label %109, label %110

109:                                              ; preds = %97
  store i64 1, ptr %12, align 8, !tbaa !9
  br label %114

110:                                              ; preds = %97
  %111 = load ptr, ptr %4, align 8, !tbaa !5
  %112 = load double, ptr %9, align 8, !tbaa !17
  %113 = call i64 @is_dual_infeasible(ptr noundef %111, double noundef %112)
  store i64 %113, ptr %14, align 8, !tbaa !9
  br label %114

114:                                              ; preds = %110, %109
  %115 = load i64, ptr %11, align 8, !tbaa !9
  %116 = icmp ne i64 %115, 0
  br i1 %116, label %117, label %132

117:                                              ; preds = %114
  %118 = load i64, ptr %12, align 8, !tbaa !9
  %119 = icmp ne i64 %118, 0
  br i1 %119, label %120, label %132

120:                                              ; preds = %117
  %121 = load i64, ptr %5, align 8, !tbaa !9
  %122 = icmp ne i64 %121, 0
  br i1 %122, label %123, label %127

123:                                              ; preds = %120
  %124 = load ptr, ptr %4, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.OSQPWorkspace, ptr %124, i32 0, i32 26
  %126 = load ptr, ptr %125, align 8, !tbaa !21
  call void @update_status(ptr noundef %126, i64 noundef 2)
  br label %131

127:                                              ; preds = %120
  %128 = load ptr, ptr %4, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.OSQPWorkspace, ptr %128, i32 0, i32 26
  %130 = load ptr, ptr %129, align 8, !tbaa !21
  call void @update_status(ptr noundef %130, i64 noundef 1)
  br label %131

131:                                              ; preds = %127, %123
  store i64 1, ptr %10, align 8, !tbaa !9
  br label %234

132:                                              ; preds = %117, %114
  %133 = load i64, ptr %13, align 8, !tbaa !9
  %134 = icmp ne i64 %133, 0
  br i1 %134, label %135, label %182

135:                                              ; preds = %132
  %136 = load i64, ptr %5, align 8, !tbaa !9
  %137 = icmp ne i64 %136, 0
  br i1 %137, label %138, label %142

138:                                              ; preds = %135
  %139 = load ptr, ptr %4, align 8, !tbaa !5
  %140 = getelementptr inbounds %struct.OSQPWorkspace, ptr %139, i32 0, i32 26
  %141 = load ptr, ptr %140, align 8, !tbaa !21
  call void @update_status(ptr noundef %141, i64 noundef 3)
  br label %146

142:                                              ; preds = %135
  %143 = load ptr, ptr %4, align 8, !tbaa !5
  %144 = getelementptr inbounds %struct.OSQPWorkspace, ptr %143, i32 0, i32 26
  %145 = load ptr, ptr %144, align 8, !tbaa !21
  call void @update_status(ptr noundef %145, i64 noundef -3)
  br label %146

146:                                              ; preds = %142, %138
  %147 = load ptr, ptr %4, align 8, !tbaa !5
  %148 = getelementptr inbounds %struct.OSQPWorkspace, ptr %147, i32 0, i32 23
  %149 = load ptr, ptr %148, align 8, !tbaa !11
  %150 = getelementptr inbounds %struct.OSQPSettings, ptr %149, i32 0, i32 2
  %151 = load i64, ptr %150, align 8, !tbaa !29
  %152 = icmp ne i64 %151, 0
  br i1 %152, label %153, label %177

153:                                              ; preds = %146
  %154 = load ptr, ptr %4, align 8, !tbaa !5
  %155 = getelementptr inbounds %struct.OSQPWorkspace, ptr %154, i32 0, i32 23
  %156 = load ptr, ptr %155, align 8, !tbaa !11
  %157 = getelementptr inbounds %struct.OSQPSettings, ptr %156, i32 0, i32 18
  %158 = load i64, ptr %157, align 8, !tbaa !30
  %159 = icmp ne i64 %158, 0
  br i1 %159, label %177, label %160

160:                                              ; preds = %153
  %161 = load ptr, ptr %4, align 8, !tbaa !5
  %162 = getelementptr inbounds %struct.OSQPWorkspace, ptr %161, i32 0, i32 24
  %163 = load ptr, ptr %162, align 8, !tbaa !31
  %164 = getelementptr inbounds %struct.OSQPScaling, ptr %163, i32 0, i32 2
  %165 = load ptr, ptr %164, align 8, !tbaa !32
  %166 = load ptr, ptr %4, align 8, !tbaa !5
  %167 = getelementptr inbounds %struct.OSQPWorkspace, ptr %166, i32 0, i32 15
  %168 = load ptr, ptr %167, align 8, !tbaa !34
  %169 = load ptr, ptr %4, align 8, !tbaa !5
  %170 = getelementptr inbounds %struct.OSQPWorkspace, ptr %169, i32 0, i32 15
  %171 = load ptr, ptr %170, align 8, !tbaa !34
  %172 = load ptr, ptr %4, align 8, !tbaa !5
  %173 = getelementptr inbounds %struct.OSQPWorkspace, ptr %172, i32 0, i32 0
  %174 = load ptr, ptr %173, align 8, !tbaa !26
  %175 = getelementptr inbounds %struct.OSQPData, ptr %174, i32 0, i32 1
  %176 = load i64, ptr %175, align 8, !tbaa !27
  call void @vec_ew_prod(ptr noundef %165, ptr noundef %168, ptr noundef %171, i64 noundef %176)
  br label %177

177:                                              ; preds = %160, %153, %146
  %178 = load ptr, ptr %4, align 8, !tbaa !5
  %179 = getelementptr inbounds %struct.OSQPWorkspace, ptr %178, i32 0, i32 26
  %180 = load ptr, ptr %179, align 8, !tbaa !21
  %181 = getelementptr inbounds %struct.OSQPInfo, ptr %180, i32 0, i32 4
  store double 1.000000e+20, ptr %181, align 8, !tbaa !25
  store i64 1, ptr %10, align 8, !tbaa !9
  br label %233

182:                                              ; preds = %132
  %183 = load i64, ptr %14, align 8, !tbaa !9
  %184 = icmp ne i64 %183, 0
  br i1 %184, label %185, label %232

185:                                              ; preds = %182
  %186 = load i64, ptr %5, align 8, !tbaa !9
  %187 = icmp ne i64 %186, 0
  br i1 %187, label %188, label %192

188:                                              ; preds = %185
  %189 = load ptr, ptr %4, align 8, !tbaa !5
  %190 = getelementptr inbounds %struct.OSQPWorkspace, ptr %189, i32 0, i32 26
  %191 = load ptr, ptr %190, align 8, !tbaa !21
  call void @update_status(ptr noundef %191, i64 noundef 4)
  br label %196

192:                                              ; preds = %185
  %193 = load ptr, ptr %4, align 8, !tbaa !5
  %194 = getelementptr inbounds %struct.OSQPWorkspace, ptr %193, i32 0, i32 26
  %195 = load ptr, ptr %194, align 8, !tbaa !21
  call void @update_status(ptr noundef %195, i64 noundef -4)
  br label %196

196:                                              ; preds = %192, %188
  %197 = load ptr, ptr %4, align 8, !tbaa !5
  %198 = getelementptr inbounds %struct.OSQPWorkspace, ptr %197, i32 0, i32 23
  %199 = load ptr, ptr %198, align 8, !tbaa !11
  %200 = getelementptr inbounds %struct.OSQPSettings, ptr %199, i32 0, i32 2
  %201 = load i64, ptr %200, align 8, !tbaa !29
  %202 = icmp ne i64 %201, 0
  br i1 %202, label %203, label %227

203:                                              ; preds = %196
  %204 = load ptr, ptr %4, align 8, !tbaa !5
  %205 = getelementptr inbounds %struct.OSQPWorkspace, ptr %204, i32 0, i32 23
  %206 = load ptr, ptr %205, align 8, !tbaa !11
  %207 = getelementptr inbounds %struct.OSQPSettings, ptr %206, i32 0, i32 18
  %208 = load i64, ptr %207, align 8, !tbaa !30
  %209 = icmp ne i64 %208, 0
  br i1 %209, label %227, label %210

210:                                              ; preds = %203
  %211 = load ptr, ptr %4, align 8, !tbaa !5
  %212 = getelementptr inbounds %struct.OSQPWorkspace, ptr %211, i32 0, i32 24
  %213 = load ptr, ptr %212, align 8, !tbaa !31
  %214 = getelementptr inbounds %struct.OSQPScaling, ptr %213, i32 0, i32 1
  %215 = load ptr, ptr %214, align 8, !tbaa !35
  %216 = load ptr, ptr %4, align 8, !tbaa !5
  %217 = getelementptr inbounds %struct.OSQPWorkspace, ptr %216, i32 0, i32 17
  %218 = load ptr, ptr %217, align 8, !tbaa !36
  %219 = load ptr, ptr %4, align 8, !tbaa !5
  %220 = getelementptr inbounds %struct.OSQPWorkspace, ptr %219, i32 0, i32 17
  %221 = load ptr, ptr %220, align 8, !tbaa !36
  %222 = load ptr, ptr %4, align 8, !tbaa !5
  %223 = getelementptr inbounds %struct.OSQPWorkspace, ptr %222, i32 0, i32 0
  %224 = load ptr, ptr %223, align 8, !tbaa !26
  %225 = getelementptr inbounds %struct.OSQPData, ptr %224, i32 0, i32 0
  %226 = load i64, ptr %225, align 8, !tbaa !37
  call void @vec_ew_prod(ptr noundef %215, ptr noundef %218, ptr noundef %221, i64 noundef %226)
  br label %227

227:                                              ; preds = %210, %203, %196
  %228 = load ptr, ptr %4, align 8, !tbaa !5
  %229 = getelementptr inbounds %struct.OSQPWorkspace, ptr %228, i32 0, i32 26
  %230 = load ptr, ptr %229, align 8, !tbaa !21
  %231 = getelementptr inbounds %struct.OSQPInfo, ptr %230, i32 0, i32 4
  store double -1.000000e+20, ptr %231, align 8, !tbaa !25
  store i64 1, ptr %10, align 8, !tbaa !9
  br label %232

232:                                              ; preds = %227, %182
  br label %233

233:                                              ; preds = %232, %177
  br label %234

234:                                              ; preds = %233, %131
  %235 = load i64, ptr %10, align 8, !tbaa !9
  store i64 %235, ptr %3, align 8
  store i32 1, ptr %17, align 4
  br label %236

236:                                              ; preds = %234, %51
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  %237 = load i64, ptr %3, align 8
  ret i64 %237
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long long", !7, i64 0}
!11 = !{!12, !6, i64 184}
!12 = !{!"", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !6, i64 184, !6, i64 192, !6, i64 200, !6, i64 208, !6, i64 216, !10, i64 224, !10, i64 232}
!13 = !{!14, !15, i64 64}
!14 = !{!"", !15, i64 0, !15, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !15, i64 40, !15, i64 48, !10, i64 56, !15, i64 64, !15, i64 72, !15, i64 80, !15, i64 88, !15, i64 96, !16, i64 104, !15, i64 112, !10, i64 120, !10, i64 128, !10, i64 136, !10, i64 144, !10, i64 152, !10, i64 160, !15, i64 168}
!15 = !{!"double", !7, i64 0}
!16 = !{!"int", !7, i64 0}
!17 = !{!15, !15, i64 0}
!18 = !{!14, !15, i64 72}
!19 = !{!14, !15, i64 80}
!20 = !{!14, !15, i64 88}
!21 = !{!12, !6, i64 208}
!22 = !{!23, !15, i64 64}
!23 = !{!"", !10, i64 0, !7, i64 8, !10, i64 40, !10, i64 48, !15, i64 56, !15, i64 64, !15, i64 72, !15, i64 80, !15, i64 88, !15, i64 96, !15, i64 104, !15, i64 112, !10, i64 120, !15, i64 128}
!24 = !{!23, !15, i64 72}
!25 = !{!23, !15, i64 56}
!26 = !{!12, !6, i64 0}
!27 = !{!28, !10, i64 8}
!28 = !{!"", !10, i64 0, !10, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48}
!29 = !{!14, !10, i64 16}
!30 = !{!14, !10, i64 144}
!31 = !{!12, !6, i64 192}
!32 = !{!33, !6, i64 16}
!33 = !{!"", !15, i64 0, !6, i64 8, !6, i64 16, !15, i64 24, !6, i64 32, !6, i64 40}
!34 = !{!12, !6, i64 120}
!35 = !{!33, !6, i64 8}
!36 = !{!12, !6, i64 136}
!37 = !{!28, !10, i64 0}


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

; Function Attrs: nounwind uwtable
declare dso_local double @compute_pri_tol(ptr noundef, double noundef, double noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local double @compute_dua_tol(ptr noundef, double noundef, double noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local i64 @is_primal_infeasible(ptr noundef, double noundef) local_unnamed_addr #0

declare void @vec_ew_prod(ptr noundef, ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local i64 @is_dual_infeasible(ptr noundef, double noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local void @update_status(ptr noundef, i64 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local range(i64 0, 2) i64 @check_termination(ptr noundef %0, i64 noundef %1) local_unnamed_addr #0 {
  %3 = getelementptr inbounds i8, ptr %0, i64 184
  %4 = load ptr, ptr %3, align 8, !tbaa !5
  %5 = getelementptr inbounds i8, ptr %4, i64 64
  %6 = load <4 x double>, ptr %5, align 8, !tbaa !11
  %7 = getelementptr inbounds i8, ptr %0, i64 208
  %8 = load ptr, ptr %7, align 8, !tbaa !13
  %9 = getelementptr inbounds i8, ptr %8, i64 64
  %10 = load double, ptr %9, align 8, !tbaa !14
  %11 = fcmp ogt double %10, 2.000000e+20
  br i1 %11, label %16, label %12

12:                                               ; preds = %2
  %13 = getelementptr inbounds i8, ptr %8, i64 72
  %14 = load double, ptr %13, align 8, !tbaa !16
  %15 = fcmp ogt double %14, 2.000000e+20
  br i1 %15, label %16, label %19

16:                                               ; preds = %12, %2
  tail call void @update_status(ptr noundef nonnull %8, i64 noundef -7)
  %17 = load ptr, ptr %7, align 8, !tbaa !13
  %18 = getelementptr inbounds i8, ptr %17, i64 56
  store double 0x41DFF00000000000, ptr %18, align 8, !tbaa !17
  br label %.thread78

19:                                               ; preds = %12
  %.not = icmp eq i64 %1, 0
  %20 = fmul <4 x double> %6, <double 1.000000e+01, double 1.000000e+01, double 1.000000e+01, double 1.000000e+01>
  %21 = select i1 %.not, <4 x double> %6, <4 x double> %20
  %22 = load ptr, ptr %0, align 8, !tbaa !18
  %23 = getelementptr inbounds i8, ptr %22, i64 8
  %24 = load i64, ptr %23, align 8, !tbaa !19
  %25 = icmp eq i64 %24, 0
  br i1 %25, label %38, label %26

26:                                               ; preds = %19
  %27 = extractelement <4 x double> %21, i64 0
  %28 = extractelement <4 x double> %21, i64 1
  %29 = tail call double @compute_pri_tol(ptr noundef nonnull %0, double noundef %27, double noundef %28)
  %30 = load ptr, ptr %7, align 8, !tbaa !13
  %31 = getelementptr inbounds i8, ptr %30, i64 64
  %32 = load double, ptr %31, align 8, !tbaa !14
  %33 = fcmp olt double %32, %29
  br i1 %33, label %38, label %34

34:                                               ; preds = %26
  %35 = extractelement <4 x double> %21, i64 2
  %36 = tail call i64 @is_primal_infeasible(ptr noundef nonnull %0, double noundef %35)
  %37 = icmp eq i64 %36, 0
  br label %38

38:                                               ; preds = %26, %19, %34
  %39 = phi i1 [ false, %34 ], [ true, %19 ], [ true, %26 ]
  %.059 = phi i1 [ %37, %34 ], [ true, %19 ], [ true, %26 ]
  %40 = extractelement <4 x double> %21, i64 0
  %41 = extractelement <4 x double> %21, i64 1
  %42 = tail call double @compute_dua_tol(ptr noundef nonnull %0, double noundef %40, double noundef %41)
  %43 = load ptr, ptr %7, align 8, !tbaa !13
  %44 = getelementptr inbounds i8, ptr %43, i64 72
  %45 = load double, ptr %44, align 8, !tbaa !16
  %46 = fcmp olt double %45, %42
  br i1 %46, label %47, label %51

47:                                               ; preds = %38
  br i1 %39, label %48, label %.thread75

48:                                               ; preds = %47
  br i1 %.not, label %50, label %49

49:                                               ; preds = %48
  tail call void @update_status(ptr noundef nonnull %43, i64 noundef 2)
  br label %.thread78

50:                                               ; preds = %48
  tail call void @update_status(ptr noundef nonnull %43, i64 noundef 1)
  br label %.thread78

51:                                               ; preds = %38
  %52 = extractelement <4 x double> %21, i64 3
  %53 = tail call i64 @is_dual_infeasible(ptr noundef nonnull %0, double noundef %52)
  br i1 %.059, label %75, label %54

.thread75:                                        ; preds = %47
  br i1 %.059, label %.thread78, label %54

54:                                               ; preds = %.thread75, %51
  %55 = load ptr, ptr %7, align 8, !tbaa !13
  %. = select i1 %.not, i64 -3, i64 3
  tail call void @update_status(ptr noundef %55, i64 noundef %.)
  %56 = load ptr, ptr %3, align 8, !tbaa !5
  %57 = getelementptr inbounds i8, ptr %56, i64 16
  %58 = load i64, ptr %57, align 8, !tbaa !21
  %.not70 = icmp eq i64 %58, 0
  br i1 %.not70, label %72, label %59

59:                                               ; preds = %54
  %60 = getelementptr inbounds i8, ptr %56, i64 144
  %61 = load i64, ptr %60, align 8, !tbaa !24
  %.not71 = icmp eq i64 %61, 0
  br i1 %.not71, label %62, label %72

62:                                               ; preds = %59
  %63 = getelementptr inbounds i8, ptr %0, i64 192
  %64 = load ptr, ptr %63, align 8, !tbaa !25
  %65 = getelementptr inbounds i8, ptr %64, i64 16
  %66 = load ptr, ptr %65, align 8, !tbaa !26
  %67 = getelementptr inbounds i8, ptr %0, i64 120
  %68 = load ptr, ptr %67, align 8, !tbaa !28
  %69 = load ptr, ptr %0, align 8, !tbaa !18
  %70 = getelementptr inbounds i8, ptr %69, i64 8
  %71 = load i64, ptr %70, align 8, !tbaa !19
  tail call void @vec_ew_prod(ptr noundef %66, ptr noundef %68, ptr noundef %68, i64 noundef %71) #2
  br label %72

72:                                               ; preds = %62, %59, %54
  %73 = load ptr, ptr %7, align 8, !tbaa !13
  %74 = getelementptr inbounds i8, ptr %73, i64 56
  store double 1.000000e+20, ptr %74, align 8, !tbaa !17
  br label %.thread78

75:                                               ; preds = %51
  %76 = icmp eq i64 %53, 0
  br i1 %76, label %.thread78, label %77

77:                                               ; preds = %75
  %78 = load ptr, ptr %7, align 8, !tbaa !13
  %.81 = select i1 %.not, i64 -4, i64 4
  tail call void @update_status(ptr noundef %78, i64 noundef %.81)
  %79 = load ptr, ptr %3, align 8, !tbaa !5
  %80 = getelementptr inbounds i8, ptr %79, i64 16
  %81 = load i64, ptr %80, align 8, !tbaa !21
  %.not68 = icmp eq i64 %81, 0
  br i1 %.not68, label %94, label %82

82:                                               ; preds = %77
  %83 = getelementptr inbounds i8, ptr %79, i64 144
  %84 = load i64, ptr %83, align 8, !tbaa !24
  %.not69 = icmp eq i64 %84, 0
  br i1 %.not69, label %85, label %94

85:                                               ; preds = %82
  %86 = getelementptr inbounds i8, ptr %0, i64 192
  %87 = load ptr, ptr %86, align 8, !tbaa !25
  %88 = getelementptr inbounds i8, ptr %87, i64 8
  %89 = load ptr, ptr %88, align 8, !tbaa !29
  %90 = getelementptr inbounds i8, ptr %0, i64 136
  %91 = load ptr, ptr %90, align 8, !tbaa !30
  %92 = load ptr, ptr %0, align 8, !tbaa !18
  %93 = load i64, ptr %92, align 8, !tbaa !31
  tail call void @vec_ew_prod(ptr noundef %89, ptr noundef %91, ptr noundef %91, i64 noundef %93) #2
  br label %94

94:                                               ; preds = %85, %82, %77
  %95 = load ptr, ptr %7, align 8, !tbaa !13
  %96 = getelementptr inbounds i8, ptr %95, i64 56
  store double -1.000000e+20, ptr %96, align 8, !tbaa !17
  br label %.thread78

.thread78:                                        ; preds = %.thread75, %75, %94, %72, %50, %49, %16
  %.065 = phi i64 [ 1, %16 ], [ 1, %72 ], [ 1, %94 ], [ 0, %75 ], [ 1, %50 ], [ 1, %49 ], [ 0, %.thread75 ]
  ret i64 %.065
}

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 184}
!6 = !{!"", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !7, i64 64, !7, i64 72, !7, i64 80, !7, i64 88, !7, i64 96, !7, i64 104, !7, i64 112, !7, i64 120, !7, i64 128, !7, i64 136, !7, i64 144, !7, i64 152, !7, i64 160, !7, i64 168, !7, i64 176, !7, i64 184, !7, i64 192, !7, i64 200, !7, i64 208, !7, i64 216, !10, i64 224, !10, i64 232}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"long long", !8, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !8, i64 0}
!13 = !{!6, !7, i64 208}
!14 = !{!15, !12, i64 64}
!15 = !{!"", !10, i64 0, !8, i64 8, !10, i64 40, !10, i64 48, !12, i64 56, !12, i64 64, !12, i64 72, !12, i64 80, !12, i64 88, !12, i64 96, !12, i64 104, !12, i64 112, !10, i64 120, !12, i64 128}
!16 = !{!15, !12, i64 72}
!17 = !{!15, !12, i64 56}
!18 = !{!6, !7, i64 0}
!19 = !{!20, !10, i64 8}
!20 = !{!"", !10, i64 0, !10, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48}
!21 = !{!22, !10, i64 16}
!22 = !{!"", !12, i64 0, !12, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !12, i64 40, !12, i64 48, !10, i64 56, !12, i64 64, !12, i64 72, !12, i64 80, !12, i64 88, !12, i64 96, !23, i64 104, !12, i64 112, !10, i64 120, !10, i64 128, !10, i64 136, !10, i64 144, !10, i64 152, !10, i64 160, !12, i64 168}
!23 = !{!"int", !8, i64 0}
!24 = !{!22, !10, i64 144}
!25 = !{!6, !7, i64 192}
!26 = !{!27, !7, i64 16}
!27 = !{!"", !12, i64 0, !7, i64 8, !7, i64 16, !12, i64 24, !7, i64 32, !7, i64 40}
!28 = !{!6, !7, i64 120}
!29 = !{!27, !7, i64 8}
!30 = !{!6, !7, i64 136}
!31 = !{!20, !10, i64 0}


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