	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function do_dma
_do_dma:                                ## @do_dma
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movl	%edi, %r13d
	movq	_Pico_mcd@GOTPCREL(%rip), %r12
	movq	(%r12), %rax
	movq	(%rax), %rax
	movl	40(%rax), %ebx
	shll	$8, %ebx
	orl	44(%rax), %ebx
	movq	_cdc@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_EL_CD@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r13d, %edx
	movl	%r15d, %ecx
	movl	%ebx, %r8d
	movl	%r14d, %r9d
	xorl	%eax, %eax
	callq	_elprintf
	leal	-128(%r13), %eax
	cmpl	$4, %eax
	ja	LBB0_13
## %bb.1:
	andl	$16382, %r15d                   ## imm = 0x3FFE
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	jmpq	*%rax
LBB0_12:
	leal	(,%rbx,8), %r13d
	andl	$262136, %r13d                  ## imm = 0x3FFF8
	movq	(%r12), %rax
	movl	8(%rax), %edx
	addl	%r13d, %edx
	movl	$262144, %r12d                  ## imm = 0x40000
	jmp	LBB0_15
LBB0_13:
	movq	_EL_ANOMALY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	movl	%r13d, %edx
	xorl	%eax, %eax
	callq	_elprintf
	leal	(%r14,%r14), %ecx
	jmp	LBB0_25
LBB0_11:
	leal	(,%rbx,8), %r13d
	andl	$131064, %r13d                  ## imm = 0x1FFF8
	movq	(%r12), %rax
	movq	16(%rax), %rax
	movl	4(%rax), %edx
	jmp	LBB0_10
LBB0_9:
	leal	(,%rbx,8), %r13d
	andl	$131064, %r13d                  ## imm = 0x1FFF8
	movq	(%r12), %rax
	movq	16(%rax), %rax
	movl	(%rax), %edx
LBB0_10:
	addl	%r13d, %edx
	movl	$131072, %r12d                  ## imm = 0x20000
	jmp	LBB0_15
LBB0_14:
	leal	(,%rbx,8), %r13d
	movq	(%r12), %rax
	movl	24(%rax), %edx
	addl	%r13d, %edx
	movl	$524288, %r12d                  ## imm = 0x80000
LBB0_15:
	leal	(%r13,%r14,2), %eax
	movq	%r14, %rbx
	cmpl	%r12d, %eax
	jle	LBB0_17
## %bb.16:
	movq	_EL_ANOMALY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.3(%rip), %rsi
	movl	%edx, %r14d
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	movl	%r13d, %ecx
	movl	%ebx, %r8d
	xorl	%eax, %eax
	callq	_elprintf
	movl	%r14d, %edx
	subl	%r13d, %r12d
	movl	%r12d, %r14d
	shrl	$31, %r14d
	addl	%r12d, %r14d
	sarl	%r14d
LBB0_17:
	leal	(%rbx,%rbx), %ecx
	testl	%r14d, %r14d
	jle	LBB0_18
## %bb.19:
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movslq	%edx, %r13
	.p2align	4, 0x90
LBB0_20:                                ## =>This Inner Loop Header: Depth=1
	leal	(%r15,%r14,2), %eax
	movl	%r15d, %esi
	cmpl	$16385, %eax                    ## imm = 0x4001
	jl	LBB0_22
## %bb.21:                              ##   in Loop: Header=BB0_20 Depth=1
	movl	$16384, %r12d                   ## imm = 0x4000
	subl	%r15d, %r12d
	movq	_cdc@GOTPCREL(%rip), %rax
	addq	8(%rax), %rsi
	movl	%r12d, %ebx
	shrl	%ebx
	movq	%r13, %rdi
	movl	%ebx, %edx
	callq	_memcpy16bswap
	leaq	(%r13,%r12,4), %r13
	xorl	%r15d, %r15d
	subl	%ebx, %r14d
	jg	LBB0_20
	jmp	LBB0_23
LBB0_18:
	movq	_Pico_mcd@GOTPCREL(%rip), %r12
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	jmp	LBB0_25
LBB0_22:
	movq	_cdc@GOTPCREL(%rip), %rax
	addq	8(%rax), %rsi
	movq	%r13, %rdi
	movl	%r14d, %edx
	callq	_memcpy16bswap
LBB0_23:
	movq	_Pico_mcd@GOTPCREL(%rip), %r12
LBB0_24:
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
LBB0_25:
	movq	_cdc@GOTPCREL(%rip), %rax
	addl	%ecx, (%rax)
	cmpl	$132, %r13d
	sete	%al
	movb	$2, %cl
	subb	%al, %cl
	sarl	%cl, %r14d
	addl	%r14d, %ebx
	movl	%ebx, %eax
	sarl	$8, %eax
	movq	(%r12), %rcx
	movq	(%rcx), %rcx
	movl	%eax, 40(%rcx)
	movl	%ebx, 44(%rcx)
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	leal	(,%rbx,4), %r13d
	andl	$4092, %r13d                    ## imm = 0xFFC
	leal	(%r14,%r14), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	leal	(%r13,%r14,2), %eax
	cmpl	$4097, %eax                     ## imm = 0x1001
	jl	LBB0_4
## %bb.3:
	movq	_EL_ANOMALY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%r13d, %edx
	movl	%r14d, %ecx
	xorl	%eax, %eax
	callq	_elprintf
	movl	$4096, %r14d                    ## imm = 0x1000
	subl	%r13d, %r14d
	shrl	%r14d
	jmp	LBB0_5
LBB0_4:
	movq	%r14, %rax
	testl	%eax, %eax
	jle	LBB0_24
LBB0_5:
	movq	(%r12), %rax
	movq	32(%rax), %rcx
	movq	40(%rax), %rax
	shlq	$2, %r13
	addq	(%rax,%rcx,8), %r13
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	leal	(%r15,%r14,2), %eax
	movl	%r15d, %esi
	cmpl	$16385, %eax                    ## imm = 0x4001
	jl	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	$16384, %ebx                    ## imm = 0x4000
	subl	%r15d, %ebx
	movq	_cdc@GOTPCREL(%rip), %rax
	addq	8(%rax), %rsi
	movq	%r13, %rdi
	movl	%ebx, %edx
	callq	_memcpy
	leaq	(%r13,%rbx,4), %r13
	shrl	%ebx
	xorl	%r15d, %r15d
	subl	%ebx, %r14d
	jg	LBB0_6
	jmp	LBB0_24
LBB0_8:
	addl	%r14d, %r14d
	movq	_cdc@GOTPCREL(%rip), %rax
	addq	8(%rax), %rsi
	movq	%r13, %rdi
	movl	%r14d, %edx
	callq	_memcpy
	jmp	LBB0_24
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_12, LBB0_12-LJTI0_0
.set L0_0_set_11, LBB0_11-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_14, LBB0_14-LJTI0_0
.set L0_0_set_2, LBB0_2-LJTI0_0
LJTI0_0:
	.long	L0_0_set_12
	.long	L0_0_set_11
	.long	L0_0_set_9
	.long	L0_0_set_14
	.long	L0_0_set_2
	.end_data_region
                                        ## -- End function
	.comm	_Pico_mcd,8,3                   ## @Pico_mcd
	.comm	_cdc,16,3                       ## @cdc
	.comm	_EL_CD,4,2                      ## @EL_CD
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"dma %d %04x->%04x %x"

	.comm	_EL_ANOMALY,4,2                 ## @EL_ANOMALY
L_.str.1:                               ## @.str.1
	.asciz	"pcm dma oflow: %x %x"

L_.str.2:                               ## @.str.2
	.asciz	"invalid dma: %d"

L_.str.3:                               ## @.str.3
	.asciz	"cd dma %d oflow: %x %x"

	.no_dead_strip	_do_dma
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function do_dma
_do_dma:                                ; @do_dma
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x24, _Pico_mcd@GOTPAGE
Lloh1:
	ldr	x24, [x24, _Pico_mcd@GOTPAGEOFF]
	ldr	x8, [x24]
	ldr	x8, [x8]
	ldp	w9, w8, [x8, #40]
	orr	w22, w8, w9, lsl #8
Lloh2:
	adrp	x26, _cdc@GOTPAGE
Lloh3:
	ldr	x26, [x26, _cdc@GOTPAGEOFF]
	ldr	w21, [x26]
Lloh4:
	adrp	x8, _EL_CD@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EL_CD@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
	stp	x22, x19, [sp, #8]
	str	x21, [sp]
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_elprintf
	sub	w8, w20, #128
	cmp	w8, #4
	b.hi	LBB0_3
; %bb.1:
	and	w27, w21, #0x3ffe
Lloh9:
	adrp	x9, lJTI0_0@PAGE
Lloh10:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_2
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_2:
	str	x22, [sp, #24]                  ; 8-byte Folded Spill
	ubfiz	w22, w22, #3, #15
	ldr	x8, [x24]
	ldr	w8, [x8, #8]
	add	w23, w8, w22
	mov	w24, #262144
	b	LBB0_8
LBB0_3:
Lloh11:
	adrp	x8, _EL_ANOMALY@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EL_ANOMALY@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
Lloh14:
	adrp	x1, l_.str.2@PAGE
Lloh15:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, x20
	bl	_elprintf
	lsl	w28, w19, #1
	b	LBB0_16
LBB0_4:
	str	x22, [sp, #24]                  ; 8-byte Folded Spill
	ubfiz	w22, w22, #3, #14
	ldr	x8, [x24]
	ldr	x8, [x8, #16]
	ldr	w8, [x8, #4]
	b	LBB0_6
LBB0_5:
	str	x22, [sp, #24]                  ; 8-byte Folded Spill
	ubfiz	w22, w22, #3, #14
	ldr	x8, [x24]
	ldr	x8, [x8, #16]
	ldr	w8, [x8]
LBB0_6:
	add	w23, w8, w22
	mov	w24, #131072
	b	LBB0_8
LBB0_7:
	str	x22, [sp, #24]                  ; 8-byte Folded Spill
	lsl	w22, w22, #3
	ldr	x8, [x24]
	ldr	w8, [x8, #24]
	add	w23, w8, w22
	mov	w24, #524288
LBB0_8:
	lsl	w28, w19, #1
	add	w8, w22, w28
	cmp	w8, w24
	mov	x21, x19
	b.le	LBB0_10
; %bb.9:
Lloh16:
	adrp	x8, _EL_ANOMALY@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EL_ANOMALY@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
	mov	x8, x19
	stp	x22, x8, [sp]
Lloh19:
	adrp	x1, l_.str.3@PAGE
Lloh20:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x2, x20
	bl	_elprintf
	sub	w8, w24, w22
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w21, w8, #1
LBB0_10:
	cmp	w21, #1
	b.lt	LBB0_15
; %bb.11:
	sxtw	x22, w23
	mov	w24, #16384
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	add	w8, w27, w21, lsl #1
	cmp	w8, #4, lsl #12                 ; =16384
	b.le	LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	sub	w25, w24, w27
	ldr	x8, [x26, #8]
	add	x1, x8, w27, uxtw
	lsr	w23, w25, #1
	mov	x0, x22
	mov	x2, x23
	bl	_memcpy16bswap
	mov	w27, #0
	add	x22, x22, w25, uxtw #2
	sub	w21, w21, w23
	cmp	w21, #0
	b.gt	LBB0_12
	b	LBB0_15
LBB0_14:
	ldr	x8, [x26, #8]
	add	x1, x8, w27, uxtw
	mov	x0, x22
	mov	x2, x21
	bl	_memcpy16bswap
LBB0_15:
Lloh21:
	adrp	x24, _Pico_mcd@GOTPAGE
Lloh22:
	ldr	x24, [x24, _Pico_mcd@GOTPAGEOFF]
	ldr	x22, [sp, #24]                  ; 8-byte Folded Reload
LBB0_16:
	ldr	w8, [x26]
	add	w8, w8, w28
	str	w8, [x26]
	cmp	w20, #132
	mov	w8, #1
	cinc	w8, w8, ne
	asr	w8, w19, w8
	add	w8, w22, w8
	asr	w9, w8, #8
	ldr	x10, [x24]
	ldr	x10, [x10]
	stp	w9, w8, [x10, #40]
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_17:
	mov	x25, x22
	lsl	w8, w22, #2
	and	x21, x8, #0xffc
	lsl	w28, w19, #1
	add	w8, w21, w28
	cmp	w8, #1, lsl #12                 ; =4096
	b.le	LBB0_19
; %bb.18:
Lloh23:
	adrp	x8, _EL_ANOMALY@GOTPAGE
Lloh24:
	ldr	x8, [x8, _EL_ANOMALY@GOTPAGEOFF]
Lloh25:
	ldr	w0, [x8]
	mov	x8, x19
	str	x8, [sp]
Lloh26:
	adrp	x1, l_.str.1@PAGE
Lloh27:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x21
	bl	_elprintf
	mov	w8, #4096
	sub	w8, w8, w21
	lsr	w23, w8, #1
	b	LBB0_20
LBB0_19:
	mov	x23, x19
	cmp	w19, #1
	b.lt	LBB0_25
LBB0_20:
	ldr	x8, [x24]
	ldp	x8, x9, [x8, #32]
	ldr	x8, [x9, x8, lsl #3]
	add	x21, x8, x21, lsl #2
	mov	w24, #16384
LBB0_21:                                ; =>This Inner Loop Header: Depth=1
	lsl	w2, w23, #1
	add	w8, w2, w27
	cmp	w8, #4, lsl #12                 ; =16384
	b.le	LBB0_23
; %bb.22:                               ;   in Loop: Header=BB0_21 Depth=1
	sub	w22, w24, w27
	ldr	x8, [x26, #8]
	add	x1, x8, w27, uxtw
	mov	x0, x21
	mov	x2, x22
	bl	_memcpy
	mov	w27, #0
	add	x21, x21, w22, uxtw #2
	sub	w23, w23, w22, lsr #1
	cmp	w23, #0
	b.gt	LBB0_21
	b	LBB0_24
LBB0_23:
	ldr	x8, [x26, #8]
	add	x1, x8, w27, uxtw
	mov	x0, x21
	bl	_memcpy
LBB0_24:
Lloh28:
	adrp	x24, _Pico_mcd@GOTPAGE
Lloh29:
	ldr	x24, [x24, _Pico_mcd@GOTPAGEOFF]
LBB0_25:
	mov	x22, x25
	b	LBB0_16
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh28, Lloh29
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_4-LBB0_2)>>2
	.byte	(LBB0_5-LBB0_2)>>2
	.byte	(LBB0_7-LBB0_2)>>2
	.byte	(LBB0_17-LBB0_2)>>2
                                        ; -- End function
	.comm	_Pico_mcd,8,3                   ; @Pico_mcd
	.comm	_cdc,16,3                       ; @cdc
	.comm	_EL_CD,4,2                      ; @EL_CD
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"dma %d %04x->%04x %x"

	.comm	_EL_ANOMALY,4,2                 ; @EL_ANOMALY
l_.str.1:                               ; @.str.1
	.asciz	"pcm dma oflow: %x %x"

l_.str.2:                               ; @.str.2
	.asciz	"invalid dma: %d"

l_.str.3:                               ; @.str.3
	.asciz	"cd dma %d oflow: %x %x"

	.no_dead_strip	_do_dma
.subsections_via_symbols
