program worlds_tale
  implicit none
  integer              :: n, m, x, y
  integer, allocatable :: xi(:), yi(:)
  integer              :: inf, sup
  read(*,*) n, m, x, y
  allocate(xi(n),yi(m))
  read(*,*) xi(:)
  read(*,*) yi(:)
  sup = maxval(xi)
  inf = minval(yi)
  if (min(inf,y)-max(sup,x) .ge. 1) then
     write(*,'(a)') "No War"
  else
     write(*,'(a)') "War"
  end if
  deallocate(xi,yi)
  stop
end program worlds_tale
; 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"

@_QFExi.0 = internal unnamed_addr global ptr null
@_QFExi.8 = internal unnamed_addr global i64 0
@_QFEyi.0 = internal unnamed_addr global ptr null
@_QFEyi.8 = internal unnamed_addr global i64 0
@_QQcl.2fc484d592e08946bb03cc5d858f6b92 = linkonce constant [73 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_5504/source.f\00"
@_QQcl.286129 = linkonce constant [3 x i8] c"(a)"
@_QQcl.4E6F20576172 = linkonce constant [6 x i8] c"No War"
@_QQcl.576172 = linkonce constant [3 x i8] c"War"
@_QQEnvironmentDefaults = local_unnamed_addr constant ptr null

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #1

; Function Attrs: noreturn
define void @_QQmain() local_unnamed_addr #2 {
  %1 = alloca { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, align 8
  %2 = alloca { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, align 8
  %3 = alloca { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = tail call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.2fc484d592e08946bb03cc5d858f6b92, i32 6)
  %9 = call i1 @_FortranAioInputInteger(ptr %8, ptr nonnull %5, i32 4)
  %10 = call i1 @_FortranAioInputInteger(ptr %8, ptr nonnull %4, i32 4)
  %11 = call i1 @_FortranAioInputInteger(ptr %8, ptr nonnull %6, i32 4)
  %12 = call i1 @_FortranAioInputInteger(ptr %8, ptr nonnull %7, i32 4)
  %13 = call i32 @_FortranAioEndIoStatement(ptr %8)
  %14 = load i32, ptr %5, align 4, !tbaa !3
  %15 = call i32 @llvm.smax.i32(i32 %14, i32 0)
  %16 = zext i32 %15 to i64
  %17 = shl nuw nsw i64 %16, 2
  %18 = call ptr @malloc(i64 %17)
  store ptr %18, ptr @_QFExi.0, align 8, !tbaa !7
  store i64 %16, ptr @_QFExi.8, align 8, !tbaa !7
  %19 = load i32, ptr %4, align 4, !tbaa !3
  %20 = call i32 @llvm.smax.i32(i32 %19, i32 0)
  %21 = zext i32 %20 to i64
  %22 = shl nuw nsw i64 %21, 2
  %23 = call ptr @malloc(i64 %22)
  store ptr %23, ptr @_QFEyi.0, align 8, !tbaa !7
  store i64 %21, ptr @_QFEyi.8, align 8, !tbaa !7
  %24 = call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.2fc484d592e08946bb03cc5d858f6b92, i32 8)
  %.unpack = load ptr, ptr @_QFExi.0, align 8, !tbaa !7
  %.unpack387.unpack.unpack389 = load i64, ptr @_QFExi.8, align 8, !tbaa !7
  %25 = call i64 @llvm.smax.i64(i64 %.unpack387.unpack.unpack389, i64 0)
  store ptr %.unpack, ptr %3, align 8, !tbaa !7
  %.fca.1.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %3, i64 0, i32 1
  store i64 4, ptr %.fca.1.gep, align 8, !tbaa !7
  %.fca.2.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %3, i64 0, i32 2
  store i32 20180515, ptr %.fca.2.gep, align 8, !tbaa !7
  %.fca.3.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %3, i64 0, i32 3
  store i8 1, ptr %.fca.3.gep, align 4, !tbaa !7
  %.fca.4.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %3, i64 0, i32 4
  store i8 9, ptr %.fca.4.gep, align 1, !tbaa !7
  %.fca.5.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %3, i64 0, i32 5
  store i8 0, ptr %.fca.5.gep, align 2, !tbaa !7
  %.fca.6.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %3, i64 0, i32 6
  store i8 0, ptr %.fca.6.gep, align 1, !tbaa !7
  %.fca.7.0.0.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %3, i64 0, i32 7, i64 0, i64 0
  store i64 1, ptr %.fca.7.0.0.gep, align 8, !tbaa !7
  %.fca.7.0.1.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %3, i64 0, i32 7, i64 0, i64 1
  store i64 %25, ptr %.fca.7.0.1.gep, align 8, !tbaa !7
  %.fca.7.0.2.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %3, i64 0, i32 7, i64 0, i64 2
  store i64 4, ptr %.fca.7.0.2.gep, align 8, !tbaa !7
  %26 = call i1 @_FortranAioInputDescriptor(ptr %24, ptr nonnull %3)
  %27 = call i32 @_FortranAioEndIoStatement(ptr %24)
  %28 = call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.2fc484d592e08946bb03cc5d858f6b92, i32 9)
  %.unpack392 = load ptr, ptr @_QFEyi.0, align 8, !tbaa !7
  %.unpack399.unpack.unpack401 = load i64, ptr @_QFEyi.8, align 8, !tbaa !7
  %29 = call i64 @llvm.smax.i64(i64 %.unpack399.unpack.unpack401, i64 0)
  store ptr %.unpack392, ptr %2, align 8, !tbaa !7
  %.fca.1.gep112 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %2, i64 0, i32 1
  store i64 4, ptr %.fca.1.gep112, align 8, !tbaa !7
  %.fca.2.gep114 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %2, i64 0, i32 2
  store i32 20180515, ptr %.fca.2.gep114, align 8, !tbaa !7
  %.fca.3.gep116 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %2, i64 0, i32 3
  store i8 1, ptr %.fca.3.gep116, align 4, !tbaa !7
  %.fca.4.gep118 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %2, i64 0, i32 4
  store i8 9, ptr %.fca.4.gep118, align 1, !tbaa !7
  %.fca.5.gep120 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %2, i64 0, i32 5
  store i8 0, ptr %.fca.5.gep120, align 2, !tbaa !7
  %.fca.6.gep122 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %2, i64 0, i32 6
  store i8 0, ptr %.fca.6.gep122, align 1, !tbaa !7
  %.fca.7.0.0.gep124 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %2, i64 0, i32 7, i64 0, i64 0
  store i64 1, ptr %.fca.7.0.0.gep124, align 8, !tbaa !7
  %.fca.7.0.1.gep126 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %2, i64 0, i32 7, i64 0, i64 1
  store i64 %29, ptr %.fca.7.0.1.gep126, align 8, !tbaa !7
  %.fca.7.0.2.gep128 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %2, i64 0, i32 7, i64 0, i64 2
  store i64 4, ptr %.fca.7.0.2.gep128, align 8, !tbaa !7
  %30 = call i1 @_FortranAioInputDescriptor(ptr %28, ptr nonnull %2)
  %31 = call i32 @_FortranAioEndIoStatement(ptr %28)
  %.unpack404 = load ptr, ptr @_QFExi.0, align 8, !tbaa !7
  %.unpack411.unpack.unpack413 = load i64, ptr @_QFExi.8, align 8, !tbaa !7
  %32 = icmp sgt i64 %.unpack411.unpack.unpack413, 0
  br i1 %32, label %.lr.ph.i.preheader, label %_FortranAMaxvalInteger4x1_contract_simplified.exit

.lr.ph.i.preheader:                               ; preds = %0
  %min.iters.check = icmp ult i64 %.unpack411.unpack.unpack413, 8
  br i1 %min.iters.check, label %.lr.ph.i.preheader457, label %vector.ph

vector.ph:                                        ; preds = %.lr.ph.i.preheader
  %n.vec = and i64 %.unpack411.unpack.unpack413, -8
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.phi = phi <4 x i32> [ <i32 -2147483648, i32 -2147483648, i32 -2147483648, i32 -2147483648>, %vector.ph ], [ %36, %vector.body ]
  %vec.phi455 = phi <4 x i32> [ <i32 -2147483648, i32 -2147483648, i32 -2147483648, i32 -2147483648>, %vector.ph ], [ %37, %vector.body ]
  %33 = shl i64 %index, 2
  %34 = getelementptr i8, ptr %.unpack404, i64 %33
  %wide.load = load <4 x i32>, ptr %34, align 4, !tbaa !3
  %35 = getelementptr i32, ptr %34, i64 4
  %wide.load456 = load <4 x i32>, ptr %35, align 4, !tbaa !3
  %36 = call <4 x i32> @llvm.smax.v4i32(<4 x i32> %wide.load, <4 x i32> %vec.phi)
  %37 = call <4 x i32> @llvm.smax.v4i32(<4 x i32> %wide.load456, <4 x i32> %vec.phi455)
  %index.next = add nuw i64 %index, 8
  %38 = icmp eq i64 %index.next, %n.vec
  br i1 %38, label %middle.block, label %vector.body, !llvm.loop !9

middle.block:                                     ; preds = %vector.body
  %rdx.minmax.select = call <4 x i32> @llvm.smax.v4i32(<4 x i32> %36, <4 x i32> %37)
  %39 = call i32 @llvm.vector.reduce.smax.v4i32(<4 x i32> %rdx.minmax.select)
  %cmp.n = icmp eq i64 %.unpack411.unpack.unpack413, %n.vec
  br i1 %cmp.n, label %_FortranAMaxvalInteger4x1_contract_simplified.exit, label %.lr.ph.i.preheader457

.lr.ph.i.preheader457:                            ; preds = %.lr.ph.i.preheader, %middle.block
  %.ph = phi i32 [ -2147483648, %.lr.ph.i.preheader ], [ %39, %middle.block ]
  %.ph458 = phi i64 [ 0, %.lr.ph.i.preheader ], [ %n.vec, %middle.block ]
  br label %.lr.ph.i

.lr.ph.i:                                         ; preds = %.lr.ph.i.preheader457, %.lr.ph.i
  %40 = phi i32 [ %45, %.lr.ph.i ], [ %.ph, %.lr.ph.i.preheader457 ]
  %41 = phi i64 [ %46, %.lr.ph.i ], [ %.ph458, %.lr.ph.i.preheader457 ]
  %42 = shl i64 %41, 2
  %43 = getelementptr i8, ptr %.unpack404, i64 %42
  %44 = load i32, ptr %43, align 4, !tbaa !3
  %45 = call i32 @llvm.smax.i32(i32 %44, i32 %40)
  %46 = add nuw nsw i64 %41, 1
  %exitcond.not.i = icmp eq i64 %46, %.unpack411.unpack.unpack413
  br i1 %exitcond.not.i, label %_FortranAMaxvalInteger4x1_contract_simplified.exit, label %.lr.ph.i, !llvm.loop !12

_FortranAMaxvalInteger4x1_contract_simplified.exit: ; preds = %.lr.ph.i, %middle.block, %0
  %.lcssa.i = phi i32 [ -2147483648, %0 ], [ %39, %middle.block ], [ %45, %.lr.ph.i ]
  %.unpack416 = load ptr, ptr @_QFEyi.0, align 8, !tbaa !7
  %.unpack423.unpack.unpack425 = load i64, ptr @_QFEyi.8, align 8, !tbaa !7
  store ptr %.unpack416, ptr %1, align 8, !tbaa !7
  %.fca.1.gep212 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %1, i64 0, i32 1
  store i64 4, ptr %.fca.1.gep212, align 8, !tbaa !7
  %.fca.2.gep214 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %1, i64 0, i32 2
  store i32 20180515, ptr %.fca.2.gep214, align 8, !tbaa !7
  %.fca.3.gep216 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %1, i64 0, i32 3
  store i8 1, ptr %.fca.3.gep216, align 4, !tbaa !7
  %.fca.4.gep218 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %1, i64 0, i32 4
  store i8 9, ptr %.fca.4.gep218, align 1, !tbaa !7
  %.fca.5.gep220 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %1, i64 0, i32 5
  store i8 0, ptr %.fca.5.gep220, align 2, !tbaa !7
  %.fca.6.gep222 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %1, i64 0, i32 6
  store i8 0, ptr %.fca.6.gep222, align 1, !tbaa !7
  %.fca.7.0.0.gep224 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %1, i64 0, i32 7, i64 0, i64 0
  store i64 1, ptr %.fca.7.0.0.gep224, align 8, !tbaa !7
  %.fca.7.0.1.gep226 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %1, i64 0, i32 7, i64 0, i64 1
  store i64 %.unpack423.unpack.unpack425, ptr %.fca.7.0.1.gep226, align 8, !tbaa !7
  %.fca.7.0.2.gep228 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %1, i64 0, i32 7, i64 0, i64 2
  store i64 4, ptr %.fca.7.0.2.gep228, align 8, !tbaa !7
  %47 = call i32 @_FortranAMinvalInteger4(ptr nonnull %1, ptr nonnull @_QQcl.2fc484d592e08946bb03cc5d858f6b92, i32 11, i32 0, ptr null)
  %48 = load i32, ptr %7, align 4, !tbaa !3
  %49 = call i32 @llvm.smin.i32(i32 %47, i32 %48)
  %50 = load i32, ptr %6, align 4, !tbaa !3
  %51 = call i32 @llvm.smax.i32(i32 %.lcssa.i, i32 %50)
  %52 = sub i32 %49, %51
  %53 = icmp sgt i32 %52, 0
  %. = select i1 %53, i32 13, i32 15
  %.454 = select i1 %53, i64 6, i64 3
  %_QQcl.4E6F20576172._QQcl.576172 = select i1 %53, ptr @_QQcl.4E6F20576172, ptr @_QQcl.576172
  %54 = call ptr @_FortranAioBeginExternalFormattedOutput(ptr nonnull @_QQcl.286129, i64 3, ptr null, i32 -1, ptr nonnull @_QQcl.2fc484d592e08946bb03cc5d858f6b92, i32 %.)
  %55 = call i1 @_FortranAioOutputAscii(ptr %54, ptr nonnull %_QQcl.4E6F20576172._QQcl.576172, i64 %.454)
  %56 = call i32 @_FortranAioEndIoStatement(ptr %54)
  %.unpack428 = load ptr, ptr @_QFExi.0, align 8, !tbaa !7
  call void @free(ptr %.unpack428)
  store ptr null, ptr @_QFExi.0, align 8, !tbaa !7
  store i64 0, ptr @_QFExi.8, align 8, !tbaa !7
  %.unpack440 = load ptr, ptr @_QFEyi.0, align 8, !tbaa !7
  call void @free(ptr %.unpack440)
  store ptr null, ptr @_QFEyi.0, align 8, !tbaa !7
  store i64 0, ptr @_QFEyi.8, align 8, !tbaa !7
  %57 = 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 i1 @_FortranAioInputDescriptor(ptr, ptr) local_unnamed_addr

declare i32 @_FortranAMinvalInteger4(ptr, ptr, i32, i32, 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 {} @_FortranAStopStatement(i32, i1, i1) local_unnamed_addr

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smax.i32(i32, i32) #3

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.smax.i64(i64, i64) #4

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smin.i32(i32, i32) #4

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <4 x i32> @llvm.smax.v4i32(<4 x i32>, <4 x i32>) #4

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(none)
declare i32 @llvm.vector.reduce.smax.v4i32(<4 x i32>) #5

attributes #0 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" }
attributes #1 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" }
attributes #2 = { noreturn }
attributes #3 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nocallback nofree nosync nounwind 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"}
!7 = !{!8, !8, i64 0}
!8 = !{!"descriptor member", !5, i64 0}
!9 = distinct !{!9, !10, !11}
!10 = !{!"llvm.loop.isvectorized", i32 1}
!11 = !{!"llvm.loop.unroll.runtime.disable"}
!12 = distinct !{!12, !11, !10}
