; LLVM IR from Tencent-RoboticsX/jbdl :: src/jbdl/experimental/qpoases/src (QProblemB)

; 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 [104 x i8], align 1

declare noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv() #0

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #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) #0

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

; 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 @_ZNK7qpOASES9QProblemB6getNFREv(ptr noundef nonnull align 8 dereferenceable(800)) #2 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN7qpOASES6Bounds7getFreeEv(ptr noundef nonnull align 8 dereferenceable(120)) #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN7qpOASES9QProblemB8addBoundEiNS_15SubjectToStatusENS_11BooleanTypeE(ptr noundef nonnull align 8 dereferenceable(800) %0, i32 noundef %1, i32 noundef %2, i32 noundef %3) #4 align 2 {
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %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
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca double, align 8
  %17 = alloca double, align 8
  %18 = alloca double, align 8
  store ptr %0, ptr %6, align 8, !tbaa !5
  store i32 %1, ptr %7, align 4, !tbaa !9
  store i32 %2, ptr %8, align 4, !tbaa !11
  store i32 %3, ptr %9, align 4, !tbaa !13
  %19 = 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
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  %20 = call noundef i32 @_ZNK7qpOASES9QProblemB5getNVEv(ptr noundef nonnull align 8 dereferenceable(800) %19)
  store i32 %20, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  %21 = call noundef i32 @_ZNK7qpOASES9QProblemB6getNFREv(ptr noundef nonnull align 8 dereferenceable(800) %19)
  store i32 %21, ptr %13, align 4, !tbaa !9
  %22 = call noundef i32 @_ZNK7qpOASES9QProblemB9getStatusEv(ptr noundef nonnull align 8 dereferenceable(800) %19)
  %23 = icmp eq i32 %22, 0
  br i1 %23, label %33, label %24

24:                                               ; preds = %4
  %25 = call noundef i32 @_ZNK7qpOASES9QProblemB9getStatusEv(ptr noundef nonnull align 8 dereferenceable(800) %19)
  %26 = icmp eq i32 %25, 2
  br i1 %26, label %33, label %27

27:                                               ; preds = %24
  %28 = call noundef i32 @_ZNK7qpOASES9QProblemB9getStatusEv(ptr noundef nonnull align 8 dereferenceable(800) %19)
  %29 = icmp eq i32 %28, 4
  br i1 %29, label %33, label %30

30:                                               ; preds = %27
  %31 = call noundef i32 @_ZNK7qpOASES9QProblemB9getStatusEv(ptr noundef nonnull align 8 dereferenceable(800) %19)
  %32 = icmp eq i32 %31, 5
  br i1 %32, label %33, label %36

33:                                               ; preds = %30, %27, %24, %4
  %34 = call noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv()
  %35 = call noundef i32 @_ZN7qpOASES15MessageHandling10throwErrorENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28) %34, i32 noundef 9, ptr noundef null, ptr noundef @.str, ptr noundef @.str.1, i64 noundef 3501, i32 noundef 1)
  store i32 %35, ptr %5, align 4
  store i32 1, ptr %14, align 4
  br label %247

36:                                               ; preds = %30
  %37 = call noundef i32 @_ZNK7qpOASES9QProblemB9getStatusEv(ptr noundef nonnull align 8 dereferenceable(800) %19)
  %38 = icmp eq i32 %37, 1
  br i1 %38, label %39, label %49

39:                                               ; preds = %36
  %40 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %19, i32 0, i32 6
  %41 = load i32, ptr %7, align 4, !tbaa !9
  %42 = load i32, ptr %8, align 4, !tbaa !11
  %43 = call noundef i32 @_ZN7qpOASES6Bounds15moveFreeToFixedEiNS_15SubjectToStatusE(ptr noundef nonnull align 8 dereferenceable(120) %40, i32 noundef %41, i32 noundef %42)
  %44 = icmp ne i32 %43, 0
  br i1 %44, label %45, label %48

45:                                               ; preds = %39
  %46 = call noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv()
  %47 = call noundef i32 @_ZN7qpOASES15MessageHandling10throwErrorENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28) %46, i32 noundef 78, ptr noundef null, ptr noundef @.str, ptr noundef @.str.1, i64 noundef 3509, i32 noundef 1)
  store i32 %47, ptr %5, align 4
  store i32 1, ptr %14, align 4
  br label %247

48:                                               ; preds = %39
  store i32 0, ptr %5, align 4
  store i32 1, ptr %14, align 4
  br label %247

49:                                               ; preds = %36
  %50 = load i32, ptr %9, align 4, !tbaa !13
  %51 = icmp eq i32 %50, 1
  br i1 %51, label %52, label %234

52:                                               ; preds = %49
  %53 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %19, i32 0, i32 15
  %54 = load i32, ptr %53, align 4, !tbaa !15
  %55 = icmp ne i32 %54, 0
  br i1 %55, label %56, label %234

56:                                               ; preds = %52
  %57 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %19, i32 0, i32 15
  %58 = load i32, ptr %57, align 4, !tbaa !15
  %59 = icmp ne i32 %58, 1
  br i1 %59, label %60, label %234

60:                                               ; preds = %56
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  %61 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %19, i32 0, i32 6
  %62 = call noundef ptr @_ZN7qpOASES6Bounds7getFreeEv(ptr noundef nonnull align 8 dereferenceable(120) %61)
  %63 = load i32, ptr %7, align 4, !tbaa !9
  %64 = call noundef i32 @_ZNK7qpOASES9Indexlist8getIndexEi(ptr noundef nonnull align 8 dereferenceable(36) %62, i32 noundef %63)
  store i32 %64, ptr %15, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  %65 = load i32, ptr %15, align 4, !tbaa !9
  %66 = add nsw i32 %65, 1
  store i32 %66, ptr %10, align 4, !tbaa !9
  br label %67

67:                                               ; preds = %170, %60
  %68 = load i32, ptr %10, align 4, !tbaa !9
  %69 = load i32, ptr %13, align 4, !tbaa !9
  %70 = icmp slt i32 %68, %69
  br i1 %70, label %71, label %173

71:                                               ; preds = %67
  %72 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %19, i32 0, i32 7
  %73 = load ptr, ptr %72, align 8, !tbaa !28
  %74 = load i32, ptr %10, align 4, !tbaa !9
  %75 = sub nsw i32 %74, 1
  %76 = load i32, ptr %12, align 4, !tbaa !9
  %77 = load i32, ptr %10, align 4, !tbaa !9
  %78 = mul nsw i32 %76, %77
  %79 = add nsw i32 %75, %78
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds double, ptr %73, i64 %80
  %82 = load double, ptr %81, align 8, !tbaa !29
  %83 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %19, i32 0, i32 7
  %84 = load ptr, ptr %83, align 8, !tbaa !28
  %85 = load i32, ptr %10, align 4, !tbaa !9
  %86 = load i32, ptr %12, align 4, !tbaa !9
  %87 = load i32, ptr %10, align 4, !tbaa !9
  %88 = mul nsw i32 %86, %87
  %89 = add nsw i32 %85, %88
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds double, ptr %84, i64 %90
  %92 = load double, ptr %91, align 8, !tbaa !29
  %93 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %19, i32 0, i32 7
  %94 = load ptr, ptr %93, align 8, !tbaa !28
  %95 = load i32, ptr %10, align 4, !tbaa !9
  %96 = sub nsw i32 %95, 1
  %97 = load i32, ptr %12, align 4, !tbaa !9
  %98 = load i32, ptr %10, align 4, !tbaa !9
  %99 = mul nsw i32 %97, %98
  %100 = add nsw i32 %96, %99
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds double, ptr %94, i64 %101
  %103 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %19, i32 0, i32 7
  %104 = load ptr, ptr %103, align 8, !tbaa !28
  %105 = load i32, ptr %10, align 4, !tbaa !9
  %106 = load i32, ptr %12, align 4, !tbaa !9
  %107 = load i32, ptr %10, align 4, !tbaa !9
  %108 = mul nsw i32 %106, %107
  %109 = add nsw i32 %105, %108
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds double, ptr %104, i64 %110
  call void @_ZNK7qpOASES9QProblemB13computeGivensEddRdS1_S1_S1_(ptr noundef nonnull align 8 dereferenceable(800) %19, double noundef %82, double noundef %92, ptr noundef nonnull align 8 dereferenceable(8) %102, ptr noundef nonnull align 8 dereferenceable(8) %111, ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %17)
  %112 = load double, ptr %17, align 8, !tbaa !29
  %113 = load double, ptr %16, align 8, !tbaa !29
  %114 = fadd double 1.000000e+00, %113
  %115 = fdiv double %112, %114
  store double %115, ptr %18, align 8, !tbaa !29
  %116 = load i32, ptr %10, align 4, !tbaa !9
  %117 = add nsw i32 1, %116
  store i32 %117, ptr %11, align 4, !tbaa !9
  br label %118

118:                                              ; preds = %166, %71
  %119 = load i32, ptr %11, align 4, !tbaa !9
  %120 = load i32, ptr %13, align 4, !tbaa !9
  %121 = icmp slt i32 %119, %120
  br i1 %121, label %122, label %169

122:                                              ; preds = %118
  %123 = load double, ptr %16, align 8, !tbaa !29
  %124 = load double, ptr %17, align 8, !tbaa !29
  %125 = load double, ptr %18, align 8, !tbaa !29
  %126 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %19, i32 0, i32 7
  %127 = load ptr, ptr %126, align 8, !tbaa !28
  %128 = load i32, ptr %10, align 4, !tbaa !9
  %129 = sub nsw i32 %128, 1
  %130 = load i32, ptr %12, align 4, !tbaa !9
  %131 = load i32, ptr %11, align 4, !tbaa !9
  %132 = mul nsw i32 %130, %131
  %133 = add nsw i32 %129, %132
  %134 = sext i32 %133 to i64
  %135 = getelementptr inbounds double, ptr %127, i64 %134
  %136 = load double, ptr %135, align 8, !tbaa !29
  %137 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %19, i32 0, i32 7
  %138 = load ptr, ptr %137, align 8, !tbaa !28
  %139 = load i32, ptr %10, align 4, !tbaa !9
  %140 = load i32, ptr %12, align 4, !tbaa !9
  %141 = load i32, ptr %11, align 4, !tbaa !9
  %142 = mul nsw i32 %140, %141
  %143 = add nsw i32 %139, %142
  %144 = sext i32 %143 to i64
  %145 = getelementptr inbounds double, ptr %138, i64 %144
  %146 = load double, ptr %145, align 8, !tbaa !29
  %147 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %19, i32 0, i32 7
  %148 = load ptr, ptr %147, align 8, !tbaa !28
  %149 = load i32, ptr %10, align 4, !tbaa !9
  %150 = sub nsw i32 %149, 1
  %151 = load i32, ptr %12, align 4, !tbaa !9
  %152 = load i32, ptr %11, align 4, !tbaa !9
  %153 = mul nsw i32 %151, %152
  %154 = add nsw i32 %150, %153
  %155 = sext i32 %154 to i64
  %156 = getelementptr inbounds double, ptr %148, i64 %155
  %157 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %19, i32 0, i32 7
  %158 = load ptr, ptr %157, align 8, !tbaa !28
  %159 = load i32, ptr %10, align 4, !tbaa !9
  %160 = load i32, ptr %12, align 4, !tbaa !9
  %161 = load i32, ptr %11, align 4, !tbaa !9
  %162 = mul nsw i32 %160, %161
  %163 = add nsw i32 %159, %162
  %164 = sext i32 %163 to i64
  %165 = getelementptr inbounds double, ptr %158, i64 %164
  call void @_ZNK7qpOASES9QProblemB11applyGivensEdddddRdS1_(ptr noundef nonnull align 8 dereferenceable(800) %19, double noundef %123, double noundef %124, double noundef %125, double noundef %136, double noundef %146, ptr noundef nonnull align 8 dereferenceable(8) %156, ptr noundef nonnull align 8 dereferenceable(8) %165)
  br label %166

166:                                              ; preds = %122
  %167 = load i32, ptr %11, align 4, !tbaa !9
  %168 = add nsw i32 %167, 1
  store i32 %168, ptr %11, align 4, !tbaa !9
  br label %118, !llvm.loop !30

169:                                              ; preds = %118
  br label %170

170:                                              ; preds = %169
  %171 = load i32, ptr %10, align 4, !tbaa !9
  %172 = add nsw i32 %171, 1
  store i32 %172, ptr %10, align 4, !tbaa !9
  br label %67, !llvm.loop !32

173:                                              ; preds = %67
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %174

174:                                              ; preds = %211, %173
  %175 = load i32, ptr %10, align 4, !tbaa !9
  %176 = load i32, ptr %13, align 4, !tbaa !9
  %177 = sub nsw i32 %176, 1
  %178 = icmp slt i32 %175, %177
  br i1 %178, label %179, label %214

179:                                              ; preds = %174
  %180 = load i32, ptr %15, align 4, !tbaa !9
  %181 = add nsw i32 %180, 1
  store i32 %181, ptr %11, align 4, !tbaa !9
  br label %182

182:                                              ; preds = %207, %179
  %183 = load i32, ptr %11, align 4, !tbaa !9
  %184 = load i32, ptr %13, align 4, !tbaa !9
  %185 = icmp slt i32 %183, %184
  br i1 %185, label %186, label %210

186:                                              ; preds = %182
  %187 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %19, i32 0, i32 7
  %188 = load ptr, ptr %187, align 8, !tbaa !28
  %189 = load i32, ptr %10, align 4, !tbaa !9
  %190 = load i32, ptr %12, align 4, !tbaa !9
  %191 = load i32, ptr %11, align 4, !tbaa !9
  %192 = mul nsw i32 %190, %191
  %193 = add nsw i32 %189, %192
  %194 = sext i32 %193 to i64
  %195 = getelementptr inbounds double, ptr %188, i64 %194
  %196 = load double, ptr %195, align 8, !tbaa !29
  %197 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %19, i32 0, i32 7
  %198 = load ptr, ptr %197, align 8, !tbaa !28
  %199 = load i32, ptr %10, align 4, !tbaa !9
  %200 = load i32, ptr %12, align 4, !tbaa !9
  %201 = load i32, ptr %11, align 4, !tbaa !9
  %202 = sub nsw i32 %201, 1
  %203 = mul nsw i32 %200, %202
  %204 = add nsw i32 %199, %203
  %205 = sext i32 %204 to i64
  %206 = getelementptr inbounds double, ptr %198, i64 %205
  store double %196, ptr %206, align 8, !tbaa !29
  br label %207

207:                                              ; preds = %186
  %208 = load i32, ptr %11, align 4, !tbaa !9
  %209 = add nsw i32 %208, 1
  store i32 %209, ptr %11, align 4, !tbaa !9
  br label %182, !llvm.loop !33

210:                                              ; preds = %182
  br label %211

211:                                              ; preds = %210
  %212 = load i32, ptr %10, align 4, !tbaa !9
  %213 = add nsw i32 %212, 1
  store i32 %213, ptr %10, align 4, !tbaa !9
  br label %174, !llvm.loop !34

214:                                              ; preds = %174
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %215

215:                                              ; preds = %230, %214
  %216 = load i32, ptr %10, align 4, !tbaa !9
  %217 = load i32, ptr %13, align 4, !tbaa !9
  %218 = icmp slt i32 %216, %217
  br i1 %218, label %219, label %233

219:                                              ; preds = %215
  %220 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %19, i32 0, i32 7
  %221 = load ptr, ptr %220, align 8, !tbaa !28
  %222 = load i32, ptr %10, align 4, !tbaa !9
  %223 = load i32, ptr %12, align 4, !tbaa !9
  %224 = load i32, ptr %13, align 4, !tbaa !9
  %225 = sub nsw i32 %224, 1
  %226 = mul nsw i32 %223, %225
  %227 = add nsw i32 %222, %226
  %228 = sext i32 %227 to i64
  %229 = getelementptr inbounds double, ptr %221, i64 %228
  store double 0.000000e+00, ptr %229, align 8, !tbaa !29
  br label %230

230:                                              ; preds = %219
  %231 = load i32, ptr %10, align 4, !tbaa !9
  %232 = add nsw i32 %231, 1
  store i32 %232, ptr %10, align 4, !tbaa !9
  br label %215, !llvm.loop !35

233:                                              ; preds = %215
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  br label %234

234:                                              ; preds = %233, %56, %52, %49
  %235 = load i32, ptr %7, align 4, !tbaa !9
  %236 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %19, i32 0, i32 25
  %237 = getelementptr inbounds %"struct.qpOASES::TabularOutput", ptr %236, i32 0, i32 0
  store i32 %235, ptr %237, align 8, !tbaa !36
  %238 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %19, i32 0, i32 6
  %239 = load i32, ptr %7, align 4, !tbaa !9
  %240 = load i32, ptr %8, align 4, !tbaa !11
  %241 = call noundef i32 @_ZN7qpOASES6Bounds15moveFreeToFixedEiNS_15SubjectToStatusE(ptr noundef nonnull align 8 dereferenceable(120) %238, i32 noundef %239, i32 noundef %240)
  %242 = icmp ne i32 %241, 0
  br i1 %242, label %243, label %246

243:                                              ; preds = %234
  %244 = call noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv()
  %245 = call noundef i32 @_ZN7qpOASES15MessageHandling10throwErrorENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28) %244, i32 noundef 78, ptr noundef null, ptr noundef @.str, ptr noundef @.str.1, i64 noundef 3546, i32 noundef 1)
  store i32 %245, ptr %5, align 4
  store i32 1, ptr %14, align 4
  br label %247

246:                                              ; preds = %234
  store i32 0, ptr %5, align 4
  store i32 1, ptr %14, align 4
  br label %247

247:                                              ; preds = %246, %243, %48, %45, %33
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  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
  %248 = load i32, ptr %5, align 4
  ret i32 %248
}

declare noundef i32 @_ZN7qpOASES6Bounds15moveFreeToFixedEiNS_15SubjectToStatusE(ptr noundef nonnull align 8 dereferenceable(120), i32 noundef, i32 noundef) #0

declare noundef i32 @_ZNK7qpOASES9Indexlist8getIndexEi(ptr noundef nonnull align 8 dereferenceable(36), i32 noundef) #0

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK7qpOASES9QProblemB13computeGivensEddRdS1_S1_S1_(ptr noundef nonnull align 8 dereferenceable(800), double noundef, double noundef, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNK7qpOASES9QProblemB11applyGivensEdddddRdS1_(ptr noundef nonnull align 8 dereferenceable(800), double noundef, double noundef, double noundef, double noundef, double noundef, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #3 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = !{!"_ZTSN7qpOASES15SubjectToStatusE", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"_ZTSN7qpOASES11BooleanTypeE", !7, i64 0}
!15 = !{!16, !22, i64 220}
!16 = !{!"_ZTSN7qpOASES9QProblemBE", !14, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !17, i64 48, !6, i64 168, !14, i64 176, !6, i64 184, !6, i64 192, !20, i64 200, !21, i64 208, !14, i64 212, !14, i64 216, !22, i64 220, !20, i64 224, !10, i64 232, !6, i64 240, !20, i64 248, !20, i64 256, !10, i64 264, !23, i64 272, !25, i64 496, !27, i64 768}
!17 = !{!"_ZTSN7qpOASES6BoundsE", !18, i64 0, !19, i64 40, !19, i64 80}
!18 = !{!"_ZTSN7qpOASES9SubjectToE", !10, i64 8, !6, i64 16, !6, i64 24, !14, i64 32, !14, i64 36}
!19 = !{!"_ZTSN7qpOASES9IndexlistE", !6, i64 0, !6, i64 8, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32}
!20 = !{!"double", !7, i64 0}
!21 = !{!"_ZTSN7qpOASES14QProblemStatusE", !7, i64 0}
!22 = !{!"_ZTSN7qpOASES11HessianTypeE", !7, i64 0}
!23 = !{!"_ZTSN7qpOASES7OptionsE", !24, i64 0, !14, i64 4, !14, i64 8, !14, i64 12, !14, i64 16, !14, i64 20, !14, i64 24, !10, i64 28, !10, i64 32, !14, i64 36, !20, i64 40, !20, i64 48, !20, i64 56, !20, i64 64, !20, i64 72, !20, i64 80, !20, i64 88, !20, i64 96, !20, i64 104, !20, i64 112, !20, i64 120, !12, i64 128, !20, i64 136, !10, i64 144, !20, i64 152, !10, i64 160, !20, i64 168, !20, i64 176, !20, i64 184, !20, i64 192, !14, i64 200, !14, i64 204, !10, i64 208, !10, i64 212, !10, i64 216}
!24 = !{!"_ZTSN7qpOASES10PrintLevelE", !7, i64 0}
!25 = !{!"_ZTSN7qpOASES7FlipperE", !10, i64 0, !10, i64 4, !17, i64 8, !26, i64 128, !6, i64 248, !6, i64 256, !6, i64 264}
!26 = !{!"_ZTSN7qpOASES11ConstraintsE", !18, i64 0, !19, i64 40, !19, i64 80}
!27 = !{!"_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}
!28 = !{!16, !6, i64 168}
!29 = !{!20, !20, i64 0}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.mustprogress"}
!32 = distinct !{!32, !31}
!33 = distinct !{!33, !31}
!34 = distinct !{!34, !31}
!35 = distinct !{!35, !31}
!36 = !{!16, !10, i64 768}


; 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 [104 x i8], align 1

declare noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv() local_unnamed_addr #0

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #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) local_unnamed_addr #0

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN7qpOASES6Bounds7getFreeEv(ptr noundef nonnull align 8 dereferenceable(120)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN7qpOASES9QProblemB8addBoundEiNS_15SubjectToStatusENS_11BooleanTypeE(ptr noundef nonnull align 8 dereferenceable(800) %0, i32 noundef %1, i32 noundef %2, i32 noundef %3) local_unnamed_addr #4 align 2 {
  %5 = alloca double, align 8
  %6 = alloca double, align 8
  %7 = tail call noundef i32 @_ZNK7qpOASES9QProblemB5getNVEv(ptr noundef nonnull align 8 dereferenceable(800) %0)
  %8 = tail call noundef i32 @_ZNK7qpOASES9QProblemB6getNFREv(ptr noundef nonnull align 8 dereferenceable(800) %0)
  %9 = tail call noundef i32 @_ZNK7qpOASES9QProblemB9getStatusEv(ptr noundef nonnull align 8 dereferenceable(800) %0)
  %10 = icmp eq i32 %9, 0
  br i1 %10, label %20, label %11

11:                                               ; preds = %4
  %12 = tail call noundef i32 @_ZNK7qpOASES9QProblemB9getStatusEv(ptr noundef nonnull align 8 dereferenceable(800) %0)
  %13 = icmp eq i32 %12, 2
  br i1 %13, label %20, label %14

14:                                               ; preds = %11
  %15 = tail call noundef i32 @_ZNK7qpOASES9QProblemB9getStatusEv(ptr noundef nonnull align 8 dereferenceable(800) %0)
  %16 = icmp eq i32 %15, 4
  br i1 %16, label %20, label %17

17:                                               ; preds = %14
  %18 = tail call noundef i32 @_ZNK7qpOASES9QProblemB9getStatusEv(ptr noundef nonnull align 8 dereferenceable(800) %0)
  %19 = icmp eq i32 %18, 5
  br i1 %19, label %20, label %23

20:                                               ; preds = %17, %14, %11, %4
  %21 = tail call noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv()
  %22 = tail call noundef i32 @_ZN7qpOASES15MessageHandling10throwErrorENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28) %21, i32 noundef 9, ptr noundef null, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i64 noundef 3501, i32 noundef 1)
  br label %125

23:                                               ; preds = %17
  %24 = tail call noundef i32 @_ZNK7qpOASES9QProblemB9getStatusEv(ptr noundef nonnull align 8 dereferenceable(800) %0)
  %25 = icmp eq i32 %24, 1
  br i1 %25, label %26, label %32

26:                                               ; preds = %23
  %27 = getelementptr inbounds i8, ptr %0, i64 48
  %28 = tail call noundef i32 @_ZN7qpOASES6Bounds15moveFreeToFixedEiNS_15SubjectToStatusE(ptr noundef nonnull align 8 dereferenceable(120) %27, i32 noundef %1, i32 noundef %2)
  %.not69 = icmp eq i32 %28, 0
  br i1 %.not69, label %125, label %29

29:                                               ; preds = %26
  %30 = tail call noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv()
  %31 = tail call noundef i32 @_ZN7qpOASES15MessageHandling10throwErrorENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28) %30, i32 noundef 78, ptr noundef null, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i64 noundef 3509, i32 noundef 1)
  br label %125

32:                                               ; preds = %23
  %33 = icmp ne i32 %3, 1
  %34 = getelementptr inbounds i8, ptr %0, i64 220
  %35 = load i32, ptr %34, align 4
  %switch = icmp ult i32 %35, 2
  %or.cond = select i1 %33, i1 true, i1 %switch
  br i1 %or.cond, label %118, label %36

36:                                               ; preds = %32
  %37 = getelementptr inbounds i8, ptr %0, i64 48
  %38 = tail call noundef ptr @_ZN7qpOASES6Bounds7getFreeEv(ptr noundef nonnull align 8 dereferenceable(120) %37)
  %39 = tail call noundef i32 @_ZNK7qpOASES9Indexlist8getIndexEi(ptr noundef nonnull align 8 dereferenceable(36) %38, i32 noundef %1)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #6
  %40 = add nsw i32 %39, 1
  %41 = icmp slt i32 %40, %8
  br i1 %41, label %.lr.ph75, label %.preheader72.thread

.lr.ph75:                                         ; preds = %36
  %42 = getelementptr inbounds i8, ptr %0, i64 168
  %43 = add i32 %39, 2
  %44 = sext i32 %43 to i64
  %45 = sext i32 %7 to i64
  %46 = sext i32 %8 to i64
  %47 = sext i32 %40 to i64
  br label %80

.loopexit:                                        ; preds = %.lr.ph, %80
  %indvars.iv.next = add nsw i64 %indvars.iv, 1
  %lftr.wideiv = trunc i64 %indvars.iv.next86 to i32
  %exitcond.not = icmp eq i32 %8, %lftr.wideiv
  br i1 %exitcond.not, label %.preheader72, label %80, !llvm.loop !5

.preheader72:                                     ; preds = %.loopexit
  %48 = add i32 %8, -1
  %49 = icmp sgt i32 %8, 1
  br i1 %49, label %.preheader71.lr.ph, label %.preheader

.preheader72.thread:                              ; preds = %36
  %50 = add i32 %8, -1
  %51 = icmp sgt i32 %8, 1
  br i1 %51, label %.lr.ph80, label %.preheader

.preheader71.lr.ph:                               ; preds = %.preheader72
  %52 = getelementptr inbounds i8, ptr %0, i64 168
  %53 = load ptr, ptr %52, align 8
  br i1 %41, label %.preheader71.us.preheader, label %.lr.ph80

.preheader71.us.preheader:                        ; preds = %.preheader71.lr.ph
  %54 = sext i32 %40 to i64
  %55 = sext i32 %7 to i64
  %wide.trip.count = zext nneg i32 %48 to i64
  %56 = add nsw i32 %8, -2
  %57 = sub i32 %56, %39
  %58 = zext i32 %57 to i64
  %59 = add nuw nsw i64 %58, 1
  %min.iters.check = icmp ugt i32 %57, 2
  %ident.check.not = icmp eq i32 %7, 1
  %or.cond103 = and i1 %min.iters.check, %ident.check.not
  %n.vec = and i64 %59, 8589934588
  %ind.end = add nsw i64 %n.vec, %54
  %cmp.n = icmp eq i64 %59, %n.vec
  br label %.preheader71.us

.preheader71.us:                                  ; preds = %.preheader71.us.preheader, %._crit_edge.us
  %indvars.iv93 = phi i64 [ 0, %.preheader71.us.preheader ], [ %indvars.iv.next94, %._crit_edge.us ]
  %invariant.gep = getelementptr double, ptr %53, i64 %indvars.iv93
  %invariant.gep100 = getelementptr double, ptr %53, i64 %indvars.iv93
  br i1 %or.cond103, label %vector.body, label %scalar.ph.preheader

vector.body:                                      ; preds = %.preheader71.us, %vector.body
  %index = phi i64 [ %index.next, %vector.body ], [ 0, %.preheader71.us ]
  %offset.idx = add i64 %index, %54
  %60 = getelementptr double, ptr %invariant.gep, i64 %offset.idx
  %61 = getelementptr i8, ptr %60, i64 16
  %wide.load = load <2 x double>, ptr %60, align 8, !tbaa !7
  %wide.load102 = load <2 x double>, ptr %61, align 8, !tbaa !7
  %62 = getelementptr double, ptr %invariant.gep100, i64 %offset.idx
  %63 = getelementptr i8, ptr %62, i64 -8
  %64 = getelementptr i8, ptr %62, i64 8
  store <2 x double> %wide.load, ptr %63, align 8, !tbaa !7
  store <2 x double> %wide.load102, ptr %64, align 8, !tbaa !7
  %index.next = add nuw i64 %index, 4
  %65 = icmp eq i64 %index.next, %n.vec
  br i1 %65, label %middle.block, label %vector.body, !llvm.loop !11

middle.block:                                     ; preds = %vector.body
  br i1 %cmp.n, label %._crit_edge.us, label %scalar.ph.preheader

scalar.ph.preheader:                              ; preds = %middle.block, %.preheader71.us
  %indvars.iv88.ph = phi i64 [ %54, %.preheader71.us ], [ %ind.end, %middle.block ]
  %66 = trunc i64 %indvars.iv88.ph to i32
  %67 = sub i32 %8, %66
  %.neg = add i32 %66, 1
  %xtraiter = and i32 %67, 1
  %lcmp.mod.not = icmp eq i32 %xtraiter, 0
  br i1 %lcmp.mod.not, label %scalar.ph.prol.loopexit, label %scalar.ph.prol

scalar.ph.prol:                                   ; preds = %scalar.ph.preheader
  %68 = mul nsw i64 %indvars.iv88.ph, %55
  %gep.prol = getelementptr double, ptr %invariant.gep, i64 %68
  %69 = load double, ptr %gep.prol, align 8, !tbaa !7
  %70 = add nsw i64 %indvars.iv88.ph, -1
  %71 = mul nsw i64 %70, %55
  %gep101.prol = getelementptr double, ptr %invariant.gep100, i64 %71
  store double %69, ptr %gep101.prol, align 8, !tbaa !7
  %indvars.iv.next89.prol = add nsw i64 %indvars.iv88.ph, 1
  br label %scalar.ph.prol.loopexit

scalar.ph.prol.loopexit:                          ; preds = %scalar.ph.prol, %scalar.ph.preheader
  %indvars.iv88.unr = phi i64 [ %indvars.iv88.ph, %scalar.ph.preheader ], [ %indvars.iv.next89.prol, %scalar.ph.prol ]
  %72 = icmp eq i32 %8, %.neg
  br i1 %72, label %._crit_edge.us, label %scalar.ph

scalar.ph:                                        ; preds = %scalar.ph.prol.loopexit, %scalar.ph
  %indvars.iv88 = phi i64 [ %indvars.iv.next89.1, %scalar.ph ], [ %indvars.iv88.unr, %scalar.ph.prol.loopexit ]
  %73 = mul nsw i64 %indvars.iv88, %55
  %gep = getelementptr double, ptr %invariant.gep, i64 %73
  %74 = load double, ptr %gep, align 8, !tbaa !7
  %75 = add nsw i64 %indvars.iv88, -1
  %76 = mul nsw i64 %75, %55
  %gep101 = getelementptr double, ptr %invariant.gep100, i64 %76
  store double %74, ptr %gep101, align 8, !tbaa !7
  %indvars.iv.next89 = add nsw i64 %indvars.iv88, 1
  %77 = mul nsw i64 %indvars.iv.next89, %55
  %gep.1 = getelementptr double, ptr %invariant.gep, i64 %77
  %78 = load double, ptr %gep.1, align 8, !tbaa !7
  %79 = mul nsw i64 %indvars.iv88, %55
  %gep101.1 = getelementptr double, ptr %invariant.gep100, i64 %79
  store double %78, ptr %gep101.1, align 8, !tbaa !7
  %indvars.iv.next89.1 = add nsw i64 %indvars.iv88, 2
  %lftr.wideiv91.1 = trunc i64 %indvars.iv.next89.1 to i32
  %exitcond92.not.1 = icmp eq i32 %8, %lftr.wideiv91.1
  br i1 %exitcond92.not.1, label %._crit_edge.us, label %scalar.ph, !llvm.loop !14

._crit_edge.us:                                   ; preds = %scalar.ph.prol.loopexit, %scalar.ph, %middle.block
  %indvars.iv.next94 = add nuw nsw i64 %indvars.iv93, 1
  %exitcond96.not = icmp eq i64 %indvars.iv.next94, %wide.trip.count
  br i1 %exitcond96.not, label %.preheader, label %.preheader71.us, !llvm.loop !15

80:                                               ; preds = %.lr.ph75, %.loopexit
  %indvars.iv85 = phi i64 [ %47, %.lr.ph75 ], [ %indvars.iv.next86, %.loopexit ]
  %indvars.iv = phi i64 [ %44, %.lr.ph75 ], [ %indvars.iv.next, %.loopexit ]
  %indvars87 = trunc i64 %indvars.iv85 to i32
  %81 = load ptr, ptr %42, align 8, !tbaa !16
  %82 = add nsw i64 %indvars.iv85, -1
  %83 = mul nsw i64 %indvars.iv85, %45
  %84 = mul nsw i32 %7, %indvars87
  %85 = getelementptr double, ptr %81, i64 %82
  %86 = getelementptr double, ptr %85, i64 %83
  %87 = load double, ptr %86, align 8, !tbaa !7
  %88 = sext i32 %84 to i64
  %89 = getelementptr double, ptr %81, i64 %indvars.iv85
  %90 = getelementptr double, ptr %89, i64 %88
  %91 = load double, ptr %90, align 8, !tbaa !7
  call void @_ZNK7qpOASES9QProblemB13computeGivensEddRdS1_S1_S1_(ptr noundef nonnull align 8 dereferenceable(800) %0, double noundef %87, double noundef %91, ptr noundef nonnull align 8 dereferenceable(8) %86, ptr noundef nonnull align 8 dereferenceable(8) %90, ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6)
  %92 = load double, ptr %6, align 8, !tbaa !7
  %93 = load double, ptr %5, align 8, !tbaa !7
  %94 = fadd double %93, 1.000000e+00
  %95 = fdiv double %92, %94
  %indvars.iv.next86 = add nsw i64 %indvars.iv85, 1
  %96 = icmp slt i64 %indvars.iv.next86, %46
  br i1 %96, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %80, %.lr.ph
  %indvars.iv82 = phi i64 [ %indvars.iv.next83, %.lr.ph ], [ %indvars.iv, %80 ]
  %97 = load double, ptr %5, align 8, !tbaa !7
  %98 = load double, ptr %6, align 8, !tbaa !7
  %99 = load ptr, ptr %42, align 8, !tbaa !16
  %100 = mul nsw i64 %indvars.iv82, %45
  %101 = getelementptr double, ptr %99, i64 %100
  %102 = getelementptr double, ptr %101, i64 %82
  %103 = load double, ptr %102, align 8, !tbaa !7
  %104 = getelementptr double, ptr %99, i64 %100
  %105 = getelementptr double, ptr %104, i64 %indvars.iv85
  %106 = load double, ptr %105, align 8, !tbaa !7
  call void @_ZNK7qpOASES9QProblemB11applyGivensEdddddRdS1_(ptr noundef nonnull align 8 dereferenceable(800) %0, double noundef %97, double noundef %98, double noundef %95, double noundef %103, double noundef %106, ptr noundef nonnull align 8 dereferenceable(8) %102, ptr noundef nonnull align 8 dereferenceable(8) %105)
  %indvars.iv.next83 = add nsw i64 %indvars.iv82, 1
  %107 = icmp slt i64 %indvars.iv.next83, %46
  br i1 %107, label %.lr.ph, label %.loopexit, !llvm.loop !32

.preheader:                                       ; preds = %._crit_edge.us, %.preheader72.thread, %.preheader72
  %108 = phi i32 [ %50, %.preheader72.thread ], [ %48, %.preheader72 ], [ %48, %._crit_edge.us ]
  %109 = icmp sgt i32 %8, 0
  br i1 %109, label %.lr.ph80, label %._crit_edge

.lr.ph80:                                         ; preds = %.preheader72.thread, %.preheader71.lr.ph, %.preheader
  %110 = phi i32 [ %108, %.preheader ], [ %48, %.preheader71.lr.ph ], [ %50, %.preheader72.thread ]
  %111 = getelementptr inbounds i8, ptr %0, i64 168
  %112 = load ptr, ptr %111, align 8, !tbaa !16
  %113 = mul nsw i32 %110, %7
  %114 = sext i32 %113 to i64
  %115 = shl nsw i64 %114, 3
  %scevgep = getelementptr i8, ptr %112, i64 %115
  %116 = zext nneg i32 %8 to i64
  %117 = shl nuw nsw i64 %116, 3
  call void @llvm.memset.p0.i64(ptr align 8 %scevgep, i8 0, i64 %117, i1 false), !tbaa !7
  br label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph80, %.preheader
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  br label %118

118:                                              ; preds = %._crit_edge, %32
  %119 = getelementptr inbounds i8, ptr %0, i64 768
  store i32 %1, ptr %119, align 8, !tbaa !33
  %120 = getelementptr inbounds i8, ptr %0, i64 48
  %121 = call noundef i32 @_ZN7qpOASES6Bounds15moveFreeToFixedEiNS_15SubjectToStatusE(ptr noundef nonnull align 8 dereferenceable(120) %120, i32 noundef %1, i32 noundef %2)
  %.not68 = icmp eq i32 %121, 0
  br i1 %.not68, label %125, label %122

122:                                              ; preds = %118
  %123 = call noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv()
  %124 = call noundef i32 @_ZN7qpOASES15MessageHandling10throwErrorENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28) %123, i32 noundef 78, ptr noundef null, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i64 noundef 3546, i32 noundef 1)
  br label %125

125:                                              ; preds = %118, %26, %122, %29, %20
  %.0 = phi i32 [ %22, %20 ], [ %31, %29 ], [ %124, %122 ], [ 0, %26 ], [ 0, %118 ]
  ret i32 %.0
}

declare noundef i32 @_ZN7qpOASES6Bounds15moveFreeToFixedEiNS_15SubjectToStatusE(ptr noundef nonnull align 8 dereferenceable(120), i32 noundef, i32 noundef) local_unnamed_addr #0

declare noundef i32 @_ZNK7qpOASES9Indexlist8getIndexEi(ptr noundef nonnull align 8 dereferenceable(36), i32 noundef) local_unnamed_addr #0

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK7qpOASES9QProblemB13computeGivensEddRdS1_S1_S1_(ptr noundef nonnull align 8 dereferenceable(800), double noundef, double noundef, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNK7qpOASES9QProblemB11applyGivensEdddddRdS1_(ptr noundef nonnull align 8 dereferenceable(800), double noundef, double noundef, double noundef, double noundef, double noundef, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3 align 2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #5

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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { 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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = !{!8, !8, i64 0}
!8 = !{!"double", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = distinct !{!11, !6, !12, !13}
!12 = !{!"llvm.loop.isvectorized", i32 1}
!13 = !{!"llvm.loop.unroll.runtime.disable"}
!14 = distinct !{!14, !6, !12}
!15 = distinct !{!15, !6}
!16 = !{!17, !19, i64 168}
!17 = !{!"_ZTSN7qpOASES9QProblemBE", !18, i64 8, !19, i64 16, !19, i64 24, !19, i64 32, !19, i64 40, !20, i64 48, !19, i64 168, !18, i64 176, !19, i64 184, !19, i64 192, !8, i64 200, !24, i64 208, !18, i64 212, !18, i64 216, !25, i64 220, !8, i64 224, !22, i64 232, !19, i64 240, !8, i64 248, !8, i64 256, !22, i64 264, !26, i64 272, !29, i64 496, !31, i64 768}
!18 = !{!"_ZTSN7qpOASES11BooleanTypeE", !9, i64 0}
!19 = !{!"any pointer", !9, i64 0}
!20 = !{!"_ZTSN7qpOASES6BoundsE", !21, i64 0, !23, i64 40, !23, i64 80}
!21 = !{!"_ZTSN7qpOASES9SubjectToE", !22, i64 8, !19, i64 16, !19, i64 24, !18, i64 32, !18, i64 36}
!22 = !{!"int", !9, i64 0}
!23 = !{!"_ZTSN7qpOASES9IndexlistE", !19, i64 0, !19, i64 8, !22, i64 16, !22, i64 20, !22, i64 24, !22, i64 28, !22, i64 32}
!24 = !{!"_ZTSN7qpOASES14QProblemStatusE", !9, i64 0}
!25 = !{!"_ZTSN7qpOASES11HessianTypeE", !9, i64 0}
!26 = !{!"_ZTSN7qpOASES7OptionsE", !27, i64 0, !18, i64 4, !18, i64 8, !18, i64 12, !18, i64 16, !18, i64 20, !18, i64 24, !22, i64 28, !22, i64 32, !18, i64 36, !8, i64 40, !8, i64 48, !8, i64 56, !8, i64 64, !8, i64 72, !8, i64 80, !8, i64 88, !8, i64 96, !8, i64 104, !8, i64 112, !8, i64 120, !28, i64 128, !8, i64 136, !22, i64 144, !8, i64 152, !22, i64 160, !8, i64 168, !8, i64 176, !8, i64 184, !8, i64 192, !18, i64 200, !18, i64 204, !22, i64 208, !22, i64 212, !22, i64 216}
!27 = !{!"_ZTSN7qpOASES10PrintLevelE", !9, i64 0}
!28 = !{!"_ZTSN7qpOASES15SubjectToStatusE", !9, i64 0}
!29 = !{!"_ZTSN7qpOASES7FlipperE", !22, i64 0, !22, i64 4, !20, i64 8, !30, i64 128, !19, i64 248, !19, i64 256, !19, i64 264}
!30 = !{!"_ZTSN7qpOASES11ConstraintsE", !21, i64 0, !23, i64 40, !23, i64 80}
!31 = !{!"_ZTSN7qpOASES13TabularOutputE", !22, i64 0, !22, i64 4, !22, i64 8, !22, i64 12, !22, i64 16, !22, i64 20, !22, i64 24, !22, i64 28}
!32 = distinct !{!32, !6}
!33 = !{!17, !22, i64 768}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LICMPass,LoopIdiomRecognizePass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass