      implicit none
      integer :: n,i
      real(16) :: a(1000),ans=0
      
      read*,n
      read*,a(1:n)
      
      do i = 1,n
        ans = ans + 1_16/a(i)
      end do
      
      print*,1_16/ans
      end
; ModuleID = 'FIRModule'
source_filename = "FIRModule"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"

@_QFEa = internal global [1000 x fp128] undef
@_QFEans = internal unnamed_addr global fp128 0xL00000000000000000000000000000000
@_QQcl.d5d8ee3061ed0d771ec74be0ac6773d3 = linkonce constant [73 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_3446/source.f\00"
@_QQEnvironmentDefaults = local_unnamed_addr constant ptr null

define void @_QQmain() local_unnamed_addr {
  %1 = alloca { ptr, i64, i32, i8, i8, i8, i8 }, align 8
  %2 = alloca { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, align 8
  %3 = alloca fp128, align 16
  %4 = alloca i32, align 4
  %5 = tail call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.d5d8ee3061ed0d771ec74be0ac6773d3, i32 5)
  %6 = call i1 @_FortranAioInputInteger(ptr %5, ptr nonnull %4, i32 4)
  %7 = call i32 @_FortranAioEndIoStatement(ptr %5)
  %8 = call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.d5d8ee3061ed0d771ec74be0ac6773d3, i32 6)
  %9 = load i32, ptr %4, align 4, !tbaa !3
  %10 = call i32 @llvm.smax.i32(i32 %9, i32 0)
  %11 = zext i32 %10 to i64
  store ptr @_QFEa, ptr %2, align 8, !tbaa !7
  %.fca.1.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %2, i64 0, i32 1
  store i64 16, ptr %.fca.1.gep, align 8, !tbaa !7
  %.fca.2.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %2, i64 0, i32 2
  store i32 20180515, ptr %.fca.2.gep, align 8, !tbaa !7
  %.fca.3.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %2, i64 0, i32 3
  store i8 1, ptr %.fca.3.gep, align 4, !tbaa !7
  %.fca.4.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %2, i64 0, i32 4
  store i8 31, ptr %.fca.4.gep, align 1, !tbaa !7
  %.fca.5.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %2, i64 0, i32 5
  store i8 0, ptr %.fca.5.gep, align 2, !tbaa !7
  %.fca.6.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %2, i64 0, i32 6
  store i8 0, ptr %.fca.6.gep, align 1, !tbaa !7
  %.fca.7.0.0.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %2, i64 0, i32 7, i64 0, i64 0
  store i64 1, ptr %.fca.7.0.0.gep, align 8, !tbaa !7
  %.fca.7.0.1.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %2, i64 0, i32 7, i64 0, i64 1
  store i64 %11, ptr %.fca.7.0.1.gep, align 8, !tbaa !7
  %.fca.7.0.2.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %2, i64 0, i32 7, i64 0, i64 2
  store i64 16, ptr %.fca.7.0.2.gep, align 8, !tbaa !7
  %12 = call i1 @_FortranAioInputDescriptor(ptr %8, ptr nonnull %2)
  %13 = call i32 @_FortranAioEndIoStatement(ptr %8)
  %14 = load i32, ptr %4, align 4, !tbaa !3
  %15 = icmp sgt i32 %14, 0
  br i1 %15, label %.lr.ph.preheader, label %42

.lr.ph.preheader:                                 ; preds = %0
  %_QFEans.promoted = load fp128, ptr @_QFEans, align 16, !tbaa !3
  %16 = zext i32 %14 to i64
  %xtraiter = and i64 %16, 3
  %17 = icmp ult i32 %14, 4
  br i1 %17, label %._crit_edge.unr-lcssa, label %.lr.ph.preheader.new

.lr.ph.preheader.new:                             ; preds = %.lr.ph.preheader
  %unroll_iter = and i64 %16, 4294967292
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph, %.lr.ph.preheader.new
  %indvars.iv = phi i64 [ 1, %.lr.ph.preheader.new ], [ %indvars.iv.next.3, %.lr.ph ]
  %18 = phi fp128 [ %_QFEans.promoted, %.lr.ph.preheader.new ], [ %35, %.lr.ph ]
  %niter = phi i64 [ 0, %.lr.ph.preheader.new ], [ %niter.next.3, %.lr.ph ]
  %19 = add nsw i64 %indvars.iv, -1
  %20 = getelementptr [1000 x fp128], ptr @_QFEa, i64 0, i64 %19
  %21 = load fp128, ptr %20, align 16, !tbaa !3
  %22 = fdiv contract fp128 0xL00000000000000003FFF000000000000, %21
  %23 = fadd contract fp128 %18, %22
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %24 = getelementptr [1000 x fp128], ptr @_QFEa, i64 0, i64 %indvars.iv
  %25 = load fp128, ptr %24, align 16, !tbaa !3
  %26 = fdiv contract fp128 0xL00000000000000003FFF000000000000, %25
  %27 = fadd contract fp128 %23, %26
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %28 = getelementptr [1000 x fp128], ptr @_QFEa, i64 0, i64 %indvars.iv.next
  %29 = load fp128, ptr %28, align 16, !tbaa !3
  %30 = fdiv contract fp128 0xL00000000000000003FFF000000000000, %29
  %31 = fadd contract fp128 %27, %30
  %32 = getelementptr [1000 x fp128], ptr @_QFEa, i64 0, i64 %indvars.iv.next.1
  %33 = load fp128, ptr %32, align 16, !tbaa !3
  %34 = fdiv contract fp128 0xL00000000000000003FFF000000000000, %33
  %35 = fadd contract fp128 %31, %34
  %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_edge.unr-lcssa, label %.lr.ph

._crit_edge.unr-lcssa:                            ; preds = %.lr.ph, %.lr.ph.preheader
  %.lcssa.ph = phi fp128 [ undef, %.lr.ph.preheader ], [ %35, %.lr.ph ]
  %indvars.iv.unr = phi i64 [ 1, %.lr.ph.preheader ], [ %indvars.iv.next.3, %.lr.ph ]
  %.unr = phi fp128 [ %_QFEans.promoted, %.lr.ph.preheader ], [ %35, %.lr.ph ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge, label %.lr.ph.epil

.lr.ph.epil:                                      ; preds = %._crit_edge.unr-lcssa, %.lr.ph.epil
  %indvars.iv.epil = phi i64 [ %indvars.iv.next.epil, %.lr.ph.epil ], [ %indvars.iv.unr, %._crit_edge.unr-lcssa ]
  %36 = phi fp128 [ %41, %.lr.ph.epil ], [ %.unr, %._crit_edge.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph.epil ], [ 0, %._crit_edge.unr-lcssa ]
  %37 = add nsw i64 %indvars.iv.epil, -1
  %38 = getelementptr [1000 x fp128], ptr @_QFEa, i64 0, i64 %37
  %39 = load fp128, ptr %38, align 16, !tbaa !3
  %40 = fdiv contract fp128 0xL00000000000000003FFF000000000000, %39
  %41 = fadd contract fp128 %36, %40
  %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_edge, label %.lr.ph.epil, !llvm.loop !9

._crit_edge:                                      ; preds = %.lr.ph.epil, %._crit_edge.unr-lcssa
  %.lcssa = phi fp128 [ %.lcssa.ph, %._crit_edge.unr-lcssa ], [ %41, %.lr.ph.epil ]
  store fp128 %.lcssa, ptr @_QFEans, align 16, !tbaa !3
  br label %42

42:                                               ; preds = %._crit_edge, %0
  %43 = call ptr @_FortranAioBeginExternalListOutput(i32 -1, ptr nonnull @_QQcl.d5d8ee3061ed0d771ec74be0ac6773d3, i32 12)
  %44 = load fp128, ptr @_QFEans, align 16, !tbaa !3
  %45 = fdiv contract fp128 0xL00000000000000003FFF000000000000, %44
  store fp128 %45, ptr %3, align 16, !tbaa !3
  store ptr %3, ptr %1, align 8, !tbaa !7
  %.fca.1.gep5 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %1, i64 0, i32 1
  store i64 16, ptr %.fca.1.gep5, align 8, !tbaa !7
  %.fca.2.gep7 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %1, i64 0, i32 2
  store i32 20180515, ptr %.fca.2.gep7, align 8, !tbaa !7
  %.fca.3.gep9 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %1, i64 0, i32 3
  store i8 0, ptr %.fca.3.gep9, align 4, !tbaa !7
  %.fca.4.gep11 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %1, i64 0, i32 4
  store i8 31, ptr %.fca.4.gep11, align 1, !tbaa !7
  %.fca.5.gep13 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %1, i64 0, i32 5
  store i8 0, ptr %.fca.5.gep13, align 2, !tbaa !7
  %.fca.6.gep15 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %1, i64 0, i32 6
  store i8 0, ptr %.fca.6.gep15, align 1, !tbaa !7
  %46 = call i1 @_FortranAioOutputDescriptor(ptr %43, ptr nonnull %1)
  %47 = call i32 @_FortranAioEndIoStatement(ptr %43)
  ret void
}

declare ptr @_FortranAioBeginExternalListInput(i32, ptr, i32) local_unnamed_addr

declare i1 @_FortranAioInputInteger(ptr, ptr, i32) local_unnamed_addr

declare i32 @_FortranAioEndIoStatement(ptr) local_unnamed_addr

declare i1 @_FortranAioInputDescriptor(ptr, ptr) local_unnamed_addr

declare ptr @_FortranAioBeginExternalListOutput(i32, ptr, i32) local_unnamed_addr

declare i1 @_FortranAioOutputDescriptor(ptr, ptr) local_unnamed_addr

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

attributes #0 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }

!llvm.module.flags = !{!0, !1, !2}

!0 = !{i32 2, !"Debug Info Version", i32 3}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{!4, !4, i64 0}
!4 = !{!"any data access", !5, i64 0}
!5 = !{!"any access", !6, i64 0}
!6 = !{!"Flang Type TBAA Root"}
!7 = !{!8, !8, i64 0}
!8 = !{!"descriptor member", !5, i64 0}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.unroll.disable"}
