character(4) :: s
integer :: i

read*,s(:)

do i = 1,3
  if( s(i:i)==s(i+1:i+1) )then
    print*,'Bad'
    stop
  endif
end do

print*,'Good'
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"

@_QQcl.0da82c831d45d78bd195f9b19adaa3c2 = linkonce constant [73 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_3900/source.f\00"
@_QQcl.426164 = linkonce constant [3 x i8] c"Bad"
@_QQcl.476F6F64 = linkonce constant [4 x i8] c"Good"
@_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.0da82c831d45d78bd195f9b19adaa3c2, i32 4)
  %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 %20, label %8

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

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

16:                                               ; preds = %12
  %17 = call ptr @_FortranAioBeginExternalListOutput(i32 -1, ptr nonnull @_QQcl.0da82c831d45d78bd195f9b19adaa3c2, i32 13)
  %18 = call i1 @_FortranAioOutputAscii(ptr %17, ptr nonnull @_QQcl.476F6F64, i64 4)
  %19 = call i32 @_FortranAioEndIoStatement(ptr %17)
  ret void

20:                                               ; preds = %12, %8, %0
  %21 = call ptr @_FortranAioBeginExternalListOutput(i32 -1, ptr nonnull @_QQcl.0da82c831d45d78bd195f9b19adaa3c2, i32 8)
  %22 = call i1 @_FortranAioOutputAscii(ptr %21, ptr nonnull @_QQcl.426164, i64 3)
  %23 = call i32 @_FortranAioEndIoStatement(ptr %21)
  %24 = 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

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