	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cdc_decoder_update             ## -- Begin function cdc_decoder_update
	.p2align	4, 0x90
_cdc_decoder_update:                    ## @cdc_decoder_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	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_cdc@GOTPCREL(%rip), %r12
	movq	(%r12), %rax
	movq	_BIT_DECEN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	xorl	%r15d, %r15d
	testl	%ecx, (%rax)
	je	LBB0_7
## %bb.1:
	movq	%rdi, %r14
	movq	48(%r12), %rax
	movq	(%rax), %rdi
	movq	%r14, %rsi
	movl	$8, %edx
	callq	_memcpy
	movq	8(%r12), %rax
	movl	$0, 12(%rax)
	movq	_BIT_DECI@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, 40(%r12)
	movq	_BIT_DECIEN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 16(%r12)
	je	LBB0_4
## %bb.2:
	movq	_Pico_mcd@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax), %rax
	movq	_PCDS_IEN5@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, 204(%rax)
	je	LBB0_4
## %bb.3:
	movq	_EL_INTS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_elprintf
	movl	$5, %edi
	callq	_SekInterruptS68k
LBB0_4:
	movq	(%r12), %rax
	movq	_BIT_WRRQ@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_7
## %bb.5:
	movl	$2352, %ebx                     ## imm = 0x930
	addl	20(%r12), %ebx
	movl	%ebx, 20(%r12)
	addl	$2352, 24(%r12)                 ## imm = 0x930
	andl	$16383, %ebx                    ## imm = 0x3FFF
	leaq	(,%rbx,4), %rdi
	addq	32(%r12), %rdi
	movq	%r14, %rsi
	movl	$4, %edx
	callq	_memcpy
	movq	32(%r12), %rax
	leaq	(%rax,%rbx,4), %rdi
	addq	$16, %rdi
	callq	_cdd_read_data
	movl	$1, %r15d
	cmpl	$14333, %ebx                    ## imm = 0x37FD
	jb	LBB0_7
## %bb.6:
	movq	32(%r12), %rdi
	leaq	65536(%rdi), %rsi
	addl	$-14332, %ebx                   ## imm = 0xC804
	movl	%ebx, %edx
	callq	_memcpy
LBB0_7:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_cdc,56,3                       ## @cdc
	.comm	_BIT_DECEN,4,2                  ## @BIT_DECEN
	.comm	_BIT_DECI,4,2                   ## @BIT_DECI
	.comm	_BIT_DECIEN,4,2                 ## @BIT_DECIEN
	.comm	_Pico_mcd,8,3                   ## @Pico_mcd
	.comm	_PCDS_IEN5,4,2                  ## @PCDS_IEN5
	.comm	_EL_INTS,4,2                    ## @EL_INTS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cdc DEC irq 5"

	.comm	_BIT_WRRQ,4,2                   ## @BIT_WRRQ
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cdc_decoder_update             ; -- Begin function cdc_decoder_update
	.p2align	2
_cdc_decoder_update:                    ; @cdc_decoder_update
	.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
Lloh0:
	adrp	x20, _cdc@GOTPAGE
Lloh1:
	ldr	x20, [x20, _cdc@GOTPAGEOFF]
	ldr	x8, [x20]
	ldr	w8, [x8]
Lloh2:
	adrp	x9, _BIT_DECEN@GOTPAGE
Lloh3:
	ldr	x9, [x9, _BIT_DECEN@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_8
; %bb.1:
	mov	x19, x0
	ldr	x8, [x20, #48]
	ldr	x0, [x8]
	mov	x1, x19
	mov	w2, #8
	bl	_memcpy
	ldr	x8, [x20, #8]
	str	wzr, [x8, #12]
Lloh5:
	adrp	x8, _BIT_DECI@GOTPAGE
Lloh6:
	ldr	x8, [x8, _BIT_DECI@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	ldr	w9, [x20, #40]
	bic	w8, w9, w8
	str	w8, [x20, #40]
	ldr	w8, [x20, #16]
Lloh8:
	adrp	x9, _BIT_DECIEN@GOTPAGE
Lloh9:
	ldr	x9, [x9, _BIT_DECIEN@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.2:
Lloh11:
	adrp	x8, _Pico_mcd@GOTPAGE
Lloh12:
	ldr	x8, [x8, _Pico_mcd@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	ldr	x8, [x8]
	ldr	w8, [x8, #204]
Lloh14:
	adrp	x9, _PCDS_IEN5@GOTPAGE
Lloh15:
	ldr	x9, [x9, _PCDS_IEN5@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.3:
Lloh17:
	adrp	x8, _EL_INTS@GOTPAGE
Lloh18:
	ldr	x8, [x8, _EL_INTS@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
Lloh20:
	adrp	x1, l_.str@PAGE
Lloh21:
	add	x1, x1, l_.str@PAGEOFF
	bl	_elprintf
	mov	w0, #5
	bl	_SekInterruptS68k
LBB0_4:
	ldr	x8, [x20]
	ldr	w8, [x8]
Lloh22:
	adrp	x9, _BIT_WRRQ@GOTPAGE
Lloh23:
	ldr	x9, [x9, _BIT_WRRQ@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_8
; %bb.5:
	ldur	d0, [x20, #20]
	mov	w8, #2352
	dup.2s	v1, w8
	add.2s	v0, v0, v1
	stur	d0, [x20, #20]
	fmov	w8, s0
	and	w21, w8, #0x3fff
	ldr	x8, [x20, #32]
	lsl	x22, x21, #2
	add	x0, x8, x22
	mov	x1, x19
	mov	w2, #4
	bl	_memcpy
	ldr	x8, [x20, #32]
	add	x8, x8, x22
	add	x0, x8, #16
	bl	_cdd_read_data
	mov	w8, #14333
	cmp	w21, w8
	b.lo	LBB0_7
; %bb.6:
	ldr	x0, [x20, #32]
	add	x1, x0, #16, lsl #12            ; =65536
	mov	w8, #-14332
	add	w2, w21, w8
	bl	_memcpy
LBB0_7:
	mov	w0, #1
	b	LBB0_9
LBB0_8:
	mov	w0, #0
LBB0_9:
	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	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_cdc,56,3                       ; @cdc
	.comm	_BIT_DECEN,4,2                  ; @BIT_DECEN
	.comm	_BIT_DECI,4,2                   ; @BIT_DECI
	.comm	_BIT_DECIEN,4,2                 ; @BIT_DECIEN
	.comm	_Pico_mcd,8,3                   ; @Pico_mcd
	.comm	_PCDS_IEN5,4,2                  ; @PCDS_IEN5
	.comm	_EL_INTS,4,2                    ; @EL_INTS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cdc DEC irq 5"

	.comm	_BIT_WRRQ,4,2                   ; @BIT_WRRQ
.subsections_via_symbols
