	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mdc_issue_desc
_mdc_issue_desc:                        ## @mdc_issue_desc
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	24(%rdi), %r15
	addq	$16, %rdi
	callq	_vchan_next_desc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	%rax, %rdi
	addq	$4, %rdi
	callq	_list_del
	movq	%rbx, %rdi
	callq	_to_mdc_desc
	movq	%rax, %r14
	movq	%rax, 8(%r12)
	movq	%r15, %rdi
	callq	_mdma2dev
	movl	4(%r12), %edx
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edi
	callq	_dev_dbg
	movq	(%r15), %rax
	movq	%r12, %rdi
	callq	*(%rax)
	movq	_MDC_GENERAL_CONFIG@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r12, %rdi
	callq	_mdc_chan_readl
	movq	_MDC_GENERAL_CONFIG_LIST_IEN@GOTPCREL(%rip), %rcx
	movq	_MDC_GENERAL_CONFIG_IEN@GOTPCREL(%rip), %rdx
	movq	_MDC_GENERAL_CONFIG_LEVEL_INT@GOTPCREL(%rip), %rsi
	movq	_MDC_GENERAL_CONFIG_PHYSICAL_W@GOTPCREL(%rip), %rdi
	orl	(%rcx), %eax
	orl	(%rdx), %eax
	orl	(%rsi), %eax
	orl	(%rdi), %eax
	movq	_MDC_GENERAL_CONFIG_PHYSICAL_R@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	(%rbx), %edx
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_mdc_chan_writel
	movl	(%r12), %esi
	movq	_MDC_READ_PORT_CONFIG_STHREAD_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	%esi, %eax
	shll	%cl, %eax
	movq	_MDC_READ_PORT_CONFIG_RTHREAD_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movl	%esi, %edx
	shll	%cl, %edx
	movq	_MDC_READ_PORT_CONFIG_WTHREAD_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %esi
	orl	%eax, %edx
	orl	%edx, %esi
	movq	_MDC_READ_PORT_CONFIG@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	callq	_mdc_chan_writel
	movl	(%r14), %esi
	movq	_MDC_LIST_NODE_ADDRESS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	callq	_mdc_chan_writel
	movq	_MDC_CONTROL_AND_STATUS@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r12, %rdi
	callq	_mdc_chan_readl
	movq	_MDC_CONTROL_AND_STATUS_LIST_EN@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	(%rbx), %edx
	movq	%r12, %rdi
	movl	%eax, %esi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mdc_chan_writel                ## TAILCALL
LBB0_1:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Issuing descriptor on channel %d\n"

	.comm	_MDC_GENERAL_CONFIG,4,2         ## @MDC_GENERAL_CONFIG
	.comm	_MDC_GENERAL_CONFIG_LIST_IEN,4,2 ## @MDC_GENERAL_CONFIG_LIST_IEN
	.comm	_MDC_GENERAL_CONFIG_IEN,4,2     ## @MDC_GENERAL_CONFIG_IEN
	.comm	_MDC_GENERAL_CONFIG_LEVEL_INT,4,2 ## @MDC_GENERAL_CONFIG_LEVEL_INT
	.comm	_MDC_GENERAL_CONFIG_PHYSICAL_W,4,2 ## @MDC_GENERAL_CONFIG_PHYSICAL_W
	.comm	_MDC_GENERAL_CONFIG_PHYSICAL_R,4,2 ## @MDC_GENERAL_CONFIG_PHYSICAL_R
	.comm	_MDC_READ_PORT_CONFIG_STHREAD_SHIFT,4,2 ## @MDC_READ_PORT_CONFIG_STHREAD_SHIFT
	.comm	_MDC_READ_PORT_CONFIG_RTHREAD_SHIFT,4,2 ## @MDC_READ_PORT_CONFIG_RTHREAD_SHIFT
	.comm	_MDC_READ_PORT_CONFIG_WTHREAD_SHIFT,4,2 ## @MDC_READ_PORT_CONFIG_WTHREAD_SHIFT
	.comm	_MDC_READ_PORT_CONFIG,4,2       ## @MDC_READ_PORT_CONFIG
	.comm	_MDC_LIST_NODE_ADDRESS,4,2      ## @MDC_LIST_NODE_ADDRESS
	.comm	_MDC_CONTROL_AND_STATUS,4,2     ## @MDC_CONTROL_AND_STATUS
	.comm	_MDC_CONTROL_AND_STATUS_LIST_EN,4,2 ## @MDC_CONTROL_AND_STATUS_LIST_EN
	.no_dead_strip	_mdc_issue_desc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mdc_issue_desc
_mdc_issue_desc:                        ; @mdc_issue_desc
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	ldr	x21, [x0, #24]
	add	x0, x0, #16
	bl	_vchan_next_desc
	cbz	x0, LBB0_2
; %bb.1:
	mov	x20, x0
	add	x0, x0, #4
	bl	_list_del
	mov	x0, x20
	bl	_to_mdc_desc
	mov	x20, x0
	str	x0, [x19, #8]
	mov	x0, x21
	bl	_mdma2dev
	ldr	w2, [x19, #4]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
	ldr	x8, [x21]
	ldr	x8, [x8]
	mov	x0, x19
	blr	x8
Lloh2:
	adrp	x21, _MDC_GENERAL_CONFIG@GOTPAGE
Lloh3:
	ldr	x21, [x21, _MDC_GENERAL_CONFIG@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_mdc_chan_readl
Lloh4:
	adrp	x8, _MDC_GENERAL_CONFIG_LIST_IEN@GOTPAGE
Lloh5:
	ldr	x8, [x8, _MDC_GENERAL_CONFIG_LIST_IEN@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
Lloh7:
	adrp	x9, _MDC_GENERAL_CONFIG_IEN@GOTPAGE
Lloh8:
	ldr	x9, [x9, _MDC_GENERAL_CONFIG_IEN@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
Lloh10:
	adrp	x10, _MDC_GENERAL_CONFIG_LEVEL_INT@GOTPAGE
Lloh11:
	ldr	x10, [x10, _MDC_GENERAL_CONFIG_LEVEL_INT@GOTPAGEOFF]
Lloh12:
	ldr	w10, [x10]
Lloh13:
	adrp	x11, _MDC_GENERAL_CONFIG_PHYSICAL_W@GOTPAGE
Lloh14:
	ldr	x11, [x11, _MDC_GENERAL_CONFIG_PHYSICAL_W@GOTPAGEOFF]
Lloh15:
	ldr	w11, [x11]
Lloh16:
	adrp	x12, _MDC_GENERAL_CONFIG_PHYSICAL_R@GOTPAGE
Lloh17:
	ldr	x12, [x12, _MDC_GENERAL_CONFIG_PHYSICAL_R@GOTPAGEOFF]
Lloh18:
	ldr	w12, [x12]
	orr	w8, w8, w0
	orr	w8, w8, w9
	orr	w8, w8, w10
	orr	w8, w8, w11
	orr	w1, w8, w12
	ldr	w2, [x21]
	mov	x0, x19
	bl	_mdc_chan_writel
	ldr	w8, [x19]
Lloh19:
	adrp	x9, _MDC_READ_PORT_CONFIG_STHREAD_SHIFT@GOTPAGE
Lloh20:
	ldr	x9, [x9, _MDC_READ_PORT_CONFIG_STHREAD_SHIFT@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
Lloh22:
	adrp	x10, _MDC_READ_PORT_CONFIG_RTHREAD_SHIFT@GOTPAGE
Lloh23:
	ldr	x10, [x10, _MDC_READ_PORT_CONFIG_RTHREAD_SHIFT@GOTPAGEOFF]
	lsl	w9, w8, w9
Lloh24:
	ldr	w10, [x10]
	lsl	w10, w8, w10
	orr	w9, w10, w9
Lloh25:
	adrp	x10, _MDC_READ_PORT_CONFIG_WTHREAD_SHIFT@GOTPAGE
Lloh26:
	ldr	x10, [x10, _MDC_READ_PORT_CONFIG_WTHREAD_SHIFT@GOTPAGEOFF]
Lloh27:
	ldr	w10, [x10]
	lsl	w8, w8, w10
	orr	w1, w9, w8
Lloh28:
	adrp	x8, _MDC_READ_PORT_CONFIG@GOTPAGE
Lloh29:
	ldr	x8, [x8, _MDC_READ_PORT_CONFIG@GOTPAGEOFF]
Lloh30:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_mdc_chan_writel
	ldr	w1, [x20]
Lloh31:
	adrp	x8, _MDC_LIST_NODE_ADDRESS@GOTPAGE
Lloh32:
	ldr	x8, [x8, _MDC_LIST_NODE_ADDRESS@GOTPAGEOFF]
Lloh33:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_mdc_chan_writel
Lloh34:
	adrp	x20, _MDC_CONTROL_AND_STATUS@GOTPAGE
Lloh35:
	ldr	x20, [x20, _MDC_CONTROL_AND_STATUS@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_mdc_chan_readl
Lloh36:
	adrp	x8, _MDC_CONTROL_AND_STATUS_LIST_EN@GOTPAGE
Lloh37:
	ldr	x8, [x8, _MDC_CONTROL_AND_STATUS_LIST_EN@GOTPAGEOFF]
Lloh38:
	ldr	w8, [x8]
	orr	w1, w8, w0
	ldr	w2, [x20]
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_mdc_chan_writel
LBB0_2:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Issuing descriptor on channel %d\n"

	.comm	_MDC_GENERAL_CONFIG,4,2         ; @MDC_GENERAL_CONFIG
	.comm	_MDC_GENERAL_CONFIG_LIST_IEN,4,2 ; @MDC_GENERAL_CONFIG_LIST_IEN
	.comm	_MDC_GENERAL_CONFIG_IEN,4,2     ; @MDC_GENERAL_CONFIG_IEN
	.comm	_MDC_GENERAL_CONFIG_LEVEL_INT,4,2 ; @MDC_GENERAL_CONFIG_LEVEL_INT
	.comm	_MDC_GENERAL_CONFIG_PHYSICAL_W,4,2 ; @MDC_GENERAL_CONFIG_PHYSICAL_W
	.comm	_MDC_GENERAL_CONFIG_PHYSICAL_R,4,2 ; @MDC_GENERAL_CONFIG_PHYSICAL_R
	.comm	_MDC_READ_PORT_CONFIG_STHREAD_SHIFT,4,2 ; @MDC_READ_PORT_CONFIG_STHREAD_SHIFT
	.comm	_MDC_READ_PORT_CONFIG_RTHREAD_SHIFT,4,2 ; @MDC_READ_PORT_CONFIG_RTHREAD_SHIFT
	.comm	_MDC_READ_PORT_CONFIG_WTHREAD_SHIFT,4,2 ; @MDC_READ_PORT_CONFIG_WTHREAD_SHIFT
	.comm	_MDC_READ_PORT_CONFIG,4,2       ; @MDC_READ_PORT_CONFIG
	.comm	_MDC_LIST_NODE_ADDRESS,4,2      ; @MDC_LIST_NODE_ADDRESS
	.comm	_MDC_CONTROL_AND_STATUS,4,2     ; @MDC_CONTROL_AND_STATUS
	.comm	_MDC_CONTROL_AND_STATUS_LIST_EN,4,2 ; @MDC_CONTROL_AND_STATUS_LIST_EN
	.no_dead_strip	_mdc_issue_desc
.subsections_via_symbols
