	.file	"extr_bnx2x_cmn.c_bnx2x_set_power_state.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"No power capability. Breaking.\n"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"Can't support state = %d\n"
	.text
	.p2align 4
	.globl	bnx2x_set_power_state
	.type	bnx2x_set_power_state, @function
bnx2x_set_power_state:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	r12d, esi
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	mov	rbx, rdi
	sub	rsp, 24
	.cfi_def_cfa_offset 48
	mov	rdi, QWORD PTR [rdi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	mov	rsi, QWORD PTR 8[rdi]
	test	rsi, rsi
	je	.L13
	add	rsi, QWORD PTR PCI_PM_CTRL[rip]
	lea	rdx, 4[rsp]
	call	pci_read_config_word@PLT
	cmp	r12d, 128
	je	.L4
	cmp	r12d, 129
	je	.L14
	mov	rdi, QWORD PTR [rbx]
	mov	edx, r12d
	lea	rsi, .LC1[rip]
	call	dev_err@PLT
	mov	r12d, DWORD PTR EINVAL[rip]
	neg	r12d
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L15
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L14:
	.cfi_restore_state
	mov	rdi, QWORD PTR [rbx]
	mov	edx, DWORD PTR PCI_PM_CTRL_STATE_MASK[rip]
	mov	rsi, QWORD PTR PCI_PM_CTRL[rip]
	not	edx
	add	rsi, QWORD PTR 8[rdi]
	and	edx, DWORD PTR 4[rsp]
	or	edx, DWORD PTR PCI_PM_CTRL_PME_STATUS[rip]
	call	pci_write_config_word@PLT
	mov	eax, DWORD PTR 4[rsp]
	test	DWORD PTR PCI_PM_CTRL_STATE_MASK[rip], eax
	jne	.L6
.L11:
	xor	r12d, r12d
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L4:
	mov	rax, QWORD PTR [rbx]
	lea	rdi, 16[rax]
	call	atomic_read@PLT
	cmp	eax, 1
	jne	.L11
	mov	rdi, rbx
	call	CHIP_REV_IS_SLOW@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L11
	mov	edx, DWORD PTR PCI_PM_CTRL_STATE_MASK[rip]
	mov	eax, DWORD PTR 8[rbx]
	not	edx
	and	edx, DWORD PTR 4[rsp]
	or	edx, 3
	mov	DWORD PTR 4[rsp], edx
	test	eax, eax
	je	.L8
	or	edx, DWORD PTR PCI_PM_CTRL_PME_ENABLE[rip]
	mov	DWORD PTR 4[rsp], edx
.L8:
	mov	rdi, QWORD PTR [rbx]
	mov	rsi, QWORD PTR PCI_PM_CTRL[rip]
	add	rsi, QWORD PTR 8[rdi]
	call	pci_write_config_word@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L13:
	lea	rdi, .LC0[rip]
	xor	r12d, r12d
	call	BNX2X_DEV_INFO@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L6:
	mov	edi, 20
	call	msleep@PLT
	jmp	.L11
.L15:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	bnx2x_set_power_state, .-bnx2x_set_power_state
	.comm	PCI_PM_CTRL_STATE_MASK,4,4
	.comm	PCI_PM_CTRL_PME_STATUS,4,4
	.comm	PCI_PM_CTRL_PME_ENABLE,4,4
	.comm	PCI_PM_CTRL,8,8
	.comm	EINVAL,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_cmn.c_bnx2x_set_power_state.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"No power capability. Breaking.\012\000"
	.align	2
.LC1:
	.ascii	"Can't support state = %d\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	bnx2x_set_power_state
	.syntax unified
	.arm
	.fpu softvfp
	.type	bnx2x_set_power_state, %function
bnx2x_set_power_state:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, lr}
	mov	r6, r0
	ldr	r0, [r0]
	ldr	r3, .L19
	ldr	r4, [r0, #4]
	sub	sp, sp, #12
	cmp	r4, #0
	ldr	r3, [r3]
	str	r3, [sp, #4]
	mov	r3,#0
	beq	.L16
	mov	r5, r1
	ldr	r7, .L19+4
	mov	r2, sp
	ldr	r1, [r7]
	add	r1, r4, r1
	bl	pci_read_config_word
	cmp	r5, #128
	beq	.L4
	cmp	r5, #129
	beq	.L17
	mov	r2, r5
	ldr	r0, [r6]
	ldr	r1, .L19+8
	bl	dev_err
	ldr	r3, .L19+12
	ldr	r4, [r3]
	rsb	r4, r4, #0
.L1:
	ldr	r3, .L19
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L18
	mov	r0, r4
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L17:
	ldr	r4, .L19+16
	ldr	r3, .L19+20
	ldr	r0, [r6]
	ldr	r2, [r3]
	ldr	ip, [r4]
	ldr	r3, [sp]
	ldr	r1, [r7]
	ldr	lr, [r0, #4]
	bic	r3, r3, ip
	orr	r2, r3, r2
	add	r1, lr, r1
	bl	pci_write_config_word
	ldr	r3, [r4]
	ldr	r2, [sp]
	tst	r2, r3
	bne	.L6
.L14:
	mov	r4, #0
	b	.L1
.L4:
	ldr	r0, [r6]
	add	r0, r0, #8
	bl	atomic_read
	cmp	r0, #1
	bne	.L14
	mov	r0, r6
	bl	CHIP_REV_IS_SLOW
	subs	r4, r0, #0
	bne	.L14
	ldr	r3, .L19+16
	ldr	r2, [sp]
	ldr	r1, [r3]
	ldr	r3, [r6, #4]
	ldr	r0, [r6]
	cmp	r3, #0
	ldrne	r3, .L19+24
	bic	r2, r2, r1
	ldrne	r3, [r3]
	orr	r2, r2, #3
	str	r2, [sp]
	ldr	r1, [r0, #4]
	orrne	r2, r2, r3
	ldr	r3, [r7]
	strne	r2, [sp]
	add	r1, r1, r3
	bl	pci_write_config_word
	b	.L1
.L16:
	ldr	r0, .L19+28
	bl	BNX2X_DEV_INFO
	b	.L1
.L6:
	mov	r0, #20
	bl	msleep
	b	.L14
.L18:
	bl	__stack_chk_fail
.L20:
	.align	2
.L19:
	.word	.LC2
	.word	PCI_PM_CTRL
	.word	.LC1
	.word	EINVAL
	.word	PCI_PM_CTRL_STATE_MASK
	.word	PCI_PM_CTRL_PME_STATUS
	.word	PCI_PM_CTRL_PME_ENABLE
	.word	.LC0
	.size	bnx2x_set_power_state, .-bnx2x_set_power_state
	.comm	PCI_PM_CTRL_STATE_MASK,4,4
	.comm	PCI_PM_CTRL_PME_STATUS,4,4
	.comm	PCI_PM_CTRL_PME_ENABLE,4,4
	.comm	PCI_PM_CTRL,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
