program main
    implicit none
    integer:: i,j
    integer:: n, k, q
    integer,allocatable:: a(:), p(:)
    read*, n,k,q
    allocate(a(q), p(n))
    p(1:n) = k-q
    read*, a(1:q)

    ! print*, n,k,q
    ! print*, p
    do i = 1, q
        p(a(i)) = p(a(i)) + 1 
    end do
    ! print*, p
    do i = 1, n
        if(p(i) > 0)then
            print*, 'Yes'
        else
            print*, 'No'
        end if
    end do

    
end program
; 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
@_QFEp.0 = internal unnamed_addr global ptr null
@_QQcl.6b10c2e9dfa2509ca3e6f0f189f32c11 = linkonce constant [73 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_3255/source.f\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 { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, align 8
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = tail call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.6b10c2e9dfa2509ca3e6f0f189f32c11, i32 6)
  %6 = call i1 @_FortranAioInputInteger(ptr %5, ptr nonnull %3, i32 4)
  %7 = call i1 @_FortranAioInputInteger(ptr %5, ptr nonnull %2, i32 4)
  %8 = call i1 @_FortranAioInputInteger(ptr %5, ptr nonnull %4, i32 4)
  %9 = call i32 @_FortranAioEndIoStatement(ptr %5)
  %10 = load i32, ptr %4, align 4, !tbaa !3
  %11 = call i32 @llvm.smax.i32(i32 %10, i32 0)
  %12 = zext i32 %11 to i64
  %13 = shl nuw nsw i64 %12, 2
  %14 = call ptr @malloc(i64 %13)
  store ptr %14, ptr @_QFEa.0, align 8, !tbaa !7
  %15 = load i32, ptr %3, align 4, !tbaa !3
  %16 = call i32 @llvm.smax.i32(i32 %15, i32 0)
  %17 = zext i32 %16 to i64
  %18 = shl nuw nsw i64 %17, 2
  %19 = call ptr @malloc(i64 %18)
  store ptr %19, ptr @_QFEp.0, align 8, !tbaa !7
  %20 = load i32, ptr %2, align 4, !tbaa !3
  %21 = sub i32 %20, %10
  %.not = icmp slt i32 %15, 1
  br i1 %.not, label %._crit_edge, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %0
  %min.iters.check = icmp ult i32 %16, 8
  br i1 %min.iters.check, label %.lr.ph.preheader272, label %vector.ph

vector.ph:                                        ; preds = %.lr.ph.preheader
  %n.vec = and i64 %17, 2147483640
  %ind.end = and i64 %17, 7
  %broadcast.splatinsert = insertelement <4 x i32> poison, i32 %21, i64 0
  %broadcast.splat = shufflevector <4 x i32> %broadcast.splatinsert, <4 x i32> poison, <4 x i32> zeroinitializer
  %broadcast.splatinsert270 = insertelement <4 x i32> poison, i32 %21, i64 0
  %broadcast.splat271 = shufflevector <4 x i32> %broadcast.splatinsert270, <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 ]
  %22 = getelementptr i32, ptr %19, i64 %index
  store <4 x i32> %broadcast.splat, ptr %22, align 4, !tbaa !3
  %23 = getelementptr i32, ptr %22, i64 4
  store <4 x i32> %broadcast.splat271, ptr %23, align 4, !tbaa !3
  %index.next = add nuw i64 %index, 8
  %24 = icmp eq i64 %index.next, %n.vec
  br i1 %24, label %middle.block, label %vector.body, !llvm.loop !9

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %17
  br i1 %cmp.n, label %._crit_edge, label %.lr.ph.preheader272

.lr.ph.preheader272:                              ; preds = %.lr.ph.preheader, %middle.block
  %.ph = phi i64 [ %17, %.lr.ph.preheader ], [ %ind.end, %middle.block ]
  %.ph273 = phi i64 [ 0, %.lr.ph.preheader ], [ %n.vec, %middle.block ]
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader272, %.lr.ph
  %25 = phi i64 [ %29, %.lr.ph ], [ %.ph, %.lr.ph.preheader272 ]
  %26 = phi i64 [ %28, %.lr.ph ], [ %.ph273, %.lr.ph.preheader272 ]
  %27 = getelementptr i32, ptr %19, i64 %26
  store i32 %21, ptr %27, align 4, !tbaa !3
  %28 = add nuw nsw i64 %26, 1
  %29 = add nsw i64 %25, -1
  %30 = icmp ugt i64 %25, 1
  br i1 %30, label %.lr.ph, label %._crit_edge, !llvm.loop !12

._crit_edge:                                      ; preds = %.lr.ph, %middle.block, %0
  %31 = call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.6b10c2e9dfa2509ca3e6f0f189f32c11, i32 9)
  %.unpack = load ptr, ptr @_QFEa.0, align 8, !tbaa !7
  %32 = load i32, ptr %4, align 4, !tbaa !3
  %33 = call i32 @llvm.smax.i32(i32 %32, i32 0)
  %34 = zext i32 %33 to i64
  store ptr %.unpack, ptr %1, align 8, !tbaa !7
  %.fca.1.gep = 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.gep, align 8, !tbaa !7
  %.fca.2.gep = 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.gep, align 8, !tbaa !7
  %.fca.3.gep = 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.gep, align 4, !tbaa !7
  %.fca.4.gep = 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.gep, align 1, !tbaa !7
  %.fca.5.gep = 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.gep, align 2, !tbaa !7
  %.fca.6.gep = 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.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 %1, 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 %1, i64 0, i32 7, i64 0, i64 1
  store i64 %34, 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 %1, i64 0, i32 7, i64 0, i64 2
  store i64 4, ptr %.fca.7.0.2.gep, align 8, !tbaa !7
  %35 = call i1 @_FortranAioInputDescriptor(ptr %31, ptr nonnull %1)
  %36 = call i32 @_FortranAioEndIoStatement(ptr %31)
  %37 = load i32, ptr %4, align 4, !tbaa !3
  %38 = icmp sgt i32 %37, 0
  br i1 %38, label %.lr.ph259, label %._crit_edge260

.lr.ph259:                                        ; preds = %._crit_edge
  %39 = zext i32 %37 to i64
  %.unpack234 = load ptr, ptr @_QFEp.0, align 8, !tbaa !7
  %.unpack246 = load ptr, ptr @_QFEa.0, align 8, !tbaa !7
  %xtraiter = and i64 %39, 1
  %40 = icmp eq i32 %37, 1
  br i1 %40, label %._crit_edge260.loopexit.unr-lcssa, label %.lr.ph259.new

.lr.ph259.new:                                    ; preds = %.lr.ph259
  %unroll_iter = and i64 %39, 4294967294
  br label %41

41:                                               ; preds = %41, %.lr.ph259.new
  %indvars.iv = phi i64 [ 1, %.lr.ph259.new ], [ %indvars.iv.next.1, %41 ]
  %niter = phi i64 [ 0, %.lr.ph259.new ], [ %niter.next.1, %41 ]
  %42 = add nsw i64 %indvars.iv, -1
  %43 = getelementptr i32, ptr %.unpack246, i64 %42
  %44 = load i32, ptr %43, align 4, !tbaa !3
  %45 = sext i32 %44 to i64
  %46 = add nsw i64 %45, -1
  %47 = getelementptr i32, ptr %.unpack234, i64 %46
  %48 = load i32, ptr %47, align 4, !tbaa !3
  %49 = add i32 %48, 1
  store i32 %49, ptr %47, align 4, !tbaa !3
  %50 = getelementptr i32, ptr %.unpack246, i64 %indvars.iv
  %51 = load i32, ptr %50, align 4, !tbaa !3
  %52 = sext i32 %51 to i64
  %53 = add nsw i64 %52, -1
  %54 = getelementptr i32, ptr %.unpack234, 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
  %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_edge260.loopexit.unr-lcssa.loopexit, label %41

._crit_edge260.loopexit.unr-lcssa.loopexit:       ; preds = %41
  %57 = add nuw nsw i64 %indvars.iv, 1
  br label %._crit_edge260.loopexit.unr-lcssa

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

._crit_edge260.loopexit.epilog-lcssa:             ; preds = %._crit_edge260.loopexit.unr-lcssa
  %58 = getelementptr i32, ptr %.unpack246, i64 %indvars.iv.unr
  %59 = load i32, ptr %58, align 4, !tbaa !3
  %60 = sext i32 %59 to i64
  %61 = add nsw i64 %60, -1
  %62 = getelementptr i32, ptr %.unpack234, i64 %61
  %63 = load i32, ptr %62, align 4, !tbaa !3
  %64 = add i32 %63, 1
  store i32 %64, ptr %62, align 4, !tbaa !3
  br label %._crit_edge260

._crit_edge260:                                   ; preds = %._crit_edge260.loopexit.epilog-lcssa, %._crit_edge260.loopexit.unr-lcssa, %._crit_edge
  %65 = load i32, ptr %3, align 4, !tbaa !3
  %66 = icmp sgt i32 %65, 0
  br i1 %66, label %.lr.ph262.preheader, label %._crit_edge263

.lr.ph262.preheader:                              ; preds = %._crit_edge260
  %67 = zext i32 %65 to i64
  br label %.lr.ph262

.lr.ph262:                                        ; preds = %.lr.ph262.preheader, %78
  %indvars.iv265 = phi i64 [ 1, %.lr.ph262.preheader ], [ %indvars.iv.next266, %78 ]
  %.unpack222 = load ptr, ptr @_QFEp.0, align 8, !tbaa !7
  %68 = add nsw i64 %indvars.iv265, -1
  %69 = getelementptr i32, ptr %.unpack222, i64 %68
  %70 = load i32, ptr %69, align 4, !tbaa !3
  %71 = icmp sgt i32 %70, 0
  br i1 %71, label %72, label %75

72:                                               ; preds = %.lr.ph262
  %73 = call ptr @_FortranAioBeginExternalListOutput(i32 -1, ptr nonnull @_QQcl.6b10c2e9dfa2509ca3e6f0f189f32c11, i32 19)
  %74 = call i1 @_FortranAioOutputAscii(ptr %73, ptr nonnull @_QQcl.596573, i64 3)
  br label %78

75:                                               ; preds = %.lr.ph262
  %76 = call ptr @_FortranAioBeginExternalListOutput(i32 -1, ptr nonnull @_QQcl.6b10c2e9dfa2509ca3e6f0f189f32c11, i32 21)
  %77 = call i1 @_FortranAioOutputAscii(ptr %76, ptr nonnull @_QQcl.4E6F, i64 2)
  br label %78

78:                                               ; preds = %72, %75
  %.sink = phi ptr [ %73, %72 ], [ %76, %75 ]
  %79 = call i32 @_FortranAioEndIoStatement(ptr %.sink)
  %indvars.iv.next266 = add nuw nsw i64 %indvars.iv265, 1
  %exitcond268.not = icmp eq i64 %indvars.iv265, %67
  br i1 %exitcond268.not, label %._crit_edge263, label %.lr.ph262

._crit_edge263:                                   ; preds = %78, %._crit_edge260
  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 i1 @_FortranAioInputDescriptor(ptr, ptr) 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}
