	.file	"extr_libata-eh.c_ata_port_wait_eh.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	ata_port_wait_eh
	.type	ata_port_wait_eh, @function
ata_port_wait_eh:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	lea	r12, wait[rip]
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rdi
	lea	r13, 12[rbx]
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	edi, DWORD PTR wait[rip]
	call	DEFINE_WAIT@PLT
	.p2align 4,,10
	.p2align 3
.L2:
	mov	edi, DWORD PTR 8[rbx]
	xor	ebp, ebp
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L3:
	mov	edx, DWORD PTR TASK_UNINTERRUPTIBLE[rip]
	mov	rsi, r12
	mov	rdi, r13
	xor	ebp, ebp
	call	prepare_to_wait@PLT
	mov	edi, DWORD PTR 8[rbx]
	mov	rsi, rbp
	call	spin_unlock_irqrestore@PLT
	xor	eax, eax
	call	schedule@PLT
	mov	edi, DWORD PTR 8[rbx]
.L12:
	mov	rsi, rbp
	call	spin_lock_irqsave@PLT
	mov	eax, DWORD PTR ATA_PFLAG_EH_PENDING[rip]
	or	eax, DWORD PTR ATA_PFLAG_EH_IN_PROGRESS[rip]
	test	DWORD PTR [rbx], eax
	jne	.L3
	mov	rsi, r12
	mov	rdi, r13
	xor	ebp, ebp
	call	finish_wait@PLT
	mov	edi, DWORD PTR 8[rbx]
	mov	rsi, rbp
	call	spin_unlock_irqrestore@PLT
	mov	edi, DWORD PTR 4[rbx]
	call	scsi_host_in_recovery@PLT
	test	rax, rax
	je	.L14
	mov	esi, 10
	mov	rdi, rbx
	call	ata_msleep@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L14:
	add	rsp, 8
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	ata_port_wait_eh, .-ata_port_wait_eh
	.comm	wait,4,4
	.comm	TASK_UNINTERRUPTIBLE,4,4
	.comm	ATA_PFLAG_EH_PENDING,4,4
	.comm	ATA_PFLAG_EH_IN_PROGRESS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_libata-eh.c_ata_port_wait_eh.c"
	.text
	.align	2
	.global	ata_port_wait_eh
	.syntax unified
	.arm
	.fpu softvfp
	.type	ata_port_wait_eh, %function
ata_port_wait_eh:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r5, .L15
	mov	r4, r0
	ldr	r0, [r5]
	bl	DEFINE_WAIT
	ldr	r8, .L15+4
	ldr	r7, .L15+8
	ldr	r9, .L15+12
	add	r6, r4, #12
.L2:
	mov	r1, #0
	b	.L13
.L3:
	mov	r10, #0
	ldr	r2, [r9]
	mov	r1, r5
	mov	r0, r6
	bl	prepare_to_wait
	mov	r1, r10
	ldr	r0, [r4, #8]
	bl	spin_unlock_irqrestore
	bl	schedule
	mov	r1, r10
.L13:
	ldr	r0, [r4, #8]
	bl	spin_lock_irqsave
	ldr	r3, [r8]
	ldr	r1, [r7]
	ldr	r2, [r4]
	orr	r3, r3, r1
	tst	r3, r2
	bne	.L3
	mov	r1, r5
	mov	r0, r6
	bl	finish_wait
	mov	r1, #0
	ldr	r0, [r4, #8]
	bl	spin_unlock_irqrestore
	ldr	r0, [r4, #4]
	bl	scsi_host_in_recovery
	cmp	r0, #0
	popeq	{r4, r5, r6, r7, r8, r9, r10, pc}
	mov	r1, #10
	mov	r0, r4
	bl	ata_msleep
	b	.L2
.L16:
	.align	2
.L15:
	.word	wait
	.word	ATA_PFLAG_EH_PENDING
	.word	ATA_PFLAG_EH_IN_PROGRESS
	.word	TASK_UNINTERRUPTIBLE
	.size	ata_port_wait_eh, .-ata_port_wait_eh
	.comm	wait,4,4
	.comm	TASK_UNINTERRUPTIBLE,4,4
	.comm	ATA_PFLAG_EH_PENDING,4,4
	.comm	ATA_PFLAG_EH_IN_PROGRESS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
