	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pcd_drive_status
_pcd_drive_status:                      ## @pcd_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
	subq	$32, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -24(%rbp)
	movl	l___const.pcd_drive_status.rc_cmd+8(%rip), %eax
	movl	%eax, -32(%rbp)
	movq	l___const.pcd_drive_status.rc_cmd(%rip), %rax
	movq	%rax, -40(%rbp)
	movq	(%rdi), %rbx
	movq	_PCD_READY_TMO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_pcd_ready_wait
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_CDS_DRIVE_NOT_READY@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_2:
	movq	_pcd_scratch@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	leaq	L_.str(%rip), %rdi
	callq	_DBMSG
	leaq	-40(%rbp), %rsi
	movq	%rbx, %rdi
	movl	$8, %edx
	movl	%r14d, %ecx
	movl	%eax, %r8d
	callq	_pcd_atapi
	testq	%rax, %rax
	jne	LBB0_3
## %bb.4:
	movq	_CDS_DISC_OK@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_3:
	movq	_CDS_NO_DISC@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %eax
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-24(%rbp), %rcx
	jne	LBB0_7
## %bb.6:
	addq	$32, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_7:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
l___const.pcd_drive_status.rc_cmd:      ## @__const.pcd_drive_status.rc_cmd
	.byte	37                              ## 0x25
	.space	11

	.comm	_PCD_READY_TMO,4,2              ## @PCD_READY_TMO
	.comm	_CDS_DRIVE_NOT_READY,4,2        ## @CDS_DRIVE_NOT_READY
	.comm	_pcd_scratch,4,2                ## @pcd_scratch
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"check media"

	.comm	_CDS_NO_DISC,4,2                ## @CDS_NO_DISC
	.comm	_CDS_DISC_OK,4,2                ## @CDS_DISC_OK
	.no_dead_strip	_pcd_drive_status
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pcd_drive_status
_pcd_drive_status:                      ; @pcd_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, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
Lloh3:
	adrp	x8, l___const.pcd_drive_status.rc_cmd@PAGE
Lloh4:
	add	x8, x8, l___const.pcd_drive_status.rc_cmd@PAGEOFF
	ldr	x9, [x8]
	str	x9, [sp, #8]
	ldr	w8, [x8, #8]
	str	w8, [sp, #16]
	ldr	x19, [x0]
Lloh5:
	adrp	x8, _PCD_READY_TMO@GOTPAGE
Lloh6:
	ldr	x8, [x8, _PCD_READY_TMO@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_pcd_ready_wait
	cbz	x0, LBB0_2
; %bb.1:
Lloh8:
	adrp	x8, _CDS_DRIVE_NOT_READY@GOTPAGE
Lloh9:
	ldr	x8, [x8, _CDS_DRIVE_NOT_READY@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:
Lloh10:
	adrp	x8, _pcd_scratch@GOTPAGE
Lloh11:
	ldr	x8, [x8, _pcd_scratch@GOTPAGEOFF]
Lloh12:
	ldr	w20, [x8]
Lloh13:
	adrp	x0, l_.str@PAGE
Lloh14:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DBMSG
	mov	x4, x0
	add	x1, sp, #8
	mov	x0, x19
	mov	w2, #8
	mov	x3, x20
	bl	_pcd_atapi
Lloh15:
	adrp	x8, _CDS_NO_DISC@GOTPAGE
Lloh16:
	ldr	x8, [x8, _CDS_NO_DISC@GOTPAGEOFF]
Lloh17:
	adrp	x9, _CDS_DISC_OK@GOTPAGE
Lloh18:
	ldr	x9, [x9, _CDS_DISC_OK@GOTPAGEOFF]
	cmp	x0, #0
	csel	x8, x9, x8, eq
LBB0_3:
	ldr	w0, [x8]
	ldr	x8, [sp, #24]
Lloh19:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh20:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_5
; %bb.4:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_5:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
l___const.pcd_drive_status.rc_cmd:      ; @__const.pcd_drive_status.rc_cmd
	.byte	37                              ; 0x25
	.space	11

	.comm	_PCD_READY_TMO,4,2              ; @PCD_READY_TMO
	.comm	_CDS_DRIVE_NOT_READY,4,2        ; @CDS_DRIVE_NOT_READY
	.comm	_pcd_scratch,4,2                ; @pcd_scratch
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"check media"

	.comm	_CDS_NO_DISC,4,2                ; @CDS_NO_DISC
	.comm	_CDS_DISC_OK,4,2                ; @CDS_DISC_OK
	.no_dead_strip	_pcd_drive_status
.subsections_via_symbols
