; 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 @_ZN7qpOASES9QProblemB24setupAuxiliaryQPsolutionEPKdS2_(ptr noundef nonnull align 8 dereferenceable(800) %0, ptr noundef %1, ptr noundef %2) #2 align 2 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %9 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #3
  %10 = call noundef i32 @_ZNK7qpOASES9QProblemB5getNVEv(ptr noundef nonnull align 8 dereferenceable(800) %9)
  store i32 %10, ptr %8, align 4, !tbaa !9
  %11 = load ptr, ptr %5, align 8, !tbaa !5
  %12 = icmp ne ptr %11, null
  br i1 %12, label %13, label %39

13:                                               ; preds = %3
  %14 = load ptr, ptr %5, align 8, !tbaa !5
  %15 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %9, i32 0, i32 9
  %16 = load ptr, ptr %15, align 8, !tbaa !11
  %17 = icmp ne ptr %14, %16
  br i1 %17, label %18, label %38

18:                                               ; preds = %13
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %19

19:                                               ; preds = %34, %18
  %20 = load i32, ptr %7, align 4, !tbaa !9
  %21 = load i32, ptr %8, align 4, !tbaa !9
  %22 = icmp slt i32 %20, %21
  br i1 %22, label %23, label %37

23:                                               ; preds = %19
  %24 = load ptr, ptr %5, align 8, !tbaa !5
  %25 = load i32, ptr %7, align 4, !tbaa !9
  %26 = sext i32 %25 to i64
  %27 = getelementptr inbounds double, ptr %24, i64 %26
  %28 = load double, ptr %27, align 8, !tbaa !26
  %29 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %9, i32 0, i32 9
  %30 = load ptr, ptr %29, align 8, !tbaa !11
  %31 = load i32, ptr %7, align 4, !tbaa !9
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds double, ptr %30, i64 %32
  store double %28, ptr %33, align 8, !tbaa !26
  br label %34

34:                                               ; preds = %23
  %35 = load i32, ptr %7, align 4, !tbaa !9
  %36 = add nsw i32 %35, 1
  store i32 %36, ptr %7, align 4, !tbaa !9
  br label %19, !llvm.loop !27

37:                                               ; preds = %19
  br label %38

38:                                               ; preds = %37, %13
  br label %54

39:                                               ; preds = %3
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %40

40:                                               ; preds = %50, %39
  %41 = load i32, ptr %7, align 4, !tbaa !9
  %42 = load i32, ptr %8, align 4, !tbaa !9
  %43 = icmp slt i32 %41, %42
  br i1 %43, label %44, label %53

44:                                               ; preds = %40
  %45 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %9, i32 0, i32 9
  %46 = load ptr, ptr %45, align 8, !tbaa !11
  %47 = load i32, ptr %7, align 4, !tbaa !9
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds double, ptr %46, i64 %48
  store double 0.000000e+00, ptr %49, align 8, !tbaa !26
  br label %50

50:                                               ; preds = %44
  %51 = load i32, ptr %7, align 4, !tbaa !9
  %52 = add nsw i32 %51, 1
  store i32 %52, ptr %7, align 4, !tbaa !9
  br label %40, !llvm.loop !29

53:                                               ; preds = %40
  br label %54

54:                                               ; preds = %53, %38
  %55 = load ptr, ptr %6, align 8, !tbaa !5
  %56 = icmp ne ptr %55, null
  br i1 %56, label %57, label %83

57:                                               ; preds = %54
  %58 = load ptr, ptr %6, align 8, !tbaa !5
  %59 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %9, i32 0, i32 10
  %60 = load ptr, ptr %59, align 8, !tbaa !30
  %61 = icmp ne ptr %58, %60
  br i1 %61, label %62, label %82

62:                                               ; preds = %57
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %63

63:                                               ; preds = %78, %62
  %64 = load i32, ptr %7, align 4, !tbaa !9
  %65 = load i32, ptr %8, align 4, !tbaa !9
  %66 = icmp slt i32 %64, %65
  br i1 %66, label %67, label %81

67:                                               ; preds = %63
  %68 = load ptr, ptr %6, align 8, !tbaa !5
  %69 = load i32, ptr %7, align 4, !tbaa !9
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds double, ptr %68, i64 %70
  %72 = load double, ptr %71, align 8, !tbaa !26
  %73 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %9, i32 0, i32 10
  %74 = load ptr, ptr %73, align 8, !tbaa !30
  %75 = load i32, ptr %7, align 4, !tbaa !9
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds double, ptr %74, i64 %76
  store double %72, ptr %77, align 8, !tbaa !26
  br label %78

78:                                               ; preds = %67
  %79 = load i32, ptr %7, align 4, !tbaa !9
  %80 = add nsw i32 %79, 1
  store i32 %80, ptr %7, align 4, !tbaa !9
  br label %63, !llvm.loop !31

81:                                               ; preds = %63
  br label %82

82:                                               ; preds = %81, %57
  br label %98

83:                                               ; preds = %54
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %84

84:                                               ; preds = %94, %83
  %85 = load i32, ptr %7, align 4, !tbaa !9
  %86 = load i32, ptr %8, align 4, !tbaa !9
  %87 = icmp slt i32 %85, %86
  br i1 %87, label %88, label %97

88:                                               ; preds = %84
  %89 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %9, i32 0, i32 10
  %90 = load ptr, ptr %89, align 8, !tbaa !30
  %91 = load i32, ptr %7, align 4, !tbaa !9
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds double, ptr %90, i64 %92
  store double 0.000000e+00, ptr %93, align 8, !tbaa !26
  br label %94

94:                                               ; preds = %88
  %95 = load i32, ptr %7, align 4, !tbaa !9
  %96 = add nsw i32 %95, 1
  store i32 %96, ptr %7, align 4, !tbaa !9
  br label %84, !llvm.loop !32

97:                                               ; preds = %84
  br label %98

98:                                               ; preds = %97, %82
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #3
  ret i32 0
}

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 = { 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, !6, i64 184}
!12 = !{!"_ZTSN7qpOASES9QProblemBE", !13, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !14, i64 48, !6, i64 168, !13, i64 176, !6, i64 184, !6, i64 192, !17, i64 200, !18, i64 208, !13, i64 212, !13, i64 216, !19, i64 220, !17, i64 224, !10, i64 232, !6, i64 240, !17, i64 248, !17, i64 256, !10, i64 264, !20, i64 272, !23, i64 496, !25, i64 768}
!13 = !{!"_ZTSN7qpOASES11BooleanTypeE", !7, i64 0}
!14 = !{!"_ZTSN7qpOASES6BoundsE", !15, i64 0, !16, i64 40, !16, i64 80}
!15 = !{!"_ZTSN7qpOASES9SubjectToE", !10, i64 8, !6, i64 16, !6, i64 24, !13, i64 32, !13, i64 36}
!16 = !{!"_ZTSN7qpOASES9IndexlistE", !6, i64 0, !6, i64 8, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32}
!17 = !{!"double", !7, i64 0}
!18 = !{!"_ZTSN7qpOASES14QProblemStatusE", !7, i64 0}
!19 = !{!"_ZTSN7qpOASES11HessianTypeE", !7, i64 0}
!20 = !{!"_ZTSN7qpOASES7OptionsE", !21, i64 0, !13, i64 4, !13, i64 8, !13, i64 12, !13, i64 16, !13, i64 20, !13, i64 24, !10, i64 28, !10, i64 32, !13, i64 36, !17, i64 40, !17, i64 48, !17, i64 56, !17, i64 64, !17, i64 72, !17, i64 80, !17, i64 88, !17, i64 96, !17, i64 104, !17, i64 112, !17, i64 120, !22, i64 128, !17, i64 136, !10, i64 144, !17, i64 152, !10, i64 160, !17, i64 168, !17, i64 176, !17, i64 184, !17, i64 192, !13, i64 200, !13, i64 204, !10, i64 208, !10, i64 212, !10, i64 216}
!21 = !{!"_ZTSN7qpOASES10PrintLevelE", !7, i64 0}
!22 = !{!"_ZTSN7qpOASES15SubjectToStatusE", !7, i64 0}
!23 = !{!"_ZTSN7qpOASES7FlipperE", !10, i64 0, !10, i64 4, !14, i64 8, !24, i64 128, !6, i64 248, !6, i64 256, !6, i64 264}
!24 = !{!"_ZTSN7qpOASES11ConstraintsE", !15, i64 0, !16, i64 40, !16, i64 80}
!25 = !{!"_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}
!26 = !{!17, !17, i64 0}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.mustprogress"}
!29 = distinct !{!29, !28}
!30 = !{!12, !6, i64 192}
!31 = distinct !{!31, !28}
!32 = distinct !{!32, !28}


; 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 @_ZN7qpOASES9QProblemB24setupAuxiliaryQPsolutionEPKdS2_(ptr noundef nonnull align 8 dereferenceable(800) %0, ptr noundef readonly %1, ptr noundef readonly %2) local_unnamed_addr #1 align 2 {
  %4 = ptrtoint ptr %2 to i64
  %5 = ptrtoint ptr %1 to i64
  %6 = tail call noundef i32 @_ZNK7qpOASES9QProblemB5getNVEv(ptr noundef nonnull align 8 dereferenceable(800) %0)
  %.not = icmp eq ptr %1, null
  br i1 %.not, label %.preheader31, label %12

.preheader31:                                     ; preds = %3
  %7 = icmp sgt i32 %6, 0
  br i1 %7, label %.lr.ph37, label %.loopexit32

.lr.ph37:                                         ; preds = %.preheader31
  %8 = getelementptr inbounds i8, ptr %0, i64 184
  %9 = load ptr, ptr %8, align 8, !tbaa !5
  %10 = zext nneg i32 %6 to i64
  %11 = shl nuw nsw i64 %10, 3
  tail call void @llvm.memset.p0.i64(ptr align 8 %9, i8 0, i64 %11, i1 false), !tbaa !24
  br label %.loopexit32

12:                                               ; preds = %3
  %13 = getelementptr inbounds i8, ptr %0, i64 184
  %14 = load ptr, ptr %13, align 8, !tbaa !5
  %.not26 = icmp ne ptr %14, %1
  %15 = icmp sgt i32 %6, 0
  %or.cond = and i1 %.not26, %15
  br i1 %or.cond, label %.lr.ph.preheader, label %.loopexit32

.lr.ph.preheader:                                 ; preds = %12
  %16 = ptrtoint ptr %14 to i64
  %wide.trip.count = zext nneg i32 %6 to i64
  %min.iters.check = icmp ult i32 %6, 6
  %17 = sub i64 %16, %5
  %diff.check = icmp ult i64 %17, 32
  %or.cond73 = or i1 %min.iters.check, %diff.check
  br i1 %or.cond73, label %.lr.ph.preheader76, label %vector.ph

vector.ph:                                        ; preds = %.lr.ph.preheader
  %n.vec = and i64 %wide.trip.count, 2147483644
  br label %vector.body

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

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br i1 %cmp.n, label %.loopexit32, label %.lr.ph.preheader76

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

.lr.ph.prol:                                      ; preds = %.lr.ph.preheader76, %.lr.ph.prol
  %indvars.iv.prol = phi i64 [ %indvars.iv.next.prol, %.lr.ph.prol ], [ %indvars.iv.ph, %.lr.ph.preheader76 ]
  %prol.iter = phi i64 [ %prol.iter.next, %.lr.ph.prol ], [ 0, %.lr.ph.preheader76 ]
  %23 = getelementptr inbounds double, ptr %1, i64 %indvars.iv.prol
  %24 = load double, ptr %23, align 8, !tbaa !24
  %25 = getelementptr inbounds double, ptr %14, i64 %indvars.iv.prol
  store double %24, ptr %25, align 8, !tbaa !24
  %indvars.iv.next.prol = add nuw nsw i64 %indvars.iv.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.prol.loopexit, label %.lr.ph.prol, !llvm.loop !29

.lr.ph.prol.loopexit:                             ; preds = %.lr.ph.prol, %.lr.ph.preheader76
  %indvars.iv.unr = phi i64 [ %indvars.iv.ph, %.lr.ph.preheader76 ], [ %indvars.iv.next.prol, %.lr.ph.prol ]
  %26 = sub nsw i64 %indvars.iv.ph, %wide.trip.count
  %27 = icmp ugt i64 %26, -4
  br i1 %27, label %.loopexit32, label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.prol.loopexit, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next.3, %.lr.ph ], [ %indvars.iv.unr, %.lr.ph.prol.loopexit ]
  %28 = getelementptr inbounds double, ptr %1, i64 %indvars.iv
  %29 = load double, ptr %28, align 8, !tbaa !24
  %30 = getelementptr inbounds double, ptr %14, i64 %indvars.iv
  store double %29, ptr %30, align 8, !tbaa !24
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %31 = getelementptr inbounds double, ptr %1, i64 %indvars.iv.next
  %32 = load double, ptr %31, align 8, !tbaa !24
  %33 = getelementptr inbounds double, ptr %14, i64 %indvars.iv.next
  store double %32, ptr %33, align 8, !tbaa !24
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %34 = getelementptr inbounds double, ptr %1, i64 %indvars.iv.next.1
  %35 = load double, ptr %34, align 8, !tbaa !24
  %36 = getelementptr inbounds double, ptr %14, i64 %indvars.iv.next.1
  store double %35, ptr %36, align 8, !tbaa !24
  %indvars.iv.next.2 = add nuw nsw i64 %indvars.iv, 3
  %37 = getelementptr inbounds double, ptr %1, i64 %indvars.iv.next.2
  %38 = load double, ptr %37, align 8, !tbaa !24
  %39 = getelementptr inbounds double, ptr %14, i64 %indvars.iv.next.2
  store double %38, ptr %39, align 8, !tbaa !24
  %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 4
  %exitcond.not.3 = icmp eq i64 %indvars.iv.next.3, %wide.trip.count
  br i1 %exitcond.not.3, label %.loopexit32, label %.lr.ph, !llvm.loop !31

.loopexit32:                                      ; preds = %.lr.ph.prol.loopexit, %.lr.ph, %middle.block, %.lr.ph37, %.preheader31, %12
  %.not27 = icmp eq ptr %2, null
  br i1 %.not27, label %.preheader, label %45

.preheader:                                       ; preds = %.loopexit32
  %40 = icmp sgt i32 %6, 0
  br i1 %40, label %.lr.ph41, label %.loopexit

.lr.ph41:                                         ; preds = %.preheader
  %41 = getelementptr inbounds i8, ptr %0, i64 192
  %42 = load ptr, ptr %41, align 8, !tbaa !32
  %43 = zext nneg i32 %6 to i64
  %44 = shl nuw nsw i64 %43, 3
  tail call void @llvm.memset.p0.i64(ptr align 8 %42, i8 0, i64 %44, i1 false), !tbaa !24
  br label %.loopexit

45:                                               ; preds = %.loopexit32
  %46 = getelementptr inbounds i8, ptr %0, i64 192
  %47 = load ptr, ptr %46, align 8, !tbaa !32
  %.not28 = icmp ne ptr %47, %2
  %48 = icmp sgt i32 %6, 0
  %or.cond42 = and i1 %.not28, %48
  br i1 %or.cond42, label %.lr.ph39.preheader, label %.loopexit

.lr.ph39.preheader:                               ; preds = %45
  %49 = ptrtoint ptr %47 to i64
  %wide.trip.count52 = zext nneg i32 %6 to i64
  %min.iters.check62 = icmp ult i32 %6, 6
  %50 = sub i64 %49, %4
  %diff.check59 = icmp ult i64 %50, 32
  %or.cond74 = or i1 %min.iters.check62, %diff.check59
  br i1 %or.cond74, label %.lr.ph39.preheader75, label %vector.ph63

vector.ph63:                                      ; preds = %.lr.ph39.preheader
  %n.vec65 = and i64 %wide.trip.count52, 2147483644
  br label %vector.body67

vector.body67:                                    ; preds = %vector.body67, %vector.ph63
  %index68 = phi i64 [ 0, %vector.ph63 ], [ %index.next71, %vector.body67 ]
  %51 = getelementptr inbounds double, ptr %2, i64 %index68
  %52 = getelementptr inbounds i8, ptr %51, i64 16
  %wide.load69 = load <2 x double>, ptr %51, align 8, !tbaa !24
  %wide.load70 = load <2 x double>, ptr %52, align 8, !tbaa !24
  %53 = getelementptr inbounds double, ptr %47, i64 %index68
  %54 = getelementptr inbounds i8, ptr %53, i64 16
  store <2 x double> %wide.load69, ptr %53, align 8, !tbaa !24
  store <2 x double> %wide.load70, ptr %54, align 8, !tbaa !24
  %index.next71 = add nuw i64 %index68, 4
  %55 = icmp eq i64 %index.next71, %n.vec65
  br i1 %55, label %middle.block60, label %vector.body67, !llvm.loop !33

middle.block60:                                   ; preds = %vector.body67
  %cmp.n72 = icmp eq i64 %n.vec65, %wide.trip.count52
  br i1 %cmp.n72, label %.loopexit, label %.lr.ph39.preheader75

.lr.ph39.preheader75:                             ; preds = %middle.block60, %.lr.ph39.preheader
  %indvars.iv49.ph = phi i64 [ 0, %.lr.ph39.preheader ], [ %n.vec65, %middle.block60 ]
  %xtraiter77 = and i64 %wide.trip.count52, 3
  %lcmp.mod78.not = icmp eq i64 %xtraiter77, 0
  br i1 %lcmp.mod78.not, label %.lr.ph39.prol.loopexit, label %.lr.ph39.prol

.lr.ph39.prol:                                    ; preds = %.lr.ph39.preheader75, %.lr.ph39.prol
  %indvars.iv49.prol = phi i64 [ %indvars.iv.next50.prol, %.lr.ph39.prol ], [ %indvars.iv49.ph, %.lr.ph39.preheader75 ]
  %prol.iter79 = phi i64 [ %prol.iter79.next, %.lr.ph39.prol ], [ 0, %.lr.ph39.preheader75 ]
  %56 = getelementptr inbounds double, ptr %2, i64 %indvars.iv49.prol
  %57 = load double, ptr %56, align 8, !tbaa !24
  %58 = getelementptr inbounds double, ptr %47, i64 %indvars.iv49.prol
  store double %57, ptr %58, align 8, !tbaa !24
  %indvars.iv.next50.prol = add nuw nsw i64 %indvars.iv49.prol, 1
  %prol.iter79.next = add i64 %prol.iter79, 1
  %prol.iter79.cmp.not = icmp eq i64 %prol.iter79.next, %xtraiter77
  br i1 %prol.iter79.cmp.not, label %.lr.ph39.prol.loopexit, label %.lr.ph39.prol, !llvm.loop !34

.lr.ph39.prol.loopexit:                           ; preds = %.lr.ph39.prol, %.lr.ph39.preheader75
  %indvars.iv49.unr = phi i64 [ %indvars.iv49.ph, %.lr.ph39.preheader75 ], [ %indvars.iv.next50.prol, %.lr.ph39.prol ]
  %59 = sub nsw i64 %indvars.iv49.ph, %wide.trip.count52
  %60 = icmp ugt i64 %59, -4
  br i1 %60, label %.loopexit, label %.lr.ph39

.lr.ph39:                                         ; preds = %.lr.ph39.prol.loopexit, %.lr.ph39
  %indvars.iv49 = phi i64 [ %indvars.iv.next50.3, %.lr.ph39 ], [ %indvars.iv49.unr, %.lr.ph39.prol.loopexit ]
  %61 = getelementptr inbounds double, ptr %2, i64 %indvars.iv49
  %62 = load double, ptr %61, align 8, !tbaa !24
  %63 = getelementptr inbounds double, ptr %47, i64 %indvars.iv49
  store double %62, ptr %63, align 8, !tbaa !24
  %indvars.iv.next50 = add nuw nsw i64 %indvars.iv49, 1
  %64 = getelementptr inbounds double, ptr %2, i64 %indvars.iv.next50
  %65 = load double, ptr %64, align 8, !tbaa !24
  %66 = getelementptr inbounds double, ptr %47, i64 %indvars.iv.next50
  store double %65, ptr %66, align 8, !tbaa !24
  %indvars.iv.next50.1 = add nuw nsw i64 %indvars.iv49, 2
  %67 = getelementptr inbounds double, ptr %2, i64 %indvars.iv.next50.1
  %68 = load double, ptr %67, align 8, !tbaa !24
  %69 = getelementptr inbounds double, ptr %47, i64 %indvars.iv.next50.1
  store double %68, ptr %69, align 8, !tbaa !24
  %indvars.iv.next50.2 = add nuw nsw i64 %indvars.iv49, 3
  %70 = getelementptr inbounds double, ptr %2, i64 %indvars.iv.next50.2
  %71 = load double, ptr %70, align 8, !tbaa !24
  %72 = getelementptr inbounds double, ptr %47, i64 %indvars.iv.next50.2
  store double %71, ptr %72, align 8, !tbaa !24
  %indvars.iv.next50.3 = add nuw nsw i64 %indvars.iv49, 4
  %exitcond53.not.3 = icmp eq i64 %indvars.iv.next50.3, %wide.trip.count52
  br i1 %exitcond53.not.3, label %.loopexit, label %.lr.ph39, !llvm.loop !35

.loopexit:                                        ; preds = %.lr.ph39.prol.loopexit, %.lr.ph39, %middle.block60, %.lr.ph41, %.preheader, %45
  ret i32 0
}

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

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 = { nocallback nofree nounwind willreturn memory(argmem: write) }

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

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


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