program String_Formation
    implicit none
    character S*400005,C*1,query*100
    character ans(-400005:400005)
    integer Q,l,r,i,T,rev,F
    integer sf(100)

    read *,S,Q
    l = 0
    r = len_trim(S)+1
    rev = 0
    ans(1:) = transfer(S,ans,size=len(S))

    do i = 1, Q
        read (*,'(a)')query
        if(query(1:1) == '1') then
             rev = rev+1
        else
            read (query,*)T,F,C 
            if(F == 1) then
                if(mod(rev,2) == 1) then
                    ans(r:r) = C
                    r = r+1
                else
                    ans(l:l) = C
                    l = l-1
                endif
            else
                if(mod(rev,2) == 0) then
                    ans(r:r) = C
                    r = r+1
                else
                    ans(l:l) = C
                    l = l-1
                endif
            endif
        endif
    enddo

    if(mod(rev,2) == 0) then
        print *,ans(l+1:r-1)
    else
        print *,ans(r-1:l+1:-1)
    endif


end program String_Formation
; 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 global [800011 x [1 x i8]] undef
@_QFEquery = internal global [100 x i8] undef
@_QFEs = internal global [400005 x i8] undef
@_QQcl.d37dd3dca8cf94cf9937683e2d5722dc = linkonce constant [73 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_2222/source.f\00"
@_QQcl.286129 = linkonce constant [3 x i8] c"(a)"
@_QQcl.31 = linkonce constant [1 x i8] c"1"
@_QQEnvironmentDefaults = local_unnamed_addr constant ptr null

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture 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 { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, align 8
  %4 = alloca { ptr, i64, i32, i8, i8, i8, i8 }, align 8
  %5 = alloca { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, align 8
  %6 = alloca [1 x i8], align 1
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = tail call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.d37dd3dca8cf94cf9937683e2d5722dc, i32 8)
  %11 = tail call i1 @_FortranAioInputAscii(ptr %10, ptr nonnull @_QFEs, i64 400005)
  %12 = call i1 @_FortranAioInputInteger(ptr %10, ptr nonnull %8, i32 4)
  %13 = call i32 @_FortranAioEndIoStatement(ptr %10)
  br label %14

14:                                               ; preds = %0, %14
  %15 = phi i64 [ 400004, %0 ], [ %19, %14 ]
  %16 = getelementptr [400005 x [1 x i8]], ptr @_QFEs, i64 0, i64 %15
  %17 = load i8, ptr %16, align 1, !tbaa !3
  %18 = icmp eq i8 %17, 32
  %19 = add nsw i64 %15, -1
  %20 = icmp ne i64 %15, 0
  %21 = and i1 %18, %20
  br i1 %21, label %14, label %iter.check

iter.check:                                       ; preds = %14
  %22 = trunc i64 %15 to i32
  %.op = add i32 %22, 2
  store ptr @_QFEs, ptr %4, align 8, !tbaa !7
  %.fca.1.gep40 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %4, i64 0, i32 1
  store i64 400005, ptr %.fca.1.gep40, align 8, !tbaa !7
  %.fca.2.gep41 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %4, i64 0, i32 2
  store i32 20180515, ptr %.fca.2.gep41, align 8, !tbaa !7
  %.fca.3.gep42 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %4, i64 0, i32 3
  store i8 0, ptr %.fca.3.gep42, align 4, !tbaa !7
  %.fca.4.gep43 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %4, i64 0, i32 4
  store i8 40, ptr %.fca.4.gep43, align 1, !tbaa !7
  %.fca.5.gep44 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %4, i64 0, i32 5
  store i8 0, ptr %.fca.5.gep44, align 2, !tbaa !7
  %.fca.6.gep45 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %4, i64 0, i32 6
  store i8 0, ptr %.fca.6.gep45, align 1, !tbaa !7
  store ptr @_QFEans, ptr %3, align 8, !tbaa !7
  %.fca.1.gep47 = 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.gep47, align 8, !tbaa !7
  %.fca.2.gep48 = 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.gep48, align 8, !tbaa !7
  %.fca.3.gep49 = 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.gep49, align 4, !tbaa !7
  %.fca.4.gep50 = 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.gep50, align 1, !tbaa !7
  %.fca.5.gep51 = 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.gep51, align 2, !tbaa !7
  %.fca.6.gep52 = 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.gep52, align 1, !tbaa !7
  %.fca.7.0.0.gep53 = 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 -400005, ptr %.fca.7.0.0.gep53, align 8, !tbaa !7
  %.fca.7.0.1.gep54 = 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 800011, ptr %.fca.7.0.1.gep54, align 8, !tbaa !7
  %.fca.7.0.2.gep55 = 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.gep55, align 8, !tbaa !7
  store ptr null, ptr %5, align 8, !tbaa !7
  %.fca.1.gep = 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.gep, align 8, !tbaa !7
  %.fca.2.gep = 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.gep, align 8, !tbaa !7
  %.fca.3.gep = 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.gep, align 4, !tbaa !7
  %.fca.4.gep = 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.gep, align 1, !tbaa !7
  %.fca.5.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %5, i64 0, i32 5
  store i8 2, 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 %5, 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 %5, 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 %5, i64 0, i32 7, i64 0, i64 1
  store i64 0, 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 %5, i64 0, i32 7, i64 0, i64 2
  store i64 1, ptr %.fca.7.0.2.gep, align 8, !tbaa !7
  %23 = call {} @_FortranATransferSize(ptr nonnull %5, ptr nonnull %4, ptr nonnull %3, ptr nonnull @_QQcl.d37dd3dca8cf94cf9937683e2d5722dc, i32 12, i64 400005)
  %.fca.0.load28 = load ptr, ptr %5, align 8, !tbaa !7
  %.fca.0.load28170 = ptrtoint ptr %.fca.0.load28 to i64
  %24 = sub i64 add (i64 ptrtoint (ptr @_QFEans to i64), i64 400006), %.fca.0.load28170
  %diff.check = icmp ult i64 %24, 32
  br i1 %diff.check, label %vec.epilog.scalar.ph.prol.preheader, label %vector.body

vector.body:                                      ; preds = %iter.check, %vector.body
  %index = phi i64 [ %index.next.1, %vector.body ], [ 0, %iter.check ]
  %25 = getelementptr [1 x i8], ptr %.fca.0.load28, i64 %index
  %26 = add nuw nsw i64 %index, 400006
  %27 = getelementptr [1 x i8], ptr @_QFEans, i64 %26
  %wide.load = load <16 x i8>, ptr %25, align 1, !tbaa !3
  %28 = getelementptr i8, ptr %25, i64 16
  %wide.load171 = load <16 x i8>, ptr %28, align 1, !tbaa !3
  store <16 x i8> %wide.load, ptr %27, align 2, !tbaa !3
  %29 = getelementptr i8, ptr %27, i64 16
  store <16 x i8> %wide.load171, ptr %29, align 2, !tbaa !3
  %index.next = or i64 %index, 32
  %30 = getelementptr [1 x i8], ptr %.fca.0.load28, i64 %index.next
  %31 = add nuw nsw i64 %index, 400038
  %32 = getelementptr [1 x i8], ptr @_QFEans, i64 %31
  %wide.load.1 = load <16 x i8>, ptr %30, align 1, !tbaa !3
  %33 = getelementptr i8, ptr %30, i64 16
  %wide.load171.1 = load <16 x i8>, ptr %33, align 1, !tbaa !3
  store <16 x i8> %wide.load.1, ptr %32, align 2, !tbaa !3
  %34 = getelementptr i8, ptr %32, i64 16
  store <16 x i8> %wide.load171.1, ptr %34, align 2, !tbaa !3
  %index.next.1 = add nuw nsw i64 %index, 64
  %35 = icmp eq i64 %index.next.1, 400000
  br i1 %35, label %vec.epilog.scalar.ph.prol.preheader, label %vector.body, !llvm.loop !9

vec.epilog.scalar.ph.prol.preheader:              ; preds = %iter.check, %vector.body
  %.ph = phi i64 [ 0, %iter.check ], [ 400000, %vector.body ]
  br label %vec.epilog.scalar.ph.prol

vec.epilog.scalar.ph.prol:                        ; preds = %vec.epilog.scalar.ph.prol, %vec.epilog.scalar.ph.prol.preheader
  %36 = phi i64 [ %40, %vec.epilog.scalar.ph.prol ], [ %.ph, %vec.epilog.scalar.ph.prol.preheader ]
  %prol.iter = phi i64 [ %prol.iter.next, %vec.epilog.scalar.ph.prol ], [ 0, %vec.epilog.scalar.ph.prol.preheader ]
  %37 = getelementptr [1 x i8], ptr %.fca.0.load28, i64 %36
  %38 = add nuw nsw i64 %36, 400006
  %39 = getelementptr [1 x i8], ptr @_QFEans, i64 %38
  %.unpack.prol = load i8, ptr %37, align 1, !tbaa !3
  store i8 %.unpack.prol, ptr %39, align 1, !tbaa !3
  %40 = add nuw nsw i64 %36, 1
  %prol.iter.next = add i64 %prol.iter, 1
  %prol.iter.cmp.not = icmp eq i64 %prol.iter, 0
  br i1 %prol.iter.cmp.not, label %vec.epilog.scalar.ph, label %vec.epilog.scalar.ph.prol, !llvm.loop !12

vec.epilog.scalar.ph:                             ; preds = %vec.epilog.scalar.ph.prol, %vec.epilog.scalar.ph
  %41 = phi i64 [ %57, %vec.epilog.scalar.ph ], [ %40, %vec.epilog.scalar.ph.prol ]
  %42 = getelementptr [1 x i8], ptr %.fca.0.load28, i64 %41
  %43 = add nuw nsw i64 %41, 400006
  %44 = getelementptr [1 x i8], ptr @_QFEans, i64 %43
  %.unpack = load i8, ptr %42, align 1, !tbaa !3
  store i8 %.unpack, ptr %44, align 1, !tbaa !3
  %45 = add nuw nsw i64 %41, 1
  %46 = getelementptr [1 x i8], ptr %.fca.0.load28, i64 %45
  %47 = add nuw nsw i64 %41, 400007
  %48 = getelementptr [1 x i8], ptr @_QFEans, i64 %47
  %.unpack.1 = load i8, ptr %46, align 1, !tbaa !3
  store i8 %.unpack.1, ptr %48, align 1, !tbaa !3
  %49 = add nuw nsw i64 %41, 2
  %50 = getelementptr [1 x i8], ptr %.fca.0.load28, i64 %49
  %51 = add nuw nsw i64 %41, 400008
  %52 = getelementptr [1 x i8], ptr @_QFEans, i64 %51
  %.unpack.2 = load i8, ptr %50, align 1, !tbaa !3
  store i8 %.unpack.2, ptr %52, align 1, !tbaa !3
  %53 = add nuw nsw i64 %41, 3
  %54 = getelementptr [1 x i8], ptr %.fca.0.load28, i64 %53
  %55 = add nuw nsw i64 %41, 400009
  %56 = getelementptr [1 x i8], ptr @_QFEans, i64 %55
  %.unpack.3 = load i8, ptr %54, align 1, !tbaa !3
  store i8 %.unpack.3, ptr %56, align 1, !tbaa !3
  %57 = add nuw nsw i64 %41, 4
  %exitcond.not.3 = icmp eq i64 %57, 400005
  br i1 %exitcond.not.3, label %.loopexit, label %vec.epilog.scalar.ph, !llvm.loop !14

.loopexit:                                        ; preds = %vec.epilog.scalar.ph
  %58 = select i1 %18, i32 1, i32 %.op
  call void @free(ptr nonnull %.fca.0.load28)
  %59 = load i32, ptr %8, align 4, !tbaa !3
  %60 = icmp sgt i32 %59, 0
  br i1 %60, label %.lr.ph.preheader, label %._crit_edge.thread

.lr.ph.preheader:                                 ; preds = %.loopexit
  %61 = zext i32 %59 to i64
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %104
  %62 = phi i64 [ %105, %104 ], [ %61, %.lr.ph.preheader ]
  %.0159 = phi i32 [ %.1, %104 ], [ 0, %.lr.ph.preheader ]
  %.0143158 = phi i32 [ %.1144, %104 ], [ %58, %.lr.ph.preheader ]
  %.0145157 = phi i32 [ %.1146, %104 ], [ 0, %.lr.ph.preheader ]
  %63 = call ptr @_FortranAioBeginExternalFormattedInput(ptr nonnull @_QQcl.286129, i64 3, ptr null, i32 -1, ptr nonnull @_QQcl.d37dd3dca8cf94cf9937683e2d5722dc, i32 15)
  %64 = call i1 @_FortranAioInputAscii(ptr %63, ptr nonnull @_QFEquery, i64 100)
  %65 = call i32 @_FortranAioEndIoStatement(ptr %63)
  %66 = call i32 @_FortranACharacterCompareScalar1(ptr nonnull @_QFEquery, ptr nonnull @_QQcl.31, i64 1, i64 1)
  %67 = icmp eq i32 %66, 0
  br i1 %67, label %68, label %70

68:                                               ; preds = %.lr.ph
  %69 = add i32 %.0159, 1
  br label %104

70:                                               ; preds = %.lr.ph
  %71 = call ptr @_FortranAioBeginInternalListInput(ptr nonnull @_QFEquery, i64 100, ptr null, i64 0, ptr nonnull @_QQcl.d37dd3dca8cf94cf9937683e2d5722dc, i32 19)
  %72 = call i1 @_FortranAioInputInteger(ptr %71, ptr nonnull %9, i32 4)
  %73 = call i1 @_FortranAioInputInteger(ptr %71, ptr nonnull %7, i32 4)
  %74 = call i1 @_FortranAioInputAscii(ptr %71, ptr nonnull %6, i64 1)
  %75 = call i32 @_FortranAioEndIoStatement(ptr %71)
  %76 = load i32, ptr %7, align 4, !tbaa !3
  %77 = icmp eq i32 %76, 1
  %.fca.0.load24 = load i8, ptr %6, align 1, !tbaa !3
  br i1 %77, label %78, label %91

78:                                               ; preds = %70
  %79 = and i32 %.0159, -2147483647
  %80 = icmp eq i32 %79, 1
  br i1 %80, label %81, label %86

81:                                               ; preds = %78
  %82 = sext i32 %.0143158 to i64
  %83 = add nsw i64 %82, 400005
  %84 = getelementptr [1 x i8], ptr @_QFEans, i64 %83
  store i8 %.fca.0.load24, ptr %84, align 1, !tbaa !3
  %85 = add i32 %.0143158, 1
  br label %104

86:                                               ; preds = %78
  %87 = sext i32 %.0145157 to i64
  %88 = add nsw i64 %87, 400005
  %89 = getelementptr [1 x i8], ptr @_QFEans, i64 %88
  store i8 %.fca.0.load24, ptr %89, align 1, !tbaa !3
  %90 = add i32 %.0145157, -1
  br label %104

91:                                               ; preds = %70
  %92 = and i32 %.0159, 1
  %93 = icmp eq i32 %92, 0
  br i1 %93, label %94, label %99

94:                                               ; preds = %91
  %95 = sext i32 %.0143158 to i64
  %96 = add nsw i64 %95, 400005
  %97 = getelementptr [1 x i8], ptr @_QFEans, i64 %96
  store i8 %.fca.0.load24, ptr %97, align 1, !tbaa !3
  %98 = add i32 %.0143158, 1
  br label %104

99:                                               ; preds = %91
  %100 = sext i32 %.0145157 to i64
  %101 = add nsw i64 %100, 400005
  %102 = getelementptr [1 x i8], ptr @_QFEans, i64 %101
  store i8 %.fca.0.load24, ptr %102, align 1, !tbaa !3
  %103 = add i32 %.0145157, -1
  br label %104

104:                                              ; preds = %68, %81, %86, %94, %99
  %.1146 = phi i32 [ %.0145157, %68 ], [ %.0145157, %81 ], [ %90, %86 ], [ %.0145157, %94 ], [ %103, %99 ]
  %.1144 = phi i32 [ %.0143158, %68 ], [ %85, %81 ], [ %.0143158, %86 ], [ %98, %94 ], [ %.0143158, %99 ]
  %.1 = phi i32 [ %69, %68 ], [ %.0159, %81 ], [ %.0159, %86 ], [ %.0159, %94 ], [ %.0159, %99 ]
  %105 = add nsw i64 %62, -1
  %106 = icmp sgt i64 %62, 1
  br i1 %106, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %104
  %107 = and i32 %.1, 1
  %108 = icmp eq i32 %107, 0
  br i1 %108, label %._crit_edge.thread, label %120

._crit_edge.thread:                               ; preds = %.loopexit, %._crit_edge
  %.0143.lcssa167 = phi i32 [ %.1144, %._crit_edge ], [ %58, %.loopexit ]
  %.0145.lcssa166 = phi i32 [ %.1146, %._crit_edge ], [ 0, %.loopexit ]
  %109 = call ptr @_FortranAioBeginExternalListOutput(i32 -1, ptr nonnull @_QQcl.d37dd3dca8cf94cf9937683e2d5722dc, i32 41)
  %110 = add i32 %.0145.lcssa166, 1
  %111 = sext i32 %110 to i64
  %112 = add i32 %.0143.lcssa167, -1
  %113 = sext i32 %112 to i64
  %114 = add nsw i64 %111, 400005
  %115 = sub nsw i64 %113, %111
  %116 = call i64 @llvm.smax.i64(i64 %115, i64 -1)
  %117 = add nsw i64 %116, 1
  %118 = getelementptr [800011 x [1 x i8]], ptr @_QFEans, i64 0, i64 %114
  store ptr %118, ptr %1, align 8, !tbaa !7
  %.fca.1.gep126 = 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.gep126, align 8, !tbaa !7
  %.fca.2.gep128 = 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.gep128, align 8, !tbaa !7
  %.fca.3.gep130 = 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.gep130, align 4, !tbaa !7
  %.fca.4.gep132 = 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.gep132, align 1, !tbaa !7
  %.fca.5.gep134 = 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.gep134, align 2, !tbaa !7
  %.fca.6.gep136 = 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.gep136, align 1, !tbaa !7
  %.fca.7.0.0.gep138 = 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.gep138, align 8, !tbaa !7
  %.fca.7.0.1.gep140 = 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 %117, ptr %.fca.7.0.1.gep140, align 8, !tbaa !7
  %.fca.7.0.2.gep142 = 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.gep142, align 8, !tbaa !7
  %119 = call i1 @_FortranAioOutputDescriptor(ptr %109, ptr nonnull %1)
  br label %130

120:                                              ; preds = %._crit_edge
  %121 = call ptr @_FortranAioBeginExternalListOutput(i32 -1, ptr nonnull @_QQcl.d37dd3dca8cf94cf9937683e2d5722dc, i32 43)
  %122 = add i32 %.1144, -1
  %123 = sext i32 %122 to i64
  %124 = add i32 %.1146, 1
  %125 = sext i32 %124 to i64
  %126 = add nsw i64 %123, 400005
  %.neg = sub nsw i64 1, %125
  %.neg154 = add nsw i64 %.neg, %123
  %127 = call i64 @llvm.smax.i64(i64 %.neg154, i64 0)
  %128 = getelementptr [800011 x [1 x i8]], ptr @_QFEans, i64 0, i64 %126
  store ptr %128, ptr %2, align 8, !tbaa !7
  %.fca.1.gep106 = 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.gep106, align 8, !tbaa !7
  %.fca.2.gep108 = 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.gep108, align 8, !tbaa !7
  %.fca.3.gep110 = 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.gep110, align 4, !tbaa !7
  %.fca.4.gep112 = 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.gep112, align 1, !tbaa !7
  %.fca.5.gep114 = 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.gep114, align 2, !tbaa !7
  %.fca.6.gep116 = 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.gep116, align 1, !tbaa !7
  %.fca.7.0.0.gep118 = 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.gep118, align 8, !tbaa !7
  %.fca.7.0.1.gep120 = 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 %127, ptr %.fca.7.0.1.gep120, align 8, !tbaa !7
  %.fca.7.0.2.gep122 = 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.gep122, align 8, !tbaa !7
  %129 = call i1 @_FortranAioOutputDescriptor(ptr %121, ptr nonnull %2)
  br label %130

130:                                              ; preds = %._crit_edge.thread, %120
  %.sink = phi ptr [ %109, %._crit_edge.thread ], [ %121, %120 ]
  %131 = 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 i1 @_FortranAioInputInteger(ptr, ptr, i32) local_unnamed_addr

declare i32 @_FortranAioEndIoStatement(ptr) local_unnamed_addr

declare {} @_FortranATransferSize(ptr, ptr, ptr, ptr, i32, i64) 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) #1

attributes #0 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" }
attributes #1 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }

!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, !13}
!13 = !{!"llvm.loop.unroll.disable"}
!14 = distinct !{!14, !10}
