; LLVM IR from tangjz/acm-icpc :: codeforces/complete (500D)

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

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.Line = type { i64, i64, i64 }
%"struct.std::pair" = type { i32, i32 }

@n = external dso_local global i64, align 8
@q = external dso_local global i64, align 8
@e = external dso_local global [1000000 x %"class.std::vector"], align 16
@ans = external dso_local global double, align 8
@l = external dso_local global [1000000 x %struct.Line], align 16
@.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 [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [6 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z3dfsi(i32 noundef) #0

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #2 {
  %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 %"struct.std::pair", align 4
  %7 = alloca %"struct.std::pair", align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %11 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #4
  store i32 1, ptr %2, align 4, !tbaa !5
  br label %12

12:                                               ; preds = %34, %0
  %13 = load i32, ptr %2, align 4, !tbaa !5
  %14 = sext i32 %13 to i64
  %15 = load i64, ptr @n, align 8, !tbaa !9
  %16 = icmp slt i64 %14, %15
  br i1 %16, label %18, label %17

17:                                               ; preds = %12
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #4
  br label %37

18:                                               ; preds = %12
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  %19 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %3, ptr noundef %4, ptr noundef %5)
  %20 = load i32, ptr %5, align 4, !tbaa !5
  %21 = sext i32 %20 to i64
  %22 = load i32, ptr %2, align 4, !tbaa !5
  %23 = sext i32 %22 to i64
  %24 = getelementptr inbounds [1000000 x %struct.Line], ptr @l, i64 0, i64 %23
  %25 = getelementptr inbounds %struct.Line, ptr %24, i32 0, i32 2
  store i64 %21, ptr %25, align 8, !tbaa !11
  %26 = load i32, ptr %3, align 4, !tbaa !5
  %27 = sext i32 %26 to i64
  %28 = getelementptr inbounds [1000000 x %"class.std::vector"], ptr @e, i64 0, i64 %27
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  %29 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %2)
  store i64 %29, ptr %6, align 4
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %28, ptr noundef nonnull align 4 dereferenceable(8) %6)
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  %30 = load i32, ptr %4, align 4, !tbaa !5
  %31 = sext i32 %30 to i64
  %32 = getelementptr inbounds [1000000 x %"class.std::vector"], ptr @e, i64 0, i64 %31
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  %33 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 4 dereferenceable(4) %2)
  store i64 %33, ptr %7, align 4
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %32, ptr noundef nonnull align 4 dereferenceable(8) %7)
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  br label %34

34:                                               ; preds = %18
  %35 = load i32, ptr %2, align 4, !tbaa !5
  %36 = add nsw i32 %35, 1
  store i32 %36, ptr %2, align 4, !tbaa !5
  br label %12, !llvm.loop !13

37:                                               ; preds = %17
  call void @_Z3dfsi(i32 noundef 1)
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  store i32 1, ptr %8, align 4, !tbaa !5
  br label %38

38:                                               ; preds = %65, %37
  %39 = load i32, ptr %8, align 4, !tbaa !5
  %40 = sext i32 %39 to i64
  %41 = load i64, ptr @n, align 8, !tbaa !9
  %42 = icmp slt i64 %40, %41
  br i1 %42, label %44, label %43

43:                                               ; preds = %38
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  br label %68

44:                                               ; preds = %38
  %45 = load i32, ptr %8, align 4, !tbaa !5
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds [1000000 x %struct.Line], ptr @l, i64 0, i64 %46
  %48 = getelementptr inbounds %struct.Line, ptr %47, i32 0, i32 0
  %49 = load i64, ptr %48, align 8, !tbaa !15
  %50 = load i32, ptr %8, align 4, !tbaa !5
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds [1000000 x %struct.Line], ptr @l, i64 0, i64 %51
  %53 = getelementptr inbounds %struct.Line, ptr %52, i32 0, i32 1
  %54 = load i64, ptr %53, align 8, !tbaa !16
  %55 = mul nsw i64 %49, %54
  %56 = load i32, ptr %8, align 4, !tbaa !5
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds [1000000 x %struct.Line], ptr @l, i64 0, i64 %57
  %59 = getelementptr inbounds %struct.Line, ptr %58, i32 0, i32 2
  %60 = load i64, ptr %59, align 8, !tbaa !11
  %61 = mul nsw i64 %55, %60
  %62 = sitofp i64 %61 to double
  %63 = load double, ptr @ans, align 8, !tbaa !17
  %64 = fadd double %63, %62
  store double %64, ptr @ans, align 8, !tbaa !17
  br label %65

65:                                               ; preds = %44
  %66 = load i32, ptr %8, align 4, !tbaa !5
  %67 = add nsw i32 %66, 1
  store i32 %67, ptr %8, align 4, !tbaa !5
  br label %38, !llvm.loop !19

68:                                               ; preds = %43
  %69 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @q)
  br label %70

70:                                               ; preds = %74, %68
  %71 = load i64, ptr @q, align 8, !tbaa !9
  %72 = add nsw i64 %71, -1
  store i64 %72, ptr @q, align 8, !tbaa !9
  %73 = icmp ne i64 %71, 0
  br i1 %73, label %74, label %132

74:                                               ; preds = %70
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  %75 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.2, ptr noundef %9, ptr noundef %10)
  %76 = load i32, ptr %9, align 4, !tbaa !5
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds [1000000 x %struct.Line], ptr @l, i64 0, i64 %77
  %79 = getelementptr inbounds %struct.Line, ptr %78, i32 0, i32 0
  %80 = load i64, ptr %79, align 8, !tbaa !15
  %81 = load i32, ptr %9, align 4, !tbaa !5
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds [1000000 x %struct.Line], ptr @l, i64 0, i64 %82
  %84 = getelementptr inbounds %struct.Line, ptr %83, i32 0, i32 1
  %85 = load i64, ptr %84, align 8, !tbaa !16
  %86 = mul nsw i64 %80, %85
  %87 = load i32, ptr %9, align 4, !tbaa !5
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds [1000000 x %struct.Line], ptr @l, i64 0, i64 %88
  %90 = getelementptr inbounds %struct.Line, ptr %89, i32 0, i32 2
  %91 = load i64, ptr %90, align 8, !tbaa !11
  %92 = mul nsw i64 %86, %91
  %93 = sitofp i64 %92 to double
  %94 = load double, ptr @ans, align 8, !tbaa !17
  %95 = fsub double %94, %93
  store double %95, ptr @ans, align 8, !tbaa !17
  %96 = load i32, ptr %10, align 4, !tbaa !5
  %97 = sext i32 %96 to i64
  %98 = load i32, ptr %9, align 4, !tbaa !5
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds [1000000 x %struct.Line], ptr @l, i64 0, i64 %99
  %101 = getelementptr inbounds %struct.Line, ptr %100, i32 0, i32 2
  store i64 %97, ptr %101, align 8, !tbaa !11
  %102 = load i32, ptr %9, align 4, !tbaa !5
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds [1000000 x %struct.Line], ptr @l, i64 0, i64 %103
  %105 = getelementptr inbounds %struct.Line, ptr %104, i32 0, i32 0
  %106 = load i64, ptr %105, align 8, !tbaa !15
  %107 = load i32, ptr %9, align 4, !tbaa !5
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds [1000000 x %struct.Line], ptr @l, i64 0, i64 %108
  %110 = getelementptr inbounds %struct.Line, ptr %109, i32 0, i32 1
  %111 = load i64, ptr %110, align 8, !tbaa !16
  %112 = mul nsw i64 %106, %111
  %113 = load i32, ptr %9, align 4, !tbaa !5
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds [1000000 x %struct.Line], ptr @l, i64 0, i64 %114
  %116 = getelementptr inbounds %struct.Line, ptr %115, i32 0, i32 2
  %117 = load i64, ptr %116, align 8, !tbaa !11
  %118 = mul nsw i64 %112, %117
  %119 = sitofp i64 %118 to double
  %120 = load double, ptr @ans, align 8, !tbaa !17
  %121 = fadd double %120, %119
  store double %121, ptr @ans, align 8, !tbaa !17
  %122 = load double, ptr @ans, align 8, !tbaa !17
  %123 = fmul double %122, 6.000000e+00
  %124 = load i64, ptr @n, align 8, !tbaa !9
  %125 = sitofp i64 %124 to double
  %126 = fdiv double %123, %125
  %127 = load i64, ptr @n, align 8, !tbaa !9
  %128 = sub nsw i64 %127, 1
  %129 = sitofp i64 %128 to double
  %130 = fdiv double %126, %129
  %131 = call i32 (ptr, ...) @printf(ptr noundef @.str.3, double noundef %130)
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  br label %70, !llvm.loop !20

132:                                              ; preds = %70
  ret i32 0
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(8)) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #0

declare i32 @printf(ptr noundef, ...) #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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { "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 }

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

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.Line = type { i64, i64, i64 }
%"struct.std::pair" = type { i32, i32 }

@n = external dso_local global i64, align 8
@q = external dso_local global i64, align 8
@e = external dso_local global [1000000 x %"class.std::vector"], align 16
@ans = external dso_local local_unnamed_addr global double, align 8
@l = external dso_local local_unnamed_addr global [1000000 x %struct.Line], align 16
@.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 [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [6 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z3dfsi(i32 noundef) local_unnamed_addr #0

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

; 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 norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #2 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca %"struct.std::pair", align 8
  %6 = alloca %"struct.std::pair", align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #4
  store i32 1, ptr %1, align 4, !tbaa !5
  %10 = load i64, ptr @n, align 8, !tbaa !9
  %11 = icmp sgt i64 %10, 1
  br i1 %11, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %0
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #4
  call void @_Z3dfsi(i32 noundef 1)
  %12 = load i64, ptr @n, align 8, !tbaa !9
  %13 = icmp sgt i64 %12, 1
  br i1 %13, label %.lr.ph8.preheader, label %45

.lr.ph8.preheader:                                ; preds = %._crit_edge
  %ans.promoted = load double, ptr @ans, align 8, !tbaa !11
  %14 = add nsw i64 %12, -1
  %xtraiter = and i64 %14, 1
  %15 = icmp eq i64 %12, 2
  br i1 %15, label %._crit_edge9.unr-lcssa, label %.lr.ph8.preheader.new

.lr.ph8.preheader.new:                            ; preds = %.lr.ph8.preheader
  %unroll_iter = and i64 %14, -2
  br label %.lr.ph8

.lr.ph:                                           ; preds = %0, %.lr.ph
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #4
  %16 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %2, ptr noundef nonnull %3, ptr noundef nonnull %4)
  %17 = load i32, ptr %4, align 4, !tbaa !5
  %18 = sext i32 %17 to i64
  %19 = load i32, ptr %1, align 4, !tbaa !5
  %20 = sext i32 %19 to i64
  %21 = getelementptr inbounds [1000000 x %struct.Line], ptr @l, i64 0, i64 %20, i32 2
  store i64 %18, ptr %21, align 8, !tbaa !13
  %22 = load i32, ptr %2, align 4, !tbaa !5
  %23 = sext i32 %22 to i64
  %24 = getelementptr inbounds [1000000 x %"class.std::vector"], ptr @e, i64 0, i64 %23
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #4
  %25 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 4 dereferenceable(4) %1)
  store i64 %25, ptr %5, align 8
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %24, ptr noundef nonnull align 4 dereferenceable(8) %5)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  %26 = load i32, ptr %3, align 4, !tbaa !5
  %27 = sext i32 %26 to i64
  %28 = getelementptr inbounds [1000000 x %"class.std::vector"], ptr @e, i64 0, i64 %27
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #4
  %29 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %1)
  store i64 %29, ptr %6, align 8
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %28, ptr noundef nonnull align 4 dereferenceable(8) %6)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #4
  %30 = load i32, ptr %1, align 4, !tbaa !5
  %31 = add nsw i32 %30, 1
  store i32 %31, ptr %1, align 4, !tbaa !5
  %32 = sext i32 %31 to i64
  %33 = load i64, ptr @n, align 8, !tbaa !9
  %34 = icmp sgt i64 %33, %32
  br i1 %34, label %.lr.ph, label %._crit_edge, !llvm.loop !15

._crit_edge9.unr-lcssa:                           ; preds = %.lr.ph8, %.lr.ph8.preheader
  %.lcssa.ph = phi double [ poison, %.lr.ph8.preheader ], [ %69, %.lr.ph8 ]
  %indvars.iv.unr = phi i64 [ 1, %.lr.ph8.preheader ], [ %indvars.iv.next.1, %.lr.ph8 ]
  %.unr = phi double [ %ans.promoted, %.lr.ph8.preheader ], [ %69, %.lr.ph8 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge9, label %.lr.ph8.epil

.lr.ph8.epil:                                     ; preds = %._crit_edge9.unr-lcssa
  %35 = getelementptr inbounds [1000000 x %struct.Line], ptr @l, i64 0, i64 %indvars.iv.unr
  %36 = load i64, ptr %35, align 8, !tbaa !17
  %37 = getelementptr inbounds i8, ptr %35, i64 8
  %38 = load i64, ptr %37, align 8, !tbaa !18
  %39 = mul nsw i64 %38, %36
  %40 = getelementptr inbounds i8, ptr %35, i64 16
  %41 = load i64, ptr %40, align 8, !tbaa !13
  %42 = mul nsw i64 %39, %41
  %43 = sitofp i64 %42 to double
  %44 = fadd double %.unr, %43
  br label %._crit_edge9

._crit_edge9:                                     ; preds = %._crit_edge9.unr-lcssa, %.lr.ph8.epil
  %.lcssa = phi double [ %.lcssa.ph, %._crit_edge9.unr-lcssa ], [ %44, %.lr.ph8.epil ]
  store double %.lcssa, ptr @ans, align 8, !tbaa !11
  br label %45

45:                                               ; preds = %._crit_edge9, %._crit_edge
  %46 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @q)
  %47 = load i64, ptr @q, align 8, !tbaa !9
  %48 = add nsw i64 %47, -1
  store i64 %48, ptr @q, align 8, !tbaa !9
  %.not10 = icmp eq i64 %47, 0
  br i1 %.not10, label %._crit_edge13, label %.lr.ph12

.lr.ph8:                                          ; preds = %.lr.ph8, %.lr.ph8.preheader.new
  %indvars.iv = phi i64 [ 1, %.lr.ph8.preheader.new ], [ %indvars.iv.next.1, %.lr.ph8 ]
  %49 = phi double [ %ans.promoted, %.lr.ph8.preheader.new ], [ %69, %.lr.ph8 ]
  %niter = phi i64 [ 0, %.lr.ph8.preheader.new ], [ %niter.next.1, %.lr.ph8 ]
  %50 = getelementptr inbounds [1000000 x %struct.Line], ptr @l, i64 0, i64 %indvars.iv
  %51 = load i64, ptr %50, align 8, !tbaa !17
  %52 = getelementptr inbounds i8, ptr %50, i64 8
  %53 = load i64, ptr %52, align 8, !tbaa !18
  %54 = mul nsw i64 %53, %51
  %55 = getelementptr inbounds i8, ptr %50, i64 16
  %56 = load i64, ptr %55, align 8, !tbaa !13
  %57 = mul nsw i64 %54, %56
  %58 = sitofp i64 %57 to double
  %59 = fadd double %49, %58
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %60 = getelementptr inbounds [1000000 x %struct.Line], ptr @l, i64 0, i64 %indvars.iv.next
  %61 = load i64, ptr %60, align 8, !tbaa !17
  %62 = getelementptr inbounds i8, ptr %60, i64 8
  %63 = load i64, ptr %62, align 8, !tbaa !18
  %64 = mul nsw i64 %63, %61
  %65 = getelementptr inbounds i8, ptr %60, i64 16
  %66 = load i64, ptr %65, align 8, !tbaa !13
  %67 = mul nsw i64 %64, %66
  %68 = sitofp i64 %67 to double
  %69 = fadd double %59, %68
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge9.unr-lcssa, label %.lr.ph8, !llvm.loop !19

.lr.ph12:                                         ; preds = %45, %.lr.ph12
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #4
  %70 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull %7, ptr noundef nonnull %8)
  %71 = load i32, ptr %7, align 4, !tbaa !5
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds [1000000 x %struct.Line], ptr @l, i64 0, i64 %72
  %74 = load i64, ptr %73, align 8, !tbaa !17
  %75 = getelementptr inbounds i8, ptr %73, i64 8
  %76 = load i64, ptr %75, align 8, !tbaa !18
  %77 = mul nsw i64 %76, %74
  %78 = getelementptr inbounds i8, ptr %73, i64 16
  %79 = load i64, ptr %78, align 8, !tbaa !13
  %80 = mul nsw i64 %77, %79
  %81 = sitofp i64 %80 to double
  %82 = load double, ptr @ans, align 8, !tbaa !11
  %83 = fsub double %82, %81
  %84 = load i32, ptr %8, align 4, !tbaa !5
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds [1000000 x %struct.Line], ptr @l, i64 0, i64 %72, i32 2
  store i64 %85, ptr %86, align 8, !tbaa !13
  %87 = mul nsw i64 %77, %85
  %88 = sitofp i64 %87 to double
  %89 = fadd double %83, %88
  store double %89, ptr @ans, align 8, !tbaa !11
  %90 = fmul double %89, 6.000000e+00
  %91 = load i64, ptr @n, align 8, !tbaa !9
  %92 = sitofp i64 %91 to double
  %93 = fdiv double %90, %92
  %94 = add nsw i64 %91, -1
  %95 = sitofp i64 %94 to double
  %96 = fdiv double %93, %95
  %97 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, double noundef %96)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #4
  %98 = load i64, ptr @q, align 8, !tbaa !9
  %99 = add nsw i64 %98, -1
  store i64 %99, ptr @q, align 8, !tbaa !9
  %.not = icmp eq i64 %98, 0
  br i1 %.not, label %._crit_edge13, label %.lr.ph12, !llvm.loop !20

._crit_edge13:                                    ; preds = %.lr.ph12, %45
  ret i32 0
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #0

; Function Attrs: nofree nounwind
declare noundef i32 @printf(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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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" }
attributes #4 = { 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 = !{!"long long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!14, !10, i64 16}
!14 = !{!"_ZTS4Line", !10, i64 0, !10, i64 8, !10, i64 16}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = !{!14, !10, i64 0}
!18 = !{!14, !10, i64 8}
!19 = distinct !{!19, !16}
!20 = distinct !{!20, !16}


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