; LLVM IR from kulho/STM32PendulumMPC :: STM32F407/qpOASES/src (QProblem)

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

%"class.qpOASES::QProblemB" = type { ptr, i32, ptr, ptr, ptr, ptr, %"class.qpOASES::Bounds", ptr, i32, ptr, ptr, double, i32, i32, i32, i32, double, i32, ptr, double, double, i32, [4 x i8], %"class.qpOASES::Options", %"class.qpOASES::Flipper", %"struct.qpOASES::TabularOutput" }
%"class.qpOASES::Bounds" = type { %"class.qpOASES::SubjectTo", %"class.qpOASES::Indexlist", %"class.qpOASES::Indexlist" }
%"class.qpOASES::SubjectTo" = type { ptr, i32, ptr, ptr, i32, i32 }
%"class.qpOASES::Indexlist" = type <{ ptr, ptr, i32, i32, i32, i32, i32, [4 x i8] }>
%"class.qpOASES::Options" = type <{ i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, double, double, double, double, double, double, double, double, double, double, double, i32, [4 x i8], double, i32, [4 x i8], double, i32, [4 x i8], double, double, double, double, i32, i32, i32, i32, i32, [4 x i8] }>
%"class.qpOASES::Flipper" = type { i32, i32, %"class.qpOASES::Bounds", %"class.qpOASES::Constraints", ptr, ptr, ptr }
%"class.qpOASES::Constraints" = type { %"class.qpOASES::SubjectTo", %"class.qpOASES::Indexlist", %"class.qpOASES::Indexlist" }
%"struct.qpOASES::TabularOutput" = type { i32, i32, i32, i32, i32, i32, i32, i32 }
%"class.qpOASES::QProblem" = type { %"class.qpOASES::QProblemB", i32, ptr, ptr, ptr, %"class.qpOASES::Constraints", ptr, ptr, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }

@.str = external hidden unnamed_addr constant [28 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [91 x i8], align 1

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

declare noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv() #1

declare noundef i32 @_ZN7qpOASES15MessageHandling10throwErrorENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28), i32 noundef, ptr noundef, ptr noundef, ptr noundef, i64 noundef, i32 noundef) #1

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZNK7qpOASES9QProblemB5getNVEv(ptr noundef nonnull align 8 dereferenceable(800)) #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZNK7qpOASES8QProblem5getNCEv(ptr noundef nonnull align 8 dereferenceable(1056)) #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK7qpOASES9SubjectTo9getStatusEi(ptr noundef nonnull align 8 dereferenceable(40), i32 noundef) #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN7qpOASES8QProblem22setupAuxiliaryQPboundsEPKNS_6BoundsEPKNS_11ConstraintsENS_11BooleanTypeE(ptr noundef nonnull align 8 dereferenceable(1056) %0, ptr noundef %1, ptr noundef %2, i32 noundef %3) #4 align 2 {
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store i32 %3, ptr %9, align 4, !tbaa !9
  %14 = load ptr, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  %15 = call noundef i32 @_ZNK7qpOASES9QProblemB5getNVEv(ptr noundef nonnull align 8 dereferenceable(800) %14)
  store i32 %15, ptr %11, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  %16 = call noundef i32 @_ZNK7qpOASES8QProblem5getNCEv(ptr noundef nonnull align 8 dereferenceable(1056) %14)
  store i32 %16, ptr %12, align 4, !tbaa !11
  store i32 0, ptr %10, align 4, !tbaa !11
  br label %17

17:                                               ; preds = %227, %4
  %18 = load i32, ptr %10, align 4, !tbaa !11
  %19 = load i32, ptr %11, align 4, !tbaa !11
  %20 = icmp slt i32 %18, %19
  br i1 %20, label %21, label %230

21:                                               ; preds = %17
  %22 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %14, i32 0, i32 6
  %23 = load i32, ptr %10, align 4, !tbaa !11
  %24 = call noundef i32 @_ZNK7qpOASES9SubjectTo9getStatusEi(ptr noundef nonnull align 8 dereferenceable(40) %22, i32 noundef %23)
  switch i32 %24, label %223 [
    i32 0, label %25
    i32 -1, label %125
    i32 1, label %174
    i32 3, label %226
  ]

25:                                               ; preds = %21
  %26 = load i32, ptr %9, align 4, !tbaa !9
  %27 = icmp eq i32 %26, 1
  br i1 %27, label %28, label %124

28:                                               ; preds = %25
  %29 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %14, i32 0, i32 6
  %30 = load i32, ptr %10, align 4, !tbaa !11
  %31 = call noundef i32 @_ZNK7qpOASES9SubjectTo7getTypeEi(ptr noundef nonnull align 8 dereferenceable(40) %29, i32 noundef %30)
  %32 = icmp eq i32 %31, 2
  br i1 %32, label %33, label %56

33:                                               ; preds = %28
  %34 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %14, i32 0, i32 9
  %35 = load ptr, ptr %34, align 8, !tbaa !13
  %36 = load i32, ptr %10, align 4, !tbaa !11
  %37 = sext i32 %36 to i64
  %38 = getelementptr inbounds double, ptr %35, i64 %37
  %39 = load double, ptr %38, align 8, !tbaa !27
  %40 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %14, i32 0, i32 4
  %41 = load ptr, ptr %40, align 8, !tbaa !28
  %42 = load i32, ptr %10, align 4, !tbaa !11
  %43 = sext i32 %42 to i64
  %44 = getelementptr inbounds double, ptr %41, i64 %43
  store double %39, ptr %44, align 8, !tbaa !27
  %45 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %14, i32 0, i32 9
  %46 = load ptr, ptr %45, align 8, !tbaa !13
  %47 = load i32, ptr %10, align 4, !tbaa !11
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds double, ptr %46, i64 %48
  %50 = load double, ptr %49, align 8, !tbaa !27
  %51 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %14, i32 0, i32 5
  %52 = load ptr, ptr %51, align 8, !tbaa !29
  %53 = load i32, ptr %10, align 4, !tbaa !11
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds double, ptr %52, i64 %54
  store double %50, ptr %55, align 8, !tbaa !27
  br label %123

56:                                               ; preds = %28
  %57 = load ptr, ptr %7, align 8, !tbaa !5
  %58 = load i32, ptr %10, align 4, !tbaa !11
  %59 = call noundef i32 @_ZNK7qpOASES9SubjectTo9getStatusEi(ptr noundef nonnull align 8 dereferenceable(40) %57, i32 noundef %58)
  %60 = icmp eq i32 %59, -1
  br i1 %60, label %61, label %73

61:                                               ; preds = %56
  %62 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %14, i32 0, i32 9
  %63 = load ptr, ptr %62, align 8, !tbaa !13
  %64 = load i32, ptr %10, align 4, !tbaa !11
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds double, ptr %63, i64 %65
  %67 = load double, ptr %66, align 8, !tbaa !27
  %68 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %14, i32 0, i32 4
  %69 = load ptr, ptr %68, align 8, !tbaa !28
  %70 = load i32, ptr %10, align 4, !tbaa !11
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds double, ptr %69, i64 %71
  store double %67, ptr %72, align 8, !tbaa !27
  br label %89

73:                                               ; preds = %56
  %74 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %14, i32 0, i32 9
  %75 = load ptr, ptr %74, align 8, !tbaa !13
  %76 = load i32, ptr %10, align 4, !tbaa !11
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds double, ptr %75, i64 %77
  %79 = load double, ptr %78, align 8, !tbaa !27
  %80 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %14, i32 0, i32 23
  %81 = getelementptr inbounds %"class.qpOASES::Options", ptr %80, i32 0, i32 12
  %82 = load double, ptr %81, align 8, !tbaa !30
  %83 = fsub double %79, %82
  %84 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %14, i32 0, i32 4
  %85 = load ptr, ptr %84, align 8, !tbaa !28
  %86 = load i32, ptr %10, align 4, !tbaa !11
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds double, ptr %85, i64 %87
  store double %83, ptr %88, align 8, !tbaa !27
  br label %89

89:                                               ; preds = %73, %61
  %90 = load ptr, ptr %7, align 8, !tbaa !5
  %91 = load i32, ptr %10, align 4, !tbaa !11
  %92 = call noundef i32 @_ZNK7qpOASES9SubjectTo9getStatusEi(ptr noundef nonnull align 8 dereferenceable(40) %90, i32 noundef %91)
  %93 = icmp eq i32 %92, 1
  br i1 %93, label %94, label %106

94:                                               ; preds = %89
  %95 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %14, i32 0, i32 9
  %96 = load ptr, ptr %95, align 8, !tbaa !13
  %97 = load i32, ptr %10, align 4, !tbaa !11
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds double, ptr %96, i64 %98
  %100 = load double, ptr %99, align 8, !tbaa !27
  %101 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %14, i32 0, i32 5
  %102 = load ptr, ptr %101, align 8, !tbaa !29
  %103 = load i32, ptr %10, align 4, !tbaa !11
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds double, ptr %102, i64 %104
  store double %100, ptr %105, align 8, !tbaa !27
  br label %122

106:                                              ; preds = %89
  %107 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %14, i32 0, i32 9
  %108 = load ptr, ptr %107, align 8, !tbaa !13
  %109 = load i32, ptr %10, align 4, !tbaa !11
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds double, ptr %108, i64 %110
  %112 = load double, ptr %111, align 8, !tbaa !27
  %113 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %14, i32 0, i32 23
  %114 = getelementptr inbounds %"class.qpOASES::Options", ptr %113, i32 0, i32 12
  %115 = load double, ptr %114, align 8, !tbaa !30
  %116 = fadd double %112, %115
  %117 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %14, i32 0, i32 5
  %118 = load ptr, ptr %117, align 8, !tbaa !29
  %119 = load i32, ptr %10, align 4, !tbaa !11
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds double, ptr %118, i64 %120
  store double %116, ptr %121, align 8, !tbaa !27
  br label %122

122:                                              ; preds = %106, %94
  br label %123

123:                                              ; preds = %122, %33
  br label %124

124:                                              ; preds = %123, %25
  br label %226

125:                                              ; preds = %21
  %126 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %14, i32 0, i32 9
  %127 = load ptr, ptr %126, align 8, !tbaa !13
  %128 = load i32, ptr %10, align 4, !tbaa !11
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds double, ptr %127, i64 %129
  %131 = load double, ptr %130, align 8, !tbaa !27
  %132 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %14, i32 0, i32 4
  %133 = load ptr, ptr %132, align 8, !tbaa !28
  %134 = load i32, ptr %10, align 4, !tbaa !11
  %135 = sext i32 %134 to i64
  %136 = getelementptr inbounds double, ptr %133, i64 %135
  store double %131, ptr %136, align 8, !tbaa !27
  %137 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %14, i32 0, i32 6
  %138 = load i32, ptr %10, align 4, !tbaa !11
  %139 = call noundef i32 @_ZNK7qpOASES9SubjectTo7getTypeEi(ptr noundef nonnull align 8 dereferenceable(40) %137, i32 noundef %138)
  %140 = icmp eq i32 %139, 2
  br i1 %140, label %141, label %153

141:                                              ; preds = %125
  %142 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %14, i32 0, i32 9
  %143 = load ptr, ptr %142, align 8, !tbaa !13
  %144 = load i32, ptr %10, align 4, !tbaa !11
  %145 = sext i32 %144 to i64
  %146 = getelementptr inbounds double, ptr %143, i64 %145
  %147 = load double, ptr %146, align 8, !tbaa !27
  %148 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %14, i32 0, i32 5
  %149 = load ptr, ptr %148, align 8, !tbaa !29
  %150 = load i32, ptr %10, align 4, !tbaa !11
  %151 = sext i32 %150 to i64
  %152 = getelementptr inbounds double, ptr %149, i64 %151
  store double %147, ptr %152, align 8, !tbaa !27
  br label %173

153:                                              ; preds = %125
  %154 = load i32, ptr %9, align 4, !tbaa !9
  %155 = icmp eq i32 %154, 1
  br i1 %155, label %156, label %172

156:                                              ; preds = %153
  %157 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %14, i32 0, i32 9
  %158 = load ptr, ptr %157, align 8, !tbaa !13
  %159 = load i32, ptr %10, align 4, !tbaa !11
  %160 = sext i32 %159 to i64
  %161 = getelementptr inbounds double, ptr %158, i64 %160
  %162 = load double, ptr %161, align 8, !tbaa !27
  %163 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %14, i32 0, i32 23
  %164 = getelementptr inbounds %"class.qpOASES::Options", ptr %163, i32 0, i32 12
  %165 = load double, ptr %164, align 8, !tbaa !30
  %166 = fadd double %162, %165
  %167 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %14, i32 0, i32 5
  %168 = load ptr, ptr %167, align 8, !tbaa !29
  %169 = load i32, ptr %10, align 4, !tbaa !11
  %170 = sext i32 %169 to i64
  %171 = getelementptr inbounds double, ptr %168, i64 %170
  store double %166, ptr %171, align 8, !tbaa !27
  br label %172

172:                                              ; preds = %156, %153
  br label %173

173:                                              ; preds = %172, %141
  br label %226

174:                                              ; preds = %21
  %175 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %14, i32 0, i32 9
  %176 = load ptr, ptr %175, align 8, !tbaa !13
  %177 = load i32, ptr %10, align 4, !tbaa !11
  %178 = sext i32 %177 to i64
  %179 = getelementptr inbounds double, ptr %176, i64 %178
  %180 = load double, ptr %179, align 8, !tbaa !27
  %181 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %14, i32 0, i32 5
  %182 = load ptr, ptr %181, align 8, !tbaa !29
  %183 = load i32, ptr %10, align 4, !tbaa !11
  %184 = sext i32 %183 to i64
  %185 = getelementptr inbounds double, ptr %182, i64 %184
  store double %180, ptr %185, align 8, !tbaa !27
  %186 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %14, i32 0, i32 6
  %187 = load i32, ptr %10, align 4, !tbaa !11
  %188 = call noundef i32 @_ZNK7qpOASES9SubjectTo7getTypeEi(ptr noundef nonnull align 8 dereferenceable(40) %186, i32 noundef %187)
  %189 = icmp eq i32 %188, 2
  br i1 %189, label %190, label %202

190:                                              ; preds = %174
  %191 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %14, i32 0, i32 9
  %192 = load ptr, ptr %191, align 8, !tbaa !13
  %193 = load i32, ptr %10, align 4, !tbaa !11
  %194 = sext i32 %193 to i64
  %195 = getelementptr inbounds double, ptr %192, i64 %194
  %196 = load double, ptr %195, align 8, !tbaa !27
  %197 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %14, i32 0, i32 4
  %198 = load ptr, ptr %197, align 8, !tbaa !28
  %199 = load i32, ptr %10, align 4, !tbaa !11
  %200 = sext i32 %199 to i64
  %201 = getelementptr inbounds double, ptr %198, i64 %200
  store double %196, ptr %201, align 8, !tbaa !27
  br label %222

202:                                              ; preds = %174
  %203 = load i32, ptr %9, align 4, !tbaa !9
  %204 = icmp eq i32 %203, 1
  br i1 %204, label %205, label %221

205:                                              ; preds = %202
  %206 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %14, i32 0, i32 9
  %207 = load ptr, ptr %206, align 8, !tbaa !13
  %208 = load i32, ptr %10, align 4, !tbaa !11
  %209 = sext i32 %208 to i64
  %210 = getelementptr inbounds double, ptr %207, i64 %209
  %211 = load double, ptr %210, align 8, !tbaa !27
  %212 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %14, i32 0, i32 23
  %213 = getelementptr inbounds %"class.qpOASES::Options", ptr %212, i32 0, i32 12
  %214 = load double, ptr %213, align 8, !tbaa !30
  %215 = fsub double %211, %214
  %216 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %14, i32 0, i32 4
  %217 = load ptr, ptr %216, align 8, !tbaa !28
  %218 = load i32, ptr %10, align 4, !tbaa !11
  %219 = sext i32 %218 to i64
  %220 = getelementptr inbounds double, ptr %217, i64 %219
  store double %215, ptr %220, align 8, !tbaa !27
  br label %221

221:                                              ; preds = %205, %202
  br label %222

222:                                              ; preds = %221, %190
  br label %226

223:                                              ; preds = %21
  %224 = call noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv()
  %225 = call noundef i32 @_ZN7qpOASES15MessageHandling10throwErrorENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28) %224, i32 noundef 9, ptr noundef null, ptr noundef @.str, ptr noundef @.str.1, i64 noundef 2711, i32 noundef 1)
  store i32 %225, ptr %5, align 4
  store i32 1, ptr %13, align 4
  br label %481

226:                                              ; preds = %222, %173, %124, %21
  br label %227

227:                                              ; preds = %226
  %228 = load i32, ptr %10, align 4, !tbaa !11
  %229 = add nsw i32 %228, 1
  store i32 %229, ptr %10, align 4, !tbaa !11
  br label %17, !llvm.loop !31

230:                                              ; preds = %17
  store i32 0, ptr %10, align 4, !tbaa !11
  br label %231

231:                                              ; preds = %477, %230
  %232 = load i32, ptr %10, align 4, !tbaa !11
  %233 = load i32, ptr %12, align 4, !tbaa !11
  %234 = icmp slt i32 %232, %233
  br i1 %234, label %235, label %480

235:                                              ; preds = %231
  %236 = getelementptr inbounds %"class.qpOASES::QProblem", ptr %14, i32 0, i32 5
  %237 = load i32, ptr %10, align 4, !tbaa !11
  %238 = call noundef i32 @_ZNK7qpOASES9SubjectTo9getStatusEi(ptr noundef nonnull align 8 dereferenceable(40) %236, i32 noundef %237)
  switch i32 %238, label %437 [
    i32 0, label %239
    i32 -1, label %339
    i32 1, label %388
    i32 3, label %440
  ]

239:                                              ; preds = %235
  %240 = load i32, ptr %9, align 4, !tbaa !9
  %241 = icmp eq i32 %240, 1
  br i1 %241, label %242, label %338

242:                                              ; preds = %239
  %243 = getelementptr inbounds %"class.qpOASES::QProblem", ptr %14, i32 0, i32 5
  %244 = load i32, ptr %10, align 4, !tbaa !11
  %245 = call noundef i32 @_ZNK7qpOASES9SubjectTo7getTypeEi(ptr noundef nonnull align 8 dereferenceable(40) %243, i32 noundef %244)
  %246 = icmp eq i32 %245, 2
  br i1 %246, label %247, label %270

247:                                              ; preds = %242
  %248 = getelementptr inbounds %"class.qpOASES::QProblem", ptr %14, i32 0, i32 10
  %249 = load ptr, ptr %248, align 8, !tbaa !33
  %250 = load i32, ptr %10, align 4, !tbaa !11
  %251 = sext i32 %250 to i64
  %252 = getelementptr inbounds double, ptr %249, i64 %251
  %253 = load double, ptr %252, align 8, !tbaa !27
  %254 = getelementptr inbounds %"class.qpOASES::QProblem", ptr %14, i32 0, i32 3
  %255 = load ptr, ptr %254, align 8, !tbaa !35
  %256 = load i32, ptr %10, align 4, !tbaa !11
  %257 = sext i32 %256 to i64
  %258 = getelementptr inbounds double, ptr %255, i64 %257
  store double %253, ptr %258, align 8, !tbaa !27
  %259 = getelementptr inbounds %"class.qpOASES::QProblem", ptr %14, i32 0, i32 11
  %260 = load ptr, ptr %259, align 8, !tbaa !36
  %261 = load i32, ptr %10, align 4, !tbaa !11
  %262 = sext i32 %261 to i64
  %263 = getelementptr inbounds double, ptr %260, i64 %262
  %264 = load double, ptr %263, align 8, !tbaa !27
  %265 = getelementptr inbounds %"class.qpOASES::QProblem", ptr %14, i32 0, i32 4
  %266 = load ptr, ptr %265, align 8, !tbaa !37
  %267 = load i32, ptr %10, align 4, !tbaa !11
  %268 = sext i32 %267 to i64
  %269 = getelementptr inbounds double, ptr %266, i64 %268
  store double %264, ptr %269, align 8, !tbaa !27
  br label %337

270:                                              ; preds = %242
  %271 = load ptr, ptr %8, align 8, !tbaa !5
  %272 = load i32, ptr %10, align 4, !tbaa !11
  %273 = call noundef i32 @_ZNK7qpOASES9SubjectTo9getStatusEi(ptr noundef nonnull align 8 dereferenceable(40) %271, i32 noundef %272)
  %274 = icmp eq i32 %273, -1
  br i1 %274, label %275, label %287

275:                                              ; preds = %270
  %276 = getelementptr inbounds %"class.qpOASES::QProblem", ptr %14, i32 0, i32 10
  %277 = load ptr, ptr %276, align 8, !tbaa !33
  %278 = load i32, ptr %10, align 4, !tbaa !11
  %279 = sext i32 %278 to i64
  %280 = getelementptr inbounds double, ptr %277, i64 %279
  %281 = load double, ptr %280, align 8, !tbaa !27
  %282 = getelementptr inbounds %"class.qpOASES::QProblem", ptr %14, i32 0, i32 3
  %283 = load ptr, ptr %282, align 8, !tbaa !35
  %284 = load i32, ptr %10, align 4, !tbaa !11
  %285 = sext i32 %284 to i64
  %286 = getelementptr inbounds double, ptr %283, i64 %285
  store double %281, ptr %286, align 8, !tbaa !27
  br label %303

287:                                              ; preds = %270
  %288 = getelementptr inbounds %"class.qpOASES::QProblem", ptr %14, i32 0, i32 10
  %289 = load ptr, ptr %288, align 8, !tbaa !33
  %290 = load i32, ptr %10, align 4, !tbaa !11
  %291 = sext i32 %290 to i64
  %292 = getelementptr inbounds double, ptr %289, i64 %291
  %293 = load double, ptr %292, align 8, !tbaa !27
  %294 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %14, i32 0, i32 23
  %295 = getelementptr inbounds %"class.qpOASES::Options", ptr %294, i32 0, i32 12
  %296 = load double, ptr %295, align 8, !tbaa !30
  %297 = fsub double %293, %296
  %298 = getelementptr inbounds %"class.qpOASES::QProblem", ptr %14, i32 0, i32 3
  %299 = load ptr, ptr %298, align 8, !tbaa !35
  %300 = load i32, ptr %10, align 4, !tbaa !11
  %301 = sext i32 %300 to i64
  %302 = getelementptr inbounds double, ptr %299, i64 %301
  store double %297, ptr %302, align 8, !tbaa !27
  br label %303

303:                                              ; preds = %287, %275
  %304 = load ptr, ptr %8, align 8, !tbaa !5
  %305 = load i32, ptr %10, align 4, !tbaa !11
  %306 = call noundef i32 @_ZNK7qpOASES9SubjectTo9getStatusEi(ptr noundef nonnull align 8 dereferenceable(40) %304, i32 noundef %305)
  %307 = icmp eq i32 %306, 1
  br i1 %307, label %308, label %320

308:                                              ; preds = %303
  %309 = getelementptr inbounds %"class.qpOASES::QProblem", ptr %14, i32 0, i32 11
  %310 = load ptr, ptr %309, align 8, !tbaa !36
  %311 = load i32, ptr %10, align 4, !tbaa !11
  %312 = sext i32 %311 to i64
  %313 = getelementptr inbounds double, ptr %310, i64 %312
  %314 = load double, ptr %313, align 8, !tbaa !27
  %315 = getelementptr inbounds %"class.qpOASES::QProblem", ptr %14, i32 0, i32 4
  %316 = load ptr, ptr %315, align 8, !tbaa !37
  %317 = load i32, ptr %10, align 4, !tbaa !11
  %318 = sext i32 %317 to i64
  %319 = getelementptr inbounds double, ptr %316, i64 %318
  store double %314, ptr %319, align 8, !tbaa !27
  br label %336

320:                                              ; preds = %303
  %321 = getelementptr inbounds %"class.qpOASES::QProblem", ptr %14, i32 0, i32 11
  %322 = load ptr, ptr %321, align 8, !tbaa !36
  %323 = load i32, ptr %10, align 4, !tbaa !11
  %324 = sext i32 %323 to i64
  %325 = getelementptr inbounds double, ptr %322, i64 %324
  %326 = load double, ptr %325, align 8, !tbaa !27
  %327 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %14, i32 0, i32 23
  %328 = getelementptr inbounds %"class.qpOASES::Options", ptr %327, i32 0, i32 12
  %329 = load double, ptr %328, align 8, !tbaa !30
  %330 = fadd double %326, %329
  %331 = getelementptr inbounds %"class.qpOASES::QProblem", ptr %14, i32 0, i32 4
  %332 = load ptr, ptr %331, align 8, !tbaa !37
  %333 = load i32, ptr %10, align 4, !tbaa !11
  %334 = sext i32 %333 to i64
  %335 = getelementptr inbounds double, ptr %332, i64 %334
  store double %330, ptr %335, align 8, !tbaa !27
  br label %336

336:                                              ; preds = %320, %308
  br label %337

337:                                              ; preds = %336, %247
  br label %338

338:                                              ; preds = %337, %239
  br label %440

339:                                              ; preds = %235
  %340 = getelementptr inbounds %"class.qpOASES::QProblem", ptr %14, i32 0, i32 10
  %341 = load ptr, ptr %340, align 8, !tbaa !33
  %342 = load i32, ptr %10, align 4, !tbaa !11
  %343 = sext i32 %342 to i64
  %344 = getelementptr inbounds double, ptr %341, i64 %343
  %345 = load double, ptr %344, align 8, !tbaa !27
  %346 = getelementptr inbounds %"class.qpOASES::QProblem", ptr %14, i32 0, i32 3
  %347 = load ptr, ptr %346, align 8, !tbaa !35
  %348 = load i32, ptr %10, align 4, !tbaa !11
  %349 = sext i32 %348 to i64
  %350 = getelementptr inbounds double, ptr %347, i64 %349
  store double %345, ptr %350, align 8, !tbaa !27
  %351 = getelementptr inbounds %"class.qpOASES::QProblem", ptr %14, i32 0, i32 5
  %352 = load i32, ptr %10, align 4, !tbaa !11
  %353 = call noundef i32 @_ZNK7qpOASES9SubjectTo7getTypeEi(ptr noundef nonnull align 8 dereferenceable(40) %351, i32 noundef %352)
  %354 = icmp eq i32 %353, 2
  br i1 %354, label %355, label %367

355:                                              ; preds = %339
  %356 = getelementptr inbounds %"class.qpOASES::QProblem", ptr %14, i32 0, i32 10
  %357 = load ptr, ptr %356, align 8, !tbaa !33
  %358 = load i32, ptr %10, align 4, !tbaa !11
  %359 = sext i32 %358 to i64
  %360 = getelementptr inbounds double, ptr %357, i64 %359
  %361 = load double, ptr %360, align 8, !tbaa !27
  %362 = getelementptr inbounds %"class.qpOASES::QProblem", ptr %14, i32 0, i32 4
  %363 = load ptr, ptr %362, align 8, !tbaa !37
  %364 = load i32, ptr %10, align 4, !tbaa !11
  %365 = sext i32 %364 to i64
  %366 = getelementptr inbounds double, ptr %363, i64 %365
  store double %361, ptr %366, align 8, !tbaa !27
  br label %387

367:                                              ; preds = %339
  %368 = load i32, ptr %9, align 4, !tbaa !9
  %369 = icmp eq i32 %368, 1
  br i1 %369, label %370, label %386

370:                                              ; preds = %367
  %371 = getelementptr inbounds %"class.qpOASES::QProblem", ptr %14, i32 0, i32 10
  %372 = load ptr, ptr %371, align 8, !tbaa !33
  %373 = load i32, ptr %10, align 4, !tbaa !11
  %374 = sext i32 %373 to i64
  %375 = getelementptr inbounds double, ptr %372, i64 %374
  %376 = load double, ptr %375, align 8, !tbaa !27
  %377 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %14, i32 0, i32 23
  %378 = getelementptr inbounds %"class.qpOASES::Options", ptr %377, i32 0, i32 12
  %379 = load double, ptr %378, align 8, !tbaa !30
  %380 = fadd double %376, %379
  %381 = getelementptr inbounds %"class.qpOASES::QProblem", ptr %14, i32 0, i32 4
  %382 = load ptr, ptr %381, align 8, !tbaa !37
  %383 = load i32, ptr %10, align 4, !tbaa !11
  %384 = sext i32 %383 to i64
  %385 = getelementptr inbounds double, ptr %382, i64 %384
  store double %380, ptr %385, align 8, !tbaa !27
  br label %386

386:                                              ; preds = %370, %367
  br label %387

387:                                              ; preds = %386, %355
  br label %440

388:                                              ; preds = %235
  %389 = getelementptr inbounds %"class.qpOASES::QProblem", ptr %14, i32 0, i32 11
  %390 = load ptr, ptr %389, align 8, !tbaa !36
  %391 = load i32, ptr %10, align 4, !tbaa !11
  %392 = sext i32 %391 to i64
  %393 = getelementptr inbounds double, ptr %390, i64 %392
  %394 = load double, ptr %393, align 8, !tbaa !27
  %395 = getelementptr inbounds %"class.qpOASES::QProblem", ptr %14, i32 0, i32 4
  %396 = load ptr, ptr %395, align 8, !tbaa !37
  %397 = load i32, ptr %10, align 4, !tbaa !11
  %398 = sext i32 %397 to i64
  %399 = getelementptr inbounds double, ptr %396, i64 %398
  store double %394, ptr %399, align 8, !tbaa !27
  %400 = getelementptr inbounds %"class.qpOASES::QProblem", ptr %14, i32 0, i32 5
  %401 = load i32, ptr %10, align 4, !tbaa !11
  %402 = call noundef i32 @_ZNK7qpOASES9SubjectTo7getTypeEi(ptr noundef nonnull align 8 dereferenceable(40) %400, i32 noundef %401)
  %403 = icmp eq i32 %402, 2
  br i1 %403, label %404, label %416

404:                                              ; preds = %388
  %405 = getelementptr inbounds %"class.qpOASES::QProblem", ptr %14, i32 0, i32 11
  %406 = load ptr, ptr %405, align 8, !tbaa !36
  %407 = load i32, ptr %10, align 4, !tbaa !11
  %408 = sext i32 %407 to i64
  %409 = getelementptr inbounds double, ptr %406, i64 %408
  %410 = load double, ptr %409, align 8, !tbaa !27
  %411 = getelementptr inbounds %"class.qpOASES::QProblem", ptr %14, i32 0, i32 3
  %412 = load ptr, ptr %411, align 8, !tbaa !35
  %413 = load i32, ptr %10, align 4, !tbaa !11
  %414 = sext i32 %413 to i64
  %415 = getelementptr inbounds double, ptr %412, i64 %414
  store double %410, ptr %415, align 8, !tbaa !27
  br label %436

416:                                              ; preds = %388
  %417 = load i32, ptr %9, align 4, !tbaa !9
  %418 = icmp eq i32 %417, 1
  br i1 %418, label %419, label %435

419:                                              ; preds = %416
  %420 = getelementptr inbounds %"class.qpOASES::QProblem", ptr %14, i32 0, i32 11
  %421 = load ptr, ptr %420, align 8, !tbaa !36
  %422 = load i32, ptr %10, align 4, !tbaa !11
  %423 = sext i32 %422 to i64
  %424 = getelementptr inbounds double, ptr %421, i64 %423
  %425 = load double, ptr %424, align 8, !tbaa !27
  %426 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %14, i32 0, i32 23
  %427 = getelementptr inbounds %"class.qpOASES::Options", ptr %426, i32 0, i32 12
  %428 = load double, ptr %427, align 8, !tbaa !30
  %429 = fsub double %425, %428
  %430 = getelementptr inbounds %"class.qpOASES::QProblem", ptr %14, i32 0, i32 3
  %431 = load ptr, ptr %430, align 8, !tbaa !35
  %432 = load i32, ptr %10, align 4, !tbaa !11
  %433 = sext i32 %432 to i64
  %434 = getelementptr inbounds double, ptr %431, i64 %433
  store double %429, ptr %434, align 8, !tbaa !27
  br label %435

435:                                              ; preds = %419, %416
  br label %436

436:                                              ; preds = %435, %404
  br label %440

437:                                              ; preds = %235
  %438 = call noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv()
  %439 = call noundef i32 @_ZN7qpOASES15MessageHandling10throwErrorENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28) %438, i32 noundef 9, ptr noundef null, ptr noundef @.str, ptr noundef @.str.1, i64 noundef 2776, i32 noundef 1)
  store i32 %439, ptr %5, align 4
  store i32 1, ptr %13, align 4
  br label %481

440:                                              ; preds = %436, %387, %338, %235
  %441 = getelementptr inbounds %"class.qpOASES::QProblem", ptr %14, i32 0, i32 10
  %442 = load ptr, ptr %441, align 8, !tbaa !33
  %443 = load i32, ptr %10, align 4, !tbaa !11
  %444 = sext i32 %443 to i64
  %445 = getelementptr inbounds double, ptr %442, i64 %444
  %446 = load double, ptr %445, align 8, !tbaa !27
  %447 = getelementptr inbounds %"class.qpOASES::QProblem", ptr %14, i32 0, i32 3
  %448 = load ptr, ptr %447, align 8, !tbaa !35
  %449 = load i32, ptr %10, align 4, !tbaa !11
  %450 = sext i32 %449 to i64
  %451 = getelementptr inbounds double, ptr %448, i64 %450
  %452 = load double, ptr %451, align 8, !tbaa !27
  %453 = fsub double %446, %452
  %454 = getelementptr inbounds %"class.qpOASES::QProblem", ptr %14, i32 0, i32 10
  %455 = load ptr, ptr %454, align 8, !tbaa !33
  %456 = load i32, ptr %10, align 4, !tbaa !11
  %457 = sext i32 %456 to i64
  %458 = getelementptr inbounds double, ptr %455, i64 %457
  store double %453, ptr %458, align 8, !tbaa !27
  %459 = getelementptr inbounds %"class.qpOASES::QProblem", ptr %14, i32 0, i32 4
  %460 = load ptr, ptr %459, align 8, !tbaa !37
  %461 = load i32, ptr %10, align 4, !tbaa !11
  %462 = sext i32 %461 to i64
  %463 = getelementptr inbounds double, ptr %460, i64 %462
  %464 = load double, ptr %463, align 8, !tbaa !27
  %465 = getelementptr inbounds %"class.qpOASES::QProblem", ptr %14, i32 0, i32 11
  %466 = load ptr, ptr %465, align 8, !tbaa !36
  %467 = load i32, ptr %10, align 4, !tbaa !11
  %468 = sext i32 %467 to i64
  %469 = getelementptr inbounds double, ptr %466, i64 %468
  %470 = load double, ptr %469, align 8, !tbaa !27
  %471 = fsub double %464, %470
  %472 = getelementptr inbounds %"class.qpOASES::QProblem", ptr %14, i32 0, i32 11
  %473 = load ptr, ptr %472, align 8, !tbaa !36
  %474 = load i32, ptr %10, align 4, !tbaa !11
  %475 = sext i32 %474 to i64
  %476 = getelementptr inbounds double, ptr %473, i64 %475
  store double %471, ptr %476, align 8, !tbaa !27
  br label %477

477:                                              ; preds = %440
  %478 = load i32, ptr %10, align 4, !tbaa !11
  %479 = add nsw i32 %478, 1
  store i32 %479, ptr %10, align 4, !tbaa !11
  br label %231, !llvm.loop !38

480:                                              ; preds = %231
  store i32 0, ptr %5, align 4
  store i32 1, ptr %13, align 4
  br label %481

481:                                              ; preds = %480, %437, %223
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  %482 = load i32, ptr %5, align 4
  ret i32 %482
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK7qpOASES9SubjectTo7getTypeEi(ptr noundef nonnull align 8 dereferenceable(40), i32 noundef) #3 align 2

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 = { inlinehint mustprogress 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 = { inlinehint mustprogress 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 #4 = { mustprogress 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 #5 = { 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++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"_ZTSN7qpOASES11BooleanTypeE", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !6, i64 184}
!14 = !{!"_ZTSN7qpOASES9QProblemBE", !10, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !15, i64 48, !6, i64 168, !10, i64 176, !6, i64 184, !6, i64 192, !18, i64 200, !19, i64 208, !10, i64 212, !10, i64 216, !20, i64 220, !18, i64 224, !12, i64 232, !6, i64 240, !18, i64 248, !18, i64 256, !12, i64 264, !21, i64 272, !24, i64 496, !26, i64 768}
!15 = !{!"_ZTSN7qpOASES6BoundsE", !16, i64 0, !17, i64 40, !17, i64 80}
!16 = !{!"_ZTSN7qpOASES9SubjectToE", !12, i64 8, !6, i64 16, !6, i64 24, !10, i64 32, !10, i64 36}
!17 = !{!"_ZTSN7qpOASES9IndexlistE", !6, i64 0, !6, i64 8, !12, i64 16, !12, i64 20, !12, i64 24, !12, i64 28, !12, i64 32}
!18 = !{!"double", !7, i64 0}
!19 = !{!"_ZTSN7qpOASES14QProblemStatusE", !7, i64 0}
!20 = !{!"_ZTSN7qpOASES11HessianTypeE", !7, i64 0}
!21 = !{!"_ZTSN7qpOASES7OptionsE", !22, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !12, i64 28, !12, i64 32, !10, i64 36, !18, i64 40, !18, i64 48, !18, i64 56, !18, i64 64, !18, i64 72, !18, i64 80, !18, i64 88, !18, i64 96, !18, i64 104, !18, i64 112, !18, i64 120, !23, i64 128, !18, i64 136, !12, i64 144, !18, i64 152, !12, i64 160, !18, i64 168, !18, i64 176, !18, i64 184, !18, i64 192, !10, i64 200, !10, i64 204, !12, i64 208, !12, i64 212, !12, i64 216}
!22 = !{!"_ZTSN7qpOASES10PrintLevelE", !7, i64 0}
!23 = !{!"_ZTSN7qpOASES15SubjectToStatusE", !7, i64 0}
!24 = !{!"_ZTSN7qpOASES7FlipperE", !12, i64 0, !12, i64 4, !15, i64 8, !25, i64 128, !6, i64 248, !6, i64 256, !6, i64 264}
!25 = !{!"_ZTSN7qpOASES11ConstraintsE", !16, i64 0, !17, i64 40, !17, i64 80}
!26 = !{!"_ZTSN7qpOASES13TabularOutputE", !12, i64 0, !12, i64 4, !12, i64 8, !12, i64 12, !12, i64 16, !12, i64 20, !12, i64 24, !12, i64 28}
!27 = !{!18, !18, i64 0}
!28 = !{!14, !6, i64 32}
!29 = !{!14, !6, i64 40}
!30 = !{!14, !18, i64 328}
!31 = distinct !{!31, !32}
!32 = !{!"llvm.loop.mustprogress"}
!33 = !{!34, !6, i64 984}
!34 = !{!"_ZTSN7qpOASES8QProblemE", !14, i64 0, !10, i64 800, !6, i64 808, !6, i64 816, !6, i64 824, !25, i64 832, !6, i64 952, !6, i64 960, !12, i64 968, !6, i64 976, !6, i64 984, !6, i64 992, !6, i64 1000, !6, i64 1008, !6, i64 1016, !6, i64 1024, !6, i64 1032, !6, i64 1040, !6, i64 1048}
!35 = !{!34, !6, i64 816}
!36 = !{!34, !6, i64 992}
!37 = !{!34, !6, i64 824}
!38 = distinct !{!38, !32}


; 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 [28 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [91 x i8], align 1

declare noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv() local_unnamed_addr #0

declare noundef i32 @_ZN7qpOASES15MessageHandling10throwErrorENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28), i32 noundef, ptr noundef, ptr noundef, ptr noundef, i64 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZNK7qpOASES9QProblemB5getNVEv(ptr noundef nonnull align 8 dereferenceable(800)) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZNK7qpOASES8QProblem5getNCEv(ptr noundef nonnull align 8 dereferenceable(1056)) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK7qpOASES9SubjectTo9getStatusEi(ptr noundef nonnull align 8 dereferenceable(40), i32 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN7qpOASES8QProblem22setupAuxiliaryQPboundsEPKNS_6BoundsEPKNS_11ConstraintsENS_11BooleanTypeE(ptr noundef nonnull align 8 dereferenceable(1056) %0, ptr noundef %1, ptr noundef %2, i32 noundef %3) local_unnamed_addr #3 align 2 {
  %5 = tail call noundef i32 @_ZNK7qpOASES9QProblemB5getNVEv(ptr noundef nonnull align 8 dereferenceable(800) %0)
  %6 = tail call noundef i32 @_ZNK7qpOASES8QProblem5getNCEv(ptr noundef nonnull align 8 dereferenceable(1056) %0)
  %7 = icmp sgt i32 %5, 0
  br i1 %7, label %.lr.ph, label %.preheader

.lr.ph:                                           ; preds = %4
  %8 = getelementptr inbounds i8, ptr %0, i64 48
  %9 = getelementptr inbounds i8, ptr %0, i64 184
  %10 = getelementptr inbounds i8, ptr %0, i64 40
  %11 = icmp eq i32 %3, 1
  %12 = getelementptr inbounds i8, ptr %0, i64 328
  %13 = getelementptr inbounds i8, ptr %0, i64 32
  %wide.trip.count = zext nneg i32 %5 to i64
  br label %22

.preheader:                                       ; preds = %93, %4
  %14 = icmp sgt i32 %6, 0
  br i1 %14, label %.lr.ph86, label %.loopexit

.lr.ph86:                                         ; preds = %.preheader
  %15 = getelementptr inbounds i8, ptr %0, i64 832
  %16 = getelementptr inbounds i8, ptr %0, i64 992
  %17 = getelementptr inbounds i8, ptr %0, i64 824
  %18 = icmp eq i32 %3, 1
  %19 = getelementptr inbounds i8, ptr %0, i64 328
  %20 = getelementptr inbounds i8, ptr %0, i64 816
  %21 = getelementptr inbounds i8, ptr %0, i64 984
  %wide.trip.count91 = zext nneg i32 %6 to i64
  br label %94

22:                                               ; preds = %.lr.ph, %93
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %93 ]
  %23 = trunc nuw nsw i64 %indvars.iv to i32
  %24 = tail call noundef i32 @_ZNK7qpOASES9SubjectTo9getStatusEi(ptr noundef nonnull align 8 dereferenceable(40) %8, i32 noundef %23)
  switch i32 %24, label %.loopexit.sink.split [
    i32 0, label %25
    i32 -1, label %53
    i32 1, label %72
    i32 3, label %93
  ]

25:                                               ; preds = %22
  br i1 %11, label %26, label %93

26:                                               ; preds = %25
  %27 = tail call noundef i32 @_ZNK7qpOASES9SubjectTo7getTypeEi(ptr noundef nonnull align 8 dereferenceable(40) %8, i32 noundef %23)
  %28 = icmp eq i32 %27, 2
  br i1 %28, label %29, label %35

29:                                               ; preds = %26
  %30 = load ptr, ptr %9, align 8, !tbaa !5
  %31 = getelementptr inbounds double, ptr %30, i64 %indvars.iv
  %32 = load double, ptr %31, align 8, !tbaa !24
  %33 = load ptr, ptr %13, align 8, !tbaa !25
  %34 = getelementptr inbounds double, ptr %33, i64 %indvars.iv
  store double %32, ptr %34, align 8, !tbaa !24
  br label %.sink.split

35:                                               ; preds = %26
  %36 = tail call noundef i32 @_ZNK7qpOASES9SubjectTo9getStatusEi(ptr noundef nonnull align 8 dereferenceable(40) %1, i32 noundef %23)
  %37 = icmp eq i32 %36, -1
  %38 = load ptr, ptr %9, align 8, !tbaa !5
  %39 = getelementptr inbounds double, ptr %38, i64 %indvars.iv
  %40 = load double, ptr %39, align 8, !tbaa !24
  %41 = load double, ptr %12, align 8
  %42 = fsub double %40, %41
  %.sink = select i1 %37, double %40, double %42
  %43 = load ptr, ptr %13, align 8, !tbaa !25
  %44 = getelementptr inbounds double, ptr %43, i64 %indvars.iv
  store double %.sink, ptr %44, align 8, !tbaa !24
  %45 = tail call noundef i32 @_ZNK7qpOASES9SubjectTo9getStatusEi(ptr noundef nonnull align 8 dereferenceable(40) %1, i32 noundef %23)
  %46 = icmp eq i32 %45, 1
  %47 = load ptr, ptr %9, align 8, !tbaa !5
  %48 = getelementptr inbounds double, ptr %47, i64 %indvars.iv
  %49 = load double, ptr %48, align 8, !tbaa !24
  br i1 %46, label %.sink.split, label %50

50:                                               ; preds = %35
  %51 = load double, ptr %12, align 8, !tbaa !26
  %52 = fadd double %49, %51
  br label %.sink.split

53:                                               ; preds = %22
  %54 = load ptr, ptr %9, align 8, !tbaa !5
  %55 = getelementptr inbounds double, ptr %54, i64 %indvars.iv
  %56 = load double, ptr %55, align 8, !tbaa !24
  %57 = load ptr, ptr %13, align 8, !tbaa !25
  %58 = getelementptr inbounds double, ptr %57, i64 %indvars.iv
  store double %56, ptr %58, align 8, !tbaa !24
  %59 = tail call noundef i32 @_ZNK7qpOASES9SubjectTo7getTypeEi(ptr noundef nonnull align 8 dereferenceable(40) %8, i32 noundef %23)
  %60 = icmp eq i32 %59, 2
  br i1 %60, label %61, label %65

61:                                               ; preds = %53
  %62 = load ptr, ptr %9, align 8, !tbaa !5
  %63 = getelementptr inbounds double, ptr %62, i64 %indvars.iv
  %64 = load double, ptr %63, align 8, !tbaa !24
  br label %.sink.split

65:                                               ; preds = %53
  br i1 %11, label %66, label %93

66:                                               ; preds = %65
  %67 = load ptr, ptr %9, align 8, !tbaa !5
  %68 = getelementptr inbounds double, ptr %67, i64 %indvars.iv
  %69 = load double, ptr %68, align 8, !tbaa !24
  %70 = load double, ptr %12, align 8, !tbaa !26
  %71 = fadd double %69, %70
  br label %.sink.split

72:                                               ; preds = %22
  %73 = load ptr, ptr %9, align 8, !tbaa !5
  %74 = getelementptr inbounds double, ptr %73, i64 %indvars.iv
  %75 = load double, ptr %74, align 8, !tbaa !24
  %76 = load ptr, ptr %10, align 8, !tbaa !27
  %77 = getelementptr inbounds double, ptr %76, i64 %indvars.iv
  store double %75, ptr %77, align 8, !tbaa !24
  %78 = tail call noundef i32 @_ZNK7qpOASES9SubjectTo7getTypeEi(ptr noundef nonnull align 8 dereferenceable(40) %8, i32 noundef %23)
  %79 = icmp eq i32 %78, 2
  br i1 %79, label %80, label %84

80:                                               ; preds = %72
  %81 = load ptr, ptr %9, align 8, !tbaa !5
  %82 = getelementptr inbounds double, ptr %81, i64 %indvars.iv
  %83 = load double, ptr %82, align 8, !tbaa !24
  br label %.sink.split

84:                                               ; preds = %72
  br i1 %11, label %85, label %93

85:                                               ; preds = %84
  %86 = load ptr, ptr %9, align 8, !tbaa !5
  %87 = getelementptr inbounds double, ptr %86, i64 %indvars.iv
  %88 = load double, ptr %87, align 8, !tbaa !24
  %89 = load double, ptr %12, align 8, !tbaa !26
  %90 = fsub double %88, %89
  br label %.sink.split

.sink.split:                                      ; preds = %35, %80, %85, %61, %66, %50, %29
  %.sink98 = phi ptr [ %10, %29 ], [ %10, %50 ], [ %10, %66 ], [ %10, %61 ], [ %13, %85 ], [ %13, %80 ], [ %10, %35 ]
  %.sink95 = phi double [ %32, %29 ], [ %52, %50 ], [ %71, %66 ], [ %64, %61 ], [ %90, %85 ], [ %83, %80 ], [ %49, %35 ]
  %91 = load ptr, ptr %.sink98, align 8, !tbaa !28
  %92 = getelementptr inbounds double, ptr %91, i64 %indvars.iv
  store double %.sink95, ptr %92, align 8, !tbaa !24
  br label %93

93:                                               ; preds = %.sink.split, %22, %25, %65, %84
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.preheader, label %22, !llvm.loop !29

94:                                               ; preds = %.lr.ph86, %168
  %indvars.iv88 = phi i64 [ 0, %.lr.ph86 ], [ %indvars.iv.next89, %168 ]
  %95 = trunc nuw nsw i64 %indvars.iv88 to i32
  %96 = tail call noundef i32 @_ZNK7qpOASES9SubjectTo9getStatusEi(ptr noundef nonnull align 8 dereferenceable(40) %15, i32 noundef %95)
  switch i32 %96, label %.loopexit.sink.split [
    i32 0, label %97
    i32 -1, label %128
    i32 1, label %147
    i32 3, label %168
  ]

97:                                               ; preds = %94
  br i1 %18, label %98, label %168

98:                                               ; preds = %97
  %99 = tail call noundef i32 @_ZNK7qpOASES9SubjectTo7getTypeEi(ptr noundef nonnull align 8 dereferenceable(40) %15, i32 noundef %95)
  %100 = icmp eq i32 %99, 2
  br i1 %100, label %101, label %110

101:                                              ; preds = %98
  %102 = load ptr, ptr %21, align 8, !tbaa !31
  %103 = getelementptr inbounds double, ptr %102, i64 %indvars.iv88
  %104 = load double, ptr %103, align 8, !tbaa !24
  %105 = load ptr, ptr %20, align 8, !tbaa !33
  %106 = getelementptr inbounds double, ptr %105, i64 %indvars.iv88
  store double %104, ptr %106, align 8, !tbaa !24
  %107 = load ptr, ptr %16, align 8, !tbaa !34
  %108 = getelementptr inbounds double, ptr %107, i64 %indvars.iv88
  %109 = load double, ptr %108, align 8, !tbaa !24
  br label %.sink.split102

110:                                              ; preds = %98
  %111 = tail call noundef i32 @_ZNK7qpOASES9SubjectTo9getStatusEi(ptr noundef nonnull align 8 dereferenceable(40) %2, i32 noundef %95)
  %112 = icmp eq i32 %111, -1
  %113 = load ptr, ptr %21, align 8, !tbaa !31
  %114 = getelementptr inbounds double, ptr %113, i64 %indvars.iv88
  %115 = load double, ptr %114, align 8, !tbaa !24
  %116 = load double, ptr %19, align 8
  %117 = fsub double %115, %116
  %.sink99 = select i1 %112, double %115, double %117
  %118 = load ptr, ptr %20, align 8, !tbaa !33
  %119 = getelementptr inbounds double, ptr %118, i64 %indvars.iv88
  store double %.sink99, ptr %119, align 8, !tbaa !24
  %120 = tail call noundef i32 @_ZNK7qpOASES9SubjectTo9getStatusEi(ptr noundef nonnull align 8 dereferenceable(40) %2, i32 noundef %95)
  %121 = icmp eq i32 %120, 1
  %122 = load ptr, ptr %16, align 8, !tbaa !34
  %123 = getelementptr inbounds double, ptr %122, i64 %indvars.iv88
  %124 = load double, ptr %123, align 8, !tbaa !24
  br i1 %121, label %.sink.split102, label %125

125:                                              ; preds = %110
  %126 = load double, ptr %19, align 8, !tbaa !26
  %127 = fadd double %124, %126
  br label %.sink.split102

128:                                              ; preds = %94
  %129 = load ptr, ptr %21, align 8, !tbaa !31
  %130 = getelementptr inbounds double, ptr %129, i64 %indvars.iv88
  %131 = load double, ptr %130, align 8, !tbaa !24
  %132 = load ptr, ptr %20, align 8, !tbaa !33
  %133 = getelementptr inbounds double, ptr %132, i64 %indvars.iv88
  store double %131, ptr %133, align 8, !tbaa !24
  %134 = tail call noundef i32 @_ZNK7qpOASES9SubjectTo7getTypeEi(ptr noundef nonnull align 8 dereferenceable(40) %15, i32 noundef %95)
  %135 = icmp eq i32 %134, 2
  br i1 %135, label %136, label %140

136:                                              ; preds = %128
  %137 = load ptr, ptr %21, align 8, !tbaa !31
  %138 = getelementptr inbounds double, ptr %137, i64 %indvars.iv88
  %139 = load double, ptr %138, align 8, !tbaa !24
  br label %.sink.split102

140:                                              ; preds = %128
  br i1 %18, label %141, label %168

141:                                              ; preds = %140
  %142 = load ptr, ptr %21, align 8, !tbaa !31
  %143 = getelementptr inbounds double, ptr %142, i64 %indvars.iv88
  %144 = load double, ptr %143, align 8, !tbaa !24
  %145 = load double, ptr %19, align 8, !tbaa !26
  %146 = fadd double %144, %145
  br label %.sink.split102

147:                                              ; preds = %94
  %148 = load ptr, ptr %16, align 8, !tbaa !34
  %149 = getelementptr inbounds double, ptr %148, i64 %indvars.iv88
  %150 = load double, ptr %149, align 8, !tbaa !24
  %151 = load ptr, ptr %17, align 8, !tbaa !35
  %152 = getelementptr inbounds double, ptr %151, i64 %indvars.iv88
  store double %150, ptr %152, align 8, !tbaa !24
  %153 = tail call noundef i32 @_ZNK7qpOASES9SubjectTo7getTypeEi(ptr noundef nonnull align 8 dereferenceable(40) %15, i32 noundef %95)
  %154 = icmp eq i32 %153, 2
  br i1 %154, label %155, label %159

155:                                              ; preds = %147
  %156 = load ptr, ptr %16, align 8, !tbaa !34
  %157 = getelementptr inbounds double, ptr %156, i64 %indvars.iv88
  %158 = load double, ptr %157, align 8, !tbaa !24
  br label %.sink.split102

159:                                              ; preds = %147
  br i1 %18, label %160, label %168

160:                                              ; preds = %159
  %161 = load ptr, ptr %16, align 8, !tbaa !34
  %162 = getelementptr inbounds double, ptr %161, i64 %indvars.iv88
  %163 = load double, ptr %162, align 8, !tbaa !24
  %164 = load double, ptr %19, align 8, !tbaa !26
  %165 = fsub double %163, %164
  br label %.sink.split102

.sink.split102:                                   ; preds = %110, %101, %125, %141, %136, %160, %155
  %.sink106 = phi ptr [ %20, %155 ], [ %20, %160 ], [ %17, %136 ], [ %17, %141 ], [ %17, %125 ], [ %17, %101 ], [ %17, %110 ]
  %.sink103 = phi double [ %158, %155 ], [ %165, %160 ], [ %139, %136 ], [ %146, %141 ], [ %127, %125 ], [ %109, %101 ], [ %124, %110 ]
  %166 = load ptr, ptr %.sink106, align 8, !tbaa !28
  %167 = getelementptr inbounds double, ptr %166, i64 %indvars.iv88
  store double %.sink103, ptr %167, align 8, !tbaa !24
  br label %168

168:                                              ; preds = %.sink.split102, %159, %140, %97, %94
  %169 = load ptr, ptr %21, align 8, !tbaa !31
  %170 = getelementptr inbounds double, ptr %169, i64 %indvars.iv88
  %171 = load double, ptr %170, align 8, !tbaa !24
  %172 = load ptr, ptr %20, align 8, !tbaa !33
  %173 = getelementptr inbounds double, ptr %172, i64 %indvars.iv88
  %174 = load double, ptr %173, align 8, !tbaa !24
  %175 = fsub double %171, %174
  store double %175, ptr %170, align 8, !tbaa !24
  %176 = load ptr, ptr %17, align 8, !tbaa !35
  %177 = getelementptr inbounds double, ptr %176, i64 %indvars.iv88
  %178 = load double, ptr %177, align 8, !tbaa !24
  %179 = load ptr, ptr %16, align 8, !tbaa !34
  %180 = getelementptr inbounds double, ptr %179, i64 %indvars.iv88
  %181 = load double, ptr %180, align 8, !tbaa !24
  %182 = fsub double %178, %181
  store double %182, ptr %180, align 8, !tbaa !24
  %indvars.iv.next89 = add nuw nsw i64 %indvars.iv88, 1
  %exitcond92.not = icmp eq i64 %indvars.iv.next89, %wide.trip.count91
  br i1 %exitcond92.not, label %.loopexit, label %94, !llvm.loop !36

.loopexit.sink.split:                             ; preds = %22, %94
  %.sink108 = phi i64 [ 2776, %94 ], [ 2711, %22 ]
  %183 = tail call noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv()
  %184 = tail call noundef i32 @_ZN7qpOASES15MessageHandling10throwErrorENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28) %183, i32 noundef 9, ptr noundef null, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i64 noundef %.sink108, i32 noundef 1)
  br label %.loopexit

.loopexit:                                        ; preds = %168, %.loopexit.sink.split, %.preheader
  %.0 = phi i32 [ 0, %.preheader ], [ %184, %.loopexit.sink.split ], [ 0, %168 ]
  ret i32 %.0
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK7qpOASES9SubjectTo7getTypeEi(ptr noundef nonnull align 8 dereferenceable(40), i32 noundef) local_unnamed_addr #2 align 2

attributes #0 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { inlinehint mustprogress 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 = { inlinehint mustprogress 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 = { mustprogress 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" }

!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, !10, i64 184}
!6 = !{!"_ZTSN7qpOASES9QProblemBE", !7, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !11, i64 48, !10, i64 168, !7, i64 176, !10, i64 184, !10, i64 192, !15, i64 200, !16, i64 208, !7, i64 212, !7, i64 216, !17, i64 220, !15, i64 224, !13, i64 232, !10, i64 240, !15, i64 248, !15, i64 256, !13, i64 264, !18, i64 272, !21, i64 496, !23, i64 768}
!7 = !{!"_ZTSN7qpOASES11BooleanTypeE", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"_ZTSN7qpOASES6BoundsE", !12, i64 0, !14, i64 40, !14, i64 80}
!12 = !{!"_ZTSN7qpOASES9SubjectToE", !13, i64 8, !10, i64 16, !10, i64 24, !7, i64 32, !7, i64 36}
!13 = !{!"int", !8, i64 0}
!14 = !{!"_ZTSN7qpOASES9IndexlistE", !10, i64 0, !10, i64 8, !13, i64 16, !13, i64 20, !13, i64 24, !13, i64 28, !13, i64 32}
!15 = !{!"double", !8, i64 0}
!16 = !{!"_ZTSN7qpOASES14QProblemStatusE", !8, i64 0}
!17 = !{!"_ZTSN7qpOASES11HessianTypeE", !8, i64 0}
!18 = !{!"_ZTSN7qpOASES7OptionsE", !19, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !7, i64 24, !13, i64 28, !13, i64 32, !7, i64 36, !15, i64 40, !15, 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, !15, i64 120, !20, i64 128, !15, i64 136, !13, i64 144, !15, i64 152, !13, i64 160, !15, i64 168, !15, i64 176, !15, i64 184, !15, i64 192, !7, i64 200, !7, i64 204, !13, i64 208, !13, i64 212, !13, i64 216}
!19 = !{!"_ZTSN7qpOASES10PrintLevelE", !8, i64 0}
!20 = !{!"_ZTSN7qpOASES15SubjectToStatusE", !8, i64 0}
!21 = !{!"_ZTSN7qpOASES7FlipperE", !13, i64 0, !13, i64 4, !11, i64 8, !22, i64 128, !10, i64 248, !10, i64 256, !10, i64 264}
!22 = !{!"_ZTSN7qpOASES11ConstraintsE", !12, i64 0, !14, i64 40, !14, i64 80}
!23 = !{!"_ZTSN7qpOASES13TabularOutputE", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12, !13, i64 16, !13, i64 20, !13, i64 24, !13, i64 28}
!24 = !{!15, !15, i64 0}
!25 = !{!6, !10, i64 32}
!26 = !{!6, !15, i64 328}
!27 = !{!6, !10, i64 40}
!28 = !{!10, !10, i64 0}
!29 = distinct !{!29, !30}
!30 = !{!"llvm.loop.mustprogress"}
!31 = !{!32, !10, i64 984}
!32 = !{!"_ZTSN7qpOASES8QProblemE", !6, i64 0, !7, i64 800, !10, i64 808, !10, i64 816, !10, i64 824, !22, i64 832, !10, i64 952, !10, i64 960, !13, i64 968, !10, i64 976, !10, i64 984, !10, i64 992, !10, i64 1000, !10, i64 1008, !10, i64 1016, !10, i64 1024, !10, i64 1032, !10, i64 1040, !10, i64 1048}
!33 = !{!32, !10, i64 816}
!34 = !{!32, !10, i64 992}
!35 = !{!32, !10, i64 824}
!36 = distinct !{!36, !30}


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