; 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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZN7qpOASES6getAbsEd(double noundef) #2

; Function Attrs: mustprogress uwtable
define dso_local noundef double @_ZN7qpOASES9QProblemB25getRelativeHomotopyLengthEPKdS2_S2_(ptr noundef nonnull align 8 dereferenceable(800) %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) #3 align 2 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca double, align 8
  %12 = alloca double, align 8
  %13 = alloca double, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  store ptr %3, ptr %8, align 8, !tbaa !5
  %14 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  %15 = call noundef i32 @_ZNK7qpOASES9QProblemB5getNVEv(ptr noundef nonnull align 8 dereferenceable(800) %14)
  store i32 %15, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  store double 0.000000e+00, ptr %13, align 8, !tbaa !11
  store i32 0, ptr %9, align 4, !tbaa !9
  br label %16

16:                                               ; preds = %52, %4
  %17 = load i32, ptr %9, align 4, !tbaa !9
  %18 = load i32, ptr %10, align 4, !tbaa !9
  %19 = icmp slt i32 %17, %18
  br i1 %19, label %20, label %55

20:                                               ; preds = %16
  %21 = load ptr, ptr %6, align 8, !tbaa !5
  %22 = load i32, ptr %9, align 4, !tbaa !9
  %23 = sext i32 %22 to i64
  %24 = getelementptr inbounds double, ptr %21, i64 %23
  %25 = load double, ptr %24, align 8, !tbaa !11
  %26 = call noundef double @_ZN7qpOASES6getAbsEd(double noundef %25)
  store double %26, ptr %12, align 8, !tbaa !11
  %27 = load double, ptr %12, align 8, !tbaa !11
  %28 = fcmp olt double %27, 1.000000e+00
  br i1 %28, label %29, label %30

29:                                               ; preds = %20
  store double 1.000000e+00, ptr %12, align 8, !tbaa !11
  br label %30

30:                                               ; preds = %29, %20
  %31 = load ptr, ptr %6, align 8, !tbaa !5
  %32 = load i32, ptr %9, align 4, !tbaa !9
  %33 = sext i32 %32 to i64
  %34 = getelementptr inbounds double, ptr %31, i64 %33
  %35 = load double, ptr %34, align 8, !tbaa !11
  %36 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %14, i32 0, i32 3
  %37 = load ptr, ptr %36, align 8, !tbaa !13
  %38 = load i32, ptr %9, align 4, !tbaa !9
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds double, ptr %37, i64 %39
  %41 = load double, ptr %40, align 8, !tbaa !11
  %42 = fsub double %35, %41
  %43 = call noundef double @_ZN7qpOASES6getAbsEd(double noundef %42)
  %44 = load double, ptr %12, align 8, !tbaa !11
  %45 = fdiv double %43, %44
  store double %45, ptr %11, align 8, !tbaa !11
  %46 = load double, ptr %11, align 8, !tbaa !11
  %47 = load double, ptr %13, align 8, !tbaa !11
  %48 = fcmp ogt double %46, %47
  br i1 %48, label %49, label %51

49:                                               ; preds = %30
  %50 = load double, ptr %11, align 8, !tbaa !11
  store double %50, ptr %13, align 8, !tbaa !11
  br label %51

51:                                               ; preds = %49, %30
  br label %52

52:                                               ; preds = %51
  %53 = load i32, ptr %9, align 4, !tbaa !9
  %54 = add nsw i32 %53, 1
  store i32 %54, ptr %9, align 4, !tbaa !9
  br label %16, !llvm.loop !27

55:                                               ; preds = %16
  %56 = load ptr, ptr %7, align 8, !tbaa !5
  %57 = icmp ne ptr %56, null
  br i1 %57, label %58, label %99

58:                                               ; preds = %55
  store i32 0, ptr %9, align 4, !tbaa !9
  br label %59

59:                                               ; preds = %95, %58
  %60 = load i32, ptr %9, align 4, !tbaa !9
  %61 = load i32, ptr %10, align 4, !tbaa !9
  %62 = icmp slt i32 %60, %61
  br i1 %62, label %63, label %98

63:                                               ; preds = %59
  %64 = load ptr, ptr %7, align 8, !tbaa !5
  %65 = load i32, ptr %9, align 4, !tbaa !9
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds double, ptr %64, i64 %66
  %68 = load double, ptr %67, align 8, !tbaa !11
  %69 = call noundef double @_ZN7qpOASES6getAbsEd(double noundef %68)
  store double %69, ptr %12, align 8, !tbaa !11
  %70 = load double, ptr %12, align 8, !tbaa !11
  %71 = fcmp olt double %70, 1.000000e+00
  br i1 %71, label %72, label %73

72:                                               ; preds = %63
  store double 1.000000e+00, ptr %12, align 8, !tbaa !11
  br label %73

73:                                               ; preds = %72, %63
  %74 = load ptr, ptr %7, align 8, !tbaa !5
  %75 = load i32, ptr %9, align 4, !tbaa !9
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds double, ptr %74, i64 %76
  %78 = load double, ptr %77, align 8, !tbaa !11
  %79 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %14, i32 0, i32 4
  %80 = load ptr, ptr %79, align 8, !tbaa !29
  %81 = load i32, ptr %9, align 4, !tbaa !9
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds double, ptr %80, i64 %82
  %84 = load double, ptr %83, align 8, !tbaa !11
  %85 = fsub double %78, %84
  %86 = call noundef double @_ZN7qpOASES6getAbsEd(double noundef %85)
  %87 = load double, ptr %12, align 8, !tbaa !11
  %88 = fdiv double %86, %87
  store double %88, ptr %11, align 8, !tbaa !11
  %89 = load double, ptr %11, align 8, !tbaa !11
  %90 = load double, ptr %13, align 8, !tbaa !11
  %91 = fcmp ogt double %89, %90
  br i1 %91, label %92, label %94

92:                                               ; preds = %73
  %93 = load double, ptr %11, align 8, !tbaa !11
  store double %93, ptr %13, align 8, !tbaa !11
  br label %94

94:                                               ; preds = %92, %73
  br label %95

95:                                               ; preds = %94
  %96 = load i32, ptr %9, align 4, !tbaa !9
  %97 = add nsw i32 %96, 1
  store i32 %97, ptr %9, align 4, !tbaa !9
  br label %59, !llvm.loop !30

98:                                               ; preds = %59
  br label %99

99:                                               ; preds = %98, %55
  %100 = load ptr, ptr %8, align 8, !tbaa !5
  %101 = icmp ne ptr %100, null
  br i1 %101, label %102, label %143

102:                                              ; preds = %99
  store i32 0, ptr %9, align 4, !tbaa !9
  br label %103

103:                                              ; preds = %139, %102
  %104 = load i32, ptr %9, align 4, !tbaa !9
  %105 = load i32, ptr %10, align 4, !tbaa !9
  %106 = icmp slt i32 %104, %105
  br i1 %106, label %107, label %142

107:                                              ; preds = %103
  %108 = load ptr, ptr %8, align 8, !tbaa !5
  %109 = load i32, ptr %9, align 4, !tbaa !9
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds double, ptr %108, i64 %110
  %112 = load double, ptr %111, align 8, !tbaa !11
  %113 = call noundef double @_ZN7qpOASES6getAbsEd(double noundef %112)
  store double %113, ptr %12, align 8, !tbaa !11
  %114 = load double, ptr %12, align 8, !tbaa !11
  %115 = fcmp olt double %114, 1.000000e+00
  br i1 %115, label %116, label %117

116:                                              ; preds = %107
  store double 1.000000e+00, ptr %12, align 8, !tbaa !11
  br label %117

117:                                              ; preds = %116, %107
  %118 = load ptr, ptr %8, align 8, !tbaa !5
  %119 = load i32, ptr %9, align 4, !tbaa !9
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds double, ptr %118, i64 %120
  %122 = load double, ptr %121, align 8, !tbaa !11
  %123 = getelementptr inbounds %"class.qpOASES::QProblemB", ptr %14, i32 0, i32 5
  %124 = load ptr, ptr %123, align 8, !tbaa !31
  %125 = load i32, ptr %9, align 4, !tbaa !9
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds double, ptr %124, i64 %126
  %128 = load double, ptr %127, align 8, !tbaa !11
  %129 = fsub double %122, %128
  %130 = call noundef double @_ZN7qpOASES6getAbsEd(double noundef %129)
  %131 = load double, ptr %12, align 8, !tbaa !11
  %132 = fdiv double %130, %131
  store double %132, ptr %11, align 8, !tbaa !11
  %133 = load double, ptr %11, align 8, !tbaa !11
  %134 = load double, ptr %13, align 8, !tbaa !11
  %135 = fcmp ogt double %133, %134
  br i1 %135, label %136, label %138

136:                                              ; preds = %117
  %137 = load double, ptr %11, align 8, !tbaa !11
  store double %137, ptr %13, align 8, !tbaa !11
  br label %138

138:                                              ; preds = %136, %117
  br label %139

139:                                              ; preds = %138
  %140 = load i32, ptr %9, align 4, !tbaa !9
  %141 = add nsw i32 %140, 1
  store i32 %141, ptr %9, align 4, !tbaa !9
  br label %103, !llvm.loop !32

142:                                              ; preds = %103
  br label %143

143:                                              ; preds = %142, %99
  %144 = load double, ptr %13, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  ret double %144
}

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 = { 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" }
attributes #4 = { nounwind }

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef double @_ZN7qpOASES9QProblemB25getRelativeHomotopyLengthEPKdS2_S2_(ptr noundef nonnull align 8 dereferenceable(800) %0, ptr nocapture noundef readonly %1, ptr noundef readonly %2, ptr noundef readonly %3) local_unnamed_addr #2 align 2 {
  %5 = tail call noundef i32 @_ZNK7qpOASES9QProblemB5getNVEv(ptr noundef nonnull align 8 dereferenceable(800) %0)
  %6 = icmp sgt i32 %5, 0
  br i1 %6, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %4
  %7 = getelementptr inbounds i8, ptr %0, i64 24
  %wide.trip.count = zext nneg i32 %5 to i64
  br label %8

8:                                                ; preds = %.lr.ph, %8
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %8 ]
  %.061 = phi double [ 0.000000e+00, %.lr.ph ], [ %.1, %8 ]
  %9 = getelementptr inbounds double, ptr %1, i64 %indvars.iv
  %10 = load double, ptr %9, align 8, !tbaa !5
  %11 = tail call noundef double @_ZN7qpOASES6getAbsEd(double noundef %10)
  %12 = fcmp olt double %11, 1.000000e+00
  %.042 = select i1 %12, double 1.000000e+00, double %11
  %13 = load double, ptr %9, align 8, !tbaa !5
  %14 = load ptr, ptr %7, align 8, !tbaa !9
  %15 = getelementptr inbounds double, ptr %14, i64 %indvars.iv
  %16 = load double, ptr %15, align 8, !tbaa !5
  %17 = fsub double %13, %16
  %18 = tail call noundef double @_ZN7qpOASES6getAbsEd(double noundef %17)
  %19 = fdiv double %18, %.042
  %20 = fcmp ogt double %19, %.061
  %.1 = select i1 %20, double %19, double %.061
  %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 %._crit_edge, label %8, !llvm.loop !25

._crit_edge:                                      ; preds = %8
  %.not = icmp ne ptr %2, null
  %or.cond = and i1 %.not, %6
  br i1 %or.cond, label %.lr.ph64, label %.loopexit59

.lr.ph64:                                         ; preds = %._crit_edge
  %21 = getelementptr inbounds i8, ptr %0, i64 32
  %wide.trip.count75 = zext nneg i32 %5 to i64
  br label %22

22:                                               ; preds = %.lr.ph64, %22
  %indvars.iv72 = phi i64 [ 0, %.lr.ph64 ], [ %indvars.iv.next73, %22 ]
  %.263 = phi double [ %.1, %.lr.ph64 ], [ %.3, %22 ]
  %23 = getelementptr inbounds double, ptr %2, i64 %indvars.iv72
  %24 = load double, ptr %23, align 8, !tbaa !5
  %25 = tail call noundef double @_ZN7qpOASES6getAbsEd(double noundef %24)
  %26 = fcmp olt double %25, 1.000000e+00
  %.143 = select i1 %26, double 1.000000e+00, double %25
  %27 = load double, ptr %23, align 8, !tbaa !5
  %28 = load ptr, ptr %21, align 8, !tbaa !27
  %29 = getelementptr inbounds double, ptr %28, i64 %indvars.iv72
  %30 = load double, ptr %29, align 8, !tbaa !5
  %31 = fsub double %27, %30
  %32 = tail call noundef double @_ZN7qpOASES6getAbsEd(double noundef %31)
  %33 = fdiv double %32, %.143
  %34 = fcmp ogt double %33, %.263
  %.3 = select i1 %34, double %33, double %.263
  %indvars.iv.next73 = add nuw nsw i64 %indvars.iv72, 1
  %exitcond76.not = icmp eq i64 %indvars.iv.next73, %wide.trip.count75
  br i1 %exitcond76.not, label %.loopexit59, label %22, !llvm.loop !28

.loopexit59:                                      ; preds = %22, %._crit_edge
  %.4 = phi double [ %.1, %._crit_edge ], [ %.3, %22 ]
  %.not57 = icmp ne ptr %3, null
  %or.cond70 = and i1 %.not57, %6
  br i1 %or.cond70, label %.lr.ph68, label %.loopexit

.lr.ph68:                                         ; preds = %.loopexit59
  %35 = getelementptr inbounds i8, ptr %0, i64 40
  %wide.trip.count80 = zext nneg i32 %5 to i64
  br label %36

36:                                               ; preds = %.lr.ph68, %36
  %indvars.iv77 = phi i64 [ 0, %.lr.ph68 ], [ %indvars.iv.next78, %36 ]
  %.567 = phi double [ %.4, %.lr.ph68 ], [ %.6, %36 ]
  %37 = getelementptr inbounds double, ptr %3, i64 %indvars.iv77
  %38 = load double, ptr %37, align 8, !tbaa !5
  %39 = tail call noundef double @_ZN7qpOASES6getAbsEd(double noundef %38)
  %40 = fcmp olt double %39, 1.000000e+00
  %.244 = select i1 %40, double 1.000000e+00, double %39
  %41 = load double, ptr %37, align 8, !tbaa !5
  %42 = load ptr, ptr %35, align 8, !tbaa !29
  %43 = getelementptr inbounds double, ptr %42, i64 %indvars.iv77
  %44 = load double, ptr %43, align 8, !tbaa !5
  %45 = fsub double %41, %44
  %46 = tail call noundef double @_ZN7qpOASES6getAbsEd(double noundef %45)
  %47 = fdiv double %46, %.244
  %48 = fcmp ogt double %47, %.567
  %.6 = select i1 %48, double %47, double %.567
  %indvars.iv.next78 = add nuw nsw i64 %indvars.iv77, 1
  %exitcond81.not = icmp eq i64 %indvars.iv.next78, %wide.trip.count80
  br i1 %exitcond81.not, label %.loopexit, label %36, !llvm.loop !30

.loopexit:                                        ; preds = %36, %4, %.loopexit59
  %.7 = phi double [ %.4, %.loopexit59 ], [ 0.000000e+00, %4 ], [ %.6, %36 ]
  ret double %.7
}

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 = { 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 #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" }

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

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


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