	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cdd_unload                     ## -- Begin function cdd_unload
	.p2align	4, 0x90
_cdd_unload:                            ## @cdd_unload
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_cdd@GOTPCREL(%rip), %r13
	movl	(%r13), %ebx
	testl	%ebx, %ebx
	je	LBB0_15
## %bb.1:
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movq	32(%r13), %rax
	movq	(%rax), %rdi
	testq	%rdi, %rdi
	je	LBB0_3
## %bb.2:
	callq	_pm_close
	movq	32(%r13), %rax
	movq	$0, (%rax)
LBB0_3:
	movl	24(%r13), %ecx
	cmpl	$2, %ecx
	jl	LBB0_13
## %bb.4:
	movl	$1, %ebx
	movq	_Pico_mcd@GOTPCREL(%rip), %r15
	movq	_CT_MP3@GOTPCREL(%rip), %r12
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_5 Depth=1
	movl	%edx, %ebx
LBB0_12:                                ##   in Loop: Header=BB0_5 Depth=1
	incl	%ebx
	cmpl	%ecx, %ebx
	jge	LBB0_13
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movslq	%ebx, %r14
	shlq	$4, %r14
	movq	(%rax,%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_12
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	(%r15), %rcx
	movq	(%rcx), %rcx
	cmpq	(%r12), %rcx
	jne	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	callq	_fclose
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	(%rax), %rdi
	callq	_pm_close
LBB0_9:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	32(%r13), %rax
	movq	16(%r14,%rax), %rsi
	movl	24(%r13), %ecx
	movl	%ecx, %edx
	cmpq	(%rax,%r14), %rsi
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_5 Depth=1
	movl	%ebx, %edx
	jmp	LBB0_11
LBB0_13:
	movl	$0, (%r13)
	movq	8(%r13), %rax
	movq	_CD_OPEN@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	je	LBB0_15
## %bb.14:
	movq	_NO_DISC@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%r13)
LBB0_15:
	leaq	24(%r13), %rdi
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_memset
	movq	$0, 16(%r13)
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_cdd,40,3                       ## @cdd
	.comm	_Pico_mcd,8,3                   ## @Pico_mcd
	.comm	_CT_MP3,8,3                     ## @CT_MP3
	.comm	_CD_OPEN,8,3                    ## @CD_OPEN
	.comm	_NO_DISC,8,3                    ## @NO_DISC
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cdd_unload                     ; -- Begin function cdd_unload
	.p2align	2
_cdd_unload:                            ; @cdd_unload
	.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
Lloh0:
	adrp	x20, _cdd@GOTPAGE
Lloh1:
	ldr	x20, [x20, _cdd@GOTPAGEOFF]
	ldr	w19, [x20]
	cbz	w19, LBB0_13
; %bb.1:
	ldr	x8, [x20, #32]
	ldr	x0, [x8]
	cbz	x0, LBB0_3
; %bb.2:
	bl	_pm_close
	ldr	x8, [x20, #32]
	str	xzr, [x8]
LBB0_3:
	ldr	w9, [x20, #24]
	cmp	w9, #2
	b.lt	LBB0_11
; %bb.4:
	mov	w21, #1
Lloh2:
	adrp	x22, _Pico_mcd@GOTPAGE
Lloh3:
	ldr	x22, [x22, _Pico_mcd@GOTPAGEOFF]
Lloh4:
	adrp	x23, _CT_MP3@GOTPAGE
Lloh5:
	ldr	x23, [x23, _CT_MP3@GOTPAGEOFF]
	b	LBB0_8
LBB0_5:                                 ;   in Loop: Header=BB0_8 Depth=1
	ldr	x0, [x8]
	bl	_pm_close
LBB0_6:                                 ;   in Loop: Header=BB0_8 Depth=1
	sxtw	x9, w21
	ldr	x8, [x20, #32]
	add	x9, x8, x9, lsl #4
	ldr	x10, [x9, #16]
	ldr	x11, [x9]
	ldr	w9, [x20, #24]
	cmp	x10, x11
	csel	w21, w9, w21, eq
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	add	w21, w21, #1
	cmp	w21, w9
	b.ge	LBB0_11
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	sbfiz	x10, x21, #4, #32
	ldr	x0, [x8, x10]
	cbz	x0, LBB0_7
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	x9, [x22]
	ldr	x9, [x9]
	ldr	x10, [x23]
	cmp	x9, x10
	b.ne	LBB0_5
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=1
	bl	_fclose
	b	LBB0_6
LBB0_11:
	str	wzr, [x20]
	ldr	x8, [x20, #8]
Lloh6:
	adrp	x9, _CD_OPEN@GOTPAGE
Lloh7:
	ldr	x9, [x9, _CD_OPEN@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_13
; %bb.12:
Lloh9:
	adrp	x8, _NO_DISC@GOTPAGE
Lloh10:
	ldr	x8, [x8, _NO_DISC@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	str	x8, [x20, #8]
LBB0_13:
	add	x0, x20, #24
	mov	w1, #0
	mov	w2, #16
	bl	_memset
	str	xzr, [x20, #16]
	mov	x0, x19
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_cdd,40,3                       ; @cdd
	.comm	_Pico_mcd,8,3                   ; @Pico_mcd
	.comm	_CT_MP3,8,3                     ; @CT_MP3
	.comm	_CD_OPEN,8,3                    ; @CD_OPEN
	.comm	_NO_DISC,8,3                    ; @NO_DISC
.subsections_via_symbols
