integer(8) W,H,x,y
read*,w,h,x,y
print*, dble(W)*dble(H)/2, merge(1,0,x*2==W.and.y*2==H)
end

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

define void @_QQmain() local_unnamed_addr {
  %1 = alloca i64, align 8
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = tail call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.f7f3f5e741e3f283da3722381ff26c94, i32 2)
  %6 = call i1 @_FortranAioInputInteger(ptr %5, ptr nonnull %2, i32 8)
  %7 = call i1 @_FortranAioInputInteger(ptr %5, ptr nonnull %1, i32 8)
  %8 = call i1 @_FortranAioInputInteger(ptr %5, ptr nonnull %3, i32 8)
  %9 = call i1 @_FortranAioInputInteger(ptr %5, ptr nonnull %4, i32 8)
  %10 = call i32 @_FortranAioEndIoStatement(ptr %5)
  %11 = call ptr @_FortranAioBeginExternalListOutput(i32 -1, ptr nonnull @_QQcl.f7f3f5e741e3f283da3722381ff26c94, i32 3)
  %12 = load i64, ptr %2, align 8, !tbaa !3
  %13 = sitofp i64 %12 to double
  %14 = load i64, ptr %1, align 8, !tbaa !3
  %15 = sitofp i64 %14 to double
  %16 = fmul contract double %13, %15
  %17 = fmul contract double %16, 5.000000e-01
  %18 = call i1 @_FortranAioOutputReal64(ptr %11, double %17)
  %19 = load i64, ptr %3, align 8, !tbaa !3
  %20 = shl i64 %19, 1
  %21 = load i64, ptr %2, align 8, !tbaa !3
  %22 = icmp eq i64 %20, %21
  %23 = load i64, ptr %4, align 8, !tbaa !3
  %24 = shl i64 %23, 1
  %25 = load i64, ptr %1, align 8, !tbaa !3
  %26 = icmp eq i64 %24, %25
  %27 = and i1 %22, %26
  %28 = zext i1 %27 to i32
  %29 = call i1 @_FortranAioOutputInteger32(ptr %11, i32 %28)
  %30 = call i32 @_FortranAioEndIoStatement(ptr %11)
  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 @_FortranAioOutputReal64(ptr, double) 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"}
