import Foundation

main()

func main() {
    guard let s = readLine() else {
        return
    }
    let ans = s.components(separatedBy: "S").map { $0.count }.max()
    print(ans!)
}

; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/Swift/Source_3004/llvm_OZ.ll'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/Swift/Source_3004/llvm_OZ.ll"
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-unknown-linux-gnu"

%struct._SwiftEmptyArrayStorage = type { %struct.HeapObject, %struct._SwiftArrayBodyStorage }
%struct.HeapObject = type { %struct.HeapMetadata*, %struct.InlineRefCountsPlaceholder }
%struct.HeapMetadata = type opaque
%struct.InlineRefCountsPlaceholder = type { i64 }
%struct._SwiftArrayBodyStorage = type { i64, i64 }
%swift.type = type { i64 }
%swift.protocol_conformance_descriptor = type { i32, i32, i32, i32 }
%swift.type_descriptor = type opaque
%TSS = type <{ %Ts11_StringGutsV }>
%Ts11_StringGutsV = type <{ %Ts13_StringObjectV }>
%Ts13_StringObjectV = type <{ %Ts6UInt64V, %swift.bridge* }>
%Ts6UInt64V = type <{ i64 }>
%swift.bridge = type opaque
%Ts15ContiguousArrayV = type <{ %Ts22_ContiguousArrayBufferV }>
%Ts22_ContiguousArrayBufferV = type <{ %Ts28__ContiguousArrayStorageBaseC* }>
%Ts28__ContiguousArrayStorageBaseC = type <{ %swift.refcounted, %Ts10_ArrayBodyV }>
%swift.refcounted = type { %swift.type*, i64 }
%Ts10_ArrayBodyV = type <{ %TSo22_SwiftArrayBodyStorageV }>
%TSo22_SwiftArrayBodyStorageV = type <{ %TSi, %TSu }>
%TSi = type <{ i64 }>
%TSu = type <{ i64 }>
%swift.opaque = type opaque

@_swiftEmptyArrayStorage = external global %struct._SwiftEmptyArrayStorage, align 8
@"$sSSN" = external global %swift.type, align 8
@"$sS2SSysWL" = linkonce_odr hidden local_unnamed_addr global i8** null, align 8
@"$sSSSysMc" = external global %swift.protocol_conformance_descriptor, align 4
@"$ss23_ContiguousArrayStorageCMn" = external global %swift.type_descriptor, align 4
@"got.$ss23_ContiguousArrayStorageCMn" = private unnamed_addr constant %swift.type_descriptor* @"$ss23_ContiguousArrayStorageCMn"
@"symbolic _____yypG s23_ContiguousArrayStorageC" = linkonce_odr hidden constant <{ i8, i32, [4 x i8], i8 }> <{ i8 2, i32 trunc (i64 sub (i64 ptrtoint (%swift.type_descriptor** @"got.$ss23_ContiguousArrayStorageCMn" to i64), i64 ptrtoint (i32* getelementptr inbounds (<{ i8, i32, [4 x i8], i8 }>, <{ i8, i32, [4 x i8], i8 }>* @"symbolic _____yypG s23_ContiguousArrayStorageC", i32 0, i32 1) to i64)) to i32), [4 x i8] c"yypG", i8 0 }>, section "swift5_typeref", no_sanitize_address, align 2
@"$ss23_ContiguousArrayStorageCyypGMD" = linkonce_odr hidden global { i32, i32 } { i32 trunc (i64 sub (i64 ptrtoint (<{ i8, i32, [4 x i8], i8 }>* @"symbolic _____yypG s23_ContiguousArrayStorageC" to i64), i64 ptrtoint ({ i32, i32 }* @"$ss23_ContiguousArrayStorageCyypGMD" to i64)) to i32), i32 -9 }, align 8
@"$sSiN" = external global %swift.type, align 8
@"\01l_entry_point" = private constant { i32, i32 } { i32 trunc (i64 sub (i64 ptrtoint (i32 (i32, i8**)* @main to i64), i64 ptrtoint ({ i32, i32 }* @"\01l_entry_point" to i64)) to i32), i32 0 }, section "swift5_entry", align 4
@"symbolic _____ySiG s23_ContiguousArrayStorageC" = linkonce_odr hidden constant <{ i8, i32, [4 x i8], i8 }> <{ i8 2, i32 trunc (i64 sub (i64 ptrtoint (%swift.type_descriptor** @"got.$ss23_ContiguousArrayStorageCMn" to i64), i64 ptrtoint (i32* getelementptr inbounds (<{ i8, i32, [4 x i8], i8 }>, <{ i8, i32, [4 x i8], i8 }>* @"symbolic _____ySiG s23_ContiguousArrayStorageC", i32 0, i32 1) to i64)) to i32), [4 x i8] c"ySiG", i8 0 }>, section "swift5_typeref", no_sanitize_address, align 2
@"$ss23_ContiguousArrayStorageCySiGMD" = linkonce_odr hidden global { i32, i32 } { i32 trunc (i64 sub (i64 ptrtoint (<{ i8, i32, [4 x i8], i8 }>* @"symbolic _____ySiG s23_ContiguousArrayStorageC" to i64), i64 ptrtoint ({ i32, i32 }* @"$ss23_ContiguousArrayStorageCySiGMD" to i64)) to i32), i32 -9 }, align 8
@__swift_reflection_version = linkonce_odr hidden constant i16 3
@_swift1_autolink_entries = private constant [172 x i8] c"-lFoundation\00-lswiftCore\00-lswift_StringProcessing\00-lswift_RegexParser\00-lswift_Concurrency\00-lswiftGlibc\00-lm\00-lpthread\00-lutil\00-ldl\00-lswiftDispatch\00-ldispatch\00-lBlocksRuntime\00", section ".swift1_autolink_entries", no_sanitize_address, align 8
@llvm.compiler.used = appending global [4 x i8*] [i8* bitcast ({ i32, i32 }* @"\01l_entry_point" to i8*), i8* bitcast (i16* @__swift_reflection_version to i8*), i8* getelementptr inbounds ([172 x i8], [172 x i8]* @_swift1_autolink_entries, i32 0, i32 0), i8* bitcast (i32 (i32, i8**)* @main to i8*)], section "llvm.metadata"

; Function Attrs: minsize optsize
define protected i32 @main(i32 %0, i8** nocapture readnone %1) #0 {
entry:
  tail call swiftcc void @"$s7llvm_OZ4mainyyF"()
  ret i32 0
}

; Function Attrs: minsize optsize
define hidden swiftcc void @"$s7llvm_OZ4mainyyF"() local_unnamed_addr #0 {
entry:
  %0 = alloca %TSS, align 8
  %1 = alloca %TSS, align 8
  %2 = alloca %Ts15ContiguousArrayV, align 8
  %3 = tail call swiftcc { i64, i64 } @"$ss8readLine16strippingNewlineSSSgSb_tF"(i1 true)
  %4 = extractvalue { i64, i64 } %3, 1
  %5 = icmp eq i64 %4, 0
  br i1 %5, label %58, label %6

6:                                                ; preds = %entry
  %7 = extractvalue { i64, i64 } %3, 0
  %8 = inttoptr i64 %4 to %swift.bridge*
  %9 = bitcast %TSS* %0 to i8*
  call void @llvm.lifetime.start.p0i8(i64 16, i8* nonnull %9)
  %._guts._object._countAndFlagsBits._value = getelementptr inbounds %TSS, %TSS* %0, i64 0, i32 0, i32 0, i32 0, i32 0
  store i64 %7, i64* %._guts._object._countAndFlagsBits._value, align 8
  %._guts._object._object = getelementptr inbounds %TSS, %TSS* %0, i64 0, i32 0, i32 0, i32 1
  store %swift.bridge* %8, %swift.bridge** %._guts._object._object, align 8
  %10 = bitcast %TSS* %1 to i8*
  call void @llvm.lifetime.start.p0i8(i64 16, i8* nonnull %10)
  %._guts1._object._countAndFlagsBits._value = getelementptr inbounds %TSS, %TSS* %1, i64 0, i32 0, i32 0, i32 0, i32 0
  store i64 83, i64* %._guts1._object._countAndFlagsBits._value, align 8
  %._guts1._object._object = getelementptr inbounds %TSS, %TSS* %1, i64 0, i32 0, i32 0, i32 1
  store %swift.bridge* inttoptr (i64 -2233785415175766016 to %swift.bridge*), %swift.bridge** %._guts1._object._object, align 8
  %11 = bitcast %TSS* %1 to %swift.opaque*
  %12 = tail call i8** @"$sS2SSysWl"() #12
  %13 = bitcast %TSS* %0 to %swift.opaque*
  %14 = call swiftcc %Ts28__ContiguousArrayStorageBaseC* @"$sSy10FoundationE10components11separatedBySaySSGqd___tSyRd__lF"(%swift.opaque* noalias nocapture nonnull %11, %swift.type* nonnull @"$sSSN", %swift.type* nonnull @"$sSSN", i8** %12, i8** %12, %swift.opaque* noalias nocapture nonnull swiftself %13)
  call void @llvm.lifetime.end.p0i8(i64 16, i8* nonnull %10)
  call void @llvm.lifetime.end.p0i8(i64 16, i8* nonnull %9)
  %._storage.count._value = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %14, i64 0, i32 1, i32 0, i32 0, i32 0
  %15 = load i64, i64* %._storage.count._value, align 8, !range !6
  %16 = icmp eq i64 %15, 0
  br i1 %16, label %17, label %19

17:                                               ; preds = %6
  %18 = getelementptr %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %14, i64 0, i32 0
  tail call void @swift_release(%swift.refcounted* %18) #6
  br label %23

19:                                               ; preds = %6
  %20 = bitcast %Ts15ContiguousArrayV* %2 to i8*
  call void @llvm.lifetime.start.p0i8(i64 8, i8* nonnull %20)
  %._buffer._storage = getelementptr inbounds %Ts15ContiguousArrayV, %Ts15ContiguousArrayV* %2, i64 0, i32 0, i32 0
  store %Ts28__ContiguousArrayStorageBaseC* bitcast (%struct._SwiftEmptyArrayStorage* @_swiftEmptyArrayStorage to %Ts28__ContiguousArrayStorageBaseC*), %Ts28__ContiguousArrayStorageBaseC** %._buffer._storage, align 8
  call swiftcc void @"$ss15ContiguousArrayV16_createNewBuffer14bufferIsUnique15minimumCapacity13growForAppendySb_SiSbtFSi_Tg5"(i1 false, i64 %15, i1 false, %Ts15ContiguousArrayV* nocapture nonnull swiftself dereferenceable(8) %2)
  %21 = load %Ts28__ContiguousArrayStorageBaseC*, %Ts28__ContiguousArrayStorageBaseC** %._buffer._storage, align 8
  %22 = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %14, i64 1
  %tailaddr = bitcast %Ts28__ContiguousArrayStorageBaseC* %22 to %TSS*
  br label %32

23:                                               ; preds = %17, %50
  %24 = phi %Ts28__ContiguousArrayStorageBaseC* [ %46, %50 ], [ bitcast (%struct._SwiftEmptyArrayStorage* @_swiftEmptyArrayStorage to %Ts28__ContiguousArrayStorageBaseC*), %17 ]
  %25 = tail call swiftcc { i64, i8 } @"$sSTsSL7ElementRpzrlE3maxABSgyFSaySiG_Tg5"(%Ts28__ContiguousArrayStorageBaseC* nonnull %24)
  %26 = extractvalue { i64, i8 } %25, 1
  %27 = and i8 %26, 1
  %.not16 = icmp eq i8 %27, 0
  %28 = getelementptr %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %24, i64 0, i32 0
  tail call void @swift_release(%swift.refcounted* %28) #6
  %29 = tail call %swift.type* @__swift_instantiateConcreteTypeFromMangledName({ i32, i32 }* nonnull @"$ss23_ContiguousArrayStorageCyypGMD") #13
  %30 = tail call noalias %swift.refcounted* @swift_allocObject(%swift.type* %29, i64 64, i64 7) #6
  %31 = getelementptr inbounds %swift.refcounted, %swift.refcounted* %30, i64 1
  %._storage8.count._value = bitcast %swift.refcounted* %31 to i64*
  store i64 1, i64* %._storage8.count._value, align 8
  %._storage8._capacityAndFlags = getelementptr inbounds %swift.refcounted, %swift.refcounted* %30, i64 1, i32 1
  store i64 2, i64* %._storage8._capacityAndFlags, align 8
  br i1 %.not16, label %52, label %59

32:                                               ; preds = %45, %19
  %33 = phi i64 [ 0, %19 ], [ %47, %45 ]
  %34 = phi %Ts28__ContiguousArrayStorageBaseC* [ %21, %19 ], [ %46, %45 ]
  %._guts3._object._countAndFlagsBits._value = getelementptr inbounds %TSS, %TSS* %tailaddr, i64 %33, i32 0, i32 0, i32 0, i32 0
  %35 = load i64, i64* %._guts3._object._countAndFlagsBits._value, align 8
  %._guts3._object._object = getelementptr inbounds %TSS, %TSS* %tailaddr, i64 %33, i32 0, i32 0, i32 1
  %36 = load %swift.bridge*, %swift.bridge** %._guts3._object._object, align 8
  %37 = tail call %swift.bridge* @swift_bridgeObjectRetain(%swift.bridge* returned %36) #6
  %38 = tail call swiftcc i64 @"$sSS5countSivg"(i64 %35, %swift.bridge* %36)
  tail call void @swift_bridgeObjectRelease(%swift.bridge* %36) #6
  store %Ts28__ContiguousArrayStorageBaseC* %34, %Ts28__ContiguousArrayStorageBaseC** %._buffer._storage, align 8
  %._storage5.count._value = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %34, i64 0, i32 1, i32 0, i32 0, i32 0
  %39 = load i64, i64* %._storage5.count._value, align 8, !range !6
  %._storage5._capacityAndFlags._value = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %34, i64 0, i32 1, i32 0, i32 1, i32 0
  %40 = load i64, i64* %._storage5._capacityAndFlags._value, align 8
  %41 = lshr i64 %40, 1
  %42 = add nuw nsw i64 %39, 1
  %.not = icmp ugt i64 %41, %39
  br i1 %.not, label %45, label %43, !prof !7

43:                                               ; preds = %32
  %44 = icmp ugt i64 %40, 1
  call swiftcc void @"$ss15ContiguousArrayV16_createNewBuffer14bufferIsUnique15minimumCapacity13growForAppendySb_SiSbtFSi_Tg5"(i1 %44, i64 %42, i1 true, %Ts15ContiguousArrayV* nocapture nonnull swiftself dereferenceable(8) %2)
  %.pre = load %Ts28__ContiguousArrayStorageBaseC*, %Ts28__ContiguousArrayStorageBaseC** %._buffer._storage, align 8
  br label %45

45:                                               ; preds = %32, %43
  %46 = phi %Ts28__ContiguousArrayStorageBaseC* [ %34, %32 ], [ %.pre, %43 ]
  %47 = add nuw nsw i64 %33, 1
  %._storage6.count._value = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %46, i64 0, i32 1, i32 0, i32 0, i32 0
  store i64 %42, i64* %._storage6.count._value, align 8
  %48 = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %46, i64 1
  %tailaddr7 = bitcast %Ts28__ContiguousArrayStorageBaseC* %48 to %TSi*
  %._value = getelementptr inbounds %TSi, %TSi* %tailaddr7, i64 %39, i32 0
  store i64 %38, i64* %._value, align 8
  %49 = icmp eq i64 %47, %15
  br i1 %49, label %50, label %32

50:                                               ; preds = %45
  %51 = getelementptr %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %14, i64 0, i32 0
  tail call void @swift_release(%swift.refcounted* %51) #6
  call void @llvm.lifetime.end.p0i8(i64 8, i8* nonnull %20)
  br label %23

52:                                               ; preds = %23
  %53 = bitcast %swift.refcounted* %30 to %Ts28__ContiguousArrayStorageBaseC*
  %54 = extractvalue { i64, i8 } %25, 0
  %55 = getelementptr inbounds %swift.refcounted, %swift.refcounted* %30, i64 2
  %56 = getelementptr inbounds %swift.refcounted, %swift.refcounted* %30, i64 3, i32 1
  %57 = bitcast i64* %56 to %swift.type**
  store %swift.type* @"$sSiN", %swift.type** %57, align 8
  %._value10 = bitcast %swift.refcounted* %55 to i64*
  store i64 %54, i64* %._value10, align 8
  tail call swiftcc void @"$ss5print_9separator10terminatoryypd_S2StF"(%Ts28__ContiguousArrayStorageBaseC* %53, i64 32, %swift.bridge* nonnull inttoptr (i64 -2233785415175766016 to %swift.bridge*), i64 10, %swift.bridge* nonnull inttoptr (i64 -2233785415175766016 to %swift.bridge*))
  tail call void @swift_bridgeObjectRelease(%swift.bridge* nonnull %8) #6
  tail call void @swift_release(%swift.refcounted* nonnull %30) #6
  br label %58

58:                                               ; preds = %entry, %52
  ret void

59:                                               ; preds = %23
  tail call void asm sideeffect "", "n"(i32 1) #6
  tail call void @llvm.trap()
  unreachable
}

; Function Attrs: minsize optsize
declare swiftcc { i64, i64 } @"$ss8readLine16strippingNewlineSSSgSb_tF"(i1) local_unnamed_addr #0

; Function Attrs: argmemonly mustprogress nocallback nofree nosync nounwind willreturn
declare void @llvm.lifetime.start.p0i8(i64 immarg, i8* nocapture) #1

; Function Attrs: argmemonly mustprogress nocallback nofree nosync nounwind willreturn
declare void @llvm.lifetime.end.p0i8(i64 immarg, i8* nocapture) #1

; Function Attrs: minsize optsize
declare swiftcc %Ts28__ContiguousArrayStorageBaseC* @"$sSy10FoundationE10components11separatedBySaySSGqd___tSyRd__lF"(%swift.opaque* noalias nocapture, %swift.type*, %swift.type*, i8**, i8**, %swift.opaque* noalias nocapture swiftself) local_unnamed_addr #0

; Function Attrs: minsize nofree noinline nosync nounwind optsize readnone
define linkonce_odr hidden i8** @"$sS2SSysWl"() local_unnamed_addr #2 {
entry:
  %0 = load i8**, i8*** @"$sS2SSysWL", align 8
  %1 = icmp eq i8** %0, null
  br i1 %1, label %cacheIsNull, label %cont

cacheIsNull:                                      ; preds = %entry
  %2 = tail call i8** @swift_getWitnessTable(%swift.protocol_conformance_descriptor* nonnull @"$sSSSysMc", %swift.type* nonnull @"$sSSN", i8*** undef) #13
  store atomic i8** %2, i8*** @"$sS2SSysWL" release, align 8
  br label %cont

cont:                                             ; preds = %cacheIsNull, %entry
  %3 = phi i8** [ %0, %entry ], [ %2, %cacheIsNull ]
  ret i8** %3
}

; Function Attrs: nofree nounwind readonly
declare i8** @swift_getWitnessTable(%swift.protocol_conformance_descriptor*, %swift.type*, i8***) local_unnamed_addr #3

; Function Attrs: minsize optsize
define linkonce_odr hidden swiftcc { i64, i8 } @"$sSTsSL7ElementRpzrlE3maxABSgyFSaySiG_Tg5"(%Ts28__ContiguousArrayStorageBaseC* %0) local_unnamed_addr #0 {
entry:
  %._storage.count._value = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %0, i64 0, i32 1, i32 0, i32 0, i32 0
  %1 = load i64, i64* %._storage.count._value, align 8, !range !6
  %2 = icmp eq i64 %1, 0
  br i1 %2, label %.loopexit, label %3

3:                                                ; preds = %entry
  %4 = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %0, i64 1
  %tailaddr = bitcast %Ts28__ContiguousArrayStorageBaseC* %4 to %TSi*
  %tailaddr._value = bitcast %Ts28__ContiguousArrayStorageBaseC* %4 to i64*
  %5 = load i64, i64* %tailaddr._value, align 8
  %6 = icmp eq i64 %1, 1
  br i1 %6, label %.loopexit, label %.preheader

.preheader:                                       ; preds = %3, %.preheader
  %7 = phi i64 [ %10, %.preheader ], [ %5, %3 ]
  %8 = phi i64 [ %11, %.preheader ], [ 1, %3 ]
  %._value = getelementptr inbounds %TSi, %TSi* %tailaddr, i64 %8, i32 0
  %9 = load i64, i64* %._value, align 8
  %10 = tail call i64 @llvm.smax.i64(i64 %7, i64 %9)
  %11 = add i64 %8, 1
  %12 = icmp eq i64 %11, %1
  br i1 %12, label %.loopexit, label %.preheader

.loopexit:                                        ; preds = %.preheader, %3, %entry
  %13 = phi i64 [ 0, %entry ], [ %5, %3 ], [ %10, %.preheader ]
  %14 = zext i1 %2 to i8
  %15 = insertvalue { i64, i8 } undef, i64 %13, 0
  %16 = insertvalue { i64, i8 } %15, i8 %14, 1
  ret { i64, i8 } %16
}

; Function Attrs: minsize noinline optsize
define linkonce_odr hidden swiftcc void @"$ss15ContiguousArrayV16_createNewBuffer14bufferIsUnique15minimumCapacity13growForAppendySb_SiSbtFSi_Tg5"(i1 %0, i64 %1, i1 %2, %Ts15ContiguousArrayV* nocapture swiftself dereferenceable(8) %3) local_unnamed_addr #4 {
entry:
  %._buffer._storage = getelementptr inbounds %Ts15ContiguousArrayV, %Ts15ContiguousArrayV* %3, i64 0, i32 0, i32 0
  %4 = load %Ts28__ContiguousArrayStorageBaseC*, %Ts28__ContiguousArrayStorageBaseC** %._buffer._storage, align 8
  %5 = tail call swiftcc %Ts28__ContiguousArrayStorageBaseC* @"$ss22_ContiguousArrayBufferV20_consumeAndCreateNew14bufferIsUnique15minimumCapacity13growForAppendAByxGSb_SiSbtFSi_Tg5"(i1 %0, i64 %1, i1 %2, %Ts28__ContiguousArrayStorageBaseC* %4)
  store %Ts28__ContiguousArrayStorageBaseC* %5, %Ts28__ContiguousArrayStorageBaseC** %._buffer._storage, align 8
  ret void
}

; Function Attrs: minsize optsize
declare swiftcc i64 @"$sSS5countSivg"(i64, %swift.bridge*) local_unnamed_addr #0

; Function Attrs: cold noreturn nounwind
declare void @llvm.trap() #5

; Function Attrs: nounwind
declare %swift.bridge* @swift_bridgeObjectRetain(%swift.bridge* returned) local_unnamed_addr #6

; Function Attrs: nounwind
declare void @swift_bridgeObjectRelease(%swift.bridge*) local_unnamed_addr #6

; Function Attrs: nounwind
declare void @swift_release(%swift.refcounted*) local_unnamed_addr #6

; Function Attrs: minsize mustprogress nofree noinline nounwind optsize readonly willreturn
define linkonce_odr hidden %swift.type* @__swift_instantiateConcreteTypeFromMangledName({ i32, i32 }* %0) local_unnamed_addr #7 {
entry:
  %1 = bitcast { i32, i32 }* %0 to i64*
  %2 = load atomic i64, i64* %1 monotonic, align 8
  %3 = icmp slt i64 %2, 0
  br i1 %3, label %7, label %4, !prof !8

4:                                                ; preds = %7, %entry
  %5 = phi i64 [ %2, %entry ], [ %15, %7 ]
  %6 = inttoptr i64 %5 to %swift.type*
  ret %swift.type* %6

7:                                                ; preds = %entry
  %8 = ashr i64 %2, 32
  %9 = sub nsw i64 0, %8
  %sext = shl i64 %2, 32
  %10 = ashr exact i64 %sext, 32
  %11 = ptrtoint { i32, i32 }* %0 to i64
  %12 = add i64 %10, %11
  %13 = inttoptr i64 %12 to i8*
  %14 = tail call swiftcc %swift.type* @swift_getTypeByMangledNameInContext2(i8* %13, i64 %9, %swift.type_descriptor* null, i8** null) #14
  %15 = ptrtoint %swift.type* %14 to i64
  store atomic i64 %15, i64* %1 monotonic, align 8
  br label %4
}

; Function Attrs: argmemonly nounwind
declare swiftcc %swift.type* @swift_getTypeByMangledNameInContext2(i8*, i64, %swift.type_descriptor*, i8**) local_unnamed_addr #8

; Function Attrs: nounwind
declare %swift.refcounted* @swift_allocObject(%swift.type*, i64, i64) local_unnamed_addr #6

; Function Attrs: minsize optsize
declare swiftcc void @"$ss5print_9separator10terminatoryypd_S2StF"(%Ts28__ContiguousArrayStorageBaseC*, i64, %swift.bridge*, i64, %swift.bridge*) local_unnamed_addr #0

; Function Attrs: minsize noinline optsize
define linkonce_odr hidden swiftcc %Ts28__ContiguousArrayStorageBaseC* @"$ss22_ContiguousArrayBufferV20_consumeAndCreateNew14bufferIsUnique15minimumCapacity13growForAppendAByxGSb_SiSbtFSi_Tg5"(i1 %0, i64 %1, i1 %2, %Ts28__ContiguousArrayStorageBaseC* %3) local_unnamed_addr #4 {
entry:
  br i1 %2, label %4, label %14

4:                                                ; preds = %entry
  %._storage._capacityAndFlags._value = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %3, i64 0, i32 1, i32 0, i32 1, i32 0
  %5 = load i64, i64* %._storage._capacityAndFlags._value, align 8
  %6 = lshr i64 %5, 1
  %7 = icmp slt i64 %6, %1
  br i1 %7, label %8, label %14

8:                                                ; preds = %4
  %9 = add nuw i64 %6, 4611686018427387904
  %10 = icmp slt i64 %9, 0
  br i1 %10, label %49, label %11, !prof !8

11:                                               ; preds = %8
  %12 = and i64 %5, -2
  %13 = tail call i64 @llvm.smax.i64(i64 %12, i64 %1)
  br label %14

14:                                               ; preds = %4, %11, %entry
  %15 = phi i64 [ %1, %entry ], [ %13, %11 ], [ %6, %4 ]
  %._storage.count._value = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %3, i64 0, i32 1, i32 0, i32 0, i32 0
  %16 = load i64, i64* %._storage.count._value, align 8, !range !6
  %17 = tail call i64 @llvm.smax.i64(i64 %15, i64 %16)
  %18 = icmp eq i64 %17, 0
  br i1 %18, label %29, label %19

19:                                               ; preds = %14
  %20 = tail call %swift.type* @__swift_instantiateConcreteTypeFromMangledName({ i32, i32 }* nonnull @"$ss23_ContiguousArrayStorageCySiGMD") #13
  %21 = shl i64 %17, 3
  %22 = add i64 %21, 32
  %23 = tail call noalias %swift.refcounted* @swift_allocObject(%swift.type* %20, i64 %22, i64 7) #6
  %24 = bitcast %swift.refcounted* %23 to %Ts28__ContiguousArrayStorageBaseC*
  %25 = bitcast %swift.refcounted* %23 to i8*
  %call.i = tail call i64 @malloc_usable_size(i8* noundef %25) #15
  %gepdiff = add nsw i64 %call.i, -32
  %26 = sdiv i64 %gepdiff, 8
  %27 = shl nsw i64 %26, 1
  %28 = getelementptr inbounds %swift.refcounted, %swift.refcounted* %23, i64 1
  %._storage7.count._value = bitcast %swift.refcounted* %28 to i64*
  store i64 %16, i64* %._storage7.count._value, align 8
  %._storage7._capacityAndFlags = getelementptr inbounds %swift.refcounted, %swift.refcounted* %23, i64 1, i32 1
  store i64 %27, i64* %._storage7._capacityAndFlags, align 8
  br label %29

29:                                               ; preds = %14, %19
  %30 = phi %Ts28__ContiguousArrayStorageBaseC* [ %24, %19 ], [ bitcast (%struct._SwiftEmptyArrayStorage* @_swiftEmptyArrayStorage to %Ts28__ContiguousArrayStorageBaseC*), %14 ]
  %31 = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %30, i64 1
  br i1 %0, label %32, label %42

32:                                               ; preds = %29
  %33 = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %3, i64 1
  %34 = bitcast %Ts28__ContiguousArrayStorageBaseC* %33 to %TSi*
  %35 = getelementptr inbounds %TSi, %TSi* %34, i64 %16
  %36 = bitcast %Ts28__ContiguousArrayStorageBaseC* %31 to %TSi*
  %37 = icmp ugt %TSi* %35, %36
  %38 = icmp eq %Ts28__ContiguousArrayStorageBaseC* %30, %3
  %or.cond5.i = select i1 %38, i1 %37, i1 false
  br i1 %or.cond5.i, label %"$sSp14moveInitialize4from5countySpyxG_SitFSi_Tg5.exit", label %.sink.split.i

.sink.split.i:                                    ; preds = %32
  %39 = bitcast %Ts28__ContiguousArrayStorageBaseC* %33 to i8*
  %40 = bitcast %Ts28__ContiguousArrayStorageBaseC* %31 to i8*
  %41 = shl nuw i64 %16, 3
  tail call void @llvm.memmove.p0i8.p0i8.i64(i8* nonnull align 8 %40, i8* nonnull align 8 %39, i64 %41, i1 false)
  br label %"$sSp14moveInitialize4from5countySpyxG_SitFSi_Tg5.exit"

"$sSp14moveInitialize4from5countySpyxG_SitFSi_Tg5.exit": ; preds = %32, %.sink.split.i
  store i64 0, i64* %._storage.count._value, align 8
  br label %47

42:                                               ; preds = %29
  %43 = bitcast %Ts28__ContiguousArrayStorageBaseC* %31 to i8*
  %44 = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %3, i64 1
  %45 = bitcast %Ts28__ContiguousArrayStorageBaseC* %44 to i8*
  %46 = shl nuw i64 %16, 3
  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* nonnull align 8 %43, i8* nonnull align 8 %45, i64 %46, i1 false)
  br label %47

47:                                               ; preds = %"$sSp14moveInitialize4from5countySpyxG_SitFSi_Tg5.exit", %42
  %48 = getelementptr %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %3, i64 0, i32 0
  tail call void @swift_release(%swift.refcounted* %48) #6
  ret %Ts28__ContiguousArrayStorageBaseC* %30

49:                                               ; preds = %8
  tail call void asm sideeffect "", "n"(i32 0) #6
  tail call void @llvm.trap()
  unreachable
}

; Function Attrs: argmemonly mustprogress nocallback nofree nounwind willreturn
declare void @llvm.memcpy.p0i8.p0i8.i64(i8* noalias nocapture writeonly, i8* noalias nocapture readonly, i64, i1 immarg) #9

; Function Attrs: argmemonly mustprogress nocallback nofree nounwind willreturn
declare void @llvm.memmove.p0i8.p0i8.i64(i8* nocapture writeonly, i8* nocapture readonly, i64, i1 immarg) #9

; Function Attrs: optsize
declare i64 @malloc_usable_size(i8* noundef) local_unnamed_addr #10

; Function Attrs: nocallback nofree nosync nounwind readnone speculatable willreturn
declare i64 @llvm.smax.i64(i64, i64) #11

attributes #0 = { minsize optsize "frame-pointer"="none" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx16,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { argmemonly mustprogress nocallback nofree nosync nounwind willreturn }
attributes #2 = { minsize nofree noinline nosync nounwind optsize readnone "frame-pointer"="non-leaf" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx16,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind readonly }
attributes #4 = { minsize noinline optsize "frame-pointer"="none" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx16,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { cold noreturn nounwind }
attributes #6 = { nounwind }
attributes #7 = { minsize mustprogress nofree noinline nounwind optsize readonly willreturn "frame-pointer"="non-leaf" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx16,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { argmemonly nounwind }
attributes #9 = { argmemonly mustprogress nocallback nofree nounwind willreturn }
attributes #10 = { optsize "frame-pointer"="none" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx16,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #11 = { nocallback nofree nosync nounwind readnone speculatable willreturn }
attributes #12 = { nounwind readnone }
attributes #13 = { nounwind readonly }
attributes #14 = { argmemonly nounwind readonly }
attributes #15 = { nounwind optsize }

!swift.module.flags = !{!0}
!llvm.linker.options = !{}
!llvm.module.flags = !{!1, !2, !3, !4, !5}

!0 = !{!"standard-library", i1 false}
!1 = !{i32 1, !"wchar_size", i32 4}
!2 = !{i32 8, !"PIC Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{i32 4, !"Objective-C Garbage Collection", i32 84477696}
!5 = !{i32 1, !"Swift Version", i32 7}
!6 = !{i64 0, i64 9223372036854775807}
!7 = !{!"branch_weights", i32 2000, i32 1}
!8 = !{!"branch_weights", i32 1, i32 2000}
