	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function setup_tx_buf
_setup_tx_buf:                          ## @setup_tx_buf
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, -44(%rbp)                 ## 4-byte Spill
	movq	%r8, %r13
	movq	%rcx, %rbx
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r15
	movq	(%rdi), %rax
	movl	(%rax), %edi
	movq	_MTK_QDMA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_MTK_HAS_CAPS
	movq	_dma_len0@GOTPCREL(%rip), %r14
	movq	_dma_addr0@GOTPCREL(%rip), %r12
	testq	%rax, %rax
	jne	LBB0_4
## %bb.1:
	testb	$1, -44(%rbp)                   ## 1-byte Folded Reload
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	jne	LBB0_2
## %bb.3:
	movq	_MTK_DMA_DUMMY_DESC@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r15)
	movq	%rbx, 8(%rcx)
	movq	%r13, %rdi
	callq	_TX_DMA_PLEN0
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	jmp	LBB0_4
LBB0_2:
	movq	%rbx, 16(%rcx)
	movq	%r13, %rdi
	movq	%rcx, %r14
	callq	_TX_DMA_PLEN1
	orl	%eax, (%r14)
	movq	_dma_len1@GOTPCREL(%rip), %r14
	movq	_dma_addr1@GOTPCREL(%rip), %r12
LBB0_4:
	movl	(%r12), %esi
	movq	%r15, %rdi
	movq	%rbx, %rdx
	callq	_dma_unmap_addr_set
	movl	(%r14), %esi
	movq	%r15, %rdi
	movq	%r13, %rdx
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dma_unmap_len_set              ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MTK_QDMA,4,2                   ## @MTK_QDMA
	.comm	_dma_addr0,4,2                  ## @dma_addr0
	.comm	_dma_len0,4,2                   ## @dma_len0
	.comm	_dma_addr1,4,2                  ## @dma_addr1
	.comm	_dma_len1,4,2                   ## @dma_len1
	.comm	_MTK_DMA_DUMMY_DESC,8,3         ## @MTK_DMA_DUMMY_DESC
	.no_dead_strip	_setup_tx_buf
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function setup_tx_buf
_setup_tx_buf:                          ; @setup_tx_buf
	.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	x23, x5
	mov	x19, x4
	mov	x21, x3
	mov	x22, x2
	mov	x20, x1
	ldr	x8, [x0]
	ldr	w0, [x8]
Lloh0:
	adrp	x8, _MTK_QDMA@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MTK_QDMA@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_MTK_HAS_CAPS
	cbnz	x0, LBB0_3
; %bb.1:
	tbnz	w23, #0, LBB0_4
; %bb.2:
Lloh3:
	adrp	x8, _MTK_DMA_DUMMY_DESC@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MTK_DMA_DUMMY_DESC@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	str	x8, [x20]
	str	x21, [x22, #8]
	mov	x0, x19
	bl	_TX_DMA_PLEN0
	str	w0, [x22]
LBB0_3:
Lloh6:
	adrp	x22, _dma_len0@GOTPAGE
Lloh7:
	ldr	x22, [x22, _dma_len0@GOTPAGEOFF]
Lloh8:
	adrp	x8, _dma_addr0@GOTPAGE
Lloh9:
	ldr	x8, [x8, _dma_addr0@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:
	str	x21, [x22, #16]
	mov	x0, x19
	bl	_TX_DMA_PLEN1
	ldr	w8, [x22]
	orr	w8, w8, w0
	str	w8, [x22]
Lloh10:
	adrp	x22, _dma_len1@GOTPAGE
Lloh11:
	ldr	x22, [x22, _dma_len1@GOTPAGEOFF]
Lloh12:
	adrp	x8, _dma_addr1@GOTPAGE
Lloh13:
	ldr	x8, [x8, _dma_addr1@GOTPAGEOFF]
LBB0_5:
	ldr	w1, [x8]
	mov	x0, x20
	mov	x2, x21
	bl	_dma_unmap_addr_set
	ldr	w1, [x22]
	mov	x0, x20
	mov	x2, x19
	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
	b	_dma_unmap_len_set
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_MTK_QDMA,4,2                   ; @MTK_QDMA
	.comm	_dma_addr0,4,2                  ; @dma_addr0
	.comm	_dma_len0,4,2                   ; @dma_len0
	.comm	_dma_addr1,4,2                  ; @dma_addr1
	.comm	_dma_len1,4,2                   ; @dma_len1
	.comm	_MTK_DMA_DUMMY_DESC,8,3         ; @MTK_DMA_DUMMY_DESC
	.no_dead_strip	_setup_tx_buf
.subsections_via_symbols
