func main(input1: String = readLine()!, input2: String = readLine()!) {
    let stones = Array(input2)
    let numberOfR = stones.filter { $0 == "R" }.count
    let numberOfMovingW = stones[..<numberOfR].filter { $0 == "W" }.count
    print(numberOfMovingW)
}

main()
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/Swift/Source_2904/llvm_O3.ll'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/Swift/Source_2904/llvm_O3.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 }
%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 }>
%TSJ = type <{ %TSS }>
%TSS = type <{ %Ts11_StringGutsV }>
%Ts11_StringGutsV = type <{ %Ts13_StringObjectV }>
%Ts13_StringObjectV = type <{ %Ts6UInt64V, %swift.bridge* }>
%Ts6UInt64V = type <{ i64 }>
%swift.opaque = type opaque
%TSS8IteratorV = type <{ %Ts11_StringGutsV, %TSi, %TSi }>

@_swiftEmptyArrayStorage = external global %struct._SwiftEmptyArrayStorage, 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
@"$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
@"symbolic _____ySJG 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 _____ySJG s23_ContiguousArrayStorageC", i32 0, i32 1) to i64)) to i32), [4 x i8] c"ySJG", i8 0 }>, section "swift5_typeref", no_sanitize_address, align 2
@"$ss23_ContiguousArrayStorageCySJGMD" = linkonce_odr hidden global { i32, i32 } { i32 trunc (i64 sub (i64 ptrtoint (<{ i8, i32, [4 x i8], i8 }>* @"symbolic _____ySJG s23_ContiguousArrayStorageC" to i64), i64 ptrtoint ({ i32, i32 }* @"$ss23_ContiguousArrayStorageCySJGMD" to i64)) to i32), i32 -9 }, align 8
@"$sSJN" = external global %swift.type, align 8
@__swift_reflection_version = linkonce_odr hidden constant i16 3
@_swift1_autolink_entries = private constant [77 x i8] c"-lswift_Concurrency\00-lswiftCore\00-lswift_StringProcessing\00-lswift_RegexParser\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 ([77 x i8], [77 x i8]* @_swift1_autolink_entries, i32 0, i32 0), i8* bitcast (i32 (i32, i8**)* @main to i8*)], section "llvm.metadata"

define protected i32 @main(i32 %0, i8** nocapture readnone %1) #0 {
entry:
  %2 = tail call swiftcc { i64, i64 } @"$ss8readLine16strippingNewlineSSSgSb_tF"(i1 true)
  %3 = extractvalue { i64, i64 } %2, 1
  %4 = icmp eq i64 %3, 0
  br i1 %4, label %13, label %5

5:                                                ; preds = %entry
  %6 = tail call swiftcc { i64, i64 } @"$ss8readLine16strippingNewlineSSSgSb_tF"(i1 true)
  %7 = extractvalue { i64, i64 } %6, 1
  %8 = icmp eq i64 %7, 0
  br i1 %8, label %14, label %9

9:                                                ; preds = %5
  %10 = extractvalue { i64, i64 } %6, 0
  %11 = inttoptr i64 %7 to %swift.bridge*
  tail call swiftcc void @"$s7llvm_O34main6input16input2ySS_SStFTf4dn_n"(i64 %10, %swift.bridge* nonnull %11)
  tail call void @swift_bridgeObjectRelease(%swift.bridge* nonnull %11) #3
  %12 = inttoptr i64 %3 to %swift.bridge*
  tail call void @swift_bridgeObjectRelease(%swift.bridge* nonnull %12) #3
  ret i32 0

13:                                               ; preds = %entry
  tail call void asm sideeffect "", "n"(i32 0) #3
  tail call void @llvm.trap()
  unreachable

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

declare swiftcc { i64, i64 } @"$ss8readLine16strippingNewlineSSSgSb_tF"(i1) local_unnamed_addr #0

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

define hidden swiftcc { i64, %swift.bridge* } @"$s7llvm_O34main6input16input2ySS_SStFfA0_"() local_unnamed_addr #0 {
  %1 = tail call swiftcc { i64, %swift.bridge* } @"$s7llvm_O34main6input16input2ySS_SStFfA_Tm"() #0
  %2 = extractvalue { i64, %swift.bridge* } %1, 0
  %3 = insertvalue { i64, %swift.bridge* } undef, i64 %2, 0
  %4 = extractvalue { i64, %swift.bridge* } %1, 1
  %5 = insertvalue { i64, %swift.bridge* } %3, %swift.bridge* %4, 1
  ret { i64, %swift.bridge* } %5
}

define internal swiftcc { i64, %swift.bridge* } @"$s7llvm_O34main6input16input2ySS_SStFfA_Tm"() local_unnamed_addr #0 {
entry:
  %0 = tail call swiftcc { i64, i64 } @"$ss8readLine16strippingNewlineSSSgSb_tF"(i1 true)
  %1 = extractvalue { i64, i64 } %0, 1
  %2 = icmp eq i64 %1, 0
  br i1 %2, label %8, label %3

3:                                                ; preds = %entry
  %4 = extractvalue { i64, i64 } %0, 0
  %5 = inttoptr i64 %1 to %swift.bridge*
  %6 = insertvalue { i64, %swift.bridge* } undef, i64 %4, 0
  %7 = insertvalue { i64, %swift.bridge* } %6, %swift.bridge* %5, 1
  ret { i64, %swift.bridge* } %7

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

define hidden swiftcc void @"$s7llvm_O34main6input16input2ySS_SStF"(i64 %0, %swift.bridge* nocapture readnone %1, i64 %2, %swift.bridge* %3) local_unnamed_addr #0 {
entry:
  tail call swiftcc void @"$s7llvm_O34main6input16input2ySS_SStFTf4dn_n"(i64 %2, %swift.bridge* %3) #11
  ret void
}

; Function Attrs: noinline
define linkonce_odr hidden swiftcc void @"$ss15ContiguousArrayV16_createNewBuffer14bufferIsUnique15minimumCapacity13growForAppendySb_SiSbtFSJ_Tg5"(i1 %0, i64 %1, i1 %2, %Ts15ContiguousArrayV* nocapture swiftself dereferenceable(8) %3) local_unnamed_addr #2 {
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_SiSbtFSJ_Tg5"(i1 %0, i64 %1, i1 %2, %Ts28__ContiguousArrayStorageBaseC* %4)
  store %Ts28__ContiguousArrayStorageBaseC* %5, %Ts28__ContiguousArrayStorageBaseC** %._buffer._storage, align 8
  ret void
}

; Function Attrs: noinline
define linkonce_odr hidden swiftcc %Ts28__ContiguousArrayStorageBaseC* @"$ss22_ContiguousArrayBufferV20_consumeAndCreateNew14bufferIsUnique15minimumCapacity13growForAppendAByxGSb_SiSbtFSJ_Tg5"(i1 %0, i64 %1, i1 %2, %Ts28__ContiguousArrayStorageBaseC* %3) local_unnamed_addr #2 {
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 !6

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 !7
  %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_ContiguousArrayStorageCySJGMD") #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) #3
  %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) #13
  %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
  %tailaddr4 = bitcast %Ts28__ContiguousArrayStorageBaseC* %32 to %TSJ*
  %34 = getelementptr inbounds %TSJ, %TSJ* %tailaddr4, i64 %16
  %35 = bitcast %TSJ* %34 to %Ts28__ContiguousArrayStorageBaseC*
  %36 = icmp ult %Ts28__ContiguousArrayStorageBaseC* %31, %35
  %37 = icmp eq %Ts28__ContiguousArrayStorageBaseC* %30, %3
  %or.cond14 = select i1 %37, i1 %36, i1 false
  br i1 %or.cond14, label %41, label %.sink.split

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

41:                                               ; preds = %33, %.sink.split
  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 @"$sSJN") #14
  br label %45

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

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

define linkonce_odr hidden swiftcc i64 @"$sSTsE21_copySequenceContents12initializing8IteratorQz_SitSry7ElementQzG_tFSS_Tgq5"(%TSS8IteratorV* noalias nocapture %0, i64 %1, i64 %2, i64 %3, %swift.bridge* %4) local_unnamed_addr #0 {
entry:
  %5 = alloca %TSS8IteratorV, align 8
  %6 = bitcast %TSS8IteratorV* %5 to i8*
  call void @llvm.lifetime.start.p0i8(i64 32, i8* nonnull %6)
  %7 = ptrtoint %swift.bridge* %4 to i64
  %8 = and i64 %7, 2305843009213693952
  %9 = icmp eq i64 %8, 0
  %10 = lshr i64 %7, 56
  %11 = and i64 %10, 15
  %12 = and i64 %3, 281474976710655
  %13 = select i1 %9, i64 %12, i64 %11
  %._guts._object._countAndFlagsBits._value = getelementptr inbounds %TSS8IteratorV, %TSS8IteratorV* %5, i64 0, i32 0, i32 0, i32 0, i32 0
  store i64 %3, i64* %._guts._object._countAndFlagsBits._value, align 8
  %._guts._object._object = getelementptr inbounds %TSS8IteratorV, %TSS8IteratorV* %5, i64 0, i32 0, i32 0, i32 1
  store %swift.bridge* %4, %swift.bridge** %._guts._object._object, align 8
  %._position._value = getelementptr inbounds %TSS8IteratorV, %TSS8IteratorV* %5, i64 0, i32 1, i32 0
  store i64 0, i64* %._position._value, align 8
  %._end._value = getelementptr inbounds %TSS8IteratorV, %TSS8IteratorV* %5, i64 0, i32 2, i32 0
  store i64 %13, i64* %._end._value, align 8
  %14 = icmp eq i64 %1, 0
  %15 = insertelement <2 x i64> <i64 0, i64 poison>, i64 %13, i64 1
  br i1 %14, label %._crit_edge, label %16

16:                                               ; preds = %entry
  %17 = icmp eq i64 %2, 0
  br i1 %17, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %16
  %18 = icmp slt i64 %2, 0
  br i1 %18, label %42, label %.lr.ph.split.preheader, !prof !6

.lr.ph.split.preheader:                           ; preds = %.lr.ph
  %19 = inttoptr i64 %1 to %TSJ*
  br label %20

20:                                               ; preds = %26, %.lr.ph.split.preheader
  %21 = phi i64 [ %27, %26 ], [ 0, %.lr.ph.split.preheader ]
  %22 = phi %TSJ* [ %30, %26 ], [ %19, %.lr.ph.split.preheader ]
  %23 = call swiftcc { i64, i64 } @"$sSS8IteratorV4nextSJSgyF"(%TSS8IteratorV* nocapture nonnull swiftself dereferenceable(32) %5)
  %24 = extractvalue { i64, i64 } %23, 1
  %25 = icmp eq i64 %24, 0
  br i1 %25, label %34, label %26

26:                                               ; preds = %20
  %27 = add nuw nsw i64 %21, 1
  %28 = extractvalue { i64, i64 } %23, 0
  %29 = inttoptr i64 %24 to %swift.bridge*
  %._str._guts._object._countAndFlagsBits._value = getelementptr inbounds %TSJ, %TSJ* %22, i64 0, i32 0, i32 0, i32 0, i32 0, i32 0
  store i64 %28, i64* %._str._guts._object._countAndFlagsBits._value, align 8
  %._str._guts._object._object = getelementptr inbounds %TSJ, %TSJ* %22, i64 0, i32 0, i32 0, i32 0, i32 1
  store %swift.bridge* %29, %swift.bridge** %._str._guts._object._object, align 8
  %30 = getelementptr inbounds %TSJ, %TSJ* %22, i64 1
  %31 = icmp eq i64 %27, %2
  br i1 %31, label %._crit_edge.loopexit, label %20

._crit_edge.loopexit:                             ; preds = %26
  %.pre = load i64, i64* %._guts._object._countAndFlagsBits._value, align 8
  %.pre25 = load %swift.bridge*, %swift.bridge** %._guts._object._object, align 8
  %32 = bitcast i64* %._position._value to <2 x i64>*
  %33 = load <2 x i64>, <2 x i64>* %32, align 8
  br label %._crit_edge

34:                                               ; preds = %20
  %35 = load i64, i64* %._guts._object._countAndFlagsBits._value, align 8
  %36 = load %swift.bridge*, %swift.bridge** %._guts._object._object, align 8
  %37 = bitcast i64* %._position._value to <2 x i64>*
  %38 = load <2 x i64>, <2 x i64>* %37, align 8
  br label %._crit_edge

._crit_edge:                                      ; preds = %16, %._crit_edge.loopexit, %entry, %34
  %.sink31 = phi i64 [ %35, %34 ], [ %3, %entry ], [ %.pre, %._crit_edge.loopexit ], [ %3, %16 ]
  %.sink30 = phi %swift.bridge* [ %36, %34 ], [ %4, %entry ], [ %.pre25, %._crit_edge.loopexit ], [ %4, %16 ]
  %39 = phi i64 [ %21, %34 ], [ 0, %entry ], [ %2, %._crit_edge.loopexit ], [ %2, %16 ]
  %40 = phi <2 x i64> [ %38, %34 ], [ %15, %entry ], [ %33, %._crit_edge.loopexit ], [ %15, %16 ]
  %._guts13._object._countAndFlagsBits._value = getelementptr inbounds %TSS8IteratorV, %TSS8IteratorV* %0, i64 0, i32 0, i32 0, i32 0, i32 0
  store i64 %.sink31, i64* %._guts13._object._countAndFlagsBits._value, align 8
  %._guts13._object._object = getelementptr inbounds %TSS8IteratorV, %TSS8IteratorV* %0, i64 0, i32 0, i32 0, i32 1
  store %swift.bridge* %.sink30, %swift.bridge** %._guts13._object._object, align 8
  %._position14._value = getelementptr inbounds %TSS8IteratorV, %TSS8IteratorV* %0, i64 0, i32 1, i32 0
  %41 = bitcast i64* %._position14._value to <2 x i64>*
  store <2 x i64> %40, <2 x i64>* %41, align 8
  call void @llvm.lifetime.end.p0i8(i64 32, i8* nonnull %6)
  ret i64 %39

42:                                               ; preds = %.lr.ph
  tail call void asm sideeffect "", "n"(i32 0) #3
  tail call void @llvm.trap()
  unreachable
}

define linkonce_odr hidden swiftcc %Ts28__ContiguousArrayStorageBaseC* @"$ss22_ContiguousArrayBufferV19_uninitializedCount15minimumCapacityAByxGSi_SitcfCSJ_Tgq5Tf4nnd_n"(i64 %0, i64 %1) local_unnamed_addr #0 {
entry:
  %2 = tail call i64 @llvm.smax.i64(i64 %1, i64 %0)
  %3 = icmp eq i64 %2, 0
  br i1 %3, label %14, label %4

4:                                                ; preds = %entry
  %5 = tail call %swift.type* @__swift_instantiateConcreteTypeFromMangledName({ i32, i32 }* nonnull @"$ss23_ContiguousArrayStorageCySJGMD") #12
  %6 = shl i64 %2, 4
  %7 = add i64 %6, 32
  %8 = tail call noalias %swift.refcounted* @swift_allocObject(%swift.type* %5, i64 %7, i64 7) #3
  %9 = bitcast %swift.refcounted* %8 to %Ts28__ContiguousArrayStorageBaseC*
  %10 = bitcast %swift.refcounted* %8 to i8*
  %call.i = tail call i64 @malloc_usable_size(i8* noundef %10) #13
  %gepdiff = add nsw i64 %call.i, -32
  %11 = sdiv i64 %gepdiff, 16
  %12 = shl nsw i64 %11, 1
  %13 = getelementptr inbounds %swift.refcounted, %swift.refcounted* %8, i64 1
  %._storage1.count._value = bitcast %swift.refcounted* %13 to i64*
  store i64 %0, i64* %._storage1.count._value, align 8
  %._storage1._capacityAndFlags = getelementptr inbounds %swift.refcounted, %swift.refcounted* %8, i64 1, i32 1
  store i64 %12, i64* %._storage1._capacityAndFlags, align 8
  br label %14

14:                                               ; preds = %entry, %4
  %15 = phi %Ts28__ContiguousArrayStorageBaseC* [ %9, %4 ], [ bitcast (%struct._SwiftEmptyArrayStorage* @_swiftEmptyArrayStorage to %Ts28__ContiguousArrayStorageBaseC*), %entry ]
  ret %Ts28__ContiguousArrayStorageBaseC* %15
}

define linkonce_odr hidden swiftcc void @"$s7llvm_O34main6input16input2ySS_SStFTf4dn_n"(i64 %0, %swift.bridge* %1) local_unnamed_addr #0 {
entry:
  %2 = alloca %TSS8IteratorV, align 8
  %3 = alloca %Ts15ContiguousArrayV, align 8
  %4 = alloca %Ts15ContiguousArrayV, align 8
  %5 = tail call %swift.bridge* @swift_bridgeObjectRetain(%swift.bridge* returned %1) #3
  %6 = tail call swiftcc i64 @"$sSS5countSivg"(i64 %0, %swift.bridge* %1)
  %7 = icmp eq i64 %6, 0
  br i1 %7, label %8, label %9

8:                                                ; preds = %entry
  tail call void @swift_bridgeObjectRelease(%swift.bridge* %1) #3
  br label %18

9:                                                ; preds = %entry
  %10 = tail call swiftcc %Ts28__ContiguousArrayStorageBaseC* @"$ss22_ContiguousArrayBufferV19_uninitializedCount15minimumCapacityAByxGSi_SitcfCSJ_Tgq5Tf4nnd_n"(i64 %6, i64 0)
  %11 = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %10, i64 1
  %12 = ptrtoint %Ts28__ContiguousArrayStorageBaseC* %11 to i64
  %13 = bitcast %TSS8IteratorV* %2 to i8*
  call void @llvm.lifetime.start.p0i8(i64 32, i8* nonnull %13)
  %14 = tail call %swift.bridge* @swift_bridgeObjectRetain(%swift.bridge* returned %1) #3
  %15 = call swiftcc i64 @"$sSTsE21_copySequenceContents12initializing8IteratorQz_SitSry7ElementQzG_tFSS_Tgq5"(%TSS8IteratorV* noalias nocapture nonnull %2, i64 %12, i64 %6, i64 %0, %swift.bridge* %1)
  %.not = icmp eq i64 %15, %6
  br i1 %.not, label %16, label %116, !prof !8

16:                                               ; preds = %9
  %._guts._object._object = getelementptr inbounds %TSS8IteratorV, %TSS8IteratorV* %2, i64 0, i32 0, i32 0, i32 1
  %17 = load %swift.bridge*, %swift.bridge** %._guts._object._object, align 8
  tail call void @swift_bridgeObjectRelease(%swift.bridge* %1) #3
  tail call void @swift_bridgeObjectRelease(%swift.bridge* %17) #3
  call void @llvm.lifetime.end.p0i8(i64 32, i8* nonnull %13)
  br label %18

18:                                               ; preds = %8, %16
  %19 = phi %Ts28__ContiguousArrayStorageBaseC* [ %10, %16 ], [ bitcast (%struct._SwiftEmptyArrayStorage* @_swiftEmptyArrayStorage to %Ts28__ContiguousArrayStorageBaseC*), %8 ]
  %20 = bitcast %Ts15ContiguousArrayV* %3 to i8*
  call void @llvm.lifetime.start.p0i8(i64 8, i8* nonnull %20)
  %._storage.count._value = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %19, i64 0, i32 1, i32 0, i32 0, i32 0
  %21 = load i64, i64* %._storage.count._value, align 8, !range !7
  %22 = icmp eq i64 %21, 0
  br i1 %22, label %27, label %23

23:                                               ; preds = %18
  %24 = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %19, i64 1
  %tailaddr1 = bitcast %Ts28__ContiguousArrayStorageBaseC* %24 to %TSJ*
  %25 = getelementptr %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %19, i64 0, i32 0
  %._buffer20._storage = getelementptr inbounds %Ts15ContiguousArrayV, %Ts15ContiguousArrayV* %3, i64 0, i32 0, i32 0
  %26 = tail call %swift.refcounted* @swift_retain(%swift.refcounted* returned %25) #14
  br label %40

27:                                               ; preds = %18, %71
  %28 = phi %Ts28__ContiguousArrayStorageBaseC* [ %68, %71 ], [ bitcast (%struct._SwiftEmptyArrayStorage* @_swiftEmptyArrayStorage to %Ts28__ContiguousArrayStorageBaseC*), %18 ]
  call void @llvm.lifetime.end.p0i8(i64 8, i8* nonnull %20)
  %._storage2.count._value = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %28, i64 0, i32 1, i32 0, i32 0, i32 0
  %29 = load i64, i64* %._storage2.count._value, align 8, !range !7
  %30 = getelementptr %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %28, i64 0, i32 0
  tail call void @swift_release(%swift.refcounted* %30) #3
  %31 = load i64, i64* %._storage.count._value, align 8, !range !7
  %32 = icmp ult i64 %31, %29
  br i1 %32, label %117, label %33, !prof !6

33:                                               ; preds = %27
  %34 = bitcast %Ts15ContiguousArrayV* %4 to i8*
  call void @llvm.lifetime.start.p0i8(i64 8, i8* nonnull %34)
  %35 = icmp eq i64 %29, 0
  br i1 %35, label %104, label %36

36:                                               ; preds = %33
  %37 = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %19, i64 1
  %tailaddr3 = bitcast %Ts28__ContiguousArrayStorageBaseC* %37 to %TSJ*
  %38 = getelementptr %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %19, i64 0, i32 0
  %._buffer._storage = getelementptr inbounds %Ts15ContiguousArrayV, %Ts15ContiguousArrayV* %4, i64 0, i32 0, i32 0
  %39 = tail call %swift.refcounted* @swift_retain(%swift.refcounted* returned %38) #14
  br label %72

40:                                               ; preds = %67, %23
  %41 = phi i64 [ 0, %23 ], [ %69, %67 ]
  %42 = phi %Ts28__ContiguousArrayStorageBaseC* [ bitcast (%struct._SwiftEmptyArrayStorage* @_swiftEmptyArrayStorage to %Ts28__ContiguousArrayStorageBaseC*), %23 ], [ %68, %67 ]
  %._str._guts._object._countAndFlagsBits._value = getelementptr inbounds %TSJ, %TSJ* %tailaddr1, i64 %41, i32 0, i32 0, i32 0, i32 0, i32 0
  %43 = load i64, i64* %._str._guts._object._countAndFlagsBits._value, align 8
  %._str._guts._object._object = getelementptr inbounds %TSJ, %TSJ* %tailaddr1, i64 %41, i32 0, i32 0, i32 0, i32 1
  %44 = load %swift.bridge*, %swift.bridge** %._str._guts._object._object, align 8
  %45 = icmp eq i64 %43, 82
  %46 = icmp eq %swift.bridge* %44, inttoptr (i64 -2233785415175766016 to %swift.bridge*)
  %or.cond = select i1 %45, i1 %46, i1 false
  br i1 %or.cond, label %49, label %47

47:                                               ; preds = %40
  %48 = tail call swiftcc i1 @"$ss27_stringCompareWithSmolCheck__9expectingSbs11_StringGutsV_ADs01_G16ComparisonResultOtF"(i64 %43, %swift.bridge* %44, i64 82, %swift.bridge* nonnull inttoptr (i64 -2233785415175766016 to %swift.bridge*), i8 0)
  br i1 %48, label %49, label %67

49:                                               ; preds = %40, %47
  %50 = getelementptr %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %42, i64 0, i32 0
  %51 = tail call %swift.bridge* @swift_bridgeObjectRetain(%swift.bridge* returned %44) #3
  %52 = tail call zeroext i1 @swift_isUniquelyReferenced_nonNull_native(%swift.refcounted* %50) #14
  store %Ts28__ContiguousArrayStorageBaseC* %42, %Ts28__ContiguousArrayStorageBaseC** %._buffer20._storage, align 8
  br i1 %52, label %56, label %53

53:                                               ; preds = %49
  %._storage21.count._value = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %42, i64 0, i32 1, i32 0, i32 0, i32 0
  %54 = load i64, i64* %._storage21.count._value, align 8, !range !7
  %55 = add nuw nsw i64 %54, 1
  call swiftcc void @"$ss15ContiguousArrayV16_createNewBuffer14bufferIsUnique15minimumCapacity13growForAppendySb_SiSbtFSJ_Tg5"(i1 false, i64 %55, i1 true, %Ts15ContiguousArrayV* nocapture nonnull swiftself dereferenceable(8) %3)
  %.pre = load %Ts28__ContiguousArrayStorageBaseC*, %Ts28__ContiguousArrayStorageBaseC** %._buffer20._storage, align 8
  br label %56

56:                                               ; preds = %49, %53
  %57 = phi %Ts28__ContiguousArrayStorageBaseC* [ %42, %49 ], [ %.pre, %53 ]
  %._storage23.count._value = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %57, i64 0, i32 1, i32 0, i32 0, i32 0
  %58 = load i64, i64* %._storage23.count._value, align 8, !range !7
  %._storage23._capacityAndFlags._value = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %57, i64 0, i32 1, i32 0, i32 1, i32 0
  %59 = load i64, i64* %._storage23._capacityAndFlags._value, align 8
  %60 = lshr i64 %59, 1
  %61 = add nuw nsw i64 %58, 1
  %.not49 = icmp ugt i64 %60, %58
  br i1 %.not49, label %64, label %62, !prof !8

62:                                               ; preds = %56
  %63 = icmp ugt i64 %59, 1
  call swiftcc void @"$ss15ContiguousArrayV16_createNewBuffer14bufferIsUnique15minimumCapacity13growForAppendySb_SiSbtFSJ_Tg5"(i1 %63, i64 %61, i1 true, %Ts15ContiguousArrayV* nocapture nonnull swiftself dereferenceable(8) %3)
  %.pre53 = load %Ts28__ContiguousArrayStorageBaseC*, %Ts28__ContiguousArrayStorageBaseC** %._buffer20._storage, align 8
  br label %64

64:                                               ; preds = %56, %62
  %65 = phi %Ts28__ContiguousArrayStorageBaseC* [ %57, %56 ], [ %.pre53, %62 ]
  %._storage24.count._value = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %65, i64 0, i32 1, i32 0, i32 0, i32 0
  store i64 %61, i64* %._storage24.count._value, align 8
  %66 = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %65, i64 1
  %tailaddr25 = bitcast %Ts28__ContiguousArrayStorageBaseC* %66 to %TSJ*
  %._str26._guts._object._countAndFlagsBits._value = getelementptr inbounds %TSJ, %TSJ* %tailaddr25, i64 %58, i32 0, i32 0, i32 0, i32 0, i32 0
  store i64 %43, i64* %._str26._guts._object._countAndFlagsBits._value, align 8
  %._str26._guts._object._object = getelementptr inbounds %TSJ, %TSJ* %tailaddr25, i64 %58, i32 0, i32 0, i32 0, i32 1
  store %swift.bridge* %44, %swift.bridge** %._str26._guts._object._object, align 8
  br label %67

67:                                               ; preds = %47, %64
  %68 = phi %Ts28__ContiguousArrayStorageBaseC* [ %65, %64 ], [ %42, %47 ]
  %69 = add nuw nsw i64 %41, 1
  %70 = icmp eq i64 %69, %21
  br i1 %70, label %71, label %40

71:                                               ; preds = %67
  tail call void @swift_release(%swift.refcounted* %25) #3
  br label %27

72:                                               ; preds = %99, %36
  %73 = phi i64 [ 0, %36 ], [ %101, %99 ]
  %74 = phi %Ts28__ContiguousArrayStorageBaseC* [ bitcast (%struct._SwiftEmptyArrayStorage* @_swiftEmptyArrayStorage to %Ts28__ContiguousArrayStorageBaseC*), %36 ], [ %100, %99 ]
  %._str5._guts._object._countAndFlagsBits._value = getelementptr inbounds %TSJ, %TSJ* %tailaddr3, i64 %73, i32 0, i32 0, i32 0, i32 0, i32 0
  %75 = load i64, i64* %._str5._guts._object._countAndFlagsBits._value, align 8
  %._str5._guts._object._object = getelementptr inbounds %TSJ, %TSJ* %tailaddr3, i64 %73, i32 0, i32 0, i32 0, i32 1
  %76 = load %swift.bridge*, %swift.bridge** %._str5._guts._object._object, align 8
  %77 = icmp eq i64 %75, 87
  %78 = icmp eq %swift.bridge* %76, inttoptr (i64 -2233785415175766016 to %swift.bridge*)
  %or.cond50 = select i1 %77, i1 %78, i1 false
  br i1 %or.cond50, label %81, label %79

79:                                               ; preds = %72
  %80 = tail call swiftcc i1 @"$ss27_stringCompareWithSmolCheck__9expectingSbs11_StringGutsV_ADs01_G16ComparisonResultOtF"(i64 %75, %swift.bridge* %76, i64 87, %swift.bridge* nonnull inttoptr (i64 -2233785415175766016 to %swift.bridge*), i8 0)
  br i1 %80, label %81, label %99

81:                                               ; preds = %72, %79
  %82 = getelementptr %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %74, i64 0, i32 0
  %83 = tail call %swift.bridge* @swift_bridgeObjectRetain(%swift.bridge* returned %76) #3
  %84 = tail call zeroext i1 @swift_isUniquelyReferenced_nonNull_native(%swift.refcounted* %82) #14
  store %Ts28__ContiguousArrayStorageBaseC* %74, %Ts28__ContiguousArrayStorageBaseC** %._buffer._storage, align 8
  br i1 %84, label %88, label %85

85:                                               ; preds = %81
  %._storage10.count._value = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %74, i64 0, i32 1, i32 0, i32 0, i32 0
  %86 = load i64, i64* %._storage10.count._value, align 8, !range !7
  %87 = add nuw nsw i64 %86, 1
  call swiftcc void @"$ss15ContiguousArrayV16_createNewBuffer14bufferIsUnique15minimumCapacity13growForAppendySb_SiSbtFSJ_Tg5"(i1 false, i64 %87, i1 true, %Ts15ContiguousArrayV* nocapture nonnull swiftself dereferenceable(8) %4)
  %.pre54 = load %Ts28__ContiguousArrayStorageBaseC*, %Ts28__ContiguousArrayStorageBaseC** %._buffer._storage, align 8
  br label %88

88:                                               ; preds = %81, %85
  %89 = phi %Ts28__ContiguousArrayStorageBaseC* [ %74, %81 ], [ %.pre54, %85 ]
  %._storage12.count._value = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %89, i64 0, i32 1, i32 0, i32 0, i32 0
  %90 = load i64, i64* %._storage12.count._value, align 8, !range !7
  %._storage12._capacityAndFlags._value = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %89, i64 0, i32 1, i32 0, i32 1, i32 0
  %91 = load i64, i64* %._storage12._capacityAndFlags._value, align 8
  %92 = lshr i64 %91, 1
  %93 = add nuw nsw i64 %90, 1
  %.not48 = icmp ugt i64 %92, %90
  br i1 %.not48, label %96, label %94, !prof !8

94:                                               ; preds = %88
  %95 = icmp ugt i64 %91, 1
  call swiftcc void @"$ss15ContiguousArrayV16_createNewBuffer14bufferIsUnique15minimumCapacity13growForAppendySb_SiSbtFSJ_Tg5"(i1 %95, i64 %93, i1 true, %Ts15ContiguousArrayV* nocapture nonnull swiftself dereferenceable(8) %4)
  %.pre55 = load %Ts28__ContiguousArrayStorageBaseC*, %Ts28__ContiguousArrayStorageBaseC** %._buffer._storage, align 8
  br label %96

96:                                               ; preds = %88, %94
  %97 = phi %Ts28__ContiguousArrayStorageBaseC* [ %89, %88 ], [ %.pre55, %94 ]
  %._storage13.count._value = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %97, i64 0, i32 1, i32 0, i32 0, i32 0
  store i64 %93, i64* %._storage13.count._value, align 8
  %98 = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %97, i64 1
  %tailaddr14 = bitcast %Ts28__ContiguousArrayStorageBaseC* %98 to %TSJ*
  %._str15._guts._object._countAndFlagsBits._value = getelementptr inbounds %TSJ, %TSJ* %tailaddr14, i64 %90, i32 0, i32 0, i32 0, i32 0, i32 0
  store i64 %75, i64* %._str15._guts._object._countAndFlagsBits._value, align 8
  %._str15._guts._object._object = getelementptr inbounds %TSJ, %TSJ* %tailaddr14, i64 %90, i32 0, i32 0, i32 0, i32 1
  store %swift.bridge* %76, %swift.bridge** %._str15._guts._object._object, align 8
  br label %99

99:                                               ; preds = %79, %96
  %100 = phi %Ts28__ContiguousArrayStorageBaseC* [ %97, %96 ], [ %74, %79 ]
  %101 = add nuw nsw i64 %73, 1
  %102 = icmp eq i64 %101, %29
  br i1 %102, label %103, label %72

103:                                              ; preds = %99
  tail call void @swift_release(%swift.refcounted* %38) #3
  br label %104

104:                                              ; preds = %33, %103
  %105 = phi %Ts28__ContiguousArrayStorageBaseC* [ %100, %103 ], [ bitcast (%struct._SwiftEmptyArrayStorage* @_swiftEmptyArrayStorage to %Ts28__ContiguousArrayStorageBaseC*), %33 ]
  call void @llvm.lifetime.end.p0i8(i64 8, i8* nonnull %34)
  %._storage6.count._value = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %105, i64 0, i32 1, i32 0, i32 0, i32 0
  %106 = load i64, i64* %._storage6.count._value, align 8, !range !7
  %107 = getelementptr %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %105, i64 0, i32 0
  tail call void @swift_release(%swift.refcounted* %107) #3
  %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) #3
  %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
  %._value = bitcast %swift.refcounted* %112 to i64*
  store i64 %106, i64* %._value, 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) #3
  %115 = getelementptr %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %19, i64 0, i32 0
  tail call void @swift_release(%swift.refcounted* %115) #3
  ret void

116:                                              ; preds = %9
  tail call void asm sideeffect "", "n"(i32 0) #3
  tail call void @llvm.trap()
  unreachable

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

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

declare swiftcc i64 @"$sSS5countSivg"(i64, %swift.bridge*) local_unnamed_addr #0

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

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

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

; Function Attrs: mustprogress nounwind willreturn
declare %swift.refcounted* @swift_retain(%swift.refcounted* returned) local_unnamed_addr #5

declare swiftcc i1 @"$ss27_stringCompareWithSmolCheck__9expectingSbs11_StringGutsV_ADs01_G16ComparisonResultOtF"(i64, %swift.bridge*, i64, %swift.bridge*, i8) local_unnamed_addr #0

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

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

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) #15
  %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 #7

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

declare swiftcc void @"$ss5print_9separator10terminatoryypd_S2StF"(%Ts28__ContiguousArrayStorageBaseC*, i64, %swift.bridge*, i64, %swift.bridge*) local_unnamed_addr #0

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

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

; 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

declare swiftcc { i64, i64 } @"$sSS8IteratorV4nextSJSgyF"(%TSS8IteratorV* nocapture swiftself dereferenceable(32)) local_unnamed_addr #0

; 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

define hidden swiftcc { i64, %swift.bridge* } @"$s7llvm_O34main6input16input2ySS_SStFfA_"() local_unnamed_addr #0 {
  %1 = tail call swiftcc { i64, %swift.bridge* } @"$s7llvm_O34main6input16input2ySS_SStFfA0_"() #0
  %2 = extractvalue { i64, %swift.bridge* } %1, 0
  %3 = insertvalue { i64, %swift.bridge* } poison, i64 %2, 0
  %4 = extractvalue { i64, %swift.bridge* } %1, 1
  %5 = insertvalue { i64, %swift.bridge* } %3, %swift.bridge* %4, 1
  ret { i64, %swift.bridge* } %5
}

attributes #0 = { "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 = { cold noreturn nounwind }
attributes #2 = { noinline "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 #3 = { nounwind }
attributes #4 = { argmemonly mustprogress nocallback nofree nosync nounwind willreturn }
attributes #5 = { mustprogress nounwind willreturn }
attributes #6 = { mustprogress nofree noinline nounwind 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 #7 = { argmemonly nounwind }
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 = { noinline }
attributes #12 = { nounwind readonly }
attributes #13 = { nounwind optsize }
attributes #14 = { nounwind willreturn }
attributes #15 = { argmemonly nounwind readonly }

!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 = !{!"branch_weights", i32 1, i32 2000}
!7 = !{i64 0, i64 9223372036854775807}
!8 = !{!"branch_weights", i32 2000, i32 1}
