	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wait_no_error
_wait_no_error:                         ## @wait_no_error
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_sata_regs_base@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%edi, %rcx
	movq	(%rax,%rcx,8), %rax
	movq	_SATA_INT_STATUS_OFF@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	movl	(%rax,%rcx,4), %eax
	movq	_SATA_INT_STATUS_ERROR_BIT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	xorl	%r14d, %r14d
	btl	%ecx, %eax
	jae	LBB0_2
## %bb.1:
	leaq	L_str.2(%rip), %r15
	jmp	LBB0_7
LBB0_2:
	movl	%edi, %r12d
	movq	_MAX_NO_ERROR_LOOPS@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_ATA_PORT_COMMAND@GOTPCREL(%rip), %r13
	movq	_ATA_STATUS_ERR_BIT@GOTPCREL(%rip), %r14
	leaq	L_str(%rip), %r15
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r13), %esi
	movl	%r12d, %edi
	callq	_ide_inb
	movl	(%r14), %ecx
	btl	%ecx, %eax
	jae	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	$10, %edi
	callq	_udelay
	decl	%ebx
	jne	LBB0_3
## %bb.5:
	xorl	%r14d, %r14d
	jmp	LBB0_7
LBB0_6:
	movl	$1, %r14d
	testl	%ebx, %ebx
	jne	LBB0_8
LBB0_7:
	movq	%r15, %rdi
	callq	_puts
LBB0_8:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_sata_regs_base,8,3             ## @sata_regs_base
	.comm	_SATA_INT_STATUS_OFF,4,2        ## @SATA_INT_STATUS_OFF
	.comm	_SATA_INT_STATUS_ERROR_BIT,4,2  ## @SATA_INT_STATUS_ERROR_BIT
	.comm	_MAX_NO_ERROR_LOOPS,4,2         ## @MAX_NO_ERROR_LOOPS
	.comm	_ATA_PORT_COMMAND,4,2           ## @ATA_PORT_COMMAND
	.comm	_ATA_STATUS_ERR_BIT,4,2         ## @ATA_STATUS_ERR_BIT
	.section	__TEXT,__cstring,cstring_literals
L_str:                                  ## @str
	.asciz	"wait_no_error() Timed out of wait for SATA no-error condition"

L_str.2:                                ## @str.2
	.asciz	"wait_no_error() SATA core flagged error"

	.no_dead_strip	_wait_no_error
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wait_no_error
_wait_no_error:                         ; @wait_no_error
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
Lloh0:
	adrp	x8, _sata_regs_base@GOTPAGE
Lloh1:
	ldr	x8, [x8, _sata_regs_base@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	x8, [x8, w0, sxtw #3]
Lloh3:
	adrp	x9, _SATA_INT_STATUS_OFF@GOTPAGE
Lloh4:
	ldr	x9, [x9, _SATA_INT_STATUS_OFF@GOTPAGEOFF]
Lloh5:
	ldrsw	x9, [x9]
	ldr	w8, [x8, x9, lsl #2]
Lloh6:
	adrp	x9, _SATA_INT_STATUS_ERROR_BIT@GOTPAGE
Lloh7:
	ldr	x9, [x9, _SATA_INT_STATUS_ERROR_BIT@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	lsr	w8, w8, w9
	tbz	w8, #0, LBB0_2
; %bb.1:
	mov	w19, #0
Lloh9:
	adrp	x20, l_str.2@PAGE
Lloh10:
	add	x20, x20, l_str.2@PAGEOFF
	b	LBB0_8
LBB0_2:
	mov	x19, x0
Lloh11:
	adrp	x8, _MAX_NO_ERROR_LOOPS@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MAX_NO_ERROR_LOOPS@GOTPAGEOFF]
Lloh13:
	ldr	w21, [x8]
Lloh14:
	adrp	x22, _ATA_PORT_COMMAND@GOTPAGE
Lloh15:
	ldr	x22, [x22, _ATA_PORT_COMMAND@GOTPAGEOFF]
Lloh16:
	adrp	x23, _ATA_STATUS_ERR_BIT@GOTPAGE
Lloh17:
	ldr	x23, [x23, _ATA_STATUS_ERR_BIT@GOTPAGEOFF]
Lloh18:
	adrp	x20, l_str@PAGE
Lloh19:
	add	x20, x20, l_str@PAGEOFF
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x22]
	mov	x0, x19
	bl	_ide_inb
	ldr	w8, [x23]
	lsr	w8, w0, w8
	tbz	w8, #0, LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w0, #10
	bl	_udelay
	subs	w21, w21, #1
	b.ne	LBB0_3
; %bb.5:
	mov	w19, #0
	b	LBB0_8
LBB0_6:
	mov	w19, #1
	cbnz	w21, LBB0_9
; %bb.7:
Lloh20:
	adrp	x20, l_str@PAGE
Lloh21:
	add	x20, x20, l_str@PAGEOFF
LBB0_8:
	mov	x0, x20
	bl	_puts
LBB0_9:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_sata_regs_base,8,3             ; @sata_regs_base
	.comm	_SATA_INT_STATUS_OFF,4,2        ; @SATA_INT_STATUS_OFF
	.comm	_SATA_INT_STATUS_ERROR_BIT,4,2  ; @SATA_INT_STATUS_ERROR_BIT
	.comm	_MAX_NO_ERROR_LOOPS,4,2         ; @MAX_NO_ERROR_LOOPS
	.comm	_ATA_PORT_COMMAND,4,2           ; @ATA_PORT_COMMAND
	.comm	_ATA_STATUS_ERR_BIT,4,2         ; @ATA_STATUS_ERR_BIT
	.section	__TEXT,__cstring,cstring_literals
l_str:                                  ; @str
	.asciz	"wait_no_error() Timed out of wait for SATA no-error condition"

l_str.2:                                ; @str.2
	.asciz	"wait_no_error() SATA core flagged error"

	.no_dead_strip	_wait_no_error
.subsections_via_symbols
