import Foundation

let inputs = readLine()!.components(separatedBy: " ").map{ Double($0)! }
let N = inputs[0]
let K = inputs[1]
var digits = 0

for i in 0...100{
    if N >= pow(K, Double(i)) {
        digits += 1
    }
}

print(digits)
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/Swift/Source_1244/llvm_O3.ll'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/Swift/Source_1244/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"

%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 }>
%TSi = type <{ i64 }>
%TSu = type <{ i64 }>
%TSd = type <{ double }>
%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.protocol_conformance_descriptor = type { i32, i32, i32, i32 }
%swift.type_descriptor = type opaque
%TSS = type <{ %Ts11_StringGutsV }>
%Ts11_StringGutsV = type <{ %Ts13_StringObjectV }>
%Ts13_StringObjectV = type <{ %Ts6UInt64V, %swift.bridge* }>
%Ts6UInt64V = type <{ i64 }>
%swift.bridge = type opaque
%Ts15ContiguousArrayV = type <{ %Ts22_ContiguousArrayBufferV }>
%swift.opaque = type opaque

@"$s7llvm_O36inputsSaySdGvp" = hidden local_unnamed_addr global %TSa zeroinitializer, align 8
@"$s7llvm_O31NSdvp" = hidden local_unnamed_addr global %TSd zeroinitializer, align 8
@"$s7llvm_O31KSdvp" = hidden local_unnamed_addr global %TSd zeroinitializer, align 8
@"$s7llvm_O36digitsSivp" = hidden global %TSi zeroinitializer, align 8
@_swiftEmptyArrayStorage = external global %struct._SwiftEmptyArrayStorage, align 8
@"$sSSN" = external global %swift.type, align 8
@"$sS2SSysWL" = linkonce_odr hidden local_unnamed_addr global i8** null, align 8
@"$sSSSysMc" = external global %swift.protocol_conformance_descriptor, align 4
@"$sSSSTsWP" = external global i8*, 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 _____ySdG 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 _____ySdG s23_ContiguousArrayStorageC", i32 0, i32 1) to i64)) to i32), [4 x i8] c"ySdG", i8 0 }>, section "swift5_typeref", no_sanitize_address, align 2
@"$ss23_ContiguousArrayStorageCySdGMD" = linkonce_odr hidden global { i32, i32 } { i32 trunc (i64 sub (i64 ptrtoint (<{ i8, i32, [4 x i8], i8 }>* @"symbolic _____ySdG s23_ContiguousArrayStorageC" to i64), i64 ptrtoint ({ i32, i32 }* @"$ss23_ContiguousArrayStorageCySdGMD" to i64)) to i32), i32 -9 }, align 8
@__swift_reflection_version = linkonce_odr hidden constant i16 3
@_swift1_autolink_entries = private constant [172 x i8] c"-lFoundation\00-lswiftCore\00-lswift_StringProcessing\00-lswift_RegexParser\00-lswift_Concurrency\00-lswiftGlibc\00-lm\00-lpthread\00-lutil\00-ldl\00-lswiftDispatch\00-ldispatch\00-lBlocksRuntime\00", section ".swift1_autolink_entries", no_sanitize_address, align 8
@llvm.compiler.used = appending global [4 x i8*] [i8* bitcast ({ i32, i32 }* @"\01l_entry_point" to i8*), i8* bitcast (i16* @__swift_reflection_version to i8*), i8* getelementptr inbounds ([172 x i8], [172 x i8]* @_swift1_autolink_entries, i32 0, i32 0), i8* bitcast (i32 (i32, i8**)* @main to i8*)], section "llvm.metadata"

define protected i32 @main(i32 %0, i8** nocapture readnone %1) #0 {
entry:
  %2 = alloca %TSS, align 8
  %3 = alloca %TSS, align 8
  %4 = alloca %Ts15ContiguousArrayV, align 8
  %5 = alloca %TSS, align 8
  %access-scratch = alloca [24 x i8], align 8
  %6 = tail call swiftcc { i64, i64 } @"$ss8readLine16strippingNewlineSSSgSb_tF"(i1 true)
  %7 = extractvalue { i64, i64 } %6, 1
  %8 = icmp eq i64 %7, 0
  br i1 %8, label %104, label %9

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

20:                                               ; preds = %9
  %21 = getelementptr %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %17, i64 0, i32 0
  tail call void @swift_release(%swift.refcounted* %21) #5
  br label %28

22:                                               ; preds = %9
  %23 = bitcast %Ts15ContiguousArrayV* %4 to i8*
  call void @llvm.lifetime.start.p0i8(i64 8, i8* nonnull %23)
  %._buffer._storage = getelementptr inbounds %Ts15ContiguousArrayV, %Ts15ContiguousArrayV* %4, 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_SiSbtFSd_Tg5"(i1 false, i64 %18, i1 false, %Ts15ContiguousArrayV* nocapture nonnull swiftself dereferenceable(8) %4)
  %24 = load %Ts28__ContiguousArrayStorageBaseC*, %Ts28__ContiguousArrayStorageBaseC** %._buffer._storage, align 8
  %25 = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %17, i64 1
  %tailaddr = bitcast %Ts28__ContiguousArrayStorageBaseC* %25 to %TSS*
  %26 = bitcast %TSS* %5 to i8*
  %._guts4._object._countAndFlagsBits._value = getelementptr inbounds %TSS, %TSS* %5, i64 0, i32 0, i32 0, i32 0, i32 0
  %._guts4._object._object = getelementptr inbounds %TSS, %TSS* %5, i64 0, i32 0, i32 0, i32 1
  %27 = bitcast %TSS* %5 to %swift.opaque*
  br label %39

28:                                               ; preds = %20, %67
  %29 = phi %Ts28__ContiguousArrayStorageBaseC* [ %63, %67 ], [ bitcast (%struct._SwiftEmptyArrayStorage* @_swiftEmptyArrayStorage to %Ts28__ContiguousArrayStorageBaseC*), %20 ]
  store %Ts28__ContiguousArrayStorageBaseC* %29, %Ts28__ContiguousArrayStorageBaseC** getelementptr inbounds (%TSa, %TSa* @"$s7llvm_O36inputsSaySdGvp", i64 0, i32 0, i32 0), align 8
  %._storage9.count._value = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %29, i64 0, i32 1, i32 0, i32 0, i32 0
  %30 = load i64, i64* %._storage9.count._value, align 8, !range !6
  %.not26 = icmp eq i64 %30, 0
  br i1 %.not26, label %106, label %31, !prof !7

31:                                               ; preds = %28
  %32 = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %29, i64 1
  %tailaddr10._value = bitcast %Ts28__ContiguousArrayStorageBaseC* %32 to double*
  %33 = load double, double* %tailaddr10._value, align 8
  store double %33, double* getelementptr inbounds (%TSd, %TSd* @"$s7llvm_O31NSdvp", i64 0, i32 0), align 8
  %34 = icmp eq i64 %30, 1
  br i1 %34, label %107, label %35, !prof !7

35:                                               ; preds = %31
  %36 = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %29, i64 1, i32 0, i32 1
  %._value13 = bitcast i64* %36 to double*
  %37 = load double, double* %._value13, align 8
  store double %37, double* getelementptr inbounds (%TSd, %TSd* @"$s7llvm_O31KSdvp", i64 0, i32 0), align 8
  store i64 0, i64* getelementptr inbounds (%TSi, %TSi* @"$s7llvm_O36digitsSivp", i64 0, i32 0), align 8
  %38 = getelementptr inbounds [24 x i8], [24 x i8]* %access-scratch, i64 0, i64 0
  call void @llvm.lifetime.start.p0i8(i64 -1, i8* nonnull %38)
  call void @swift_beginAccess(i8* nonnull bitcast (%TSi* @"$s7llvm_O36digitsSivp" to i8*), [24 x i8]* nonnull %access-scratch, i64 1, i8* null) #5
  br label %93

39:                                               ; preds = %22, %62
  %40 = phi i64 [ 0, %22 ], [ %42, %62 ]
  %41 = phi %Ts28__ContiguousArrayStorageBaseC* [ %24, %22 ], [ %63, %62 ]
  %42 = add nuw nsw i64 %40, 1
  %._guts3._object._countAndFlagsBits._value = getelementptr inbounds %TSS, %TSS* %tailaddr, i64 %40, i32 0, i32 0, i32 0, i32 0
  %43 = load i64, i64* %._guts3._object._countAndFlagsBits._value, align 8
  %._guts3._object._object = getelementptr inbounds %TSS, %TSS* %tailaddr, i64 %40, i32 0, i32 0, i32 1
  %44 = load %swift.bridge*, %swift.bridge** %._guts3._object._object, align 8
  call void @llvm.lifetime.start.p0i8(i64 16, i8* nonnull %26)
  store i64 %43, i64* %._guts4._object._countAndFlagsBits._value, align 8
  store %swift.bridge* %44, %swift.bridge** %._guts4._object._object, align 8
  %45 = tail call %swift.bridge* @swift_bridgeObjectRetain(%swift.bridge* returned %44) #5
  %46 = call swiftcc { i64, i64, i64, %swift.bridge* } @"$sSsySsxcSTRzSJ7ElementRtzlufC"(%swift.opaque* noalias nocapture nonnull %27, %swift.type* nonnull @"$sSSN", i8** nonnull @"$sSSSTsWP")
  %47 = extractvalue { i64, i64, i64, %swift.bridge* } %46, 0
  %48 = extractvalue { i64, i64, i64, %swift.bridge* } %46, 1
  %49 = extractvalue { i64, i64, i64, %swift.bridge* } %46, 2
  %50 = extractvalue { i64, i64, i64, %swift.bridge* } %46, 3
  %51 = tail call swiftcc { i64, i8 } @"$sSdySdSgSscfC"(i64 %47, i64 %48, i64 %49, %swift.bridge* %50)
  %52 = extractvalue { i64, i8 } %51, 1
  %53 = and i8 %52, 1
  %.not24 = icmp eq i8 %53, 0
  call void @llvm.lifetime.end.p0i8(i64 16, i8* nonnull %26)
  br i1 %.not24, label %54, label %105

54:                                               ; preds = %39
  %55 = extractvalue { i64, i8 } %51, 0
  store %Ts28__ContiguousArrayStorageBaseC* %41, %Ts28__ContiguousArrayStorageBaseC** %._buffer._storage, align 8
  %._storage6.count._value = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %41, i64 0, i32 1, i32 0, i32 0, i32 0
  %56 = load i64, i64* %._storage6.count._value, align 8, !range !6
  %._storage6._capacityAndFlags._value = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %41, i64 0, i32 1, i32 0, i32 1, i32 0
  %57 = load i64, i64* %._storage6._capacityAndFlags._value, align 8
  %58 = lshr i64 %57, 1
  %59 = add nuw nsw i64 %56, 1
  %.not25 = icmp ugt i64 %58, %56
  br i1 %.not25, label %62, label %60, !prof !8

60:                                               ; preds = %54
  %61 = icmp ugt i64 %57, 1
  call swiftcc void @"$ss15ContiguousArrayV16_createNewBuffer14bufferIsUnique15minimumCapacity13growForAppendySb_SiSbtFSd_Tg5"(i1 %61, i64 %59, i1 true, %Ts15ContiguousArrayV* nocapture nonnull swiftself dereferenceable(8) %4)
  %.pre = load %Ts28__ContiguousArrayStorageBaseC*, %Ts28__ContiguousArrayStorageBaseC** %._buffer._storage, align 8
  br label %62

62:                                               ; preds = %54, %60
  %63 = phi %Ts28__ContiguousArrayStorageBaseC* [ %41, %54 ], [ %.pre, %60 ]
  %._storage7.count._value = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %63, i64 0, i32 1, i32 0, i32 0, i32 0
  store i64 %59, i64* %._storage7.count._value, align 8
  %64 = getelementptr inbounds %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %63, i64 1
  %tailaddr8 = bitcast %Ts28__ContiguousArrayStorageBaseC* %64 to %TSd*
  %._value = getelementptr inbounds %TSd, %TSd* %tailaddr8, i64 %56, i32 0
  %65 = bitcast double* %._value to i64*
  store i64 %55, i64* %65, align 8
  %66 = icmp eq i64 %42, %18
  br i1 %66, label %67, label %39

67:                                               ; preds = %62
  %68 = getelementptr %Ts28__ContiguousArrayStorageBaseC, %Ts28__ContiguousArrayStorageBaseC* %17, i64 0, i32 0
  tail call void @swift_release(%swift.refcounted* %68) #5
  call void @llvm.lifetime.end.p0i8(i64 8, i8* nonnull %23)
  br label %28

69:                                               ; preds = %93, %102
  %70 = icmp eq i64 %94, 100
  br i1 %70, label %84, label %71

71:                                               ; preds = %69
  %72 = or i64 %94, 1
  %73 = sitofp i64 %72 to double
  %74 = call double @pow(double %37, double %73)
  %75 = fcmp ugt double %74, %33
  br i1 %75, label %82, label %76

76:                                               ; preds = %71
  %77 = load i64, i64* getelementptr inbounds (%TSi, %TSi* @"$s7llvm_O36digitsSivp", i64 0, i32 0), align 8
  %78 = call { i64, i1 } @llvm.sadd.with.overflow.i64(i64 %77, i64 1)
  %79 = extractvalue { i64, i1 } %78, 1
  br i1 %79, label %108, label %80, !prof !7

80:                                               ; preds = %76
  %81 = extractvalue { i64, i1 } %78, 0
  store i64 %81, i64* getelementptr inbounds (%TSi, %TSi* @"$s7llvm_O36digitsSivp", i64 0, i32 0), align 8
  br label %82

82:                                               ; preds = %80, %71
  %83 = add nuw nsw i64 %94, 2
  br label %93

84:                                               ; preds = %69
  %85 = call %swift.type* @__swift_instantiateConcreteTypeFromMangledName({ i32, i32 }* nonnull @"$ss23_ContiguousArrayStorageCyypGMD") #15
  %86 = call noalias %swift.refcounted* @swift_allocObject(%swift.type* %85, i64 64, i64 7) #5
  %87 = bitcast %swift.refcounted* %86 to %Ts28__ContiguousArrayStorageBaseC*
  %88 = getelementptr inbounds %swift.refcounted, %swift.refcounted* %86, i64 1
  %._storage14.count._value = bitcast %swift.refcounted* %88 to i64*
  store i64 1, i64* %._storage14.count._value, align 8
  %._storage14._capacityAndFlags = getelementptr inbounds %swift.refcounted, %swift.refcounted* %86, i64 1, i32 1
  store i64 2, i64* %._storage14._capacityAndFlags, align 8
  %89 = getelementptr inbounds %swift.refcounted, %swift.refcounted* %86, i64 2
  %90 = load i64, i64* getelementptr inbounds (%TSi, %TSi* @"$s7llvm_O36digitsSivp", i64 0, i32 0), align 8
  %91 = getelementptr inbounds %swift.refcounted, %swift.refcounted* %86, i64 3, i32 1
  %92 = bitcast i64* %91 to %swift.type**
  store %swift.type* @"$sSiN", %swift.type** %92, align 8
  %._value16 = bitcast %swift.refcounted* %89 to i64*
  store i64 %90, i64* %._value16, align 8
  call swiftcc void @"$ss5print_9separator10terminatoryypd_S2StF"(%Ts28__ContiguousArrayStorageBaseC* %87, 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* %86) #5
  ret i32 0

93:                                               ; preds = %82, %35
  %94 = phi i64 [ 0, %35 ], [ %83, %82 ]
  %95 = sitofp i64 %94 to double
  %96 = call double @pow(double %37, double %95)
  %97 = fcmp ugt double %96, %33
  br i1 %97, label %69, label %98

98:                                               ; preds = %93
  %99 = load i64, i64* getelementptr inbounds (%TSi, %TSi* @"$s7llvm_O36digitsSivp", i64 0, i32 0), align 8
  %100 = call { i64, i1 } @llvm.sadd.with.overflow.i64(i64 %99, i64 1)
  %101 = extractvalue { i64, i1 } %100, 1
  br i1 %101, label %108, label %102, !prof !7

102:                                              ; preds = %98
  %103 = extractvalue { i64, i1 } %100, 0
  store i64 %103, i64* getelementptr inbounds (%TSi, %TSi* @"$s7llvm_O36digitsSivp", i64 0, i32 0), align 8
  br label %69

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

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

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

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

108:                                              ; preds = %76, %98
  call void asm sideeffect "", "n"(i32 7) #5
  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

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

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

declare swiftcc %Ts28__ContiguousArrayStorageBaseC* @"$sSy10FoundationE10components11separatedBySaySSGqd___tSyRd__lF"(%swift.opaque* noalias nocapture, %swift.type*, %swift.type*, i8**, i8**, %swift.opaque* noalias nocapture swiftself) local_unnamed_addr #0

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

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

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

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

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

; Function Attrs: noinline
define linkonce_odr hidden swiftcc void @"$ss15ContiguousArrayV16_createNewBuffer14bufferIsUnique15minimumCapacity13growForAppendySb_SiSbtFSd_Tg5"(i1 %0, i64 %1, i1 %2, %Ts15ContiguousArrayV* nocapture swiftself dereferenceable(8) %3) local_unnamed_addr #6 {
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_SiSbtFSd_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, i64, i64, %swift.bridge* } @"$sSsySsxcSTRzSJ7ElementRtzlufC"(%swift.opaque* noalias nocapture, %swift.type*, i8**) local_unnamed_addr #0

declare swiftcc { i64, i8 } @"$sSdySdSgSscfC"(i64, 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) #7

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

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

; Function Attrs: mustprogress nofree nounwind optsize willreturn writeonly
declare double @pow(double noundef, double noundef) local_unnamed_addr #8

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

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

; 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: noinline
define linkonce_odr hidden swiftcc %Ts28__ContiguousArrayStorageBaseC* @"$ss22_ContiguousArrayBufferV20_consumeAndCreateNew14bufferIsUnique15minimumCapacity13growForAppendAByxGSb_SiSbtFSd_Tg5"(i1 %0, i64 %1, i1 %2, %Ts28__ContiguousArrayStorageBaseC* %3) local_unnamed_addr #6 {
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_ContiguousArrayStorageCySdGMD") #15
  %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) #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) #17
  %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 %TSd*
  %36 = getelementptr inbounds %TSd, %TSd* %tailaddr4, i64 %16
  %37 = bitcast %TSd* %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) #5
  ret %Ts28__ContiguousArrayStorageBaseC* %30

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

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

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

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

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

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 = { 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 #4 = { nofree nounwind readonly }
attributes #5 = { nounwind }
attributes #6 = { 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 #7 = { mustprogress nocallback nofree nosync nounwind readnone speculatable willreturn }
attributes #8 = { mustprogress nofree nounwind optsize willreturn writeonly "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 #9 = { 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 #10 = { argmemonly nounwind }
attributes #11 = { argmemonly mustprogress nocallback nofree nounwind willreturn }
attributes #12 = { 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 #13 = { nocallback nofree nosync nounwind readnone speculatable willreturn }
attributes #14 = { nounwind readnone }
attributes #15 = { nounwind readonly }
attributes #16 = { argmemonly nounwind readonly }
attributes #17 = { nounwind optsize }

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

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