program test01
 integer :: H, A
 integer :: kougeki=0


 read *, H, A

 do i=1,10001

 H=H-A
 kougeki=kougeki+1
 if ( H <= 0 ) exit

 end do

 print '(i0)',kougeki

endprogram test01

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

@_QFEkougeki = internal unnamed_addr global i32 0
@_QQcl.bb3694b6f4381d8607e3a3a7cc88702e = linkonce constant [73 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_2488/source.f\00"
@_QQcl.28693029 = linkonce constant [4 x i8] c"(i0)"
@_QQEnvironmentDefaults = local_unnamed_addr constant ptr null

define void @_QQmain() local_unnamed_addr {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = tail call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.bb3694b6f4381d8607e3a3a7cc88702e, i32 6)
  %4 = call i1 @_FortranAioInputInteger(ptr %3, ptr nonnull %2, i32 4)
  %5 = call i1 @_FortranAioInputInteger(ptr %3, ptr nonnull %1, i32 4)
  %6 = call i32 @_FortranAioEndIoStatement(ptr %3)
  %.promoted = load i32, ptr %2, align 4, !tbaa !3
  %_QFEkougeki.promoted = load i32, ptr @_QFEkougeki, align 4, !tbaa !3
  %7 = load i32, ptr %1, align 4, !tbaa !3
  %.neg = mul i32 %7, -10001
  %8 = add i32 %.neg, %.promoted
  %9 = add i32 %_QFEkougeki.promoted, 10001
  br label %24

10:                                               ; preds = %24
  %11 = icmp ugt i32 %.034, 1
  br i1 %11, label %12, label %.split.loop.exit

12:                                               ; preds = %10
  %13 = sub i32 %27, %7
  %14 = icmp slt i32 %13, 1
  br i1 %14, label %.split.loop.exit10, label %15

15:                                               ; preds = %12
  %16 = sub i32 %13, %7
  %17 = icmp slt i32 %16, 1
  br i1 %17, label %.split.loop.exit7, label %18

18:                                               ; preds = %15
  %19 = sub i32 %16, %7
  %20 = add i32 %26, 4
  %21 = icmp slt i32 %19, 1
  br i1 %21, label %.split.loop.exit, label %22

22:                                               ; preds = %18
  %23 = add nsw i32 %.034, -4
  br label %24

24:                                               ; preds = %22, %0
  %.034 = phi i32 [ 10001, %0 ], [ %23, %22 ]
  %25 = phi i32 [ %.promoted, %0 ], [ %19, %22 ]
  %26 = phi i32 [ %_QFEkougeki.promoted, %0 ], [ %20, %22 ]
  %27 = sub i32 %25, %7
  %28 = icmp slt i32 %27, 1
  br i1 %28, label %.split.loop.exit13, label %10

.split.loop.exit7:                                ; preds = %15
  %29 = add i32 %26, 3
  br label %.split.loop.exit

.split.loop.exit10:                               ; preds = %12
  %30 = add i32 %26, 2
  br label %.split.loop.exit

.split.loop.exit13:                               ; preds = %24
  %31 = add i32 %26, 1
  br label %.split.loop.exit

.split.loop.exit:                                 ; preds = %10, %18, %.split.loop.exit13, %.split.loop.exit10, %.split.loop.exit7
  %.lcssa6 = phi i32 [ %16, %.split.loop.exit7 ], [ %13, %.split.loop.exit10 ], [ %27, %.split.loop.exit13 ], [ %19, %18 ], [ %8, %10 ]
  %.lcssa = phi i32 [ %29, %.split.loop.exit7 ], [ %30, %.split.loop.exit10 ], [ %31, %.split.loop.exit13 ], [ %20, %18 ], [ %9, %10 ]
  store i32 %.lcssa6, ptr %2, align 4, !tbaa !3
  store i32 %.lcssa, ptr @_QFEkougeki, align 4, !tbaa !3
  %32 = call ptr @_FortranAioBeginExternalFormattedOutput(ptr nonnull @_QQcl.28693029, i64 4, ptr null, i32 -1, ptr nonnull @_QQcl.bb3694b6f4381d8607e3a3a7cc88702e, i32 16)
  %33 = load i32, ptr @_QFEkougeki, align 4, !tbaa !3
  %34 = call i1 @_FortranAioOutputInteger32(ptr %32, i32 %33)
  %35 = call i32 @_FortranAioEndIoStatement(ptr %32)
  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 @_FortranAioBeginExternalFormattedOutput(ptr, i64, ptr, i32, ptr, i32) local_unnamed_addr

declare i1 @_FortranAioOutputInteger32(ptr, i32) 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}
!3 = !{!4, !4, i64 0}
!4 = !{!"any data access", !5, i64 0}
!5 = !{!"any access", !6, i64 0}
!6 = !{!"Flang Type TBAA Root"}
