	.file	"extr_pata_bf54x.c_bfin_softreset.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"SRST failed (err_mask=0x%x)\n"
	.text
	.p2align 4
	.type	bfin_softreset, @function
bfin_softreset:
.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
	xor	r12d, r12d
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rsi
	xor	esi, esi
	sub	rsp, 24
	.cfi_def_cfa_offset 64
	mov	rbp, QWORD PTR [rdi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	mov	rdi, rbp
	mov	r13d, DWORD PTR 0[rbp]
	and	r13d, DWORD PTR ATA_FLAG_SLAVE_POSS[rip]
	call	bfin_devchk@PLT
	test	rax, rax
	setne	r12b
	test	r13d, r13d
	jne	.L17
	xor	esi, esi
	mov	rdi, rbp
	call	bfin_dev_select@PLT
	mov	esi, r12d
	mov	rdi, rbp
	call	bfin_bus_softreset@PLT
	test	eax, eax
	je	.L18
.L6:
	mov	esi, DWORD PTR KERN_ERR[rip]
	mov	ecx, eax
	lea	rdx, .LC0[rip]
	mov	rdi, rbp
	call	ata_port_printk@PLT
	mov	eax, DWORD PTR EIO[rip]
	neg	eax
.L1:
	mov	rcx, QWORD PTR 8[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L19
	add	rsp, 24
	.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
.L18:
	.cfi_restore_state
	mov	rdi, QWORD PTR 8[rbp]
	lea	rdx, 4[rsp]
	mov	esi, r12d
	call	ata_sff_dev_classify@PLT
	mov	DWORD PTR [rbx], eax
.L15:
	xor	eax, eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L17:
	mov	esi, 1
	mov	rdi, rbp
	call	bfin_devchk@PLT
	mov	rdi, rbp
	mov	r8, rax
	mov	eax, r12d
	or	eax, 2
	test	r8, r8
	cmovne	r12d, eax
	xor	esi, esi
	call	bfin_dev_select@PLT
	mov	rdi, rbp
	mov	esi, r12d
	call	bfin_bus_softreset@PLT
	test	eax, eax
	jne	.L6
	mov	rdi, QWORD PTR 8[rbp]
	lea	r13, 4[rsp]
	mov	esi, r12d
	and	esi, 1
	mov	rdx, r13
	call	ata_sff_dev_classify@PLT
	cmp	DWORD PTR 4[rsp], 129
	mov	DWORD PTR [rbx], eax
	je	.L15
	mov	rdi, QWORD PTR 8[rbp]
	mov	esi, r12d
	mov	rdx, r13
	and	esi, 2
	add	rdi, 4
	call	ata_sff_dev_classify@PLT
	mov	DWORD PTR 4[rbx], eax
	xor	eax, eax
	jmp	.L1
.L19:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	bfin_softreset, .-bfin_softreset
	.comm	KERN_ERR,4,4
	.comm	EIO,4,4
	.comm	ATA_FLAG_SLAVE_POSS,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_pata_bf54x.c_bfin_softreset.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"SRST failed (err_mask=0x%x)\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	bfin_softreset, %function
bfin_softreset:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, lr}
	ldr	r3, .L20
	ldr	r5, [r0]
	ldr	r3, [r3]
	ldr	r4, [r5]
	ldr	r2, .L20+4
	sub	sp, sp, #12
	mov	r6, r1
	mov	r0, r5
	mov	r1, #0
	and	r4, r4, r3
	ldr	r2, [r2]
	str	r2, [sp, #4]
	mov	r2,#0
	bl	bfin_devchk
	subs	r7, r0, #0
	movne	r7, #1
	cmp	r4, #0
	bne	.L17
	mov	r1, r4
	mov	r0, r5
	bl	bfin_dev_select
	mov	r1, r7
	mov	r0, r5
	bl	bfin_bus_softreset
	subs	r4, r0, #0
	beq	.L18
.L6:
	ldr	r2, .L20+8
	mov	r3, r4
	ldr	r1, [r2]
	mov	r0, r5
	ldr	r2, .L20+12
	bl	ata_port_printk
	ldr	r3, .L20+16
	ldr	r0, [r3]
	rsb	r0, r0, #0
.L1:
	ldr	r3, .L20+4
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L19
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L18:
	mov	r1, r7
	mov	r2, sp
	ldr	r0, [r5, #4]
	bl	ata_sff_dev_classify
	mov	r3, r0
	mov	r0, r4
	str	r3, [r6]
	b	.L1
.L17:
	mov	r1, #1
	mov	r0, r5
	bl	bfin_devchk
	cmp	r0, #0
	orrne	r7, r7, #2
	mov	r1, #0
	mov	r0, r5
	bl	bfin_dev_select
	mov	r1, r7
	mov	r0, r5
	bl	bfin_bus_softreset
	subs	r4, r0, #0
	bne	.L6
	mov	r2, sp
	ldr	r0, [r5, #4]
	and	r1, r7, #1
	bl	ata_sff_dev_classify
	ldr	r3, [sp]
	str	r0, [r6]
	cmp	r3, #129
	moveq	r0, r4
	beq	.L1
	ldr	r0, [r5, #4]
	mov	r2, sp
	add	r0, r0, #4
	and	r1, r7, #2
	bl	ata_sff_dev_classify
	mov	r3, r0
	mov	r0, r4
	str	r3, [r6, #4]
	b	.L1
.L19:
	bl	__stack_chk_fail
.L21:
	.align	2
.L20:
	.word	ATA_FLAG_SLAVE_POSS
	.word	.LC1
	.word	KERN_ERR
	.word	.LC0
	.word	EIO
	.size	bfin_softreset, .-bfin_softreset
	.comm	KERN_ERR,4,4
	.comm	EIO,4,4
	.comm	ATA_FLAG_SLAVE_POSS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
