INTEGER N,D
INTEGER X(100)
READ*,N
X=0
DO I=1,N
  READ*,D
  IF(X(D)==0)X(D)=1
END DO
PRINT"(I0)",SUM(X)
END
; 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"

@_QFEx = internal unnamed_addr global [100 x i32] undef
@_QQcl.1d14349b803befadab04b7d2ce39871f = linkonce constant [73 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_6425/source.f\00"
@_QQcl.28493029 = linkonce constant [4 x i8] c"(I0)"
@_QQEnvironmentDefaults = local_unnamed_addr constant ptr null

define void @_QQmain() local_unnamed_addr {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = tail call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.1d14349b803befadab04b7d2ce39871f, i32 3)
  %4 = call i1 @_FortranAioInputInteger(ptr %3, ptr nonnull %2, i32 4)
  %5 = call i32 @_FortranAioEndIoStatement(ptr %3)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(400) @_QFEx, i8 0, i64 400, i1 false), !tbaa !3
  %6 = load i32, ptr %2, align 4, !tbaa !3
  %7 = icmp sgt i32 %6, 0
  br i1 %7, label %.lr.ph.preheader, label %.lr.ph.i

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

.lr.ph:                                           ; preds = %.lr.ph.preheader, %20
  %9 = phi i64 [ %21, %20 ], [ %8, %.lr.ph.preheader ]
  %10 = call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.1d14349b803befadab04b7d2ce39871f, i32 6)
  %11 = call i1 @_FortranAioInputInteger(ptr %10, ptr nonnull %1, i32 4)
  %12 = call i32 @_FortranAioEndIoStatement(ptr %10)
  %13 = load i32, ptr %1, align 4, !tbaa !3
  %14 = sext i32 %13 to i64
  %15 = add nsw i64 %14, -1
  %16 = getelementptr [100 x i32], ptr @_QFEx, i64 0, i64 %15
  %17 = load i32, ptr %16, align 4, !tbaa !3
  %18 = icmp eq i32 %17, 0
  br i1 %18, label %19, label %20

19:                                               ; preds = %.lr.ph
  store i32 1, ptr %16, align 4, !tbaa !3
  br label %20

20:                                               ; preds = %19, %.lr.ph
  %21 = add nsw i64 %9, -1
  %22 = icmp sgt i64 %9, 1
  br i1 %22, label %.lr.ph, label %.lr.ph.i

.lr.ph.i:                                         ; preds = %20, %0
  %23 = call ptr @_FortranAioBeginExternalFormattedOutput(ptr nonnull @_QQcl.28493029, i64 4, ptr null, i32 -1, ptr nonnull @_QQcl.1d14349b803befadab04b7d2ce39871f, i32 9)
  %wide.load = load <4 x i32>, ptr @_QFEx, align 16, !tbaa !3
  %wide.load.1 = load <4 x i32>, ptr getelementptr inbounds ([100 x i32], ptr @_QFEx, i64 0, i64 4), align 16, !tbaa !3
  %24 = add <4 x i32> %wide.load.1, %wide.load
  %wide.load.2 = load <4 x i32>, ptr getelementptr inbounds ([100 x i32], ptr @_QFEx, i64 0, i64 8), align 16, !tbaa !3
  %25 = add <4 x i32> %wide.load.2, %24
  %wide.load.3 = load <4 x i32>, ptr getelementptr inbounds ([100 x i32], ptr @_QFEx, i64 0, i64 12), align 16, !tbaa !3
  %26 = add <4 x i32> %wide.load.3, %25
  %wide.load.4 = load <4 x i32>, ptr getelementptr inbounds ([100 x i32], ptr @_QFEx, i64 0, i64 16), align 16, !tbaa !3
  %27 = add <4 x i32> %wide.load.4, %26
  %wide.load.5 = load <4 x i32>, ptr getelementptr inbounds ([100 x i32], ptr @_QFEx, i64 0, i64 20), align 16, !tbaa !3
  %28 = add <4 x i32> %wide.load.5, %27
  %wide.load.6 = load <4 x i32>, ptr getelementptr inbounds ([100 x i32], ptr @_QFEx, i64 0, i64 24), align 16, !tbaa !3
  %29 = add <4 x i32> %wide.load.6, %28
  %wide.load.7 = load <4 x i32>, ptr getelementptr inbounds ([100 x i32], ptr @_QFEx, i64 0, i64 28), align 16, !tbaa !3
  %30 = add <4 x i32> %wide.load.7, %29
  %wide.load.8 = load <4 x i32>, ptr getelementptr inbounds ([100 x i32], ptr @_QFEx, i64 0, i64 32), align 16, !tbaa !3
  %31 = add <4 x i32> %wide.load.8, %30
  %wide.load.9 = load <4 x i32>, ptr getelementptr inbounds ([100 x i32], ptr @_QFEx, i64 0, i64 36), align 16, !tbaa !3
  %32 = add <4 x i32> %wide.load.9, %31
  %wide.load.10 = load <4 x i32>, ptr getelementptr inbounds ([100 x i32], ptr @_QFEx, i64 0, i64 40), align 16, !tbaa !3
  %33 = add <4 x i32> %wide.load.10, %32
  %wide.load.11 = load <4 x i32>, ptr getelementptr inbounds ([100 x i32], ptr @_QFEx, i64 0, i64 44), align 16, !tbaa !3
  %34 = add <4 x i32> %wide.load.11, %33
  %wide.load.12 = load <4 x i32>, ptr getelementptr inbounds ([100 x i32], ptr @_QFEx, i64 0, i64 48), align 16, !tbaa !3
  %35 = add <4 x i32> %wide.load.12, %34
  %wide.load.13 = load <4 x i32>, ptr getelementptr inbounds ([100 x i32], ptr @_QFEx, i64 0, i64 52), align 16, !tbaa !3
  %36 = add <4 x i32> %wide.load.13, %35
  %wide.load.14 = load <4 x i32>, ptr getelementptr inbounds ([100 x i32], ptr @_QFEx, i64 0, i64 56), align 16, !tbaa !3
  %37 = add <4 x i32> %wide.load.14, %36
  %wide.load.15 = load <4 x i32>, ptr getelementptr inbounds ([100 x i32], ptr @_QFEx, i64 0, i64 60), align 16, !tbaa !3
  %38 = add <4 x i32> %wide.load.15, %37
  %wide.load.16 = load <4 x i32>, ptr getelementptr inbounds ([100 x i32], ptr @_QFEx, i64 0, i64 64), align 16, !tbaa !3
  %39 = add <4 x i32> %wide.load.16, %38
  %wide.load.17 = load <4 x i32>, ptr getelementptr inbounds ([100 x i32], ptr @_QFEx, i64 0, i64 68), align 16, !tbaa !3
  %40 = add <4 x i32> %wide.load.17, %39
  %wide.load.18 = load <4 x i32>, ptr getelementptr inbounds ([100 x i32], ptr @_QFEx, i64 0, i64 72), align 16, !tbaa !3
  %41 = add <4 x i32> %wide.load.18, %40
  %wide.load.19 = load <4 x i32>, ptr getelementptr inbounds ([100 x i32], ptr @_QFEx, i64 0, i64 76), align 16, !tbaa !3
  %42 = add <4 x i32> %wide.load.19, %41
  %wide.load.20 = load <4 x i32>, ptr getelementptr inbounds ([100 x i32], ptr @_QFEx, i64 0, i64 80), align 16, !tbaa !3
  %43 = add <4 x i32> %wide.load.20, %42
  %wide.load.21 = load <4 x i32>, ptr getelementptr inbounds ([100 x i32], ptr @_QFEx, i64 0, i64 84), align 16, !tbaa !3
  %44 = add <4 x i32> %wide.load.21, %43
  %wide.load.22 = load <4 x i32>, ptr getelementptr inbounds ([100 x i32], ptr @_QFEx, i64 0, i64 88), align 16, !tbaa !3
  %45 = add <4 x i32> %wide.load.22, %44
  %wide.load.23 = load <4 x i32>, ptr getelementptr inbounds ([100 x i32], ptr @_QFEx, i64 0, i64 92), align 16, !tbaa !3
  %46 = add <4 x i32> %wide.load.23, %45
  %wide.load.24 = load <4 x i32>, ptr getelementptr inbounds ([100 x i32], ptr @_QFEx, i64 0, i64 96), align 16, !tbaa !3
  %47 = add <4 x i32> %wide.load.24, %46
  %48 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %47)
  %49 = call i1 @_FortranAioOutputInteger32(ptr %23, i32 %48)
  %50 = call i32 @_FortranAioEndIoStatement(ptr %23)
  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 @_FortranAioOutputInteger32(ptr, i32) local_unnamed_addr

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #0

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

attributes #0 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #1 = { 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"}
