	.file	"extr_fsi-sbefifo.c_sbefifo_cleanup_hw.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"SBE state=%d\n"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC1:
	.string	"Cleanup: Reading UP status failed, rc=%d\n"
	.align 8
.LC2:
	.string	"Cleanup: Reading DOWN status failed, rc=%d\n"
	.align 8
.LC3:
	.string	"Cleanup: FIFO reset request set, resetting\n"
	.align 8
.LC4:
	.string	"Cleanup: Reset reg write failed, rc=%d\n"
	.align 8
.LC5:
	.string	"Cleanup: FIFO not clean (up=0x%08x down=0x%08x)\n"
	.text
	.p2align 4
	.type	sbefifo_cleanup_hw, @function
sbefifo_cleanup_hw:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	r13, rdi
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	sub	rsp, 16
	.cfi_def_cfa_offset 48
	mov	rbp, QWORD PTR 8[rdi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	call	sbefifo_check_sbe_state@PLT
	test	eax, eax
	jne	.L13
	mov	eax, DWORD PTR 0[r13]
	test	eax, eax
	je	.L14
.L4:
	mov	rdi, r13
	call	sbefifo_request_reset@PLT
	mov	r12d, eax
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L15
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	mov	eax, r12d
	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
.L14:
	.cfi_restore_state
	mov	esi, DWORD PTR SBEFIFO_UP[rip]
	mov	rdx, rsp
	mov	rdi, r13
	or	esi, DWORD PTR SBEFIFO_STS[rip]
	call	sbefifo_regr@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L16
	mov	esi, DWORD PTR SBEFIFO_DOWN[rip]
	lea	rdx, 4[rsp]
	mov	rdi, r13
	or	esi, DWORD PTR SBEFIFO_STS[rip]
	call	sbefifo_regr@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L17
	mov	ecx, DWORD PTR 4[rsp]
	test	DWORD PTR SBEFIFO_STS_RESET_REQ[rip], ecx
	jne	.L18
	mov	edx, DWORD PTR [rsp]
	mov	eax, ecx
	or	eax, edx
	and	eax, DWORD PTR SBEFIFO_STS_PARITY_ERR[rip]
	mov	r12d, eax
	jne	.L9
	mov	eax, ecx
	and	eax, edx
	test	DWORD PTR SBEFIFO_STS_EMPTY[rip], eax
	jne	.L1
.L9:
	lea	rsi, .LC5[rip]
	mov	rdi, rbp
	xor	eax, eax
	call	dev_info@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L13:
	mov	edx, eax
	lea	rsi, .LC0[rip]
	mov	rdi, rbp
	mov	r12d, eax
	call	dev_dbg@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L18:
	lea	rsi, .LC3[rip]
	mov	rdi, rbp
	xor	eax, eax
	call	dev_info@PLT
	mov	edx, DWORD PTR SBEFIFO_PERFORM_RESET[rip]
	mov	esi, DWORD PTR SBEFIFO_UP[rip]
	mov	rdi, r13
	call	sbefifo_regw@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L19
	mov	DWORD PTR 0[r13], 0
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L16:
	mov	edx, eax
	lea	rsi, .LC1[rip]
	mov	rdi, rbp
	call	dev_err@PLT
	mov	DWORD PTR 0[r13], 1
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L17:
	mov	edx, eax
	lea	rsi, .LC2[rip]
	mov	rdi, rbp
	call	dev_err@PLT
	mov	DWORD PTR 0[r13], 1
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L19:
	mov	DWORD PTR 0[r13], 1
	mov	edx, eax
	lea	rsi, .LC4[rip]
	mov	rdi, rbp
	call	dev_err@PLT
	jmp	.L1
.L15:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	sbefifo_cleanup_hw, .-sbefifo_cleanup_hw
	.comm	SBEFIFO_UP,4,4
	.comm	SBEFIFO_STS_RESET_REQ,4,4
	.comm	SBEFIFO_STS_PARITY_ERR,4,4
	.comm	SBEFIFO_STS_EMPTY,4,4
	.comm	SBEFIFO_STS,4,4
	.comm	SBEFIFO_PERFORM_RESET,4,4
	.comm	SBEFIFO_DOWN,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_fsi-sbefifo.c_sbefifo_cleanup_hw.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"SBE state=%d\012\000"
	.align	2
.LC1:
	.ascii	"Cleanup: Reading UP status failed, rc=%d\012\000"
	.align	2
.LC2:
	.ascii	"Cleanup: Reading DOWN status failed, rc=%d\012\000"
	.align	2
.LC3:
	.ascii	"Cleanup: FIFO reset request set, resetting\012\000"
	.align	2
.LC4:
	.ascii	"Cleanup: Reset reg write failed, rc=%d\012\000"
	.align	2
.LC5:
	.ascii	"Cleanup: FIFO not clean (up=0x%08x down=0x%08x)\012"
	.ascii	"\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC6:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	sbefifo_cleanup_hw, %function
sbefifo_cleanup_hw:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r3, .L19
	sub	sp, sp, #16
	mov	r6, r0
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	ldr	r7, [r0, #4]
	bl	sbefifo_check_sbe_state
	subs	r4, r0, #0
	bne	.L13
	ldr	r3, [r6]
	cmp	r3, #0
	beq	.L14
.L4:
	mov	r0, r6
	bl	sbefifo_request_reset
	mov	r4, r0
.L1:
	ldr	r3, .L19
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L15
	mov	r0, r4
	add	sp, sp, #16
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L14:
	ldr	r8, .L19+4
	ldr	r5, .L19+8
	ldr	r1, [r8]
	ldr	r3, [r5]
	mov	r0, r6
	add	r2, sp, #4
	orr	r1, r1, r3
	bl	sbefifo_regr
	subs	r4, r0, #0
	bne	.L16
	ldr	r2, .L19+12
	ldr	r3, [r5]
	ldr	r1, [r2]
	mov	r0, r6
	add	r2, sp, #8
	orr	r1, r1, r3
	bl	sbefifo_regr
	subs	r4, r0, #0
	bne	.L17
	ldr	r2, .L19+16
	ldr	r3, [sp, #8]
	ldr	r2, [r2]
	tst	r3, r2
	bne	.L18
	ldr	r1, .L19+20
	ldr	r2, [sp, #4]
	ldr	r0, [r1]
	orr	r4, r3, r2
	ands	r4, r4, r0
	bne	.L9
	ldr	r0, .L19+24
	and	r1, r3, r2
	ldr	r0, [r0]
	tst	r1, r0
	bne	.L1
.L9:
	mov	r0, r7
	ldr	r1, .L19+28
	bl	dev_info
	b	.L4
.L13:
	mov	r0, r7
	mov	r2, r4
	ldr	r1, .L19+32
	bl	dev_dbg
	b	.L1
.L18:
	ldr	r1, .L19+36
	mov	r0, r7
	bl	dev_info
	ldr	r3, .L19+40
	mov	r0, r6
	ldr	r1, [r8]
	ldr	r2, [r3]
	bl	sbefifo_regw
	subs	r4, r0, #0
	streq	r4, [r6]
	beq	.L1
	mov	r3, #1
	mov	r0, r7
	mov	r2, r4
	ldr	r1, .L19+44
	str	r3, [r6]
	bl	dev_err
	b	.L1
.L16:
	mov	r0, r7
	mov	r2, r4
	ldr	r1, .L19+48
	bl	dev_err
	mov	r3, #1
	str	r3, [r6]
	b	.L1
.L17:
	mov	r0, r7
	mov	r2, r4
	ldr	r1, .L19+52
	bl	dev_err
	mov	r3, #1
	str	r3, [r6]
	b	.L1
.L15:
	bl	__stack_chk_fail
.L20:
	.align	2
.L19:
	.word	.LC6
	.word	SBEFIFO_UP
	.word	SBEFIFO_STS
	.word	SBEFIFO_DOWN
	.word	SBEFIFO_STS_RESET_REQ
	.word	SBEFIFO_STS_PARITY_ERR
	.word	SBEFIFO_STS_EMPTY
	.word	.LC5
	.word	.LC0
	.word	.LC3
	.word	SBEFIFO_PERFORM_RESET
	.word	.LC4
	.word	.LC1
	.word	.LC2
	.size	sbefifo_cleanup_hw, .-sbefifo_cleanup_hw
	.comm	SBEFIFO_UP,4,4
	.comm	SBEFIFO_STS_RESET_REQ,4,4
	.comm	SBEFIFO_STS_PARITY_ERR,4,4
	.comm	SBEFIFO_STS_EMPTY,4,4
	.comm	SBEFIFO_STS,4,4
	.comm	SBEFIFO_PERFORM_RESET,4,4
	.comm	SBEFIFO_DOWN,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
