	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function efx_dequeue_buffer
_efx_dequeue_buffer:                    ## @efx_dequeue_buffer
	.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
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	32(%rsi), %rdx
	testq	%rdx, %rdx
	je	LBB0_5
## %bb.1:
	movq	8(%r14), %rax
	movq	8(%rax), %rdi
	movq	40(%rbx), %rsi
	subq	%rdx, %rsi
	addq	8(%rbx), %rsi
	movq	_EFX_TX_BUF_MAP_SINGLE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%eax, (%rbx)
	je	LBB0_3
## %bb.2:
	callq	_dma_unmap_single
	jmp	LBB0_4
LBB0_3:
	callq	_dma_unmap_page
LBB0_4:
	movq	$0, 32(%rbx)
LBB0_5:
	movl	(%rbx), %eax
	movq	_EFX_TX_BUF_SKB@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_7
## %bb.6:
	movq	24(%rbx), %rdi
	callq	_dev_kfree_skb_any
	movq	8(%r14), %rdi
	movq	_tx_done@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%rdi), %edx
	movl	(%r14), %r9d
	movl	4(%r14), %r8d
	leaq	L_.str(%rip), %rcx
	callq	_netif_vdbg
	jmp	LBB0_9
LBB0_7:
	movq	_EFX_TX_BUF_HEAP@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_9
## %bb.8:
	movl	16(%rbx), %edi
	callq	_kfree
LBB0_9:
	movq	$0, 8(%rbx)
	movl	$0, (%rbx)
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EFX_TX_BUF_MAP_SINGLE,4,2      ## @EFX_TX_BUF_MAP_SINGLE
	.comm	_DMA_TO_DEVICE,4,2              ## @DMA_TO_DEVICE
	.comm	_EFX_TX_BUF_SKB,4,2             ## @EFX_TX_BUF_SKB
	.comm	_tx_done,4,2                    ## @tx_done
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"TX queue %d transmission id %x complete\n"

	.comm	_EFX_TX_BUF_HEAP,4,2            ## @EFX_TX_BUF_HEAP
	.no_dead_strip	_efx_dequeue_buffer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function efx_dequeue_buffer
_efx_dequeue_buffer:                    ; @efx_dequeue_buffer
	.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
	mov	x19, x1
	mov	x20, x0
	ldr	x2, [x1, #32]
	cbz	x2, LBB0_5
; %bb.1:
	ldr	x8, [x20, #8]
	ldr	x0, [x8, #8]
	ldr	x8, [x19, #40]
	ldr	x9, [x19, #8]
	sub	x8, x8, x2
	add	x1, x8, x9
Lloh0:
	adrp	x8, _EFX_TX_BUF_MAP_SINGLE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EFX_TX_BUF_MAP_SINGLE@GOTPAGEOFF]
	ldr	w9, [x19]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x10, _DMA_TO_DEVICE@GOTPAGE
Lloh4:
	ldr	x10, [x10, _DMA_TO_DEVICE@GOTPAGEOFF]
Lloh5:
	ldr	w3, [x10]
	tst	w8, w9
	b.eq	LBB0_3
; %bb.2:
	bl	_dma_unmap_single
	b	LBB0_4
LBB0_3:
	bl	_dma_unmap_page
LBB0_4:
	str	xzr, [x19, #32]
LBB0_5:
	ldr	w8, [x19]
Lloh6:
	adrp	x9, _EFX_TX_BUF_SKB@GOTPAGE
Lloh7:
	ldr	x9, [x9, _EFX_TX_BUF_SKB@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_7
; %bb.6:
	ldr	x0, [x19, #24]
	bl	_dev_kfree_skb_any
	ldr	x0, [x20, #8]
Lloh9:
	adrp	x8, _tx_done@GOTPAGE
Lloh10:
	ldr	x8, [x8, _tx_done@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	ldr	w2, [x0]
	ldp	w5, w4, [x20]
Lloh12:
	adrp	x3, l_.str@PAGE
Lloh13:
	add	x3, x3, l_.str@PAGEOFF
	bl	_netif_vdbg
	b	LBB0_9
LBB0_7:
Lloh14:
	adrp	x9, _EFX_TX_BUF_HEAP@GOTPAGE
Lloh15:
	ldr	x9, [x9, _EFX_TX_BUF_HEAP@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_9
; %bb.8:
	ldr	w0, [x19, #16]
	bl	_kfree
LBB0_9:
	str	xzr, [x19, #8]
	str	wzr, [x19]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_EFX_TX_BUF_MAP_SINGLE,4,2      ; @EFX_TX_BUF_MAP_SINGLE
	.comm	_DMA_TO_DEVICE,4,2              ; @DMA_TO_DEVICE
	.comm	_EFX_TX_BUF_SKB,4,2             ; @EFX_TX_BUF_SKB
	.comm	_tx_done,4,2                    ; @tx_done
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"TX queue %d transmission id %x complete\n"

	.comm	_EFX_TX_BUF_HEAP,4,2            ; @EFX_TX_BUF_HEAP
	.no_dead_strip	_efx_dequeue_buffer
.subsections_via_symbols
