; 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.OSQPScaling = type { double, ptr, ptr, double, ptr, ptr }
%struct.OSQPData = type { i64, i64, ptr, ptr, ptr, ptr, ptr }

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

declare double @vec_norm_inf(ptr noundef, i64 noundef) #1

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

declare double @vec_prod(ptr noundef, ptr noundef, i64 noundef) #1

declare void @mat_vec(ptr noundef, ptr noundef, ptr noundef, i64 noundef) #1

declare double @vec_scaled_norm_inf(ptr noundef, ptr noundef, i64 noundef) #1

declare void @mat_tpose_vec(ptr noundef, ptr noundef, ptr noundef, i64 noundef, i64 noundef) #1

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

; Function Attrs: nounwind uwtable
define dso_local i64 @is_dual_infeasible(ptr noundef %0, double noundef %1) #2 {
  %3 = alloca i64, align 8
  %4 = alloca ptr, align 8
  %5 = alloca double, align 8
  %6 = alloca i64, align 8
  %7 = alloca double, align 8
  %8 = alloca double, align 8
  %9 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store double %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
  %10 = load ptr, ptr %4, align 8, !tbaa !5
  %11 = getelementptr inbounds %struct.OSQPWorkspace, ptr %10, i32 0, i32 23
  %12 = load ptr, ptr %11, align 8, !tbaa !11
  %13 = getelementptr inbounds %struct.OSQPSettings, ptr %12, i32 0, i32 2
  %14 = load i64, ptr %13, align 8, !tbaa !14
  %15 = icmp ne i64 %14, 0
  br i1 %15, label %16, label %43

16:                                               ; preds = %2
  %17 = load ptr, ptr %4, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.OSQPWorkspace, ptr %17, i32 0, i32 23
  %19 = load ptr, ptr %18, align 8, !tbaa !11
  %20 = getelementptr inbounds %struct.OSQPSettings, ptr %19, i32 0, i32 18
  %21 = load i64, ptr %20, align 8, !tbaa !17
  %22 = icmp ne i64 %21, 0
  br i1 %22, label %43, label %23

23:                                               ; preds = %16
  %24 = load ptr, ptr %4, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.OSQPWorkspace, ptr %24, i32 0, i32 24
  %26 = load ptr, ptr %25, align 8, !tbaa !18
  %27 = getelementptr inbounds %struct.OSQPScaling, ptr %26, i32 0, i32 1
  %28 = load ptr, ptr %27, align 8, !tbaa !19
  %29 = load ptr, ptr %4, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.OSQPWorkspace, ptr %29, i32 0, i32 17
  %31 = load ptr, ptr %30, align 8, !tbaa !21
  %32 = load ptr, ptr %4, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.OSQPWorkspace, ptr %32, i32 0, i32 0
  %34 = load ptr, ptr %33, align 8, !tbaa !22
  %35 = getelementptr inbounds %struct.OSQPData, ptr %34, i32 0, i32 0
  %36 = load i64, ptr %35, align 8, !tbaa !23
  %37 = call double @vec_scaled_norm_inf(ptr noundef %28, ptr noundef %31, i64 noundef %36)
  store double %37, ptr %7, align 8, !tbaa !9
  %38 = load ptr, ptr %4, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.OSQPWorkspace, ptr %38, i32 0, i32 24
  %40 = load ptr, ptr %39, align 8, !tbaa !18
  %41 = getelementptr inbounds %struct.OSQPScaling, ptr %40, i32 0, i32 0
  %42 = load double, ptr %41, align 8, !tbaa !25
  store double %42, ptr %8, align 8, !tbaa !9
  br label %53

43:                                               ; preds = %16, %2
  %44 = load ptr, ptr %4, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.OSQPWorkspace, ptr %44, i32 0, i32 17
  %46 = load ptr, ptr %45, align 8, !tbaa !21
  %47 = load ptr, ptr %4, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.OSQPWorkspace, ptr %47, i32 0, i32 0
  %49 = load ptr, ptr %48, align 8, !tbaa !22
  %50 = getelementptr inbounds %struct.OSQPData, ptr %49, i32 0, i32 0
  %51 = load i64, ptr %50, align 8, !tbaa !23
  %52 = call double @vec_norm_inf(ptr noundef %46, i64 noundef %51)
  store double %52, ptr %7, align 8, !tbaa !9
  store double 1.000000e+00, ptr %8, align 8, !tbaa !9
  br label %53

53:                                               ; preds = %43, %23
  %54 = load double, ptr %7, align 8, !tbaa !9
  %55 = load double, ptr %5, align 8, !tbaa !9
  %56 = fcmp ogt double %54, %55
  br i1 %56, label %57, label %250

57:                                               ; preds = %53
  %58 = load ptr, ptr %4, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.OSQPWorkspace, ptr %58, i32 0, i32 0
  %60 = load ptr, ptr %59, align 8, !tbaa !22
  %61 = getelementptr inbounds %struct.OSQPData, ptr %60, i32 0, i32 4
  %62 = load ptr, ptr %61, align 8, !tbaa !26
  %63 = load ptr, ptr %4, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.OSQPWorkspace, ptr %63, i32 0, i32 17
  %65 = load ptr, ptr %64, align 8, !tbaa !21
  %66 = load ptr, ptr %4, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.OSQPWorkspace, ptr %66, i32 0, i32 0
  %68 = load ptr, ptr %67, align 8, !tbaa !22
  %69 = getelementptr inbounds %struct.OSQPData, ptr %68, i32 0, i32 0
  %70 = load i64, ptr %69, align 8, !tbaa !23
  %71 = call double @vec_prod(ptr noundef %62, ptr noundef %65, i64 noundef %70)
  %72 = load double, ptr %8, align 8, !tbaa !9
  %73 = fneg double %72
  %74 = load double, ptr %5, align 8, !tbaa !9
  %75 = fmul double %73, %74
  %76 = load double, ptr %7, align 8, !tbaa !9
  %77 = fmul double %75, %76
  %78 = fcmp olt double %71, %77
  br i1 %78, label %79, label %249

79:                                               ; preds = %57
  %80 = load ptr, ptr %4, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.OSQPWorkspace, ptr %80, i32 0, i32 0
  %82 = load ptr, ptr %81, align 8, !tbaa !22
  %83 = getelementptr inbounds %struct.OSQPData, ptr %82, i32 0, i32 2
  %84 = load ptr, ptr %83, align 8, !tbaa !27
  %85 = load ptr, ptr %4, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.OSQPWorkspace, ptr %85, i32 0, i32 17
  %87 = load ptr, ptr %86, align 8, !tbaa !21
  %88 = load ptr, ptr %4, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.OSQPWorkspace, ptr %88, i32 0, i32 18
  %90 = load ptr, ptr %89, align 8, !tbaa !28
  call void @mat_vec(ptr noundef %84, ptr noundef %87, ptr noundef %90, i64 noundef 0)
  %91 = load ptr, ptr %4, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.OSQPWorkspace, ptr %91, i32 0, i32 0
  %93 = load ptr, ptr %92, align 8, !tbaa !22
  %94 = getelementptr inbounds %struct.OSQPData, ptr %93, i32 0, i32 2
  %95 = load ptr, ptr %94, align 8, !tbaa !27
  %96 = load ptr, ptr %4, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.OSQPWorkspace, ptr %96, i32 0, i32 17
  %98 = load ptr, ptr %97, align 8, !tbaa !21
  %99 = load ptr, ptr %4, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.OSQPWorkspace, ptr %99, i32 0, i32 18
  %101 = load ptr, ptr %100, align 8, !tbaa !28
  call void @mat_tpose_vec(ptr noundef %95, ptr noundef %98, ptr noundef %101, i64 noundef 1, i64 noundef 1)
  %102 = load ptr, ptr %4, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.OSQPWorkspace, ptr %102, i32 0, i32 23
  %104 = load ptr, ptr %103, align 8, !tbaa !11
  %105 = getelementptr inbounds %struct.OSQPSettings, ptr %104, i32 0, i32 2
  %106 = load i64, ptr %105, align 8, !tbaa !14
  %107 = icmp ne i64 %106, 0
  br i1 %107, label %108, label %132

108:                                              ; preds = %79
  %109 = load ptr, ptr %4, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.OSQPWorkspace, ptr %109, i32 0, i32 23
  %111 = load ptr, ptr %110, align 8, !tbaa !11
  %112 = getelementptr inbounds %struct.OSQPSettings, ptr %111, i32 0, i32 18
  %113 = load i64, ptr %112, align 8, !tbaa !17
  %114 = icmp ne i64 %113, 0
  br i1 %114, label %132, label %115

115:                                              ; preds = %108
  %116 = load ptr, ptr %4, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.OSQPWorkspace, ptr %116, i32 0, i32 24
  %118 = load ptr, ptr %117, align 8, !tbaa !18
  %119 = getelementptr inbounds %struct.OSQPScaling, ptr %118, i32 0, i32 4
  %120 = load ptr, ptr %119, align 8, !tbaa !29
  %121 = load ptr, ptr %4, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.OSQPWorkspace, ptr %121, i32 0, i32 18
  %123 = load ptr, ptr %122, align 8, !tbaa !28
  %124 = load ptr, ptr %4, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.OSQPWorkspace, ptr %124, i32 0, i32 18
  %126 = load ptr, ptr %125, align 8, !tbaa !28
  %127 = load ptr, ptr %4, align 8, !tbaa !5
  %128 = getelementptr inbounds %struct.OSQPWorkspace, ptr %127, i32 0, i32 0
  %129 = load ptr, ptr %128, align 8, !tbaa !22
  %130 = getelementptr inbounds %struct.OSQPData, ptr %129, i32 0, i32 0
  %131 = load i64, ptr %130, align 8, !tbaa !23
  call void @vec_ew_prod(ptr noundef %120, ptr noundef %123, ptr noundef %126, i64 noundef %131)
  br label %132

132:                                              ; preds = %115, %108, %79
  %133 = load ptr, ptr %4, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.OSQPWorkspace, ptr %133, i32 0, i32 18
  %135 = load ptr, ptr %134, align 8, !tbaa !28
  %136 = load ptr, ptr %4, align 8, !tbaa !5
  %137 = getelementptr inbounds %struct.OSQPWorkspace, ptr %136, i32 0, i32 0
  %138 = load ptr, ptr %137, align 8, !tbaa !22
  %139 = getelementptr inbounds %struct.OSQPData, ptr %138, i32 0, i32 0
  %140 = load i64, ptr %139, align 8, !tbaa !23
  %141 = call double @vec_norm_inf(ptr noundef %135, i64 noundef %140)
  %142 = load double, ptr %8, align 8, !tbaa !9
  %143 = load double, ptr %5, align 8, !tbaa !9
  %144 = fmul double %142, %143
  %145 = load double, ptr %7, align 8, !tbaa !9
  %146 = fmul double %144, %145
  %147 = fcmp olt double %141, %146
  br i1 %147, label %148, label %248

148:                                              ; preds = %132
  %149 = load ptr, ptr %4, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct.OSQPWorkspace, ptr %149, i32 0, i32 0
  %151 = load ptr, ptr %150, align 8, !tbaa !22
  %152 = getelementptr inbounds %struct.OSQPData, ptr %151, i32 0, i32 3
  %153 = load ptr, ptr %152, align 8, !tbaa !30
  %154 = load ptr, ptr %4, align 8, !tbaa !5
  %155 = getelementptr inbounds %struct.OSQPWorkspace, ptr %154, i32 0, i32 17
  %156 = load ptr, ptr %155, align 8, !tbaa !21
  %157 = load ptr, ptr %4, align 8, !tbaa !5
  %158 = getelementptr inbounds %struct.OSQPWorkspace, ptr %157, i32 0, i32 19
  %159 = load ptr, ptr %158, align 8, !tbaa !31
  call void @mat_vec(ptr noundef %153, ptr noundef %156, ptr noundef %159, i64 noundef 0)
  %160 = load ptr, ptr %4, align 8, !tbaa !5
  %161 = getelementptr inbounds %struct.OSQPWorkspace, ptr %160, i32 0, i32 23
  %162 = load ptr, ptr %161, align 8, !tbaa !11
  %163 = getelementptr inbounds %struct.OSQPSettings, ptr %162, i32 0, i32 2
  %164 = load i64, ptr %163, align 8, !tbaa !14
  %165 = icmp ne i64 %164, 0
  br i1 %165, label %166, label %190

166:                                              ; preds = %148
  %167 = load ptr, ptr %4, align 8, !tbaa !5
  %168 = getelementptr inbounds %struct.OSQPWorkspace, ptr %167, i32 0, i32 23
  %169 = load ptr, ptr %168, align 8, !tbaa !11
  %170 = getelementptr inbounds %struct.OSQPSettings, ptr %169, i32 0, i32 18
  %171 = load i64, ptr %170, align 8, !tbaa !17
  %172 = icmp ne i64 %171, 0
  br i1 %172, label %190, label %173

173:                                              ; preds = %166
  %174 = load ptr, ptr %4, align 8, !tbaa !5
  %175 = getelementptr inbounds %struct.OSQPWorkspace, ptr %174, i32 0, i32 24
  %176 = load ptr, ptr %175, align 8, !tbaa !18
  %177 = getelementptr inbounds %struct.OSQPScaling, ptr %176, i32 0, i32 5
  %178 = load ptr, ptr %177, align 8, !tbaa !32
  %179 = load ptr, ptr %4, align 8, !tbaa !5
  %180 = getelementptr inbounds %struct.OSQPWorkspace, ptr %179, i32 0, i32 19
  %181 = load ptr, ptr %180, align 8, !tbaa !31
  %182 = load ptr, ptr %4, align 8, !tbaa !5
  %183 = getelementptr inbounds %struct.OSQPWorkspace, ptr %182, i32 0, i32 19
  %184 = load ptr, ptr %183, align 8, !tbaa !31
  %185 = load ptr, ptr %4, align 8, !tbaa !5
  %186 = getelementptr inbounds %struct.OSQPWorkspace, ptr %185, i32 0, i32 0
  %187 = load ptr, ptr %186, align 8, !tbaa !22
  %188 = getelementptr inbounds %struct.OSQPData, ptr %187, i32 0, i32 1
  %189 = load i64, ptr %188, align 8, !tbaa !33
  call void @vec_ew_prod(ptr noundef %178, ptr noundef %181, ptr noundef %184, i64 noundef %189)
  br label %190

190:                                              ; preds = %173, %166, %148
  store i64 0, ptr %6, align 8, !tbaa !34
  br label %191

191:                                              ; preds = %244, %190
  %192 = load i64, ptr %6, align 8, !tbaa !34
  %193 = load ptr, ptr %4, align 8, !tbaa !5
  %194 = getelementptr inbounds %struct.OSQPWorkspace, ptr %193, i32 0, i32 0
  %195 = load ptr, ptr %194, align 8, !tbaa !22
  %196 = getelementptr inbounds %struct.OSQPData, ptr %195, i32 0, i32 1
  %197 = load i64, ptr %196, align 8, !tbaa !33
  %198 = icmp slt i64 %192, %197
  br i1 %198, label %199, label %247

199:                                              ; preds = %191
  %200 = load ptr, ptr %4, align 8, !tbaa !5
  %201 = getelementptr inbounds %struct.OSQPWorkspace, ptr %200, i32 0, i32 0
  %202 = load ptr, ptr %201, align 8, !tbaa !22
  %203 = getelementptr inbounds %struct.OSQPData, ptr %202, i32 0, i32 6
  %204 = load ptr, ptr %203, align 8, !tbaa !35
  %205 = load i64, ptr %6, align 8, !tbaa !34
  %206 = getelementptr inbounds double, ptr %204, i64 %205
  %207 = load double, ptr %206, align 8, !tbaa !9
  %208 = fcmp olt double %207, 1.000000e+16
  br i1 %208, label %209, label %220

209:                                              ; preds = %199
  %210 = load ptr, ptr %4, align 8, !tbaa !5
  %211 = getelementptr inbounds %struct.OSQPWorkspace, ptr %210, i32 0, i32 19
  %212 = load ptr, ptr %211, align 8, !tbaa !31
  %213 = load i64, ptr %6, align 8, !tbaa !34
  %214 = getelementptr inbounds double, ptr %212, i64 %213
  %215 = load double, ptr %214, align 8, !tbaa !9
  %216 = load double, ptr %5, align 8, !tbaa !9
  %217 = load double, ptr %7, align 8, !tbaa !9
  %218 = fmul double %216, %217
  %219 = fcmp ogt double %215, %218
  br i1 %219, label %242, label %220

220:                                              ; preds = %209, %199
  %221 = load ptr, ptr %4, align 8, !tbaa !5
  %222 = getelementptr inbounds %struct.OSQPWorkspace, ptr %221, i32 0, i32 0
  %223 = load ptr, ptr %222, align 8, !tbaa !22
  %224 = getelementptr inbounds %struct.OSQPData, ptr %223, i32 0, i32 5
  %225 = load ptr, ptr %224, align 8, !tbaa !36
  %226 = load i64, ptr %6, align 8, !tbaa !34
  %227 = getelementptr inbounds double, ptr %225, i64 %226
  %228 = load double, ptr %227, align 8, !tbaa !9
  %229 = fcmp ogt double %228, -1.000000e+16
  br i1 %229, label %230, label %243

230:                                              ; preds = %220
  %231 = load ptr, ptr %4, align 8, !tbaa !5
  %232 = getelementptr inbounds %struct.OSQPWorkspace, ptr %231, i32 0, i32 19
  %233 = load ptr, ptr %232, align 8, !tbaa !31
  %234 = load i64, ptr %6, align 8, !tbaa !34
  %235 = getelementptr inbounds double, ptr %233, i64 %234
  %236 = load double, ptr %235, align 8, !tbaa !9
  %237 = load double, ptr %5, align 8, !tbaa !9
  %238 = fneg double %237
  %239 = load double, ptr %7, align 8, !tbaa !9
  %240 = fmul double %238, %239
  %241 = fcmp olt double %236, %240
  br i1 %241, label %242, label %243

242:                                              ; preds = %230, %209
  store i64 0, ptr %3, align 8
  store i32 1, ptr %9, align 4
  br label %251

243:                                              ; preds = %230, %220
  br label %244

244:                                              ; preds = %243
  %245 = load i64, ptr %6, align 8, !tbaa !34
  %246 = add nsw i64 %245, 1
  store i64 %246, ptr %6, align 8, !tbaa !34
  br label %191, !llvm.loop !37

247:                                              ; preds = %191
  store i64 1, ptr %3, align 8
  store i32 1, ptr %9, align 4
  br label %251

248:                                              ; preds = %132
  br label %249

249:                                              ; preds = %248, %57
  br label %250

250:                                              ; preds = %249, %53
  store i64 0, ptr %3, align 8
  store i32 1, ptr %9, align 4
  br label %251

251:                                              ; preds = %250, %247, %242
  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
  %252 = load i64, ptr %3, align 8
  ret i64 %252
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }

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

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


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

declare double @vec_norm_inf(ptr noundef, i64 noundef) local_unnamed_addr #0

declare double @vec_prod(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #0

declare void @mat_vec(ptr noundef, ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #0

declare double @vec_scaled_norm_inf(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #0

declare void @mat_tpose_vec(ptr noundef, ptr noundef, ptr noundef, i64 noundef, i64 noundef) local_unnamed_addr #0

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

; Function Attrs: nounwind uwtable
define dso_local range(i64 0, 2) i64 @is_dual_infeasible(ptr nocapture noundef readonly %0, double noundef %1) local_unnamed_addr #1 {
  %3 = getelementptr inbounds i8, ptr %0, i64 184
  %4 = load ptr, ptr %3, align 8, !tbaa !5
  %5 = getelementptr inbounds i8, ptr %4, i64 16
  %6 = load i64, ptr %5, align 8, !tbaa !11
  %.not = icmp eq i64 %6, 0
  br i1 %.not, label %22, label %7

7:                                                ; preds = %2
  %8 = getelementptr inbounds i8, ptr %4, i64 144
  %9 = load i64, ptr %8, align 8, !tbaa !15
  %.not61 = icmp eq i64 %9, 0
  br i1 %.not61, label %10, label %22

10:                                               ; preds = %7
  %11 = getelementptr inbounds i8, ptr %0, i64 192
  %12 = load ptr, ptr %11, align 8, !tbaa !16
  %13 = getelementptr inbounds i8, ptr %12, i64 8
  %14 = load ptr, ptr %13, align 8, !tbaa !17
  %15 = getelementptr inbounds i8, ptr %0, i64 136
  %16 = load ptr, ptr %15, align 8, !tbaa !19
  %17 = load ptr, ptr %0, align 8, !tbaa !20
  %18 = load i64, ptr %17, align 8, !tbaa !21
  %19 = tail call double @vec_scaled_norm_inf(ptr noundef %14, ptr noundef %16, i64 noundef %18) #2
  %20 = load ptr, ptr %11, align 8, !tbaa !16
  %21 = load double, ptr %20, align 8, !tbaa !23
  br label %28

22:                                               ; preds = %7, %2
  %23 = getelementptr inbounds i8, ptr %0, i64 136
  %24 = load ptr, ptr %23, align 8, !tbaa !19
  %25 = load ptr, ptr %0, align 8, !tbaa !20
  %26 = load i64, ptr %25, align 8, !tbaa !21
  %27 = tail call double @vec_norm_inf(ptr noundef %24, i64 noundef %26) #2
  br label %28

28:                                               ; preds = %22, %10
  %.057 = phi double [ %27, %22 ], [ %19, %10 ]
  %.0 = phi double [ 1.000000e+00, %22 ], [ %21, %10 ]
  %29 = fcmp ogt double %.057, %1
  br i1 %29, label %30, label %.loopexit

30:                                               ; preds = %28
  %31 = load ptr, ptr %0, align 8, !tbaa !20
  %32 = getelementptr inbounds i8, ptr %31, i64 32
  %33 = load ptr, ptr %32, align 8, !tbaa !24
  %34 = getelementptr inbounds i8, ptr %0, i64 136
  %35 = load ptr, ptr %34, align 8, !tbaa !19
  %36 = load i64, ptr %31, align 8, !tbaa !21
  %37 = tail call double @vec_prod(ptr noundef %33, ptr noundef %35, i64 noundef %36) #2
  %38 = fneg double %.0
  %39 = fmul double %38, %1
  %40 = fmul double %.057, %39
  %41 = fcmp olt double %37, %40
  br i1 %41, label %42, label %.loopexit

42:                                               ; preds = %30
  %43 = load ptr, ptr %0, align 8, !tbaa !20
  %44 = getelementptr inbounds i8, ptr %43, i64 16
  %45 = load ptr, ptr %44, align 8, !tbaa !25
  %46 = load ptr, ptr %34, align 8, !tbaa !19
  %47 = getelementptr inbounds i8, ptr %0, i64 144
  %48 = load ptr, ptr %47, align 8, !tbaa !26
  tail call void @mat_vec(ptr noundef %45, ptr noundef %46, ptr noundef %48, i64 noundef 0) #2
  %49 = load ptr, ptr %0, align 8, !tbaa !20
  %50 = getelementptr inbounds i8, ptr %49, i64 16
  %51 = load ptr, ptr %50, align 8, !tbaa !25
  %52 = load ptr, ptr %34, align 8, !tbaa !19
  %53 = load ptr, ptr %47, align 8, !tbaa !26
  tail call void @mat_tpose_vec(ptr noundef %51, ptr noundef %52, ptr noundef %53, i64 noundef 1, i64 noundef 1) #2
  %54 = load ptr, ptr %3, align 8, !tbaa !5
  %55 = getelementptr inbounds i8, ptr %54, i64 16
  %56 = load i64, ptr %55, align 8, !tbaa !11
  %.not62 = icmp eq i64 %56, 0
  br i1 %.not62, label %68, label %57

57:                                               ; preds = %42
  %58 = getelementptr inbounds i8, ptr %54, i64 144
  %59 = load i64, ptr %58, align 8, !tbaa !15
  %.not63 = icmp eq i64 %59, 0
  br i1 %.not63, label %60, label %68

60:                                               ; preds = %57
  %61 = getelementptr inbounds i8, ptr %0, i64 192
  %62 = load ptr, ptr %61, align 8, !tbaa !16
  %63 = getelementptr inbounds i8, ptr %62, i64 32
  %64 = load ptr, ptr %63, align 8, !tbaa !27
  %65 = load ptr, ptr %47, align 8, !tbaa !26
  %66 = load ptr, ptr %0, align 8, !tbaa !20
  %67 = load i64, ptr %66, align 8, !tbaa !21
  tail call void @vec_ew_prod(ptr noundef %64, ptr noundef %65, ptr noundef %65, i64 noundef %67) #2
  br label %68

68:                                               ; preds = %60, %57, %42
  %69 = load ptr, ptr %47, align 8, !tbaa !26
  %70 = load ptr, ptr %0, align 8, !tbaa !20
  %71 = load i64, ptr %70, align 8, !tbaa !21
  %72 = tail call double @vec_norm_inf(ptr noundef %69, i64 noundef %71) #2
  %73 = fmul double %.0, %1
  %74 = fmul double %.057, %73
  %75 = fcmp olt double %72, %74
  br i1 %75, label %76, label %.loopexit

76:                                               ; preds = %68
  %77 = load ptr, ptr %0, align 8, !tbaa !20
  %78 = getelementptr inbounds i8, ptr %77, i64 24
  %79 = load ptr, ptr %78, align 8, !tbaa !28
  %80 = load ptr, ptr %34, align 8, !tbaa !19
  %81 = getelementptr inbounds i8, ptr %0, i64 152
  %82 = load ptr, ptr %81, align 8, !tbaa !29
  tail call void @mat_vec(ptr noundef %79, ptr noundef %80, ptr noundef %82, i64 noundef 0) #2
  %83 = load ptr, ptr %3, align 8, !tbaa !5
  %84 = getelementptr inbounds i8, ptr %83, i64 16
  %85 = load i64, ptr %84, align 8, !tbaa !11
  %.not64 = icmp eq i64 %85, 0
  br i1 %.not64, label %98, label %86

86:                                               ; preds = %76
  %87 = getelementptr inbounds i8, ptr %83, i64 144
  %88 = load i64, ptr %87, align 8, !tbaa !15
  %.not65 = icmp eq i64 %88, 0
  br i1 %.not65, label %89, label %98

89:                                               ; preds = %86
  %90 = getelementptr inbounds i8, ptr %0, i64 192
  %91 = load ptr, ptr %90, align 8, !tbaa !16
  %92 = getelementptr inbounds i8, ptr %91, i64 40
  %93 = load ptr, ptr %92, align 8, !tbaa !30
  %94 = load ptr, ptr %81, align 8, !tbaa !29
  %95 = load ptr, ptr %0, align 8, !tbaa !20
  %96 = getelementptr inbounds i8, ptr %95, i64 8
  %97 = load i64, ptr %96, align 8, !tbaa !31
  tail call void @vec_ew_prod(ptr noundef %93, ptr noundef %94, ptr noundef %94, i64 noundef %97) #2
  br label %98

98:                                               ; preds = %89, %86, %76
  %99 = load ptr, ptr %0, align 8, !tbaa !20
  %100 = getelementptr inbounds i8, ptr %99, i64 8
  %101 = load i64, ptr %100, align 8, !tbaa !31
  %102 = icmp sgt i64 %101, 0
  br i1 %102, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %98
  %103 = getelementptr inbounds i8, ptr %99, i64 48
  %104 = load ptr, ptr %103, align 8, !tbaa !32
  %105 = fmul double %.057, %1
  %106 = getelementptr inbounds i8, ptr %99, i64 40
  %107 = fneg double %1
  %108 = fmul double %.057, %107
  br label %109

109:                                              ; preds = %.lr.ph, %128
  %.05866 = phi i64 [ 0, %.lr.ph ], [ %129, %128 ]
  %110 = getelementptr inbounds double, ptr %104, i64 %.05866
  %111 = load double, ptr %110, align 8, !tbaa !33
  %112 = fcmp olt double %111, 1.000000e+16
  br i1 %112, label %113, label %118

113:                                              ; preds = %109
  %114 = load ptr, ptr %81, align 8, !tbaa !29
  %115 = getelementptr inbounds double, ptr %114, i64 %.05866
  %116 = load double, ptr %115, align 8, !tbaa !33
  %117 = fcmp ogt double %116, %105
  br i1 %117, label %.loopexit, label %118

118:                                              ; preds = %113, %109
  %119 = load ptr, ptr %106, align 8, !tbaa !34
  %120 = getelementptr inbounds double, ptr %119, i64 %.05866
  %121 = load double, ptr %120, align 8, !tbaa !33
  %122 = fcmp ogt double %121, -1.000000e+16
  br i1 %122, label %123, label %128

123:                                              ; preds = %118
  %124 = load ptr, ptr %81, align 8, !tbaa !29
  %125 = getelementptr inbounds double, ptr %124, i64 %.05866
  %126 = load double, ptr %125, align 8, !tbaa !33
  %127 = fcmp olt double %126, %108
  br i1 %127, label %.loopexit, label %128

128:                                              ; preds = %118, %123
  %129 = add nuw nsw i64 %.05866, 1
  %exitcond.not = icmp eq i64 %129, %101
  br i1 %exitcond.not, label %.loopexit, label %109, !llvm.loop !35

.loopexit:                                        ; preds = %123, %113, %128, %98, %28, %68, %30
  %.059 = phi i64 [ 0, %30 ], [ 0, %68 ], [ 0, %28 ], [ 1, %98 ], [ 0, %123 ], [ 0, %113 ], [ 1, %128 ]
  ret i64 %.059
}

attributes #0 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 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, !10, i64 16}
!12 = !{!"", !13, i64 0, !13, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !13, i64 40, !13, i64 48, !10, i64 56, !13, i64 64, !13, i64 72, !13, i64 80, !13, i64 88, !13, i64 96, !14, i64 104, !13, i64 112, !10, i64 120, !10, i64 128, !10, i64 136, !10, i64 144, !10, i64 152, !10, i64 160, !13, i64 168}
!13 = !{!"double", !8, i64 0}
!14 = !{!"int", !8, i64 0}
!15 = !{!12, !10, i64 144}
!16 = !{!6, !7, i64 192}
!17 = !{!18, !7, i64 8}
!18 = !{!"", !13, i64 0, !7, i64 8, !7, i64 16, !13, i64 24, !7, i64 32, !7, i64 40}
!19 = !{!6, !7, i64 136}
!20 = !{!6, !7, i64 0}
!21 = !{!22, !10, i64 0}
!22 = !{!"", !10, i64 0, !10, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48}
!23 = !{!18, !13, i64 0}
!24 = !{!22, !7, i64 32}
!25 = !{!22, !7, i64 16}
!26 = !{!6, !7, i64 144}
!27 = !{!18, !7, i64 32}
!28 = !{!22, !7, i64 24}
!29 = !{!6, !7, i64 152}
!30 = !{!18, !7, i64 40}
!31 = !{!22, !10, i64 8}
!32 = !{!22, !7, i64 48}
!33 = !{!13, !13, i64 0}
!34 = !{!22, !7, i64 40}
!35 = distinct !{!35, !36}
!36 = !{!"llvm.loop.mustprogress"}


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