	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ext_coal_sdma_tx_descs         ## -- Begin function ext_coal_sdma_tx_descs
	.p2align	4, 0x90
_ext_coal_sdma_tx_descs:                ## @ext_coal_sdma_tx_descs
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, -64(%rbp)                  ## 8-byte Spill
	movq	%r8, -80(%rbp)                  ## 8-byte Spill
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	movl	%edx, %ebx
	movq	%rsi, %r14
	movq	%rdi, %r12
	movl	16(%rbp), %r13d
	callq	__extend_sdma_tx_descs
	testl	%eax, %eax
	je	LBB0_3
## %bb.1:
	movl	%eax, %r15d
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	___sdma_txclean
	jmp	LBB0_2
LBB0_3:
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movq	-80(%rbp), %r15                 ## 8-byte Reload
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	cmpl	$0, (%r14)
	je	LBB0_4
## %bb.5:
	movq	_SDMA_MAP_NONE@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	jne	LBB0_9
## %bb.6:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rsi
	jmp	LBB0_7
LBB0_4:
	movl	$1, %r15d
	jmp	LBB0_2
LBB0_9:
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movq	_SDMA_MAP_PAGE@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	jne	LBB0_18
## %bb.10:
	movq	%r15, %r14
	movq	%r15, %rdi
	callq	_kmap
	movq	%rax, %r12
	addq	-64(%rbp), %r12                 ## 8-byte Folded Reload
	jmp	LBB0_11
LBB0_18:
	xorl	%edi, %edi
	movq	%rcx, %r12
	testq	%rcx, %rcx
	sete	%dil
	callq	_WARN_ON
	testq	%rax, %rax
	movq	%r15, %r14
	je	LBB0_11
## %bb.19:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
LBB0_7:
	callq	___sdma_txclean
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_8:
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_2:
	movl	%r15d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	movl	4(%r15), %edi
	addl	(%r15), %edi
	movq	%r12, %rsi
	movl	%r13d, %edx
	callq	_memcpy
	movq	%r15, %rdx
	addl	4(%r15), %r13d
	movl	%r13d, 4(%rdx)
	movq	_SDMA_MAP_PAGE@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	jne	LBB0_13
## %bb.12:
	movq	%r14, %rdi
	callq	_kunmap
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movl	4(%rdx), %r13d
LBB0_13:
	xorl	%r15d, %r15d
	cmpl	%r13d, 8(%rdx)
	jne	LBB0_2
## %bb.14:
	movl	12(%rdx), %eax
	andl	$3, %eax
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	je	LBB0_16
## %bb.15:
	movl	$4, %r15d
	subl	%eax, %r15d
	addl	(%rdx), %r13d
	movl	%r13d, %edi
	xorl	%esi, %esi
	movl	%r15d, %edx
	callq	_memset
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	addl	%r15d, 12(%rdx)
	addl	8(%rdx), %r15d
	movl	%r15d, 8(%rdx)
	movl	%r15d, %r13d
LBB0_16:
	movq	(%r14), %rdi
	movl	(%rdx), %esi
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rdx, %rbx
	movl	%r13d, %edx
	callq	_dma_map_single
	movl	%eax, %r15d
	movq	(%r14), %rdi
	movl	%eax, %esi
	callq	_dma_mapping_error
	movl	%eax, %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_20
## %bb.17:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	___sdma_txclean
	movq	_ENOSPC@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_20:
	movq	_MAX_DESC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rbx)
	movq	_SDMA_MAP_SINGLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	8(%rbx), %r8d
	movq	%r14, %rdi
	movq	%rbx, %rdx
	movl	%r15d, %ecx
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	__sdma_txadd_daddr              ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_SDMA_MAP_NONE,4,2              ## @SDMA_MAP_NONE
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_SDMA_MAP_PAGE,4,2              ## @SDMA_MAP_PAGE
	.comm	_DMA_TO_DEVICE,4,2              ## @DMA_TO_DEVICE
	.comm	_ENOSPC,4,2                     ## @ENOSPC
	.comm	_MAX_DESC,4,2                   ## @MAX_DESC
	.comm	_SDMA_MAP_SINGLE,4,2            ## @SDMA_MAP_SINGLE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ext_coal_sdma_tx_descs         ; -- Begin function ext_coal_sdma_tx_descs
	.p2align	2
_ext_coal_sdma_tx_descs:                ; @ext_coal_sdma_tx_descs
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x23, x6
	mov	x25, x5
	mov	x21, x4
	mov	x24, x3
	mov	x22, x2
	mov	x19, x1
	mov	x20, x0
	bl	__extend_sdma_tx_descs
	cbz	w0, LBB0_2
; %bb.1:
	mov	x26, x0
	mov	x0, x20
	mov	x1, x19
	bl	___sdma_txclean
	b	LBB0_10
LBB0_2:
	ldr	w8, [x19]
	cbz	w8, LBB0_6
; %bb.3:
Lloh0:
	adrp	x8, _SDMA_MAP_NONE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SDMA_MAP_NONE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w22
	b.eq	LBB0_8
; %bb.4:
Lloh3:
	adrp	x26, _SDMA_MAP_PAGE@GOTPAGE
Lloh4:
	ldr	x26, [x26, _SDMA_MAP_PAGE@GOTPAGEOFF]
	ldr	w8, [x26]
	cmp	w8, w22
	b.ne	LBB0_7
; %bb.5:
	mov	x0, x21
	bl	_kmap
	add	x24, x0, x25
	b	LBB0_11
LBB0_6:
	mov	w26, #1
	b	LBB0_10
LBB0_7:
	cmp	x24, #0
	cset	w0, eq
	bl	_WARN_ON
	cbz	x0, LBB0_11
LBB0_8:
	mov	x0, x20
	mov	x1, x19
	bl	___sdma_txclean
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
	neg	w26, w8
LBB0_10:
	mov	x0, x26
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_11:
	ldp	w8, w9, [x19]
	add	w0, w9, w8
	mov	x1, x24
	mov	x2, x23
	bl	_memcpy
	ldr	w8, [x19, #4]
	add	w2, w8, w23
	str	w2, [x19, #4]
	ldr	w8, [x26]
	cmp	w8, w22
	b.ne	LBB0_13
; %bb.12:
	mov	x0, x21
	bl	_kunmap
	ldr	w2, [x19, #4]
LBB0_13:
	ldr	w8, [x19, #8]
	cmp	w8, w2
	b.ne	LBB0_18
; %bb.14:
	ldr	w8, [x19, #12]
	ands	w8, w8, #0x3
	b.eq	LBB0_16
; %bb.15:
	mov	w9, #4
	sub	w21, w9, w8
	ldr	w8, [x19]
	add	w0, w8, w2
	mov	w1, #0
	mov	x2, x21
	bl	_memset
	ldr	d0, [x19, #8]
	dup.2s	v1, w21
	add.2s	v0, v0, v1
	str	d0, [x19, #8]
	fmov	w2, s0
LBB0_16:
	ldr	x0, [x20]
	ldr	w1, [x19]
Lloh7:
	adrp	x8, _DMA_TO_DEVICE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _DMA_TO_DEVICE@GOTPAGEOFF]
Lloh9:
	ldr	w3, [x8]
	bl	_dma_map_single
	mov	x21, x0
	ldr	x0, [x20]
	mov	x1, x21
	bl	_dma_mapping_error
	bl	_unlikely
	cbz	x0, LBB0_19
; %bb.17:
	mov	x0, x20
	mov	x1, x19
	bl	___sdma_txclean
Lloh10:
	adrp	x8, _ENOSPC@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENOSPC@GOTPAGEOFF]
	b	LBB0_9
LBB0_18:
	mov	w26, #0
	b	LBB0_10
LBB0_19:
Lloh12:
	adrp	x8, _MAX_DESC@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MAX_DESC@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	str	w8, [x19, #16]
Lloh15:
	adrp	x8, _SDMA_MAP_SINGLE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _SDMA_MAP_SINGLE@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	ldr	w4, [x19, #8]
	mov	x0, x20
	mov	x2, x19
	mov	x3, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	__sdma_txadd_daddr
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_SDMA_MAP_NONE,4,2              ; @SDMA_MAP_NONE
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_SDMA_MAP_PAGE,4,2              ; @SDMA_MAP_PAGE
	.comm	_DMA_TO_DEVICE,4,2              ; @DMA_TO_DEVICE
	.comm	_ENOSPC,4,2                     ; @ENOSPC
	.comm	_MAX_DESC,4,2                   ; @MAX_DESC
	.comm	_SDMA_MAP_SINGLE,4,2            ; @SDMA_MAP_SINGLE
.subsections_via_symbols
