; LLVM IR from upupming/algorithm :: AdvancedLevel_C++/1009. Product of Polynomials (25) (main)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [9 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca double, align 8
  %7 = alloca [1001 x double], align 16
  %8 = alloca [2001 x double], align 16
  %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 i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  store i32 0, ptr %5, align 4, !tbaa !5
  %15 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %2)
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 8008, ptr %7) #5
  call void @llvm.memset.p0.i64(ptr align 16 %7, i8 0, i64 8008, i1 false)
  call void @llvm.lifetime.start.p0(i64 16008, ptr %8) #5
  call void @llvm.memset.p0.i64(ptr align 16 %8, i8 0, i64 16008, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %16

16:                                               ; preds = %27, %0
  %17 = load i32, ptr %9, align 4, !tbaa !5
  %18 = load i32, ptr %2, align 4, !tbaa !5
  %19 = icmp slt i32 %17, %18
  br i1 %19, label %21, label %20

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

21:                                               ; preds = %16
  %22 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %4, ptr noundef %6)
  %23 = load double, ptr %6, align 8, !tbaa !9
  %24 = load i32, ptr %4, align 4, !tbaa !5
  %25 = sext i32 %24 to i64
  %26 = getelementptr inbounds [1001 x double], ptr %7, i64 0, i64 %25
  store double %23, ptr %26, align 8, !tbaa !9
  br label %27

27:                                               ; preds = %21
  %28 = load i32, ptr %9, align 4, !tbaa !5
  %29 = add nsw i32 %28, 1
  store i32 %29, ptr %9, align 4, !tbaa !5
  br label %16, !llvm.loop !11

30:                                               ; preds = %20
  %31 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %3)
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %32

32:                                               ; preds = %60, %30
  %33 = load i32, ptr %10, align 4, !tbaa !5
  %34 = load i32, ptr %3, align 4, !tbaa !5
  %35 = icmp slt i32 %33, %34
  br i1 %35, label %37, label %36

36:                                               ; preds = %32
  store i32 5, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %63

37:                                               ; preds = %32
  %38 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %4, ptr noundef %6)
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  store i32 0, ptr %12, align 4, !tbaa !5
  br label %39

39:                                               ; preds = %56, %37
  %40 = load i32, ptr %12, align 4, !tbaa !5
  %41 = icmp slt i32 %40, 1001
  br i1 %41, label %43, label %42

42:                                               ; preds = %39
  store i32 8, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %59

43:                                               ; preds = %39
  %44 = load i32, ptr %12, align 4, !tbaa !5
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds [1001 x double], ptr %7, i64 0, i64 %45
  %47 = load double, ptr %46, align 8, !tbaa !9
  %48 = load double, ptr %6, align 8, !tbaa !9
  %49 = load i32, ptr %12, align 4, !tbaa !5
  %50 = load i32, ptr %4, align 4, !tbaa !5
  %51 = add nsw i32 %49, %50
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds [2001 x double], ptr %8, i64 0, i64 %52
  %54 = load double, ptr %53, align 8, !tbaa !9
  %55 = call double @llvm.fmuladd.f64(double %47, double %48, double %54)
  store double %55, ptr %53, align 8, !tbaa !9
  br label %56

56:                                               ; preds = %43
  %57 = load i32, ptr %12, align 4, !tbaa !5
  %58 = add nsw i32 %57, 1
  store i32 %58, ptr %12, align 4, !tbaa !5
  br label %39, !llvm.loop !13

59:                                               ; preds = %42
  br label %60

60:                                               ; preds = %59
  %61 = load i32, ptr %10, align 4, !tbaa !5
  %62 = add nsw i32 %61, 1
  store i32 %62, ptr %10, align 4, !tbaa !5
  br label %32, !llvm.loop !14

63:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  store i32 2000, ptr %13, align 4, !tbaa !5
  br label %64

64:                                               ; preds = %78, %63
  %65 = load i32, ptr %13, align 4, !tbaa !5
  %66 = icmp sge i32 %65, 0
  br i1 %66, label %68, label %67

67:                                               ; preds = %64
  store i32 11, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %81

68:                                               ; preds = %64
  %69 = load i32, ptr %13, align 4, !tbaa !5
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds [2001 x double], ptr %8, i64 0, i64 %70
  %72 = load double, ptr %71, align 8, !tbaa !9
  %73 = fcmp une double %72, 0.000000e+00
  br i1 %73, label %74, label %77

74:                                               ; preds = %68
  %75 = load i32, ptr %5, align 4, !tbaa !5
  %76 = add nsw i32 %75, 1
  store i32 %76, ptr %5, align 4, !tbaa !5
  br label %77

77:                                               ; preds = %74, %68
  br label %78

78:                                               ; preds = %77
  %79 = load i32, ptr %13, align 4, !tbaa !5
  %80 = add nsw i32 %79, -1
  store i32 %80, ptr %13, align 4, !tbaa !5
  br label %64, !llvm.loop !15

81:                                               ; preds = %67
  %82 = load i32, ptr %5, align 4, !tbaa !5
  %83 = call i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %82)
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  store i32 2000, ptr %14, align 4, !tbaa !5
  br label %84

84:                                               ; preds = %102, %81
  %85 = load i32, ptr %14, align 4, !tbaa !5
  %86 = icmp sge i32 %85, 0
  br i1 %86, label %88, label %87

87:                                               ; preds = %84
  store i32 14, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  br label %105

88:                                               ; preds = %84
  %89 = load i32, ptr %14, align 4, !tbaa !5
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds [2001 x double], ptr %8, i64 0, i64 %90
  %92 = load double, ptr %91, align 8, !tbaa !9
  %93 = fcmp une double %92, 0.000000e+00
  br i1 %93, label %94, label %101

94:                                               ; preds = %88
  %95 = load i32, ptr %14, align 4, !tbaa !5
  %96 = load i32, ptr %14, align 4, !tbaa !5
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds [2001 x double], ptr %8, i64 0, i64 %97
  %99 = load double, ptr %98, align 8, !tbaa !9
  %100 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i32 noundef %95, double noundef %99)
  br label %101

101:                                              ; preds = %94, %88
  br label %102

102:                                              ; preds = %101
  %103 = load i32, ptr %14, align 4, !tbaa !5
  %104 = add nsw i32 %103, -1
  store i32 %104, ptr %14, align 4, !tbaa !5
  br label %84, !llvm.loop !16

105:                                              ; preds = %87
  store i32 0, ptr %1, align 4
  store i32 1, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 16008, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8008, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #5
  %106 = load i32, ptr %1, align 4
  ret i32 %106
}

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

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

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

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

attributes #0 = { 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 #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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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"

@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [9 x i8], align 1

; Function Attrs: mustprogress nofree norecurse nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca double, align 8
  %5 = alloca [1001 x double], align 16
  %6 = alloca [2001 x double], align 16
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #6
  %7 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #6
  call void @llvm.lifetime.start.p0(i64 8008, ptr nonnull %5) #6
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(8008) %5, i8 0, i64 8008, i1 false)
  call void @llvm.lifetime.start.p0(i64 16008, ptr nonnull %6) #6
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(16008) %6, i8 0, i64 16008, i1 false)
  %8 = load i32, ptr %1, align 4, !tbaa !5
  %9 = icmp sgt i32 %8, 0
  br i1 %9, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %0
  %10 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %2)
  %11 = load i32, ptr %2, align 4, !tbaa !5
  %12 = icmp sgt i32 %11, 0
  br i1 %12, label %.lr.ph29.preheader, label %vector.body48.preheader

.lr.ph29.preheader:                               ; preds = %._crit_edge
  %13 = getelementptr inbounds i8, ptr %5, i64 8000
  %14 = load double, ptr %13, align 16
  br label %.lr.ph29

.lr.ph:                                           ; preds = %0, %.lr.ph
  %.02225 = phi i32 [ %20, %.lr.ph ], [ 0, %0 ]
  %15 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %3, ptr noundef nonnull %4)
  %16 = load double, ptr %4, align 8, !tbaa !9
  %17 = load i32, ptr %3, align 4, !tbaa !5
  %18 = sext i32 %17 to i64
  %19 = getelementptr inbounds [1001 x double], ptr %5, i64 0, i64 %18
  store double %16, ptr %19, align 8, !tbaa !9
  %20 = add nuw nsw i32 %.02225, 1
  %21 = load i32, ptr %1, align 4, !tbaa !5
  %22 = icmp slt i32 %20, %21
  br i1 %22, label %.lr.ph, label %._crit_edge, !llvm.loop !11

vector.body48:                                    ; preds = %vector.body48, %vector.body48.preheader
  %index49 = phi i64 [ 0, %vector.body48.preheader ], [ %index.next54.1, %vector.body48 ]
  %vec.phi = phi <2 x i32> [ zeroinitializer, %vector.body48.preheader ], [ %39, %vector.body48 ]
  %vec.phi50 = phi <2 x i32> [ zeroinitializer, %vector.body48.preheader ], [ %40, %vector.body48 ]
  %offset.idx = sub nuw nsw i64 2000, %index49
  %23 = getelementptr inbounds [2001 x double], ptr %6, i64 0, i64 %offset.idx
  %24 = getelementptr inbounds i8, ptr %23, i64 -8
  %25 = getelementptr inbounds i8, ptr %23, i64 -24
  %wide.load51 = load <2 x double>, ptr %24, align 8, !tbaa !9
  %reverse = shufflevector <2 x double> %wide.load51, <2 x double> poison, <2 x i32> <i32 1, i32 0>
  %wide.load52 = load <2 x double>, ptr %25, align 8, !tbaa !9
  %reverse53 = shufflevector <2 x double> %wide.load52, <2 x double> poison, <2 x i32> <i32 1, i32 0>
  %26 = fcmp une <2 x double> %reverse, zeroinitializer
  %27 = fcmp une <2 x double> %reverse53, zeroinitializer
  %28 = zext <2 x i1> %26 to <2 x i32>
  %29 = zext <2 x i1> %27 to <2 x i32>
  %30 = add <2 x i32> %vec.phi, %28
  %31 = add <2 x i32> %vec.phi50, %29
  %index.next54 = or disjoint i64 %index49, 4
  %offset.idx.1 = sub nuw nsw i64 2000, %index.next54
  %32 = getelementptr inbounds [2001 x double], ptr %6, i64 0, i64 %offset.idx.1
  %33 = getelementptr inbounds i8, ptr %32, i64 -8
  %34 = getelementptr inbounds i8, ptr %32, i64 -24
  %wide.load51.1 = load <2 x double>, ptr %33, align 8, !tbaa !9
  %reverse.1 = shufflevector <2 x double> %wide.load51.1, <2 x double> poison, <2 x i32> <i32 1, i32 0>
  %wide.load52.1 = load <2 x double>, ptr %34, align 8, !tbaa !9
  %reverse53.1 = shufflevector <2 x double> %wide.load52.1, <2 x double> poison, <2 x i32> <i32 1, i32 0>
  %35 = fcmp une <2 x double> %reverse.1, zeroinitializer
  %36 = fcmp une <2 x double> %reverse53.1, zeroinitializer
  %37 = zext <2 x i1> %35 to <2 x i32>
  %38 = zext <2 x i1> %36 to <2 x i32>
  %39 = add <2 x i32> %30, %37
  %40 = add <2 x i32> %31, %38
  %index.next54.1 = add nuw nsw i64 %index49, 8
  %41 = icmp eq i64 %index.next54.1, 2000
  br i1 %41, label %.loopexit, label %vector.body48, !llvm.loop !13

.lr.ph29:                                         ; preds = %.lr.ph29.preheader, %scalar.ph
  %.02127 = phi i32 [ %65, %scalar.ph ], [ 0, %.lr.ph29.preheader ]
  %42 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %3, ptr noundef nonnull %4)
  %43 = load double, ptr %4, align 8, !tbaa !9
  %44 = load i32, ptr %3, align 4, !tbaa !5
  %45 = sext i32 %44 to i64
  %broadcast.splatinsert = insertelement <2 x double> poison, double %43, i64 0
  %broadcast.splat = shufflevector <2 x double> %broadcast.splatinsert, <2 x double> poison, <2 x i32> zeroinitializer
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %.lr.ph29
  %index = phi i64 [ 0, %.lr.ph29 ], [ %index.next.1, %vector.body ]
  %46 = getelementptr inbounds [1001 x double], ptr %5, i64 0, i64 %index
  %47 = getelementptr inbounds i8, ptr %46, i64 16
  %wide.load = load <2 x double>, ptr %46, align 16, !tbaa !9
  %wide.load41 = load <2 x double>, ptr %47, align 16, !tbaa !9
  %48 = add nsw i64 %index, %45
  %49 = getelementptr inbounds [2001 x double], ptr %6, i64 0, i64 %48
  %50 = getelementptr inbounds i8, ptr %49, i64 16
  %wide.load42 = load <2 x double>, ptr %49, align 8, !tbaa !9
  %wide.load43 = load <2 x double>, ptr %50, align 8, !tbaa !9
  %51 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %wide.load, <2 x double> %broadcast.splat, <2 x double> %wide.load42)
  %52 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %wide.load41, <2 x double> %broadcast.splat, <2 x double> %wide.load43)
  store <2 x double> %51, ptr %49, align 8, !tbaa !9
  store <2 x double> %52, ptr %50, align 8, !tbaa !9
  %index.next = or disjoint i64 %index, 4
  %53 = getelementptr inbounds [1001 x double], ptr %5, i64 0, i64 %index.next
  %54 = getelementptr inbounds i8, ptr %53, i64 16
  %wide.load.1 = load <2 x double>, ptr %53, align 16, !tbaa !9
  %wide.load41.1 = load <2 x double>, ptr %54, align 16, !tbaa !9
  %55 = add nsw i64 %index.next, %45
  %56 = getelementptr inbounds [2001 x double], ptr %6, i64 0, i64 %55
  %57 = getelementptr inbounds i8, ptr %56, i64 16
  %wide.load42.1 = load <2 x double>, ptr %56, align 8, !tbaa !9
  %wide.load43.1 = load <2 x double>, ptr %57, align 8, !tbaa !9
  %58 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %wide.load.1, <2 x double> %broadcast.splat, <2 x double> %wide.load42.1)
  %59 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %wide.load41.1, <2 x double> %broadcast.splat, <2 x double> %wide.load43.1)
  store <2 x double> %58, ptr %56, align 8, !tbaa !9
  store <2 x double> %59, ptr %57, align 8, !tbaa !9
  %index.next.1 = add nuw nsw i64 %index, 8
  %60 = icmp eq i64 %index.next.1, 1000
  br i1 %60, label %scalar.ph, label %vector.body, !llvm.loop !16

vector.body48.preheader:                          ; preds = %scalar.ph, %._crit_edge
  br label %vector.body48

scalar.ph:                                        ; preds = %vector.body
  %61 = add nsw i64 %45, 1000
  %62 = getelementptr inbounds [2001 x double], ptr %6, i64 0, i64 %61
  %63 = load double, ptr %62, align 8, !tbaa !9
  %64 = call double @llvm.fmuladd.f64(double %14, double %43, double %63)
  store double %64, ptr %62, align 8, !tbaa !9
  %65 = add nuw nsw i32 %.02127, 1
  %66 = load i32, ptr %2, align 4, !tbaa !5
  %67 = icmp slt i32 %65, %66
  br i1 %67, label %.lr.ph29, label %vector.body48.preheader, !llvm.loop !17

.loopexit:                                        ; preds = %vector.body48
  %bin.rdx = add <2 x i32> %40, %39
  %68 = call i32 @llvm.vector.reduce.add.v2i32(<2 x i32> %bin.rdx)
  %69 = load double, ptr %6, align 16, !tbaa !9
  %70 = fcmp une double %69, 0.000000e+00
  %71 = zext i1 %70 to i32
  %.1 = add nuw nsw i32 %68, %71
  %72 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %.1)
  br label %74

73:                                               ; preds = %81
  call void @llvm.lifetime.end.p0(i64 16008, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 8008, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  ret i32 0

74:                                               ; preds = %.loopexit, %81
  %indvars.iv37 = phi i64 [ 2000, %.loopexit ], [ %indvars.iv.next38, %81 ]
  %75 = getelementptr inbounds [2001 x double], ptr %6, i64 0, i64 %indvars.iv37
  %76 = load double, ptr %75, align 8, !tbaa !9
  %77 = fcmp une double %76, 0.000000e+00
  br i1 %77, label %78, label %81

78:                                               ; preds = %74
  %79 = trunc nuw nsw i64 %indvars.iv37 to i32
  %80 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %79, double noundef %76)
  br label %81

81:                                               ; preds = %74, %78
  %indvars.iv.next38 = add nsw i64 %indvars.iv37, -1
  %.not40 = icmp eq i64 %indvars.iv37, 0
  br i1 %.not40, label %73, label %74, !llvm.loop !18
}

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

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

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

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

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

; 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>) #5

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.vector.reduce.add.v2i32(<2 x i32>) #5

attributes #0 = { mustprogress nofree norecurse 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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { 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, !15}
!14 = !{!"llvm.loop.isvectorized", i32 1}
!15 = !{!"llvm.loop.unroll.runtime.disable"}
!16 = distinct !{!16, !12, !14, !15}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !12}


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