program abc131a
  implicit none
  character(len=4, kind=1) :: s
  integer :: i
  logical :: isGood= .True.
  read(*,*) s


  do i = 1, 3
    if ( s(i:i) == s(i+1:i+1) ) then
      isGood = .False.
    endif
  enddo

  if (isGood) then
    print *, 'Good'
  else
    print *, 'Bad'
  endif

end program abc131a

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

@_QFEisgood = internal unnamed_addr global i1 false
@_QQcl.be8c45e4cd91f234384f2fcfd50e7247 = linkonce constant [73 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_3913/source.f\00"
@_QQcl.476F6F64 = linkonce constant [4 x i8] c"Good"
@_QQcl.426164 = linkonce constant [3 x i8] c"Bad"
@_QQEnvironmentDefaults = local_unnamed_addr constant ptr null

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

8:                                                ; preds = %0
  store i1 true, ptr @_QFEisgood, align 1
  br label %9

9:                                                ; preds = %8, %0
  %10 = getelementptr inbounds [4 x [1 x i8]], ptr %1, i64 0, i64 2
  %11 = call i32 @_FortranACharacterCompareScalar1(ptr nonnull %5, ptr nonnull %10, i64 1, i64 1)
  %12 = icmp eq i32 %11, 0
  br i1 %12, label %13, label %14

13:                                               ; preds = %9
  store i1 true, ptr @_QFEisgood, align 1
  br label %14

14:                                               ; preds = %13, %9
  %15 = getelementptr inbounds [4 x [1 x i8]], ptr %1, i64 0, i64 3
  %16 = call i32 @_FortranACharacterCompareScalar1(ptr nonnull %10, ptr nonnull %15, i64 1, i64 1)
  %17 = icmp eq i32 %16, 0
  br i1 %17, label %.thread, label %18

.thread:                                          ; preds = %14
  store i1 true, ptr @_QFEisgood, align 1
  br label %22

18:                                               ; preds = %14
  %.b.pre = load i1, ptr @_QFEisgood, align 1
  br i1 %.b.pre, label %22, label %19

19:                                               ; preds = %18
  %20 = call ptr @_FortranAioBeginExternalListOutput(i32 -1, ptr nonnull @_QQcl.be8c45e4cd91f234384f2fcfd50e7247, i32 16)
  %21 = call i1 @_FortranAioOutputAscii(ptr %20, ptr nonnull @_QQcl.476F6F64, i64 4)
  br label %25

22:                                               ; preds = %.thread, %18
  %23 = call ptr @_FortranAioBeginExternalListOutput(i32 -1, ptr nonnull @_QQcl.be8c45e4cd91f234384f2fcfd50e7247, i32 18)
  %24 = call i1 @_FortranAioOutputAscii(ptr %23, ptr nonnull @_QQcl.426164, i64 3)
  br label %25

25:                                               ; preds = %19, %22
  %.sink = phi ptr [ %20, %19 ], [ %23, %22 ]
  %26 = 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}
