	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function at803x_set_wol
_at803x_set_wol:                        ## @at803x_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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %rax
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rdi, %r15
	movq	_WAKE_MAGIC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rsi)
	je	LBB0_6
## %bb.4:
	movq	_AT803X_LOC_MAC_ADDR_32_47_OFFSET@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r13d
	movq	_AT803X_LOC_MAC_ADDR_16_31_OFFSET@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r12d
	movq	_AT803X_LOC_MAC_ADDR_0_15_OFFSET@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r14d
	movq	(%rax), %rbx
	movq	%rbx, %rdi
	callq	_is_valid_ether_addr
	testl	%eax, %eax
	je	LBB0_10
## %bb.5:
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	movq	_AT803X_DEVICE_ADDR@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movl	(%rbx), %ecx
	shll	$8, %ecx
	orl	4(%rbx), %ecx
	movq	%r15, %rdi
	movl	%r13d, %edx
	callq	_phy_write_mmd
	movl	(%r14), %esi
	movl	8(%rbx), %ecx
	shll	$8, %ecx
	orl	12(%rbx), %ecx
	movq	%r15, %rdi
	movl	%r12d, %edx
	callq	_phy_write_mmd
	movl	(%r14), %esi
	movl	16(%rbx), %ecx
	shll	$8, %ecx
	orl	20(%rbx), %ecx
	movq	%r15, %rdi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_phy_write_mmd
	movq	_AT803X_INTR_ENABLE@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r15, %rdi
	callq	_phy_read
	movq	_AT803X_INTR_ENABLE_WOL@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	(%rbx), %esi
	movq	%r15, %rdi
	movl	%eax, %edx
	jmp	LBB0_7
LBB0_1:
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_6:
	movq	_AT803X_INTR_ENABLE@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r15, %rdi
	callq	_phy_read
	movq	_AT803X_INTR_ENABLE_WOL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	notl	%edx
	andl	%eax, %edx
	movl	(%rbx), %esi
	movq	%r15, %rdi
LBB0_7:
	callq	_phy_write
	testl	%eax, %eax
	jne	LBB0_9
## %bb.8:
	movq	_AT803X_INTR_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_phy_read
	xorl	%eax, %eax
	jmp	LBB0_9
LBB0_10:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AT803X_LOC_MAC_ADDR_32_47_OFFSET,4,2 ## @AT803X_LOC_MAC_ADDR_32_47_OFFSET
	.comm	_AT803X_LOC_MAC_ADDR_16_31_OFFSET,4,2 ## @AT803X_LOC_MAC_ADDR_16_31_OFFSET
	.comm	_AT803X_LOC_MAC_ADDR_0_15_OFFSET,4,2 ## @AT803X_LOC_MAC_ADDR_0_15_OFFSET
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_WAKE_MAGIC,4,2                 ## @WAKE_MAGIC
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_AT803X_DEVICE_ADDR,4,2         ## @AT803X_DEVICE_ADDR
	.comm	_AT803X_INTR_ENABLE,4,2         ## @AT803X_INTR_ENABLE
	.comm	_AT803X_INTR_ENABLE_WOL,4,2     ## @AT803X_INTR_ENABLE_WOL
	.comm	_AT803X_INTR_STATUS,4,2         ## @AT803X_INTR_STATUS
	.no_dead_strip	_at803x_set_wol
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function at803x_set_wol
_at803x_set_wol:                        ; @at803x_set_wol
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	ldr	x8, [x0]
	cbz	x8, LBB0_4
; %bb.1:
	mov	x19, x0
	ldr	w9, [x1]
Lloh0:
	adrp	x10, _WAKE_MAGIC@GOTPAGE
Lloh1:
	ldr	x10, [x10, _WAKE_MAGIC@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_5
; %bb.2:
Lloh3:
	adrp	x9, _AT803X_LOC_MAC_ADDR_32_47_OFFSET@GOTPAGE
Lloh4:
	ldr	x9, [x9, _AT803X_LOC_MAC_ADDR_32_47_OFFSET@GOTPAGEOFF]
Lloh5:
	adrp	x10, _AT803X_LOC_MAC_ADDR_16_31_OFFSET@GOTPAGE
Lloh6:
	ldr	x10, [x10, _AT803X_LOC_MAC_ADDR_16_31_OFFSET@GOTPAGEOFF]
Lloh7:
	ldr	w23, [x9]
Lloh8:
	ldr	w22, [x10]
Lloh9:
	adrp	x9, _AT803X_LOC_MAC_ADDR_0_15_OFFSET@GOTPAGE
Lloh10:
	ldr	x9, [x9, _AT803X_LOC_MAC_ADDR_0_15_OFFSET@GOTPAGEOFF]
Lloh11:
	ldr	w20, [x9]
	ldr	x21, [x8]
	mov	x0, x21
	bl	_is_valid_ether_addr
	cbz	w0, LBB0_8
; %bb.3:
Lloh12:
	adrp	x24, _AT803X_DEVICE_ADDR@GOTPAGE
Lloh13:
	ldr	x24, [x24, _AT803X_DEVICE_ADDR@GOTPAGEOFF]
	ldr	w1, [x24]
	ldp	w9, w8, [x21]
	orr	w3, w8, w9, lsl #8
	mov	x0, x19
	mov	x2, x23
	bl	_phy_write_mmd
	ldr	w1, [x24]
	ldp	w9, w8, [x21, #8]
	orr	w3, w8, w9, lsl #8
	mov	x0, x19
	mov	x2, x22
	bl	_phy_write_mmd
	ldr	w1, [x24]
	ldp	w9, w8, [x21, #16]
	orr	w3, w8, w9, lsl #8
	mov	x0, x19
	mov	x2, x20
	bl	_phy_write_mmd
Lloh14:
	adrp	x20, _AT803X_INTR_ENABLE@GOTPAGE
Lloh15:
	ldr	x20, [x20, _AT803X_INTR_ENABLE@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_phy_read
Lloh16:
	adrp	x8, _AT803X_INTR_ENABLE_WOL@GOTPAGE
Lloh17:
	ldr	x8, [x8, _AT803X_INTR_ENABLE_WOL@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	orr	w2, w8, w0
	b	LBB0_6
LBB0_4:
Lloh19:
	adrp	x8, _ENODEV@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_9
LBB0_5:
Lloh21:
	adrp	x20, _AT803X_INTR_ENABLE@GOTPAGE
Lloh22:
	ldr	x20, [x20, _AT803X_INTR_ENABLE@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_phy_read
Lloh23:
	adrp	x8, _AT803X_INTR_ENABLE_WOL@GOTPAGE
Lloh24:
	ldr	x8, [x8, _AT803X_INTR_ENABLE_WOL@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	bic	w2, w0, w8
LBB0_6:
	ldr	w1, [x20]
	mov	x0, x19
	bl	_phy_write
	cbnz	w0, LBB0_10
; %bb.7:
Lloh26:
	adrp	x8, _AT803X_INTR_STATUS@GOTPAGE
Lloh27:
	ldr	x8, [x8, _AT803X_INTR_STATUS@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_phy_read
	mov	w0, #0
	b	LBB0_10
LBB0_8:
Lloh29:
	adrp	x8, _EINVAL@GOTPAGE
Lloh30:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_10:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh7
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_AT803X_LOC_MAC_ADDR_32_47_OFFSET,4,2 ; @AT803X_LOC_MAC_ADDR_32_47_OFFSET
	.comm	_AT803X_LOC_MAC_ADDR_16_31_OFFSET,4,2 ; @AT803X_LOC_MAC_ADDR_16_31_OFFSET
	.comm	_AT803X_LOC_MAC_ADDR_0_15_OFFSET,4,2 ; @AT803X_LOC_MAC_ADDR_0_15_OFFSET
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_WAKE_MAGIC,4,2                 ; @WAKE_MAGIC
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_AT803X_DEVICE_ADDR,4,2         ; @AT803X_DEVICE_ADDR
	.comm	_AT803X_INTR_ENABLE,4,2         ; @AT803X_INTR_ENABLE
	.comm	_AT803X_INTR_ENABLE_WOL,4,2     ; @AT803X_INTR_ENABLE_WOL
	.comm	_AT803X_INTR_STATUS,4,2         ; @AT803X_INTR_STATUS
	.no_dead_strip	_at803x_set_wol
.subsections_via_symbols
