program i_hate_matrix_construction
  implicit none
  integer, parameter :: intkind = 16
  integer :: n, i, j, k
  integer, dimension(500) :: s = 0, t = 0, p = 0, q = 0, x = 0, y = 0
  integer(intkind), dimension(500) :: u = 0, v = 0
  integer(intkind), dimension(500, 500) :: a = 0
  read(*,*) n
  read(*,*) s(1:n)
  read(*,*) t(1:n)
  read(*,*) u(1:n)
  read(*,*) v(1:n)
  do k = 0, 64
    do i = 1, n
      p(i) = pattern(s(i), btest(u(i), k))
      q(i) = pattern(t(i), btest(v(i), k))
    end do
    x(1:n) = 0
    y(1:n) = 0
    do i = 1, n
      do j = 1, n
        if (p(i) + q(j) == 1) call halt()
        if (p(i) == 1 .or. q(j) == 1 .or. p(i) + q(j) == 6) then
          a(i, j) = ibset(a(i, j), k)
          x(i) = x(i) + 1
          y(j) = y(j) + 1
        end if
      end do
    end do
    j = 1
    do i = 1, n
      if (p(i) == 2 .and. x(i) == n) call halt()
      if (.not.(p(i) == 3 .and. x(i) == 0)) cycle
      do while (j <= n .and. .not.(q(j) == 2 .and. y(j) < n - 1))
        j = j + 1
      end do
      if (j > n) call halt()
      a(i, j) = ibset(a(i, j), k)
      x(i) = x(i) + 1
      y(j) = y(j) + 1
    end do
    i = 1
    do j = 1, n
      if (q(j) == 2 .and. y(j) == n) call halt()
      if (.not.(q(j) == 3 .and. y(j) == 0)) cycle
      do while (i <= n .and. .not.(p(i) == 2 .and. x(i) < n - 1))
        i = i + 1
      end do
      if (i > n) call halt()
      a(i, j) = ibset(a(i, j), k)
      x(i) = x(i) + 1
      y(j) = y(j) + 1
    end do
  end do
  do i = 1, n
    write(*,'(i0)',advance='no') a(i, 1)
    do j = 2, n
      write(*,'(x,i0)',advance='no') a(i, j)
    end do
    write(*,*)
  end do
contains
  integer function pattern(s, b) result(res)
    integer, intent(in) :: s
    logical, intent(in) :: b
    ! 0: all 0
    ! 1: all 1
    ! 2: any 0
    ! 3: any 1
    res = mod(2 * s + merge(0, 1, b) + 1, 4)
  end
  subroutine halt()
    write(*,'(i0)') -1
    stop
  end
end program i_hate_matrix_construction
; 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 = internal unnamed_addr global [500 x [500 x i128]] zeroinitializer
@_QFEp = internal unnamed_addr global [500 x i32] zeroinitializer
@_QFEq = internal unnamed_addr global [500 x i32] zeroinitializer
@_QFEs = internal global [500 x i32] zeroinitializer
@_QFEt = internal global [500 x i32] zeroinitializer
@_QFEu = internal global [500 x i128] zeroinitializer
@_QFEv = internal global [500 x i128] zeroinitializer
@_QFEx = internal unnamed_addr global [500 x i32] zeroinitializer
@_QFEy = internal unnamed_addr global [500 x i32] zeroinitializer
@_QQcl.abb76118022b1b1092e47b2e2f89f134 = linkonce constant [73 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_1654/source.f\00"
@_QQcl.28693029 = linkonce constant [4 x i8] c"(i0)"
@_QQcl.6E6F = linkonce constant [2 x i8] c"no"
@_QQcl.28782C693029 = linkonce constant [6 x i8] c"(x,i0)"
@_QQEnvironmentDefaults = local_unnamed_addr constant ptr null

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 { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, align 8
  %5 = alloca i32, align 4
  %6 = tail call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.abb76118022b1b1092e47b2e2f89f134, i32 8)
  %7 = call i1 @_FortranAioInputInteger(ptr %6, ptr nonnull %5, i32 4)
  %8 = call i32 @_FortranAioEndIoStatement(ptr %6)
  %9 = call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.abb76118022b1b1092e47b2e2f89f134, i32 9)
  %10 = load i32, ptr %5, align 4, !tbaa !3
  %11 = call i32 @llvm.smax.i32(i32 %10, i32 0)
  %12 = zext i32 %11 to i64
  store ptr @_QFEs, ptr %4, align 8, !tbaa !7
  %.fca.1.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %4, 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 %4, 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 %4, 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 %4, 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 %4, 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 %4, 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 %4, 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 %4, i64 0, i32 7, i64 0, i64 1
  store i64 %12, 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 %4, i64 0, i32 7, i64 0, i64 2
  store i64 4, ptr %.fca.7.0.2.gep, align 8, !tbaa !7
  %13 = call i1 @_FortranAioInputDescriptor(ptr %9, ptr nonnull %4)
  %14 = call i32 @_FortranAioEndIoStatement(ptr %9)
  %15 = call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.abb76118022b1b1092e47b2e2f89f134, i32 10)
  %16 = load i32, ptr %5, align 4, !tbaa !3
  %17 = call i32 @llvm.smax.i32(i32 %16, i32 0)
  %18 = zext i32 %17 to i64
  store ptr @_QFEt, ptr %3, align 8, !tbaa !7
  %.fca.1.gep55 = 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.gep55, align 8, !tbaa !7
  %.fca.2.gep57 = 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.gep57, align 8, !tbaa !7
  %.fca.3.gep59 = 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.gep59, align 4, !tbaa !7
  %.fca.4.gep61 = 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.gep61, align 1, !tbaa !7
  %.fca.5.gep63 = 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.gep63, align 2, !tbaa !7
  %.fca.6.gep65 = 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.gep65, align 1, !tbaa !7
  %.fca.7.0.0.gep67 = 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.gep67, align 8, !tbaa !7
  %.fca.7.0.1.gep69 = 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 %18, ptr %.fca.7.0.1.gep69, align 8, !tbaa !7
  %.fca.7.0.2.gep71 = 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.gep71, align 8, !tbaa !7
  %19 = call i1 @_FortranAioInputDescriptor(ptr %15, ptr nonnull %3)
  %20 = call i32 @_FortranAioEndIoStatement(ptr %15)
  %21 = call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.abb76118022b1b1092e47b2e2f89f134, i32 11)
  %22 = load i32, ptr %5, align 4, !tbaa !3
  %23 = call i32 @llvm.smax.i32(i32 %22, i32 0)
  %24 = zext i32 %23 to i64
  store ptr @_QFEu, ptr %2, align 8, !tbaa !7
  %.fca.1.gep75 = 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.gep75, align 8, !tbaa !7
  %.fca.2.gep77 = 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.gep77, align 8, !tbaa !7
  %.fca.3.gep79 = 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.gep79, align 4, !tbaa !7
  %.fca.4.gep81 = 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.gep81, align 1, !tbaa !7
  %.fca.5.gep83 = 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.gep83, align 2, !tbaa !7
  %.fca.6.gep85 = 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.gep85, align 1, !tbaa !7
  %.fca.7.0.0.gep87 = 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.gep87, align 8, !tbaa !7
  %.fca.7.0.1.gep89 = 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 %24, ptr %.fca.7.0.1.gep89, align 8, !tbaa !7
  %.fca.7.0.2.gep91 = 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.gep91, align 8, !tbaa !7
  %25 = call i1 @_FortranAioInputDescriptor(ptr %21, ptr nonnull %2)
  %26 = call i32 @_FortranAioEndIoStatement(ptr %21)
  %27 = call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.abb76118022b1b1092e47b2e2f89f134, i32 12)
  %28 = load i32, ptr %5, align 4, !tbaa !3
  %29 = call i32 @llvm.smax.i32(i32 %28, i32 0)
  %30 = zext i32 %29 to i64
  store ptr @_QFEv, ptr %1, align 8, !tbaa !7
  %.fca.1.gep95 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %1, i64 0, i32 1
  store i64 16, ptr %.fca.1.gep95, align 8, !tbaa !7
  %.fca.2.gep97 = 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.gep97, align 8, !tbaa !7
  %.fca.3.gep99 = 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.gep99, align 4, !tbaa !7
  %.fca.4.gep101 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %1, i64 0, i32 4
  store i8 11, ptr %.fca.4.gep101, align 1, !tbaa !7
  %.fca.5.gep103 = 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.gep103, align 2, !tbaa !7
  %.fca.6.gep105 = 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.gep105, align 1, !tbaa !7
  %.fca.7.0.0.gep107 = 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.gep107, align 8, !tbaa !7
  %.fca.7.0.1.gep109 = 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 %30, ptr %.fca.7.0.1.gep109, align 8, !tbaa !7
  %.fca.7.0.2.gep111 = 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 16, ptr %.fca.7.0.2.gep111, align 8, !tbaa !7
  %31 = call i1 @_FortranAioInputDescriptor(ptr %27, ptr nonnull %1)
  %32 = call i32 @_FortranAioEndIoStatement(ptr %27)
  %33 = load i32, ptr %5, align 4, !tbaa !3
  %34 = sext i32 %33 to i64
  %35 = icmp sgt i32 %33, 0
  %36 = call i32 @llvm.smax.i32(i32 %33, i32 0)
  %37 = zext i32 %36 to i64
  %.not = icmp slt i32 %33, 1
  %38 = add i32 %33, -1
  %39 = call i64 @llvm.smax.i64(i64 %37, i64 1)
  %40 = shl nuw nsw i64 %39, 2
  br label %.backedge

.backedge:                                        ; preds = %.backedge.backedge, %0
  %.0165 = phi i32 [ 0, %0 ], [ %.0165.be, %.backedge.backedge ]
  br i1 %35, label %.lr.ph, label %._crit_edge163

.lr.ph:                                           ; preds = %.backedge
  %41 = zext i32 %.0165 to i128
  %42 = shl nuw i128 1, %41
  br label %43

43:                                               ; preds = %.lr.ph, %43
  %indvars.iv = phi i64 [ 1, %.lr.ph ], [ %indvars.iv.next, %43 ]
  %44 = add nsw i64 %indvars.iv, -1
  %45 = getelementptr [500 x i32], ptr @_QFEs, i64 0, i64 %44
  %46 = getelementptr [500 x i128], ptr @_QFEu, i64 0, i64 %44
  %47 = load i128, ptr %46, align 16, !tbaa !3
  %48 = load i32, ptr %45, align 4, !tbaa !3
  %49 = shl i32 %48, 1
  %50 = and i128 %47, %42
  %.not.i = icmp eq i128 %50, 0
  %51 = zext i1 %.not.i to i32
  %52 = or i32 %49, 1
  %53 = add i32 %52, %51
  %54 = srem i32 %53, 4
  %55 = getelementptr [500 x i32], ptr @_QFEp, i64 0, i64 %44
  store i32 %54, ptr %55, align 4, !tbaa !3
  %56 = getelementptr [500 x i32], ptr @_QFEt, i64 0, i64 %44
  %57 = getelementptr [500 x i128], ptr @_QFEv, i64 0, i64 %44
  %58 = load i128, ptr %57, align 16, !tbaa !3
  %59 = load i32, ptr %56, align 4, !tbaa !3
  %60 = shl i32 %59, 1
  %61 = and i128 %58, %42
  %.not.i131 = icmp eq i128 %61, 0
  %62 = zext i1 %.not.i131 to i32
  %63 = or i32 %60, 1
  %64 = add i32 %63, %62
  %65 = srem i32 %64, 4
  %66 = getelementptr [500 x i32], ptr @_QFEq, i64 0, i64 %44
  store i32 %65, ptr %66, align 4, !tbaa !3
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv, %34
  br i1 %exitcond.not, label %._crit_edge, label %43

._crit_edge:                                      ; preds = %43
  br i1 %.not, label %._crit_edge163, label %.preheader138.lr.ph

.preheader138.lr.ph:                              ; preds = %._crit_edge
  call void @llvm.memset.p0.i64(ptr nonnull align 16 @_QFEx, i8 0, i64 %40, i1 false), !tbaa !3
  call void @llvm.memset.p0.i64(ptr nonnull align 16 @_QFEy, i8 0, i64 %40, i1 false), !tbaa !3
  %67 = zext i32 %.0165 to i128
  %68 = shl nuw i128 1, %67
  br label %.preheader138.us

.preheader138.us:                                 ; preds = %._crit_edge152.us, %.preheader138.lr.ph
  %indvars.iv182 = phi i64 [ %indvars.iv.next183, %._crit_edge152.us ], [ 1, %.preheader138.lr.ph ]
  %69 = add nsw i64 %indvars.iv182, -1
  %70 = getelementptr [500 x i32], ptr @_QFEp, i64 0, i64 %69
  %71 = load i32, ptr %70, align 4, !tbaa !3
  %.fr = freeze i32 %71
  %72 = icmp eq i32 %.fr, 1
  %73 = getelementptr [500 x i32], ptr @_QFEx, i64 0, i64 %69
  br i1 %72, label %.lr.ph151.split.us.us, label %.lr.ph151.split.us154

.lr.ph151.split.us154:                            ; preds = %.preheader138.us, %95
  %74 = phi i64 [ %97, %95 ], [ %34, %.preheader138.us ]
  %75 = phi i32 [ %96, %95 ], [ 1, %.preheader138.us ]
  %76 = sext i32 %75 to i64
  %77 = add nsw i64 %76, -1
  %78 = getelementptr [500 x i32], ptr @_QFEq, i64 0, i64 %77
  %79 = load i32, ptr %78, align 4, !tbaa !3
  %80 = add i32 %79, %.fr
  %81 = icmp eq i32 %80, 1
  br i1 %81, label %.split.us, label %82

82:                                               ; preds = %.lr.ph151.split.us154
  %83 = icmp eq i32 %79, 1
  %84 = icmp eq i32 %80, 6
  %85 = or i1 %83, %84
  br i1 %85, label %86, label %95

86:                                               ; preds = %82
  %87 = getelementptr [500 x [500 x i128]], ptr @_QFEa, i64 0, i64 %77, i64 %69
  %88 = load i128, ptr %87, align 16, !tbaa !3
  %89 = or i128 %88, %68
  store i128 %89, ptr %87, align 16, !tbaa !3
  %90 = load i32, ptr %73, align 4, !tbaa !3
  %91 = add i32 %90, 1
  store i32 %91, ptr %73, align 4, !tbaa !3
  %92 = getelementptr [500 x i32], ptr @_QFEy, i64 0, i64 %77
  %93 = load i32, ptr %92, align 4, !tbaa !3
  %94 = add i32 %93, 1
  store i32 %94, ptr %92, align 4, !tbaa !3
  br label %95

95:                                               ; preds = %86, %82
  %96 = add nuw i32 %75, 1
  %97 = add nsw i64 %74, -1
  %98 = icmp sgt i64 %74, 1
  br i1 %98, label %.lr.ph151.split.us154, label %._crit_edge152.us

._crit_edge152.us:                                ; preds = %95, %106
  %indvars.iv.next183 = add nuw nsw i64 %indvars.iv182, 1
  %exitcond185.not = icmp eq i64 %indvars.iv182, %34
  br i1 %exitcond185.not, label %.preheader140, label %.preheader138.us

.lr.ph151.split.us.us:                            ; preds = %.preheader138.us, %106
  %99 = phi i64 [ %116, %106 ], [ %34, %.preheader138.us ]
  %100 = phi i32 [ %115, %106 ], [ 1, %.preheader138.us ]
  %101 = sext i32 %100 to i64
  %102 = add nsw i64 %101, -1
  %103 = getelementptr [500 x i32], ptr @_QFEq, i64 0, i64 %102
  %104 = load i32, ptr %103, align 4, !tbaa !3
  %105 = icmp eq i32 %104, 0
  br i1 %105, label %.split.us, label %106

106:                                              ; preds = %.lr.ph151.split.us.us
  %107 = getelementptr [500 x [500 x i128]], ptr @_QFEa, i64 0, i64 %102, i64 %69
  %108 = load i128, ptr %107, align 16, !tbaa !3
  %109 = or i128 %108, %68
  store i128 %109, ptr %107, align 16, !tbaa !3
  %110 = load i32, ptr %73, align 4, !tbaa !3
  %111 = add i32 %110, 1
  store i32 %111, ptr %73, align 4, !tbaa !3
  %112 = getelementptr [500 x i32], ptr @_QFEy, i64 0, i64 %102
  %113 = load i32, ptr %112, align 4, !tbaa !3
  %114 = add i32 %113, 1
  store i32 %114, ptr %112, align 4, !tbaa !3
  %115 = add nuw i32 %100, 1
  %116 = add nsw i64 %99, -1
  %117 = icmp sgt i64 %99, 1
  br i1 %117, label %.lr.ph151.split.us.us, label %._crit_edge152.us

.preheader140:                                    ; preds = %._crit_edge152.us
  br i1 %35, label %.lr.ph158, label %._crit_edge163

.lr.ph158:                                        ; preds = %.preheader140
  %118 = zext i32 %.0165 to i128
  %119 = shl nuw i128 1, %118
  br label %126

.split.us:                                        ; preds = %.lr.ph151.split.us154, %.lr.ph151.split.us.us
  %120 = call ptr @_FortranAioBeginExternalFormattedOutput(ptr nonnull @_QQcl.28693029, i64 4, ptr null, i32 -1, ptr nonnull @_QQcl.abb76118022b1b1092e47b2e2f89f134, i32 73)
  %121 = call i1 @_FortranAioOutputInteger32(ptr %120, i32 -1)
  %122 = call i32 @_FortranAioEndIoStatement(ptr %120)
  %123 = call {} @_FortranAStopStatement(i32 0, i1 false, i1 false)
  unreachable

.preheader139:                                    ; preds = %168
  br i1 %35, label %.lr.ph162, label %._crit_edge163.thread

.lr.ph162:                                        ; preds = %.preheader139
  %124 = zext i32 %.0165 to i128
  %125 = shl nuw i128 1, %124
  br label %170

126:                                              ; preds = %.lr.ph158, %168
  %.0112157 = phi i32 [ 1, %.lr.ph158 ], [ %.2, %168 ]
  %.0113156 = phi i32 [ 1, %.lr.ph158 ], [ %169, %168 ]
  %127 = sext i32 %.0113156 to i64
  %128 = add nsw i64 %127, -1
  %129 = getelementptr [500 x i32], ptr @_QFEp, i64 0, i64 %128
  %130 = load i32, ptr %129, align 4, !tbaa !3
  %131 = icmp eq i32 %130, 2
  %132 = getelementptr [500 x i32], ptr @_QFEx, i64 0, i64 %128
  %133 = load i32, ptr %132, align 4, !tbaa !3
  %134 = icmp eq i32 %133, %33
  %135 = and i1 %131, %134
  br i1 %135, label %136, label %141

136:                                              ; preds = %126
  %137 = call ptr @_FortranAioBeginExternalFormattedOutput(ptr nonnull @_QQcl.28693029, i64 4, ptr null, i32 -1, ptr nonnull @_QQcl.abb76118022b1b1092e47b2e2f89f134, i32 73)
  %138 = call i1 @_FortranAioOutputInteger32(ptr %137, i32 -1)
  %139 = call i32 @_FortranAioEndIoStatement(ptr %137)
  %140 = call {} @_FortranAStopStatement(i32 0, i1 false, i1 false)
  unreachable

141:                                              ; preds = %126
  %142 = icmp eq i32 %130, 3
  %143 = icmp eq i32 %133, 0
  %144 = and i1 %142, %143
  br i1 %144, label %.preheader137, label %168

.preheader137:                                    ; preds = %141, %.preheader137
  %.1 = phi i32 [ %155, %.preheader137 ], [ %.0112157, %141 ]
  %145 = icmp sle i32 %.1, %33
  %146 = sext i32 %.1 to i64
  %147 = add nsw i64 %146, -1
  %148 = getelementptr [500 x i32], ptr @_QFEq, i64 0, i64 %147
  %149 = load i32, ptr %148, align 4, !tbaa !3
  %150 = icmp ne i32 %149, 2
  %151 = getelementptr [500 x i32], ptr @_QFEy, i64 0, i64 %147
  %152 = load i32, ptr %151, align 4, !tbaa !3
  %153 = icmp sge i32 %152, %38
  %.not130 = or i1 %150, %153
  %154 = and i1 %145, %.not130
  %155 = add i32 %.1, 1
  br i1 %154, label %.preheader137, label %156

156:                                              ; preds = %.preheader137
  %157 = icmp sgt i32 %.1, %33
  br i1 %157, label %158, label %163

158:                                              ; preds = %156
  %159 = call ptr @_FortranAioBeginExternalFormattedOutput(ptr nonnull @_QQcl.28693029, i64 4, ptr null, i32 -1, ptr nonnull @_QQcl.abb76118022b1b1092e47b2e2f89f134, i32 73)
  %160 = call i1 @_FortranAioOutputInteger32(ptr %159, i32 -1)
  %161 = call i32 @_FortranAioEndIoStatement(ptr %159)
  %162 = call {} @_FortranAStopStatement(i32 0, i1 false, i1 false)
  unreachable

163:                                              ; preds = %156
  %164 = getelementptr [500 x [500 x i128]], ptr @_QFEa, i64 0, i64 %147, i64 %128
  %165 = load i128, ptr %164, align 16, !tbaa !3
  %166 = or i128 %165, %119
  store i128 %166, ptr %164, align 16, !tbaa !3
  store i32 1, ptr %132, align 4, !tbaa !3
  %167 = add i32 %152, 1
  store i32 %167, ptr %151, align 4, !tbaa !3
  br label %168

168:                                              ; preds = %163, %141
  %.2 = phi i32 [ %.1, %163 ], [ %.0112157, %141 ]
  %169 = add nuw i32 %.0113156, 1
  %exitcond186.not = icmp eq i32 %.0113156, %33
  br i1 %exitcond186.not, label %.preheader139, label %126

170:                                              ; preds = %.lr.ph162, %212
  %.3161 = phi i32 [ 1, %.lr.ph162 ], [ %213, %212 ]
  %.1114160 = phi i32 [ 1, %.lr.ph162 ], [ %.3116, %212 ]
  %171 = sext i32 %.3161 to i64
  %172 = add nsw i64 %171, -1
  %173 = getelementptr [500 x i32], ptr @_QFEq, i64 0, i64 %172
  %174 = load i32, ptr %173, align 4, !tbaa !3
  %175 = icmp eq i32 %174, 2
  %176 = getelementptr [500 x i32], ptr @_QFEy, i64 0, i64 %172
  %177 = load i32, ptr %176, align 4, !tbaa !3
  %178 = icmp eq i32 %177, %33
  %179 = and i1 %175, %178
  br i1 %179, label %180, label %185

180:                                              ; preds = %170
  %181 = call ptr @_FortranAioBeginExternalFormattedOutput(ptr nonnull @_QQcl.28693029, i64 4, ptr null, i32 -1, ptr nonnull @_QQcl.abb76118022b1b1092e47b2e2f89f134, i32 73)
  %182 = call i1 @_FortranAioOutputInteger32(ptr %181, i32 -1)
  %183 = call i32 @_FortranAioEndIoStatement(ptr %181)
  %184 = call {} @_FortranAStopStatement(i32 0, i1 false, i1 false)
  unreachable

185:                                              ; preds = %170
  %186 = icmp eq i32 %174, 3
  %187 = icmp eq i32 %177, 0
  %188 = and i1 %186, %187
  br i1 %188, label %.preheader, label %212

.preheader:                                       ; preds = %185, %.preheader
  %.2115 = phi i32 [ %199, %.preheader ], [ %.1114160, %185 ]
  %189 = icmp sle i32 %.2115, %33
  %190 = sext i32 %.2115 to i64
  %191 = add nsw i64 %190, -1
  %192 = getelementptr [500 x i32], ptr @_QFEp, i64 0, i64 %191
  %193 = load i32, ptr %192, align 4, !tbaa !3
  %194 = icmp ne i32 %193, 2
  %195 = getelementptr [500 x i32], ptr @_QFEx, i64 0, i64 %191
  %196 = load i32, ptr %195, align 4, !tbaa !3
  %197 = icmp sge i32 %196, %38
  %.not128 = or i1 %194, %197
  %198 = and i1 %189, %.not128
  %199 = add i32 %.2115, 1
  br i1 %198, label %.preheader, label %200

200:                                              ; preds = %.preheader
  %201 = icmp sgt i32 %.2115, %33
  br i1 %201, label %202, label %207

202:                                              ; preds = %200
  %203 = call ptr @_FortranAioBeginExternalFormattedOutput(ptr nonnull @_QQcl.28693029, i64 4, ptr null, i32 -1, ptr nonnull @_QQcl.abb76118022b1b1092e47b2e2f89f134, i32 73)
  %204 = call i1 @_FortranAioOutputInteger32(ptr %203, i32 -1)
  %205 = call i32 @_FortranAioEndIoStatement(ptr %203)
  %206 = call {} @_FortranAStopStatement(i32 0, i1 false, i1 false)
  unreachable

207:                                              ; preds = %200
  %208 = getelementptr [500 x [500 x i128]], ptr @_QFEa, i64 0, i64 %172, i64 %191
  %209 = load i128, ptr %208, align 16, !tbaa !3
  %210 = or i128 %209, %125
  store i128 %210, ptr %208, align 16, !tbaa !3
  %211 = add i32 %196, 1
  store i32 %211, ptr %195, align 4, !tbaa !3
  store i32 1, ptr %176, align 4, !tbaa !3
  br label %212

212:                                              ; preds = %207, %185
  %.3116 = phi i32 [ %.2115, %207 ], [ %.1114160, %185 ]
  %213 = add nuw i32 %.3161, 1
  %exitcond187.not = icmp eq i32 %.3161, %33
  br i1 %exitcond187.not, label %._crit_edge163, label %170

._crit_edge163:                                   ; preds = %212, %.backedge, %._crit_edge, %.preheader140
  %214 = add nuw nsw i32 %.0165, 1
  %exitcond188.not = icmp eq i32 %214, 65
  br i1 %exitcond188.not, label %216, label %.backedge.backedge

.backedge.backedge:                               ; preds = %._crit_edge163, %._crit_edge163.thread
  %.0165.be = phi i32 [ %214, %._crit_edge163 ], [ %215, %._crit_edge163.thread ]
  br label %.backedge

._crit_edge163.thread:                            ; preds = %.preheader139
  %215 = add nuw nsw i32 %.0165, 1
  %exitcond188.not197 = icmp eq i32 %215, 65
  br i1 %exitcond188.not197, label %._crit_edge171, label %.backedge.backedge

216:                                              ; preds = %._crit_edge163
  br i1 %35, label %.lr.ph170, label %._crit_edge171

.lr.ph170:                                        ; preds = %216, %._crit_edge168
  %indvars.iv193 = phi i64 [ %indvars.iv.next194, %._crit_edge168 ], [ 1, %216 ]
  %217 = call ptr @_FortranAioBeginExternalFormattedOutput(ptr nonnull @_QQcl.28693029, i64 4, ptr null, i32 -1, ptr nonnull @_QQcl.abb76118022b1b1092e47b2e2f89f134, i32 56)
  %218 = call i1 @_FortranAioSetAdvance(ptr %217, ptr nonnull @_QQcl.6E6F, i64 2)
  %219 = add nsw i64 %indvars.iv193, -1
  %220 = getelementptr [500 x [500 x i128]], ptr @_QFEa, i64 0, i64 0, i64 %219
  %221 = load i128, ptr %220, align 16, !tbaa !3
  %222 = call i1 @_FortranAioOutputInteger128(ptr %217, i128 %221)
  %223 = call i32 @_FortranAioEndIoStatement(ptr %217)
  %224 = load i32, ptr %5, align 4, !tbaa !3
  %225 = icmp sgt i32 %224, 1
  br i1 %225, label %.lr.ph167.preheader, label %._crit_edge168

.lr.ph167.preheader:                              ; preds = %.lr.ph170
  %226 = zext i32 %224 to i64
  br label %.lr.ph167

.lr.ph167:                                        ; preds = %.lr.ph167.preheader, %.lr.ph167
  %indvars.iv189 = phi i64 [ 2, %.lr.ph167.preheader ], [ %indvars.iv.next190, %.lr.ph167 ]
  %227 = call ptr @_FortranAioBeginExternalFormattedOutput(ptr nonnull @_QQcl.28782C693029, i64 6, ptr null, i32 -1, ptr nonnull @_QQcl.abb76118022b1b1092e47b2e2f89f134, i32 58)
  %228 = call i1 @_FortranAioSetAdvance(ptr %227, ptr nonnull @_QQcl.6E6F, i64 2)
  %229 = add nsw i64 %indvars.iv189, -1
  %230 = getelementptr [500 x [500 x i128]], ptr @_QFEa, i64 0, i64 %229, i64 %219
  %231 = load i128, ptr %230, align 16, !tbaa !3
  %232 = call i1 @_FortranAioOutputInteger128(ptr %227, i128 %231)
  %233 = call i32 @_FortranAioEndIoStatement(ptr %227)
  %indvars.iv.next190 = add nuw nsw i64 %indvars.iv189, 1
  %exitcond192.not = icmp eq i64 %indvars.iv189, %226
  br i1 %exitcond192.not, label %._crit_edge168, label %.lr.ph167

._crit_edge168:                                   ; preds = %.lr.ph167, %.lr.ph170
  %234 = call ptr @_FortranAioBeginExternalListOutput(i32 -1, ptr nonnull @_QQcl.abb76118022b1b1092e47b2e2f89f134, i32 60)
  %235 = call i32 @_FortranAioEndIoStatement(ptr %234)
  %indvars.iv.next194 = add nuw nsw i64 %indvars.iv193, 1
  %exitcond196.not = icmp eq i64 %indvars.iv193, %34
  br i1 %exitcond196.not, label %._crit_edge171, label %.lr.ph170

._crit_edge171:                                   ; preds = %._crit_edge163.thread, %._crit_edge168, %216
  ret void
}

; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read)
define i32 @_QFPpattern(ptr nocapture readonly %0, ptr nocapture readonly %1) local_unnamed_addr #0 {
  %3 = load i32, ptr %0, align 4, !tbaa !3
  %4 = shl i32 %3, 1
  %5 = load i32, ptr %1, align 4, !tbaa !3
  %.not = icmp eq i32 %5, 0
  %6 = zext i1 %.not to i32
  %7 = or i32 %4, 1
  %8 = add i32 %7, %6
  %9 = srem i32 %8, 4
  ret i32 %9
}

; Function Attrs: noreturn
define void @_QFPhalt() local_unnamed_addr #1 {
  %1 = tail call ptr @_FortranAioBeginExternalFormattedOutput(ptr nonnull @_QQcl.28693029, i64 4, ptr null, i32 -1, ptr nonnull @_QQcl.abb76118022b1b1092e47b2e2f89f134, i32 73)
  %2 = tail call i1 @_FortranAioOutputInteger32(ptr %1, i32 -1)
  %3 = tail call i32 @_FortranAioEndIoStatement(ptr %1)
  %4 = tail call {} @_FortranAStopStatement(i32 0, i1 false, i1 false)
  unreachable
}

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 @_FortranAioBeginExternalFormattedOutput(ptr, i64, ptr, i32, ptr, i32) local_unnamed_addr

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

declare i1 @_FortranAioOutputInteger128(ptr, i128) local_unnamed_addr

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

declare i1 @_FortranAioOutputInteger32(ptr, i32) local_unnamed_addr

declare {} @_FortranAStopStatement(i32, i1, i1) local_unnamed_addr

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

; 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 norecurse nosync nounwind willreturn memory(argmem: read) }
attributes #1 = { noreturn }
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}
