program hitachi
	implicit none
	character(len=10) :: x, y
    integer :: i
    read(*,*) x
    y = "hi"
    do i = 1,5
    	if(x == y) then
        	write(*,*) "Yes"
            stop
        end if
        y = trim(y) // "hi"
    end do
    
    write(*,*) "No"
    stop
end program hitachi
; 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.82447a9d980c7413351c267acaa41a5d = linkonce constant [73 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_2126/source.f\00"
@_QQcl.6869 = linkonce local_unnamed_addr constant [2 x i8] c"hi"
@_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

; Function Attrs: noreturn
define void @_QQmain() local_unnamed_addr #1 {
.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 [10 x i8], align 1
  %3 = alloca [10 x i8], align 2
  %4 = tail call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.82447a9d980c7413351c267acaa41a5d, i32 5)
  %5 = call i1 @_FortranAioInputAscii(ptr %4, ptr nonnull %2, i64 10)
  %6 = call i32 @_FortranAioEndIoStatement(ptr %4)
  %7 = load i16, ptr @_QQcl.6869, align 1
  store i16 %7, ptr %3, align 2
  %uglygep = getelementptr inbounds i8, ptr %3, i64 2
  store i64 2314885530818453536, ptr %uglygep, align 2
  %.fca.1.gep15 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %0, i64 0, i32 1
  %.fca.2.gep17 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %0, i64 0, i32 2
  %.fca.3.gep19 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %0, i64 0, i32 3
  %.fca.4.gep21 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %0, i64 0, i32 4
  %.fca.5.gep23 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %0, i64 0, i32 5
  %.fca.6.gep25 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %0, i64 0, i32 6
  %.fca.1.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %1, i64 0, i32 1
  %.fca.2.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %1, i64 0, i32 2
  %.fca.3.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %1, i64 0, i32 3
  %.fca.4.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %1, i64 0, i32 4
  %.fca.5.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %1, i64 0, i32 5
  %.fca.6.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %1, i64 0, i32 6
  %8 = call i32 @_FortranACharacterCompareScalar1(ptr nonnull %2, ptr nonnull %3, i64 10, i64 10)
  %9 = icmp eq i32 %8, 0
  br i1 %9, label %10, label %15

10:                                               ; preds = %._crit_edge.3, %._crit_edge.2, %._crit_edge.1, %._crit_edge, %.preheader
  %11 = call ptr @_FortranAioBeginExternalListOutput(i32 -1, ptr nonnull @_QQcl.82447a9d980c7413351c267acaa41a5d, i32 9)
  %12 = call i1 @_FortranAioOutputAscii(ptr %11, ptr nonnull @_QQcl.596573, i64 3)
  %13 = call i32 @_FortranAioEndIoStatement(ptr %11)
  %14 = call {} @_FortranAStopStatement(i32 0, i1 false, i1 false)
  unreachable

15:                                               ; preds = %.preheader
  store ptr %3, ptr %0, align 8, !tbaa !3
  store i64 10, ptr %.fca.1.gep15, align 8, !tbaa !3
  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 0, ptr %.fca.5.gep23, align 2, !tbaa !3
  store i8 0, ptr %.fca.6.gep25, align 1, !tbaa !3
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %1, 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
  %16 = call {} @_FortranATrim(ptr nonnull %1, ptr nonnull %0, ptr nonnull @_QQcl.82447a9d980c7413351c267acaa41a5d, i32 12)
  %.fca.0.load = load ptr, ptr %1, align 8, !tbaa !3
  %.fca.1.load = load i64, ptr %.fca.1.gep, align 8, !tbaa !3
  %17 = add i64 %.fca.1.load, 2
  %18 = alloca i8, i64 %17, align 1
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %18, ptr align 1 %.fca.0.load, i64 %.fca.1.load, i1 false)
  %uglygep64 = getelementptr i8, ptr %18, i64 %.fca.1.load
  %19 = load i16, ptr @_QQcl.6869, align 1, !tbaa !7
  store i16 %19, ptr %uglygep64, align 1, !tbaa !7
  %20 = call i64 @llvm.smin.i64(i64 %17, i64 10)
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 2 %3, ptr nonnull align 1 %18, i64 %20, i1 false)
  %21 = sub i64 10, %20
  %22 = icmp sgt i64 %21, 0
  br i1 %22, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %15
  %uglygep65 = getelementptr i8, ptr %3, i64 %20
  call void @llvm.memset.p0.i64(ptr align 1 %uglygep65, i8 32, i64 %21, i1 false), !tbaa !7
  br label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph.preheader, %15
  call void @free(ptr %.fca.0.load)
  %23 = call i32 @_FortranACharacterCompareScalar1(ptr nonnull %2, ptr nonnull %3, i64 10, i64 10)
  %24 = icmp eq i32 %23, 0
  br i1 %24, label %10, label %25

25:                                               ; preds = %._crit_edge
  store ptr %3, ptr %0, align 8, !tbaa !3
  store i64 10, ptr %.fca.1.gep15, align 8, !tbaa !3
  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 0, ptr %.fca.5.gep23, align 2, !tbaa !3
  store i8 0, ptr %.fca.6.gep25, align 1, !tbaa !3
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %1, 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
  %26 = call {} @_FortranATrim(ptr nonnull %1, ptr nonnull %0, ptr nonnull @_QQcl.82447a9d980c7413351c267acaa41a5d, i32 12)
  %.fca.0.load.1 = load ptr, ptr %1, align 8, !tbaa !3
  %.fca.1.load.1 = load i64, ptr %.fca.1.gep, align 8, !tbaa !3
  %27 = add i64 %.fca.1.load.1, 2
  %28 = alloca i8, i64 %27, align 1
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %28, ptr align 1 %.fca.0.load.1, i64 %.fca.1.load.1, i1 false)
  %uglygep64.1 = getelementptr i8, ptr %28, i64 %.fca.1.load.1
  %29 = load i16, ptr @_QQcl.6869, align 1, !tbaa !7
  store i16 %29, ptr %uglygep64.1, align 1, !tbaa !7
  %30 = call i64 @llvm.smin.i64(i64 %27, i64 10)
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 2 %3, ptr nonnull align 1 %28, i64 %30, i1 false)
  %31 = sub i64 10, %30
  %32 = icmp sgt i64 %31, 0
  br i1 %32, label %.lr.ph.preheader.1, label %._crit_edge.1

.lr.ph.preheader.1:                               ; preds = %25
  %uglygep65.1 = getelementptr i8, ptr %3, i64 %30
  call void @llvm.memset.p0.i64(ptr align 1 %uglygep65.1, i8 32, i64 %31, i1 false), !tbaa !7
  br label %._crit_edge.1

._crit_edge.1:                                    ; preds = %.lr.ph.preheader.1, %25
  call void @free(ptr %.fca.0.load.1)
  %33 = call i32 @_FortranACharacterCompareScalar1(ptr nonnull %2, ptr nonnull %3, i64 10, i64 10)
  %34 = icmp eq i32 %33, 0
  br i1 %34, label %10, label %35

35:                                               ; preds = %._crit_edge.1
  store ptr %3, ptr %0, align 8, !tbaa !3
  store i64 10, ptr %.fca.1.gep15, align 8, !tbaa !3
  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 0, ptr %.fca.5.gep23, align 2, !tbaa !3
  store i8 0, ptr %.fca.6.gep25, align 1, !tbaa !3
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %1, 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
  %36 = call {} @_FortranATrim(ptr nonnull %1, ptr nonnull %0, ptr nonnull @_QQcl.82447a9d980c7413351c267acaa41a5d, i32 12)
  %.fca.0.load.2 = load ptr, ptr %1, align 8, !tbaa !3
  %.fca.1.load.2 = load i64, ptr %.fca.1.gep, align 8, !tbaa !3
  %37 = add i64 %.fca.1.load.2, 2
  %38 = alloca i8, i64 %37, align 1
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %38, ptr align 1 %.fca.0.load.2, i64 %.fca.1.load.2, i1 false)
  %uglygep64.2 = getelementptr i8, ptr %38, i64 %.fca.1.load.2
  %39 = load i16, ptr @_QQcl.6869, align 1, !tbaa !7
  store i16 %39, ptr %uglygep64.2, align 1, !tbaa !7
  %40 = call i64 @llvm.smin.i64(i64 %37, i64 10)
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 2 %3, ptr nonnull align 1 %38, i64 %40, i1 false)
  %41 = sub i64 10, %40
  %42 = icmp sgt i64 %41, 0
  br i1 %42, label %.lr.ph.preheader.2, label %._crit_edge.2

.lr.ph.preheader.2:                               ; preds = %35
  %uglygep65.2 = getelementptr i8, ptr %3, i64 %40
  call void @llvm.memset.p0.i64(ptr align 1 %uglygep65.2, i8 32, i64 %41, i1 false), !tbaa !7
  br label %._crit_edge.2

._crit_edge.2:                                    ; preds = %.lr.ph.preheader.2, %35
  call void @free(ptr %.fca.0.load.2)
  %43 = call i32 @_FortranACharacterCompareScalar1(ptr nonnull %2, ptr nonnull %3, i64 10, i64 10)
  %44 = icmp eq i32 %43, 0
  br i1 %44, label %10, label %45

45:                                               ; preds = %._crit_edge.2
  store ptr %3, ptr %0, align 8, !tbaa !3
  store i64 10, ptr %.fca.1.gep15, align 8, !tbaa !3
  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 0, ptr %.fca.5.gep23, align 2, !tbaa !3
  store i8 0, ptr %.fca.6.gep25, align 1, !tbaa !3
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %1, 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
  %46 = call {} @_FortranATrim(ptr nonnull %1, ptr nonnull %0, ptr nonnull @_QQcl.82447a9d980c7413351c267acaa41a5d, i32 12)
  %.fca.0.load.3 = load ptr, ptr %1, align 8, !tbaa !3
  %.fca.1.load.3 = load i64, ptr %.fca.1.gep, align 8, !tbaa !3
  %47 = add i64 %.fca.1.load.3, 2
  %48 = alloca i8, i64 %47, align 1
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %48, ptr align 1 %.fca.0.load.3, i64 %.fca.1.load.3, i1 false)
  %uglygep64.3 = getelementptr i8, ptr %48, i64 %.fca.1.load.3
  %49 = load i16, ptr @_QQcl.6869, align 1, !tbaa !7
  store i16 %49, ptr %uglygep64.3, align 1, !tbaa !7
  %50 = call i64 @llvm.smin.i64(i64 %47, i64 10)
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 2 %3, ptr nonnull align 1 %48, i64 %50, i1 false)
  %51 = sub i64 10, %50
  %52 = icmp sgt i64 %51, 0
  br i1 %52, label %.lr.ph.preheader.3, label %._crit_edge.3

.lr.ph.preheader.3:                               ; preds = %45
  %uglygep65.3 = getelementptr i8, ptr %3, i64 %50
  call void @llvm.memset.p0.i64(ptr align 1 %uglygep65.3, i8 32, i64 %51, i1 false), !tbaa !7
  br label %._crit_edge.3

._crit_edge.3:                                    ; preds = %.lr.ph.preheader.3, %45
  call void @free(ptr %.fca.0.load.3)
  %53 = call i32 @_FortranACharacterCompareScalar1(ptr nonnull %2, ptr nonnull %3, i64 10, i64 10)
  %54 = icmp eq i32 %53, 0
  br i1 %54, label %10, label %55

55:                                               ; preds = %._crit_edge.3
  store ptr %3, ptr %0, align 8, !tbaa !3
  store i64 10, ptr %.fca.1.gep15, align 8, !tbaa !3
  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 0, ptr %.fca.5.gep23, align 2, !tbaa !3
  store i8 0, ptr %.fca.6.gep25, align 1, !tbaa !3
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %1, 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
  %56 = call {} @_FortranATrim(ptr nonnull %1, ptr nonnull %0, ptr nonnull @_QQcl.82447a9d980c7413351c267acaa41a5d, i32 12)
  %.fca.0.load.4 = load ptr, ptr %1, align 8, !tbaa !3
  %.fca.1.load.4 = load i64, ptr %.fca.1.gep, align 8, !tbaa !3
  %57 = add i64 %.fca.1.load.4, 2
  %58 = alloca i8, i64 %57, align 1
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %58, ptr align 1 %.fca.0.load.4, i64 %.fca.1.load.4, i1 false)
  %uglygep64.4 = getelementptr i8, ptr %58, i64 %.fca.1.load.4
  %59 = load i16, ptr @_QQcl.6869, align 1, !tbaa !7
  store i16 %59, ptr %uglygep64.4, align 1, !tbaa !7
  %60 = call i64 @llvm.smin.i64(i64 %57, i64 10)
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 2 %3, ptr nonnull align 1 %58, i64 %60, i1 false)
  %61 = sub i64 10, %60
  %62 = icmp sgt i64 %61, 0
  br i1 %62, label %.lr.ph.preheader.4, label %._crit_edge.4

.lr.ph.preheader.4:                               ; preds = %55
  %uglygep65.4 = getelementptr i8, ptr %3, i64 %60
  call void @llvm.memset.p0.i64(ptr align 1 %uglygep65.4, i8 32, i64 %61, i1 false), !tbaa !7
  br label %._crit_edge.4

._crit_edge.4:                                    ; preds = %.lr.ph.preheader.4, %55
  call void @free(ptr %.fca.0.load.4)
  %63 = call ptr @_FortranAioBeginExternalListOutput(i32 -1, ptr nonnull @_QQcl.82447a9d980c7413351c267acaa41a5d, i32 15)
  %64 = call i1 @_FortranAioOutputAscii(ptr %63, ptr nonnull @_QQcl.4E6F, i64 2)
  %65 = call i32 @_FortranAioEndIoStatement(ptr %63)
  %66 = 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

declare {} @_FortranATrim(ptr, ptr, ptr, i32) 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) #2

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

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

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