	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function txq_put_data_tso
_txq_put_data_tso:                      ## @txq_put_data_tso
	.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
	movl	%r9d, %r14d
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	(%rsi), %rax
	movq	16(%rsi), %rdi
	leaq	1(%rax), %rdx
	xorl	%esi, %esi
	cmpq	8(%rbx), %rdx
	cmovneq	%rdx, %rsi
	movq	%rsi, (%rbx)
	movq	40(%rbx), %r12
	movslq	%eax, %rdx
	movq	_DESC_DMA_MAP_SINGLE@GOTPCREL(%rip), %r9
	movq	(%r9), %rsi
	movq	%rsi, (%rdi,%rdx,8)
	leaq	(%rdx,%rdx,2), %r13
	movq	$0, 16(%r12,%r13,8)
	movl	%r8d, (%r12,%r13,8)
	cmpl	$8, %r8d
	jg	LBB0_7
## %bb.1:
	movl	%ecx, %esi
	andl	$7, %esi
	testq	%rsi, %rsi
	je	LBB0_7
## %bb.2:
	movq	_TSO_HEADER_SIZE@GOTPCREL(%rip), %rdx
	movslq	(%rdx), %rdi
	movl	%r14d, %r15d
	movslq	%eax, %r14
	imulq	%r14, %rdi
	addq	32(%rbx), %rdi
	movq	%rcx, %rsi
	movl	%r8d, %edx
	callq	_memcpy
	movq	_TSO_HEADER_SIZE@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	imulq	%r14, %rax
	movl	%r15d, %r14d
	addq	24(%rbx), %rax
	movq	%rax, 8(%r12,%r13,8)
	jmp	LBB0_3
LBB0_7:
	movq	(%r9), %rax
	movq	16(%rbx), %rsi
	movq	%rax, (%rsi,%rdx,8)
	movl	(%r15), %edi
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	%rcx, %rsi
	movl	%r8d, %edx
	movl	%eax, %ecx
	callq	_dma_map_single
	movq	%rax, 8(%r12,%r13,8)
	movl	(%r15), %edi
	movq	%rax, %rsi
	callq	_dma_mapping_error
	movl	%eax, %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_3
## %bb.8:
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	callq	_WARN
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_9
LBB0_3:
	movq	_BUFFER_OWNED_BY_DMA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%r14d, %r14d
	je	LBB0_6
## %bb.4:
	movq	_ZERO_PADDING@GOTPCREL(%rip), %rcx
	movq	_TX_LAST_DESC@GOTPCREL(%rip), %rdx
	orl	(%rcx), %eax
	orl	(%rdx), %eax
	cmpl	$0, 16(%rbp)
	je	LBB0_6
## %bb.5:
	movq	_TX_ENABLE_INTERRUPT@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
LBB0_6:
	movl	%eax, 4(%r12,%r13,8)
	xorl	%eax, %eax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DESC_DMA_MAP_SINGLE,8,3        ## @DESC_DMA_MAP_SINGLE
	.comm	_TSO_HEADER_SIZE,4,2            ## @TSO_HEADER_SIZE
	.comm	_DMA_TO_DEVICE,4,2              ## @DMA_TO_DEVICE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"dma_map_single failed!\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_BUFFER_OWNED_BY_DMA,4,2        ## @BUFFER_OWNED_BY_DMA
	.comm	_ZERO_PADDING,4,2               ## @ZERO_PADDING
	.comm	_TX_LAST_DESC,4,2               ## @TX_LAST_DESC
	.comm	_TX_ENABLE_INTERRUPT,4,2        ## @TX_ENABLE_INTERRUPT
	.no_dead_strip	_txq_put_data_tso
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function txq_put_data_tso
_txq_put_data_tso:                      ; @txq_put_data_tso
	.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	x19, x6
	mov	x20, x5
	mov	x22, x1
	mov	x21, x0
	ldp	x9, x8, [x1]
	add	x10, x9, #1
	cmp	x10, x8
	csinc	x8, xzr, x9, eq
	str	x8, [x1]
Lloh0:
	adrp	x8, _DESC_DMA_MAP_SINGLE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DESC_DMA_MAP_SINGLE@GOTPAGEOFF]
	ldr	x23, [x1, #40]
	ldr	x10, [x8]
	ldr	x11, [x1, #16]
	sbfiz	x12, x9, #3, #32
	str	x10, [x11, x12]
	sxtw	x24, w9
	mov	w9, #24
	smaddl	x9, w24, w9, x23
	str	xzr, [x9, #16]
	str	w4, [x9]
	cmp	w4, #8
	b.gt	LBB0_3
; %bb.1:
	and	x9, x3, #0x7
	cbz	x9, LBB0_3
; %bb.2:
	ldr	x8, [x22, #32]
Lloh2:
	adrp	x21, _TSO_HEADER_SIZE@GOTPAGE
Lloh3:
	ldr	x21, [x21, _TSO_HEADER_SIZE@GOTPAGEOFF]
	ldrsw	x9, [x21]
	madd	x0, x9, x24, x8
	mov	x1, x3
	mov	x2, x4
	bl	_memcpy
	ldr	x8, [x22, #24]
	ldrsw	x9, [x21]
	madd	x8, x9, x24, x8
	mov	w9, #24
	madd	x9, x24, x9, x23
	str	x8, [x9, #8]
	b	LBB0_5
LBB0_3:
	ldr	x8, [x8]
	ldr	x9, [x22, #16]
	str	x8, [x9, x24, lsl #3]
	ldr	w0, [x21]
Lloh4:
	adrp	x8, _DMA_TO_DEVICE@GOTPAGE
Lloh5:
	ldr	x8, [x8, _DMA_TO_DEVICE@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	mov	x1, x3
	mov	x2, x4
	mov	x3, x8
	bl	_dma_map_single
	mov	x1, x0
	mov	w8, #24
	madd	x8, x24, x8, x23
	str	x0, [x8, #8]
	ldr	w0, [x21]
	bl	_dma_mapping_error
	bl	_unlikely
	cbz	x0, LBB0_5
; %bb.4:
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_WARN
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_9
LBB0_5:
Lloh12:
	adrp	x8, _BUFFER_OWNED_BY_DMA@GOTPAGE
Lloh13:
	ldr	x8, [x8, _BUFFER_OWNED_BY_DMA@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	cbz	w20, LBB0_8
; %bb.6:
Lloh15:
	adrp	x9, _ZERO_PADDING@GOTPAGE
Lloh16:
	ldr	x9, [x9, _ZERO_PADDING@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
Lloh18:
	adrp	x10, _TX_LAST_DESC@GOTPAGE
Lloh19:
	ldr	x10, [x10, _TX_LAST_DESC@GOTPAGEOFF]
Lloh20:
	ldr	w10, [x10]
	orr	w8, w9, w8
	orr	w8, w8, w10
	cbz	w19, LBB0_8
; %bb.7:
Lloh21:
	adrp	x9, _TX_ENABLE_INTERRUPT@GOTPAGE
Lloh22:
	ldr	x9, [x9, _TX_ENABLE_INTERRUPT@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	orr	w8, w9, w8
LBB0_8:
	mov	w0, #0
	mov	w9, #24
	madd	x9, x24, x9, x23
	str	w8, [x9, #4]
LBB0_9:
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_DESC_DMA_MAP_SINGLE,8,3        ; @DESC_DMA_MAP_SINGLE
	.comm	_TSO_HEADER_SIZE,4,2            ; @TSO_HEADER_SIZE
	.comm	_DMA_TO_DEVICE,4,2              ; @DMA_TO_DEVICE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"dma_map_single failed!\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_BUFFER_OWNED_BY_DMA,4,2        ; @BUFFER_OWNED_BY_DMA
	.comm	_ZERO_PADDING,4,2               ; @ZERO_PADDING
	.comm	_TX_LAST_DESC,4,2               ; @TX_LAST_DESC
	.comm	_TX_ENABLE_INTERRUPT,4,2        ; @TX_ENABLE_INTERRUPT
	.no_dead_strip	_txq_put_data_tso
.subsections_via_symbols
