	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function txx9dmac_dostart
_txx9dmac_dostart:                      ## @txx9dmac_dostart
	.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, %r14
	movq	%rdi, %r12
	leaq	8(%rdi), %rbx
	movq	8(%rdi), %r13
	movq	%rbx, %rdi
	callq	_chan2dev
	movl	4(%r14), %edx
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edi
	movq	%r14, %rcx
	callq	_dev_vdbg
	movq	_CSR@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%r12, %rdi
	callq	_channel_readl
	movq	_TXX9_DMA_CSR_XFACT@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_1
## %bb.13:
	movq	%rbx, %rdi
	callq	_chan2dev
	leaq	L_.str.1(%rip), %rsi
	movl	%eax, %edi
	callq	_dev_err
	movq	%r12, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_txx9dmac_dump_regs             ## TAILCALL
LBB0_1:
	movq	%r12, %rdi
	callq	_is_dmac64
	movq	_CNTR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	xorl	%ebx, %ebx
	movq	%r12, %rdi
	xorl	%edx, %edx
	testq	%rax, %rax
	je	LBB0_6
## %bb.2:
	callq	_channel64_writel
	movl	(%r15), %esi
	movq	%r12, %rdi
	movl	$-1, %edx
	callq	_channel64_writel
	testq	%r13, %r13
	je	LBB0_3
## %bb.4:
	cmpq	$0, 8(%r13)
	movl	(%r13), %eax
	movl	%eax, %edx
	cmovel	%ebx, %edx
	cmovel	%eax, %ebx
	jmp	LBB0_5
LBB0_6:
	callq	_channel32_writel
	movl	(%r15), %esi
	movq	%r12, %rdi
	movl	$-1, %edx
	callq	_channel32_writel
	testq	%r13, %r13
	je	LBB0_7
## %bb.8:
	cmpq	$0, 8(%r13)
	movl	(%r13), %eax
	movl	%eax, %edx
	cmovel	%ebx, %edx
	cmovel	%eax, %ebx
	jmp	LBB0_9
LBB0_3:
	movl	$8, %edx
	movl	$8, %ebx
LBB0_5:
	movq	_SAIR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_channel64_writel
	movq	_DAIR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	%ebx, %edx
	callq	_channel64_writel
	movq	_CCR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r12), %edx
	movq	%r12, %rdi
	callq	_channel64_writel
	movl	(%r14), %esi
	movq	%r12, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_channel64_write_CHAR           ## TAILCALL
LBB0_7:
	movl	$4, %edx
	movl	$4, %ebx
LBB0_9:
	movq	_SAIR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_channel32_writel
	movq	_DAIR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	%ebx, %edx
	callq	_channel32_writel
	xorl	%eax, %eax
	callq	_txx9_dma_have_SMPCHN
	testq	%rax, %rax
	je	LBB0_12
## %bb.10:
	movq	_CCR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r12), %edx
	movq	%r12, %rdi
	callq	_channel32_writel
	movq	_CHAR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r14), %edx
	jmp	LBB0_11
LBB0_12:
	movq	_CHAR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r14), %edx
	movq	%r12, %rdi
	callq	_channel32_writel
	movq	_CCR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r12), %edx
LBB0_11:
	movq	%r12, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_channel32_writel               ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"dostart %u %p\n"

	.comm	_CSR,4,2                        ## @CSR
	.comm	_TXX9_DMA_CSR_XFACT,4,2         ## @TXX9_DMA_CSR_XFACT
L_.str.1:                               ## @.str.1
	.asciz	"BUG: Attempted to start non-idle channel\n"

	.comm	_CNTR,4,2                       ## @CNTR
	.comm	_SAIR,4,2                       ## @SAIR
	.comm	_DAIR,4,2                       ## @DAIR
	.comm	_CCR,4,2                        ## @CCR
	.comm	_CHAR,4,2                       ## @CHAR
	.no_dead_strip	_txx9dmac_dostart
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function txx9dmac_dostart
_txx9dmac_dostart:                      ; @txx9dmac_dostart
	.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
	mov	x21, x0
	ldr	x22, [x21, #8]!
	mov	x0, x21
	bl	_chan2dev
	ldr	w2, [x20, #4]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x3, x20
	bl	_dev_vdbg
Lloh2:
	adrp	x23, _CSR@GOTPAGE
Lloh3:
	ldr	x23, [x23, _CSR@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	x0, x19
	bl	_channel_readl
Lloh4:
	adrp	x8, _TXX9_DMA_CSR_XFACT@GOTPAGE
Lloh5:
	ldr	x8, [x8, _TXX9_DMA_CSR_XFACT@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_2
; %bb.1:
	mov	x0, x21
	bl	_chan2dev
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
	mov	x0, 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	_txx9dmac_dump_regs
LBB0_2:
	mov	x0, x19
	bl	_is_dmac64
Lloh9:
	adrp	x8, _CNTR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _CNTR@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	cbz	x0, LBB0_5
; %bb.3:
	mov	x0, x19
	mov	w2, #0
	bl	_channel64_writel
	ldr	w1, [x23]
	mov	x0, x19
	mov	w2, #-1
	bl	_channel64_writel
	cbz	x22, LBB0_7
; %bb.4:
	ldr	x8, [x22, #8]
	ldr	w9, [x22]
	cmp	x8, #0
	csel	w2, wzr, w9, eq
	csel	w21, w9, wzr, eq
	b	LBB0_8
LBB0_5:
	mov	x0, x19
	mov	w2, #0
	bl	_channel32_writel
	ldr	w1, [x23]
	mov	x0, x19
	mov	w2, #-1
	bl	_channel32_writel
	cbz	x22, LBB0_9
; %bb.6:
	ldr	x8, [x22, #8]
	ldr	w9, [x22]
	cmp	x8, #0
	csel	w2, wzr, w9, eq
	csel	w21, w9, wzr, eq
	b	LBB0_10
LBB0_7:
	mov	w2, #8
	mov	w21, #8
LBB0_8:
Lloh12:
	adrp	x8, _SAIR@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SAIR@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_channel64_writel
Lloh15:
	adrp	x8, _DAIR@GOTPAGE
Lloh16:
	ldr	x8, [x8, _DAIR@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x21
	bl	_channel64_writel
Lloh18:
	adrp	x8, _CCR@GOTPAGE
Lloh19:
	ldr	x8, [x8, _CCR@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	ldr	w2, [x19]
	mov	x0, x19
	bl	_channel64_writel
	ldr	w1, [x20]
	mov	x0, 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	_channel64_write_CHAR
LBB0_9:
	mov	w2, #4
	mov	w21, #4
LBB0_10:
Lloh21:
	adrp	x8, _SAIR@GOTPAGE
Lloh22:
	ldr	x8, [x8, _SAIR@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_channel32_writel
Lloh24:
	adrp	x8, _DAIR@GOTPAGE
Lloh25:
	ldr	x8, [x8, _DAIR@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x21
	bl	_channel32_writel
	bl	_txx9_dma_have_SMPCHN
	cbz	x0, LBB0_12
; %bb.11:
Lloh27:
	adrp	x8, _CCR@GOTPAGE
Lloh28:
	ldr	x8, [x8, _CCR@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
	ldr	w2, [x19]
	mov	x0, x19
	bl	_channel32_writel
Lloh30:
	adrp	x8, _CHAR@GOTPAGE
Lloh31:
	ldr	x8, [x8, _CHAR@GOTPAGEOFF]
Lloh32:
	ldr	w1, [x8]
	ldr	w2, [x20]
	b	LBB0_13
LBB0_12:
Lloh33:
	adrp	x8, _CHAR@GOTPAGE
Lloh34:
	ldr	x8, [x8, _CHAR@GOTPAGEOFF]
Lloh35:
	ldr	w1, [x8]
	ldr	w2, [x20]
	mov	x0, x19
	bl	_channel32_writel
Lloh36:
	adrp	x8, _CCR@GOTPAGE
Lloh37:
	ldr	x8, [x8, _CCR@GOTPAGEOFF]
Lloh38:
	ldr	w1, [x8]
	ldr	w2, [x19]
LBB0_13:
	mov	x0, 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	_channel32_writel
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"dostart %u %p\n"

	.comm	_CSR,4,2                        ; @CSR
	.comm	_TXX9_DMA_CSR_XFACT,4,2         ; @TXX9_DMA_CSR_XFACT
l_.str.1:                               ; @.str.1
	.asciz	"BUG: Attempted to start non-idle channel\n"

	.comm	_CNTR,4,2                       ; @CNTR
	.comm	_SAIR,4,2                       ; @SAIR
	.comm	_DAIR,4,2                       ; @DAIR
	.comm	_CCR,4,2                        ; @CCR
	.comm	_CHAR,4,2                       ; @CHAR
	.no_dead_strip	_txx9dmac_dostart
.subsections_via_symbols
