program test
implicit none
  integer,allocatable::a(:),b(:)
  integer :: N,i,ans,K,Q
  read*,N,K,Q
  allocate(a(Q))
  allocate(b(N))
  read(*,*)(a(i),i=1,Q)
  b=K-Q
  do i=1,Q
  	b(a(i))=b(a(i))+1
  end do
  do i=1,N
  	if(b(i)>0)then
    	print*,'Yes'
    else 
    	print*,'No'
    end if
  end do
end program test
; 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.0 = internal unnamed_addr global ptr null
@_QFEb.0 = internal unnamed_addr global ptr null
@_QFEb.7 = internal unnamed_addr global i64 1
@_QFEb.8 = internal unnamed_addr global i64 0
@_QQcl.d24153e002a794b5dd475d4f5ec39ccc = linkonce constant [73 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_3249/source.f\00"
@_QQcl.16373402fa3425c6e46827601abb88fa = linkonce constant [76 x i8] c"array left hand side must be allocated when the right hand side is a scalar\00"
@_QQcl.596573 = linkonce constant [3 x i8] c"Yes"
@_QQcl.4E6F = linkonce constant [2 x i8] c"No"
@_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

define void @_QQmain() local_unnamed_addr {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = tail call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.d24153e002a794b5dd475d4f5ec39ccc, i32 5)
  %5 = call i1 @_FortranAioInputInteger(ptr %4, ptr nonnull %2, i32 4)
  %6 = call i1 @_FortranAioInputInteger(ptr %4, ptr nonnull %1, i32 4)
  %7 = call i1 @_FortranAioInputInteger(ptr %4, ptr nonnull %3, i32 4)
  %8 = call i32 @_FortranAioEndIoStatement(ptr %4)
  %9 = load i32, ptr %3, align 4, !tbaa !3
  %10 = call i32 @llvm.smax.i32(i32 %9, i32 0)
  %11 = zext i32 %10 to i64
  %12 = shl nuw nsw i64 %11, 2
  %13 = call ptr @malloc(i64 %12)
  store ptr %13, ptr @_QFEa.0, align 8, !tbaa !7
  %14 = load i32, ptr %2, 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 @_QFEb.0, align 8, !tbaa !7
  store i64 1, ptr @_QFEb.7, align 8, !tbaa !7
  store i64 %16, ptr @_QFEb.8, align 8, !tbaa !7
  %19 = call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.d24153e002a794b5dd475d4f5ec39ccc, i32 8)
  %20 = load i32, ptr %3, align 4, !tbaa !3
  %21 = icmp sgt i32 %20, 0
  br i1 %21, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %0
  %22 = zext i32 %20 to i64
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %23 = phi i64 [ %28, %.lr.ph ], [ 1, %.lr.ph.preheader ]
  %.unpack301 = load ptr, ptr @_QFEa.0, align 8, !tbaa !7
  %sext = shl i64 %23, 32
  %24 = ashr exact i64 %sext, 32
  %25 = add nsw i64 %24, -1
  %26 = getelementptr i32, ptr %.unpack301, i64 %25
  %27 = call i1 @_FortranAioInputInteger(ptr %19, ptr %26, i32 4)
  %28 = add nuw nsw i64 %23, 1
  %exitcond.not = icmp eq i64 %23, %22
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %0
  %29 = call i32 @_FortranAioEndIoStatement(ptr %19)
  %30 = load i32, ptr %1, align 4, !tbaa !3
  %31 = load i32, ptr %3, align 4, !tbaa !3
  %32 = sub i32 %30, %31
  %.unpack = load ptr, ptr @_QFEb.0, align 8, !tbaa !7
  %.unpack239.unpack.unpack241 = load i64, ptr @_QFEb.8, align 8, !tbaa !7
  %.not = icmp eq ptr %.unpack, null
  br i1 %.not, label %40, label %.preheader

.preheader:                                       ; preds = %._crit_edge
  %33 = icmp sgt i64 %.unpack239.unpack.unpack241, 0
  br i1 %33, label %.lr.ph313.preheader, label %.loopexit

.lr.ph313.preheader:                              ; preds = %.preheader
  %min.iters.check = icmp ult i64 %.unpack239.unpack.unpack241, 8
  br i1 %min.iters.check, label %.lr.ph313.preheader330, label %vector.ph

vector.ph:                                        ; preds = %.lr.ph313.preheader
  %n.vec = and i64 %.unpack239.unpack.unpack241, -8
  %broadcast.splatinsert = insertelement <4 x i32> poison, i32 %32, i64 0
  %broadcast.splat = shufflevector <4 x i32> %broadcast.splatinsert, <4 x i32> poison, <4 x i32> zeroinitializer
  %broadcast.splatinsert328 = insertelement <4 x i32> poison, i32 %32, i64 0
  %broadcast.splat329 = shufflevector <4 x i32> %broadcast.splatinsert328, <4 x i32> poison, <4 x i32> zeroinitializer
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %34 = getelementptr i32, ptr %.unpack, i64 %index
  store <4 x i32> %broadcast.splat, ptr %34, align 4, !tbaa !3
  %35 = getelementptr i32, ptr %34, i64 4
  store <4 x i32> %broadcast.splat329, ptr %35, align 4, !tbaa !3
  %index.next = add nuw i64 %index, 8
  %36 = icmp eq i64 %index.next, %n.vec
  br i1 %36, label %middle.block, label %vector.body, !llvm.loop !9

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %.unpack239.unpack.unpack241, %n.vec
  br i1 %cmp.n, label %.loopexit, label %.lr.ph313.preheader330

.lr.ph313.preheader330:                           ; preds = %.lr.ph313.preheader, %middle.block
  %.ph = phi i64 [ 0, %.lr.ph313.preheader ], [ %n.vec, %middle.block ]
  br label %.lr.ph313

.lr.ph313:                                        ; preds = %.lr.ph313.preheader330, %.lr.ph313
  %37 = phi i64 [ %38, %.lr.ph313 ], [ %.ph, %.lr.ph313.preheader330 ]
  %38 = add nuw nsw i64 %37, 1
  %39 = getelementptr i32, ptr %.unpack, i64 %37
  store i32 %32, ptr %39, align 4, !tbaa !3
  %exitcond320.not = icmp eq i64 %38, %.unpack239.unpack.unpack241
  br i1 %exitcond320.not, label %.loopexit, label %.lr.ph313, !llvm.loop !12

40:                                               ; preds = %._crit_edge
  %41 = call {} @_FortranAReportFatalUserError(ptr nonnull @_QQcl.16373402fa3425c6e46827601abb88fa, ptr nonnull @_QQcl.d24153e002a794b5dd475d4f5ec39ccc, i32 9)
  %.unpack287.unpack.unpack = load i64, ptr @_QFEb.7, align 8, !tbaa !7
  %42 = icmp eq i64 %.unpack239.unpack.unpack241, 0
  %43 = select i1 %42, i64 1, i64 %.unpack287.unpack.unpack
  store ptr null, ptr @_QFEb.0, align 8, !tbaa !7
  store i64 %43, ptr @_QFEb.7, align 8, !tbaa !7
  store i64 %.unpack239.unpack.unpack241, ptr @_QFEb.8, align 8, !tbaa !7
  br label %.loopexit

.loopexit:                                        ; preds = %.lr.ph313, %middle.block, %.preheader, %40
  %44 = load i32, ptr %3, align 4, !tbaa !3
  %45 = icmp sgt i32 %44, 0
  br i1 %45, label %.lr.ph315, label %._crit_edge316

.lr.ph315:                                        ; preds = %.loopexit
  %46 = zext i32 %44 to i64
  %.unpack263.unpack.unpack = load i64, ptr @_QFEb.7, align 8, !tbaa !7
  %.unpack268 = load ptr, ptr @_QFEa.0, align 8, !tbaa !7
  %xtraiter = and i64 %46, 1
  %47 = icmp eq i32 %44, 1
  br i1 %47, label %._crit_edge316.loopexit.unr-lcssa, label %.lr.ph315.new

.lr.ph315.new:                                    ; preds = %.lr.ph315
  %unroll_iter = and i64 %46, 4294967294
  br label %48

48:                                               ; preds = %48, %.lr.ph315.new
  %indvars.iv = phi i64 [ 1, %.lr.ph315.new ], [ %indvars.iv.next.1, %48 ]
  %niter = phi i64 [ 0, %.lr.ph315.new ], [ %niter.next.1, %48 ]
  %49 = add nsw i64 %indvars.iv, -1
  %50 = getelementptr i32, ptr %.unpack268, i64 %49
  %51 = load i32, ptr %50, align 4, !tbaa !3
  %52 = sext i32 %51 to i64
  %53 = sub i64 %52, %.unpack263.unpack.unpack
  %54 = getelementptr i32, ptr %.unpack, i64 %53
  %55 = load i32, ptr %54, align 4, !tbaa !3
  %56 = add i32 %55, 1
  store i32 %56, ptr %54, align 4, !tbaa !3
  %57 = getelementptr i32, ptr %.unpack268, i64 %indvars.iv
  %58 = load i32, ptr %57, align 4, !tbaa !3
  %59 = sext i32 %58 to i64
  %60 = sub i64 %59, %.unpack263.unpack.unpack
  %61 = getelementptr i32, ptr %.unpack, i64 %60
  %62 = load i32, ptr %61, align 4, !tbaa !3
  %63 = add i32 %62, 1
  store i32 %63, ptr %61, align 4, !tbaa !3
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge316.loopexit.unr-lcssa.loopexit, label %48

._crit_edge316.loopexit.unr-lcssa.loopexit:       ; preds = %48
  %64 = add nuw nsw i64 %indvars.iv, 1
  br label %._crit_edge316.loopexit.unr-lcssa

._crit_edge316.loopexit.unr-lcssa:                ; preds = %._crit_edge316.loopexit.unr-lcssa.loopexit, %.lr.ph315
  %indvars.iv.unr = phi i64 [ 0, %.lr.ph315 ], [ %64, %._crit_edge316.loopexit.unr-lcssa.loopexit ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge316, label %._crit_edge316.loopexit.epilog-lcssa

._crit_edge316.loopexit.epilog-lcssa:             ; preds = %._crit_edge316.loopexit.unr-lcssa
  %65 = getelementptr i32, ptr %.unpack268, i64 %indvars.iv.unr
  %66 = load i32, ptr %65, align 4, !tbaa !3
  %67 = sext i32 %66 to i64
  %68 = sub i64 %67, %.unpack263.unpack.unpack
  %69 = getelementptr i32, ptr %.unpack, i64 %68
  %70 = load i32, ptr %69, align 4, !tbaa !3
  %71 = add i32 %70, 1
  store i32 %71, ptr %69, align 4, !tbaa !3
  br label %._crit_edge316

._crit_edge316:                                   ; preds = %._crit_edge316.loopexit.epilog-lcssa, %._crit_edge316.loopexit.unr-lcssa, %.loopexit
  %72 = load i32, ptr %2, align 4, !tbaa !3
  %73 = icmp sgt i32 %72, 0
  br i1 %73, label %.lr.ph318.preheader, label %._crit_edge319

.lr.ph318.preheader:                              ; preds = %._crit_edge316
  %74 = zext i32 %72 to i64
  br label %.lr.ph318

.lr.ph318:                                        ; preds = %.lr.ph318.preheader, %85
  %indvars.iv323 = phi i64 [ 1, %.lr.ph318.preheader ], [ %indvars.iv.next324, %85 ]
  %.unpack244 = load ptr, ptr @_QFEb.0, align 8, !tbaa !7
  %.unpack251.unpack.unpack = load i64, ptr @_QFEb.7, align 8, !tbaa !7
  %75 = sub i64 %indvars.iv323, %.unpack251.unpack.unpack
  %76 = getelementptr i32, ptr %.unpack244, i64 %75
  %77 = load i32, ptr %76, align 4, !tbaa !3
  %78 = icmp sgt i32 %77, 0
  br i1 %78, label %79, label %82

79:                                               ; preds = %.lr.ph318
  %80 = call ptr @_FortranAioBeginExternalListOutput(i32 -1, ptr nonnull @_QQcl.d24153e002a794b5dd475d4f5ec39ccc, i32 15)
  %81 = call i1 @_FortranAioOutputAscii(ptr %80, ptr nonnull @_QQcl.596573, i64 3)
  br label %85

82:                                               ; preds = %.lr.ph318
  %83 = call ptr @_FortranAioBeginExternalListOutput(i32 -1, ptr nonnull @_QQcl.d24153e002a794b5dd475d4f5ec39ccc, i32 17)
  %84 = call i1 @_FortranAioOutputAscii(ptr %83, ptr nonnull @_QQcl.4E6F, i64 2)
  br label %85

85:                                               ; preds = %79, %82
  %.sink = phi ptr [ %80, %79 ], [ %83, %82 ]
  %86 = call i32 @_FortranAioEndIoStatement(ptr %.sink)
  %indvars.iv.next324 = add nuw nsw i64 %indvars.iv323, 1
  %exitcond326.not = icmp eq i64 %indvars.iv323, %74
  br i1 %exitcond326.not, label %._crit_edge319, label %.lr.ph318

._crit_edge319:                                   ; preds = %85, %._crit_edge316
  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 {} @_FortranAReportFatalUserError(ptr, ptr, i32) local_unnamed_addr

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

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

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

attributes #0 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" }
attributes #1 = { 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"}
!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}
