	.file	"extr_libata-sff.c_ata_dev_select.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"ata_dev_select: ENTER, device %u, wait %u\n"
	.text
	.p2align 4
	.type	ata_dev_select, @function
ata_dev_select:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	r13d, ecx
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12d, esi
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	ebx, edx
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	call	ata_msg_probe@PLT
	test	rax, rax
	jne	.L13
.L2:
	test	ebx, ebx
	jne	.L14
	mov	rax, QWORD PTR 8[rbp]
	mov	esi, r12d
	mov	rdi, rbp
	mov	rax, QWORD PTR [rax]
	add	rsp, 8
	.cfi_remember_state
	.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
	jmp	rax
	.p2align 4,,10
	.p2align 3
.L14:
	.cfi_restore_state
	mov	rdi, rbp
	call	ata_wait_idle@PLT
	mov	rax, QWORD PTR 8[rbp]
	mov	esi, r12d
	mov	rdi, rbp
	call	[QWORD PTR [rax]]
	test	r13d, r13d
	je	.L4
	mov	rax, QWORD PTR 0[rbp]
	mov	rbx, QWORD PTR ATA_DEV_ATAPI[rip]
	cmp	QWORD PTR [rax+r12*8], rbx
	je	.L15
.L4:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	rdi, rbp
	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
	jmp	ata_wait_idle@PLT
	.p2align 4,,10
	.p2align 3
.L13:
	.cfi_restore_state
	mov	ecx, ebx
	mov	edx, r12d
	lea	rsi, .LC0[rip]
	mov	rdi, rbp
	call	ata_port_info@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L15:
	mov	esi, 150
	mov	rdi, rbp
	call	ata_msleep@PLT
	jmp	.L4
	.cfi_endproc
.LFE0:
	.size	ata_dev_select, .-ata_dev_select
	.comm	ATA_DEV_ATAPI,8,8
	.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-sff.c_ata_dev_select.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"ata_dev_select: ENTER, device %u, wait %u\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ata_dev_select, %function
ata_dev_select:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r7, r1
	mov	r5, r2
	mov	r6, r3
	mov	r4, r0
	bl	ata_msg_probe
	cmp	r0, #0
	bne	.L13
.L2:
	cmp	r5, #0
	bne	.L14
	ldr	r3, [r4, #4]
	mov	r1, r7
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, lr}
	ldr	r3, [r3]
	bx	r3
.L14:
	mov	r0, r4
	bl	ata_wait_idle
	ldr	r3, [r4, #4]
	mov	r1, r7
	mov	r0, r4
	ldr	r3, [r3]
	blx	r3
	cmp	r6, #0
	beq	.L4
	ldr	r2, [r4]
	ldr	r3, .L16
	ldr	r2, [r2, r7, lsl #2]
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L15
.L4:
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, lr}
	b	ata_wait_idle
.L13:
	mov	r3, r5
	mov	r2, r7
	mov	r0, r4
	ldr	r1, .L16+4
	bl	ata_port_info
	b	.L2
.L15:
	mov	r1, #150
	mov	r0, r4
	bl	ata_msleep
	b	.L4
.L17:
	.align	2
.L16:
	.word	ATA_DEV_ATAPI
	.word	.LC0
	.size	ata_dev_select, .-ata_dev_select
	.comm	ATA_DEV_ATAPI,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
