	.file	"extr_libata-core.c_ata_dev_config_ncq.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	""
.LC1:
	.string	", AA"
.LC2:
	.string	"NCQ (not used)"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC3:
	.string	"failed to enable AA(error_mask=0x%x)\n"
	.section	.rodata.str1.1
.LC4:
	.string	"NCQ (depth %d)%s"
.LC5:
	.string	"NCQ (depth %d/%d)%s"
	.text
	.p2align 4
	.type	ata_dev_config_ncq, @function
ata_dev_config_ncq:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14, rdx
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rdi
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	rax, QWORD PTR 16[rdi]
	mov	edi, DWORD PTR 4[rdi]
	mov	r15, QWORD PTR [rax]
	call	ata_id_queue_depth@PLT
	mov	edi, DWORD PTR 4[rbx]
	mov	r13d, eax
	call	ata_id_has_ncq@PLT
	test	eax, eax
	je	.L22
	mov	edx, DWORD PTR [rbx]
	mov	r12d, edx
	and	r12d, DWORD PTR ATA_HORKAGE_NONCQ[rip]
	jne	.L23
	mov	eax, DWORD PTR [r15]
	and	eax, DWORD PTR ATA_FLAG_NCQ[rip]
	mov	r10d, eax
	jne	.L24
	test	DWORD PTR ATA_HORKAGE_BROKEN_FPDMA_AA[rip], edx
	je	.L25
.L6:
	lea	r8, .LC0[rip]
.L7:
	cmp	r10d, r13d
	jge	.L26
	mov	r9, r8
	mov	ecx, r10d
	mov	r8d, r13d
	mov	rsi, r14
	lea	rdx, .LC5[rip]
	mov	rdi, rbp
	xor	eax, eax
	call	snprintf@PLT
.L1:
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L25:
	.cfi_restore_state
	mov	eax, DWORD PTR [r15]
	test	DWORD PTR ATA_FLAG_FPDMA_AA[rip], eax
	je	.L6
	mov	edi, DWORD PTR 4[rbx]
	mov	DWORD PTR 12[rsp], r10d
	call	ata_id_has_fpdma_aa@PLT
	mov	r10d, DWORD PTR 12[rsp]
	test	rax, rax
	je	.L6
	mov	edx, DWORD PTR SATA_FPDMA_AA[rip]
	mov	esi, DWORD PTR SETFEATURES_SATA_ENABLE[rip]
	mov	rdi, rbx
	call	ata_dev_set_feature@PLT
	mov	r10d, DWORD PTR 12[rsp]
	lea	r8, .LC1[rip]
	test	eax, eax
	mov	r15d, eax
	je	.L7
	mov	esi, DWORD PTR KERN_ERR[rip]
	mov	ecx, eax
	lea	rdx, .LC3[rip]
	mov	rdi, rbx
	call	ata_dev_printk@PLT
	cmp	DWORD PTR AC_ERR_DEV[rip], r15d
	mov	r10d, DWORD PTR 12[rsp]
	je	.L6
	mov	r12d, DWORD PTR EIO[rip]
	mov	eax, DWORD PTR ATA_HORKAGE_BROKEN_FPDMA_AA[rip]
	or	DWORD PTR [rbx], eax
	neg	r12d
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L26:
	mov	ecx, r13d
	lea	rdx, .LC4[rip]
	mov	rsi, r14
	mov	rdi, rbp
	xor	eax, eax
	call	snprintf@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L22:
	mov	BYTE PTR 0[rbp], 0
	mov	r12d, eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L24:
	mov	rax, QWORD PTR ATA_MAX_QUEUE[rip]
	lea	rsi, -1[rax]
	mov	rax, QWORD PTR 8[r15]
	mov	edi, DWORD PTR [rax]
	call	min@PLT
	mov	edx, DWORD PTR [rbx]
	mov	r10d, eax
	mov	eax, DWORD PTR ATA_DFLAG_NCQ[rip]
	or	DWORD PTR 8[rbx], eax
	test	DWORD PTR ATA_HORKAGE_BROKEN_FPDMA_AA[rip], edx
	jne	.L6
	jmp	.L25
	.p2align 4,,10
	.p2align 3
.L23:
	lea	rdx, .LC2[rip]
	mov	rsi, r14
	mov	rdi, rbp
	xor	eax, eax
	call	snprintf@PLT
	xor	r12d, r12d
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	ata_dev_config_ncq, .-ata_dev_config_ncq
	.comm	SETFEATURES_SATA_ENABLE,4,4
	.comm	SATA_FPDMA_AA,4,4
	.comm	KERN_ERR,4,4
	.comm	EIO,4,4
	.comm	ATA_MAX_QUEUE,8,8
	.comm	ATA_HORKAGE_NONCQ,4,4
	.comm	ATA_HORKAGE_BROKEN_FPDMA_AA,4,4
	.comm	ATA_FLAG_NCQ,4,4
	.comm	ATA_FLAG_FPDMA_AA,4,4
	.comm	ATA_DFLAG_NCQ,4,4
	.comm	AC_ERR_DEV,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-core.c_ata_dev_config_ncq.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"\000"
	.align	2
.LC1:
	.ascii	", AA\000"
	.align	2
.LC2:
	.ascii	"NCQ (not used)\000"
	.align	2
.LC3:
	.ascii	"failed to enable AA(error_mask=0x%x)\012\000"
	.align	2
.LC4:
	.ascii	"NCQ (depth %d)%s\000"
	.align	2
.LC5:
	.ascii	"NCQ (depth %d/%d)%s\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ata_dev_config_ncq, %function
ata_dev_config_ncq:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r3, [r0, #12]
	mov	r6, r0
	sub	sp, sp, #12
	ldr	r0, [r0, #4]
	mov	r8, r1
	mov	r9, r2
	ldr	fp, [r3]
	bl	ata_id_queue_depth
	mov	r7, r0
	ldr	r0, [r6, #4]
	bl	ata_id_has_ncq
	subs	r4, r0, #0
	strbeq	r4, [r8]
	beq	.L1
	ldr	r2, .L24
	ldr	r3, [r6]
	ldr	r4, [r2]
	ands	r4, r3, r4
	bne	.L21
	ldr	r2, .L24+4
	ldr	r5, [fp]
	ldr	r0, [r2]
	ands	r5, r5, r0
	bne	.L22
	ldr	r10, .L24+8
	ldr	r2, [r10]
	tst	r3, r2
	beq	.L23
.L6:
	ldr	r3, .L24+12
.L7:
	cmp	r5, r7
	blt	.L8
	str	r3, [sp]
	mov	r1, r9
	mov	r3, r7
	mov	r0, r8
	ldr	r2, .L24+16
	bl	snprintf
.L1:
	mov	r0, r4
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L23:
	ldr	r3, .L24+20
	ldr	r2, [fp]
	ldr	r3, [r3]
	tst	r2, r3
	beq	.L6
	ldr	r0, [r6, #4]
	bl	ata_id_has_fpdma_aa
	cmp	r0, #0
	beq	.L6
	ldr	r3, .L24+24
	ldr	r2, .L24+28
	ldr	r1, [r3]
	mov	r0, r6
	ldr	r2, [r2]
	bl	ata_dev_set_feature
	subs	fp, r0, #0
	ldreq	r3, .L24+32
	beq	.L7
	ldr	r2, .L24+36
	mov	r3, fp
	ldr	r1, [r2]
	mov	r0, r6
	ldr	r2, .L24+40
	bl	ata_dev_printk
	ldr	r3, .L24+44
	ldr	r3, [r3]
	cmp	r3, fp
	beq	.L6
	ldr	r1, .L24+48
	ldr	r2, [r10]
	ldr	r3, [r6]
	ldr	r4, [r1]
	orr	r3, r3, r2
	str	r3, [r6]
	rsb	r4, r4, #0
	b	.L1
.L8:
	str	r3, [sp, #4]
	mov	r1, r9
	mov	r3, r5
	mov	r0, r8
	ldr	r2, .L24+52
	str	r7, [sp]
	bl	snprintf
	mov	r0, r4
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L22:
	ldr	r2, .L24+56
	ldr	r3, [fp, #4]
	ldr	r1, [r2]
	ldr	r0, [r3]
	sub	r1, r1, #1
	bl	min
	ldr	r3, .L24+60
	ldr	r2, [r6, #8]
	ldr	r1, [r3]
	ldr	r10, .L24+8
	orr	r2, r2, r1
	ldr	r3, [r6]
	str	r2, [r6, #8]
	ldr	r2, [r10]
	mov	r5, r0
	tst	r3, r2
	bne	.L6
	b	.L23
.L21:
	mov	r4, #0
	mov	r1, r9
	mov	r0, r8
	ldr	r2, .L24+64
	bl	snprintf
	mov	r0, r4
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L25:
	.align	2
.L24:
	.word	ATA_HORKAGE_NONCQ
	.word	ATA_FLAG_NCQ
	.word	ATA_HORKAGE_BROKEN_FPDMA_AA
	.word	.LC0
	.word	.LC4
	.word	ATA_FLAG_FPDMA_AA
	.word	SETFEATURES_SATA_ENABLE
	.word	SATA_FPDMA_AA
	.word	.LC1
	.word	KERN_ERR
	.word	.LC3
	.word	AC_ERR_DEV
	.word	EIO
	.word	.LC5
	.word	ATA_MAX_QUEUE
	.word	ATA_DFLAG_NCQ
	.word	.LC2
	.size	ata_dev_config_ncq, .-ata_dev_config_ncq
	.comm	SETFEATURES_SATA_ENABLE,4,4
	.comm	SATA_FPDMA_AA,4,4
	.comm	KERN_ERR,4,4
	.comm	EIO,4,4
	.comm	ATA_MAX_QUEUE,4,4
	.comm	ATA_HORKAGE_NONCQ,4,4
	.comm	ATA_HORKAGE_BROKEN_FPDMA_AA,4,4
	.comm	ATA_FLAG_NCQ,4,4
	.comm	ATA_FLAG_FPDMA_AA,4,4
	.comm	ATA_DFLAG_NCQ,4,4
	.comm	AC_ERR_DEV,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
