; LLVM IR from cvxgrp/scs :: src/normalize.ll (scs_normalize_b_c)

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

%struct.ScsScaling = type { ptr, ptr, i32, i32, double, double }

; Function Attrs: nounwind uwtable
define dso_local void @_scs_normalize_b_c(ptr noundef %0, ptr noundef %1, ptr noundef %2) #0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca double, align 8
  %9 = alloca double, align 8
  %10 = alloca double, align 8
  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
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %11

11:                                               ; preds = %31, %3
  %12 = load i32, ptr %7, align 4, !tbaa !9
  %13 = load ptr, ptr %4, align 8, !tbaa !5
  %14 = getelementptr inbounds %struct.ScsScaling, ptr %13, i32 0, i32 3
  %15 = load i32, ptr %14, align 4, !tbaa !11
  %16 = icmp slt i32 %12, %15
  br i1 %16, label %17, label %34

17:                                               ; preds = %11
  %18 = load ptr, ptr %4, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct.ScsScaling, ptr %18, i32 0, i32 1
  %20 = load ptr, ptr %19, align 8, !tbaa !14
  %21 = load i32, ptr %7, align 4, !tbaa !9
  %22 = sext i32 %21 to i64
  %23 = getelementptr inbounds double, ptr %20, i64 %22
  %24 = load double, ptr %23, align 8, !tbaa !15
  %25 = load ptr, ptr %6, align 8, !tbaa !5
  %26 = load i32, ptr %7, align 4, !tbaa !9
  %27 = sext i32 %26 to i64
  %28 = getelementptr inbounds double, ptr %25, i64 %27
  %29 = load double, ptr %28, align 8, !tbaa !15
  %30 = fmul double %29, %24
  store double %30, ptr %28, align 8, !tbaa !15
  br label %31

31:                                               ; preds = %17
  %32 = load i32, ptr %7, align 4, !tbaa !9
  %33 = add nsw i32 %32, 1
  store i32 %33, ptr %7, align 4, !tbaa !9
  br label %11, !llvm.loop !16

34:                                               ; preds = %11
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %35

35:                                               ; preds = %55, %34
  %36 = load i32, ptr %7, align 4, !tbaa !9
  %37 = load ptr, ptr %4, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.ScsScaling, ptr %37, i32 0, i32 2
  %39 = load i32, ptr %38, align 8, !tbaa !18
  %40 = icmp slt i32 %36, %39
  br i1 %40, label %41, label %58

41:                                               ; preds = %35
  %42 = load ptr, ptr %4, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.ScsScaling, ptr %42, i32 0, i32 0
  %44 = load ptr, ptr %43, align 8, !tbaa !19
  %45 = load i32, ptr %7, align 4, !tbaa !9
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds double, ptr %44, i64 %46
  %48 = load double, ptr %47, align 8, !tbaa !15
  %49 = load ptr, ptr %5, align 8, !tbaa !5
  %50 = load i32, ptr %7, align 4, !tbaa !9
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds double, ptr %49, i64 %51
  %53 = load double, ptr %52, align 8, !tbaa !15
  %54 = fmul double %53, %48
  store double %54, ptr %52, align 8, !tbaa !15
  br label %55

55:                                               ; preds = %41
  %56 = load i32, ptr %7, align 4, !tbaa !9
  %57 = add nsw i32 %56, 1
  store i32 %57, ptr %7, align 4, !tbaa !9
  br label %35, !llvm.loop !20

58:                                               ; preds = %35
  %59 = load ptr, ptr %6, align 8, !tbaa !5
  %60 = load ptr, ptr %4, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.ScsScaling, ptr %60, i32 0, i32 3
  %62 = load i32, ptr %61, align 4, !tbaa !11
  %63 = call double @_scs_norm_inf(ptr noundef %59, i32 noundef %62)
  store double %63, ptr %9, align 8, !tbaa !15
  %64 = load ptr, ptr %5, align 8, !tbaa !5
  %65 = load ptr, ptr %4, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.ScsScaling, ptr %65, i32 0, i32 2
  %67 = load i32, ptr %66, align 8, !tbaa !18
  %68 = call double @_scs_norm_inf(ptr noundef %64, i32 noundef %67)
  store double %68, ptr %10, align 8, !tbaa !15
  %69 = load double, ptr %9, align 8, !tbaa !15
  %70 = load double, ptr %10, align 8, !tbaa !15
  %71 = fcmp ogt double %69, %70
  br i1 %71, label %72, label %74

72:                                               ; preds = %58
  %73 = load double, ptr %9, align 8, !tbaa !15
  br label %76

74:                                               ; preds = %58
  %75 = load double, ptr %10, align 8, !tbaa !15
  br label %76

76:                                               ; preds = %74, %72
  %77 = phi double [ %73, %72 ], [ %75, %74 ]
  store double %77, ptr %8, align 8, !tbaa !15
  %78 = load double, ptr %8, align 8, !tbaa !15
  %79 = fcmp olt double %78, 1.000000e-04
  br i1 %79, label %80, label %81

80:                                               ; preds = %76
  br label %83

81:                                               ; preds = %76
  %82 = load double, ptr %8, align 8, !tbaa !15
  br label %83

83:                                               ; preds = %81, %80
  %84 = phi double [ 1.000000e+00, %80 ], [ %82, %81 ]
  store double %84, ptr %8, align 8, !tbaa !15
  %85 = load double, ptr %8, align 8, !tbaa !15
  %86 = fcmp ogt double %85, 1.000000e+04
  br i1 %86, label %87, label %88

87:                                               ; preds = %83
  br label %90

88:                                               ; preds = %83
  %89 = load double, ptr %8, align 8, !tbaa !15
  br label %90

90:                                               ; preds = %88, %87
  %91 = phi double [ 1.000000e+04, %87 ], [ %89, %88 ]
  store double %91, ptr %8, align 8, !tbaa !15
  %92 = load double, ptr %8, align 8, !tbaa !15
  %93 = fcmp olt double %92, 1.000000e-18
  br i1 %93, label %94, label %95

94:                                               ; preds = %90
  br label %98

95:                                               ; preds = %90
  %96 = load double, ptr %8, align 8, !tbaa !15
  %97 = fdiv double 1.000000e+00, %96
  br label %98

98:                                               ; preds = %95, %94
  %99 = phi double [ 0x43ABC16D674EC7FF, %94 ], [ %97, %95 ]
  store double %99, ptr %8, align 8, !tbaa !15
  %100 = load ptr, ptr %6, align 8, !tbaa !5
  %101 = load double, ptr %8, align 8, !tbaa !15
  %102 = load ptr, ptr %4, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.ScsScaling, ptr %102, i32 0, i32 3
  %104 = load i32, ptr %103, align 4, !tbaa !11
  call void @_scs_scale_array(ptr noundef %100, double noundef %101, i32 noundef %104)
  %105 = load ptr, ptr %5, align 8, !tbaa !5
  %106 = load double, ptr %8, align 8, !tbaa !15
  %107 = load ptr, ptr %4, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.ScsScaling, ptr %107, i32 0, i32 2
  %109 = load i32, ptr %108, align 8, !tbaa !18
  call void @_scs_scale_array(ptr noundef %105, double noundef %106, i32 noundef %109)
  %110 = load double, ptr %8, align 8, !tbaa !15
  %111 = load ptr, ptr %4, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.ScsScaling, ptr %111, i32 0, i32 4
  store double %110, ptr %112, align 8, !tbaa !21
  %113 = load double, ptr %8, align 8, !tbaa !15
  %114 = load ptr, ptr %4, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.ScsScaling, ptr %114, i32 0, i32 5
  store double %113, ptr %115, align 8, !tbaa !22
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #3
  ret void
}

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

declare double @_scs_norm_inf(ptr noundef, i32 noundef) #2

declare void @_scs_scale_array(ptr noundef, double noundef, i32 noundef) #2

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 20}
!12 = !{!"", !6, i64 0, !6, i64 8, !10, i64 16, !10, i64 20, !13, i64 24, !13, i64 32}
!13 = !{!"double", !7, i64 0}
!14 = !{!12, !6, i64 8}
!15 = !{!13, !13, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = !{!12, !10, i64 16}
!19 = !{!12, !6, i64 0}
!20 = distinct !{!20, !17}
!21 = !{!12, !13, i64 24}
!22 = !{!12, !13, i64 32}


; 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: nounwind uwtable
define dso_local void @_scs_normalize_b_c(ptr nocapture noundef %0, ptr noundef %1, ptr noundef %2) local_unnamed_addr #0 {
  %4 = getelementptr inbounds i8, ptr %0, i64 20
  %5 = load i32, ptr %4, align 4, !tbaa !5
  %6 = icmp sgt i32 %5, 0
  br i1 %6, label %.lr.ph, label %.preheader

.lr.ph:                                           ; preds = %3
  %7 = getelementptr inbounds i8, ptr %0, i64 8
  %8 = load ptr, ptr %7, align 8, !tbaa !12
  %wide.trip.count = zext nneg i32 %5 to i64
  %min.iters.check = icmp ult i32 %5, 6
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.memcheck

scalar.ph.preheader:                              ; preds = %middle.block, %vector.memcheck, %.lr.ph
  %indvars.iv.ph = phi i64 [ 0, %vector.memcheck ], [ 0, %.lr.ph ], [ %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 %scalar.ph.prol.loopexit, label %scalar.ph.prol

scalar.ph.prol:                                   ; preds = %scalar.ph.preheader, %scalar.ph.prol
  %indvars.iv.prol = phi i64 [ %indvars.iv.next.prol, %scalar.ph.prol ], [ %indvars.iv.ph, %scalar.ph.preheader ]
  %prol.iter = phi i64 [ %prol.iter.next, %scalar.ph.prol ], [ 0, %scalar.ph.preheader ]
  %9 = getelementptr inbounds double, ptr %8, i64 %indvars.iv.prol
  %10 = load double, ptr %9, align 8, !tbaa !13
  %11 = getelementptr inbounds double, ptr %2, i64 %indvars.iv.prol
  %12 = load double, ptr %11, align 8, !tbaa !13
  %13 = fmul double %10, %12
  store double %13, ptr %11, align 8, !tbaa !13
  %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 %scalar.ph.prol.loopexit, label %scalar.ph.prol, !llvm.loop !14

scalar.ph.prol.loopexit:                          ; preds = %scalar.ph.prol, %scalar.ph.preheader
  %indvars.iv.unr = phi i64 [ %indvars.iv.ph, %scalar.ph.preheader ], [ %indvars.iv.next.prol, %scalar.ph.prol ]
  %14 = sub nsw i64 %indvars.iv.ph, %wide.trip.count
  %15 = icmp ugt i64 %14, -4
  br i1 %15, label %.preheader, label %scalar.ph

vector.memcheck:                                  ; preds = %.lr.ph
  %16 = shl nuw nsw i64 %wide.trip.count, 3
  %scevgep = getelementptr i8, ptr %2, i64 %16
  %scevgep48 = getelementptr i8, ptr %8, i64 %16
  %bound0 = icmp ugt ptr %scevgep48, %2
  %bound1 = icmp ult ptr %8, %scevgep
  %found.conflict = and i1 %bound0, %bound1
  br i1 %found.conflict, label %scalar.ph.preheader, label %vector.ph

vector.ph:                                        ; preds = %vector.memcheck
  %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 ]
  %17 = getelementptr inbounds double, ptr %8, i64 %index
  %18 = getelementptr inbounds i8, ptr %17, i64 16
  %wide.load = load <2 x double>, ptr %17, align 8, !tbaa !13, !alias.scope !16
  %wide.load49 = load <2 x double>, ptr %18, align 8, !tbaa !13, !alias.scope !16
  %19 = getelementptr inbounds double, ptr %2, i64 %index
  %20 = getelementptr inbounds i8, ptr %19, i64 16
  %wide.load50 = load <2 x double>, ptr %19, align 8, !tbaa !13, !alias.scope !19, !noalias !16
  %wide.load51 = load <2 x double>, ptr %20, align 8, !tbaa !13, !alias.scope !19, !noalias !16
  %21 = fmul <2 x double> %wide.load, %wide.load50
  %22 = fmul <2 x double> %wide.load49, %wide.load51
  store <2 x double> %21, ptr %19, align 8, !tbaa !13, !alias.scope !19, !noalias !16
  store <2 x double> %22, ptr %20, align 8, !tbaa !13, !alias.scope !19, !noalias !16
  %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 !21

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

.preheader:                                       ; preds = %scalar.ph.prol.loopexit, %scalar.ph, %middle.block, %3
  %24 = getelementptr inbounds i8, ptr %0, i64 16
  %25 = load i32, ptr %24, align 8, !tbaa !25
  %26 = icmp sgt i32 %25, 0
  br i1 %26, label %.lr.ph41, label %._crit_edge

.lr.ph41:                                         ; preds = %.preheader
  %27 = load ptr, ptr %0, align 8, !tbaa !26
  %wide.trip.count46 = zext nneg i32 %25 to i64
  %min.iters.check60 = icmp ult i32 %25, 6
  br i1 %min.iters.check60, label %scalar.ph59.preheader, label %vector.memcheck52

scalar.ph59.preheader:                            ; preds = %middle.block58, %vector.memcheck52, %.lr.ph41
  %indvars.iv43.ph = phi i64 [ 0, %vector.memcheck52 ], [ 0, %.lr.ph41 ], [ %n.vec63, %middle.block58 ]
  %xtraiter73 = and i64 %wide.trip.count46, 3
  %lcmp.mod74.not = icmp eq i64 %xtraiter73, 0
  br i1 %lcmp.mod74.not, label %scalar.ph59.prol.loopexit, label %scalar.ph59.prol

scalar.ph59.prol:                                 ; preds = %scalar.ph59.preheader, %scalar.ph59.prol
  %indvars.iv43.prol = phi i64 [ %indvars.iv.next44.prol, %scalar.ph59.prol ], [ %indvars.iv43.ph, %scalar.ph59.preheader ]
  %prol.iter75 = phi i64 [ %prol.iter75.next, %scalar.ph59.prol ], [ 0, %scalar.ph59.preheader ]
  %28 = getelementptr inbounds double, ptr %27, i64 %indvars.iv43.prol
  %29 = load double, ptr %28, align 8, !tbaa !13
  %30 = getelementptr inbounds double, ptr %1, i64 %indvars.iv43.prol
  %31 = load double, ptr %30, align 8, !tbaa !13
  %32 = fmul double %29, %31
  store double %32, ptr %30, align 8, !tbaa !13
  %indvars.iv.next44.prol = add nuw nsw i64 %indvars.iv43.prol, 1
  %prol.iter75.next = add i64 %prol.iter75, 1
  %prol.iter75.cmp.not = icmp eq i64 %prol.iter75.next, %xtraiter73
  br i1 %prol.iter75.cmp.not, label %scalar.ph59.prol.loopexit, label %scalar.ph59.prol, !llvm.loop !27

scalar.ph59.prol.loopexit:                        ; preds = %scalar.ph59.prol, %scalar.ph59.preheader
  %indvars.iv43.unr = phi i64 [ %indvars.iv43.ph, %scalar.ph59.preheader ], [ %indvars.iv.next44.prol, %scalar.ph59.prol ]
  %33 = sub nsw i64 %indvars.iv43.ph, %wide.trip.count46
  %34 = icmp ugt i64 %33, -4
  br i1 %34, label %._crit_edge, label %scalar.ph59

vector.memcheck52:                                ; preds = %.lr.ph41
  %35 = shl nuw nsw i64 %wide.trip.count46, 3
  %scevgep53 = getelementptr i8, ptr %1, i64 %35
  %scevgep54 = getelementptr i8, ptr %27, i64 %35
  %bound055 = icmp ugt ptr %scevgep54, %1
  %bound156 = icmp ult ptr %27, %scevgep53
  %found.conflict57 = and i1 %bound055, %bound156
  br i1 %found.conflict57, label %scalar.ph59.preheader, label %vector.ph61

vector.ph61:                                      ; preds = %vector.memcheck52
  %n.vec63 = and i64 %wide.trip.count46, 2147483644
  br label %vector.body65

vector.body65:                                    ; preds = %vector.body65, %vector.ph61
  %index66 = phi i64 [ 0, %vector.ph61 ], [ %index.next71, %vector.body65 ]
  %36 = getelementptr inbounds double, ptr %27, i64 %index66
  %37 = getelementptr inbounds i8, ptr %36, i64 16
  %wide.load67 = load <2 x double>, ptr %36, align 8, !tbaa !13, !alias.scope !28
  %wide.load68 = load <2 x double>, ptr %37, align 8, !tbaa !13, !alias.scope !28
  %38 = getelementptr inbounds double, ptr %1, i64 %index66
  %39 = getelementptr inbounds i8, ptr %38, i64 16
  %wide.load69 = load <2 x double>, ptr %38, align 8, !tbaa !13, !alias.scope !31, !noalias !28
  %wide.load70 = load <2 x double>, ptr %39, align 8, !tbaa !13, !alias.scope !31, !noalias !28
  %40 = fmul <2 x double> %wide.load67, %wide.load69
  %41 = fmul <2 x double> %wide.load68, %wide.load70
  store <2 x double> %40, ptr %38, align 8, !tbaa !13, !alias.scope !31, !noalias !28
  store <2 x double> %41, ptr %39, align 8, !tbaa !13, !alias.scope !31, !noalias !28
  %index.next71 = add nuw i64 %index66, 4
  %42 = icmp eq i64 %index.next71, %n.vec63
  br i1 %42, label %middle.block58, label %vector.body65, !llvm.loop !33

middle.block58:                                   ; preds = %vector.body65
  %cmp.n72 = icmp eq i64 %n.vec63, %wide.trip.count46
  br i1 %cmp.n72, label %._crit_edge, label %scalar.ph59.preheader

scalar.ph:                                        ; preds = %scalar.ph.prol.loopexit, %scalar.ph
  %indvars.iv = phi i64 [ %indvars.iv.next.3, %scalar.ph ], [ %indvars.iv.unr, %scalar.ph.prol.loopexit ]
  %43 = getelementptr inbounds double, ptr %8, i64 %indvars.iv
  %44 = load double, ptr %43, align 8, !tbaa !13
  %45 = getelementptr inbounds double, ptr %2, i64 %indvars.iv
  %46 = load double, ptr %45, align 8, !tbaa !13
  %47 = fmul double %44, %46
  store double %47, ptr %45, align 8, !tbaa !13
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %48 = getelementptr inbounds double, ptr %8, i64 %indvars.iv.next
  %49 = load double, ptr %48, align 8, !tbaa !13
  %50 = getelementptr inbounds double, ptr %2, i64 %indvars.iv.next
  %51 = load double, ptr %50, align 8, !tbaa !13
  %52 = fmul double %49, %51
  store double %52, ptr %50, align 8, !tbaa !13
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %53 = getelementptr inbounds double, ptr %8, i64 %indvars.iv.next.1
  %54 = load double, ptr %53, align 8, !tbaa !13
  %55 = getelementptr inbounds double, ptr %2, i64 %indvars.iv.next.1
  %56 = load double, ptr %55, align 8, !tbaa !13
  %57 = fmul double %54, %56
  store double %57, ptr %55, align 8, !tbaa !13
  %indvars.iv.next.2 = add nuw nsw i64 %indvars.iv, 3
  %58 = getelementptr inbounds double, ptr %8, i64 %indvars.iv.next.2
  %59 = load double, ptr %58, align 8, !tbaa !13
  %60 = getelementptr inbounds double, ptr %2, i64 %indvars.iv.next.2
  %61 = load double, ptr %60, align 8, !tbaa !13
  %62 = fmul double %59, %61
  store double %62, ptr %60, align 8, !tbaa !13
  %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 %.preheader, label %scalar.ph, !llvm.loop !34

scalar.ph59:                                      ; preds = %scalar.ph59.prol.loopexit, %scalar.ph59
  %indvars.iv43 = phi i64 [ %indvars.iv.next44.3, %scalar.ph59 ], [ %indvars.iv43.unr, %scalar.ph59.prol.loopexit ]
  %63 = getelementptr inbounds double, ptr %27, i64 %indvars.iv43
  %64 = load double, ptr %63, align 8, !tbaa !13
  %65 = getelementptr inbounds double, ptr %1, i64 %indvars.iv43
  %66 = load double, ptr %65, align 8, !tbaa !13
  %67 = fmul double %64, %66
  store double %67, ptr %65, align 8, !tbaa !13
  %indvars.iv.next44 = add nuw nsw i64 %indvars.iv43, 1
  %68 = getelementptr inbounds double, ptr %27, i64 %indvars.iv.next44
  %69 = load double, ptr %68, align 8, !tbaa !13
  %70 = getelementptr inbounds double, ptr %1, i64 %indvars.iv.next44
  %71 = load double, ptr %70, align 8, !tbaa !13
  %72 = fmul double %69, %71
  store double %72, ptr %70, align 8, !tbaa !13
  %indvars.iv.next44.1 = add nuw nsw i64 %indvars.iv43, 2
  %73 = getelementptr inbounds double, ptr %27, i64 %indvars.iv.next44.1
  %74 = load double, ptr %73, align 8, !tbaa !13
  %75 = getelementptr inbounds double, ptr %1, i64 %indvars.iv.next44.1
  %76 = load double, ptr %75, align 8, !tbaa !13
  %77 = fmul double %74, %76
  store double %77, ptr %75, align 8, !tbaa !13
  %indvars.iv.next44.2 = add nuw nsw i64 %indvars.iv43, 3
  %78 = getelementptr inbounds double, ptr %27, i64 %indvars.iv.next44.2
  %79 = load double, ptr %78, align 8, !tbaa !13
  %80 = getelementptr inbounds double, ptr %1, i64 %indvars.iv.next44.2
  %81 = load double, ptr %80, align 8, !tbaa !13
  %82 = fmul double %79, %81
  store double %82, ptr %80, align 8, !tbaa !13
  %indvars.iv.next44.3 = add nuw nsw i64 %indvars.iv43, 4
  %exitcond47.not.3 = icmp eq i64 %indvars.iv.next44.3, %wide.trip.count46
  br i1 %exitcond47.not.3, label %._crit_edge, label %scalar.ph59, !llvm.loop !35

._crit_edge:                                      ; preds = %scalar.ph59.prol.loopexit, %scalar.ph59, %middle.block58, %.preheader
  %83 = tail call double @_scs_norm_inf(ptr noundef %2, i32 noundef %5) #2
  %84 = load i32, ptr %24, align 8, !tbaa !25
  %85 = tail call double @_scs_norm_inf(ptr noundef %1, i32 noundef %84) #2
  %86 = fcmp ogt double %83, %85
  %87 = select i1 %86, double %83, double %85
  %88 = fcmp olt double %87, 1.000000e-04
  %89 = select i1 %88, double 1.000000e+00, double %87
  %90 = fcmp ogt double %89, 1.000000e+04
  %91 = select i1 %90, double 1.000000e+04, double %89
  %92 = fcmp olt double %91, 1.000000e-18
  %93 = fdiv double 1.000000e+00, %91
  %94 = select i1 %92, double 0x43ABC16D674EC7FF, double %93
  %95 = load i32, ptr %4, align 4, !tbaa !5
  tail call void @_scs_scale_array(ptr noundef %2, double noundef %94, i32 noundef %95) #2
  %96 = load i32, ptr %24, align 8, !tbaa !25
  tail call void @_scs_scale_array(ptr noundef %1, double noundef %94, i32 noundef %96) #2
  %97 = getelementptr inbounds i8, ptr %0, i64 24
  store double %94, ptr %97, align 8, !tbaa !36
  %98 = getelementptr inbounds i8, ptr %0, i64 32
  store double %94, ptr %98, align 8, !tbaa !37
  ret void
}

declare double @_scs_norm_inf(ptr noundef, i32 noundef) local_unnamed_addr #1

declare void @_scs_scale_array(ptr noundef, double noundef, i32 noundef) local_unnamed_addr #1

attributes #0 = { 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 #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 = { 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, !10, i64 20}
!6 = !{!"", !7, i64 0, !7, i64 8, !10, i64 16, !10, i64 20, !11, i64 24, !11, i64 32}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"double", !8, i64 0}
!12 = !{!6, !7, i64 8}
!13 = !{!11, !11, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.unroll.disable"}
!16 = !{!17}
!17 = distinct !{!17, !18}
!18 = distinct !{!18, !"LVerDomain"}
!19 = !{!20}
!20 = distinct !{!20, !18}
!21 = distinct !{!21, !22, !23, !24}
!22 = !{!"llvm.loop.mustprogress"}
!23 = !{!"llvm.loop.isvectorized", i32 1}
!24 = !{!"llvm.loop.unroll.runtime.disable"}
!25 = !{!6, !10, i64 16}
!26 = !{!6, !7, i64 0}
!27 = distinct !{!27, !15}
!28 = !{!29}
!29 = distinct !{!29, !30}
!30 = distinct !{!30, !"LVerDomain"}
!31 = !{!32}
!32 = distinct !{!32, !30}
!33 = distinct !{!33, !22, !23, !24}
!34 = distinct !{!34, !22, !23}
!35 = distinct !{!35, !22, !23}
!36 = !{!6, !11, i64 24}
!37 = !{!6, !11, i64 32}


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