import Foundation

func readStr() -> [String] {
    readLine()!.map { String($0) }
}

func main(){
    let s = readStr()
    let t = readStr()
    var ans = 0
    
    for i in 0..<t.count {
        if s[i] != t[i] {
            ans += 1
        }
    }
    print(ans)
}
main()


; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/Swift/Source_2920/llvm_O3.ll'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/Swift/Source_2920/llvm_O3.ll"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

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

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

define protected i32 @main(i32 %0, i8** nocapture readnone %1) #0 {
entry:
  tail call swiftcc void @"$s7llvm_O34mainyyF"()
  ret i32 0
}

define hidden swiftcc %Ts28__ContiguousArrayStorageBaseC* @"$s7llvm_O37readStrSaySSGyF"() local_unnamed_addr #0 {
entry:
  %0 = alloca %Ts15ContiguousArrayV, align 8
  %1 = tail call swiftcc { i64, i64 } @"$ss8readLine16strippingNewlineSSSgSb_tF"(i1 true)
  %2 = extractvalue { i64, i64 } %1, 0
  %3 = extractvalue { i64, i64 } %1, 1
  %4 = icmp eq i64 %3, 0
  br i1 %4, label %38, label %5

5:                                                ; preds = %entry
  %6 = inttoptr i64 %3 to %swift.bridge*
  %7 = tail call swiftcc i64 @"$sSS5countSivg"(i64 %2, %swift.bridge* nonnull %6)
  %8 = icmp eq i64 %7, 0
  br i1 %8, label %9, label %10

9:                                                ; preds = %5
  tail call void @swift_bridgeObjectRelease(%swift.bridge* nonnull %6) #5
  br label %16

10:                                               ; preds = %5
  %11 = bitcast %Ts15ContiguousArrayV* %0 to i8*
  call void @llvm.lifetime.start.p0i8(i64 8, i8* nonnull %11)
  %._buffer._storage = getelementptr inbounds %Ts15ContiguousArrayV, %Ts15ContiguousArrayV* %0, i64 0, i32 0, i32 0
  store %Ts28__ContiguousArrayStorageBaseC* bitcast (%struct._SwiftEmptyArrayStorage* @_swiftEmptyArrayStorage to %Ts28__ContiguousArrayStorageBaseC*), %Ts28__ContiguousArrayStorageBaseC** %._buffer._storage, align 8
  %12 = tail call i64 @llvm.smax.i64(i64 %7, i64 0)
  call swiftcc void @"$ss15ContiguousArrayV16_createNewBuffer14bufferIsUnique15minimumCapacity13growForAppendySb_SiSbtFSS_Tg5"(i1 false, i64 %12, i1 false, %Ts15ContiguousArrayV* nocapture nonnull swiftself dereferenceable(8) %0)
  %13 = icmp slt i64 %7, 0
  br i1 %13, label %39, label %14, !prof !6

14:                                               ; preds = %10
  %15 = load %Ts28__ContiguousArrayStorageBaseC*, %Ts28__ContiguousArrayStorageBaseC** %._buffer._storage, align 8
  br label %18

16:                                               ; preds = %9, %37
  %17 = phi %Ts28__ContiguousArrayStorageBaseC* [ %32, %37 ], [ bitcast (%struct._SwiftEmptyArrayStorage* @_swiftEmptyArrayStorage to %Ts28__ContiguousArrayStorageBaseC*), %9 ]
  ret %Ts28__ContiguousArrayStorageBaseC* %17

18:                                               ; preds = %14, %31
  %19 = phi i64 [ 0, %14 ], [ %33, %31 ]
  %20 = phi i64 [ 15, %14 ], [ %35, %31 ]
  %21 = phi %Ts28__ContiguousArrayStorageBaseC* [ %15, %14 ], [ %32, %31 ]
  %22 = tail call swiftcc { i64, %swift.bridge* } @"$sSSySJSS5IndexVcig"(i64 %20, i64 %2, %swift.bridge* nonnull %6)
  %23 = extractvalue { i64, %swift.bridge* } %22, 0
  %24 = extractvalue { i64, %swift.bridge* } %22, 1
  store %Ts28__ContiguousArrayStorageBaseC* %21, %Ts28__ContiguousArrayStorageBaseC** %._buffer._storage, align 8
  %._storage.count._value = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %21, i64 0, i32 1, i32 0, i32 0, i32 0
  %25 = load i64, i64* %._storage.count._value, align 8, !range !7
  %._storage._capacityAndFlags._value = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %21, i64 0, i32 1, i32 0, i32 1, i32 0
  %26 = load i64, i64* %._storage._capacityAndFlags._value, align 8
  %27 = lshr i64 %26, 1
  %28 = add nuw nsw i64 %25, 1
  %.not = icmp ugt i64 %27, %25
  br i1 %.not, label %31, label %29, !prof !8

29:                                               ; preds = %18
  %30 = icmp ugt i64 %26, 1
  call swiftcc void @"$ss15ContiguousArrayV16_createNewBuffer14bufferIsUnique15minimumCapacity13growForAppendySb_SiSbtFSS_Tg5"(i1 %30, i64 %28, i1 true, %Ts15ContiguousArrayV* nocapture nonnull swiftself dereferenceable(8) %0)
  %.pre = load %Ts28__ContiguousArrayStorageBaseC*, %Ts28__ContiguousArrayStorageBaseC** %._buffer._storage, align 8
  br label %31

31:                                               ; preds = %18, %29
  %32 = phi %Ts28__ContiguousArrayStorageBaseC* [ %21, %18 ], [ %.pre, %29 ]
  %33 = add nuw i64 %19, 1
  %._storage3.count._value = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %32, i64 0, i32 1, i32 0, i32 0, i32 0
  store i64 %28, i64* %._storage3.count._value, align 8
  %34 = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %32, i64 1
  %tailaddr = bitcast %Ts28__ContiguousArrayStorageBaseC* %34 to %TSS*
  %._guts._object._countAndFlagsBits._value = getelementptr inbounds %TSS, %TSS* %tailaddr, i64 %25, i32 0, i32 0, i32 0, i32 0
  store i64 %23, i64* %._guts._object._countAndFlagsBits._value, align 8
  %._guts._object._object = getelementptr inbounds %TSS, %TSS* %tailaddr, i64 %25, i32 0, i32 0, i32 1
  store %swift.bridge* %24, %swift.bridge** %._guts._object._object, align 8
  %35 = tail call swiftcc i64 @"$sSS5index5afterSS5IndexVAD_tF"(i64 %20, i64 %2, %swift.bridge* nonnull %6)
  %36 = icmp eq i64 %33, %7
  br i1 %36, label %37, label %18

37:                                               ; preds = %31
  tail call void @swift_bridgeObjectRelease(%swift.bridge* nonnull %6) #5
  call void @llvm.lifetime.end.p0i8(i64 8, i8* nonnull %11)
  br label %16

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

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

define hidden swiftcc void @"$s7llvm_O34mainyyF"() local_unnamed_addr #0 {
entry:
  %0 = tail call swiftcc %Ts28__ContiguousArrayStorageBaseC* @"$s7llvm_O37readStrSaySSGyF"()
  %1 = tail call swiftcc %Ts28__ContiguousArrayStorageBaseC* @"$s7llvm_O37readStrSaySSGyF"()
  %._storage.count._value = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %1, i64 0, i32 1, i32 0, i32 0, i32 0
  %2 = load i64, i64* %._storage.count._value, align 8, !range !7
  %3 = icmp eq i64 %2, 0
  br i1 %3, label %.loopexit, label %4

4:                                                ; preds = %entry
  %._storage1.count._value = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %0, i64 0, i32 1, i32 0, i32 0, i32 0
  %5 = load i64, i64* %._storage1.count._value, align 8, !range !7
  %.not14 = icmp ugt i64 %2, %5
  br i1 %.not14, label %38, label %6, !prof !6

6:                                                ; preds = %4
  %7 = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %0, i64 1
  %tailaddr = bitcast %Ts28__ContiguousArrayStorageBaseC* %7 to %TSS*
  %8 = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %1, i64 1
  %tailaddr2 = bitcast %Ts28__ContiguousArrayStorageBaseC* %8 to %TSS*
  br label %9

9:                                                ; preds = %24, %6
  %10 = phi i64 [ 0, %6 ], [ %25, %24 ]
  %11 = phi i64 [ 0, %6 ], [ %26, %24 ]
  %._guts._object._countAndFlagsBits._value = getelementptr inbounds %TSS, %TSS* %tailaddr, i64 %11, i32 0, i32 0, i32 0, i32 0
  %12 = load i64, i64* %._guts._object._countAndFlagsBits._value, align 8
  %._guts._object._object = getelementptr inbounds %TSS, %TSS* %tailaddr, i64 %11, i32 0, i32 0, i32 1
  %13 = load %swift.bridge*, %swift.bridge** %._guts._object._object, align 8
  %._guts3._object._countAndFlagsBits._value = getelementptr inbounds %TSS, %TSS* %tailaddr2, i64 %11, i32 0, i32 0, i32 0, i32 0
  %14 = load i64, i64* %._guts3._object._countAndFlagsBits._value, align 8
  %._guts3._object._object = getelementptr inbounds %TSS, %TSS* %tailaddr2, i64 %11, i32 0, i32 0, i32 1
  %15 = load %swift.bridge*, %swift.bridge** %._guts3._object._object, align 8
  %16 = icmp eq i64 %12, %14
  %17 = icmp eq %swift.bridge* %13, %15
  %or.cond = select i1 %16, i1 %17, i1 false
  br i1 %or.cond, label %24, label %18

18:                                               ; preds = %9
  %19 = tail call swiftcc i1 @"$ss27_stringCompareWithSmolCheck__9expectingSbs11_StringGutsV_ADs01_G16ComparisonResultOtF"(i64 %12, %swift.bridge* %13, i64 %14, %swift.bridge* %15, i8 0)
  br i1 %19, label %24, label %20

20:                                               ; preds = %18
  %21 = tail call { i64, i1 } @llvm.sadd.with.overflow.i64(i64 %10, i64 1)
  %22 = extractvalue { i64, i1 } %21, 0
  %23 = extractvalue { i64, i1 } %21, 1
  br i1 %23, label %39, label %24, !prof !6

24:                                               ; preds = %9, %20, %18
  %25 = phi i64 [ %10, %18 ], [ %22, %20 ], [ %10, %9 ]
  %26 = add nuw nsw i64 %11, 1
  %27 = icmp eq i64 %26, %2
  br i1 %27, label %.loopexit, label %9

.loopexit:                                        ; preds = %24, %entry
  %28 = phi i64 [ 0, %entry ], [ %25, %24 ]
  %29 = tail call %swift.type* @__swift_instantiateConcreteTypeFromMangledName({ i32, i32 }* nonnull @"$ss23_ContiguousArrayStorageCyypGMD") #12
  %30 = tail call noalias %swift.refcounted* @swift_allocObject(%swift.type* %29, i64 64, i64 7) #5
  %31 = bitcast %swift.refcounted* %30 to %Ts28__ContiguousArrayStorageBaseC*
  %32 = getelementptr inbounds %swift.refcounted, %swift.refcounted* %30, i64 1
  %._storage4.count._value = bitcast %swift.refcounted* %32 to i64*
  store i64 1, i64* %._storage4.count._value, align 8
  %._storage4._capacityAndFlags = getelementptr inbounds %swift.refcounted, %swift.refcounted* %30, i64 1, i32 1
  store i64 2, i64* %._storage4._capacityAndFlags, align 8
  %33 = getelementptr inbounds %swift.refcounted, %swift.refcounted* %30, i64 2
  %34 = getelementptr inbounds %swift.refcounted, %swift.refcounted* %30, i64 3, i32 1
  %35 = bitcast i64* %34 to %swift.type**
  store %swift.type* @"$sSiN", %swift.type** %35, align 8
  %._value = bitcast %swift.refcounted* %33 to i64*
  store i64 %28, i64* %._value, align 8
  tail call swiftcc void @"$ss5print_9separator10terminatoryypd_S2StF"(%Ts28__ContiguousArrayStorageBaseC* %31, i64 32, %swift.bridge* nonnull inttoptr (i64 -2233785415175766016 to %swift.bridge*), i64 10, %swift.bridge* nonnull inttoptr (i64 -2233785415175766016 to %swift.bridge*))
  tail call void @swift_release(%swift.refcounted* %30) #5
  %36 = getelementptr %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %1, i64 0, i32 0
  tail call void @swift_release(%swift.refcounted* %36) #5
  %37 = getelementptr %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %0, i64 0, i32 0
  tail call void @swift_release(%swift.refcounted* %37) #5
  ret void

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

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

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

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

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

; Function Attrs: argmemonly mustprogress nocallback nofree nosync nounwind willreturn
declare void @llvm.lifetime.start.p0i8(i64 immarg, i8* nocapture) #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 #3 {
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
}

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

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

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

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

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

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

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

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

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

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

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

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

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

; 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 #3 {
entry:
  br i1 %2, label %4, label %14

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

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

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

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

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

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

33:                                               ; preds = %29
  %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") #15
  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) #5
  ret %Ts28__ContiguousArrayStorageBaseC* %30

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

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

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

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

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

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