	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dm9000_set_wol
_dm9000_set_wol:                        ## @dm9000_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	%rsi, %rbx
	callq	_to_dm9000_board
	cmpl	$0, 16(%rax)
	je	LBB0_1
## %bb.3:
	movq	%rax, %r14
	movl	(%rbx), %r13d
	movq	_WAKE_MAGIC@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%ebx, %eax
	notl	%eax
	testl	%eax, %r13d
	je	LBB0_5
## %bb.4:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_1:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_14
LBB0_5:
	andl	%r13d, %ebx
	je	LBB0_7
## %bb.6:
	movq	_WCR_MAGICEN@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_7:
	leaq	8(%r14), %r15
	movq	%r15, %rdi
	callq	_mutex_lock
	movq	%r14, %r12
	addq	$12, %r12
	movq	%r12, %rdi
	callq	_spin_lock_irqsave
	movq	_DM9000_WCR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_iow
	movq	%r12, %rdi
	callq	_spin_unlock_irqrestore
	movq	%r15, %rdi
	callq	_mutex_unlock
	movl	(%r14), %eax
	cmpl	%r13d, %eax
	je	LBB0_13
## %bb.8:
	testl	%eax, %eax
	je	LBB0_9
## %bb.10:
	testl	%r13d, %r13d
	jne	LBB0_13
## %bb.11:
	xorl	%esi, %esi
	jmp	LBB0_12
LBB0_9:
	movl	$1, %esi
LBB0_12:
	movl	4(%r14), %edi
	callq	_irq_set_irq_wake
LBB0_13:
	movl	%r13d, (%r14)
	xorl	%eax, %eax
LBB0_14:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.comm	_WAKE_MAGIC,4,2                 ## @WAKE_MAGIC
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_WCR_MAGICEN,4,2                ## @WCR_MAGICEN
	.comm	_DM9000_WCR,4,2                 ## @DM9000_WCR
	.no_dead_strip	_dm9000_set_wol
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dm9000_set_wol
_dm9000_set_wol:                        ; @dm9000_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
	mov	x20, x1
	bl	_to_dm9000_board
	ldr	w8, [x0, #16]
	cbz	w8, LBB0_3
; %bb.1:
	ldr	w23, [x20]
Lloh0:
	adrp	x8, _WAKE_MAGIC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _WAKE_MAGIC@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	bics	wzr, w23, w8
	b.eq	LBB0_5
; %bb.2:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:
Lloh5:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_12
LBB0_5:
	mov	x19, x0
Lloh7:
	adrp	x9, _WCR_MAGICEN@GOTPAGE
Lloh8:
	ldr	x9, [x9, _WCR_MAGICEN@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	tst	w8, w23
	csel	w20, wzr, w9, eq
	add	x21, x0, #8
	mov	x0, x21
	bl	_mutex_lock
	add	x22, x19, #12
	mov	x0, x22
	bl	_spin_lock_irqsave
Lloh10:
	adrp	x8, _DM9000_WCR@GOTPAGE
Lloh11:
	ldr	x8, [x8, _DM9000_WCR@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	bl	_iow
	mov	x0, x22
	bl	_spin_unlock_irqrestore
	mov	x0, x21
	bl	_mutex_unlock
	ldr	w8, [x19]
	cmp	w8, w23
	b.eq	LBB0_11
; %bb.6:
	cbz	w8, LBB0_9
; %bb.7:
	cbnz	w23, LBB0_11
; %bb.8:
	mov	w1, #0
	b	LBB0_10
LBB0_9:
	mov	w1, #1
LBB0_10:
	ldr	w0, [x19, #4]
	bl	_irq_set_irq_wake
LBB0_11:
	mov	w0, #0
	str	w23, [x19]
LBB0_12:
	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 AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.comm	_WAKE_MAGIC,4,2                 ; @WAKE_MAGIC
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_WCR_MAGICEN,4,2                ; @WCR_MAGICEN
	.comm	_DM9000_WCR,4,2                 ; @DM9000_WCR
	.no_dead_strip	_dm9000_set_wol
.subsections_via_symbols
