	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dm_read_shared_word
_dm_read_shared_word:                   ## @dm_read_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
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movl	%edx, %ebx
	movl	%esi, %r15d
	movq	%rdi, %r13
	callq	_mutex_lock
	movq	_DM_SHARED_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edx
	orl	$64, %edx
	xorl	%r14d, %r14d
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	testl	%r15d, %r15d
	setne	%r14b
	movl	%ebx, -52(%rbp)                 ## 4-byte Spill
	cmovel	%ebx, %edx
	movq	%r13, %rdi
	callq	_dm_write_reg
	movq	_DM_SHARED_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leal	4(,%r14,8), %edx
	movq	%r13, %rdi
	callq	_dm_write_reg
	movq	_DM_TIMEOUT@GOTPCREL(%rip), %r15
	movl	(%r15), %eax
	xorl	%r14d, %r14d
	testl	%eax, %eax
	jle	LBB0_9
## %bb.1:
	leaq	-48(%rbp), %r12
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	$0, -48(%rbp)
	movl	$1, %edi
	callq	_udelay
	movq	_DM_SHARED_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	movq	%r12, %rdx
	callq	_dm_read_reg
	movl	%eax, %ebx
	movl	$5, %eax
	testl	%ebx, %ebx
	js	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	-48(%rbp), %eax
	addl	%eax, %eax
	notl	%eax
	andl	$2, %eax
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	testl	%eax, %eax
	jne	LBB0_5
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	incl	%r14d
	movl	(%r15), %eax
	cmpl	%eax, %r14d
	jl	LBB0_2
LBB0_9:
	cmpl	%eax, %r14d
	jne	LBB0_11
LBB0_10:
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	movl	4(%r13), %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_12
LBB0_5:
	cmpl	$5, %eax
	je	LBB0_12
## %bb.6:
	cmpl	$2, %eax
	jne	LBB0_13
## %bb.7:
	movl	(%r15), %eax
	cmpl	%eax, %r14d
	je	LBB0_10
LBB0_11:
	movq	_DM_SHARED_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	xorl	%edx, %edx
	callq	_dm_write_reg
	movq	_DM_SHARED_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	movl	$2, %edx
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rcx
	callq	_dm_read
	movl	%eax, %ebx
	movl	4(%r13), %edi
	movl	(%r14), %r8d
	leaq	L_.str.3(%rip), %rsi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	movl	%eax, %r9d
	callq	_netdev_dbg
LBB0_12:
	movq	%r13, %rdi
	callq	_mutex_unlock
LBB0_14:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
                                        ## implicit-def: $ebx
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.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 read timed out!\n"

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

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

	.comm	_EIO,4,2                        ## @EIO
	.comm	_DM_SHARED_DATA,4,2             ## @DM_SHARED_DATA
L_.str.3:                               ## @.str.3
	.asciz	"read shared %d 0x%02x returned 0x%04x, %d\n"

	.no_dead_strip	_dm_read_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_read_shared_word
_dm_read_shared_word:                   ; @dm_read_shared_word
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x22, x3
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
	bl	_mutex_lock
Lloh0:
	adrp	x8, _DM_SHARED_ADDR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DM_SHARED_ADDR@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	orr	w8, w21, #0x40
	cmp	w20, #0
	csel	w2, w21, w8, eq
	mov	w8, #12
	mov	w9, #4
	csel	w23, w9, w8, eq
	mov	x0, x19
	bl	_dm_write_reg
Lloh3:
	adrp	x24, _DM_SHARED_CTRL@GOTPAGE
Lloh4:
	ldr	x24, [x24, _DM_SHARED_CTRL@GOTPAGEOFF]
	ldr	w1, [x24]
	mov	x0, x19
	mov	x2, x23
	bl	_dm_write_reg
Lloh5:
	adrp	x26, _DM_TIMEOUT@GOTPAGE
Lloh6:
	ldr	x26, [x26, _DM_TIMEOUT@GOTPAGEOFF]
	ldr	w8, [x26]
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.1:
	mov	w25, #0
	mov	w27, #2
	mov	w28, #5
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	str	wzr, [sp, #12]
	mov	w0, #1
	bl	_udelay
	ldr	w1, [x24]
	add	x2, sp, #12
	mov	x0, x19
	bl	_dm_read_reg
	ldr	w8, [sp, #12]
	bic	w8, w27, w8, lsl #1
	cmp	w0, #0
	csel	w8, w28, w8, lt
	cbnz	w8, LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	w25, w25, #1
	ldr	w8, [x26]
	cmp	w25, w8
	b.lt	LBB0_2
	b	LBB0_7
LBB0_4:
	cmp	w8, #5
	b.eq	LBB0_11
; %bb.5:
	cmp	w8, #2
	b.ne	LBB0_14
; %bb.6:
	ldr	w8, [x26]
LBB0_7:
	cmp	w25, w8
	b.ne	LBB0_10
LBB0_8:
	ldr	w0, [x19, #4]
Lloh7:
	adrp	x8, l_.str.1@PAGE
Lloh8:
	add	x8, x8, l_.str.1@PAGEOFF
Lloh9:
	adrp	x9, l_.str.2@PAGE
Lloh10:
	add	x9, x9, l_.str.2@PAGEOFF
	cmp	w20, #0
	csel	x2, x9, x8, eq
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	bl	_netdev_err
Lloh13:
	adrp	x8, _EIO@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_12
LBB0_9:
	mov	w25, #0
	cmp	w25, w8
	b.eq	LBB0_8
LBB0_10:
	ldr	w1, [x24]
	mov	x0, x19
	mov	w2, #0
	bl	_dm_write_reg
Lloh16:
	adrp	x8, _DM_SHARED_DATA@GOTPAGE
Lloh17:
	ldr	x8, [x8, _DM_SHARED_DATA@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #2
	mov	x3, x22
	bl	_dm_read
	mov	x23, x0
	ldr	w0, [x19, #4]
	ldr	w4, [x22]
Lloh19:
	adrp	x1, l_.str.3@PAGE
Lloh20:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x2, x20
	mov	x3, x21
	mov	x5, x23
	bl	_netdev_dbg
	b	LBB0_12
LBB0_11:
	mov	x23, x0
LBB0_12:
	mov	x0, x19
	bl	_mutex_unlock
LBB0_13:
	mov	x0, x23
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_14:
                                        ; implicit-def: $w23
	b	LBB0_13
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.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 read timed out!\n"

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

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

	.comm	_EIO,4,2                        ; @EIO
	.comm	_DM_SHARED_DATA,4,2             ; @DM_SHARED_DATA
l_.str.3:                               ; @.str.3
	.asciz	"read shared %d 0x%02x returned 0x%04x, %d\n"

	.no_dead_strip	_dm_read_shared_word
.subsections_via_symbols
