character a*10, b*10, c*10
integer lena, lenb
read*, a, b, c
lena=len_trim(a)
lenb=len_trim(b)
if(a(lena:lena) == b(1:1) .and. b(lenb:lenb) == c(1:1)) then
	print*, 'YES'
else 
	print*,'NO'
end if
end
; 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"

@_QQcl.691ff09a3b347ceb968b5d9217e13572 = linkonce constant [73 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_7322/source.f\00"
@_QQcl.594553 = linkonce constant [3 x i8] c"YES"
@_QQcl.4E4F = linkonce constant [2 x i8] c"NO"
@_QQEnvironmentDefaults = local_unnamed_addr constant ptr null

define void @_QQmain() local_unnamed_addr {
  %1 = alloca [10 x i8], align 1
  %2 = alloca [10 x i8], align 1
  %3 = alloca [10 x i8], align 1
  %4 = tail call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.691ff09a3b347ceb968b5d9217e13572, i32 3)
  %5 = call i1 @_FortranAioInputAscii(ptr %4, ptr nonnull %1, i64 10)
  %6 = call i1 @_FortranAioInputAscii(ptr %4, ptr nonnull %2, i64 10)
  %7 = call i1 @_FortranAioInputAscii(ptr %4, ptr nonnull %3, i64 10)
  %8 = call i32 @_FortranAioEndIoStatement(ptr %4)
  br label %9

9:                                                ; preds = %0, %9
  %10 = phi i64 [ 9, %0 ], [ %14, %9 ]
  %11 = getelementptr [10 x [1 x i8]], ptr %1, i64 0, i64 %10
  %12 = load i8, ptr %11, align 1, !tbaa !3
  %13 = icmp eq i8 %12, 32
  %14 = add nsw i64 %10, -1
  %15 = icmp ne i64 %10, 0
  %16 = and i1 %13, %15
  br i1 %16, label %9, label %.preheader

.preheader:                                       ; preds = %9, %.preheader
  %17 = phi i64 [ %21, %.preheader ], [ 9, %9 ]
  %18 = getelementptr [10 x [1 x i8]], ptr %2, i64 0, i64 %17
  %19 = load i8, ptr %18, align 1, !tbaa !3
  %20 = icmp eq i8 %19, 32
  %21 = add nsw i64 %17, -1
  %22 = icmp ne i64 %17, 0
  %23 = and i1 %20, %22
  br i1 %23, label %.preheader, label %24

24:                                               ; preds = %.preheader
  %25 = shl i64 %10, 32
  %sext = add i64 %25, 4294967296
  %26 = ashr exact i64 %sext, 32
  %.op = add nsw i64 %26, -1
  %27 = select i1 %13, i64 -1, i64 %.op
  %28 = getelementptr [10 x [1 x i8]], ptr %1, i64 0, i64 %27
  %29 = call i32 @_FortranACharacterCompareScalar1(ptr %28, ptr nonnull %2, i64 1, i64 1)
  %30 = shl i64 %17, 32
  %sext3 = add i64 %30, 4294967296
  %31 = ashr exact i64 %sext3, 32
  %.op4 = add nsw i64 %31, -1
  %32 = select i1 %20, i64 -1, i64 %.op4
  %33 = getelementptr [10 x [1 x i8]], ptr %2, i64 0, i64 %32
  %34 = call i32 @_FortranACharacterCompareScalar1(ptr %33, ptr nonnull %3, i64 1, i64 1)
  %35 = or i32 %34, %29
  %36 = icmp eq i32 %35, 0
  br i1 %36, label %37, label %40

37:                                               ; preds = %24
  %38 = call ptr @_FortranAioBeginExternalListOutput(i32 -1, ptr nonnull @_QQcl.691ff09a3b347ceb968b5d9217e13572, i32 7)
  %39 = call i1 @_FortranAioOutputAscii(ptr %38, ptr nonnull @_QQcl.594553, i64 3)
  br label %43

40:                                               ; preds = %24
  %41 = call ptr @_FortranAioBeginExternalListOutput(i32 -1, ptr nonnull @_QQcl.691ff09a3b347ceb968b5d9217e13572, i32 9)
  %42 = call i1 @_FortranAioOutputAscii(ptr %41, ptr nonnull @_QQcl.4E4F, i64 2)
  br label %43

43:                                               ; preds = %37, %40
  %.sink = phi ptr [ %38, %37 ], [ %41, %40 ]
  %44 = 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 i32 @_FortranACharacterCompareScalar1(ptr, ptr, i64, i64) local_unnamed_addr

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

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

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