      PROGRAM piyo
      IMPLICIT NONE
      integer :: n,m,p(10),k(10),sNum(10,10),ans=0
      logical :: s(10,10) = .false.,switch(10)
      integer :: i,j
      
      read*,n,m
      do i = 1,m
        read(fmt='(i2)',advance='no',unit=5) k(i)
        read*,sNum(i,1:k(i))
      end do
      read*,p(1:m)
      
      do i = 1,m
        do j = 1,k(i)
          s(i,sNum(i,j)) = .true.
        end do
      end do
 ! do i = 1,m
 !   print*,s(i,:)
 ! end do
      !s(n,k(i))
      
      
      outer:do i = 0,2**n-1
        switch = .false.
        do j = 1,n
          switch(j) = btest(i,j-1)
        end do
        
        do j = 1,m
          if(p(j)/= mod( count(switch(1:n).and.s(j,1:n)),2 ))then
            cycle outer
          end if
        end do
        ans = ans + 1
      end do outer
      
      print*,ans
      
 !debugg
  !    print*,n,m
  !    do i = 1,m
  !      print*,k(i),sNum(i,1:k(i))
  !    end do
  !    print*,p(1:m)
      
      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"

@_QFEans = internal unnamed_addr global i32 0
@_QFEk = internal global [10 x i32] undef
@_QFEp = internal global [10 x i32] undef
@_QFEs = internal unnamed_addr global [10 x [10 x i32]] zeroinitializer
@_QFEsnum = internal global [10 x [10 x i32]] undef
@_QFEswitch = internal unnamed_addr global [10 x i32] undef
@_QQcl.2bb763c363f33c0953cbc174975d87ae = linkonce constant [73 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_4185/source.f\00"
@_QQcl.28693229 = linkonce constant [4 x i8] c"(i2)"
@_QQcl.6E6F = 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

; 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 = 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 = tail call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.2bb763c363f33c0953cbc174975d87ae, i32 7)
  %7 = call i1 @_FortranAioInputInteger(ptr %6, ptr nonnull %5, i32 4)
  %8 = call i1 @_FortranAioInputInteger(ptr %6, ptr nonnull %4, i32 4)
  %9 = call i32 @_FortranAioEndIoStatement(ptr %6)
  %10 = load i32, ptr %4, align 4, !tbaa !3
  %11 = icmp sgt i32 %10, 0
  br i1 %11, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %0
  %12 = zext i32 %10 to i64
  %.fca.1.gep41 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %1, i64 0, i32 1
  %.fca.2.gep43 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %1, i64 0, i32 2
  %.fca.3.gep45 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %1, i64 0, i32 3
  %.fca.4.gep47 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %1, i64 0, i32 4
  %.fca.5.gep49 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %1, i64 0, i32 5
  %.fca.6.gep51 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %1, i64 0, i32 6
  %.fca.7.0.0.gep53 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %1, i64 0, i32 7, i64 0, i64 0
  %.fca.7.0.1.gep55 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %1, i64 0, i32 7, i64 0, i64 1
  %.fca.7.0.2.gep57 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %1, i64 0, i32 7, i64 0, i64 2
  br label %13

13:                                               ; preds = %.lr.ph, %13
  %indvars.iv = phi i64 [ 1, %.lr.ph ], [ %indvars.iv.next, %13 ]
  %14 = call ptr @_FortranAioBeginExternalFormattedInput(ptr nonnull @_QQcl.28693229, i64 4, ptr null, i32 5, ptr nonnull @_QQcl.2bb763c363f33c0953cbc174975d87ae, i32 9)
  %15 = call i1 @_FortranAioSetAdvance(ptr %14, ptr nonnull @_QQcl.6E6F, i64 2)
  %16 = add nsw i64 %indvars.iv, -1
  %17 = getelementptr [10 x i32], ptr @_QFEk, i64 0, i64 %16
  %18 = call i1 @_FortranAioInputInteger(ptr %14, ptr %17, i32 4)
  %19 = call i32 @_FortranAioEndIoStatement(ptr %14)
  %20 = call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.2bb763c363f33c0953cbc174975d87ae, i32 10)
  %21 = load i32, ptr %17, align 4, !tbaa !3
  %22 = call i32 @llvm.smax.i32(i32 %21, i32 0)
  %23 = zext i32 %22 to i64
  %24 = getelementptr [10 x [10 x i32]], ptr @_QFEsnum, i64 0, i64 0, i64 %16
  store ptr %24, ptr %1, align 8, !tbaa !7
  store i64 4, ptr %.fca.1.gep41, align 8, !tbaa !7
  store i32 20180515, ptr %.fca.2.gep43, align 8, !tbaa !7
  store i8 1, ptr %.fca.3.gep45, align 4, !tbaa !7
  store i8 9, ptr %.fca.4.gep47, align 1, !tbaa !7
  store i8 0, ptr %.fca.5.gep49, align 2, !tbaa !7
  store i8 0, ptr %.fca.6.gep51, align 1, !tbaa !7
  store i64 1, ptr %.fca.7.0.0.gep53, align 8, !tbaa !7
  store i64 %23, ptr %.fca.7.0.1.gep55, align 8, !tbaa !7
  store i64 40, ptr %.fca.7.0.2.gep57, align 8, !tbaa !7
  %25 = call i1 @_FortranAioInputDescriptor(ptr %20, ptr nonnull %1)
  %26 = call i32 @_FortranAioEndIoStatement(ptr %20)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv, %12
  br i1 %exitcond.not, label %._crit_edge, label %13

._crit_edge:                                      ; preds = %13, %0
  %27 = call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.2bb763c363f33c0953cbc174975d87ae, i32 12)
  %28 = load i32, ptr %4, align 4, !tbaa !3
  %29 = call i32 @llvm.smax.i32(i32 %28, i32 0)
  %30 = zext i32 %29 to i64
  store ptr @_QFEp, 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 %30, 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
  %31 = call i1 @_FortranAioInputDescriptor(ptr %27, ptr nonnull %3)
  %32 = call i32 @_FortranAioEndIoStatement(ptr %27)
  %33 = load i32, ptr %4, align 4, !tbaa !3
  %34 = icmp sgt i32 %33, 0
  br i1 %34, label %.lr.ph71.preheader, label %._crit_edge72

.lr.ph71.preheader:                               ; preds = %._crit_edge
  %35 = zext i32 %33 to i64
  br label %.lr.ph71

.lr.ph71:                                         ; preds = %.lr.ph71.preheader, %._crit_edge69
  %indvars.iv93 = phi i64 [ 1, %.lr.ph71.preheader ], [ %indvars.iv.next94, %._crit_edge69 ]
  %36 = add nsw i64 %indvars.iv93, -1
  %37 = getelementptr [10 x i32], ptr @_QFEk, i64 0, i64 %36
  %38 = load i32, ptr %37, align 4, !tbaa !3
  %39 = icmp sgt i32 %38, 0
  br i1 %39, label %.lr.ph68.preheader, label %._crit_edge69

.lr.ph68.preheader:                               ; preds = %.lr.ph71
  %40 = zext i32 %38 to i64
  %xtraiter = and i64 %40, 1
  %41 = icmp eq i32 %38, 1
  br i1 %41, label %._crit_edge69.loopexit.unr-lcssa, label %.lr.ph68.preheader.new

.lr.ph68.preheader.new:                           ; preds = %.lr.ph68.preheader
  %unroll_iter = and i64 %40, 4294967294
  br label %.lr.ph68

.lr.ph68:                                         ; preds = %.lr.ph68, %.lr.ph68.preheader.new
  %indvars.iv89 = phi i64 [ 1, %.lr.ph68.preheader.new ], [ %indvars.iv.next90.1, %.lr.ph68 ]
  %niter = phi i64 [ 0, %.lr.ph68.preheader.new ], [ %niter.next.1, %.lr.ph68 ]
  %42 = add nsw i64 %indvars.iv89, -1
  %43 = getelementptr [10 x [10 x i32]], ptr @_QFEsnum, i64 0, i64 %42, i64 %36
  %44 = load i32, ptr %43, align 4, !tbaa !3
  %45 = sext i32 %44 to i64
  %46 = add nsw i64 %45, -1
  %47 = getelementptr [10 x [10 x i32]], ptr @_QFEs, i64 0, i64 %46, i64 %36
  store i32 1, ptr %47, align 4, !tbaa !3
  %48 = getelementptr [10 x [10 x i32]], ptr @_QFEsnum, i64 0, i64 %indvars.iv89, i64 %36
  %49 = load i32, ptr %48, align 4, !tbaa !3
  %50 = sext i32 %49 to i64
  %51 = add nsw i64 %50, -1
  %52 = getelementptr [10 x [10 x i32]], ptr @_QFEs, i64 0, i64 %51, i64 %36
  store i32 1, ptr %52, align 4, !tbaa !3
  %indvars.iv.next90.1 = add nuw nsw i64 %indvars.iv89, 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_edge69.loopexit.unr-lcssa, label %.lr.ph68

._crit_edge69.loopexit.unr-lcssa:                 ; preds = %.lr.ph68, %.lr.ph68.preheader
  %indvars.iv89.unr = phi i64 [ 1, %.lr.ph68.preheader ], [ %indvars.iv.next90.1, %.lr.ph68 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge69, label %.lr.ph68.epil

.lr.ph68.epil:                                    ; preds = %._crit_edge69.loopexit.unr-lcssa
  %53 = add nsw i64 %indvars.iv89.unr, -1
  %54 = getelementptr [10 x [10 x i32]], ptr @_QFEsnum, i64 0, i64 %53, i64 %36
  %55 = load i32, ptr %54, align 4, !tbaa !3
  %56 = sext i32 %55 to i64
  %57 = add nsw i64 %56, -1
  %58 = getelementptr [10 x [10 x i32]], ptr @_QFEs, i64 0, i64 %57, i64 %36
  store i32 1, ptr %58, align 4, !tbaa !3
  br label %._crit_edge69

._crit_edge69:                                    ; preds = %.lr.ph68.epil, %._crit_edge69.loopexit.unr-lcssa, %.lr.ph71
  %indvars.iv.next94 = add nuw nsw i64 %indvars.iv93, 1
  %exitcond96.not = icmp eq i64 %indvars.iv93, %35
  br i1 %exitcond96.not, label %._crit_edge72, label %.lr.ph71

._crit_edge72:                                    ; preds = %._crit_edge69, %._crit_edge
  %59 = load i32, ptr %5, align 4, !tbaa !3
  %60 = icmp eq i32 %59, 0
  br i1 %60, label %.preheader.lr.ph, label %61

61:                                               ; preds = %._crit_edge72
  %62 = icmp slt i32 %59, 1
  br i1 %62, label %._crit_edge86, label %.preheader.i

.preheader.i:                                     ; preds = %61
  %63 = and i32 %59, 1
  %.not3.i = icmp eq i32 %63, 0
  %64 = select i1 %.not3.i, i32 1, i32 2
  %65 = icmp eq i32 %59, 1
  br i1 %65, label %.preheader.lr.ph, label %.lr.ph.i

.lr.ph.i:                                         ; preds = %.preheader.i, %.lr.ph.i
  %spec.select4.i = phi i32 [ %spec.select.i, %.lr.ph.i ], [ %64, %.preheader.i ]
  %66 = phi i32 [ %68, %.lr.ph.i ], [ %59, %.preheader.i ]
  %67 = phi i32 [ %69, %.lr.ph.i ], [ 2, %.preheader.i ]
  %68 = lshr i32 %66, 1
  %69 = mul i32 %67, %67
  %70 = and i32 %66, 2
  %.not.i = icmp eq i32 %70, 0
  %71 = select i1 %.not.i, i32 1, i32 %69
  %spec.select.i = mul i32 %71, %spec.select4.i
  %72 = icmp ult i32 %66, 4
  br i1 %72, label %__mlir_math_ipowi_i32.exit, label %.lr.ph.i

__mlir_math_ipowi_i32.exit:                       ; preds = %.lr.ph.i
  %73 = icmp sgt i32 %spec.select.i, 0
  br i1 %73, label %.preheader.lr.ph, label %._crit_edge86

.preheader.lr.ph:                                 ; preds = %.preheader.i, %._crit_edge72, %__mlir_math_ipowi_i32.exit
  %common.ret.op.i104 = phi i32 [ %spec.select.i, %__mlir_math_ipowi_i32.exit ], [ %64, %.preheader.i ], [ 1, %._crit_edge72 ]
  %.fca.1.gep21 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %2, i64 0, i32 1
  %.fca.2.gep23 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %2, i64 0, i32 2
  %.fca.3.gep25 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %2, i64 0, i32 3
  %.fca.4.gep27 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %2, i64 0, i32 4
  %.fca.5.gep29 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %2, i64 0, i32 5
  %.fca.6.gep31 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %2, i64 0, i32 6
  %.fca.7.0.0.gep33 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %2, i64 0, i32 7, i64 0, i64 0
  %.fca.7.0.1.gep35 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %2, i64 0, i32 7, i64 0, i64 1
  %.fca.7.0.2.gep37 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %2, i64 0, i32 7, i64 0, i64 2
  br label %.preheader

.preheader:                                       ; preds = %.preheader.lr.ph, %.loopexit
  %.05885 = phi i32 [ 0, %.preheader.lr.ph ], [ %128, %.loopexit ]
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(40) @_QFEswitch, i8 0, i64 40, i1 false), !tbaa !3
  %74 = load i32, ptr %5, align 4, !tbaa !3
  %75 = icmp sgt i32 %74, 0
  br i1 %75, label %.lr.ph74.preheader, label %._crit_edge75

.lr.ph74.preheader:                               ; preds = %.preheader
  %76 = zext i32 %74 to i64
  %min.iters.check = icmp ult i32 %74, 4
  br i1 %min.iters.check, label %.lr.ph74.preheader107, label %vector.ph

vector.ph:                                        ; preds = %.lr.ph74.preheader
  %n.vec = and i64 %76, 4294967292
  %ind.end = or i64 %n.vec, 1
  %broadcast.splatinsert = insertelement <4 x i32> poison, i32 %.05885, i64 0
  %broadcast.splat = shufflevector <4 x i32> %broadcast.splatinsert, <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 ]
  %77 = or i64 %index, 1
  %78 = or i64 %index, 2
  %79 = or i64 %index, 3
  %80 = insertelement <4 x i64> poison, i64 %index, i64 0
  %81 = insertelement <4 x i64> %80, i64 %77, i64 1
  %82 = insertelement <4 x i64> %81, i64 %78, i64 2
  %83 = insertelement <4 x i64> %82, i64 %79, i64 3
  %84 = trunc <4 x i64> %83 to <4 x i32>
  %85 = lshr <4 x i32> %broadcast.splat, %84
  %86 = and <4 x i32> %85, <i32 1, i32 1, i32 1, i32 1>
  %87 = getelementptr [10 x i32], ptr @_QFEswitch, i64 0, i64 %index
  store <4 x i32> %86, ptr %87, align 16, !tbaa !3
  %index.next = add nuw i64 %index, 4
  %88 = icmp eq i64 %index.next, %n.vec
  br i1 %88, label %middle.block, label %vector.body, !llvm.loop !9

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %76
  br i1 %cmp.n, label %._crit_edge75, label %.lr.ph74.preheader107

.lr.ph74.preheader107:                            ; preds = %.lr.ph74.preheader, %middle.block
  %indvars.iv97.ph = phi i64 [ 1, %.lr.ph74.preheader ], [ %ind.end, %middle.block ]
  br label %.lr.ph74

.lr.ph74:                                         ; preds = %.lr.ph74.preheader107, %.lr.ph74
  %indvars.iv97 = phi i64 [ %indvars.iv.next98, %.lr.ph74 ], [ %indvars.iv97.ph, %.lr.ph74.preheader107 ]
  %89 = add nsw i64 %indvars.iv97, -1
  %90 = trunc i64 %89 to i32
  %91 = lshr i32 %.05885, %90
  %92 = and i32 %91, 1
  %93 = getelementptr [10 x i32], ptr @_QFEswitch, i64 0, i64 %89
  store i32 %92, ptr %93, align 4, !tbaa !3
  %indvars.iv.next98 = add nuw nsw i64 %indvars.iv97, 1
  %exitcond100.not = icmp eq i64 %indvars.iv97, %76
  br i1 %exitcond100.not, label %._crit_edge75, label %.lr.ph74, !llvm.loop !12

._crit_edge75:                                    ; preds = %.lr.ph74, %middle.block, %.preheader
  %94 = load i32, ptr %4, align 4, !tbaa !3
  %95 = icmp sgt i32 %94, 0
  br i1 %95, label %.lr.ph82, label %._crit_edge83

.lr.ph82:                                         ; preds = %._crit_edge75, %124
  %.080 = phi i32 [ %125, %124 ], [ 1, %._crit_edge75 ]
  %96 = sext i32 %.080 to i64
  %97 = add nsw i64 %96, -1
  %98 = getelementptr [10 x i32], ptr @_QFEp, i64 0, i64 %97
  %99 = load i32, ptr %98, align 4, !tbaa !3
  %100 = load i32, ptr %5, align 4, !tbaa !3
  %101 = call i32 @llvm.smax.i32(i32 %100, i32 0)
  %102 = zext i32 %101 to i64
  %103 = shl nuw nsw i64 %102, 2
  %104 = call ptr @malloc(i64 %103)
  %.not87 = icmp slt i32 %100, 1
  br i1 %.not87, label %._crit_edge78, label %.lr.ph77

.lr.ph77:                                         ; preds = %.lr.ph82, %.lr.ph77
  %105 = phi i64 [ %119, %.lr.ph77 ], [ %102, %.lr.ph82 ]
  %106 = phi i64 [ %107, %.lr.ph77 ], [ 0, %.lr.ph82 ]
  %107 = add nuw nsw i64 %106, 1
  %108 = getelementptr i32, ptr @_QFEswitch, i64 %106
  %109 = load i32, ptr %108, align 4, !tbaa !3
  %110 = mul nuw nsw i64 %106, 10
  %111 = add nsw i64 %110, %97
  %112 = getelementptr i32, ptr @_QFEs, i64 %111
  %113 = load i32, ptr %112, align 4, !tbaa !3
  %114 = icmp ne i32 %109, 0
  %115 = icmp ne i32 %113, 0
  %116 = and i1 %114, %115
  %117 = zext i1 %116 to i32
  %118 = getelementptr i32, ptr %104, i64 %106
  store i32 %117, ptr %118, align 4, !tbaa !3
  %119 = add nsw i64 %105, -1
  %120 = icmp ugt i64 %105, 1
  br i1 %120, label %.lr.ph77, label %._crit_edge78

._crit_edge78:                                    ; preds = %.lr.ph77, %.lr.ph82
  store ptr %104, ptr %2, align 8, !tbaa !7
  store i64 4, ptr %.fca.1.gep21, align 8, !tbaa !7
  store i32 20180515, ptr %.fca.2.gep23, align 8, !tbaa !7
  store i8 1, ptr %.fca.3.gep25, align 4, !tbaa !7
  store i8 14, ptr %.fca.4.gep27, align 1, !tbaa !7
  store i8 0, ptr %.fca.5.gep29, align 2, !tbaa !7
  store i8 0, ptr %.fca.6.gep31, align 1, !tbaa !7
  store i64 1, ptr %.fca.7.0.0.gep33, align 8, !tbaa !7
  store i64 %102, ptr %.fca.7.0.1.gep35, align 8, !tbaa !7
  store i64 4, ptr %.fca.7.0.2.gep37, align 8, !tbaa !7
  %121 = call i64 @_FortranACount(ptr nonnull %2, ptr nonnull @_QQcl.2bb763c363f33c0953cbc174975d87ae, i32 31, i32 0)
  %122 = trunc i64 %121 to i32
  %123 = srem i32 %122, 2
  %.not = icmp eq i32 %99, %123
  call void @free(ptr %104)
  br i1 %.not, label %124, label %.loopexit

124:                                              ; preds = %._crit_edge78
  %125 = add nuw i32 %.080, 1
  %exitcond101.not = icmp eq i32 %.080, %94
  br i1 %exitcond101.not, label %._crit_edge83, label %.lr.ph82

._crit_edge83:                                    ; preds = %124, %._crit_edge75
  %126 = load i32, ptr @_QFEans, align 4, !tbaa !3
  %127 = add i32 %126, 1
  store i32 %127, ptr @_QFEans, align 4, !tbaa !3
  br label %.loopexit

.loopexit:                                        ; preds = %._crit_edge78, %._crit_edge83
  %128 = add nuw i32 %.05885, 1
  %exitcond102.not = icmp eq i32 %128, %common.ret.op.i104
  br i1 %exitcond102.not, label %._crit_edge86, label %.preheader

._crit_edge86:                                    ; preds = %.loopexit, %61, %__mlir_math_ipowi_i32.exit
  %129 = call ptr @_FortranAioBeginExternalListOutput(i32 -1, ptr nonnull @_QQcl.2bb763c363f33c0953cbc174975d87ae, i32 39)
  %130 = load i32, ptr @_QFEans, align 4, !tbaa !3
  %131 = call i1 @_FortranAioOutputInteger32(ptr %129, i32 %130)
  %132 = call i32 @_FortranAioEndIoStatement(ptr %129)
  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 @_FortranAioBeginExternalFormattedInput(ptr, i64, ptr, i32, ptr, i32) local_unnamed_addr

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

declare i1 @_FortranAioInputDescriptor(ptr, ptr) local_unnamed_addr

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

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

declare i1 @_FortranAioOutputInteger32(ptr, i32) local_unnamed_addr

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

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

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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: write) }

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