	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qed_mcp_reset                  ## -- Begin function qed_mcp_reset
	.p2align	4, 0x90
_qed_mcp_reset:                         ## @qed_mcp_reset
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	(%rdi), %rdi
	cmpq	$0, 16(%rdi)
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_DP_NOTICE
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_10
LBB0_2:
	movq	%rsi, %r13
	movq	_QED_MCP_RESP_ITER_US@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	addq	$8, %rdi
	callq	_spin_lock_bh
	movq	_MISCS_REG_GENERIC_POR_0@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movq	%r13, %rsi
	callq	_qed_rd
	movq	%rax, %r12
	movq	%r15, %rdi
	movq	%r13, %rsi
	callq	_qed_mcp_reread_offsets
	movq	(%r15), %rax
	movq	(%rax), %rcx
	incq	%rcx
	movq	%rcx, (%rax)
	movq	_drv_mb_header@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_DRV_MSG_CODE_MCP_RESET@GOTPCREL(%rip), %rax
	orq	(%rax), %rcx
	movq	%r15, %rdi
	movq	%r13, %rsi
	callq	_DRV_MB_WR
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_udelay
	movq	_MISCS_REG_GENERIC_POR_0@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movq	%r13, %rsi
	callq	_qed_rd
	cmpq	%rax, %r12
	jne	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	leaq	1(%rbx), %r14
	movq	_QED_MCP_RESET_RETRIES@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	movq	%r14, %rbx
	jl	LBB0_3
	jmp	LBB0_6
LBB0_4:
	movq	%rbx, %r14
LBB0_6:
	movq	_MISCS_REG_GENERIC_POR_0@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movq	%r13, %rsi
	callq	_qed_rd
	cmpq	%rax, %r12
	jne	LBB0_7
## %bb.8:
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	callq	_DP_ERR
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_9
LBB0_7:
	movq	_QED_MSG_SP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	imulq	-48(%rbp), %r14                 ## 8-byte Folded Reload
	leaq	L_.str.1(%rip), %rdx
	movq	%r15, %rdi
	movq	%r14, %rcx
	callq	_DP_VERBOSE
	xorl	%ebx, %ebx
LBB0_9:
	movq	(%r15), %rdi
	addq	$8, %rdi
	callq	_spin_unlock_bh
LBB0_10:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_QED_MCP_RESP_ITER_US,8,3       ## @QED_MCP_RESP_ITER_US
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"The MFW is not responsive. Avoid sending MCP_RESET mailbox command.\n"

	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_MISCS_REG_GENERIC_POR_0,4,2    ## @MISCS_REG_GENERIC_POR_0
	.comm	_drv_mb_header,4,2              ## @drv_mb_header
	.comm	_DRV_MSG_CODE_MCP_RESET,8,3     ## @DRV_MSG_CODE_MCP_RESET
	.comm	_QED_MCP_RESET_RETRIES,8,3      ## @QED_MCP_RESET_RETRIES
	.comm	_QED_MSG_SP,4,2                 ## @QED_MSG_SP
L_.str.1:                               ## @.str.1
	.asciz	"MCP was reset after %d usec\n"

L_.str.2:                               ## @.str.2
	.asciz	"Failed to reset MCP\n"

	.comm	_EAGAIN,4,2                     ## @EAGAIN
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qed_mcp_reset                  ; -- Begin function qed_mcp_reset
	.p2align	2
_qed_mcp_reset:                         ; @qed_mcp_reset
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x0
	ldr	x8, [x0]
	ldr	x9, [x8, #16]
	cbz	x9, LBB0_2
; %bb.1:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_DP_NOTICE
Lloh2:
	adrp	x8, _EBUSY@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_10
LBB0_2:
	mov	x21, x1
Lloh5:
	adrp	x9, _QED_MCP_RESP_ITER_US@GOTPAGE
Lloh6:
	ldr	x9, [x9, _QED_MCP_RESP_ITER_US@GOTPAGEOFF]
Lloh7:
	ldr	x20, [x9]
	add	x0, x8, #8
	bl	_spin_lock_bh
Lloh8:
	adrp	x23, _MISCS_REG_GENERIC_POR_0@GOTPAGE
Lloh9:
	ldr	x23, [x23, _MISCS_REG_GENERIC_POR_0@GOTPAGEOFF]
	ldr	w2, [x23]
	mov	x0, x19
	mov	x1, x21
	bl	_qed_rd
	mov	x22, x0
	mov	x0, x19
	mov	x1, x21
	bl	_qed_mcp_reread_offsets
	ldr	x8, [x19]
	ldr	x9, [x8]
	add	x9, x9, #1
Lloh10:
	adrp	x10, _drv_mb_header@GOTPAGE
Lloh11:
	ldr	x10, [x10, _drv_mb_header@GOTPAGEOFF]
	str	x9, [x8]
Lloh12:
	ldr	w2, [x10]
Lloh13:
	adrp	x8, _DRV_MSG_CODE_MCP_RESET@GOTPAGE
Lloh14:
	ldr	x8, [x8, _DRV_MSG_CODE_MCP_RESET@GOTPAGEOFF]
Lloh15:
	ldr	x8, [x8]
	orr	x3, x8, x9
	mov	x0, x19
	mov	x1, x21
	bl	_DRV_MB_WR
	mov	x24, #0
Lloh16:
	adrp	x25, _QED_MCP_RESET_RETRIES@GOTPAGE
Lloh17:
	ldr	x25, [x25, _QED_MCP_RESET_RETRIES@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_udelay
	ldr	w2, [x23]
	mov	x0, x19
	mov	x1, x21
	bl	_qed_rd
	cmp	x22, x0
	b.ne	LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x26, x24, #1
	ldr	x8, [x25]
	cmp	x24, x8
	mov	x24, x26
	b.lt	LBB0_3
	b	LBB0_6
LBB0_5:
	mov	x26, x24
LBB0_6:
	ldr	w2, [x23]
	mov	x0, x19
	mov	x1, x21
	bl	_qed_rd
	cmp	x22, x0
	b.ne	LBB0_8
; %bb.7:
Lloh18:
	adrp	x1, l_.str.2@PAGE
Lloh19:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_DP_ERR
Lloh20:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh21:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_9
LBB0_8:
Lloh23:
	adrp	x8, _QED_MSG_SP@GOTPAGE
Lloh24:
	ldr	x8, [x8, _QED_MSG_SP@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	mul	x3, x26, x20
Lloh26:
	adrp	x2, l_.str.1@PAGE
Lloh27:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_DP_VERBOSE
	mov	w20, #0
LBB0_9:
	ldr	x8, [x19]
	add	x0, x8, #8
	bl	_spin_unlock_bh
LBB0_10:
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_QED_MCP_RESP_ITER_US,8,3       ; @QED_MCP_RESP_ITER_US
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"The MFW is not responsive. Avoid sending MCP_RESET mailbox command.\n"

	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_MISCS_REG_GENERIC_POR_0,4,2    ; @MISCS_REG_GENERIC_POR_0
	.comm	_drv_mb_header,4,2              ; @drv_mb_header
	.comm	_DRV_MSG_CODE_MCP_RESET,8,3     ; @DRV_MSG_CODE_MCP_RESET
	.comm	_QED_MCP_RESET_RETRIES,8,3      ; @QED_MCP_RESET_RETRIES
	.comm	_QED_MSG_SP,4,2                 ; @QED_MSG_SP
l_.str.1:                               ; @.str.1
	.asciz	"MCP was reset after %d usec\n"

l_.str.2:                               ; @.str.2
	.asciz	"Failed to reset MCP\n"

	.comm	_EAGAIN,4,2                     ; @EAGAIN
.subsections_via_symbols
