program a
	implicit none
    character(100) :: S, T
    character(200) :: ans
    
    read(*, *) S, T
    ans = trim(T) // trim(S)
    print *, trim(ans)
end program a
; 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 [200 x i8] undef
@_QFEs = internal global [100 x i8] undef
@_QFEt = internal global [100 x i8] undef
@_QQcl.8ccd45a7a90300e12f3b95a3b5a8b38e = linkonce constant [73 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_2711/source.f\00"
@_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 }, align 8
  %2 = alloca { ptr, i64, i32, i8, i8, i8, i8 }, align 8
  %3 = alloca { ptr, i64, i32, i8, i8, i8, i8 }, align 8
  %4 = alloca { ptr, i64, i32, i8, i8, i8, i8 }, align 8
  %5 = alloca { ptr, i64, i32, i8, i8, i8, i8 }, align 8
  %6 = alloca { ptr, i64, i32, i8, i8, i8, i8 }, align 8
  %7 = tail call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.8ccd45a7a90300e12f3b95a3b5a8b38e, i32 6)
  %8 = tail call i1 @_FortranAioInputAscii(ptr %7, ptr nonnull @_QFEs, i64 100)
  %9 = tail call i1 @_FortranAioInputAscii(ptr %7, ptr nonnull @_QFEt, i64 100)
  %10 = tail call i32 @_FortranAioEndIoStatement(ptr %7)
  store ptr @_QFEt, ptr %3, align 8, !tbaa !3
  %.fca.1.gep79 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %3, i64 0, i32 1
  store i64 100, ptr %.fca.1.gep79, align 8, !tbaa !3
  %.fca.2.gep80 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %3, i64 0, i32 2
  store i32 20180515, ptr %.fca.2.gep80, align 8, !tbaa !3
  %.fca.3.gep81 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %3, i64 0, i32 3
  store i8 0, ptr %.fca.3.gep81, align 4, !tbaa !3
  %.fca.4.gep82 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %3, i64 0, i32 4
  store i8 40, ptr %.fca.4.gep82, align 1, !tbaa !3
  %.fca.5.gep83 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %3, i64 0, i32 5
  store i8 0, ptr %.fca.5.gep83, align 2, !tbaa !3
  %.fca.6.gep84 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %3, i64 0, i32 6
  store i8 0, ptr %.fca.6.gep84, align 1, !tbaa !3
  %.fca.1.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %6, i64 0, i32 1
  %.fca.2.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %6, i64 0, i32 2
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %6, i8 0, i64 16, i1 false)
  store i32 20180515, ptr %.fca.2.gep, align 8, !tbaa !3
  %.fca.3.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %6, i64 0, i32 3
  store i8 0, ptr %.fca.3.gep, align 4, !tbaa !3
  %.fca.4.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %6, i64 0, i32 4
  store i8 40, ptr %.fca.4.gep, align 1, !tbaa !3
  %.fca.5.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %6, i64 0, i32 5
  store i8 2, ptr %.fca.5.gep, align 2, !tbaa !3
  %.fca.6.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %6, i64 0, i32 6
  store i8 0, ptr %.fca.6.gep, align 1, !tbaa !3
  %11 = call {} @_FortranATrim(ptr nonnull %6, ptr nonnull %3, ptr nonnull @_QQcl.8ccd45a7a90300e12f3b95a3b5a8b38e, i32 7)
  %.fca.0.load = load ptr, ptr %6, align 8, !tbaa !3
  %.fca.1.load = load i64, ptr %.fca.1.gep, align 8, !tbaa !3
  store ptr @_QFEs, ptr %2, align 8, !tbaa !3
  %.fca.1.gep171 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %2, i64 0, i32 1
  store i64 100, ptr %.fca.1.gep171, align 8, !tbaa !3
  %.fca.2.gep172 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %2, i64 0, i32 2
  store i32 20180515, ptr %.fca.2.gep172, align 8, !tbaa !3
  %.fca.3.gep173 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %2, i64 0, i32 3
  store i8 0, ptr %.fca.3.gep173, align 4, !tbaa !3
  %.fca.4.gep174 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %2, i64 0, i32 4
  store i8 40, ptr %.fca.4.gep174, align 1, !tbaa !3
  %.fca.5.gep175 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %2, i64 0, i32 5
  store i8 0, ptr %.fca.5.gep175, align 2, !tbaa !3
  %.fca.6.gep176 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %2, i64 0, i32 6
  store i8 0, ptr %.fca.6.gep176, align 1, !tbaa !3
  %.fca.1.gep11 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %5, i64 0, i32 1
  %.fca.2.gep13 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %5, i64 0, i32 2
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %5, i8 0, i64 16, i1 false)
  store i32 20180515, ptr %.fca.2.gep13, align 8, !tbaa !3
  %.fca.3.gep15 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %5, i64 0, i32 3
  store i8 0, ptr %.fca.3.gep15, align 4, !tbaa !3
  %.fca.4.gep17 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %5, i64 0, i32 4
  store i8 40, ptr %.fca.4.gep17, align 1, !tbaa !3
  %.fca.5.gep19 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %5, i64 0, i32 5
  store i8 2, ptr %.fca.5.gep19, align 2, !tbaa !3
  %.fca.6.gep21 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %5, i64 0, i32 6
  store i8 0, ptr %.fca.6.gep21, align 1, !tbaa !3
  %12 = call {} @_FortranATrim(ptr nonnull %5, ptr nonnull %2, ptr nonnull @_QQcl.8ccd45a7a90300e12f3b95a3b5a8b38e, i32 7)
  %.fca.0.load23 = load ptr, ptr %5, align 8, !tbaa !3
  %.fca.1.load26 = load i64, ptr %.fca.1.gep11, align 8, !tbaa !3
  %13 = add i64 %.fca.1.load26, %.fca.1.load
  %14 = alloca i8, i64 %13, align 1
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %14, ptr align 1 %.fca.0.load, i64 %.fca.1.load, i1 false)
  %15 = icmp sgt i64 %.fca.1.load26, 0
  br i1 %15, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %0
  %uglygep = getelementptr i8, ptr %14, i64 %.fca.1.load
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %uglygep, ptr align 1 %.fca.0.load23, i64 %.fca.1.load26, i1 false), !tbaa !7
  br label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph.preheader, %0
  %16 = call i64 @llvm.smin.i64(i64 %13, i64 200)
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 16 @_QFEans, ptr nonnull align 1 %14, i64 %16, i1 false)
  %17 = sub i64 200, %16
  %18 = icmp sgt i64 %17, 0
  br i1 %18, label %.lr.ph200.preheader, label %._crit_edge201

.lr.ph200.preheader:                              ; preds = %._crit_edge
  %uglygep202 = getelementptr i8, ptr @_QFEans, i64 %16
  call void @llvm.memset.p0.i64(ptr align 1 %uglygep202, i8 32, i64 %17, i1 false), !tbaa !7
  br label %._crit_edge201

._crit_edge201:                                   ; preds = %.lr.ph200.preheader, %._crit_edge
  call void @free(ptr %.fca.0.load23)
  call void @free(ptr %.fca.0.load)
  %19 = call ptr @_FortranAioBeginExternalListOutput(i32 -1, ptr nonnull @_QQcl.8ccd45a7a90300e12f3b95a3b5a8b38e, i32 8)
  store ptr @_QFEans, ptr %1, align 8, !tbaa !3
  %.fca.1.gep185 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %1, i64 0, i32 1
  store i64 200, ptr %.fca.1.gep185, align 8, !tbaa !3
  %.fca.2.gep186 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %1, i64 0, i32 2
  store i32 20180515, ptr %.fca.2.gep186, align 8, !tbaa !3
  %.fca.3.gep187 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %1, i64 0, i32 3
  store i8 0, ptr %.fca.3.gep187, align 4, !tbaa !3
  %.fca.4.gep188 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %1, i64 0, i32 4
  store i8 40, ptr %.fca.4.gep188, align 1, !tbaa !3
  %.fca.5.gep189 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %1, i64 0, i32 5
  store i8 0, ptr %.fca.5.gep189, align 2, !tbaa !3
  %.fca.6.gep190 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %1, i64 0, i32 6
  store i8 0, ptr %.fca.6.gep190, align 1, !tbaa !3
  %.fca.1.gep46 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %4, i64 0, i32 1
  %.fca.2.gep48 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %4, i64 0, i32 2
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %4, i8 0, i64 16, i1 false)
  store i32 20180515, ptr %.fca.2.gep48, align 8, !tbaa !3
  %.fca.3.gep50 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %4, i64 0, i32 3
  store i8 0, ptr %.fca.3.gep50, align 4, !tbaa !3
  %.fca.4.gep52 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %4, i64 0, i32 4
  store i8 40, ptr %.fca.4.gep52, align 1, !tbaa !3
  %.fca.5.gep54 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %4, i64 0, i32 5
  store i8 2, ptr %.fca.5.gep54, align 2, !tbaa !3
  %.fca.6.gep56 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %4, i64 0, i32 6
  store i8 0, ptr %.fca.6.gep56, align 1, !tbaa !3
  %20 = call {} @_FortranATrim(ptr nonnull %4, ptr nonnull %1, ptr nonnull @_QQcl.8ccd45a7a90300e12f3b95a3b5a8b38e, i32 8)
  %.fca.0.load58 = load ptr, ptr %4, align 8, !tbaa !3
  %.fca.1.load61 = load i64, ptr %.fca.1.gep46, align 8, !tbaa !3
  %21 = call i1 @_FortranAioOutputAscii(ptr %19, ptr %.fca.0.load58, i64 %.fca.1.load61)
  call void @free(ptr %.fca.0.load58)
  %22 = call i32 @_FortranAioEndIoStatement(ptr %19)
  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 {} @_FortranATrim(ptr, ptr, ptr, i32) local_unnamed_addr

declare ptr @_FortranAioBeginExternalListOutput(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.smin.i64(i64, i64) #1

; 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) #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 nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" }
attributes #1 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = !{!"descriptor member", !5, i64 0}
!5 = !{!"any access", !6, i64 0}
!6 = !{!"Flang Type TBAA Root"}
!7 = !{!8, !8, i64 0}
!8 = !{!"any data access", !5, i64 0}
