	.file	"extr_libata-core.c_ata_read_native_max_address.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"failed to read native max address (err_mask=0x%x)\n"
	.text
	.p2align 4
	.type	ata_read_native_max_address, @function
ata_read_native_max_address:
.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
	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	rbx, rsi
	sub	rsp, 40
	.cfi_def_cfa_offset 80
	mov	edi, DWORD PTR 4[rdi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	mov	r13, rsp
	call	ata_id_has_lba48@PLT
	mov	rsi, r13
	mov	rdi, rbp
	mov	r12d, eax
	call	ata_tf_init@PLT
	mov	eax, DWORD PTR [rsp]
	or	eax, DWORD PTR ATA_TFLAG_DEVICE[rip]
	or	eax, DWORD PTR ATA_TFLAG_ISADDR[rip]
	mov	DWORD PTR [rsp], eax
	test	r12d, r12d
	je	.L2
	or	eax, DWORD PTR ATA_TFLAG_LBA48[rip]
	mov	rsi, r13
	xor	r9d, r9d
	xor	r8d, r8d
	mov	DWORD PTR [rsp], eax
	mov	edx, DWORD PTR ATA_CMD_READ_NATIVE_MAX_EXT[rip]
	mov	rdi, rbp
	mov	eax, DWORD PTR ATA_PROT_NODATA[rip]
	mov	ecx, DWORD PTR DMA_NONE[rip]
	mov	DWORD PTR 16[rsp], edx
	xor	edx, edx
	mov	DWORD PTR 12[rsp], eax
	mov	eax, DWORD PTR ATA_LBA[rip]
	or	DWORD PTR 8[rsp], eax
	sub	rsp, 8
	.cfi_def_cfa_offset 88
	push	0
	.cfi_def_cfa_offset 96
	call	ata_exec_internal@PLT
	pop	rcx
	.cfi_def_cfa_offset 88
	pop	rsi
	.cfi_def_cfa_offset 80
	mov	r12d, eax
	test	eax, eax
	jne	.L3
	mov	rdi, r13
	call	ata_tf_to_lba48@PLT
	add	rax, 1
	mov	QWORD PTR [rbx], rax
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L2:
	mov	eax, DWORD PTR ATA_CMD_READ_NATIVE_MAX[rip]
	xor	edx, edx
	xor	r9d, r9d
	xor	r8d, r8d
	mov	ecx, DWORD PTR DMA_NONE[rip]
	mov	rsi, r13
	mov	rdi, rbp
	mov	DWORD PTR 16[rsp], eax
	mov	eax, DWORD PTR ATA_PROT_NODATA[rip]
	mov	DWORD PTR 12[rsp], eax
	mov	eax, DWORD PTR ATA_LBA[rip]
	or	DWORD PTR 8[rsp], eax
	sub	rsp, 8
	.cfi_def_cfa_offset 88
	push	0
	.cfi_def_cfa_offset 96
	call	ata_exec_internal@PLT
	mov	r12d, eax
	pop	rax
	.cfi_def_cfa_offset 88
	pop	rdx
	.cfi_def_cfa_offset 80
	test	r12d, r12d
	jne	.L3
	mov	rdi, r13
	call	ata_tf_to_lba@PLT
	add	rax, 1
	mov	QWORD PTR [rbx], rax
.L8:
	mov	eax, DWORD PTR 0[rbp]
	and	eax, DWORD PTR ATA_HORKAGE_HPA_SIZE[rip]
	je	.L1
	sub	QWORD PTR [rbx], 1
	xor	eax, eax
.L1:
	mov	rcx, QWORD PTR 24[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L19
	add	rsp, 40
	.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
	ret
	.p2align 4,,10
	.p2align 3
.L3:
	.cfi_restore_state
	mov	edx, r12d
	lea	rsi, .LC0[rip]
	mov	rdi, rbp
	call	ata_dev_warn@PLT
	cmp	DWORD PTR AC_ERR_DEV[rip], r12d
	jne	.L6
	mov	eax, DWORD PTR 4[rsp]
	test	DWORD PTR ATA_ABORTED[rip], eax
	je	.L6
	mov	eax, DWORD PTR EACCES[rip]
	neg	eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L6:
	mov	eax, DWORD PTR EIO[rip]
	neg	eax
	jmp	.L1
.L19:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	ata_read_native_max_address, .-ata_read_native_max_address
	.comm	EIO,4,4
	.comm	EACCES,4,4
	.comm	DMA_NONE,4,4
	.comm	ATA_TFLAG_LBA48,4,4
	.comm	ATA_TFLAG_ISADDR,4,4
	.comm	ATA_TFLAG_DEVICE,4,4
	.comm	ATA_PROT_NODATA,4,4
	.comm	ATA_LBA,4,4
	.comm	ATA_HORKAGE_HPA_SIZE,4,4
	.comm	ATA_CMD_READ_NATIVE_MAX_EXT,4,4
	.comm	ATA_CMD_READ_NATIVE_MAX,4,4
	.comm	ATA_ABORTED,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_read_native_max_address.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"failed to read native max address (err_mask=0x%x)\012"
	.ascii	"\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ata_read_native_max_address, %function
ata_read_native_max_address:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	ldr	r3, .L20
	sub	sp, sp, #40
	mov	r4, r0
	ldr	r0, [r0, #4]
	ldr	r3, [r3]
	str	r3, [sp, #36]
	mov	r3,#0
	mov	r6, r1
	bl	ata_id_has_lba48
	mov	r5, r0
	add	r1, sp, #16
	mov	r0, r4
	bl	ata_tf_init
	ldr	r3, .L20+4
	ldr	r2, .L20+8
	ldr	r1, [r3]
	ldr	r3, [sp, #16]
	ldr	r2, [r2]
	orr	r3, r3, r1
	orr	r3, r3, r2
	cmp	r5, #0
	str	r3, [sp, #16]
	beq	.L2
	mov	r2, #0
	ldr	r1, .L20+12
	ldr	r0, .L20+16
	ldr	r5, [r1]
	ldr	ip, .L20+20
	ldr	r1, .L20+24
	ldr	r0, [r0]
	ldr	lr, [ip]
	ldr	ip, [r1]
	ldr	r1, [sp, #24]
	orr	r0, r0, r3
	ldr	r3, .L20+28
	orr	r1, r1, r5
	str	r2, [sp, #8]
	str	r2, [sp, #4]
	str	r2, [sp]
	str	r0, [sp, #16]
	str	r1, [sp, #24]
	mov	r0, r4
	ldr	r3, [r3]
	add	r1, sp, #16
	str	lr, [sp, #32]
	str	ip, [sp, #28]
	bl	ata_exec_internal
	subs	r5, r0, #0
	bne	.L3
	add	r0, sp, #16
	bl	ata_tf_to_lba48
	add	r0, r0, #1
	str	r0, [r6]
	b	.L8
.L2:
	ldr	r3, .L20+12
	ldr	r0, .L20+32
	ldr	r1, [r3]
	ldr	r3, [sp, #24]
	ldr	r2, .L20+24
	ldr	r0, [r0]
	orr	r3, r3, r1
	ldr	r1, .L20+28
	ldr	ip, [r2]
	str	r5, [sp, #8]
	str	r5, [sp, #4]
	str	r5, [sp]
	mov	r2, r5
	str	r3, [sp, #24]
	str	r0, [sp, #32]
	ldr	r3, [r1]
	mov	r0, r4
	add	r1, sp, #16
	str	ip, [sp, #28]
	bl	ata_exec_internal
	subs	r5, r0, #0
	bne	.L3
	add	r0, sp, #16
	bl	ata_tf_to_lba
	add	r0, r0, #1
	str	r0, [r6]
.L8:
	ldr	r3, .L20+36
	ldr	r0, [r4]
	ldr	r3, [r3]
	ands	r0, r0, r3
	movne	r0, #0
	ldrne	r3, [r6]
	subne	r3, r3, #1
	strne	r3, [r6]
.L1:
	ldr	r3, .L20
	ldr	r2, [r3]
	ldr	r3, [sp, #36]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L19
	add	sp, sp, #40
	@ sp needed
	pop	{r4, r5, r6, pc}
.L3:
	mov	r0, r4
	mov	r2, r5
	ldr	r1, .L20+40
	bl	ata_dev_warn
	ldr	r3, .L20+44
	ldr	r3, [r3]
	cmp	r3, r5
	bne	.L6
	ldr	r3, .L20+48
	ldr	r2, [sp, #20]
	ldr	r3, [r3]
	tst	r2, r3
	ldrne	r3, .L20+52
	ldrne	r0, [r3]
	rsbne	r0, r0, #0
	bne	.L1
.L6:
	ldr	r3, .L20+56
	ldr	r0, [r3]
	rsb	r0, r0, #0
	b	.L1
.L19:
	bl	__stack_chk_fail
.L21:
	.align	2
.L20:
	.word	.LC1
	.word	ATA_TFLAG_DEVICE
	.word	ATA_TFLAG_ISADDR
	.word	ATA_LBA
	.word	ATA_TFLAG_LBA48
	.word	ATA_CMD_READ_NATIVE_MAX_EXT
	.word	ATA_PROT_NODATA
	.word	DMA_NONE
	.word	ATA_CMD_READ_NATIVE_MAX
	.word	ATA_HORKAGE_HPA_SIZE
	.word	.LC0
	.word	AC_ERR_DEV
	.word	ATA_ABORTED
	.word	EACCES
	.word	EIO
	.size	ata_read_native_max_address, .-ata_read_native_max_address
	.comm	EIO,4,4
	.comm	EACCES,4,4
	.comm	DMA_NONE,4,4
	.comm	ATA_TFLAG_LBA48,4,4
	.comm	ATA_TFLAG_ISADDR,4,4
	.comm	ATA_TFLAG_DEVICE,4,4
	.comm	ATA_PROT_NODATA,4,4
	.comm	ATA_LBA,4,4
	.comm	ATA_HORKAGE_HPA_SIZE,4,4
	.comm	ATA_CMD_READ_NATIVE_MAX_EXT,4,4
	.comm	ATA_CMD_READ_NATIVE_MAX,4,4
	.comm	ATA_ABORTED,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
