import Foundation

func main() {
    guard let line = readLine() else { return }
    //let inputs = line.components(separatedBy: " ").compactMap() { Int($0) }
    var inputs = [String]()
    for a in line {
        inputs.append(String(a))
    }
    var count = 0
    if inputs[1] == "R" {
        count += 1
        if inputs[0] == "R" {
            count += 1
            if inputs[2] == "R" {
                count += 1
            }
        } else if inputs[2] == "R" {
            count += 1
        }
    } else {
        if inputs[0] == "R" || inputs[2] == "R" {
            count += 1
        }
    }
    print(count)
}
main()

; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/Swift/Source_3007/llvm_OZ.ll'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/Swift/Source_3007/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_descriptor = type opaque
%swift.type = type { i64 }
%TSS8IteratorV = type <{ %Ts11_StringGutsV, %TSi, %TSi }>
%Ts11_StringGutsV = type <{ %Ts13_StringObjectV }>
%Ts13_StringObjectV = type <{ %Ts6UInt64V, %swift.bridge* }>
%Ts6UInt64V = type <{ i64 }>
%swift.bridge = type opaque
%TSi = type <{ i64 }>
%Ts28__ContiguousArrayStorageBaseC = type <{ %swift.refcounted, %Ts10_ArrayBodyV }>
%swift.refcounted = type { %swift.type*, i64 }
%Ts10_ArrayBodyV = type <{ %TSo22_SwiftArrayBodyStorageV }>
%TSo22_SwiftArrayBodyStorageV = type <{ %TSi, %TSu }>
%TSu = type <{ i64 }>
%TSS = type <{ %Ts11_StringGutsV }>
%swift.opaque = type opaque

@_swiftEmptyArrayStorage = external global %struct._SwiftEmptyArrayStorage, align 8
@"$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 _____ySSG 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 _____ySSG s23_ContiguousArrayStorageC", i32 0, i32 1) to i64)) to i32), [4 x i8] c"ySSG", i8 0 }>, section "swift5_typeref", no_sanitize_address, align 2
@"$ss23_ContiguousArrayStorageCySSGMD" = linkonce_odr hidden global { i32, i32 } { i32 trunc (i64 sub (i64 ptrtoint (<{ i8, i32, [4 x i8], i8 }>* @"symbolic _____ySSG s23_ContiguousArrayStorageC" to i64), i64 ptrtoint ({ i32, i32 }* @"$ss23_ContiguousArrayStorageCySSGMD" to i64)) to i32), i32 -9 }, align 8
@"$sSSN" = external global %swift.type, 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 %TSS8IteratorV, align 8
  %1 = tail call swiftcc { i64, i64 } @"$ss8readLine16strippingNewlineSSSgSb_tF"(i1 true)
  %2 = extractvalue { i64, i64 } %1, 1
  %3 = icmp eq i64 %2, 0
  br i1 %3, label %116, label %4

4:                                                ; preds = %entry
  %5 = extractvalue { i64, i64 } %1, 0
  %6 = inttoptr i64 %2 to %swift.bridge*
  %7 = bitcast %TSS8IteratorV* %0 to i8*
  call void @llvm.lifetime.start.p0i8(i64 32, i8* nonnull %7)
  %8 = and i64 %2, 2305843009213693952
  %9 = icmp eq i64 %8, 0
  %10 = lshr i64 %2, 56
  %11 = and i64 %10, 15
  %12 = and i64 %5, 281474976710655
  %13 = select i1 %9, i64 %12, i64 %11
  %._guts._object._countAndFlagsBits._value = getelementptr inbounds %TSS8IteratorV, %TSS8IteratorV* %0, i64 0, i32 0, i32 0, i32 0, i32 0
  store i64 %5, i64* %._guts._object._countAndFlagsBits._value, align 8
  %._guts._object._object = getelementptr inbounds %TSS8IteratorV, %TSS8IteratorV* %0, i64 0, i32 0, i32 0, i32 1
  store %swift.bridge* %6, %swift.bridge** %._guts._object._object, align 8
  %._position._value = getelementptr inbounds %TSS8IteratorV, %TSS8IteratorV* %0, i64 0, i32 1, i32 0
  store i64 0, i64* %._position._value, align 8
  %._end._value = getelementptr inbounds %TSS8IteratorV, %TSS8IteratorV* %0, i64 0, i32 2, i32 0
  store i64 %13, i64* %._end._value, align 8
  %14 = tail call %swift.bridge* @swift_bridgeObjectRetain(%swift.bridge* nonnull returned %6) #2
  %15 = call swiftcc { i64, i64 } @"$sSS8IteratorV4nextSJSgyF"(%TSS8IteratorV* nocapture nonnull swiftself dereferenceable(32) %0)
  %16 = extractvalue { i64, i64 } %15, 1
  %17 = icmp eq i64 %16, 0
  br i1 %17, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %4, %38
  %18 = phi i64 [ %42, %38 ], [ %16, %4 ]
  %.pn = phi { i64, i64 } [ %41, %38 ], [ %15, %4 ]
  %19 = phi %Ts28__ContiguousArrayStorageBaseC* [ %39, %38 ], [ bitcast (%struct._SwiftEmptyArrayStorage* @_swiftEmptyArrayStorage to %Ts28__ContiguousArrayStorageBaseC*), %4 ]
  %20 = extractvalue { i64, i64 } %.pn, 0
  %21 = inttoptr i64 %18 to %swift.bridge*
  %22 = getelementptr %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %19, i64 0, i32 0
  %23 = tail call %swift.bridge* @swift_bridgeObjectRetain(%swift.bridge* nonnull returned %21) #2
  %24 = tail call zeroext i1 @swift_isUniquelyReferenced_nonNull_native(%swift.refcounted* %22) #11
  br i1 %24, label %29, label %25

25:                                               ; preds = %.lr.ph
  %._storage25.count._value = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %19, i64 0, i32 1, i32 0, i32 0, i32 0
  %26 = load i64, i64* %._storage25.count._value, align 8, !range !6
  %27 = add nuw nsw i64 %26, 1
  %28 = tail call swiftcc %Ts28__ContiguousArrayStorageBaseC* @"$ss22_ContiguousArrayBufferV20_consumeAndCreateNew14bufferIsUnique15minimumCapacity13growForAppendAByxGSb_SiSbtFSS_Tg5"(i1 false, i64 %27, i1 true, %Ts28__ContiguousArrayStorageBaseC* %19)
  br label %29

29:                                               ; preds = %.lr.ph, %25
  %30 = phi %Ts28__ContiguousArrayStorageBaseC* [ %28, %25 ], [ %19, %.lr.ph ]
  %._storage26.count._value = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %30, i64 0, i32 1, i32 0, i32 0, i32 0
  %31 = load i64, i64* %._storage26.count._value, align 8, !range !6
  %._storage26._capacityAndFlags._value = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %30, i64 0, i32 1, i32 0, i32 1, i32 0
  %32 = load i64, i64* %._storage26._capacityAndFlags._value, align 8
  %33 = lshr i64 %32, 1
  %34 = add nuw nsw i64 %31, 1
  %.not = icmp ugt i64 %33, %31
  br i1 %.not, label %38, label %35, !prof !7

35:                                               ; preds = %29
  %36 = icmp ugt i64 %32, 1
  %37 = tail call swiftcc %Ts28__ContiguousArrayStorageBaseC* @"$ss22_ContiguousArrayBufferV20_consumeAndCreateNew14bufferIsUnique15minimumCapacity13growForAppendAByxGSb_SiSbtFSS_Tg5"(i1 %36, i64 %34, i1 true, %Ts28__ContiguousArrayStorageBaseC* nonnull %30)
  br label %38

38:                                               ; preds = %29, %35
  %39 = phi %Ts28__ContiguousArrayStorageBaseC* [ %37, %35 ], [ %30, %29 ]
  %._storage27.count._value = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %39, i64 0, i32 1, i32 0, i32 0, i32 0
  store i64 %34, i64* %._storage27.count._value, align 8
  %40 = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %39, i64 1
  %tailaddr28 = bitcast %Ts28__ContiguousArrayStorageBaseC* %40 to %TSS*
  %._guts29._object._countAndFlagsBits._value = getelementptr inbounds %TSS, %TSS* %tailaddr28, i64 %31, i32 0, i32 0, i32 0, i32 0
  store i64 %20, i64* %._guts29._object._countAndFlagsBits._value, align 8
  %._guts29._object._object = getelementptr inbounds %TSS, %TSS* %tailaddr28, i64 %31, i32 0, i32 0, i32 1
  store %swift.bridge* %21, %swift.bridge** %._guts29._object._object, align 8
  tail call void @swift_bridgeObjectRelease(%swift.bridge* nonnull %21) #2
  %41 = call swiftcc { i64, i64 } @"$sSS8IteratorV4nextSJSgyF"(%TSS8IteratorV* nocapture nonnull swiftself dereferenceable(32) %0)
  %42 = extractvalue { i64, i64 } %41, 1
  %43 = icmp eq i64 %42, 0
  br i1 %43, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %38, %4
  %.lcssa = phi %Ts28__ContiguousArrayStorageBaseC* [ bitcast (%struct._SwiftEmptyArrayStorage* @_swiftEmptyArrayStorage to %Ts28__ContiguousArrayStorageBaseC*), %4 ], [ %39, %38 ]
  %44 = load %swift.bridge*, %swift.bridge** %._guts._object._object, align 8
  tail call void @swift_bridgeObjectRelease(%swift.bridge* %44) #2
  call void @llvm.lifetime.end.p0i8(i64 32, i8* nonnull %7)
  %._storage.count._value = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %.lcssa, i64 0, i32 1, i32 0, i32 0, i32 0
  %45 = load i64, i64* %._storage.count._value, align 8, !range !6
  %46 = icmp ult i64 %45, 2
  br i1 %46, label %117, label %47, !prof !8

47:                                               ; preds = %._crit_edge
  %48 = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %.lcssa, i64 1
  %._guts2._object._countAndFlagsBits._value = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %.lcssa, i64 1, i32 1, i32 0, i32 0, i32 0
  %49 = load i64, i64* %._guts2._object._countAndFlagsBits._value, align 8
  %._guts2._object._object = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %.lcssa, i64 1, i32 1, i32 0, i32 1
  %50 = bitcast %TSu* %._guts2._object._object to %swift.bridge**
  %51 = load %swift.bridge*, %swift.bridge** %50, align 8
  %52 = icmp eq i64 %49, 82
  %53 = icmp eq %swift.bridge* %51, inttoptr (i64 -2233785415175766016 to %swift.bridge*)
  %or.cond = select i1 %52, i1 %53, i1 false
  br i1 %or.cond, label %56, label %54

54:                                               ; preds = %47
  %55 = tail call swiftcc i1 @"$ss27_stringCompareWithSmolCheck__9expectingSbs11_StringGutsV_ADs01_G16ComparisonResultOtF"(i64 %49, %swift.bridge* %51, i64 82, %swift.bridge* nonnull inttoptr (i64 -2233785415175766016 to %swift.bridge*), i8 0)
  br i1 %55, label %56, label %87

56:                                               ; preds = %54, %47
  %tailaddr._guts14._object._countAndFlagsBits._value = bitcast %Ts28__ContiguousArrayStorageBaseC* %48 to i64*
  %57 = load i64, i64* %tailaddr._guts14._object._countAndFlagsBits._value, align 8
  %tailaddr._guts14._object._object = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %.lcssa, i64 1, i32 0, i32 1
  %58 = bitcast i64* %tailaddr._guts14._object._object to %swift.bridge**
  %59 = load %swift.bridge*, %swift.bridge** %58, align 8
  %60 = icmp eq i64 %57, 82
  %61 = icmp eq %swift.bridge* %59, inttoptr (i64 -2233785415175766016 to %swift.bridge*)
  %or.cond43 = select i1 %60, i1 %61, i1 false
  br i1 %or.cond43, label %64, label %62

62:                                               ; preds = %56
  %63 = tail call swiftcc i1 @"$ss27_stringCompareWithSmolCheck__9expectingSbs11_StringGutsV_ADs01_G16ComparisonResultOtF"(i64 %57, %swift.bridge* %59, i64 82, %swift.bridge* nonnull inttoptr (i64 -2233785415175766016 to %swift.bridge*), i8 0)
  br i1 %63, label %64, label %76

64:                                               ; preds = %56, %62
  %65 = icmp ult i64 %45, 3
  br i1 %65, label %120, label %66, !prof !8

66:                                               ; preds = %64
  %67 = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %.lcssa, i64 2
  %._guts18._object._countAndFlagsBits._value = bitcast %Ts28__ContiguousArrayStorageBaseC* %67 to i64*
  %68 = load i64, i64* %._guts18._object._countAndFlagsBits._value, align 8
  %._guts18._object._object = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %.lcssa, i64 2, i32 0, i32 1
  %69 = bitcast i64* %._guts18._object._object to %swift.bridge**
  %70 = load %swift.bridge*, %swift.bridge** %69, align 8
  %71 = icmp eq i64 %68, 82
  %72 = icmp eq %swift.bridge* %70, inttoptr (i64 -2233785415175766016 to %swift.bridge*)
  %or.cond44 = select i1 %71, i1 %72, i1 false
  br i1 %or.cond44, label %75, label %73

73:                                               ; preds = %66
  %74 = tail call swiftcc i1 @"$ss27_stringCompareWithSmolCheck__9expectingSbs11_StringGutsV_ADs01_G16ComparisonResultOtF"(i64 %68, %swift.bridge* %70, i64 82, %swift.bridge* nonnull inttoptr (i64 -2233785415175766016 to %swift.bridge*), i8 0)
  br i1 %74, label %75, label %106

75:                                               ; preds = %66, %73
  br label %106

76:                                               ; preds = %62
  %77 = icmp ult i64 %45, 3
  br i1 %77, label %119, label %78, !prof !8

78:                                               ; preds = %76
  %79 = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %.lcssa, i64 2
  %._guts15._object._countAndFlagsBits._value = bitcast %Ts28__ContiguousArrayStorageBaseC* %79 to i64*
  %80 = load i64, i64* %._guts15._object._countAndFlagsBits._value, align 8
  %._guts15._object._object = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %.lcssa, i64 2, i32 0, i32 1
  %81 = bitcast i64* %._guts15._object._object to %swift.bridge**
  %82 = load %swift.bridge*, %swift.bridge** %81, align 8
  %83 = icmp eq i64 %80, 82
  %84 = icmp eq %swift.bridge* %82, inttoptr (i64 -2233785415175766016 to %swift.bridge*)
  %or.cond45 = select i1 %83, i1 %84, i1 false
  br i1 %or.cond45, label %106, label %85

85:                                               ; preds = %78
  %86 = tail call swiftcc i1 @"$ss27_stringCompareWithSmolCheck__9expectingSbs11_StringGutsV_ADs01_G16ComparisonResultOtF"(i64 %80, %swift.bridge* %82, i64 82, %swift.bridge* nonnull inttoptr (i64 -2233785415175766016 to %swift.bridge*), i8 0)
  %spec.select = select i1 %86, i64 2, i64 1
  br label %106

87:                                               ; preds = %54
  %tailaddr._guts._object._countAndFlagsBits._value = bitcast %Ts28__ContiguousArrayStorageBaseC* %48 to i64*
  %88 = load i64, i64* %tailaddr._guts._object._countAndFlagsBits._value, align 8
  %tailaddr._guts._object._object = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %.lcssa, i64 1, i32 0, i32 1
  %89 = bitcast i64* %tailaddr._guts._object._object to %swift.bridge**
  %90 = load %swift.bridge*, %swift.bridge** %89, align 8
  %91 = icmp eq i64 %88, 82
  %92 = icmp eq %swift.bridge* %90, inttoptr (i64 -2233785415175766016 to %swift.bridge*)
  %or.cond46 = select i1 %91, i1 %92, i1 false
  br i1 %or.cond46, label %106, label %93

93:                                               ; preds = %87
  %94 = tail call swiftcc i1 @"$ss27_stringCompareWithSmolCheck__9expectingSbs11_StringGutsV_ADs01_G16ComparisonResultOtF"(i64 %88, %swift.bridge* %90, i64 82, %swift.bridge* nonnull inttoptr (i64 -2233785415175766016 to %swift.bridge*), i8 0)
  br i1 %94, label %106, label %95

95:                                               ; preds = %93
  %96 = icmp ult i64 %45, 3
  br i1 %96, label %118, label %97, !prof !8

97:                                               ; preds = %95
  %98 = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %.lcssa, i64 2
  %._guts6._object._countAndFlagsBits._value = bitcast %Ts28__ContiguousArrayStorageBaseC* %98 to i64*
  %99 = load i64, i64* %._guts6._object._countAndFlagsBits._value, align 8
  %._guts6._object._object = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %.lcssa, i64 2, i32 0, i32 1
  %100 = bitcast i64* %._guts6._object._object to %swift.bridge**
  %101 = load %swift.bridge*, %swift.bridge** %100, align 8
  %102 = icmp eq i64 %99, 82
  %103 = icmp eq %swift.bridge* %101, inttoptr (i64 -2233785415175766016 to %swift.bridge*)
  %or.cond47 = select i1 %102, i1 %103, i1 false
  br i1 %or.cond47, label %106, label %104

104:                                              ; preds = %97
  %105 = tail call swiftcc i1 @"$ss27_stringCompareWithSmolCheck__9expectingSbs11_StringGutsV_ADs01_G16ComparisonResultOtF"(i64 %99, %swift.bridge* %101, i64 82, %swift.bridge* nonnull inttoptr (i64 -2233785415175766016 to %swift.bridge*), i8 0)
  %spec.select30 = zext i1 %105 to i64
  br label %106

106:                                              ; preds = %97, %87, %78, %104, %85, %93, %73, %75
  %107 = phi i64 [ 3, %75 ], [ 2, %73 ], [ 1, %93 ], [ %spec.select, %85 ], [ %spec.select30, %104 ], [ 2, %78 ], [ 1, %87 ], [ 1, %97 ]
  %108 = tail call %swift.type* @__swift_instantiateConcreteTypeFromMangledName({ i32, i32 }* nonnull @"$ss23_ContiguousArrayStorageCyypGMD") #12
  %109 = tail call noalias %swift.refcounted* @swift_allocObject(%swift.type* %108, i64 64, i64 7) #2
  %110 = bitcast %swift.refcounted* %109 to %Ts28__ContiguousArrayStorageBaseC*
  %111 = getelementptr inbounds %swift.refcounted, %swift.refcounted* %109, i64 1
  %._storage7.count._value = bitcast %swift.refcounted* %111 to i64*
  store i64 1, i64* %._storage7.count._value, align 8
  %._storage7._capacityAndFlags = getelementptr inbounds %swift.refcounted, %swift.refcounted* %109, i64 1, i32 1
  store i64 2, i64* %._storage7._capacityAndFlags, align 8
  %112 = getelementptr inbounds %swift.refcounted, %swift.refcounted* %109, i64 2
  %113 = getelementptr inbounds %swift.refcounted, %swift.refcounted* %109, i64 3, i32 1
  %114 = bitcast i64* %113 to %swift.type**
  store %swift.type* @"$sSiN", %swift.type** %114, align 8
  %._value9 = bitcast %swift.refcounted* %112 to i64*
  store i64 %107, i64* %._value9, align 8
  tail call swiftcc void @"$ss5print_9separator10terminatoryypd_S2StF"(%Ts28__ContiguousArrayStorageBaseC* %110, 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_release(%swift.refcounted* %109) #2
  tail call void @swift_bridgeObjectRelease(%swift.bridge* nonnull %6) #2
  %115 = getelementptr %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %.lcssa, i64 0, i32 0
  tail call void @swift_release(%swift.refcounted* %115) #2
  br label %116

116:                                              ; preds = %entry, %106
  ret void

117:                                              ; preds = %._crit_edge
  tail call void asm sideeffect "", "n"(i32 0) #2
  tail call void @llvm.trap()
  unreachable

118:                                              ; preds = %95
  tail call void asm sideeffect "", "n"(i32 2) #2
  tail call void @llvm.trap()
  unreachable

119:                                              ; preds = %76
  tail call void asm sideeffect "", "n"(i32 4) #2
  tail call void @llvm.trap()
  unreachable

120:                                              ; preds = %64
  tail call void asm sideeffect "", "n"(i32 5) #2
  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 { i64, i64 } @"$sSS8IteratorV4nextSJSgyF"(%TSS8IteratorV* nocapture swiftself dereferenceable(32)) local_unnamed_addr #0

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

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

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

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

; Function Attrs: minsize mustprogress nofree noinline nounwind optsize readonly willreturn
define linkonce_odr hidden %swift.type* @__swift_instantiateConcreteTypeFromMangledName({ i32, i32 }* %0) local_unnamed_addr #4 {
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) #13
  %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 #5

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

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

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

; Function Attrs: mustprogress nounwind willreturn
declare zeroext i1 @swift_isUniquelyReferenced_nonNull_native(%swift.refcounted*) local_unnamed_addr #6

; Function Attrs: minsize noinline optsize
define linkonce_odr hidden swiftcc %Ts28__ContiguousArrayStorageBaseC* @"$ss22_ContiguousArrayBufferV20_consumeAndCreateNew14bufferIsUnique15minimumCapacity13growForAppendAByxGSb_SiSbtFSS_Tg5"(i1 %0, i64 %1, i1 %2, %Ts28__ContiguousArrayStorageBaseC* %3) local_unnamed_addr #7 {
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 %47, 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_ContiguousArrayStorageCySSGMD") #12
  %21 = shl i64 %17, 4
  %22 = add i64 %21, 32
  %23 = tail call noalias %swift.refcounted* @swift_allocObject(%swift.type* %20, i64 %22, i64 7) #2
  %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) #14
  %gepdiff = add nsw i64 %call.i, -32
  %26 = sdiv i64 %gepdiff, 16
  %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
  %32 = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %3, i64 1
  br i1 %0, label %33, label %42

33:                                               ; preds = %29
  %34 = bitcast %Ts28__ContiguousArrayStorageBaseC* %32 to %TSS*
  %35 = getelementptr inbounds %TSS, %TSS* %34, i64 %16
  %36 = bitcast %Ts28__ContiguousArrayStorageBaseC* %31 to %TSS*
  %37 = icmp ugt %TSS* %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_SitFSS_Tg5.exit", label %.sink.split.i

.sink.split.i:                                    ; preds = %33
  %39 = bitcast %Ts28__ContiguousArrayStorageBaseC* %32 to i8*
  %40 = bitcast %Ts28__ContiguousArrayStorageBaseC* %31 to i8*
  %41 = shl nuw i64 %16, 4
  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_SitFSS_Tg5.exit"

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

42:                                               ; preds = %29
  %43 = bitcast %Ts28__ContiguousArrayStorageBaseC* %31 to %swift.opaque*
  %44 = bitcast %Ts28__ContiguousArrayStorageBaseC* %32 to %swift.opaque*
  tail call void @swift_arrayInitWithCopy(%swift.opaque* nonnull %43, %swift.opaque* nonnull %44, i64 %16, %swift.type* nonnull @"$sSSN") #11
  br label %45

45:                                               ; preds = %"$sSp14moveInitialize4from5countySpyxG_SitFSS_Tg5.exit", %42
  %46 = getelementptr %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %3, i64 0, i32 0
  tail call void @swift_release(%swift.refcounted* %46) #2
  ret %Ts28__ContiguousArrayStorageBaseC* %30

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

; Function Attrs: mustprogress nounwind willreturn
declare void @swift_arrayInitWithCopy(%swift.opaque*, %swift.opaque*, i64, %swift.type*) local_unnamed_addr #6

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

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

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

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 = { nounwind }
attributes #3 = { cold noreturn nounwind }
attributes #4 = { 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 #5 = { argmemonly nounwind }
attributes #6 = { mustprogress nounwind willreturn }
attributes #7 = { 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 #8 = { argmemonly mustprogress nocallback nofree nounwind willreturn }
attributes #9 = { 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 #10 = { nocallback nofree nosync nounwind readnone speculatable willreturn }
attributes #11 = { nounwind willreturn }
attributes #12 = { nounwind readonly }
attributes #13 = { argmemonly nounwind readonly }
attributes #14 = { 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}
