	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tx_give
_tx_give:                               ## @tx_give
	.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	%rsi, %r12
	movq	%rdi, %rbx
	movq	_DBG_FLOW@GOTPCREL(%rip), %rax
	movq	_DBG_TX@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	orl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdx
	callq	_PRINTD
	movq	_dead@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_test_bit
	xorl	%r14d, %r14d
	testq	%rax, %rax
	jne	LBB0_6
## %bb.1:
	leaq	32(%rbx), %r15
	movq	%r15, %rdi
	callq	_spin_lock_irqsave
	movq	8(%rbx), %rax
	cmpq	16(%rbx), %rax
	jge	LBB0_5
## %bb.2:
	movl	(%r13), %edi
	movq	40(%rbx), %rdx
	leaq	L_.str.1(%rip), %rsi
	callq	_PRINTD
	movq	40(%rbx), %rax
	movups	(%r12), %xmm0
	movups	16(%r12), %xmm1
	movups	32(%r12), %xmm2
	movups	%xmm0, (%rax)
	movups	%xmm1, 16(%rax)
	movups	%xmm2, 32(%rax)
	movq	48(%r12), %rcx
	movq	%rcx, 48(%rax)
	incq	8(%rbx)
	movq	40(%rbx), %rdi
	movl	52(%rbx), %esi
	movl	48(%rbx), %edx
	callq	_NEXTQ
	movq	%rax, 40(%rbx)
	movq	_amb_mem@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	movq	_mb@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_offsetof
	movl	%eax, %r12d
	movq	40(%rbx), %rdi
	callq	_virt_to_bus
	movq	%rbx, %rdi
	movl	%r12d, %esi
	movl	%eax, %edx
	callq	_wr_mem
	movl	(%r13), %edi
	movq	_doorbell@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_offsetof
	movq	_TX_FRAME@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_wr_mem
	movq	8(%rbx), %rax
	cmpq	24(%rbx), %rax
	jle	LBB0_4
## %bb.3:
	movq	%rax, 24(%rbx)
LBB0_4:
	movq	%r15, %rdi
	callq	_spin_unlock_irqrestore
	jmp	LBB0_6
LBB0_5:
	incl	36(%rbx)
	movq	%r15, %rdi
	callq	_spin_unlock_irqrestore
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_6:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DBG_FLOW,4,2                   ## @DBG_FLOW
	.comm	_DBG_TX,4,2                     ## @DBG_TX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"tx_give %p"

	.comm	_dead,4,2                       ## @dead
L_.str.1:                               ## @.str.1
	.asciz	"TX in slot %p"

	.comm	_amb_mem,4,2                    ## @amb_mem
	.comm	_mb,4,2                         ## @mb
	.comm	_doorbell,4,2                   ## @doorbell
	.comm	_TX_FRAME,4,2                   ## @TX_FRAME
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.no_dead_strip	_tx_give
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tx_give
_tx_give:                               ; @tx_give
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _DBG_FLOW@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DBG_FLOW@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x22, _DBG_TX@GOTPAGE
Lloh4:
	ldr	x22, [x22, _DBG_TX@GOTPAGEOFF]
	ldr	w9, [x22]
	orr	w0, w9, w8
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x19
	bl	_PRINTD
Lloh7:
	adrp	x8, _dead@GOTPAGE
Lloh8:
	ldr	x8, [x8, _dead@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_test_bit
	cbz	x0, LBB0_2
; %bb.1:
	mov	w0, #0
	b	LBB0_7
LBB0_2:
	add	x20, x19, #32
	mov	x0, x20
	bl	_spin_lock_irqsave
	ldp	x8, x9, [x19, #8]
	cmp	x8, x9
	b.ge	LBB0_6
; %bb.3:
	ldr	w0, [x22]
	ldr	x2, [x19, #40]
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_PRINTD
	ldr	x8, [x19, #40]
	ldr	x9, [x21, #48]
	ldp	q1, q0, [x21, #16]
	ldr	q2, [x21]
	stp	q2, q1, [x8]
	str	q0, [x8, #32]
	str	x9, [x8, #48]
	ldr	x8, [x19, #8]
	add	x8, x8, #1
	str	x8, [x19, #8]
	ldr	x0, [x19, #40]
	ldp	w2, w1, [x19, #48]
	bl	_NEXTQ
	str	x0, [x19, #40]
Lloh12:
	adrp	x22, _amb_mem@GOTPAGE
Lloh13:
	ldr	x22, [x22, _amb_mem@GOTPAGEOFF]
	ldr	w0, [x22]
Lloh14:
	adrp	x8, _mb@GOTPAGE
Lloh15:
	ldr	x8, [x8, _mb@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	bl	_offsetof
	mov	x21, x0
	ldr	x0, [x19, #40]
	bl	_virt_to_bus
	mov	x2, x0
	mov	x0, x19
	mov	x1, x21
	bl	_wr_mem
	ldr	w0, [x22]
Lloh17:
	adrp	x8, _doorbell@GOTPAGE
Lloh18:
	ldr	x8, [x8, _doorbell@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	bl	_offsetof
	mov	x1, x0
Lloh20:
	adrp	x8, _TX_FRAME@GOTPAGE
Lloh21:
	ldr	x8, [x8, _TX_FRAME@GOTPAGEOFF]
Lloh22:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_wr_mem
	ldr	x8, [x19, #8]
	ldr	x9, [x19, #24]
	cmp	x8, x9
	b.le	LBB0_5
; %bb.4:
	str	x8, [x19, #24]
LBB0_5:
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	mov	w0, #0
	b	LBB0_7
LBB0_6:
	ldr	w8, [x19, #36]
	add	w8, w8, #1
	str	w8, [x19, #36]
	mov	x0, x20
	bl	_spin_unlock_irqrestore
Lloh23:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh24:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_DBG_FLOW,4,2                   ; @DBG_FLOW
	.comm	_DBG_TX,4,2                     ; @DBG_TX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"tx_give %p"

	.comm	_dead,4,2                       ; @dead
l_.str.1:                               ; @.str.1
	.asciz	"TX in slot %p"

	.comm	_amb_mem,4,2                    ; @amb_mem
	.comm	_mb,4,2                         ; @mb
	.comm	_doorbell,4,2                   ; @doorbell
	.comm	_TX_FRAME,4,2                   ; @TX_FRAME
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.no_dead_strip	_tx_give
.subsections_via_symbols
