	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mdc_chan_irq
_mdc_chan_irq:                          ## @mdc_chan_irq
	.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	%rsi, %r14
	movq	%rsi, %rdi
	callq	_spin_lock
	movl	20(%r14), %edi
	callq	_mdma2dev
	movl	16(%r14), %edx
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edi
	callq	_dev_dbg
	movq	%r14, %rdi
	callq	_mdc_get_new_events
	testl	%eax, %eax
	je	LBB0_11
## %bb.1:
	movq	8(%r14), %r12
	testq	%r12, %r12
	je	LBB0_12
## %bb.2:
	movl	%eax, %ebx
	leaq	16(%r12), %r15
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	$1, (%r12)
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	decl	%ebx
	je	LBB0_11
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	$0, (%r12)
	je	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	4(%r12), %eax
	movl	8(%r12), %ecx
	incl	%eax
	movl	%eax, 4(%r12)
	cmpq	$0, 24(%r12)
	je	LBB0_9
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	cltd
	idivl	%ecx
	movl	%edx, %eax
	movl	%edx, 4(%r12)
	cltd
	idivl	12(%r12)
	testl	%edx, %edx
	jne	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r15, %rdi
	callq	_vchan_cyclic_callback
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_3 Depth=1
	cmpl	%ecx, %eax
	jne	LBB0_8
## %bb.10:
	movq	$0, 8(%r14)
	movq	%r15, %rdi
	callq	_vchan_cookie_complete
	movq	%r14, %rdi
	callq	_mdc_issue_desc
	jmp	LBB0_11
LBB0_12:
	movl	20(%r14), %edi
	callq	_mdma2dev
	movl	16(%r14), %edx
	leaq	L_.str.1(%rip), %rsi
	movl	%eax, %edi
	callq	_dev_warn
LBB0_11:
	movq	%r14, %rdi
	callq	_spin_unlock
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"IRQ on channel %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"IRQ with no active descriptor on channel %d\n"

	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.no_dead_strip	_mdc_chan_irq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mdc_chan_irq
_mdc_chan_irq:                          ; @mdc_chan_irq
	.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, x1
	mov	x0, x1
	bl	_spin_lock
	ldr	w0, [x19, #20]
	bl	_mdma2dev
	ldr	w2, [x19, #16]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
	mov	x0, x19
	bl	_mdc_get_new_events
	cbz	w0, LBB0_12
; %bb.1:
	ldr	x22, [x19, #8]
	cbz	x22, LBB0_11
; %bb.2:
	mov	x20, x0
	add	x21, x22, #16
	mov	w23, #1
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	str	w23, [x22]
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	subs	w20, w20, #1
	b.eq	LBB0_12
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x22]
	cbz	w8, LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldp	w9, w8, [x22, #4]
	add	w9, w9, #1
	str	w9, [x22, #4]
	ldr	x10, [x22, #24]
	cbz	x10, LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	sdiv	w10, w9, w8
	msub	w8, w10, w8, w9
	str	w8, [x22, #4]
	ldr	w9, [x22, #12]
	sdiv	w10, w8, w9
	msub	w8, w10, w9, w8
	cbnz	w8, LBB0_4
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x21
	bl	_vchan_cyclic_callback
	b	LBB0_4
LBB0_9:                                 ;   in Loop: Header=BB0_5 Depth=1
	cmp	w9, w8
	b.ne	LBB0_4
; %bb.10:
	str	xzr, [x19, #8]
	mov	x0, x21
	bl	_vchan_cookie_complete
	mov	x0, x19
	bl	_mdc_issue_desc
	b	LBB0_12
LBB0_11:
	ldr	w0, [x19, #20]
	bl	_mdma2dev
	ldr	w2, [x19, #16]
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_warn
LBB0_12:
	mov	x0, x19
	bl	_spin_unlock
Lloh4:
	adrp	x8, _IRQ_HANDLED@GOTPAGE
Lloh5:
	ldr	x8, [x8, _IRQ_HANDLED@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"IRQ on channel %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"IRQ with no active descriptor on channel %d\n"

	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.no_dead_strip	_mdc_chan_irq
.subsections_via_symbols
