	.file	"extr_bnx2x_main.c_bnx2x_leader_reset.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"MCP response failure, aborting\n"
	.align 8
.LC1:
	.string	"MCP unexpected resp, aborting\n"
	.align 8
.LC2:
	.string	"Something bad had happen on engine %d! Aii!\n"
	.text
	.p2align 4
	.type	bnx2x_leader_reset, @function
bnx2x_leader_reset:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	call	bnx2x_reset_is_global@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L2
	mov	rdi, rbp
	call	BP_NOMCP@PLT
	test	eax, eax
	je	.L17
.L3:
	xor	esi, esi
	mov	rdi, rbp
	call	bnx2x_process_kill@PLT
	test	rax, rax
	jne	.L18
	mov	rdi, rbp
	call	bnx2x_set_reset_done@PLT
.L7:
	mov	rdi, rbp
	call	BP_NOMCP@PLT
	test	eax, eax
	je	.L19
.L5:
	mov	QWORD PTR 0[rbp], 0
	mov	rdi, rbp
	call	bnx2x_release_leader_lock@PLT
	xor	eax, eax
	call	smp_mb@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	eax, r12d
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	esi, eax
	mov	rdi, rbp
	call	bnx2x_process_kill@PLT
	test	rax, rax
	je	.L20
	mov	rdi, rbp
	call	BP_PATH@PLT
	lea	rdi, .LC2[rip]
	mov	esi, eax
	xor	eax, eax
	call	BNX2X_ERR@PLT
	mov	r12d, DWORD PTR EAGAIN[rip]
	neg	r12d
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L17:
	mov	edx, DWORD PTR DRV_MSG_CODE_LOAD_REQ_WITH_LFA[rip]
	mov	esi, DWORD PTR DRV_MSG_CODE_LOAD_REQ[rip]
	mov	rdi, rbp
	call	bnx2x_fw_command@PLT
	test	rax, rax
	je	.L21
	cmp	QWORD PTR FW_MSG_CODE_DRV_LOAD_COMMON_CHIP[rip], rax
	je	.L6
	cmp	QWORD PTR FW_MSG_CODE_DRV_LOAD_COMMON[rip], rax
	jne	.L22
.L6:
	mov	esi, DWORD PTR DRV_MSG_CODE_LOAD_DONE[rip]
	xor	edx, edx
	mov	rdi, rbp
	call	bnx2x_fw_command@PLT
	test	rax, rax
	jne	.L3
	lea	rdi, .LC0[rip]
	call	BNX2X_ERR@PLT
	mov	r12d, DWORD PTR EAGAIN[rip]
	neg	r12d
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L20:
	mov	rdi, rbp
	xor	r12d, r12d
	call	bnx2x_set_reset_done@PLT
	mov	rdi, rbp
	call	bnx2x_clear_reset_global@PLT
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L19:
	mov	esi, DWORD PTR DRV_MSG_CODE_UNLOAD_REQ_WOL_MCP[rip]
	xor	edx, edx
	mov	rdi, rbp
	call	bnx2x_fw_command@PLT
	mov	esi, DWORD PTR DRV_MSG_CODE_UNLOAD_DONE[rip]
	xor	edx, edx
	mov	rdi, rbp
	call	bnx2x_fw_command@PLT
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L22:
	lea	rdi, .LC1[rip]
	xor	eax, eax
	call	BNX2X_ERR@PLT
	mov	r12d, DWORD PTR EAGAIN[rip]
	neg	r12d
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L21:
	lea	rdi, .LC0[rip]
	call	BNX2X_ERR@PLT
	mov	r12d, DWORD PTR EAGAIN[rip]
	neg	r12d
	jmp	.L5
.L18:
	mov	rdi, rbp
	call	BP_PATH@PLT
	lea	rdi, .LC2[rip]
	mov	esi, eax
	xor	eax, eax
	call	BNX2X_ERR@PLT
	mov	r12d, DWORD PTR EAGAIN[rip]
	neg	r12d
	jmp	.L7
	.cfi_endproc
.LFE0:
	.size	bnx2x_leader_reset, .-bnx2x_leader_reset
	.comm	FW_MSG_CODE_DRV_LOAD_COMMON_CHIP,8,8
	.comm	FW_MSG_CODE_DRV_LOAD_COMMON,8,8
	.comm	EAGAIN,4,4
	.comm	DRV_MSG_CODE_UNLOAD_REQ_WOL_MCP,4,4
	.comm	DRV_MSG_CODE_UNLOAD_DONE,4,4
	.comm	DRV_MSG_CODE_LOAD_REQ_WITH_LFA,4,4
	.comm	DRV_MSG_CODE_LOAD_REQ,4,4
	.comm	DRV_MSG_CODE_LOAD_DONE,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_bnx2x_main.c_bnx2x_leader_reset.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"MCP response failure, aborting\012\000"
	.align	2
.LC1:
	.ascii	"MCP unexpected resp, aborting\012\000"
	.align	2
.LC2:
	.ascii	"Something bad had happen on engine %d! Aii!\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	bnx2x_leader_reset, %function
bnx2x_leader_reset:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r4, r0
	bl	bnx2x_reset_is_global
	subs	r1, r0, #0
	mov	r0, r4
	bne	.L2
	bl	BP_NOMCP
	cmp	r0, #0
	beq	.L17
.L3:
	mov	r1, #0
	mov	r0, r4
	bl	bnx2x_process_kill
	subs	r5, r0, #0
	bne	.L18
	mov	r0, r4
	bl	bnx2x_set_reset_done
.L7:
	mov	r0, r4
	bl	BP_NOMCP
	subs	r6, r0, #0
	beq	.L19
.L5:
	mov	r3, #0
	mov	r0, r4
	str	r3, [r4]
	bl	bnx2x_release_leader_lock
	bl	smp_mb
	mov	r0, r5
	pop	{r4, r5, r6, pc}
.L2:
	bl	bnx2x_process_kill
	subs	r5, r0, #0
	beq	.L20
	mov	r0, r4
	bl	BP_PATH
	mov	r1, r0
	ldr	r0, .L23
	bl	BNX2X_ERR
	ldr	r3, .L23+4
	ldr	r5, [r3]
	rsb	r5, r5, #0
	b	.L5
.L17:
	ldr	r3, .L23+8
	ldr	r2, .L23+12
	mov	r0, r4
	ldr	r2, [r2]
	ldr	r1, [r3]
	bl	bnx2x_fw_command
	cmp	r0, #0
	beq	.L21
	ldr	r3, .L23+16
	ldr	r3, [r3]
	cmp	r3, r0
	beq	.L6
	ldr	r3, .L23+20
	ldr	r3, [r3]
	cmp	r3, r0
	bne	.L22
.L6:
	ldr	r3, .L23+24
	mov	r2, #0
	mov	r0, r4
	ldr	r1, [r3]
	bl	bnx2x_fw_command
	cmp	r0, #0
	bne	.L3
	ldr	r0, .L23+28
	bl	BNX2X_ERR
	ldr	r3, .L23+4
	ldr	r5, [r3]
	rsb	r5, r5, #0
	b	.L7
.L20:
	mov	r0, r4
	bl	bnx2x_set_reset_done
	mov	r0, r4
	bl	bnx2x_clear_reset_global
	b	.L5
.L19:
	ldr	r3, .L23+32
	mov	r2, r6
	ldr	r1, [r3]
	mov	r0, r4
	bl	bnx2x_fw_command
	ldr	r3, .L23+36
	mov	r2, r6
	mov	r0, r4
	ldr	r1, [r3]
	bl	bnx2x_fw_command
	b	.L5
.L22:
	ldr	r0, .L23+40
	bl	BNX2X_ERR
	ldr	r3, .L23+4
	ldr	r5, [r3]
	rsb	r5, r5, #0
	b	.L7
.L21:
	ldr	r0, .L23+28
	bl	BNX2X_ERR
	ldr	r3, .L23+4
	ldr	r5, [r3]
	rsb	r5, r5, #0
	b	.L5
.L18:
	mov	r0, r4
	bl	BP_PATH
	mov	r1, r0
	ldr	r0, .L23
	bl	BNX2X_ERR
	ldr	r3, .L23+4
	ldr	r5, [r3]
	rsb	r5, r5, #0
	b	.L7
.L24:
	.align	2
.L23:
	.word	.LC2
	.word	EAGAIN
	.word	DRV_MSG_CODE_LOAD_REQ
	.word	DRV_MSG_CODE_LOAD_REQ_WITH_LFA
	.word	FW_MSG_CODE_DRV_LOAD_COMMON_CHIP
	.word	FW_MSG_CODE_DRV_LOAD_COMMON
	.word	DRV_MSG_CODE_LOAD_DONE
	.word	.LC0
	.word	DRV_MSG_CODE_UNLOAD_REQ_WOL_MCP
	.word	DRV_MSG_CODE_UNLOAD_DONE
	.word	.LC1
	.size	bnx2x_leader_reset, .-bnx2x_leader_reset
	.comm	FW_MSG_CODE_DRV_LOAD_COMMON_CHIP,4,4
	.comm	FW_MSG_CODE_DRV_LOAD_COMMON,4,4
	.comm	EAGAIN,4,4
	.comm	DRV_MSG_CODE_UNLOAD_REQ_WOL_MCP,4,4
	.comm	DRV_MSG_CODE_UNLOAD_DONE,4,4
	.comm	DRV_MSG_CODE_LOAD_REQ_WITH_LFA,4,4
	.comm	DRV_MSG_CODE_LOAD_REQ,4,4
	.comm	DRV_MSG_CODE_LOAD_DONE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
