   // CHECK: [[THROWING_BB]]([[ERROR:%.*]] : $Error):
   // CHECK-NEXT: destroy_value [[MARKED_SELF_BOX]]
   // CHECK-NEXT: throw [[ERROR]]
-  convenience init(failDuringOrAfterDelegation: Int) throws {
+  // CHECK: } // end sil function '_T021failable_initializers17ThrowDerivedClassCACSi28chainingFailBeforeDelegation_Si0fg6DuringI11ArgEmissionSi0fgjI4CalltKcfC'
+  convenience init(chainingFailDuringDelegationCall : Int, chainingFailAfterDelegation : Int) throws {
     try self.init()
-    try unwrap(failDuringOrAfterDelegation)
-  }
-
-  convenience init(failBeforeOrAfterDelegation: Int) throws {
-    try unwrap(failBeforeOrAfterDelegation)
-    self.init(noFail: ())
-    try unwrap(failBeforeOrAfterDelegation)
+    try unwrap(chainingFailAfterDelegation)
+  }
+
+  convenience init(chainingFailBeforeDelegation : Int, chainingFailDuringDelegationArgEmission : Int, chainingFailDuringDelegationCall : Int) throws {
+    try unwrap(chainingFailBeforeDelegation)
+    try self.init(fail: try unwrap(chainingFailDuringDelegationArgEmission))
+  }
+
+  convenience init(chainingFailBeforeDelegation : Int, chainingFailDuringDelegationArgEmission : Int, chainingFailAfterDelegation : Int) throws {
+    try unwrap(chainingFailBeforeDelegation)
+    self.init(noFail: try unwrap(chainingFailDuringDelegationArgEmission))
+    try unwrap(chainingFailAfterDelegation)
+  }
+
+  convenience init(chainingFailBeforeDelegation : Int, chainingFailDuringDelegationCall : Int, chainingFailAfterDelegation : Int) throws {
+    try unwrap(chainingFailBeforeDelegation)
+    try self.init()
+    try unwrap(chainingFailAfterDelegation)
+  }
+
+  convenience init(chainingFailDuringDelegationArgEmission : Int, chainingFailDuringDelegationCall : Int, chainingFailAfterDelegation : Int) throws {
+    try self.init(fail: try unwrap(chainingFailDuringDelegationArgEmission))
+    try unwrap(chainingFailAfterDelegation)
+  }
+
+  convenience init(chainingFailBeforeDelegation : Int, chainingFailDuringDelegationArgEmission : Int, chainingFailDuringDelegationCall : Int, chainingFailAfterDelegation : Int) throws {
+    try unwrap(chainingFailBeforeDelegation)
+    try self.init(fail: try unwrap(chainingFailDuringDelegationArgEmission))
+    try unwrap(chainingFailAfterDelegation)
   }
 }
 

  // CHECK: [[THROWING_BB]]([[ERROR:%.*]] : $Error):
  // CHECK-NEXT: destroy_value [[MARKED_SELF_BOX]]
  // CHECK-NEXT: throw [[ERROR]]
  convenience init(failBeforeOrDuringDelegation2: Int) throws {
    try self.init(failBeforeDelegation: unwrap(failBeforeOrDuringDelegation2))
  }

  convenience init(failAfterDelegation: Int) throws {
    self.init(noFail: ())
    try unwrap(failAfterDelegation)
  }

  // CHECK-LABEL: sil hidden @_T021failable_initializers17ThrowDerivedClassCACSi27failDuringOrAfterDelegation_tKcfc : $@convention(method) (Int, @owned ThrowDerivedClass) -> (@owned ThrowDerivedClass, @error Error) {
  // CHECK: bb0({{.*}}, [[OLD_SELF:%.*]] : $ThrowDerivedClass):
  // CHECK:   [[SELF_BOX:%.*]] = alloc_box ${ var ThrowDerivedClass }, let, name "self"
  // CHECK:   [[MARKED_SELF_BOX:%.*]] = mark_uninitialized [delegatingself] [[SELF_BOX]]

    try! super.init()
  }

  override init(fail: Int) throws {}
  override init(noFail: Int) {}

  // ---- Delegating to super

  // CHECK-LABEL: sil hidden @_T021failable_initializers17ThrowDerivedClassCACSi30delegatingFailBeforeDelegation_tKcfc : $@convention(method) (Int, @owned ThrowDerivedClass) -> (@owned ThrowDerivedClass, @error Error) {
  // CHECK: bb0(
  // First initialize.
  // CHECK:   [[REF:%.*]] = alloc_box ${ var ThrowDerivedClass }, let, name "self"
  // CHECK:   [[MARK_UNINIT:%.*]] = mark_uninitialized [derivedself] [[REF]] : ${ var ThrowDerivedClass }
  // CHECK:   [[PROJ:%.*]] = project_box [[MARK_UNINIT]]
  // CHECK:   store {{%.*}} to [init] [[PROJ]]
  //
  // Then initialize the canary with nil. We are able to borrow the initialized self to avoid retain/release overhead.
  // CHECK:   [[CANARY_FUNC:%.*]] = function_ref @_T021failable_initializers17ThrowDerivedClassC6canaryAA6CanaryCSgvfi :
  // CHECK:   [[OPT_CANARY:%.*]] = apply [[CANARY_FUNC]]()
  // CHECK:   [[SELF:%.*]] = load_borrow [[PROJ]]
  // CHECK:   [[CANARY_ADDR:%.*]] = ref_element_addr [[SELF]]
  // CHECK:   [[CANARY_ACCESS:%.*]] = begin_access [modify] [dynamic] [[CANARY_ADDR]]
  // CHECK:   assign [[OPT_CANARY]] to [[CANARY_ACCESS]]
  // CHECK:   end_access [[CANARY_ACCESS]]
  // CHECK:   end_borrow [[SELF]] from [[PROJ]]
  //
  // Now we perform the unwrap.
  // CHECK:   [[UNWRAP_FN:%.*]] = function_ref @_T021failable_initializers6unwrapS2iKF : $@convention(thin)
  // CHECK:   try_apply [[UNWRAP_FN]]({{%.*}}) : $@convention(thin) (Int) -> (Int, @error Error), normal [[NORMAL_BB:bb[0-9]+]], error [[ERROR_BB:bb[0-9]+]]
  //
  // CHECK: [[NORMAL_BB]](
  // CHECK:   [[SELF:%.*]] = load [take] [[PROJ]]
  // CHECK:   [[SELF_BASE:%.*]] = upcast [[SELF]] : $ThrowDerivedClass to $ThrowBaseClass
  // CHECK:   [[BASE_INIT_FN:%.*]] = function_ref @_T021failable_initializers14ThrowBaseClassCACyt6noFail_tcfc : $@convention(method)
  // CHECK:   [[SELF_INIT_BASE:%.*]] = apply [[BASE_INIT_FN]]([[SELF_BASE]])
  // CHECK:   [[SELF:%.*]] = unchecked_ref_cast [[SELF_INIT_BASE]] : $ThrowBaseClass to $ThrowDerivedClass
  // CHECK:   store [[SELF]] to [init] [[PROJ]]
  // CHECK:   [[SELF:%.*]] = load [copy] [[PROJ]]
  // CHECK:   destroy_value [[MARK_UNINIT]]
  // CHECK:   return [[SELF]]
  //
  // Finally the error BB. We do not touch self since self is still in the
  // box implying that destroying MARK_UNINIT will destroy it for us.
  // CHECK: [[ERROR_BB]]([[ERROR:%.*]] : $Error):
  // CHECK:   destroy_value [[MARK_UNINIT]]
  // CHECK:   throw [[ERROR]]
  // CHECK: } // end sil function '_T021failable_initializers17ThrowDerivedClassCACSi30delegatingFailBeforeDelegation_tKcfc'
  init(delegatingFailBeforeDelegation : Int) throws {
    try unwrap(delegatingFailBeforeDelegation)
    super.init(noFail: ())
  }

  // CHECK-LABEL: sil hidden @_T021failable_initializers17ThrowDerivedClassCACSi41delegatingFailDuringDelegationArgEmission_tKcfc : $@convention(method) (Int, @owned ThrowDerivedClass) -> (@owned ThrowDerivedClass, @error Error) {
