program main
	integer i
	character(100) S, T
	character last
	read(*, *) S, T	
	do i = 1, 110
		if(trim(S) == trim(T)) then
			write(*, *) 'Yes'
			exit
		else
			last = S(len_trim(S):len_trim(S))
			S = last // S(1:len_trim(S)-1)
		end if
		if(i == 110) then
			write(*, *) 'No'
		end if
	end do
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
@_QQcl.b5d4334a2d9fb794a433c3089e5056a9 = linkonce constant [73 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_5728/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: 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
  %.sroa.0 = alloca i8, align 1
  %5 = tail call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.b5d4334a2d9fb794a433c3089e5056a9, i32 5)
  %6 = tail call i1 @_FortranAioInputAscii(ptr %5, ptr nonnull @_QFEs, i64 100)
  %7 = tail call i1 @_FortranAioInputAscii(ptr %5, ptr nonnull @_QFEt, i64 100)
  %8 = tail call i32 @_FortranAioEndIoStatement(ptr %5)
  %.fca.1.gep48 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %2, i64 0, i32 1
  %.fca.2.gep49 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %2, i64 0, i32 2
  %.fca.3.gep50 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %2, i64 0, i32 3
  %.fca.4.gep51 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %2, i64 0, i32 4
  %.fca.5.gep52 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %2, i64 0, i32 5
  %.fca.6.gep53 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %2, i64 0, i32 6
  %.fca.1.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %4, i64 0, i32 1
  %.fca.2.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %4, i64 0, i32 2
  %.fca.3.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %4, i64 0, i32 3
  %.fca.4.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %4, i64 0, i32 4
  %.fca.5.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %4, i64 0, i32 5
  %.fca.6.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %4, i64 0, i32 6
  %.fca.1.gep112 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %1, i64 0, i32 1
  %.fca.2.gep113 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %1, i64 0, i32 2
  %.fca.3.gep114 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %1, i64 0, i32 3
  %.fca.4.gep115 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %1, i64 0, i32 4
  %.fca.5.gep116 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %1, i64 0, i32 5
  %.fca.6.gep117 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %1, i64 0, i32 6
  %.fca.1.gep15 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %3, i64 0, i32 1
  %.fca.2.gep17 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %3, i64 0, i32 2
  %.fca.3.gep19 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %3, i64 0, i32 3
  %.fca.4.gep21 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %3, i64 0, i32 4
  %.fca.5.gep23 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %3, i64 0, i32 5
  %.fca.6.gep25 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %3, i64 0, i32 6
  br label %9

9:                                                ; preds = %._crit_edge144, %0
  %.0146 = phi i32 [ 1, %0 ], [ %61, %._crit_edge144 ]
  store ptr @_QFEs, ptr %2, align 8, !tbaa !3
  store i64 100, ptr %.fca.1.gep48, align 8, !tbaa !3
  store i32 20180515, ptr %.fca.2.gep49, align 8, !tbaa !3
  store i8 0, ptr %.fca.3.gep50, align 4, !tbaa !3
  store i8 40, ptr %.fca.4.gep51, align 1, !tbaa !3
  store i8 0, ptr %.fca.5.gep52, align 2, !tbaa !3
  store i8 0, ptr %.fca.6.gep53, align 1, !tbaa !3
  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.gep, align 8, !tbaa !3
  store i8 0, ptr %.fca.3.gep, align 4, !tbaa !3
  store i8 40, ptr %.fca.4.gep, align 1, !tbaa !3
  store i8 2, ptr %.fca.5.gep, align 2, !tbaa !3
  store i8 0, ptr %.fca.6.gep, align 1, !tbaa !3
  %10 = call {} @_FortranATrim(ptr nonnull %4, ptr nonnull %2, ptr nonnull @_QQcl.b5d4334a2d9fb794a433c3089e5056a9, i32 6)
  %.fca.0.load = load ptr, ptr %4, align 8, !tbaa !3
  %.fca.1.load = load i64, ptr %.fca.1.gep, align 8, !tbaa !3
  store ptr @_QFEt, ptr %1, align 8, !tbaa !3
  store i64 100, ptr %.fca.1.gep112, align 8, !tbaa !3
  store i32 20180515, ptr %.fca.2.gep113, align 8, !tbaa !3
  store i8 0, ptr %.fca.3.gep114, align 4, !tbaa !3
  store i8 40, ptr %.fca.4.gep115, align 1, !tbaa !3
  store i8 0, ptr %.fca.5.gep116, align 2, !tbaa !3
  store i8 0, ptr %.fca.6.gep117, align 1, !tbaa !3
  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.gep17, align 8, !tbaa !3
  store i8 0, ptr %.fca.3.gep19, align 4, !tbaa !3
  store i8 40, ptr %.fca.4.gep21, align 1, !tbaa !3
  store i8 2, ptr %.fca.5.gep23, align 2, !tbaa !3
  store i8 0, ptr %.fca.6.gep25, align 1, !tbaa !3
  %11 = call {} @_FortranATrim(ptr nonnull %3, ptr nonnull %1, ptr nonnull @_QQcl.b5d4334a2d9fb794a433c3089e5056a9, i32 6)
  %.fca.0.load27 = load ptr, ptr %3, align 8, !tbaa !3
  %.fca.1.load30 = load i64, ptr %.fca.1.gep15, align 8, !tbaa !3
  %12 = call i32 @_FortranACharacterCompareScalar1(ptr %.fca.0.load, ptr %.fca.0.load27, i64 %.fca.1.load, i64 %.fca.1.load30)
  %13 = icmp eq i32 %12, 0
  call void @free(ptr %.fca.0.load27)
  call void @free(ptr %.fca.0.load)
  br i1 %13, label %14, label %.preheader135

14:                                               ; preds = %9
  %15 = call ptr @_FortranAioBeginExternalListOutput(i32 -1, ptr nonnull @_QQcl.b5d4334a2d9fb794a433c3089e5056a9, i32 8)
  %16 = call i1 @_FortranAioOutputAscii(ptr %15, ptr nonnull @_QQcl.596573, i64 3)
  br label %.loopexit

.preheader135:                                    ; preds = %9, %.preheader135
  %17 = phi i64 [ %21, %.preheader135 ], [ 99, %9 ]
  %18 = getelementptr [100 x [1 x i8]], ptr @_QFEs, i64 0, i64 %17
  %19 = load i8, ptr %18, align 1, !tbaa !7
  %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 %.preheader135, label %.preheader134

.preheader134:                                    ; preds = %.preheader135, %.preheader134
  %24 = phi i64 [ %28, %.preheader134 ], [ 99, %.preheader135 ]
  %25 = getelementptr [100 x [1 x i8]], ptr @_QFEs, i64 0, i64 %24
  %26 = load i8, ptr %25, align 1, !tbaa !7
  %27 = icmp eq i8 %26, 32
  %28 = add nsw i64 %24, -1
  %29 = icmp ne i64 %24, 0
  %30 = and i1 %27, %29
  br i1 %30, label %.preheader134, label %.peel.begin

.peel.begin:                                      ; preds = %.preheader134
  %31 = shl i64 %17, 32
  %sext = add i64 %31, 4294967296
  %32 = ashr exact i64 %sext, 32
  %33 = select i1 %20, i64 0, i64 %32
  %34 = shl i64 %24, 32
  %sext132 = add i64 %34, 4294967296
  %35 = ashr exact i64 %sext132, 32
  %36 = select i1 %27, i64 0, i64 %35
  %37 = add nsw i64 %33, -1
  %38 = getelementptr [100 x [1 x i8]], ptr @_QFEs, i64 0, i64 %37
  %39 = icmp sge i64 %36, %33
  %40 = zext i1 %39 to i64
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %.sroa.0, ptr align 1 %38, i64 %40, i1 false)
  %.sroa.0.0..sroa.0.0..sroa.0.promoted = load i8, ptr %.sroa.0, align 1, !tbaa !7
  %spec.select = select i1 %39, i8 %.sroa.0.0..sroa.0.0..sroa.0.promoted, i8 32
  store i8 %spec.select, ptr %.sroa.0, align 1, !tbaa !7
  br label %41

41:                                               ; preds = %.peel.begin, %41
  %42 = phi i64 [ 99, %.peel.begin ], [ %46, %41 ]
  %43 = getelementptr [100 x [1 x i8]], ptr @_QFEs, i64 0, i64 %42
  %44 = load i8, ptr %43, align 1, !tbaa !7
  %45 = icmp eq i8 %44, 32
  %46 = add nsw i64 %42, -1
  %47 = icmp ne i64 %42, 0
  %48 = and i1 %45, %47
  br i1 %48, label %41, label %49

49:                                               ; preds = %41
  %sext133 = shl i64 %42, 32
  %50 = ashr exact i64 %sext133, 32
  %51 = call i64 @llvm.smax.i64(i64 %50, i64 0)
  %52 = select i1 %45, i64 0, i64 %51
  %53 = add nuw nsw i64 %52, 1
  %54 = alloca i8, i64 %53, align 1
  store i8 %spec.select, ptr %54, align 1
  %.not = icmp eq i64 %52, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %49
  %uglygep = getelementptr inbounds i8, ptr %54, i64 1
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %uglygep, ptr nonnull align 16 @_QFEs, i64 %52, i1 false), !tbaa !7
  br label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph.preheader, %49
  %55 = call i64 @llvm.smin.i64(i64 %53, i64 100)
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 16 @_QFEs, ptr nonnull align 1 %54, i64 %55, i1 false)
  %56 = icmp ult i64 %55, 100
  br i1 %56, label %.lr.ph143.preheader, label %._crit_edge144

.lr.ph143.preheader:                              ; preds = %._crit_edge
  %57 = sub nuw nsw i64 100, %55
  %uglygep154 = getelementptr i8, ptr @_QFEs, i64 %55
  %smin = call i64 @llvm.smin.i64(i64 %57, i64 1)
  %58 = add nuw nsw i64 %55, %smin
  %59 = sub nuw nsw i64 101, %58
  call void @llvm.memset.p0.i64(ptr align 1 %uglygep154, i8 32, i64 %59, i1 false), !tbaa !7
  br label %._crit_edge144

._crit_edge144:                                   ; preds = %.lr.ph143.preheader, %._crit_edge
  %60 = icmp eq i32 %.0146, 110
  %61 = add nuw nsw i32 %.0146, 1
  br i1 %60, label %.loopexit.loopexit, label %9

.loopexit.loopexit:                               ; preds = %._crit_edge144
  %62 = call ptr @_FortranAioBeginExternalListOutput(i32 -1, ptr nonnull @_QQcl.b5d4334a2d9fb794a433c3089e5056a9, i32 15)
  %63 = call i1 @_FortranAioOutputAscii(ptr %62, ptr nonnull @_QQcl.4E6F, i64 2)
  br label %.loopexit

.loopexit:                                        ; preds = %.loopexit.loopexit, %14
  %.sink = phi ptr [ %62, %.loopexit.loopexit ], [ %15, %14 ]
  %64 = 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 {} @_FortranATrim(ptr, ptr, ptr, i32) 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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.smax.i64(i64, i64) #1

; 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}
