program main

  implicit none

  !integer :: a,b
  character(100) :: s,t
  character(200) :: tmp
  integer :: lns,lnt

  read(*,*) s, t

  lns = len_trim( s )
  lnt = len_trim( t )
  s = trim( s )
  t = trim( t )


  !tmp = t(1:lnt+1)/s(1:lns+1)
  tmp = trim(t)//trim(s)

  print*, tmp


end program main
; 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 i8] undef
@_QFEt = internal global [100 x i8] undef
@_QFEtmp = internal global [200 x i8] undef
@_QQcl.a29b4dd847ff031a27e2a4b2d9630a53 = linkonce constant [73 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_2715/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 {
.preheader.preheader:
  %0 = alloca { ptr, i64, i32, i8, i8, i8, i8 }, align 8
  %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 = tail call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.a29b4dd847ff031a27e2a4b2d9630a53, i32 10)
  %7 = tail call i1 @_FortranAioInputAscii(ptr %6, ptr nonnull @_QFEs, i64 100)
  %8 = tail call i1 @_FortranAioInputAscii(ptr %6, ptr nonnull @_QFEt, i64 100)
  %9 = tail call i32 @_FortranAioEndIoStatement(ptr %6)
  store ptr @_QFEs, ptr %1, align 8, !tbaa !3
  %.fca.1.gep114 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %1, i64 0, i32 1
  store i64 100, ptr %.fca.1.gep114, align 8, !tbaa !3
  %.fca.2.gep115 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %1, i64 0, i32 2
  store i32 20180515, ptr %.fca.2.gep115, align 8, !tbaa !3
  %.fca.3.gep116 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %1, i64 0, i32 3
  store i8 0, ptr %.fca.3.gep116, align 4, !tbaa !3
  %.fca.4.gep117 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %1, i64 0, i32 4
  store i8 40, ptr %.fca.4.gep117, align 1, !tbaa !3
  %.fca.5.gep118 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %1, i64 0, i32 5
  store i8 0, ptr %.fca.5.gep118, align 2, !tbaa !3
  %.fca.6.gep119 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %1, i64 0, i32 6
  store i8 0, ptr %.fca.6.gep119, align 1, !tbaa !3
  %.fca.1.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %5, i64 0, i32 1
  %.fca.2.gep = 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.gep, align 8, !tbaa !3
  %.fca.3.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %5, 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 %5, 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 %5, 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 %5, i64 0, i32 6
  store i8 0, ptr %.fca.6.gep, align 1, !tbaa !3
  %10 = call {} @_FortranATrim(ptr nonnull %5, ptr nonnull %1, ptr nonnull @_QQcl.a29b4dd847ff031a27e2a4b2d9630a53, i32 14)
  %.fca.0.load = load ptr, ptr %5, align 8, !tbaa !3
  %.fca.1.load = load i64, ptr %.fca.1.gep, align 8, !tbaa !3
  %11 = call i64 @llvm.smin.i64(i64 %.fca.1.load, i64 100)
  call void @llvm.memmove.p0.p0.i64(ptr nonnull align 16 @_QFEs, ptr align 1 %.fca.0.load, i64 %11, i1 false)
  %12 = sub i64 100, %11
  %13 = icmp sgt i64 %12, 0
  br i1 %13, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %.preheader.preheader
  %uglygep = getelementptr i8, ptr @_QFEs, i64 %11
  call void @llvm.memset.p0.i64(ptr align 1 %uglygep, i8 32, i64 %12, i1 false), !tbaa !7
  br label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph.preheader, %.preheader.preheader
  call void @free(ptr %.fca.0.load)
  store ptr @_QFEt, ptr %0, align 8, !tbaa !3
  %.fca.1.gep232 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %0, i64 0, i32 1
  store i64 100, ptr %.fca.1.gep232, align 8, !tbaa !3
  %.fca.2.gep233 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %0, i64 0, i32 2
  store i32 20180515, ptr %.fca.2.gep233, align 8, !tbaa !3
  %.fca.3.gep234 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %0, i64 0, i32 3
  store i8 0, ptr %.fca.3.gep234, align 4, !tbaa !3
  %.fca.4.gep235 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %0, i64 0, i32 4
  store i8 40, ptr %.fca.4.gep235, align 1, !tbaa !3
  %.fca.5.gep236 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %0, i64 0, i32 5
  store i8 0, ptr %.fca.5.gep236, align 2, !tbaa !3
  %.fca.6.gep237 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %0, i64 0, i32 6
  store i8 0, ptr %.fca.6.gep237, align 1, !tbaa !3
  %.fca.1.gep11 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %4, i64 0, i32 1
  %.fca.2.gep13 = 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.gep13, align 8, !tbaa !3
  %.fca.3.gep15 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %4, 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 %4, 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 %4, 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 %4, i64 0, i32 6
  store i8 0, ptr %.fca.6.gep21, align 1, !tbaa !3
  %14 = call {} @_FortranATrim(ptr nonnull %4, ptr nonnull %0, ptr nonnull @_QQcl.a29b4dd847ff031a27e2a4b2d9630a53, i32 15)
  %.fca.0.load23 = load ptr, ptr %4, align 8, !tbaa !3
  %.fca.1.load26 = load i64, ptr %.fca.1.gep11, align 8, !tbaa !3
  %15 = call i64 @llvm.smin.i64(i64 %.fca.1.load26, i64 100)
  call void @llvm.memmove.p0.p0.i64(ptr nonnull align 16 @_QFEt, ptr align 1 %.fca.0.load23, i64 %15, i1 false)
  %16 = sub i64 100, %15
  %17 = icmp sgt i64 %16, 0
  br i1 %17, label %.lr.ph265.preheader, label %._crit_edge266

.lr.ph265.preheader:                              ; preds = %._crit_edge
  %uglygep273 = getelementptr i8, ptr @_QFEt, i64 %15
  call void @llvm.memset.p0.i64(ptr align 1 %uglygep273, i8 32, i64 %16, i1 false), !tbaa !7
  br label %._crit_edge266

._crit_edge266:                                   ; preds = %.lr.ph265.preheader, %._crit_edge
  call void @free(ptr %.fca.0.load23)
  %.fca.1.gep46 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %3, i64 0, i32 1
  %.fca.2.gep48 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %3, i64 0, i32 2
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %3, 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 %3, 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 %3, 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 %3, 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 %3, i64 0, i32 6
  store i8 0, ptr %.fca.6.gep56, align 1, !tbaa !3
  %18 = call {} @_FortranATrim(ptr nonnull %3, ptr nonnull %0, ptr nonnull @_QQcl.a29b4dd847ff031a27e2a4b2d9630a53, i32 19)
  %.fca.0.load58 = load ptr, ptr %3, align 8, !tbaa !3
  %.fca.1.load61 = load i64, ptr %.fca.1.gep46, align 8, !tbaa !3
  %.fca.1.gep81 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %2, i64 0, i32 1
  %.fca.2.gep83 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %2, i64 0, i32 2
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %2, i8 0, i64 16, i1 false)
  store i32 20180515, ptr %.fca.2.gep83, align 8, !tbaa !3
  %.fca.3.gep85 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %2, i64 0, i32 3
  store i8 0, ptr %.fca.3.gep85, align 4, !tbaa !3
  %.fca.4.gep87 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %2, i64 0, i32 4
  store i8 40, ptr %.fca.4.gep87, align 1, !tbaa !3
  %.fca.5.gep89 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %2, i64 0, i32 5
  store i8 2, ptr %.fca.5.gep89, align 2, !tbaa !3
  %.fca.6.gep91 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %2, i64 0, i32 6
  store i8 0, ptr %.fca.6.gep91, align 1, !tbaa !3
  %19 = call {} @_FortranATrim(ptr nonnull %2, ptr nonnull %1, ptr nonnull @_QQcl.a29b4dd847ff031a27e2a4b2d9630a53, i32 19)
  %.fca.0.load93 = load ptr, ptr %2, align 8, !tbaa !3
  %.fca.1.load96 = load i64, ptr %.fca.1.gep81, align 8, !tbaa !3
  %20 = add i64 %.fca.1.load96, %.fca.1.load61
  %21 = alloca i8, i64 %20, align 1
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %21, ptr align 1 %.fca.0.load58, i64 %.fca.1.load61, i1 false)
  %22 = icmp sgt i64 %.fca.1.load96, 0
  br i1 %22, label %.lr.ph268.preheader, label %._crit_edge269

.lr.ph268.preheader:                              ; preds = %._crit_edge266
  %uglygep274 = getelementptr i8, ptr %21, i64 %.fca.1.load61
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %uglygep274, ptr align 1 %.fca.0.load93, i64 %.fca.1.load96, i1 false), !tbaa !7
  br label %._crit_edge269

._crit_edge269:                                   ; preds = %.lr.ph268.preheader, %._crit_edge266
  %23 = call i64 @llvm.smin.i64(i64 %20, i64 200)
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 16 @_QFEtmp, ptr nonnull align 1 %21, i64 %23, i1 false)
  %24 = sub i64 200, %23
  %25 = icmp sgt i64 %24, 0
  br i1 %25, label %.lr.ph271.preheader, label %._crit_edge272

.lr.ph271.preheader:                              ; preds = %._crit_edge269
  %uglygep275 = getelementptr i8, ptr @_QFEtmp, i64 %23
  call void @llvm.memset.p0.i64(ptr align 1 %uglygep275, i8 32, i64 %24, i1 false), !tbaa !7
  br label %._crit_edge272

._crit_edge272:                                   ; preds = %.lr.ph271.preheader, %._crit_edge269
  call void @free(ptr %.fca.0.load93)
  call void @free(ptr %.fca.0.load58)
  %26 = call ptr @_FortranAioBeginExternalListOutput(i32 -1, ptr nonnull @_QQcl.a29b4dd847ff031a27e2a4b2d9630a53, i32 21)
  %27 = call i1 @_FortranAioOutputAscii(ptr %26, ptr nonnull @_QFEtmp, i64 200)
  %28 = call i32 @_FortranAioEndIoStatement(ptr %26)
  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

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

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) #2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

; 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) #4

attributes #0 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { 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 = !{!"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}
