	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fm10k_mbx_read
_fm10k_mbx_read:                        ## @fm10k_mbx_read
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	cmpl	$0, (%rsi)
	je	LBB0_2
## %bb.1:
	movq	_FM10K_MBX_ERR_BUSY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_5
LBB0_2:
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movl	4(%rsi), %esi
	callq	_fm10k_read_reg
	movq	_FM10K_MBX_REQ_INTERRUPT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	testl	%eax, %edx
	je	LBB0_4
## %bb.3:
	movq	_FM10K_MBX_ACK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rbx)
LBB0_4:
	movl	4(%rbx), %esi
	movq	_FM10K_MBX_ACK_INTERRUPT@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	%r14, %rdi
	callq	_fm10k_write_reg
	movl	12(%rbx), %esi
	xorl	8(%rbx), %esi
	movq	%r14, %rdi
	callq	_fm10k_read_reg
	movl	%eax, (%rbx)
	xorl	%eax, %eax
LBB0_5:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FM10K_MBX_ERR_BUSY,4,2         ## @FM10K_MBX_ERR_BUSY
	.comm	_FM10K_MBX_REQ_INTERRUPT,4,2    ## @FM10K_MBX_REQ_INTERRUPT
	.comm	_FM10K_MBX_ACK,4,2              ## @FM10K_MBX_ACK
	.comm	_FM10K_MBX_ACK_INTERRUPT,4,2    ## @FM10K_MBX_ACK_INTERRUPT
	.no_dead_strip	_fm10k_mbx_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fm10k_mbx_read
_fm10k_mbx_read:                        ; @fm10k_mbx_read
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	w8, [x1]
	cbz	w8, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _FM10K_MBX_ERR_BUSY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FM10K_MBX_ERR_BUSY@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	b	LBB0_5
LBB0_2:
	mov	x19, x1
	mov	x20, x0
	ldr	w1, [x1, #4]
	bl	_fm10k_read_reg
Lloh3:
	adrp	x8, _FM10K_MBX_REQ_INTERRUPT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _FM10K_MBX_REQ_INTERRUPT@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_4
; %bb.3:
Lloh6:
	adrp	x9, _FM10K_MBX_ACK@GOTPAGE
Lloh7:
	ldr	x9, [x9, _FM10K_MBX_ACK@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	str	w9, [x19, #16]
LBB0_4:
	ldr	w1, [x19, #4]
Lloh9:
	adrp	x9, _FM10K_MBX_ACK_INTERRUPT@GOTPAGE
Lloh10:
	ldr	x9, [x9, _FM10K_MBX_ACK_INTERRUPT@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	x0, x20
	bl	_fm10k_write_reg
	ldp	w8, w9, [x19, #8]
	eor	w1, w9, w8
	mov	x0, x20
	bl	_fm10k_read_reg
	mov	x8, x0
	mov	w0, #0
	str	w8, [x19]
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_FM10K_MBX_ERR_BUSY,4,2         ; @FM10K_MBX_ERR_BUSY
	.comm	_FM10K_MBX_REQ_INTERRUPT,4,2    ; @FM10K_MBX_REQ_INTERRUPT
	.comm	_FM10K_MBX_ACK,4,2              ; @FM10K_MBX_ACK
	.comm	_FM10K_MBX_ACK_INTERRUPT,4,2    ; @FM10K_MBX_ACK_INTERRUPT
	.no_dead_strip	_fm10k_mbx_read
.subsections_via_symbols
