; LLVM IR from Tencent-RoboticsX/jbdl :: src/jbdl/experimental/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 }

@.str = external hidden unnamed_addr constant [28 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [103 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 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 @_ZN7qpOASES8QProblem27updateActivitiesForHotstartEPKdS2_S2_S2_(ptr noundef nonnull align 8 dereferenceable(1064) %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4) unnamed_addr #4 align 2 {
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store ptr %2, ptr %9, align 8, !tbaa !5
  store ptr %3, ptr %10, align 8, !tbaa !5
  store ptr %4, ptr %11, align 8, !tbaa !5
  %16 = load ptr, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  %17 = call noundef i32 @_ZNK7qpOASES9QProblemB5getNVEv(ptr noundef nonnull align 8 dereferenceable(800) %16)
  store i32 %17, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  %18 = load ptr, ptr %8, align 8, !tbaa !5
  %19 = load ptr, ptr %9, align 8, !tbaa !5
  %20 = call noundef i32 @_ZN7qpOASES9QProblemB18setupSubjectToTypeEPKdS2_(ptr noundef nonnull align 8 dereferenceable(800) %16, ptr noundef %18, ptr noundef %19)
  %21 = icmp ne i32 %20, 0
  br i1 %21, label %22, label %25

22:                                               ; preds = %5
  %23 = call noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv()
  %24 = call noundef i32 @_ZN7qpOASES15MessageHandling10throwErrorENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28) %23, i32 noundef 75, ptr noundef null, ptr noundef @.str, ptr noundef @.str.1, i64 noundef 1871, i32 noundef 1)
  store i32 %24, ptr %6, align 4
  store i32 1, ptr %15, align 4
  br label %247

25:                                               ; preds = %5
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %26

26:                                               ; preds = %181, %25
  %27 = load i32, ptr %12, align 4, !tbaa !9
  %28 = load i32, ptr %13, align 4, !tbaa !9
  %29 = icmp slt i32 %27, %28
  br i1 %29, label %30, label %184

30:                                               ; preds = %26
  %31 = load ptr, ptr %8, align 8, !tbaa !5
  %32 = load i32, ptr %12, align 4, !tbaa !9
  %33 = sext i32 %32 to i64
  %34 = getelementptr inbounds double, ptr %31, i64 %33
  %35 = load double, ptr %34, align 8, !tbaa !11
  %36 = fcmp ole double %35, -1.000000e+20
  br i1 %36, label %37, label %74

37:                                               ; preds = %30
  %38 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %16, i32 0, i32 6
  %39 = load i32, ptr %12, align 4, !tbaa !9
  %40 = call noundef i32 @_ZNK7qpOASES9SubjectTo9getStatusEi(ptr noundef nonnull align 8 dereferenceable(40) %38, i32 noundef %39)
  %41 = icmp eq i32 %40, -1
  br i1 %41, label %42, label %74

42:                                               ; preds = %37
  %43 = load i32, ptr %12, align 4, !tbaa !9
  %44 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %16, i32 0, i32 23
  %45 = getelementptr inbounds %"class.qpOASES::Options", ptr %44, i32 0, i32 6
  %46 = load i32, ptr %45, align 8, !tbaa !13
  %47 = load ptr, ptr %16, align 8, !tbaa !27
  %48 = getelementptr inbounds ptr, ptr %47, i64 32
  %49 = load ptr, ptr %48, align 8
  %50 = call noundef i32 %49(ptr noundef nonnull align 8 dereferenceable(1064) %16, i32 noundef %43, i32 noundef 1, i32 noundef 0, i32 noundef %46)
  store i32 %50, ptr %14, align 4, !tbaa !29
  %51 = load i32, ptr %14, align 4, !tbaa !29
  %52 = icmp ne i32 %51, 0
  br i1 %52, label %53, label %55

53:                                               ; preds = %42
  %54 = load i32, ptr %14, align 4, !tbaa !29
  store i32 %54, ptr %6, align 4
  store i32 1, ptr %15, align 4
  br label %247

55:                                               ; preds = %42
  %56 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %16, i32 0, i32 10
  %57 = load ptr, ptr %56, align 8, !tbaa !31
  %58 = load i32, ptr %12, align 4, !tbaa !9
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds double, ptr %57, i64 %59
  %61 = load double, ptr %60, align 8, !tbaa !11
  %62 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %16, i32 0, i32 3
  %63 = load ptr, ptr %62, align 8, !tbaa !32
  %64 = load i32, ptr %12, align 4, !tbaa !9
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds double, ptr %63, i64 %65
  %67 = load double, ptr %66, align 8, !tbaa !11
  %68 = fsub double %67, %61
  store double %68, ptr %66, align 8, !tbaa !11
  %69 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %16, i32 0, i32 10
  %70 = load ptr, ptr %69, align 8, !tbaa !31
  %71 = load i32, ptr %12, align 4, !tbaa !9
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds double, ptr %70, i64 %72
  store double 0.000000e+00, ptr %73, align 8, !tbaa !11
  br label %74

74:                                               ; preds = %55, %37, %30
  %75 = load ptr, ptr %9, align 8, !tbaa !5
  %76 = load i32, ptr %12, align 4, !tbaa !9
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds double, ptr %75, i64 %77
  %79 = load double, ptr %78, align 8, !tbaa !11
  %80 = fcmp oge double %79, 1.000000e+20
  br i1 %80, label %81, label %118

81:                                               ; preds = %74
  %82 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %16, i32 0, i32 6
  %83 = load i32, ptr %12, align 4, !tbaa !9
  %84 = call noundef i32 @_ZNK7qpOASES9SubjectTo9getStatusEi(ptr noundef nonnull align 8 dereferenceable(40) %82, i32 noundef %83)
  %85 = icmp eq i32 %84, 1
  br i1 %85, label %86, label %118

86:                                               ; preds = %81
  %87 = load i32, ptr %12, align 4, !tbaa !9
  %88 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %16, i32 0, i32 23
  %89 = getelementptr inbounds %"class.qpOASES::Options", ptr %88, i32 0, i32 6
  %90 = load i32, ptr %89, align 8, !tbaa !13
  %91 = load ptr, ptr %16, align 8, !tbaa !27
  %92 = getelementptr inbounds ptr, ptr %91, i64 32
  %93 = load ptr, ptr %92, align 8
  %94 = call noundef i32 %93(ptr noundef nonnull align 8 dereferenceable(1064) %16, i32 noundef %87, i32 noundef 1, i32 noundef 0, i32 noundef %90)
  store i32 %94, ptr %14, align 4, !tbaa !29
  %95 = load i32, ptr %14, align 4, !tbaa !29
  %96 = icmp ne i32 %95, 0
  br i1 %96, label %97, label %99

97:                                               ; preds = %86
  %98 = load i32, ptr %14, align 4, !tbaa !29
  store i32 %98, ptr %6, align 4
  store i32 1, ptr %15, align 4
  br label %247

99:                                               ; preds = %86
  %100 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %16, i32 0, i32 10
  %101 = load ptr, ptr %100, align 8, !tbaa !31
  %102 = load i32, ptr %12, align 4, !tbaa !9
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds double, ptr %101, i64 %103
  %105 = load double, ptr %104, align 8, !tbaa !11
  %106 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %16, i32 0, i32 3
  %107 = load ptr, ptr %106, align 8, !tbaa !32
  %108 = load i32, ptr %12, align 4, !tbaa !9
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds double, ptr %107, i64 %109
  %111 = load double, ptr %110, align 8, !tbaa !11
  %112 = fsub double %111, %105
  store double %112, ptr %110, align 8, !tbaa !11
  %113 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %16, i32 0, i32 10
  %114 = load ptr, ptr %113, align 8, !tbaa !31
  %115 = load i32, ptr %12, align 4, !tbaa !9
  %116 = sext i32 %115 to i64
  %117 = getelementptr inbounds double, ptr %114, i64 %116
  store double 0.000000e+00, ptr %117, align 8, !tbaa !11
  br label %118

118:                                              ; preds = %99, %81, %74
  %119 = load ptr, ptr %8, align 8, !tbaa !5
  %120 = load i32, ptr %12, align 4, !tbaa !9
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds double, ptr %119, i64 %121
  %123 = load double, ptr %122, align 8, !tbaa !11
  %124 = fcmp ogt double %123, -1.000000e+20
  br i1 %124, label %125, label %149

125:                                              ; preds = %118
  %126 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %16, i32 0, i32 4
  %127 = load ptr, ptr %126, align 8, !tbaa !33
  %128 = load i32, ptr %12, align 4, !tbaa !9
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds double, ptr %127, i64 %129
  %131 = load double, ptr %130, align 8, !tbaa !11
  %132 = fcmp ole double %131, -1.000000e+20
  br i1 %132, label %133, label %149

133:                                              ; preds = %125
  %134 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %16, i32 0, i32 9
  %135 = load ptr, ptr %134, align 8, !tbaa !34
  %136 = load i32, ptr %12, align 4, !tbaa !9
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds double, ptr %135, i64 %137
  %139 = load double, ptr %138, align 8, !tbaa !11
  %140 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %16, i32 0, i32 23
  %141 = getelementptr inbounds %"class.qpOASES::Options", ptr %140, i32 0, i32 12
  %142 = load double, ptr %141, align 8, !tbaa !35
  %143 = fsub double %139, %142
  %144 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %16, i32 0, i32 4
  %145 = load ptr, ptr %144, align 8, !tbaa !33
  %146 = load i32, ptr %12, align 4, !tbaa !9
  %147 = sext i32 %146 to i64
  %148 = getelementptr inbounds double, ptr %145, i64 %147
  store double %143, ptr %148, align 8, !tbaa !11
  br label %149

149:                                              ; preds = %133, %125, %118
  %150 = load ptr, ptr %9, align 8, !tbaa !5
  %151 = load i32, ptr %12, align 4, !tbaa !9
  %152 = sext i32 %151 to i64
  %153 = getelementptr inbounds double, ptr %150, i64 %152
  %154 = load double, ptr %153, align 8, !tbaa !11
  %155 = fcmp olt double %154, 1.000000e+20
  br i1 %155, label %156, label %180

156:                                              ; preds = %149
  %157 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %16, i32 0, i32 5
  %158 = load ptr, ptr %157, align 8, !tbaa !36
  %159 = load i32, ptr %12, align 4, !tbaa !9
  %160 = sext i32 %159 to i64
  %161 = getelementptr inbounds double, ptr %158, i64 %160
  %162 = load double, ptr %161, align 8, !tbaa !11
  %163 = fcmp oge double %162, 1.000000e+20
  br i1 %163, label %164, label %180

164:                                              ; preds = %156
  %165 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %16, i32 0, i32 9
  %166 = load ptr, ptr %165, align 8, !tbaa !34
  %167 = load i32, ptr %12, align 4, !tbaa !9
  %168 = sext i32 %167 to i64
  %169 = getelementptr inbounds double, ptr %166, i64 %168
  %170 = load double, ptr %169, align 8, !tbaa !11
  %171 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %16, i32 0, i32 23
  %172 = getelementptr inbounds %"class.qpOASES::Options", ptr %171, i32 0, i32 12
  %173 = load double, ptr %172, align 8, !tbaa !35
  %174 = fadd double %170, %173
  %175 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %16, i32 0, i32 5
  %176 = load ptr, ptr %175, align 8, !tbaa !36
  %177 = load i32, ptr %12, align 4, !tbaa !9
  %178 = sext i32 %177 to i64
  %179 = getelementptr inbounds double, ptr %176, i64 %178
  store double %174, ptr %179, align 8, !tbaa !11
  br label %180

180:                                              ; preds = %164, %156, %149
  br label %181

181:                                              ; preds = %180
  %182 = load i32, ptr %12, align 4, !tbaa !9
  %183 = add nsw i32 %182, 1
  store i32 %183, ptr %12, align 4, !tbaa !9
  br label %26, !llvm.loop !37

184:                                              ; preds = %26
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %185

185:                                              ; preds = %243, %184
  %186 = load i32, ptr %12, align 4, !tbaa !9
  %187 = load i32, ptr %13, align 4, !tbaa !9
  %188 = icmp slt i32 %186, %187
  br i1 %188, label %189, label %246

189:                                              ; preds = %185
  %190 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %16, i32 0, i32 6
  %191 = load i32, ptr %12, align 4, !tbaa !9
  %192 = call noundef i32 @_ZNK7qpOASES9SubjectTo7getTypeEi(ptr noundef nonnull align 8 dereferenceable(40) %190, i32 noundef %191)
  %193 = icmp eq i32 %192, 2
  br i1 %193, label %194, label %242

194:                                              ; preds = %189
  %195 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %16, i32 0, i32 9
  %196 = load ptr, ptr %195, align 8, !tbaa !34
  %197 = load i32, ptr %12, align 4, !tbaa !9
  %198 = sext i32 %197 to i64
  %199 = getelementptr inbounds double, ptr %196, i64 %198
  %200 = load double, ptr %199, align 8, !tbaa !11
  %201 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %16, i32 0, i32 4
  %202 = load ptr, ptr %201, align 8, !tbaa !33
  %203 = load i32, ptr %12, align 4, !tbaa !9
  %204 = sext i32 %203 to i64
  %205 = getelementptr inbounds double, ptr %202, i64 %204
  store double %200, ptr %205, align 8, !tbaa !11
  %206 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %16, i32 0, i32 9
  %207 = load ptr, ptr %206, align 8, !tbaa !34
  %208 = load i32, ptr %12, align 4, !tbaa !9
  %209 = sext i32 %208 to i64
  %210 = getelementptr inbounds double, ptr %207, i64 %209
  %211 = load double, ptr %210, align 8, !tbaa !11
  %212 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %16, i32 0, i32 5
  %213 = load ptr, ptr %212, align 8, !tbaa !36
  %214 = load i32, ptr %12, align 4, !tbaa !9
  %215 = sext i32 %214 to i64
  %216 = getelementptr inbounds double, ptr %213, i64 %215
  store double %211, ptr %216, align 8, !tbaa !11
  %217 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %16, i32 0, i32 6
  %218 = load i32, ptr %12, align 4, !tbaa !9
  %219 = call noundef i32 @_ZNK7qpOASES9SubjectTo9getStatusEi(ptr noundef nonnull align 8 dereferenceable(40) %217, i32 noundef %218)
  %220 = icmp eq i32 %219, 0
  br i1 %220, label %221, label %241

221:                                              ; preds = %194
  %222 = load i32, ptr %12, align 4, !tbaa !9
  %223 = load ptr, ptr %16, align 8, !tbaa !27
  %224 = getelementptr inbounds ptr, ptr %223, i64 29
  %225 = load ptr, ptr %224, align 8
  %226 = call noundef i32 %225(ptr noundef nonnull align 8 dereferenceable(1064) %16, i32 noundef %222)
  store i32 %226, ptr %14, align 4, !tbaa !29
  %227 = load i32, ptr %14, align 4, !tbaa !29
  %228 = icmp eq i32 %227, 89
  br i1 %228, label %229, label %240

229:                                              ; preds = %221
  %230 = load i32, ptr %12, align 4, !tbaa !9
  %231 = load ptr, ptr %16, align 8, !tbaa !27
  %232 = getelementptr inbounds ptr, ptr %231, i64 28
  %233 = load ptr, ptr %232, align 8
  %234 = call noundef i32 %233(ptr noundef nonnull align 8 dereferenceable(1064) %16, i32 noundef %230, i32 noundef -1, i32 noundef 1, i32 noundef 1)
  store i32 %234, ptr %14, align 4, !tbaa !29
  %235 = load i32, ptr %14, align 4, !tbaa !29
  %236 = icmp ne i32 %235, 0
  br i1 %236, label %237, label %239

237:                                              ; preds = %229
  %238 = load i32, ptr %14, align 4, !tbaa !29
  store i32 %238, ptr %6, align 4
  store i32 1, ptr %15, align 4
  br label %247

239:                                              ; preds = %229
  br label %240

240:                                              ; preds = %239, %221
  br label %241

241:                                              ; preds = %240, %194
  br label %242

242:                                              ; preds = %241, %189
  br label %243

243:                                              ; preds = %242
  %244 = load i32, ptr %12, align 4, !tbaa !9
  %245 = add nsw i32 %244, 1
  store i32 %245, ptr %12, align 4, !tbaa !9
  br label %185, !llvm.loop !39

246:                                              ; preds = %185
  store i32 0, ptr %6, align 4
  store i32 1, ptr %15, align 4
  br label %247

247:                                              ; preds = %246, %237, %97, %53, %22
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  %248 = load i32, ptr %6, align 4
  ret i32 %248
}

declare noundef i32 @_ZN7qpOASES9QProblemB18setupSubjectToTypeEPKdS2_(ptr noundef nonnull align 8 dereferenceable(800), ptr noundef, ptr noundef) unnamed_addr #1

; 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 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!14, !15, i64 296}
!14 = !{!"_ZTSN7qpOASES9QProblemBE", !15, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !16, i64 48, !6, i64 168, !15, i64 176, !6, i64 184, !6, i64 192, !12, i64 200, !19, i64 208, !15, i64 212, !15, i64 216, !20, i64 220, !12, i64 224, !10, i64 232, !6, i64 240, !12, i64 248, !12, i64 256, !10, i64 264, !21, i64 272, !24, i64 496, !26, i64 768}
!15 = !{!"_ZTSN7qpOASES11BooleanTypeE", !7, i64 0}
!16 = !{!"_ZTSN7qpOASES6BoundsE", !17, i64 0, !18, i64 40, !18, i64 80}
!17 = !{!"_ZTSN7qpOASES9SubjectToE", !10, i64 8, !6, i64 16, !6, i64 24, !15, i64 32, !15, i64 36}
!18 = !{!"_ZTSN7qpOASES9IndexlistE", !6, i64 0, !6, i64 8, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32}
!19 = !{!"_ZTSN7qpOASES14QProblemStatusE", !7, i64 0}
!20 = !{!"_ZTSN7qpOASES11HessianTypeE", !7, i64 0}
!21 = !{!"_ZTSN7qpOASES7OptionsE", !22, i64 0, !15, i64 4, !15, i64 8, !15, i64 12, !15, i64 16, !15, i64 20, !15, i64 24, !10, i64 28, !10, i64 32, !15, i64 36, !12, i64 40, !12, 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, !12, i64 120, !23, i64 128, !12, i64 136, !10, i64 144, !12, i64 152, !10, i64 160, !12, i64 168, !12, i64 176, !12, i64 184, !12, i64 192, !15, i64 200, !15, i64 204, !10, i64 208, !10, i64 212, !10, i64 216}
!22 = !{!"_ZTSN7qpOASES10PrintLevelE", !7, i64 0}
!23 = !{!"_ZTSN7qpOASES15SubjectToStatusE", !7, i64 0}
!24 = !{!"_ZTSN7qpOASES7FlipperE", !10, i64 0, !10, i64 4, !16, i64 8, !25, i64 128, !6, i64 248, !6, i64 256, !6, i64 264}
!25 = !{!"_ZTSN7qpOASES11ConstraintsE", !17, i64 0, !18, i64 40, !18, i64 80}
!26 = !{!"_ZTSN7qpOASES13TabularOutputE", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28}
!27 = !{!28, !28, i64 0}
!28 = !{!"vtable pointer", !8, i64 0}
!29 = !{!30, !30, i64 0}
!30 = !{!"_ZTSN7qpOASES11returnValueE", !7, i64 0}
!31 = !{!14, !6, i64 192}
!32 = !{!14, !6, i64 24}
!33 = !{!14, !6, i64 32}
!34 = !{!14, !6, i64 184}
!35 = !{!14, !12, i64 328}
!36 = !{!14, !6, i64 40}
!37 = distinct !{!37, !38}
!38 = !{!"llvm.loop.mustprogress"}
!39 = distinct !{!39, !38}


; 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 [103 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 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 @_ZN7qpOASES8QProblem27updateActivitiesForHotstartEPKdS2_S2_S2_(ptr noundef nonnull align 8 dereferenceable(1064) %0, ptr noundef %1, ptr noundef %2, ptr nocapture noundef readnone %3, ptr nocapture noundef readnone %4) unnamed_addr #3 align 2 {
  %6 = tail call noundef i32 @_ZNK7qpOASES9QProblemB5getNVEv(ptr noundef nonnull align 8 dereferenceable(800) %0)
  %7 = tail call noundef i32 @_ZN7qpOASES9QProblemB18setupSubjectToTypeEPKdS2_(ptr noundef nonnull align 8 dereferenceable(800) %0, ptr noundef %1, ptr noundef %2)
  %.not = icmp eq i32 %7, 0
  br i1 %.not, label %.preheader56, label %17

.preheader56:                                     ; preds = %5
  %8 = icmp sgt i32 %6, 0
  br i1 %8, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %.preheader56
  %9 = getelementptr inbounds i8, ptr %0, i64 48
  %10 = getelementptr inbounds i8, ptr %0, i64 296
  %11 = getelementptr inbounds i8, ptr %0, i64 192
  %12 = getelementptr inbounds i8, ptr %0, i64 24
  %13 = getelementptr inbounds i8, ptr %0, i64 32
  %14 = getelementptr inbounds i8, ptr %0, i64 184
  %15 = getelementptr inbounds i8, ptr %0, i64 328
  %16 = getelementptr inbounds i8, ptr %0, i64 40
  %wide.trip.count = zext nneg i32 %6 to i64
  br label %24

17:                                               ; preds = %5
  %18 = tail call noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv()
  %19 = tail call noundef i32 @_ZN7qpOASES15MessageHandling10throwErrorENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28) %18, i32 noundef 75, ptr noundef null, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i64 noundef 1871, i32 noundef 1)
  br label %.loopexit

.preheader:                                       ; preds = %96
  br i1 %8, label %.lr.ph61, label %.loopexit

.lr.ph61:                                         ; preds = %.preheader
  %20 = getelementptr inbounds i8, ptr %0, i64 48
  %21 = getelementptr inbounds i8, ptr %0, i64 184
  %22 = getelementptr inbounds i8, ptr %0, i64 32
  %23 = getelementptr inbounds i8, ptr %0, i64 40
  %wide.trip.count70 = zext nneg i32 %6 to i64
  br label %97

24:                                               ; preds = %.lr.ph, %96
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %96 ]
  %25 = getelementptr inbounds double, ptr %1, i64 %indvars.iv
  %26 = load double, ptr %25, align 8, !tbaa !5
  %27 = fcmp ugt double %26, -1.000000e+20
  br i1 %27, label %46, label %28

28:                                               ; preds = %24
  %29 = trunc nuw nsw i64 %indvars.iv to i32
  %30 = tail call noundef i32 @_ZNK7qpOASES9SubjectTo9getStatusEi(ptr noundef nonnull align 8 dereferenceable(40) %9, i32 noundef %29)
  %31 = icmp eq i32 %30, -1
  br i1 %31, label %32, label %46

32:                                               ; preds = %28
  %33 = load i32, ptr %10, align 8, !tbaa !9
  %34 = load ptr, ptr %0, align 8, !tbaa !25
  %35 = getelementptr inbounds i8, ptr %34, i64 256
  %36 = load ptr, ptr %35, align 8
  %37 = tail call noundef i32 %36(ptr noundef nonnull align 8 dereferenceable(1064) %0, i32 noundef %29, i32 noundef 1, i32 noundef 0, i32 noundef %33)
  %.not54 = icmp eq i32 %37, 0
  br i1 %.not54, label %38, label %.loopexit

38:                                               ; preds = %32
  %39 = load ptr, ptr %11, align 8, !tbaa !27
  %40 = getelementptr inbounds double, ptr %39, i64 %indvars.iv
  %41 = load double, ptr %40, align 8, !tbaa !5
  %42 = load ptr, ptr %12, align 8, !tbaa !28
  %43 = getelementptr inbounds double, ptr %42, i64 %indvars.iv
  %44 = load double, ptr %43, align 8, !tbaa !5
  %45 = fsub double %44, %41
  store double %45, ptr %43, align 8, !tbaa !5
  store double 0.000000e+00, ptr %40, align 8, !tbaa !5
  br label %46

46:                                               ; preds = %38, %28, %24
  %47 = getelementptr inbounds double, ptr %2, i64 %indvars.iv
  %48 = load double, ptr %47, align 8, !tbaa !5
  %49 = fcmp ult double %48, 1.000000e+20
  br i1 %49, label %68, label %50

50:                                               ; preds = %46
  %51 = trunc nuw nsw i64 %indvars.iv to i32
  %52 = tail call noundef i32 @_ZNK7qpOASES9SubjectTo9getStatusEi(ptr noundef nonnull align 8 dereferenceable(40) %9, i32 noundef %51)
  %53 = icmp eq i32 %52, 1
  br i1 %53, label %54, label %68

54:                                               ; preds = %50
  %55 = load i32, ptr %10, align 8, !tbaa !9
  %56 = load ptr, ptr %0, align 8, !tbaa !25
  %57 = getelementptr inbounds i8, ptr %56, i64 256
  %58 = load ptr, ptr %57, align 8
  %59 = tail call noundef i32 %58(ptr noundef nonnull align 8 dereferenceable(1064) %0, i32 noundef %51, i32 noundef 1, i32 noundef 0, i32 noundef %55)
  %.not55 = icmp eq i32 %59, 0
  br i1 %.not55, label %60, label %.loopexit

60:                                               ; preds = %54
  %61 = load ptr, ptr %11, align 8, !tbaa !27
  %62 = getelementptr inbounds double, ptr %61, i64 %indvars.iv
  %63 = load double, ptr %62, align 8, !tbaa !5
  %64 = load ptr, ptr %12, align 8, !tbaa !28
  %65 = getelementptr inbounds double, ptr %64, i64 %indvars.iv
  %66 = load double, ptr %65, align 8, !tbaa !5
  %67 = fsub double %66, %63
  store double %67, ptr %65, align 8, !tbaa !5
  store double 0.000000e+00, ptr %62, align 8, !tbaa !5
  br label %68

68:                                               ; preds = %60, %50, %46
  %69 = load double, ptr %25, align 8, !tbaa !5
  %70 = fcmp ogt double %69, -1.000000e+20
  br i1 %70, label %71, label %82

71:                                               ; preds = %68
  %72 = load ptr, ptr %13, align 8, !tbaa !29
  %73 = getelementptr inbounds double, ptr %72, i64 %indvars.iv
  %74 = load double, ptr %73, align 8, !tbaa !5
  %75 = fcmp ugt double %74, -1.000000e+20
  br i1 %75, label %82, label %76

76:                                               ; preds = %71
  %77 = load ptr, ptr %14, align 8, !tbaa !30
  %78 = getelementptr inbounds double, ptr %77, i64 %indvars.iv
  %79 = load double, ptr %78, align 8, !tbaa !5
  %80 = load double, ptr %15, align 8, !tbaa !31
  %81 = fsub double %79, %80
  store double %81, ptr %73, align 8, !tbaa !5
  br label %82

82:                                               ; preds = %76, %71, %68
  %83 = load double, ptr %47, align 8, !tbaa !5
  %84 = fcmp olt double %83, 1.000000e+20
  br i1 %84, label %85, label %96

85:                                               ; preds = %82
  %86 = load ptr, ptr %16, align 8, !tbaa !32
  %87 = getelementptr inbounds double, ptr %86, i64 %indvars.iv
  %88 = load double, ptr %87, align 8, !tbaa !5
  %89 = fcmp ult double %88, 1.000000e+20
  br i1 %89, label %96, label %90

90:                                               ; preds = %85
  %91 = load ptr, ptr %14, align 8, !tbaa !30
  %92 = getelementptr inbounds double, ptr %91, i64 %indvars.iv
  %93 = load double, ptr %92, align 8, !tbaa !5
  %94 = load double, ptr %15, align 8, !tbaa !31
  %95 = fadd double %93, %94
  store double %95, ptr %87, align 8, !tbaa !5
  br label %96

96:                                               ; preds = %82, %85, %90
  %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 %24, !llvm.loop !33

97:                                               ; preds = %.lr.ph61, %122
  %indvars.iv67 = phi i64 [ 0, %.lr.ph61 ], [ %indvars.iv.next68, %122 ]
  %98 = trunc nuw nsw i64 %indvars.iv67 to i32
  %99 = tail call noundef i32 @_ZNK7qpOASES9SubjectTo7getTypeEi(ptr noundef nonnull align 8 dereferenceable(40) %20, i32 noundef %98)
  %100 = icmp eq i32 %99, 2
  br i1 %100, label %101, label %122

101:                                              ; preds = %97
  %102 = load ptr, ptr %21, align 8, !tbaa !30
  %103 = getelementptr inbounds double, ptr %102, i64 %indvars.iv67
  %104 = load double, ptr %103, align 8, !tbaa !5
  %105 = load ptr, ptr %22, align 8, !tbaa !29
  %106 = getelementptr inbounds double, ptr %105, i64 %indvars.iv67
  store double %104, ptr %106, align 8, !tbaa !5
  %107 = load ptr, ptr %23, align 8, !tbaa !32
  %108 = getelementptr inbounds double, ptr %107, i64 %indvars.iv67
  store double %104, ptr %108, align 8, !tbaa !5
  %109 = tail call noundef i32 @_ZNK7qpOASES9SubjectTo9getStatusEi(ptr noundef nonnull align 8 dereferenceable(40) %20, i32 noundef %98)
  %110 = icmp eq i32 %109, 0
  br i1 %110, label %111, label %122

111:                                              ; preds = %101
  %112 = load ptr, ptr %0, align 8, !tbaa !25
  %113 = getelementptr inbounds i8, ptr %112, i64 232
  %114 = load ptr, ptr %113, align 8
  %115 = tail call noundef i32 %114(ptr noundef nonnull align 8 dereferenceable(1064) %0, i32 noundef %98)
  %116 = icmp eq i32 %115, 89
  br i1 %116, label %117, label %122

117:                                              ; preds = %111
  %118 = load ptr, ptr %0, align 8, !tbaa !25
  %119 = getelementptr inbounds i8, ptr %118, i64 224
  %120 = load ptr, ptr %119, align 8
  %121 = tail call noundef i32 %120(ptr noundef nonnull align 8 dereferenceable(1064) %0, i32 noundef %98, i32 noundef -1, i32 noundef 1, i32 noundef 1)
  %.not53 = icmp eq i32 %121, 0
  br i1 %.not53, label %122, label %.loopexit

122:                                              ; preds = %97, %111, %117, %101
  %indvars.iv.next68 = add nuw nsw i64 %indvars.iv67, 1
  %exitcond71.not = icmp eq i64 %indvars.iv.next68, %wide.trip.count70
  br i1 %exitcond71.not, label %.loopexit, label %97, !llvm.loop !35

.loopexit:                                        ; preds = %54, %32, %117, %122, %.preheader56, %.preheader, %17
  %.0 = phi i32 [ %19, %17 ], [ 0, %.preheader ], [ 0, %.preheader56 ], [ %121, %117 ], [ 0, %122 ], [ %59, %54 ], [ %37, %32 ]
  ret i32 %.0
}

declare noundef i32 @_ZN7qpOASES9QProblemB18setupSubjectToTypeEPKdS2_(ptr noundef nonnull align 8 dereferenceable(800), ptr noundef, ptr noundef) unnamed_addr #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, !6, i64 0}
!6 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !11, i64 296}
!10 = !{!"_ZTSN7qpOASES9QProblemBE", !11, i64 8, !12, i64 16, !12, i64 24, !12, i64 32, !12, i64 40, !13, i64 48, !12, i64 168, !11, i64 176, !12, i64 184, !12, i64 192, !6, i64 200, !17, i64 208, !11, i64 212, !11, i64 216, !18, i64 220, !6, i64 224, !15, i64 232, !12, i64 240, !6, i64 248, !6, i64 256, !15, i64 264, !19, i64 272, !22, i64 496, !24, i64 768}
!11 = !{!"_ZTSN7qpOASES11BooleanTypeE", !7, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = !{!"_ZTSN7qpOASES6BoundsE", !14, i64 0, !16, i64 40, !16, i64 80}
!14 = !{!"_ZTSN7qpOASES9SubjectToE", !15, i64 8, !12, i64 16, !12, i64 24, !11, i64 32, !11, i64 36}
!15 = !{!"int", !7, i64 0}
!16 = !{!"_ZTSN7qpOASES9IndexlistE", !12, i64 0, !12, i64 8, !15, i64 16, !15, i64 20, !15, i64 24, !15, i64 28, !15, i64 32}
!17 = !{!"_ZTSN7qpOASES14QProblemStatusE", !7, i64 0}
!18 = !{!"_ZTSN7qpOASES11HessianTypeE", !7, i64 0}
!19 = !{!"_ZTSN7qpOASES7OptionsE", !20, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24, !15, i64 28, !15, i64 32, !11, i64 36, !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, !21, i64 128, !6, i64 136, !15, i64 144, !6, i64 152, !15, i64 160, !6, i64 168, !6, i64 176, !6, i64 184, !6, i64 192, !11, i64 200, !11, i64 204, !15, i64 208, !15, i64 212, !15, i64 216}
!20 = !{!"_ZTSN7qpOASES10PrintLevelE", !7, i64 0}
!21 = !{!"_ZTSN7qpOASES15SubjectToStatusE", !7, i64 0}
!22 = !{!"_ZTSN7qpOASES7FlipperE", !15, i64 0, !15, i64 4, !13, i64 8, !23, i64 128, !12, i64 248, !12, i64 256, !12, i64 264}
!23 = !{!"_ZTSN7qpOASES11ConstraintsE", !14, i64 0, !16, i64 40, !16, i64 80}
!24 = !{!"_ZTSN7qpOASES13TabularOutputE", !15, i64 0, !15, i64 4, !15, i64 8, !15, i64 12, !15, i64 16, !15, i64 20, !15, i64 24, !15, i64 28}
!25 = !{!26, !26, i64 0}
!26 = !{!"vtable pointer", !8, i64 0}
!27 = !{!10, !12, i64 192}
!28 = !{!10, !12, i64 24}
!29 = !{!10, !12, i64 32}
!30 = !{!10, !12, i64 184}
!31 = !{!10, !6, i64 328}
!32 = !{!10, !12, i64 40}
!33 = distinct !{!33, !34}
!34 = !{!"llvm.loop.mustprogress"}
!35 = distinct !{!35, !34}


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