program main
implicit None
integer(8)::a,b,c,k
read *,a,b,c,k

if(abs(b-a) > 10e18)then 
	print 102,"Unfair"
	else if(mod(k,2) == 1)then
		print 101,b-a
	else
		print 101,a-b
endif

101 format(i0)
102 format(a)
end program main
; 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.098ed5102e0e2ffc499b8c83152798b5 = linkonce constant [73 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_5950/source.f\00"
@_QQcl.286129 = linkonce constant [3 x i8] c"(a)"
@_QQcl.556E66616972 = linkonce constant [6 x i8] c"Unfair"
@_QQcl.28693029 = linkonce constant [4 x i8] c"(i0)"
@_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.098ed5102e0e2ffc499b8c83152798b5, i32 4)
  %6 = call i1 @_FortranAioInputInteger(ptr %5, ptr nonnull %1, i32 8)
  %7 = call i1 @_FortranAioInputInteger(ptr %5, ptr nonnull %2, 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 = load i64, ptr %2, align 8, !tbaa !3
  %12 = load i64, ptr %1, align 8, !tbaa !3
  %13 = sub i64 %11, %12
  %14 = call i64 @llvm.abs.i64(i64 %13, i1 false)
  %15 = sitofp i64 %14 to float
  %16 = fcmp ogt float %15, 0x43E158E460000000
  br i1 %16, label %17, label %20

17:                                               ; preds = %0
  %18 = call ptr @_FortranAioBeginExternalFormattedOutput(ptr nonnull @_QQcl.286129, i64 3, ptr null, i32 -1, ptr nonnull @_QQcl.098ed5102e0e2ffc499b8c83152798b5, i32 7)
  %19 = call i1 @_FortranAioOutputAscii(ptr %18, ptr nonnull @_QQcl.556E66616972, i64 6)
  br label %36

20:                                               ; preds = %0
  %21 = load i64, ptr %4, align 8, !tbaa !3
  %22 = and i64 %21, -9223372036854775807
  %23 = icmp eq i64 %22, 1
  br i1 %23, label %24, label %30

24:                                               ; preds = %20
  %25 = call ptr @_FortranAioBeginExternalFormattedOutput(ptr nonnull @_QQcl.28693029, i64 4, ptr null, i32 -1, ptr nonnull @_QQcl.098ed5102e0e2ffc499b8c83152798b5, i32 9)
  %26 = load i64, ptr %2, align 8, !tbaa !3
  %27 = load i64, ptr %1, align 8, !tbaa !3
  %28 = sub i64 %26, %27
  %29 = call i1 @_FortranAioOutputInteger64(ptr %25, i64 %28)
  br label %36

30:                                               ; preds = %20
  %31 = call ptr @_FortranAioBeginExternalFormattedOutput(ptr nonnull @_QQcl.28693029, i64 4, ptr null, i32 -1, ptr nonnull @_QQcl.098ed5102e0e2ffc499b8c83152798b5, i32 11)
  %32 = load i64, ptr %1, align 8, !tbaa !3
  %33 = load i64, ptr %2, align 8, !tbaa !3
  %34 = sub i64 %32, %33
  %35 = call i1 @_FortranAioOutputInteger64(ptr %31, i64 %34)
  br label %36

36:                                               ; preds = %17, %24, %30
  %.sink = phi ptr [ %18, %17 ], [ %25, %24 ], [ %31, %30 ]
  %37 = call i32 @_FortranAioEndIoStatement(ptr %.sink)
  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 @_FortranAioOutputAscii(ptr, ptr, i64) local_unnamed_addr

declare i1 @_FortranAioOutputInteger64(ptr, i64) local_unnamed_addr

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.abs.i64(i64, i1 immarg) #0

attributes #0 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }

!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"}
