program sample
    implicit none
    character(100) :: s,t,u
    integer(8) :: i,j,m,n
    real(8)::a,b
    integer(8),allocatable :: x(:),y(:)
    read(*,*) s
    read(*,*) t
    m=len_trim(s)
    n=0
    

    do i=1,m
        if(s .eq. t)then
            write(*,*)'Yes'
            stop
        end if
        do j=2,m
            u(j:j)=s(j-1:j-1)
        end do
        u(1:1)=s(m:m)
        do j=1,m
            s(j:j)=u(j:j)
        end do

    end do

    
 
    write(*,*) 'No'
 
    stop
end program sample
  


; 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
@_QFEu = internal unnamed_addr global [100 x i8] undef
@_QQcl.2ef252a1b9858ceee0d7f19d9e947c40 = linkonce constant [73 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_5734/source.f\00"
@_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: noreturn
define void @_QQmain() local_unnamed_addr #0 {
  %1 = tail call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.2ef252a1b9858ceee0d7f19d9e947c40, i32 7)
  %2 = tail call i1 @_FortranAioInputAscii(ptr %1, ptr nonnull @_QFEs, i64 100)
  %3 = tail call i32 @_FortranAioEndIoStatement(ptr %1)
  %4 = tail call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.2ef252a1b9858ceee0d7f19d9e947c40, i32 8)
  %5 = tail call i1 @_FortranAioInputAscii(ptr %4, ptr nonnull @_QFEt, i64 100)
  %6 = tail call i32 @_FortranAioEndIoStatement(ptr %4)
  br label %7

7:                                                ; preds = %0, %7
  %8 = phi i64 [ 99, %0 ], [ %12, %7 ]
  %9 = getelementptr [100 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 = shl i64 %8, 32
  %sext = add i64 %16, 4294967296
  %17 = ashr exact i64 %sext, 32
  %18 = select i1 %11, i64 0, i64 %17
  %.fr32 = freeze i64 %18
  %19 = icmp sgt i64 %.fr32, 0
  br i1 %19, label %.lr.ph24, label %._crit_edge25

.lr.ph24:                                         ; preds = %15
  %20 = add nsw i64 %.fr32, -1
  %.not = icmp eq i64 %.fr32, 1
  %21 = getelementptr [100 x [1 x i8]], ptr @_QFEs, i64 0, i64 %20
  br i1 %.not, label %.lr.ph24.split.split.us, label %.lr.ph24.split.us.split.us

.lr.ph24.split.us.split.us:                       ; preds = %.lr.ph24, %.preheader.us.us.preheader
  %.022.us.us = phi i64 [ %25, %.preheader.us.us.preheader ], [ %.fr32, %.lr.ph24 ]
  %22 = tail call i32 @_FortranACharacterCompareScalar1(ptr nonnull @_QFEs, ptr nonnull @_QFEt, i64 100, i64 100)
  %23 = icmp eq i32 %22, 0
  br i1 %23, label %.split.us, label %.preheader.us.us.preheader

.preheader.us.us.preheader:                       ; preds = %.lr.ph24.split.us.split.us
  tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 getelementptr inbounds ([100 x i8], ptr @_QFEu, i64 0, i64 1), ptr nonnull align 16 @_QFEs, i64 %20, i1 false)
  %24 = load i8, ptr %21, align 1
  store i8 %24, ptr @_QFEu, align 16
  tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 16 @_QFEs, ptr nonnull align 16 @_QFEu, i64 %.fr32, i1 false)
  %25 = add nsw i64 %.022.us.us, -1
  %26 = icmp sgt i64 %.022.us.us, 1
  br i1 %26, label %.lr.ph24.split.us.split.us, label %._crit_edge25

.lr.ph24.split.split.us:                          ; preds = %.lr.ph24
  %27 = tail call i32 @_FortranACharacterCompareScalar1(ptr nonnull @_QFEs, ptr nonnull @_QFEt, i64 100, i64 100)
  %28 = icmp eq i32 %27, 0
  br i1 %28, label %.split.us, label %._crit_edge25.loopexit

.split.us:                                        ; preds = %.lr.ph24.split.us.split.us, %.lr.ph24.split.split.us
  %29 = tail call ptr @_FortranAioBeginExternalListOutput(i32 -1, ptr nonnull @_QQcl.2ef252a1b9858ceee0d7f19d9e947c40, i32 15)
  %30 = tail call i1 @_FortranAioOutputAscii(ptr %29, ptr nonnull @_QQcl.596573, i64 3)
  %31 = tail call i32 @_FortranAioEndIoStatement(ptr %29)
  %32 = tail call {} @_FortranAStopStatement(i32 0, i1 false, i1 false)
  unreachable

._crit_edge25.loopexit:                           ; preds = %.lr.ph24.split.split.us
  %33 = load i8, ptr %21, align 1
  store i8 %33, ptr @_QFEu, align 16
  store i8 %33, ptr @_QFEs, align 16
  br label %._crit_edge25

._crit_edge25:                                    ; preds = %.preheader.us.us.preheader, %._crit_edge25.loopexit, %15
  %34 = tail call ptr @_FortranAioBeginExternalListOutput(i32 -1, ptr nonnull @_QQcl.2ef252a1b9858ceee0d7f19d9e947c40, i32 30)
  %35 = tail call i1 @_FortranAioOutputAscii(ptr %34, ptr nonnull @_QQcl.4E6F, i64 2)
  %36 = tail call i32 @_FortranAioEndIoStatement(ptr %34)
  %37 = tail call {} @_FortranAStopStatement(i32 0, i1 false, i1 false)
  unreachable
}

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

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

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

attributes #0 = { noreturn }
attributes #1 = { 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"}
