program one_per_cent
  implicit none
  integer :: i = 1
  integer(16) :: x, m = 100_16
  read(*,*) x
  do
    m = 101_16*m/100_16
    if (m >= x) then
      write(*,'(i0)') i
      stop
    end if
    i = i+1
  end do
end program one_per_cent
; 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"

@_QFEi = internal unnamed_addr global i32 1
@_QFEm = internal unnamed_addr global i128 100
@_QQcl.a6e5c5ba92d35d21ed1d40fb098f7715 = linkonce constant [73 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_1573/source.f\00"
@_QQcl.28693029 = linkonce constant [4 x i8] c"(i0)"
@_QQEnvironmentDefaults = local_unnamed_addr constant ptr null

; Function Attrs: noreturn
define void @_QQmain() local_unnamed_addr #0 {
  %1 = alloca i128, align 8
  %2 = tail call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.a6e5c5ba92d35d21ed1d40fb098f7715, i32 5)
  %3 = call i1 @_FortranAioInputInteger(ptr %2, ptr nonnull %1, i32 16)
  %4 = call i32 @_FortranAioEndIoStatement(ptr %2)
  %5 = load i128, ptr %1, align 8, !tbaa !3
  %_QFEm.promoted = load i128, ptr @_QFEm, align 8, !tbaa !3
  %6 = mul i128 %_QFEm.promoted, 101
  %7 = sdiv i128 %6, 100
  %.not1 = icmp slt i128 %7, %5
  br i1 %.not1, label %.lr.ph.preheader, label %8

.lr.ph.preheader:                                 ; preds = %0
  %_QFEi.promoted = load i32, ptr @_QFEi, align 4, !tbaa !3
  br label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph
  store i32 %16, ptr @_QFEi, align 4, !tbaa !3
  br label %8

8:                                                ; preds = %._crit_edge, %0
  %.lcssa = phi i128 [ %18, %._crit_edge ], [ %7, %0 ]
  store i128 %.lcssa, ptr @_QFEm, align 8, !tbaa !3
  %9 = call ptr @_FortranAioBeginExternalFormattedOutput(ptr nonnull @_QQcl.28693029, i64 4, ptr null, i32 -1, ptr nonnull @_QQcl.a6e5c5ba92d35d21ed1d40fb098f7715, i32 9)
  %10 = load i32, ptr @_QFEi, align 4, !tbaa !3
  %11 = call i1 @_FortranAioOutputInteger32(ptr %9, i32 %10)
  %12 = call i32 @_FortranAioEndIoStatement(ptr %9)
  %13 = call {} @_FortranAStopStatement(i32 0, i1 false, i1 false)
  unreachable

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %14 = phi i128 [ %18, %.lr.ph ], [ %7, %.lr.ph.preheader ]
  %15 = phi i32 [ %16, %.lr.ph ], [ %_QFEi.promoted, %.lr.ph.preheader ]
  %16 = add i32 %15, 1
  %17 = mul i128 %14, 101
  %18 = sdiv i128 %17, 100
  %.not = icmp slt i128 %18, %5
  br i1 %.not, label %.lr.ph, label %._crit_edge
}

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

declare i1 @_FortranAioOutputInteger32(ptr, i32) local_unnamed_addr

declare {} @_FortranAStopStatement(i32, i1, i1) 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"}
