	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dm9000_write_eeprom
_dm9000_write_eeprom:                   ## @dm9000_write_eeprom
	.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	_DM9000_PLATF_NO_EEPROM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rdi)
	je	LBB0_2
## %bb.1:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	%rdx, %r12
	movl	%esi, %r13d
	movq	%rdi, %rbx
	leaq	4(%rdi), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	leaq	8(%rbx), %r15
	movq	%r15, %rdi
	callq	_spin_lock_irqsave
	movq	_DM9000_EPAR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	%r13d, %edx
	callq	_iow
	movq	_DM9000_EPDRH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	4(%r12), %edx
	movq	%rbx, %rdi
	callq	_iow
	movq	_DM9000_EPDRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r12), %edx
	movq	%rbx, %rdi
	callq	_iow
	movq	_DM9000_EPCR@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	_EPCR_WEP@GOTPCREL(%rip), %rax
	movq	_EPCR_ERPRW@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_iow
	movq	%r15, %rdi
	callq	_spin_unlock_irqrestore
	movq	%rbx, %rdi
	callq	_dm9000_wait_eeprom
	movl	$1, %edi
	callq	_mdelay
	movq	%r15, %rdi
	callq	_spin_lock_irqsave
	movl	(%r12), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_iow
	movq	%r15, %rdi
	callq	_spin_unlock_irqrestore
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mutex_unlock                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_DM9000_PLATF_NO_EEPROM,4,2     ## @DM9000_PLATF_NO_EEPROM
	.comm	_DM9000_EPAR,4,2                ## @DM9000_EPAR
	.comm	_DM9000_EPDRH,4,2               ## @DM9000_EPDRH
	.comm	_DM9000_EPDRL,4,2               ## @DM9000_EPDRL
	.comm	_DM9000_EPCR,4,2                ## @DM9000_EPCR
	.comm	_EPCR_WEP,4,2                   ## @EPCR_WEP
	.comm	_EPCR_ERPRW,4,2                 ## @EPCR_ERPRW
	.no_dead_strip	_dm9000_write_eeprom
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dm9000_write_eeprom
_dm9000_write_eeprom:                   ; @dm9000_write_eeprom
	.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	w8, [x0]
Lloh0:
	adrp	x9, _DM9000_PLATF_NO_EEPROM@GOTPAGE
Lloh1:
	ldr	x9, [x9, _DM9000_PLATF_NO_EEPROM@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
	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_2:
	mov	x22, x2
	mov	x23, x1
	mov	x20, x0
	add	x19, x0, #4
	mov	x0, x19
	bl	_mutex_lock
	add	x21, x20, #8
	mov	x0, x21
	bl	_spin_lock_irqsave
Lloh3:
	adrp	x8, _DM9000_EPAR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DM9000_EPAR@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x20
	mov	x2, x23
	bl	_iow
Lloh6:
	adrp	x8, _DM9000_EPDRH@GOTPAGE
Lloh7:
	ldr	x8, [x8, _DM9000_EPDRH@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	ldr	w2, [x22, #4]
	mov	x0, x20
	bl	_iow
Lloh9:
	adrp	x8, _DM9000_EPDRL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _DM9000_EPDRL@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	ldr	w2, [x22]
	mov	x0, x20
	bl	_iow
Lloh12:
	adrp	x22, _DM9000_EPCR@GOTPAGE
Lloh13:
	ldr	x22, [x22, _DM9000_EPCR@GOTPAGEOFF]
Lloh14:
	adrp	x8, _EPCR_WEP@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EPCR_WEP@GOTPAGEOFF]
	ldr	w1, [x22]
Lloh16:
	ldr	w8, [x8]
Lloh17:
	adrp	x9, _EPCR_ERPRW@GOTPAGE
Lloh18:
	ldr	x9, [x9, _EPCR_ERPRW@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	x0, x20
	bl	_iow
	mov	x0, x21
	bl	_spin_unlock_irqrestore
	mov	x0, x20
	bl	_dm9000_wait_eeprom
	mov	w0, #1
	bl	_mdelay
	mov	x0, x21
	bl	_spin_lock_irqsave
	ldr	w1, [x22]
	mov	x0, x20
	mov	w2, #0
	bl	_iow
	mov	x0, x21
	bl	_spin_unlock_irqrestore
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_DM9000_PLATF_NO_EEPROM,4,2     ; @DM9000_PLATF_NO_EEPROM
	.comm	_DM9000_EPAR,4,2                ; @DM9000_EPAR
	.comm	_DM9000_EPDRH,4,2               ; @DM9000_EPDRH
	.comm	_DM9000_EPDRL,4,2               ; @DM9000_EPDRL
	.comm	_DM9000_EPCR,4,2                ; @DM9000_EPCR
	.comm	_EPCR_WEP,4,2                   ; @EPCR_WEP
	.comm	_EPCR_ERPRW,4,2                 ; @EPCR_ERPRW
	.no_dead_strip	_dm9000_write_eeprom
.subsections_via_symbols
