	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cdrom_load_unload
_cdrom_load_unload:                     ## @cdrom_load_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	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%esi, %ebx
	movq	%rdi, %r14
	movq	_CD_CHANGER@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_cdinfo
	testl	%ebx, %ebx
	jns	LBB0_2
## %bb.1:
	xorl	%eax, %eax
	cmpl	$0, (%r14)
	jne	LBB0_6
LBB0_2:
	movq	_CGC_DATA_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-32(%rbp), %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_init_cdrom_command
	movq	_GPCMD_LOAD_UNLOAD@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	-32(%rbp), %rax
	movl	%ecx, (%rax)
	movl	%ebx, %ecx
	notl	%ecx
	shrl	$31, %ecx
	orl	$2, %ecx
	movl	%ecx, 16(%rax)
	movl	%ebx, 32(%rax)
	movq	_HZ@GOTPCREL(%rip), %rcx
	imull	$60, (%rcx), %ecx
	movl	%ecx, -24(%rbp)
	testl	%ebx, %ebx
	js	LBB0_5
## %bb.3:
	cmpl	$0, (%r14)
	je	LBB0_5
## %bb.4:
	movq	_GPCMD_TEST_UNIT_READY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, (%rax)
	movl	%ebx, 28(%rax)
	movl	$0, 32(%rax)
	movl	$0, 16(%rax)
	testl	%ebx, %ebx
	movl	$3, %eax
	cmovnel	%ebx, %eax
	movl	%eax, (%r14)
LBB0_5:
	movq	8(%r14), %rax
	leaq	-32(%rbp), %rsi
	movq	%r14, %rdi
	callq	*(%rax)
LBB0_6:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CD_CHANGER,4,2                 ## @CD_CHANGER
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"entering cdrom_load_unload()\n"

	.comm	_CGC_DATA_NONE,4,2              ## @CGC_DATA_NONE
	.comm	_GPCMD_LOAD_UNLOAD,4,2          ## @GPCMD_LOAD_UNLOAD
	.comm	_HZ,4,2                         ## @HZ
	.comm	_GPCMD_TEST_UNIT_READY,4,2      ## @GPCMD_TEST_UNIT_READY
	.no_dead_strip	_cdrom_load_unload
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cdrom_load_unload
_cdrom_load_unload:                     ; @cdrom_load_unload
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _CD_CHANGER@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CD_CHANGER@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_cdinfo
	tbz	w20, #31, LBB0_3
; %bb.1:
	ldr	w8, [x19]
	cbz	w8, LBB0_3
; %bb.2:
	mov	w0, #0
	b	LBB0_7
LBB0_3:
Lloh5:
	adrp	x8, _CGC_DATA_NONE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _CGC_DATA_NONE@GOTPAGEOFF]
Lloh7:
	ldr	w3, [x8]
	mov	x0, sp
	mov	x1, #0
	mov	w2, #0
	bl	_init_cdrom_command
Lloh8:
	adrp	x8, _GPCMD_LOAD_UNLOAD@GOTPAGE
Lloh9:
	ldr	x8, [x8, _GPCMD_LOAD_UNLOAD@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x8]
	ldr	x8, [sp]
	str	w9, [x8]
	mvn	w9, w20
	mov	w10, #2
	bfxil	w10, w9, #31, #1
	str	w10, [x8, #16]
	str	w20, [x8, #32]
Lloh11:
	adrp	x9, _HZ@GOTPAGE
Lloh12:
	ldr	x9, [x9, _HZ@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	mov	w10, #60
	mul	w9, w9, w10
	str	w9, [sp, #8]
	tbnz	w20, #31, LBB0_6
; %bb.4:
	ldr	w9, [x19]
	cbz	w9, LBB0_6
; %bb.5:
Lloh14:
	adrp	x9, _GPCMD_TEST_UNIT_READY@GOTPAGE
Lloh15:
	ldr	x9, [x9, _GPCMD_TEST_UNIT_READY@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	str	w9, [x8]
	stp	w20, wzr, [x8, #28]
	str	wzr, [x8, #16]
	mov	w8, #3
	cmp	w20, #0
	csel	w8, w8, w20, eq
	str	w8, [x19]
LBB0_6:
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	mov	x1, sp
	mov	x0, x19
	blr	x8
LBB0_7:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_CD_CHANGER,4,2                 ; @CD_CHANGER
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"entering cdrom_load_unload()\n"

	.comm	_CGC_DATA_NONE,4,2              ; @CGC_DATA_NONE
	.comm	_GPCMD_LOAD_UNLOAD,4,2          ; @GPCMD_LOAD_UNLOAD
	.comm	_HZ,4,2                         ; @HZ
	.comm	_GPCMD_TEST_UNIT_READY,4,2      ; @GPCMD_TEST_UNIT_READY
	.no_dead_strip	_cdrom_load_unload
.subsections_via_symbols
