program pr1
  implicit none
  integer :: a,b,c, i, j, k
  read(*,*) a, b, c
  j = 0
  do i = a, b
     if ( mod(i,c) == 0 ) then
        j = j + 1
     end if
  end do
  write(*,'(i0)') j

  stop
end program pr1

; 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.db75ce44ec4676417279f1aa600f0965 = linkonce constant [72 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_930/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 i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = tail call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.db75ce44ec4676417279f1aa600f0965, i32 4)
  %5 = call i1 @_FortranAioInputInteger(ptr %4, ptr nonnull %1, i32 4)
  %6 = call i1 @_FortranAioInputInteger(ptr %4, ptr nonnull %2, i32 4)
  %7 = call i1 @_FortranAioInputInteger(ptr %4, ptr nonnull %3, i32 4)
  %8 = call i32 @_FortranAioEndIoStatement(ptr %4)
  %9 = load i32, ptr %1, align 4, !tbaa !3
  %10 = sext i32 %9 to i64
  %11 = load i32, ptr %2, align 4, !tbaa !3
  %12 = sext i32 %11 to i64
  %13 = sub nsw i64 1, %10
  %14 = add nsw i64 %13, %12
  %15 = icmp sgt i64 %14, 0
  br i1 %15, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %0
  %16 = load i32, ptr %3, align 4, !tbaa !3
  %xtraiter = and i64 %14, 1
  %17 = icmp eq i32 %11, %9
  br i1 %17, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph.new

.lr.ph.new:                                       ; preds = %.lr.ph
  %unroll_iter = and i64 %14, -2
  br label %18

18:                                               ; preds = %18, %.lr.ph.new
  %19 = phi i32 [ %9, %.lr.ph.new ], [ %27, %18 ]
  %.05 = phi i32 [ 0, %.lr.ph.new ], [ %spec.select.1, %18 ]
  %niter = phi i64 [ 0, %.lr.ph.new ], [ %niter.next.1, %18 ]
  %20 = srem i32 %19, %16
  %21 = icmp eq i32 %20, 0
  %22 = zext i1 %21 to i32
  %spec.select = add i32 %.05, %22
  %23 = add i32 %19, 1
  %24 = srem i32 %23, %16
  %25 = icmp eq i32 %24, 0
  %26 = zext i1 %25 to i32
  %spec.select.1 = add i32 %spec.select, %26
  %27 = add i32 %19, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1.not = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1.not, label %._crit_edge.loopexit.unr-lcssa, label %18

._crit_edge.loopexit.unr-lcssa:                   ; preds = %18, %.lr.ph
  %spec.select.lcssa.ph = phi i32 [ undef, %.lr.ph ], [ %spec.select.1, %18 ]
  %.unr6 = phi i32 [ %9, %.lr.ph ], [ %27, %18 ]
  %.05.unr = phi i32 [ 0, %.lr.ph ], [ %spec.select.1, %18 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge, label %._crit_edge.loopexit.epilog-lcssa

._crit_edge.loopexit.epilog-lcssa:                ; preds = %._crit_edge.loopexit.unr-lcssa
  %28 = srem i32 %.unr6, %16
  %29 = icmp eq i32 %28, 0
  %30 = zext i1 %29 to i32
  %spec.select.epil = add i32 %.05.unr, %30
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit.epilog-lcssa, %._crit_edge.loopexit.unr-lcssa, %0
  %.0.lcssa = phi i32 [ 0, %0 ], [ %spec.select.lcssa.ph, %._crit_edge.loopexit.unr-lcssa ], [ %spec.select.epil, %._crit_edge.loopexit.epilog-lcssa ]
  %31 = call ptr @_FortranAioBeginExternalFormattedOutput(ptr nonnull @_QQcl.28693029, i64 4, ptr null, i32 -1, ptr nonnull @_QQcl.db75ce44ec4676417279f1aa600f0965, i32 11)
  %32 = call i1 @_FortranAioOutputInteger32(ptr %31, i32 %.0.lcssa)
  %33 = call i32 @_FortranAioEndIoStatement(ptr %31)
  %34 = 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 @_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"}
