	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dm9000_phy_write
_dm9000_phy_write:                      ## @dm9000_phy_write
	.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
	movl	%ecx, %r15d
	movl	%edx, %r12d
	callq	_netdev_priv
	movq	%rax, %rbx
	leaq	L_.str(%rip), %rdx
	movq	%rax, %rdi
	movl	$5, %esi
	movl	%r12d, %ecx
	movl	%r15d, %r8d
	callq	_dm9000_dbg
	cmpl	$0, 4(%rbx)
	jne	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	callq	_mutex_lock
LBB0_2:
	movq	%rbx, %r14
	addq	$8, %r14
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movl	12(%rbx), %edi
	callq	_readb
	movq	%rax, %r13
	movq	_DM9000_EPAR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_DM9000_PHY@GOTPCREL(%rip), %rax
	orl	(%rax), %r12d
	movq	%rbx, %rdi
	movl	%r12d, %edx
	callq	_iow
	movq	_DM9000_EPDRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	%r15d, %edx
	callq	_iow
	movq	_DM9000_EPDRH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	sarl	$8, %r15d
	movq	%rbx, %rdi
	movl	%r15d, %edx
	callq	_iow
	movq	_DM9000_EPCR@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	_EPCR_EPOS@GOTPCREL(%rip), %rax
	movq	_EPCR_ERPRW@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_iow
	movl	12(%rbx), %esi
	movq	%r13, %rdi
	callq	_writeb
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_dm9000_msleep
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movl	12(%rbx), %edi
	callq	_readb
	movq	%rax, %r15
	movl	(%r12), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_iow
	movl	12(%rbx), %esi
	movq	%r15, %rdi
	callq	_writeb
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	cmpl	$0, 4(%rbx)
	je	LBB0_4
## %bb.3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mutex_unlock                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"phy_write[%02x] = %04x\n"

	.comm	_DM9000_EPAR,4,2                ## @DM9000_EPAR
	.comm	_DM9000_PHY,4,2                 ## @DM9000_PHY
	.comm	_DM9000_EPDRL,4,2               ## @DM9000_EPDRL
	.comm	_DM9000_EPDRH,4,2               ## @DM9000_EPDRH
	.comm	_DM9000_EPCR,4,2                ## @DM9000_EPCR
	.comm	_EPCR_EPOS,4,2                  ## @EPCR_EPOS
	.comm	_EPCR_ERPRW,4,2                 ## @EPCR_ERPRW
	.no_dead_strip	_dm9000_phy_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dm9000_phy_write
_dm9000_phy_write:                      ; @dm9000_phy_write
	.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	x21, x3
	mov	x22, x2
	bl	_netdev_priv
	mov	x19, x0
Lloh0:
	adrp	x2, l_.str@PAGE
Lloh1:
	add	x2, x2, l_.str@PAGEOFF
	mov	w1, #5
	mov	x3, x22
	mov	x4, x21
	bl	_dm9000_dbg
	ldr	w8, [x19, #4]
	cbnz	w8, LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_mutex_lock
LBB0_2:
	add	x20, x19, #8
	mov	x0, x20
	bl	_spin_lock_irqsave
	ldr	w0, [x19, #12]
	bl	_readb
	mov	x23, x0
Lloh2:
	adrp	x8, _DM9000_EPAR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _DM9000_EPAR@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
Lloh5:
	adrp	x8, _DM9000_PHY@GOTPAGE
Lloh6:
	ldr	x8, [x8, _DM9000_PHY@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	orr	w2, w8, w22
	mov	x0, x19
	bl	_iow
Lloh8:
	adrp	x8, _DM9000_EPDRL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _DM9000_EPDRL@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x21
	bl	_iow
Lloh11:
	adrp	x8, _DM9000_EPDRH@GOTPAGE
Lloh12:
	ldr	x8, [x8, _DM9000_EPDRH@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	asr	w2, w21, #8
	mov	x0, x19
	bl	_iow
Lloh14:
	adrp	x22, _DM9000_EPCR@GOTPAGE
Lloh15:
	ldr	x22, [x22, _DM9000_EPCR@GOTPAGEOFF]
Lloh16:
	adrp	x8, _EPCR_EPOS@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EPCR_EPOS@GOTPAGEOFF]
	ldr	w1, [x22]
Lloh18:
	ldr	w8, [x8]
Lloh19:
	adrp	x9, _EPCR_ERPRW@GOTPAGE
Lloh20:
	ldr	x9, [x9, _EPCR_ERPRW@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	x0, x19
	bl	_iow
	ldr	w1, [x19, #12]
	mov	x0, x23
	bl	_writeb
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	mov	x0, x19
	mov	w1, #1
	bl	_dm9000_msleep
	mov	x0, x20
	bl	_spin_lock_irqsave
	ldr	w0, [x19, #12]
	bl	_readb
	mov	x21, x0
	ldr	w1, [x22]
	mov	x0, x19
	mov	w2, #0
	bl	_iow
	ldr	w1, [x19, #12]
	mov	x0, x21
	bl	_writeb
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	ldr	w8, [x19, #4]
	cbz	w8, LBB0_4
; %bb.3:
	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
LBB0_4:
	mov	x0, x19
	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
	b	_mutex_unlock
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"phy_write[%02x] = %04x\n"

	.comm	_DM9000_EPAR,4,2                ; @DM9000_EPAR
	.comm	_DM9000_PHY,4,2                 ; @DM9000_PHY
	.comm	_DM9000_EPDRL,4,2               ; @DM9000_EPDRL
	.comm	_DM9000_EPDRH,4,2               ; @DM9000_EPDRH
	.comm	_DM9000_EPCR,4,2                ; @DM9000_EPCR
	.comm	_EPCR_EPOS,4,2                  ; @EPCR_EPOS
	.comm	_EPCR_ERPRW,4,2                 ; @EPCR_ERPRW
	.no_dead_strip	_dm9000_phy_write
.subsections_via_symbols
