program rainy_season
character(3) :: s
read *, s
if(s == "RRS" .or. s == "SRR")then
print *, 2
else if(s == "RRR")then
print *, 3
else if(s == "SSR" .or. s == "SRS" .or. s == "RSS" .or. s == "RSR")then
print *, 1
else
print *, 0
end if
end program 
; 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.9273ddb3d810e9948794b86d14def5fb = linkonce constant [72 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_779/source.f\00"
@_QQcl.525253 = linkonce constant [3 x i8] c"RRS"
@_QQcl.535252 = linkonce constant [3 x i8] c"SRR"
@_QQcl.525252 = linkonce constant [3 x i8] c"RRR"
@_QQcl.535352 = linkonce constant [3 x i8] c"SSR"
@_QQcl.535253 = linkonce constant [3 x i8] c"SRS"
@_QQcl.525353 = linkonce constant [3 x i8] c"RSS"
@_QQcl.525352 = linkonce constant [3 x i8] c"RSR"
@_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.9273ddb3d810e9948794b86d14def5fb, i32 3)
  %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.525253, i64 3, i64 3)
  %6 = icmp eq i32 %5, 0
  %7 = call i32 @_FortranACharacterCompareScalar1(ptr nonnull %1, ptr nonnull @_QQcl.535252, i64 3, i64 3)
  %8 = icmp eq i32 %7, 0
  %9 = or i1 %6, %8
  br i1 %9, label %10, label %13

10:                                               ; preds = %0
  %11 = call ptr @_FortranAioBeginExternalListOutput(i32 -1, ptr nonnull @_QQcl.9273ddb3d810e9948794b86d14def5fb, i32 5)
  %12 = call i1 @_FortranAioOutputInteger32(ptr %11, i32 2)
  br label %37

13:                                               ; preds = %0
  %14 = call i32 @_FortranACharacterCompareScalar1(ptr nonnull %1, ptr nonnull @_QQcl.525252, i64 3, i64 3)
  %15 = icmp eq i32 %14, 0
  br i1 %15, label %16, label %19

16:                                               ; preds = %13
  %17 = call ptr @_FortranAioBeginExternalListOutput(i32 -1, ptr nonnull @_QQcl.9273ddb3d810e9948794b86d14def5fb, i32 7)
  %18 = call i1 @_FortranAioOutputInteger32(ptr %17, i32 3)
  br label %37

19:                                               ; preds = %13
  %20 = call i32 @_FortranACharacterCompareScalar1(ptr nonnull %1, ptr nonnull @_QQcl.535352, i64 3, i64 3)
  %21 = icmp eq i32 %20, 0
  %22 = call i32 @_FortranACharacterCompareScalar1(ptr nonnull %1, ptr nonnull @_QQcl.535253, i64 3, i64 3)
  %23 = icmp eq i32 %22, 0
  %24 = or i1 %21, %23
  %25 = call i32 @_FortranACharacterCompareScalar1(ptr nonnull %1, ptr nonnull @_QQcl.525353, i64 3, i64 3)
  %26 = icmp eq i32 %25, 0
  %27 = or i1 %24, %26
  %28 = call i32 @_FortranACharacterCompareScalar1(ptr nonnull %1, ptr nonnull @_QQcl.525352, i64 3, i64 3)
  %29 = icmp eq i32 %28, 0
  %30 = or i1 %27, %29
  br i1 %30, label %31, label %34

31:                                               ; preds = %19
  %32 = call ptr @_FortranAioBeginExternalListOutput(i32 -1, ptr nonnull @_QQcl.9273ddb3d810e9948794b86d14def5fb, i32 9)
  %33 = call i1 @_FortranAioOutputInteger32(ptr %32, i32 1)
  br label %37

34:                                               ; preds = %19
  %35 = call ptr @_FortranAioBeginExternalListOutput(i32 -1, ptr nonnull @_QQcl.9273ddb3d810e9948794b86d14def5fb, i32 11)
  %36 = call i1 @_FortranAioOutputInteger32(ptr %35, i32 0)
  br label %37

37:                                               ; preds = %10, %16, %31, %34
  %.sink = phi ptr [ %11, %10 ], [ %17, %16 ], [ %32, %31 ], [ %35, %34 ]
  %38 = 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 @_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}
