program main
   implicit none 
   integer ::a(4)=0,hantei(4)=1
   integer i
   read(*,*)a
   do i=1,4
      if(a(i)==1)hantei(1)=0
      if(a(i)==9)hantei(2)=0
      if(a(i)==7)hantei(3)=0      
      if(a(i)==4)hantei(4)=0
   enddo
   if(all(hantei==0))then
      write(*,"(a3)")"YES"
   else
      write(*,"(a2)")"NO"
   endif
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"

@_QFEa = internal global [4 x i32] zeroinitializer
@_QFEhantei = internal unnamed_addr global [4 x i32] [i32 1, i32 1, i32 1, i32 1]
@_QQcl.cb871a5722a73ae9a24c26def02c284b = linkonce constant [73 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_5097/source.f\00"
@_QQcl.28613329 = linkonce constant [4 x i8] c"(a3)"
@_QQcl.594553 = linkonce constant [3 x i8] c"YES"
@_QQcl.28613229 = linkonce constant [4 x i8] c"(a2)"
@_QQcl.4E4F = linkonce constant [2 x i8] c"NO"
@_QQEnvironmentDefaults = local_unnamed_addr constant ptr null
@switch.table._QQmain.3 = private unnamed_addr constant [9 x ptr] [ptr @_QFEhantei, ptr @_QFEhantei, ptr @_QFEhantei, ptr getelementptr inbounds ([4 x i32], ptr @_QFEhantei, i64 0, i64 3), ptr @_QFEhantei, ptr @_QFEhantei, ptr getelementptr inbounds ([4 x i32], ptr @_QFEhantei, i64 0, i64 2), ptr @_QFEhantei, ptr getelementptr inbounds ([4 x i32], ptr @_QFEhantei, i64 0, i64 1)], align 8

; 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

define void @_QQmain() local_unnamed_addr {
  %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 = tail call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.cb871a5722a73ae9a24c26def02c284b, i32 5)
  store ptr @_QFEa, ptr %2, align 8, !tbaa !3
  %.fca.1.gep = 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.gep, align 8, !tbaa !3
  %.fca.2.gep = 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.gep, align 8, !tbaa !3
  %.fca.3.gep = 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.gep, align 4, !tbaa !3
  %.fca.4.gep = 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.gep, align 1, !tbaa !3
  %.fca.5.gep = 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.gep, align 2, !tbaa !3
  %.fca.6.gep = 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.gep, align 1, !tbaa !3
  %.fca.7.0.0.gep = 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.gep, align 8, !tbaa !3
  %.fca.7.0.1.gep = 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 4, ptr %.fca.7.0.1.gep, align 8, !tbaa !3
  %.fca.7.0.2.gep = 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.gep, align 8, !tbaa !3
  %4 = call i1 @_FortranAioInputDescriptor(ptr %3, ptr nonnull %2)
  %5 = call i32 @_FortranAioEndIoStatement(ptr %3)
  %6 = load i32, ptr @_QFEa, align 4, !tbaa !7
  %switch.tableidx = add i32 %6, -1
  %7 = icmp ult i32 %switch.tableidx, 9
  br i1 %7, label %switch.hole_check, label %.thread16.thread

switch.hole_check:                                ; preds = %0
  %switch.maskindex = trunc i32 %switch.tableidx to i16
  %switch.shifted = lshr i16 329, %switch.maskindex
  %8 = and i16 %switch.shifted, 1
  %switch.lobit.not = icmp eq i16 %8, 0
  br i1 %switch.lobit.not, label %.thread16.thread, label %switch.lookup

switch.lookup:                                    ; preds = %switch.hole_check
  %9 = sext i32 %switch.tableidx to i64
  %switch.gep = getelementptr inbounds [9 x ptr], ptr @switch.table._QQmain.3, i64 0, i64 %9
  %switch.load = load ptr, ptr %switch.gep, align 8
  store i32 0, ptr %switch.load, align 4, !tbaa !7
  br label %.thread16.thread

.thread16.thread:                                 ; preds = %switch.hole_check, %0, %switch.lookup
  %10 = load i32, ptr getelementptr inbounds ([4 x i32], ptr @_QFEa, i64 0, i64 1), align 4, !tbaa !7
  %switch.tableidx23 = add i32 %10, -1
  %11 = icmp ult i32 %switch.tableidx23, 9
  br i1 %11, label %switch.hole_check24, label %.thread16.thread.1

switch.hole_check24:                              ; preds = %.thread16.thread
  %switch.maskindex26 = trunc i32 %switch.tableidx23 to i16
  %switch.shifted27 = lshr i16 329, %switch.maskindex26
  %12 = and i16 %switch.shifted27, 1
  %switch.lobit28.not = icmp eq i16 %12, 0
  br i1 %switch.lobit28.not, label %.thread16.thread.1, label %switch.lookup25

switch.lookup25:                                  ; preds = %switch.hole_check24
  %13 = sext i32 %switch.tableidx23 to i64
  %switch.gep29 = getelementptr inbounds [9 x ptr], ptr @switch.table._QQmain.3, i64 0, i64 %13
  %switch.load30 = load ptr, ptr %switch.gep29, align 8
  store i32 0, ptr %switch.load30, align 4, !tbaa !7
  br label %.thread16.thread.1

.thread16.thread.1:                               ; preds = %switch.hole_check24, %.thread16.thread, %switch.lookup25
  %14 = load i32, ptr getelementptr inbounds ([4 x i32], ptr @_QFEa, i64 0, i64 2), align 4, !tbaa !7
  %switch.tableidx32 = add i32 %14, -1
  %15 = icmp ult i32 %switch.tableidx32, 9
  br i1 %15, label %switch.hole_check33, label %.thread16.thread.2

switch.hole_check33:                              ; preds = %.thread16.thread.1
  %switch.maskindex35 = trunc i32 %switch.tableidx32 to i16
  %switch.shifted36 = lshr i16 329, %switch.maskindex35
  %16 = and i16 %switch.shifted36, 1
  %switch.lobit37.not = icmp eq i16 %16, 0
  br i1 %switch.lobit37.not, label %.thread16.thread.2, label %switch.lookup34

switch.lookup34:                                  ; preds = %switch.hole_check33
  %17 = sext i32 %switch.tableidx32 to i64
  %switch.gep38 = getelementptr inbounds [9 x ptr], ptr @switch.table._QQmain.3, i64 0, i64 %17
  %switch.load39 = load ptr, ptr %switch.gep38, align 8
  store i32 0, ptr %switch.load39, align 4, !tbaa !7
  br label %.thread16.thread.2

.thread16.thread.2:                               ; preds = %switch.hole_check33, %.thread16.thread.1, %switch.lookup34
  %18 = load i32, ptr getelementptr inbounds ([4 x i32], ptr @_QFEa, i64 0, i64 3), align 4, !tbaa !7
  %switch.tableidx41 = add i32 %18, -1
  %19 = icmp ult i32 %switch.tableidx41, 9
  br i1 %19, label %switch.hole_check42, label %.thread16.thread.3

switch.hole_check42:                              ; preds = %.thread16.thread.2
  %switch.maskindex44 = trunc i32 %switch.tableidx41 to i16
  %switch.shifted45 = lshr i16 329, %switch.maskindex44
  %20 = and i16 %switch.shifted45, 1
  %switch.lobit46.not = icmp eq i16 %20, 0
  br i1 %switch.lobit46.not, label %.thread16.thread.3, label %switch.lookup43

switch.lookup43:                                  ; preds = %switch.hole_check42
  %21 = sext i32 %switch.tableidx41 to i64
  %switch.gep47 = getelementptr inbounds [9 x ptr], ptr @switch.table._QQmain.3, i64 0, i64 %21
  %switch.load48 = load ptr, ptr %switch.gep47, align 8
  store i32 0, ptr %switch.load48, align 4, !tbaa !7
  br label %.thread16.thread.3

.thread16.thread.3:                               ; preds = %switch.hole_check42, %.thread16.thread.2, %switch.lookup43
  %22 = call dereferenceable_or_null(16) ptr @malloc(i64 16)
  %23 = load i32, ptr @_QFEhantei, align 4, !tbaa !7
  %24 = icmp eq i32 %23, 0
  %25 = zext i1 %24 to i32
  store i32 %25, ptr %22, align 4, !tbaa !7
  %26 = load i32, ptr getelementptr inbounds ([4 x i32], ptr @_QFEhantei, i64 0, i64 1), align 4, !tbaa !7
  %27 = icmp eq i32 %26, 0
  %28 = zext i1 %27 to i32
  %29 = getelementptr i32, ptr %22, i64 1
  store i32 %28, ptr %29, align 4, !tbaa !7
  %30 = load i32, ptr getelementptr inbounds ([4 x i32], ptr @_QFEhantei, i64 0, i64 2), align 4, !tbaa !7
  %31 = icmp eq i32 %30, 0
  %32 = zext i1 %31 to i32
  %33 = getelementptr i32, ptr %22, i64 2
  store i32 %32, ptr %33, align 4, !tbaa !7
  %34 = load i32, ptr getelementptr inbounds ([4 x i32], ptr @_QFEhantei, i64 0, i64 3), align 4, !tbaa !7
  %35 = icmp eq i32 %34, 0
  %36 = zext i1 %35 to i32
  %37 = getelementptr i32, ptr %22, i64 3
  store i32 %36, ptr %37, align 4, !tbaa !7
  store ptr %22, ptr %1, align 8, !tbaa !3
  %.fca.1.gep6 = 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.gep6, align 8, !tbaa !3
  %.fca.2.gep7 = 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.gep7, align 8, !tbaa !3
  %.fca.3.gep8 = 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.gep8, align 4, !tbaa !3
  %.fca.4.gep9 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %1, i64 0, i32 4
  store i8 14, ptr %.fca.4.gep9, align 1, !tbaa !3
  %.fca.5.gep10 = 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.gep10, align 2, !tbaa !3
  %.fca.6.gep11 = 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.gep11, align 1, !tbaa !3
  %.fca.7.0.0.gep12 = 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.gep12, align 8, !tbaa !3
  %.fca.7.0.1.gep13 = 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 4, ptr %.fca.7.0.1.gep13, align 8, !tbaa !3
  %.fca.7.0.2.gep14 = 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.gep14, align 8, !tbaa !3
  %38 = call i1 @_FortranAAll(ptr nonnull %1, ptr nonnull @_QQcl.cb871a5722a73ae9a24c26def02c284b, i32 11, i32 1)
  call void @free(ptr %22)
  br i1 %38, label %39, label %42

39:                                               ; preds = %.thread16.thread.3
  %40 = call ptr @_FortranAioBeginExternalFormattedOutput(ptr nonnull @_QQcl.28613329, i64 4, ptr null, i32 -1, ptr nonnull @_QQcl.cb871a5722a73ae9a24c26def02c284b, i32 13)
  %41 = call i1 @_FortranAioOutputAscii(ptr %40, ptr nonnull @_QQcl.594553, i64 3)
  br label %45

42:                                               ; preds = %.thread16.thread.3
  %43 = call ptr @_FortranAioBeginExternalFormattedOutput(ptr nonnull @_QQcl.28613229, i64 4, ptr null, i32 -1, ptr nonnull @_QQcl.cb871a5722a73ae9a24c26def02c284b, i32 15)
  %44 = call i1 @_FortranAioOutputAscii(ptr %43, ptr nonnull @_QQcl.4E4F, i64 2)
  br label %45

45:                                               ; preds = %39, %42
  %.sink = phi ptr [ %40, %39 ], [ %43, %42 ]
  %46 = call i32 @_FortranAioEndIoStatement(ptr %.sink)
  ret void
}

declare ptr @_FortranAioBeginExternalListInput(i32, ptr, i32) local_unnamed_addr

declare i1 @_FortranAioInputDescriptor(ptr, ptr) local_unnamed_addr

declare i32 @_FortranAioEndIoStatement(ptr) local_unnamed_addr

declare i1 @_FortranAAll(ptr, ptr, i32, i32) local_unnamed_addr

declare ptr @_FortranAioBeginExternalFormattedOutput(ptr, i64, ptr, i32, ptr, i32) local_unnamed_addr

declare i1 @_FortranAioOutputAscii(ptr, ptr, i64) local_unnamed_addr

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

!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 = !{!"descriptor member", !5, i64 0}
!5 = !{!"any access", !6, i64 0}
!6 = !{!"Flang Type TBAA Root"}
!7 = !{!8, !8, i64 0}
!8 = !{!"any data access", !5, i64 0}
