CHARACTER(200) S,T
READ*,S,T
DO I=1,LEN_TRIM(S)
  IF (S==T)THEN
    PRINT"(A)","Yes"
    STOP
  ENDIF
  S=TRIM(S(2:))//S(1:1)
END DO
PRINT"(A)","No"
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"

@_QFEs = internal global [200 x i8] undef
@_QFEt = internal global [200 x i8] undef
@_QQcl.d104d58b417afce5a0a5dda5fb865ce0 = linkonce constant [73 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_5724/source.f\00"
@_QQcl.284129 = linkonce constant [3 x i8] c"(A)"
@_QQcl.596573 = linkonce constant [3 x i8] c"Yes"
@_QQcl.4E6F = linkonce constant [2 x i8] c"No"
@_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 = tail call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.d104d58b417afce5a0a5dda5fb865ce0, i32 2)
  %4 = tail call i1 @_FortranAioInputAscii(ptr %3, ptr nonnull @_QFEs, i64 200)
  %5 = tail call i1 @_FortranAioInputAscii(ptr %3, ptr nonnull @_QFEt, i64 200)
  %6 = tail call i32 @_FortranAioEndIoStatement(ptr %3)
  br label %7

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

15:                                               ; preds = %7
  %16 = trunc i64 %8 to i32
  %17 = icmp ugt i32 %16, 2147483646
  %.not60 = select i1 %11, i1 true, i1 %17
  br i1 %.not60, label %select.unfold._crit_edge, label %.lr.ph57

.lr.ph57:                                         ; preds = %15
  %18 = add i32 %16, 1
  %.fca.1.gep11 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %1, i64 0, i32 1
  %.fca.2.gep12 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %1, i64 0, i32 2
  %.fca.3.gep13 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %1, i64 0, i32 3
  %.fca.4.gep14 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %1, i64 0, i32 4
  %.fca.5.gep15 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %1, i64 0, i32 5
  %.fca.6.gep16 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %1, i64 0, i32 6
  %.fca.1.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %2, i64 0, i32 1
  %.fca.2.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %2, i64 0, i32 2
  %.fca.3.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %2, i64 0, i32 3
  %.fca.4.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %2, i64 0, i32 4
  %.fca.5.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %2, i64 0, i32 5
  %.fca.6.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %2, i64 0, i32 6
  br label %19

19:                                               ; preds = %.lr.ph57, %select.unfold
  %.05055 = phi i32 [ %18, %.lr.ph57 ], [ %35, %select.unfold ]
  %20 = call i32 @_FortranACharacterCompareScalar1(ptr nonnull @_QFEs, ptr nonnull @_QFEt, i64 200, i64 200)
  %21 = icmp eq i32 %20, 0
  br i1 %21, label %22, label %27

22:                                               ; preds = %19
  %23 = call ptr @_FortranAioBeginExternalFormattedOutput(ptr nonnull @_QQcl.284129, i64 3, ptr null, i32 -1, ptr nonnull @_QQcl.d104d58b417afce5a0a5dda5fb865ce0, i32 5)
  %24 = call i1 @_FortranAioOutputAscii(ptr %23, ptr nonnull @_QQcl.596573, i64 3)
  %25 = call i32 @_FortranAioEndIoStatement(ptr %23)
  %26 = call {} @_FortranAStopStatement(i32 0, i1 false, i1 false)
  unreachable

27:                                               ; preds = %19
  store ptr getelementptr inbounds ([200 x i8], ptr @_QFEs, i64 0, i64 1), ptr %1, align 8, !tbaa !7
  store i64 199, ptr %.fca.1.gep11, align 8, !tbaa !7
  store i32 20180515, ptr %.fca.2.gep12, align 8, !tbaa !7
  store i8 0, ptr %.fca.3.gep13, align 4, !tbaa !7
  store i8 40, ptr %.fca.4.gep14, align 1, !tbaa !7
  store i8 0, ptr %.fca.5.gep15, align 2, !tbaa !7
  store i8 0, ptr %.fca.6.gep16, align 1, !tbaa !7
  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.gep, align 8, !tbaa !7
  store i8 0, ptr %.fca.3.gep, align 4, !tbaa !7
  store i8 40, ptr %.fca.4.gep, align 1, !tbaa !7
  store i8 2, ptr %.fca.5.gep, align 2, !tbaa !7
  store i8 0, ptr %.fca.6.gep, align 1, !tbaa !7
  %28 = call {} @_FortranATrim(ptr nonnull %2, ptr nonnull %1, ptr nonnull @_QQcl.d104d58b417afce5a0a5dda5fb865ce0, i32 8)
  %.fca.0.load = load ptr, ptr %2, align 8, !tbaa !7
  %.fca.1.load = load i64, ptr %.fca.1.gep, align 8, !tbaa !7
  %29 = add i64 %.fca.1.load, 1
  %30 = alloca i8, i64 %29, align 1
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %30, ptr align 1 %.fca.0.load, i64 %.fca.1.load, i1 false)
  %.unpack = load i8, ptr @_QFEs, align 16, !tbaa !3
  %31 = getelementptr [1 x i8], ptr %30, i64 %.fca.1.load
  store i8 %.unpack, ptr %31, align 1, !tbaa !3
  %32 = call i64 @llvm.smin.i64(i64 %29, i64 200)
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 16 @_QFEs, ptr nonnull align 1 %30, i64 %32, i1 false)
  %33 = sub i64 200, %32
  %34 = icmp sgt i64 %33, 0
  br i1 %34, label %.lr.ph.preheader, label %select.unfold

.lr.ph.preheader:                                 ; preds = %27
  %uglygep = getelementptr i8, ptr @_QFEs, i64 %32
  call void @llvm.memset.p0.i64(ptr align 1 %uglygep, i8 32, i64 %33, i1 false), !tbaa !3
  br label %select.unfold

select.unfold:                                    ; preds = %.lr.ph.preheader, %27
  call void @free(ptr %.fca.0.load)
  %35 = add nsw i32 %.05055, -1
  %36 = icmp sgt i32 %.05055, 1
  br i1 %36, label %19, label %select.unfold._crit_edge

select.unfold._crit_edge:                         ; preds = %select.unfold, %15
  %37 = call ptr @_FortranAioBeginExternalFormattedOutput(ptr nonnull @_QQcl.284129, i64 3, ptr null, i32 -1, ptr nonnull @_QQcl.d104d58b417afce5a0a5dda5fb865ce0, i32 10)
  %38 = call i1 @_FortranAioOutputAscii(ptr %37, ptr nonnull @_QQcl.4E6F, i64 2)
  %39 = call i32 @_FortranAioEndIoStatement(ptr %37)
  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 @_FortranAioBeginExternalFormattedOutput(ptr, i64, ptr, i32, ptr, i32) local_unnamed_addr

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

declare {} @_FortranAStopStatement(i32, i1, i1) local_unnamed_addr

declare {} @_FortranATrim(ptr, ptr, ptr, i32) 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: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2

; 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) #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: write) }
attributes #3 = { 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}
