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

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

; 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)) #1 align 2

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

25:                                               ; preds = %7
  store i32 0, ptr %15, align 4, !tbaa !11
  br label %26

26:                                               ; preds = %97, %25
  %27 = load i32, ptr %15, align 4, !tbaa !11
  %28 = load i32, ptr %18, align 4, !tbaa !11
  %29 = icmp slt i32 %27, %28
  br i1 %29, label %30, label %100

30:                                               ; preds = %26
  %31 = load i32, ptr %15, align 4, !tbaa !11
  %32 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %19, i32 0, i32 21
  %33 = load i32, ptr %32, align 8, !tbaa !27
  %34 = add nsw i32 %31, %33
  %35 = load i32, ptr %10, align 4, !tbaa !11
  %36 = srem i32 %34, %35
  %37 = sitofp i32 %36 to double
  %38 = load i32, ptr %10, align 4, !tbaa !11
  %39 = sub nsw i32 %38, 1
  %40 = sitofp i32 %39 to double
  %41 = fdiv double %37, %40
  store double %41, ptr %17, align 8, !tbaa !9
  %42 = load double, ptr %9, align 8, !tbaa !9
  %43 = load double, ptr %17, align 8, !tbaa !9
  %44 = fsub double 1.000000e+00, %43
  %45 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %19, i32 0, i32 19
  %46 = load double, ptr %45, align 8, !tbaa !28
  %47 = call double @llvm.fmuladd.f64(double %44, double %46, double 1.000000e+00)
  %48 = load double, ptr %17, align 8, !tbaa !9
  %49 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %19, i32 0, i32 20
  %50 = load double, ptr %49, align 8, !tbaa !29
  %51 = call double @llvm.fmuladd.f64(double %48, double %50, double %47)
  %52 = fmul double %42, %51
  store double %52, ptr %16, align 8, !tbaa !9
  %53 = load ptr, ptr %11, align 8, !tbaa !5
  %54 = icmp eq ptr %53, null
  br i1 %54, label %55, label %62

55:                                               ; preds = %30
  %56 = load double, ptr %16, align 8, !tbaa !9
  %57 = fneg double %56
  %58 = load ptr, ptr %12, align 8, !tbaa !5
  %59 = load i32, ptr %15, align 4, !tbaa !11
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds double, ptr %58, i64 %60
  store double %57, ptr %61, align 8, !tbaa !9
  br label %75

62:                                               ; preds = %30
  %63 = load double, ptr %16, align 8, !tbaa !9
  %64 = fneg double %63
  %65 = load ptr, ptr %11, align 8, !tbaa !5
  %66 = load i32, ptr %15, align 4, !tbaa !11
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds double, ptr %65, i64 %67
  %69 = load double, ptr %68, align 8, !tbaa !9
  %70 = call noundef double @_ZN7qpOASES6getMaxEdd(double noundef %64, double noundef %69)
  %71 = load ptr, ptr %12, align 8, !tbaa !5
  %72 = load i32, ptr %15, align 4, !tbaa !11
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds double, ptr %71, i64 %73
  store double %70, ptr %74, align 8, !tbaa !9
  br label %75

75:                                               ; preds = %62, %55
  %76 = load ptr, ptr %13, align 8, !tbaa !5
  %77 = icmp eq ptr %76, null
  br i1 %77, label %78, label %84

78:                                               ; preds = %75
  %79 = load double, ptr %16, align 8, !tbaa !9
  %80 = load ptr, ptr %14, align 8, !tbaa !5
  %81 = load i32, ptr %15, align 4, !tbaa !11
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds double, ptr %80, i64 %82
  store double %79, ptr %83, align 8, !tbaa !9
  br label %96

84:                                               ; preds = %75
  %85 = load double, ptr %16, align 8, !tbaa !9
  %86 = load ptr, ptr %13, align 8, !tbaa !5
  %87 = load i32, ptr %15, align 4, !tbaa !11
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds double, ptr %86, i64 %88
  %90 = load double, ptr %89, align 8, !tbaa !9
  %91 = call noundef double @_ZN7qpOASES6getMinEdd(double noundef %85, double noundef %90)
  %92 = load ptr, ptr %14, align 8, !tbaa !5
  %93 = load i32, ptr %15, align 4, !tbaa !11
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds double, ptr %92, i64 %94
  store double %91, ptr %95, align 8, !tbaa !9
  br label %96

96:                                               ; preds = %84, %78
  br label %97

97:                                               ; preds = %96
  %98 = load i32, ptr %15, align 4, !tbaa !11
  %99 = add nsw i32 %98, 1
  store i32 %99, ptr %15, align 4, !tbaa !11
  br label %26, !llvm.loop !30

100:                                              ; preds = %26
  br label %155

101:                                              ; preds = %7
  store i32 0, ptr %15, align 4, !tbaa !11
  br label %102

102:                                              ; preds = %151, %101
  %103 = load i32, ptr %15, align 4, !tbaa !11
  %104 = load i32, ptr %18, align 4, !tbaa !11
  %105 = icmp slt i32 %103, %104
  br i1 %105, label %106, label %154

106:                                              ; preds = %102
  %107 = load ptr, ptr %11, align 8, !tbaa !5
  %108 = icmp eq ptr %107, null
  br i1 %108, label %109, label %116

109:                                              ; preds = %106
  %110 = load double, ptr %9, align 8, !tbaa !9
  %111 = fneg double %110
  %112 = load ptr, ptr %12, align 8, !tbaa !5
  %113 = load i32, ptr %15, align 4, !tbaa !11
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds double, ptr %112, i64 %114
  store double %111, ptr %115, align 8, !tbaa !9
  br label %129

116:                                              ; preds = %106
  %117 = load double, ptr %9, align 8, !tbaa !9
  %118 = fneg double %117
  %119 = load ptr, ptr %11, align 8, !tbaa !5
  %120 = load i32, ptr %15, align 4, !tbaa !11
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds double, ptr %119, i64 %121
  %123 = load double, ptr %122, align 8, !tbaa !9
  %124 = call noundef double @_ZN7qpOASES6getMaxEdd(double noundef %118, double noundef %123)
  %125 = load ptr, ptr %12, align 8, !tbaa !5
  %126 = load i32, ptr %15, align 4, !tbaa !11
  %127 = sext i32 %126 to i64
  %128 = getelementptr inbounds double, ptr %125, i64 %127
  store double %124, ptr %128, align 8, !tbaa !9
  br label %129

129:                                              ; preds = %116, %109
  %130 = load ptr, ptr %13, align 8, !tbaa !5
  %131 = icmp eq ptr %130, null
  br i1 %131, label %132, label %138

132:                                              ; preds = %129
  %133 = load double, ptr %9, align 8, !tbaa !9
  %134 = load ptr, ptr %14, align 8, !tbaa !5
  %135 = load i32, ptr %15, align 4, !tbaa !11
  %136 = sext i32 %135 to i64
  %137 = getelementptr inbounds double, ptr %134, i64 %136
  store double %133, ptr %137, align 8, !tbaa !9
  br label %150

138:                                              ; preds = %129
  %139 = load double, ptr %9, align 8, !tbaa !9
  %140 = load ptr, ptr %13, align 8, !tbaa !5
  %141 = load i32, ptr %15, align 4, !tbaa !11
  %142 = sext i32 %141 to i64
  %143 = getelementptr inbounds double, ptr %140, i64 %142
  %144 = load double, ptr %143, align 8, !tbaa !9
  %145 = call noundef double @_ZN7qpOASES6getMinEdd(double noundef %139, double noundef %144)
  %146 = load ptr, ptr %14, align 8, !tbaa !5
  %147 = load i32, ptr %15, align 4, !tbaa !11
  %148 = sext i32 %147 to i64
  %149 = getelementptr inbounds double, ptr %146, i64 %148
  store double %145, ptr %149, align 8, !tbaa !9
  br label %150

150:                                              ; preds = %138, %132
  br label %151

151:                                              ; preds = %150
  %152 = load i32, ptr %15, align 4, !tbaa !11
  %153 = add nsw i32 %152, 1
  store i32 %153, ptr %15, align 4, !tbaa !11
  br label %102, !llvm.loop !32

154:                                              ; preds = %102
  br label %155

155:                                              ; preds = %154, %100
  call void @llvm.lifetime.end.p0(i64 4, 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
  ret i32 0
}

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZN7qpOASES6getMinEdd(double noundef, double noundef) #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZN7qpOASES6getMaxEdd(double noundef, double noundef) #4

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { 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 #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 = !{!"double", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !15, i64 276}
!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, !10, i64 200, !19, i64 208, !15, i64 212, !15, i64 216, !20, i64 220, !10, i64 224, !12, i64 232, !6, i64 240, !10, i64 248, !10, i64 256, !12, 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", !12, i64 8, !6, i64 16, !6, i64 24, !15, i64 32, !15, i64 36}
!18 = !{!"_ZTSN7qpOASES9IndexlistE", !6, i64 0, !6, i64 8, !12, i64 16, !12, i64 20, !12, i64 24, !12, i64 28, !12, 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, !12, i64 28, !12, i64 32, !15, i64 36, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !10, i64 88, !10, i64 96, !10, i64 104, !10, i64 112, !10, i64 120, !23, i64 128, !10, i64 136, !12, i64 144, !10, i64 152, !12, i64 160, !10, i64 168, !10, i64 176, !10, i64 184, !10, i64 192, !15, i64 200, !15, i64 204, !12, i64 208, !12, i64 212, !12, i64 216}
!22 = !{!"_ZTSN7qpOASES10PrintLevelE", !7, i64 0}
!23 = !{!"_ZTSN7qpOASES15SubjectToStatusE", !7, i64 0}
!24 = !{!"_ZTSN7qpOASES7FlipperE", !12, i64 0, !12, i64 4, !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", !12, i64 0, !12, i64 4, !12, i64 8, !12, i64 12, !12, i64 16, !12, i64 20, !12, i64 24, !12, i64 28}
!27 = !{!14, !12, i64 264}
!28 = !{!14, !10, i64 248}
!29 = !{!14, !10, i64 256}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.mustprogress"}
!32 = distinct !{!32, !31}


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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZNK7qpOASES9QProblemB15updateFarBoundsEdiPKdPdS2_S3_(ptr noundef nonnull align 8 dereferenceable(800) %0, double noundef %1, i32 noundef %2, ptr noundef readonly %3, ptr nocapture noundef writeonly %4, ptr noundef readonly %5, ptr nocapture noundef writeonly %6) local_unnamed_addr #1 align 2 {
  %8 = ptrtoint ptr %4 to i64
  %9 = ptrtoint ptr %6 to i64
  %10 = tail call noundef i32 @_ZNK7qpOASES9QProblemB5getNVEv(ptr noundef nonnull align 8 dereferenceable(800) %0)
  %11 = getelementptr inbounds i8, ptr %0, i64 276
  %12 = load i32, ptr %11, align 4, !tbaa !5
  %13 = icmp eq i32 %12, 1
  %14 = icmp sgt i32 %10, 0
  br i1 %13, label %.preheader, label %.preheader52

.preheader52:                                     ; preds = %7
  br i1 %14, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %.preheader52
  %15 = icmp eq ptr %3, null
  %16 = fneg double %1
  %17 = icmp eq ptr %5, null
  %wide.trip.count76 = zext nneg i32 %10 to i64
  br i1 %15, label %.lr.ph.split.us, label %.lr.ph.split

.lr.ph.split.us:                                  ; preds = %.lr.ph
  br i1 %17, label %.lr.ph.split.us.split.us.preheader, label %.lr.ph.split.us.split

.lr.ph.split.us.split.us.preheader:               ; preds = %.lr.ph.split.us
  %min.iters.check = icmp ult i32 %10, 6
  %18 = sub i64 %9, %8
  %diff.check = icmp ult i64 %18, 32
  %or.cond = or i1 %min.iters.check, %diff.check
  br i1 %or.cond, label %.lr.ph.split.us.split.us.preheader94, label %vector.ph

vector.ph:                                        ; preds = %.lr.ph.split.us.split.us.preheader
  %n.vec = and i64 %wide.trip.count76, 2147483644
  %broadcast.splatinsert = insertelement <2 x double> poison, double %16, i64 0
  %broadcast.splat = shufflevector <2 x double> %broadcast.splatinsert, <2 x double> poison, <2 x i32> zeroinitializer
  %broadcast.splatinsert92 = insertelement <2 x double> poison, double %1, i64 0
  %broadcast.splat93 = shufflevector <2 x double> %broadcast.splatinsert92, <2 x double> poison, <2 x i32> zeroinitializer
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %19 = getelementptr inbounds double, ptr %4, i64 %index
  %20 = getelementptr inbounds i8, ptr %19, i64 16
  store <2 x double> %broadcast.splat, ptr %19, align 8, !tbaa !24
  store <2 x double> %broadcast.splat, ptr %20, align 8, !tbaa !24
  %21 = getelementptr inbounds double, ptr %6, i64 %index
  %22 = getelementptr inbounds i8, ptr %21, i64 16
  store <2 x double> %broadcast.splat93, ptr %21, align 8, !tbaa !24
  store <2 x double> %broadcast.splat93, ptr %22, align 8, !tbaa !24
  %index.next = add nuw i64 %index, 4
  %23 = icmp eq i64 %index.next, %n.vec
  br i1 %23, label %middle.block, label %vector.body, !llvm.loop !25

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count76
  br i1 %cmp.n, label %.loopexit, label %.lr.ph.split.us.split.us.preheader94

.lr.ph.split.us.split.us.preheader94:             ; preds = %middle.block, %.lr.ph.split.us.split.us.preheader
  %indvars.iv73.ph = phi i64 [ 0, %.lr.ph.split.us.split.us.preheader ], [ %n.vec, %middle.block ]
  %xtraiter = and i64 %wide.trip.count76, 3
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.lr.ph.split.us.split.us.prol.loopexit, label %.lr.ph.split.us.split.us.prol

.lr.ph.split.us.split.us.prol:                    ; preds = %.lr.ph.split.us.split.us.preheader94, %.lr.ph.split.us.split.us.prol
  %indvars.iv73.prol = phi i64 [ %indvars.iv.next74.prol, %.lr.ph.split.us.split.us.prol ], [ %indvars.iv73.ph, %.lr.ph.split.us.split.us.preheader94 ]
  %prol.iter = phi i64 [ %prol.iter.next, %.lr.ph.split.us.split.us.prol ], [ 0, %.lr.ph.split.us.split.us.preheader94 ]
  %24 = getelementptr inbounds double, ptr %4, i64 %indvars.iv73.prol
  store double %16, ptr %24, align 8, !tbaa !24
  %25 = getelementptr inbounds double, ptr %6, i64 %indvars.iv73.prol
  store double %1, ptr %25, align 8, !tbaa !24
  %indvars.iv.next74.prol = add nuw nsw i64 %indvars.iv73.prol, 1
  %prol.iter.next = add i64 %prol.iter, 1
  %prol.iter.cmp.not = icmp eq i64 %prol.iter.next, %xtraiter
  br i1 %prol.iter.cmp.not, label %.lr.ph.split.us.split.us.prol.loopexit, label %.lr.ph.split.us.split.us.prol, !llvm.loop !29

.lr.ph.split.us.split.us.prol.loopexit:           ; preds = %.lr.ph.split.us.split.us.prol, %.lr.ph.split.us.split.us.preheader94
  %indvars.iv73.unr = phi i64 [ %indvars.iv73.ph, %.lr.ph.split.us.split.us.preheader94 ], [ %indvars.iv.next74.prol, %.lr.ph.split.us.split.us.prol ]
  %26 = sub nsw i64 %indvars.iv73.ph, %wide.trip.count76
  %27 = icmp ugt i64 %26, -4
  br i1 %27, label %.loopexit, label %.lr.ph.split.us.split.us

.lr.ph.split.us.split.us:                         ; preds = %.lr.ph.split.us.split.us.prol.loopexit, %.lr.ph.split.us.split.us
  %indvars.iv73 = phi i64 [ %indvars.iv.next74.3, %.lr.ph.split.us.split.us ], [ %indvars.iv73.unr, %.lr.ph.split.us.split.us.prol.loopexit ]
  %28 = getelementptr inbounds double, ptr %4, i64 %indvars.iv73
  store double %16, ptr %28, align 8, !tbaa !24
  %29 = getelementptr inbounds double, ptr %6, i64 %indvars.iv73
  store double %1, ptr %29, align 8, !tbaa !24
  %indvars.iv.next74 = add nuw nsw i64 %indvars.iv73, 1
  %30 = getelementptr inbounds double, ptr %4, i64 %indvars.iv.next74
  store double %16, ptr %30, align 8, !tbaa !24
  %31 = getelementptr inbounds double, ptr %6, i64 %indvars.iv.next74
  store double %1, ptr %31, align 8, !tbaa !24
  %indvars.iv.next74.1 = add nuw nsw i64 %indvars.iv73, 2
  %32 = getelementptr inbounds double, ptr %4, i64 %indvars.iv.next74.1
  store double %16, ptr %32, align 8, !tbaa !24
  %33 = getelementptr inbounds double, ptr %6, i64 %indvars.iv.next74.1
  store double %1, ptr %33, align 8, !tbaa !24
  %indvars.iv.next74.2 = add nuw nsw i64 %indvars.iv73, 3
  %34 = getelementptr inbounds double, ptr %4, i64 %indvars.iv.next74.2
  store double %16, ptr %34, align 8, !tbaa !24
  %35 = getelementptr inbounds double, ptr %6, i64 %indvars.iv.next74.2
  store double %1, ptr %35, align 8, !tbaa !24
  %indvars.iv.next74.3 = add nuw nsw i64 %indvars.iv73, 4
  %exitcond77.not.3 = icmp eq i64 %indvars.iv.next74.3, %wide.trip.count76
  br i1 %exitcond77.not.3, label %.loopexit, label %.lr.ph.split.us.split.us, !llvm.loop !31

.lr.ph.split.us.split:                            ; preds = %.lr.ph.split.us, %.lr.ph.split.us.split
  %indvars.iv68 = phi i64 [ %indvars.iv.next69, %.lr.ph.split.us.split ], [ 0, %.lr.ph.split.us ]
  %36 = getelementptr inbounds double, ptr %4, i64 %indvars.iv68
  store double %16, ptr %36, align 8, !tbaa !24
  %37 = getelementptr inbounds double, ptr %5, i64 %indvars.iv68
  %38 = load double, ptr %37, align 8, !tbaa !24
  %39 = tail call noundef double @_ZN7qpOASES6getMinEdd(double noundef %1, double noundef %38)
  %40 = getelementptr inbounds double, ptr %6, i64 %indvars.iv68
  store double %39, ptr %40, align 8, !tbaa !24
  %indvars.iv.next69 = add nuw nsw i64 %indvars.iv68, 1
  %exitcond72.not = icmp eq i64 %indvars.iv.next69, %wide.trip.count76
  br i1 %exitcond72.not, label %.loopexit, label %.lr.ph.split.us.split, !llvm.loop !32

.lr.ph.split:                                     ; preds = %.lr.ph
  br i1 %17, label %.lr.ph.split.split.us, label %.lr.ph.split.split

.lr.ph.split.split.us:                            ; preds = %.lr.ph.split, %.lr.ph.split.split.us
  %indvars.iv63 = phi i64 [ %indvars.iv.next64, %.lr.ph.split.split.us ], [ 0, %.lr.ph.split ]
  %41 = getelementptr inbounds double, ptr %3, i64 %indvars.iv63
  %42 = load double, ptr %41, align 8, !tbaa !24
  %43 = tail call noundef double @_ZN7qpOASES6getMaxEdd(double noundef %16, double noundef %42)
  %44 = getelementptr inbounds double, ptr %4, i64 %indvars.iv63
  store double %43, ptr %44, align 8, !tbaa !24
  %45 = getelementptr inbounds double, ptr %6, i64 %indvars.iv63
  store double %1, ptr %45, align 8, !tbaa !24
  %indvars.iv.next64 = add nuw nsw i64 %indvars.iv63, 1
  %exitcond67.not = icmp eq i64 %indvars.iv.next64, %wide.trip.count76
  br i1 %exitcond67.not, label %.loopexit, label %.lr.ph.split.split.us, !llvm.loop !32

.preheader:                                       ; preds = %7
  br i1 %14, label %.lr.ph57, label %.loopexit

.lr.ph57:                                         ; preds = %.preheader
  %46 = getelementptr inbounds i8, ptr %0, i64 264
  %47 = add nsw i32 %2, -1
  %48 = sitofp i32 %47 to double
  %49 = getelementptr inbounds i8, ptr %0, i64 248
  %50 = getelementptr inbounds i8, ptr %0, i64 256
  %51 = icmp eq ptr %3, null
  %52 = icmp eq ptr %5, null
  %wide.trip.count81 = zext nneg i32 %10 to i64
  br label %53

53:                                               ; preds = %.lr.ph57, %77
  %indvars.iv78 = phi i64 [ 0, %.lr.ph57 ], [ %indvars.iv.next79, %77 ]
  %54 = load i32, ptr %46, align 8, !tbaa !33
  %55 = trunc nuw nsw i64 %indvars.iv78 to i32
  %56 = add nsw i32 %54, %55
  %57 = srem i32 %56, %2
  %58 = sitofp i32 %57 to double
  %59 = fdiv double %58, %48
  %60 = fsub double 1.000000e+00, %59
  %61 = load double, ptr %49, align 8, !tbaa !34
  %62 = tail call double @llvm.fmuladd.f64(double %60, double %61, double 1.000000e+00)
  %63 = load double, ptr %50, align 8, !tbaa !35
  %64 = tail call double @llvm.fmuladd.f64(double %59, double %63, double %62)
  %65 = fmul double %64, %1
  %66 = fneg double %65
  br i1 %51, label %71, label %67

67:                                               ; preds = %53
  %68 = getelementptr inbounds double, ptr %3, i64 %indvars.iv78
  %69 = load double, ptr %68, align 8, !tbaa !24
  %70 = tail call noundef double @_ZN7qpOASES6getMaxEdd(double noundef %66, double noundef %69)
  br label %71

71:                                               ; preds = %53, %67
  %.sink = phi double [ %70, %67 ], [ %66, %53 ]
  %72 = getelementptr inbounds double, ptr %4, i64 %indvars.iv78
  store double %.sink, ptr %72, align 8
  br i1 %52, label %77, label %73

73:                                               ; preds = %71
  %74 = getelementptr inbounds double, ptr %5, i64 %indvars.iv78
  %75 = load double, ptr %74, align 8, !tbaa !24
  %76 = tail call noundef double @_ZN7qpOASES6getMinEdd(double noundef %65, double noundef %75)
  br label %77

77:                                               ; preds = %71, %73
  %.sink83 = phi double [ %76, %73 ], [ %65, %71 ]
  %78 = getelementptr inbounds double, ptr %6, i64 %indvars.iv78
  store double %.sink83, ptr %78, align 8
  %indvars.iv.next79 = add nuw nsw i64 %indvars.iv78, 1
  %exitcond82.not = icmp eq i64 %indvars.iv.next79, %wide.trip.count81
  br i1 %exitcond82.not, label %.loopexit, label %53, !llvm.loop !36

.lr.ph.split.split:                               ; preds = %.lr.ph.split, %.lr.ph.split.split
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph.split.split ], [ 0, %.lr.ph.split ]
  %79 = getelementptr inbounds double, ptr %3, i64 %indvars.iv
  %80 = load double, ptr %79, align 8, !tbaa !24
  %81 = tail call noundef double @_ZN7qpOASES6getMaxEdd(double noundef %16, double noundef %80)
  %82 = getelementptr inbounds double, ptr %4, i64 %indvars.iv
  store double %81, ptr %82, align 8, !tbaa !24
  %83 = getelementptr inbounds double, ptr %5, i64 %indvars.iv
  %84 = load double, ptr %83, align 8, !tbaa !24
  %85 = tail call noundef double @_ZN7qpOASES6getMinEdd(double noundef %1, double noundef %84)
  %86 = getelementptr inbounds double, ptr %6, i64 %indvars.iv
  store double %85, ptr %86, align 8, !tbaa !24
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count76
  br i1 %exitcond.not, label %.loopexit, label %.lr.ph.split.split, !llvm.loop !32

.loopexit:                                        ; preds = %.lr.ph.split.split, %.lr.ph.split.split.us, %.lr.ph.split.us.split, %.lr.ph.split.us.split.us.prol.loopexit, %.lr.ph.split.us.split.us, %77, %middle.block, %.preheader52, %.preheader
  ret i32 0
}

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZN7qpOASES6getMinEdd(double noundef, double noundef) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZN7qpOASES6getMaxEdd(double noundef, double noundef) local_unnamed_addr #3

attributes #0 = { 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 #1 = { 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 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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" }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 276}
!6 = !{!"_ZTSN7qpOASES9QProblemBE", !7, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !11, i64 48, !10, i64 168, !7, i64 176, !10, i64 184, !10, i64 192, !15, i64 200, !16, i64 208, !7, i64 212, !7, i64 216, !17, i64 220, !15, i64 224, !13, i64 232, !10, i64 240, !15, i64 248, !15, i64 256, !13, i64 264, !18, i64 272, !21, i64 496, !23, i64 768}
!7 = !{!"_ZTSN7qpOASES11BooleanTypeE", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"_ZTSN7qpOASES6BoundsE", !12, i64 0, !14, i64 40, !14, i64 80}
!12 = !{!"_ZTSN7qpOASES9SubjectToE", !13, i64 8, !10, i64 16, !10, i64 24, !7, i64 32, !7, i64 36}
!13 = !{!"int", !8, i64 0}
!14 = !{!"_ZTSN7qpOASES9IndexlistE", !10, i64 0, !10, i64 8, !13, i64 16, !13, i64 20, !13, i64 24, !13, i64 28, !13, i64 32}
!15 = !{!"double", !8, i64 0}
!16 = !{!"_ZTSN7qpOASES14QProblemStatusE", !8, i64 0}
!17 = !{!"_ZTSN7qpOASES11HessianTypeE", !8, i64 0}
!18 = !{!"_ZTSN7qpOASES7OptionsE", !19, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !7, i64 24, !13, i64 28, !13, i64 32, !7, i64 36, !15, i64 40, !15, i64 48, !15, i64 56, !15, i64 64, !15, i64 72, !15, i64 80, !15, i64 88, !15, i64 96, !15, i64 104, !15, i64 112, !15, i64 120, !20, i64 128, !15, i64 136, !13, i64 144, !15, i64 152, !13, i64 160, !15, i64 168, !15, i64 176, !15, i64 184, !15, i64 192, !7, i64 200, !7, i64 204, !13, i64 208, !13, i64 212, !13, i64 216}
!19 = !{!"_ZTSN7qpOASES10PrintLevelE", !8, i64 0}
!20 = !{!"_ZTSN7qpOASES15SubjectToStatusE", !8, i64 0}
!21 = !{!"_ZTSN7qpOASES7FlipperE", !13, i64 0, !13, i64 4, !11, i64 8, !22, i64 128, !10, i64 248, !10, i64 256, !10, i64 264}
!22 = !{!"_ZTSN7qpOASES11ConstraintsE", !12, i64 0, !14, i64 40, !14, i64 80}
!23 = !{!"_ZTSN7qpOASES13TabularOutputE", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12, !13, i64 16, !13, i64 20, !13, i64 24, !13, i64 28}
!24 = !{!15, !15, i64 0}
!25 = distinct !{!25, !26, !27, !28}
!26 = !{!"llvm.loop.mustprogress"}
!27 = !{!"llvm.loop.isvectorized", i32 1}
!28 = !{!"llvm.loop.unroll.runtime.disable"}
!29 = distinct !{!29, !30}
!30 = !{!"llvm.loop.unroll.disable"}
!31 = distinct !{!31, !26, !27}
!32 = distinct !{!32, !26}
!33 = !{!6, !13, i64 264}
!34 = !{!6, !15, i64 248}
!35 = !{!6, !15, i64 256}
!36 = distinct !{!36, !26}


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