	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pd_media_check
_pd_media_check:                        ## @pd_media_check
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_STAT_READY@GOTPCREL(%rip), %r15
	movl	(%r15), %ebx
	leaq	L_.str(%rip), %rdi
	callq	_DBMSG
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_pd_wait_for
	movq	_STAT_ERR@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_1
## %bb.2:
	movl	$1, (%r14)
	jmp	LBB0_3
LBB0_1:
	movq	_IDE_READ_VRFY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rsp)
	movq	%r14, %rdi
	movl	$1, %esi
	movl	$1, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_pd_send_command
	movl	(%r15), %ebx
	leaq	L_.str.1(%rip), %rdi
	callq	_DBMSG
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_pd_wait_for
LBB0_3:
	movq	_ERR_MC@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_5
## %bb.4:
	movl	$1, (%r14)
	movq	_IDE_ACKCHANGE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rsp)
	movq	%r14, %rdi
	movl	$1, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_pd_send_command
	movl	(%r15), %ebx
	leaq	L_.str.2(%rip), %rdi
	callq	_DBMSG
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_pd_wait_for
	movq	_IDE_READ_VRFY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rsp)
	movq	%r14, %rdi
	movl	$1, %esi
	movl	$1, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_pd_send_command
	movl	(%r15), %ebx
	leaq	L_.str.3(%rip), %rdi
	callq	_DBMSG
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_pd_wait_for
LBB0_5:
	movq	_Ok@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_STAT_READY,4,2                 ## @STAT_READY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"before media_check"

	.comm	_STAT_ERR,4,2                   ## @STAT_ERR
	.comm	_IDE_READ_VRFY,4,2              ## @IDE_READ_VRFY
L_.str.1:                               ## @.str.1
	.asciz	"RDY after READ_VRFY"

	.comm	_ERR_MC,4,2                     ## @ERR_MC
	.comm	_IDE_ACKCHANGE,4,2              ## @IDE_ACKCHANGE
L_.str.2:                               ## @.str.2
	.asciz	"RDY after ACKCHANGE"

L_.str.3:                               ## @.str.3
	.asciz	"RDY after VRFY"

	.comm	_Ok,4,2                         ## @Ok
	.no_dead_strip	_pd_media_check
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pd_media_check
_pd_media_check:                        ; @pd_media_check
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x0
Lloh0:
	adrp	x21, _STAT_READY@GOTPAGE
Lloh1:
	ldr	x21, [x21, _STAT_READY@GOTPAGEOFF]
	ldr	w20, [x21]
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DBMSG
	mov	x2, x0
	mov	x0, x19
	mov	x1, x20
	bl	_pd_wait_for
Lloh4:
	adrp	x8, _STAT_ERR@GOTPAGE
Lloh5:
	ldr	x8, [x8, _STAT_ERR@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
Lloh7:
	adrp	x22, _IDE_READ_VRFY@GOTPAGE
Lloh8:
	ldr	x22, [x22, _IDE_READ_VRFY@GOTPAGEOFF]
	tst	w8, w0
	b.eq	LBB0_2
; %bb.1:
	mov	w8, #1
	str	w8, [x19]
	b	LBB0_3
LBB0_2:
	ldr	w6, [x22]
	mov	x0, x19
	mov	w1, #1
	mov	w2, #1
	mov	w3, #0
	mov	w4, #0
	mov	w5, #0
	bl	_pd_send_command
	ldr	w20, [x21]
Lloh9:
	adrp	x0, l_.str.1@PAGE
Lloh10:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DBMSG
	mov	x2, x0
	mov	x0, x19
	mov	x1, x20
	bl	_pd_wait_for
LBB0_3:
Lloh11:
	adrp	x8, _ERR_MC@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ERR_MC@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_5
; %bb.4:
	mov	w8, #1
	str	w8, [x19]
Lloh14:
	adrp	x8, _IDE_ACKCHANGE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _IDE_ACKCHANGE@GOTPAGEOFF]
Lloh16:
	ldr	w6, [x8]
	mov	x0, x19
	mov	w1, #1
	mov	w2, #0
	mov	w3, #0
	mov	w4, #0
	mov	w5, #0
	bl	_pd_send_command
	ldr	w20, [x21]
Lloh17:
	adrp	x0, l_.str.2@PAGE
Lloh18:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_DBMSG
	mov	x2, x0
	mov	x0, x19
	mov	x1, x20
	bl	_pd_wait_for
	ldr	w6, [x22]
	mov	x0, x19
	mov	w1, #1
	mov	w2, #1
	mov	w3, #0
	mov	w4, #0
	mov	w5, #0
	bl	_pd_send_command
	ldr	w20, [x21]
Lloh19:
	adrp	x0, l_.str.3@PAGE
Lloh20:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_DBMSG
	mov	x2, x0
	mov	x0, x19
	mov	x1, x20
	bl	_pd_wait_for
LBB0_5:
Lloh21:
	adrp	x8, _Ok@GOTPAGE
Lloh22:
	ldr	x8, [x8, _Ok@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_STAT_READY,4,2                 ; @STAT_READY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"before media_check"

	.comm	_STAT_ERR,4,2                   ; @STAT_ERR
	.comm	_IDE_READ_VRFY,4,2              ; @IDE_READ_VRFY
l_.str.1:                               ; @.str.1
	.asciz	"RDY after READ_VRFY"

	.comm	_ERR_MC,4,2                     ; @ERR_MC
	.comm	_IDE_ACKCHANGE,4,2              ; @IDE_ACKCHANGE
l_.str.2:                               ; @.str.2
	.asciz	"RDY after ACKCHANGE"

l_.str.3:                               ; @.str.3
	.asciz	"RDY after VRFY"

	.comm	_Ok,4,2                         ; @Ok
	.no_dead_strip	_pd_media_check
.subsections_via_symbols
