program ABC165_B
  integer(8)::X,N,P,i
  read(*,*)X
  N=0
  P=100
  do i=1,10000
     P=dint(P*1.01d0)
     N=N+1
     if(P>=X) exit
  end do
  write(*,*)N
end program ABC165_B
; 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.8c90ecda8c15b82def765859e2597a04 = linkonce constant [73 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_1564/source.f\00"
@_QQEnvironmentDefaults = local_unnamed_addr constant ptr null

define void @_QQmain() local_unnamed_addr {
  %1 = alloca i64, align 8
  %2 = tail call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.8c90ecda8c15b82def765859e2597a04, i32 3)
  %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
  br label %13

6:                                                ; preds = %13
  %7 = sitofp i64 %17 to double
  %8 = fmul contract double %7, 1.010000e+00
  %9 = call contract double @llvm.trunc.f64(double %8)
  %10 = fptosi double %9 to i64
  %11 = add nuw nsw i64 %.0712, 2
  %.not.1 = icmp sgt i64 %5, %10
  br i1 %.not.1, label %12, label %.split.loop.exit

12:                                               ; preds = %6
  %exitcond.not.1 = icmp eq i64 %11, 10000
  br i1 %exitcond.not.1, label %.split.loop.exit, label %13

13:                                               ; preds = %12, %0
  %.013 = phi i64 [ 100, %0 ], [ %10, %12 ]
  %.0712 = phi i64 [ 0, %0 ], [ %11, %12 ]
  %14 = sitofp i64 %.013 to double
  %15 = fmul contract double %14, 1.010000e+00
  %16 = call contract double @llvm.trunc.f64(double %15)
  %17 = fptosi double %16 to i64
  %.not = icmp sgt i64 %5, %17
  br i1 %.not, label %6, label %.split.loop.exit16

.split.loop.exit16:                               ; preds = %13
  %18 = or i64 %.0712, 1
  br label %.split.loop.exit

.split.loop.exit:                                 ; preds = %6, %12, %.split.loop.exit16
  %.lcssa = phi i64 [ %18, %.split.loop.exit16 ], [ 10000, %12 ], [ %11, %6 ]
  %19 = call ptr @_FortranAioBeginExternalListOutput(i32 -1, ptr nonnull @_QQcl.8c90ecda8c15b82def765859e2597a04, i32 11)
  %20 = call i1 @_FortranAioOutputInteger64(ptr %19, i64 %.lcssa)
  %21 = call i32 @_FortranAioEndIoStatement(ptr %19)
  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

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

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

declare i1 @_FortranAioOutputInteger64(ptr, i64) local_unnamed_addr

attributes #0 = { mustprogress 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"}
