; LLVM IR from tangjz/acm-icpc :: hdu (6207)

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

@t = external dso_local global i32, align 4
@n = external dso_local global i32, align 4
@st = external dso_local global i32, align 4
@mod = external dso_local global i32, align 4
@out = external dso_local global [801 x double], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [1 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_Z1Fii(i32 noundef, i32 noundef) #0

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z7mod_subii(i32 noundef, i32 noundef) #1

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z7mod_addii(i32 noundef, i32 noundef) #1

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #3 {
  %1 = alloca i32, align 4
  %2 = alloca double, align 8
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %9 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @t)
  br label %10

10:                                               ; preds = %135, %0
  %11 = load i32, ptr @t, align 4, !tbaa !5
  %12 = add nsw i32 %11, -1
  store i32 %12, ptr @t, align 4, !tbaa !5
  %13 = icmp ne i32 %11, 0
  br i1 %13, label %14, label %137

14:                                               ; preds = %10
  %15 = load i32, ptr @st, align 4, !tbaa !5
  %16 = add nsw i32 %15, 1
  store i32 %16, ptr @st, align 4, !tbaa !5
  %17 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n)
  %18 = load i32, ptr @n, align 4, !tbaa !5
  %19 = shl i32 %18, 3
  store i32 %19, ptr @mod, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #5
  store double 0.000000e+00, ptr %2, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  store i32 0, ptr %3, align 4, !tbaa !5
  br label %20

20:                                               ; preds = %63, %14
  %21 = load i32, ptr %3, align 4, !tbaa !5
  %22 = load i32, ptr @n, align 4, !tbaa !5
  %23 = icmp sle i32 %21, %22
  br i1 %23, label %25, label %24

24:                                               ; preds = %20
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  br label %66

25:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  %26 = load i32, ptr %3, align 4, !tbaa !5
  %27 = call noundef i32 @_Z7mod_addii(i32 noundef %26, i32 noundef 3)
  store i32 %27, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  %28 = load i32, ptr %3, align 4, !tbaa !5
  %29 = call noundef i32 @_Z7mod_subii(i32 noundef %28, i32 noundef 3)
  store i32 %29, ptr %5, align 4, !tbaa !5
  %30 = load i32, ptr %3, align 4, !tbaa !5
  %31 = icmp eq i32 %30, 1
  br i1 %31, label %32, label %35

32:                                               ; preds = %25
  %33 = load i32, ptr %5, align 4, !tbaa !5
  %34 = call noundef i32 @_Z7mod_addii(i32 noundef %33, i32 noundef 1)
  store i32 %34, ptr %5, align 4, !tbaa !5
  br label %35

35:                                               ; preds = %32, %25
  %36 = load i32, ptr %4, align 4, !tbaa !5
  %37 = load i32, ptr %5, align 4, !tbaa !5
  %38 = call noundef double @_Z1Fii(i32 noundef %36, i32 noundef %37)
  %39 = load i32, ptr %3, align 4, !tbaa !5
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds [801 x double], ptr @out, i64 0, i64 %40
  store double %38, ptr %41, align 8, !tbaa !9
  %42 = load i32, ptr %3, align 4, !tbaa !5
  %43 = icmp ne i32 %42, 0
  br i1 %43, label %44, label %53

44:                                               ; preds = %35
  %45 = load i32, ptr %3, align 4, !tbaa !5
  %46 = load i32, ptr @n, align 4, !tbaa !5
  %47 = icmp slt i32 %45, %46
  br i1 %47, label %48, label %53

48:                                               ; preds = %44
  %49 = load i32, ptr %3, align 4, !tbaa !5
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds [801 x double], ptr @out, i64 0, i64 %50
  %52 = load double, ptr %51, align 8, !tbaa !9
  br label %59

53:                                               ; preds = %44, %35
  %54 = load i32, ptr %3, align 4, !tbaa !5
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds [801 x double], ptr @out, i64 0, i64 %55
  %57 = load double, ptr %56, align 8, !tbaa !9
  %58 = fdiv double %57, 2.000000e+00
  br label %59

59:                                               ; preds = %53, %48
  %60 = phi double [ %52, %48 ], [ %58, %53 ]
  %61 = load double, ptr %2, align 8, !tbaa !9
  %62 = fadd double %61, %60
  store double %62, ptr %2, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  br label %63

63:                                               ; preds = %59
  %64 = load i32, ptr %3, align 4, !tbaa !5
  %65 = add nsw i32 %64, 1
  store i32 %65, ptr %3, align 4, !tbaa !5
  br label %20, !llvm.loop !11

66:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  %67 = load i32, ptr @n, align 4, !tbaa !5
  %68 = add nsw i32 %67, 1
  store i32 %68, ptr %6, align 4, !tbaa !5
  br label %69

69:                                               ; preds = %86, %66
  %70 = load i32, ptr %6, align 4, !tbaa !5
  %71 = load i32, ptr @n, align 4, !tbaa !5
  %72 = shl i32 %71, 1
  %73 = icmp slt i32 %70, %72
  br i1 %73, label %75, label %74

74:                                               ; preds = %69
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  br label %89

75:                                               ; preds = %69
  %76 = load i32, ptr @n, align 4, !tbaa !5
  %77 = shl i32 %76, 1
  %78 = load i32, ptr %6, align 4, !tbaa !5
  %79 = sub nsw i32 %77, %78
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds [801 x double], ptr @out, i64 0, i64 %80
  %82 = load double, ptr %81, align 8, !tbaa !9
  %83 = load i32, ptr %6, align 4, !tbaa !5
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds [801 x double], ptr @out, i64 0, i64 %84
  store double %82, ptr %85, align 8, !tbaa !9
  br label %86

86:                                               ; preds = %75
  %87 = load i32, ptr %6, align 4, !tbaa !5
  %88 = add nsw i32 %87, 1
  store i32 %88, ptr %6, align 4, !tbaa !5
  br label %69, !llvm.loop !13

89:                                               ; preds = %74
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  %90 = load i32, ptr @n, align 4, !tbaa !5
  %91 = shl i32 %90, 1
  store i32 %91, ptr %7, align 4, !tbaa !5
  br label %92

92:                                               ; preds = %109, %89
  %93 = load i32, ptr %7, align 4, !tbaa !5
  %94 = load i32, ptr @n, align 4, !tbaa !5
  %95 = shl i32 %94, 3
  %96 = icmp slt i32 %93, %95
  br i1 %96, label %98, label %97

97:                                               ; preds = %92
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  br label %112

98:                                               ; preds = %92
  %99 = load i32, ptr %7, align 4, !tbaa !5
  %100 = load i32, ptr @n, align 4, !tbaa !5
  %101 = shl i32 %100, 1
  %102 = sub nsw i32 %99, %101
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds [801 x double], ptr @out, i64 0, i64 %103
  %105 = load double, ptr %104, align 8, !tbaa !9
  %106 = load i32, ptr %7, align 4, !tbaa !5
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds [801 x double], ptr @out, i64 0, i64 %107
  store double %105, ptr %108, align 8, !tbaa !9
  br label %109

109:                                              ; preds = %98
  %110 = load i32, ptr %7, align 4, !tbaa !5
  %111 = add nsw i32 %110, 1
  store i32 %111, ptr %7, align 4, !tbaa !5
  br label %92, !llvm.loop !14

112:                                              ; preds = %97
  %113 = load double, ptr %2, align 8, !tbaa !9
  %114 = load i32, ptr @n, align 4, !tbaa !5
  %115 = sitofp i32 %114 to double
  %116 = fdiv double %113, %115
  %117 = fadd double %116, 1.000000e+00
  %118 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, double noundef %117)
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  store i32 0, ptr %8, align 4, !tbaa !5
  br label %119

119:                                              ; preds = %132, %112
  %120 = load i32, ptr %8, align 4, !tbaa !5
  %121 = load i32, ptr @n, align 4, !tbaa !5
  %122 = shl i32 %121, 3
  %123 = icmp slt i32 %120, %122
  br i1 %123, label %125, label %124

124:                                              ; preds = %119
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  br label %135

125:                                              ; preds = %119
  %126 = load i32, ptr %8, align 4, !tbaa !5
  %127 = sext i32 %126 to i64
  %128 = getelementptr inbounds [801 x double], ptr @out, i64 0, i64 %127
  %129 = load double, ptr %128, align 8, !tbaa !9
  %130 = fadd double %129, 1.000000e+00
  %131 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, double noundef %130)
  br label %132

132:                                              ; preds = %125
  %133 = load i32, ptr %8, align 4, !tbaa !5
  %134 = add nsw i32 %133, 1
  store i32 %134, ptr %8, align 4, !tbaa !5
  br label %119, !llvm.loop !15

135:                                              ; preds = %124
  %136 = call i32 @puts(ptr noundef @.str.3)
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #5
  br label %10, !llvm.loop !16

137:                                              ; preds = %10
  ret i32 0
}

declare i32 @__isoc99_scanf(ptr noundef, ...) #4

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

declare i32 @puts(ptr noundef) #4

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { mustprogress norecurse 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 = { "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 = { 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 = !{!"double", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}


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

@t = external dso_local global i32, align 4
@n = external dso_local global i32, align 4
@st = external dso_local local_unnamed_addr global i32, align 4
@mod = external dso_local local_unnamed_addr global i32, align 4
@out = external dso_local local_unnamed_addr global [801 x double], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [1 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_Z1Fii(i32 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z7mod_subii(i32 noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z7mod_addii(i32 noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #2 {
  %1 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @t)
  %2 = load i32, ptr @t, align 4, !tbaa !5
  %3 = add nsw i32 %2, -1
  store i32 %3, ptr @t, align 4, !tbaa !5
  %.not51 = icmp eq i32 %2, 0
  br i1 %.not51, label %._crit_edge54, label %.lr.ph53

.lr.ph53:                                         ; preds = %0, %._crit_edge50
  %4 = load i32, ptr @st, align 4, !tbaa !5
  %5 = add nsw i32 %4, 1
  store i32 %5, ptr @st, align 4, !tbaa !5
  %6 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n)
  %7 = load i32, ptr @n, align 4, !tbaa !5
  %8 = shl i32 %7, 3
  store i32 %8, ptr @mod, align 4, !tbaa !5
  %.not3237 = icmp slt i32 %7, 0
  br i1 %.not3237, label %.preheader35, label %9

9:                                                ; preds = %.lr.ph53
  %10 = tail call noundef i32 @_Z7mod_addii(i32 noundef 0, i32 noundef 3)
  %11 = tail call noundef i32 @_Z7mod_subii(i32 noundef 0, i32 noundef 3)
  %12 = tail call noundef double @_Z1Fii(i32 noundef %10, i32 noundef %11)
  store double %12, ptr @out, align 16, !tbaa !9
  %13 = load i32, ptr @n, align 4
  %14 = icmp sgt i32 %13, 0
  %15 = fmul double %12, 5.000000e-01
  %16 = fadd double %15, 0.000000e+00
  br i1 %14, label %17, label %.preheader35

17:                                               ; preds = %9
  %18 = tail call noundef i32 @_Z7mod_addii(i32 noundef 1, i32 noundef 3)
  %19 = tail call noundef i32 @_Z7mod_subii(i32 noundef 1, i32 noundef 3)
  %20 = tail call noundef i32 @_Z7mod_addii(i32 noundef %19, i32 noundef 1)
  %21 = tail call noundef double @_Z1Fii(i32 noundef %18, i32 noundef %20)
  store double %21, ptr getelementptr inbounds (i8, ptr @out, i64 8), align 8, !tbaa !9
  %22 = load i32, ptr @n, align 4
  %23 = icmp sgt i32 %22, 1
  %24 = fmul double %21, 5.000000e-01
  %25 = select i1 %23, double %21, double %24
  %26 = fadd double %16, %25
  br i1 %23, label %.lr.ph.peel.next58, label %.preheader35

.preheader35:                                     ; preds = %.lr.ph.peel.next58, %9, %17, %.lr.ph53
  %.028.lcssa = phi double [ 0.000000e+00, %.lr.ph53 ], [ %16, %9 ], [ %26, %17 ], [ %49, %.lr.ph.peel.next58 ]
  %.lcssa = phi i32 [ %7, %.lr.ph53 ], [ %13, %9 ], [ %22, %17 ], [ %44, %.lr.ph.peel.next58 ]
  %27 = shl i32 %.lcssa, 1
  %.02641 = add nsw i32 %.lcssa, 1
  %28 = icmp slt i32 %.02641, %27
  br i1 %28, label %.lr.ph43.preheader, label %.preheader

.lr.ph43.preheader:                               ; preds = %.preheader35
  %29 = sext i32 %.lcssa to i64
  %30 = add nsw i64 %29, 1
  %31 = sext i32 %27 to i64
  %32 = add i32 %.lcssa, 3
  %33 = add i32 %.lcssa, -2
  %xtraiter = and i32 %32, 3
  %lcmp.mod.not = icmp eq i32 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.lr.ph43.prol.loopexit, label %.lr.ph43.prol

.lr.ph43.prol:                                    ; preds = %.lr.ph43.preheader, %.lr.ph43.prol
  %indvars.iv66.prol = phi i64 [ %indvars.iv.next67.prol, %.lr.ph43.prol ], [ %30, %.lr.ph43.preheader ]
  %prol.iter = phi i32 [ %prol.iter.next, %.lr.ph43.prol ], [ 0, %.lr.ph43.preheader ]
  %34 = sub nsw i64 %31, %indvars.iv66.prol
  %35 = getelementptr inbounds [801 x double], ptr @out, i64 0, i64 %34
  %36 = load double, ptr %35, align 8, !tbaa !9
  %37 = getelementptr inbounds [801 x double], ptr @out, i64 0, i64 %indvars.iv66.prol
  store double %36, ptr %37, align 8, !tbaa !9
  %indvars.iv.next67.prol = add nsw i64 %indvars.iv66.prol, 1
  %prol.iter.next = add i32 %prol.iter, 1
  %prol.iter.cmp.not = icmp eq i32 %prol.iter.next, %xtraiter
  br i1 %prol.iter.cmp.not, label %.lr.ph43.prol.loopexit, label %.lr.ph43.prol, !llvm.loop !11

.lr.ph43.prol.loopexit:                           ; preds = %.lr.ph43.prol, %.lr.ph43.preheader
  %indvars.iv66.unr = phi i64 [ %30, %.lr.ph43.preheader ], [ %indvars.iv.next67.prol, %.lr.ph43.prol ]
  %38 = icmp ult i32 %33, 3
  br i1 %38, label %.preheader, label %.lr.ph43

.lr.ph.peel.next58:                               ; preds = %17, %.lr.ph.peel.next58
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph.peel.next58 ], [ 2, %17 ]
  %.02839 = phi double [ %49, %.lr.ph.peel.next58 ], [ %26, %17 ]
  %39 = trunc nuw nsw i64 %indvars.iv to i32
  %40 = tail call noundef i32 @_Z7mod_addii(i32 noundef %39, i32 noundef 3)
  %41 = tail call noundef i32 @_Z7mod_subii(i32 noundef %39, i32 noundef 3)
  %42 = tail call noundef double @_Z1Fii(i32 noundef %40, i32 noundef %41)
  %43 = getelementptr inbounds [801 x double], ptr @out, i64 0, i64 %indvars.iv
  store double %42, ptr %43, align 8, !tbaa !9
  %44 = load i32, ptr @n, align 4
  %45 = sext i32 %44 to i64
  %46 = icmp slt i64 %indvars.iv, %45
  %47 = fmul double %42, 5.000000e-01
  %48 = select i1 %46, double %42, double %47
  %49 = fadd double %.02839, %48
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  br i1 %46, label %.lr.ph.peel.next58, label %.preheader35, !llvm.loop !13

.preheader:                                       ; preds = %.lr.ph43.prol.loopexit, %.lr.ph43, %.preheader35
  %50 = shl i32 %.lcssa, 3
  %51 = icmp slt i32 %27, %50
  br i1 %51, label %.lr.ph46.preheader, label %._crit_edge

.lr.ph46.preheader:                               ; preds = %.preheader
  %52 = sext i32 %27 to i64
  %wide.trip.count = sext i32 %50 to i64
  %53 = sub nsw i64 %wide.trip.count, %52
  %min.iters.check = icmp ult i64 %53, 4
  %54 = and i64 %52, 2305843009213693948
  %diff.check = icmp eq i64 %54, 0
  %or.cond = or i1 %min.iters.check, %diff.check
  br i1 %or.cond, label %.lr.ph46.preheader81, label %vector.ph

.lr.ph46.preheader81:                             ; preds = %middle.block, %.lr.ph46.preheader
  %indvars.iv69.ph = phi i64 [ %52, %.lr.ph46.preheader ], [ %ind.end, %middle.block ]
  %55 = sub nsw i64 0, %indvars.iv69.ph
  %xtraiter84 = and i64 %55, 3
  %lcmp.mod85.not = icmp eq i64 %xtraiter84, 0
  br i1 %lcmp.mod85.not, label %.lr.ph46.prol.loopexit, label %.lr.ph46.prol

.lr.ph46.prol:                                    ; preds = %.lr.ph46.preheader81, %.lr.ph46.prol
  %indvars.iv69.prol = phi i64 [ %indvars.iv.next70.prol, %.lr.ph46.prol ], [ %indvars.iv69.ph, %.lr.ph46.preheader81 ]
  %prol.iter86 = phi i64 [ %prol.iter86.next, %.lr.ph46.prol ], [ 0, %.lr.ph46.preheader81 ]
  %56 = sub nsw i64 %indvars.iv69.prol, %52
  %57 = getelementptr inbounds [801 x double], ptr @out, i64 0, i64 %56
  %58 = load double, ptr %57, align 8, !tbaa !9
  %59 = getelementptr inbounds [801 x double], ptr @out, i64 0, i64 %indvars.iv69.prol
  store double %58, ptr %59, align 8, !tbaa !9
  %indvars.iv.next70.prol = add nsw i64 %indvars.iv69.prol, 1
  %prol.iter86.next = add i64 %prol.iter86, 1
  %prol.iter86.cmp.not = icmp eq i64 %prol.iter86.next, %xtraiter84
  br i1 %prol.iter86.cmp.not, label %.lr.ph46.prol.loopexit, label %.lr.ph46.prol, !llvm.loop !16

.lr.ph46.prol.loopexit:                           ; preds = %.lr.ph46.prol, %.lr.ph46.preheader81
  %indvars.iv69.unr = phi i64 [ %indvars.iv69.ph, %.lr.ph46.preheader81 ], [ %indvars.iv.next70.prol, %.lr.ph46.prol ]
  %60 = sub nsw i64 %indvars.iv69.ph, %wide.trip.count
  %61 = icmp ugt i64 %60, -4
  br i1 %61, label %._crit_edge, label %.lr.ph46

vector.ph:                                        ; preds = %.lr.ph46.preheader
  %n.vec = and i64 %53, -4
  %ind.end = add nsw i64 %n.vec, %52
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %offset.idx = add i64 %index, %52
  %62 = getelementptr inbounds [801 x double], ptr @out, i64 0, i64 %index
  %63 = getelementptr inbounds i8, ptr %62, i64 16
  %wide.load = load <2 x double>, ptr %62, align 16, !tbaa !9
  %wide.load80 = load <2 x double>, ptr %63, align 16, !tbaa !9
  %64 = getelementptr inbounds [801 x double], ptr @out, i64 0, i64 %offset.idx
  %65 = getelementptr inbounds i8, ptr %64, i64 16
  store <2 x double> %wide.load, ptr %64, align 16, !tbaa !9
  store <2 x double> %wide.load80, ptr %65, align 16, !tbaa !9
  %index.next = add nuw i64 %index, 4
  %66 = icmp eq i64 %index.next, %n.vec
  br i1 %66, label %middle.block, label %vector.body, !llvm.loop !17

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %53, %n.vec
  br i1 %cmp.n, label %._crit_edge, label %.lr.ph46.preheader81

.lr.ph43:                                         ; preds = %.lr.ph43.prol.loopexit, %.lr.ph43
  %indvars.iv66 = phi i64 [ %indvars.iv.next67.3, %.lr.ph43 ], [ %indvars.iv66.unr, %.lr.ph43.prol.loopexit ]
  %67 = sub nsw i64 %31, %indvars.iv66
  %68 = getelementptr inbounds [801 x double], ptr @out, i64 0, i64 %67
  %69 = load double, ptr %68, align 8, !tbaa !9
  %70 = getelementptr inbounds [801 x double], ptr @out, i64 0, i64 %indvars.iv66
  store double %69, ptr %70, align 8, !tbaa !9
  %indvars.iv.next67 = add nsw i64 %indvars.iv66, 1
  %71 = sub nsw i64 %31, %indvars.iv.next67
  %72 = getelementptr inbounds [801 x double], ptr @out, i64 0, i64 %71
  %73 = load double, ptr %72, align 8, !tbaa !9
  %74 = getelementptr inbounds [801 x double], ptr @out, i64 0, i64 %indvars.iv.next67
  store double %73, ptr %74, align 8, !tbaa !9
  %indvars.iv.next67.1 = add nsw i64 %indvars.iv66, 2
  %75 = sub nsw i64 %31, %indvars.iv.next67.1
  %76 = getelementptr inbounds [801 x double], ptr @out, i64 0, i64 %75
  %77 = load double, ptr %76, align 8, !tbaa !9
  %78 = getelementptr inbounds [801 x double], ptr @out, i64 0, i64 %indvars.iv.next67.1
  store double %77, ptr %78, align 8, !tbaa !9
  %indvars.iv.next67.2 = add nsw i64 %indvars.iv66, 3
  %79 = sub nsw i64 %31, %indvars.iv.next67.2
  %80 = getelementptr inbounds [801 x double], ptr @out, i64 0, i64 %79
  %81 = load double, ptr %80, align 8, !tbaa !9
  %82 = getelementptr inbounds [801 x double], ptr @out, i64 0, i64 %indvars.iv.next67.2
  store double %81, ptr %82, align 8, !tbaa !9
  %indvars.iv.next67.3 = add nsw i64 %indvars.iv66, 4
  %lftr.wideiv.3 = trunc i64 %indvars.iv.next67.3 to i32
  %exitcond.not.3 = icmp eq i32 %27, %lftr.wideiv.3
  br i1 %exitcond.not.3, label %.preheader, label %.lr.ph43, !llvm.loop !20

._crit_edge:                                      ; preds = %.lr.ph46.prol.loopexit, %.lr.ph46, %middle.block, %.preheader
  %83 = sitofp i32 %.lcssa to double
  %84 = fdiv double %.028.lcssa, %83
  %85 = fadd double %84, 1.000000e+00
  %86 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, double noundef %85)
  %87 = load i32, ptr @n, align 4, !tbaa !5
  %88 = shl i32 %87, 3
  %89 = icmp sgt i32 %88, 0
  br i1 %89, label %.lr.ph49, label %._crit_edge50

.lr.ph46:                                         ; preds = %.lr.ph46.prol.loopexit, %.lr.ph46
  %indvars.iv69 = phi i64 [ %indvars.iv.next70.3, %.lr.ph46 ], [ %indvars.iv69.unr, %.lr.ph46.prol.loopexit ]
  %90 = sub nsw i64 %indvars.iv69, %52
  %91 = getelementptr inbounds [801 x double], ptr @out, i64 0, i64 %90
  %92 = load double, ptr %91, align 8, !tbaa !9
  %93 = getelementptr inbounds [801 x double], ptr @out, i64 0, i64 %indvars.iv69
  store double %92, ptr %93, align 8, !tbaa !9
  %indvars.iv.next70 = add nsw i64 %indvars.iv69, 1
  %94 = sub nsw i64 %indvars.iv.next70, %52
  %95 = getelementptr inbounds [801 x double], ptr @out, i64 0, i64 %94
  %96 = load double, ptr %95, align 8, !tbaa !9
  %97 = getelementptr inbounds [801 x double], ptr @out, i64 0, i64 %indvars.iv.next70
  store double %96, ptr %97, align 8, !tbaa !9
  %indvars.iv.next70.1 = add nsw i64 %indvars.iv69, 2
  %98 = sub nsw i64 %indvars.iv.next70.1, %52
  %99 = getelementptr inbounds [801 x double], ptr @out, i64 0, i64 %98
  %100 = load double, ptr %99, align 8, !tbaa !9
  %101 = getelementptr inbounds [801 x double], ptr @out, i64 0, i64 %indvars.iv.next70.1
  store double %100, ptr %101, align 8, !tbaa !9
  %indvars.iv.next70.2 = add nsw i64 %indvars.iv69, 3
  %102 = sub nsw i64 %indvars.iv.next70.2, %52
  %103 = getelementptr inbounds [801 x double], ptr @out, i64 0, i64 %102
  %104 = load double, ptr %103, align 8, !tbaa !9
  %105 = getelementptr inbounds [801 x double], ptr @out, i64 0, i64 %indvars.iv.next70.2
  store double %104, ptr %105, align 8, !tbaa !9
  %indvars.iv.next70.3 = add nsw i64 %indvars.iv69, 4
  %exitcond72.not.3 = icmp eq i64 %indvars.iv.next70.3, %wide.trip.count
  br i1 %exitcond72.not.3, label %._crit_edge, label %.lr.ph46, !llvm.loop !21

._crit_edge50:                                    ; preds = %.lr.ph49, %._crit_edge
  %106 = tail call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.3)
  %107 = load i32, ptr @t, align 4, !tbaa !5
  %108 = add nsw i32 %107, -1
  store i32 %108, ptr @t, align 4, !tbaa !5
  %.not = icmp eq i32 %107, 0
  br i1 %.not, label %._crit_edge54, label %.lr.ph53, !llvm.loop !22

.lr.ph49:                                         ; preds = %._crit_edge, %.lr.ph49
  %indvars.iv73 = phi i64 [ %indvars.iv.next74, %.lr.ph49 ], [ 0, %._crit_edge ]
  %109 = getelementptr inbounds [801 x double], ptr @out, i64 0, i64 %indvars.iv73
  %110 = load double, ptr %109, align 8, !tbaa !9
  %111 = fadd double %110, 1.000000e+00
  %112 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, double noundef %111)
  %indvars.iv.next74 = add nuw nsw i64 %indvars.iv73, 1
  %113 = load i32, ptr @n, align 4, !tbaa !5
  %114 = shl i32 %113, 3
  %115 = sext i32 %114 to i64
  %116 = icmp slt i64 %indvars.iv.next74, %115
  br i1 %116, label %.lr.ph49, label %._crit_edge50, !llvm.loop !23

._crit_edge54:                                    ; preds = %._crit_edge50, %0
  ret i32 0
}

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

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

; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3

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

!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 = !{!"double", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.unroll.disable"}
!13 = distinct !{!13, !14, !15}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!"llvm.loop.peeled.count", i32 2}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !14, !18, !19}
!18 = !{!"llvm.loop.isvectorized", i32 1}
!19 = !{!"llvm.loop.unroll.runtime.disable"}
!20 = distinct !{!20, !14}
!21 = distinct !{!21, !14, !18}
!22 = distinct !{!22, !14}
!23 = distinct !{!23, !14}


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