	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function be_setup_wol
_be_setup_wol:                          ## @be_setup_wol
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	%rsp, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_ETH_ALEN@GOTPCREL(%rip), %rbx
	movl	(%rbx), %eax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r13
	movl	(%rbx), %edx
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_memset
	movl	$4, -64(%rbp)
	movq	(%r15), %rdi
	leaq	-60(%rbp), %rdx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movq	___GFP_ZERO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movl	$4, %esi
	callq	_dma_alloc_coherent
	movq	%rax, -56(%rbp)
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	testl	%r14d, %r14d
	je	LBB0_6
## %bb.3:
	movq	(%r15), %rdi
	movq	_PCICFG_PM_CONTROL_OFFSET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_PCICFG_PM_CONTROL_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_pci_write_config_dword
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movl	%eax, %r14d
	movq	(%r15), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	jmp	LBB0_8
LBB0_1:
	movl	$-1, %r14d
	jmp	LBB0_9
LBB0_6:
	leaq	-64(%rbp), %rdx
	movq	%r15, %rdi
	movq	%r13, %rsi
	callq	_be_cmd_enable_magic_wol
	movl	%eax, %r14d
	xorl	%ebx, %ebx
	jmp	LBB0_7
LBB0_5:
	movq	8(%r15), %rax
	movq	(%rax), %rsi
	leaq	-64(%rbp), %rdx
	movq	%r15, %rdi
	callq	_be_cmd_enable_magic_wol
	movl	%eax, %r14d
	movl	$1, %ebx
LBB0_7:
	movq	(%r15), %rdi
	movq	_PCI_D3hot@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edx
	callq	_pci_enable_wake
	movq	(%r15), %rdi
	movq	_PCI_D3cold@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edx
	callq	_pci_enable_wake
LBB0_8:
	movq	(%r15), %rdi
	movq	-56(%rbp), %rdx
	movl	-64(%rbp), %esi
	movl	-60(%rbp), %ecx
	callq	_dma_free_coherent
LBB0_9:
	movq	%r12, %rsp
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_11
## %bb.10:
	movl	%r14d, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_ETH_ALEN,4,2                   ## @ETH_ALEN
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	___GFP_ZERO,4,2                 ## @__GFP_ZERO
	.comm	_PCICFG_PM_CONTROL_OFFSET,4,2   ## @PCICFG_PM_CONTROL_OFFSET
	.comm	_PCICFG_PM_CONTROL_MASK,4,2     ## @PCICFG_PM_CONTROL_MASK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Could not enable Wake-on-lan\n"

	.comm	_PCI_D3hot,4,2                  ## @PCI_D3hot
	.comm	_PCI_D3cold,4,2                 ## @PCI_D3cold
	.no_dead_strip	_be_setup_wol
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function be_setup_wol
_be_setup_wol:                          ; @be_setup_wol
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	sub	sp, sp, #32
	mov	x20, x1
	mov	x19, x0
	mov	x22, sp
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
Lloh3:
	adrp	x12, _ETH_ALEN@GOTPAGE
Lloh4:
	ldr	x12, [x12, _ETH_ALEN@GOTPAGEOFF]
	ldr	w8, [x12]
	lsl	x8, x8, #2
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x21, x9, x8
	mov	sp, x21
	ldr	w2, [x12]
	mov	x0, x21
	mov	w1, #0
	bl	_memset
	mov	w8, #4
	stur	w8, [x29, #-56]
	ldr	x0, [x19]
	sub	x8, x29, #56
Lloh7:
	adrp	x9, _GFP_KERNEL@GOTPAGE
Lloh8:
	ldr	x9, [x9, _GFP_KERNEL@GOTPAGEOFF]
	orr	x2, x8, #0x4
Lloh9:
	ldr	w8, [x9]
Lloh10:
	adrp	x9, ___GFP_ZERO@GOTPAGE
Lloh11:
	ldr	x9, [x9, ___GFP_ZERO@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	orr	w3, w9, w8
	mov	w1, #4
	bl	_dma_alloc_coherent
	stur	x0, [x29, #-48]
	cbz	x0, LBB0_4
; %bb.1:
	cbz	w20, LBB0_5
; %bb.2:
	ldr	x0, [x19]
Lloh13:
	adrp	x8, _PCICFG_PM_CONTROL_OFFSET@GOTPAGE
Lloh14:
	ldr	x8, [x8, _PCICFG_PM_CONTROL_OFFSET@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
Lloh16:
	adrp	x8, _PCICFG_PM_CONTROL_MASK@GOTPAGE
Lloh17:
	ldr	x8, [x8, _PCICFG_PM_CONTROL_MASK@GOTPAGEOFF]
Lloh18:
	ldr	w2, [x8]
	bl	_pci_write_config_dword
	cbz	w0, LBB0_6
; %bb.3:
	mov	x20, x0
	ldr	x0, [x19]
Lloh19:
	adrp	x1, l_.str@PAGE
Lloh20:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	b	LBB0_8
LBB0_4:
	mov	w20, #-1
	b	LBB0_9
LBB0_5:
	sub	x2, x29, #56
	mov	x0, x19
	mov	x1, x21
	bl	_be_cmd_enable_magic_wol
	mov	x20, x0
	mov	w21, #0
	b	LBB0_7
LBB0_6:
	ldr	x8, [x19, #8]
	ldr	x1, [x8]
	sub	x2, x29, #56
	mov	x0, x19
	bl	_be_cmd_enable_magic_wol
	mov	x20, x0
	mov	w21, #1
LBB0_7:
	ldr	x0, [x19]
Lloh21:
	adrp	x8, _PCI_D3hot@GOTPAGE
Lloh22:
	ldr	x8, [x8, _PCI_D3hot@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	mov	x2, x21
	bl	_pci_enable_wake
	ldr	x0, [x19]
Lloh24:
	adrp	x8, _PCI_D3cold@GOTPAGE
Lloh25:
	ldr	x8, [x8, _PCI_D3cold@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
	mov	x2, x21
	bl	_pci_enable_wake
LBB0_8:
	ldr	x0, [x19]
	ldur	x2, [x29, #-48]
	ldp	w1, w3, [x29, #-56]
	bl	_dma_free_coherent
LBB0_9:
	mov	sp, x22
	ldur	x8, [x29, #-40]
Lloh27:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh28:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh29:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_11
; %bb.10:
	mov	x0, x20
	sub	sp, x29, #32
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_11:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_ETH_ALEN,4,2                   ; @ETH_ALEN
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	___GFP_ZERO,4,2                 ; @__GFP_ZERO
	.comm	_PCICFG_PM_CONTROL_OFFSET,4,2   ; @PCICFG_PM_CONTROL_OFFSET
	.comm	_PCICFG_PM_CONTROL_MASK,4,2     ; @PCICFG_PM_CONTROL_MASK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Could not enable Wake-on-lan\n"

	.comm	_PCI_D3hot,4,2                  ; @PCI_D3hot
	.comm	_PCI_D3cold,4,2                 ; @PCI_D3cold
	.no_dead_strip	_be_setup_wol
.subsections_via_symbols
