program rainy_season
  implicit none
  character(3) :: s
  integer :: n
  read(*,*) s
  if (s == 'RRR') then
    n = 3
  else if (s == 'SRR' .or. s == 'RRS') then
    n = 2
  else if (s == 'SSS') then
    n = 0
  else
    n = 1
  end if
  write(*,'(i0)') n
end program rainy_season
; 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.5429e49cd3b7b215b80e8104df06544e = linkonce constant [72 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_782/source.f\00"
@_QQcl.525252 = linkonce constant [3 x i8] c"RRR"
@_QQcl.535252 = linkonce constant [3 x i8] c"SRR"
@_QQcl.525253 = linkonce constant [3 x i8] c"RRS"
@_QQcl.535353 = linkonce constant [3 x i8] c"SSS"
@_QQcl.28693029 = linkonce constant [4 x i8] c"(i0)"
@_QQEnvironmentDefaults = local_unnamed_addr constant ptr null

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

7:                                                ; preds = %0
  %8 = call i32 @_FortranACharacterCompareScalar1(ptr nonnull %1, ptr nonnull @_QQcl.535252, i64 3, i64 3)
  %9 = icmp eq i32 %8, 0
  %10 = call i32 @_FortranACharacterCompareScalar1(ptr nonnull %1, ptr nonnull @_QQcl.525253, i64 3, i64 3)
  %11 = icmp eq i32 %10, 0
  %12 = or i1 %9, %11
  br i1 %12, label %16, label %13

13:                                               ; preds = %7
  %14 = call i32 @_FortranACharacterCompareScalar1(ptr nonnull %1, ptr nonnull @_QQcl.535353, i64 3, i64 3)
  %15 = icmp ne i32 %14, 0
  %. = zext i1 %15 to i32
  br label %16

16:                                               ; preds = %13, %7, %0
  %.0 = phi i32 [ 3, %0 ], [ 2, %7 ], [ %., %13 ]
  %17 = call ptr @_FortranAioBeginExternalFormattedOutput(ptr nonnull @_QQcl.28693029, i64 4, ptr null, i32 -1, ptr nonnull @_QQcl.5429e49cd3b7b215b80e8104df06544e, i32 15)
  %18 = call i1 @_FortranAioOutputInteger32(ptr %17, i32 %.0)
  %19 = call i32 @_FortranAioEndIoStatement(ptr %17)
  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

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