; 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::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, ptr }
%"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 }
%"struct.qpOASES::TabularOutput" = type { i32, i32, i32, i32, i32, i32, i32, i32 }
%"class.qpOASES::Constraints" = type { %"class.qpOASES::SubjectTo", %"class.qpOASES::Indexlist", %"class.qpOASES::Indexlist" }

@.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 @_ZNK7qpOASES8QProblem5getNCEv(ptr noundef nonnull align 8 dereferenceable(1064)) #2 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN7qpOASES8QProblem18setupSubjectToTypeEPKdS2_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
  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
  %15 = 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
  %16 = call noundef i32 @_ZNK7qpOASES8QProblem5getNCEv(ptr noundef nonnull align 8 dereferenceable(1064) %15)
  store i32 %16, ptr %13, align 4, !tbaa !9
  %17 = load ptr, ptr %8, align 8, !tbaa !5
  %18 = load ptr, ptr %9, align 8, !tbaa !5
  %19 = call noundef i32 @_ZN7qpOASES9QProblemB18setupSubjectToTypeEPKdS2_(ptr noundef nonnull align 8 dereferenceable(800) %15, ptr noundef %17, ptr noundef %18)
  %20 = icmp ne i32 %19, 0
  br i1 %20, label %21, label %24

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

24:                                               ; preds = %5
  %25 = getelementptr inbounds %"class.qpOASES::QProblem", ptr %15, i32 0, i32 5
  call void @_ZN7qpOASES9SubjectTo10setNoLowerENS_11BooleanTypeE(ptr noundef nonnull align 8 dereferenceable(40) %25, i32 noundef 1)
  %26 = load ptr, ptr %10, align 8, !tbaa !5
  %27 = icmp ne ptr %26, null
  br i1 %27, label %28, label %47

28:                                               ; preds = %24
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %29

29:                                               ; preds = %43, %28
  %30 = load i32, ptr %12, align 4, !tbaa !9
  %31 = load i32, ptr %13, align 4, !tbaa !9
  %32 = icmp slt i32 %30, %31
  br i1 %32, label %33, label %46

33:                                               ; preds = %29
  %34 = load ptr, ptr %10, align 8, !tbaa !5
  %35 = load i32, ptr %12, align 4, !tbaa !9
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds double, ptr %34, i64 %36
  %38 = load double, ptr %37, align 8, !tbaa !11
  %39 = fcmp ogt double %38, -1.000000e+20
  br i1 %39, label %40, label %42

40:                                               ; preds = %33
  %41 = getelementptr inbounds %"class.qpOASES::QProblem", ptr %15, i32 0, i32 5
  call void @_ZN7qpOASES9SubjectTo10setNoLowerENS_11BooleanTypeE(ptr noundef nonnull align 8 dereferenceable(40) %41, i32 noundef 0)
  br label %46

42:                                               ; preds = %33
  br label %43

43:                                               ; preds = %42
  %44 = load i32, ptr %12, align 4, !tbaa !9
  %45 = add nsw i32 %44, 1
  store i32 %45, ptr %12, align 4, !tbaa !9
  br label %29, !llvm.loop !13

46:                                               ; preds = %40, %29
  br label %47

47:                                               ; preds = %46, %24
  %48 = getelementptr inbounds %"class.qpOASES::QProblem", ptr %15, i32 0, i32 5
  call void @_ZN7qpOASES9SubjectTo10setNoUpperENS_11BooleanTypeE(ptr noundef nonnull align 8 dereferenceable(40) %48, i32 noundef 1)
  %49 = load ptr, ptr %11, align 8, !tbaa !5
  %50 = icmp ne ptr %49, null
  br i1 %50, label %51, label %70

51:                                               ; preds = %47
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %52

52:                                               ; preds = %66, %51
  %53 = load i32, ptr %12, align 4, !tbaa !9
  %54 = load i32, ptr %13, align 4, !tbaa !9
  %55 = icmp slt i32 %53, %54
  br i1 %55, label %56, label %69

56:                                               ; preds = %52
  %57 = load ptr, ptr %11, align 8, !tbaa !5
  %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 = fcmp olt double %61, 1.000000e+20
  br i1 %62, label %63, label %65

63:                                               ; preds = %56
  %64 = getelementptr inbounds %"class.qpOASES::QProblem", ptr %15, i32 0, i32 5
  call void @_ZN7qpOASES9SubjectTo10setNoUpperENS_11BooleanTypeE(ptr noundef nonnull align 8 dereferenceable(40) %64, i32 noundef 0)
  br label %69

65:                                               ; preds = %56
  br label %66

66:                                               ; preds = %65
  %67 = load i32, ptr %12, align 4, !tbaa !9
  %68 = add nsw i32 %67, 1
  store i32 %68, ptr %12, align 4, !tbaa !9
  br label %52, !llvm.loop !15

69:                                               ; preds = %63, %52
  br label %70

70:                                               ; preds = %69, %47
  %71 = load ptr, ptr %10, align 8, !tbaa !5
  %72 = icmp ne ptr %71, null
  br i1 %72, label %73, label %171

73:                                               ; preds = %70
  %74 = load ptr, ptr %11, align 8, !tbaa !5
  %75 = icmp ne ptr %74, null
  br i1 %75, label %76, label %171

76:                                               ; preds = %73
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %77

77:                                               ; preds = %167, %76
  %78 = load i32, ptr %12, align 4, !tbaa !9
  %79 = load i32, ptr %13, align 4, !tbaa !9
  %80 = icmp slt i32 %78, %79
  br i1 %80, label %81, label %170

81:                                               ; preds = %77
  %82 = getelementptr inbounds %"class.qpOASES::QProblem", ptr %15, i32 0, i32 5
  %83 = load i32, ptr %12, align 4, !tbaa !9
  %84 = call noundef i32 @_ZNK7qpOASES9SubjectTo7getTypeEi(ptr noundef nonnull align 8 dereferenceable(40) %82, i32 noundef %83)
  %85 = icmp eq i32 %84, 3
  br i1 %85, label %86, label %87

86:                                               ; preds = %81
  br label %167

87:                                               ; preds = %81
  %88 = load ptr, ptr %10, align 8, !tbaa !5
  %89 = load i32, ptr %12, align 4, !tbaa !9
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds double, ptr %88, i64 %90
  %92 = load double, ptr %91, align 8, !tbaa !11
  %93 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %15, i32 0, i32 23
  %94 = getelementptr inbounds %"class.qpOASES::Options", ptr %93, i32 0, i32 11
  %95 = load double, ptr %94, align 8, !tbaa !16
  %96 = fadd double -1.000000e+20, %95
  %97 = fcmp olt double %92, %96
  br i1 %97, label %98, label %118

98:                                               ; preds = %87
  %99 = load ptr, ptr %11, align 8, !tbaa !5
  %100 = load i32, ptr %12, align 4, !tbaa !9
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds double, ptr %99, i64 %101
  %103 = load double, ptr %102, align 8, !tbaa !11
  %104 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %15, i32 0, i32 23
  %105 = getelementptr inbounds %"class.qpOASES::Options", ptr %104, i32 0, i32 11
  %106 = load double, ptr %105, align 8, !tbaa !16
  %107 = fsub double 1.000000e+20, %106
  %108 = fcmp ogt double %103, %107
  br i1 %108, label %109, label %118

109:                                              ; preds = %98
  %110 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %15, i32 0, i32 23
  %111 = getelementptr inbounds %"class.qpOASES::Options", ptr %110, i32 0, i32 2
  %112 = load i32, ptr %111, align 8, !tbaa !30
  %113 = icmp eq i32 %112, 0
  br i1 %113, label %114, label %118

114:                                              ; preds = %109
  %115 = getelementptr inbounds %"class.qpOASES::QProblem", ptr %15, i32 0, i32 5
  %116 = load i32, ptr %12, align 4, !tbaa !9
  %117 = call noundef i32 @_ZN7qpOASES9SubjectTo7setTypeEiNS_13SubjectToTypeE(ptr noundef nonnull align 8 dereferenceable(40) %115, i32 noundef %116, i32 noundef 0)
  br label %166

118:                                              ; preds = %109, %98, %87
  %119 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %15, i32 0, i32 23
  %120 = getelementptr inbounds %"class.qpOASES::Options", ptr %119, i32 0, i32 9
  %121 = load i32, ptr %120, align 4, !tbaa !31
  %122 = icmp ne i32 %121, 0
  br i1 %122, label %123, label %161

123:                                              ; preds = %118
  %124 = getelementptr inbounds %"class.qpOASES::QProblem", ptr %15, i32 0, i32 3
  %125 = load ptr, ptr %124, align 8, !tbaa !32
  %126 = load i32, ptr %12, align 4, !tbaa !9
  %127 = sext i32 %126 to i64
  %128 = getelementptr inbounds double, ptr %125, i64 %127
  %129 = load double, ptr %128, align 8, !tbaa !11
  %130 = getelementptr inbounds %"class.qpOASES::QProblem", ptr %15, i32 0, i32 4
  %131 = load ptr, ptr %130, align 8, !tbaa !34
  %132 = load i32, ptr %12, align 4, !tbaa !9
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds double, ptr %131, i64 %133
  %135 = load double, ptr %134, align 8, !tbaa !11
  %136 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %15, i32 0, i32 23
  %137 = getelementptr inbounds %"class.qpOASES::Options", ptr %136, i32 0, i32 11
  %138 = load double, ptr %137, align 8, !tbaa !16
  %139 = fsub double %135, %138
  %140 = fcmp ogt double %129, %139
  br i1 %140, label %141, label %161

141:                                              ; preds = %123
  %142 = load ptr, ptr %10, align 8, !tbaa !5
  %143 = load i32, ptr %12, align 4, !tbaa !9
  %144 = sext i32 %143 to i64
  %145 = getelementptr inbounds double, ptr %142, i64 %144
  %146 = load double, ptr %145, align 8, !tbaa !11
  %147 = load ptr, ptr %11, align 8, !tbaa !5
  %148 = load i32, ptr %12, align 4, !tbaa !9
  %149 = sext i32 %148 to i64
  %150 = getelementptr inbounds double, ptr %147, i64 %149
  %151 = load double, ptr %150, align 8, !tbaa !11
  %152 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %15, i32 0, i32 23
  %153 = getelementptr inbounds %"class.qpOASES::Options", ptr %152, i32 0, i32 11
  %154 = load double, ptr %153, align 8, !tbaa !16
  %155 = fsub double %151, %154
  %156 = fcmp ogt double %146, %155
  br i1 %156, label %157, label %161

157:                                              ; preds = %141
  %158 = getelementptr inbounds %"class.qpOASES::QProblem", ptr %15, i32 0, i32 5
  %159 = load i32, ptr %12, align 4, !tbaa !9
  %160 = call noundef i32 @_ZN7qpOASES9SubjectTo7setTypeEiNS_13SubjectToTypeE(ptr noundef nonnull align 8 dereferenceable(40) %158, i32 noundef %159, i32 noundef 2)
  br label %165

161:                                              ; preds = %141, %123, %118
  %162 = getelementptr inbounds %"class.qpOASES::QProblem", ptr %15, i32 0, i32 5
  %163 = load i32, ptr %12, align 4, !tbaa !9
  %164 = call noundef i32 @_ZN7qpOASES9SubjectTo7setTypeEiNS_13SubjectToTypeE(ptr noundef nonnull align 8 dereferenceable(40) %162, i32 noundef %163, i32 noundef 1)
  br label %165

165:                                              ; preds = %161, %157
  br label %166

166:                                              ; preds = %165, %114
  br label %167

167:                                              ; preds = %166, %86
  %168 = load i32, ptr %12, align 4, !tbaa !9
  %169 = add nsw i32 %168, 1
  store i32 %169, ptr %12, align 4, !tbaa !9
  br label %77, !llvm.loop !35

170:                                              ; preds = %77
  br label %216

171:                                              ; preds = %73, %70
  %172 = load ptr, ptr %10, align 8, !tbaa !5
  %173 = icmp eq ptr %172, null
  br i1 %173, label %174, label %196

174:                                              ; preds = %171
  %175 = load ptr, ptr %11, align 8, !tbaa !5
  %176 = icmp eq ptr %175, null
  br i1 %176, label %177, label %196

177:                                              ; preds = %174
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %178

178:                                              ; preds = %192, %177
  %179 = load i32, ptr %12, align 4, !tbaa !9
  %180 = load i32, ptr %13, align 4, !tbaa !9
  %181 = icmp slt i32 %179, %180
  br i1 %181, label %182, label %195

182:                                              ; preds = %178
  %183 = getelementptr inbounds %"class.qpOASES::QProblem", ptr %15, i32 0, i32 5
  %184 = load i32, ptr %12, align 4, !tbaa !9
  %185 = call noundef i32 @_ZNK7qpOASES9SubjectTo7getTypeEi(ptr noundef nonnull align 8 dereferenceable(40) %183, i32 noundef %184)
  %186 = icmp ne i32 %185, 3
  br i1 %186, label %187, label %191

187:                                              ; preds = %182
  %188 = getelementptr inbounds %"class.qpOASES::QProblem", ptr %15, i32 0, i32 5
  %189 = load i32, ptr %12, align 4, !tbaa !9
  %190 = call noundef i32 @_ZN7qpOASES9SubjectTo7setTypeEiNS_13SubjectToTypeE(ptr noundef nonnull align 8 dereferenceable(40) %188, i32 noundef %189, i32 noundef 0)
  br label %191

191:                                              ; preds = %187, %182
  br label %192

192:                                              ; preds = %191
  %193 = load i32, ptr %12, align 4, !tbaa !9
  %194 = add nsw i32 %193, 1
  store i32 %194, ptr %12, align 4, !tbaa !9
  br label %178, !llvm.loop !36

195:                                              ; preds = %178
  br label %215

196:                                              ; preds = %174, %171
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %197

197:                                              ; preds = %211, %196
  %198 = load i32, ptr %12, align 4, !tbaa !9
  %199 = load i32, ptr %13, align 4, !tbaa !9
  %200 = icmp slt i32 %198, %199
  br i1 %200, label %201, label %214

201:                                              ; preds = %197
  %202 = getelementptr inbounds %"class.qpOASES::QProblem", ptr %15, i32 0, i32 5
  %203 = load i32, ptr %12, align 4, !tbaa !9
  %204 = call noundef i32 @_ZNK7qpOASES9SubjectTo7getTypeEi(ptr noundef nonnull align 8 dereferenceable(40) %202, i32 noundef %203)
  %205 = icmp ne i32 %204, 3
  br i1 %205, label %206, label %210

206:                                              ; preds = %201
  %207 = getelementptr inbounds %"class.qpOASES::QProblem", ptr %15, i32 0, i32 5
  %208 = load i32, ptr %12, align 4, !tbaa !9
  %209 = call noundef i32 @_ZN7qpOASES9SubjectTo7setTypeEiNS_13SubjectToTypeE(ptr noundef nonnull align 8 dereferenceable(40) %207, i32 noundef %208, i32 noundef 1)
  br label %210

210:                                              ; preds = %206, %201
  br label %211

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

214:                                              ; preds = %197
  br label %215

215:                                              ; preds = %214, %195
  br label %216

216:                                              ; preds = %215, %170
  store i32 0, ptr %6, align 4
  store i32 1, ptr %14, align 4
  br label %217

217:                                              ; preds = %216, %21
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  %218 = load i32, ptr %6, align 4
  ret i32 %218
}

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZN7qpOASES9SubjectTo7setTypeEiNS_13SubjectToTypeE(ptr noundef nonnull align 8 dereferenceable(40), i32 noundef, i32 noundef) #2 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 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = !{!17, !12, i64 320}
!17 = !{!"_ZTSN7qpOASES9QProblemBE", !18, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !19, i64 48, !6, i64 168, !18, i64 176, !6, i64 184, !6, i64 192, !12, i64 200, !22, i64 208, !18, i64 212, !18, i64 216, !23, i64 220, !12, i64 224, !10, i64 232, !6, i64 240, !12, i64 248, !12, i64 256, !10, i64 264, !24, i64 272, !27, i64 496, !29, i64 768}
!18 = !{!"_ZTSN7qpOASES11BooleanTypeE", !7, i64 0}
!19 = !{!"_ZTSN7qpOASES6BoundsE", !20, i64 0, !21, i64 40, !21, i64 80}
!20 = !{!"_ZTSN7qpOASES9SubjectToE", !10, i64 8, !6, i64 16, !6, i64 24, !18, i64 32, !18, i64 36}
!21 = !{!"_ZTSN7qpOASES9IndexlistE", !6, i64 0, !6, i64 8, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32}
!22 = !{!"_ZTSN7qpOASES14QProblemStatusE", !7, i64 0}
!23 = !{!"_ZTSN7qpOASES11HessianTypeE", !7, i64 0}
!24 = !{!"_ZTSN7qpOASES7OptionsE", !25, i64 0, !18, i64 4, !18, i64 8, !18, i64 12, !18, i64 16, !18, i64 20, !18, i64 24, !10, i64 28, !10, i64 32, !18, 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, !26, 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, !18, i64 200, !18, i64 204, !10, i64 208, !10, i64 212, !10, i64 216}
!25 = !{!"_ZTSN7qpOASES10PrintLevelE", !7, i64 0}
!26 = !{!"_ZTSN7qpOASES15SubjectToStatusE", !7, i64 0}
!27 = !{!"_ZTSN7qpOASES7FlipperE", !10, i64 0, !10, i64 4, !19, i64 8, !28, i64 128, !6, i64 248, !6, i64 256, !6, i64 264}
!28 = !{!"_ZTSN7qpOASES11ConstraintsE", !20, i64 0, !21, i64 40, !21, i64 80}
!29 = !{!"_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}
!30 = !{!17, !18, i64 280}
!31 = !{!17, !18, i64 308}
!32 = !{!33, !6, i64 816}
!33 = !{!"_ZTSN7qpOASES8QProblemE", !17, i64 0, !18, i64 800, !6, i64 808, !6, i64 816, !6, i64 824, !28, i64 832, !6, i64 952, !6, i64 960, !10, 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, !6, i64 1056}
!34 = !{!33, !6, i64 824}
!35 = distinct !{!35, !14}
!36 = distinct !{!36, !14}
!37 = distinct !{!37, !14}


; 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 @_ZNK7qpOASES8QProblem5getNCEv(ptr noundef nonnull align 8 dereferenceable(1064)) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN7qpOASES8QProblem18setupSubjectToTypeEPKdS2_S2_S2_(ptr noundef nonnull align 8 dereferenceable(1064) %0, ptr noundef %1, ptr noundef %2, ptr noundef readonly %3, ptr noundef readonly %4) unnamed_addr #3 align 2 {
  %6 = tail call noundef i32 @_ZNK7qpOASES8QProblem5getNCEv(ptr noundef nonnull align 8 dereferenceable(1064) %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 %11, label %8

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

11:                                               ; preds = %5
  %12 = getelementptr inbounds i8, ptr %0, i64 832
  tail call void @_ZN7qpOASES9SubjectTo10setNoLowerENS_11BooleanTypeE(ptr noundef nonnull align 8 dereferenceable(40) %12, i32 noundef 1)
  %13 = icmp ne ptr %3, null
  %14 = icmp sgt i32 %6, 0
  %or.cond78 = and i1 %13, %14
  br i1 %or.cond78, label %.lr.ph.preheader, label %.loopexit68

.lr.ph.preheader:                                 ; preds = %11
  %wide.trip.count = zext nneg i32 %6 to i64
  br label %.lr.ph

15:                                               ; preds = %.lr.ph
  %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 %.loopexit68, label %.lr.ph, !llvm.loop !5

.lr.ph:                                           ; preds = %.lr.ph.preheader, %15
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %15 ]
  %16 = getelementptr inbounds double, ptr %3, i64 %indvars.iv
  %17 = load double, ptr %16, align 8, !tbaa !7
  %18 = fcmp ogt double %17, -1.000000e+20
  br i1 %18, label %19, label %15

19:                                               ; preds = %.lr.ph
  tail call void @_ZN7qpOASES9SubjectTo10setNoLowerENS_11BooleanTypeE(ptr noundef nonnull align 8 dereferenceable(40) %12, i32 noundef 0)
  br label %.loopexit68

.loopexit68:                                      ; preds = %15, %19, %11
  tail call void @_ZN7qpOASES9SubjectTo10setNoUpperENS_11BooleanTypeE(ptr noundef nonnull align 8 dereferenceable(40) %12, i32 noundef 1)
  %.not79 = icmp eq ptr %4, null
  br i1 %.not79, label %.thread, label %.preheader65

.preheader65:                                     ; preds = %.loopexit68
  br i1 %14, label %.lr.ph71.preheader, label %.loopexit

.lr.ph71.preheader:                               ; preds = %.preheader65
  %wide.trip.count86 = zext nneg i32 %6 to i64
  br label %.lr.ph71

20:                                               ; preds = %.lr.ph71
  %indvars.iv.next84 = add nuw nsw i64 %indvars.iv83, 1
  %exitcond87.not = icmp eq i64 %indvars.iv.next84, %wide.trip.count86
  br i1 %exitcond87.not, label %.loopexit66, label %.lr.ph71, !llvm.loop !11

.lr.ph71:                                         ; preds = %.lr.ph71.preheader, %20
  %indvars.iv83 = phi i64 [ 0, %.lr.ph71.preheader ], [ %indvars.iv.next84, %20 ]
  %21 = getelementptr inbounds double, ptr %4, i64 %indvars.iv83
  %22 = load double, ptr %21, align 8, !tbaa !7
  %23 = fcmp olt double %22, 1.000000e+20
  br i1 %23, label %24, label %20

24:                                               ; preds = %.lr.ph71
  tail call void @_ZN7qpOASES9SubjectTo10setNoUpperENS_11BooleanTypeE(ptr noundef nonnull align 8 dereferenceable(40) %12, i32 noundef 0)
  br label %.loopexit66

.loopexit66:                                      ; preds = %20, %24
  br i1 %13, label %.preheader, label %.preheader63

.preheader:                                       ; preds = %.loopexit66
  br i1 %14, label %.lr.ph77, label %.loopexit

.lr.ph77:                                         ; preds = %.preheader
  %25 = getelementptr inbounds i8, ptr %0, i64 320
  %26 = getelementptr inbounds i8, ptr %0, i64 280
  %27 = getelementptr inbounds i8, ptr %0, i64 308
  %28 = getelementptr inbounds i8, ptr %0, i64 816
  %29 = getelementptr inbounds i8, ptr %0, i64 824
  %wide.trip.count91 = zext nneg i32 %6 to i64
  br label %30

30:                                               ; preds = %.lr.ph77, %65
  %indvars.iv88 = phi i64 [ 0, %.lr.ph77 ], [ %indvars.iv.next89, %65 ]
  %31 = trunc nuw nsw i64 %indvars.iv88 to i32
  %32 = tail call noundef i32 @_ZNK7qpOASES9SubjectTo7getTypeEi(ptr noundef nonnull align 8 dereferenceable(40) %12, i32 noundef %31)
  %33 = icmp eq i32 %32, 3
  br i1 %33, label %65, label %34

34:                                               ; preds = %30
  %35 = getelementptr inbounds double, ptr %3, i64 %indvars.iv88
  %36 = load double, ptr %35, align 8, !tbaa !7
  %37 = load double, ptr %25, align 8, !tbaa !12
  %38 = fadd double %37, -1.000000e+20
  %39 = fcmp olt double %36, %38
  br i1 %39, label %40, label %47

40:                                               ; preds = %34
  %41 = getelementptr inbounds double, ptr %4, i64 %indvars.iv88
  %42 = load double, ptr %41, align 8, !tbaa !7
  %43 = fsub double 1.000000e+20, %37
  %44 = fcmp ogt double %42, %43
  %45 = load i32, ptr %26, align 8
  %46 = icmp eq i32 %45, 0
  %or.cond59 = select i1 %44, i1 %46, i1 false
  br i1 %or.cond59, label %.sink.split, label %47

47:                                               ; preds = %40, %34
  %48 = load i32, ptr %27, align 4, !tbaa !28
  %.not56 = icmp eq i32 %48, 0
  br i1 %.not56, label %63, label %49

49:                                               ; preds = %47
  %50 = load ptr, ptr %28, align 8, !tbaa !29
  %51 = getelementptr inbounds double, ptr %50, i64 %indvars.iv88
  %52 = load double, ptr %51, align 8, !tbaa !7
  %53 = load ptr, ptr %29, align 8, !tbaa !31
  %54 = getelementptr inbounds double, ptr %53, i64 %indvars.iv88
  %55 = load double, ptr %54, align 8, !tbaa !7
  %56 = fsub double %55, %37
  %57 = fcmp ogt double %52, %56
  br i1 %57, label %58, label %63

58:                                               ; preds = %49
  %59 = getelementptr inbounds double, ptr %4, i64 %indvars.iv88
  %60 = load double, ptr %59, align 8, !tbaa !7
  %61 = fsub double %60, %37
  %62 = fcmp ogt double %36, %61
  br i1 %62, label %.sink.split, label %63

63:                                               ; preds = %58, %49, %47
  br label %.sink.split

.sink.split:                                      ; preds = %58, %40, %63
  %.sink = phi i32 [ 1, %63 ], [ 0, %40 ], [ 2, %58 ]
  %64 = tail call noundef i32 @_ZN7qpOASES9SubjectTo7setTypeEiNS_13SubjectToTypeE(ptr noundef nonnull align 8 dereferenceable(40) %12, i32 noundef %31, i32 noundef %.sink)
  br label %65

65:                                               ; preds = %.sink.split, %30
  %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 %30, !llvm.loop !32

.thread:                                          ; preds = %.loopexit68
  %66 = icmp eq ptr %3, null
  %or.cond3 = and i1 %66, %.not79
  br i1 %or.cond3, label %.preheader61, label %.preheader63

.preheader63:                                     ; preds = %.loopexit66, %.thread
  br i1 %14, label %.lr.ph73, label %.loopexit

.preheader61:                                     ; preds = %.thread
  br i1 %14, label %.lr.ph75, label %.loopexit

.lr.ph75:                                         ; preds = %.preheader61, %70
  %.374 = phi i32 [ %71, %70 ], [ 0, %.preheader61 ]
  %67 = tail call noundef i32 @_ZNK7qpOASES9SubjectTo7getTypeEi(ptr noundef nonnull align 8 dereferenceable(40) %12, i32 noundef %.374)
  %.not55 = icmp eq i32 %67, 3
  br i1 %.not55, label %70, label %68

68:                                               ; preds = %.lr.ph75
  %69 = tail call noundef i32 @_ZN7qpOASES9SubjectTo7setTypeEiNS_13SubjectToTypeE(ptr noundef nonnull align 8 dereferenceable(40) %12, i32 noundef %.374, i32 noundef 0)
  br label %70

70:                                               ; preds = %.lr.ph75, %68
  %71 = add nuw nsw i32 %.374, 1
  %exitcond94.not = icmp eq i32 %71, %6
  br i1 %exitcond94.not, label %.loopexit, label %.lr.ph75, !llvm.loop !33

.lr.ph73:                                         ; preds = %.preheader63, %75
  %.472 = phi i32 [ %76, %75 ], [ 0, %.preheader63 ]
  %72 = tail call noundef i32 @_ZNK7qpOASES9SubjectTo7getTypeEi(ptr noundef nonnull align 8 dereferenceable(40) %12, i32 noundef %.472)
  %.not54 = icmp eq i32 %72, 3
  br i1 %.not54, label %75, label %73

73:                                               ; preds = %.lr.ph73
  %74 = tail call noundef i32 @_ZN7qpOASES9SubjectTo7setTypeEiNS_13SubjectToTypeE(ptr noundef nonnull align 8 dereferenceable(40) %12, i32 noundef %.472, i32 noundef 1)
  br label %75

75:                                               ; preds = %.lr.ph73, %73
  %76 = add nuw nsw i32 %.472, 1
  %exitcond93.not = icmp eq i32 %76, %6
  br i1 %exitcond93.not, label %.loopexit, label %.lr.ph73, !llvm.loop !34

.loopexit:                                        ; preds = %65, %75, %70, %.preheader65, %.preheader63, %.preheader61, %.preheader, %8
  %.0 = phi i32 [ %10, %8 ], [ 0, %.preheader ], [ 0, %.preheader61 ], [ 0, %.preheader63 ], [ 0, %.preheader65 ], [ 0, %70 ], [ 0, %75 ], [ 0, %65 ]
  ret i32 %.0
}

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZN7qpOASES9SubjectTo7setTypeEiNS_13SubjectToTypeE(ptr noundef nonnull align 8 dereferenceable(40), i32 noundef, i32 noundef) local_unnamed_addr #1 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 = 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, !8, i64 320}
!13 = !{!"_ZTSN7qpOASES9QProblemBE", !14, i64 8, !15, i64 16, !15, i64 24, !15, i64 32, !15, i64 40, !16, i64 48, !15, i64 168, !14, i64 176, !15, i64 184, !15, i64 192, !8, i64 200, !20, i64 208, !14, i64 212, !14, i64 216, !21, i64 220, !8, i64 224, !18, i64 232, !15, i64 240, !8, i64 248, !8, i64 256, !18, i64 264, !22, i64 272, !25, i64 496, !27, i64 768}
!14 = !{!"_ZTSN7qpOASES11BooleanTypeE", !9, i64 0}
!15 = !{!"any pointer", !9, i64 0}
!16 = !{!"_ZTSN7qpOASES6BoundsE", !17, i64 0, !19, i64 40, !19, i64 80}
!17 = !{!"_ZTSN7qpOASES9SubjectToE", !18, i64 8, !15, i64 16, !15, i64 24, !14, i64 32, !14, i64 36}
!18 = !{!"int", !9, i64 0}
!19 = !{!"_ZTSN7qpOASES9IndexlistE", !15, i64 0, !15, i64 8, !18, i64 16, !18, i64 20, !18, i64 24, !18, i64 28, !18, i64 32}
!20 = !{!"_ZTSN7qpOASES14QProblemStatusE", !9, i64 0}
!21 = !{!"_ZTSN7qpOASES11HessianTypeE", !9, i64 0}
!22 = !{!"_ZTSN7qpOASES7OptionsE", !23, i64 0, !14, i64 4, !14, i64 8, !14, i64 12, !14, i64 16, !14, i64 20, !14, i64 24, !18, i64 28, !18, i64 32, !14, 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, !24, i64 128, !8, i64 136, !18, i64 144, !8, i64 152, !18, i64 160, !8, i64 168, !8, i64 176, !8, i64 184, !8, i64 192, !14, i64 200, !14, i64 204, !18, i64 208, !18, i64 212, !18, i64 216}
!23 = !{!"_ZTSN7qpOASES10PrintLevelE", !9, i64 0}
!24 = !{!"_ZTSN7qpOASES15SubjectToStatusE", !9, i64 0}
!25 = !{!"_ZTSN7qpOASES7FlipperE", !18, i64 0, !18, i64 4, !16, i64 8, !26, i64 128, !15, i64 248, !15, i64 256, !15, i64 264}
!26 = !{!"_ZTSN7qpOASES11ConstraintsE", !17, i64 0, !19, i64 40, !19, i64 80}
!27 = !{!"_ZTSN7qpOASES13TabularOutputE", !18, i64 0, !18, i64 4, !18, i64 8, !18, i64 12, !18, i64 16, !18, i64 20, !18, i64 24, !18, i64 28}
!28 = !{!13, !14, i64 308}
!29 = !{!30, !15, i64 816}
!30 = !{!"_ZTSN7qpOASES8QProblemE", !13, i64 0, !14, i64 800, !15, i64 808, !15, i64 816, !15, i64 824, !26, i64 832, !15, i64 952, !15, i64 960, !18, i64 968, !15, i64 976, !15, i64 984, !15, i64 992, !15, i64 1000, !15, i64 1008, !15, i64 1016, !15, i64 1024, !15, i64 1032, !15, i64 1040, !15, i64 1048, !15, i64 1056}
!31 = !{!30, !15, i64 824}
!32 = distinct !{!32, !6}
!33 = distinct !{!33, !6}
!34 = distinct !{!34, !6}


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