	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pt_ready_wait
_pt_ready_wait:                         ## @pt_ready_wait
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_ATAPI_TEST_READY@GOTPCREL(%rip), %rax
	movb	(%rax), %al
	movb	%al, -60(%rbp)
	movq	$0, -59(%rbp)
	movl	$0, -52(%rbp)
	testl	%esi, %esi
	jle	LBB0_6
## %bb.1:
	movl	%esi, %r13d
	movq	%rdi, %r14
	leaq	L_.str(%rip), %r15
	leaq	-60(%rbp), %r12
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	_HZ@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_pt_sleep
	decl	%r13d
	je	LBB0_6
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	$0, (%r14)
	movq	%r15, %rdi
	callq	_DBMSG
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	movq	%r12, %rsi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	movl	%eax, %r8d
	callq	_pt_atapi
	movl	(%r14), %eax
	testl	%eax, %eax
	je	LBB0_7
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movzwl	%ax, %ecx
	cmpl	$1026, %ecx                     ## imm = 0x402
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movzbl	%al, %ecx
	movl	%eax, %ebx
	cmpl	$6, %ecx
	je	LBB0_5
	jmp	LBB0_7
LBB0_6:
	movl	$32, %ebx
LBB0_7:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_9
## %bb.8:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_ATAPI_TEST_READY,1,0           ## @ATAPI_TEST_READY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"test unit ready"

	.comm	_HZ,4,2                         ## @HZ
	.no_dead_strip	_pt_ready_wait
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pt_ready_wait
_pt_ready_wait:                         ; @pt_ready_wait
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _ATAPI_TEST_READY@GOTPAGE
Lloh4:
	ldr	x9, [x9, _ATAPI_TEST_READY@GOTPAGEOFF]
	str	x8, [sp, #24]
	ldrb	w8, [x9]
	strb	w8, [sp, #12]
	stur	xzr, [sp, #13]
	str	wzr, [sp, #20]
	cmp	w1, #1
	b.lt	LBB0_5
; %bb.1:
	mov	x19, x1
	mov	x20, x0
Lloh5:
	adrp	x21, l_.str@PAGE
Lloh6:
	add	x21, x21, l_.str@PAGEOFF
Lloh7:
	adrp	x22, _HZ@GOTPAGE
Lloh8:
	ldr	x22, [x22, _HZ@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	str	wzr, [x20]
	mov	x0, x21
	bl	_DBMSG
	mov	x4, x0
	add	x1, sp, #12
	mov	x0, x20
	mov	w2, #0
	mov	x3, #0
	bl	_pt_atapi
	ldr	w0, [x20]
	cbz	w0, LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	and	w8, w0, #0xffff
	and	w9, w0, #0xff
	cmp	w8, #1026
	ccmp	w9, #6, #4, ne
	b.ne	LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [x22]
	bl	_pt_sleep
	subs	w19, w19, #1
	b.ne	LBB0_2
LBB0_5:
	mov	w0, #32
LBB0_6:
	ldr	x8, [sp, #24]
Lloh9:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh10:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_8
; %bb.7:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_8:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_ATAPI_TEST_READY,1,0           ; @ATAPI_TEST_READY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"test unit ready"

	.comm	_HZ,4,2                         ; @HZ
	.no_dead_strip	_pt_ready_wait
.subsections_via_symbols
