; LLVM IR from CLASS-SZ/class_sz :: class-sz/tools (r8lib)

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

; 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: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #1

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #2

; Function Attrs: nounwind uwtable
define dso_local ptr @r8vec_expand_linear2(i32 noundef %0, ptr noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4) #3 {
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  store i32 %0, ptr %6, align 4, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !9
  store i32 %2, ptr %8, align 4, !tbaa !5
  store i32 %3, ptr %9, align 4, !tbaa !5
  store i32 %4, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  %15 = load i32, ptr %8, align 4, !tbaa !5
  %16 = load i32, ptr %6, align 4, !tbaa !5
  %17 = sub nsw i32 %16, 1
  %18 = load i32, ptr %9, align 4, !tbaa !5
  %19 = add nsw i32 %18, 1
  %20 = mul nsw i32 %17, %19
  %21 = add nsw i32 %15, %20
  %22 = add nsw i32 %21, 1
  %23 = load i32, ptr %10, align 4, !tbaa !5
  %24 = add nsw i32 %22, %23
  %25 = sext i32 %24 to i64
  %26 = mul i64 %25, 8
  %27 = call noalias ptr @malloc(i64 noundef %26) #5
  store ptr %27, ptr %14, align 8, !tbaa !9
  store i32 0, ptr %13, align 4, !tbaa !5
  %28 = load i32, ptr %8, align 4, !tbaa !5
  %29 = sub nsw i32 1, %28
  %30 = load i32, ptr %9, align 4, !tbaa !5
  %31 = add nsw i32 %29, %30
  store i32 %31, ptr %12, align 4, !tbaa !5
  br label %32

32:                                               ; preds = %70, %5
  %33 = load i32, ptr %12, align 4, !tbaa !5
  %34 = load i32, ptr %9, align 4, !tbaa !5
  %35 = icmp sle i32 %33, %34
  br i1 %35, label %36, label %73

36:                                               ; preds = %32
  %37 = load i32, ptr %9, align 4, !tbaa !5
  %38 = load i32, ptr %12, align 4, !tbaa !5
  %39 = sub nsw i32 %37, %38
  %40 = add nsw i32 %39, 1
  %41 = sitofp i32 %40 to double
  %42 = load ptr, ptr %7, align 8, !tbaa !9
  %43 = getelementptr inbounds double, ptr %42, i64 0
  %44 = load double, ptr %43, align 8, !tbaa !11
  %45 = load ptr, ptr %7, align 8, !tbaa !9
  %46 = getelementptr inbounds double, ptr %45, i64 1
  %47 = load double, ptr %46, align 8, !tbaa !11
  %48 = load ptr, ptr %7, align 8, !tbaa !9
  %49 = getelementptr inbounds double, ptr %48, i64 0
  %50 = load double, ptr %49, align 8, !tbaa !11
  %51 = fsub double %47, %50
  %52 = fsub double %44, %51
  %53 = load i32, ptr %12, align 4, !tbaa !5
  %54 = sitofp i32 %53 to double
  %55 = load ptr, ptr %7, align 8, !tbaa !9
  %56 = getelementptr inbounds double, ptr %55, i64 0
  %57 = load double, ptr %56, align 8, !tbaa !11
  %58 = fmul double %54, %57
  %59 = call double @llvm.fmuladd.f64(double %41, double %52, double %58)
  %60 = load i32, ptr %9, align 4, !tbaa !5
  %61 = add nsw i32 %60, 1
  %62 = sitofp i32 %61 to double
  %63 = fdiv double %59, %62
  %64 = load ptr, ptr %14, align 8, !tbaa !9
  %65 = load i32, ptr %13, align 4, !tbaa !5
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds double, ptr %64, i64 %66
  store double %63, ptr %67, align 8, !tbaa !11
  %68 = load i32, ptr %13, align 4, !tbaa !5
  %69 = add nsw i32 %68, 1
  store i32 %69, ptr %13, align 4, !tbaa !5
  br label %70

70:                                               ; preds = %36
  %71 = load i32, ptr %12, align 4, !tbaa !5
  %72 = add nsw i32 %71, 1
  store i32 %72, ptr %12, align 4, !tbaa !5
  br label %32, !llvm.loop !13

73:                                               ; preds = %32
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %74

74:                                               ; preds = %128, %73
  %75 = load i32, ptr %11, align 4, !tbaa !5
  %76 = load i32, ptr %6, align 4, !tbaa !5
  %77 = sub nsw i32 %76, 1
  %78 = icmp slt i32 %75, %77
  br i1 %78, label %79, label %131

79:                                               ; preds = %74
  %80 = load ptr, ptr %7, align 8, !tbaa !9
  %81 = getelementptr inbounds double, ptr %80, i64 0
  %82 = load double, ptr %81, align 8, !tbaa !11
  %83 = load ptr, ptr %14, align 8, !tbaa !9
  %84 = load i32, ptr %13, align 4, !tbaa !5
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds double, ptr %83, i64 %85
  store double %82, ptr %86, align 8, !tbaa !11
  %87 = load i32, ptr %13, align 4, !tbaa !5
  %88 = add nsw i32 %87, 1
  store i32 %88, ptr %13, align 4, !tbaa !5
  store i32 1, ptr %12, align 4, !tbaa !5
  br label %89

89:                                               ; preds = %124, %79
  %90 = load i32, ptr %12, align 4, !tbaa !5
  %91 = load i32, ptr %9, align 4, !tbaa !5
  %92 = icmp sle i32 %90, %91
  br i1 %92, label %93, label %127

93:                                               ; preds = %89
  %94 = load i32, ptr %9, align 4, !tbaa !5
  %95 = load i32, ptr %12, align 4, !tbaa !5
  %96 = sub nsw i32 %94, %95
  %97 = add nsw i32 %96, 1
  %98 = sitofp i32 %97 to double
  %99 = load ptr, ptr %7, align 8, !tbaa !9
  %100 = load i32, ptr %11, align 4, !tbaa !5
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds double, ptr %99, i64 %101
  %103 = load double, ptr %102, align 8, !tbaa !11
  %104 = load i32, ptr %12, align 4, !tbaa !5
  %105 = sitofp i32 %104 to double
  %106 = load ptr, ptr %7, align 8, !tbaa !9
  %107 = load i32, ptr %11, align 4, !tbaa !5
  %108 = add nsw i32 %107, 1
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds double, ptr %106, i64 %109
  %111 = load double, ptr %110, align 8, !tbaa !11
  %112 = fmul double %105, %111
  %113 = call double @llvm.fmuladd.f64(double %98, double %103, double %112)
  %114 = load i32, ptr %9, align 4, !tbaa !5
  %115 = add nsw i32 %114, 1
  %116 = sitofp i32 %115 to double
  %117 = fdiv double %113, %116
  %118 = load ptr, ptr %14, align 8, !tbaa !9
  %119 = load i32, ptr %13, align 4, !tbaa !5
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds double, ptr %118, i64 %120
  store double %117, ptr %121, align 8, !tbaa !11
  %122 = load i32, ptr %13, align 4, !tbaa !5
  %123 = add nsw i32 %122, 1
  store i32 %123, ptr %13, align 4, !tbaa !5
  br label %124

124:                                              ; preds = %93
  %125 = load i32, ptr %12, align 4, !tbaa !5
  %126 = add nsw i32 %125, 1
  store i32 %126, ptr %12, align 4, !tbaa !5
  br label %89, !llvm.loop !15

127:                                              ; preds = %89
  br label %128

128:                                              ; preds = %127
  %129 = load i32, ptr %11, align 4, !tbaa !5
  %130 = add nsw i32 %129, 1
  store i32 %130, ptr %11, align 4, !tbaa !5
  br label %74, !llvm.loop !16

131:                                              ; preds = %74
  %132 = load ptr, ptr %7, align 8, !tbaa !9
  %133 = load i32, ptr %6, align 4, !tbaa !5
  %134 = sub nsw i32 %133, 1
  %135 = sext i32 %134 to i64
  %136 = getelementptr inbounds double, ptr %132, i64 %135
  %137 = load double, ptr %136, align 8, !tbaa !11
  %138 = load ptr, ptr %14, align 8, !tbaa !9
  %139 = load i32, ptr %13, align 4, !tbaa !5
  %140 = sext i32 %139 to i64
  %141 = getelementptr inbounds double, ptr %138, i64 %140
  store double %137, ptr %141, align 8, !tbaa !11
  %142 = load i32, ptr %13, align 4, !tbaa !5
  %143 = add nsw i32 %142, 1
  store i32 %143, ptr %13, align 4, !tbaa !5
  store i32 1, ptr %12, align 4, !tbaa !5
  br label %144

144:                                              ; preds = %194, %131
  %145 = load i32, ptr %12, align 4, !tbaa !5
  %146 = load i32, ptr %10, align 4, !tbaa !5
  %147 = icmp sle i32 %145, %146
  br i1 %147, label %148, label %197

148:                                              ; preds = %144
  %149 = load i32, ptr %9, align 4, !tbaa !5
  %150 = load i32, ptr %12, align 4, !tbaa !5
  %151 = sub nsw i32 %149, %150
  %152 = add nsw i32 %151, 1
  %153 = sitofp i32 %152 to double
  %154 = load ptr, ptr %7, align 8, !tbaa !9
  %155 = load i32, ptr %6, align 4, !tbaa !5
  %156 = sub nsw i32 %155, 1
  %157 = sext i32 %156 to i64
  %158 = getelementptr inbounds double, ptr %154, i64 %157
  %159 = load double, ptr %158, align 8, !tbaa !11
  %160 = load i32, ptr %12, align 4, !tbaa !5
  %161 = sitofp i32 %160 to double
  %162 = load ptr, ptr %7, align 8, !tbaa !9
  %163 = load i32, ptr %6, align 4, !tbaa !5
  %164 = sub nsw i32 %163, 1
  %165 = sext i32 %164 to i64
  %166 = getelementptr inbounds double, ptr %162, i64 %165
  %167 = load double, ptr %166, align 8, !tbaa !11
  %168 = load ptr, ptr %7, align 8, !tbaa !9
  %169 = load i32, ptr %6, align 4, !tbaa !5
  %170 = sub nsw i32 %169, 1
  %171 = sext i32 %170 to i64
  %172 = getelementptr inbounds double, ptr %168, i64 %171
  %173 = load double, ptr %172, align 8, !tbaa !11
  %174 = load ptr, ptr %7, align 8, !tbaa !9
  %175 = load i32, ptr %6, align 4, !tbaa !5
  %176 = sub nsw i32 %175, 2
  %177 = sext i32 %176 to i64
  %178 = getelementptr inbounds double, ptr %174, i64 %177
  %179 = load double, ptr %178, align 8, !tbaa !11
  %180 = fsub double %173, %179
  %181 = fadd double %167, %180
  %182 = fmul double %161, %181
  %183 = call double @llvm.fmuladd.f64(double %153, double %159, double %182)
  %184 = load i32, ptr %9, align 4, !tbaa !5
  %185 = add nsw i32 %184, 1
  %186 = sitofp i32 %185 to double
  %187 = fdiv double %183, %186
  %188 = load ptr, ptr %14, align 8, !tbaa !9
  %189 = load i32, ptr %13, align 4, !tbaa !5
  %190 = sext i32 %189 to i64
  %191 = getelementptr inbounds double, ptr %188, i64 %190
  store double %187, ptr %191, align 8, !tbaa !11
  %192 = load i32, ptr %13, align 4, !tbaa !5
  %193 = add nsw i32 %192, 1
  store i32 %193, ptr %13, align 4, !tbaa !5
  br label %194

194:                                              ; preds = %148
  %195 = load i32, ptr %12, align 4, !tbaa !5
  %196 = add nsw i32 %195, 1
  store i32 %196, ptr %12, align 4, !tbaa !5
  br label %144, !llvm.loop !17

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { nounwind allocsize(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 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 }
attributes #5 = { nounwind allocsize(0) }

!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/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"

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

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #1

; Function Attrs: nofree nounwind memory(write, argmem: read, inaccessiblemem: readwrite) uwtable
define dso_local noalias noundef ptr @r8vec_expand_linear2(i32 noundef %0, ptr nocapture noundef readonly %1, i32 noundef %2, i32 noundef %3, i32 noundef %4) local_unnamed_addr #2 {
  %6 = add nsw i32 %0, -1
  %7 = add i32 %3, 1
  %8 = mul nsw i32 %7, %6
  %9 = add i32 %2, 1
  %10 = add i32 %9, %4
  %11 = add i32 %10, %8
  %12 = sext i32 %11 to i64
  %13 = shl nsw i64 %12, 3
  %14 = tail call noalias ptr @malloc(i64 noundef %13) #4
  %reass.sub = sub i32 %3, %2
  %.06573 = add i32 %reass.sub, 1
  %.not74 = icmp sgt i32 %.06573, %3
  br i1 %.not74, label %.preheader, label %.lr.ph

.lr.ph:                                           ; preds = %5
  %15 = load double, ptr %1, align 8, !tbaa !5
  %16 = getelementptr inbounds i8, ptr %1, i64 8
  %17 = load double, ptr %16, align 8, !tbaa !5
  %18 = fsub double %17, %15
  %19 = fsub double %15, %18
  %20 = sitofp i32 %7 to double
  %21 = add i32 %3, 2
  %22 = sub i32 %21, %2
  %23 = add i32 %3, 1
  %smax = tail call i32 @llvm.smax.i32(i32 %22, i32 %23)
  %24 = add i32 %smax, %2
  %25 = add i32 %24, -2
  %26 = sub i32 %25, %3
  %27 = zext i32 %26 to i64
  %28 = add nuw nsw i64 %27, 1
  %min.iters.check = icmp eq i32 %25, %3
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.ph

scalar.ph.preheader:                              ; preds = %middle.block, %.lr.ph
  %indvars.iv.ph = phi i64 [ 0, %.lr.ph ], [ %n.vec, %middle.block ]
  %.06576.ph = phi i32 [ %.06573, %.lr.ph ], [ %ind.end, %middle.block ]
  br label %scalar.ph

vector.ph:                                        ; preds = %.lr.ph
  %n.vec = and i64 %28, 8589934590
  %.cast = trunc i64 %n.vec to i32
  %ind.end = add i32 %.06573, %.cast
  %.splatinsert = insertelement <2 x i32> poison, i32 %.06573, i64 0
  %.splat = shufflevector <2 x i32> %.splatinsert, <2 x i32> poison, <2 x i32> zeroinitializer
  %induction = add <2 x i32> %.splat, <i32 0, i32 1>
  %broadcast.splatinsert = insertelement <2 x i32> poison, i32 %7, i64 0
  %broadcast.splat = shufflevector <2 x i32> %broadcast.splatinsert, <2 x i32> poison, <2 x i32> zeroinitializer
  %broadcast.splatinsert114 = insertelement <2 x double> poison, double %15, i64 0
  %broadcast.splat115 = shufflevector <2 x double> %broadcast.splatinsert114, <2 x double> poison, <2 x i32> zeroinitializer
  %broadcast.splatinsert116 = insertelement <2 x double> poison, double %19, i64 0
  %broadcast.splat117 = shufflevector <2 x double> %broadcast.splatinsert116, <2 x double> poison, <2 x i32> zeroinitializer
  %broadcast.splatinsert118 = insertelement <2 x double> poison, double %20, i64 0
  %broadcast.splat119 = shufflevector <2 x double> %broadcast.splatinsert118, <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 ]
  %vec.ind = phi <2 x i32> [ %induction, %vector.ph ], [ %vec.ind.next, %vector.body ]
  %29 = sub <2 x i32> %broadcast.splat, %vec.ind
  %30 = sitofp <2 x i32> %29 to <2 x double>
  %31 = sitofp <2 x i32> %vec.ind to <2 x double>
  %32 = fmul <2 x double> %broadcast.splat115, %31
  %33 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %30, <2 x double> %broadcast.splat117, <2 x double> %32)
  %34 = fdiv <2 x double> %33, %broadcast.splat119
  %35 = getelementptr inbounds double, ptr %14, i64 %index
  store <2 x double> %34, ptr %35, align 8, !tbaa !5
  %index.next = add nuw i64 %index, 2
  %vec.ind.next = add <2 x i32> %vec.ind, <i32 2, i32 2>
  %36 = icmp eq i64 %index.next, %n.vec
  br i1 %36, label %middle.block, label %vector.body, !llvm.loop !9

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

.preheader.loopexit:                              ; preds = %scalar.ph, %middle.block
  %indvars.iv.next.lcssa = phi i64 [ %n.vec, %middle.block ], [ %indvars.iv.next, %scalar.ph ]
  %37 = trunc nuw i64 %indvars.iv.next.lcssa to i32
  br label %.preheader

.preheader:                                       ; preds = %.preheader.loopexit, %5
  %.064.lcssa = phi i32 [ 0, %5 ], [ %37, %.preheader.loopexit ]
  %38 = icmp sgt i32 %0, 1
  br i1 %38, label %.lr.ph85, label %._crit_edge86

.lr.ph85:                                         ; preds = %.preheader
  %39 = load double, ptr %1, align 8, !tbaa !5
  %.not7278 = icmp slt i32 %3, 1
  %40 = sitofp i32 %7 to double
  br i1 %.not7278, label %.lr.ph85.split.us.preheader, label %.lr.ph81.preheader

.lr.ph81.preheader:                               ; preds = %.lr.ph85
  %wide.trip.count = zext nneg i32 %6 to i64
  %41 = zext nneg i32 %3 to i64
  %min.iters.check122 = icmp eq i32 %3, 1
  %n.vec125 = and i64 %41, 2147483646
  %ind.end129 = or i32 %3, 1
  %broadcast.splatinsert135 = insertelement <2 x i32> poison, i32 %7, i64 0
  %broadcast.splat136 = shufflevector <2 x i32> %broadcast.splatinsert135, <2 x i32> poison, <2 x i32> zeroinitializer
  %broadcast.splatinsert141 = insertelement <2 x double> poison, double %40, i64 0
  %broadcast.splat142 = shufflevector <2 x double> %broadcast.splatinsert141, <2 x double> poison, <2 x i32> zeroinitializer
  %cmp.n144 = icmp eq i64 %n.vec125, %41
  br label %.lr.ph81

.lr.ph85.split.us.preheader:                      ; preds = %.lr.ph85
  %42 = sext i32 %.064.lcssa to i64
  %43 = zext i32 %6 to i64
  %min.iters.check147 = icmp ult i32 %0, 5
  br i1 %min.iters.check147, label %.lr.ph85.split.us.preheader189, label %vector.ph148

vector.ph148:                                     ; preds = %.lr.ph85.split.us.preheader
  %n.vec150 = and i64 %43, 4294967292
  %ind.end151 = add nsw i64 %n.vec150, %42
  %ind.end154 = trunc nuw i64 %n.vec150 to i32
  %broadcast.splatinsert159 = insertelement <2 x double> poison, double %39, i64 0
  %broadcast.splat160 = shufflevector <2 x double> %broadcast.splatinsert159, <2 x double> poison, <2 x i32> zeroinitializer
  %invariant.gep199 = getelementptr double, ptr %14, i64 %42
  br label %vector.body156

vector.body156:                                   ; preds = %vector.body156, %vector.ph148
  %index157 = phi i64 [ 0, %vector.ph148 ], [ %index.next161, %vector.body156 ]
  %gep200 = getelementptr double, ptr %invariant.gep199, i64 %index157
  %44 = getelementptr inbounds i8, ptr %gep200, i64 16
  store <2 x double> %broadcast.splat160, ptr %gep200, align 8, !tbaa !5
  store <2 x double> %broadcast.splat160, ptr %44, align 8, !tbaa !5
  %index.next161 = add nuw i64 %index157, 4
  %45 = icmp eq i64 %index.next161, %n.vec150
  br i1 %45, label %middle.block145, label %vector.body156, !llvm.loop !13

middle.block145:                                  ; preds = %vector.body156
  %cmp.n162 = icmp eq i64 %n.vec150, %43
  br i1 %cmp.n162, label %._crit_edge86.loopexit, label %.lr.ph85.split.us.preheader189

.lr.ph85.split.us.preheader189:                   ; preds = %middle.block145, %.lr.ph85.split.us.preheader
  %indvars.iv103.ph = phi i64 [ %42, %.lr.ph85.split.us.preheader ], [ %ind.end151, %middle.block145 ]
  %.084.us.ph = phi i32 [ 0, %.lr.ph85.split.us.preheader ], [ %ind.end154, %middle.block145 ]
  br label %.lr.ph85.split.us

.lr.ph85.split.us:                                ; preds = %.lr.ph85.split.us.preheader189, %.lr.ph85.split.us
  %indvars.iv103 = phi i64 [ %indvars.iv.next104, %.lr.ph85.split.us ], [ %indvars.iv103.ph, %.lr.ph85.split.us.preheader189 ]
  %.084.us = phi i32 [ %47, %.lr.ph85.split.us ], [ %.084.us.ph, %.lr.ph85.split.us.preheader189 ]
  %46 = getelementptr inbounds double, ptr %14, i64 %indvars.iv103
  store double %39, ptr %46, align 8, !tbaa !5
  %indvars.iv.next104 = add nsw i64 %indvars.iv103, 1
  %47 = add nuw nsw i32 %.084.us, 1
  %exitcond106.not = icmp eq i32 %47, %6
  br i1 %exitcond106.not, label %._crit_edge86.loopexit, label %.lr.ph85.split.us, !llvm.loop !14

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %scalar.ph ], [ %indvars.iv.ph, %scalar.ph.preheader ]
  %.06576 = phi i32 [ %.065, %scalar.ph ], [ %.06576.ph, %scalar.ph.preheader ]
  %48 = sub i32 %7, %.06576
  %49 = sitofp i32 %48 to double
  %50 = sitofp i32 %.06576 to double
  %51 = fmul double %15, %50
  %52 = tail call double @llvm.fmuladd.f64(double %49, double %19, double %51)
  %53 = fdiv double %52, %20
  %54 = getelementptr inbounds double, ptr %14, i64 %indvars.iv
  store double %53, ptr %54, align 8, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %.065 = add i32 %.06576, 1
  %.not = icmp sgt i32 %.065, %3
  br i1 %.not, label %.preheader.loopexit, label %scalar.ph, !llvm.loop !15

.lr.ph81:                                         ; preds = %.lr.ph81.preheader, %._crit_edge
  %indvars.iv99 = phi i64 [ 0, %.lr.ph81.preheader ], [ %indvars.iv.next100, %._crit_edge ]
  %.183 = phi i32 [ %.064.lcssa, %.lr.ph81.preheader ], [ %77, %._crit_edge ]
  %55 = sext i32 %.183 to i64
  %56 = getelementptr inbounds double, ptr %14, i64 %55
  store double %39, ptr %56, align 8, !tbaa !5
  %.277 = add i32 %.183, 1
  %57 = getelementptr inbounds double, ptr %1, i64 %indvars.iv99
  %58 = load double, ptr %57, align 8, !tbaa !5
  %59 = getelementptr inbounds i8, ptr %57, i64 8
  %60 = load double, ptr %59, align 8, !tbaa !5
  %61 = sext i32 %.277 to i64
  br i1 %min.iters.check122, label %scalar.ph121.preheader, label %vector.ph123

vector.ph123:                                     ; preds = %.lr.ph81
  %ind.end126 = add nsw i64 %n.vec125, %61
  %broadcast.splatinsert137 = insertelement <2 x double> poison, double %60, i64 0
  %broadcast.splat138 = shufflevector <2 x double> %broadcast.splatinsert137, <2 x double> poison, <2 x i32> zeroinitializer
  %broadcast.splatinsert139 = insertelement <2 x double> poison, double %58, i64 0
  %broadcast.splat140 = shufflevector <2 x double> %broadcast.splatinsert139, <2 x double> poison, <2 x i32> zeroinitializer
  %invariant.gep197 = getelementptr double, ptr %14, i64 %61
  br label %vector.body131

vector.body131:                                   ; preds = %vector.body131, %vector.ph123
  %index132 = phi i64 [ 0, %vector.ph123 ], [ %index.next143, %vector.body131 ]
  %vec.ind133 = phi <2 x i32> [ <i32 1, i32 2>, %vector.ph123 ], [ %vec.ind.next134, %vector.body131 ]
  %62 = sub <2 x i32> %broadcast.splat136, %vec.ind133
  %63 = sitofp <2 x i32> %62 to <2 x double>
  %64 = uitofp <2 x i32> %vec.ind133 to <2 x double>
  %65 = fmul <2 x double> %broadcast.splat138, %64
  %66 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %63, <2 x double> %broadcast.splat140, <2 x double> %65)
  %67 = fdiv <2 x double> %66, %broadcast.splat142
  %gep198 = getelementptr double, ptr %invariant.gep197, i64 %index132
  store <2 x double> %67, ptr %gep198, align 8, !tbaa !5
  %index.next143 = add nuw i64 %index132, 2
  %vec.ind.next134 = add <2 x i32> %vec.ind133, <i32 2, i32 2>
  %68 = icmp eq i64 %index.next143, %n.vec125
  br i1 %68, label %middle.block120, label %vector.body131, !llvm.loop !16

middle.block120:                                  ; preds = %vector.body131
  br i1 %cmp.n144, label %._crit_edge, label %scalar.ph121.preheader

scalar.ph121.preheader:                           ; preds = %middle.block120, %.lr.ph81
  %indvars.iv96.ph = phi i64 [ %61, %.lr.ph81 ], [ %ind.end126, %middle.block120 ]
  %.16679.ph = phi i32 [ 1, %.lr.ph81 ], [ %ind.end129, %middle.block120 ]
  br label %scalar.ph121

scalar.ph121:                                     ; preds = %scalar.ph121.preheader, %scalar.ph121
  %indvars.iv96 = phi i64 [ %indvars.iv.next97, %scalar.ph121 ], [ %indvars.iv96.ph, %scalar.ph121.preheader ]
  %.16679 = phi i32 [ %76, %scalar.ph121 ], [ %.16679.ph, %scalar.ph121.preheader ]
  %69 = sub i32 %7, %.16679
  %70 = sitofp i32 %69 to double
  %71 = uitofp nneg i32 %.16679 to double
  %72 = fmul double %60, %71
  %73 = tail call double @llvm.fmuladd.f64(double %70, double %58, double %72)
  %74 = fdiv double %73, %40
  %75 = getelementptr inbounds double, ptr %14, i64 %indvars.iv96
  store double %74, ptr %75, align 8, !tbaa !5
  %76 = add nuw i32 %.16679, 1
  %indvars.iv.next97 = add nsw i64 %indvars.iv96, 1
  %exitcond.not = icmp eq i32 %.16679, %3
  br i1 %exitcond.not, label %._crit_edge, label %scalar.ph121, !llvm.loop !17

._crit_edge:                                      ; preds = %scalar.ph121, %middle.block120
  %indvars.iv.next97.lcssa = phi i64 [ %ind.end126, %middle.block120 ], [ %indvars.iv.next97, %scalar.ph121 ]
  %77 = trunc nsw i64 %indvars.iv.next97.lcssa to i32
  %indvars.iv.next100 = add nuw nsw i64 %indvars.iv99, 1
  %exitcond102.not = icmp eq i64 %indvars.iv.next100, %wide.trip.count
  br i1 %exitcond102.not, label %._crit_edge86, label %.lr.ph81, !llvm.loop !18

._crit_edge86.loopexit:                           ; preds = %.lr.ph85.split.us, %middle.block145
  %indvars.iv.next104.lcssa = phi i64 [ %ind.end151, %middle.block145 ], [ %indvars.iv.next104, %.lr.ph85.split.us ]
  %78 = trunc nsw i64 %indvars.iv.next104.lcssa to i32
  br label %._crit_edge86

._crit_edge86:                                    ; preds = %._crit_edge, %._crit_edge86.loopexit, %.preheader
  %.1.lcssa = phi i32 [ %.064.lcssa, %.preheader ], [ %78, %._crit_edge86.loopexit ], [ %77, %._crit_edge ]
  %79 = sext i32 %6 to i64
  %80 = getelementptr inbounds double, ptr %1, i64 %79
  %81 = load double, ptr %80, align 8, !tbaa !5
  %82 = sext i32 %.1.lcssa to i64
  %83 = getelementptr inbounds double, ptr %14, i64 %82
  store double %81, ptr %83, align 8, !tbaa !5
  %.not7188 = icmp slt i32 %4, 1
  br i1 %.not7188, label %._crit_edge93, label %.lr.ph92

.lr.ph92:                                         ; preds = %._crit_edge86
  %invariant.gep = getelementptr i8, ptr %1, i64 -16
  %84 = sext i32 %0 to i64
  %gep = getelementptr double, ptr %invariant.gep, i64 %84
  %85 = load double, ptr %gep, align 8, !tbaa !5
  %86 = fsub double %81, %85
  %87 = fadd double %81, %86
  %88 = sitofp i32 %7 to double
  %89 = zext nneg i32 %4 to i64
  %min.iters.check165 = icmp eq i32 %4, 1
  br i1 %min.iters.check165, label %scalar.ph164.preheader, label %vector.ph166

vector.ph166:                                     ; preds = %.lr.ph92
  %n.vec168 = and i64 %89, 2147483646
  %ind.end169 = add nsw i64 %n.vec168, %82
  %ind.end172 = or i32 %4, 1
  %broadcast.splatinsert179 = insertelement <2 x i32> poison, i32 %7, i64 0
  %broadcast.splat180 = shufflevector <2 x i32> %broadcast.splatinsert179, <2 x i32> poison, <2 x i32> zeroinitializer
  %broadcast.splatinsert181 = insertelement <2 x double> poison, double %87, i64 0
  %broadcast.splat182 = shufflevector <2 x double> %broadcast.splatinsert181, <2 x double> poison, <2 x i32> zeroinitializer
  %broadcast.splatinsert183 = insertelement <2 x double> poison, double %81, i64 0
  %broadcast.splat184 = shufflevector <2 x double> %broadcast.splatinsert183, <2 x double> poison, <2 x i32> zeroinitializer
  %broadcast.splatinsert185 = insertelement <2 x double> poison, double %88, i64 0
  %broadcast.splat186 = shufflevector <2 x double> %broadcast.splatinsert185, <2 x double> poison, <2 x i32> zeroinitializer
  %invariant.gep201 = getelementptr double, ptr %14, i64 %82
  %invariant.gep203 = getelementptr i8, ptr %invariant.gep201, i64 8
  br label %vector.body174

vector.body174:                                   ; preds = %vector.body174, %vector.ph166
  %index175 = phi i64 [ 0, %vector.ph166 ], [ %index.next187, %vector.body174 ]
  %vec.ind176 = phi <2 x i32> [ <i32 1, i32 2>, %vector.ph166 ], [ %vec.ind.next177, %vector.body174 ]
  %90 = sub <2 x i32> %broadcast.splat180, %vec.ind176
  %91 = sitofp <2 x i32> %90 to <2 x double>
  %92 = uitofp <2 x i32> %vec.ind176 to <2 x double>
  %93 = fmul <2 x double> %broadcast.splat182, %92
  %94 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %91, <2 x double> %broadcast.splat184, <2 x double> %93)
  %95 = fdiv <2 x double> %94, %broadcast.splat186
  %gep204 = getelementptr double, ptr %invariant.gep203, i64 %index175
  store <2 x double> %95, ptr %gep204, align 8, !tbaa !5
  %index.next187 = add nuw i64 %index175, 2
  %vec.ind.next177 = add <2 x i32> %vec.ind176, <i32 2, i32 2>
  %96 = icmp eq i64 %index.next187, %n.vec168
  br i1 %96, label %middle.block163, label %vector.body174, !llvm.loop !19

middle.block163:                                  ; preds = %vector.body174
  %cmp.n188 = icmp eq i64 %n.vec168, %89
  br i1 %cmp.n188, label %._crit_edge93, label %scalar.ph164.preheader

scalar.ph164.preheader:                           ; preds = %middle.block163, %.lr.ph92
  %indvars.iv107.ph = phi i64 [ %82, %.lr.ph92 ], [ %ind.end169, %middle.block163 ]
  %.26789.ph = phi i32 [ 1, %.lr.ph92 ], [ %ind.end172, %middle.block163 ]
  br label %scalar.ph164

scalar.ph164:                                     ; preds = %scalar.ph164.preheader, %scalar.ph164
  %indvars.iv107 = phi i64 [ %indvars.iv.next108, %scalar.ph164 ], [ %indvars.iv107.ph, %scalar.ph164.preheader ]
  %.26789 = phi i32 [ %104, %scalar.ph164 ], [ %.26789.ph, %scalar.ph164.preheader ]
  %indvars.iv.next108 = add nsw i64 %indvars.iv107, 1
  %97 = sub i32 %7, %.26789
  %98 = sitofp i32 %97 to double
  %99 = uitofp nneg i32 %.26789 to double
  %100 = fmul double %87, %99
  %101 = tail call double @llvm.fmuladd.f64(double %98, double %81, double %100)
  %102 = fdiv double %101, %88
  %103 = getelementptr inbounds double, ptr %14, i64 %indvars.iv.next108
  store double %102, ptr %103, align 8, !tbaa !5
  %104 = add nuw i32 %.26789, 1
  %exitcond110.not = icmp eq i32 %.26789, %4
  br i1 %exitcond110.not, label %._crit_edge93, label %scalar.ph164, !llvm.loop !20

._crit_edge93:                                    ; preds = %scalar.ph164, %middle.block163, %._crit_edge86
  ret ptr %14
}

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <2 x double> @llvm.fmuladd.v2f64(<2 x double>, <2 x double>, <2 x double>) #3

attributes #0 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #1 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "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 = { nofree nounwind memory(write, argmem: read, inaccessiblemem: readwrite) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { nounwind allocsize(0) }

!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/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, !12, !11}
!16 = distinct !{!16, !10, !11, !12}
!17 = distinct !{!17, !10, !12, !11}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !10, !11, !12}
!20 = distinct !{!20, !10, !12, !11}


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