	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cdrom_ioctl_eject
_cdrom_ioctl_eject:                     ## @cdrom_ioctl_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movq	_CD_DO_IOCTL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_cdinfo
	movq	_CDC_OPEN_TRAY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_CDROM_CAN
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	cmpl	$1, (%rbx)
	jne	LBB0_5
## %bb.4:
	movq	_keeplocked@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jne	LBB0_5
## %bb.6:
	movq	_CDC_LOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_CDROM_CAN
	testq	%rax, %rax
	je	LBB0_9
## %bb.7:
	movq	8(%rbx), %rax
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	*(%rax)
	testl	%eax, %eax
	jne	LBB0_8
LBB0_9:
	movq	8(%rbx), %rax
	movq	8(%rax), %rax
	movq	%rbx, %rdi
	movl	$1, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmpq	*%rax                           ## TAILCALL
LBB0_1:
	movq	_ENOSYS@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_5:
	movq	_EBUSY@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CD_DO_IOCTL,4,2                ## @CD_DO_IOCTL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"entering CDROMEJECT\n"

	.comm	_CDC_OPEN_TRAY,4,2              ## @CDC_OPEN_TRAY
	.comm	_ENOSYS,4,2                     ## @ENOSYS
	.comm	_keeplocked,8,3                 ## @keeplocked
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_CDC_LOCK,4,2                   ## @CDC_LOCK
	.no_dead_strip	_cdrom_ioctl_eject
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cdrom_ioctl_eject
_cdrom_ioctl_eject:                     ; @cdrom_ioctl_eject
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh0:
	adrp	x8, _CD_DO_IOCTL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CD_DO_IOCTL@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_cdinfo
Lloh5:
	adrp	x8, _CDC_OPEN_TRAY@GOTPAGE
Lloh6:
	ldr	x8, [x8, _CDC_OPEN_TRAY@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	bl	_CDROM_CAN
	cbz	x0, LBB0_3
; %bb.1:
	ldr	w8, [x19]
Lloh8:
	adrp	x9, _keeplocked@GOTPAGE
Lloh9:
	ldr	x9, [x9, _keeplocked@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	w8, #1
	ccmp	x9, #0, #0, eq
	b.eq	LBB0_6
; %bb.2:
Lloh11:
	adrp	x8, _EBUSY@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:
Lloh13:
	adrp	x8, _ENOSYS@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENOSYS@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_6:
Lloh15:
	adrp	x8, _CDC_LOCK@GOTPAGE
Lloh16:
	ldr	x8, [x8, _CDC_LOCK@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	bl	_CDROM_CAN
	cbz	x0, LBB0_8
; %bb.7:
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	mov	x0, x19
	mov	w1, #0
	blr	x8
	cbnz	w0, LBB0_5
LBB0_8:
	ldr	x8, [x19, #8]
	ldr	x2, [x8, #8]
	mov	x0, x19
	mov	w1, #1
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	br	x2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_CD_DO_IOCTL,4,2                ; @CD_DO_IOCTL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"entering CDROMEJECT\n"

	.comm	_CDC_OPEN_TRAY,4,2              ; @CDC_OPEN_TRAY
	.comm	_ENOSYS,4,2                     ; @ENOSYS
	.comm	_keeplocked,8,3                 ; @keeplocked
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_CDC_LOCK,4,2                   ; @CDC_LOCK
	.no_dead_strip	_cdrom_ioctl_eject
.subsections_via_symbols
