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

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

@.str.4 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [100 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

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.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: mustprogress uwtable
declare dso_local noundef double @_ZN7qpOASES7getNormEPKdii(ptr noundef, i32 noundef, i32 noundef) #2

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN7qpOASES20normaliseConstraintsEiiPdS0_S0_i(i32 noundef %0, i32 noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, i32 noundef %5) #2 {
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca double, align 8
  %17 = alloca i32, align 4
  store i32 %0, ptr %8, align 4, !tbaa !5
  store i32 %1, ptr %9, align 4, !tbaa !5
  store ptr %2, ptr %10, align 8, !tbaa !9
  store ptr %3, ptr %11, align 8, !tbaa !9
  store ptr %4, ptr %12, align 8, !tbaa !9
  store i32 %5, ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  %18 = load i32, ptr %8, align 4, !tbaa !5
  %19 = icmp sle i32 %18, 0
  br i1 %19, label %26, label %20

20:                                               ; preds = %6
  %21 = load i32, ptr %9, align 4, !tbaa !5
  %22 = icmp sle i32 %21, 0
  br i1 %22, label %26, label %23

23:                                               ; preds = %20
  %24 = load ptr, ptr %10, align 8, !tbaa !9
  %25 = icmp eq ptr %24, null
  br i1 %25, label %26, label %29

26:                                               ; preds = %23, %20, %6
  %27 = call noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv()
  %28 = call noundef i32 @_ZN7qpOASES15MessageHandling10throwErrorENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28) %27, i32 noundef 3, ptr noundef null, ptr noundef @.str.4, ptr noundef @.str.5, i64 noundef 972, i32 noundef 1)
  store i32 %28, ptr %7, align 4
  store i32 1, ptr %17, align 4
  br label %157

29:                                               ; preds = %23
  store i32 0, ptr %14, align 4, !tbaa !5
  br label %30

30:                                               ; preds = %153, %29
  %31 = load i32, ptr %14, align 4, !tbaa !5
  %32 = load i32, ptr %9, align 4, !tbaa !5
  %33 = icmp slt i32 %31, %32
  br i1 %33, label %34, label %156

34:                                               ; preds = %30
  %35 = load ptr, ptr %10, align 8, !tbaa !9
  %36 = load i32, ptr %14, align 4, !tbaa !5
  %37 = load i32, ptr %8, align 4, !tbaa !5
  %38 = mul nsw i32 %36, %37
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds double, ptr %35, i64 %39
  %41 = load i32, ptr %8, align 4, !tbaa !5
  %42 = load i32, ptr %13, align 4, !tbaa !5
  %43 = call noundef double @_ZN7qpOASES7getNormEPKdii(ptr noundef %40, i32 noundef %41, i32 noundef %42)
  store double %43, ptr %16, align 8, !tbaa !11
  %44 = load double, ptr %16, align 8, !tbaa !11
  %45 = fcmp ogt double %44, 2.221000e-16
  br i1 %45, label %46, label %89

46:                                               ; preds = %34
  store i32 0, ptr %15, align 4, !tbaa !5
  br label %47

47:                                               ; preds = %63, %46
  %48 = load i32, ptr %15, align 4, !tbaa !5
  %49 = load i32, ptr %8, align 4, !tbaa !5
  %50 = icmp slt i32 %48, %49
  br i1 %50, label %51, label %66

51:                                               ; preds = %47
  %52 = load double, ptr %16, align 8, !tbaa !11
  %53 = load ptr, ptr %10, align 8, !tbaa !9
  %54 = load i32, ptr %14, align 4, !tbaa !5
  %55 = load i32, ptr %8, align 4, !tbaa !5
  %56 = mul nsw i32 %54, %55
  %57 = load i32, ptr %15, align 4, !tbaa !5
  %58 = add nsw i32 %56, %57
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds double, ptr %53, i64 %59
  %61 = load double, ptr %60, align 8, !tbaa !11
  %62 = fdiv double %61, %52
  store double %62, ptr %60, align 8, !tbaa !11
  br label %63

63:                                               ; preds = %51
  %64 = load i32, ptr %15, align 4, !tbaa !5
  %65 = add nsw i32 %64, 1
  store i32 %65, ptr %15, align 4, !tbaa !5
  br label %47, !llvm.loop !13

66:                                               ; preds = %47
  %67 = load ptr, ptr %11, align 8, !tbaa !9
  %68 = icmp ne ptr %67, null
  br i1 %68, label %69, label %77

69:                                               ; preds = %66
  %70 = load double, ptr %16, align 8, !tbaa !11
  %71 = load ptr, ptr %11, align 8, !tbaa !9
  %72 = load i32, ptr %14, align 4, !tbaa !5
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds double, ptr %71, i64 %73
  %75 = load double, ptr %74, align 8, !tbaa !11
  %76 = fdiv double %75, %70
  store double %76, ptr %74, align 8, !tbaa !11
  br label %77

77:                                               ; preds = %69, %66
  %78 = load ptr, ptr %12, align 8, !tbaa !9
  %79 = icmp ne ptr %78, null
  br i1 %79, label %80, label %88

80:                                               ; preds = %77
  %81 = load double, ptr %16, align 8, !tbaa !11
  %82 = load ptr, ptr %12, align 8, !tbaa !9
  %83 = load i32, ptr %14, align 4, !tbaa !5
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds double, ptr %82, i64 %84
  %86 = load double, ptr %85, align 8, !tbaa !11
  %87 = fdiv double %86, %81
  store double %87, ptr %85, align 8, !tbaa !11
  br label %88

88:                                               ; preds = %80, %77
  br label %152

89:                                               ; preds = %34
  %90 = load i32, ptr %13, align 4, !tbaa !5
  %91 = icmp eq i32 %90, 1
  br i1 %91, label %92, label %113

92:                                               ; preds = %89
  store i32 0, ptr %15, align 4, !tbaa !5
  br label %93

93:                                               ; preds = %109, %92
  %94 = load i32, ptr %15, align 4, !tbaa !5
  %95 = load i32, ptr %8, align 4, !tbaa !5
  %96 = icmp slt i32 %94, %95
  br i1 %96, label %97, label %112

97:                                               ; preds = %93
  %98 = load i32, ptr %8, align 4, !tbaa !5
  %99 = sitofp i32 %98 to double
  %100 = fdiv double 1.000000e+00, %99
  %101 = load ptr, ptr %10, align 8, !tbaa !9
  %102 = load i32, ptr %14, align 4, !tbaa !5
  %103 = load i32, ptr %8, align 4, !tbaa !5
  %104 = mul nsw i32 %102, %103
  %105 = load i32, ptr %15, align 4, !tbaa !5
  %106 = add nsw i32 %104, %105
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds double, ptr %101, i64 %107
  store double %100, ptr %108, align 8, !tbaa !11
  br label %109

109:                                              ; preds = %97
  %110 = load i32, ptr %15, align 4, !tbaa !5
  %111 = add nsw i32 %110, 1
  store i32 %111, ptr %15, align 4, !tbaa !5
  br label %93, !llvm.loop !15

112:                                              ; preds = %93
  br label %135

113:                                              ; preds = %89
  store i32 0, ptr %15, align 4, !tbaa !5
  br label %114

114:                                              ; preds = %131, %113
  %115 = load i32, ptr %15, align 4, !tbaa !5
  %116 = load i32, ptr %8, align 4, !tbaa !5
  %117 = icmp slt i32 %115, %116
  br i1 %117, label %118, label %134

118:                                              ; preds = %114
  %119 = load i32, ptr %8, align 4, !tbaa !5
  %120 = sitofp i32 %119 to double
  %121 = call noundef double @_ZN7qpOASES7getSqrtEd(double noundef %120)
  %122 = fdiv double 1.000000e+00, %121
  %123 = load ptr, ptr %10, align 8, !tbaa !9
  %124 = load i32, ptr %14, align 4, !tbaa !5
  %125 = load i32, ptr %8, align 4, !tbaa !5
  %126 = mul nsw i32 %124, %125
  %127 = load i32, ptr %15, align 4, !tbaa !5
  %128 = add nsw i32 %126, %127
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds double, ptr %123, i64 %129
  store double %122, ptr %130, align 8, !tbaa !11
  br label %131

131:                                              ; preds = %118
  %132 = load i32, ptr %15, align 4, !tbaa !5
  %133 = add nsw i32 %132, 1
  store i32 %133, ptr %15, align 4, !tbaa !5
  br label %114, !llvm.loop !16

134:                                              ; preds = %114
  br label %135

135:                                              ; preds = %134, %112
  %136 = load ptr, ptr %11, align 8, !tbaa !9
  %137 = icmp ne ptr %136, null
  br i1 %137, label %138, label %143

138:                                              ; preds = %135
  %139 = load ptr, ptr %11, align 8, !tbaa !9
  %140 = load i32, ptr %14, align 4, !tbaa !5
  %141 = sext i32 %140 to i64
  %142 = getelementptr inbounds double, ptr %139, i64 %141
  store double -1.000000e+20, ptr %142, align 8, !tbaa !11
  br label %143

143:                                              ; preds = %138, %135
  %144 = load ptr, ptr %12, align 8, !tbaa !9
  %145 = icmp ne ptr %144, null
  br i1 %145, label %146, label %151

146:                                              ; preds = %143
  %147 = load ptr, ptr %12, align 8, !tbaa !9
  %148 = load i32, ptr %14, align 4, !tbaa !5
  %149 = sext i32 %148 to i64
  %150 = getelementptr inbounds double, ptr %147, i64 %149
  store double 1.000000e+20, ptr %150, align 8, !tbaa !11
  br label %151

151:                                              ; preds = %146, %143
  br label %152

152:                                              ; preds = %151, %88
  br label %153

153:                                              ; preds = %152
  %154 = load i32, ptr %14, align 4, !tbaa !5
  %155 = add nsw i32 %154, 1
  store i32 %155, ptr %14, align 4, !tbaa !5
  br label %30, !llvm.loop !17

156:                                              ; preds = %30
  store i32 0, ptr %7, align 4
  store i32 1, ptr %17, align 4
  br label %157

157:                                              ; preds = %156, %26
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  %158 = load i32, ptr %7, align 4
  ret i32 %158
}

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 = { 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 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !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 = distinct !{!16, !14}
!17 = distinct !{!17, !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.4 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [100 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: mustprogress uwtable
declare dso_local noundef double @_ZN7qpOASES7getNormEPKdii(ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZN7qpOASES7getSqrtEd(double noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN7qpOASES20normaliseConstraintsEiiPdS0_S0_i(i32 noundef %0, i32 noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, i32 noundef %5) local_unnamed_addr #1 {
  %7 = icmp slt i32 %0, 1
  %8 = icmp slt i32 %1, 1
  %or.cond = or i1 %7, %8
  %9 = icmp eq ptr %2, null
  %or.cond3 = or i1 %or.cond, %9
  br i1 %or.cond3, label %67, label %.preheader70

.preheader70:                                     ; preds = %6
  %10 = icmp eq i32 %5, 1
  %11 = uitofp nneg i32 %0 to double
  %12 = fdiv double 1.000000e+00, %11
  %.not = icmp eq ptr %3, null
  %.not64 = icmp eq ptr %4, null
  %13 = zext nneg i32 %0 to i64
  %wide.trip.count120 = zext nneg i32 %1 to i64
  br i1 %10, label %.preheader70.split.us.preheader, label %.preheader70.split.split.us.preheader

.preheader70.split.split.us.preheader:            ; preds = %.preheader70
  %min.iters.check = icmp ult i32 %0, 2
  %n.vec = and i64 %13, 2147483646
  %cmp.n = icmp eq i64 %n.vec, %13
  br label %.preheader70.split.split.us

.preheader70.split.us.preheader:                  ; preds = %.preheader70
  %min.iters.check146 = icmp ult i32 %0, 4
  %n.vec149 = and i64 %13, 2147483644
  %broadcast.splatinsert153 = insertelement <2 x double> poison, double %12, i64 0
  %broadcast.splat154 = shufflevector <2 x double> %broadcast.splatinsert153, <2 x double> poison, <2 x i32> zeroinitializer
  %cmp.n156 = icmp eq i64 %n.vec149, %13
  %min.iters.check132 = icmp ult i32 %0, 2
  %n.vec135 = and i64 %13, 2147483646
  %cmp.n143 = icmp eq i64 %n.vec135, %13
  br label %.preheader70.split.us

.preheader70.split.us:                            ; preds = %.preheader70.split.us.preheader, %38
  %indvars.iv117 = phi i64 [ %indvars.iv.next118, %38 ], [ 0, %.preheader70.split.us.preheader ]
  %14 = mul nuw nsw i64 %indvars.iv117, %13
  %15 = getelementptr inbounds double, ptr %2, i64 %14
  %16 = tail call noundef double @_ZN7qpOASES7getNormEPKdii(ptr noundef %15, i32 noundef %0, i32 noundef 1)
  %17 = fcmp ogt double %16, 2.221000e-16
  %invariant.gep127 = getelementptr inbounds double, ptr %2, i64 %14
  br i1 %17, label %.lr.ph76.us.preheader, label %.lr.ph74.us.preheader

.lr.ph74.us.preheader:                            ; preds = %.preheader70.split.us
  br i1 %min.iters.check146, label %.lr.ph74.us.preheader158, label %vector.body151

.lr.ph74.us.preheader158:                         ; preds = %middle.block144, %.lr.ph74.us.preheader
  %indvars.iv107.ph = phi i64 [ 0, %.lr.ph74.us.preheader ], [ %n.vec149, %middle.block144 ]
  br label %.lr.ph74.us

vector.body151:                                   ; preds = %.lr.ph74.us.preheader, %vector.body151
  %index152 = phi i64 [ %index.next155, %vector.body151 ], [ 0, %.lr.ph74.us.preheader ]
  %18 = getelementptr inbounds double, ptr %invariant.gep127, i64 %index152
  %19 = getelementptr inbounds i8, ptr %18, i64 16
  store <2 x double> %broadcast.splat154, ptr %18, align 8, !tbaa !5
  store <2 x double> %broadcast.splat154, ptr %19, align 8, !tbaa !5
  %index.next155 = add nuw i64 %index152, 4
  %20 = icmp eq i64 %index.next155, %n.vec149
  br i1 %20, label %middle.block144, label %vector.body151, !llvm.loop !9

middle.block144:                                  ; preds = %vector.body151
  br i1 %cmp.n156, label %.loopexit.us, label %.lr.ph74.us.preheader158

.lr.ph76.us.preheader:                            ; preds = %.preheader70.split.us
  br i1 %min.iters.check132, label %.lr.ph76.us.preheader157, label %vector.ph133

.lr.ph76.us.preheader157:                         ; preds = %middle.block130, %.lr.ph76.us.preheader
  %indvars.iv112.ph = phi i64 [ 0, %.lr.ph76.us.preheader ], [ %n.vec135, %middle.block130 ]
  br label %.lr.ph76.us

vector.ph133:                                     ; preds = %.lr.ph76.us.preheader
  %broadcast.splatinsert140 = insertelement <2 x double> poison, double %16, i64 0
  %broadcast.splat141 = shufflevector <2 x double> %broadcast.splatinsert140, <2 x double> poison, <2 x i32> zeroinitializer
  br label %vector.body137

vector.body137:                                   ; preds = %vector.body137, %vector.ph133
  %index138 = phi i64 [ 0, %vector.ph133 ], [ %index.next142, %vector.body137 ]
  %21 = getelementptr inbounds double, ptr %invariant.gep127, i64 %index138
  %wide.load139 = load <2 x double>, ptr %21, align 8, !tbaa !5
  %22 = fdiv <2 x double> %wide.load139, %broadcast.splat141
  store <2 x double> %22, ptr %21, align 8, !tbaa !5
  %index.next142 = add nuw i64 %index138, 2
  %23 = icmp eq i64 %index.next142, %n.vec135
  br i1 %23, label %middle.block130, label %vector.body137, !llvm.loop !13

middle.block130:                                  ; preds = %vector.body137
  br i1 %cmp.n143, label %._crit_edge.us, label %.lr.ph76.us.preheader157

24:                                               ; preds = %.loopexit.us
  %25 = getelementptr inbounds double, ptr %3, i64 %indvars.iv117
  store double -1.000000e+20, ptr %25, align 8, !tbaa !5
  br label %26

26:                                               ; preds = %24, %.loopexit.us
  br i1 %.not64, label %38, label %27

27:                                               ; preds = %26
  %28 = getelementptr inbounds double, ptr %4, i64 %indvars.iv117
  store double 1.000000e+20, ptr %28, align 8, !tbaa !5
  br label %38

.lr.ph74.us:                                      ; preds = %.lr.ph74.us.preheader158, %.lr.ph74.us
  %indvars.iv107 = phi i64 [ %indvars.iv.next108, %.lr.ph74.us ], [ %indvars.iv107.ph, %.lr.ph74.us.preheader158 ]
  %gep126 = getelementptr inbounds double, ptr %invariant.gep127, i64 %indvars.iv107
  store double %12, ptr %gep126, align 8, !tbaa !5
  %indvars.iv.next108 = add nuw nsw i64 %indvars.iv107, 1
  %exitcond111.not = icmp eq i64 %indvars.iv.next108, %13
  br i1 %exitcond111.not, label %.loopexit.us, label %.lr.ph74.us, !llvm.loop !14

._crit_edge.us:                                   ; preds = %.lr.ph76.us, %middle.block130
  br i1 %.not, label %33, label %29

29:                                               ; preds = %._crit_edge.us
  %30 = getelementptr inbounds double, ptr %3, i64 %indvars.iv117
  %31 = load double, ptr %30, align 8, !tbaa !5
  %32 = fdiv double %31, %16
  store double %32, ptr %30, align 8, !tbaa !5
  br label %33

33:                                               ; preds = %29, %._crit_edge.us
  br i1 %.not64, label %38, label %34

34:                                               ; preds = %33
  %35 = getelementptr inbounds double, ptr %4, i64 %indvars.iv117
  %36 = load double, ptr %35, align 8, !tbaa !5
  %37 = fdiv double %36, %16
  store double %37, ptr %35, align 8, !tbaa !5
  br label %38

38:                                               ; preds = %34, %33, %27, %26
  %indvars.iv.next118 = add nuw nsw i64 %indvars.iv117, 1
  %exitcond121.not = icmp eq i64 %indvars.iv.next118, %wide.trip.count120
  br i1 %exitcond121.not, label %.loopexit71, label %.preheader70.split.us, !llvm.loop !15

.lr.ph76.us:                                      ; preds = %.lr.ph76.us.preheader157, %.lr.ph76.us
  %indvars.iv112 = phi i64 [ %indvars.iv.next113, %.lr.ph76.us ], [ %indvars.iv112.ph, %.lr.ph76.us.preheader157 ]
  %gep128 = getelementptr inbounds double, ptr %invariant.gep127, i64 %indvars.iv112
  %39 = load double, ptr %gep128, align 8, !tbaa !5
  %40 = fdiv double %39, %16
  store double %40, ptr %gep128, align 8, !tbaa !5
  %indvars.iv.next113 = add nuw nsw i64 %indvars.iv112, 1
  %exitcond116.not = icmp eq i64 %indvars.iv.next113, %13
  br i1 %exitcond116.not, label %._crit_edge.us, label %.lr.ph76.us, !llvm.loop !16

.loopexit.us:                                     ; preds = %.lr.ph74.us, %middle.block144
  br i1 %.not, label %26, label %24

.preheader70.split.split.us:                      ; preds = %.preheader70.split.split.us.preheader, %64
  %indvars.iv102 = phi i64 [ %indvars.iv.next103, %64 ], [ 0, %.preheader70.split.split.us.preheader ]
  %41 = mul nuw nsw i64 %indvars.iv102, %13
  %42 = getelementptr inbounds double, ptr %2, i64 %41
  %43 = tail call noundef double @_ZN7qpOASES7getNormEPKdii(ptr noundef %42, i32 noundef %0, i32 noundef %5)
  %44 = fcmp ogt double %43, 2.221000e-16
  %invariant.gep123 = getelementptr inbounds double, ptr %2, i64 %41
  br i1 %44, label %.lr.ph76.us81.preheader, label %.preheader68.us

.lr.ph76.us81.preheader:                          ; preds = %.preheader70.split.split.us
  br i1 %min.iters.check, label %.lr.ph76.us81.preheader159, label %vector.ph

.lr.ph76.us81.preheader159:                       ; preds = %middle.block, %.lr.ph76.us81.preheader
  %indvars.iv97.ph = phi i64 [ 0, %.lr.ph76.us81.preheader ], [ %n.vec, %middle.block ]
  br label %.lr.ph76.us81

vector.ph:                                        ; preds = %.lr.ph76.us81.preheader
  %broadcast.splatinsert = insertelement <2 x double> poison, double %43, i64 0
  %broadcast.splat = shufflevector <2 x double> %broadcast.splatinsert, <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 ]
  %45 = getelementptr inbounds double, ptr %invariant.gep123, i64 %index
  %wide.load = load <2 x double>, ptr %45, align 8, !tbaa !5
  %46 = fdiv <2 x double> %wide.load, %broadcast.splat
  store <2 x double> %46, ptr %45, align 8, !tbaa !5
  %index.next = add nuw i64 %index, 2
  %47 = icmp eq i64 %index.next, %n.vec
  br i1 %47, label %middle.block, label %vector.body, !llvm.loop !17

middle.block:                                     ; preds = %vector.body
  br i1 %cmp.n, label %._crit_edge.us82, label %.lr.ph76.us81.preheader159

.preheader68.us:                                  ; preds = %.preheader70.split.split.us, %.preheader68.us
  %indvars.iv92 = phi i64 [ %indvars.iv.next93, %.preheader68.us ], [ 0, %.preheader70.split.split.us ]
  %48 = tail call noundef double @_ZN7qpOASES7getSqrtEd(double noundef %11)
  %49 = fdiv double 1.000000e+00, %48
  %gep = getelementptr inbounds double, ptr %invariant.gep123, i64 %indvars.iv92
  store double %49, ptr %gep, align 8, !tbaa !5
  %indvars.iv.next93 = add nuw nsw i64 %indvars.iv92, 1
  %exitcond96.not = icmp eq i64 %indvars.iv.next93, %13
  br i1 %exitcond96.not, label %..loopexit69_crit_edge.us, label %.preheader68.us, !llvm.loop !18

50:                                               ; preds = %..loopexit69_crit_edge.us
  %51 = getelementptr inbounds double, ptr %3, i64 %indvars.iv102
  store double -1.000000e+20, ptr %51, align 8, !tbaa !5
  br label %52

52:                                               ; preds = %..loopexit69_crit_edge.us, %50
  br i1 %.not64, label %64, label %53

53:                                               ; preds = %52
  %54 = getelementptr inbounds double, ptr %4, i64 %indvars.iv102
  store double 1.000000e+20, ptr %54, align 8, !tbaa !5
  br label %64

._crit_edge.us82:                                 ; preds = %.lr.ph76.us81, %middle.block
  br i1 %.not, label %59, label %55

55:                                               ; preds = %._crit_edge.us82
  %56 = getelementptr inbounds double, ptr %3, i64 %indvars.iv102
  %57 = load double, ptr %56, align 8, !tbaa !5
  %58 = fdiv double %57, %43
  store double %58, ptr %56, align 8, !tbaa !5
  br label %59

59:                                               ; preds = %55, %._crit_edge.us82
  br i1 %.not64, label %64, label %60

60:                                               ; preds = %59
  %61 = getelementptr inbounds double, ptr %4, i64 %indvars.iv102
  %62 = load double, ptr %61, align 8, !tbaa !5
  %63 = fdiv double %62, %43
  store double %63, ptr %61, align 8, !tbaa !5
  br label %64

64:                                               ; preds = %60, %59, %53, %52
  %indvars.iv.next103 = add nuw nsw i64 %indvars.iv102, 1
  %exitcond106.not = icmp eq i64 %indvars.iv.next103, %wide.trip.count120
  br i1 %exitcond106.not, label %.loopexit71, label %.preheader70.split.split.us, !llvm.loop !15

.lr.ph76.us81:                                    ; preds = %.lr.ph76.us81.preheader159, %.lr.ph76.us81
  %indvars.iv97 = phi i64 [ %indvars.iv.next98, %.lr.ph76.us81 ], [ %indvars.iv97.ph, %.lr.ph76.us81.preheader159 ]
  %gep124 = getelementptr inbounds double, ptr %invariant.gep123, i64 %indvars.iv97
  %65 = load double, ptr %gep124, align 8, !tbaa !5
  %66 = fdiv double %65, %43
  store double %66, ptr %gep124, align 8, !tbaa !5
  %indvars.iv.next98 = add nuw nsw i64 %indvars.iv97, 1
  %exitcond101.not = icmp eq i64 %indvars.iv.next98, %13
  br i1 %exitcond101.not, label %._crit_edge.us82, label %.lr.ph76.us81, !llvm.loop !19

..loopexit69_crit_edge.us:                        ; preds = %.preheader68.us
  br i1 %.not, label %52, label %50

67:                                               ; preds = %6
  %68 = tail call noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv()
  %69 = tail call noundef i32 @_ZN7qpOASES15MessageHandling10throwErrorENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28) %68, i32 noundef 3, ptr noundef null, ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.5, i64 noundef 972, i32 noundef 1)
  br label %.loopexit71

.loopexit71:                                      ; preds = %64, %38, %67
  %.0 = phi i32 [ %69, %67 ], [ 0, %38 ], [ 0, %64 ]
  ret i32 %.0
}

attributes #0 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress 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" }

!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 = distinct !{!9, !10, !11, !12}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!"llvm.loop.isvectorized", i32 1}
!12 = !{!"llvm.loop.unroll.runtime.disable"}
!13 = distinct !{!13, !10, !11, !12}
!14 = distinct !{!14, !10, !12, !11}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10, !12, !11}
!17 = distinct !{!17, !10, !11, !12}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !10, !12, !11}


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