program money
    implicit none
    integer(8) x, i, money1, money2, r, flag
    read(*,*) x
    flag=0
    i=0
    money1=100
    r=100
    do while (flag==0)
        if ( money1>=x ) then
            flag=1
        else
            money2=money1+money1/100
            money1=money2
            i=i+1
        end if
    end do
    write(*,*) i
end program money
; 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.afbf71022b1206edb11daec674727e95 = linkonce constant [73 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_1577/source.f\00"
@_QQEnvironmentDefaults = local_unnamed_addr constant ptr null

define void @_QQmain() local_unnamed_addr {
.split12:
  %0 = alloca i64, align 8
  %1 = tail call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.afbf71022b1206edb11daec674727e95, i32 4)
  %2 = call i1 @_FortranAioInputInteger(ptr %1, ptr nonnull %0, i32 8)
  %3 = call i32 @_FortranAioEndIoStatement(ptr %1)
  %4 = load i64, ptr %0, align 8
  %.fr = freeze i64 %4
  %.not13 = icmp sgt i64 %.fr, 100
  br i1 %.not13, label %.outer.split.us, label %.split.critedge

.outer.split.us:                                  ; preds = %.split12, %.outer.split.us
  %.06.ph16 = phi i64 [ %7, %.outer.split.us ], [ 0, %.split12 ]
  %.07.ph15 = phi i64 [ %6, %.outer.split.us ], [ 100, %.split12 ]
  %5 = sdiv i64 %.07.ph15, 100
  %6 = add i64 %5, %.07.ph15
  %7 = add i64 %.06.ph16, 1
  %.not = icmp slt i64 %6, %.fr
  br i1 %.not, label %.outer.split.us, label %.split.critedge

.split.critedge:                                  ; preds = %.outer.split.us, %.split12
  %.06.ph.lcssa10 = phi i64 [ 0, %.split12 ], [ %7, %.outer.split.us ]
  %8 = call ptr @_FortranAioBeginExternalListOutput(i32 -1, ptr nonnull @_QQcl.afbf71022b1206edb11daec674727e95, i32 18)
  %9 = call i1 @_FortranAioOutputInteger64(ptr %8, i64 %.06.ph.lcssa10)
  %10 = call i32 @_FortranAioEndIoStatement(ptr %8)
  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 ptr @_FortranAioBeginExternalListOutput(i32, ptr, i32) local_unnamed_addr

declare i1 @_FortranAioOutputInteger64(ptr, i64) local_unnamed_addr

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