PROGRAM ATCODER

implicit none
character(len=10) :: s
integer :: i,j
integer :: long(10)

read(*,*) s

long = 0
do i = 1, 10
  do j = i,10
    if ( s(j:j) == 'A' .or. s(j:j) == 'T' .or. s(j:j) == 'G' .or. s(j:j) == 'C' ) then
      long(i) = long(i) + 1
    else
      exit
    end if    
  end do
end do

write(*,'(i0)') maxval(long)

contains
!!!!!! サブルーチンは↓
!!!!!!

END PROGRAM ATCODER
; 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"

@_QFElong = internal unnamed_addr global [10 x i32] undef
@_QQcl.dce8ab51c78bca95bed4b3350ef20769 = linkonce constant [73 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_4654/source.f\00"
@_QQcl.41 = linkonce constant [1 x i8] c"A"
@_QQcl.54 = linkonce constant [1 x i8] c"T"
@_QQcl.47 = linkonce constant [1 x i8] c"G"
@_QQcl.43 = linkonce constant [1 x i8] c"C"
@_QQcl.28693029 = linkonce constant [4 x i8] c"(i0)"
@_QQEnvironmentDefaults = local_unnamed_addr constant ptr null

define void @_QQmain() local_unnamed_addr {
.preheader.preheader:
  %0 = alloca [10 x i8], align 1
  %1 = tail call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.dce8ab51c78bca95bed4b3350ef20769, i32 8)
  %2 = call i1 @_FortranAioInputAscii(ptr %1, ptr nonnull %0, i64 10)
  %3 = call i32 @_FortranAioEndIoStatement(ptr %1)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(40) @_QFElong, i8 0, i64 40, i1 false), !tbaa !3
  br label %.lr.ph

.lr.ph:                                           ; preds = %._crit_edge, %.preheader.preheader
  %indvars.iv = phi i64 [ 1, %.preheader.preheader ], [ %indvars.iv.next, %._crit_edge ]
  %4 = add nsw i64 %indvars.iv, -1
  %5 = getelementptr [10 x i32], ptr @_QFElong, i64 0, i64 %4
  br label %6

6:                                                ; preds = %.lr.ph, %20
  %indvars.iv21 = phi i64 [ %indvars.iv, %.lr.ph ], [ %indvars.iv.next22, %20 ]
  %7 = add nsw i64 %indvars.iv21, -1
  %8 = getelementptr [10 x [1 x i8]], ptr %0, i64 0, i64 %7
  %9 = call i32 @_FortranACharacterCompareScalar1(ptr %8, ptr nonnull @_QQcl.41, i64 1, i64 1)
  %10 = icmp eq i32 %9, 0
  %11 = call i32 @_FortranACharacterCompareScalar1(ptr %8, ptr nonnull @_QQcl.54, i64 1, i64 1)
  %12 = icmp eq i32 %11, 0
  %13 = or i1 %10, %12
  %14 = call i32 @_FortranACharacterCompareScalar1(ptr %8, ptr nonnull @_QQcl.47, i64 1, i64 1)
  %15 = icmp eq i32 %14, 0
  %16 = or i1 %13, %15
  %17 = call i32 @_FortranACharacterCompareScalar1(ptr %8, ptr nonnull @_QQcl.43, i64 1, i64 1)
  %18 = icmp eq i32 %17, 0
  %19 = or i1 %16, %18
  br i1 %19, label %20, label %._crit_edge

20:                                               ; preds = %6
  %21 = load i32, ptr %5, align 4, !tbaa !3
  %22 = add i32 %21, 1
  store i32 %22, ptr %5, align 4, !tbaa !3
  %indvars.iv.next22 = add nuw nsw i64 %indvars.iv21, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next22, 11
  br i1 %exitcond.not, label %._crit_edge, label %6

._crit_edge:                                      ; preds = %20, %6
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond25.not = icmp eq i64 %indvars.iv.next, 11
  br i1 %exitcond25.not, label %.lr.ph.i, label %.lr.ph

.lr.ph.i:                                         ; preds = %._crit_edge
  %23 = call ptr @_FortranAioBeginExternalFormattedOutput(ptr nonnull @_QQcl.28693029, i64 4, ptr null, i32 -1, ptr nonnull @_QQcl.dce8ab51c78bca95bed4b3350ef20769, i32 21)
  %24 = load i32, ptr @_QFElong, align 16, !tbaa !3
  %25 = load i32, ptr getelementptr inbounds ([10 x i32], ptr @_QFElong, i64 0, i64 1), align 4, !tbaa !3
  %26 = call i32 @llvm.smax.i32(i32 %25, i32 %24)
  %27 = load i32, ptr getelementptr inbounds ([10 x i32], ptr @_QFElong, i64 0, i64 2), align 8, !tbaa !3
  %28 = call i32 @llvm.smax.i32(i32 %27, i32 %26)
  %29 = load i32, ptr getelementptr inbounds ([10 x i32], ptr @_QFElong, i64 0, i64 3), align 4, !tbaa !3
  %30 = call i32 @llvm.smax.i32(i32 %29, i32 %28)
  %31 = load i32, ptr getelementptr inbounds ([10 x i32], ptr @_QFElong, i64 0, i64 4), align 16, !tbaa !3
  %32 = call i32 @llvm.smax.i32(i32 %31, i32 %30)
  %33 = load i32, ptr getelementptr inbounds ([10 x i32], ptr @_QFElong, i64 0, i64 5), align 4, !tbaa !3
  %34 = call i32 @llvm.smax.i32(i32 %33, i32 %32)
  %35 = load i32, ptr getelementptr inbounds ([10 x i32], ptr @_QFElong, i64 0, i64 6), align 8, !tbaa !3
  %36 = call i32 @llvm.smax.i32(i32 %35, i32 %34)
  %37 = load i32, ptr getelementptr inbounds ([10 x i32], ptr @_QFElong, i64 0, i64 7), align 4, !tbaa !3
  %38 = call i32 @llvm.smax.i32(i32 %37, i32 %36)
  %39 = load i32, ptr getelementptr inbounds ([10 x i32], ptr @_QFElong, i64 0, i64 8), align 16, !tbaa !3
  %40 = call i32 @llvm.smax.i32(i32 %39, i32 %38)
  %41 = load i32, ptr getelementptr inbounds ([10 x i32], ptr @_QFElong, i64 0, i64 9), align 4, !tbaa !3
  %42 = call i32 @llvm.smax.i32(i32 %41, i32 %40)
  %43 = call i1 @_FortranAioOutputInteger32(ptr %23, i32 %42)
  %44 = call i32 @_FortranAioEndIoStatement(ptr %23)
  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 @_FortranAioBeginExternalFormattedOutput(ptr, i64, ptr, i32, ptr, i32) local_unnamed_addr

declare i1 @_FortranAioOutputInteger32(ptr, i32) local_unnamed_addr

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #1 = { 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 = !{!"any data access", !5, i64 0}
!5 = !{!"any access", !6, i64 0}
!6 = !{!"Flang Type TBAA Root"}
