	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cdrom_ioctl_eject_sw
_cdrom_ioctl_eject_sw:                  ## @cdrom_ioctl_eject_sw
	.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
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %r14
	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
	testl	%eax, %eax
	je	LBB0_1
## %bb.3:
	movq	_keeplocked@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_5
## %bb.4:
	movq	_EBUSY@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_1:
	movq	_ENOSYS@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_7:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_5:
	movq	_CDO_AUTO_CLOSE@GOTPCREL(%rip), %rsi
	movq	_CDO_AUTO_EJECT@GOTPCREL(%rip), %rdx
	movl	(%rdx), %ecx
	orl	(%rsi), %ecx
	notl	%ecx
	andl	(%rbx), %ecx
	movl	%ecx, (%rbx)
	xorl	%eax, %eax
	testq	%r14, %r14
	je	LBB0_7
## %bb.6:
	orl	(%rsi), %ecx
	orl	(%rdx), %ecx
	movl	%ecx, (%rbx)
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_CD_DO_IOCTL,4,2                ## @CD_DO_IOCTL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"entering CDROMEJECT_SW\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	_CDO_AUTO_CLOSE,4,2             ## @CDO_AUTO_CLOSE
	.comm	_CDO_AUTO_EJECT,4,2             ## @CDO_AUTO_EJECT
	.no_dead_strip	_cdrom_ioctl_eject_sw
.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_sw
_cdrom_ioctl_eject_sw:                  ; @cdrom_ioctl_eject_sw
	.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	x20, x1
	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	w0, LBB0_3
; %bb.1:
Lloh8:
	adrp	x8, _keeplocked@GOTPAGE
Lloh9:
	ldr	x8, [x8, _keeplocked@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	cbz	x8, 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, _CDO_AUTO_CLOSE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _CDO_AUTO_CLOSE@GOTPAGEOFF]
Lloh17:
	adrp	x9, _CDO_AUTO_EJECT@GOTPAGE
Lloh18:
	ldr	x9, [x9, _CDO_AUTO_EJECT@GOTPAGEOFF]
	ldr	w10, [x8]
	ldr	w11, [x9]
	orr	w10, w11, w10
	ldr	w11, [x19]
	bic	w10, w11, w10
	str	w10, [x19]
	mov	w0, #0
	cbz	x20, LBB0_5
; %bb.7:
	ldr	w8, [x8]
	ldr	w9, [x9]
	orr	w8, w8, w10
	orr	w8, w8, w9
	str	w8, [x19]
	b	LBB0_5
	.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 AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_CD_DO_IOCTL,4,2                ; @CD_DO_IOCTL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"entering CDROMEJECT_SW\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	_CDO_AUTO_CLOSE,4,2             ; @CDO_AUTO_CLOSE
	.comm	_CDO_AUTO_EJECT,4,2             ; @CDO_AUTO_EJECT
	.no_dead_strip	_cdrom_ioctl_eject_sw
.subsections_via_symbols
