	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ata_port_wait_eh               ## -- Begin function ata_port_wait_eh
	.p2align	4, 0x90
_ata_port_wait_eh:                      ## @ata_port_wait_eh
	.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	%rdi, %rbx
	movq	_wait@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_DEFINE_WAIT
	leaq	12(%rbx), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	_ATA_PFLAG_EH_PENDING@GOTPCREL(%rip), %r14
	movq	_ATA_PFLAG_EH_IN_PROGRESS@GOTPCREL(%rip), %r15
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_2 Depth 2
	movl	8(%rbx), %edi
	callq	_spin_lock_irqsave
	movl	(%r15), %eax
	orl	(%r14), %eax
	testl	%eax, (%rbx)
	movq	%r14, %rcx
	movq	_wait@GOTPCREL(%rip), %rsi
	movq	_TASK_UNINTERRUPTIBLE@GOTPCREL(%rip), %r12
	je	LBB0_4
	.p2align	4, 0x90
LBB0_2:                                 ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r12), %edx
	movq	%r13, %rdi
	movq	%rsi, %r12
	movq	%rcx, %r14
	callq	_prepare_to_wait
	movl	8(%rbx), %edi
	callq	_spin_unlock_irqrestore
	xorl	%eax, %eax
	callq	_schedule
	movl	8(%rbx), %edi
	callq	_spin_lock_irqsave
	movq	%r14, %rcx
	movq	%r12, %rsi
	movl	(%r15), %eax
	orl	(%r14), %eax
	testl	%eax, (%rbx)
	movq	_TASK_UNINTERRUPTIBLE@GOTPCREL(%rip), %r12
	jne	LBB0_2
LBB0_4:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	%rcx, %r14
	movq	%r13, %rdi
	callq	_finish_wait
	movl	8(%rbx), %edi
	callq	_spin_unlock_irqrestore
	movl	4(%rbx), %edi
	callq	_scsi_host_in_recovery
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%rbx, %rdi
	movl	$10, %esi
	callq	_ata_msleep
	jmp	LBB0_1
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_wait,4,2                       ## @wait
	.comm	_ATA_PFLAG_EH_PENDING,4,2       ## @ATA_PFLAG_EH_PENDING
	.comm	_ATA_PFLAG_EH_IN_PROGRESS,4,2   ## @ATA_PFLAG_EH_IN_PROGRESS
	.comm	_TASK_UNINTERRUPTIBLE,4,2       ## @TASK_UNINTERRUPTIBLE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ata_port_wait_eh               ; -- Begin function ata_port_wait_eh
	.p2align	2
_ata_port_wait_eh:                      ; @ata_port_wait_eh
	.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
	mov	x19, x0
Lloh0:
	adrp	x20, _wait@GOTPAGE
Lloh1:
	ldr	x20, [x20, _wait@GOTPAGEOFF]
	ldr	w0, [x20]
	bl	_DEFINE_WAIT
	add	x21, x19, #12
Lloh2:
	adrp	x22, _ATA_PFLAG_EH_PENDING@GOTPAGE
Lloh3:
	ldr	x22, [x22, _ATA_PFLAG_EH_PENDING@GOTPAGEOFF]
Lloh4:
	adrp	x23, _ATA_PFLAG_EH_IN_PROGRESS@GOTPAGE
Lloh5:
	ldr	x23, [x23, _ATA_PFLAG_EH_IN_PROGRESS@GOTPAGEOFF]
Lloh6:
	adrp	x24, _TASK_UNINTERRUPTIBLE@GOTPAGE
Lloh7:
	ldr	x24, [x24, _TASK_UNINTERRUPTIBLE@GOTPAGEOFF]
	b	LBB0_2
LBB0_1:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	w2, [x24]
	mov	x0, x21
	mov	x1, x20
	bl	_prepare_to_wait
	ldr	w0, [x19, #8]
	bl	_spin_unlock_irqrestore
	bl	_schedule
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x19, #8]
	bl	_spin_lock_irqsave
	ldr	w8, [x19]
	ldr	w9, [x22]
	ldr	w10, [x23]
	orr	w9, w10, w9
	tst	w9, w8
	b.ne	LBB0_1
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x21
	mov	x1, x20
	bl	_finish_wait
	ldr	w0, [x19, #8]
	bl	_spin_unlock_irqrestore
	ldr	w0, [x19, #4]
	bl	_scsi_host_in_recovery
	cbz	x0, LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x19
	mov	w1, #10
	bl	_ata_msleep
	b	LBB0_2
LBB0_5:
	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 AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_wait,4,2                       ; @wait
	.comm	_ATA_PFLAG_EH_PENDING,4,2       ; @ATA_PFLAG_EH_PENDING
	.comm	_ATA_PFLAG_EH_IN_PROGRESS,4,2   ; @ATA_PFLAG_EH_IN_PROGRESS
	.comm	_TASK_UNINTERRUPTIBLE,4,2       ; @TASK_UNINTERRUPTIBLE
.subsections_via_symbols
