	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ide_cdrom_drive_status         ## -- Begin function ide_cdrom_drive_status
	.p2align	4, 0x90
_ide_cdrom_drive_status:                ## @ide_cdrom_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	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -24
	movq	_CDSL_CURRENT@GOTPCREL(%rip), %rax
	cmpl	%esi, (%rax)
	jne	LBB0_1
## %bb.2:
	movq	%rdi, %rbx
	movq	(%rdi), %rdi
	leaq	-24(%rbp), %rsi
	callq	_cdrom_check_status
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movq	-24(%rbp), %rax
	movq	_UNIT_ATTENTION@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_4
## %bb.5:
	leaq	-40(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_cdrom_get_media_event
	testl	%eax, %eax
	je	LBB0_6
## %bb.9:
	movq	-24(%rbp), %rcx
	movq	_NOT_READY@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movl	-16(%rbp), %edx
	movl	-12(%rbp), %eax
	cmpq	%rsi, %rcx
	jne	LBB0_12
## %bb.10:
	cmpl	$4, %edx
	jne	LBB0_12
## %bb.11:
	cmpl	$4, %eax
	je	LBB0_4
LBB0_12:
	cmpq	%rsi, %rcx
	jne	LBB0_16
## %bb.13:
	cmpl	$58, %edx
	jne	LBB0_8
## %bb.14:
	cmpl	$1, %eax
	jne	LBB0_8
LBB0_15:
	movq	_CDS_NO_DISC@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_18
LBB0_6:
	cmpq	$0, -32(%rbp)
	je	LBB0_7
LBB0_4:
	movq	_CDS_DISC_OK@GOTPCREL(%rip), %rax
LBB0_17:
	movl	(%rax), %eax
LBB0_18:
	addq	$40, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_16:
	movq	_CDS_DRIVE_NOT_READY@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_7:
	cmpq	$0, -40(%rbp)
	je	LBB0_15
LBB0_8:
	movq	_CDS_TRAY_OPEN@GOTPCREL(%rip), %rax
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.comm	_CDSL_CURRENT,4,2               ## @CDSL_CURRENT
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_UNIT_ATTENTION,8,3             ## @UNIT_ATTENTION
	.comm	_CDS_DISC_OK,4,2                ## @CDS_DISC_OK
	.comm	_CDS_TRAY_OPEN,4,2              ## @CDS_TRAY_OPEN
	.comm	_CDS_NO_DISC,4,2                ## @CDS_NO_DISC
	.comm	_NOT_READY,8,3                  ## @NOT_READY
	.comm	_CDS_DRIVE_NOT_READY,4,2        ## @CDS_DRIVE_NOT_READY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ide_cdrom_drive_status         ; -- Begin function ide_cdrom_drive_status
	.p2align	2
_ide_cdrom_drive_status:                ; @ide_cdrom_drive_status
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x8, _CDSL_CURRENT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CDSL_CURRENT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w1
	b.ne	LBB0_9
; %bb.1:
	mov	x19, x0
	ldr	x0, [x0]
	mov	x1, sp
	bl	_cdrom_check_status
	cbz	w0, LBB0_11
; %bb.2:
	ldr	x8, [sp]
Lloh3:
	adrp	x9, _UNIT_ATTENTION@GOTPAGE
Lloh4:
	ldr	x9, [x9, _UNIT_ATTENTION@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_11
; %bb.3:
	add	x1, sp, #16
	mov	x0, x19
	bl	_cdrom_get_media_event
	cbz	w0, LBB0_10
; %bb.4:
	ldr	x10, [sp]
Lloh6:
	adrp	x8, _NOT_READY@GOTPAGE
Lloh7:
	ldr	x8, [x8, _NOT_READY@GOTPAGEOFF]
Lloh8:
	ldr	x11, [x8]
	ldp	w9, w8, [sp, #8]
	cmp	x10, x11
	ccmp	w9, #4, #0, eq
	ccmp	w8, #4, #0, eq
	b.eq	LBB0_11
; %bb.5:
	cmp	x10, x11
	b.ne	LBB0_14
; %bb.6:
	cmp	w9, #58
	b.ne	LBB0_16
; %bb.7:
	cmp	w8, #1
	b.ne	LBB0_16
LBB0_8:
Lloh9:
	adrp	x8, _CDS_NO_DISC@GOTPAGE
Lloh10:
	ldr	x8, [x8, _CDS_NO_DISC@GOTPAGEOFF]
	b	LBB0_12
LBB0_9:
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_13
LBB0_10:
	ldr	x8, [sp, #24]
	cbz	x8, LBB0_15
LBB0_11:
Lloh14:
	adrp	x8, _CDS_DISC_OK@GOTPAGE
Lloh15:
	ldr	x8, [x8, _CDS_DISC_OK@GOTPAGEOFF]
LBB0_12:
	ldr	w0, [x8]
LBB0_13:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_14:
Lloh16:
	adrp	x8, _CDS_DRIVE_NOT_READY@GOTPAGE
Lloh17:
	ldr	x8, [x8, _CDS_DRIVE_NOT_READY@GOTPAGEOFF]
	b	LBB0_12
LBB0_15:
	ldr	x8, [sp, #16]
	cbz	x8, LBB0_8
LBB0_16:
Lloh18:
	adrp	x8, _CDS_TRAY_OPEN@GOTPAGE
Lloh19:
	ldr	x8, [x8, _CDS_TRAY_OPEN@GOTPAGEOFF]
	b	LBB0_12
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_CDSL_CURRENT,4,2               ; @CDSL_CURRENT
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_UNIT_ATTENTION,8,3             ; @UNIT_ATTENTION
	.comm	_CDS_DISC_OK,4,2                ; @CDS_DISC_OK
	.comm	_CDS_TRAY_OPEN,4,2              ; @CDS_TRAY_OPEN
	.comm	_CDS_NO_DISC,4,2                ; @CDS_NO_DISC
	.comm	_NOT_READY,8,3                  ; @NOT_READY
	.comm	_CDS_DRIVE_NOT_READY,4,2        ; @CDS_DRIVE_NOT_READY
.subsections_via_symbols
