	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sbdma_add_txbuffer
_sbdma_add_txbuffer:                    ## @sbdma_add_txbuffer
	.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, %r15
	movq	%rdi, %rbx
	movq	8(%rdi), %r12
	movq	_sbdma_addptr@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_SBDMA_NEXTBUF
	cmpq	32(%rbx), %rax
	je	LBB0_1
## %bb.2:
	movl	(%r15), %r14d
	movl	4(%r15), %edi
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	callq	_virt_to_phys
	movl	%eax, %r13d
	movq	_SMP_CACHE_BYTES@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	decl	%edi
	andl	%r13d, %edi
	addl	%r14d, %edi
	callq	_NUMCACHEBLKS
	movl	%eax, %edi
	callq	_V_DMA_DSCRA_A_SIZE
	orl	%r13d, %eax
	movq	_M_DMA_DSCRA_INTERRUPT@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_M_DMA_ETHTX_SOP@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, (%r12)
	movq	_K_DMA_ETHTX_APPENDCRC_APPENDPAD@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_V_DMA_DSCRB_OPTIONS
	movl	%eax, %r13d
	movl	%r14d, %edi
	callq	_V_DMA_DSCRB_PKT_SIZE
	orl	%r13d, %eax
	movl	%eax, 4(%r12)
	subq	16(%rbx), %r12
	movq	24(%rbx), %rax
	movq	%r15, (%rax,%r12)
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 8(%rbx)
	movl	(%rbx), %esi
	movl	$1, %edi
	callq	___raw_writeq
	xorl	%eax, %eax
	jmp	LBB0_3
LBB0_1:
	movq	_ENOSPC@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_sbdma_addptr,4,2               ## @sbdma_addptr
	.comm	_ENOSPC,4,2                     ## @ENOSPC
	.comm	_SMP_CACHE_BYTES,4,2            ## @SMP_CACHE_BYTES
	.comm	_M_DMA_DSCRA_INTERRUPT,4,2      ## @M_DMA_DSCRA_INTERRUPT
	.comm	_M_DMA_ETHTX_SOP,4,2            ## @M_DMA_ETHTX_SOP
	.comm	_K_DMA_ETHTX_APPENDCRC_APPENDPAD,4,2 ## @K_DMA_ETHTX_APPENDCRC_APPENDPAD
	.no_dead_strip	_sbdma_add_txbuffer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sbdma_add_txbuffer
_sbdma_add_txbuffer:                    ; @sbdma_add_txbuffer
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x1
	mov	x19, x0
	ldr	x24, [x0, #8]
Lloh0:
	adrp	x8, _sbdma_addptr@GOTPAGE
Lloh1:
	ldr	x8, [x8, _sbdma_addptr@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_SBDMA_NEXTBUF
	ldr	x8, [x19, #32]
	cmp	x0, x8
	b.eq	LBB0_2
; %bb.1:
	mov	x21, x0
	ldp	w22, w0, [x20]
	bl	_virt_to_phys
	mov	x23, x0
Lloh3:
	adrp	x8, _SMP_CACHE_BYTES@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SMP_CACHE_BYTES@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	sub	w8, w8, #1
	and	w8, w8, w0
	add	w0, w8, w22
	bl	_NUMCACHEBLKS
	bl	_V_DMA_DSCRA_A_SIZE
	orr	w8, w0, w23
Lloh6:
	adrp	x9, _M_DMA_DSCRA_INTERRUPT@GOTPAGE
Lloh7:
	ldr	x9, [x9, _M_DMA_DSCRA_INTERRUPT@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh9:
	adrp	x9, _M_DMA_ETHTX_SOP@GOTPAGE
Lloh10:
	ldr	x9, [x9, _M_DMA_ETHTX_SOP@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w8, w8, w9
	str	w8, [x24]
Lloh12:
	adrp	x8, _K_DMA_ETHTX_APPENDCRC_APPENDPAD@GOTPAGE
Lloh13:
	ldr	x8, [x8, _K_DMA_ETHTX_APPENDCRC_APPENDPAD@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	bl	_V_DMA_DSCRB_OPTIONS
	mov	x23, x0
	mov	x0, x22
	bl	_V_DMA_DSCRB_PKT_SIZE
	orr	w8, w0, w23
	str	w8, [x24, #4]
	ldp	x9, x8, [x19, #16]
	sub	x9, x24, x9
	str	x20, [x8, x9]
	str	x21, [x19, #8]
	ldr	w1, [x19]
	mov	w0, #1
	bl	___raw_writeq
	mov	w0, #0
	b	LBB0_3
LBB0_2:
Lloh15:
	adrp	x8, _ENOSPC@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENOSPC@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_sbdma_addptr,4,2               ; @sbdma_addptr
	.comm	_ENOSPC,4,2                     ; @ENOSPC
	.comm	_SMP_CACHE_BYTES,4,2            ; @SMP_CACHE_BYTES
	.comm	_M_DMA_DSCRA_INTERRUPT,4,2      ; @M_DMA_DSCRA_INTERRUPT
	.comm	_M_DMA_ETHTX_SOP,4,2            ; @M_DMA_ETHTX_SOP
	.comm	_K_DMA_ETHTX_APPENDCRC_APPENDPAD,4,2 ; @K_DMA_ETHTX_APPENDCRC_APPENDPAD
	.no_dead_strip	_sbdma_add_txbuffer
.subsections_via_symbols
