PROGRAM ATCODER

implicit none
integer(16) :: n,m,i,max=0,l,count=0,h,j,on,check=0
integer(16),allocatable :: k(:),s(:,:),p(:),sw(:)

read*, n,m
allocate(k(m),s(m,10),p(m),sw(n))
s = 0
do i = 1, m, 1
  read*, k(i),s(i,1:k(i))
end do
read*, p(1:m)

do i = 1, n
  max = max + 2**(i-1)
end do

do i = 0, max, 1
  check = 0
  l = i
  sw = 0
  do j = 1, n, 1
    sw(j) = mod(l,2)
    l = l/2
  end do
  do j = 1, m, 1
    on = 0
    do h = 1, k(j), 1
      if ( sw(s(j,h)) == 1 ) then
        on = on + 1
      end if
    end do
    if ( mod(on,2) /= p(j) ) then
      check = 1
      exit
    end if
  end do
  if ( check == 0 ) then
    count = count + 1
  end if
end do

print'(i0)', count

END PROGRAM ATCODER
; 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"

@_QFEcheck = internal unnamed_addr global i1 false
@_QFEcount = internal unnamed_addr global i128 0
@_QFEk.0 = internal unnamed_addr global ptr null
@_QFEmax = internal unnamed_addr global i128 0
@_QFEp.0 = internal unnamed_addr global ptr null
@_QFEs.0 = internal unnamed_addr global ptr null
@_QFEs.7 = internal unnamed_addr global i64 1
@_QFEs.8 = internal unnamed_addr global i64 0
@_QFEsw.0 = internal unnamed_addr global ptr null
@_QFEsw.7 = internal unnamed_addr global i64 1
@_QFEsw.8 = internal unnamed_addr global i64 0
@_QQcl.18dcdd120fa0535e36090532b6378ef9 = linkonce constant [73 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_4181/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.28693029 = linkonce constant [4 x i8] c"(i0)"
@_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 { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, align 8
  %3 = alloca i128, align 8
  %4 = alloca i128, align 8
  %5 = tail call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.18dcdd120fa0535e36090532b6378ef9, i32 7)
  %6 = call i1 @_FortranAioInputInteger(ptr %5, ptr nonnull %4, i32 16)
  %7 = call i1 @_FortranAioInputInteger(ptr %5, ptr nonnull %3, i32 16)
  %8 = call i32 @_FortranAioEndIoStatement(ptr %5)
  %9 = load i128, ptr %3, align 8, !tbaa !3
  %10 = trunc i128 %9 to i64
  %11 = call i64 @llvm.smax.i64(i64 %10, i64 0)
  %12 = shl i64 %11, 4
  %13 = call ptr @malloc(i64 %12)
  store ptr %13, ptr @_QFEk.0, align 8, !tbaa !7
  %14 = mul i64 %11, 160
  %15 = call ptr @malloc(i64 %14)
  store ptr %15, ptr @_QFEs.0, align 8, !tbaa !7
  store i64 1, ptr @_QFEs.7, align 8, !tbaa !7
  store i64 %11, ptr @_QFEs.8, align 8, !tbaa !7
  %16 = call ptr @malloc(i64 %12)
  store ptr %16, ptr @_QFEp.0, align 8, !tbaa !7
  %17 = load i128, ptr %4, align 8, !tbaa !3
  %18 = trunc i128 %17 to i64
  %19 = call i64 @llvm.smax.i64(i64 %18, i64 0)
  %20 = shl i64 %19, 4
  %21 = call ptr @malloc(i64 %20)
  store ptr %21, ptr @_QFEsw.0, align 8, !tbaa !7
  store i64 1, ptr @_QFEsw.7, align 8, !tbaa !7
  store i64 %19, ptr @_QFEsw.8, align 8, !tbaa !7
  %.not = icmp eq ptr %15, null
  br i1 %.not, label %.split.us, label %.preheader939

.preheader939:                                    ; preds = %0
  %.not962 = icmp slt i64 %10, 1
  br i1 %.not962, label %._crit_edge, label %.split.us.thread

.split.us.thread:                                 ; preds = %.preheader939
  call void @llvm.memset.p0.i64(ptr nonnull align 8 %15, i8 0, i64 %14, i1 false), !tbaa !3
  br label %.lr.ph

.split.us:                                        ; preds = %0
  %22 = call {} @_FortranAReportFatalUserError(ptr nonnull @_QQcl.16373402fa3425c6e46827601abb88fa, ptr nonnull @_QQcl.18dcdd120fa0535e36090532b6378ef9, i32 9)
  %.pre.pre = load i128, ptr %3, align 8, !tbaa !3
  %.pre980 = trunc i128 %.pre.pre to i64
  %.unpack914.unpack.unpack.pre = load i64, ptr @_QFEs.7, align 8, !tbaa !7
  %23 = icmp slt i64 %10, 1
  %24 = select i1 %23, i64 1, i64 %.unpack914.unpack.unpack.pre
  store ptr %15, ptr @_QFEs.0, align 8, !tbaa !7
  store i64 %24, ptr @_QFEs.7, align 8, !tbaa !7
  store i64 %11, ptr @_QFEs.8, align 8, !tbaa !7
  %25 = icmp sgt i64 %.pre980, 0
  br i1 %25, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %.split.us.thread, %.split.us
  %.pre-phi982 = phi i64 [ %10, %.split.us.thread ], [ %.pre980, %.split.us ]
  %.fca.1.gep578 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %1, i64 0, i32 1
  %.fca.2.gep580 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %1, i64 0, i32 2
  %.fca.3.gep582 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %1, i64 0, i32 3
  %.fca.4.gep584 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %1, i64 0, i32 4
  %.fca.5.gep586 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %1, i64 0, i32 5
  %.fca.6.gep588 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %1, i64 0, i32 6
  %.fca.7.0.0.gep590 = 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.gep592 = 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.gep594 = 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 %26

26:                                               ; preds = %.lr.ph, %26
  %27 = phi i64 [ 1, %.lr.ph ], [ %42, %26 ]
  %28 = call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.18dcdd120fa0535e36090532b6378ef9, i32 11)
  %.unpack867 = load ptr, ptr @_QFEk.0, align 8, !tbaa !7
  %29 = add i64 %27, -1
  %30 = getelementptr i128, ptr %.unpack867, i64 %29
  %31 = call i1 @_FortranAioInputInteger(ptr %28, ptr %30, i32 16)
  %.unpack879 = load ptr, ptr @_QFEs.0, align 8, !tbaa !7
  %.unpack886.unpack.unpack = load i64, ptr @_QFEs.7, align 8, !tbaa !7
  %.unpack886.unpack.unpack889 = load i64, ptr @_QFEs.8, align 8, !tbaa !7
  %.unpack895 = load ptr, ptr @_QFEk.0, align 8, !tbaa !7
  %32 = add i64 %27, -1
  %33 = getelementptr i128, ptr %.unpack895, i64 %32
  %34 = load i128, ptr %33, align 8, !tbaa !3
  %35 = trunc i128 %34 to i64
  %36 = sub i64 %27, %.unpack886.unpack.unpack
  %37 = shl i64 %.unpack886.unpack.unpack889, 4
  %38 = call i64 @llvm.smax.i64(i64 %35, i64 0)
  %39 = getelementptr i128, ptr %.unpack879, i64 %36
  store ptr %39, ptr %1, align 8, !tbaa !7
  store i64 16, ptr %.fca.1.gep578, align 8, !tbaa !7
  store i32 20180515, ptr %.fca.2.gep580, align 8, !tbaa !7
  store i8 1, ptr %.fca.3.gep582, align 4, !tbaa !7
  store i8 11, ptr %.fca.4.gep584, align 1, !tbaa !7
  store i8 0, ptr %.fca.5.gep586, align 2, !tbaa !7
  store i8 0, ptr %.fca.6.gep588, align 1, !tbaa !7
  store i64 1, ptr %.fca.7.0.0.gep590, align 8, !tbaa !7
  store i64 %38, ptr %.fca.7.0.1.gep592, align 8, !tbaa !7
  store i64 %37, ptr %.fca.7.0.2.gep594, align 8, !tbaa !7
  %40 = call i1 @_FortranAioInputDescriptor(ptr %28, ptr nonnull %1)
  %41 = call i32 @_FortranAioEndIoStatement(ptr %28)
  %42 = add nuw i64 %27, 1
  %exitcond.not = icmp eq i64 %27, %.pre-phi982
  br i1 %exitcond.not, label %._crit_edge, label %26

._crit_edge:                                      ; preds = %26, %.preheader939, %.split.us
  %43 = call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.18dcdd120fa0535e36090532b6378ef9, i32 13)
  %.unpack756 = load ptr, ptr @_QFEp.0, align 8, !tbaa !7
  %44 = load i128, ptr %3, align 8, !tbaa !3
  %45 = trunc i128 %44 to i64
  %46 = call i64 @llvm.smax.i64(i64 %45, i64 0)
  store ptr %.unpack756, ptr %2, align 8, !tbaa !7
  %.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 16, 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 %2, 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 %2, 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 %2, i64 0, i32 4
  store i8 11, 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 %2, 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 %2, 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 %2, 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 %2, i64 0, i32 7, i64 0, i64 1
  store i64 %46, 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 %2, i64 0, i32 7, i64 0, i64 2
  store i64 16, ptr %.fca.7.0.2.gep, align 8, !tbaa !7
  %47 = call i1 @_FortranAioInputDescriptor(ptr %43, ptr nonnull %2)
  %48 = call i32 @_FortranAioEndIoStatement(ptr %43)
  %49 = load i128, ptr %4, align 8, !tbaa !3
  %50 = trunc i128 %49 to i64
  %_QFEmax.promoted = load i128, ptr @_QFEmax, align 8, !tbaa !3
  %51 = icmp sgt i64 %50, 0
  br i1 %51, label %.lr.ph941, label %74

.lr.ph941:                                        ; preds = %._crit_edge, %__mlir_math_ipowi_i8.exit
  %52 = phi i64 [ %72, %__mlir_math_ipowi_i8.exit ], [ %50, %._crit_edge ]
  %53 = phi i8 [ %71, %__mlir_math_ipowi_i8.exit ], [ 1, %._crit_edge ]
  %54 = phi i128 [ %70, %__mlir_math_ipowi_i8.exit ], [ %_QFEmax.promoted, %._crit_edge ]
  %55 = add i8 %53, -1
  %56 = icmp eq i8 %55, 0
  br i1 %56, label %__mlir_math_ipowi_i8.exit, label %57

57:                                               ; preds = %.lr.ph941
  %58 = icmp slt i8 %55, 1
  br i1 %58, label %__mlir_math_ipowi_i8.exit, label %.preheader.i

.preheader.i:                                     ; preds = %57
  %59 = and i8 %55, 1
  %.not3.i = icmp eq i8 %59, 0
  %60 = select i1 %.not3.i, i8 1, i8 2
  %61 = icmp eq i8 %55, 1
  br i1 %61, label %__mlir_math_ipowi_i8.exit, label %.lr.ph.i

.lr.ph.i:                                         ; preds = %.preheader.i, %.lr.ph.i
  %spec.select4.i = phi i8 [ %spec.select.i, %.lr.ph.i ], [ %60, %.preheader.i ]
  %62 = phi i8 [ %64, %.lr.ph.i ], [ %55, %.preheader.i ]
  %63 = phi i8 [ %65, %.lr.ph.i ], [ 2, %.preheader.i ]
  %64 = lshr i8 %62, 1
  %65 = mul i8 %63, %63
  %66 = and i8 %62, 2
  %.not.i = icmp eq i8 %66, 0
  %67 = select i1 %.not.i, i8 1, i8 %65
  %spec.select.i = mul i8 %67, %spec.select4.i
  %68 = icmp ult i8 %62, 4
  br i1 %68, label %__mlir_math_ipowi_i8.exit, label %.lr.ph.i

__mlir_math_ipowi_i8.exit:                        ; preds = %.lr.ph.i, %57, %.lr.ph941, %.preheader.i
  %common.ret.op.i = phi i8 [ 1, %.lr.ph941 ], [ %60, %.preheader.i ], [ 0, %57 ], [ %spec.select.i, %.lr.ph.i ]
  %69 = sext i8 %common.ret.op.i to i128
  %70 = add i128 %54, %69
  %71 = add i8 %53, 1
  %72 = add nsw i64 %52, -1
  %73 = icmp sgt i64 %52, 1
  br i1 %73, label %.lr.ph941, label %._crit_edge942

._crit_edge942:                                   ; preds = %__mlir_math_ipowi_i8.exit
  store i128 %70, ptr @_QFEmax, align 8, !tbaa !3
  br label %74

74:                                               ; preds = %._crit_edge942, %._crit_edge
  %75 = phi i128 [ %70, %._crit_edge942 ], [ %_QFEmax.promoted, %._crit_edge ]
  %76 = icmp ult i128 %75, 170141183460469231731687303715884105727
  br i1 %76, label %.lr.ph960.preheader, label %._crit_edge961

.lr.ph960.preheader:                              ; preds = %74
  %77 = add nuw nsw i128 %75, 1
  %.unpack768.pre = load ptr, ptr @_QFEsw.0, align 8, !tbaa !7
  %.unpack775.unpack.unpack777.pre = load i64, ptr @_QFEsw.8, align 8, !tbaa !7
  %78 = icmp sgt i64 %.unpack775.unpack.unpack777.pre, 0
  %79 = shl nuw i64 %.unpack775.unpack.unpack777.pre, 4
  %80 = icmp eq i64 %.unpack775.unpack.unpack777.pre, 0
  br label %.lr.ph960

.lr.ph960:                                        ; preds = %.lr.ph960.preheader, %150
  %.unpack834974 = phi ptr [ %.unpack834975, %150 ], [ %.unpack768.pre, %.lr.ph960.preheader ]
  %.unpack768 = phi ptr [ %.unpack768967, %150 ], [ %.unpack768.pre, %.lr.ph960.preheader ]
  %.0693958 = phi i128 [ %152, %150 ], [ 0, %.lr.ph960.preheader ]
  %.0694957 = phi i128 [ %151, %150 ], [ %77, %.lr.ph960.preheader ]
  store i1 false, ptr @_QFEcheck, align 1
  %.not780 = icmp eq ptr %.unpack768, null
  br i1 %.not780, label %81, label %.preheader

.preheader:                                       ; preds = %.lr.ph960
  br i1 %78, label %.lr.ph943.preheader, label %.loopexit

.lr.ph943.preheader:                              ; preds = %.preheader
  call void @llvm.memset.p0.i64(ptr nonnull align 8 %.unpack768, i8 0, i64 %79, i1 false), !tbaa !3
  br label %.loopexit

81:                                               ; preds = %.lr.ph960
  %82 = call {} @_FortranAReportFatalUserError(ptr nonnull @_QQcl.16373402fa3425c6e46827601abb88fa, ptr nonnull @_QQcl.18dcdd120fa0535e36090532b6378ef9, i32 22)
  %.unpack853.unpack.unpack = load i64, ptr @_QFEsw.7, align 8, !tbaa !7
  %83 = select i1 %80, i64 1, i64 %.unpack853.unpack.unpack
  store ptr null, ptr @_QFEsw.0, align 8, !tbaa !7
  store i64 %83, ptr @_QFEsw.7, align 8, !tbaa !7
  store i64 %.unpack775.unpack.unpack777.pre, ptr @_QFEsw.8, align 8, !tbaa !7
  br label %.loopexit

.loopexit:                                        ; preds = %.lr.ph943.preheader, %.preheader, %81
  %.unpack834 = phi ptr [ %.unpack834974, %.lr.ph943.preheader ], [ %.unpack834974, %.preheader ], [ null, %81 ]
  %84 = load i128, ptr %4, align 8, !tbaa !3
  %85 = trunc i128 %84 to i64
  %86 = icmp sgt i64 %85, 0
  br i1 %86, label %.lr.ph946, label %._crit_edge947

.lr.ph946:                                        ; preds = %.loopexit
  %.unpack841.unpack.unpack = load i64, ptr @_QFEsw.7, align 8, !tbaa !7
  br label %87

87:                                               ; preds = %.lr.ph946, %87
  %88 = phi i64 [ 1, %.lr.ph946 ], [ %93, %87 ]
  %.0691944 = phi i128 [ %.0693958, %.lr.ph946 ], [ %89, %87 ]
  %.0691944.frozen = freeze i128 %.0691944
  %89 = sdiv i128 %.0691944.frozen, 2
  %90 = mul i128 %89, 2
  %.decomposed = sub i128 %.0691944.frozen, %90
  %91 = sub i64 %88, %.unpack841.unpack.unpack
  %92 = getelementptr i128, ptr %.unpack834, i64 %91
  store i128 %.decomposed, ptr %92, align 8, !tbaa !3
  %93 = add nuw i64 %88, 1
  %exitcond964.not = icmp eq i64 %88, %85
  br i1 %exitcond964.not, label %._crit_edge947, label %87

._crit_edge947:                                   ; preds = %87, %.loopexit
  %.unpack768969 = phi ptr [ %.unpack768, %.loopexit ], [ %.unpack834, %87 ]
  %94 = load i128, ptr %3, align 8, !tbaa !3
  %95 = icmp sgt i128 %94, 0
  br i1 %95, label %.lr.ph955, label %._crit_edge956

.lr.ph955:                                        ; preds = %._crit_edge947
  %.unpack781 = load ptr, ptr @_QFEk.0, align 8, !tbaa !7
  %.unpack806 = load ptr, ptr @_QFEsw.0, align 8
  %.unpack813.unpack.unpack = load i64, ptr @_QFEsw.7, align 8
  %.unpack818 = load ptr, ptr @_QFEs.0, align 8
  %.unpack825.unpack.unpack = load i64, ptr @_QFEs.7, align 8
  %.unpack825.unpack.unpack828 = load i64, ptr @_QFEs.8, align 8
  %.unpack793 = load ptr, ptr @_QFEp.0, align 8, !tbaa !7
  br label %96

96:                                               ; preds = %.lr.ph955, %143
  %.0692953 = phi i64 [ 1, %.lr.ph955 ], [ %145, %143 ]
  %.0695952 = phi i128 [ %94, %.lr.ph955 ], [ %144, %143 ]
  %97 = add i64 %.0692953, -1
  %98 = getelementptr i128, ptr %.unpack781, i64 %97
  %99 = load i128, ptr %98, align 8, !tbaa !3
  %100 = trunc i128 %99 to i64
  %101 = icmp sgt i64 %100, 0
  br i1 %101, label %.lr.ph950, label %._crit_edge951

.lr.ph950:                                        ; preds = %96
  %102 = sub i64 %.0692953, %.unpack825.unpack.unpack
  %xtraiter = and i64 %100, 1
  %103 = icmp eq i64 %100, 1
  br i1 %103, label %._crit_edge951.loopexit.unr-lcssa, label %.lr.ph950.new

.lr.ph950.new:                                    ; preds = %.lr.ph950
  %unroll_iter = and i64 %100, -2
  br label %104

104:                                              ; preds = %104, %.lr.ph950.new
  %105 = phi i64 [ 1, %.lr.ph950.new ], [ %127, %104 ]
  %.0948 = phi i128 [ 0, %.lr.ph950.new ], [ %spec.select.1, %104 ]
  %niter = phi i64 [ 0, %.lr.ph950.new ], [ %niter.next.1, %104 ]
  %106 = add nsw i64 %105, -1
  %107 = mul i64 %106, %.unpack825.unpack.unpack828
  %108 = add i64 %102, %107
  %109 = getelementptr i128, ptr %.unpack818, i64 %108
  %110 = load i128, ptr %109, align 8, !tbaa !3
  %111 = trunc i128 %110 to i64
  %112 = sub i64 %111, %.unpack813.unpack.unpack
  %113 = getelementptr i128, ptr %.unpack806, i64 %112
  %114 = load i128, ptr %113, align 8, !tbaa !3
  %115 = icmp eq i128 %114, 1
  %116 = zext i1 %115 to i128
  %spec.select = add i128 %.0948, %116
  %117 = mul i64 %105, %.unpack825.unpack.unpack828
  %118 = add i64 %102, %117
  %119 = getelementptr i128, ptr %.unpack818, i64 %118
  %120 = load i128, ptr %119, align 8, !tbaa !3
  %121 = trunc i128 %120 to i64
  %122 = sub i64 %121, %.unpack813.unpack.unpack
  %123 = getelementptr i128, ptr %.unpack806, i64 %122
  %124 = load i128, ptr %123, align 8, !tbaa !3
  %125 = icmp eq i128 %124, 1
  %126 = zext i1 %125 to i128
  %spec.select.1 = add i128 %spec.select, %126
  %127 = add nuw i64 %105, 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_edge951.loopexit.unr-lcssa, label %104

._crit_edge951.loopexit.unr-lcssa:                ; preds = %104, %.lr.ph950
  %spec.select.lcssa.ph = phi i128 [ undef, %.lr.ph950 ], [ %spec.select.1, %104 ]
  %.unr = phi i64 [ 1, %.lr.ph950 ], [ %127, %104 ]
  %.0948.unr = phi i128 [ 0, %.lr.ph950 ], [ %spec.select.1, %104 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge951, label %._crit_edge951.loopexit.epilog-lcssa

._crit_edge951.loopexit.epilog-lcssa:             ; preds = %._crit_edge951.loopexit.unr-lcssa
  %128 = add i64 %.unr, -1
  %129 = mul i64 %128, %.unpack825.unpack.unpack828
  %130 = add i64 %102, %129
  %131 = getelementptr i128, ptr %.unpack818, i64 %130
  %132 = load i128, ptr %131, align 8, !tbaa !3
  %133 = trunc i128 %132 to i64
  %134 = sub i64 %133, %.unpack813.unpack.unpack
  %135 = getelementptr i128, ptr %.unpack806, i64 %134
  %136 = load i128, ptr %135, align 8, !tbaa !3
  %137 = icmp eq i128 %136, 1
  %138 = zext i1 %137 to i128
  %spec.select.epil = add i128 %.0948.unr, %138
  br label %._crit_edge951

._crit_edge951:                                   ; preds = %._crit_edge951.loopexit.epilog-lcssa, %._crit_edge951.loopexit.unr-lcssa, %96
  %.0.lcssa = phi i128 [ 0, %96 ], [ %spec.select.lcssa.ph, %._crit_edge951.loopexit.unr-lcssa ], [ %spec.select.epil, %._crit_edge951.loopexit.epilog-lcssa ]
  %139 = srem i128 %.0.lcssa, 2
  %140 = add i64 %.0692953, -1
  %141 = getelementptr i128, ptr %.unpack793, i64 %140
  %142 = load i128, ptr %141, align 8, !tbaa !3
  %.not805 = icmp eq i128 %139, %142
  br i1 %.not805, label %143, label %.thread936

.thread936:                                       ; preds = %._crit_edge951
  store i1 true, ptr @_QFEcheck, align 1
  br label %150

143:                                              ; preds = %._crit_edge951
  %144 = add nsw i128 %.0695952, -1
  %145 = add i64 %.0692953, 1
  %146 = icmp sgt i128 %.0695952, 1
  br i1 %146, label %96, label %._crit_edge956

._crit_edge956:                                   ; preds = %143, %._crit_edge947
  %.unpack834976 = phi ptr [ %.unpack834, %._crit_edge947 ], [ %.unpack806, %143 ]
  %.unpack768968 = phi ptr [ %.unpack768969, %._crit_edge947 ], [ %.unpack806, %143 ]
  %.b.pr = load i1, ptr @_QFEcheck, align 1
  br i1 %.b.pr, label %150, label %147

147:                                              ; preds = %._crit_edge956
  %148 = load i128, ptr @_QFEcount, align 8, !tbaa !3
  %149 = add i128 %148, 1
  store i128 %149, ptr @_QFEcount, align 8, !tbaa !3
  br label %150

150:                                              ; preds = %.thread936, %147, %._crit_edge956
  %.unpack834975 = phi ptr [ %.unpack806, %.thread936 ], [ %.unpack834976, %147 ], [ %.unpack834976, %._crit_edge956 ]
  %.unpack768967 = phi ptr [ %.unpack806, %.thread936 ], [ %.unpack768968, %147 ], [ %.unpack768968, %._crit_edge956 ]
  %151 = add i128 %.0694957, -1
  %152 = add nuw i128 %.0693958, 1
  %153 = icmp sgt i128 %151, 0
  br i1 %153, label %.lr.ph960, label %._crit_edge961

._crit_edge961:                                   ; preds = %150, %74
  %154 = call ptr @_FortranAioBeginExternalFormattedOutput(ptr nonnull @_QQcl.28693029, i64 4, ptr null, i32 -1, ptr nonnull @_QQcl.18dcdd120fa0535e36090532b6378ef9, i32 44)
  %155 = load i128, ptr @_QFEcount, align 8, !tbaa !3
  %156 = call i1 @_FortranAioOutputInteger128(ptr %154, i128 %155)
  %157 = call i32 @_FortranAioEndIoStatement(ptr %154)
  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 i1 @_FortranAioInputDescriptor(ptr, ptr) local_unnamed_addr

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

declare i1 @_FortranAioOutputInteger128(ptr, i128) local_unnamed_addr

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

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

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) }
attributes #2 = { 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}
