	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cdrom_eject
_cdrom_eject:                           ## @cdrom_eject
	.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
	movl	%esi, %ebx
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	8(%rdi), %r13
	movq	_BLK_MAX_CDB@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	%r12, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	movl	(%r15), %ecx
	testl	%ebx, %ebx
	jne	LBB0_3
## %bb.1:
	movq	_IDE_AFLAG_NO_EJECT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%ecx, %eax
	je	LBB0_3
## %bb.2:
	movq	_EDRIVE_CANT_DO_THIS@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_9
LBB0_3:
	testl	%ebx, %ebx
	je	LBB0_5
## %bb.4:
	movq	_IDE_AFLAG_DOOR_LOCKED@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	andl	(%rdx), %ecx
	jne	LBB0_9
LBB0_5:
	testl	%ebx, %ebx
	je	LBB0_6
## %bb.7:
	movq	_CDC_CLOSE_TRAY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r13)
	sete	%r13b
	addb	%r13b, %r13b
	jmp	LBB0_8
LBB0_6:
	movb	$2, %r13b
LBB0_8:
	testl	%ebx, %ebx
	setne	%bl
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	%r12d, %edx
	callq	_memset
	movq	_GPCMD_START_STOP_UNIT@GOTPCREL(%rip), %rax
	movb	(%rax), %al
	movb	%al, (%r14)
	orb	%r13b, %bl
	movb	%bl, 4(%r14)
	movq	%r15, %rdi
	movq	%r14, %rsi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	pushq	$0
	pushq	$0
	callq	_ide_cd_queue_pc
	addq	$16, %rsp
LBB0_9:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_11
## %bb.10:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_BLK_MAX_CDB,4,2                ## @BLK_MAX_CDB
	.comm	_IDE_AFLAG_NO_EJECT,4,2         ## @IDE_AFLAG_NO_EJECT
	.comm	_EDRIVE_CANT_DO_THIS,4,2        ## @EDRIVE_CANT_DO_THIS
	.comm	_IDE_AFLAG_DOOR_LOCKED,4,2      ## @IDE_AFLAG_DOOR_LOCKED
	.comm	_CDC_CLOSE_TRAY,4,2             ## @CDC_CLOSE_TRAY
	.comm	_GPCMD_START_STOP_UNIT,1,0      ## @GPCMD_START_STOP_UNIT
	.no_dead_strip	_cdrom_eject
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cdrom_eject
_cdrom_eject:                           ; @cdrom_eject
	.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
	sub	sp, sp, #16
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
	ldr	x8, [x0, #8]
Lloh3:
	adrp	x9, _BLK_MAX_CDB@GOTPAGE
Lloh4:
	ldr	x9, [x9, _BLK_MAX_CDB@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x9]
	mov	x9, x2
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x10, x2, #15
	and	x10, x10, #0x1fffffff0
	sub	x20, x9, x10
	mov	sp, x20
	ldr	w9, [x0]
	cbnz	w1, LBB0_3
; %bb.1:
Lloh8:
	adrp	x10, _IDE_AFLAG_NO_EJECT@GOTPAGE
Lloh9:
	ldr	x10, [x10, _IDE_AFLAG_NO_EJECT@GOTPAGEOFF]
Lloh10:
	ldr	w10, [x10]
	and	w10, w10, w9
	cbz	w10, LBB0_3
; %bb.2:
Lloh11:
	adrp	x8, _EDRIVE_CANT_DO_THIS@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EDRIVE_CANT_DO_THIS@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_10
LBB0_3:
	cbz	w1, LBB0_6
; %bb.4:
Lloh14:
	adrp	x10, _IDE_AFLAG_DOOR_LOCKED@GOTPAGE
Lloh15:
	ldr	x10, [x10, _IDE_AFLAG_DOOR_LOCKED@GOTPAGEOFF]
Lloh16:
	ldr	w10, [x10]
	and	w9, w10, w9
	cbz	w9, LBB0_6
; %bb.5:
	mov	w0, #0
	b	LBB0_10
LBB0_6:
	cbz	w1, LBB0_8
; %bb.7:
	ldr	w8, [x8]
Lloh17:
	adrp	x9, _CDC_CLOSE_TRAY@GOTPAGE
Lloh18:
	ldr	x9, [x9, _CDC_CLOSE_TRAY@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w8, eq
	lsl	w21, w8, #1
	b	LBB0_9
LBB0_8:
	mov	w21, #2
LBB0_9:
	cmp	w1, #0
	cset	w22, ne
	mov	x0, x20
	mov	w1, #0
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_memset
Lloh20:
	adrp	x8, _GPCMD_START_STOP_UNIT@GOTPAGE
Lloh21:
	ldr	x8, [x8, _GPCMD_START_STOP_UNIT@GOTPAGEOFF]
	ldrb	w8, [x8]
	strb	w8, [x20]
	orr	w8, w21, w22
	strb	w8, [x20, #4]
	mov	x0, x19
	mov	x1, x20
	mov	w2, #0
	mov	x3, #0
	mov	x4, #0
	mov	x5, #0
	mov	w6, #0
	mov	w7, #0
	bl	_ide_cd_queue_pc
LBB0_10:
	ldur	x8, [x29, #-40]
Lloh22:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh23:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh24:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_12
; %bb.11:
	sub	sp, x29, #32
	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
LBB0_12:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_BLK_MAX_CDB,4,2                ; @BLK_MAX_CDB
	.comm	_IDE_AFLAG_NO_EJECT,4,2         ; @IDE_AFLAG_NO_EJECT
	.comm	_EDRIVE_CANT_DO_THIS,4,2        ; @EDRIVE_CANT_DO_THIS
	.comm	_IDE_AFLAG_DOOR_LOCKED,4,2      ; @IDE_AFLAG_DOOR_LOCKED
	.comm	_CDC_CLOSE_TRAY,4,2             ; @CDC_CLOSE_TRAY
	.comm	_GPCMD_START_STOP_UNIT,1,0      ; @GPCMD_START_STOP_UNIT
	.no_dead_strip	_cdrom_eject
.subsections_via_symbols
