	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bnx2x_set_power_state          ## -- Begin function bnx2x_set_power_state
	.p2align	4, 0x90
_bnx2x_set_power_state:                 ## @bnx2x_set_power_state
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	%rdi, %r15
	movq	(%rdi), %rdi
	movq	8(%rdi), %rsi
	testq	%rsi, %rsi
	je	LBB0_1
## %bb.2:
	movq	_PCI_PM_CTRL@GOTPCREL(%rip), %r12
	addq	(%r12), %rsi
	leaq	-36(%rbp), %rdx
	callq	_pci_read_config_word
	cmpl	$128, %ebx
	je	LBB0_6
## %bb.3:
	cmpl	$129, %ebx
	jne	LBB0_11
## %bb.4:
	movq	(%r15), %rdi
	movq	(%r12), %rsi
	addq	8(%rdi), %rsi
	movq	_PCI_PM_CTRL_STATE_MASK@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	notl	%edx
	andl	-36(%rbp), %edx
	movq	_PCI_PM_CTRL_PME_STATUS@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	callq	_pci_write_config_word
	movl	(%rbx), %eax
	xorl	%r14d, %r14d
	testl	%eax, -36(%rbp)
	je	LBB0_12
## %bb.5:
	movl	$20, %edi
	callq	_msleep
	jmp	LBB0_12
LBB0_1:
	leaq	L_.str(%rip), %rdi
	callq	_BNX2X_DEV_INFO
	xorl	%r14d, %r14d
	jmp	LBB0_12
LBB0_6:
	movq	(%r15), %rdi
	addq	$16, %rdi
	callq	_atomic_read
	xorl	%r14d, %r14d
	cmpl	$1, %eax
	jne	LBB0_12
## %bb.7:
	movq	%r15, %rdi
	callq	_CHIP_REV_IS_SLOW
	testl	%eax, %eax
	jne	LBB0_12
## %bb.8:
	movq	_PCI_PM_CTRL_STATE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	notl	%edx
	andl	-36(%rbp), %edx
	orl	$3, %edx
	movl	%edx, -36(%rbp)
	cmpl	$0, 8(%r15)
	je	LBB0_10
## %bb.9:
	movq	_PCI_PM_CTRL_PME_ENABLE@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movl	%edx, -36(%rbp)
LBB0_10:
	movq	(%r15), %rdi
	movq	(%r12), %rsi
	addq	8(%rdi), %rsi
	callq	_pci_write_config_word
	jmp	LBB0_12
LBB0_11:
	movq	(%r15), %rdi
	leaq	L_.str.1(%rip), %rsi
	movl	%ebx, %edx
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_12:
	movl	%r14d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"No power capability. Breaking.\n"

	.comm	_PCI_PM_CTRL,8,3                ## @PCI_PM_CTRL
	.comm	_PCI_PM_CTRL_STATE_MASK,4,2     ## @PCI_PM_CTRL_STATE_MASK
	.comm	_PCI_PM_CTRL_PME_STATUS,4,2     ## @PCI_PM_CTRL_PME_STATUS
	.comm	_PCI_PM_CTRL_PME_ENABLE,4,2     ## @PCI_PM_CTRL_PME_ENABLE
L_.str.1:                               ## @.str.1
	.asciz	"Can't support state = %d\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bnx2x_set_power_state          ; -- Begin function bnx2x_set_power_state
	.p2align	2
_bnx2x_set_power_state:                 ; @bnx2x_set_power_state
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x0
	ldr	x0, [x0]
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_5
; %bb.1:
	mov	x20, x1
Lloh0:
	adrp	x21, _PCI_PM_CTRL@GOTPAGE
Lloh1:
	ldr	x21, [x21, _PCI_PM_CTRL@GOTPAGEOFF]
	ldr	x9, [x21]
	add	x1, x9, x8
	add	x2, sp, #12
	bl	_pci_read_config_word
	cmp	w20, #128
	b.eq	LBB0_6
; %bb.2:
	cmp	w20, #129
	b.ne	LBB0_12
; %bb.3:
	ldr	x0, [x19]
	ldr	x8, [x0, #8]
	ldr	x9, [x21]
	add	x1, x9, x8
	ldr	w8, [sp, #12]
Lloh2:
	adrp	x19, _PCI_PM_CTRL_STATE_MASK@GOTPAGE
Lloh3:
	ldr	x19, [x19, _PCI_PM_CTRL_STATE_MASK@GOTPAGEOFF]
	ldr	w9, [x19]
	bic	w8, w8, w9
Lloh4:
	adrp	x9, _PCI_PM_CTRL_PME_STATUS@GOTPAGE
Lloh5:
	ldr	x9, [x9, _PCI_PM_CTRL_PME_STATUS@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x9]
	orr	w2, w8, w9
	bl	_pci_write_config_word
	ldr	w8, [sp, #12]
	ldr	w9, [x19]
	tst	w9, w8
	b.eq	LBB0_11
; %bb.4:
	mov	w0, #20
	bl	_msleep
	b	LBB0_11
LBB0_5:
Lloh7:
	adrp	x0, l_.str@PAGE
Lloh8:
	add	x0, x0, l_.str@PAGEOFF
	bl	_BNX2X_DEV_INFO
	b	LBB0_11
LBB0_6:
	ldr	x8, [x19]
	add	x0, x8, #16
	bl	_atomic_read
	cmp	w0, #1
	b.ne	LBB0_11
; %bb.7:
	mov	x0, x19
	bl	_CHIP_REV_IS_SLOW
	cbnz	w0, LBB0_11
; %bb.8:
Lloh9:
	adrp	x8, _PCI_PM_CTRL_STATE_MASK@GOTPAGE
Lloh10:
	ldr	x8, [x8, _PCI_PM_CTRL_STATE_MASK@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	ldr	w9, [sp, #12]
	bic	w8, w9, w8
	orr	w2, w8, #0x3
	str	w2, [sp, #12]
	ldr	w8, [x19, #8]
	cbz	w8, LBB0_10
; %bb.9:
Lloh12:
	adrp	x8, _PCI_PM_CTRL_PME_ENABLE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _PCI_PM_CTRL_PME_ENABLE@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	orr	w2, w8, w2
	str	w2, [sp, #12]
LBB0_10:
	ldr	x0, [x19]
	ldr	x8, [x0, #8]
	ldr	x9, [x21]
	add	x1, x9, x8
	bl	_pci_write_config_word
LBB0_11:
	mov	w0, #0
	b	LBB0_13
LBB0_12:
	ldr	x0, [x19]
Lloh15:
	adrp	x1, l_.str.1@PAGE
Lloh16:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x20
	bl	_dev_err
Lloh17:
	adrp	x8, _EINVAL@GOTPAGE
Lloh18:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_13:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"No power capability. Breaking.\n"

	.comm	_PCI_PM_CTRL,8,3                ; @PCI_PM_CTRL
	.comm	_PCI_PM_CTRL_STATE_MASK,4,2     ; @PCI_PM_CTRL_STATE_MASK
	.comm	_PCI_PM_CTRL_PME_STATUS,4,2     ; @PCI_PM_CTRL_PME_STATUS
	.comm	_PCI_PM_CTRL_PME_ENABLE,4,2     ; @PCI_PM_CTRL_PME_ENABLE
l_.str.1:                               ; @.str.1
	.asciz	"Can't support state = %d\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
.subsections_via_symbols
