#if os(Linux)
import Glibc
#else
import Darwin.C
#endif

let INPUT = stdin

var buffer: UnsafeMutablePointer<CChar>?
var bufferCapacity: Int32 = 0

func getsToBuffer(size: Int32) -> UnsafeMutablePointer<CChar> {
    if bufferCapacity < size {
        buffer?.deallocate()
        buffer = UnsafeMutablePointer.allocate(capacity: Int(size))
        bufferCapacity = size
    }
    return fgets(buffer!, size, INPUT)
}
func getIntFromBuffer(_ ptr: inout UnsafeMutablePointer<CChar>) -> Int {
    var minus = false
    var x: Int?
    while true {
        switch ptr.pointee {
        case 0x2D:
            assert(!minus && x == nil)
            minus = true
        case let d where (0x30...0x39).contains(d):
            x = (x ?? 0)*10 + Int(d)-0x30
        default:
            if x != nil { return minus ? -x! : x! }
        }
        ptr += 1
    }
}
func getInt() -> Int {
    var xPtr = getsToBuffer(size: 24)
    return getIntFromBuffer(&xPtr)
}
func getIntPair() -> (Int, Int) {
    var xPtr = getsToBuffer(size: 2*24)
    let x1 = getIntFromBuffer(&xPtr)
    let x2 = getIntFromBuffer(&xPtr)
    return (x1, x2)
}
func getInts(count: Int) -> [Int] {
    var xPtr = getsToBuffer(size: Int32(count) * 24)
    var a = [Int]()
    a.reserveCapacity(count)
    for _ in 0..<count { a.append(getIntFromBuffer(&xPtr)) }
    return a
}

func scanString(maxLength: Int = 255) -> String {
    let ptr = UnsafeMutablePointer<CChar>.allocate(capacity: maxLength+1)
    let read = withVaList([ptr]) {
        vfscanf(INPUT, "%\(maxLength)s", $0)
    }
    assert(read == 1)
    return String(cString: ptr)
}

//=============================================================================

struct FenwickTree<Element> {
    let count: Int
    private let defaultValue: Element
    private var tree: [Element]
    private let combine: (Element, _ adding: Element) -> Element
    private let inverse: (Element, _ removing: Element) -> Element

    init(count: Int,
         defaultValue: Element,
         addBy combine: @escaping (Element, _ adding: Element) -> Element,
         removeBy inverse: @escaping (Element, _ removing: Element) -> Element
    ) {
        tree = [Element](repeating: defaultValue, count: count)
        self.count = count
        self.defaultValue = defaultValue
        self.combine = combine
        self.inverse = inverse
    }

    mutating func update(at i: Int, adding value: Element) {
        assert(0 <= i && i < count)
        var i = i
        if i == 0 {
            tree[0] = combine(tree[0], value)
            return
        }
        repeat {
            tree[i] = combine(tree[i], value)
            i += i & -i  // increment LSB
        } while i < count
    }
    func query(range r: Range<Int>) -> Element {
        assert(0 <= r.lowerBound && r.upperBound <= count)
        var i = r.upperBound - 1
        var j = r.lowerBound - 1
        var sigma = defaultValue
        if i < 0 { return sigma }
        if j < 0 {
            sigma = combine(sigma, tree[0])
            j = 0
        }
        while i > j {
            sigma = combine(sigma, tree[i])
            i &= i-1  // decrement LSB
        }
        while j > i {
            sigma = inverse(sigma, tree[j])
            j &= j-1  // decrement LSB
        }
        return sigma
    }
}

//=============================================================================

let (N, Q) = getIntPair()
let c = getInts(count: N).map { $0 - 1 }

var queries = [(l: Int, r: Int)]()
queries.reserveCapacity(Q)
for _ in 1...Q {
    let (l, r) = getIntPair()
    queries.append((l: l-1, r: r-1+1))
}
var responses = [Int?](repeating: nil, count: Q)

var queue = queries.enumerated().sorted { $0.1.r > $1.1.r }
var lastSeen = [Int?](repeating: nil, count: N)
var counter = FenwickTree(count: N, defaultValue: 0, addBy: (+), removeBy: (-))

for (i, x) in c.enumerated() {
    if let j = lastSeen[x] {
        counter.update(at: j, adding: -1)
    }
    lastSeen[x] = i
    counter.update(at: i, adding: +1)

    while queue.last?.1.r == i+1 {
        let (queryId, q) = queue.removeLast()
        responses[queryId] = counter.query(range: q.l..<q.r)
    }
}

print(responses.map { String($0!) } .joined(separator: "\n"))

; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/Swift/Source_2332/llvm_O3.ll'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/Swift/Source_2332/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"

%TSpySo8_IO_FILEVGSg = type <{ [8 x i8] }>
%struct._IO_FILE = type { i32, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, %struct._IO_marker*, %struct._IO_FILE*, i32, i32, i64, i16, i8, [1 x i8], i8*, i64, %struct._IO_codecvt*, %struct._IO_wide_data*, %struct._IO_FILE*, i8*, i64, i32, [20 x i8] }
%struct._IO_marker = type opaque
%struct._IO_codecvt = type opaque
%struct._IO_wide_data = type opaque
%TSpys4Int8VGSg = type <{ [8 x i8] }>
%Ts5Int32V = type <{ i32 }>
%TSi = type <{ i64 }>
%TSa = type <{ %Ts22_ContiguousArrayBufferV }>
%Ts22_ContiguousArrayBufferV = type <{ %Ts28__ContiguousArrayStorageBaseC* }>
%Ts28__ContiguousArrayStorageBaseC = type <{ %swift.refcounted, %Ts10_ArrayBodyV }>
%swift.refcounted = type { %swift.type*, i64 }
%swift.type = type { i64 }
%Ts10_ArrayBodyV = type <{ %TSo22_SwiftArrayBodyStorageV }>
%TSo22_SwiftArrayBodyStorageV = type <{ %TSi, %TSu }>
%TSu = type <{ i64 }>
%T7llvm_O311FenwickTreeVySiG = type <{ %TSi, %TSi, %TSa, %swift.function, %swift.function }>
%swift.function = type { i8*, %swift.refcounted* }
%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.protocol_conformance_descriptor = type { i32, i32, i32, i32 }
%swift.protocol = type { i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i32, i32, i32, i32, i32, i32 }
%swift.vwtable = type { i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i64, i64, i32, i32 }
%swift.type_metadata_record = type { i32 }
%Ts15ContiguousArrayV = type <{ %Ts22_ContiguousArrayBufferV }>
%swift.error = type opaque
%swift.opaque = type opaque
%swift.bridge = type opaque
%TSS = type <{ %Ts11_StringGutsV }>
%Ts11_StringGutsV = type <{ %Ts13_StringObjectV }>
%Ts13_StringObjectV = type <{ %Ts6UInt64V, %swift.bridge* }>
%Ts6UInt64V = type <{ i64 }>
%TSp = type <{ i8* }>
%Ts4Int8V = type <{ i8 }>
%Ts15__VaListBuilderC = type <{ %swift.refcounted, %TSi, %TSi, %Ts15__VaListBuilderC6HeaderV, %Ts15ContiguousArrayV, %TSa }>
%Ts15__VaListBuilderC6HeaderV = type <{ %Ts6UInt32V, %Ts6UInt32V, %TSpySiGSg, %TSpySiGSg }>
%Ts6UInt32V = type <{ i32 }>
%TSpySiGSg = type <{ [8 x i8] }>
%swift.metadata_response = type { %swift.type*, i64 }
%Ts7CVarArgP = type { [24 x i8], %swift.type*, i8** }
%struct.__va_list_tag = type { i32, i32, i8*, i8* }
%T7llvm_O311FenwickTreeV = type <{ %TSi }>
%TSrySi6offset_Si1l_Si1rt7elementtG = type <{ %TSpySi6offset_Si1l_Si1rt7elementtGSg, %TSi }>
%TSpySi6offset_Si1l_Si1rt7elementtGSg = type <{ [8 x i8] }>
%TSnySiG = type <{ %TSi, %TSi }>

@"$s7llvm_O35INPUTSpySo8_IO_FILEVGSgvp" = hidden local_unnamed_addr global %TSpySo8_IO_FILEVGSg zeroinitializer, align 8
@stdin = external local_unnamed_addr global %struct._IO_FILE*, align 8
@"$s7llvm_O36bufferSpys4Int8VGSgvp" = hidden global %TSpys4Int8VGSg zeroinitializer, align 8
@"$s7llvm_O314bufferCapacitys5Int32Vvp" = hidden global %Ts5Int32V zeroinitializer, align 4
@"$s7llvm_O31NSivp" = hidden local_unnamed_addr global %TSi zeroinitializer, align 8
@"$s7llvm_O31QSivp" = hidden local_unnamed_addr global %TSi zeroinitializer, align 8
@"$s7llvm_O31cSaySiGvp" = hidden local_unnamed_addr global %TSa zeroinitializer, align 8
@"$s7llvm_O37queriesSaySi1l_Si1rtGvp" = hidden global %TSa zeroinitializer, align 8
@"$s7llvm_O39responsesSaySiSgGvp" = hidden global %TSa zeroinitializer, align 8
@"$s7llvm_O35queueSaySi6offset_Si1l_Si1rt7elementtGvp" = hidden global %TSa zeroinitializer, align 8
@"$s7llvm_O38lastSeenSaySiSgGvp" = hidden global %TSa zeroinitializer, align 8
@"$s7llvm_O37counterAA11FenwickTreeVySiGvp" = hidden global %T7llvm_O311FenwickTreeVySiG zeroinitializer, align 8
@_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
@"$sSis23CustomStringConvertiblesWP" = external global i8*, align 8
@"symbolic SaySSG" = linkonce_odr hidden constant <{ [6 x i8], i8 }> <{ [6 x i8] c"SaySSG", i8 0 }>, section "swift5_typeref", no_sanitize_address, align 2
@"$sSaySSGMD" = linkonce_odr hidden global { i32, i32 } { i32 trunc (i64 sub (i64 ptrtoint (<{ [6 x i8], i8 }>* @"symbolic SaySSG" to i64), i64 ptrtoint ({ i32, i32 }* @"$sSaySSGMD" to i64)) to i32), i32 -6 }, align 8
@"$sSaySSGSayxGSKsWL" = linkonce_odr hidden local_unnamed_addr global i8** null, align 8
@"$sSayxGSKsMc" = external global %swift.protocol_conformance_descriptor, align 4
@"$sSSN" = external global %swift.type, align 8
@"symbolic SiSg" = linkonce_odr hidden constant <{ [4 x i8], i8 }> <{ [4 x i8] c"SiSg", i8 0 }>, section "swift5_typeref", no_sanitize_address, align 2
@"$sSiSgMD" = linkonce_odr hidden global { i32, i32 } { i32 trunc (i64 sub (i64 ptrtoint (<{ [4 x i8], i8 }>* @"symbolic SiSg" to i64), i64 ptrtoint ({ i32, i32 }* @"$sSiSgMD" to i64)) to i32), i32 -4 }, align 8
@"$ss7CVarArgMp" = external global %swift.protocol, align 4
@"got.$ss7CVarArgMp" = private unnamed_addr constant %swift.protocol* @"$ss7CVarArgMp"
@"symbolic _____y______pG s23_ContiguousArrayStorageC s7CVarArgP" = linkonce_odr hidden constant <{ i8, i32, [1 x i8], i8, i32, [3 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, [1 x i8], i8, i32, [3 x i8], i8 }>, <{ i8, i32, [1 x i8], i8, i32, [3 x i8], i8 }>* @"symbolic _____y______pG s23_ContiguousArrayStorageC s7CVarArgP", i32 0, i32 1) to i64)) to i32), [1 x i8] c"y", i8 2, i32 trunc (i64 sub (i64 ptrtoint (%swift.protocol** @"got.$ss7CVarArgMp" to i64), i64 ptrtoint (i32* getelementptr inbounds (<{ i8, i32, [1 x i8], i8, i32, [3 x i8], i8 }>, <{ i8, i32, [1 x i8], i8, i32, [3 x i8], i8 }>* @"symbolic _____y______pG s23_ContiguousArrayStorageC s7CVarArgP", i32 0, i32 4) to i64)) to i32), [3 x i8] c"_pG", i8 0 }>, section "swift5_typeref", no_sanitize_address, align 2
@"$ss23_ContiguousArrayStorageCys7CVarArg_pGMD" = linkonce_odr hidden global { i32, i32 } { i32 trunc (i64 sub (i64 ptrtoint (<{ i8, i32, [1 x i8], i8, i32, [3 x i8], i8 }>* @"symbolic _____y______pG s23_ContiguousArrayStorageC s7CVarArgP" to i64), i64 ptrtoint ({ i32, i32 }* @"$ss23_ContiguousArrayStorageCys7CVarArg_pGMD" to i64)) to i32), i32 -14 }, align 8
@"$ss4Int8VMn" = external global %swift.type_descriptor, align 4
@"got.$ss4Int8VMn" = private unnamed_addr constant %swift.type_descriptor* @"$ss4Int8VMn"
@"symbolic Spy_____G s4Int8V" = linkonce_odr hidden constant <{ [3 x i8], i8, i32, [1 x i8], i8 }> <{ [3 x i8] c"Spy", i8 2, i32 trunc (i64 sub (i64 ptrtoint (%swift.type_descriptor** @"got.$ss4Int8VMn" to i64), i64 ptrtoint (i32* getelementptr inbounds (<{ [3 x i8], i8, i32, [1 x i8], i8 }>, <{ [3 x i8], i8, i32, [1 x i8], i8 }>* @"symbolic Spy_____G s4Int8V", i32 0, i32 2) to i64)) to i32), [1 x i8] c"G", i8 0 }>, section "swift5_typeref", no_sanitize_address, align 2
@"$sSpys4Int8VGMD" = linkonce_odr hidden global { i32, i32 } { i32 trunc (i64 sub (i64 ptrtoint (<{ [3 x i8], i8, i32, [1 x i8], i8 }>* @"symbolic Spy_____G s4Int8V" to i64), i64 ptrtoint ({ i32, i32 }* @"$sSpys4Int8VGMD" to i64)) to i32), i32 -9 }, align 8
@"$sSpys4Int8VGSpyxGs7CVarArgsWL" = linkonce_odr hidden local_unnamed_addr global i8** null, align 8
@"$sSpyxGs7CVarArgsMc" = external global %swift.protocol_conformance_descriptor, align 4
@"symbolic ______p s7CVarArgP" = linkonce_odr hidden constant <{ i8, i32, [2 x i8], i8 }> <{ i8 2, i32 trunc (i64 sub (i64 ptrtoint (%swift.protocol** @"got.$ss7CVarArgMp" to i64), i64 ptrtoint (i32* getelementptr inbounds (<{ i8, i32, [2 x i8], i8 }>, <{ i8, i32, [2 x i8], i8 }>* @"symbolic ______p s7CVarArgP", i32 0, i32 1) to i64)) to i32), [2 x i8] c"_p", i8 0 }>, section "swift5_typeref", no_sanitize_address, align 2
@"$ss7CVarArg_pMD" = linkonce_odr hidden global { i32, i32 } { i32 trunc (i64 sub (i64 ptrtoint (<{ i8, i32, [2 x i8], i8 }>* @"symbolic ______p s7CVarArgP" to i64), i64 ptrtoint ({ i32, i32 }* @"$ss7CVarArg_pMD" to i64)) to i32), i32 -7 }, 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
@"$s7llvm_O311FenwickTreeVWV" = internal constant %swift.vwtable { i8* bitcast (%swift.opaque* ([24 x i8]*, [24 x i8]*, %swift.type*)* @"$s7llvm_O311FenwickTreeVwCP" to i8*), i8* bitcast (void (%swift.opaque*, %swift.type*)* @"$s7llvm_O311FenwickTreeVwxx" to i8*), i8* bitcast (%swift.opaque* (%swift.opaque*, %swift.opaque*, %swift.type*)* @"$s7llvm_O311FenwickTreeVwcp" to i8*), i8* bitcast (%swift.opaque* (%swift.opaque*, %swift.opaque*, %swift.type*)* @"$s7llvm_O311FenwickTreeVwca" to i8*), i8* bitcast (%swift.opaque* (%swift.opaque*, %swift.opaque*, %swift.type*)* @"$s7llvm_O311FenwickTreeVwtk" to i8*), i8* bitcast (%swift.opaque* (%swift.opaque*, %swift.opaque*, %swift.type*)* @"$s7llvm_O311FenwickTreeVwta" to i8*), i8* bitcast (i32 (%swift.opaque*, i32, %swift.type*)* @"$s7llvm_O311FenwickTreeVwet" to i8*), i8* bitcast (void (%swift.opaque*, i32, i32, %swift.type*)* @"$s7llvm_O311FenwickTreeVwst" to i8*), i64 0, i64 0, i32 4194304, i32 0 }, align 8
@.str.7.llvm_O3 = private constant [8 x i8] c"llvm_O3\00"
@"$s7llvm_O3MXM" = linkonce_odr hidden constant <{ i32, i32, i32 }> <{ i32 0, i32 0, i32 trunc (i64 sub (i64 ptrtoint ([8 x i8]* @.str.7.llvm_O3 to i64), i64 ptrtoint (i32* getelementptr inbounds (<{ i32, i32, i32 }>, <{ i32, i32, i32 }>* @"$s7llvm_O3MXM", i32 0, i32 2) to i64)) to i32) }>, section ".rodata", no_sanitize_address, align 4
@.str.11.FenwickTree = private constant [12 x i8] c"FenwickTree\00"
@"$s7llvm_O311FenwickTreeVMI" = internal global [16 x i8*] zeroinitializer, align 8
@"$s7llvm_O311FenwickTreeVMn" = hidden constant <{ i32, i32, i32, i32, i32, i32, i32, i32, i32, i16, i16, i16, i16, i8, i8, i8, i8 }> <{ i32 209, i32 trunc (i64 sub (i64 ptrtoint (<{ i32, i32, i32 }>* @"$s7llvm_O3MXM" to i64), i64 ptrtoint (i32* getelementptr inbounds (<{ i32, i32, i32, i32, i32, i32, i32, i32, i32, i16, i16, i16, i16, i8, i8, i8, i8 }>, <{ i32, i32, i32, i32, i32, i32, i32, i32, i32, i16, i16, i16, i16, i8, i8, i8, i8 }>* @"$s7llvm_O311FenwickTreeVMn", i32 0, i32 1) to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([12 x i8]* @.str.11.FenwickTree to i64), i64 ptrtoint (i32* getelementptr inbounds (<{ i32, i32, i32, i32, i32, i32, i32, i32, i32, i16, i16, i16, i16, i8, i8, i8, i8 }>, <{ i32, i32, i32, i32, i32, i32, i32, i32, i32, i16, i16, i16, i16, i8, i8, i8, i8 }>* @"$s7llvm_O311FenwickTreeVMn", i32 0, i32 2) to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (%swift.metadata_response (i64, %swift.type*)* @"$s7llvm_O311FenwickTreeVMa" to i64), i64 ptrtoint (i32* getelementptr inbounds (<{ i32, i32, i32, i32, i32, i32, i32, i32, i32, i16, i16, i16, i16, i8, i8, i8, i8 }>, <{ i32, i32, i32, i32, i32, i32, i32, i32, i32, i16, i16, i16, i16, i8, i8, i8, i8 }>* @"$s7llvm_O311FenwickTreeVMn", i32 0, i32 3) to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ({ i32, i32, i16, i16, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }* @"$s7llvm_O311FenwickTreeVMF" to i64), i64 ptrtoint (i32* getelementptr inbounds (<{ i32, i32, i32, i32, i32, i32, i32, i32, i32, i16, i16, i16, i16, i8, i8, i8, i8 }>, <{ i32, i32, i32, i32, i32, i32, i32, i32, i32, i16, i16, i16, i16, i8, i8, i8, i8 }>* @"$s7llvm_O311FenwickTreeVMn", i32 0, i32 4) to i64)) to i32), i32 5, i32 3, i32 trunc (i64 sub (i64 ptrtoint ([16 x i8*]* @"$s7llvm_O311FenwickTreeVMI" to i64), i64 ptrtoint (i32* getelementptr inbounds (<{ i32, i32, i32, i32, i32, i32, i32, i32, i32, i16, i16, i16, i16, i8, i8, i8, i8 }>, <{ i32, i32, i32, i32, i32, i32, i32, i32, i32, i16, i16, i16, i16, i8, i8, i8, i8 }>* @"$s7llvm_O311FenwickTreeVMn", i32 0, i32 7) to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (<{ i32, i32, i32, i32 }>* @"$s7llvm_O311FenwickTreeVMP" to i64), i64 ptrtoint (i32* getelementptr inbounds (<{ i32, i32, i32, i32, i32, i32, i32, i32, i32, i16, i16, i16, i16, i8, i8, i8, i8 }>, <{ i32, i32, i32, i32, i32, i32, i32, i32, i32, i16, i16, i16, i16, i8, i8, i8, i8 }>* @"$s7llvm_O311FenwickTreeVMn", i32 0, i32 8) to i64)) to i32), i16 1, i16 0, i16 1, i16 0, i8 -128, i8 0, i8 0, i8 0 }>, section ".rodata", no_sanitize_address, align 4
@"$sBi64_WV" = external global i8*, align 8
@"$sBoWV" = external global i8*, align 8
@"$syycWV" = external global i8*, align 8
@"$s7llvm_O311FenwickTreeVMP" = internal constant <{ i32, i32, i32, i32 }> <{ i32 trunc (i64 sub (i64 ptrtoint (%swift.type* (%swift.type_descriptor*, i8**, i8*)* @"$s7llvm_O311FenwickTreeVMi" to i64), i64 ptrtoint (<{ i32, i32, i32, i32 }>* @"$s7llvm_O311FenwickTreeVMP" to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (%swift.metadata_response (%swift.type*, i8*, i8**)* @"$s7llvm_O311FenwickTreeVMr" to i64), i64 ptrtoint (i32* getelementptr inbounds (<{ i32, i32, i32, i32 }>, <{ i32, i32, i32, i32 }>* @"$s7llvm_O311FenwickTreeVMP", i32 0, i32 1) to i64)) to i32), i32 1073741824, i32 trunc (i64 sub (i64 ptrtoint (%swift.vwtable* @"$s7llvm_O311FenwickTreeVWV" to i64), i64 ptrtoint (i32* getelementptr inbounds (<{ i32, i32, i32, i32 }>, <{ i32, i32, i32, i32 }>* @"$s7llvm_O311FenwickTreeVMP", i32 0, i32 3) to i64)) to i32) }>, align 8
@"symbolic _____ 7llvm_O311FenwickTreeV" = linkonce_odr hidden constant <{ i8, i32, i8 }> <{ i8 1, i32 trunc (i64 sub (i64 ptrtoint (<{ i32, i32, i32, i32, i32, i32, i32, i32, i32, i16, i16, i16, i16, i8, i8, i8, i8 }>* @"$s7llvm_O311FenwickTreeVMn" to i64), i64 ptrtoint (i32* getelementptr inbounds (<{ i8, i32, i8 }>, <{ i8, i32, i8 }>* @"symbolic _____ 7llvm_O311FenwickTreeV", i32 0, i32 1) to i64)) to i32), i8 0 }>, section "swift5_typeref", no_sanitize_address, align 2
@"symbolic Si" = linkonce_odr hidden constant <{ [2 x i8], i8 }> <{ [2 x i8] c"Si", i8 0 }>, section "swift5_typeref", no_sanitize_address, align 2
@0 = private constant [6 x i8] c"count\00", section "swift5_reflstr", no_sanitize_address
@"symbolic x" = linkonce_odr hidden constant <{ [1 x i8], i8 }> <{ [1 x i8] c"x", i8 0 }>, section "swift5_typeref", no_sanitize_address, align 2
@1 = private constant [13 x i8] c"defaultValue\00", section "swift5_reflstr", no_sanitize_address
@"symbolic SayxG" = linkonce_odr hidden constant <{ [5 x i8], i8 }> <{ [5 x i8] c"SayxG", i8 0 }>, section "swift5_typeref", no_sanitize_address, align 2
@2 = private constant [5 x i8] c"tree\00", section "swift5_reflstr", no_sanitize_address
@"symbolic xx_xtc" = linkonce_odr hidden constant <{ [6 x i8], i8 }> <{ [6 x i8] c"xx_xtc", i8 0 }>, section "swift5_typeref", no_sanitize_address, align 2
@3 = private constant [8 x i8] c"combine\00", section "swift5_reflstr", no_sanitize_address
@4 = private constant [8 x i8] c"inverse\00", section "swift5_reflstr", no_sanitize_address
@"$s7llvm_O311FenwickTreeVMF" = internal constant { i32, i32, i16, i16, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 } { i32 trunc (i64 sub (i64 ptrtoint (<{ i8, i32, i8 }>* @"symbolic _____ 7llvm_O311FenwickTreeV" to i64), i64 ptrtoint ({ i32, i32, i16, i16, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }* @"$s7llvm_O311FenwickTreeVMF" to i64)) to i32), i32 0, i16 0, i16 12, i32 5, i32 0, i32 trunc (i64 sub (i64 ptrtoint (<{ [2 x i8], i8 }>* @"symbolic Si" to i64), i64 ptrtoint (i32* getelementptr inbounds ({ i32, i32, i16, i16, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }, { i32, i32, i16, i16, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }* @"$s7llvm_O311FenwickTreeVMF", i32 0, i32 6) to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([6 x i8]* @0 to i64), i64 ptrtoint (i32* getelementptr inbounds ({ i32, i32, i16, i16, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }, { i32, i32, i16, i16, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }* @"$s7llvm_O311FenwickTreeVMF", i32 0, i32 7) to i64)) to i32), i32 0, i32 trunc (i64 sub (i64 ptrtoint (<{ [1 x i8], i8 }>* @"symbolic x" to i64), i64 ptrtoint (i32* getelementptr inbounds ({ i32, i32, i16, i16, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }, { i32, i32, i16, i16, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }* @"$s7llvm_O311FenwickTreeVMF", i32 0, i32 9) to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([13 x i8]* @1 to i64), i64 ptrtoint (i32* getelementptr inbounds ({ i32, i32, i16, i16, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }, { i32, i32, i16, i16, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }* @"$s7llvm_O311FenwickTreeVMF", i32 0, i32 10) to i64)) to i32), i32 2, i32 trunc (i64 sub (i64 ptrtoint (<{ [5 x i8], i8 }>* @"symbolic SayxG" to i64), i64 ptrtoint (i32* getelementptr inbounds ({ i32, i32, i16, i16, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }, { i32, i32, i16, i16, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }* @"$s7llvm_O311FenwickTreeVMF", i32 0, i32 12) to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([5 x i8]* @2 to i64), i64 ptrtoint (i32* getelementptr inbounds ({ i32, i32, i16, i16, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }, { i32, i32, i16, i16, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }* @"$s7llvm_O311FenwickTreeVMF", i32 0, i32 13) to i64)) to i32), i32 0, i32 trunc (i64 sub (i64 ptrtoint (<{ [6 x i8], i8 }>* @"symbolic xx_xtc" to i64), i64 ptrtoint (i32* getelementptr inbounds ({ i32, i32, i16, i16, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }, { i32, i32, i16, i16, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }* @"$s7llvm_O311FenwickTreeVMF", i32 0, i32 15) to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([8 x i8]* @3 to i64), i64 ptrtoint (i32* getelementptr inbounds ({ i32, i32, i16, i16, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }, { i32, i32, i16, i16, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }* @"$s7llvm_O311FenwickTreeVMF", i32 0, i32 16) to i64)) to i32), i32 0, i32 trunc (i64 sub (i64 ptrtoint (<{ [6 x i8], i8 }>* @"symbolic xx_xtc" to i64), i64 ptrtoint (i32* getelementptr inbounds ({ i32, i32, i16, i16, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }, { i32, i32, i16, i16, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }* @"$s7llvm_O311FenwickTreeVMF", i32 0, i32 18) to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([8 x i8]* @4 to i64), i64 ptrtoint (i32* getelementptr inbounds ({ i32, i32, i16, i16, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }, { i32, i32, i16, i16, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }* @"$s7llvm_O311FenwickTreeVMF", i32 0, i32 19) to i64)) to i32) }, section "swift5_fieldmd", no_sanitize_address, 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
@"symbolic _____ySi6offset_Si1l_Si1rt7elementtG s23_ContiguousArrayStorageC" = linkonce_odr hidden constant <{ i8, i32, [31 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, [31 x i8], i8 }>, <{ i8, i32, [31 x i8], i8 }>* @"symbolic _____ySi6offset_Si1l_Si1rt7elementtG s23_ContiguousArrayStorageC", i32 0, i32 1) to i64)) to i32), [31 x i8] c"ySi6offset_Si1l_Si1rt7elementtG", i8 0 }>, section "swift5_typeref", no_sanitize_address, align 2
@"$ss23_ContiguousArrayStorageCySi6offset_Si1l_Si1rt7elementtGMD" = linkonce_odr hidden global { i32, i32 } { i32 trunc (i64 sub (i64 ptrtoint (<{ i8, i32, [31 x i8], i8 }>* @"symbolic _____ySi6offset_Si1l_Si1rt7elementtG s23_ContiguousArrayStorageC" to i64), i64 ptrtoint ({ i32, i32 }* @"$ss23_ContiguousArrayStorageCySi6offset_Si1l_Si1rt7elementtGMD" to i64)) to i32), i32 -36 }, align 8
@"symbolic Si6offset_Si1l_Si1rt7elementt" = linkonce_odr hidden constant <{ [29 x i8], i8 }> <{ [29 x i8] c"Si6offset_Si1l_Si1rt7elementt", i8 0 }>, section "swift5_typeref", no_sanitize_address, align 2
@"$sSi6offset_Si1l_Si1rt7elementtMD" = linkonce_odr hidden global { i32, i32 } { i32 trunc (i64 sub (i64 ptrtoint (<{ [29 x i8], i8 }>* @"symbolic Si6offset_Si1l_Si1rt7elementt" to i64), i64 ptrtoint ({ i32, i32 }* @"$sSi6offset_Si1l_Si1rt7elementtMD" to i64)) to i32), i32 -29 }, align 8
@"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
@"symbolic _____ySiSgG s23_ContiguousArrayStorageC" = linkonce_odr hidden constant <{ i8, i32, [6 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, [6 x i8], i8 }>, <{ i8, i32, [6 x i8], i8 }>* @"symbolic _____ySiSgG s23_ContiguousArrayStorageC", i32 0, i32 1) to i64)) to i32), [6 x i8] c"ySiSgG", i8 0 }>, section "swift5_typeref", no_sanitize_address, align 2
@"$ss23_ContiguousArrayStorageCySiSgGMD" = linkonce_odr hidden global { i32, i32 } { i32 trunc (i64 sub (i64 ptrtoint (<{ i8, i32, [6 x i8], i8 }>* @"symbolic _____ySiSgG s23_ContiguousArrayStorageC" to i64), i64 ptrtoint ({ i32, i32 }* @"$ss23_ContiguousArrayStorageCySiSgGMD" to i64)) to i32), i32 -11 }, align 8
@"symbolic _____ySnySiGG s23_ContiguousArrayStorageC" = linkonce_odr hidden constant <{ i8, i32, [8 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, [8 x i8], i8 }>, <{ i8, i32, [8 x i8], i8 }>* @"symbolic _____ySnySiGG s23_ContiguousArrayStorageC", i32 0, i32 1) to i64)) to i32), [8 x i8] c"ySnySiGG", i8 0 }>, section "swift5_typeref", no_sanitize_address, align 2
@"$ss23_ContiguousArrayStorageCySnySiGGMD" = linkonce_odr hidden global { i32, i32 } { i32 trunc (i64 sub (i64 ptrtoint (<{ i8, i32, [8 x i8], i8 }>* @"symbolic _____ySnySiGG s23_ContiguousArrayStorageC" to i64), i64 ptrtoint ({ i32, i32 }* @"$ss23_ContiguousArrayStorageCySnySiGGMD" to i64)) to i32), i32 -13 }, align 8
@"symbolic _____ySi1l_Si1rtG s23_ContiguousArrayStorageC" = linkonce_odr hidden constant <{ i8, i32, [12 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, [12 x i8], i8 }>, <{ i8, i32, [12 x i8], i8 }>* @"symbolic _____ySi1l_Si1rtG s23_ContiguousArrayStorageC", i32 0, i32 1) to i64)) to i32), [12 x i8] c"ySi1l_Si1rtG", i8 0 }>, section "swift5_typeref", no_sanitize_address, align 2
@"$ss23_ContiguousArrayStorageCySi1l_Si1rtGMD" = linkonce_odr hidden global { i32, i32 } { i32 trunc (i64 sub (i64 ptrtoint (<{ i8, i32, [12 x i8], i8 }>* @"symbolic _____ySi1l_Si1rtG s23_ContiguousArrayStorageC" to i64), i64 ptrtoint ({ i32, i32 }* @"$ss23_ContiguousArrayStorageCySi1l_Si1rtGMD" to i64)) to i32), i32 -17 }, align 8
@"$s7llvm_O311FenwickTreeVHn" = private constant %swift.type_metadata_record { i32 trunc (i64 sub (i64 ptrtoint (<{ i32, i32, i32, i32, i32, i32, i32, i32, i32, i16, i16, i16, i16, i8, i8, i8, i8 }>* @"$s7llvm_O311FenwickTreeVMn" to i64), i64 ptrtoint (%swift.type_metadata_record* @"$s7llvm_O311FenwickTreeVHn" to i64)) to i32) }, section "swift5_type_metadata", no_sanitize_address, align 4
@__swift_reflection_version = linkonce_odr hidden constant i16 3
@_swift1_autolink_entries = private constant [116 x i8] c"-lswiftGlibc\00-lswiftCore\00-lm\00-lpthread\00-lutil\00-ldl\00-lswift_Concurrency\00-lswift_StringProcessing\00-lswift_RegexParser\00", section ".swift1_autolink_entries", no_sanitize_address, align 8
@llvm.compiler.used = appending global [6 x i8*] [i8* bitcast ({ i32, i32 }* @"\01l_entry_point" to i8*), i8* bitcast (%swift.type_metadata_record* @"$s7llvm_O311FenwickTreeVHn" to i8*), i8* bitcast ({ i32, i32, i16, i16, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }* @"$s7llvm_O311FenwickTreeVMF" to i8*), i8* bitcast (i16* @__swift_reflection_version to i8*), i8* getelementptr inbounds ([116 x i8], [116 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 = alloca %Ts15ContiguousArrayV, align 8
  %access-scratch = alloca [24 x i8], align 8
  %3 = alloca %Ts15ContiguousArrayV, align 8
  %swifterror = alloca swifterror %swift.error*, align 8
  store %swift.error* null, %swift.error** %swifterror, align 8
  %access-scratch24 = alloca [24 x i8], align 8
  %access-scratch30 = alloca [24 x i8], align 8
  %access-scratch31 = alloca [24 x i8], align 8
  %access-scratch32 = alloca [24 x i8], align 8
  %access-scratch36 = alloca [24 x i8], align 8
  %4 = alloca %Ts15ContiguousArrayV, align 8
  %5 = alloca %TSi, align 8
  %6 = alloca %TSa, align 8
  %7 = alloca %TSi, align 8
  %8 = alloca %TSi, align 8
  %9 = alloca %TSi, align 8
  %10 = alloca %TSi, align 8
  %11 = alloca %TSi, align 8
  %12 = alloca %TSi, align 8
  %13 = alloca %TSi, align 8
  %access-scratch77 = alloca [24 x i8], align 8
  %14 = load i64, i64* bitcast (%struct._IO_FILE** @stdin to i64*), align 8
  store i64 %14, i64* bitcast (%TSpySo8_IO_FILEVGSg* @"$s7llvm_O35INPUTSpySo8_IO_FILEVGSgvp" to i64*), align 8
  store i64 0, i64* bitcast (%TSpys4Int8VGSg* @"$s7llvm_O36bufferSpys4Int8VGSgvp" to i64*), align 8
  store i32 0, i32* getelementptr inbounds (%Ts5Int32V, %Ts5Int32V* @"$s7llvm_O314bufferCapacitys5Int32Vvp", i64 0, i32 0), align 4
  %15 = tail call swiftcc { i64, i64 } @"$s7llvm_O310getIntPairSi_SityF"()
  %16 = extractvalue { i64, i64 } %15, 0
  %17 = extractvalue { i64, i64 } %15, 1
  store i64 %16, i64* getelementptr inbounds (%TSi, %TSi* @"$s7llvm_O31NSivp", i64 0, i32 0), align 8
  store i64 %17, i64* getelementptr inbounds (%TSi, %TSi* @"$s7llvm_O31QSivp", i64 0, i32 0), align 8
  %18 = tail call swiftcc %Ts28__ContiguousArrayStorageBaseC* @"$s7llvm_O37getInts5countSaySiGSi_tF"(i64 %16)
  %._storage.count._value = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %18, i64 0, i32 1, i32 0, i32 0, i32 0
  %19 = load i64, i64* %._storage.count._value, align 8, !range !6
  %20 = icmp eq i64 %19, 0
  br i1 %20, label %21, label %23

21:                                               ; preds = %entry
  %22 = getelementptr %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %18, i64 0, i32 0
  tail call void @swift_release(%swift.refcounted* %22) #9
  br label %26

23:                                               ; preds = %entry
  %24 = bitcast %Ts15ContiguousArrayV* %2 to i8*
  call void @llvm.lifetime.start.p0i8(i64 8, i8* nonnull %24)
  %._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 %19, i1 false, %Ts15ContiguousArrayV* nocapture nonnull swiftself dereferenceable(8) %2)
  %25 = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %18, i64 1
  %tailaddr = bitcast %Ts28__ContiguousArrayStorageBaseC* %25 to %TSi*
  br label %44

26:                                               ; preds = %21, %70
  %27 = phi %Ts28__ContiguousArrayStorageBaseC* [ %66, %70 ], [ bitcast (%struct._SwiftEmptyArrayStorage* @_swiftEmptyArrayStorage to %Ts28__ContiguousArrayStorageBaseC*), %21 ]
  store %Ts28__ContiguousArrayStorageBaseC* %27, %Ts28__ContiguousArrayStorageBaseC** getelementptr inbounds (%TSa, %TSa* @"$s7llvm_O31cSaySiGvp", i64 0, i32 0, i32 0), align 8
  store %Ts28__ContiguousArrayStorageBaseC* bitcast (%struct._SwiftEmptyArrayStorage* @_swiftEmptyArrayStorage to %Ts28__ContiguousArrayStorageBaseC*), %Ts28__ContiguousArrayStorageBaseC** getelementptr inbounds (%TSa, %TSa* @"$s7llvm_O37queriesSaySi1l_Si1rtGvp", i64 0, i32 0, i32 0), align 8
  %28 = load i64, i64* getelementptr inbounds (%TSi, %TSi* @"$s7llvm_O31QSivp", i64 0, i32 0), align 8
  %29 = getelementptr inbounds [24 x i8], [24 x i8]* %access-scratch, i64 0, i64 0
  call void @llvm.lifetime.start.p0i8(i64 -1, i8* nonnull %29)
  call void @swift_beginAccess(i8* nonnull bitcast (%TSa* @"$s7llvm_O37queriesSaySi1l_Si1rtGvp" to i8*), [24 x i8]* nonnull %access-scratch, i64 1, i8* null) #9
  %30 = load %Ts28__ContiguousArrayStorageBaseC*, %Ts28__ContiguousArrayStorageBaseC** getelementptr inbounds (%TSa, %TSa* @"$s7llvm_O37queriesSaySi1l_Si1rtGvp", i64 0, i32 0, i32 0), align 8
  %31 = getelementptr %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %30, i64 0, i32 0
  %32 = call zeroext i1 @swift_isUniquelyReferenced_nonNull_native(%swift.refcounted* %31) #25
  store %Ts28__ContiguousArrayStorageBaseC* %30, %Ts28__ContiguousArrayStorageBaseC** getelementptr inbounds (%TSa, %TSa* @"$s7llvm_O37queriesSaySi1l_Si1rtGvp", i64 0, i32 0, i32 0), align 8
  br i1 %32, label %33, label %37

33:                                               ; preds = %26
  %._storage81._capacityAndFlags._value = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %30, i64 0, i32 1, i32 0, i32 1, i32 0
  %34 = load i64, i64* %._storage81._capacityAndFlags._value, align 8
  %35 = lshr i64 %34, 1
  %36 = icmp slt i64 %35, %28
  br i1 %36, label %37, label %41, !prof !7

37:                                               ; preds = %33, %26
  %._storage10.count._value = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %30, i64 0, i32 1, i32 0, i32 0, i32 0
  %38 = load i64, i64* %._storage10.count._value, align 8, !range !6
  %39 = call i64 @llvm.smax.i64(i64 %38, i64 %28)
  %40 = call swiftcc %Ts28__ContiguousArrayStorageBaseC* @"$ss22_ContiguousArrayBufferV20_consumeAndCreateNew14bufferIsUnique15minimumCapacity13growForAppendAByxGSb_SiSbtFSi1l_Si1rt_Tg5"(i1 %32, i64 %39, i1 false, %Ts28__ContiguousArrayStorageBaseC* %30)
  br label %41

41:                                               ; preds = %33, %37
  %42 = phi %Ts28__ContiguousArrayStorageBaseC* [ %40, %37 ], [ %30, %33 ]
  store %Ts28__ContiguousArrayStorageBaseC* %42, %Ts28__ContiguousArrayStorageBaseC** getelementptr inbounds (%TSa, %TSa* @"$s7llvm_O37queriesSaySi1l_Si1rtGvp", i64 0, i32 0, i32 0), align 8
  %43 = icmp slt i64 %28, 1
  br i1 %43, label %461, label %.preheader, !prof !7

44:                                               ; preds = %65, %23
  %45 = phi i64 [ 0, %23 ], [ %67, %65 ]
  %._value = getelementptr inbounds %TSi, %TSi* %tailaddr, i64 %45, i32 0
  %46 = load i64, i64* %._value, align 8
  %47 = tail call { i64, i1 } @llvm.sadd.with.overflow.i64(i64 %46, i64 -1)
  %48 = extractvalue { i64, i1 } %47, 0
  %49 = extractvalue { i64, i1 } %47, 1
  br i1 %49, label %460, label %50, !prof !7

50:                                               ; preds = %44
  %51 = load %Ts28__ContiguousArrayStorageBaseC*, %Ts28__ContiguousArrayStorageBaseC** %._buffer._storage, align 8
  %52 = getelementptr %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %51, i64 0, i32 0
  %53 = tail call zeroext i1 @swift_isUniquelyReferenced_nonNull_native(%swift.refcounted* %52) #25
  br i1 %53, label %57, label %54

54:                                               ; preds = %50
  %._storage4.count._value = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %51, i64 0, i32 1, i32 0, i32 0, i32 0
  %55 = load i64, i64* %._storage4.count._value, align 8, !range !6
  %56 = add nuw nsw i64 %55, 1
  call swiftcc void @"$ss15ContiguousArrayV16_createNewBuffer14bufferIsUnique15minimumCapacity13growForAppendySb_SiSbtFSi_Tg5"(i1 false, i64 %56, i1 true, %Ts15ContiguousArrayV* nocapture nonnull swiftself dereferenceable(8) %2)
  %.pre = load %Ts28__ContiguousArrayStorageBaseC*, %Ts28__ContiguousArrayStorageBaseC** %._buffer._storage, align 8
  br label %57

57:                                               ; preds = %50, %54
  %58 = phi %Ts28__ContiguousArrayStorageBaseC* [ %51, %50 ], [ %.pre, %54 ]
  %._storage5.count._value = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %58, i64 0, i32 1, i32 0, i32 0, i32 0
  %59 = load i64, i64* %._storage5.count._value, align 8, !range !6
  %._storage5._capacityAndFlags._value = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %58, i64 0, i32 1, i32 0, i32 1, i32 0
  %60 = load i64, i64* %._storage5._capacityAndFlags._value, align 8
  %61 = lshr i64 %60, 1
  %62 = add nuw nsw i64 %59, 1
  %.not = icmp ugt i64 %61, %59
  br i1 %.not, label %65, label %63, !prof !8

63:                                               ; preds = %57
  %64 = icmp ugt i64 %60, 1
  call swiftcc void @"$ss15ContiguousArrayV16_createNewBuffer14bufferIsUnique15minimumCapacity13growForAppendySb_SiSbtFSi_Tg5"(i1 %64, i64 %62, i1 true, %Ts15ContiguousArrayV* nocapture nonnull swiftself dereferenceable(8) %2)
  %.pre155 = load %Ts28__ContiguousArrayStorageBaseC*, %Ts28__ContiguousArrayStorageBaseC** %._buffer._storage, align 8
  br label %65

65:                                               ; preds = %57, %63
  %66 = phi %Ts28__ContiguousArrayStorageBaseC* [ %58, %57 ], [ %.pre155, %63 ]
  %67 = add nuw nsw i64 %45, 1
  %._storage6.count._value = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %66, i64 0, i32 1, i32 0, i32 0, i32 0
  store i64 %62, i64* %._storage6.count._value, align 8
  %68 = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %66, i64 1
  %tailaddr7 = bitcast %Ts28__ContiguousArrayStorageBaseC* %68 to %TSi*
  %._value8 = getelementptr inbounds %TSi, %TSi* %tailaddr7, i64 %59, i32 0
  store i64 %48, i64* %._value8, align 8
  %69 = icmp eq i64 %67, %19
  br i1 %69, label %70, label %44

70:                                               ; preds = %65
  %71 = getelementptr %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %18, i64 0, i32 0
  tail call void @swift_release(%swift.refcounted* %71) #9
  call void @llvm.lifetime.end.p0i8(i64 8, i8* nonnull %24)
  br label %26

72:                                               ; preds = %105
  %73 = call { i64, i1 } @llvm.sadd.with.overflow.i64(i64 %76, i64 1)
  %74 = extractvalue { i64, i1 } %73, 0
  %75 = extractvalue { i64, i1 } %73, 1
  br i1 %75, label %464, label %.preheader, !prof !7

.preheader:                                       ; preds = %41, %72
  %76 = phi i64 [ %74, %72 ], [ 1, %41 ]
  %77 = call swiftcc { i64, i64 } @"$s7llvm_O310getIntPairSi_SityF"()
  %78 = extractvalue { i64, i64 } %77, 0
  %79 = call { i64, i1 } @llvm.sadd.with.overflow.i64(i64 %78, i64 -1)
  %80 = extractvalue { i64, i1 } %79, 0
  %81 = extractvalue { i64, i1 } %79, 1
  br i1 %81, label %462, label %82, !prof !7

82:                                               ; preds = %.preheader
  %83 = extractvalue { i64, i64 } %77, 1
  %84 = call { i64, i1 } @llvm.sadd.with.overflow.i64(i64 %83, i64 -1)
  %85 = extractvalue { i64, i1 } %84, 1
  br i1 %85, label %463, label %86, !prof !7

86:                                               ; preds = %82
  %87 = extractvalue { i64, i1 } %84, 0
  %88 = add nsw i64 %87, 1
  %89 = load %Ts28__ContiguousArrayStorageBaseC*, %Ts28__ContiguousArrayStorageBaseC** getelementptr inbounds (%TSa, %TSa* @"$s7llvm_O37queriesSaySi1l_Si1rtGvp", i64 0, i32 0, i32 0), align 8
  %90 = getelementptr %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %89, i64 0, i32 0
  %91 = call zeroext i1 @swift_isUniquelyReferenced_nonNull_native(%swift.refcounted* %90) #25
  store %Ts28__ContiguousArrayStorageBaseC* %89, %Ts28__ContiguousArrayStorageBaseC** getelementptr inbounds (%TSa, %TSa* @"$s7llvm_O37queriesSaySi1l_Si1rtGvp", i64 0, i32 0, i32 0), align 8
  br i1 %91, label %96, label %92

92:                                               ; preds = %86
  %._storage11.count._value = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %89, i64 0, i32 1, i32 0, i32 0, i32 0
  %93 = load i64, i64* %._storage11.count._value, align 8, !range !6
  %94 = add nuw nsw i64 %93, 1
  %95 = call swiftcc %Ts28__ContiguousArrayStorageBaseC* @"$ss22_ContiguousArrayBufferV20_consumeAndCreateNew14bufferIsUnique15minimumCapacity13growForAppendAByxGSb_SiSbtFSi1l_Si1rt_Tg5"(i1 false, i64 %94, i1 true, %Ts28__ContiguousArrayStorageBaseC* %89)
  store %Ts28__ContiguousArrayStorageBaseC* %95, %Ts28__ContiguousArrayStorageBaseC** getelementptr inbounds (%TSa, %TSa* @"$s7llvm_O37queriesSaySi1l_Si1rtGvp", i64 0, i32 0, i32 0), align 8
  br label %96

96:                                               ; preds = %86, %92
  %97 = phi %Ts28__ContiguousArrayStorageBaseC* [ %89, %86 ], [ %95, %92 ]
  %._storage12.count._value = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %97, i64 0, i32 1, i32 0, i32 0, i32 0
  %98 = load i64, i64* %._storage12.count._value, align 8, !range !6
  %._storage12._capacityAndFlags._value = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %97, i64 0, i32 1, i32 0, i32 1, i32 0
  %99 = load i64, i64* %._storage12._capacityAndFlags._value, align 8
  %100 = lshr i64 %99, 1
  %101 = add nuw nsw i64 %98, 1
  %.not121 = icmp ugt i64 %100, %98
  br i1 %.not121, label %105, label %102, !prof !8

102:                                              ; preds = %96
  %103 = icmp ugt i64 %99, 1
  %104 = call swiftcc %Ts28__ContiguousArrayStorageBaseC* @"$ss22_ContiguousArrayBufferV20_consumeAndCreateNew14bufferIsUnique15minimumCapacity13growForAppendAByxGSb_SiSbtFSi1l_Si1rt_Tg5"(i1 %103, i64 %101, i1 true, %Ts28__ContiguousArrayStorageBaseC* nonnull %97)
  store %Ts28__ContiguousArrayStorageBaseC* %104, %Ts28__ContiguousArrayStorageBaseC** getelementptr inbounds (%TSa, %TSa* @"$s7llvm_O37queriesSaySi1l_Si1rtGvp", i64 0, i32 0, i32 0), align 8
  br label %105

105:                                              ; preds = %96, %102
  %106 = phi %Ts28__ContiguousArrayStorageBaseC* [ %97, %96 ], [ %104, %102 ]
  %107 = icmp eq i64 %76, %28
  %._storage13.count._value = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %106, i64 0, i32 1, i32 0, i32 0, i32 0
  store i64 %101, i64* %._storage13.count._value, align 8
  %108 = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %106, i64 1
  %tailaddr14 = bitcast %Ts28__ContiguousArrayStorageBaseC* %108 to <{ %TSi, %TSi }>*
  %.l._value = getelementptr inbounds <{ %TSi, %TSi }>, <{ %TSi, %TSi }>* %tailaddr14, i64 %98, i32 0, i32 0
  store i64 %80, i64* %.l._value, align 8
  %.r._value = getelementptr inbounds <{ %TSi, %TSi }>, <{ %TSi, %TSi }>* %tailaddr14, i64 %98, i32 1, i32 0
  store i64 %88, i64* %.r._value, align 8
  br i1 %107, label %109, label %72

109:                                              ; preds = %105
  %110 = load i64, i64* getelementptr inbounds (%TSi, %TSi* @"$s7llvm_O31QSivp", i64 0, i32 0), align 8
  %111 = icmp slt i64 %110, 0
  br i1 %111, label %465, label %112, !prof !7

112:                                              ; preds = %109
  %.not122 = icmp eq i64 %110, 0
  br i1 %.not122, label %.thread, label %113

113:                                              ; preds = %112
  %114 = call %swift.type* @__swift_instantiateConcreteTypeFromMangledName({ i32, i32 }* nonnull @"$sSiSgMD") #26
  %115 = call swiftcc %Ts28__ContiguousArrayStorageBaseC* @"$sSa28_allocateBufferUninitialized15minimumCapacitys016_ContiguousArrayB0VyxGSi_tFZ"(i64 %110, %swift.type* %114)
  %._storage80.count._value = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %115, i64 0, i32 1, i32 0, i32 0, i32 0
  store i64 %110, i64* %._storage80.count._value, align 8
  %116 = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %115, i64 1
  %117 = bitcast %Ts28__ContiguousArrayStorageBaseC* %116 to i8*
  %xtraiter = and i64 %110, 7
  %118 = icmp ult i64 %110, 8
  br i1 %118, label %.thread.loopexit.unr-lcssa, label %.new

.new:                                             ; preds = %113
  %unroll_iter = and i64 %110, -8
  br label %132

.thread.loopexit.unr-lcssa:                       ; preds = %132, %113
  %.unr = phi i8* [ %117, %113 ], [ %165, %132 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.thread, label %.epil.preheader

.epil.preheader:                                  ; preds = %.thread.loopexit.unr-lcssa, %.epil.preheader
  %119 = phi i8* [ %123, %.epil.preheader ], [ %.unr, %.thread.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %.thread.loopexit.unr-lcssa ]
  %120 = bitcast i8* %119 to i64*
  store i64 0, i64* %120, align 8
  %121 = getelementptr inbounds i8, i8* %119, i64 8
  %122 = bitcast i8* %121 to i1*
  store i1 true, i1* %122, align 8
  %123 = getelementptr inbounds i8, i8* %119, i64 16
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %.thread, label %.epil.preheader, !llvm.loop !9

.thread:                                          ; preds = %.thread.loopexit.unr-lcssa, %.epil.preheader, %112
  %124 = phi %Ts28__ContiguousArrayStorageBaseC* [ bitcast (%struct._SwiftEmptyArrayStorage* @_swiftEmptyArrayStorage to %Ts28__ContiguousArrayStorageBaseC*), %112 ], [ %115, %.epil.preheader ], [ %115, %.thread.loopexit.unr-lcssa ]
  store %Ts28__ContiguousArrayStorageBaseC* %124, %Ts28__ContiguousArrayStorageBaseC** getelementptr inbounds (%TSa, %TSa* @"$s7llvm_O39responsesSaySiSgGvp", i64 0, i32 0, i32 0), align 8
  %125 = load %Ts28__ContiguousArrayStorageBaseC*, %Ts28__ContiguousArrayStorageBaseC** getelementptr inbounds (%TSa, %TSa* @"$s7llvm_O37queriesSaySi1l_Si1rtGvp", i64 0, i32 0, i32 0), align 8
  %126 = bitcast %Ts15ContiguousArrayV* %3 to i8*
  call void @llvm.lifetime.start.p0i8(i64 8, i8* nonnull %126)
  %127 = getelementptr %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %125, i64 0, i32 0
  %128 = bitcast %Ts28__ContiguousArrayStorageBaseC* %125 to %swift.refcounted*
  %129 = call %swift.refcounted* @swift_retain_n(%swift.refcounted* %128, i32 2)
  %130 = call swiftcc %Ts28__ContiguousArrayStorageBaseC* @"$ss30_copySequenceToContiguousArrayys0dE0Vy7ElementQzGxSTRzlFs010EnumeratedB0VySaySi1l_Si1rtGG_Tg5"(%Ts28__ContiguousArrayStorageBaseC* %125)
  call void @swift_release(%swift.refcounted* %127) #9
  %._buffer16._storage = getelementptr inbounds %Ts15ContiguousArrayV, %Ts15ContiguousArrayV* %3, i64 0, i32 0, i32 0
  store %Ts28__ContiguousArrayStorageBaseC* %130, %Ts28__ContiguousArrayStorageBaseC** %._buffer16._storage, align 8
  call swiftcc void @"$sSMsSkRzrlE4sort2byySb7ElementSTQz_ADtKXE_tKFs15ContiguousArrayVySi6offset_Si1l_Si1rt7elementtG_Tg5047$s7llvm_O3SbSi6offset_Si1l_Si1rt7elementt_SiAB_n3AC_N13ADtAEttXEfU0_Tf1cn_n"(%Ts15ContiguousArrayV* nocapture nonnull dereferenceable(8) %3, %swift.refcounted* swiftself undef, %swift.error** noalias nocapture nonnull swifterror dereferenceable(8) %swifterror)
  %131 = load %swift.error*, %swift.error** %swifterror, align 8
  %.not123 = icmp eq %swift.error* %131, null
  br i1 %.not123, label %166, label %244

132:                                              ; preds = %132, %.new
  %133 = phi i8* [ %117, %.new ], [ %165, %132 ]
  %niter = phi i64 [ 0, %.new ], [ %niter.next.7, %132 ]
  %134 = bitcast i8* %133 to i64*
  store i64 0, i64* %134, align 8
  %135 = getelementptr inbounds i8, i8* %133, i64 8
  %136 = bitcast i8* %135 to i1*
  store i1 true, i1* %136, align 8
  %137 = getelementptr inbounds i8, i8* %133, i64 16
  %138 = bitcast i8* %137 to i64*
  store i64 0, i64* %138, align 8
  %139 = getelementptr inbounds i8, i8* %133, i64 24
  %140 = bitcast i8* %139 to i1*
  store i1 true, i1* %140, align 8
  %141 = getelementptr inbounds i8, i8* %133, i64 32
  %142 = bitcast i8* %141 to i64*
  store i64 0, i64* %142, align 8
  %143 = getelementptr inbounds i8, i8* %133, i64 40
  %144 = bitcast i8* %143 to i1*
  store i1 true, i1* %144, align 8
  %145 = getelementptr inbounds i8, i8* %133, i64 48
  %146 = bitcast i8* %145 to i64*
  store i64 0, i64* %146, align 8
  %147 = getelementptr inbounds i8, i8* %133, i64 56
  %148 = bitcast i8* %147 to i1*
  store i1 true, i1* %148, align 8
  %149 = getelementptr inbounds i8, i8* %133, i64 64
  %150 = bitcast i8* %149 to i64*
  store i64 0, i64* %150, align 8
  %151 = getelementptr inbounds i8, i8* %133, i64 72
  %152 = bitcast i8* %151 to i1*
  store i1 true, i1* %152, align 8
  %153 = getelementptr inbounds i8, i8* %133, i64 80
  %154 = bitcast i8* %153 to i64*
  store i64 0, i64* %154, align 8
  %155 = getelementptr inbounds i8, i8* %133, i64 88
  %156 = bitcast i8* %155 to i1*
  store i1 true, i1* %156, align 8
  %157 = getelementptr inbounds i8, i8* %133, i64 96
  %158 = bitcast i8* %157 to i64*
  store i64 0, i64* %158, align 8
  %159 = getelementptr inbounds i8, i8* %133, i64 104
  %160 = bitcast i8* %159 to i1*
  store i1 true, i1* %160, align 8
  %161 = getelementptr inbounds i8, i8* %133, i64 112
  %162 = bitcast i8* %161 to i64*
  store i64 0, i64* %162, align 8
  %163 = getelementptr inbounds i8, i8* %133, i64 120
  %164 = bitcast i8* %163 to i1*
  store i1 true, i1* %164, align 8
  %165 = getelementptr inbounds i8, i8* %133, i64 128
  %niter.next.7 = add i64 %niter, 8
  %niter.ncmp.7 = icmp eq i64 %niter.next.7, %unroll_iter
  br i1 %niter.ncmp.7, label %.thread.loopexit.unr-lcssa, label %132

166:                                              ; preds = %.thread
  call void @swift_release(%swift.refcounted* %127) #9
  %167 = load %Ts28__ContiguousArrayStorageBaseC*, %Ts28__ContiguousArrayStorageBaseC** %._buffer16._storage, align 8
  call void @llvm.lifetime.end.p0i8(i64 8, i8* nonnull %126)
  store %Ts28__ContiguousArrayStorageBaseC* %167, %Ts28__ContiguousArrayStorageBaseC** getelementptr inbounds (%TSa, %TSa* @"$s7llvm_O35queueSaySi6offset_Si1l_Si1rt7elementtGvp", i64 0, i32 0, i32 0), align 8
  %168 = load i64, i64* getelementptr inbounds (%TSi, %TSi* @"$s7llvm_O31NSivp", i64 0, i32 0), align 8
  %169 = icmp slt i64 %168, 0
  br i1 %169, label %466, label %170, !prof !7

170:                                              ; preds = %166
  %.not124 = icmp eq i64 %168, 0
  br i1 %.not124, label %218, label %171

171:                                              ; preds = %170
  %172 = call %swift.type* @__swift_instantiateConcreteTypeFromMangledName({ i32, i32 }* nonnull @"$sSiSgMD") #26
  %173 = call swiftcc %Ts28__ContiguousArrayStorageBaseC* @"$sSa28_allocateBufferUninitialized15minimumCapacitys016_ContiguousArrayB0VyxGSi_tFZ"(i64 %168, %swift.type* %172)
  %._storage79.count._value = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %173, i64 0, i32 1, i32 0, i32 0, i32 0
  store i64 %168, i64* %._storage79.count._value, align 8
  %174 = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %173, i64 1
  %175 = bitcast %Ts28__ContiguousArrayStorageBaseC* %174 to i8*
  %xtraiter175 = and i64 %168, 7
  %176 = icmp ult i64 %168, 8
  br i1 %176, label %.unr-lcssa, label %.new173

.new173:                                          ; preds = %171
  %unroll_iter180 = and i64 %168, -8
  br label %184

.unr-lcssa:                                       ; preds = %184, %171
  %.unr177 = phi i8* [ %175, %171 ], [ %217, %184 ]
  %lcmp.mod179.not = icmp eq i64 %xtraiter175, 0
  br i1 %lcmp.mod179.not, label %.epilog-lcssa, label %.epil.preheader174

.epil.preheader174:                               ; preds = %.unr-lcssa, %.epil.preheader174
  %177 = phi i8* [ %181, %.epil.preheader174 ], [ %.unr177, %.unr-lcssa ]
  %epil.iter176 = phi i64 [ %epil.iter176.next, %.epil.preheader174 ], [ 0, %.unr-lcssa ]
  %178 = bitcast i8* %177 to i64*
  store i64 0, i64* %178, align 8
  %179 = getelementptr inbounds i8, i8* %177, i64 8
  %180 = bitcast i8* %179 to i1*
  store i1 true, i1* %180, align 8
  %181 = getelementptr inbounds i8, i8* %177, i64 16
  %epil.iter176.next = add i64 %epil.iter176, 1
  %epil.iter176.cmp.not = icmp eq i64 %epil.iter176.next, %xtraiter175
  br i1 %epil.iter176.cmp.not, label %.epilog-lcssa, label %.epil.preheader174, !llvm.loop !11

.epilog-lcssa:                                    ; preds = %.epil.preheader174, %.unr-lcssa
  %.pr = load i64, i64* getelementptr inbounds (%TSi, %TSi* @"$s7llvm_O31NSivp", i64 0, i32 0), align 8
  store %Ts28__ContiguousArrayStorageBaseC* %173, %Ts28__ContiguousArrayStorageBaseC** getelementptr inbounds (%TSa, %TSa* @"$s7llvm_O38lastSeenSaySiSgGvp", i64 0, i32 0, i32 0), align 8
  %182 = icmp slt i64 %.pr, 0
  br i1 %182, label %467, label %183, !prof !7

183:                                              ; preds = %.epilog-lcssa
  %.not125 = icmp eq i64 %.pr, 0
  br i1 %.not125, label %.thread140, label %.thread140.loopexit

184:                                              ; preds = %184, %.new173
  %185 = phi i8* [ %175, %.new173 ], [ %217, %184 ]
  %niter181 = phi i64 [ 0, %.new173 ], [ %niter181.next.7, %184 ]
  %186 = bitcast i8* %185 to i64*
  store i64 0, i64* %186, align 8
  %187 = getelementptr inbounds i8, i8* %185, i64 8
  %188 = bitcast i8* %187 to i1*
  store i1 true, i1* %188, align 8
  %189 = getelementptr inbounds i8, i8* %185, i64 16
  %190 = bitcast i8* %189 to i64*
  store i64 0, i64* %190, align 8
  %191 = getelementptr inbounds i8, i8* %185, i64 24
  %192 = bitcast i8* %191 to i1*
  store i1 true, i1* %192, align 8
  %193 = getelementptr inbounds i8, i8* %185, i64 32
  %194 = bitcast i8* %193 to i64*
  store i64 0, i64* %194, align 8
  %195 = getelementptr inbounds i8, i8* %185, i64 40
  %196 = bitcast i8* %195 to i1*
  store i1 true, i1* %196, align 8
  %197 = getelementptr inbounds i8, i8* %185, i64 48
  %198 = bitcast i8* %197 to i64*
  store i64 0, i64* %198, align 8
  %199 = getelementptr inbounds i8, i8* %185, i64 56
  %200 = bitcast i8* %199 to i1*
  store i1 true, i1* %200, align 8
  %201 = getelementptr inbounds i8, i8* %185, i64 64
  %202 = bitcast i8* %201 to i64*
  store i64 0, i64* %202, align 8
  %203 = getelementptr inbounds i8, i8* %185, i64 72
  %204 = bitcast i8* %203 to i1*
  store i1 true, i1* %204, align 8
  %205 = getelementptr inbounds i8, i8* %185, i64 80
  %206 = bitcast i8* %205 to i64*
  store i64 0, i64* %206, align 8
  %207 = getelementptr inbounds i8, i8* %185, i64 88
  %208 = bitcast i8* %207 to i1*
  store i1 true, i1* %208, align 8
  %209 = getelementptr inbounds i8, i8* %185, i64 96
  %210 = bitcast i8* %209 to i64*
  store i64 0, i64* %210, align 8
  %211 = getelementptr inbounds i8, i8* %185, i64 104
  %212 = bitcast i8* %211 to i1*
  store i1 true, i1* %212, align 8
  %213 = getelementptr inbounds i8, i8* %185, i64 112
  %214 = bitcast i8* %213 to i64*
  store i64 0, i64* %214, align 8
  %215 = getelementptr inbounds i8, i8* %185, i64 120
  %216 = bitcast i8* %215 to i1*
  store i1 true, i1* %216, align 8
  %217 = getelementptr inbounds i8, i8* %185, i64 128
  %niter181.next.7 = add i64 %niter181, 8
  %niter181.ncmp.7 = icmp eq i64 %niter181.next.7, %unroll_iter180
  br i1 %niter181.ncmp.7, label %.unr-lcssa, label %184

218:                                              ; preds = %170
  store %Ts28__ContiguousArrayStorageBaseC* bitcast (%struct._SwiftEmptyArrayStorage* @_swiftEmptyArrayStorage to %Ts28__ContiguousArrayStorageBaseC*), %Ts28__ContiguousArrayStorageBaseC** getelementptr inbounds (%TSa, %TSa* @"$s7llvm_O38lastSeenSaySiSgGvp", i64 0, i32 0, i32 0), align 8
  br label %.thread140

.thread140.loopexit:                              ; preds = %183
  %219 = call swiftcc %Ts28__ContiguousArrayStorageBaseC* @"$sSa28_allocateBufferUninitialized15minimumCapacitys016_ContiguousArrayB0VyxGSi_tFZ"(i64 %.pr, %swift.type* nonnull @"$sSiN")
  %._storage78.count._value = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %219, i64 0, i32 1, i32 0, i32 0, i32 0
  store i64 %.pr, i64* %._storage78.count._value, align 8
  %220 = getelementptr %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %219, i64 1
  %221 = bitcast %Ts28__ContiguousArrayStorageBaseC* %220 to i8*
  %222 = shl nuw i64 %.pr, 3
  call void @llvm.memset.p0i8.i64(i8* align 8 %221, i8 0, i64 %222, i1 false)
  br label %.thread140

.thread140:                                       ; preds = %.thread140.loopexit, %183, %218
  %223 = phi %Ts28__ContiguousArrayStorageBaseC* [ bitcast (%struct._SwiftEmptyArrayStorage* @_swiftEmptyArrayStorage to %Ts28__ContiguousArrayStorageBaseC*), %218 ], [ bitcast (%struct._SwiftEmptyArrayStorage* @_swiftEmptyArrayStorage to %Ts28__ContiguousArrayStorageBaseC*), %183 ], [ %219, %.thread140.loopexit ]
  %224 = phi i64 [ 0, %218 ], [ 0, %183 ], [ %.pr, %.thread140.loopexit ]
  store i64 %224, i64* getelementptr inbounds (%T7llvm_O311FenwickTreeVySiG, %T7llvm_O311FenwickTreeVySiG* @"$s7llvm_O37counterAA11FenwickTreeVySiGvp", i64 0, i32 0, i32 0), align 8
  store i64 0, i64* getelementptr inbounds (%T7llvm_O311FenwickTreeVySiG, %T7llvm_O311FenwickTreeVySiG* @"$s7llvm_O37counterAA11FenwickTreeVySiGvp", i64 0, i32 1, i32 0), align 8
  store %Ts28__ContiguousArrayStorageBaseC* %223, %Ts28__ContiguousArrayStorageBaseC** getelementptr inbounds (%T7llvm_O311FenwickTreeVySiG, %T7llvm_O311FenwickTreeVySiG* @"$s7llvm_O37counterAA11FenwickTreeVySiGvp", i64 0, i32 2, i32 0, i32 0), align 8
  store i8* bitcast (void (%TSi*, %TSi*, %TSi*)* @"$s7llvm_O3S2i_Sitcfu1_" to i8*), i8** getelementptr inbounds (%T7llvm_O311FenwickTreeVySiG, %T7llvm_O311FenwickTreeVySiG* @"$s7llvm_O37counterAA11FenwickTreeVySiGvp", i64 0, i32 3, i32 0), align 8
  store %swift.refcounted* null, %swift.refcounted** getelementptr inbounds (%T7llvm_O311FenwickTreeVySiG, %T7llvm_O311FenwickTreeVySiG* @"$s7llvm_O37counterAA11FenwickTreeVySiGvp", i64 0, i32 3, i32 1), align 8
  store i8* bitcast (void (%TSi*, %TSi*, %TSi*)* @"$s7llvm_O3S2i_Sitcfu2_" to i8*), i8** getelementptr inbounds (%T7llvm_O311FenwickTreeVySiG, %T7llvm_O311FenwickTreeVySiG* @"$s7llvm_O37counterAA11FenwickTreeVySiGvp", i64 0, i32 4, i32 0), align 8
  store %swift.refcounted* null, %swift.refcounted** getelementptr inbounds (%T7llvm_O311FenwickTreeVySiG, %T7llvm_O311FenwickTreeVySiG* @"$s7llvm_O37counterAA11FenwickTreeVySiGvp", i64 0, i32 4, i32 1), align 8
  %225 = load %Ts28__ContiguousArrayStorageBaseC*, %Ts28__ContiguousArrayStorageBaseC** getelementptr inbounds (%TSa, %TSa* @"$s7llvm_O31cSaySiGvp", i64 0, i32 0, i32 0), align 8
  %._storage22.count._value = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %225, i64 0, i32 1, i32 0, i32 0, i32 0
  %226 = load i64, i64* %._storage22.count._value, align 8, !range !6
  %227 = icmp eq i64 %226, 0
  br i1 %227, label %396, label %228

228:                                              ; preds = %.thread140
  %229 = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %225, i64 1
  %tailaddr23 = bitcast %Ts28__ContiguousArrayStorageBaseC* %229 to %TSi*
  %230 = getelementptr %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %225, i64 0, i32 0
  %231 = getelementptr inbounds [24 x i8], [24 x i8]* %access-scratch24, i64 0, i64 0
  %232 = call %swift.refcounted* @swift_retain(%swift.refcounted* returned %230) #25
  call void @llvm.lifetime.start.p0i8(i64 -1, i8* nonnull %231)
  call void @swift_beginAccess(i8* nonnull bitcast (%TSa* @"$s7llvm_O38lastSeenSaySiSgGvp" to i8*), [24 x i8]* nonnull %access-scratch24, i64 1, i8* null) #9
  %233 = getelementptr inbounds [24 x i8], [24 x i8]* %access-scratch77, i64 0, i64 0
  %234 = getelementptr inbounds [24 x i8], [24 x i8]* %access-scratch30, i64 0, i64 0
  %235 = getelementptr inbounds [24 x i8], [24 x i8]* %access-scratch31, i64 0, i64 0
  %236 = getelementptr inbounds [24 x i8], [24 x i8]* %access-scratch32, i64 0, i64 0
  %237 = bitcast %TSi* %7 to i8*
  %._value57 = getelementptr inbounds %TSi, %TSi* %7, i64 0, i32 0
  %238 = bitcast %TSi* %12 to i8*
  %239 = bitcast %TSi* %13 to i8*
  %._value74 = getelementptr inbounds %TSi, %TSi* %13, i64 0, i32 0
  %._value75 = getelementptr inbounds %TSi, %TSi* %12, i64 0, i32 0
  %240 = bitcast %TSi* %10 to i8*
  %241 = bitcast %TSi* %11 to i8*
  %._value69 = getelementptr inbounds %TSi, %TSi* %11, i64 0, i32 0
  %._value70 = getelementptr inbounds %TSi, %TSi* %10, i64 0, i32 0
  %242 = bitcast %TSi* %8 to i8*
  %243 = bitcast %TSi* %9 to i8*
  %._value63 = getelementptr inbounds %TSi, %TSi* %9, i64 0, i32 0
  %._value64 = getelementptr inbounds %TSi, %TSi* %8, i64 0, i32 0
  br label %247

244:                                              ; preds = %.thread
  %245 = load %Ts28__ContiguousArrayStorageBaseC*, %Ts28__ContiguousArrayStorageBaseC** %._buffer16._storage, align 8
  %246 = getelementptr %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %245, i64 0, i32 0
  call void @swift_release(%swift.refcounted* %246) #9
  unreachable

247:                                              ; preds = %._crit_edge, %228
  %248 = phi i64 [ 0, %228 ], [ %252, %._crit_edge ]
  %249 = load i64, i64* %._storage22.count._value, align 8, !range !6
  %.not126 = icmp ult i64 %248, %249
  br i1 %.not126, label %250, label %468, !prof !8

250:                                              ; preds = %247
  %._value25 = getelementptr inbounds %TSi, %TSi* %tailaddr23, i64 %248, i32 0
  %251 = load i64, i64* %._value25, align 8
  %252 = add nuw nsw i64 %248, 1
  %253 = load %Ts28__ContiguousArrayStorageBaseC*, %Ts28__ContiguousArrayStorageBaseC** getelementptr inbounds (%TSa, %TSa* @"$s7llvm_O38lastSeenSaySiSgGvp", i64 0, i32 0, i32 0), align 8
  %254 = icmp slt i64 %251, 0
  br i1 %254, label %469, label %255, !prof !7

255:                                              ; preds = %250
  %._storage26.count._value = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %253, i64 0, i32 1, i32 0, i32 0, i32 0
  %256 = load i64, i64* %._storage26.count._value, align 8, !range !6
  %.not127 = icmp ult i64 %251, %256
  br i1 %.not127, label %257, label %470, !prof !8

257:                                              ; preds = %255
  %258 = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %253, i64 1
  %259 = bitcast %Ts28__ContiguousArrayStorageBaseC* %258 to i8*
  %260 = shl nsw i64 %251, 4
  %261 = getelementptr inbounds i8, i8* %259, i64 %260
  %262 = getelementptr inbounds i8, i8* %261, i64 8
  %263 = bitcast i8* %262 to i1*
  %264 = load i1, i1* %263, align 1
  br i1 %264, label %268, label %265

265:                                              ; preds = %257
  %266 = bitcast i8* %261 to i64*
  %267 = load i64, i64* %266, align 1
  call void @llvm.lifetime.start.p0i8(i64 -1, i8* nonnull %233)
  call void @swift_beginAccess(i8* nonnull bitcast (%T7llvm_O311FenwickTreeVySiG* @"$s7llvm_O37counterAA11FenwickTreeVySiGvp" to i8*), [24 x i8]* nonnull %access-scratch77, i64 33, i8* null) #9
  call swiftcc void @"$s7llvm_O311FenwickTreeV6update2at6addingySi_xtFSi_Tg5"(i64 %267, i64 -1, %T7llvm_O311FenwickTreeVySiG* nocapture nonnull swiftself dereferenceable(56) @"$s7llvm_O37counterAA11FenwickTreeVySiGvp")
  call void @swift_endAccess([24 x i8]* nonnull %access-scratch77) #9
  call void @llvm.lifetime.end.p0i8(i64 -1, i8* nonnull %233)
  %.pre156 = load %Ts28__ContiguousArrayStorageBaseC*, %Ts28__ContiguousArrayStorageBaseC** getelementptr inbounds (%TSa, %TSa* @"$s7llvm_O38lastSeenSaySiSgGvp", i64 0, i32 0, i32 0), align 8
  br label %268

268:                                              ; preds = %257, %265
  %269 = phi %Ts28__ContiguousArrayStorageBaseC* [ %253, %257 ], [ %.pre156, %265 ]
  %270 = getelementptr %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %269, i64 0, i32 0
  %271 = call zeroext i1 @swift_isUniquelyReferenced_nonNull_native(%swift.refcounted* %270) #25
  store %Ts28__ContiguousArrayStorageBaseC* %269, %Ts28__ContiguousArrayStorageBaseC** getelementptr inbounds (%TSa, %TSa* @"$s7llvm_O38lastSeenSaySiSgGvp", i64 0, i32 0, i32 0), align 8
  br i1 %271, label %274, label %272

272:                                              ; preds = %268
  %273 = call swiftcc %Ts28__ContiguousArrayStorageBaseC* @"$ss22_ContiguousArrayBufferV20_consumeAndCreateNewAByxGyFSiSg_Tg5"(%Ts28__ContiguousArrayStorageBaseC* %269)
  store %Ts28__ContiguousArrayStorageBaseC* %273, %Ts28__ContiguousArrayStorageBaseC** getelementptr inbounds (%TSa, %TSa* @"$s7llvm_O38lastSeenSaySiSgGvp", i64 0, i32 0, i32 0), align 8
  br label %274

274:                                              ; preds = %268, %272
  %275 = phi %Ts28__ContiguousArrayStorageBaseC* [ %269, %268 ], [ %273, %272 ]
  %._storage28.count._value = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %275, i64 0, i32 1, i32 0, i32 0, i32 0
  %276 = load i64, i64* %._storage28.count._value, align 8, !range !6
  %.not128 = icmp ult i64 %251, %276
  br i1 %.not128, label %277, label %471, !prof !8

277:                                              ; preds = %274
  %278 = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %275, i64 1
  %279 = bitcast %Ts28__ContiguousArrayStorageBaseC* %278 to i8*
  %280 = getelementptr inbounds i8, i8* %279, i64 %260
  %281 = bitcast i8* %280 to i64*
  store i64 %248, i64* %281, align 1
  %282 = getelementptr inbounds i8, i8* %280, i64 8
  %283 = bitcast i8* %282 to i1*
  store i1 false, i1* %283, align 1
  call void @llvm.lifetime.start.p0i8(i64 -1, i8* nonnull %234)
  call void @swift_beginAccess(i8* nonnull bitcast (%T7llvm_O311FenwickTreeVySiG* @"$s7llvm_O37counterAA11FenwickTreeVySiGvp" to i8*), [24 x i8]* nonnull %access-scratch30, i64 33, i8* null) #9
  call swiftcc void @"$s7llvm_O311FenwickTreeV6update2at6addingySi_xtFSi_Tg5"(i64 %248, i64 1, %T7llvm_O311FenwickTreeVySiG* nocapture nonnull swiftself dereferenceable(56) @"$s7llvm_O37counterAA11FenwickTreeVySiGvp")
  call void @swift_endAccess([24 x i8]* nonnull %access-scratch30) #9
  call void @llvm.lifetime.end.p0i8(i64 -1, i8* nonnull %234)
  call void @llvm.lifetime.start.p0i8(i64 -1, i8* nonnull %235)
  call void @swift_beginAccess(i8* nonnull bitcast (%TSa* @"$s7llvm_O35queueSaySi6offset_Si1l_Si1rt7elementtGvp" to i8*), [24 x i8]* nonnull %access-scratch31, i64 1, i8* null) #9
  call void @llvm.lifetime.start.p0i8(i64 -1, i8* nonnull %236)
  call void @swift_beginAccess(i8* nonnull bitcast (%TSa* @"$s7llvm_O39responsesSaySiSgGvp" to i8*), [24 x i8]* nonnull %access-scratch32, i64 1, i8* null) #9
  %284 = load %Ts28__ContiguousArrayStorageBaseC*, %Ts28__ContiguousArrayStorageBaseC** getelementptr inbounds (%TSa, %TSa* @"$s7llvm_O35queueSaySi6offset_Si1l_Si1rt7elementtGvp", i64 0, i32 0, i32 0), align 8
  %._storage33.count._value149 = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %284, i64 0, i32 1, i32 0, i32 0, i32 0
  %285 = load i64, i64* %._storage33.count._value149, align 8, !range !6
  %286 = icmp eq i64 %285, 0
  br i1 %286, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %277, %341
  %287 = phi i64 [ %350, %341 ], [ %285, %277 ]
  %288 = phi %Ts28__ContiguousArrayStorageBaseC* [ %349, %341 ], [ %284, %277 ]
  %289 = add nsw i64 %287, -1
  %290 = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %288, i64 1
  %tailaddr34 = bitcast %Ts28__ContiguousArrayStorageBaseC* %290 to <{ %TSi, <{ %TSi, %TSi }> }>*
  %.element.r._value = getelementptr inbounds <{ %TSi, <{ %TSi, %TSi }> }>, <{ %TSi, <{ %TSi, %TSi }> }>* %tailaddr34, i64 %289, i32 1, i32 1, i32 0
  %291 = load i64, i64* %.element.r._value, align 8
  %292 = icmp eq i64 %291, %252
  br i1 %292, label %295, label %._crit_edge

._crit_edge:                                      ; preds = %341, %.lr.ph, %277
  %293 = icmp eq i64 %252, %226
  br i1 %293, label %294, label %247

294:                                              ; preds = %._crit_edge
  call void @swift_release(%swift.refcounted* %230) #9
  br label %396

295:                                              ; preds = %.lr.ph
  %296 = getelementptr %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %288, i64 0, i32 0
  %297 = call zeroext i1 @swift_isUniquelyReferenced_nonNull_native(%swift.refcounted* %296) #25
  store %Ts28__ContiguousArrayStorageBaseC* %288, %Ts28__ContiguousArrayStorageBaseC** getelementptr inbounds (%TSa, %TSa* @"$s7llvm_O35queueSaySi6offset_Si1l_Si1rt7elementtGvp", i64 0, i32 0, i32 0), align 8
  br i1 %297, label %300, label %298

298:                                              ; preds = %295
  %299 = call swiftcc %Ts28__ContiguousArrayStorageBaseC* @"$ss22_ContiguousArrayBufferV20_consumeAndCreateNewAByxGyFSi6offset_Si1l_Si1rt7elementt_Tg5"(%Ts28__ContiguousArrayStorageBaseC* nonnull %288)
  store %Ts28__ContiguousArrayStorageBaseC* %299, %Ts28__ContiguousArrayStorageBaseC** getelementptr inbounds (%TSa, %TSa* @"$s7llvm_O35queueSaySi6offset_Si1l_Si1rt7elementtGvp", i64 0, i32 0, i32 0), align 8
  br label %300

300:                                              ; preds = %295, %298
  %301 = phi %Ts28__ContiguousArrayStorageBaseC* [ %299, %298 ], [ %288, %295 ]
  %._storage53.count._value = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %301, i64 0, i32 1, i32 0, i32 0, i32 0
  %302 = load i64, i64* %._storage53.count._value, align 8, !range !6
  %303 = icmp eq i64 %302, 0
  br i1 %303, label %473, label %304, !prof !7

304:                                              ; preds = %300
  %305 = add nsw i64 %302, -1
  %306 = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %301, i64 1
  %tailaddr54 = bitcast %Ts28__ContiguousArrayStorageBaseC* %306 to <{ %TSi, <{ %TSi, %TSi }> }>*
  %.offset._value = getelementptr inbounds <{ %TSi, <{ %TSi, %TSi }> }>, <{ %TSi, <{ %TSi, %TSi }> }>* %tailaddr54, i64 %305, i32 0, i32 0
  %307 = load i64, i64* %.offset._value, align 8
  %.element55.l._value = getelementptr inbounds <{ %TSi, <{ %TSi, %TSi }> }>, <{ %TSi, <{ %TSi, %TSi }> }>* %tailaddr54, i64 %305, i32 1, i32 0, i32 0
  %308 = load i64, i64* %.element55.l._value, align 8
  %.element55.r._value = getelementptr inbounds <{ %TSi, <{ %TSi, %TSi }> }>, <{ %TSi, <{ %TSi, %TSi }> }>* %tailaddr54, i64 %305, i32 1, i32 1, i32 0
  %309 = load i64, i64* %.element55.r._value, align 8
  store i64 %305, i64* %._storage53.count._value, align 8
  store %Ts28__ContiguousArrayStorageBaseC* %301, %Ts28__ContiguousArrayStorageBaseC** getelementptr inbounds (%TSa, %TSa* @"$s7llvm_O35queueSaySi6offset_Si1l_Si1rt7elementtGvp", i64 0, i32 0, i32 0), align 8
  %310 = load i64, i64* getelementptr inbounds (%T7llvm_O311FenwickTreeVySiG, %T7llvm_O311FenwickTreeVySiG* @"$s7llvm_O37counterAA11FenwickTreeVySiGvp", i64 0, i32 1, i32 0), align 8
  %311 = load %Ts28__ContiguousArrayStorageBaseC*, %Ts28__ContiguousArrayStorageBaseC** getelementptr inbounds (%T7llvm_O311FenwickTreeVySiG, %T7llvm_O311FenwickTreeVySiG* @"$s7llvm_O37counterAA11FenwickTreeVySiGvp", i64 0, i32 2, i32 0, i32 0), align 8
  %312 = load i8*, i8** getelementptr inbounds (%T7llvm_O311FenwickTreeVySiG, %T7llvm_O311FenwickTreeVySiG* @"$s7llvm_O37counterAA11FenwickTreeVySiGvp", i64 0, i32 3, i32 0), align 8
  %313 = load %swift.refcounted*, %swift.refcounted** getelementptr inbounds (%T7llvm_O311FenwickTreeVySiG, %T7llvm_O311FenwickTreeVySiG* @"$s7llvm_O37counterAA11FenwickTreeVySiGvp", i64 0, i32 3, i32 1), align 8
  %314 = load void (%TSi*, %TSi*, %TSi*, %swift.refcounted*)*, void (%TSi*, %TSi*, %TSi*, %swift.refcounted*)** bitcast (i8** getelementptr inbounds (%T7llvm_O311FenwickTreeVySiG, %T7llvm_O311FenwickTreeVySiG* @"$s7llvm_O37counterAA11FenwickTreeVySiGvp", i64 0, i32 4, i32 0) to void (%TSi*, %TSi*, %TSi*, %swift.refcounted*)**), align 8
  %315 = load %swift.refcounted*, %swift.refcounted** getelementptr inbounds (%T7llvm_O311FenwickTreeVySiG, %T7llvm_O311FenwickTreeVySiG* @"$s7llvm_O37counterAA11FenwickTreeVySiGvp", i64 0, i32 4, i32 1), align 8
  %316 = icmp slt i64 %309, %308
  br i1 %316, label %474, label %317, !prof !7

317:                                              ; preds = %304
  %318 = call { i64, i1 } @llvm.sadd.with.overflow.i64(i64 %309, i64 -1)
  %319 = extractvalue { i64, i1 } %318, 0
  %320 = extractvalue { i64, i1 } %318, 1
  br i1 %320, label %475, label %321, !prof !7

321:                                              ; preds = %317
  %322 = call { i64, i1 } @llvm.sadd.with.overflow.i64(i64 %308, i64 -1)
  %323 = extractvalue { i64, i1 } %322, 0
  %324 = extractvalue { i64, i1 } %322, 1
  br i1 %324, label %476, label %325, !prof !7

325:                                              ; preds = %321
  call void @llvm.lifetime.start.p0i8(i64 8, i8* nonnull %237)
  store i64 %310, i64* %._value57, align 8
  %326 = icmp slt i64 %319, 0
  br i1 %326, label %329, label %327

327:                                              ; preds = %325
  %328 = icmp slt i64 %323, 0
  br i1 %328, label %352, label %363

.sink.split:                                      ; preds = %390, %.loopexit, %354
  %.ph = phi i64 [ %362, %354 ], [ %383, %.loopexit ], [ %392, %390 ]
  call void @swift_release(%swift.refcounted* %315) #9
  call void @swift_release(%swift.refcounted* %313) #9
  %.sink = getelementptr %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %311, i64 0, i32 0
  call void @swift_release(%swift.refcounted* %.sink) #9
  br label %329

329:                                              ; preds = %.sink.split, %325
  %330 = phi i64 [ %310, %325 ], [ %.ph, %.sink.split ]
  call void @llvm.lifetime.end.p0i8(i64 8, i8* nonnull %237)
  %331 = load %Ts28__ContiguousArrayStorageBaseC*, %Ts28__ContiguousArrayStorageBaseC** getelementptr inbounds (%TSa, %TSa* @"$s7llvm_O39responsesSaySiSgGvp", i64 0, i32 0, i32 0), align 8
  %332 = getelementptr %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %331, i64 0, i32 0
  %333 = call zeroext i1 @swift_isUniquelyReferenced_nonNull_native(%swift.refcounted* %332) #25
  store %Ts28__ContiguousArrayStorageBaseC* %331, %Ts28__ContiguousArrayStorageBaseC** getelementptr inbounds (%TSa, %TSa* @"$s7llvm_O39responsesSaySiSgGvp", i64 0, i32 0, i32 0), align 8
  br i1 %333, label %336, label %334

334:                                              ; preds = %329
  %335 = call swiftcc %Ts28__ContiguousArrayStorageBaseC* @"$ss22_ContiguousArrayBufferV20_consumeAndCreateNewAByxGyFSiSg_Tg5"(%Ts28__ContiguousArrayStorageBaseC* %331)
  store %Ts28__ContiguousArrayStorageBaseC* %335, %Ts28__ContiguousArrayStorageBaseC** getelementptr inbounds (%TSa, %TSa* @"$s7llvm_O39responsesSaySiSgGvp", i64 0, i32 0, i32 0), align 8
  br label %336

336:                                              ; preds = %329, %334
  %337 = phi %Ts28__ContiguousArrayStorageBaseC* [ %331, %329 ], [ %335, %334 ]
  %338 = icmp slt i64 %307, 0
  br i1 %338, label %477, label %339, !prof !7

339:                                              ; preds = %336
  %._storage58.count._value = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %337, i64 0, i32 1, i32 0, i32 0, i32 0
  %340 = load i64, i64* %._storage58.count._value, align 8, !range !6
  %.not131 = icmp ult i64 %307, %340
  br i1 %.not131, label %341, label %478, !prof !8

341:                                              ; preds = %339
  %342 = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %337, i64 1
  %343 = bitcast %Ts28__ContiguousArrayStorageBaseC* %342 to i8*
  %344 = shl nsw i64 %307, 4
  %345 = getelementptr inbounds i8, i8* %343, i64 %344
  %346 = bitcast i8* %345 to i64*
  store i64 %330, i64* %346, align 1
  %347 = getelementptr inbounds i8, i8* %345, i64 8
  %348 = bitcast i8* %347 to i1*
  store i1 false, i1* %348, align 1
  %349 = load %Ts28__ContiguousArrayStorageBaseC*, %Ts28__ContiguousArrayStorageBaseC** getelementptr inbounds (%TSa, %TSa* @"$s7llvm_O35queueSaySi6offset_Si1l_Si1rt7elementtGvp", i64 0, i32 0, i32 0), align 8
  %._storage33.count._value = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %349, i64 0, i32 1, i32 0, i32 0, i32 0
  %350 = load i64, i64* %._storage33.count._value, align 8, !range !6
  %351 = icmp eq i64 %350, 0
  br i1 %351, label %._crit_edge, label %.lr.ph

352:                                              ; preds = %327
  call void @llvm.lifetime.start.p0i8(i64 8, i8* nonnull %238)
  call void @llvm.lifetime.start.p0i8(i64 8, i8* nonnull %239)
  %._storage72.count._value = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %311, i64 0, i32 1, i32 0, i32 0, i32 0
  %353 = load i64, i64* %._storage72.count._value, align 8, !range !6
  %.not134 = icmp eq i64 %353, 0
  br i1 %.not134, label %481, label %354, !prof !7

354:                                              ; preds = %352
  %355 = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %311, i64 1
  %tailaddr73._value = bitcast %Ts28__ContiguousArrayStorageBaseC* %355 to i64*
  %356 = load i64, i64* %tailaddr73._value, align 8
  store i64 %356, i64* %._value74, align 8
  %357 = getelementptr %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %311, i64 0, i32 0
  %358 = bitcast i8* %312 to void (%TSi*, %TSi*, %TSi*, %swift.refcounted*)*
  %359 = call %swift.refcounted* @swift_retain(%swift.refcounted* returned %315) #25
  %360 = call %swift.refcounted* @swift_retain(%swift.refcounted* returned %357) #25
  %361 = call %swift.refcounted* @swift_retain(%swift.refcounted* returned %313) #25
  call swiftcc void %358(%TSi* noalias nocapture nonnull sret(%TSi) %12, %TSi* noalias nocapture nonnull dereferenceable(8) %7, %TSi* noalias nocapture nonnull dereferenceable(8) %13, %swift.refcounted* swiftself %313)
  call void @llvm.lifetime.end.p0i8(i64 8, i8* nonnull %239)
  %362 = load i64, i64* %._value75, align 8
  store i64 %362, i64* %._value57, align 8
  call void @llvm.lifetime.end.p0i8(i64 8, i8* nonnull %238)
  %.not144 = icmp eq i64 %319, 0
  br i1 %.not144, label %.sink.split, label %369

363:                                              ; preds = %327
  %364 = icmp ult i64 %323, %319
  %365 = getelementptr %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %311, i64 0, i32 0
  %366 = call %swift.refcounted* @swift_retain(%swift.refcounted* returned %365) #25
  %367 = call %swift.refcounted* @swift_retain(%swift.refcounted* returned %313) #25
  %368 = call %swift.refcounted* @swift_retain(%swift.refcounted* returned %315) #25
  br i1 %364, label %369, label %.loopexit

369:                                              ; preds = %363, %354
  %370 = phi i64 [ 0, %354 ], [ %323, %363 ]
  %.pre-phi = bitcast i8* %312 to void (%TSi*, %TSi*, %TSi*, %swift.refcounted*)*
  %371 = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %311, i64 1
  %tailaddr66 = bitcast %Ts28__ContiguousArrayStorageBaseC* %371 to %TSi*
  %._storage67.count._value = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %311, i64 0, i32 1, i32 0, i32 0, i32 0
  br label %372

372:                                              ; preds = %375, %369
  %373 = phi i64 [ %319, %369 ], [ %379, %375 ]
  call void @llvm.lifetime.start.p0i8(i64 8, i8* nonnull %240)
  call void @llvm.lifetime.start.p0i8(i64 8, i8* nonnull %241)
  %374 = load i64, i64* %._storage67.count._value, align 8, !range !6
  %.not133 = icmp slt i64 %373, %374
  br i1 %.not133, label %375, label %480, !prof !8

375:                                              ; preds = %372
  %._value68 = getelementptr inbounds %TSi, %TSi* %tailaddr66, i64 %373, i32 0
  %376 = load i64, i64* %._value68, align 8
  store i64 %376, i64* %._value69, align 8
  call swiftcc void %.pre-phi(%TSi* noalias nocapture nonnull sret(%TSi) %10, %TSi* noalias nocapture nonnull dereferenceable(8) %7, %TSi* noalias nocapture nonnull dereferenceable(8) %11, %swift.refcounted* swiftself %313)
  call void @llvm.lifetime.end.p0i8(i64 8, i8* nonnull %241)
  %377 = load i64, i64* %._value70, align 8
  store i64 %377, i64* %._value57, align 8
  call void @llvm.lifetime.end.p0i8(i64 8, i8* nonnull %240)
  %378 = add nsw i64 %373, -1
  %379 = and i64 %378, %373
  %380 = icmp slt i64 %370, %379
  br i1 %380, label %372, label %.loopexit

.loopexit:                                        ; preds = %375, %363
  %381 = phi i64 [ %319, %363 ], [ %379, %375 ]
  %382 = phi i64 [ %323, %363 ], [ %370, %375 ]
  %383 = phi i64 [ %310, %363 ], [ %377, %375 ]
  %384 = icmp slt i64 %381, %382
  br i1 %384, label %385, label %.sink.split

385:                                              ; preds = %.loopexit
  %386 = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %311, i64 1
  %tailaddr60 = bitcast %Ts28__ContiguousArrayStorageBaseC* %386 to %TSi*
  %._storage61.count._value = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %311, i64 0, i32 1, i32 0, i32 0, i32 0
  br label %387

387:                                              ; preds = %390, %385
  %388 = phi i64 [ %382, %385 ], [ %394, %390 ]
  call void @llvm.lifetime.start.p0i8(i64 8, i8* nonnull %242)
  call void @llvm.lifetime.start.p0i8(i64 8, i8* nonnull %243)
  %389 = load i64, i64* %._storage61.count._value, align 8, !range !6
  %.not132 = icmp slt i64 %388, %389
  br i1 %.not132, label %390, label %479, !prof !8

390:                                              ; preds = %387
  %._value62 = getelementptr inbounds %TSi, %TSi* %tailaddr60, i64 %388, i32 0
  %391 = load i64, i64* %._value62, align 8
  store i64 %391, i64* %._value63, align 8
  call swiftcc void %314(%TSi* noalias nocapture nonnull sret(%TSi) %8, %TSi* noalias nocapture nonnull dereferenceable(8) %7, %TSi* noalias nocapture nonnull dereferenceable(8) %9, %swift.refcounted* swiftself %315)
  call void @llvm.lifetime.end.p0i8(i64 8, i8* nonnull %243)
  %392 = load i64, i64* %._value64, align 8
  store i64 %392, i64* %._value57, align 8
  call void @llvm.lifetime.end.p0i8(i64 8, i8* nonnull %242)
  %393 = add nsw i64 %388, -1
  %394 = and i64 %393, %388
  %395 = icmp slt i64 %381, %394
  br i1 %395, label %387, label %.sink.split

396:                                              ; preds = %.thread140, %294
  %397 = call %swift.type* @__swift_instantiateConcreteTypeFromMangledName({ i32, i32 }* nonnull @"$ss23_ContiguousArrayStorageCyypGMD") #26
  %398 = call noalias %swift.refcounted* @swift_allocObject(%swift.type* %397, i64 64, i64 7) #9
  %399 = getelementptr inbounds %swift.refcounted, %swift.refcounted* %398, i64 1
  %._storage35.count._value = bitcast %swift.refcounted* %399 to i64*
  store i64 1, i64* %._storage35.count._value, align 8
  %._storage35._capacityAndFlags = getelementptr inbounds %swift.refcounted, %swift.refcounted* %398, i64 1, i32 1
  store i64 2, i64* %._storage35._capacityAndFlags, align 8
  %400 = getelementptr inbounds [24 x i8], [24 x i8]* %access-scratch36, i64 0, i64 0
  call void @llvm.lifetime.start.p0i8(i64 -1, i8* nonnull %400)
  call void @swift_beginAccess(i8* nonnull bitcast (%TSa* @"$s7llvm_O39responsesSaySiSgGvp" to i8*), [24 x i8]* nonnull %access-scratch36, i64 0, i8* null) #9
  %401 = load %Ts28__ContiguousArrayStorageBaseC*, %Ts28__ContiguousArrayStorageBaseC** getelementptr inbounds (%TSa, %TSa* @"$s7llvm_O39responsesSaySiSgGvp", i64 0, i32 0, i32 0), align 8
  %._storage37.count._value = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %401, i64 0, i32 1, i32 0, i32 0, i32 0
  %402 = load i64, i64* %._storage37.count._value, align 8, !range !6
  %403 = icmp eq i64 %402, 0
  br i1 %403, label %412, label %404

404:                                              ; preds = %396
  %405 = bitcast %Ts15ContiguousArrayV* %4 to i8*
  call void @llvm.lifetime.start.p0i8(i64 8, i8* nonnull %405)
  %406 = getelementptr %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %401, i64 0, i32 0
  %._buffer38._storage = getelementptr inbounds %Ts15ContiguousArrayV, %Ts15ContiguousArrayV* %4, i64 0, i32 0, i32 0
  store %Ts28__ContiguousArrayStorageBaseC* bitcast (%struct._SwiftEmptyArrayStorage* @_swiftEmptyArrayStorage to %Ts28__ContiguousArrayStorageBaseC*), %Ts28__ContiguousArrayStorageBaseC** %._buffer38._storage, align 8
  %407 = call %swift.refcounted* @swift_retain(%swift.refcounted* returned %406) #25
  call swiftcc void @"$ss15ContiguousArrayV16_createNewBuffer14bufferIsUnique15minimumCapacity13growForAppendySb_SiSbtFSS_Tg5"(i1 false, i64 %402, i1 false, %Ts15ContiguousArrayV* nocapture nonnull swiftself dereferenceable(8) %4)
  %408 = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %401, i64 1
  %409 = bitcast %Ts28__ContiguousArrayStorageBaseC* %408 to i8*
  %410 = bitcast %TSi* %5 to i8*
  %._value42 = getelementptr inbounds %TSi, %TSi* %5, i64 0, i32 0
  %411 = bitcast %TSi* %5 to %swift.opaque*
  br label %427

412:                                              ; preds = %396, %459
  %413 = phi %Ts28__ContiguousArrayStorageBaseC* [ %456, %459 ], [ bitcast (%struct._SwiftEmptyArrayStorage* @_swiftEmptyArrayStorage to %Ts28__ContiguousArrayStorageBaseC*), %396 ]
  %414 = bitcast %swift.refcounted* %398 to %Ts28__ContiguousArrayStorageBaseC*
  %415 = getelementptr inbounds %swift.refcounted, %swift.refcounted* %398, i64 2
  %416 = bitcast %TSa* %6 to i8*
  call void @llvm.lifetime.start.p0i8(i64 8, i8* nonnull %416)
  %._buffer50._storage = getelementptr inbounds %TSa, %TSa* %6, i64 0, i32 0, i32 0
  store %Ts28__ContiguousArrayStorageBaseC* %413, %Ts28__ContiguousArrayStorageBaseC** %._buffer50._storage, align 8
  %417 = call %swift.type* @__swift_instantiateConcreteTypeFromMangledName({ i32, i32 }* nonnull @"$sSaySSGMD") #26
  %418 = call i8** @"$sSaySSGSayxGSKsWlTm"(i8*** @"$sSaySSGSayxGSKsWL", { i32, i32 }* @"$sSaySSGMD", %swift.protocol_conformance_descriptor* @"$sSayxGSKsMc")
  %419 = bitcast %TSa* %6 to %swift.opaque*
  %420 = call swiftcc { i64, %swift.bridge* } @"$sSKsSS7ElementRtzrlE6joined9separatorS2S_tF"(i64 10, %swift.bridge* nonnull inttoptr (i64 -2233785415175766016 to %swift.bridge*), %swift.type* %417, i8** %418, %swift.opaque* noalias nocapture nonnull swiftself %419)
  %421 = extractvalue { i64, %swift.bridge* } %420, 0
  %422 = extractvalue { i64, %swift.bridge* } %420, 1
  %423 = getelementptr %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %413, i64 0, i32 0
  call void @swift_release(%swift.refcounted* %423) #9
  call void @llvm.lifetime.end.p0i8(i64 8, i8* nonnull %416)
  %424 = getelementptr inbounds %swift.refcounted, %swift.refcounted* %398, i64 3, i32 1
  %425 = bitcast i64* %424 to %swift.type**
  store %swift.type* @"$sSSN", %swift.type** %425, align 8
  %._guts51._object._countAndFlagsBits._value = bitcast %swift.refcounted* %415 to i64*
  store i64 %421, i64* %._guts51._object._countAndFlagsBits._value, align 8
  %._guts51._object._object = getelementptr inbounds %swift.refcounted, %swift.refcounted* %398, i64 2, i32 1
  %426 = bitcast i64* %._guts51._object._object to %swift.bridge**
  store %swift.bridge* %422, %swift.bridge** %426, align 8
  call swiftcc void @"$ss5print_9separator10terminatoryypd_S2StF"(%Ts28__ContiguousArrayStorageBaseC* %414, i64 32, %swift.bridge* nonnull inttoptr (i64 -2233785415175766016 to %swift.bridge*), i64 10, %swift.bridge* nonnull inttoptr (i64 -2233785415175766016 to %swift.bridge*))
  call void @swift_release(%swift.refcounted* %398) #9
  ret i32 0

427:                                              ; preds = %404, %455
  %428 = phi i64 [ 0, %404 ], [ %429, %455 ]
  %429 = add nuw nsw i64 %428, 1
  %430 = shl nsw i64 %428, 4
  %431 = getelementptr inbounds i8, i8* %409, i64 %430
  %432 = getelementptr inbounds i8, i8* %431, i64 8
  %433 = bitcast i8* %432 to i1*
  %434 = load i1, i1* %433, align 1
  br i1 %434, label %472, label %435

435:                                              ; preds = %427
  %436 = bitcast i8* %431 to i64*
  %437 = load i64, i64* %436, align 1
  call void @llvm.lifetime.start.p0i8(i64 8, i8* nonnull %410)
  store i64 %437, i64* %._value42, align 8
  %438 = call swiftcc { i64, %swift.bridge* } @"$ss23CustomStringConvertibleP11descriptionSSvgTj"(%swift.opaque* noalias nocapture nonnull swiftself %411, %swift.type* nonnull @"$sSiN", i8** nonnull @"$sSis23CustomStringConvertiblesWP")
  %439 = extractvalue { i64, %swift.bridge* } %438, 0
  %440 = extractvalue { i64, %swift.bridge* } %438, 1
  call void @llvm.lifetime.end.p0i8(i64 8, i8* nonnull %410)
  %441 = load %Ts28__ContiguousArrayStorageBaseC*, %Ts28__ContiguousArrayStorageBaseC** %._buffer38._storage, align 8
  %442 = getelementptr %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %441, i64 0, i32 0
  %443 = call zeroext i1 @swift_isUniquelyReferenced_nonNull_native(%swift.refcounted* %442) #25
  br i1 %443, label %447, label %444

444:                                              ; preds = %435
  %._storage44.count._value = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %441, i64 0, i32 1, i32 0, i32 0, i32 0
  %445 = load i64, i64* %._storage44.count._value, align 8, !range !6
  %446 = add nuw nsw i64 %445, 1
  call swiftcc void @"$ss15ContiguousArrayV16_createNewBuffer14bufferIsUnique15minimumCapacity13growForAppendySb_SiSbtFSS_Tg5"(i1 false, i64 %446, i1 true, %Ts15ContiguousArrayV* nocapture nonnull swiftself dereferenceable(8) %4)
  %.pre157 = load %Ts28__ContiguousArrayStorageBaseC*, %Ts28__ContiguousArrayStorageBaseC** %._buffer38._storage, align 8
  br label %447

447:                                              ; preds = %435, %444
  %448 = phi %Ts28__ContiguousArrayStorageBaseC* [ %441, %435 ], [ %.pre157, %444 ]
  %._storage45.count._value = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %448, i64 0, i32 1, i32 0, i32 0, i32 0
  %449 = load i64, i64* %._storage45.count._value, align 8, !range !6
  %._storage45._capacityAndFlags._value = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %448, i64 0, i32 1, i32 0, i32 1, i32 0
  %450 = load i64, i64* %._storage45._capacityAndFlags._value, align 8
  %451 = lshr i64 %450, 1
  %452 = add nuw nsw i64 %449, 1
  %.not130 = icmp ugt i64 %451, %449
  br i1 %.not130, label %455, label %453, !prof !8

453:                                              ; preds = %447
  %454 = icmp ugt i64 %450, 1
  call swiftcc void @"$ss15ContiguousArrayV16_createNewBuffer14bufferIsUnique15minimumCapacity13growForAppendySb_SiSbtFSS_Tg5"(i1 %454, i64 %452, i1 true, %Ts15ContiguousArrayV* nocapture nonnull swiftself dereferenceable(8) %4)
  %.pre158 = load %Ts28__ContiguousArrayStorageBaseC*, %Ts28__ContiguousArrayStorageBaseC** %._buffer38._storage, align 8
  br label %455

455:                                              ; preds = %447, %453
  %456 = phi %Ts28__ContiguousArrayStorageBaseC* [ %448, %447 ], [ %.pre158, %453 ]
  %._storage46.count._value = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %456, i64 0, i32 1, i32 0, i32 0, i32 0
  store i64 %452, i64* %._storage46.count._value, align 8
  %457 = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %456, i64 1
  %tailaddr47 = bitcast %Ts28__ContiguousArrayStorageBaseC* %457 to %TSS*
  %._guts._object._countAndFlagsBits._value = getelementptr inbounds %TSS, %TSS* %tailaddr47, i64 %449, i32 0, i32 0, i32 0, i32 0
  store i64 %439, i64* %._guts._object._countAndFlagsBits._value, align 8
  %._guts._object._object = getelementptr inbounds %TSS, %TSS* %tailaddr47, i64 %449, i32 0, i32 0, i32 1
  store %swift.bridge* %440, %swift.bridge** %._guts._object._object, align 8
  %458 = icmp eq i64 %429, %402
  br i1 %458, label %459, label %427

459:                                              ; preds = %455
  call void @swift_release(%swift.refcounted* %406) #9
  call void @llvm.lifetime.end.p0i8(i64 8, i8* nonnull %405)
  br label %412

460:                                              ; preds = %44
  tail call void asm sideeffect "", "n"(i32 1) #9
  tail call void @llvm.trap()
  unreachable

461:                                              ; preds = %41
  call void asm sideeffect "", "n"(i32 2) #9
  call void @llvm.trap()
  unreachable

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

463:                                              ; preds = %82
  call void asm sideeffect "", "n"(i32 4) #9
  call void @llvm.trap()
  unreachable

464:                                              ; preds = %72
  call void asm sideeffect "", "n"(i32 6) #9
  call void @llvm.trap()
  unreachable

465:                                              ; preds = %109
  call void asm sideeffect "", "n"(i32 7) #9
  call void @llvm.trap()
  unreachable

466:                                              ; preds = %166
  call void asm sideeffect "", "n"(i32 9) #9
  call void @llvm.trap()
  unreachable

467:                                              ; preds = %.epilog-lcssa
  call void asm sideeffect "", "n"(i32 11) #9
  call void @llvm.trap()
  unreachable

468:                                              ; preds = %247
  call void asm sideeffect "", "n"(i32 14) #9
  call void @llvm.trap()
  unreachable

469:                                              ; preds = %250
  call void asm sideeffect "", "n"(i32 16) #9
  call void @llvm.trap()
  unreachable

470:                                              ; preds = %255
  call void asm sideeffect "", "n"(i32 17) #9
  call void @llvm.trap()
  unreachable

471:                                              ; preds = %274
  call void asm sideeffect "", "n"(i32 18) #9
  call void @llvm.trap()
  unreachable

472:                                              ; preds = %427
  call void asm sideeffect "", "n"(i32 23) #9
  call void @llvm.trap()
  unreachable

473:                                              ; preds = %300
  call void asm sideeffect "", "n"(i32 26) #9
  call void @llvm.trap()
  unreachable

474:                                              ; preds = %304
  call void asm sideeffect "", "n"(i32 27) #9
  call void @llvm.trap()
  unreachable

475:                                              ; preds = %317
  call void asm sideeffect "", "n"(i32 28) #9
  call void @llvm.trap()
  unreachable

476:                                              ; preds = %321
  call void asm sideeffect "", "n"(i32 29) #9
  call void @llvm.trap()
  unreachable

477:                                              ; preds = %336
  call void asm sideeffect "", "n"(i32 30) #9
  call void @llvm.trap()
  unreachable

478:                                              ; preds = %339
  call void asm sideeffect "", "n"(i32 31) #9
  call void @llvm.trap()
  unreachable

479:                                              ; preds = %387
  call void asm sideeffect "", "n"(i32 33) #9
  call void @llvm.trap()
  unreachable

480:                                              ; preds = %372
  call void asm sideeffect "", "n"(i32 36) #9
  call void @llvm.trap()
  unreachable

481:                                              ; preds = %352
  call void asm sideeffect "", "n"(i32 38) #9
  call void @llvm.trap()
  unreachable
}

define hidden swiftcc i8* @"$s7llvm_O312getsToBuffer4sizeSpys4Int8VGs5Int32V_tF"(i32 %0) local_unnamed_addr #0 {
entry:
  %access-scratch = alloca [24 x i8], align 8
  %access-scratch1 = alloca [24 x i8], align 8
  %access-scratch2 = alloca [24 x i8], align 8
  %1 = getelementptr inbounds [24 x i8], [24 x i8]* %access-scratch, i64 0, i64 0
  call void @llvm.lifetime.start.p0i8(i64 -1, i8* nonnull %1)
  call void @swift_beginAccess(i8* nonnull bitcast (%Ts5Int32V* @"$s7llvm_O314bufferCapacitys5Int32Vvp" to i8*), [24 x i8]* nonnull %access-scratch, i64 1, i8* null) #9
  %2 = load i32, i32* getelementptr inbounds (%Ts5Int32V, %Ts5Int32V* @"$s7llvm_O314bufferCapacitys5Int32Vvp", i64 0, i32 0), align 4
  %3 = icmp slt i32 %2, %0
  br i1 %3, label %4, label %14

4:                                                ; preds = %entry
  %5 = getelementptr inbounds [24 x i8], [24 x i8]* %access-scratch2, i64 0, i64 0
  call void @llvm.lifetime.start.p0i8(i64 -1, i8* nonnull %5)
  call void @swift_beginAccess(i8* nonnull getelementptr inbounds (%TSpys4Int8VGSg, %TSpys4Int8VGSg* @"$s7llvm_O36bufferSpys4Int8VGSgvp", i64 0, i32 0, i64 0), [24 x i8]* nonnull %access-scratch2, i64 1, i8* null) #9
  %6 = load i64, i64* bitcast (%TSpys4Int8VGSg* @"$s7llvm_O36bufferSpys4Int8VGSgvp" to i64*), align 8
  %7 = icmp eq i64 %6, 0
  br i1 %7, label %10, label %8

8:                                                ; preds = %4
  %9 = inttoptr i64 %6 to i8*
  call void @swift_slowDealloc(i8* nonnull %9, i64 -1, i64 -1) #9
  br label %10

10:                                               ; preds = %4, %8
  %11 = sext i32 %0 to i64
  %12 = call noalias i8* @swift_slowAlloc(i64 %11, i64 -1) #9
  %13 = ptrtoint i8* %12 to i64
  store i64 %13, i64* bitcast (%TSpys4Int8VGSg* @"$s7llvm_O36bufferSpys4Int8VGSgvp" to i64*), align 8
  store i32 %0, i32* getelementptr inbounds (%Ts5Int32V, %Ts5Int32V* @"$s7llvm_O314bufferCapacitys5Int32Vvp", i64 0, i32 0), align 4
  br label %14

14:                                               ; preds = %entry, %10
  %15 = getelementptr inbounds [24 x i8], [24 x i8]* %access-scratch1, i64 0, i64 0
  call void @llvm.lifetime.start.p0i8(i64 -1, i8* nonnull %15)
  call void @swift_beginAccess(i8* nonnull getelementptr inbounds (%TSpys4Int8VGSg, %TSpys4Int8VGSg* @"$s7llvm_O36bufferSpys4Int8VGSgvp", i64 0, i32 0, i64 0), [24 x i8]* nonnull %access-scratch1, i64 0, i8* null) #9
  %16 = load i64, i64* bitcast (%TSpys4Int8VGSg* @"$s7llvm_O36bufferSpys4Int8VGSgvp" to i64*), align 8
  %17 = icmp eq i64 %16, 0
  br i1 %17, label %25, label %18

18:                                               ; preds = %14
  %19 = load i64, i64* bitcast (%TSpySo8_IO_FILEVGSg* @"$s7llvm_O35INPUTSpySo8_IO_FILEVGSgvp" to i64*), align 8
  %20 = inttoptr i64 %16 to i8*
  %21 = inttoptr i64 %19 to %struct._IO_FILE*
  %22 = call i8* @fgets(i8* nonnull %20, i32 %0, %struct._IO_FILE* %21)
  %23 = icmp eq i8* %22, null
  br i1 %23, label %26, label %24

24:                                               ; preds = %18
  ret i8* %22

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

26:                                               ; preds = %18
  call void asm sideeffect "", "n"(i32 1) #9
  call void @llvm.trap()
  unreachable
}

define hidden swiftcc i64 @"$s7llvm_O316getIntFromBufferySiSpys4Int8VGzF"(%TSp* noalias nocapture dereferenceable(8) %0) local_unnamed_addr #0 {
entry:
  %._rawValue = getelementptr inbounds %TSp, %TSp* %0, i64 0, i32 0
  %1 = bitcast %TSp* %0 to %Ts4Int8V**
  %.pre = load %Ts4Int8V*, %Ts4Int8V** %1, align 8
  br label %2

2:                                                ; preds = %33, %entry
  %3 = phi %Ts4Int8V* [ %.pre, %entry ], [ %38, %33 ]
  %4 = phi i64 [ 0, %entry ], [ %34, %33 ]
  %5 = phi i1 [ true, %entry ], [ %35, %33 ]
  %6 = phi i1 [ false, %entry ], [ %36, %33 ]
  %._value = getelementptr inbounds %Ts4Int8V, %Ts4Int8V* %3, i64 0, i32 0
  %7 = load i8, i8* %._value, align 1
  %8 = icmp eq i8 %7, 45
  br i1 %8, label %33, label %9

9:                                                ; preds = %2
  %10 = add i8 %7, -58
  %11 = icmp ult i8 %10, -10
  br i1 %11, label %25, label %12

12:                                               ; preds = %9
  %. = select i1 %5, i64 0, i64 %4
  %13 = tail call { i64, i1 } @llvm.smul.with.overflow.i64(i64 %., i64 10)
  %14 = extractvalue { i64, i1 } %13, 1
  br i1 %14, label %39, label %15, !prof !7

15:                                               ; preds = %12
  %16 = extractvalue { i64, i1 } %13, 0
  %17 = zext i8 %7 to i64
  %18 = tail call { i64, i1 } @llvm.sadd.with.overflow.i64(i64 %16, i64 %17)
  %19 = extractvalue { i64, i1 } %18, 1
  br i1 %19, label %40, label %20, !prof !7

20:                                               ; preds = %15
  %21 = extractvalue { i64, i1 } %18, 0
  %22 = tail call { i64, i1 } @llvm.sadd.with.overflow.i64(i64 %21, i64 -48)
  %23 = extractvalue { i64, i1 } %22, 0
  %24 = extractvalue { i64, i1 } %22, 1
  br i1 %24, label %41, label %33, !prof !7

25:                                               ; preds = %9
  br i1 %5, label %33, label %26

26:                                               ; preds = %25
  br i1 %6, label %27, label %31

27:                                               ; preds = %26
  %28 = tail call { i64, i1 } @llvm.ssub.with.overflow.i64(i64 0, i64 %4)
  %29 = extractvalue { i64, i1 } %28, 0
  %30 = extractvalue { i64, i1 } %28, 1
  br i1 %30, label %42, label %31, !prof !7

31:                                               ; preds = %26, %27
  %32 = phi i64 [ %29, %27 ], [ %4, %26 ]
  ret i64 %32

33:                                               ; preds = %25, %20, %2
  %34 = phi i64 [ %4, %2 ], [ %23, %20 ], [ %4, %25 ]
  %35 = phi i1 [ %5, %2 ], [ false, %20 ], [ true, %25 ]
  %36 = phi i1 [ true, %2 ], [ %6, %20 ], [ %6, %25 ]
  %37 = getelementptr inbounds %Ts4Int8V, %Ts4Int8V* %3, i64 1, i32 0
  store i8* %37, i8** %._rawValue, align 8
  %38 = bitcast i8* %37 to %Ts4Int8V*
  br label %2

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

40:                                               ; preds = %15
  tail call void asm sideeffect "", "n"(i32 1) #9
  tail call void @llvm.trap()
  unreachable

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

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

define hidden swiftcc i64 @"$s7llvm_O36getIntSiyF"() local_unnamed_addr #0 {
entry:
  %0 = tail call swiftcc i8* @"$s7llvm_O312getsToBuffer4sizeSpys4Int8VGs5Int32V_tF"(i32 24)
  %1 = bitcast i8* %0 to %Ts4Int8V*
  br label %2

2:                                                ; preds = %12, %entry
  %3 = phi i64 [ 0, %entry ], [ %13, %12 ]
  %4 = phi i1 [ true, %entry ], [ %14, %12 ]
  %5 = phi i1 [ false, %entry ], [ %15, %12 ]
  %6 = phi %Ts4Int8V* [ %1, %entry ], [ %16, %12 ]
  %._value = getelementptr inbounds %Ts4Int8V, %Ts4Int8V* %6, i64 0, i32 0
  %7 = load i8, i8* %._value, align 1
  %8 = icmp eq i8 %7, 45
  br i1 %8, label %12, label %9

9:                                                ; preds = %2
  %10 = add i8 %7, -58
  %11 = icmp ult i8 %10, -10
  br i1 %11, label %17, label %25

12:                                               ; preds = %33, %17, %2
  %13 = phi i64 [ %3, %2 ], [ %3, %17 ], [ %36, %33 ]
  %14 = phi i1 [ %4, %2 ], [ true, %17 ], [ false, %33 ]
  %15 = phi i1 [ true, %2 ], [ %5, %17 ], [ %5, %33 ]
  %16 = getelementptr inbounds %Ts4Int8V, %Ts4Int8V* %6, i64 1
  br label %2

17:                                               ; preds = %9
  br i1 %4, label %12, label %18

18:                                               ; preds = %17
  br i1 %5, label %19, label %23

19:                                               ; preds = %18
  %20 = tail call { i64, i1 } @llvm.ssub.with.overflow.i64(i64 0, i64 %3)
  %21 = extractvalue { i64, i1 } %20, 0
  %22 = extractvalue { i64, i1 } %20, 1
  br i1 %22, label %41, label %23, !prof !7

23:                                               ; preds = %18, %19
  %24 = phi i64 [ %21, %19 ], [ %3, %18 ]
  ret i64 %24

25:                                               ; preds = %9
  %. = select i1 %4, i64 0, i64 %3
  %26 = tail call { i64, i1 } @llvm.smul.with.overflow.i64(i64 %., i64 10)
  %27 = extractvalue { i64, i1 } %26, 1
  br i1 %27, label %38, label %28, !prof !7

28:                                               ; preds = %25
  %29 = extractvalue { i64, i1 } %26, 0
  %30 = zext i8 %7 to i64
  %31 = tail call { i64, i1 } @llvm.sadd.with.overflow.i64(i64 %29, i64 %30)
  %32 = extractvalue { i64, i1 } %31, 1
  br i1 %32, label %39, label %33, !prof !7

33:                                               ; preds = %28
  %34 = extractvalue { i64, i1 } %31, 0
  %35 = tail call { i64, i1 } @llvm.sadd.with.overflow.i64(i64 %34, i64 -48)
  %36 = extractvalue { i64, i1 } %35, 0
  %37 = extractvalue { i64, i1 } %35, 1
  br i1 %37, label %40, label %12, !prof !7

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

39:                                               ; preds = %28
  tail call void asm sideeffect "", "n"(i32 1) #9
  tail call void @llvm.trap()
  unreachable

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

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

define hidden swiftcc { i64, i64 } @"$s7llvm_O310getIntPairSi_SityF"() local_unnamed_addr #0 {
entry:
  %0 = tail call swiftcc i8* @"$s7llvm_O312getsToBuffer4sizeSpys4Int8VGs5Int32V_tF"(i32 48)
  br label %1

1:                                                ; preds = %11, %entry
  %2 = phi i64 [ 0, %entry ], [ %12, %11 ]
  %3 = phi i1 [ true, %entry ], [ %13, %11 ]
  %4 = phi i1 [ false, %entry ], [ %14, %11 ]
  %5 = phi i8* [ %0, %entry ], [ %15, %11 ]
  %6 = load i8, i8* %5, align 1
  %7 = icmp eq i8 %6, 45
  br i1 %7, label %11, label %8

8:                                                ; preds = %1
  %9 = add i8 %6, -58
  %10 = icmp ult i8 %9, -10
  br i1 %10, label %16, label %24

11:                                               ; preds = %32, %16, %1
  %12 = phi i64 [ %2, %1 ], [ %2, %16 ], [ %35, %32 ]
  %13 = phi i1 [ %3, %1 ], [ true, %16 ], [ false, %32 ]
  %14 = phi i1 [ true, %1 ], [ %4, %16 ], [ %4, %32 ]
  %15 = getelementptr inbounds i8, i8* %5, i64 1
  br label %1

16:                                               ; preds = %8
  br i1 %3, label %11, label %17

17:                                               ; preds = %16
  br i1 %4, label %18, label %22

18:                                               ; preds = %17
  %19 = tail call { i64, i1 } @llvm.ssub.with.overflow.i64(i64 0, i64 %2)
  %20 = extractvalue { i64, i1 } %19, 0
  %21 = extractvalue { i64, i1 } %19, 1
  br i1 %21, label %82, label %22, !prof !7

22:                                               ; preds = %17, %18
  %23 = phi i64 [ %20, %18 ], [ %2, %17 ]
  br label %37

24:                                               ; preds = %8
  %. = select i1 %3, i64 0, i64 %2
  %25 = tail call { i64, i1 } @llvm.smul.with.overflow.i64(i64 %., i64 10)
  %26 = extractvalue { i64, i1 } %25, 1
  br i1 %26, label %75, label %27, !prof !7

27:                                               ; preds = %24
  %28 = extractvalue { i64, i1 } %25, 0
  %29 = zext i8 %6 to i64
  %30 = tail call { i64, i1 } @llvm.sadd.with.overflow.i64(i64 %28, i64 %29)
  %31 = extractvalue { i64, i1 } %30, 1
  br i1 %31, label %76, label %32, !prof !7

32:                                               ; preds = %27
  %33 = extractvalue { i64, i1 } %30, 0
  %34 = tail call { i64, i1 } @llvm.sadd.with.overflow.i64(i64 %33, i64 -48)
  %35 = extractvalue { i64, i1 } %34, 0
  %36 = extractvalue { i64, i1 } %34, 1
  br i1 %36, label %77, label %11, !prof !7

37:                                               ; preds = %47, %22
  %38 = phi i8 [ %6, %22 ], [ %.pre, %47 ]
  %39 = phi i64 [ 0, %22 ], [ %48, %47 ]
  %40 = phi i1 [ true, %22 ], [ %49, %47 ]
  %41 = phi i1 [ false, %22 ], [ %50, %47 ]
  %42 = phi i8* [ %5, %22 ], [ %51, %47 ]
  %43 = icmp eq i8 %38, 45
  br i1 %43, label %47, label %44

44:                                               ; preds = %37
  %45 = add i8 %38, -58
  %46 = icmp ult i8 %45, -10
  br i1 %46, label %52, label %62

47:                                               ; preds = %70, %52, %37
  %48 = phi i64 [ %39, %37 ], [ %39, %52 ], [ %73, %70 ]
  %49 = phi i1 [ %40, %37 ], [ true, %52 ], [ false, %70 ]
  %50 = phi i1 [ true, %37 ], [ %41, %52 ], [ %41, %70 ]
  %51 = getelementptr inbounds i8, i8* %42, i64 1
  %.pre = load i8, i8* %51, align 1
  br label %37

52:                                               ; preds = %44
  br i1 %40, label %47, label %53

53:                                               ; preds = %52
  br i1 %41, label %54, label %58

54:                                               ; preds = %53
  %55 = tail call { i64, i1 } @llvm.ssub.with.overflow.i64(i64 0, i64 %39)
  %56 = extractvalue { i64, i1 } %55, 0
  %57 = extractvalue { i64, i1 } %55, 1
  br i1 %57, label %81, label %58, !prof !7

58:                                               ; preds = %53, %54
  %59 = phi i64 [ %56, %54 ], [ %39, %53 ]
  %60 = insertvalue { i64, i64 } undef, i64 %23, 0
  %61 = insertvalue { i64, i64 } %60, i64 %59, 1
  ret { i64, i64 } %61

62:                                               ; preds = %44
  %.2 = select i1 %40, i64 0, i64 %39
  %63 = tail call { i64, i1 } @llvm.smul.with.overflow.i64(i64 %.2, i64 10)
  %64 = extractvalue { i64, i1 } %63, 1
  br i1 %64, label %78, label %65, !prof !7

65:                                               ; preds = %62
  %66 = extractvalue { i64, i1 } %63, 0
  %67 = zext i8 %38 to i64
  %68 = tail call { i64, i1 } @llvm.sadd.with.overflow.i64(i64 %66, i64 %67)
  %69 = extractvalue { i64, i1 } %68, 1
  br i1 %69, label %79, label %70, !prof !7

70:                                               ; preds = %65
  %71 = extractvalue { i64, i1 } %68, 0
  %72 = tail call { i64, i1 } @llvm.sadd.with.overflow.i64(i64 %71, i64 -48)
  %73 = extractvalue { i64, i1 } %72, 0
  %74 = extractvalue { i64, i1 } %72, 1
  br i1 %74, label %80, label %47, !prof !7

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

76:                                               ; preds = %27
  tail call void asm sideeffect "", "n"(i32 1) #9
  tail call void @llvm.trap()
  unreachable

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

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

79:                                               ; preds = %65
  tail call void asm sideeffect "", "n"(i32 4) #9
  tail call void @llvm.trap()
  unreachable

80:                                               ; preds = %70
  tail call void asm sideeffect "", "n"(i32 5) #9
  tail call void @llvm.trap()
  unreachable

81:                                               ; preds = %54
  tail call void asm sideeffect "", "n"(i32 6) #9
  tail call void @llvm.trap()
  unreachable

82:                                               ; preds = %18
  tail call void asm sideeffect "", "n"(i32 7) #9
  tail call void @llvm.trap()
  unreachable
}

define hidden swiftcc %Ts28__ContiguousArrayStorageBaseC* @"$s7llvm_O37getInts5countSaySiGSi_tF"(i64 %0) local_unnamed_addr #0 {
entry:
  %1 = icmp slt i64 %0, -2147483648
  br i1 %1, label %69, label %2, !prof !7

2:                                                ; preds = %entry
  %3 = icmp sgt i64 %0, 2147483647
  br i1 %3, label %70, label %4, !prof !7

4:                                                ; preds = %2
  %5 = trunc i64 %0 to i32
  %6 = tail call { i32, i1 } @llvm.smul.with.overflow.i32(i32 %5, i32 24)
  %7 = extractvalue { i32, i1 } %6, 1
  br i1 %7, label %71, label %8, !prof !7

8:                                                ; preds = %4
  %9 = extractvalue { i32, i1 } %6, 0
  %10 = tail call swiftcc i8* @"$s7llvm_O312getsToBuffer4sizeSpys4Int8VGs5Int32V_tF"(i32 %9)
  %11 = tail call i64 @llvm.smax.i64(i64 %0, i64 0)
  %12 = tail call swiftcc %Ts28__ContiguousArrayStorageBaseC* @"$ss22_ContiguousArrayBufferV20_consumeAndCreateNew14bufferIsUnique15minimumCapacity13growForAppendAByxGSb_SiSbtFSi_Tg5"(i1 false, i64 %11, i1 false, %Ts28__ContiguousArrayStorageBaseC* nonnull bitcast (%struct._SwiftEmptyArrayStorage* @_swiftEmptyArrayStorage to %Ts28__ContiguousArrayStorageBaseC*))
  %13 = icmp slt i64 %0, 0
  br i1 %13, label %72, label %14, !prof !7

14:                                               ; preds = %8
  %15 = icmp eq i64 %0, 0
  br i1 %15, label %.loopexit, label %.preheader

.preheader:                                       ; preds = %14, %51
  %16 = phi i64 [ %20, %51 ], [ 0, %14 ]
  %17 = phi i8* [ %25, %51 ], [ %10, %14 ]
  %18 = phi %Ts28__ContiguousArrayStorageBaseC* [ %52, %51 ], [ %12, %14 ]
  %exitcond.not = icmp eq i64 %16, %0
  br i1 %exitcond.not, label %73, label %19, !prof !7

19:                                               ; preds = %.preheader
  %20 = add nuw nsw i64 %16, 1
  br label %21

21:                                               ; preds = %19, %31
  %22 = phi i64 [ %32, %31 ], [ 0, %19 ]
  %23 = phi i1 [ %33, %31 ], [ true, %19 ]
  %24 = phi i1 [ %34, %31 ], [ false, %19 ]
  %25 = phi i8* [ %35, %31 ], [ %17, %19 ]
  %26 = load i8, i8* %25, align 1
  %27 = icmp eq i8 %26, 45
  br i1 %27, label %31, label %28

28:                                               ; preds = %21
  %29 = add i8 %26, -58
  %30 = icmp ult i8 %29, -10
  br i1 %30, label %36, label %55

31:                                               ; preds = %63, %36, %21
  %32 = phi i64 [ %22, %21 ], [ %22, %36 ], [ %66, %63 ]
  %33 = phi i1 [ %23, %21 ], [ true, %36 ], [ false, %63 ]
  %34 = phi i1 [ true, %21 ], [ %24, %36 ], [ %24, %63 ]
  %35 = getelementptr inbounds i8, i8* %25, i64 1
  br label %21

36:                                               ; preds = %28
  br i1 %23, label %31, label %37

37:                                               ; preds = %36
  br i1 %24, label %38, label %42

38:                                               ; preds = %37
  %39 = tail call { i64, i1 } @llvm.ssub.with.overflow.i64(i64 0, i64 %22)
  %40 = extractvalue { i64, i1 } %39, 0
  %41 = extractvalue { i64, i1 } %39, 1
  br i1 %41, label %77, label %42, !prof !7

42:                                               ; preds = %37, %38
  %43 = phi i64 [ %40, %38 ], [ %22, %37 ]
  %._storage.count._value = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %18, i64 0, i32 1, i32 0, i32 0, i32 0
  %44 = load i64, i64* %._storage.count._value, align 8, !range !6
  %._storage._capacityAndFlags._value = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %18, i64 0, i32 1, i32 0, i32 1, i32 0
  %45 = load i64, i64* %._storage._capacityAndFlags._value, align 8
  %46 = lshr i64 %45, 1
  %47 = add nuw nsw i64 %44, 1
  %.not = icmp ugt i64 %46, %44
  br i1 %.not, label %51, label %48, !prof !8

48:                                               ; preds = %42
  %49 = icmp ugt i64 %45, 1
  %50 = tail call swiftcc %Ts28__ContiguousArrayStorageBaseC* @"$ss22_ContiguousArrayBufferV20_consumeAndCreateNew14bufferIsUnique15minimumCapacity13growForAppendAByxGSb_SiSbtFSi_Tg5"(i1 %49, i64 %47, i1 true, %Ts28__ContiguousArrayStorageBaseC* nonnull %18)
  br label %51

51:                                               ; preds = %42, %48
  %52 = phi %Ts28__ContiguousArrayStorageBaseC* [ %50, %48 ], [ %18, %42 ]
  %._storage1.count._value = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %52, i64 0, i32 1, i32 0, i32 0, i32 0
  store i64 %47, i64* %._storage1.count._value, align 8
  %53 = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %52, i64 1
  %tailaddr = bitcast %Ts28__ContiguousArrayStorageBaseC* %53 to %TSi*
  %._value2 = getelementptr inbounds %TSi, %TSi* %tailaddr, i64 %44, i32 0
  store i64 %43, i64* %._value2, align 8
  %54 = icmp eq i64 %20, %0
  br i1 %54, label %.loopexit, label %.preheader

55:                                               ; preds = %28
  %.3 = select i1 %23, i64 0, i64 %22
  %56 = tail call { i64, i1 } @llvm.smul.with.overflow.i64(i64 %.3, i64 10)
  %57 = extractvalue { i64, i1 } %56, 1
  br i1 %57, label %74, label %58, !prof !7

58:                                               ; preds = %55
  %59 = extractvalue { i64, i1 } %56, 0
  %60 = zext i8 %26 to i64
  %61 = tail call { i64, i1 } @llvm.sadd.with.overflow.i64(i64 %59, i64 %60)
  %62 = extractvalue { i64, i1 } %61, 1
  br i1 %62, label %75, label %63, !prof !7

63:                                               ; preds = %58
  %64 = extractvalue { i64, i1 } %61, 0
  %65 = tail call { i64, i1 } @llvm.sadd.with.overflow.i64(i64 %64, i64 -48)
  %66 = extractvalue { i64, i1 } %65, 0
  %67 = extractvalue { i64, i1 } %65, 1
  br i1 %67, label %76, label %31, !prof !7

.loopexit:                                        ; preds = %51, %14
  %68 = phi %Ts28__ContiguousArrayStorageBaseC* [ %12, %14 ], [ %52, %51 ]
  ret %Ts28__ContiguousArrayStorageBaseC* %68

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

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

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

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

73:                                               ; preds = %.preheader
  tail call void asm sideeffect "", "n"(i32 4) #9
  tail call void @llvm.trap()
  unreachable

74:                                               ; preds = %55
  tail call void asm sideeffect "", "n"(i32 6) #9
  tail call void @llvm.trap()
  unreachable

75:                                               ; preds = %58
  tail call void asm sideeffect "", "n"(i32 7) #9
  tail call void @llvm.trap()
  unreachable

76:                                               ; preds = %63
  tail call void asm sideeffect "", "n"(i32 8) #9
  tail call void @llvm.trap()
  unreachable

77:                                               ; preds = %38
  tail call void asm sideeffect "", "n"(i32 9) #9
  tail call void @llvm.trap()
  unreachable
}

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

; Function Attrs: mustprogress nofree norecurse nosync nounwind readnone willreturn
define hidden swiftcc i64 @"$s7llvm_O310scanString9maxLengthSSSi_tFfA_"() local_unnamed_addr #2 {
entry:
  ret i64 255
}

; Function Attrs: sspreq
define hidden swiftcc { i64, %swift.bridge* } @"$s7llvm_O310scanString9maxLengthSSSi_tF"(i64 %0) local_unnamed_addr #3 {
entry:
  %reference.raw22 = alloca [72 x i8], align 8
  %reference.raw1 = alloca %Ts15__VaListBuilderC, align 8
  %1 = alloca %TSS, align 8
  %2 = alloca %TSi, align 8
  %3 = tail call { i64, i1 } @llvm.sadd.with.overflow.i64(i64 %0, i64 1)
  %4 = extractvalue { i64, i1 } %3, 1
  br i1 %4, label %80, label %5, !prof !7

5:                                                ; preds = %entry
  %6 = extractvalue { i64, i1 } %3, 0
  %7 = tail call noalias i8* @swift_slowAlloc(i64 %6, i64 -1) #9
  %8 = tail call %swift.type* @__swift_instantiateConcreteTypeFromMangledName({ i32, i32 }* nonnull @"$ss23_ContiguousArrayStorageCys7CVarArg_pGMD") #26
  %9 = bitcast [72 x i8]* %reference.raw22 to %swift.refcounted*
  %reference.new = call %swift.refcounted* @swift_initStackObject(%swift.type* %8, %swift.refcounted* nonnull %9) #25
  %10 = getelementptr inbounds %swift.refcounted, %swift.refcounted* %reference.new, i64 1
  %._storage.count._value = bitcast %swift.refcounted* %10 to i64*
  store i64 1, i64* %._storage.count._value, align 8
  %._storage._capacityAndFlags = getelementptr inbounds %swift.refcounted, %swift.refcounted* %reference.new, i64 1, i32 1
  store i64 2, i64* %._storage._capacityAndFlags, align 8
  %11 = getelementptr inbounds %swift.refcounted, %swift.refcounted* %reference.new, i64 2
  %12 = call %swift.type* @__swift_instantiateConcreteTypeFromMangledName({ i32, i32 }* nonnull @"$sSpys4Int8VGMD") #26
  %13 = getelementptr inbounds %swift.refcounted, %swift.refcounted* %reference.new, i64 3, i32 1
  %14 = bitcast i64* %13 to %swift.type**
  store %swift.type* %12, %swift.type** %14, align 8
  %15 = call i8** @"$sSaySSGSayxGSKsWlTm"(i8*** @"$sSpys4Int8VGSpyxGs7CVarArgsWL", { i32, i32 }* @"$sSpys4Int8VGMD", %swift.protocol_conformance_descriptor* @"$sSpyxGs7CVarArgsMc")
  %16 = getelementptr inbounds %swift.refcounted, %swift.refcounted* %reference.new, i64 4
  %17 = bitcast %swift.refcounted* %16 to i8***
  store i8** %15, i8*** %17, align 8
  %._rawValue = bitcast %swift.refcounted* %11 to i8**
  store i8* %7, i8** %._rawValue, align 8
  %18 = call swiftcc %swift.metadata_response @"$ss15__VaListBuilderCMa"(i64 0) #27
  %19 = extractvalue %swift.metadata_response %18, 0
  %20 = getelementptr inbounds %Ts15__VaListBuilderC, %Ts15__VaListBuilderC* %reference.raw1, i64 0, i32 0
  %reference.new2 = call %swift.refcounted* @swift_initStackObject(%swift.type* %19, %swift.refcounted* nonnull %20) #25
  %21 = getelementptr inbounds %swift.refcounted, %swift.refcounted* %reference.new2, i64 1
  %22 = getelementptr inbounds %swift.refcounted, %swift.refcounted* %reference.new2, i64 2
  %23 = bitcast %swift.refcounted* %22 to %Ts15__VaListBuilderC6HeaderV*
  %24 = bitcast %swift.refcounted* %21 to i8*
  call void @llvm.memset.p0i8.i64(i8* noundef nonnull align 8 dereferenceable(16) %24, i8 0, i64 16, i1 false)
  %25 = call swiftcc i64 @"$ss17_countGPRegistersSivg"()
  %26 = shl i64 %25, 3
  %27 = add i64 %25, -1152921504606846976
  %28 = icmp ult i64 %27, -2305843009213693952
  br i1 %28, label %81, label %29, !prof !7

29:                                               ; preds = %5
  %30 = icmp slt i64 %26, 0
  br i1 %30, label %82, label %31, !prof !7

31:                                               ; preds = %29
  %32 = icmp ugt i64 %26, 4294967295
  br i1 %32, label %83, label %33, !prof !7

33:                                               ; preds = %31
  %34 = trunc i64 %26 to i32
  %.gp_offset._value = bitcast %swift.refcounted* %22 to i32*
  store i32 0, i32* %.gp_offset._value, align 8
  %.fp_offset._value = getelementptr inbounds %Ts15__VaListBuilderC6HeaderV, %Ts15__VaListBuilderC6HeaderV* %23, i64 0, i32 1, i32 0
  store i32 %34, i32* %.fp_offset._value, align 4
  %.overflow_arg_area = getelementptr inbounds %swift.refcounted, %swift.refcounted* %reference.new2, i64 2, i32 1
  %35 = getelementptr inbounds %swift.refcounted, %swift.refcounted* %reference.new2, i64 4
  %._buffer._storage = bitcast %swift.refcounted* %35 to %Ts28__ContiguousArrayStorageBaseC**
  %36 = bitcast i64* %.overflow_arg_area to i8*
  call void @llvm.memset.p0i8.i64(i8* noundef nonnull align 8 dereferenceable(16) %36, i8 0, i64 16, i1 false)
  store %Ts28__ContiguousArrayStorageBaseC* bitcast (%struct._SwiftEmptyArrayStorage* @_swiftEmptyArrayStorage to %Ts28__ContiguousArrayStorageBaseC*), %Ts28__ContiguousArrayStorageBaseC** %._buffer._storage, align 8
  %37 = call swiftcc i64 @"$ss18_registerSaveWordsSivg"()
  %38 = icmp slt i64 %37, 0
  br i1 %38, label %84, label %39, !prof !7

39:                                               ; preds = %33
  %.not = icmp eq i64 %37, 0
  br i1 %.not, label %.thread, label %.thread.loopexit

.thread.loopexit:                                 ; preds = %39
  %40 = call swiftcc %Ts28__ContiguousArrayStorageBaseC* @"$ss15ContiguousArrayV28_allocateBufferUninitialized15minimumCapacitys01_abD0VyxGSi_tFZ"(i64 %37, %swift.type* nonnull @"$sSiN")
  %._storage18.count._value = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %40, i64 0, i32 1, i32 0, i32 0, i32 0
  store i64 %37, i64* %._storage18.count._value, align 8
  %41 = getelementptr %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %40, i64 1
  %42 = bitcast %Ts28__ContiguousArrayStorageBaseC* %41 to i8*
  %43 = shl nuw i64 %37, 3
  call void @llvm.memset.p0i8.i64(i8* align 8 %42, i8 0, i64 %43, i1 false)
  br label %.thread

.thread:                                          ; preds = %.thread.loopexit, %39
  %44 = phi %Ts28__ContiguousArrayStorageBaseC* [ bitcast (%struct._SwiftEmptyArrayStorage* @_swiftEmptyArrayStorage to %Ts28__ContiguousArrayStorageBaseC*), %39 ], [ %40, %.thread.loopexit ]
  %.reg_save_area = getelementptr inbounds %swift.refcounted, %swift.refcounted* %reference.new2, i64 3
  %45 = bitcast %swift.refcounted* %.reg_save_area to i64*
  %46 = bitcast %swift.refcounted* %reference.new2 to %Ts15__VaListBuilderC*
  %tailaddr = bitcast %swift.refcounted* %11 to %Ts7CVarArgP*
  %47 = getelementptr inbounds %swift.refcounted, %swift.refcounted* %reference.new2, i64 3, i32 1
  %._buffer6._storage = bitcast i64* %47 to %Ts28__ContiguousArrayStorageBaseC**
  store %Ts28__ContiguousArrayStorageBaseC* %44, %Ts28__ContiguousArrayStorageBaseC** %._buffer6._storage, align 8
  call swiftcc void @"$ss15__VaListBuilderC6appendyys7CVarArg_pF"(%Ts7CVarArgP* noalias nocapture nonnull dereferenceable(40) %tailaddr, %Ts15__VaListBuilderC* swiftself %46)
  %48 = bitcast i64* %47 to i8**
  %49 = load i8*, i8** %48, align 8
  %50 = getelementptr inbounds i8, i8* %49, i64 32
  %tailaddr9 = bitcast i8* %50 to %TSi*
  %51 = ptrtoint i8* %50 to i64
  store i64 %51, i64* %45, align 8
  %52 = getelementptr inbounds %TSi, %TSi* %tailaddr9, i64 %37
  %53 = ptrtoint %TSi* %52 to i64
  store i64 %53, i64* %.overflow_arg_area, align 8
  %54 = load i64, i64* bitcast (%TSpySo8_IO_FILEVGSg* @"$s7llvm_O35INPUTSpySo8_IO_FILEVGSgvp" to i64*), align 8
  %55 = bitcast %TSS* %1 to i8*
  call void @llvm.lifetime.start.p0i8(i64 16, i8* nonnull %55)
  %._guts._object._countAndFlagsBits._value = getelementptr inbounds %TSS, %TSS* %1, i64 0, i32 0, i32 0, i32 0, i32 0
  store i64 37, i64* %._guts._object._countAndFlagsBits._value, align 8
  %._guts._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** %._guts._object._object, align 8
  %56 = bitcast %TSi* %2 to i8*
  call void @llvm.lifetime.start.p0i8(i64 8, i8* nonnull %56)
  %._value12 = getelementptr inbounds %TSi, %TSi* %2, i64 0, i32 0
  store i64 %0, i64* %._value12, align 8
  %57 = bitcast %TSi* %2 to %swift.opaque*
  %58 = call swiftcc { i64, %swift.bridge* } @"$ss23CustomStringConvertibleP11descriptionSSvgTj"(%swift.opaque* noalias nocapture nonnull swiftself %57, %swift.type* nonnull @"$sSiN", i8** nonnull @"$sSis23CustomStringConvertiblesWP")
  %59 = extractvalue { i64, %swift.bridge* } %58, 0
  %60 = extractvalue { i64, %swift.bridge* } %58, 1
  call swiftcc void @"$sSS6appendyySSF"(i64 %59, %swift.bridge* %60, %TSS* nocapture nonnull swiftself dereferenceable(16) %1)
  call void @swift_bridgeObjectRelease(%swift.bridge* %60) #9
  call void @llvm.lifetime.end.p0i8(i64 8, i8* nonnull %56)
  call swiftcc void @"$sSS6appendyySSF"(i64 115, %swift.bridge* nonnull inttoptr (i64 -2233785415175766016 to %swift.bridge*), %TSS* nocapture nonnull swiftself dereferenceable(16) %1)
  %61 = load i64, i64* %._guts._object._countAndFlagsBits._value, align 8
  %62 = load %swift.bridge*, %swift.bridge** %._guts._object._object, align 8
  call void @llvm.lifetime.end.p0i8(i64 16, i8* nonnull %55)
  %63 = call swiftcc %Ts28__ContiguousArrayStorageBaseC* @"$sSS11utf8CStrings15ContiguousArrayVys4Int8VGvg"(i64 %61, %swift.bridge* %62)
  call void @swift_bridgeObjectRelease(%swift.bridge* %62) #9
  %64 = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %63, i64 1
  %65 = bitcast %Ts28__ContiguousArrayStorageBaseC* %64 to i8*
  %66 = inttoptr i64 %54 to %struct._IO_FILE*
  %67 = bitcast %swift.refcounted* %22 to %struct.__va_list_tag*
  %68 = call i32 @__isoc99_vfscanf(%struct._IO_FILE* %66, i8* nonnull %65, %struct.__va_list_tag* nonnull %67)
  %69 = getelementptr %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %63, i64 0, i32 0
  call void @swift_release(%swift.refcounted* %69) #9
  call void @swift_setDeallocating(%swift.refcounted* nonnull %reference.new2) #9
  %70 = load %Ts28__ContiguousArrayStorageBaseC*, %Ts28__ContiguousArrayStorageBaseC** %._buffer6._storage, align 8
  %71 = getelementptr %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %70, i64 0, i32 0
  call void @swift_release(%swift.refcounted* %71) #9
  %72 = load %Ts28__ContiguousArrayStorageBaseC*, %Ts28__ContiguousArrayStorageBaseC** %._buffer._storage, align 8
  %73 = getelementptr %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %72, i64 0, i32 0
  call void @swift_release(%swift.refcounted* %73) #9
  %74 = bitcast %swift.refcounted* %reference.new2 to i8*
  call void @llvm.lifetime.end.p0i8(i64 -1, i8* %74)
  call void @swift_setDeallocating(%swift.refcounted* nonnull %reference.new) #9
  %75 = bitcast %swift.refcounted* %reference.new to i8*
  %76 = load i64, i64* %._storage.count._value, align 8, !range !6
  %77 = call %swift.type* @__swift_instantiateConcreteTypeFromMangledName({ i32, i32 }* nonnull @"$ss7CVarArg_pMD") #26
  %78 = bitcast %swift.refcounted* %11 to %swift.opaque*
  call void @swift_arrayDestroy(%swift.opaque* nonnull %78, i64 %76, %swift.type* %77) #9
  call void @llvm.lifetime.end.p0i8(i64 -1, i8* %75)
  %79 = call swiftcc { i64, %swift.bridge* } @"$sSS7cStringSSSPys4Int8VG_tcfC"(i8* %7)
  ret { i64, %swift.bridge* } %79

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

81:                                               ; preds = %5
  call void asm sideeffect "", "n"(i32 1) #9
  call void @llvm.trap()
  unreachable

82:                                               ; preds = %29
  call void asm sideeffect "", "n"(i32 2) #9
  call void @llvm.trap()
  unreachable

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

84:                                               ; preds = %33
  call void asm sideeffect "", "n"(i32 4) #9
  call void @llvm.trap()
  unreachable
}

; Function Attrs: argmemonly mustprogress nofree norecurse nosync nounwind readonly willreturn
define hidden swiftcc i64 @"$s7llvm_O311FenwickTreeV5countSivg"(%swift.type* nocapture readnone %"FenwickTree<Element>", %T7llvm_O311FenwickTreeV* noalias nocapture readonly swiftself %0) local_unnamed_addr #4 {
entry:
  %.count._value = getelementptr inbounds %T7llvm_O311FenwickTreeV, %T7llvm_O311FenwickTreeV* %0, i64 0, i32 0, i32 0
  %1 = load i64, i64* %.count._value, align 8
  ret i64 %1
}

define hidden swiftcc void @"$s7llvm_O311FenwickTreeV5count12defaultValue5addBy06removeI0ACyxGSi_xxx_xtcxx_xtctcfC"(%swift.opaque* noalias nocapture sret(%swift.opaque) %0, i64 %1, %swift.opaque* noalias nocapture %2, i8* %3, %swift.refcounted* %4, i8* %5, %swift.refcounted* %6, %swift.type* %Element) local_unnamed_addr #0 {
entry:
  %7 = tail call swiftcc %Ts28__ContiguousArrayStorageBaseC* @"$sSa9repeating5countSayxGx_SitcfCTf4gnn_n"(%swift.opaque* noalias nocapture %2, i64 %1, %swift.type* %Element)
  %8 = tail call swiftcc %swift.metadata_response @"$s7llvm_O311FenwickTreeVMa"(i64 0, %swift.type* %Element) #27
  %9 = extractvalue %swift.metadata_response %8, 0
  %10 = bitcast %swift.type* %9 to i32*
  %11 = getelementptr inbounds %swift.type, %swift.type* %9, i64 4
  %12 = bitcast %swift.type* %11 to i32*
  %13 = load i32, i32* %12, align 8
  %14 = bitcast %swift.opaque* %0 to i8*
  %15 = sext i32 %13 to i64
  %16 = getelementptr inbounds i8, i8* %14, i64 %15
  %.tree._buffer._storage = bitcast i8* %16 to %Ts28__ContiguousArrayStorageBaseC**
  store %Ts28__ContiguousArrayStorageBaseC* %7, %Ts28__ContiguousArrayStorageBaseC** %.tree._buffer._storage, align 8
  %.count._value = bitcast %swift.opaque* %0 to i64*
  store i64 %1, i64* %.count._value, align 8
  %17 = getelementptr inbounds i32, i32* %10, i64 7
  %18 = load i32, i32* %17, align 8
  %19 = sext i32 %18 to i64
  %20 = getelementptr inbounds i8, i8* %14, i64 %19
  %.defaultValue = bitcast i8* %20 to %swift.opaque*
  %21 = getelementptr inbounds %swift.type, %swift.type* %Element, i64 -1
  %22 = bitcast %swift.type* %21 to i8***
  %Element.valueWitnesses = load i8**, i8*** %22, align 8, !invariant.load !12, !dereferenceable !13
  %23 = getelementptr inbounds i8*, i8** %Element.valueWitnesses, i64 4
  %24 = bitcast i8** %23 to %swift.opaque* (%swift.opaque*, %swift.opaque*, %swift.type*)**
  %25 = load %swift.opaque* (%swift.opaque*, %swift.opaque*, %swift.type*)*, %swift.opaque* (%swift.opaque*, %swift.opaque*, %swift.type*)** %24, align 8, !invariant.load !12
  %26 = tail call %swift.opaque* %25(%swift.opaque* noalias %.defaultValue, %swift.opaque* noalias %2, %swift.type* %Element) #9
  %27 = getelementptr inbounds i32, i32* %10, i64 9
  %28 = load i32, i32* %27, align 8
  %29 = sext i32 %28 to i64
  %30 = getelementptr inbounds i8, i8* %14, i64 %29
  %.combine.fn = bitcast i8* %30 to i8**
  store i8* %3, i8** %.combine.fn, align 8
  %.combine.data = getelementptr inbounds i8, i8* %30, i64 8
  %31 = bitcast i8* %.combine.data to %swift.refcounted**
  store %swift.refcounted* %4, %swift.refcounted** %31, align 8
  %32 = getelementptr inbounds %swift.type, %swift.type* %9, i64 5
  %33 = bitcast %swift.type* %32 to i32*
  %34 = load i32, i32* %33, align 8
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds i8, i8* %14, i64 %35
  %.inverse.fn = bitcast i8* %36 to i8**
  store i8* %5, i8** %.inverse.fn, align 8
  %.inverse.data = getelementptr inbounds i8, i8* %36, i64 8
  %37 = bitcast i8* %.inverse.data to %swift.refcounted**
  store %swift.refcounted* %6, %swift.refcounted** %37, align 8
  ret void
}

define linkonce_odr hidden swiftcc void @"$s7llvm_O311FenwickTreeV6update2at6addingySi_xtFSi_Tg5"(i64 %0, i64 %1, %T7llvm_O311FenwickTreeVySiG* nocapture swiftself dereferenceable(56) %2) local_unnamed_addr #0 {
entry:
  %3 = alloca %TSi, align 8
  %4 = alloca %TSi, align 8
  %5 = alloca %TSi, align 8
  %6 = alloca %TSi, align 8
  %7 = alloca %TSi, align 8
  %8 = bitcast %TSi* %3 to i8*
  call void @llvm.lifetime.start.p0i8(i64 8, i8* nonnull %8)
  %._value = getelementptr inbounds %TSi, %TSi* %3, i64 0, i32 0
  store i64 %1, i64* %._value, align 8
  %9 = icmp eq i64 %0, 0
  %.combine8 = getelementptr inbounds %T7llvm_O311FenwickTreeVySiG, %T7llvm_O311FenwickTreeVySiG* %2, i64 0, i32 3
  %.tree9._buffer._storage = getelementptr inbounds %T7llvm_O311FenwickTreeVySiG, %T7llvm_O311FenwickTreeVySiG* %2, i64 0, i32 2, i32 0, i32 0
  br i1 %9, label %10, label %32

10:                                               ; preds = %entry
  %11 = bitcast %swift.function* %.combine8 to void (%TSi*, %TSi*, %TSi*, %swift.refcounted*)**
  %12 = load void (%TSi*, %TSi*, %TSi*, %swift.refcounted*)*, void (%TSi*, %TSi*, %TSi*, %swift.refcounted*)** %11, align 8
  %.combine8.data = getelementptr inbounds %T7llvm_O311FenwickTreeVySiG, %T7llvm_O311FenwickTreeVySiG* %2, i64 0, i32 3, i32 1
  %13 = load %swift.refcounted*, %swift.refcounted** %.combine8.data, align 8
  %14 = bitcast %TSi* %6 to i8*
  call void @llvm.lifetime.start.p0i8(i64 8, i8* nonnull %14)
  %15 = load %Ts28__ContiguousArrayStorageBaseC*, %Ts28__ContiguousArrayStorageBaseC** %.tree9._buffer._storage, align 8
  %16 = bitcast %TSi* %7 to i8*
  call void @llvm.lifetime.start.p0i8(i64 8, i8* nonnull %16)
  %._storage10.count._value = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %15, i64 0, i32 1, i32 0, i32 0, i32 0
  %17 = load i64, i64* %._storage10.count._value, align 8, !range !6
  %.not20 = icmp eq i64 %17, 0
  br i1 %.not20, label %71, label %18, !prof !7

18:                                               ; preds = %10
  %19 = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %15, i64 1
  %tailaddr11._value = bitcast %Ts28__ContiguousArrayStorageBaseC* %19 to i64*
  %20 = load i64, i64* %tailaddr11._value, align 8
  %._value12 = getelementptr inbounds %TSi, %TSi* %7, i64 0, i32 0
  store i64 %20, i64* %._value12, align 8
  %21 = tail call %swift.refcounted* @swift_retain(%swift.refcounted* returned %13) #25
  call swiftcc void %12(%TSi* noalias nocapture nonnull sret(%TSi) %6, %TSi* noalias nocapture nonnull dereferenceable(8) %7, %TSi* noalias nocapture nonnull dereferenceable(8) %3, %swift.refcounted* swiftself %13)
  tail call void @swift_release(%swift.refcounted* %13) #9
  call void @llvm.lifetime.end.p0i8(i64 8, i8* nonnull %16)
  %22 = getelementptr %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %15, i64 0, i32 0
  %23 = tail call zeroext i1 @swift_isUniquelyReferenced_nonNull_native(%swift.refcounted* %22) #25
  br i1 %23, label %26, label %24

24:                                               ; preds = %18
  %25 = tail call swiftcc %Ts28__ContiguousArrayStorageBaseC* @"$ss22_ContiguousArrayBufferV20_consumeAndCreateNewAByxGyFSi_Tg5"(%Ts28__ContiguousArrayStorageBaseC* nonnull %15)
  br label %26

26:                                               ; preds = %18, %24
  %27 = phi %Ts28__ContiguousArrayStorageBaseC* [ %25, %24 ], [ %15, %18 ]
  %._storage13.count._value = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %27, i64 0, i32 1, i32 0, i32 0, i32 0
  %28 = load i64, i64* %._storage13.count._value, align 8, !range !6
  %.not21 = icmp eq i64 %28, 0
  br i1 %.not21, label %72, label %29, !prof !7

29:                                               ; preds = %26
  %30 = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %27, i64 1
  %._value15 = getelementptr inbounds %TSi, %TSi* %6, i64 0, i32 0
  %31 = load i64, i64* %._value15, align 8
  %tailaddr14._value = bitcast %Ts28__ContiguousArrayStorageBaseC* %30 to i64*
  store i64 %31, i64* %tailaddr14._value, align 8
  store %Ts28__ContiguousArrayStorageBaseC* %27, %Ts28__ContiguousArrayStorageBaseC** %.tree9._buffer._storage, align 8
  call void @llvm.lifetime.end.p0i8(i64 8, i8* nonnull %14)
  br label %47

32:                                               ; preds = %entry
  %.count._value = getelementptr inbounds %T7llvm_O311FenwickTreeVySiG, %T7llvm_O311FenwickTreeVySiG* %2, i64 0, i32 0, i32 0
  %33 = bitcast %swift.function* %.combine8 to void (%TSi*, %TSi*, %TSi*, %swift.refcounted*)**
  %34 = load void (%TSi*, %TSi*, %TSi*, %swift.refcounted*)*, void (%TSi*, %TSi*, %TSi*, %swift.refcounted*)** %33, align 8
  %.combine.data = getelementptr inbounds %T7llvm_O311FenwickTreeVySiG, %T7llvm_O311FenwickTreeVySiG* %2, i64 0, i32 3, i32 1
  %35 = load %swift.refcounted*, %swift.refcounted** %.combine.data, align 8
  %36 = load i64, i64* %.count._value, align 8
  %37 = load %Ts28__ContiguousArrayStorageBaseC*, %Ts28__ContiguousArrayStorageBaseC** %.tree9._buffer._storage, align 8
  %38 = getelementptr %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %37, i64 0, i32 0
  %39 = tail call zeroext i1 @swift_isUniquelyReferenced_nonNull_native(%swift.refcounted* %38) #25
  br i1 %39, label %42, label %40

40:                                               ; preds = %32
  %41 = tail call swiftcc %Ts28__ContiguousArrayStorageBaseC* @"$ss22_ContiguousArrayBufferV20_consumeAndCreateNewAByxGyFSi_Tg5"(%Ts28__ContiguousArrayStorageBaseC* %37)
  br label %42

42:                                               ; preds = %32, %40
  %43 = phi %Ts28__ContiguousArrayStorageBaseC* [ %41, %40 ], [ %37, %32 ]
  %44 = bitcast %TSi* %4 to i8*
  %45 = bitcast %TSi* %5 to i8*
  %._storage.count._value = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %43, i64 0, i32 1, i32 0, i32 0, i32 0
  %46 = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %43, i64 1
  %tailaddr = bitcast %Ts28__ContiguousArrayStorageBaseC* %46 to %TSi*
  %._value2 = getelementptr inbounds %TSi, %TSi* %5, i64 0, i32 0
  %._value5 = getelementptr inbounds %TSi, %TSi* %4, i64 0, i32 0
  br label %48

47:                                               ; preds = %29, %66
  call void @llvm.lifetime.end.p0i8(i64 8, i8* nonnull %8)
  ret void

48:                                               ; preds = %63, %42
  %49 = phi i64 [ %0, %42 ], [ %64, %63 ]
  call void @llvm.lifetime.start.p0i8(i64 8, i8* nonnull %44)
  call void @llvm.lifetime.start.p0i8(i64 8, i8* nonnull %45)
  %50 = icmp slt i64 %49, 0
  br i1 %50, label %67, label %51, !prof !7

51:                                               ; preds = %48
  %52 = load i64, i64* %._storage.count._value, align 8, !range !6
  %.not = icmp ult i64 %49, %52
  br i1 %.not, label %53, label %68, !prof !8

53:                                               ; preds = %51
  %._value1 = getelementptr inbounds %TSi, %TSi* %tailaddr, i64 %49, i32 0
  %54 = load i64, i64* %._value1, align 8
  store i64 %54, i64* %._value2, align 8
  %55 = tail call %swift.refcounted* @swift_retain(%swift.refcounted* returned %35) #25
  call swiftcc void %34(%TSi* noalias nocapture nonnull sret(%TSi) %4, %TSi* noalias nocapture nonnull dereferenceable(8) %5, %TSi* noalias nocapture nonnull dereferenceable(8) %3, %swift.refcounted* swiftself %35)
  tail call void @swift_release(%swift.refcounted* %35) #9
  call void @llvm.lifetime.end.p0i8(i64 8, i8* nonnull %45)
  %56 = load i64, i64* %._storage.count._value, align 8, !range !6
  %.not19 = icmp ult i64 %49, %56
  br i1 %.not19, label %57, label %69, !prof !8

57:                                               ; preds = %53
  %58 = load i64, i64* %._value5, align 8
  store i64 %58, i64* %._value1, align 8
  call void @llvm.lifetime.end.p0i8(i64 8, i8* nonnull %44)
  %59 = sub nsw i64 0, %49
  %60 = and i64 %49, %59
  %61 = tail call { i64, i1 } @llvm.sadd.with.overflow.i64(i64 %49, i64 %60)
  %62 = extractvalue { i64, i1 } %61, 1
  br i1 %62, label %70, label %63, !prof !7

63:                                               ; preds = %57
  %64 = extractvalue { i64, i1 } %61, 0
  %65 = icmp slt i64 %64, %36
  br i1 %65, label %48, label %66

66:                                               ; preds = %63
  store %Ts28__ContiguousArrayStorageBaseC* %43, %Ts28__ContiguousArrayStorageBaseC** %.tree9._buffer._storage, align 8
  br label %47

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

68:                                               ; preds = %51
  tail call void asm sideeffect "", "n"(i32 1) #9
  tail call void @llvm.trap()
  unreachable

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

70:                                               ; preds = %57
  tail call void asm sideeffect "", "n"(i32 4) #9
  tail call void @llvm.trap()
  unreachable

71:                                               ; preds = %10
  tail call void asm sideeffect "", "n"(i32 5) #9
  tail call void @llvm.trap()
  unreachable

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

define hidden swiftcc void @"$s7llvm_O311FenwickTreeV6update2at6addingySi_xtF"(i64 %0, %swift.opaque* noalias nocapture %1, %swift.type* nocapture readonly %"FenwickTree<Element>", %T7llvm_O311FenwickTreeV* nocapture swiftself %2) local_unnamed_addr #0 {
entry:
  %3 = getelementptr inbounds %swift.type, %swift.type* %"FenwickTree<Element>", i64 2
  %4 = bitcast %swift.type* %3 to %swift.type**
  %Element = load %swift.type*, %swift.type** %4, align 8, !invariant.load !12
  %5 = getelementptr inbounds %swift.type, %swift.type* %Element, i64 -1
  %6 = bitcast %swift.type* %5 to i8***
  %Element.valueWitnesses = load i8**, i8*** %6, align 8, !invariant.load !12, !dereferenceable !13
  %7 = getelementptr inbounds i8*, i8** %Element.valueWitnesses, i64 8
  %8 = bitcast i8** %7 to i64*
  %size = load i64, i64* %8, align 8, !invariant.load !12
  %9 = alloca i8, i64 %size, align 16
  call void @llvm.lifetime.start.p0i8(i64 -1, i8* nonnull %9)
  %10 = bitcast i8* %9 to %swift.opaque*
  %11 = alloca i8, i64 %size, align 16
  call void @llvm.lifetime.start.p0i8(i64 -1, i8* nonnull %11)
  %12 = bitcast i8* %11 to %swift.opaque*
  %13 = icmp eq i64 %0, 0
  %14 = bitcast %swift.type* %"FenwickTree<Element>" to i32*
  %15 = getelementptr inbounds i32, i32* %14, i64 9
  %16 = load i32, i32* %15, align 8
  %17 = bitcast %T7llvm_O311FenwickTreeV* %2 to i8*
  %18 = sext i32 %16 to i64
  %19 = getelementptr inbounds i8, i8* %17, i64 %18
  br i1 %13, label %20, label %52

20:                                               ; preds = %entry
  %21 = bitcast i8* %19 to void (%swift.opaque*, %swift.opaque*, %swift.opaque*, %swift.refcounted*)**
  %22 = load void (%swift.opaque*, %swift.opaque*, %swift.opaque*, %swift.refcounted*)*, void (%swift.opaque*, %swift.opaque*, %swift.opaque*, %swift.refcounted*)** %21, align 8
  %.combine2.data = getelementptr inbounds i8, i8* %19, i64 8
  %23 = bitcast i8* %.combine2.data to %swift.refcounted**
  %24 = load %swift.refcounted*, %swift.refcounted** %23, align 8
  %25 = getelementptr inbounds %swift.type, %swift.type* %"FenwickTree<Element>", i64 4
  %26 = bitcast %swift.type* %25 to i32*
  %27 = load i32, i32* %26, align 8
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds i8, i8* %17, i64 %28
  %.tree3 = bitcast i8* %29 to %TSa*
  %.tree3._buffer._storage = bitcast i8* %29 to %Ts28__ContiguousArrayStorageBaseC**
  %30 = load %Ts28__ContiguousArrayStorageBaseC*, %Ts28__ContiguousArrayStorageBaseC** %.tree3._buffer._storage, align 8
  %31 = tail call %swift.refcounted* @swift_retain(%swift.refcounted* returned %24) #25
  call swiftcc void @"$sSayxSicig"(%swift.opaque* noalias nocapture nonnull sret(%swift.opaque) %10, i64 0, %Ts28__ContiguousArrayStorageBaseC* %30, %swift.type* nonnull %Element)
  call swiftcc void %22(%swift.opaque* noalias nocapture nonnull sret(%swift.opaque) %12, %swift.opaque* noalias nocapture nonnull %10, %swift.opaque* noalias nocapture %1, %swift.refcounted* swiftself %24)
  %32 = getelementptr inbounds i8*, i8** %Element.valueWitnesses, i64 1
  %33 = bitcast i8** %32 to void (%swift.opaque*, %swift.type*)**
  %34 = load void (%swift.opaque*, %swift.type*)*, void (%swift.opaque*, %swift.type*)** %33, align 8, !invariant.load !12
  call void %34(%swift.opaque* noalias nonnull %10, %swift.type* nonnull %Element) #9
  call void @swift_release(%swift.refcounted* %24) #9
  %35 = call swiftcc %swift.metadata_response @"$sSaMa"(i64 0, %swift.type* nonnull %Element) #27
  %36 = extractvalue %swift.metadata_response %35, 0
  call swiftcc void @"$sSa21_makeMutableAndUniqueyyF"(%swift.type* %36, %TSa* nocapture swiftself dereferenceable(8) %.tree3)
  %37 = load %Ts28__ContiguousArrayStorageBaseC*, %Ts28__ContiguousArrayStorageBaseC** %.tree3._buffer._storage, align 8
  %._storage.count._value.i = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %37, i64 0, i32 1, i32 0, i32 0, i32 0
  %38 = load i64, i64* %._storage.count._value.i, align 8, !range !6
  %.not.i.not = icmp eq i64 %38, 0
  br i1 %.not.i.not, label %39, label %"$sSa24_checkSubscript_mutatingyySiF.exit", !prof !7

39:                                               ; preds = %20
  call void asm sideeffect "", "n"(i32 1) #9
  call void @llvm.trap()
  unreachable

"$sSa24_checkSubscript_mutatingyySiF.exit":       ; preds = %20
  %40 = getelementptr inbounds i8*, i8** %Element.valueWitnesses, i64 10
  %41 = bitcast i8** %40 to i32*
  %flags6 = load i32, i32* %41, align 8, !invariant.load !12
  %42 = and i32 %flags6, 255
  %flags6.alignmentMask = zext i32 %42 to i64
  %43 = add nuw nsw i64 %flags6.alignmentMask, 32
  %44 = xor i64 %flags6.alignmentMask, -1
  %45 = and i64 %43, %44
  %46 = bitcast %Ts28__ContiguousArrayStorageBaseC* %37 to i8*
  %47 = getelementptr inbounds i8, i8* %46, i64 %45
  %tailaddr7 = bitcast i8* %47 to %swift.opaque*
  %48 = getelementptr inbounds i8*, i8** %Element.valueWitnesses, i64 5
  %49 = bitcast i8** %48 to %swift.opaque* (%swift.opaque*, %swift.opaque*, %swift.type*)**
  %50 = load %swift.opaque* (%swift.opaque*, %swift.opaque*, %swift.type*)*, %swift.opaque* (%swift.opaque*, %swift.opaque*, %swift.type*)** %49, align 8, !invariant.load !12
  %51 = call %swift.opaque* %50(%swift.opaque* noalias %tailaddr7, %swift.opaque* noalias nonnull %12, %swift.type* nonnull %Element) #9
  br label %.loopexit

52:                                               ; preds = %entry
  %53 = getelementptr inbounds %swift.type, %swift.type* %"FenwickTree<Element>", i64 4
  %54 = bitcast %swift.type* %53 to i32*
  %55 = load i32, i32* %54, align 8
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds i8, i8* %17, i64 %56
  %.tree = bitcast i8* %57 to %TSa*
  %.count._value = getelementptr inbounds %T7llvm_O311FenwickTreeV, %T7llvm_O311FenwickTreeV* %2, i64 0, i32 0, i32 0
  %58 = bitcast i8* %19 to void (%swift.opaque*, %swift.opaque*, %swift.opaque*, %swift.refcounted*)**
  %.combine.data = getelementptr inbounds i8, i8* %19, i64 8
  %59 = bitcast i8* %.combine.data to %swift.refcounted**
  %.tree._buffer._storage = bitcast i8* %57 to %Ts28__ContiguousArrayStorageBaseC**
  %60 = getelementptr inbounds i8*, i8** %Element.valueWitnesses, i64 1
  %61 = bitcast i8** %60 to void (%swift.opaque*, %swift.type*)**
  %62 = getelementptr inbounds i8*, i8** %Element.valueWitnesses, i64 10
  %63 = bitcast i8** %62 to i32*
  %64 = getelementptr inbounds i8*, i8** %Element.valueWitnesses, i64 9
  %65 = bitcast i8** %64 to i64*
  %66 = getelementptr inbounds i8*, i8** %Element.valueWitnesses, i64 5
  %67 = bitcast i8** %66 to %swift.opaque* (%swift.opaque*, %swift.opaque*, %swift.type*)**
  br label %68

68:                                               ; preds = %98, %52
  %69 = phi i64 [ %0, %52 ], [ %99, %98 ]
  %70 = load void (%swift.opaque*, %swift.opaque*, %swift.opaque*, %swift.refcounted*)*, void (%swift.opaque*, %swift.opaque*, %swift.opaque*, %swift.refcounted*)** %58, align 8
  %71 = load %swift.refcounted*, %swift.refcounted** %59, align 8
  %72 = load %Ts28__ContiguousArrayStorageBaseC*, %Ts28__ContiguousArrayStorageBaseC** %.tree._buffer._storage, align 8
  %73 = call %swift.refcounted* @swift_retain(%swift.refcounted* returned %71) #25
  call swiftcc void @"$sSayxSicig"(%swift.opaque* noalias nocapture nonnull sret(%swift.opaque) %10, i64 %69, %Ts28__ContiguousArrayStorageBaseC* %72, %swift.type* %Element)
  call swiftcc void %70(%swift.opaque* noalias nocapture nonnull sret(%swift.opaque) %12, %swift.opaque* noalias nocapture nonnull %10, %swift.opaque* noalias nocapture %1, %swift.refcounted* swiftself %71)
  %74 = load void (%swift.opaque*, %swift.type*)*, void (%swift.opaque*, %swift.type*)** %61, align 8, !invariant.load !12
  call void %74(%swift.opaque* noalias nonnull %10, %swift.type* %Element) #9
  call void @swift_release(%swift.refcounted* %71) #9
  %75 = call swiftcc %swift.metadata_response @"$sSaMa"(i64 0, %swift.type* %Element) #27
  %76 = extractvalue %swift.metadata_response %75, 0
  call swiftcc void @"$sSa21_makeMutableAndUniqueyyF"(%swift.type* %76, %TSa* nocapture swiftself dereferenceable(8) %.tree)
  %77 = load %Ts28__ContiguousArrayStorageBaseC*, %Ts28__ContiguousArrayStorageBaseC** %.tree._buffer._storage, align 8
  %78 = icmp slt i64 %69, 0
  br i1 %78, label %81, label %79, !prof !7

79:                                               ; preds = %68
  %._storage.count._value.i10 = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %77, i64 0, i32 1, i32 0, i32 0, i32 0
  %80 = load i64, i64* %._storage.count._value.i10, align 8, !range !6
  %.not.i11 = icmp ugt i64 %80, %69
  br i1 %.not.i11, label %"$sSa24_checkSubscript_mutatingyySiF.exit12", label %82, !prof !8

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

82:                                               ; preds = %79
  call void asm sideeffect "", "n"(i32 1) #9
  call void @llvm.trap()
  unreachable

"$sSa24_checkSubscript_mutatingyySiF.exit12":     ; preds = %79
  %flags = load i32, i32* %63, align 8, !invariant.load !12
  %83 = and i32 %flags, 255
  %flags.alignmentMask = zext i32 %83 to i64
  %84 = add nuw nsw i64 %flags.alignmentMask, 32
  %85 = xor i64 %flags.alignmentMask, -1
  %86 = and i64 %84, %85
  %87 = bitcast %Ts28__ContiguousArrayStorageBaseC* %77 to i8*
  %88 = getelementptr inbounds i8, i8* %87, i64 %86
  %stride = load i64, i64* %65, align 8, !invariant.load !12
  %89 = mul nsw i64 %stride, %69
  %90 = getelementptr inbounds i8, i8* %88, i64 %89
  %91 = bitcast i8* %90 to %swift.opaque*
  %92 = load %swift.opaque* (%swift.opaque*, %swift.opaque*, %swift.type*)*, %swift.opaque* (%swift.opaque*, %swift.opaque*, %swift.type*)** %67, align 8, !invariant.load !12
  %93 = call %swift.opaque* %92(%swift.opaque* noalias %91, %swift.opaque* noalias nonnull %12, %swift.type* %Element) #9
  %94 = sub nsw i64 0, %69
  %95 = and i64 %69, %94
  %96 = call { i64, i1 } @llvm.sadd.with.overflow.i64(i64 %69, i64 %95)
  %97 = extractvalue { i64, i1 } %96, 1
  br i1 %97, label %102, label %98, !prof !7

98:                                               ; preds = %"$sSa24_checkSubscript_mutatingyySiF.exit12"
  %99 = extractvalue { i64, i1 } %96, 0
  %100 = load i64, i64* %.count._value, align 8
  %101 = icmp slt i64 %99, %100
  br i1 %101, label %68, label %.loopexit

.loopexit:                                        ; preds = %98, %"$sSa24_checkSubscript_mutatingyySiF.exit"
  call void @llvm.lifetime.end.p0i8(i64 -1, i8* nonnull %11)
  call void @llvm.lifetime.end.p0i8(i64 -1, i8* nonnull %9)
  ret void

102:                                              ; preds = %"$sSa24_checkSubscript_mutatingyySiF.exit12"
  call void asm sideeffect "", "n"(i32 1) #9
  call void @llvm.trap()
  unreachable
}

declare swiftcc void @"$sSayxSicig"(%swift.opaque* noalias nocapture sret(%swift.opaque), i64, %Ts28__ContiguousArrayStorageBaseC*, %swift.type*) local_unnamed_addr #0

define hidden swiftcc void @"$s7llvm_O311FenwickTreeV5query5rangexSnySiG_tF"(%swift.opaque* noalias nocapture sret(%swift.opaque) %0, i64 %1, i64 %2, %swift.type* nocapture readonly %"FenwickTree<Element>", %T7llvm_O311FenwickTreeV* noalias nocapture swiftself %3) local_unnamed_addr #0 {
entry:
  %4 = getelementptr inbounds %swift.type, %swift.type* %"FenwickTree<Element>", i64 2
  %5 = bitcast %swift.type* %4 to %swift.type**
  %Element = load %swift.type*, %swift.type** %5, align 8, !invariant.load !12
  %6 = getelementptr inbounds %swift.type, %swift.type* %Element, i64 -1
  %7 = bitcast %swift.type* %6 to i8***
  %Element.valueWitnesses = load i8**, i8*** %7, align 8, !invariant.load !12, !dereferenceable !13
  %8 = getelementptr inbounds i8*, i8** %Element.valueWitnesses, i64 8
  %9 = bitcast i8** %8 to i64*
  %size = load i64, i64* %9, align 8, !invariant.load !12
  %10 = alloca i8, i64 %size, align 16
  call void @llvm.lifetime.start.p0i8(i64 -1, i8* nonnull %10)
  %11 = bitcast i8* %10 to %swift.opaque*
  %12 = alloca i8, i64 %size, align 16
  call void @llvm.lifetime.start.p0i8(i64 -1, i8* nonnull %12)
  %13 = bitcast i8* %12 to %swift.opaque*
  %14 = alloca i8, i64 %size, align 16
  call void @llvm.lifetime.start.p0i8(i64 -1, i8* nonnull %14)
  %15 = bitcast i8* %14 to %swift.opaque*
  %16 = tail call { i64, i1 } @llvm.sadd.with.overflow.i64(i64 %2, i64 -1)
  %17 = extractvalue { i64, i1 } %16, 0
  %18 = extractvalue { i64, i1 } %16, 1
  br i1 %18, label %127, label %19, !prof !7

19:                                               ; preds = %entry
  %20 = tail call { i64, i1 } @llvm.sadd.with.overflow.i64(i64 %1, i64 -1)
  %21 = extractvalue { i64, i1 } %20, 0
  %22 = extractvalue { i64, i1 } %20, 1
  br i1 %22, label %128, label %23, !prof !7

23:                                               ; preds = %19
  %24 = bitcast %swift.type* %"FenwickTree<Element>" to i32*
  %25 = getelementptr inbounds i32, i32* %24, i64 7
  %26 = load i32, i32* %25, align 8
  %27 = bitcast %T7llvm_O311FenwickTreeV* %3 to i8*
  %28 = sext i32 %26 to i64
  %29 = getelementptr inbounds i8, i8* %27, i64 %28
  %.defaultValue = bitcast i8* %29 to %swift.opaque*
  %30 = getelementptr inbounds i8*, i8** %Element.valueWitnesses, i64 2
  %31 = bitcast i8** %30 to %swift.opaque* (%swift.opaque*, %swift.opaque*, %swift.type*)**
  %32 = load %swift.opaque* (%swift.opaque*, %swift.opaque*, %swift.type*)*, %swift.opaque* (%swift.opaque*, %swift.opaque*, %swift.type*)** %31, align 8, !invariant.load !12
  %33 = call %swift.opaque* %32(%swift.opaque* noalias nonnull %15, %swift.opaque* noalias %.defaultValue, %swift.type* nonnull %Element) #9
  %34 = icmp slt i64 %17, 0
  br i1 %34, label %35, label %40

35:                                               ; preds = %23
  %36 = getelementptr inbounds i8*, i8** %Element.valueWitnesses, i64 4
  %37 = bitcast i8** %36 to %swift.opaque* (%swift.opaque*, %swift.opaque*, %swift.type*)**
  %38 = load %swift.opaque* (%swift.opaque*, %swift.opaque*, %swift.type*)*, %swift.opaque* (%swift.opaque*, %swift.opaque*, %swift.type*)** %37, align 8, !invariant.load !12
  %39 = call %swift.opaque* %38(%swift.opaque* noalias %0, %swift.opaque* noalias nonnull %15, %swift.type* nonnull %Element) #9
  br label %126

40:                                               ; preds = %23
  %41 = icmp slt i64 %21, 0
  br i1 %41, label %42, label %64

42:                                               ; preds = %40
  %43 = getelementptr inbounds i32, i32* %24, i64 9
  %44 = load i32, i32* %43, align 8
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds i8, i8* %27, i64 %45
  %47 = bitcast i8* %46 to void (%swift.opaque*, %swift.opaque*, %swift.opaque*, %swift.refcounted*)**
  %48 = load void (%swift.opaque*, %swift.opaque*, %swift.opaque*, %swift.refcounted*)*, void (%swift.opaque*, %swift.opaque*, %swift.opaque*, %swift.refcounted*)** %47, align 8
  %.combine5.data = getelementptr inbounds i8, i8* %46, i64 8
  %49 = bitcast i8* %.combine5.data to %swift.refcounted**
  %50 = load %swift.refcounted*, %swift.refcounted** %49, align 8
  %51 = getelementptr inbounds %swift.type, %swift.type* %"FenwickTree<Element>", i64 4
  %52 = bitcast %swift.type* %51 to i32*
  %53 = load i32, i32* %52, align 8
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds i8, i8* %27, i64 %54
  %.tree6._buffer._storage = bitcast i8* %55 to %Ts28__ContiguousArrayStorageBaseC**
  %56 = load %Ts28__ContiguousArrayStorageBaseC*, %Ts28__ContiguousArrayStorageBaseC** %.tree6._buffer._storage, align 8
  call swiftcc void @"$sSayxSicig"(%swift.opaque* noalias nocapture nonnull sret(%swift.opaque) %11, i64 0, %Ts28__ContiguousArrayStorageBaseC* %56, %swift.type* nonnull %Element)
  call swiftcc void %48(%swift.opaque* noalias nocapture nonnull sret(%swift.opaque) %13, %swift.opaque* noalias nocapture nonnull %15, %swift.opaque* noalias nocapture nonnull %11, %swift.refcounted* swiftself %50)
  %57 = getelementptr inbounds i8*, i8** %Element.valueWitnesses, i64 1
  %58 = bitcast i8** %57 to void (%swift.opaque*, %swift.type*)**
  %59 = load void (%swift.opaque*, %swift.type*)*, void (%swift.opaque*, %swift.type*)** %58, align 8, !invariant.load !12
  call void %59(%swift.opaque* noalias nonnull %11, %swift.type* nonnull %Element) #9
  call void %59(%swift.opaque* noalias nonnull %15, %swift.type* nonnull %Element) #9
  %60 = getelementptr inbounds i8*, i8** %Element.valueWitnesses, i64 4
  %61 = bitcast i8** %60 to %swift.opaque* (%swift.opaque*, %swift.opaque*, %swift.type*)**
  %62 = load %swift.opaque* (%swift.opaque*, %swift.opaque*, %swift.type*)*, %swift.opaque* (%swift.opaque*, %swift.opaque*, %swift.type*)** %61, align 8, !invariant.load !12
  %63 = call %swift.opaque* %62(%swift.opaque* noalias nonnull %15, %swift.opaque* noalias nonnull %13, %swift.type* nonnull %Element) #9
  %.not = icmp eq i64 %17, 0
  br i1 %.not, label %.loopexit, label %._crit_edge

64:                                               ; preds = %40
  %65 = icmp ult i64 %21, %17
  br i1 %65, label %._crit_edge, label %.loopexit16

._crit_edge:                                      ; preds = %64, %42
  %66 = phi i64 [ 0, %42 ], [ %21, %64 ]
  %67 = getelementptr inbounds i32, i32* %24, i64 9
  %68 = load i32, i32* %67, align 8
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds i8, i8* %27, i64 %69
  %71 = getelementptr inbounds %swift.type, %swift.type* %"FenwickTree<Element>", i64 4
  %72 = bitcast %swift.type* %71 to i32*
  %73 = load i32, i32* %72, align 8
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds i8, i8* %27, i64 %74
  %76 = bitcast i8* %70 to void (%swift.opaque*, %swift.opaque*, %swift.opaque*, %swift.refcounted*)**
  %.combine.data = getelementptr inbounds i8, i8* %70, i64 8
  %77 = bitcast i8* %.combine.data to %swift.refcounted**
  %.tree2._buffer._storage = bitcast i8* %75 to %Ts28__ContiguousArrayStorageBaseC**
  %78 = getelementptr inbounds i8*, i8** %Element.valueWitnesses, i64 1
  %79 = bitcast i8** %78 to void (%swift.opaque*, %swift.type*)**
  %80 = getelementptr inbounds i8*, i8** %Element.valueWitnesses, i64 4
  %81 = bitcast i8** %80 to %swift.opaque* (%swift.opaque*, %swift.opaque*, %swift.type*)**
  br label %82

82:                                               ; preds = %82, %._crit_edge
  %83 = phi i64 [ %17, %._crit_edge ], [ %91, %82 ]
  %84 = load void (%swift.opaque*, %swift.opaque*, %swift.opaque*, %swift.refcounted*)*, void (%swift.opaque*, %swift.opaque*, %swift.opaque*, %swift.refcounted*)** %76, align 8
  %85 = load %swift.refcounted*, %swift.refcounted** %77, align 8
  %86 = load %Ts28__ContiguousArrayStorageBaseC*, %Ts28__ContiguousArrayStorageBaseC** %.tree2._buffer._storage, align 8
  call swiftcc void @"$sSayxSicig"(%swift.opaque* noalias nocapture nonnull sret(%swift.opaque) %11, i64 %83, %Ts28__ContiguousArrayStorageBaseC* %86, %swift.type* %Element)
  call swiftcc void %84(%swift.opaque* noalias nocapture nonnull sret(%swift.opaque) %13, %swift.opaque* noalias nocapture nonnull %15, %swift.opaque* noalias nocapture nonnull %11, %swift.refcounted* swiftself %85)
  %87 = load void (%swift.opaque*, %swift.type*)*, void (%swift.opaque*, %swift.type*)** %79, align 8, !invariant.load !12
  call void %87(%swift.opaque* noalias nonnull %11, %swift.type* %Element) #9
  call void %87(%swift.opaque* noalias nonnull %15, %swift.type* %Element) #9
  %88 = load %swift.opaque* (%swift.opaque*, %swift.opaque*, %swift.type*)*, %swift.opaque* (%swift.opaque*, %swift.opaque*, %swift.type*)** %81, align 8, !invariant.load !12
  %89 = call %swift.opaque* %88(%swift.opaque* noalias nonnull %15, %swift.opaque* noalias nonnull %13, %swift.type* %Element) #9
  %90 = add nsw i64 %83, -1
  %91 = and i64 %90, %83
  %92 = icmp slt i64 %66, %91
  br i1 %92, label %82, label %.loopexit16

.loopexit16:                                      ; preds = %82, %64
  %93 = phi i64 [ %17, %64 ], [ %91, %82 ]
  %94 = phi i64 [ %21, %64 ], [ %66, %82 ]
  %95 = icmp slt i64 %93, %94
  br i1 %95, label %96, label %.loopexit16..loopexit_crit_edge

.loopexit16..loopexit_crit_edge:                  ; preds = %.loopexit16
  %.phi.trans.insert = getelementptr inbounds i8*, i8** %Element.valueWitnesses, i64 4
  %.phi.trans.insert17 = bitcast i8** %.phi.trans.insert to %swift.opaque* (%swift.opaque*, %swift.opaque*, %swift.type*)**
  %.pre = load %swift.opaque* (%swift.opaque*, %swift.opaque*, %swift.type*)*, %swift.opaque* (%swift.opaque*, %swift.opaque*, %swift.type*)** %.phi.trans.insert17, align 8, !invariant.load !12
  br label %.loopexit

96:                                               ; preds = %.loopexit16
  %97 = getelementptr inbounds %swift.type, %swift.type* %"FenwickTree<Element>", i64 5
  %98 = bitcast %swift.type* %97 to i32*
  %99 = load i32, i32* %98, align 8
  %100 = sext i32 %99 to i64
  %101 = getelementptr inbounds i8, i8* %27, i64 %100
  %102 = getelementptr inbounds %swift.type, %swift.type* %"FenwickTree<Element>", i64 4
  %103 = bitcast %swift.type* %102 to i32*
  %104 = load i32, i32* %103, align 8
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds i8, i8* %27, i64 %105
  %107 = bitcast i8* %101 to void (%swift.opaque*, %swift.opaque*, %swift.opaque*, %swift.refcounted*)**
  %.inverse.data = getelementptr inbounds i8, i8* %101, i64 8
  %108 = bitcast i8* %.inverse.data to %swift.refcounted**
  %.tree._buffer._storage = bitcast i8* %106 to %Ts28__ContiguousArrayStorageBaseC**
  %109 = getelementptr inbounds i8*, i8** %Element.valueWitnesses, i64 1
  %110 = bitcast i8** %109 to void (%swift.opaque*, %swift.type*)**
  %111 = getelementptr inbounds i8*, i8** %Element.valueWitnesses, i64 4
  %112 = bitcast i8** %111 to %swift.opaque* (%swift.opaque*, %swift.opaque*, %swift.type*)**
  br label %113

113:                                              ; preds = %113, %96
  %114 = phi i64 [ %94, %96 ], [ %122, %113 ]
  %115 = load void (%swift.opaque*, %swift.opaque*, %swift.opaque*, %swift.refcounted*)*, void (%swift.opaque*, %swift.opaque*, %swift.opaque*, %swift.refcounted*)** %107, align 8
  %116 = load %swift.refcounted*, %swift.refcounted** %108, align 8
  %117 = load %Ts28__ContiguousArrayStorageBaseC*, %Ts28__ContiguousArrayStorageBaseC** %.tree._buffer._storage, align 8
  call swiftcc void @"$sSayxSicig"(%swift.opaque* noalias nocapture nonnull sret(%swift.opaque) %11, i64 %114, %Ts28__ContiguousArrayStorageBaseC* %117, %swift.type* %Element)
  call swiftcc void %115(%swift.opaque* noalias nocapture nonnull sret(%swift.opaque) %13, %swift.opaque* noalias nocapture nonnull %15, %swift.opaque* noalias nocapture nonnull %11, %swift.refcounted* swiftself %116)
  %118 = load void (%swift.opaque*, %swift.type*)*, void (%swift.opaque*, %swift.type*)** %110, align 8, !invariant.load !12
  call void %118(%swift.opaque* noalias nonnull %11, %swift.type* %Element) #9
  call void %118(%swift.opaque* noalias nonnull %15, %swift.type* %Element) #9
  %119 = load %swift.opaque* (%swift.opaque*, %swift.opaque*, %swift.type*)*, %swift.opaque* (%swift.opaque*, %swift.opaque*, %swift.type*)** %112, align 8, !invariant.load !12
  %120 = call %swift.opaque* %119(%swift.opaque* noalias nonnull %15, %swift.opaque* noalias nonnull %13, %swift.type* %Element) #9
  %121 = add nsw i64 %114, -1
  %122 = and i64 %121, %114
  %123 = icmp slt i64 %93, %122
  br i1 %123, label %113, label %.loopexit

.loopexit:                                        ; preds = %113, %.loopexit16..loopexit_crit_edge, %42
  %124 = phi %swift.opaque* (%swift.opaque*, %swift.opaque*, %swift.type*)* [ %.pre, %.loopexit16..loopexit_crit_edge ], [ %62, %42 ], [ %119, %113 ]
  %125 = call %swift.opaque* %124(%swift.opaque* noalias %0, %swift.opaque* noalias nonnull %15, %swift.type* %Element) #9
  br label %126

126:                                              ; preds = %35, %.loopexit
  call void @llvm.lifetime.end.p0i8(i64 -1, i8* nonnull %14)
  call void @llvm.lifetime.end.p0i8(i64 -1, i8* nonnull %12)
  call void @llvm.lifetime.end.p0i8(i64 -1, i8* nonnull %10)
  ret void

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

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

define internal swiftcc void @"$s7llvm_O3S2i_Sitcfu1_"(%TSi* noalias nocapture writeonly sret(%TSi) %0, %TSi* noalias nocapture readonly dereferenceable(8) %1, %TSi* noalias nocapture readonly dereferenceable(8) %2) #0 {
entry:
  %._value = getelementptr inbounds %TSi, %TSi* %1, i64 0, i32 0
  %3 = load i64, i64* %._value, align 8
  %._value1 = getelementptr inbounds %TSi, %TSi* %2, i64 0, i32 0
  %4 = load i64, i64* %._value1, align 8
  %5 = tail call { i64, i1 } @llvm.sadd.with.overflow.i64(i64 %3, i64 %4)
  %6 = extractvalue { i64, i1 } %5, 1
  br i1 %6, label %9, label %7, !prof !7

7:                                                ; preds = %entry
  %8 = extractvalue { i64, i1 } %5, 0
  %._value2 = getelementptr inbounds %TSi, %TSi* %0, i64 0, i32 0
  store i64 %8, i64* %._value2, align 8
  ret void

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

define internal swiftcc void @"$s7llvm_O3S2i_Sitcfu2_"(%TSi* noalias nocapture writeonly sret(%TSi) %0, %TSi* noalias nocapture readonly dereferenceable(8) %1, %TSi* noalias nocapture readonly dereferenceable(8) %2) #0 {
entry:
  %._value = getelementptr inbounds %TSi, %TSi* %1, i64 0, i32 0
  %3 = load i64, i64* %._value, align 8
  %._value1 = getelementptr inbounds %TSi, %TSi* %2, i64 0, i32 0
  %4 = load i64, i64* %._value1, align 8
  %5 = tail call { i64, i1 } @llvm.ssub.with.overflow.i64(i64 %3, i64 %4)
  %6 = extractvalue { i64, i1 } %5, 1
  br i1 %6, label %9, label %7, !prof !7

7:                                                ; preds = %entry
  %8 = extractvalue { i64, i1 } %5, 0
  %._value2 = getelementptr inbounds %TSi, %TSi* %0, i64 0, i32 0
  store i64 %8, i64* %._value2, align 8
  ret void

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

declare swiftcc { %Ts28__ContiguousArrayStorageBaseC*, i8* } @"$sSa22_allocateUninitializedySayxG_SpyxGtSiFZ"(i64, %swift.type*) local_unnamed_addr #0

define linkonce_odr hidden swiftcc void @"$sSMsSkRzrlE4sort2byySb7ElementSTQz_ADtKXE_tKFs15ContiguousArrayVySi6offset_Si1l_Si1rt7elementtG_Tg5047$s7llvm_O3SbSi6offset_Si1l_Si1rt7elementt_SiAB_n3AC_N13ADtAEttXEfU0_Tf1cn_n"(%Ts15ContiguousArrayV* nocapture dereferenceable(8) %0, %swift.refcounted* swiftself %1, %swift.error** noalias nocapture swifterror dereferenceable(8) %2) local_unnamed_addr #0 {
entry:
  %3 = alloca %TSrySi6offset_Si1l_Si1rt7elementtG, align 8
  %._buffer._storage = getelementptr inbounds %Ts15ContiguousArrayV, %Ts15ContiguousArrayV* %0, i64 0, i32 0, i32 0
  %4 = load %Ts28__ContiguousArrayStorageBaseC*, %Ts28__ContiguousArrayStorageBaseC** %._buffer._storage, align 8
  %5 = getelementptr %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %4, i64 0, i32 0
  %6 = tail call zeroext i1 @swift_isUniquelyReferenced_nonNull_native(%swift.refcounted* %5) #25
  br i1 %6, label %common.ret, label %7

7:                                                ; preds = %entry
  %8 = tail call swiftcc %Ts28__ContiguousArrayStorageBaseC* @"$ss22_ContiguousArrayBufferV20_consumeAndCreateNewAByxGyFSi6offset_Si1l_Si1rt7elementt_Tg5"(%Ts28__ContiguousArrayStorageBaseC* %4)
  br label %common.ret

common.ret:                                       ; preds = %entry, %7
  %9 = phi %Ts28__ContiguousArrayStorageBaseC* [ %8, %7 ], [ %4, %entry ]
  %._storage.count._value = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %9, i64 0, i32 1, i32 0, i32 0, i32 0
  %10 = load i64, i64* %._storage.count._value, align 8, !range !6
  %11 = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %9, i64 1
  %12 = getelementptr inbounds %TSrySi6offset_Si1l_Si1rt7elementtG, %TSrySi6offset_Si1l_Si1rt7elementtG* %3, i64 0, i32 0, i32 0, i64 0
  call void @llvm.lifetime.start.p0i8(i64 16, i8* nonnull %12)
  %13 = ptrtoint %Ts28__ContiguousArrayStorageBaseC* %11 to i64
  %14 = bitcast %TSrySi6offset_Si1l_Si1rt7elementtG* %3 to i64*
  store i64 %13, i64* %14, align 8
  %.count._value = getelementptr inbounds %TSrySi6offset_Si1l_Si1rt7elementtG, %TSrySi6offset_Si1l_Si1rt7elementtG* %3, i64 0, i32 1, i32 0
  store i64 %10, i64* %.count._value, align 8
  call swiftcc void @"$sSr15_stableSortImpl2byySbx_xtKXE_tKFSi6offset_Si1l_Si1rt7elementt_Tg5047$s7llvm_O3SbSi6offset_Si1l_Si1rt7elementt_SiAB_m3AC_M13ADtAEttXEfU0_Tf1cn_n"(%TSrySi6offset_Si1l_Si1rt7elementtG* nocapture nonnull dereferenceable(16) %3, %swift.refcounted* swiftself undef, %swift.error** noalias nocapture nonnull swifterror dereferenceable(8) %2)
  store %Ts28__ContiguousArrayStorageBaseC* %9, %Ts28__ContiguousArrayStorageBaseC** %._buffer._storage, align 8
  call void @llvm.lifetime.end.p0i8(i64 16, i8* nonnull %12)
  ret void
}

declare swiftcc void @"$sSa21_makeMutableAndUniqueyyF"(%swift.type*, %TSa* nocapture swiftself dereferenceable(8)) local_unnamed_addr #0

; Function Attrs: noinline
define linkonce_odr hidden swiftcc %Ts28__ContiguousArrayStorageBaseC* @"$ss22_ContiguousArrayBufferV20_consumeAndCreateNewAByxGyFSi6offset_Si1l_Si1rt7elementt_Tg5"(%Ts28__ContiguousArrayStorageBaseC* %0) local_unnamed_addr #5 {
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 = tail call swiftcc %Ts28__ContiguousArrayStorageBaseC* @"$ss22_ContiguousArrayBufferV20_consumeAndCreateNew14bufferIsUnique15minimumCapacity13growForAppendAByxGSb_SiSbtFSi6offset_Si1l_Si1rt7elementt_Tg5"(i1 false, i64 %1, i1 false, %Ts28__ContiguousArrayStorageBaseC* %0)
  ret %Ts28__ContiguousArrayStorageBaseC* %2
}

; Function Attrs: noinline
define linkonce_odr hidden swiftcc %Ts28__ContiguousArrayStorageBaseC* @"$ss22_ContiguousArrayBufferV20_consumeAndCreateNewAByxGyFSiSg_Tg5"(%Ts28__ContiguousArrayStorageBaseC* %0) local_unnamed_addr #5 {
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 = tail call swiftcc %Ts28__ContiguousArrayStorageBaseC* @"$ss22_ContiguousArrayBufferV20_consumeAndCreateNew14bufferIsUnique15minimumCapacity13growForAppendAByxGSb_SiSbtFSiSg_Tg5"(i1 false, i64 %1, i1 false, %Ts28__ContiguousArrayStorageBaseC* %0)
  ret %Ts28__ContiguousArrayStorageBaseC* %2
}

; Function Attrs: noinline
define linkonce_odr hidden swiftcc %Ts28__ContiguousArrayStorageBaseC* @"$ss22_ContiguousArrayBufferV20_consumeAndCreateNewAByxGyFSi_Tg5"(%Ts28__ContiguousArrayStorageBaseC* %0) local_unnamed_addr #5 {
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 = tail call swiftcc %Ts28__ContiguousArrayStorageBaseC* @"$ss22_ContiguousArrayBufferV20_consumeAndCreateNew14bufferIsUnique15minimumCapacity13growForAppendAByxGSb_SiSbtFSi_Tg5"(i1 false, i64 %1, i1 false, %Ts28__ContiguousArrayStorageBaseC* %0)
  ret %Ts28__ContiguousArrayStorageBaseC* %2
}

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

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") #26
  %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) #9
  %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) #28
  %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
  %32 = bitcast %Ts28__ContiguousArrayStorageBaseC* %31 to i8*
  %33 = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %3, i64 1
  %34 = bitcast %Ts28__ContiguousArrayStorageBaseC* %33 to i8*
  br i1 %0, label %35, label %42

35:                                               ; preds = %29
  %tailaddr4 = bitcast %Ts28__ContiguousArrayStorageBaseC* %33 to %TSi*
  %36 = getelementptr inbounds %TSi, %TSi* %tailaddr4, i64 %16
  %37 = bitcast %TSi* %36 to %Ts28__ContiguousArrayStorageBaseC*
  %38 = icmp ult %Ts28__ContiguousArrayStorageBaseC* %31, %37
  %39 = icmp eq %Ts28__ContiguousArrayStorageBaseC* %30, %3
  %or.cond14 = select i1 %39, i1 %38, i1 false
  br i1 %or.cond14, label %41, label %.sink.split

.sink.split:                                      ; preds = %35
  %40 = shl nuw i64 %16, 3
  tail call void @llvm.memmove.p0i8.p0i8.i64(i8* nonnull align 8 %32, i8* nonnull align 8 %34, i64 %40, i1 false)
  br label %41

41:                                               ; preds = %35, %.sink.split
  store i64 0, i64* %._storage.count._value, align 8
  br label %44

42:                                               ; preds = %29
  %43 = shl nuw i64 %16, 3
  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* nonnull align 8 %32, i8* nonnull align 8 %34, i64 %43, i1 false)
  br label %44

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

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

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

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") #26
  %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) #9
  %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) #28
  %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 %TSS*
  %34 = getelementptr inbounds %TSS, %TSS* %tailaddr4, i64 %16
  %35 = bitcast %TSS* %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 @"$sSSN") #25
  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) #9
  ret %Ts28__ContiguousArrayStorageBaseC* %30

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

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

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_ContiguousArrayStorageCySi6offset_Si1l_Si1rt7elementtGMD") #26
  %21 = mul i64 %17, 24
  %22 = add i64 %21, 32
  %23 = tail call noalias %swift.refcounted* @swift_allocObject(%swift.type* %20, i64 %22, i64 7) #9
  %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) #28
  %gepdiff = add nsw i64 %call.i, -32
  %26 = sdiv i64 %gepdiff, 24
  %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 = bitcast %Ts28__ContiguousArrayStorageBaseC* %31 to i8*
  %33 = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %3, i64 1
  %34 = bitcast %Ts28__ContiguousArrayStorageBaseC* %33 to i8*
  br i1 %0, label %35, label %42

35:                                               ; preds = %29
  %tailaddr4 = bitcast %Ts28__ContiguousArrayStorageBaseC* %33 to <{ %TSi, <{ %TSi, %TSi }> }>*
  %36 = getelementptr inbounds <{ %TSi, <{ %TSi, %TSi }> }>, <{ %TSi, <{ %TSi, %TSi }> }>* %tailaddr4, i64 %16
  %37 = bitcast <{ %TSi, <{ %TSi, %TSi }> }>* %36 to %Ts28__ContiguousArrayStorageBaseC*
  %38 = icmp ult %Ts28__ContiguousArrayStorageBaseC* %31, %37
  %39 = icmp eq %Ts28__ContiguousArrayStorageBaseC* %30, %3
  %or.cond14 = select i1 %39, i1 %38, i1 false
  br i1 %or.cond14, label %41, label %.sink.split

.sink.split:                                      ; preds = %35
  %40 = mul nuw i64 %16, 24
  tail call void @llvm.memmove.p0i8.p0i8.i64(i8* nonnull align 8 %32, i8* nonnull align 8 %34, i64 %40, i1 false)
  br label %41

41:                                               ; preds = %35, %.sink.split
  store i64 0, i64* %._storage.count._value, align 8
  br label %44

42:                                               ; preds = %29
  %43 = mul nuw i64 %16, 24
  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* nonnull align 8 %32, i8* nonnull align 8 %34, i64 %43, i1 false)
  br label %44

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

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

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

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_ContiguousArrayStorageCySiSgGMD") #26
  %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) #9
  %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) #28
  %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 = bitcast %Ts28__ContiguousArrayStorageBaseC* %31 to i8*
  %33 = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %3, i64 1
  %34 = bitcast %Ts28__ContiguousArrayStorageBaseC* %33 to i8*
  %35 = shl i64 %16, 4
  br i1 %0, label %36, label %41

36:                                               ; preds = %29
  %37 = getelementptr inbounds i8, i8* %34, i64 %35
  %38 = icmp ugt i8* %37, %32
  %39 = icmp eq %Ts28__ContiguousArrayStorageBaseC* %30, %3
  %or.cond17 = select i1 %39, i1 %38, i1 false
  br i1 %or.cond17, label %40, label %.sink.split

.sink.split:                                      ; preds = %36
  tail call void @llvm.memmove.p0i8.p0i8.i64(i8* nonnull align 8 %32, i8* nonnull align 8 %34, i64 %35, i1 false)
  br label %40

40:                                               ; preds = %36, %.sink.split
  store i64 0, i64* %._storage.count._value, align 8
  br label %42

41:                                               ; preds = %29
  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* nonnull align 8 %32, i8* nonnull align 8 %34, i64 %35, i1 false)
  br label %42

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

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

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

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_ContiguousArrayStorageCySi1l_Si1rtGMD") #26
  %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) #9
  %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) #28
  %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 = bitcast %Ts28__ContiguousArrayStorageBaseC* %31 to i8*
  %33 = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %3, i64 1
  %34 = bitcast %Ts28__ContiguousArrayStorageBaseC* %33 to i8*
  br i1 %0, label %35, label %42

35:                                               ; preds = %29
  %tailaddr4 = bitcast %Ts28__ContiguousArrayStorageBaseC* %33 to <{ %TSi, %TSi }>*
  %36 = getelementptr inbounds <{ %TSi, %TSi }>, <{ %TSi, %TSi }>* %tailaddr4, i64 %16
  %37 = bitcast <{ %TSi, %TSi }>* %36 to %Ts28__ContiguousArrayStorageBaseC*
  %38 = icmp ult %Ts28__ContiguousArrayStorageBaseC* %31, %37
  %39 = icmp eq %Ts28__ContiguousArrayStorageBaseC* %30, %3
  %or.cond14 = select i1 %39, i1 %38, i1 false
  br i1 %or.cond14, label %41, label %.sink.split

.sink.split:                                      ; preds = %35
  %40 = shl nuw i64 %16, 4
  tail call void @llvm.memmove.p0i8.p0i8.i64(i8* nonnull align 8 %32, i8* nonnull align 8 %34, i64 %40, i1 false)
  br label %41

41:                                               ; preds = %35, %.sink.split
  store i64 0, i64* %._storage.count._value, align 8
  br label %44

42:                                               ; preds = %29
  %43 = shl nuw i64 %16, 4
  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* nonnull align 8 %32, i8* nonnull align 8 %34, i64 %43, i1 false)
  br label %44

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

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

define linkonce_odr hidden swiftcc void @"$sSr15_stableSortImpl2byySbx_xtKXE_tKFSi6offset_Si1l_Si1rt7elementt_Tg5047$s7llvm_O3SbSi6offset_Si1l_Si1rt7elementt_SiAB_m3AC_M13ADtAEttXEfU0_Tf1cn_n"(%TSrySi6offset_Si1l_Si1rt7elementtG* nocapture dereferenceable(16) %0, %swift.refcounted* swiftself %1, %swift.error** noalias nocapture swifterror dereferenceable(8) %2) local_unnamed_addr #0 {
entry:
  %.count._value = getelementptr inbounds %TSrySi6offset_Si1l_Si1rt7elementtG, %TSrySi6offset_Si1l_Si1rt7elementtG* %0, i64 0, i32 1, i32 0
  %3 = load i64, i64* %.count._value, align 8
  %4 = tail call swiftcc i64 @"$ss22_minimumMergeRunLengthyS2iF"(i64 %3)
  %5 = icmp slt i64 %4, %3
  br i1 %5, label %6, label %11

6:                                                ; preds = %entry
  %7 = sdiv i64 %3, 2
  %8 = icmp slt i64 %3, -1
  br i1 %8, label %326, label %9, !prof !7

9:                                                ; preds = %6
  %10 = icmp sgt i64 %3, 1
  br i1 %10, label %.thread255, label %19

11:                                               ; preds = %entry
  %12 = icmp slt i64 %3, 0
  br i1 %12, label %324, label %13, !prof !7

13:                                               ; preds = %11
  %switch = icmp ult i64 %3, 2
  br i1 %switch, label %common.ret, label %.preheader163

.preheader163:                                    ; preds = %13
  %14 = bitcast %TSrySi6offset_Si1l_Si1rt7elementtG* %0 to i64*
  br label %300

.thread255:                                       ; preds = %9
  %15 = tail call %swift.type* @__swift_instantiateConcreteTypeFromMangledName({ i32, i32 }* nonnull @"$sSi6offset_Si1l_Si1rt7elementtMD") #26
  %16 = tail call swiftcc %Ts28__ContiguousArrayStorageBaseC* @"$sSa28_allocateBufferUninitialized15minimumCapacitys016_ContiguousArrayB0VyxGSi_tFZ"(i64 %7, %swift.type* %15)
  %._storage70.count._value = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %16, i64 0, i32 1, i32 0, i32 0, i32 0
  store i64 %7, i64* %._storage70.count._value, align 8
  %17 = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %16, i64 1
  %18 = bitcast %Ts28__ContiguousArrayStorageBaseC* %17 to i8*
  br label %.preheader161

19:                                               ; preds = %9
  %20 = icmp eq i64 %3, 1
  br i1 %20, label %.preheader161, label %..loopexit162_crit_edge

..loopexit162_crit_edge:                          ; preds = %19
  %.pre245 = load i64, i64* getelementptr inbounds (%struct._SwiftEmptyArrayStorage, %struct._SwiftEmptyArrayStorage* @_swiftEmptyArrayStorage, i64 0, i32 1, i32 0), align 8, !range !6
  br label %.loopexit162

.preheader161:                                    ; preds = %.thread255, %19
  %21 = phi i8* [ %18, %.thread255 ], [ bitcast (%struct.HeapMetadata** getelementptr inbounds (%struct._SwiftEmptyArrayStorage, %struct._SwiftEmptyArrayStorage* @_swiftEmptyArrayStorage, i64 1, i32 0, i32 0) to i8*), %19 ]
  %22 = phi %Ts28__ContiguousArrayStorageBaseC* [ %16, %.thread255 ], [ bitcast (%struct._SwiftEmptyArrayStorage* @_swiftEmptyArrayStorage to %Ts28__ContiguousArrayStorageBaseC*), %19 ]
  %23 = bitcast %TSrySi6offset_Si1l_Si1rt7elementtG* %0 to i64*
  br label %24

24:                                               ; preds = %.preheader161, %.loopexit
  %25 = phi i64 [ %88, %.loopexit ], [ 0, %.preheader161 ]
  %26 = phi i64 [ %173, %.loopexit ], [ %3, %.preheader161 ]
  %27 = phi %Ts28__ContiguousArrayStorageBaseC* [ %107, %.loopexit ], [ bitcast (%struct._SwiftEmptyArrayStorage* @_swiftEmptyArrayStorage to %Ts28__ContiguousArrayStorageBaseC*), %.preheader161 ]
  %28 = add nsw i64 %25, 1
  %29 = icmp slt i64 %28, %26
  br i1 %29, label %30, label %.loopexit158

30:                                               ; preds = %24
  %31 = load i64, i64* %23, align 8
  %32 = inttoptr i64 %31 to <{ %TSi, <{ %TSi, %TSi }> }>*
  %.element62.r._value = getelementptr inbounds <{ %TSi, <{ %TSi, %TSi }> }>, <{ %TSi, <{ %TSi, %TSi }> }>* %32, i64 %28, i32 1, i32 1, i32 0
  %33 = load i64, i64* %.element62.r._value, align 8
  %.element63.r._value = getelementptr inbounds <{ %TSi, <{ %TSi, %TSi }> }>, <{ %TSi, <{ %TSi, %TSi }> }>* %32, i64 %25, i32 1, i32 1, i32 0
  %34 = load i64, i64* %.element63.r._value, align 8
  %35 = icmp slt i64 %34, %33
  %36 = add nsw i64 %25, 2
  %37 = icmp slt i64 %36, %26
  br i1 %37, label %.preheader159, label %.loopexit160

.preheader159:                                    ; preds = %30, %43
  %38 = phi i64 [ %40, %43 ], [ %33, %30 ]
  %39 = phi i64 [ %44, %43 ], [ %36, %30 ]
  %.element68.r._value = getelementptr inbounds <{ %TSi, <{ %TSi, %TSi }> }>, <{ %TSi, <{ %TSi, %TSi }> }>* %32, i64 %39, i32 1, i32 1, i32 0
  %40 = load i64, i64* %.element68.r._value, align 8
  %41 = icmp sge i64 %38, %40
  %42 = xor i1 %35, %41
  br i1 %42, label %43, label %.loopexit160

43:                                               ; preds = %.preheader159
  %44 = add i64 %39, 1
  %exitcond.not = icmp eq i64 %44, %26
  br i1 %exitcond.not, label %.loopexit160, label %.preheader159

.loopexit160:                                     ; preds = %43, %.preheader159, %30
  %45 = phi i64 [ %36, %30 ], [ %26, %43 ], [ %39, %.preheader159 ]
  br i1 %35, label %46, label %.loopexit158

46:                                               ; preds = %.loopexit160
  %47 = icmp slt i64 %45, %25
  br i1 %47, label %353, label %48, !prof !7

48:                                               ; preds = %46
  %49 = icmp slt i64 %25, %45
  br i1 %49, label %.preheader157, label %.loopexit158

.preheader157:                                    ; preds = %48, %67
  %50 = phi i64 [ %52, %67 ], [ %45, %48 ]
  %51 = phi i64 [ %68, %67 ], [ %25, %48 ]
  %52 = add nsw i64 %50, -1
  %53 = load i64, i64* %23, align 8
  %54 = icmp eq i64 %51, %52
  br i1 %54, label %67, label %55

55:                                               ; preds = %.preheader157
  %56 = icmp eq i64 %53, 0
  br i1 %56, label %354, label %57

57:                                               ; preds = %55
  %58 = inttoptr i64 %53 to <{ %TSi, <{ %TSi, %TSi }> }>*
  %59 = getelementptr inbounds <{ %TSi, <{ %TSi, %TSi }> }>, <{ %TSi, <{ %TSi, %TSi }> }>* %58, i64 %51
  %60 = bitcast <{ %TSi, <{ %TSi, %TSi }> }>* %59 to i8*
  %61 = getelementptr inbounds <{ %TSi, <{ %TSi, %TSi }> }>, <{ %TSi, <{ %TSi, %TSi }> }>* %58, i64 %52
  %62 = bitcast <{ %TSi, <{ %TSi, %TSi }> }>* %61 to i8*
  %.element65.r._value = getelementptr inbounds <{ %TSi, <{ %TSi, %TSi }> }>, <{ %TSi, <{ %TSi, %TSi }> }>* %58, i64 %51, i32 1, i32 1, i32 0
  %63 = load i64, i64* %.element65.r._value, align 8
  %64 = bitcast <{ %TSi, <{ %TSi, %TSi }> }>* %59 to <2 x i64>*
  %65 = load <2 x i64>, <2 x i64>* %64, align 8
  tail call void @llvm.memmove.p0i8.p0i8.i64(i8* noundef nonnull align 8 dereferenceable(24) %60, i8* noundef nonnull align 8 dereferenceable(24) %62, i64 24, i1 false)
  %66 = bitcast <{ %TSi, <{ %TSi, %TSi }> }>* %61 to <2 x i64>*
  store <2 x i64> %65, <2 x i64>* %66, align 8
  %.element67.r._value = getelementptr inbounds <{ %TSi, <{ %TSi, %TSi }> }>, <{ %TSi, <{ %TSi, %TSi }> }>* %58, i64 %52, i32 1, i32 1, i32 0
  store i64 %63, i64* %.element67.r._value, align 8
  br label %67

67:                                               ; preds = %.preheader157, %57
  %68 = add nsw i64 %51, 1
  %69 = icmp slt i64 %68, %52
  br i1 %69, label %.preheader157, label %.loopexit158

.loopexit158:                                     ; preds = %67, %48, %.loopexit160, %24
  %70 = phi i64 [ %28, %24 ], [ %45, %.loopexit160 ], [ %45, %48 ], [ %45, %67 ]
  %71 = load i64, i64* %.count._value, align 8
  %72 = icmp slt i64 %70, %71
  br i1 %72, label %73, label %.loopexit156

73:                                               ; preds = %.loopexit158
  %74 = tail call { i64, i1 } @llvm.ssub.with.overflow.i64(i64 %70, i64 %25)
  %75 = extractvalue { i64, i1 } %74, 1
  br i1 %75, label %349, label %76, !prof !7

76:                                               ; preds = %73
  %77 = extractvalue { i64, i1 } %74, 0
  %78 = icmp slt i64 %77, %4
  br i1 %78, label %79, label %.loopexit156

79:                                               ; preds = %76
  %80 = tail call { i64, i1 } @llvm.sadd.with.overflow.i64(i64 %25, i64 %4)
  %81 = extractvalue { i64, i1 } %80, 1
  br i1 %81, label %350, label %82, !prof !7

82:                                               ; preds = %79
  %83 = extractvalue { i64, i1 } %80, 0
  %84 = tail call i64 @llvm.smin.i64(i64 %83, i64 %71)
  %85 = icmp slt i64 %84, %25
  br i1 %85, label %351, label %86, !prof !7

86:                                               ; preds = %82
  %87 = icmp eq i64 %70, %84
  br i1 %87, label %.loopexit156, label %.preheader

.loopexit156:                                     ; preds = %297, %86, %76, %.loopexit158
  %88 = phi i64 [ %70, %.loopexit158 ], [ %70, %76 ], [ %70, %86 ], [ %84, %297 ]
  %89 = icmp slt i64 %88, %25
  br i1 %89, label %332, label %90, !prof !7

90:                                               ; preds = %.loopexit156
  %91 = getelementptr %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %27, i64 0, i32 0
  %92 = tail call zeroext i1 @swift_isUniquelyReferenced_nonNull_native(%swift.refcounted* %91) #25
  br i1 %92, label %97, label %93

93:                                               ; preds = %90
  %._storage18.count._value = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %27, i64 0, i32 1, i32 0, i32 0, i32 0
  %94 = load i64, i64* %._storage18.count._value, align 8, !range !6
  %95 = add nuw nsw i64 %94, 1
  %96 = tail call swiftcc %Ts28__ContiguousArrayStorageBaseC* @"$ss22_ContiguousArrayBufferV20_consumeAndCreateNew14bufferIsUnique15minimumCapacity13growForAppendAByxGSb_SiSbtFSnySiG_Tgq5"(i1 false, i64 %95, i1 true, %Ts28__ContiguousArrayStorageBaseC* %27)
  br label %97

97:                                               ; preds = %90, %93
  %98 = phi %Ts28__ContiguousArrayStorageBaseC* [ %96, %93 ], [ %27, %90 ]
  %._storage19.count._value = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %98, i64 0, i32 1, i32 0, i32 0, i32 0
  %99 = load i64, i64* %._storage19.count._value, align 8, !range !6
  %._storage19._capacityAndFlags._value = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %98, i64 0, i32 1, i32 0, i32 1, i32 0
  %100 = load i64, i64* %._storage19._capacityAndFlags._value, align 8
  %101 = lshr i64 %100, 1
  %102 = add nuw nsw i64 %99, 1
  %.not146 = icmp ugt i64 %101, %99
  br i1 %.not146, label %106, label %103, !prof !8

103:                                              ; preds = %97
  %104 = icmp ugt i64 %100, 1
  %105 = tail call swiftcc %Ts28__ContiguousArrayStorageBaseC* @"$ss22_ContiguousArrayBufferV20_consumeAndCreateNew14bufferIsUnique15minimumCapacity13growForAppendAByxGSb_SiSbtFSnySiG_Tgq5"(i1 %104, i64 %102, i1 true, %Ts28__ContiguousArrayStorageBaseC* nonnull %98)
  br label %106

106:                                              ; preds = %97, %103
  %107 = phi %Ts28__ContiguousArrayStorageBaseC* [ %105, %103 ], [ %98, %97 ]
  %._storage20.count._value = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %107, i64 0, i32 1, i32 0, i32 0, i32 0
  store i64 %102, i64* %._storage20.count._value, align 8
  %108 = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %107, i64 1
  %tailaddr21 = bitcast %Ts28__ContiguousArrayStorageBaseC* %108 to %TSnySiG*
  %.lowerBound22._value = getelementptr inbounds %TSnySiG, %TSnySiG* %tailaddr21, i64 %99, i32 0, i32 0
  store i64 %25, i64* %.lowerBound22._value, align 8
  %.upperBound23._value = getelementptr inbounds %TSnySiG, %TSnySiG* %tailaddr21, i64 %99, i32 1, i32 0
  store i64 %88, i64* %.upperBound23._value, align 8
  %.not154 = icmp eq i64 %99, 0
  br i1 %.not154, label %.loopexit, label %thread-pre-split

thread-pre-split:                                 ; preds = %106
  %.lowerBound52._value.phi.trans.insert = bitcast %Ts28__ContiguousArrayStorageBaseC* %108 to i64*
  %109 = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %107, i64 1, i32 0, i32 1
  %110 = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %107, i64 1, i32 0, i32 1
  %.lowerBound45._value.phi.trans.insert = bitcast %Ts28__ContiguousArrayStorageBaseC* %108 to i64*
  br label %111

111:                                              ; preds = %thread-pre-split, %259
  %112 = phi i64 [ %102, %thread-pre-split ], [ %260, %259 ]
  %113 = add nsw i64 %112, -1
  %114 = icmp ult i64 %112, 4
  br i1 %114, label %142, label %115

115:                                              ; preds = %111
  %116 = add nsw i64 %112, -4
  %.lowerBound27._value = getelementptr inbounds %TSnySiG, %TSnySiG* %tailaddr21, i64 %116, i32 0, i32 0
  %117 = load i64, i64* %.lowerBound27._value, align 8
  %.upperBound28._value = getelementptr inbounds %TSnySiG, %TSnySiG* %tailaddr21, i64 %116, i32 1, i32 0
  %118 = load i64, i64* %.upperBound28._value, align 8
  %119 = tail call { i64, i1 } @llvm.ssub.with.overflow.i64(i64 %118, i64 %117)
  %120 = extractvalue { i64, i1 } %119, 0
  %121 = extractvalue { i64, i1 } %119, 1
  br i1 %121, label %333, label %122, !prof !7

122:                                              ; preds = %115
  %123 = add nsw i64 %112, -3
  %.lowerBound29._value = getelementptr inbounds %TSnySiG, %TSnySiG* %tailaddr21, i64 %123, i32 0, i32 0
  %124 = load i64, i64* %.lowerBound29._value, align 8
  %.upperBound30._value = getelementptr inbounds %TSnySiG, %TSnySiG* %tailaddr21, i64 %123, i32 1, i32 0
  %125 = load i64, i64* %.upperBound30._value, align 8
  %126 = tail call { i64, i1 } @llvm.ssub.with.overflow.i64(i64 %125, i64 %124)
  %127 = extractvalue { i64, i1 } %126, 0
  %128 = extractvalue { i64, i1 } %126, 1
  br i1 %128, label %334, label %129, !prof !7

129:                                              ; preds = %122
  %130 = add nsw i64 %112, -2
  %.lowerBound31._value = getelementptr inbounds %TSnySiG, %TSnySiG* %tailaddr21, i64 %130, i32 0, i32 0
  %131 = load i64, i64* %.lowerBound31._value, align 8
  %.upperBound32._value = getelementptr inbounds %TSnySiG, %TSnySiG* %tailaddr21, i64 %130, i32 1, i32 0
  %132 = load i64, i64* %.upperBound32._value, align 8
  %133 = tail call { i64, i1 } @llvm.ssub.with.overflow.i64(i64 %132, i64 %131)
  %134 = extractvalue { i64, i1 } %133, 1
  br i1 %134, label %335, label %135, !prof !7

135:                                              ; preds = %129
  %136 = extractvalue { i64, i1 } %133, 0
  %137 = tail call { i64, i1 } @llvm.sadd.with.overflow.i64(i64 %127, i64 %136)
  %138 = extractvalue { i64, i1 } %137, 1
  br i1 %138, label %336, label %139, !prof !7

139:                                              ; preds = %135
  %140 = extractvalue { i64, i1 } %137, 0
  %141 = icmp slt i64 %140, %120
  br i1 %141, label %.thread, label %269

142:                                              ; preds = %111
  %.not155 = icmp eq i64 %112, 3
  br i1 %.not155, label %..thread_crit_edge, label %._crit_edge

..thread_crit_edge:                               ; preds = %142
  %.pre242 = load i64, i64* %110, align 8
  %.pre = load i64, i64* %.lowerBound45._value.phi.trans.insert, align 8
  %.pre246 = tail call { i64, i1 } @llvm.ssub.with.overflow.i64(i64 %.pre242, i64 %.pre)
  %.pre248 = extractvalue { i64, i1 } %.pre246, 0
  br label %.thread

.thread:                                          ; preds = %..thread_crit_edge, %139
  %.pre-phi249 = phi i64 [ %.pre248, %..thread_crit_edge ], [ %127, %139 ]
  %.pre-phi247 = phi { i64, i1 } [ %.pre246, %..thread_crit_edge ], [ %126, %139 ]
  %143 = extractvalue { i64, i1 } %.pre-phi247, 1
  br i1 %143, label %343, label %144, !prof !7

144:                                              ; preds = %.thread
  %145 = add nsw i64 %112, -2
  %.lowerBound47._value = getelementptr inbounds %TSnySiG, %TSnySiG* %tailaddr21, i64 %145, i32 0, i32 0
  %146 = load i64, i64* %.lowerBound47._value, align 8
  %.upperBound48._value = getelementptr inbounds %TSnySiG, %TSnySiG* %tailaddr21, i64 %145, i32 1, i32 0
  %147 = load i64, i64* %.upperBound48._value, align 8
  %148 = tail call { i64, i1 } @llvm.ssub.with.overflow.i64(i64 %147, i64 %146)
  %149 = extractvalue { i64, i1 } %148, 0
  %150 = extractvalue { i64, i1 } %148, 1
  br i1 %150, label %344, label %151, !prof !7

151:                                              ; preds = %144
  %.lowerBound49._value = getelementptr inbounds %TSnySiG, %TSnySiG* %tailaddr21, i64 %113, i32 0, i32 0
  %152 = load i64, i64* %.lowerBound49._value, align 8
  %.upperBound50._value = getelementptr inbounds %TSnySiG, %TSnySiG* %tailaddr21, i64 %113, i32 1, i32 0
  %153 = load i64, i64* %.upperBound50._value, align 8
  %154 = tail call { i64, i1 } @llvm.ssub.with.overflow.i64(i64 %153, i64 %152)
  %155 = extractvalue { i64, i1 } %154, 0
  %156 = extractvalue { i64, i1 } %154, 1
  br i1 %156, label %345, label %157, !prof !7

157:                                              ; preds = %151
  %158 = tail call { i64, i1 } @llvm.sadd.with.overflow.i64(i64 %149, i64 %155)
  %159 = extractvalue { i64, i1 } %158, 1
  br i1 %159, label %346, label %160, !prof !7

160:                                              ; preds = %157
  %161 = extractvalue { i64, i1 } %158, 0
  %162 = icmp slt i64 %161, %.pre-phi249
  br i1 %162, label %.thread153, label %267

._crit_edge:                                      ; preds = %142
  %.pre243 = load i64, i64* %.lowerBound52._value.phi.trans.insert, align 8
  %.pre244 = load i64, i64* %109, align 8
  %.pre250 = tail call { i64, i1 } @llvm.ssub.with.overflow.i64(i64 %.pre244, i64 %.pre243)
  %.pre252 = extractvalue { i64, i1 } %.pre250, 0
  br label %.thread153

.thread153:                                       ; preds = %160, %._crit_edge
  %.pre-phi253 = phi i64 [ %.pre252, %._crit_edge ], [ %149, %160 ]
  %.pre-phi251 = phi { i64, i1 } [ %.pre250, %._crit_edge ], [ %148, %160 ]
  %163 = extractvalue { i64, i1 } %.pre-phi251, 1
  br i1 %163, label %347, label %164, !prof !7

164:                                              ; preds = %.thread153
  %.lowerBound54._value = getelementptr inbounds %TSnySiG, %TSnySiG* %tailaddr21, i64 %113, i32 0, i32 0
  %165 = load i64, i64* %.lowerBound54._value, align 8
  %.upperBound55._value = getelementptr inbounds %TSnySiG, %TSnySiG* %tailaddr21, i64 %113, i32 1, i32 0
  %166 = load i64, i64* %.upperBound55._value, align 8
  %167 = tail call { i64, i1 } @llvm.ssub.with.overflow.i64(i64 %166, i64 %165)
  %168 = extractvalue { i64, i1 } %167, 1
  br i1 %168, label %348, label %169, !prof !7

169:                                              ; preds = %164
  %170 = extractvalue { i64, i1 } %167, 0
  %171 = icmp slt i64 %170, %.pre-phi253
  br i1 %171, label %.loopexit, label %233

.loopexit:                                        ; preds = %259, %169, %106
  %172 = phi i64 [ 1, %106 ], [ %260, %259 ], [ %112, %169 ]
  %173 = load i64, i64* %.count._value, align 8
  %174 = icmp slt i64 %88, %173
  br i1 %174, label %24, label %.loopexit162

.loopexit162:                                     ; preds = %.loopexit, %..loopexit162_crit_edge
  %175 = phi i8* [ bitcast (%struct.HeapMetadata** getelementptr inbounds (%struct._SwiftEmptyArrayStorage, %struct._SwiftEmptyArrayStorage* @_swiftEmptyArrayStorage, i64 1, i32 0, i32 0) to i8*), %..loopexit162_crit_edge ], [ %21, %.loopexit ]
  %176 = phi %Ts28__ContiguousArrayStorageBaseC* [ bitcast (%struct._SwiftEmptyArrayStorage* @_swiftEmptyArrayStorage to %Ts28__ContiguousArrayStorageBaseC*), %..loopexit162_crit_edge ], [ %22, %.loopexit ]
  %177 = phi i64 [ %.pre245, %..loopexit162_crit_edge ], [ %172, %.loopexit ]
  %178 = phi %Ts28__ContiguousArrayStorageBaseC* [ bitcast (%struct._SwiftEmptyArrayStorage* @_swiftEmptyArrayStorage to %Ts28__ContiguousArrayStorageBaseC*), %..loopexit162_crit_edge ], [ %107, %.loopexit ]
  %179 = icmp ugt i64 %177, 1
  br i1 %179, label %180, label %.loopexit297

180:                                              ; preds = %.loopexit162
  %181 = bitcast %TSrySi6offset_Si1l_Si1rt7elementtG* %0 to i64*
  %182 = load i64, i64* %181, align 8
  %183 = icmp eq i64 %182, 0
  %184 = inttoptr i64 %182 to <{ %TSi, <{ %TSi, %TSi }> }>*
  br label %185

185:                                              ; preds = %218, %180
  %186 = phi i64 [ %177, %180 ], [ %219, %218 ]
  %187 = phi %Ts28__ContiguousArrayStorageBaseC* [ %178, %180 ], [ %213, %218 ]
  %188 = add nsw i64 %186, -1
  %189 = add nsw i64 %186, -2
  %190 = icmp ult i64 %186, 2
  br i1 %190, label %327, label %191, !prof !7

191:                                              ; preds = %185
  %192 = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %187, i64 1
  %tailaddr8 = bitcast %Ts28__ContiguousArrayStorageBaseC* %192 to %TSnySiG*
  %.lowerBound._value = getelementptr inbounds %TSnySiG, %TSnySiG* %tailaddr8, i64 %189, i32 0, i32 0
  %193 = load i64, i64* %.lowerBound._value, align 8
  %.upperBound._value = getelementptr inbounds %TSnySiG, %TSnySiG* %tailaddr8, i64 %188, i32 1, i32 0
  %194 = load i64, i64* %.upperBound._value, align 8
  br i1 %183, label %328, label %195

195:                                              ; preds = %191
  %.lowerBound9._value = getelementptr inbounds %TSnySiG, %TSnySiG* %tailaddr8, i64 %188, i32 0, i32 0
  %196 = load i64, i64* %.lowerBound9._value, align 8
  %197 = getelementptr inbounds <{ %TSi, <{ %TSi, %TSi }> }>, <{ %TSi, <{ %TSi, %TSi }> }>* %184, i64 %193
  %198 = bitcast <{ %TSi, <{ %TSi, %TSi }> }>* %197 to i8*
  %199 = getelementptr inbounds <{ %TSi, <{ %TSi, %TSi }> }>, <{ %TSi, <{ %TSi, %TSi }> }>* %184, i64 %196
  %200 = bitcast <{ %TSi, <{ %TSi, %TSi }> }>* %199 to i8*
  %201 = getelementptr inbounds <{ %TSi, <{ %TSi, %TSi }> }>, <{ %TSi, <{ %TSi, %TSi }> }>* %184, i64 %194
  %202 = bitcast <{ %TSi, <{ %TSi, %TSi }> }>* %201 to i8*
  %203 = tail call swiftcc i1 @"$ss6_merge3low3mid4high6buffer2bySbSpyxG_A3GSbx_xtKXEtKlFSi6offset_Si1l_Si1rt7elementt_Tg5047$s7llvm_O3SbSi6offset_Si1l_Si1rt7elementt_SiAB_o3AC_O13ADtAEttXEfU0_Tf1nnnnc_n"(i8* nonnull %198, i8* nonnull %200, i8* nonnull %202, i8* nonnull %175, %swift.refcounted* swiftself undef, %swift.error** noalias nocapture nonnull swifterror dereferenceable(8) %2)
  %204 = load %swift.error*, %swift.error** %2, align 8
  %.not = icmp eq %swift.error* %204, null
  br i1 %.not, label %205, label %.loopexit296

205:                                              ; preds = %195
  %206 = icmp slt i64 %194, %193
  br i1 %206, label %329, label %207, !prof !7

207:                                              ; preds = %205
  %208 = getelementptr %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %187, i64 0, i32 0
  %209 = tail call zeroext i1 @swift_isUniquelyReferenced_nonNull_native(%swift.refcounted* %208) #25
  br i1 %209, label %212, label %210

210:                                              ; preds = %207
  %211 = tail call swiftcc %Ts28__ContiguousArrayStorageBaseC* @"$ss22_ContiguousArrayBufferV20_consumeAndCreateNewAByxGyFSnySiG_Tgq5"(%Ts28__ContiguousArrayStorageBaseC* nonnull %187)
  br label %212

212:                                              ; preds = %207, %210
  %213 = phi %Ts28__ContiguousArrayStorageBaseC* [ %211, %210 ], [ %187, %207 ]
  %._storage11.count._value = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %213, i64 0, i32 1, i32 0, i32 0, i32 0
  %214 = load i64, i64* %._storage11.count._value, align 8, !range !6
  %.not144 = icmp ult i64 %189, %214
  br i1 %.not144, label %215, label %330, !prof !8

215:                                              ; preds = %212
  %216 = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %213, i64 1
  %tailaddr12 = bitcast %Ts28__ContiguousArrayStorageBaseC* %216 to %TSnySiG*
  %.lowerBound13._value = getelementptr inbounds %TSnySiG, %TSnySiG* %tailaddr12, i64 %189, i32 0, i32 0
  store i64 %193, i64* %.lowerBound13._value, align 8
  %.upperBound14._value = getelementptr inbounds %TSnySiG, %TSnySiG* %tailaddr12, i64 %189, i32 1, i32 0
  store i64 %194, i64* %.upperBound14._value, align 8
  %217 = load i64, i64* %._storage11.count._value, align 8, !range !6
  %.not145 = icmp ugt i64 %186, %217
  br i1 %.not145, label %331, label %218, !prof !7

218:                                              ; preds = %215
  %219 = add nsw i64 %217, -1
  %220 = sub nsw i64 %219, %188
  %221 = getelementptr inbounds %TSnySiG, %TSnySiG* %tailaddr12, i64 %186
  %222 = bitcast %TSnySiG* %221 to i8*
  %223 = getelementptr inbounds %TSnySiG, %TSnySiG* %tailaddr12, i64 %188
  %224 = bitcast %TSnySiG* %223 to i8*
  %225 = shl nuw i64 %220, 4
  tail call void @llvm.memmove.p0i8.p0i8.i64(i8* nonnull align 8 %224, i8* nonnull align 8 %222, i64 %225, i1 false)
  store i64 %219, i64* %._storage11.count._value, align 8
  %226 = icmp ugt i64 %217, 2
  br i1 %226, label %185, label %.loopexit297

.loopexit297:                                     ; preds = %218, %.loopexit162
  %.lcssa270.sink = phi %Ts28__ContiguousArrayStorageBaseC* [ %178, %.loopexit162 ], [ %213, %218 ]
  %227 = getelementptr %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %.lcssa270.sink, i64 0, i32 0
  tail call void @swift_release(%swift.refcounted* %227) #9
  %._storage5.count._value = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %176, i64 0, i32 1, i32 0, i32 0, i32 0
  store i64 0, i64* %._storage5.count._value, align 8
  %228 = getelementptr %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %176, i64 0, i32 0
  tail call void @swift_release(%swift.refcounted* %228) #9
  br label %common.ret

common.ret:                                       ; preds = %321, %13, %.loopexit297, %.loopexit296
  ret void

.loopexit296:                                     ; preds = %242, %195
  %.lcssa289.sink = phi %Ts28__ContiguousArrayStorageBaseC* [ %187, %195 ], [ %107, %242 ]
  %229 = phi %Ts28__ContiguousArrayStorageBaseC* [ %176, %195 ], [ %22, %242 ]
  %230 = phi %swift.error* [ %204, %195 ], [ %252, %242 ]
  %231 = getelementptr %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %.lcssa289.sink, i64 0, i32 0
  tail call void @swift_release(%swift.refcounted* %231) #9
  %._storage10.count._value = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %229, i64 0, i32 1, i32 0, i32 0, i32 0
  store i64 0, i64* %._storage10.count._value, align 8
  %232 = getelementptr %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %229, i64 0, i32 0
  tail call void @swift_release(%swift.refcounted* %232) #9
  store %swift.error* %230, %swift.error** %2, align 8
  br label %common.ret

233:                                              ; preds = %274, %267, %169
  %234 = phi i64 [ %113, %169 ], [ %.71, %267 ], [ %.72, %274 ]
  %235 = add nsw i64 %234, -1
  %.not147 = icmp ult i64 %235, %112
  br i1 %.not147, label %236, label %338, !prof !8

236:                                              ; preds = %233
  %.lowerBound36._value = getelementptr inbounds %TSnySiG, %TSnySiG* %tailaddr21, i64 %235, i32 0, i32 0
  %237 = load i64, i64* %.lowerBound36._value, align 8
  %238 = getelementptr inbounds %TSnySiG, %TSnySiG* %tailaddr21, i64 %234
  %.upperBound38._value = getelementptr inbounds %TSnySiG, %TSnySiG* %tailaddr21, i64 %234, i32 1, i32 0
  %239 = load i64, i64* %.upperBound38._value, align 8
  %240 = load i64, i64* %23, align 8
  %241 = icmp eq i64 %240, 0
  br i1 %241, label %339, label %242

242:                                              ; preds = %236
  %.lowerBound37._value = getelementptr inbounds %TSnySiG, %TSnySiG* %238, i64 0, i32 0, i32 0
  %243 = load i64, i64* %.lowerBound37._value, align 8
  %244 = inttoptr i64 %240 to <{ %TSi, <{ %TSi, %TSi }> }>*
  %245 = getelementptr inbounds <{ %TSi, <{ %TSi, %TSi }> }>, <{ %TSi, <{ %TSi, %TSi }> }>* %244, i64 %237
  %246 = bitcast <{ %TSi, <{ %TSi, %TSi }> }>* %245 to i8*
  %247 = getelementptr inbounds <{ %TSi, <{ %TSi, %TSi }> }>, <{ %TSi, <{ %TSi, %TSi }> }>* %244, i64 %243
  %248 = bitcast <{ %TSi, <{ %TSi, %TSi }> }>* %247 to i8*
  %249 = getelementptr inbounds <{ %TSi, <{ %TSi, %TSi }> }>, <{ %TSi, <{ %TSi, %TSi }> }>* %244, i64 %239
  %250 = bitcast <{ %TSi, <{ %TSi, %TSi }> }>* %249 to i8*
  %251 = tail call swiftcc i1 @"$ss6_merge3low3mid4high6buffer2bySbSpyxG_A3GSbx_xtKXEtKlFSi6offset_Si1l_Si1rt7elementt_Tg5047$s7llvm_O3SbSi6offset_Si1l_Si1rt7elementt_SiAB_o3AC_O13ADtAEttXEfU0_Tf1nnnnc_n"(i8* nonnull %246, i8* nonnull %248, i8* nonnull %250, i8* nonnull %21, %swift.refcounted* swiftself undef, %swift.error** noalias nocapture nonnull swifterror dereferenceable(8) %2)
  %252 = load %swift.error*, %swift.error** %2, align 8
  %.not149 = icmp eq %swift.error* %252, null
  br i1 %.not149, label %253, label %.loopexit296

253:                                              ; preds = %242
  %254 = icmp slt i64 %239, %237
  br i1 %254, label %340, label %255, !prof !7

255:                                              ; preds = %253
  %256 = load i64, i64* %._storage20.count._value, align 8, !range !6
  %.not150 = icmp ult i64 %235, %256
  br i1 %.not150, label %257, label %341, !prof !8

257:                                              ; preds = %255
  store i64 %237, i64* %.lowerBound36._value, align 8
  %.upperBound42._value = getelementptr inbounds %TSnySiG, %TSnySiG* %tailaddr21, i64 %235, i32 1, i32 0
  store i64 %239, i64* %.upperBound42._value, align 8
  %258 = load i64, i64* %._storage20.count._value, align 8, !range !6
  %.not151 = icmp ult i64 %234, %258
  br i1 %.not151, label %259, label %342, !prof !8

259:                                              ; preds = %257
  %260 = add nsw i64 %258, -1
  %261 = sub nsw i64 %260, %234
  %262 = getelementptr inbounds %TSnySiG, %TSnySiG* %238, i64 1
  %263 = bitcast %TSnySiG* %262 to i8*
  %264 = bitcast %TSnySiG* %238 to i8*
  %265 = shl nuw i64 %261, 4
  tail call void @llvm.memmove.p0i8.p0i8.i64(i8* nonnull align 8 %264, i8* nonnull align 8 %263, i64 %265, i1 false)
  store i64 %260, i64* %._storage20.count._value, align 8
  %266 = icmp ugt i64 %258, 2
  br i1 %266, label %111, label %.loopexit

267:                                              ; preds = %160
  %268 = icmp slt i64 %.pre-phi249, %155
  %.71 = select i1 %268, i64 %145, i64 %113
  br label %233

269:                                              ; preds = %139
  %.lowerBound33._value = getelementptr inbounds %TSnySiG, %TSnySiG* %tailaddr21, i64 %113, i32 0, i32 0
  %270 = load i64, i64* %.lowerBound33._value, align 8
  %.upperBound34._value = getelementptr inbounds %TSnySiG, %TSnySiG* %tailaddr21, i64 %113, i32 1, i32 0
  %271 = load i64, i64* %.upperBound34._value, align 8
  %272 = tail call { i64, i1 } @llvm.ssub.with.overflow.i64(i64 %271, i64 %270)
  %273 = extractvalue { i64, i1 } %272, 1
  br i1 %273, label %337, label %274, !prof !7

274:                                              ; preds = %269
  %275 = extractvalue { i64, i1 } %272, 0
  %276 = icmp slt i64 %127, %275
  %.72 = select i1 %276, i64 %130, i64 %113
  br label %233

.preheader:                                       ; preds = %86, %297
  %277 = phi i64 [ %298, %297 ], [ %70, %86 ]
  br label %278

278:                                              ; preds = %290, %.preheader
  %279 = phi i64 [ %277, %.preheader ], [ %280, %290 ]
  %280 = add i64 %279, -1
  %281 = load i64, i64* %23, align 8
  %282 = inttoptr i64 %281 to <{ %TSi, <{ %TSi, %TSi }> }>*
  %283 = getelementptr inbounds <{ %TSi, <{ %TSi, %TSi }> }>, <{ %TSi, <{ %TSi, %TSi }> }>* %282, i64 %279
  %.element56.r._value = getelementptr inbounds <{ %TSi, <{ %TSi, %TSi }> }>, <{ %TSi, <{ %TSi, %TSi }> }>* %282, i64 %279, i32 1, i32 1, i32 0
  %284 = load i64, i64* %.element56.r._value, align 8
  %285 = getelementptr inbounds <{ %TSi, <{ %TSi, %TSi }> }>, <{ %TSi, <{ %TSi, %TSi }> }>* %282, i64 %280
  %.element57.r._value = getelementptr inbounds <{ %TSi, <{ %TSi, %TSi }> }>, <{ %TSi, <{ %TSi, %TSi }> }>* %282, i64 %280, i32 1, i32 1, i32 0
  %286 = load i64, i64* %.element57.r._value, align 8
  %287 = icmp slt i64 %286, %284
  br i1 %287, label %288, label %297

288:                                              ; preds = %278
  %289 = icmp eq i64 %281, 0
  br i1 %289, label %352, label %290

290:                                              ; preds = %288
  %291 = bitcast <{ %TSi, <{ %TSi, %TSi }> }>* %285 to i8*
  %292 = bitcast <{ %TSi, <{ %TSi, %TSi }> }>* %283 to i8*
  %293 = bitcast <{ %TSi, <{ %TSi, %TSi }> }>* %283 to <2 x i64>*
  %294 = load <2 x i64>, <2 x i64>* %293, align 8
  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* noundef nonnull align 8 dereferenceable(24) %292, i8* noundef nonnull align 8 dereferenceable(24) %291, i64 24, i1 false)
  %295 = bitcast <{ %TSi, <{ %TSi, %TSi }> }>* %285 to <2 x i64>*
  store <2 x i64> %294, <2 x i64>* %295, align 8
  store i64 %284, i64* %.element57.r._value, align 8
  %296 = icmp eq i64 %280, %25
  br i1 %296, label %297, label %278

297:                                              ; preds = %290, %278
  %298 = add i64 %277, 1
  %299 = icmp eq i64 %298, %84
  br i1 %299, label %.loopexit156, label %.preheader

300:                                              ; preds = %.preheader163, %321
  %301 = phi i64 [ %322, %321 ], [ 1, %.preheader163 ]
  br label %302

302:                                              ; preds = %314, %300
  %303 = phi i64 [ %301, %300 ], [ %304, %314 ]
  %304 = add nsw i64 %303, -1
  %305 = load i64, i64* %14, align 8
  %306 = inttoptr i64 %305 to <{ %TSi, <{ %TSi, %TSi }> }>*
  %307 = getelementptr inbounds <{ %TSi, <{ %TSi, %TSi }> }>, <{ %TSi, <{ %TSi, %TSi }> }>* %306, i64 %303
  %.element.r._value = getelementptr inbounds <{ %TSi, <{ %TSi, %TSi }> }>, <{ %TSi, <{ %TSi, %TSi }> }>* %306, i64 %303, i32 1, i32 1, i32 0
  %308 = load i64, i64* %.element.r._value, align 8
  %309 = getelementptr inbounds <{ %TSi, <{ %TSi, %TSi }> }>, <{ %TSi, <{ %TSi, %TSi }> }>* %306, i64 %304
  %.element1.r._value = getelementptr inbounds <{ %TSi, <{ %TSi, %TSi }> }>, <{ %TSi, <{ %TSi, %TSi }> }>* %306, i64 %304, i32 1, i32 1, i32 0
  %310 = load i64, i64* %.element1.r._value, align 8
  %311 = icmp slt i64 %310, %308
  br i1 %311, label %312, label %321

312:                                              ; preds = %302
  %313 = icmp eq i64 %305, 0
  br i1 %313, label %325, label %314

314:                                              ; preds = %312
  %315 = bitcast <{ %TSi, <{ %TSi, %TSi }> }>* %309 to i8*
  %316 = bitcast <{ %TSi, <{ %TSi, %TSi }> }>* %307 to i8*
  %317 = bitcast <{ %TSi, <{ %TSi, %TSi }> }>* %307 to <2 x i64>*
  %318 = load <2 x i64>, <2 x i64>* %317, align 8
  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* noundef nonnull align 8 dereferenceable(24) %316, i8* noundef nonnull align 8 dereferenceable(24) %315, i64 24, i1 false)
  %319 = bitcast <{ %TSi, <{ %TSi, %TSi }> }>* %309 to <2 x i64>*
  store <2 x i64> %318, <2 x i64>* %319, align 8
  store i64 %308, i64* %.element1.r._value, align 8
  %320 = icmp eq i64 %304, 0
  br i1 %320, label %321, label %302

321:                                              ; preds = %314, %302
  %322 = add nuw nsw i64 %301, 1
  %323 = icmp eq i64 %322, %3
  br i1 %323, label %common.ret, label %300

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

325:                                              ; preds = %312
  tail call void asm sideeffect "", "n"(i32 1) #9
  tail call void @llvm.trap()
  unreachable

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

327:                                              ; preds = %185
  tail call void asm sideeffect "", "n"(i32 5) #9
  tail call void @llvm.trap()
  unreachable

328:                                              ; preds = %191
  tail call void asm sideeffect "", "n"(i32 7) #9
  tail call void @llvm.trap()
  unreachable

329:                                              ; preds = %205
  tail call void asm sideeffect "", "n"(i32 8) #9
  tail call void @llvm.trap()
  unreachable

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

331:                                              ; preds = %215
  tail call void asm sideeffect "", "n"(i32 10) #9
  tail call void @llvm.trap()
  unreachable

332:                                              ; preds = %.loopexit156
  tail call void asm sideeffect "", "n"(i32 13) #9
  tail call void @llvm.trap()
  unreachable

333:                                              ; preds = %115
  tail call void asm sideeffect "", "n"(i32 16) #9
  tail call void @llvm.trap()
  unreachable

334:                                              ; preds = %122
  tail call void asm sideeffect "", "n"(i32 18) #9
  tail call void @llvm.trap()
  unreachable

335:                                              ; preds = %129
  tail call void asm sideeffect "", "n"(i32 20) #9
  tail call void @llvm.trap()
  unreachable

336:                                              ; preds = %135
  tail call void asm sideeffect "", "n"(i32 21) #9
  tail call void @llvm.trap()
  unreachable

337:                                              ; preds = %269
  tail call void asm sideeffect "", "n"(i32 24) #9
  tail call void @llvm.trap()
  unreachable

338:                                              ; preds = %233
  tail call void asm sideeffect "", "n"(i32 26) #9
  tail call void @llvm.trap()
  unreachable

339:                                              ; preds = %236
  tail call void asm sideeffect "", "n"(i32 28) #9
  tail call void @llvm.trap()
  unreachable

340:                                              ; preds = %253
  tail call void asm sideeffect "", "n"(i32 29) #9
  tail call void @llvm.trap()
  unreachable

341:                                              ; preds = %255
  tail call void asm sideeffect "", "n"(i32 30) #9
  tail call void @llvm.trap()
  unreachable

342:                                              ; preds = %257
  tail call void asm sideeffect "", "n"(i32 31) #9
  tail call void @llvm.trap()
  unreachable

343:                                              ; preds = %.thread
  tail call void asm sideeffect "", "n"(i32 35) #9
  tail call void @llvm.trap()
  unreachable

344:                                              ; preds = %144
  tail call void asm sideeffect "", "n"(i32 37) #9
  tail call void @llvm.trap()
  unreachable

345:                                              ; preds = %151
  tail call void asm sideeffect "", "n"(i32 39) #9
  tail call void @llvm.trap()
  unreachable

346:                                              ; preds = %157
  tail call void asm sideeffect "", "n"(i32 40) #9
  tail call void @llvm.trap()
  unreachable

347:                                              ; preds = %.thread153
  tail call void asm sideeffect "", "n"(i32 45) #9
  tail call void @llvm.trap()
  unreachable

348:                                              ; preds = %164
  tail call void asm sideeffect "", "n"(i32 47) #9
  tail call void @llvm.trap()
  unreachable

349:                                              ; preds = %73
  tail call void asm sideeffect "", "n"(i32 48) #9
  tail call void @llvm.trap()
  unreachable

350:                                              ; preds = %79
  tail call void asm sideeffect "", "n"(i32 49) #9
  tail call void @llvm.trap()
  unreachable

351:                                              ; preds = %82
  tail call void asm sideeffect "", "n"(i32 50) #9
  tail call void @llvm.trap()
  unreachable

352:                                              ; preds = %288
  tail call void asm sideeffect "", "n"(i32 51) #9
  tail call void @llvm.trap()
  unreachable

353:                                              ; preds = %46
  tail call void asm sideeffect "", "n"(i32 52) #9
  tail call void @llvm.trap()
  unreachable

354:                                              ; preds = %55
  tail call void asm sideeffect "", "n"(i32 53) #9
  tail call void @llvm.trap()
  unreachable
}

declare swiftcc i64 @"$ss22_minimumMergeRunLengthyS2iF"(i64) local_unnamed_addr #0

define linkonce_odr hidden swiftcc i1 @"$ss6_merge3low3mid4high6buffer2bySbSpyxG_A3GSbx_xtKXEtKlFSi6offset_Si1l_Si1rt7elementt_Tg5047$s7llvm_O3SbSi6offset_Si1l_Si1rt7elementt_SiAB_o3AC_O13ADtAEttXEfU0_Tf1nnnnc_n"(i8* %0, i8* %1, i8* %2, i8* %3, %swift.refcounted* swiftself %4, %swift.error** noalias nocapture swifterror dereferenceable(8) %5) local_unnamed_addr #0 {
entry:
  %6 = ptrtoint i8* %1 to i64
  %7 = ptrtoint i8* %0 to i64
  %8 = sub i64 %6, %7
  %9 = sdiv i64 %8, 24
  %10 = ptrtoint i8* %2 to i64
  %11 = sub i64 %10, %6
  %12 = sdiv i64 %11, 24
  %13 = icmp slt i64 %9, %12
  br i1 %13, label %14, label %20

14:                                               ; preds = %entry
  %15 = bitcast i8* %0 to <{ %TSi, <{ %TSi, %TSi }> }>*
  %16 = getelementptr inbounds <{ %TSi, <{ %TSi, %TSi }> }>, <{ %TSi, <{ %TSi, %TSi }> }>* %15, i64 %9
  %17 = bitcast <{ %TSi, <{ %TSi, %TSi }> }>* %16 to i8*
  %18 = icmp ugt i8* %17, %3
  %19 = icmp eq i8* %3, %0
  %or.cond77 = select i1 %19, i1 %18, i1 false
  br i1 %or.cond77, label %27, label %.sink.split

20:                                               ; preds = %entry
  %21 = bitcast i8* %1 to <{ %TSi, <{ %TSi, %TSi }> }>*
  %22 = getelementptr inbounds <{ %TSi, <{ %TSi, %TSi }> }>, <{ %TSi, <{ %TSi, %TSi }> }>* %21, i64 %12
  %23 = bitcast <{ %TSi, <{ %TSi, %TSi }> }>* %22 to i8*
  %24 = icmp ugt i8* %23, %3
  %25 = icmp eq i8* %3, %1
  %or.cond80 = select i1 %25, i1 %24, i1 false
  br i1 %or.cond80, label %67, label %.sink.split68

.sink.split:                                      ; preds = %14
  %26 = mul nuw nsw i64 %9, 24
  tail call void @llvm.memmove.p0i8.p0i8.i64(i8* align 8 %3, i8* align 8 %0, i64 %26, i1 false)
  br label %27

27:                                               ; preds = %14, %.sink.split
  %28 = bitcast i8* %3 to <{ %TSi, <{ %TSi, %TSi }> }>*
  %29 = getelementptr inbounds <{ %TSi, <{ %TSi, %TSi }> }>, <{ %TSi, <{ %TSi, %TSi }> }>* %28, i64 %9
  %30 = bitcast <{ %TSi, <{ %TSi, %TSi }> }>* %29 to i8*
  %31 = icmp ugt i8* %30, %3
  %32 = icmp ult i8* %1, %2
  %or.cond7 = select i1 %31, i1 %32, i1 false
  br i1 %or.cond7, label %.preheader, label %.loopexit

.preheader:                                       ; preds = %27, %47
  %33 = phi i8* [ %48, %47 ], [ %1, %27 ]
  %34 = phi i8* [ %49, %47 ], [ %3, %27 ]
  %35 = phi i8* [ %50, %47 ], [ %0, %27 ]
  %.element2.r = getelementptr inbounds i8, i8* %33, i64 16
  %.element2.r._value = bitcast i8* %.element2.r to i64*
  %36 = load i64, i64* %.element2.r._value, align 8
  %.element3.r = getelementptr inbounds i8, i8* %34, i64 16
  %.element3.r._value = bitcast i8* %.element3.r to i64*
  %37 = load i64, i64* %.element3.r._value, align 8
  %38 = icmp slt i64 %37, %36
  br i1 %38, label %39, label %43

39:                                               ; preds = %.preheader
  %40 = getelementptr inbounds i8, i8* %33, i64 24
  %41 = icmp ult i8* %35, %40
  %42 = icmp eq i8* %35, %33
  %or.cond75 = select i1 %42, i1 %41, i1 false
  br i1 %or.cond75, label %47, label %.sink.split64

43:                                               ; preds = %.preheader
  %44 = getelementptr inbounds i8, i8* %34, i64 24
  %45 = icmp ult i8* %35, %44
  %46 = icmp eq i8* %35, %34
  %or.cond76 = select i1 %46, i1 %45, i1 false
  br i1 %or.cond76, label %47, label %.sink.split64

.sink.split64:                                    ; preds = %39, %43
  %.sink = phi i8* [ %34, %43 ], [ %33, %39 ]
  %.ph = phi i8* [ %33, %43 ], [ %40, %39 ]
  %.ph65 = phi i8* [ %44, %43 ], [ %34, %39 ]
  tail call void @llvm.memmove.p0i8.p0i8.i64(i8* noundef nonnull align 8 dereferenceable(24) %35, i8* noundef nonnull align 8 dereferenceable(24) %.sink, i64 24, i1 false)
  br label %47

47:                                               ; preds = %43, %39, %.sink.split64
  %48 = phi i8* [ %.ph, %.sink.split64 ], [ %40, %39 ], [ %33, %43 ]
  %49 = phi i8* [ %.ph65, %.sink.split64 ], [ %34, %39 ], [ %44, %43 ]
  %50 = getelementptr inbounds i8, i8* %35, i64 24
  %51 = icmp ult i8* %49, %30
  %52 = icmp ult i8* %48, %2
  %or.cond11 = select i1 %51, i1 %52, i1 false
  br i1 %or.cond11, label %.preheader, label %.loopexit.loopexit

.loopexit.loopexit:                               ; preds = %47
  %.pre = bitcast i8* %49 to <{ %TSi, <{ %TSi, %TSi }> }>*
  br label %.loopexit

.loopexit:                                        ; preds = %88, %.loopexit.loopexit, %67, %27
  %.pre-phi = phi <{ %TSi, <{ %TSi, %TSi }> }>* [ %.pre, %.loopexit.loopexit ], [ %68, %67 ], [ %28, %27 ], [ %68, %88 ]
  %53 = phi i8* [ %30, %.loopexit.loopexit ], [ %70, %67 ], [ %30, %27 ], [ %90, %88 ]
  %54 = phi i8* [ %49, %.loopexit.loopexit ], [ %3, %67 ], [ %3, %27 ], [ %3, %88 ]
  %55 = phi i8* [ %50, %.loopexit.loopexit ], [ %1, %67 ], [ %0, %27 ], [ %89, %88 ]
  %56 = ptrtoint i8* %53 to i64
  %57 = ptrtoint i8* %54 to i64
  %58 = sub i64 %56, %57
  %59 = sdiv i64 %58, 24
  %60 = getelementptr inbounds <{ %TSi, <{ %TSi, %TSi }> }>, <{ %TSi, <{ %TSi, %TSi }> }>* %.pre-phi, i64 %59
  %61 = bitcast <{ %TSi, <{ %TSi, %TSi }> }>* %60 to i8*
  %62 = icmp ult i8* %55, %61
  %63 = icmp eq i8* %55, %54
  %or.cond74 = select i1 %63, i1 %62, i1 false
  br i1 %or.cond74, label %65, label %.sink.split66

.sink.split66:                                    ; preds = %.loopexit
  %64 = mul nuw nsw i64 %59, 24
  tail call void @llvm.memmove.p0i8.p0i8.i64(i8* align 8 %55, i8* align 8 %54, i64 %64, i1 false)
  br label %65

65:                                               ; preds = %.loopexit, %.sink.split66
  ret i1 true

.sink.split68:                                    ; preds = %20
  %66 = mul nuw nsw i64 %12, 24
  tail call void @llvm.memmove.p0i8.p0i8.i64(i8* align 8 %3, i8* align 8 %1, i64 %66, i1 false)
  br label %67

67:                                               ; preds = %20, %.sink.split68
  %68 = bitcast i8* %3 to <{ %TSi, <{ %TSi, %TSi }> }>*
  %69 = getelementptr inbounds <{ %TSi, <{ %TSi, %TSi }> }>, <{ %TSi, <{ %TSi, %TSi }> }>* %68, i64 %12
  %70 = bitcast <{ %TSi, <{ %TSi, %TSi }> }>* %69 to i8*
  %71 = icmp ugt i8* %70, %3
  %72 = icmp ult i8* %0, %1
  %or.cond23 = select i1 %71, i1 %72, i1 false
  br i1 %or.cond23, label %.preheader51, label %.loopexit

.preheader51:                                     ; preds = %67, %88
  %73 = phi i8* [ %76, %88 ], [ %2, %67 ]
  %74 = phi i8* [ %89, %88 ], [ %1, %67 ]
  %75 = phi i8* [ %90, %88 ], [ %70, %67 ]
  %76 = getelementptr inbounds i8, i8* %73, i64 -24
  %.element.r = getelementptr inbounds i8, i8* %75, i64 -8
  %.element.r._value = bitcast i8* %.element.r to i64*
  %77 = load i64, i64* %.element.r._value, align 8
  %.element1.r = getelementptr inbounds i8, i8* %74, i64 -8
  %.element1.r._value = bitcast i8* %.element1.r to i64*
  %78 = load i64, i64* %.element1.r._value, align 8
  %79 = icmp slt i64 %78, %77
  br i1 %79, label %80, label %84

80:                                               ; preds = %.preheader51
  %81 = getelementptr inbounds i8, i8* %74, i64 -24
  %82 = icmp ult i8* %76, %74
  %83 = icmp eq i8* %73, %74
  %or.cond78 = select i1 %83, i1 %82, i1 false
  br i1 %or.cond78, label %88, label %.sink.split70

84:                                               ; preds = %.preheader51
  %85 = getelementptr inbounds i8, i8* %75, i64 -24
  %86 = icmp ult i8* %76, %75
  %87 = icmp eq i8* %73, %75
  %or.cond79 = select i1 %87, i1 %86, i1 false
  br i1 %or.cond79, label %88, label %.sink.split70

.sink.split70:                                    ; preds = %80, %84
  %.sink73 = phi i8* [ %85, %84 ], [ %81, %80 ]
  %.ph71 = phi i8* [ %74, %84 ], [ %81, %80 ]
  %.ph72 = phi i8* [ %85, %84 ], [ %75, %80 ]
  tail call void @llvm.memmove.p0i8.p0i8.i64(i8* noundef nonnull align 8 dereferenceable(24) %76, i8* noundef nonnull align 8 dereferenceable(24) %.sink73, i64 24, i1 false)
  br label %88

88:                                               ; preds = %84, %80, %.sink.split70
  %89 = phi i8* [ %.ph71, %.sink.split70 ], [ %81, %80 ], [ %74, %84 ]
  %90 = phi i8* [ %.ph72, %.sink.split70 ], [ %75, %80 ], [ %85, %84 ]
  %91 = icmp ugt i8* %90, %3
  %92 = icmp ugt i8* %89, %0
  %or.cond27 = select i1 %91, i1 %92, i1 false
  br i1 %or.cond27, label %.preheader51, label %.loopexit
}

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

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

14:                                               ; preds = %11, %4, %entry
  %15 = phi i64 [ %1, %entry ], [ %6, %4 ], [ %13, %11 ]
  %._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_ContiguousArrayStorageCySnySiGGMD") #26
  %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) #9
  %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) #28
  %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 = bitcast %Ts28__ContiguousArrayStorageBaseC* %31 to i8*
  %33 = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %3, i64 1
  %34 = bitcast %Ts28__ContiguousArrayStorageBaseC* %33 to i8*
  br i1 %0, label %37, label %35

35:                                               ; preds = %29
  %36 = shl nuw i64 %16, 4
  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* nonnull align 8 %32, i8* nonnull align 8 %34, i64 %36, i1 false)
  br label %44

37:                                               ; preds = %29
  %tailaddr4 = bitcast %Ts28__ContiguousArrayStorageBaseC* %33 to %TSnySiG*
  %38 = getelementptr inbounds %TSnySiG, %TSnySiG* %tailaddr4, i64 %16
  %39 = bitcast %TSnySiG* %38 to %Ts28__ContiguousArrayStorageBaseC*
  %40 = icmp ult %Ts28__ContiguousArrayStorageBaseC* %31, %39
  %41 = icmp eq %Ts28__ContiguousArrayStorageBaseC* %30, %3
  %or.cond14 = select i1 %41, i1 %40, i1 false
  br i1 %or.cond14, label %43, label %.sink.split

.sink.split:                                      ; preds = %37
  %42 = shl nuw i64 %16, 4
  tail call void @llvm.memmove.p0i8.p0i8.i64(i8* nonnull align 8 %32, i8* nonnull align 8 %34, i64 %42, i1 false)
  br label %43

43:                                               ; preds = %37, %.sink.split
  store i64 0, i64* %._storage.count._value, align 8
  br label %44

44:                                               ; preds = %43, %35
  %45 = getelementptr %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %3, i64 0, i32 0
  tail call void @swift_release(%swift.refcounted* %45) #9
  ret %Ts28__ContiguousArrayStorageBaseC* %30

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

; Function Attrs: noinline
define linkonce_odr hidden swiftcc %Ts28__ContiguousArrayStorageBaseC* @"$ss22_ContiguousArrayBufferV20_consumeAndCreateNewAByxGyFSnySiG_Tgq5"(%Ts28__ContiguousArrayStorageBaseC* %0) local_unnamed_addr #5 {
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 = tail call swiftcc %Ts28__ContiguousArrayStorageBaseC* @"$ss22_ContiguousArrayBufferV20_consumeAndCreateNew14bufferIsUnique15minimumCapacity13growForAppendAByxGSb_SiSbtFSnySiG_Tgq5"(i1 false, i64 %1, i1 false, %Ts28__ContiguousArrayStorageBaseC* %0)
  ret %Ts28__ContiguousArrayStorageBaseC* %2
}

; Function Attrs: noinline
define linkonce_odr hidden swiftcc void @"$ss15ContiguousArrayV16_createNewBuffer14bufferIsUnique15minimumCapacity13growForAppendySb_SiSbtFSS_Tg5"(i1 %0, i64 %1, i1 %2, %Ts15ContiguousArrayV* nocapture swiftself dereferenceable(8) %3) local_unnamed_addr #5 {
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_SiSbtFSS_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 void @"$ss15ContiguousArrayV16_createNewBuffer14bufferIsUnique15minimumCapacity13growForAppendySb_SiSbtFSi_Tg5"(i1 %0, i64 %1, i1 %2, %Ts15ContiguousArrayV* nocapture swiftself dereferenceable(8) %3) local_unnamed_addr #5 {
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: cold noreturn nounwind
declare void @llvm.trap() #6

; Function Attrs: mustprogress nocallback nofree nosync nounwind readnone speculatable willreturn
declare { i64, i1 } @llvm.ssub.with.overflow.i64(i64, i64) #7

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind readnone speculatable willreturn
declare { i64, i1 } @llvm.sadd.with.overflow.i64(i64, i64) #7

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

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

; Function Attrs: nounwind
declare void @swift_beginAccess(i8*, [24 x i8]*, i64, i8*) local_unnamed_addr #9

declare swiftcc void @"$ss15__VaListBuilderC6appendyys7CVarArg_pF"(%Ts7CVarArgP* noalias nocapture dereferenceable(40), %Ts15__VaListBuilderC* swiftself) local_unnamed_addr #0

define linkonce_odr hidden swiftcc %Ts28__ContiguousArrayStorageBaseC* @"$ss30_copySequenceToContiguousArrayys0dE0Vy7ElementQzGxSTRzlFs010EnumeratedB0VySaySi1l_Si1rtGG_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 %15, label %3

3:                                                ; preds = %entry
  %4 = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %0, i64 1
  %tailaddr = bitcast %Ts28__ContiguousArrayStorageBaseC* %4 to <{ %TSi, %TSi }>*
  %5 = getelementptr %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %0, i64 0, i32 0
  %6 = tail call %swift.refcounted* @swift_retain(%swift.refcounted* returned %5) #25
  br label %7

7:                                                ; preds = %60, %3
  %8 = phi i64 [ 0, %3 ], [ %61, %60 ]
  %9 = phi <{ %TSi, <{ %TSi, %TSi }> }>* [ bitcast (%struct.HeapMetadata** getelementptr inbounds (%struct._SwiftEmptyArrayStorage, %struct._SwiftEmptyArrayStorage* @_swiftEmptyArrayStorage, i64 1, i32 0, i32 0) to <{ %TSi, <{ %TSi, %TSi }> }>*), %3 ], [ %65, %60 ]
  %10 = phi %Ts28__ContiguousArrayStorageBaseC* [ bitcast (%struct._SwiftEmptyArrayStorage* @_swiftEmptyArrayStorage to %Ts28__ContiguousArrayStorageBaseC*), %3 ], [ %57, %60 ]
  %11 = phi i64 [ 0, %3 ], [ %62, %60 ]
  %.l._value = getelementptr inbounds <{ %TSi, %TSi }>, <{ %TSi, %TSi }>* %tailaddr, i64 %11, i32 0, i32 0
  %12 = bitcast i64* %.l._value to <2 x i64>*
  %13 = load <2 x i64>, <2 x i64>* %12, align 8
  %14 = icmp eq i64 %8, 0
  br i1 %14, label %20, label %54

15:                                               ; preds = %entry, %66
  %16 = phi i64 [ %67, %66 ], [ 0, %entry ]
  %17 = phi %Ts28__ContiguousArrayStorageBaseC* [ %57, %66 ], [ bitcast (%struct._SwiftEmptyArrayStorage* @_swiftEmptyArrayStorage to %Ts28__ContiguousArrayStorageBaseC*), %entry ]
  %._storage1._capacityAndFlags._value = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %17, i64 0, i32 1, i32 0, i32 1, i32 0
  %18 = load i64, i64* %._storage1._capacityAndFlags._value, align 8
  %19 = icmp ult i64 %18, 2
  br i1 %19, label %77, label %71

20:                                               ; preds = %7
  %._storage2._capacityAndFlags._value = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %10, i64 0, i32 1, i32 0, i32 1, i32 0
  %21 = load i64, i64* %._storage2._capacityAndFlags._value, align 8
  %22 = lshr i64 %21, 1
  %23 = add nuw i64 %22, 4611686018427387904
  %24 = icmp slt i64 %23, 0
  br i1 %24, label %80, label %25, !prof !7

25:                                               ; preds = %20
  %26 = and i64 %21, -2
  %27 = tail call i64 @llvm.smax.i64(i64 %26, i64 1)
  %28 = tail call %swift.type* @__swift_instantiateConcreteTypeFromMangledName({ i32, i32 }* nonnull @"$ss23_ContiguousArrayStorageCySi6offset_Si1l_Si1rt7elementtGMD") #26
  %29 = mul i64 %27, 24
  %30 = add i64 %29, 32
  %31 = tail call noalias %swift.refcounted* @swift_allocObject(%swift.type* %28, i64 %30, i64 7) #9
  %32 = bitcast %swift.refcounted* %31 to %Ts28__ContiguousArrayStorageBaseC*
  %33 = bitcast %swift.refcounted* %31 to i8*
  %call.i = tail call i64 @malloc_usable_size(i8* noundef %33) #28
  %gepdiff = add nsw i64 %call.i, -32
  %34 = sdiv i64 %gepdiff, 24
  %35 = shl nsw i64 %34, 1
  %36 = getelementptr inbounds %swift.refcounted, %swift.refcounted* %31, i64 1
  %._storage9.count._value = bitcast %swift.refcounted* %36 to i64*
  store i64 %27, i64* %._storage9.count._value, align 8
  %._storage9._capacityAndFlags = getelementptr inbounds %swift.refcounted, %swift.refcounted* %31, i64 1, i32 1
  store i64 %35, i64* %._storage9._capacityAndFlags, align 8
  %37 = getelementptr inbounds %swift.refcounted, %swift.refcounted* %31, i64 2
  %38 = bitcast %swift.refcounted* %37 to i8*
  %tailaddr4 = bitcast %swift.refcounted* %37 to <{ %TSi, <{ %TSi, %TSi }> }>*
  %39 = load i64, i64* %._storage2._capacityAndFlags._value, align 8
  %40 = lshr i64 %39, 1
  %41 = getelementptr inbounds <{ %TSi, <{ %TSi, %TSi }> }>, <{ %TSi, <{ %TSi, %TSi }> }>* %tailaddr4, i64 %40
  %42 = and i64 %34, 9223372036854775807
  %43 = sub nsw i64 %42, %40
  %._storage2.count._value = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %10, i64 0, i32 1, i32 0, i32 0, i32 0
  %44 = load i64, i64* %._storage2.count._value, align 8, !range !6
  %45 = icmp eq i64 %44, 0
  br i1 %45, label %.sink.split, label %46

46:                                               ; preds = %25
  %47 = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %10, i64 1
  %tailaddr6 = bitcast %Ts28__ContiguousArrayStorageBaseC* %47 to <{ %TSi, <{ %TSi, %TSi }> }>*
  %48 = getelementptr %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %47, i64 0, i32 0
  %49 = getelementptr inbounds <{ %TSi, <{ %TSi, %TSi }> }>, <{ %TSi, <{ %TSi, %TSi }> }>* %tailaddr6, i64 %40
  %50 = bitcast <{ %TSi, <{ %TSi, %TSi }> }>* %49 to %swift.refcounted*
  %51 = icmp ult %swift.refcounted* %37, %50
  %52 = icmp eq %swift.refcounted* %37, %48
  %or.cond27 = select i1 %52, i1 %51, i1 false
  br i1 %or.cond27, label %70, label %.sink.split26

.sink.split:                                      ; preds = %25, %70
  %53 = getelementptr %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %10, i64 0, i32 0
  tail call void @swift_release(%swift.refcounted* %53) #9
  br label %54

54:                                               ; preds = %.sink.split, %7
  %55 = phi i64 [ %8, %7 ], [ %43, %.sink.split ]
  %56 = phi <{ %TSi, <{ %TSi, %TSi }> }>* [ %9, %7 ], [ %41, %.sink.split ]
  %57 = phi %Ts28__ContiguousArrayStorageBaseC* [ %10, %7 ], [ %32, %.sink.split ]
  %58 = tail call { i64, i1 } @llvm.sadd.with.overflow.i64(i64 %55, i64 -1)
  %59 = extractvalue { i64, i1 } %58, 1
  br i1 %59, label %78, label %60, !prof !7

60:                                               ; preds = %54
  %61 = extractvalue { i64, i1 } %58, 0
  %62 = add nuw nsw i64 %11, 1
  %.offset._value = getelementptr inbounds <{ %TSi, <{ %TSi, %TSi }> }>, <{ %TSi, <{ %TSi, %TSi }> }>* %56, i64 0, i32 0, i32 0
  store i64 %11, i64* %.offset._value, align 8
  %.element.l._value = getelementptr inbounds <{ %TSi, <{ %TSi, %TSi }> }>, <{ %TSi, <{ %TSi, %TSi }> }>* %56, i64 0, i32 1, i32 0, i32 0
  %63 = bitcast i64* %.element.l._value to <2 x i64>*
  store <2 x i64> %13, <2 x i64>* %63, align 8
  %64 = icmp eq i64 %62, %1
  %65 = getelementptr inbounds <{ %TSi, <{ %TSi, %TSi }> }>, <{ %TSi, <{ %TSi, %TSi }> }>* %56, i64 1
  br i1 %64, label %66, label %7

66:                                               ; preds = %60
  tail call void @swift_release(%swift.refcounted* %5) #9
  %67 = extractvalue { i64, i1 } %58, 0
  br label %15

.sink.split26:                                    ; preds = %46
  %68 = bitcast %Ts28__ContiguousArrayStorageBaseC* %47 to i8*
  %69 = mul nuw i64 %40, 24
  tail call void @llvm.memmove.p0i8.p0i8.i64(i8* nonnull align 8 %38, i8* nonnull align 8 %68, i64 %69, i1 false)
  br label %70

70:                                               ; preds = %46, %.sink.split26
  store i64 0, i64* %._storage2.count._value, align 8
  br label %.sink.split

71:                                               ; preds = %15
  %72 = lshr i64 %18, 1
  %73 = tail call { i64, i1 } @llvm.ssub.with.overflow.i64(i64 %72, i64 %16)
  %74 = extractvalue { i64, i1 } %73, 1
  br i1 %74, label %79, label %75, !prof !7

75:                                               ; preds = %71
  %76 = extractvalue { i64, i1 } %73, 0
  %._storage1.count._value = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %17, i64 0, i32 1, i32 0, i32 0, i32 0
  store i64 %76, i64* %._storage1.count._value, align 8
  br label %77

77:                                               ; preds = %15, %75
  ret %Ts28__ContiguousArrayStorageBaseC* %17

78:                                               ; preds = %54
  tail call void asm sideeffect "", "n"(i32 1) #9
  tail call void @llvm.trap()
  unreachable

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

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

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

; Function Attrs: nounwind
declare void @swift_endAccess([24 x i8]*) local_unnamed_addr #9

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

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) #29
  %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 #11

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

declare swiftcc { i64, %swift.bridge* } @"$ss23CustomStringConvertibleP11descriptionSSvgTj"(%swift.opaque* noalias nocapture swiftself, %swift.type*, i8**) local_unnamed_addr #0

declare swiftcc { i64, %swift.bridge* } @"$sSKsSS7ElementRtzrlE6joined9separatorS2S_tF"(i64, %swift.bridge*, %swift.type*, i8**, %swift.opaque* noalias nocapture swiftself) local_unnamed_addr #0

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

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_getTypeByMangledNameInContextInMetadataState2(i64 255, i8* %13, i64 %9, %swift.type_descriptor* null, i8** null) #29
  %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_getTypeByMangledNameInContextInMetadataState2(i64, i8*, i64, %swift.type_descriptor*, i8**) local_unnamed_addr #11

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

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

; Function Attrs: noinline
declare swiftcc %Ts28__ContiguousArrayStorageBaseC* @"$sSa28_allocateBufferUninitialized15minimumCapacitys016_ContiguousArrayB0VyxGSi_tFZ"(i64, %swift.type*) local_unnamed_addr #5

; Function Attrs: nofree nounwind optsize
declare noundef i8* @fgets(i8* noundef, i32 noundef, %struct._IO_FILE* nocapture noundef) local_unnamed_addr #13

; Function Attrs: nounwind
declare void @swift_slowDealloc(i8*, i64, i64) local_unnamed_addr #9

; Function Attrs: nounwind
declare i8* @swift_slowAlloc(i64, i64) local_unnamed_addr #9

; Function Attrs: mustprogress nocallback nofree nosync nounwind readnone speculatable willreturn
declare { i64, i1 } @llvm.smul.with.overflow.i64(i64, i64) #7

; Function Attrs: mustprogress nocallback nofree nosync nounwind readnone speculatable willreturn
declare { i32, i1 } @llvm.smul.with.overflow.i32(i32, i32) #7

; Function Attrs: mustprogress nounwind willreturn
declare %swift.refcounted* @swift_initStackObject(%swift.type*, %swift.refcounted*) local_unnamed_addr #8

; Function Attrs: nofree noinline nosync nounwind readnone
define internal i8** @"$sSaySSGSayxGSKsWlTm"(i8*** %0, { i32, i32 }* %1, %swift.protocol_conformance_descriptor* %2) local_unnamed_addr #14 {
entry:
  %3 = load i8**, i8*** %0, align 8
  %4 = icmp eq i8** %3, null
  br i1 %4, label %cacheIsNull, label %cont

cacheIsNull:                                      ; preds = %entry
  %5 = tail call %swift.type* @__swift_instantiateConcreteTypeFromMangledNameAbstract({ i32, i32 }* nonnull %1) #26
  %6 = tail call i8** @swift_getWitnessTable(%swift.protocol_conformance_descriptor* nonnull %2, %swift.type* %5, i8*** undef) #26
  store atomic i8** %6, i8*** %0 release, align 8
  br label %cont

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

declare swiftcc %swift.metadata_response @"$ss15__VaListBuilderCMa"(i64) local_unnamed_addr #0

declare swiftcc i64 @"$ss17_countGPRegistersSivg"() local_unnamed_addr #0

declare swiftcc i64 @"$ss18_registerSaveWordsSivg"() local_unnamed_addr #0

declare swiftcc void @"$sSS6appendyySSF"(i64, %swift.bridge*, %TSS* nocapture swiftself dereferenceable(16)) local_unnamed_addr #0

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

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

; Function Attrs: optsize
declare i32 @__isoc99_vfscanf(%struct._IO_FILE* noundef, i8* noundef, %struct.__va_list_tag* noundef) local_unnamed_addr #15

; Function Attrs: mustprogress nounwind willreturn
declare void @swift_setDeallocating(%swift.refcounted*) local_unnamed_addr #8

; Function Attrs: nounwind
declare void @swift_arrayDestroy(%swift.opaque*, i64, %swift.type*) local_unnamed_addr #9

declare swiftcc { i64, %swift.bridge* } @"$sSS7cStringSSSPys4Int8VG_tcfC"(i8*) local_unnamed_addr #0

; Function Attrs: noinline
declare swiftcc %Ts28__ContiguousArrayStorageBaseC* @"$ss15ContiguousArrayV28_allocateBufferUninitialized15minimumCapacitys01_abD0VyxGSi_tFZ"(i64, %swift.type*) local_unnamed_addr #5

define linkonce_odr hidden swiftcc %Ts28__ContiguousArrayStorageBaseC* @"$sSa9repeating5countSayxGx_SitcfCTf4gnn_n"(%swift.opaque* noalias nocapture %0, i64 %1, %swift.type* %Element) local_unnamed_addr #0 {
entry:
  %2 = tail call swiftcc { %Ts28__ContiguousArrayStorageBaseC*, i8* } @"$sSa22_allocateUninitializedySayxG_SpyxGtSiFZ"(i64 %1, %swift.type* %Element)
  %3 = icmp slt i64 %1, 0
  br i1 %3, label %27, label %4, !prof !7

4:                                                ; preds = %entry
  %5 = extractvalue { %Ts28__ContiguousArrayStorageBaseC*, i8* } %2, 1
  %6 = icmp eq i64 %1, 0
  br i1 %6, label %.loopexit, label %.preheader

.preheader:                                       ; preds = %4
  %7 = getelementptr inbounds %swift.type, %swift.type* %Element, i64 -1
  %8 = bitcast %swift.type* %7 to i8***
  %Element.valueWitnesses = load i8**, i8*** %8, align 8, !invariant.load !12, !dereferenceable !13
  %9 = getelementptr inbounds i8*, i8** %Element.valueWitnesses, i64 2
  %10 = bitcast i8** %9 to %swift.opaque* (%swift.opaque*, %swift.opaque*, %swift.type*)**
  %11 = load %swift.opaque* (%swift.opaque*, %swift.opaque*, %swift.type*)*, %swift.opaque* (%swift.opaque*, %swift.opaque*, %swift.type*)** %10, align 8, !invariant.load !12
  %12 = bitcast i8* %5 to %swift.opaque*
  %13 = tail call %swift.opaque* %11(%swift.opaque* noalias %12, %swift.opaque* noalias %0, %swift.type* %Element) #9
  %14 = icmp eq i64 %1, 1
  br i1 %14, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader
  %15 = getelementptr inbounds i8*, i8** %Element.valueWitnesses, i64 9
  %16 = bitcast i8** %15 to i64*
  %stride = load i64, i64* %16, align 8, !invariant.load !12
  br label %17

17:                                               ; preds = %.lr.ph, %17
  %18 = phi i64 [ 1, %.lr.ph ], [ %21, %17 ]
  %19 = phi i8* [ %5, %.lr.ph ], [ %20, %17 ]
  %20 = getelementptr inbounds i8, i8* %19, i64 %stride
  %21 = add i64 %18, 1
  %22 = bitcast i8* %20 to %swift.opaque*
  %23 = tail call %swift.opaque* %11(%swift.opaque* noalias %22, %swift.opaque* noalias %0, %swift.type* %Element) #9
  %24 = icmp eq i64 %21, %1
  br i1 %24, label %.loopexit, label %17

.loopexit:                                        ; preds = %17, %.preheader, %4
  %25 = extractvalue { %Ts28__ContiguousArrayStorageBaseC*, i8* } %2, 0
  %26 = tail call swiftcc %swift.metadata_response @"$sSaMa"(i64 0, %swift.type* %Element) #27
  ret %Ts28__ContiguousArrayStorageBaseC* %25

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

; Function Attrs: mustprogress nofree noinline nosync nounwind readnone willreturn
define hidden swiftcc %swift.metadata_response @"$s7llvm_O311FenwickTreeVMa"(i64 %0, %swift.type* readnone %1) #16 {
entry:
  %2 = bitcast %swift.type* %1 to i8*
  %3 = tail call swiftcc %swift.metadata_response @__swift_instantiateGenericMetadata(i64 %0, i8* %2, i8* undef, i8* undef, %swift.type_descriptor* nonnull bitcast (<{ i32, i32, i32, i32, i32, i32, i32, i32, i32, i16, i16, i16, i16, i8, i8, i8, i8 }>* @"$s7llvm_O311FenwickTreeVMn" to %swift.type_descriptor*)) #27
  ret %swift.metadata_response %3
}

declare swiftcc %swift.metadata_response @"$sSaMa"(i64, %swift.type*) local_unnamed_addr #0

; Function Attrs: nounwind
define internal %swift.type* @"$s7llvm_O311FenwickTreeVMi"(%swift.type_descriptor* %0, i8** %1, i8* %2) #17 {
entry:
  %3 = tail call %swift.type* @swift_allocateGenericValueMetadata(%swift.type_descriptor* %0, i8** %1, i8* %2, i64 32) #9
  ret %swift.type* %3
}

; Function Attrs: nounwind
define internal swiftcc %swift.metadata_response @"$s7llvm_O311FenwickTreeVMr"(%swift.type* %"FenwickTree<Element>", i8* nocapture readnone %0, i8** nocapture readnone %1) #17 {
entry:
  %classFields = alloca [5 x i8**], align 8
  %2 = bitcast [5 x i8**]* %classFields to i8*
  call void @llvm.lifetime.start.p0i8(i64 40, i8* nonnull %2)
  %3 = getelementptr inbounds [5 x i8**], [5 x i8**]* %classFields, i64 0, i64 0
  store i8** getelementptr (i8*, i8** @"$sBi64_WV", i64 8), i8*** %3, align 8
  %4 = getelementptr inbounds %swift.type, %swift.type* %"FenwickTree<Element>", i64 2
  %5 = bitcast %swift.type* %4 to %swift.type**
  %Element = load %swift.type*, %swift.type** %5, align 8, !invariant.load !12
  %6 = tail call swiftcc %swift.metadata_response @swift_checkMetadataState(i64 319, %swift.type* %Element) #30
  %7 = extractvalue %swift.metadata_response %6, 0
  %8 = extractvalue %swift.metadata_response %6, 1
  %9 = icmp ult i64 %8, 64
  br i1 %9, label %dependency-satisfied, label %metadata-dependencies.cont

dependency-satisfied:                             ; preds = %entry
  %10 = getelementptr inbounds %swift.type, %swift.type* %"FenwickTree<Element>", i64 3
  %11 = bitcast %swift.type* %10 to i32*
  %12 = getelementptr inbounds %swift.type, %swift.type* %7, i64 -1
  %13 = bitcast %swift.type* %12 to i8***
  %.valueWitnesses = load i8**, i8*** %13, align 8, !invariant.load !12, !dereferenceable !13
  %14 = getelementptr inbounds i8*, i8** %.valueWitnesses, i64 8
  %15 = getelementptr inbounds [5 x i8**], [5 x i8**]* %classFields, i64 0, i64 1
  store i8** %14, i8*** %15, align 8
  %16 = getelementptr inbounds [5 x i8**], [5 x i8**]* %classFields, i64 0, i64 2
  store i8** getelementptr (i8*, i8** @"$sBoWV", i64 8), i8*** %16, align 8
  %17 = getelementptr inbounds [5 x i8**], [5 x i8**]* %classFields, i64 0, i64 3
  store i8** getelementptr (i8*, i8** @"$syycWV", i64 8), i8*** %17, align 8
  %18 = getelementptr inbounds [5 x i8**], [5 x i8**]* %classFields, i64 0, i64 4
  store i8** getelementptr (i8*, i8** @"$syycWV", i64 8), i8*** %18, align 8
  call void @swift_initStructMetadata(%swift.type* nonnull %"FenwickTree<Element>", i64 0, i64 5, i8*** nonnull %3, i32* nonnull %11) #9
  call void @llvm.lifetime.end.p0i8(i64 40, i8* nonnull %2)
  br label %metadata-dependencies.cont

metadata-dependencies.cont:                       ; preds = %dependency-satisfied, %entry
  %19 = phi %swift.type* [ %7, %entry ], [ null, %dependency-satisfied ]
  %20 = phi i64 [ 63, %entry ], [ 0, %dependency-satisfied ]
  %21 = insertvalue %swift.metadata_response undef, %swift.type* %19, 0
  %22 = insertvalue %swift.metadata_response %21, i64 %20, 1
  ret %swift.metadata_response %22
}

; Function Attrs: nounwind
define internal %swift.opaque* @"$s7llvm_O311FenwickTreeVwCP"([24 x i8]* noalias %dest, [24 x i8]* noalias %src, %swift.type* nocapture readonly %"FenwickTree<Element>") #18 {
entry:
  %0 = getelementptr inbounds %swift.type, %swift.type* %"FenwickTree<Element>", i64 2
  %1 = bitcast %swift.type* %0 to %swift.type**
  %Element = load %swift.type*, %swift.type** %1, align 8, !invariant.load !12
  %2 = getelementptr inbounds %swift.type, %swift.type* %Element, i64 -1
  %3 = bitcast %swift.type* %2 to i8***
  %Element.valueWitnesses = load i8**, i8*** %3, align 8, !invariant.load !12, !dereferenceable !13
  %4 = getelementptr inbounds i8*, i8** %Element.valueWitnesses, i64 10
  %5 = bitcast i8** %4 to i32*
  %flags = load i32, i32* %5, align 8, !invariant.load !12
  %6 = and i32 %flags, 255
  %flags.alignmentMask = zext i32 %6 to i64
  %7 = xor i64 %flags.alignmentMask, -1
  %8 = add nuw nsw i64 %flags.alignmentMask, 8
  %9 = and i64 %8, %7
  %10 = getelementptr inbounds i8*, i8** %Element.valueWitnesses, i64 8
  %11 = bitcast i8** %10 to i64*
  %size = load i64, i64* %11, align 8, !invariant.load !12
  %12 = add i64 %size, 7
  %13 = add i64 %12, %9
  %14 = and i64 %13, -8
  %15 = add i64 %14, 15
  %16 = and i64 %15, -8
  %17 = add i64 %16, 23
  %18 = and i64 %17, -8
  %size1 = add i64 %18, 16
  %19 = and i32 %flags, 1048576
  %flags.isBitwiseTakable = icmp eq i32 %19, 0
  %20 = icmp ult i32 %6, 8
  %21 = icmp ult i64 %size1, 25
  %22 = and i1 %flags.isBitwiseTakable, %21
  %23 = and i1 %20, %22
  br i1 %23, label %inlineBB, label %allocateBB

inlineBB:                                         ; preds = %entry
  %24 = bitcast [24 x i8]* %src to i64*
  %25 = bitcast [24 x i8]* %dest to i64*
  %26 = load i64, i64* %24, align 8
  store i64 %26, i64* %25, align 8
  %27 = ptrtoint [24 x i8]* %dest to i64
  %28 = ptrtoint [24 x i8]* %src to i64
  %29 = add i64 %8, %27
  %30 = and i64 %29, %7
  %31 = inttoptr i64 %30 to %swift.opaque*
  %32 = add i64 %8, %28
  %33 = and i64 %32, %7
  %34 = inttoptr i64 %33 to %swift.opaque*
  %35 = getelementptr inbounds i8*, i8** %Element.valueWitnesses, i64 2
  %36 = bitcast i8** %35 to %swift.opaque* (%swift.opaque*, %swift.opaque*, %swift.type*)**
  %37 = load %swift.opaque* (%swift.opaque*, %swift.opaque*, %swift.type*)*, %swift.opaque* (%swift.opaque*, %swift.opaque*, %swift.type*)** %36, align 8, !invariant.load !12
  %38 = tail call %swift.opaque* %37(%swift.opaque* noalias %31, %swift.opaque* noalias %34, %swift.type* nonnull %Element) #9
  %39 = add i64 %12, %30
  %40 = and i64 %39, -8
  %41 = add i64 %12, %33
  %42 = and i64 %41, -8
  %43 = inttoptr i64 %40 to %TSa*
  %44 = inttoptr i64 %42 to %TSa*
  %._buffer._storage = getelementptr inbounds %TSa, %TSa* %43, i64 0, i32 0, i32 0
  %._buffer4._storage = getelementptr inbounds %TSa, %TSa* %44, i64 0, i32 0, i32 0
  %45 = load %Ts28__ContiguousArrayStorageBaseC*, %Ts28__ContiguousArrayStorageBaseC** %._buffer4._storage, align 8
  %46 = getelementptr %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %45, i64 0, i32 0
  store %Ts28__ContiguousArrayStorageBaseC* %45, %Ts28__ContiguousArrayStorageBaseC** %._buffer._storage, align 8
  %47 = add i64 %40, 15
  %48 = and i64 %47, -8
  %49 = add i64 %42, 15
  %50 = and i64 %49, -8
  %51 = inttoptr i64 %48 to %swift.function*
  %52 = inttoptr i64 %50 to %swift.function*
  %.fn = getelementptr inbounds %swift.function, %swift.function* %52, i64 0, i32 0
  %.fn.load = load i8*, i8** %.fn, align 8
  %.data = getelementptr inbounds %swift.function, %swift.function* %52, i64 0, i32 1
  %53 = load %swift.refcounted*, %swift.refcounted** %.data, align 8
  %.fn5 = getelementptr inbounds %swift.function, %swift.function* %51, i64 0, i32 0
  store i8* %.fn.load, i8** %.fn5, align 8
  %.data6 = getelementptr inbounds %swift.function, %swift.function* %51, i64 0, i32 1
  store %swift.refcounted* %53, %swift.refcounted** %.data6, align 8
  %54 = add i64 %48, 23
  %55 = and i64 %54, -8
  %56 = add i64 %50, 23
  %57 = and i64 %56, -8
  %58 = inttoptr i64 %55 to %swift.function*
  %59 = inttoptr i64 %57 to %swift.function*
  %.fn7 = getelementptr inbounds %swift.function, %swift.function* %59, i64 0, i32 0
  %.fn7.load = load i8*, i8** %.fn7, align 8
  %.data8 = getelementptr inbounds %swift.function, %swift.function* %59, i64 0, i32 1
  %60 = load %swift.refcounted*, %swift.refcounted** %.data8, align 8
  %.fn9 = getelementptr inbounds %swift.function, %swift.function* %58, i64 0, i32 0
  store i8* %.fn7.load, i8** %.fn9, align 8
  %.data10 = getelementptr inbounds %swift.function, %swift.function* %58, i64 0, i32 1
  store %swift.refcounted* %60, %swift.refcounted** %.data10, align 8
  %61 = bitcast [24 x i8]* %dest to %swift.opaque*
  %62 = tail call %swift.refcounted* @swift_retain(%swift.refcounted* returned %46) #25
  %63 = tail call %swift.refcounted* @swift_retain(%swift.refcounted* returned %53) #25
  br label %74

allocateBB:                                       ; preds = %entry
  %64 = bitcast [24 x i8]* %dest to %swift.refcounted**
  %65 = bitcast [24 x i8]* %src to %swift.refcounted**
  %66 = load %swift.refcounted*, %swift.refcounted** %65, align 8
  store %swift.refcounted* %66, %swift.refcounted** %64, align 8
  %67 = add nuw nsw i64 %flags.alignmentMask, 16
  %68 = and i64 %flags.alignmentMask, 248
  %69 = xor i64 %68, 504
  %70 = and i64 %69, %67
  %71 = bitcast %swift.refcounted* %66 to i8*
  %72 = getelementptr inbounds i8, i8* %71, i64 %70
  %73 = bitcast i8* %72 to %swift.opaque*
  br label %74

74:                                               ; preds = %allocateBB, %inlineBB
  %.sink = phi %swift.refcounted* [ %66, %allocateBB ], [ %60, %inlineBB ]
  %75 = phi %swift.opaque* [ %73, %allocateBB ], [ %61, %inlineBB ]
  %76 = tail call %swift.refcounted* @swift_retain(%swift.refcounted* returned %.sink) #25
  ret %swift.opaque* %75
}

; 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) #19

; Function Attrs: nounwind
define internal void @"$s7llvm_O311FenwickTreeVwxx"(%swift.opaque* noalias %object, %swift.type* nocapture readonly %"FenwickTree<Element>") #18 {
entry:
  %0 = ptrtoint %swift.opaque* %object to i64
  %1 = add i64 %0, 8
  %2 = getelementptr inbounds %swift.type, %swift.type* %"FenwickTree<Element>", i64 2
  %3 = bitcast %swift.type* %2 to %swift.type**
  %Element = load %swift.type*, %swift.type** %3, align 8, !invariant.load !12
  %4 = getelementptr inbounds %swift.type, %swift.type* %Element, i64 -1
  %5 = bitcast %swift.type* %4 to i8***
  %Element.valueWitnesses = load i8**, i8*** %5, align 8, !invariant.load !12, !dereferenceable !13
  %6 = getelementptr inbounds i8*, i8** %Element.valueWitnesses, i64 10
  %7 = bitcast i8** %6 to i32*
  %flags = load i32, i32* %7, align 8, !invariant.load !12
  %8 = and i32 %flags, 255
  %flags.alignmentMask = zext i32 %8 to i64
  %9 = add i64 %1, %flags.alignmentMask
  %10 = xor i64 %flags.alignmentMask, -1
  %11 = and i64 %9, %10
  %12 = inttoptr i64 %11 to %swift.opaque*
  %13 = getelementptr inbounds i8*, i8** %Element.valueWitnesses, i64 1
  %14 = bitcast i8** %13 to void (%swift.opaque*, %swift.type*)**
  %15 = load void (%swift.opaque*, %swift.type*)*, void (%swift.opaque*, %swift.type*)** %14, align 8, !invariant.load !12
  tail call void %15(%swift.opaque* noalias %12, %swift.type* %Element) #9
  %16 = getelementptr inbounds i8*, i8** %Element.valueWitnesses, i64 8
  %17 = bitcast i8** %16 to i64*
  %size = load i64, i64* %17, align 8, !invariant.load !12
  %18 = add i64 %size, 7
  %19 = add i64 %18, %11
  %20 = and i64 %19, -8
  %21 = inttoptr i64 %20 to %TSa*
  %._buffer._storage = getelementptr inbounds %TSa, %TSa* %21, i64 0, i32 0, i32 0
  %toDestroy = load %Ts28__ContiguousArrayStorageBaseC*, %Ts28__ContiguousArrayStorageBaseC** %._buffer._storage, align 8
  %22 = getelementptr %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %toDestroy, i64 0, i32 0
  tail call void @swift_release(%swift.refcounted* %22) #9
  %23 = add i64 %20, 15
  %24 = and i64 %23, -8
  %25 = inttoptr i64 %24 to %swift.function*
  %.data = getelementptr inbounds %swift.function, %swift.function* %25, i64 0, i32 1
  %26 = load %swift.refcounted*, %swift.refcounted** %.data, align 8
  tail call void @swift_release(%swift.refcounted* %26) #9
  %27 = add i64 %24, 23
  %28 = and i64 %27, -8
  %29 = inttoptr i64 %28 to %swift.function*
  %.data1 = getelementptr inbounds %swift.function, %swift.function* %29, i64 0, i32 1
  %30 = load %swift.refcounted*, %swift.refcounted** %.data1, align 8
  tail call void @swift_release(%swift.refcounted* %30) #9
  ret void
}

; Function Attrs: nounwind
define internal %swift.opaque* @"$s7llvm_O311FenwickTreeVwcp"(%swift.opaque* noalias returned %dest, %swift.opaque* noalias %src, %swift.type* nocapture readonly %"FenwickTree<Element>") #18 {
entry:
  %0 = bitcast %swift.opaque* %src to i64*
  %1 = bitcast %swift.opaque* %dest to i64*
  %2 = load i64, i64* %0, align 8
  store i64 %2, i64* %1, align 8
  %3 = ptrtoint %swift.opaque* %dest to i64
  %4 = ptrtoint %swift.opaque* %src to i64
  %5 = getelementptr inbounds %swift.type, %swift.type* %"FenwickTree<Element>", i64 2
  %6 = bitcast %swift.type* %5 to %swift.type**
  %Element = load %swift.type*, %swift.type** %6, align 8, !invariant.load !12
  %7 = getelementptr inbounds %swift.type, %swift.type* %Element, i64 -1
  %8 = bitcast %swift.type* %7 to i8***
  %Element.valueWitnesses = load i8**, i8*** %8, align 8, !invariant.load !12, !dereferenceable !13
  %9 = getelementptr inbounds i8*, i8** %Element.valueWitnesses, i64 10
  %10 = bitcast i8** %9 to i32*
  %flags = load i32, i32* %10, align 8, !invariant.load !12
  %11 = and i32 %flags, 255
  %flags.alignmentMask = zext i32 %11 to i64
  %12 = add nuw nsw i64 %flags.alignmentMask, 8
  %13 = add i64 %12, %3
  %14 = xor i64 %flags.alignmentMask, -1
  %15 = and i64 %13, %14
  %16 = inttoptr i64 %15 to %swift.opaque*
  %17 = add i64 %12, %4
  %18 = and i64 %17, %14
  %19 = inttoptr i64 %18 to %swift.opaque*
  %20 = getelementptr inbounds i8*, i8** %Element.valueWitnesses, i64 2
  %21 = bitcast i8** %20 to %swift.opaque* (%swift.opaque*, %swift.opaque*, %swift.type*)**
  %22 = load %swift.opaque* (%swift.opaque*, %swift.opaque*, %swift.type*)*, %swift.opaque* (%swift.opaque*, %swift.opaque*, %swift.type*)** %21, align 8, !invariant.load !12
  %23 = tail call %swift.opaque* %22(%swift.opaque* noalias %16, %swift.opaque* noalias %19, %swift.type* %Element) #9
  %24 = getelementptr inbounds i8*, i8** %Element.valueWitnesses, i64 8
  %25 = bitcast i8** %24 to i64*
  %size = load i64, i64* %25, align 8, !invariant.load !12
  %26 = add i64 %size, 7
  %27 = add i64 %26, %15
  %28 = and i64 %27, -8
  %29 = add i64 %26, %18
  %30 = and i64 %29, -8
  %31 = inttoptr i64 %28 to %TSa*
  %32 = inttoptr i64 %30 to %TSa*
  %._buffer._storage = getelementptr inbounds %TSa, %TSa* %31, i64 0, i32 0, i32 0
  %._buffer1._storage = getelementptr inbounds %TSa, %TSa* %32, i64 0, i32 0, i32 0
  %33 = load %Ts28__ContiguousArrayStorageBaseC*, %Ts28__ContiguousArrayStorageBaseC** %._buffer1._storage, align 8
  %34 = getelementptr %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %33, i64 0, i32 0
  store %Ts28__ContiguousArrayStorageBaseC* %33, %Ts28__ContiguousArrayStorageBaseC** %._buffer._storage, align 8
  %35 = add i64 %28, 15
  %36 = and i64 %35, -8
  %37 = add i64 %30, 15
  %38 = and i64 %37, -8
  %39 = inttoptr i64 %36 to %swift.function*
  %40 = inttoptr i64 %38 to %swift.function*
  %.fn = getelementptr inbounds %swift.function, %swift.function* %40, i64 0, i32 0
  %.fn.load = load i8*, i8** %.fn, align 8
  %.data = getelementptr inbounds %swift.function, %swift.function* %40, i64 0, i32 1
  %41 = load %swift.refcounted*, %swift.refcounted** %.data, align 8
  %.fn2 = getelementptr inbounds %swift.function, %swift.function* %39, i64 0, i32 0
  store i8* %.fn.load, i8** %.fn2, align 8
  %.data3 = getelementptr inbounds %swift.function, %swift.function* %39, i64 0, i32 1
  store %swift.refcounted* %41, %swift.refcounted** %.data3, align 8
  %42 = add i64 %36, 23
  %43 = and i64 %42, -8
  %44 = add i64 %38, 23
  %45 = and i64 %44, -8
  %46 = inttoptr i64 %43 to %swift.function*
  %47 = inttoptr i64 %45 to %swift.function*
  %.fn4 = getelementptr inbounds %swift.function, %swift.function* %47, i64 0, i32 0
  %.fn4.load = load i8*, i8** %.fn4, align 8
  %.data5 = getelementptr inbounds %swift.function, %swift.function* %47, i64 0, i32 1
  %48 = load %swift.refcounted*, %swift.refcounted** %.data5, align 8
  %.fn6 = getelementptr inbounds %swift.function, %swift.function* %46, i64 0, i32 0
  store i8* %.fn4.load, i8** %.fn6, align 8
  %.data7 = getelementptr inbounds %swift.function, %swift.function* %46, i64 0, i32 1
  store %swift.refcounted* %48, %swift.refcounted** %.data7, align 8
  %49 = tail call %swift.refcounted* @swift_retain(%swift.refcounted* returned %34) #25
  %50 = tail call %swift.refcounted* @swift_retain(%swift.refcounted* returned %41) #25
  %51 = tail call %swift.refcounted* @swift_retain(%swift.refcounted* returned %48) #25
  ret %swift.opaque* %dest
}

; Function Attrs: nounwind
define internal %swift.opaque* @"$s7llvm_O311FenwickTreeVwca"(%swift.opaque* returned %dest, %swift.opaque* %src, %swift.type* nocapture readonly %"FenwickTree<Element>") #18 {
entry:
  %._value = bitcast %swift.opaque* %dest to i64*
  %._value1 = bitcast %swift.opaque* %src to i64*
  %0 = load i64, i64* %._value1, align 8
  store i64 %0, i64* %._value, align 8
  %1 = ptrtoint %swift.opaque* %dest to i64
  %2 = ptrtoint %swift.opaque* %src to i64
  %3 = getelementptr inbounds %swift.type, %swift.type* %"FenwickTree<Element>", i64 2
  %4 = bitcast %swift.type* %3 to %swift.type**
  %Element = load %swift.type*, %swift.type** %4, align 8, !invariant.load !12
  %5 = getelementptr inbounds %swift.type, %swift.type* %Element, i64 -1
  %6 = bitcast %swift.type* %5 to i8***
  %Element.valueWitnesses = load i8**, i8*** %6, align 8, !invariant.load !12, !dereferenceable !13
  %7 = getelementptr inbounds i8*, i8** %Element.valueWitnesses, i64 10
  %8 = bitcast i8** %7 to i32*
  %flags = load i32, i32* %8, align 8, !invariant.load !12
  %9 = and i32 %flags, 255
  %flags.alignmentMask = zext i32 %9 to i64
  %10 = add nuw nsw i64 %flags.alignmentMask, 8
  %11 = add i64 %10, %1
  %12 = xor i64 %flags.alignmentMask, -1
  %13 = and i64 %11, %12
  %14 = inttoptr i64 %13 to %swift.opaque*
  %15 = add i64 %10, %2
  %16 = and i64 %15, %12
  %17 = inttoptr i64 %16 to %swift.opaque*
  %18 = getelementptr inbounds i8*, i8** %Element.valueWitnesses, i64 3
  %19 = bitcast i8** %18 to %swift.opaque* (%swift.opaque*, %swift.opaque*, %swift.type*)**
  %20 = load %swift.opaque* (%swift.opaque*, %swift.opaque*, %swift.type*)*, %swift.opaque* (%swift.opaque*, %swift.opaque*, %swift.type*)** %19, align 8, !invariant.load !12
  %21 = tail call %swift.opaque* %20(%swift.opaque* %14, %swift.opaque* %17, %swift.type* %Element) #9
  %22 = getelementptr inbounds i8*, i8** %Element.valueWitnesses, i64 8
  %23 = bitcast i8** %22 to i64*
  %size = load i64, i64* %23, align 8, !invariant.load !12
  %24 = add i64 %size, 7
  %25 = add i64 %24, %13
  %26 = and i64 %25, -8
  %27 = add i64 %24, %16
  %28 = and i64 %27, -8
  %29 = inttoptr i64 %26 to %TSa*
  %30 = inttoptr i64 %28 to %TSa*
  %._buffer._storage = getelementptr inbounds %TSa, %TSa* %29, i64 0, i32 0, i32 0
  %._buffer2._storage = getelementptr inbounds %TSa, %TSa* %30, i64 0, i32 0, i32 0
  %31 = load %Ts28__ContiguousArrayStorageBaseC*, %Ts28__ContiguousArrayStorageBaseC** %._buffer2._storage, align 8
  %32 = getelementptr %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %31, i64 0, i32 0
  %oldValue = load %Ts28__ContiguousArrayStorageBaseC*, %Ts28__ContiguousArrayStorageBaseC** %._buffer._storage, align 8
  store %Ts28__ContiguousArrayStorageBaseC* %31, %Ts28__ContiguousArrayStorageBaseC** %._buffer._storage, align 8
  %33 = getelementptr %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %oldValue, i64 0, i32 0
  %34 = tail call %swift.refcounted* @swift_retain(%swift.refcounted* returned %32) #25
  tail call void @swift_release(%swift.refcounted* %33) #9
  %35 = add i64 %26, 15
  %36 = and i64 %35, -8
  %37 = add i64 %28, 15
  %38 = and i64 %37, -8
  %39 = inttoptr i64 %36 to %swift.function*
  %40 = inttoptr i64 %38 to %swift.function*
  %.fn = getelementptr inbounds %swift.function, %swift.function* %40, i64 0, i32 0
  %.fn.load = load i8*, i8** %.fn, align 8
  %.data = getelementptr inbounds %swift.function, %swift.function* %40, i64 0, i32 1
  %41 = load %swift.refcounted*, %swift.refcounted** %.data, align 8
  %.fn3 = getelementptr inbounds %swift.function, %swift.function* %39, i64 0, i32 0
  store i8* %.fn.load, i8** %.fn3, align 8
  %.data4 = getelementptr inbounds %swift.function, %swift.function* %39, i64 0, i32 1
  %42 = load %swift.refcounted*, %swift.refcounted** %.data4, align 8
  store %swift.refcounted* %41, %swift.refcounted** %.data4, align 8
  %43 = tail call %swift.refcounted* @swift_retain(%swift.refcounted* returned %41) #25
  tail call void @swift_release(%swift.refcounted* %42) #9
  %44 = add i64 %36, 23
  %45 = and i64 %44, -8
  %46 = add i64 %38, 23
  %47 = and i64 %46, -8
  %48 = inttoptr i64 %45 to %swift.function*
  %49 = inttoptr i64 %47 to %swift.function*
  %.fn5 = getelementptr inbounds %swift.function, %swift.function* %49, i64 0, i32 0
  %.fn5.load = load i8*, i8** %.fn5, align 8
  %.data6 = getelementptr inbounds %swift.function, %swift.function* %49, i64 0, i32 1
  %50 = load %swift.refcounted*, %swift.refcounted** %.data6, align 8
  %.fn7 = getelementptr inbounds %swift.function, %swift.function* %48, i64 0, i32 0
  store i8* %.fn5.load, i8** %.fn7, align 8
  %.data8 = getelementptr inbounds %swift.function, %swift.function* %48, i64 0, i32 1
  %51 = load %swift.refcounted*, %swift.refcounted** %.data8, align 8
  store %swift.refcounted* %50, %swift.refcounted** %.data8, align 8
  %52 = tail call %swift.refcounted* @swift_retain(%swift.refcounted* returned %50) #25
  tail call void @swift_release(%swift.refcounted* %51) #9
  ret %swift.opaque* %dest
}

; Function Attrs: nounwind
define internal %swift.opaque* @"$s7llvm_O311FenwickTreeVwtk"(%swift.opaque* noalias returned %dest, %swift.opaque* noalias %src, %swift.type* nocapture readonly %"FenwickTree<Element>") #18 {
entry:
  %0 = bitcast %swift.opaque* %src to i64*
  %1 = bitcast %swift.opaque* %dest to i64*
  %2 = load i64, i64* %0, align 8
  store i64 %2, i64* %1, align 8
  %3 = ptrtoint %swift.opaque* %dest to i64
  %4 = ptrtoint %swift.opaque* %src to i64
  %5 = getelementptr inbounds %swift.type, %swift.type* %"FenwickTree<Element>", i64 2
  %6 = bitcast %swift.type* %5 to %swift.type**
  %Element = load %swift.type*, %swift.type** %6, align 8, !invariant.load !12
  %7 = getelementptr inbounds %swift.type, %swift.type* %Element, i64 -1
  %8 = bitcast %swift.type* %7 to i8***
  %Element.valueWitnesses = load i8**, i8*** %8, align 8, !invariant.load !12, !dereferenceable !13
  %9 = getelementptr inbounds i8*, i8** %Element.valueWitnesses, i64 10
  %10 = bitcast i8** %9 to i32*
  %flags = load i32, i32* %10, align 8, !invariant.load !12
  %11 = and i32 %flags, 255
  %flags.alignmentMask = zext i32 %11 to i64
  %12 = add nuw nsw i64 %flags.alignmentMask, 8
  %13 = add i64 %12, %3
  %14 = xor i64 %flags.alignmentMask, -1
  %15 = and i64 %13, %14
  %16 = inttoptr i64 %15 to %swift.opaque*
  %17 = add i64 %12, %4
  %18 = and i64 %17, %14
  %19 = inttoptr i64 %18 to %swift.opaque*
  %20 = getelementptr inbounds i8*, i8** %Element.valueWitnesses, i64 4
  %21 = bitcast i8** %20 to %swift.opaque* (%swift.opaque*, %swift.opaque*, %swift.type*)**
  %22 = load %swift.opaque* (%swift.opaque*, %swift.opaque*, %swift.type*)*, %swift.opaque* (%swift.opaque*, %swift.opaque*, %swift.type*)** %21, align 8, !invariant.load !12
  %23 = tail call %swift.opaque* %22(%swift.opaque* noalias %16, %swift.opaque* noalias %19, %swift.type* %Element) #9
  %24 = getelementptr inbounds i8*, i8** %Element.valueWitnesses, i64 8
  %25 = bitcast i8** %24 to i64*
  %size = load i64, i64* %25, align 8, !invariant.load !12
  %26 = add i64 %size, 7
  %27 = add i64 %26, %15
  %28 = and i64 %27, -8
  %29 = add i64 %26, %18
  %30 = and i64 %29, -8
  %31 = inttoptr i64 %30 to i64*
  %32 = inttoptr i64 %28 to i64*
  %33 = load i64, i64* %31, align 8
  store i64 %33, i64* %32, align 8
  %34 = add i64 %28, 15
  %35 = and i64 %34, -8
  %36 = add i64 %30, 15
  %37 = and i64 %36, -8
  %38 = inttoptr i64 %35 to %swift.function*
  %39 = inttoptr i64 %37 to %swift.function*
  %.fn = getelementptr inbounds %swift.function, %swift.function* %39, i64 0, i32 0
  %40 = load i8*, i8** %.fn, align 8
  %.data = getelementptr inbounds %swift.function, %swift.function* %39, i64 0, i32 1
  %41 = load %swift.refcounted*, %swift.refcounted** %.data, align 8
  %.fn1 = getelementptr inbounds %swift.function, %swift.function* %38, i64 0, i32 0
  store i8* %40, i8** %.fn1, align 8
  %.data2 = getelementptr inbounds %swift.function, %swift.function* %38, i64 0, i32 1
  store %swift.refcounted* %41, %swift.refcounted** %.data2, align 8
  %42 = add i64 %35, 23
  %43 = and i64 %42, -8
  %44 = add i64 %37, 23
  %45 = and i64 %44, -8
  %46 = inttoptr i64 %43 to %swift.function*
  %47 = inttoptr i64 %45 to %swift.function*
  %.fn3 = getelementptr inbounds %swift.function, %swift.function* %47, i64 0, i32 0
  %48 = load i8*, i8** %.fn3, align 8
  %.data4 = getelementptr inbounds %swift.function, %swift.function* %47, i64 0, i32 1
  %49 = load %swift.refcounted*, %swift.refcounted** %.data4, align 8
  %.fn5 = getelementptr inbounds %swift.function, %swift.function* %46, i64 0, i32 0
  store i8* %48, i8** %.fn5, align 8
  %.data6 = getelementptr inbounds %swift.function, %swift.function* %46, i64 0, i32 1
  store %swift.refcounted* %49, %swift.refcounted** %.data6, align 8
  ret %swift.opaque* %dest
}

; Function Attrs: nounwind
define internal %swift.opaque* @"$s7llvm_O311FenwickTreeVwta"(%swift.opaque* noalias returned %dest, %swift.opaque* noalias %src, %swift.type* nocapture readonly %"FenwickTree<Element>") #18 {
entry:
  %._value = bitcast %swift.opaque* %dest to i64*
  %._value1 = bitcast %swift.opaque* %src to i64*
  %0 = load i64, i64* %._value1, align 8
  store i64 %0, i64* %._value, align 8
  %1 = ptrtoint %swift.opaque* %dest to i64
  %2 = ptrtoint %swift.opaque* %src to i64
  %3 = getelementptr inbounds %swift.type, %swift.type* %"FenwickTree<Element>", i64 2
  %4 = bitcast %swift.type* %3 to %swift.type**
  %Element = load %swift.type*, %swift.type** %4, align 8, !invariant.load !12
  %5 = getelementptr inbounds %swift.type, %swift.type* %Element, i64 -1
  %6 = bitcast %swift.type* %5 to i8***
  %Element.valueWitnesses = load i8**, i8*** %6, align 8, !invariant.load !12, !dereferenceable !13
  %7 = getelementptr inbounds i8*, i8** %Element.valueWitnesses, i64 10
  %8 = bitcast i8** %7 to i32*
  %flags = load i32, i32* %8, align 8, !invariant.load !12
  %9 = and i32 %flags, 255
  %flags.alignmentMask = zext i32 %9 to i64
  %10 = add nuw nsw i64 %flags.alignmentMask, 8
  %11 = add i64 %10, %1
  %12 = xor i64 %flags.alignmentMask, -1
  %13 = and i64 %11, %12
  %14 = inttoptr i64 %13 to %swift.opaque*
  %15 = add i64 %10, %2
  %16 = and i64 %15, %12
  %17 = inttoptr i64 %16 to %swift.opaque*
  %18 = getelementptr inbounds i8*, i8** %Element.valueWitnesses, i64 5
  %19 = bitcast i8** %18 to %swift.opaque* (%swift.opaque*, %swift.opaque*, %swift.type*)**
  %20 = load %swift.opaque* (%swift.opaque*, %swift.opaque*, %swift.type*)*, %swift.opaque* (%swift.opaque*, %swift.opaque*, %swift.type*)** %19, align 8, !invariant.load !12
  %21 = tail call %swift.opaque* %20(%swift.opaque* noalias %14, %swift.opaque* noalias %17, %swift.type* %Element) #9
  %22 = getelementptr inbounds i8*, i8** %Element.valueWitnesses, i64 8
  %23 = bitcast i8** %22 to i64*
  %size = load i64, i64* %23, align 8, !invariant.load !12
  %24 = add i64 %size, 7
  %25 = add i64 %24, %13
  %26 = and i64 %25, -8
  %27 = add i64 %24, %16
  %28 = and i64 %27, -8
  %29 = inttoptr i64 %26 to %TSa*
  %30 = inttoptr i64 %28 to %TSa*
  %._buffer._storage = getelementptr inbounds %TSa, %TSa* %29, i64 0, i32 0, i32 0
  %._buffer2._storage = getelementptr inbounds %TSa, %TSa* %30, i64 0, i32 0, i32 0
  %31 = load %Ts28__ContiguousArrayStorageBaseC*, %Ts28__ContiguousArrayStorageBaseC** %._buffer2._storage, align 8
  %oldValue = load %Ts28__ContiguousArrayStorageBaseC*, %Ts28__ContiguousArrayStorageBaseC** %._buffer._storage, align 8
  store %Ts28__ContiguousArrayStorageBaseC* %31, %Ts28__ContiguousArrayStorageBaseC** %._buffer._storage, align 8
  %32 = getelementptr %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %oldValue, i64 0, i32 0
  tail call void @swift_release(%swift.refcounted* %32) #9
  %33 = add i64 %26, 15
  %34 = and i64 %33, -8
  %35 = add i64 %28, 15
  %36 = and i64 %35, -8
  %37 = inttoptr i64 %34 to %swift.function*
  %38 = inttoptr i64 %36 to %swift.function*
  %.fn = getelementptr inbounds %swift.function, %swift.function* %38, i64 0, i32 0
  %39 = load i8*, i8** %.fn, align 8
  %.data = getelementptr inbounds %swift.function, %swift.function* %38, i64 0, i32 1
  %40 = load %swift.refcounted*, %swift.refcounted** %.data, align 8
  %.fn3 = getelementptr inbounds %swift.function, %swift.function* %37, i64 0, i32 0
  store i8* %39, i8** %.fn3, align 8
  %.data4 = getelementptr inbounds %swift.function, %swift.function* %37, i64 0, i32 1
  %41 = load %swift.refcounted*, %swift.refcounted** %.data4, align 8
  store %swift.refcounted* %40, %swift.refcounted** %.data4, align 8
  tail call void @swift_release(%swift.refcounted* %41) #9
  %42 = add i64 %34, 23
  %43 = and i64 %42, -8
  %44 = add i64 %36, 23
  %45 = and i64 %44, -8
  %46 = inttoptr i64 %43 to %swift.function*
  %47 = inttoptr i64 %45 to %swift.function*
  %.fn5 = getelementptr inbounds %swift.function, %swift.function* %47, i64 0, i32 0
  %48 = load i8*, i8** %.fn5, align 8
  %.data6 = getelementptr inbounds %swift.function, %swift.function* %47, i64 0, i32 1
  %49 = load %swift.refcounted*, %swift.refcounted** %.data6, align 8
  %.fn7 = getelementptr inbounds %swift.function, %swift.function* %46, i64 0, i32 0
  store i8* %48, i8** %.fn7, align 8
  %.data8 = getelementptr inbounds %swift.function, %swift.function* %46, i64 0, i32 1
  %50 = load %swift.refcounted*, %swift.refcounted** %.data8, align 8
  store %swift.refcounted* %49, %swift.refcounted** %.data8, align 8
  tail call void @swift_release(%swift.refcounted* %50) #9
  ret %swift.opaque* %dest
}

; Function Attrs: nofree nounwind readonly
define internal i32 @"$s7llvm_O311FenwickTreeVwet"(%swift.opaque* noalias %value, i32 %numEmptyCases, %swift.type* nocapture readonly %"FenwickTree<Element>") #20 {
entry:
  %0 = getelementptr inbounds %swift.type, %swift.type* %"FenwickTree<Element>", i64 2
  %1 = bitcast %swift.type* %0 to %swift.type**
  %Element = load %swift.type*, %swift.type** %1, align 8, !invariant.load !12
  %2 = getelementptr inbounds %swift.type, %swift.type* %Element, i64 -1
  %3 = bitcast %swift.type* %2 to i8***
  %Element.valueWitnesses = load i8**, i8*** %3, align 8, !invariant.load !12, !dereferenceable !13
  %4 = bitcast i8** %Element.valueWitnesses to %swift.vwtable*
  %5 = getelementptr inbounds %swift.vwtable, %swift.vwtable* %4, i64 0, i32 11
  %extraInhabitantCount = load i32, i32* %5, align 4, !invariant.load !12
  %6 = tail call i32 @llvm.umax.i32(i32 %extraInhabitantCount, i32 4096)
  %7 = getelementptr inbounds i8*, i8** %Element.valueWitnesses, i64 10
  %8 = bitcast i8** %7 to i32*
  %flags = load i32, i32* %8, align 8, !invariant.load !12
  %9 = and i32 %flags, 255
  %flags.alignmentMask = zext i32 %9 to i64
  %10 = xor i64 %flags.alignmentMask, -1
  %11 = add nuw nsw i64 %flags.alignmentMask, 8
  %12 = and i64 %11, %10
  %13 = getelementptr inbounds i8*, i8** %Element.valueWitnesses, i64 8
  %14 = bitcast i8** %13 to i64*
  %size = load i64, i64* %14, align 8, !invariant.load !12
  %15 = add i64 %size, 7
  %16 = add i64 %15, %12
  %17 = and i64 %16, -8
  %18 = add i64 %17, 15
  %19 = and i64 %18, -8
  %20 = add i64 %19, 23
  %21 = and i64 %20, -8
  %size1 = add i64 %21, 16
  %22 = trunc i64 %size1 to i32
  %23 = icmp eq i32 %numEmptyCases, 0
  br i1 %23, label %found_max_xi, label %24

24:                                               ; preds = %entry
  %25 = icmp ult i32 %6, %numEmptyCases
  br i1 %25, label %26, label %.thread

26:                                               ; preds = %24
  %27 = icmp ugt i32 %22, 3
  %28 = add i32 %numEmptyCases, 1
  %29 = sub i32 %28, %6
  %num-tags-phi = select i1 %27, i32 2, i32 %29
  %30 = icmp ult i32 %num-tags-phi, 2
  %31 = icmp ult i32 %num-tags-phi, 256
  %32 = icmp ult i32 %num-tags-phi, 65536
  %33 = select i1 %32, i32 2, i32 4
  %34 = select i1 %31, i32 1, i32 %33
  %num-tag-bytes = select i1 %30, i32 0, i32 %34
  %35 = bitcast %swift.opaque* %value to i8*
  %36 = getelementptr inbounds i8, i8* %35, i64 %size1
  switch i32 %num-tag-bytes, label %47 [
    i32 0, label %.thread
    i32 1, label %37
    i32 2, label %40
    i32 4, label %44
  ]

37:                                               ; preds = %26
  %38 = load i8, i8* %36, align 1
  %39 = zext i8 %38 to i32
  br label %48

40:                                               ; preds = %26
  %41 = bitcast i8* %36 to i16*
  %42 = load i16, i16* %41, align 1
  %43 = zext i16 %42 to i32
  br label %48

44:                                               ; preds = %26
  %45 = bitcast i8* %36 to i32*
  %46 = load i32, i32* %45, align 1
  br label %48

47:                                               ; preds = %26
  unreachable

48:                                               ; preds = %44, %40, %37
  %49 = phi i32 [ %39, %37 ], [ %43, %40 ], [ %46, %44 ]
  %50 = icmp eq i32 %49, 0
  br i1 %50, label %.thread, label %51

51:                                               ; preds = %48
  %52 = add i32 %49, -1
  %53 = select i1 %27, i32 0, i32 %52
  %.not = icmp eq i32 %22, 0
  br i1 %.not, label %57, label %54

54:                                               ; preds = %51
  %55 = bitcast %swift.opaque* %value to i32*
  %56 = load i32, i32* %55, align 8
  br label %57

57:                                               ; preds = %54, %51
  %58 = phi i32 [ 0, %51 ], [ %56, %54 ]
  %59 = or i32 %58, %53
  %60 = add nuw i32 %6, 1
  %61 = add i32 %60, %59
  br label %found_max_xi

.thread:                                          ; preds = %26, %48, %24
  %62 = ptrtoint %swift.opaque* %value to i64
  %63 = add i64 %11, %62
  %64 = and i64 %63, %10
  %65 = icmp ugt i32 %extraInhabitantCount, 4095
  br i1 %65, label %66, label %is-valid-pointer

66:                                               ; preds = %.thread
  %67 = inttoptr i64 %64 to %swift.opaque*
  %68 = getelementptr inbounds i8*, i8** %Element.valueWitnesses, i64 6
  %69 = bitcast i8** %68 to i32 (%swift.opaque*, i32, %swift.type*)**
  %70 = load i32 (%swift.opaque*, i32, %swift.type*)*, i32 (%swift.opaque*, i32, %swift.type*)** %69, align 8, !invariant.load !12
  %71 = tail call i32 %70(%swift.opaque* noalias %67, i32 %extraInhabitantCount, %swift.type* nonnull %Element) #26
  br label %found_max_xi

is-valid-pointer:                                 ; preds = %.thread
  %72 = add i64 %15, %64
  %73 = and i64 %72, -8
  %74 = inttoptr i64 %73 to i64*
  %75 = load i64, i64* %74, align 8
  %76 = icmp ugt i64 %75, 4095
  %77 = trunc i64 %75 to i32
  %.op = add i32 %77, 1
  %78 = select i1 %76, i32 0, i32 %.op
  br label %found_max_xi

found_max_xi:                                     ; preds = %entry, %is-valid-pointer, %66, %57
  %79 = phi i32 [ %61, %57 ], [ %71, %66 ], [ %78, %is-valid-pointer ], [ 0, %entry ]
  ret i32 %79
}

; Function Attrs: nounwind
define internal void @"$s7llvm_O311FenwickTreeVwst"(%swift.opaque* noalias %value, i32 %whichCase, i32 %numEmptyCases, %swift.type* nocapture readonly %"FenwickTree<Element>") #18 {
entry:
  %0 = getelementptr inbounds %swift.type, %swift.type* %"FenwickTree<Element>", i64 2
  %1 = bitcast %swift.type* %0 to %swift.type**
  %Element = load %swift.type*, %swift.type** %1, align 8, !invariant.load !12
  %2 = getelementptr inbounds %swift.type, %swift.type* %Element, i64 -1
  %3 = bitcast %swift.type* %2 to i8***
  %Element.valueWitnesses = load i8**, i8*** %3, align 8, !invariant.load !12, !dereferenceable !13
  %4 = bitcast i8** %Element.valueWitnesses to %swift.vwtable*
  %5 = getelementptr inbounds %swift.vwtable, %swift.vwtable* %4, i64 0, i32 11
  %extraInhabitantCount = load i32, i32* %5, align 4, !invariant.load !12
  %6 = tail call i32 @llvm.umax.i32(i32 %extraInhabitantCount, i32 4096)
  %7 = getelementptr inbounds i8*, i8** %Element.valueWitnesses, i64 10
  %8 = bitcast i8** %7 to i32*
  %flags = load i32, i32* %8, align 8, !invariant.load !12
  %9 = and i32 %flags, 255
  %flags.alignmentMask = zext i32 %9 to i64
  %10 = xor i64 %flags.alignmentMask, -1
  %11 = add nuw nsw i64 %flags.alignmentMask, 8
  %12 = and i64 %11, %10
  %13 = getelementptr inbounds i8*, i8** %Element.valueWitnesses, i64 8
  %14 = bitcast i8** %13 to i64*
  %size = load i64, i64* %14, align 8, !invariant.load !12
  %15 = add i64 %size, 7
  %16 = add i64 %15, %12
  %17 = and i64 %16, -8
  %18 = add i64 %17, 15
  %19 = and i64 %18, -8
  %20 = add i64 %19, 23
  %21 = and i64 %20, -8
  %size1 = add i64 %21, 16
  %22 = trunc i64 %size1 to i32
  %23 = bitcast %swift.opaque* %value to i8*
  %24 = getelementptr inbounds i8, i8* %23, i64 %size1
  %25 = icmp ult i32 %6, %numEmptyCases
  br i1 %25, label %26, label %35

26:                                               ; preds = %entry
  %27 = icmp ugt i32 %22, 3
  %28 = add i32 %numEmptyCases, 1
  %29 = sub i32 %28, %6
  %num-tags-phi = select i1 %27, i32 2, i32 %29
  %30 = icmp ult i32 %num-tags-phi, 2
  %31 = icmp ult i32 %num-tags-phi, 256
  %32 = icmp ult i32 %num-tags-phi, 65536
  %33 = select i1 %32, i32 2, i32 4
  %34 = select i1 %31, i32 1, i32 %33
  %num-tag-bytes = select i1 %30, i32 0, i32 %34
  br label %35

35:                                               ; preds = %26, %entry
  %36 = phi i32 [ 0, %entry ], [ %num-tag-bytes, %26 ]
  %.not = icmp ult i32 %6, %whichCase
  br i1 %.not, label %66, label %37

37:                                               ; preds = %35
  switch i32 %36, label %43 [
    i32 0, label %44
    i32 1, label %38
    i32 2, label %39
    i32 4, label %41
  ]

38:                                               ; preds = %37
  store i8 0, i8* %24, align 1
  br label %44

39:                                               ; preds = %37
  %40 = bitcast i8* %24 to i16*
  store i16 0, i16* %40, align 1
  br label %44

41:                                               ; preds = %37
  %42 = bitcast i8* %24 to i32*
  store i32 0, i32* %42, align 1
  br label %44

43:                                               ; preds = %37
  unreachable

44:                                               ; preds = %37, %41, %39, %38
  %.not9 = icmp eq i32 %whichCase, 0
  br i1 %.not9, label %found_max_xi, label %45

45:                                               ; preds = %44
  %46 = ptrtoint %swift.opaque* %value to i64
  %47 = add i64 %11, %46
  %48 = and i64 %47, %10
  %49 = icmp ugt i32 %extraInhabitantCount, 4095
  br i1 %49, label %50, label %55

50:                                               ; preds = %45
  %51 = inttoptr i64 %48 to %swift.opaque*
  %52 = getelementptr inbounds i8*, i8** %Element.valueWitnesses, i64 7
  %53 = bitcast i8** %52 to void (%swift.opaque*, i32, i32, %swift.type*)**
  %54 = load void (%swift.opaque*, i32, i32, %swift.type*)*, void (%swift.opaque*, i32, i32, %swift.type*)** %53, align 8, !invariant.load !12
  tail call void %54(%swift.opaque* noalias %51, i32 %whichCase, i32 %extraInhabitantCount, %swift.type* nonnull %Element) #9
  br label %found_max_xi

55:                                               ; preds = %45
  %56 = add i64 %15, %48
  %57 = and i64 %56, -8
  %58 = icmp ult i32 %whichCase, 4097
  %59 = inttoptr i64 %57 to i64*
  br i1 %58, label %60, label %63

60:                                               ; preds = %55
  %61 = add nsw i32 %whichCase, -1
  %62 = zext i32 %61 to i64
  store i64 %62, i64* %59, align 8
  br label %found_max_xi

63:                                               ; preds = %55
  %64 = add i32 %whichCase, -4097
  %65 = zext i32 %64 to i64
  store i64 %65, i64* %59, align 8
  br label %found_max_xi

66:                                               ; preds = %35
  %67 = icmp ugt i32 %22, 3
  %68 = sub i32 %whichCase, %6
  %spec.select = select i1 %67, i32 1, i32 %68
  %.not8 = icmp eq i32 %22, 0
  br i1 %.not8, label %73, label %69

69:                                               ; preds = %66
  %70 = xor i32 %6, -1
  %71 = add i32 %70, %whichCase
  %spec.select11 = select i1 %67, i32 %71, i32 0
  tail call void @llvm.memset.p0i8.i32(i8* align 8 %23, i8 0, i32 %22, i1 false)
  %72 = bitcast %swift.opaque* %value to i32*
  store i32 %spec.select11, i32* %72, align 8
  br label %73

73:                                               ; preds = %69, %66
  switch i32 %36, label %81 [
    i32 0, label %found_max_xi
    i32 1, label %74
    i32 2, label %76
    i32 4, label %79
  ]

74:                                               ; preds = %73
  %75 = trunc i32 %spec.select to i8
  store i8 %75, i8* %24, align 1
  br label %found_max_xi

76:                                               ; preds = %73
  %77 = trunc i32 %spec.select to i16
  %78 = bitcast i8* %24 to i16*
  store i16 %77, i16* %78, align 1
  br label %found_max_xi

79:                                               ; preds = %73
  %80 = bitcast i8* %24 to i32*
  store i32 %spec.select, i32* %80, align 1
  br label %found_max_xi

81:                                               ; preds = %73
  unreachable

found_max_xi:                                     ; preds = %63, %74, %76, %79, %73, %60, %50, %44
  ret void
}

; Function Attrs: argmemonly mustprogress nocallback nofree nounwind willreturn writeonly
declare void @llvm.memset.p0i8.i32(i8* nocapture writeonly, i8, i32, i1 immarg) #21

; Function Attrs: nounwind
declare %swift.type* @swift_allocateGenericValueMetadata(%swift.type_descriptor*, i8**, i8*, i64) local_unnamed_addr #9

; Function Attrs: mustprogress nofree nounwind readonly willreturn
declare swiftcc %swift.metadata_response @swift_checkMetadataState(i64, %swift.type*) local_unnamed_addr #22

; Function Attrs: nounwind
declare void @swift_initStructMetadata(%swift.type*, i64, i64, i8***, i32*) local_unnamed_addr #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) #19

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

; Function Attrs: mustprogress nofree noinline nounwind readonly willreturn
define linkonce_odr hidden swiftcc %swift.metadata_response @__swift_instantiateGenericMetadata(i64 %0, i8* %1, i8* %2, i8* %3, %swift.type_descriptor* %4) local_unnamed_addr #10 {
entry:
  %generic.arguments = alloca [3 x i8*], align 8
  %5 = bitcast [3 x i8*]* %generic.arguments to i8*
  call void @llvm.lifetime.start.p0i8(i64 24, i8* nonnull %5)
  %6 = getelementptr inbounds [3 x i8*], [3 x i8*]* %generic.arguments, i64 0, i64 0
  store i8* %1, i8** %6, align 8
  %7 = getelementptr inbounds [3 x i8*], [3 x i8*]* %generic.arguments, i64 0, i64 1
  store i8* %2, i8** %7, align 8
  %8 = getelementptr inbounds [3 x i8*], [3 x i8*]* %generic.arguments, i64 0, i64 2
  store i8* %3, i8** %8, align 8
  %9 = call swiftcc %swift.metadata_response @swift_getGenericMetadata(i64 %0, i8* nonnull %5, %swift.type_descriptor* %4) #26
  ret %swift.metadata_response %9
}

; Function Attrs: nofree nounwind readonly
declare swiftcc %swift.metadata_response @swift_getGenericMetadata(i64, i8*, %swift.type_descriptor*) local_unnamed_addr #12

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

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

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

; Function Attrs: nocallback nofree nosync nounwind readnone speculatable willreturn
declare i32 @llvm.umax.i32(i32, i32) #23

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

; Function Attrs: nounwind
declare %swift.refcounted* @swift_retain_n(%swift.refcounted* returned, i32) #9

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 = { argmemonly mustprogress nocallback nofree nosync nounwind willreturn }
attributes #2 = { mustprogress nofree norecurse nosync nounwind readnone willreturn "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 = { sspreq "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 #4 = { argmemonly mustprogress nofree norecurse nosync nounwind readonly willreturn "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 = { 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 #6 = { cold noreturn nounwind }
attributes #7 = { mustprogress nocallback nofree nosync nounwind readnone speculatable willreturn }
attributes #8 = { mustprogress nounwind willreturn }
attributes #9 = { nounwind }
attributes #10 = { 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 #11 = { argmemonly nounwind }
attributes #12 = { nofree nounwind readonly }
attributes #13 = { nofree nounwind 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 #14 = { nofree noinline nosync nounwind 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 #15 = { 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 #16 = { mustprogress nofree noinline nosync nounwind readnone 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 #17 = { nounwind "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 #18 = { nounwind "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 #19 = { argmemonly mustprogress nocallback nofree nounwind willreturn }
attributes #20 = { nofree nounwind readonly "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 #21 = { argmemonly mustprogress nocallback nofree nounwind willreturn writeonly }
attributes #22 = { mustprogress nofree nounwind readonly willreturn }
attributes #23 = { nocallback nofree nosync nounwind readnone speculatable willreturn }
attributes #24 = { argmemonly nocallback nofree nounwind willreturn writeonly }
attributes #25 = { nounwind willreturn }
attributes #26 = { nounwind readonly }
attributes #27 = { nounwind readnone }
attributes #28 = { nounwind optsize }
attributes #29 = { argmemonly nounwind readonly }
attributes #30 = { nounwind readonly willreturn }

!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 1, i32 2000}
!8 = !{!"branch_weights", i32 2000, i32 1}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.unroll.disable"}
!11 = distinct !{!11, !10}
!12 = !{}
!13 = !{i64 96}
