	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function _qed_mcp_cmd_and_union
__qed_mcp_cmd_and_union:                ## @_qed_mcp_cmd_and_union
	.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	%rcx, %rbx
	movq	%rdx, -72(%rbp)                 ## 8-byte Spill
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r15
	movq	%r8, -64(%rbp)                  ## 8-byte Spill
	movq	%r8, %rdi
	movl	$1000, %esi                     ## imm = 0x3E8
	callq	_DIV_ROUND_UP
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	cmpq	$2, %rbx
	movl	$1, %eax
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	cmovgeq	%rbx, %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	xorl	%r13d, %r13d
	xorl	%r12d, %r12d
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_udelay
LBB0_7:                                 ##   in Loop: Header=BB0_1 Depth=1
	incq	%r12
	addq	%rbx, %r13
	cmpq	%r12, -48(%rbp)                 ## 8-byte Folded Reload
	je	LBB0_9
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rdi
	callq	_spin_lock_bh
	movq	%r15, %rdi
	callq	_qed_mcp_has_pending_cmd
	testl	%eax, %eax
	je	LBB0_8
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%r15, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_qed_mcp_update_pending_cmd
	testl	%eax, %eax
	je	LBB0_8
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	%eax, %r14d
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%r14d, %eax
	jne	LBB0_12
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	(%r15), %rdi
	callq	_spin_unlock_bh
	movq	_CAN_SLEEP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_QED_MB_FLAGS_IS_SET
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	callq	_msleep
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_7
LBB0_8:
	cmpq	-80(%rbp), %r12                 ## 8-byte Folded Reload
	jge	LBB0_9
## %bb.10:
	movq	%r15, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_qed_mcp_reread_offsets
	movq	(%r15), %rax
	movq	8(%rax), %r14
	incq	%r14
	movq	%r14, 8(%rax)
	movq	%r15, %rdi
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rsi
	movq	%r14, %rdx
	callq	_qed_mcp_cmd_add_elem
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	testq	%rax, %rax
	je	LBB0_11
## %bb.13:
	movq	%r15, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movq	%rbx, %rdx
	movq	%r14, %rcx
	callq	___qed_mcp_cmd_and_union
	movq	(%r15), %rdi
	callq	_spin_unlock_bh
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movq	_CAN_SLEEP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_QED_MB_FLAGS_IS_SET
	testq	%rax, %rax
	je	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=1
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	callq	_msleep
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_14 Depth=1
	movq	%r14, %rdi
	callq	_udelay
LBB0_17:                                ##   in Loop: Header=BB0_14 Depth=1
	movq	(%r15), %rdi
	callq	_spin_lock_bh
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	cmpq	$0, (%rax)
	jne	LBB0_21
## %bb.18:                              ##   in Loop: Header=BB0_14 Depth=1
	movq	%r15, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_qed_mcp_update_pending_cmd
	testl	%eax, %eax
	je	LBB0_21
## %bb.19:                              ##   in Loop: Header=BB0_14 Depth=1
	movl	%eax, %r14d
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%r14d, %eax
	jne	LBB0_12
## %bb.20:                              ##   in Loop: Header=BB0_14 Depth=1
	movq	(%r15), %rdi
	callq	_spin_unlock_bh
	incq	%r12
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	addq	%r14, %r13
	cmpq	%r12, -80(%rbp)                 ## 8-byte Folded Reload
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	jne	LBB0_14
	jmp	LBB0_22
LBB0_9:
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	8(%rax), %ecx
	movl	12(%rax), %edx
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_DP_NOTICE
LBB0_24:
	xorl	%r14d, %r14d
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
	jmp	LBB0_26
LBB0_11:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_12:
	movq	(%r15), %rdi
	callq	_spin_unlock_bh
LBB0_26:
	movl	%r14d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_21:
	cmpq	-80(%rbp), %r12                 ## 8-byte Folded Reload
	jge	LBB0_22
## %bb.25:
	movq	%r15, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	callq	_qed_mcp_cmd_del_elem
	movq	(%r15), %rdi
	callq	_spin_unlock_bh
	movq	_QED_MSG_SP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%rbx), %ecx
	movl	4(%rbx), %r8d
	movabsq	$2361183241434822607, %rdx      ## imm = 0x20C49BA5E353F7CF
	movq	%r13, %rax
	imulq	%rdx
	movq	%rdx, %r9
	shrq	$63, %r9
	sarq	$7, %rdx
	addq	%rdx, %r9
	imulq	$1000, %r9, %rax                ## imm = 0x3E8
	subq	%rax, %r13
	movq	%r13, (%rsp)
	leaq	L_.str.2(%rip), %rdx
	movq	%r15, %rdi
	callq	_DP_VERBOSE
	movq	_FW_MSG_CODE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%eax, (%rbx)
	xorl	%r14d, %r14d
	jmp	LBB0_26
LBB0_22:
	movl	8(%rbx), %ecx
	movl	12(%rbx), %edx
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	callq	_DP_NOTICE
	movq	%r15, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_qed_mcp_print_cpu_info
	movq	(%r15), %rdi
	callq	_spin_lock_bh
	movq	%r15, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	callq	_qed_mcp_cmd_del_elem
	movq	(%r15), %rdi
	callq	_spin_unlock_bh
	movq	_AVOID_BLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_QED_MB_FLAGS_IS_SET
	testq	%rax, %rax
	jne	LBB0_24
## %bb.23:
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_qed_mcp_cmd_set_blocking
	jmp	LBB0_24
	.cfi_endproc
                                        ## -- End function
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_CAN_SLEEP,4,2                  ## @CAN_SLEEP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"The MFW mailbox is occupied by an uncompleted command. Failed to send command 0x%08x [param 0x%08x].\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.1:                               ## @.str.1
	.asciz	"The MFW failed to respond to command 0x%08x [param 0x%08x].\n"

	.comm	_AVOID_BLOCK,4,2                ## @AVOID_BLOCK
	.comm	_QED_MSG_SP,4,2                 ## @QED_MSG_SP
L_.str.2:                               ## @.str.2
	.asciz	"MFW mailbox: response 0x%08x param 0x%08x [after %d.%03d ms]\n"

	.comm	_FW_MSG_CODE_MASK,4,2           ## @FW_MSG_CODE_MASK
	.no_dead_strip	__qed_mcp_cmd_and_union
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function _qed_mcp_cmd_and_union
__qed_mcp_cmd_and_union:                ; @_qed_mcp_cmd_and_union
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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, x4
	mov	x22, x3
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	mov	x0, x4
	mov	w1, #1000
	bl	_DIV_ROUND_UP
	mov	x24, x0
	mov	x28, #0
	mov	x25, #0
	cmp	x22, #1
	str	x22, [sp]                       ; 8-byte Folded Spill
	csinc	x22, x22, xzr, gt
Lloh0:
	adrp	x27, _CAN_SLEEP@GOTPAGE
Lloh1:
	ldr	x27, [x27, _CAN_SLEEP@GOTPAGEOFF]
	b	LBB0_3
LBB0_1:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x23
	bl	_udelay
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x25, x25, #1
	add	x28, x28, x23
	cmp	x22, x25
	b.eq	LBB0_18
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x19]
	bl	_spin_lock_bh
	mov	x0, x19
	bl	_qed_mcp_has_pending_cmd
	cbz	w0, LBB0_8
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x19
	mov	x1, x21
	bl	_qed_mcp_update_pending_cmd
	cbz	w0, LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x26, x0
Lloh2:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	cmn	w0, w8
	b.ne	LBB0_21
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x0, [x19]
	bl	_spin_unlock_bh
	ldr	w1, [x27]
	mov	x0, x20
	bl	_QED_MB_FLAGS_IS_SET
	cbz	x0, LBB0_1
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x24
	bl	_msleep
	b	LBB0_2
LBB0_8:
	ldr	x8, [sp]                        ; 8-byte Folded Reload
	cmp	x25, x8
	b.ge	LBB0_18
; %bb.9:
	mov	x0, x19
	mov	x1, x21
	bl	_qed_mcp_reread_offsets
	ldr	x8, [x19]
	ldr	x9, [x8, #8]
	add	x26, x9, #1
	str	x26, [x8, #8]
	mov	x0, x19
	mov	x1, x20
	mov	x2, x26
	bl	_qed_mcp_cmd_add_elem
	str	x0, [sp, #8]                    ; 8-byte Folded Spill
	cbz	x0, LBB0_20
; %bb.10:
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	mov	x3, x26
	bl	___qed_mcp_cmd_and_union
	ldr	x0, [x19]
	bl	_spin_unlock_bh
	ldr	x22, [sp]                       ; 8-byte Folded Reload
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x27]
	mov	x0, x20
	bl	_QED_MB_FLAGS_IS_SET
	cbz	x0, LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	mov	x0, x24
	bl	_msleep
	b	LBB0_14
LBB0_13:                                ;   in Loop: Header=BB0_11 Depth=1
	mov	x0, x23
	bl	_udelay
LBB0_14:                                ;   in Loop: Header=BB0_11 Depth=1
	ldr	x0, [x19]
	bl	_spin_lock_bh
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	ldr	x8, [x8]
	cbnz	x8, LBB0_23
; %bb.15:                               ;   in Loop: Header=BB0_11 Depth=1
	mov	x0, x19
	mov	x1, x21
	bl	_qed_mcp_update_pending_cmd
	cbz	w0, LBB0_23
; %bb.16:                               ;   in Loop: Header=BB0_11 Depth=1
	mov	x26, x0
Lloh5:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	cmn	w0, w8
	b.ne	LBB0_21
; %bb.17:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	x0, [x19]
	bl	_spin_unlock_bh
	add	x25, x25, #1
	add	x28, x28, x23
	cmp	x22, x25
	b.ne	LBB0_11
	b	LBB0_25
LBB0_18:
	ldp	w3, w2, [x20, #8]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_DP_NOTICE
LBB0_19:
Lloh10:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w26, w8
	b	LBB0_22
LBB0_20:
Lloh13:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w26, w8
LBB0_21:
	ldr	x0, [x19]
	bl	_spin_unlock_bh
LBB0_22:
	mov	x0, x26
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_23:
	cmp	x25, x22
	b.ge	LBB0_25
; %bb.24:
	mov	x0, x19
	ldr	x1, [sp, #8]                    ; 8-byte Folded Reload
	bl	_qed_mcp_cmd_del_elem
	ldr	x0, [x19]
	bl	_spin_unlock_bh
Lloh16:
	adrp	x8, _QED_MSG_SP@GOTPAGE
Lloh17:
	ldr	x8, [x8, _QED_MSG_SP@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	ldp	w3, w4, [x20]
	mov	x8, #63439
	movk	x8, #58195, lsl #16
	movk	x8, #39845, lsl #32
	movk	x8, #8388, lsl #48
	smulh	x8, x28, x8
	asr	x9, x8, #7
	add	x5, x9, x8, lsr #63
	mov	w8, #1000
	msub	x6, x5, x8, x28
Lloh19:
	adrp	x2, l_.str.2@PAGE
Lloh20:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_DP_VERBOSE
	mov	w26, #0
Lloh21:
	adrp	x8, _FW_MSG_CODE_MASK@GOTPAGE
Lloh22:
	ldr	x8, [x8, _FW_MSG_CODE_MASK@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	ldr	w9, [x20]
	and	w8, w9, w8
	str	w8, [x20]
	b	LBB0_22
LBB0_25:
	ldp	w3, w2, [x20, #8]
Lloh24:
	adrp	x1, l_.str.1@PAGE
Lloh25:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_DP_NOTICE
	mov	x0, x19
	mov	x1, x21
	bl	_qed_mcp_print_cpu_info
	ldr	x0, [x19]
	bl	_spin_lock_bh
	mov	x0, x19
	ldr	x1, [sp, #8]                    ; 8-byte Folded Reload
	bl	_qed_mcp_cmd_del_elem
	ldr	x0, [x19]
	bl	_spin_unlock_bh
Lloh26:
	adrp	x8, _AVOID_BLOCK@GOTPAGE
Lloh27:
	ldr	x8, [x8, _AVOID_BLOCK@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_QED_MB_FLAGS_IS_SET
	cbnz	x0, LBB0_19
; %bb.26:
	mov	x0, x19
	mov	w1, #1
	bl	_qed_mcp_cmd_set_blocking
	b	LBB0_19
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_CAN_SLEEP,4,2                  ; @CAN_SLEEP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"The MFW mailbox is occupied by an uncompleted command. Failed to send command 0x%08x [param 0x%08x].\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.1:                               ; @.str.1
	.asciz	"The MFW failed to respond to command 0x%08x [param 0x%08x].\n"

	.comm	_AVOID_BLOCK,4,2                ; @AVOID_BLOCK
	.comm	_QED_MSG_SP,4,2                 ; @QED_MSG_SP
l_.str.2:                               ; @.str.2
	.asciz	"MFW mailbox: response 0x%08x param 0x%08x [after %d.%03d ms]\n"

	.comm	_FW_MSG_CODE_MASK,4,2           ; @FW_MSG_CODE_MASK
	.no_dead_strip	__qed_mcp_cmd_and_union
.subsections_via_symbols
