program ABC049B
    implicit none
    integer(8)::H,W,i,j
    character(100)::so
    character(100),dimension(100)::S
    read(5,*)H,W,(S(i),i=1,H)

    do i=1,2*H
        do j=1,W
            so(j:j)=S((i+1)/2)(j:j)
        end do
        print'(A)',so(1:W)
    end do
end program ABC049B
; 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"

@_QFEs = internal global [100 x [100 x i8]] undef
@_QFEso = internal global [100 x i8] undef
@_QQcl.01aaabb2ba7a804b6209b7d7dd522ab0 = linkonce constant [73 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_7670/source.f\00"
@_QQcl.284129 = linkonce constant [3 x i8] c"(A)"
@_QQEnvironmentDefaults = local_unnamed_addr constant ptr null

define void @_QQmain() local_unnamed_addr {
  %1 = alloca i64, align 8
  %2 = alloca i64, align 8
  %3 = tail call ptr @_FortranAioBeginExternalListInput(i32 5, ptr nonnull @_QQcl.01aaabb2ba7a804b6209b7d7dd522ab0, i32 6)
  %4 = call i1 @_FortranAioInputInteger(ptr %3, ptr nonnull %1, i32 8)
  %5 = call i1 @_FortranAioInputInteger(ptr %3, ptr nonnull %2, i32 8)
  %6 = load i64, ptr %1, align 8, !tbaa !3
  %7 = icmp sgt i64 %6, 0
  br i1 %7, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %0, %.lr.ph
  %8 = phi i64 [ %12, %.lr.ph ], [ 1, %0 ]
  %9 = add nsw i64 %8, -1
  %10 = getelementptr [100 x [100 x i8]], ptr @_QFEs, i64 0, i64 %9
  %11 = call i1 @_FortranAioInputAscii(ptr %3, ptr %10, i64 100)
  %12 = add nuw i64 %8, 1
  %exitcond.not = icmp eq i64 %8, %6
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %0
  %13 = call i32 @_FortranAioEndIoStatement(ptr %3)
  %14 = load i64, ptr %1, align 8, !tbaa !3
  %15 = shl i64 %14, 1
  %16 = icmp sgt i64 %15, 0
  br i1 %16, label %.lr.ph12.preheader, label %._crit_edge13

.lr.ph12.preheader:                               ; preds = %._crit_edge
  %17 = or i64 %15, 1
  br label %.lr.ph12

.lr.ph12:                                         ; preds = %.lr.ph12.preheader, %._crit_edge10
  %18 = phi i64 [ %21, %._crit_edge10 ], [ 1, %.lr.ph12.preheader ]
  %19 = load i64, ptr %2, align 8, !tbaa !3
  %20 = icmp sgt i64 %19, 0
  %21 = add nuw i64 %18, 1
  br i1 %20, label %.lr.ph9, label %._crit_edge10

.lr.ph9:                                          ; preds = %.lr.ph12
  %22 = sdiv i64 %21, 2
  %23 = add nsw i64 %22, -1
  %24 = getelementptr [100 x [100 x i8]], ptr @_QFEs, i64 0, i64 %23
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 16 @_QFEso, ptr align 4 %24, i64 %19, i1 false)
  br label %._crit_edge10

._crit_edge10:                                    ; preds = %.lr.ph12, %.lr.ph9
  %25 = call ptr @_FortranAioBeginExternalFormattedOutput(ptr nonnull @_QQcl.284129, i64 3, ptr null, i32 -1, ptr nonnull @_QQcl.01aaabb2ba7a804b6209b7d7dd522ab0, i32 12)
  %26 = load i64, ptr %2, align 8, !tbaa !3
  %27 = call i64 @llvm.smax.i64(i64 %26, i64 0)
  %28 = call i1 @_FortranAioOutputAscii(ptr %25, ptr nonnull @_QFEso, i64 %27)
  %29 = call i32 @_FortranAioEndIoStatement(ptr %25)
  %exitcond14.not = icmp eq i64 %21, %17
  br i1 %exitcond14.not, label %._crit_edge13, label %.lr.ph12

._crit_edge13:                                    ; preds = %._crit_edge10, %._crit_edge
  ret void
}

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

declare i1 @_FortranAioInputInteger(ptr, ptr, i32) local_unnamed_addr

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

declare i32 @_FortranAioEndIoStatement(ptr) local_unnamed_addr

declare ptr @_FortranAioBeginExternalFormattedOutput(ptr, i64, ptr, 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 i64 @llvm.smax.i64(i64, i64) #0

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

attributes #0 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }

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