	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fec_enet_set_wol
_fec_enet_set_wol:                      ## @fec_enet_set_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %rbx
	callq	_netdev_priv
	movq	%rax, %r14
	movq	_FEC_WOL_HAS_MAGIC_PACKET@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r14)
	je	LBB0_1
## %bb.2:
	movl	(%r15), %eax
	movq	_WAKE_MAGIC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%esi, %ecx
	notl	%ecx
	testl	%ecx, %eax
	je	LBB0_3
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_8:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	andl	%eax, %esi
	movq	%rbx, %rdi
	callq	_device_set_wakeup_enable
	movq	%rbx, %rdi
	callq	_device_may_wakeup
	movq	_FEC_WOL_FLAG_ENABLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testq	%rax, %rax
	je	LBB0_6
## %bb.4:
	orl	%ecx, (%r14)
	movq	8(%r14), %rax
	movq	(%rax), %rdi
	xorl	%ebx, %ebx
	testq	%rdi, %rdi
	jle	LBB0_8
## %bb.5:
	callq	_enable_irq_wake
	jmp	LBB0_8
LBB0_6:
	notl	%ecx
	andl	%ecx, (%r14)
	movq	8(%r14), %rax
	movq	(%rax), %rdi
	xorl	%ebx, %ebx
	testq	%rdi, %rdi
	jle	LBB0_8
## %bb.7:
	callq	_disable_irq_wake
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_FEC_WOL_HAS_MAGIC_PACKET,4,2   ## @FEC_WOL_HAS_MAGIC_PACKET
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_WAKE_MAGIC,4,2                 ## @WAKE_MAGIC
	.comm	_FEC_WOL_FLAG_ENABLE,4,2        ## @FEC_WOL_FLAG_ENABLE
	.no_dead_strip	_fec_enet_set_wol
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fec_enet_set_wol
_fec_enet_set_wol:                      ; @fec_enet_set_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
	mov	x21, x1
	mov	x20, x0
	bl	_netdev_priv
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _FEC_WOL_HAS_MAGIC_PACKET@GOTPAGE
Lloh1:
	ldr	x9, [x9, _FEC_WOL_HAS_MAGIC_PACKET@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
	ldr	w8, [x21]
Lloh3:
	adrp	x9, _WAKE_MAGIC@GOTPAGE
Lloh4:
	ldr	x9, [x9, _WAKE_MAGIC@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	bics	wzr, w8, w9
	b.eq	LBB0_3
LBB0_2:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_9
LBB0_3:
	mov	x19, x0
	and	w1, w9, w8
	mov	x0, x20
	bl	_device_set_wakeup_enable
	mov	x0, x20
	bl	_device_may_wakeup
Lloh9:
	adrp	x8, _FEC_WOL_FLAG_ENABLE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _FEC_WOL_FLAG_ENABLE@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	cbz	x0, LBB0_6
; %bb.4:
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
	ldr	x8, [x19, #8]
	ldr	x0, [x8]
	cmp	x0, #1
	b.lt	LBB0_8
; %bb.5:
	bl	_enable_irq_wake
	b	LBB0_8
LBB0_6:
	ldr	w9, [x19]
	bic	w8, w9, w8
	str	w8, [x19]
	ldr	x8, [x19, #8]
	ldr	x0, [x8]
	cmp	x0, #1
	b.lt	LBB0_8
; %bb.7:
	bl	_disable_irq_wake
LBB0_8:
	mov	w0, #0
LBB0_9:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_FEC_WOL_HAS_MAGIC_PACKET,4,2   ; @FEC_WOL_HAS_MAGIC_PACKET
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_WAKE_MAGIC,4,2                 ; @WAKE_MAGIC
	.comm	_FEC_WOL_FLAG_ENABLE,4,2        ; @FEC_WOL_FLAG_ENABLE
	.no_dead_strip	_fec_enet_set_wol
.subsections_via_symbols
