	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function efx_ioctl_do_mcdi
_efx_ioctl_do_mcdi:                     ## @efx_ioctl_do_mcdi
	.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	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movl	(%rsi), %eax
	cmpl	$8, %eax
	ja	LBB0_2
## %bb.1:
	andl	$3, %eax
	jne	LBB0_2
## %bb.3:
	movq	%rsi, %rbx
	movq	%r14, %rdi
	callq	_efx_nic_rev
	movq	_EFX_REV_SIENA_A0@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_5
## %bb.4:
	movq	_drv@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r14), %edx
	leaq	L_.str.1(%rip), %rcx
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_netif_err
	movq	_ENOTSUPP@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_9
LBB0_2:
	movq	_drv@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r14), %edx
	leaq	L_.str(%rip), %rcx
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_netif_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_9
LBB0_5:
	movq	8(%rbx), %rsi
	movq	24(%rbx), %rdx
	movl	(%rbx), %ecx
	leaq	-32(%rbp), %rax
	movq	%rax, (%rsp)
	movq	%r14, %rdi
	movq	%rdx, %r8
	movl	$8, %r9d
	callq	_efx_mcdi_rpc
	movl	%eax, %r15d
	movq	8(%rbx), %rax
	movq	_MC_CMD_REBOOT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.6:
	movq	_EIO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%r15d, %eax
	jne	LBB0_8
## %bb.7:
	movq	_drv@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r14), %edx
	movl	%r15d, %r8d
	negl	%r8d
	leaq	L_.str.2(%rip), %rcx
	movq	%r14, %rdi
	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_8:
	negl	%r15d
	movl	%r15d, 16(%rbx)
	movl	-32(%rbp), %eax
	movl	%eax, (%rbx)
	xorl	%ebx, %ebx
LBB0_9:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_drv,4,2                        ## @drv
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"inlen is too long"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_EFX_REV_SIENA_A0,8,3           ## @EFX_REV_SIENA_A0
L_.str.1:                               ## @.str.1
	.asciz	"error: NIC has no MC for MCDI\n"

	.comm	_ENOTSUPP,4,2                   ## @ENOTSUPP
	.comm	_MC_CMD_REBOOT,8,3              ## @MC_CMD_REBOOT
	.comm	_EIO,4,2                        ## @EIO
L_.str.2:                               ## @.str.2
	.asciz	"MC fatal error %d\n"

	.comm	_RESET_TYPE_MC_FAILURE,4,2      ## @RESET_TYPE_MC_FAILURE
	.no_dead_strip	_efx_ioctl_do_mcdi
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function efx_ioctl_do_mcdi
_efx_ioctl_do_mcdi:                     ; @efx_ioctl_do_mcdi
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x0
	ldr	w8, [x1]
	and	w9, w8, #0x3
	cmp	w8, #8
	ccmp	w9, #0, #0, ls
	b.eq	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _drv@GOTPAGE
Lloh1:
	ldr	x8, [x8, _drv@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	ldr	w2, [x19]
Lloh3:
	adrp	x3, l_.str@PAGE
Lloh4:
	add	x3, x3, l_.str@PAGEOFF
	mov	x0, x19
	bl	_netif_err
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:
	mov	x20, x1
	mov	x0, x19
	bl	_efx_nic_rev
Lloh7:
	adrp	x8, _EFX_REV_SIENA_A0@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EFX_REV_SIENA_A0@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ge	LBB0_5
; %bb.3:
Lloh10:
	adrp	x8, _drv@GOTPAGE
Lloh11:
	ldr	x8, [x8, _drv@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	ldr	w2, [x19]
Lloh13:
	adrp	x3, l_.str.1@PAGE
Lloh14:
	add	x3, x3, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_netif_err
Lloh15:
	adrp	x8, _ENOTSUPP@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENOTSUPP@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_9
LBB0_5:
	ldr	x1, [x20, #8]
	ldr	x2, [x20, #24]
	ldr	w3, [x20]
	add	x6, sp, #8
	mov	x0, x19
	mov	x4, x2
	mov	w5, #8
	bl	_efx_mcdi_rpc
	mov	x21, x0
	ldr	x8, [x20, #8]
Lloh17:
	adrp	x9, _MC_CMD_REBOOT@GOTPAGE
Lloh18:
	ldr	x9, [x9, _MC_CMD_REBOOT@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.6:
Lloh20:
	adrp	x8, _EIO@GOTPAGE
Lloh21:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	cmn	w21, w8
	b.ne	LBB0_8
; %bb.7:
Lloh23:
	adrp	x8, _drv@GOTPAGE
Lloh24:
	ldr	x8, [x8, _drv@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	ldr	w2, [x19]
	neg	w8, w21
	str	x8, [sp]
Lloh26:
	adrp	x3, l_.str.2@PAGE
Lloh27:
	add	x3, x3, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_netif_err
Lloh28:
	adrp	x8, _RESET_TYPE_MC_FAILURE@GOTPAGE
Lloh29:
	ldr	x8, [x8, _RESET_TYPE_MC_FAILURE@GOTPAGEOFF]
Lloh30:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_efx_schedule_reset
LBB0_8:
	mov	w0, #0
	neg	w8, w21
	str	w8, [x20, #16]
	ldr	x8, [sp, #8]
	str	w8, [x20]
LBB0_9:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_drv,4,2                        ; @drv
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"inlen is too long"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_EFX_REV_SIENA_A0,8,3           ; @EFX_REV_SIENA_A0
l_.str.1:                               ; @.str.1
	.asciz	"error: NIC has no MC for MCDI\n"

	.comm	_ENOTSUPP,4,2                   ; @ENOTSUPP
	.comm	_MC_CMD_REBOOT,8,3              ; @MC_CMD_REBOOT
	.comm	_EIO,4,2                        ; @EIO
l_.str.2:                               ; @.str.2
	.asciz	"MC fatal error %d\n"

	.comm	_RESET_TYPE_MC_FAILURE,4,2      ; @RESET_TYPE_MC_FAILURE
	.no_dead_strip	_efx_ioctl_do_mcdi
.subsections_via_symbols
