	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dm_write_shared_word
_dm_write_shared_word:                  ## @dm_write_shared_word
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r12d
	movl	%esi, %r13d
	movq	%rdi, %r15
	movl	%ecx, -52(%rbp)
	callq	_mutex_lock
	movq	_DM_SHARED_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-52(%rbp), %rcx
	movq	%r15, %rdi
	movl	$2, %edx
	callq	_dm_write
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_13
## %bb.1:
	movq	_DM_SHARED_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r12d, %edx
	orl	$64, %edx
	xorl	%r14d, %r14d
	movl	%r13d, -48(%rbp)                ## 4-byte Spill
	testl	%r13d, %r13d
	setne	%r14b
	cmovel	%r12d, %edx
	movq	%r15, %rdi
	callq	_dm_write_reg
	movq	_DM_SHARED_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leal	18(,%r14,8), %edx
	movq	%r15, %rdi
	callq	_dm_write_reg
	movq	_DM_TIMEOUT@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	xorl	%r14d, %r14d
	testl	%eax, %eax
	jle	LBB0_10
## %bb.2:
	leaq	-44(%rbp), %r12
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	$0, -44(%rbp)
	movl	$1, %edi
	callq	_udelay
	movq	_DM_SHARED_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movq	%r12, %rdx
	callq	_dm_read_reg
	xorl	%ecx, %ecx
	testb	$1, -44(%rbp)
	movl	%eax, %ebx
	sete	%dl
	movl	$2, %eax
	testl	%ebx, %ebx
	js	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movb	%dl, %cl
	leal	(%rcx,%rcx,2), %eax
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	testl	%eax, %eax
	jne	LBB0_6
## %bb.9:                               ##   in Loop: Header=BB0_3 Depth=1
	incl	%r14d
	movl	(%r13), %eax
	cmpl	%eax, %r14d
	jl	LBB0_3
LBB0_10:
	cmpl	%eax, %r14d
	jne	LBB0_12
LBB0_11:
	cmpl	$0, -48(%rbp)                   ## 4-byte Folded Reload
	movl	4(%r15), %edi
	leaq	L_.str.2(%rip), %rax
	leaq	L_.str.1(%rip), %rdx
	cmoveq	%rax, %rdx
	leaq	L_.str(%rip), %rsi
	callq	_netdev_err
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_13
LBB0_6:
	cmpl	$2, %eax
	je	LBB0_13
## %bb.7:
	cmpl	$3, %eax
	jne	LBB0_14
## %bb.8:
	movl	(%r13), %eax
	cmpl	%eax, %r14d
	je	LBB0_11
LBB0_12:
	movq	_DM_SHARED_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_dm_write_reg
LBB0_13:
	movq	%r15, %rdi
	callq	_mutex_unlock
LBB0_15:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
                                        ## implicit-def: $ebx
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_DM_SHARED_DATA,4,2             ## @DM_SHARED_DATA
	.comm	_DM_SHARED_ADDR,4,2             ## @DM_SHARED_ADDR
	.comm	_DM_SHARED_CTRL,4,2             ## @DM_SHARED_CTRL
	.comm	_DM_TIMEOUT,4,2                 ## @DM_TIMEOUT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s write timed out!\n"

L_.str.1:                               ## @.str.1
	.asciz	"phy"

L_.str.2:                               ## @.str.2
	.asciz	"eeprom"

	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_dm_write_shared_word
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dm_write_shared_word
_dm_write_shared_word:                  ; @dm_write_shared_word
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x22, x2
	mov	x20, x1
	mov	x19, x0
	str	w3, [sp, #12]
	bl	_mutex_lock
Lloh0:
	adrp	x8, _DM_SHARED_DATA@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DM_SHARED_DATA@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x3, sp, #12
	mov	x0, x19
	mov	w2, #2
	bl	_dm_write
	mov	x21, x0
	tbnz	w0, #31, LBB0_12
; %bb.1:
Lloh3:
	adrp	x8, _DM_SHARED_ADDR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DM_SHARED_ADDR@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	orr	w8, w22, #0x40
	cmp	w20, #0
	csel	w2, w22, w8, eq
	mov	w8, #26
	mov	w9, #18
	csel	w22, w9, w8, eq
	mov	x0, x19
	bl	_dm_write_reg
Lloh6:
	adrp	x23, _DM_SHARED_CTRL@GOTPAGE
Lloh7:
	ldr	x23, [x23, _DM_SHARED_CTRL@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	x0, x19
	mov	x2, x22
	bl	_dm_write_reg
Lloh8:
	adrp	x24, _DM_TIMEOUT@GOTPAGE
Lloh9:
	ldr	x24, [x24, _DM_TIMEOUT@GOTPAGEOFF]
	ldr	w8, [x24]
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.2:
	mov	w22, #0
	mov	w25, #3
	mov	w26, #2
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	str	wzr, [sp, #8]
	mov	w0, #1
	bl	_udelay
	ldr	w1, [x23]
	add	x2, sp, #8
	mov	x0, x19
	bl	_dm_read_reg
	mov	x21, x0
	ldr	w8, [sp, #8]
	tst	w8, #0x1
	csel	w8, w25, wzr, eq
	cmp	w0, #0
	csel	w8, w26, w8, lt
	cbnz	w8, LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	w22, w22, #1
	ldr	w8, [x24]
	cmp	w22, w8
	b.lt	LBB0_3
	b	LBB0_8
LBB0_5:
	cmp	w8, #2
	b.eq	LBB0_12
; %bb.6:
	cmp	w8, #3
	b.ne	LBB0_14
; %bb.7:
	ldr	w8, [x24]
LBB0_8:
	cmp	w22, w8
	b.ne	LBB0_11
LBB0_9:
	ldr	w0, [x19, #4]
Lloh10:
	adrp	x8, l_.str.1@PAGE
Lloh11:
	add	x8, x8, l_.str.1@PAGEOFF
Lloh12:
	adrp	x9, l_.str.2@PAGE
Lloh13:
	add	x9, x9, l_.str.2@PAGEOFF
	cmp	w20, #0
	csel	x2, x9, x8, eq
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	bl	_netdev_err
Lloh16:
	adrp	x8, _EIO@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_12
LBB0_10:
	mov	w22, #0
	cmp	w22, w8
	b.eq	LBB0_9
LBB0_11:
	ldr	w1, [x23]
	mov	x0, x19
	mov	w2, #0
	bl	_dm_write_reg
LBB0_12:
	mov	x0, x19
	bl	_mutex_unlock
LBB0_13:
	mov	x0, x21
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_14:
                                        ; implicit-def: $w21
	b	LBB0_13
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_DM_SHARED_DATA,4,2             ; @DM_SHARED_DATA
	.comm	_DM_SHARED_ADDR,4,2             ; @DM_SHARED_ADDR
	.comm	_DM_SHARED_CTRL,4,2             ; @DM_SHARED_CTRL
	.comm	_DM_TIMEOUT,4,2                 ; @DM_TIMEOUT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s write timed out!\n"

l_.str.1:                               ; @.str.1
	.asciz	"phy"

l_.str.2:                               ; @.str.2
	.asciz	"eeprom"

	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_dm_write_shared_word
.subsections_via_symbols
