program sample
    implicit none
    character(100)::s,t
    integer(8) :: i,j,k,m,n
    integer(8)::a,b,c,d
    integer(8),allocatable::x(:),y(:)
  
    read(*,*) n
    if(mod(n,2)==1)then
        write(*,*)0
        stop
    elseif(n<10)then
        write(*,*)0
        stop
    endif
    n=n/10
   
    m=n
    do i=1,30
        
        m=m+n/(5**i)
        

    end do
    write(*,*)m


   
    stop
end program sample
  


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

@_QQcl.da67184536a00dd2e7ac043206cf8158 = linkonce constant [73 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_2835/source.f\00"
@_QQEnvironmentDefaults = local_unnamed_addr constant ptr null

; Function Attrs: noreturn
define void @_QQmain() local_unnamed_addr #0 {
  %1 = alloca i64, align 8
  %2 = tail call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.da67184536a00dd2e7ac043206cf8158, i32 8)
  %3 = call i1 @_FortranAioInputInteger(ptr %2, ptr nonnull %1, i32 8)
  %4 = call i32 @_FortranAioEndIoStatement(ptr %2)
  %5 = load i64, ptr %1, align 8, !tbaa !3
  %6 = and i64 %5, -9223372036854775807
  %7 = icmp eq i64 %6, 1
  br i1 %7, label %8, label %13

8:                                                ; preds = %0
  %9 = call ptr @_FortranAioBeginExternalListOutput(i32 -1, ptr nonnull @_QQcl.da67184536a00dd2e7ac043206cf8158, i32 10)
  %10 = call i1 @_FortranAioOutputInteger32(ptr %9, i32 0)
  %11 = call i32 @_FortranAioEndIoStatement(ptr %9)
  %12 = call {} @_FortranAStopStatement(i32 0, i1 false, i1 false)
  unreachable

13:                                               ; preds = %0
  %14 = icmp slt i64 %5, 10
  br i1 %14, label %15, label %20

15:                                               ; preds = %13
  %16 = call ptr @_FortranAioBeginExternalListOutput(i32 -1, ptr nonnull @_QQcl.da67184536a00dd2e7ac043206cf8158, i32 13)
  %17 = call i1 @_FortranAioOutputInteger32(ptr %16, i32 0)
  %18 = call i32 @_FortranAioEndIoStatement(ptr %16)
  %19 = call {} @_FortranAStopStatement(i32 0, i1 false, i1 false)
  unreachable

20:                                               ; preds = %13
  %21 = udiv i64 %5, 10
  store i64 %21, ptr %1, align 8, !tbaa !3
  br label %.preheader.i

.preheader.i:                                     ; preds = %20, %__mlir_math_ipowi_i64.exit
  %22 = phi i64 [ 1, %20 ], [ %35, %__mlir_math_ipowi_i64.exit ]
  %.06 = phi i64 [ %21, %20 ], [ %34, %__mlir_math_ipowi_i64.exit ]
  %23 = and i64 %22, 1
  %.not3.i = icmp eq i64 %23, 0
  %24 = select i1 %.not3.i, i64 1, i64 5
  %25 = icmp eq i64 %22, 1
  br i1 %25, label %__mlir_math_ipowi_i64.exit, label %.lr.ph.i

.lr.ph.i:                                         ; preds = %.preheader.i, %.lr.ph.i
  %spec.select4.i = phi i64 [ %spec.select.i, %.lr.ph.i ], [ %24, %.preheader.i ]
  %26 = phi i64 [ %28, %.lr.ph.i ], [ %22, %.preheader.i ]
  %27 = phi i64 [ %29, %.lr.ph.i ], [ 5, %.preheader.i ]
  %28 = lshr i64 %26, 1
  %29 = mul i64 %27, %27
  %30 = and i64 %26, 2
  %.not.i = icmp eq i64 %30, 0
  %31 = select i1 %.not.i, i64 1, i64 %29
  %spec.select.i = mul i64 %31, %spec.select4.i
  %32 = icmp ult i64 %26, 4
  br i1 %32, label %__mlir_math_ipowi_i64.exit, label %.lr.ph.i

__mlir_math_ipowi_i64.exit:                       ; preds = %.lr.ph.i, %.preheader.i
  %common.ret.op.i = phi i64 [ %24, %.preheader.i ], [ %spec.select.i, %.lr.ph.i ]
  %33 = sdiv i64 %21, %common.ret.op.i
  %34 = add i64 %33, %.06
  %35 = add nuw nsw i64 %22, 1
  %exitcond.not = icmp eq i64 %35, 31
  br i1 %exitcond.not, label %36, label %.preheader.i

36:                                               ; preds = %__mlir_math_ipowi_i64.exit
  %37 = call ptr @_FortranAioBeginExternalListOutput(i32 -1, ptr nonnull @_QQcl.da67184536a00dd2e7ac043206cf8158, i32 25)
  %38 = call i1 @_FortranAioOutputInteger64(ptr %37, i64 %34)
  %39 = call i32 @_FortranAioEndIoStatement(ptr %37)
  %40 = call {} @_FortranAStopStatement(i32 0, i1 false, i1 false)
  unreachable
}

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 ptr @_FortranAioBeginExternalListOutput(i32, ptr, i32) local_unnamed_addr

declare i1 @_FortranAioOutputInteger32(ptr, i32) local_unnamed_addr

declare {} @_FortranAStopStatement(i32, i1, i1) local_unnamed_addr

declare i1 @_FortranAioOutputInteger64(ptr, i64) local_unnamed_addr

attributes #0 = { noreturn }

!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"}
