	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bnx2_set_power_state
_bnx2_set_power_state:                  ## @bnx2_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	cmpl	$128, %esi
	je	LBB0_3
## %bb.1:
	cmpl	$129, %esi
	jne	LBB0_11
## %bb.2:
	movl	(%rbx), %edi
	xorl	%r14d, %r14d
	movl	$129, %esi
	xorl	%edx, %edx
	callq	_pci_enable_wake
	movl	(%rbx), %edi
	movl	$129, %esi
	callq	_pci_set_power_state
	movq	_BNX2_EMAC_MODE@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_BNX2_RD
	movq	_BNX2_EMAC_MODE_MPKT_RCVD@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_BNX2_EMAC_MODE_ACPI_RCVD@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_BNX2_EMAC_MODE_MPKT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	notl	%edx
	andl	%eax, %edx
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_BNX2_WR
	movq	_BNX2_RPM_CONFIG@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_BNX2_RD
	movq	_BNX2_RPM_CONFIG_ACPI_ENA@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	notl	%edx
	andl	%eax, %edx
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_BNX2_WR
	jmp	LBB0_12
LBB0_3:
	movq	%rbx, %rdi
	callq	_bnx2_setup_wol
	movl	(%rbx), %edi
	movl	8(%rbx), %esi
	callq	_pci_wake_from_d3
	movq	%rbx, %rdi
	callq	_BNX2_CHIP_ID
	movq	_BNX2_CHIP_ID_5706_A0@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_5
## %bb.4:
	movq	%rbx, %rdi
	callq	_BNX2_CHIP_ID
	movq	_BNX2_CHIP_ID_5706_A1@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_7
LBB0_5:
	xorl	%r14d, %r14d
	cmpl	$0, 8(%rbx)
	je	LBB0_12
## %bb.6:
	movl	(%rbx), %edi
	movl	$128, %esi
	callq	_pci_set_power_state
	jmp	LBB0_12
LBB0_11:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_12:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	cmpl	$0, 4(%rbx)
	jne	LBB0_10
## %bb.8:
	movq	%rbx, %rdi
	callq	_BNX2_CHIP
	movq	_BNX2_CHIP_5709@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_10
## %bb.9:
	movq	_BNX2_BC_STATE_CONDITION@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_bnx2_shmem_rd
	movq	_BNX2_CONDITION_PM_STATE_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	notl	%edx
	andl	%eax, %edx
	movq	_BNX2_CONDITION_PM_STATE_UNPREP@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_bnx2_shmem_wr
LBB0_10:
	movl	(%rbx), %edi
	movl	$128, %esi
	callq	_pci_set_power_state
	xorl	%r14d, %r14d
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_BNX2_EMAC_MODE,4,2             ## @BNX2_EMAC_MODE
	.comm	_BNX2_EMAC_MODE_MPKT_RCVD,4,2   ## @BNX2_EMAC_MODE_MPKT_RCVD
	.comm	_BNX2_EMAC_MODE_ACPI_RCVD,4,2   ## @BNX2_EMAC_MODE_ACPI_RCVD
	.comm	_BNX2_EMAC_MODE_MPKT,4,2        ## @BNX2_EMAC_MODE_MPKT
	.comm	_BNX2_RPM_CONFIG,4,2            ## @BNX2_RPM_CONFIG
	.comm	_BNX2_RPM_CONFIG_ACPI_ENA,4,2   ## @BNX2_RPM_CONFIG_ACPI_ENA
	.comm	_BNX2_CHIP_ID_5706_A0,4,2       ## @BNX2_CHIP_ID_5706_A0
	.comm	_BNX2_CHIP_ID_5706_A1,4,2       ## @BNX2_CHIP_ID_5706_A1
	.comm	_BNX2_CHIP_5709,4,2             ## @BNX2_CHIP_5709
	.comm	_BNX2_BC_STATE_CONDITION,4,2    ## @BNX2_BC_STATE_CONDITION
	.comm	_BNX2_CONDITION_PM_STATE_MASK,4,2 ## @BNX2_CONDITION_PM_STATE_MASK
	.comm	_BNX2_CONDITION_PM_STATE_UNPREP,4,2 ## @BNX2_CONDITION_PM_STATE_UNPREP
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_bnx2_set_power_state
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bnx2_set_power_state
_bnx2_set_power_state:                  ; @bnx2_set_power_state
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	cmp	w1, #128
	b.eq	LBB0_3
; %bb.1:
	cmp	w1, #129
	b.ne	LBB0_6
; %bb.2:
	ldr	w0, [x19]
	mov	w2, #0
	bl	_pci_enable_wake
	ldr	w0, [x19]
	mov	w1, #129
	bl	_pci_set_power_state
Lloh0:
	adrp	x20, _BNX2_EMAC_MODE@GOTPAGE
Lloh1:
	ldr	x20, [x20, _BNX2_EMAC_MODE@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_BNX2_RD
Lloh2:
	adrp	x8, _BNX2_EMAC_MODE_MPKT_RCVD@GOTPAGE
Lloh3:
	ldr	x8, [x8, _BNX2_EMAC_MODE_MPKT_RCVD@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _BNX2_EMAC_MODE_ACPI_RCVD@GOTPAGE
Lloh6:
	ldr	x9, [x9, _BNX2_EMAC_MODE_ACPI_RCVD@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	orr	w8, w8, w0
	orr	w8, w8, w9
Lloh8:
	adrp	x9, _BNX2_EMAC_MODE_MPKT@GOTPAGE
Lloh9:
	ldr	x9, [x9, _BNX2_EMAC_MODE_MPKT@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	bic	w2, w8, w9
	ldr	w1, [x20]
	mov	x0, x19
	bl	_BNX2_WR
Lloh11:
	adrp	x20, _BNX2_RPM_CONFIG@GOTPAGE
Lloh12:
	ldr	x20, [x20, _BNX2_RPM_CONFIG@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_BNX2_RD
Lloh13:
	adrp	x8, _BNX2_RPM_CONFIG_ACPI_ENA@GOTPAGE
Lloh14:
	ldr	x8, [x8, _BNX2_RPM_CONFIG_ACPI_ENA@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	bic	w2, w0, w8
	ldr	w1, [x20]
	mov	x0, x19
	bl	_BNX2_WR
	b	LBB0_11
LBB0_3:
	mov	x0, x19
	bl	_bnx2_setup_wol
	ldr	w0, [x19]
	ldr	w1, [x19, #8]
	bl	_pci_wake_from_d3
	mov	x0, x19
	bl	_BNX2_CHIP_ID
Lloh16:
	adrp	x8, _BNX2_CHIP_ID_5706_A0@GOTPAGE
Lloh17:
	ldr	x8, [x8, _BNX2_CHIP_ID_5706_A0@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	cmp	w0, w8
	b.eq	LBB0_5
; %bb.4:
	mov	x0, x19
	bl	_BNX2_CHIP_ID
Lloh19:
	adrp	x8, _BNX2_CHIP_ID_5706_A1@GOTPAGE
Lloh20:
	ldr	x8, [x8, _BNX2_CHIP_ID_5706_A1@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_7
LBB0_5:
	ldr	w8, [x19, #8]
	cbnz	w8, LBB0_10
	b	LBB0_11
LBB0_6:
Lloh22:
	adrp	x8, _EINVAL@GOTPAGE
Lloh23:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_12
LBB0_7:
	ldr	w8, [x19, #4]
	cbnz	w8, LBB0_10
; %bb.8:
	mov	x0, x19
	bl	_BNX2_CHIP
Lloh25:
	adrp	x8, _BNX2_CHIP_5709@GOTPAGE
Lloh26:
	ldr	x8, [x8, _BNX2_CHIP_5709@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_10
; %bb.9:
Lloh28:
	adrp	x20, _BNX2_BC_STATE_CONDITION@GOTPAGE
Lloh29:
	ldr	x20, [x20, _BNX2_BC_STATE_CONDITION@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_bnx2_shmem_rd
Lloh30:
	adrp	x8, _BNX2_CONDITION_PM_STATE_MASK@GOTPAGE
Lloh31:
	ldr	x8, [x8, _BNX2_CONDITION_PM_STATE_MASK@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
	bic	w8, w0, w8
Lloh33:
	adrp	x9, _BNX2_CONDITION_PM_STATE_UNPREP@GOTPAGE
Lloh34:
	ldr	x9, [x9, _BNX2_CONDITION_PM_STATE_UNPREP@GOTPAGEOFF]
Lloh35:
	ldr	w9, [x9]
	orr	w2, w8, w9
	ldr	w1, [x20]
	mov	x0, x19
	bl	_bnx2_shmem_wr
LBB0_10:
	ldr	w0, [x19]
	mov	w1, #128
	bl	_pci_set_power_state
LBB0_11:
	mov	w0, #0
LBB0_12:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_BNX2_EMAC_MODE,4,2             ; @BNX2_EMAC_MODE
	.comm	_BNX2_EMAC_MODE_MPKT_RCVD,4,2   ; @BNX2_EMAC_MODE_MPKT_RCVD
	.comm	_BNX2_EMAC_MODE_ACPI_RCVD,4,2   ; @BNX2_EMAC_MODE_ACPI_RCVD
	.comm	_BNX2_EMAC_MODE_MPKT,4,2        ; @BNX2_EMAC_MODE_MPKT
	.comm	_BNX2_RPM_CONFIG,4,2            ; @BNX2_RPM_CONFIG
	.comm	_BNX2_RPM_CONFIG_ACPI_ENA,4,2   ; @BNX2_RPM_CONFIG_ACPI_ENA
	.comm	_BNX2_CHIP_ID_5706_A0,4,2       ; @BNX2_CHIP_ID_5706_A0
	.comm	_BNX2_CHIP_ID_5706_A1,4,2       ; @BNX2_CHIP_ID_5706_A1
	.comm	_BNX2_CHIP_5709,4,2             ; @BNX2_CHIP_5709
	.comm	_BNX2_BC_STATE_CONDITION,4,2    ; @BNX2_BC_STATE_CONDITION
	.comm	_BNX2_CONDITION_PM_STATE_MASK,4,2 ; @BNX2_CONDITION_PM_STATE_MASK
	.comm	_BNX2_CONDITION_PM_STATE_UNPREP,4,2 ; @BNX2_CONDITION_PM_STATE_UNPREP
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_bnx2_set_power_state
.subsections_via_symbols
