; LLVM IR from bonamarton/phys_num :: multi_dim_fitt (multiDimFitt)

; 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.tensor = type { ptr, i32, i32, ptr }

@.str.46 = external hidden unnamed_addr constant [32 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: nounwind uwtable
declare dso_local void @init_tensor(ptr noundef) #1

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #2

; Function Attrs: nounwind uwtable
define dso_local void @predict(ptr dead_on_unwind noalias writable sret(%struct.tensor) align 8 %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) #1 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %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 double, align 8
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  store ptr %3, ptr %7, align 8, !tbaa !5
  %15 = load ptr, ptr %6, align 8, !tbaa !5
  %16 = getelementptr inbounds %struct.tensor, ptr %15, i32 0, i32 1
  %17 = load i32, ptr %16, align 8, !tbaa !9
  %18 = load ptr, ptr %7, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct.tensor, ptr %18, i32 0, i32 1
  %20 = load i32, ptr %19, align 8, !tbaa !9
  %21 = icmp ne i32 %17, %20
  br i1 %21, label %22, label %24

22:                                               ; preds = %4
  %23 = call i32 (ptr, ...) @printf(ptr noundef @.str.46)
  call void @exit(i32 noundef 0) #7
  unreachable

24:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #8
  %25 = load ptr, ptr %6, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.tensor, ptr %25, i32 0, i32 2
  %27 = load i32, ptr %26, align 4, !tbaa !12
  store i32 %27, ptr %8, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #8
  %28 = load ptr, ptr %6, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.tensor, ptr %28, i32 0, i32 1
  %30 = load i32, ptr %29, align 8, !tbaa !9
  store i32 %30, ptr %9, align 4, !tbaa !13
  call void @init_tensor(ptr noundef %0)
  %31 = load ptr, ptr %5, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.tensor, ptr %31, i32 0, i32 1
  %33 = load i32, ptr %32, align 8, !tbaa !9
  %34 = getelementptr inbounds %struct.tensor, ptr %0, i32 0, i32 1
  store i32 %33, ptr %34, align 8, !tbaa !9
  %35 = getelementptr inbounds %struct.tensor, ptr %0, i32 0, i32 2
  store i32 1, ptr %35, align 4, !tbaa !12
  %36 = getelementptr inbounds %struct.tensor, ptr %0, i32 0, i32 1
  %37 = load i32, ptr %36, align 8, !tbaa !9
  %38 = sext i32 %37 to i64
  %39 = call noalias ptr @calloc(i64 noundef %38, i64 noundef 8) #9
  %40 = getelementptr inbounds %struct.tensor, ptr %0, i32 0, i32 0
  store ptr %39, ptr %40, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #8
  store i32 0, ptr %13, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #8
  store double 1.000000e+00, ptr %14, align 8, !tbaa !15
  store i32 0, ptr %12, align 4, !tbaa !13
  br label %41

41:                                               ; preds = %109, %24
  %42 = load i32, ptr %12, align 4, !tbaa !13
  %43 = load ptr, ptr %5, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.tensor, ptr %43, i32 0, i32 1
  %45 = load i32, ptr %44, align 8, !tbaa !9
  %46 = icmp slt i32 %42, %45
  br i1 %46, label %47, label %112

47:                                               ; preds = %41
  %48 = load i32, ptr %12, align 4, !tbaa !13
  %49 = load ptr, ptr %5, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.tensor, ptr %49, i32 0, i32 2
  %51 = load i32, ptr %50, align 4, !tbaa !12
  %52 = mul nsw i32 %48, %51
  store i32 %52, ptr %13, align 4, !tbaa !13
  store i32 0, ptr %11, align 4, !tbaa !13
  br label %53

53:                                               ; preds = %105, %47
  %54 = load i32, ptr %11, align 4, !tbaa !13
  %55 = load i32, ptr %9, align 4, !tbaa !13
  %56 = icmp slt i32 %54, %55
  br i1 %56, label %57, label %108

57:                                               ; preds = %53
  store i32 0, ptr %10, align 4, !tbaa !13
  br label %58

58:                                               ; preds = %86, %57
  %59 = load i32, ptr %10, align 4, !tbaa !13
  %60 = load i32, ptr %8, align 4, !tbaa !13
  %61 = icmp slt i32 %59, %60
  br i1 %61, label %62, label %89

62:                                               ; preds = %58
  %63 = load ptr, ptr %5, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.tensor, ptr %63, i32 0, i32 0
  %65 = load ptr, ptr %64, align 8, !tbaa !14
  %66 = load i32, ptr %13, align 4, !tbaa !13
  %67 = load i32, ptr %10, align 4, !tbaa !13
  %68 = add nsw i32 %66, %67
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds double, ptr %65, i64 %69
  %71 = load double, ptr %70, align 8, !tbaa !15
  %72 = load ptr, ptr %6, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.tensor, ptr %72, i32 0, i32 0
  %74 = load ptr, ptr %73, align 8, !tbaa !14
  %75 = load i32, ptr %11, align 4, !tbaa !13
  %76 = load i32, ptr %8, align 4, !tbaa !13
  %77 = mul nsw i32 %75, %76
  %78 = load i32, ptr %10, align 4, !tbaa !13
  %79 = add nsw i32 %77, %78
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds double, ptr %74, i64 %80
  %82 = load double, ptr %81, align 8, !tbaa !15
  %83 = call double @pow(double noundef %71, double noundef %82) #8
  %84 = load double, ptr %14, align 8, !tbaa !15
  %85 = fmul double %84, %83
  store double %85, ptr %14, align 8, !tbaa !15
  br label %86

86:                                               ; preds = %62
  %87 = load i32, ptr %10, align 4, !tbaa !13
  %88 = add nsw i32 %87, 1
  store i32 %88, ptr %10, align 4, !tbaa !13
  br label %58, !llvm.loop !17

89:                                               ; preds = %58
  %90 = load ptr, ptr %7, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.tensor, ptr %90, i32 0, i32 0
  %92 = load ptr, ptr %91, align 8, !tbaa !14
  %93 = load i32, ptr %11, align 4, !tbaa !13
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds double, ptr %92, i64 %94
  %96 = load double, ptr %95, align 8, !tbaa !15
  %97 = load double, ptr %14, align 8, !tbaa !15
  %98 = getelementptr inbounds %struct.tensor, ptr %0, i32 0, i32 0
  %99 = load ptr, ptr %98, align 8, !tbaa !14
  %100 = load i32, ptr %12, align 4, !tbaa !13
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds double, ptr %99, i64 %101
  %103 = load double, ptr %102, align 8, !tbaa !15
  %104 = call double @llvm.fmuladd.f64(double %96, double %97, double %103)
  store double %104, ptr %102, align 8, !tbaa !15
  store double 1.000000e+00, ptr %14, align 8, !tbaa !15
  br label %105

105:                                              ; preds = %89
  %106 = load i32, ptr %11, align 4, !tbaa !13
  %107 = add nsw i32 %106, 1
  store i32 %107, ptr %11, align 4, !tbaa !13
  br label %53, !llvm.loop !19

108:                                              ; preds = %53
  br label %109

109:                                              ; preds = %108
  %110 = load i32, ptr %12, align 4, !tbaa !13
  %111 = add nsw i32 %110, 1
  store i32 %111, ptr %12, align 4, !tbaa !13
  br label %41, !llvm.loop !20

112:                                              ; preds = %41
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #8
  ret void
}

declare i32 @printf(ptr noundef, ...) #3

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

; Function Attrs: nounwind allocsize(0,1)
declare noalias ptr @calloc(i64 noundef, i64 noundef) #4

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

; Function Attrs: nounwind
declare double @pow(double noundef, double noundef) #6

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

!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, !11, i64 8}
!10 = !{!"tensor", !6, i64 0, !11, i64 8, !11, i64 12, !6, i64 16}
!11 = !{!"int", !7, i64 0}
!12 = !{!10, !11, i64 12}
!13 = !{!11, !11, i64 0}
!14 = !{!10, !6, i64 0}
!15 = !{!16, !16, i64 0}
!16 = !{!"double", !7, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = distinct !{!19, !18}
!20 = distinct !{!20, !18}


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

%struct.tensor = type { ptr, i32, i32, ptr }

@.str.46 = external hidden unnamed_addr constant [32 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local void @init_tensor(ptr noundef) local_unnamed_addr #0

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local void @predict(ptr dead_on_unwind noalias writable sret(%struct.tensor) align 8 %0, ptr nocapture noundef readonly %1, ptr nocapture noundef readonly %2, ptr nocapture noundef readonly %3) local_unnamed_addr #0 {
  %5 = getelementptr inbounds i8, ptr %2, i64 8
  %6 = load i32, ptr %5, align 8, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %3, i64 8
  %8 = load i32, ptr %7, align 8, !tbaa !5
  %.not = icmp eq i32 %6, %8
  br i1 %.not, label %11, label %9

9:                                                ; preds = %4
  %10 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.46)
  tail call void @exit(i32 noundef 0) #6
  unreachable

11:                                               ; preds = %4
  %12 = getelementptr inbounds i8, ptr %2, i64 12
  %13 = load i32, ptr %12, align 4, !tbaa !11
  tail call void @init_tensor(ptr noundef %0)
  %14 = getelementptr inbounds i8, ptr %1, i64 8
  %15 = load i32, ptr %14, align 8, !tbaa !5
  %16 = getelementptr inbounds i8, ptr %0, i64 8
  store i32 %15, ptr %16, align 8, !tbaa !5
  %17 = getelementptr inbounds i8, ptr %0, i64 12
  store i32 1, ptr %17, align 4, !tbaa !11
  %18 = sext i32 %15 to i64
  %19 = tail call noalias ptr @calloc(i64 noundef %18, i64 noundef 8) #7
  store ptr %19, ptr %0, align 8, !tbaa !12
  %20 = icmp sgt i32 %15, 0
  br i1 %20, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %11
  %21 = getelementptr inbounds i8, ptr %1, i64 12
  %22 = icmp sgt i32 %6, 0
  br i1 %22, label %.lr.ph.split.us, label %._crit_edge

.lr.ph.split.us:                                  ; preds = %.lr.ph
  %23 = icmp sgt i32 %13, 0
  br i1 %23, label %.preheader.lr.ph.us.us.preheader, label %.lr.ph.split.us.split

.preheader.lr.ph.us.us.preheader:                 ; preds = %.lr.ph.split.us
  %24 = zext nneg i32 %13 to i64
  %wide.trip.count57 = zext nneg i32 %6 to i64
  %wide.trip.count52 = zext nneg i32 %13 to i64
  %xtraiter65 = and i64 %wide.trip.count52, 1
  %25 = icmp eq i32 %13, 1
  %unroll_iter69 = and i64 %wide.trip.count52, 2147483646
  %lcmp.mod67.not = icmp eq i64 %xtraiter65, 0
  br label %.preheader.lr.ph.us.us

.preheader.lr.ph.us.us:                           ; preds = %.preheader.lr.ph.us.us.preheader, %._crit_edge35.split.us.us.us
  %indvars.iv59 = phi i64 [ 0, %.preheader.lr.ph.us.us.preheader ], [ %indvars.iv.next60, %._crit_edge35.split.us.us.us ]
  %26 = load i32, ptr %21, align 4, !tbaa !11
  %27 = trunc nuw nsw i64 %indvars.iv59 to i32
  %28 = mul nsw i32 %26, %27
  %29 = sext i32 %28 to i64
  br label %.preheader.us.us.us

.preheader.us.us.us:                              ; preds = %._crit_edge.us.us.us, %.preheader.lr.ph.us.us
  %indvars.iv54 = phi i64 [ %indvars.iv.next55, %._crit_edge.us.us.us ], [ 0, %.preheader.lr.ph.us.us ]
  %30 = mul nuw nsw i64 %indvars.iv54, %24
  br i1 %25, label %._crit_edge.us.us.us.unr-lcssa, label %.preheader.us.us.us.new

.preheader.us.us.us.new:                          ; preds = %.preheader.us.us.us, %.preheader.us.us.us.new
  %indvars.iv49 = phi i64 [ %indvars.iv.next50.1, %.preheader.us.us.us.new ], [ 0, %.preheader.us.us.us ]
  %.233.us.us.us = phi double [ %50, %.preheader.us.us.us.new ], [ 1.000000e+00, %.preheader.us.us.us ]
  %niter70 = phi i64 [ %niter70.next.1, %.preheader.us.us.us.new ], [ 0, %.preheader.us.us.us ]
  %31 = load ptr, ptr %1, align 8, !tbaa !12
  %32 = getelementptr double, ptr %31, i64 %indvars.iv49
  %33 = getelementptr double, ptr %32, i64 %29
  %34 = load double, ptr %33, align 8, !tbaa !13
  %35 = load ptr, ptr %2, align 8, !tbaa !12
  %36 = getelementptr inbounds double, ptr %35, i64 %indvars.iv49
  %37 = getelementptr inbounds double, ptr %36, i64 %30
  %38 = load double, ptr %37, align 8, !tbaa !13
  %39 = tail call double @pow(double noundef %34, double noundef %38) #8
  %40 = fmul double %.233.us.us.us, %39
  %indvars.iv.next50 = or disjoint i64 %indvars.iv49, 1
  %41 = load ptr, ptr %1, align 8, !tbaa !12
  %42 = getelementptr double, ptr %41, i64 %indvars.iv.next50
  %43 = getelementptr double, ptr %42, i64 %29
  %44 = load double, ptr %43, align 8, !tbaa !13
  %45 = load ptr, ptr %2, align 8, !tbaa !12
  %46 = getelementptr inbounds double, ptr %45, i64 %indvars.iv.next50
  %47 = getelementptr inbounds double, ptr %46, i64 %30
  %48 = load double, ptr %47, align 8, !tbaa !13
  %49 = tail call double @pow(double noundef %44, double noundef %48) #8
  %50 = fmul double %40, %49
  %indvars.iv.next50.1 = add nuw nsw i64 %indvars.iv49, 2
  %niter70.next.1 = add i64 %niter70, 2
  %niter70.ncmp.1 = icmp eq i64 %niter70.next.1, %unroll_iter69
  br i1 %niter70.ncmp.1, label %._crit_edge.us.us.us.unr-lcssa, label %.preheader.us.us.us.new, !llvm.loop !15

._crit_edge.us.us.us.unr-lcssa:                   ; preds = %.preheader.us.us.us.new, %.preheader.us.us.us
  %.lcssa.ph = phi double [ poison, %.preheader.us.us.us ], [ %50, %.preheader.us.us.us.new ]
  %indvars.iv49.unr = phi i64 [ 0, %.preheader.us.us.us ], [ %indvars.iv.next50.1, %.preheader.us.us.us.new ]
  %.233.us.us.us.unr = phi double [ 1.000000e+00, %.preheader.us.us.us ], [ %50, %.preheader.us.us.us.new ]
  br i1 %lcmp.mod67.not, label %._crit_edge.us.us.us, label %._crit_edge.us.us.us.epilog-lcssa

._crit_edge.us.us.us.epilog-lcssa:                ; preds = %._crit_edge.us.us.us.unr-lcssa
  %51 = load ptr, ptr %1, align 8, !tbaa !12
  %52 = getelementptr double, ptr %51, i64 %indvars.iv49.unr
  %53 = getelementptr double, ptr %52, i64 %29
  %54 = load double, ptr %53, align 8, !tbaa !13
  %55 = load ptr, ptr %2, align 8, !tbaa !12
  %56 = getelementptr inbounds double, ptr %55, i64 %indvars.iv49.unr
  %57 = getelementptr inbounds double, ptr %56, i64 %30
  %58 = load double, ptr %57, align 8, !tbaa !13
  %59 = tail call double @pow(double noundef %54, double noundef %58) #8
  %60 = fmul double %.233.us.us.us.unr, %59
  br label %._crit_edge.us.us.us

._crit_edge.us.us.us:                             ; preds = %._crit_edge.us.us.us.unr-lcssa, %._crit_edge.us.us.us.epilog-lcssa
  %.lcssa = phi double [ %.lcssa.ph, %._crit_edge.us.us.us.unr-lcssa ], [ %60, %._crit_edge.us.us.us.epilog-lcssa ]
  %61 = load ptr, ptr %3, align 8, !tbaa !12
  %62 = getelementptr inbounds double, ptr %61, i64 %indvars.iv54
  %63 = load double, ptr %62, align 8, !tbaa !13
  %64 = load ptr, ptr %0, align 8, !tbaa !12
  %65 = getelementptr inbounds double, ptr %64, i64 %indvars.iv59
  %66 = load double, ptr %65, align 8, !tbaa !13
  %67 = tail call double @llvm.fmuladd.f64(double %63, double %.lcssa, double %66)
  store double %67, ptr %65, align 8, !tbaa !13
  %indvars.iv.next55 = add nuw nsw i64 %indvars.iv54, 1
  %exitcond58.not = icmp eq i64 %indvars.iv.next55, %wide.trip.count57
  br i1 %exitcond58.not, label %._crit_edge35.split.us.us.us, label %.preheader.us.us.us, !llvm.loop !17

._crit_edge35.split.us.us.us:                     ; preds = %._crit_edge.us.us.us
  %indvars.iv.next60 = add nuw nsw i64 %indvars.iv59, 1
  %68 = load i32, ptr %14, align 8, !tbaa !5
  %69 = sext i32 %68 to i64
  %70 = icmp slt i64 %indvars.iv.next60, %69
  br i1 %70, label %.preheader.lr.ph.us.us, label %._crit_edge, !llvm.loop !18

.lr.ph.split.us.split:                            ; preds = %.lr.ph.split.us
  %wide.trip.count47 = zext nneg i32 %15 to i64
  %.pre = load ptr, ptr %3, align 8, !tbaa !12
  %wide.trip.count = zext nneg i32 %6 to i64
  %xtraiter = and i64 %wide.trip.count, 3
  %71 = icmp ult i32 %6, 4
  %unroll_iter = and i64 %wide.trip.count, 2147483644
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br label %.preheader.lr.ph.us

.preheader.lr.ph.us:                              ; preds = %._crit_edge35.split.us39, %.lr.ph.split.us.split
  %indvars.iv44 = phi i64 [ %indvars.iv.next45, %._crit_edge35.split.us39 ], [ 0, %.lr.ph.split.us.split ]
  %72 = getelementptr inbounds double, ptr %19, i64 %indvars.iv44
  %.promoted.us = load double, ptr %72, align 8, !tbaa !13
  br i1 %71, label %._crit_edge35.split.us39.unr-lcssa, label %.preheader.us37

.preheader.us37:                                  ; preds = %.preheader.lr.ph.us, %.preheader.us37
  %indvars.iv = phi i64 [ %indvars.iv.next.3, %.preheader.us37 ], [ 0, %.preheader.lr.ph.us ]
  %73 = phi double [ %85, %.preheader.us37 ], [ %.promoted.us, %.preheader.lr.ph.us ]
  %niter = phi i64 [ %niter.next.3, %.preheader.us37 ], [ 0, %.preheader.lr.ph.us ]
  %74 = getelementptr inbounds double, ptr %.pre, i64 %indvars.iv
  %75 = load double, ptr %74, align 8, !tbaa !13
  %76 = fadd double %75, %73
  store double %76, ptr %72, align 8, !tbaa !13
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %77 = getelementptr inbounds double, ptr %.pre, i64 %indvars.iv.next
  %78 = load double, ptr %77, align 8, !tbaa !13
  %79 = fadd double %78, %76
  store double %79, ptr %72, align 8, !tbaa !13
  %indvars.iv.next.1 = or disjoint i64 %indvars.iv, 2
  %80 = getelementptr inbounds double, ptr %.pre, i64 %indvars.iv.next.1
  %81 = load double, ptr %80, align 8, !tbaa !13
  %82 = fadd double %81, %79
  store double %82, ptr %72, align 8, !tbaa !13
  %indvars.iv.next.2 = or disjoint i64 %indvars.iv, 3
  %83 = getelementptr inbounds double, ptr %.pre, i64 %indvars.iv.next.2
  %84 = load double, ptr %83, align 8, !tbaa !13
  %85 = fadd double %84, %82
  store double %85, ptr %72, align 8, !tbaa !13
  %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %._crit_edge35.split.us39.unr-lcssa, label %.preheader.us37, !llvm.loop !17

._crit_edge35.split.us39.unr-lcssa:               ; preds = %.preheader.us37, %.preheader.lr.ph.us
  %indvars.iv.unr = phi i64 [ 0, %.preheader.lr.ph.us ], [ %indvars.iv.next.3, %.preheader.us37 ]
  %.unr = phi double [ %.promoted.us, %.preheader.lr.ph.us ], [ %85, %.preheader.us37 ]
  br i1 %lcmp.mod.not, label %._crit_edge35.split.us39, label %.preheader.us37.epil

.preheader.us37.epil:                             ; preds = %._crit_edge35.split.us39.unr-lcssa, %.preheader.us37.epil
  %indvars.iv.epil = phi i64 [ %indvars.iv.next.epil, %.preheader.us37.epil ], [ %indvars.iv.unr, %._crit_edge35.split.us39.unr-lcssa ]
  %86 = phi double [ %89, %.preheader.us37.epil ], [ %.unr, %._crit_edge35.split.us39.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.preheader.us37.epil ], [ 0, %._crit_edge35.split.us39.unr-lcssa ]
  %87 = getelementptr inbounds double, ptr %.pre, i64 %indvars.iv.epil
  %88 = load double, ptr %87, align 8, !tbaa !13
  %89 = fadd double %88, %86
  store double %89, ptr %72, align 8, !tbaa !13
  %indvars.iv.next.epil = add nuw nsw i64 %indvars.iv.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %._crit_edge35.split.us39, label %.preheader.us37.epil, !llvm.loop !19

._crit_edge35.split.us39:                         ; preds = %.preheader.us37.epil, %._crit_edge35.split.us39.unr-lcssa
  %indvars.iv.next45 = add nuw nsw i64 %indvars.iv44, 1
  %exitcond48.not = icmp eq i64 %indvars.iv.next45, %wide.trip.count47
  br i1 %exitcond48.not, label %._crit_edge, label %.preheader.lr.ph.us, !llvm.loop !18

._crit_edge:                                      ; preds = %._crit_edge35.split.us39, %._crit_edge35.split.us.us.us, %.lr.ph, %11
  ret void
}

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2

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

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @pow(double noundef, double noundef) local_unnamed_addr #5

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 = { noreturn nounwind "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 "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 nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) 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 #4 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { mustprogress nofree nounwind willreturn memory(write) "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 #6 = { noreturn nounwind }
attributes #7 = { nounwind allocsize(0,1) }
attributes #8 = { 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 8}
!6 = !{!"tensor", !7, i64 0, !10, i64 8, !10, i64 12, !7, i64 16}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!6, !10, i64 12}
!12 = !{!6, !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"double", !8, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}
!18 = distinct !{!18, !16}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.unroll.disable"}


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