program ABC158_D
  character(100000)::S
  character(1)::Fs(200000),Bs(200000),Ss(300000)
  integer::Q,T,F,rev,Fi,Bi
  character(5)::query
  character(1)::C
  read(5,*)S
  read(5,*)Q
  N=len_trim(S)
  rev=0
  Fi=0
  Bi=0
  do I=1,Q
     read(5,'(A)')query
     if(query(1:1)=='1') then
        rev=rev+1
     else
        read(query,*)T,F,C
        if((F==1 .and. mod(rev,2)==0) .or. (F/=1 .and. mod(rev,2)==1)) then
           Fi=Fi+1
           Fs(Fi)=C
        else
           Bi=Bi+1
           Bs(Bi)=C
        end if
     end if
  end do
  do I=1,len_trim(S)
     Ss(I)=S(I:I)
  end do
  if(mod(rev,2)==1) then
     write(6,*)Bs(Bi:1:-1),Ss(len_trim(S):1:-1),Fs(1:Fi)
  else
     write(6,*)Fs(Fi:1:-1),Ss(1:len_trim(S)),Bs(1:Bi)
  end if
end program ABC158_D
; 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"

@_QFEbs = internal global [200000 x [1 x i8]] undef
@_QFEfs = internal global [200000 x [1 x i8]] undef
@_QFEs = internal global [100000 x i8] undef
@_QFEss = internal global [300000 x [1 x i8]] undef
@_QQcl.088a654f95c1c4aac9d14245454809e1 = linkonce constant [73 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_2218/source.f\00"
@_QQcl.284129 = linkonce constant [3 x i8] c"(A)"
@_QQcl.31 = linkonce constant [1 x i8] c"1"
@_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 { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, align 8
  %6 = alloca { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, align 8
  %7 = alloca [1 x i8], align 1
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca [5 x i8], align 1
  %11 = alloca i32, align 4
  %12 = tail call ptr @_FortranAioBeginExternalListInput(i32 5, ptr nonnull @_QQcl.088a654f95c1c4aac9d14245454809e1, i32 7)
  %13 = tail call i1 @_FortranAioInputAscii(ptr %12, ptr nonnull @_QFEs, i64 100000)
  %14 = tail call i32 @_FortranAioEndIoStatement(ptr %12)
  %15 = tail call ptr @_FortranAioBeginExternalListInput(i32 5, ptr nonnull @_QQcl.088a654f95c1c4aac9d14245454809e1, i32 8)
  %16 = call i1 @_FortranAioInputInteger(ptr %15, ptr nonnull %9, i32 4)
  %17 = call i32 @_FortranAioEndIoStatement(ptr %15)
  %18 = load i32, ptr %9, align 4, !tbaa !3
  %19 = icmp sgt i32 %18, 0
  br i1 %19, label %.lr.ph.preheader, label %.preheader

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

.preheader:                                       ; preds = %54, %0
  %.0120.lcssa = phi i32 [ 0, %0 ], [ %.1121, %54 ]
  %.0118.lcssa = phi i32 [ 0, %0 ], [ %.1119, %54 ]
  %.0.lcssa = phi i32 [ 0, %0 ], [ %.1, %54 ]
  br label %57

.lr.ph:                                           ; preds = %.lr.ph.preheader, %54
  %21 = phi i64 [ %55, %54 ], [ %20, %.lr.ph.preheader ]
  %.0138 = phi i32 [ %.1, %54 ], [ 0, %.lr.ph.preheader ]
  %.0118137 = phi i32 [ %.1119, %54 ], [ 0, %.lr.ph.preheader ]
  %.0120136 = phi i32 [ %.1121, %54 ], [ 0, %.lr.ph.preheader ]
  %22 = call ptr @_FortranAioBeginExternalFormattedInput(ptr nonnull @_QQcl.284129, i64 3, ptr null, i32 5, ptr nonnull @_QQcl.088a654f95c1c4aac9d14245454809e1, i32 14)
  %23 = call i1 @_FortranAioInputAscii(ptr %22, ptr nonnull %10, i64 5)
  %24 = call i32 @_FortranAioEndIoStatement(ptr %22)
  %25 = call i32 @_FortranACharacterCompareScalar1(ptr nonnull %10, ptr nonnull @_QQcl.31, i64 1, i64 1)
  %26 = icmp eq i32 %25, 0
  br i1 %26, label %27, label %29

27:                                               ; preds = %.lr.ph
  %28 = add i32 %.0138, 1
  br label %54

29:                                               ; preds = %.lr.ph
  %30 = call ptr @_FortranAioBeginInternalListInput(ptr nonnull %10, i64 5, ptr null, i64 0, ptr nonnull @_QQcl.088a654f95c1c4aac9d14245454809e1, i32 18)
  %31 = call i1 @_FortranAioInputInteger(ptr %30, ptr nonnull %11, i32 4)
  %32 = call i1 @_FortranAioInputInteger(ptr %30, ptr nonnull %8, i32 4)
  %33 = call i1 @_FortranAioInputAscii(ptr %30, ptr nonnull %7, i64 1)
  %34 = call i32 @_FortranAioEndIoStatement(ptr %30)
  %35 = load i32, ptr %8, align 4, !tbaa !3
  %36 = icmp eq i32 %35, 1
  %37 = srem i32 %.0138, 2
  %38 = icmp eq i32 %37, 0
  %39 = and i1 %38, %36
  %40 = icmp ne i32 %35, 1
  %41 = icmp eq i32 %37, 1
  %42 = and i1 %41, %40
  %43 = or i1 %39, %42
  %.fca.0.load11 = load i8, ptr %7, align 1, !tbaa !3
  br i1 %43, label %44, label %49

44:                                               ; preds = %29
  %45 = add i32 %.0120136, 1
  %46 = sext i32 %45 to i64
  %47 = add nsw i64 %46, -1
  %48 = getelementptr [200000 x [1 x i8]], ptr @_QFEfs, i64 0, i64 %47
  store i8 %.fca.0.load11, ptr %48, align 1, !tbaa !3
  br label %54

49:                                               ; preds = %29
  %50 = add i32 %.0118137, 1
  %51 = sext i32 %50 to i64
  %52 = add nsw i64 %51, -1
  %53 = getelementptr [200000 x [1 x i8]], ptr @_QFEbs, i64 0, i64 %52
  store i8 %.fca.0.load11, ptr %53, align 1, !tbaa !3
  br label %54

54:                                               ; preds = %27, %44, %49
  %.1121 = phi i32 [ %.0120136, %27 ], [ %45, %44 ], [ %.0120136, %49 ]
  %.1119 = phi i32 [ %.0118137, %27 ], [ %.0118137, %44 ], [ %50, %49 ]
  %.1 = phi i32 [ %28, %27 ], [ %.0138, %44 ], [ %.0138, %49 ]
  %55 = add nsw i64 %21, -1
  %56 = icmp sgt i64 %21, 1
  br i1 %56, label %.lr.ph, label %.preheader

57:                                               ; preds = %.preheader, %57
  %58 = phi i64 [ 99999, %.preheader ], [ %62, %57 ]
  %59 = getelementptr [100000 x [1 x i8]], ptr @_QFEs, i64 0, i64 %58
  %60 = load i8, ptr %59, align 1, !tbaa !3
  %61 = icmp eq i8 %60, 32
  %62 = add nsw i64 %58, -1
  %63 = icmp ne i64 %58, 0
  %64 = and i1 %61, %63
  br i1 %64, label %57, label %65

65:                                               ; preds = %57
  %66 = shl i64 %58, 32
  %sext = add i64 %66, 4294967296
  %67 = ashr exact i64 %sext, 32
  %spec.select = select i1 %61, i64 0, i64 %67
  %68 = icmp sgt i64 %spec.select, 0
  br i1 %68, label %select.unfold.preheader, label %select.unfold._crit_edge

select.unfold.preheader:                          ; preds = %65
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 16 @_QFEss, ptr nonnull align 16 @_QFEs, i64 %spec.select, i1 false)
  br label %select.unfold._crit_edge

select.unfold._crit_edge:                         ; preds = %select.unfold.preheader, %65
  %69 = and i32 %.0.lcssa, -2147483647
  %70 = icmp eq i32 %69, 1
  br i1 %70, label %71, label %97

71:                                               ; preds = %select.unfold._crit_edge
  %72 = call ptr @_FortranAioBeginExternalListOutput(i32 6, ptr nonnull @_QQcl.088a654f95c1c4aac9d14245454809e1, i32 32)
  %73 = sext i32 %.0118.lcssa to i64
  %74 = add nsw i64 %73, -1
  %75 = call i64 @llvm.smax.i64(i64 %73, i64 0)
  %76 = getelementptr [200000 x [1 x i8]], ptr @_QFEbs, i64 0, i64 %74
  store ptr %76, ptr %3, align 8, !tbaa !7
  %.fca.1.gep61 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %3, i64 0, i32 1
  store i64 1, ptr %.fca.1.gep61, align 8, !tbaa !7
  %.fca.2.gep63 = 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.gep63, align 8, !tbaa !7
  %.fca.3.gep65 = 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.gep65, align 4, !tbaa !7
  %.fca.4.gep67 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %3, i64 0, i32 4
  store i8 40, ptr %.fca.4.gep67, align 1, !tbaa !7
  %.fca.5.gep69 = 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.gep69, align 2, !tbaa !7
  %.fca.6.gep71 = 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.gep71, align 1, !tbaa !7
  %.fca.7.0.0.gep73 = 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.gep73, align 8, !tbaa !7
  %.fca.7.0.1.gep75 = 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 %75, ptr %.fca.7.0.1.gep75, align 8, !tbaa !7
  %.fca.7.0.2.gep77 = 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 -1, ptr %.fca.7.0.2.gep77, align 8, !tbaa !7
  %77 = call i1 @_FortranAioOutputDescriptor(ptr %72, ptr nonnull %3)
  br label %78

78:                                               ; preds = %71, %78
  %79 = phi i64 [ 99999, %71 ], [ %83, %78 ]
  %80 = getelementptr [100000 x [1 x i8]], ptr @_QFEs, i64 0, i64 %79
  %81 = load i8, ptr %80, align 1, !tbaa !3
  %82 = icmp eq i8 %81, 32
  %83 = add nsw i64 %79, -1
  %84 = icmp ne i64 %79, 0
  %85 = and i1 %82, %84
  br i1 %85, label %78, label %86

86:                                               ; preds = %78
  %87 = shl i64 %79, 32
  %sext130 = add i64 %87, 4294967296
  %88 = ashr exact i64 %sext130, 32
  %89 = select i1 %82, i64 0, i64 %88
  %90 = add nsw i64 %89, -1
  %91 = call i64 @llvm.smax.i64(i64 %89, i64 0)
  %92 = getelementptr [300000 x [1 x i8]], ptr @_QFEss, i64 0, i64 %90
  store ptr %92, ptr %2, align 8, !tbaa !7
  %.fca.1.gep81 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %2, i64 0, i32 1
  store i64 1, ptr %.fca.1.gep81, align 8, !tbaa !7
  %.fca.2.gep83 = 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.gep83, align 8, !tbaa !7
  %.fca.3.gep85 = 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.gep85, align 4, !tbaa !7
  %.fca.4.gep87 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %2, i64 0, i32 4
  store i8 40, ptr %.fca.4.gep87, align 1, !tbaa !7
  %.fca.5.gep89 = 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.gep89, align 2, !tbaa !7
  %.fca.6.gep91 = 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.gep91, align 1, !tbaa !7
  %.fca.7.0.0.gep93 = 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.gep93, align 8, !tbaa !7
  %.fca.7.0.1.gep95 = 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 %91, ptr %.fca.7.0.1.gep95, align 8, !tbaa !7
  %.fca.7.0.2.gep97 = 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 -1, ptr %.fca.7.0.2.gep97, align 8, !tbaa !7
  %93 = call i1 @_FortranAioOutputDescriptor(ptr %72, ptr nonnull %2)
  %94 = call i32 @llvm.smax.i32(i32 %.0120.lcssa, i32 0)
  %95 = zext i32 %94 to i64
  store ptr @_QFEfs, ptr %1, align 8, !tbaa !7
  %.fca.1.gep101 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %1, i64 0, i32 1
  store i64 1, ptr %.fca.1.gep101, align 8, !tbaa !7
  %.fca.2.gep103 = 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.gep103, align 8, !tbaa !7
  %.fca.3.gep105 = 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.gep105, align 4, !tbaa !7
  %.fca.4.gep107 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %1, i64 0, i32 4
  store i8 40, ptr %.fca.4.gep107, align 1, !tbaa !7
  %.fca.5.gep109 = 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.gep109, align 2, !tbaa !7
  %.fca.6.gep111 = 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.gep111, align 1, !tbaa !7
  %.fca.7.0.0.gep113 = 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.gep113, align 8, !tbaa !7
  %.fca.7.0.1.gep115 = 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 %95, ptr %.fca.7.0.1.gep115, align 8, !tbaa !7
  %.fca.7.0.2.gep117 = 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 1, ptr %.fca.7.0.2.gep117, align 8, !tbaa !7
  %96 = call i1 @_FortranAioOutputDescriptor(ptr %72, ptr nonnull %1)
  br label %121

97:                                               ; preds = %select.unfold._crit_edge
  %98 = call ptr @_FortranAioBeginExternalListOutput(i32 6, ptr nonnull @_QQcl.088a654f95c1c4aac9d14245454809e1, i32 34)
  %99 = sext i32 %.0120.lcssa to i64
  %100 = add nsw i64 %99, -1
  %101 = call i64 @llvm.smax.i64(i64 %99, i64 0)
  %102 = getelementptr [200000 x [1 x i8]], ptr @_QFEfs, i64 0, i64 %100
  store ptr %102, ptr %6, align 8, !tbaa !7
  %.fca.1.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %6, i64 0, i32 1
  store i64 1, 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 %6, 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 %6, 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 %6, i64 0, i32 4
  store i8 40, 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 %6, 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 %6, 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 %6, 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 %6, i64 0, i32 7, i64 0, i64 1
  store i64 %101, 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 %6, i64 0, i32 7, i64 0, i64 2
  store i64 -1, ptr %.fca.7.0.2.gep, align 8, !tbaa !7
  %103 = call i1 @_FortranAioOutputDescriptor(ptr %98, ptr nonnull %6)
  br label %104

104:                                              ; preds = %97, %104
  %105 = phi i64 [ 99999, %97 ], [ %109, %104 ]
  %106 = getelementptr [100000 x [1 x i8]], ptr @_QFEs, i64 0, i64 %105
  %107 = load i8, ptr %106, align 1, !tbaa !3
  %108 = icmp eq i8 %107, 32
  %109 = add nsw i64 %105, -1
  %110 = icmp ne i64 %105, 0
  %111 = and i1 %108, %110
  br i1 %111, label %104, label %112

112:                                              ; preds = %104
  %113 = shl i64 %105, 32
  %sext129 = add i64 %113, 4294967296
  %114 = ashr exact i64 %sext129, 32
  %115 = call i64 @llvm.smax.i64(i64 %114, i64 0)
  %116 = select i1 %108, i64 0, i64 %115
  store ptr @_QFEss, ptr %5, align 8, !tbaa !7
  %.fca.1.gep21 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %5, i64 0, i32 1
  store i64 1, ptr %.fca.1.gep21, align 8, !tbaa !7
  %.fca.2.gep23 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %5, i64 0, i32 2
  store i32 20180515, ptr %.fca.2.gep23, align 8, !tbaa !7
  %.fca.3.gep25 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %5, i64 0, i32 3
  store i8 1, ptr %.fca.3.gep25, align 4, !tbaa !7
  %.fca.4.gep27 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %5, i64 0, i32 4
  store i8 40, ptr %.fca.4.gep27, align 1, !tbaa !7
  %.fca.5.gep29 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %5, i64 0, i32 5
  store i8 0, ptr %.fca.5.gep29, align 2, !tbaa !7
  %.fca.6.gep31 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %5, i64 0, i32 6
  store i8 0, ptr %.fca.6.gep31, align 1, !tbaa !7
  %.fca.7.0.0.gep33 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %5, i64 0, i32 7, i64 0, i64 0
  store i64 1, ptr %.fca.7.0.0.gep33, align 8, !tbaa !7
  %.fca.7.0.1.gep35 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %5, i64 0, i32 7, i64 0, i64 1
  store i64 %116, ptr %.fca.7.0.1.gep35, align 8, !tbaa !7
  %.fca.7.0.2.gep37 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %5, i64 0, i32 7, i64 0, i64 2
  store i64 1, ptr %.fca.7.0.2.gep37, align 8, !tbaa !7
  %117 = call i1 @_FortranAioOutputDescriptor(ptr %98, ptr nonnull %5)
  %118 = call i32 @llvm.smax.i32(i32 %.0118.lcssa, i32 0)
  %119 = zext i32 %118 to i64
  store ptr @_QFEbs, ptr %4, align 8, !tbaa !7
  %.fca.1.gep41 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %4, i64 0, i32 1
  store i64 1, ptr %.fca.1.gep41, align 8, !tbaa !7
  %.fca.2.gep43 = 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.gep43, align 8, !tbaa !7
  %.fca.3.gep45 = 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.gep45, align 4, !tbaa !7
  %.fca.4.gep47 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %4, i64 0, i32 4
  store i8 40, ptr %.fca.4.gep47, align 1, !tbaa !7
  %.fca.5.gep49 = 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.gep49, align 2, !tbaa !7
  %.fca.6.gep51 = 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.gep51, align 1, !tbaa !7
  %.fca.7.0.0.gep53 = 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.gep53, align 8, !tbaa !7
  %.fca.7.0.1.gep55 = 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 %119, ptr %.fca.7.0.1.gep55, align 8, !tbaa !7
  %.fca.7.0.2.gep57 = 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 1, ptr %.fca.7.0.2.gep57, align 8, !tbaa !7
  %120 = call i1 @_FortranAioOutputDescriptor(ptr %98, ptr nonnull %4)
  br label %121

121:                                              ; preds = %86, %112
  %.sink = phi ptr [ %72, %86 ], [ %98, %112 ]
  %122 = call i32 @_FortranAioEndIoStatement(ptr %.sink)
  ret void
}

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

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

declare i32 @_FortranAioEndIoStatement(ptr) local_unnamed_addr

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

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

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

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

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

declare i1 @_FortranAioOutputDescriptor(ptr, ptr) 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 nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smax.i32(i32, i32) #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"}
!7 = !{!8, !8, i64 0}
!8 = !{!"descriptor member", !5, i64 0}
