	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_efx_mcdi_rpc_finish            ## -- Begin function efx_mcdi_rpc_finish
	.p2align	4, 0x90
_efx_mcdi_rpc_finish:                   ## @efx_mcdi_rpc_finish
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, -80(%rbp)                  ## 8-byte Spill
	movq	%r8, -64(%rbp)                  ## 8-byte Spill
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r15
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movq	%rdi, %r14
	callq	_efx_mcdi
	movq	%rax, %r12
	movq	%r14, %rdi
	callq	_efx_nic_rev
	movq	_EFX_REV_SIENA_A0@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	setl	%dil
	callq	_BUG_ON
	movq	(%r12), %rax
	movq	_MCDI_MODE_POLL@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	movq	%r14, %rdi
	callq	_efx_mcdi_poll
	jmp	LBB0_3
LBB0_2:
	movq	%r14, %rdi
	callq	_efx_mcdi_await_completion
LBB0_3:
	movl	%eax, %r13d
	movq	%r12, %rbx
	addq	$24, %rbx
	movq	%rbx, %rdi
	callq	_spin_lock_bh
	testl	%r13d, %r13d
	je	LBB0_5
## %bb.4:
	incl	32(%r12)
	incl	28(%r12)
	movq	%rbx, %rdi
	callq	_spin_unlock_bh
	movq	_hw@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r14), %edx
	movq	(%r12), %rax
	movq	%rax, (%rsp)
	leaq	L_.str(%rip), %rcx
	movq	%r14, %rdi
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
	movl	%r15d, %r9d
	xorl	%eax, %eax
	callq	_netif_err
	jmp	LBB0_17
LBB0_5:
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movl	8(%r12), %r15d
	movq	16(%r12), %r13
	movq	%rbx, %rdi
	callq	_spin_unlock_bh
	testl	%r15d, %r15d
	je	LBB0_6
## %bb.8:
	movq	_MC_CMD_REBOOT@GOTPCREL(%rip), %rcx
	movq	_EIO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
	cmpl	%r8d, (%rcx)
	jne	LBB0_10
## %bb.9:
	cmpl	%r15d, %eax
	je	LBB0_14
LBB0_10:
	movq	_hw@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	(%r14), %edx
	cmpl	%r15d, %eax
	je	LBB0_12
## %bb.11:
	movq	_EINTR@GOTPCREL(%rip), %rax
	cmpl	%r15d, (%rax)
	je	LBB0_12
## %bb.13:
	movl	%r15d, (%rsp)
	leaq	L_.str.2(%rip), %rcx
	movq	%r14, %rdi
	movq	-56(%rbp), %r9                  ## 8-byte Reload
                                        ## kill: def $r9d killed $r9d killed $r9
	callq	_netif_dbg
	jmp	LBB0_14
LBB0_6:
	movl	16(%r12), %esi
	addl	$3, %esi
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_min
	andl	$-4, %eax
	movq	%r14, %rdi
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	movl	%eax, %edx
	callq	_efx_mcdi_copyout
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	testq	%rax, %rax
	je	LBB0_14
## %bb.7:
	movq	%r13, (%rax)
	jmp	LBB0_14
LBB0_12:
	leaq	L_.str.1(%rip), %rcx
	movq	%r14, %rdi
	movl	%r15d, %r8d
	xorl	%eax, %eax
	callq	_netif_err
	movq	_RESET_TYPE_MC_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_efx_schedule_reset
LBB0_14:
	movl	%r15d, %r13d
	negl	%r13d
	movq	_EIO@GOTPCREL(%rip), %rax
	cmpl	%r15d, (%rax)
	je	LBB0_16
## %bb.15:
	movq	_EINTR@GOTPCREL(%rip), %rax
	cmpl	%r15d, (%rax)
	jne	LBB0_17
LBB0_16:
	movq	_MCDI_STATUS_SLEEP_MS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msleep
	movq	%r14, %rdi
	callq	_efx_mcdi_poll_reboot
LBB0_17:
	movq	%r12, %rdi
	callq	_efx_mcdi_release
	movl	%r13d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EFX_REV_SIENA_A0,8,3           ## @EFX_REV_SIENA_A0
	.comm	_MCDI_MODE_POLL,8,3             ## @MCDI_MODE_POLL
	.comm	_hw,4,2                         ## @hw
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"MC command 0x%x inlen %d mode %d timed out\n"

	.comm	_MC_CMD_REBOOT,4,2              ## @MC_CMD_REBOOT
	.comm	_EIO,4,2                        ## @EIO
	.comm	_EINTR,4,2                      ## @EINTR
L_.str.1:                               ## @.str.1
	.asciz	"MC fatal error %d\n"

	.comm	_RESET_TYPE_MC_FAILURE,4,2      ## @RESET_TYPE_MC_FAILURE
L_.str.2:                               ## @.str.2
	.asciz	"MC command 0x%x inlen %d failed rc=%d\n"

	.comm	_MCDI_STATUS_SLEEP_MS,4,2       ## @MCDI_STATUS_SLEEP_MS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_efx_mcdi_rpc_finish            ; -- Begin function efx_mcdi_rpc_finish
	.p2align	2
_efx_mcdi_rpc_finish:                   ; @efx_mcdi_rpc_finish
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x23, x5
	mov	x27, x4
	mov	x26, x3
	mov	x24, x2
	mov	x22, x1
	mov	x20, x0
	bl	_efx_mcdi
	mov	x19, x0
	mov	x0, x20
	bl	_efx_nic_rev
Lloh0:
	adrp	x8, _EFX_REV_SIENA_A0@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EFX_REV_SIENA_A0@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	cset	w0, lt
	bl	_BUG_ON
	ldr	x8, [x19]
Lloh3:
	adrp	x9, _MCDI_MODE_POLL@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MCDI_MODE_POLL@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	mov	x0, x20
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	bl	_efx_mcdi_poll
	b	LBB0_3
LBB0_2:
	bl	_efx_mcdi_await_completion
LBB0_3:
	mov	x21, x0
	add	x28, x19, #24
	mov	x0, x28
	bl	_spin_lock_bh
	cbz	w21, LBB0_5
; %bb.4:
	ldur	d0, [x19, #28]
	movi.2s	v1, #1
	add.2s	v0, v0, v1
	stur	d0, [x19, #28]
	mov	x0, x28
	bl	_spin_unlock_bh
Lloh6:
	adrp	x8, _hw@GOTPAGE
Lloh7:
	ldr	x8, [x8, _hw@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	ldr	w2, [x20]
	ldr	x8, [x19]
Lloh9:
	adrp	x3, l_.str@PAGE
Lloh10:
	add	x3, x3, l_.str@PAGEOFF
	stp	x24, x8, [sp]
	mov	x0, x20
	mov	x4, x22
	bl	_netif_err
	b	LBB0_15
LBB0_5:
	str	x23, [sp, #24]                  ; 8-byte Folded Spill
	ldr	w25, [x19, #8]
	neg	w21, w25
	ldr	x23, [x19, #16]
	mov	x0, x28
	bl	_spin_unlock_bh
Lloh11:
	adrp	x28, _EIO@GOTPAGE
Lloh12:
	ldr	x28, [x28, _EIO@GOTPAGEOFF]
Lloh13:
	adrp	x11, _EINTR@GOTPAGE
Lloh14:
	ldr	x11, [x11, _EINTR@GOTPAGEOFF]
	cbz	w25, LBB0_9
; %bb.6:
Lloh15:
	adrp	x8, _MC_CMD_REBOOT@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MC_CMD_REBOOT@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x8]
	ldr	w8, [x28]
	cmp	w9, w22
	ccmp	w8, w25, #0, eq
	b.eq	LBB0_13
; %bb.7:
	ldr	w9, [x11]
Lloh18:
	adrp	x10, _hw@GOTPAGE
Lloh19:
	ldr	x10, [x10, _hw@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x10]
	ldr	w2, [x20]
	cmp	w8, w25
	ccmp	w9, w25, #4, ne
	b.ne	LBB0_11
; %bb.8:
Lloh21:
	adrp	x3, l_.str.1@PAGE
Lloh22:
	add	x3, x3, l_.str.1@PAGEOFF
	mov	x0, x20
	mov	x4, x25
	mov	x22, x11
	bl	_netif_err
Lloh23:
	adrp	x8, _RESET_TYPE_MC_FAILURE@GOTPAGE
Lloh24:
	ldr	x8, [x8, _RESET_TYPE_MC_FAILURE@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_efx_schedule_reset
	b	LBB0_12
LBB0_9:
	ldr	w8, [x19, #16]
	add	w1, w8, #3
	mov	x0, x27
	mov	x22, x11
	bl	_min
	and	w2, w0, #0xfffffffc
	mov	x0, x20
	mov	x1, x26
	bl	_efx_mcdi_copyout
	mov	x11, x22
	ldr	x8, [sp, #24]                   ; 8-byte Folded Reload
	cbz	x8, LBB0_13
; %bb.10:
	str	x23, [x8]
	b	LBB0_13
LBB0_11:
Lloh26:
	adrp	x3, l_.str.2@PAGE
Lloh27:
	add	x3, x3, l_.str.2@PAGEOFF
	mov	x0, x20
	mov	x4, x22
	mov	x5, x24
	mov	x6, x25
	mov	x22, x11
	bl	_netif_dbg
LBB0_12:
	mov	x11, x22
LBB0_13:
	ldr	w8, [x28]
	ldr	w9, [x11]
	cmp	w8, w25
	ccmp	w9, w25, #4, ne
	b.ne	LBB0_15
; %bb.14:
Lloh28:
	adrp	x8, _MCDI_STATUS_SLEEP_MS@GOTPAGE
Lloh29:
	ldr	x8, [x8, _MCDI_STATUS_SLEEP_MS@GOTPAGEOFF]
Lloh30:
	ldr	w0, [x8]
	bl	_msleep
	mov	x0, x20
	bl	_efx_mcdi_poll_reboot
LBB0_15:
	mov	x0, x19
	bl	_efx_mcdi_release
	mov	x0, x21
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_EFX_REV_SIENA_A0,8,3           ; @EFX_REV_SIENA_A0
	.comm	_MCDI_MODE_POLL,8,3             ; @MCDI_MODE_POLL
	.comm	_hw,4,2                         ; @hw
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"MC command 0x%x inlen %d mode %d timed out\n"

	.comm	_MC_CMD_REBOOT,4,2              ; @MC_CMD_REBOOT
	.comm	_EIO,4,2                        ; @EIO
	.comm	_EINTR,4,2                      ; @EINTR
l_.str.1:                               ; @.str.1
	.asciz	"MC fatal error %d\n"

	.comm	_RESET_TYPE_MC_FAILURE,4,2      ; @RESET_TYPE_MC_FAILURE
l_.str.2:                               ; @.str.2
	.asciz	"MC command 0x%x inlen %d failed rc=%d\n"

	.comm	_MCDI_STATUS_SLEEP_MS,4,2       ; @MCDI_STATUS_SLEEP_MS
.subsections_via_symbols
