	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cdrom_ioctl_drive_status
_cdrom_ioctl_drive_status:              ## @cdrom_ioctl_drive_status
	.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	8(%rbx), %rax
	movq	_CDC_DRIVE_STATUS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_1
## %bb.3:
	movq	_CDC_SELECT_DISC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_CDROM_CAN
	movq	_CDSL_CURRENT@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	testl	%eax, %eax
	je	LBB0_9
## %bb.4:
	cmpq	%r14, %rsi
	je	LBB0_9
## %bb.5:
	movq	_CDSL_NONE@GOTPCREL(%rip), %rax
	cmpq	%r14, (%rax)
	je	LBB0_9
## %bb.6:
	cmpl	%r14d, (%rbx)
	jle	LBB0_7
## %bb.8:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_cdrom_slot_status              ## TAILCALL
LBB0_1:
	movq	_ENOSYS@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_9:
	movq	8(%rbx), %rax
	movq	8(%rax), %rax
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmpq	*%rax                           ## TAILCALL
LBB0_7:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	popq	%rbx
	popq	%r14
	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 CDROM_DRIVE_STATUS\n"

	.comm	_CDC_DRIVE_STATUS,4,2           ## @CDC_DRIVE_STATUS
	.comm	_ENOSYS,4,2                     ## @ENOSYS
	.comm	_CDC_SELECT_DISC,4,2            ## @CDC_SELECT_DISC
	.comm	_CDSL_CURRENT,8,3               ## @CDSL_CURRENT
	.comm	_CDSL_NONE,8,3                  ## @CDSL_NONE
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_cdrom_ioctl_drive_status
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cdrom_ioctl_drive_status
_cdrom_ioctl_drive_status:              ; @cdrom_ioctl_drive_status
	.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
	ldr	x8, [x19, #8]
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _CDC_DRIVE_STATUS@GOTPAGE
Lloh6:
	ldr	x9, [x9, _CDC_DRIVE_STATUS@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.1:
Lloh8:
	adrp	x8, _CDC_SELECT_DISC@GOTPAGE
Lloh9:
	ldr	x8, [x8, _CDC_SELECT_DISC@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	bl	_CDROM_CAN
Lloh11:
	adrp	x8, _CDSL_CURRENT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _CDSL_CURRENT@GOTPAGEOFF]
Lloh13:
	ldr	x1, [x8]
Lloh14:
	adrp	x8, _CDSL_NONE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _CDSL_NONE@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
	cmp	w0, #0
	ccmp	x1, x20, #4, ne
	ccmp	x8, x20, #4, ne
	b.ne	LBB0_4
; %bb.2:
	ldr	x8, [x19, #8]
	ldr	x2, [x8, #8]
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	br	x2
LBB0_3:
Lloh17:
	adrp	x8, _ENOSYS@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ENOSYS@GOTPAGEOFF]
	b	LBB0_7
LBB0_4:
	ldr	w8, [x19]
	cmp	w8, w20
	b.le	LBB0_6
; %bb.5:
	mov	x0, x19
	mov	x1, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_cdrom_slot_status
LBB0_6:
Lloh19:
	adrp	x8, _EINVAL@GOTPAGE
Lloh20:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w0, w8
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_CD_DO_IOCTL,4,2                ; @CD_DO_IOCTL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"entering CDROM_DRIVE_STATUS\n"

	.comm	_CDC_DRIVE_STATUS,4,2           ; @CDC_DRIVE_STATUS
	.comm	_ENOSYS,4,2                     ; @ENOSYS
	.comm	_CDC_SELECT_DISC,4,2            ; @CDC_SELECT_DISC
	.comm	_CDSL_CURRENT,8,3               ; @CDSL_CURRENT
	.comm	_CDSL_NONE,8,3                  ; @CDSL_NONE
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_cdrom_ioctl_drive_status
.subsections_via_symbols
