	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cdc_dma_update                 ## -- Begin function cdc_dma_update
	.p2align	4, 0x90
_cdc_dma_update:                        ## @cdc_dma_update
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	_DMA_BYTES_PER_LINE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_cdc@GOTPCREL(%rip), %r14
	movl	8(%r14), %edi
	movq	16(%r14), %rax
	cmpl	%ebx, %edi
	jge	LBB0_5
## %bb.1:
	incl	%edi
	sarl	%edi
	callq	*%rax
	movq	_BIT_DTBSY@GOTPCREL(%rip), %rax
	movq	_BIT_DTEN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movl	$61440, 8(%r14)                 ## imm = 0xF000
	orl	(%r14), %ecx
	movq	_BIT_DTEI@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%ecx, %eax
	movl	%eax, (%r14)
	movq	_BIT_DTEIEN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%r14)
	je	LBB0_4
## %bb.2:
	movq	_scd@GOTPCREL(%rip), %rcx
	movl	(%rcx), %eax
	orl	$32, %eax
	movl	%eax, (%rcx)
	movq	8(%rcx), %rcx
	movl	200(%rcx), %edi
	testb	$32, %dil
	je	LBB0_4
## %bb.3:
	andl	%eax, %edi
	sarl	%edi
	callq	_s68k_update_irq
LBB0_4:
	movq	_scd@GOTPCREL(%rip), %rax
	movq	8(%rax), %rax
	movl	20(%rax), %ecx
	andl	$7, %ecx
	orl	$128, %ecx
	movl	%ecx, 20(%rax)
	movq	$0, 16(%r14)
	jmp	LBB0_6
LBB0_5:
	movl	%ebx, %edi
	sarl	%edi
	callq	*%rax
	subl	%ebx, 8(%r14)
LBB0_6:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DMA_BYTES_PER_LINE,4,2         ## @DMA_BYTES_PER_LINE
	.comm	_cdc,24,3                       ## @cdc
	.comm	_BIT_DTBSY,4,2                  ## @BIT_DTBSY
	.comm	_BIT_DTEN,4,2                   ## @BIT_DTEN
	.comm	_BIT_DTEI,4,2                   ## @BIT_DTEI
	.comm	_BIT_DTEIEN,4,2                 ## @BIT_DTEIEN
	.comm	_scd,16,3                       ## @scd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cdc_dma_update                 ; -- Begin function cdc_dma_update
	.p2align	2
_cdc_dma_update:                        ; @cdc_dma_update
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x8, _DMA_BYTES_PER_LINE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DMA_BYTES_PER_LINE@GOTPAGEOFF]
Lloh2:
	ldr	w20, [x8]
Lloh3:
	adrp	x19, _cdc@GOTPAGE
Lloh4:
	ldr	x19, [x19, _cdc@GOTPAGEOFF]
	ldr	w9, [x19, #8]
	ldr	x8, [x19, #16]
	cmp	w9, w20
	b.ge	LBB0_5
; %bb.1:
	add	w9, w9, #1
	asr	w0, w9, #1
	blr	x8
	mov	w8, #61440
	str	w8, [x19, #8]
Lloh5:
	adrp	x8, _BIT_DTBSY@GOTPAGE
Lloh6:
	ldr	x8, [x8, _BIT_DTBSY@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x9, _BIT_DTEN@GOTPAGE
Lloh9:
	ldr	x9, [x9, _BIT_DTEN@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	orr	w8, w9, w8
	ldp	w9, w10, [x19]
	orr	w8, w8, w9
Lloh11:
	adrp	x9, _BIT_DTEI@GOTPAGE
Lloh12:
	ldr	x9, [x9, _BIT_DTEI@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	bic	w8, w8, w9
	str	w8, [x19]
Lloh14:
	adrp	x8, _BIT_DTEIEN@GOTPAGE
Lloh15:
	ldr	x8, [x8, _BIT_DTEIEN@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
Lloh17:
	adrp	x20, _scd@GOTPAGE
Lloh18:
	ldr	x20, [x20, _scd@GOTPAGEOFF]
	tst	w8, w10
	b.eq	LBB0_4
; %bb.2:
	ldr	w8, [x20]
	orr	w8, w8, #0x20
	str	w8, [x20]
	ldr	x9, [x20, #8]
	ldr	w9, [x9, #200]
	tbz	w9, #5, LBB0_4
; %bb.3:
	and	w8, w9, w8
	asr	w0, w8, #1
	bl	_s68k_update_irq
LBB0_4:
	ldr	x8, [x20, #8]
	ldr	w9, [x8, #20]
	mov	w10, #128
	bfxil	w10, w9, #0, #3
	str	w10, [x8, #20]
	str	xzr, [x19, #16]
	b	LBB0_6
LBB0_5:
	asr	w0, w20, #1
	blr	x8
	ldr	w8, [x19, #8]
	sub	w8, w8, w20
	str	w8, [x19, #8]
LBB0_6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_DMA_BYTES_PER_LINE,4,2         ; @DMA_BYTES_PER_LINE
	.comm	_cdc,24,3                       ; @cdc
	.comm	_BIT_DTBSY,4,2                  ; @BIT_DTBSY
	.comm	_BIT_DTEN,4,2                   ; @BIT_DTEN
	.comm	_BIT_DTEI,4,2                   ; @BIT_DTEI
	.comm	_BIT_DTEIEN,4,2                 ; @BIT_DTEIEN
	.comm	_scd,16,3                       ; @scd
.subsections_via_symbols
