	.file	"extr_libata-core.c_ata_dev_config_ncq_prio.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"failed to get Identify Device data, Emask 0x%x\n"
	.align 8
.LC1:
	.string	"SATA page does not support priority\n"
	.text
	.p2align 4
	.type	ata_dev_config_ncq_prio, @function
ata_dev_config_ncq_prio:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	mov	edx, DWORD PTR [rdi]
	test	DWORD PTR ATA_DFLAG_NCQ_PRIO_ENABLE[rip], edx
	jne	.L2
	mov	eax, DWORD PTR ATA_DFLAG_NCQ_PRIO[rip]
	not	eax
	and	eax, edx
	mov	DWORD PTR [rdi], eax
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	rax, QWORD PTR 8[rdi]
	mov	edx, DWORD PTR ATA_LOG_SATA_SETTINGS[rip]
	mov	r8d, 1
	mov	esi, DWORD PTR ATA_LOG_IDENTIFY_DEVICE[rip]
	mov	rbx, QWORD PTR [rax]
	mov	rcx, QWORD PTR [rbx]
	call	ata_read_log_page@PLT
	test	eax, eax
	jne	.L8
	mov	rax, QWORD PTR [rbx]
	mov	rdx, QWORD PTR ATA_LOG_NCQ_PRIO_OFFSET[rip]
	mov	edi, 3
	mov	ebx, DWORD PTR [rax+rdx*4]
	call	BIT@PLT
	test	ebx, eax
	mov	eax, DWORD PTR ATA_DFLAG_NCQ_PRIO[rip]
	je	.L5
	or	DWORD PTR 0[rbp], eax
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L8:
	.cfi_restore_state
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	edx, eax
	mov	rdi, rbp
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 16
	lea	rsi, .LC0[rip]
	pop	rbp
	.cfi_def_cfa_offset 8
	jmp	ata_dev_dbg@PLT
	.p2align 4,,10
	.p2align 3
.L5:
	.cfi_restore_state
	not	eax
	and	DWORD PTR 0[rbp], eax
	add	rsp, 8
	.cfi_def_cfa_offset 24
	mov	rdi, rbp
	pop	rbx
	.cfi_def_cfa_offset 16
	lea	rsi, .LC1[rip]
	xor	eax, eax
	pop	rbp
	.cfi_def_cfa_offset 8
	jmp	ata_dev_dbg@PLT
	.cfi_endproc
.LFE0:
	.size	ata_dev_config_ncq_prio, .-ata_dev_config_ncq_prio
	.comm	ATA_LOG_SATA_SETTINGS,4,4
	.comm	ATA_LOG_NCQ_PRIO_OFFSET,8,8
	.comm	ATA_LOG_IDENTIFY_DEVICE,4,4
	.comm	ATA_DFLAG_NCQ_PRIO_ENABLE,4,4
	.comm	ATA_DFLAG_NCQ_PRIO,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_prio.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"failed to get Identify Device data, Emask 0x%x\012\000"
	.align	2
.LC1:
	.ascii	"SATA page does not support priority\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ata_dev_config_ncq_prio, %function
ata_dev_config_ncq_prio:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, lr}
	ldr	r2, .L9
	ldr	r3, [r0]
	ldr	r2, [r2]
	mov	r4, r0
	tst	r3, r2
	sub	sp, sp, #12
	bne	.L2
	ldr	r2, .L9+4
	ldr	r2, [r2]
	bic	r3, r3, r2
	str	r3, [r0]
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, pc}
.L2:
	mov	ip, #1
	ldr	r3, [r0, #4]
	ldr	r2, .L9+8
	ldr	r5, [r3]
	ldr	r1, .L9+12
	ldr	r2, [r2]
	ldr	r3, [r5]
	str	ip, [sp]
	ldr	r1, [r1]
	bl	ata_read_log_page
	subs	r2, r0, #0
	bne	.L8
	ldr	r2, .L9+16
	ldr	r3, [r5]
	ldr	r2, [r2]
	mov	r0, #3
	ldr	r5, [r3, r2, lsl #2]
	bl	BIT
	ldr	r2, .L9+4
	tst	r5, r0
	ldr	r3, [r4]
	ldr	r2, [r2]
	beq	.L5
	orr	r3, r3, r2
	str	r3, [r4]
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, pc}
.L8:
	mov	r0, r4
	ldr	r1, .L9+20
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, lr}
	b	ata_dev_dbg
.L5:
	mov	r0, r4
	ldr	r1, .L9+24
	bic	r3, r3, r2
	str	r3, [r4]
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, lr}
	b	ata_dev_dbg
.L10:
	.align	2
.L9:
	.word	ATA_DFLAG_NCQ_PRIO_ENABLE
	.word	ATA_DFLAG_NCQ_PRIO
	.word	ATA_LOG_SATA_SETTINGS
	.word	ATA_LOG_IDENTIFY_DEVICE
	.word	ATA_LOG_NCQ_PRIO_OFFSET
	.word	.LC0
	.word	.LC1
	.size	ata_dev_config_ncq_prio, .-ata_dev_config_ncq_prio
	.comm	ATA_LOG_SATA_SETTINGS,4,4
	.comm	ATA_LOG_NCQ_PRIO_OFFSET,4,4
	.comm	ATA_LOG_IDENTIFY_DEVICE,4,4
	.comm	ATA_DFLAG_NCQ_PRIO_ENABLE,4,4
	.comm	ATA_DFLAG_NCQ_PRIO,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
