program sample
    implicit none
  
    integer(8) :: i,j,m,n,h,w
    real(8)::a,b
    integer(8),allocatable :: x(:),y(:)
  
    read(*,*) h,w
    if (h==1 .or. w ==1)then
        write(*,*)1
        stop
    end if
    if (mod(h*w,2)==0)then
        write(*,*) h*w/2
    else
        write(*,*) h*w/2+1
    end if

  
    stop
end program sample
  


; 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.43a4d9a7dc627c8901ec84f8f18b5ec6 = linkonce constant [73 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_2108/source.f\00"
@_QQEnvironmentDefaults = local_unnamed_addr constant ptr null

; Function Attrs: noreturn
define void @_QQmain() local_unnamed_addr #0 {
  %1 = alloca i64, align 8
  %2 = alloca i64, align 8
  %3 = tail call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.43a4d9a7dc627c8901ec84f8f18b5ec6, i32 8)
  %4 = call i1 @_FortranAioInputInteger(ptr %3, ptr nonnull %1, i32 8)
  %5 = call i1 @_FortranAioInputInteger(ptr %3, ptr nonnull %2, i32 8)
  %6 = call i32 @_FortranAioEndIoStatement(ptr %3)
  %7 = load i64, ptr %1, align 8, !tbaa !3
  %8 = icmp eq i64 %7, 1
  %9 = load i64, ptr %2, align 8, !tbaa !3
  %10 = icmp eq i64 %9, 1
  %11 = or i1 %8, %10
  br i1 %11, label %12, label %17

12:                                               ; preds = %0
  %13 = call ptr @_FortranAioBeginExternalListOutput(i32 -1, ptr nonnull @_QQcl.43a4d9a7dc627c8901ec84f8f18b5ec6, i32 10)
  %14 = call i1 @_FortranAioOutputInteger32(ptr %13, i32 1)
  %15 = call i32 @_FortranAioEndIoStatement(ptr %13)
  %16 = call {} @_FortranAStopStatement(i32 0, i1 false, i1 false)
  unreachable

17:                                               ; preds = %0
  %18 = mul i64 %9, %7
  %19 = and i64 %18, 1
  %20 = icmp eq i64 %19, 0
  br i1 %20, label %21, label %27

21:                                               ; preds = %17
  %22 = call ptr @_FortranAioBeginExternalListOutput(i32 -1, ptr nonnull @_QQcl.43a4d9a7dc627c8901ec84f8f18b5ec6, i32 14)
  %23 = load i64, ptr %1, align 8, !tbaa !3
  %24 = load i64, ptr %2, align 8, !tbaa !3
  %25 = mul i64 %24, %23
  %26 = sdiv i64 %25, 2
  br label %34

27:                                               ; preds = %17
  %28 = call ptr @_FortranAioBeginExternalListOutput(i32 -1, ptr nonnull @_QQcl.43a4d9a7dc627c8901ec84f8f18b5ec6, i32 16)
  %29 = load i64, ptr %1, align 8, !tbaa !3
  %30 = load i64, ptr %2, align 8, !tbaa !3
  %31 = mul i64 %30, %29
  %32 = sdiv i64 %31, 2
  %33 = add nsw i64 %32, 1
  br label %34

34:                                               ; preds = %21, %27
  %.sink3 = phi i64 [ %26, %21 ], [ %33, %27 ]
  %.sink2 = phi ptr [ %22, %21 ], [ %28, %27 ]
  %35 = call i1 @_FortranAioOutputInteger64(ptr %.sink2, i64 %.sink3)
  %36 = call i32 @_FortranAioEndIoStatement(ptr %.sink2)
  %37 = 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 @_FortranAioBeginExternalListOutput(i32, ptr, i32) local_unnamed_addr

declare i1 @_FortranAioOutputInteger32(ptr, i32) local_unnamed_addr

declare {} @_FortranAStopStatement(i32, i1, i1) local_unnamed_addr

declare i1 @_FortranAioOutputInteger64(ptr, i64) 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"}
