	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function emac_update_phystatus
_emac_update_phystatus:                 ## @emac_update_phystatus
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	40(%rdi), %r14
	movq	_EMAC_MACCONTROL@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	callq	_emac_read
	movq	_EMAC_MACCONTROL_FULLDUPLEXEN@GOTPCREL(%rip), %rcx
	movq	_DUPLEX_FULL@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movl	%edx, %esi
	testl	%eax, (%rcx)
	jne	LBB0_2
## %bb.1:
	movq	_DUPLEX_HALF@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
LBB0_2:
	movq	(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.3:
	movl	(%rdi), %edi
	cmpq	$0, 24(%rbx)
	jne	LBB0_6
	jmp	LBB0_10
LBB0_4:
	movl	%edx, %edi
	cmpq	$0, 24(%rbx)
	je	LBB0_10
LBB0_6:
	cmpl	%esi, %edi
	je	LBB0_10
## %bb.7:
	movl	%edi, (%rbx)
	movslq	%edi, %rsi
	movl	(%rcx), %ecx
	cmpq	%rsi, %rdx
	jne	LBB0_9
## %bb.8:
	orl	%ecx, %eax
	jmp	LBB0_10
LBB0_9:
	notl	%ecx
	andl	%ecx, %eax
LBB0_10:
	movq	8(%rbx), %rcx
	movq	_SPEED_1000@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_13
## %bb.11:
	movq	16(%rbx), %rdx
	movq	_EMAC_VERSION_2@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rdx
	jne	LBB0_13
## %bb.12:
	movl	(%r15), %edi
	callq	_emac_read
	movq	_EMAC_DM646X_MACCONTORL_GIG@GOTPCREL(%rip), %rcx
	movq	_EMAC_DM646X_MACCONTORL_GIGFORCE@GOTPCREL(%rip), %rdx
	orl	(%rcx), %eax
	orl	(%rdx), %eax
	jmp	LBB0_17
LBB0_13:
	movq	_EMAC_DM646X_MACCONTORL_GIGFORCE@GOTPCREL(%rip), %rdx
	movq	_EMAC_DM646X_MACCONTORL_GIG@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	orl	(%rdx), %esi
	notl	%esi
	andl	%esi, %eax
	cmpq	$0, 32(%rbx)
	movq	_EMAC_MACCONTROL_RMIISPEED_MASK@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	je	LBB0_16
## %bb.14:
	movq	_SPEED_100@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rcx
	jne	LBB0_16
## %bb.15:
	orl	%edx, %eax
	jmp	LBB0_17
LBB0_16:
	notl	%edx
	andl	%edx, %eax
LBB0_17:
	movl	(%r15), %edi
	movl	%eax, %esi
	callq	_emac_write
	movq	24(%rbx), %rbx
	movq	%r14, %rdi
	callq	_netif_carrier_ok
	testq	%rbx, %rbx
	je	LBB0_23
## %bb.18:
	testq	%rax, %rax
	jne	LBB0_20
## %bb.19:
	movq	%r14, %rdi
	callq	_netif_carrier_on
LBB0_20:
	movq	%r14, %rdi
	callq	_netif_running
	testq	%rax, %rax
	je	LBB0_26
## %bb.21:
	movq	%r14, %rdi
	callq	_netif_queue_stopped
	testq	%rax, %rax
	je	LBB0_26
## %bb.22:
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_netif_wake_queue               ## TAILCALL
LBB0_23:
	testq	%rax, %rax
	je	LBB0_25
## %bb.24:
	movq	%r14, %rdi
	callq	_netif_carrier_off
LBB0_25:
	movq	%r14, %rdi
	callq	_netif_queue_stopped
	testq	%rax, %rax
	je	LBB0_27
LBB0_26:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_27:
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_netif_stop_queue               ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_EMAC_MACCONTROL,4,2            ## @EMAC_MACCONTROL
	.comm	_EMAC_MACCONTROL_FULLDUPLEXEN,4,2 ## @EMAC_MACCONTROL_FULLDUPLEXEN
	.comm	_DUPLEX_FULL,8,3                ## @DUPLEX_FULL
	.comm	_DUPLEX_HALF,8,3                ## @DUPLEX_HALF
	.comm	_SPEED_1000,8,3                 ## @SPEED_1000
	.comm	_EMAC_VERSION_2,8,3             ## @EMAC_VERSION_2
	.comm	_EMAC_DM646X_MACCONTORL_GIG,4,2 ## @EMAC_DM646X_MACCONTORL_GIG
	.comm	_EMAC_DM646X_MACCONTORL_GIGFORCE,4,2 ## @EMAC_DM646X_MACCONTORL_GIGFORCE
	.comm	_SPEED_100,8,3                  ## @SPEED_100
	.comm	_EMAC_MACCONTROL_RMIISPEED_MASK,4,2 ## @EMAC_MACCONTROL_RMIISPEED_MASK
	.no_dead_strip	_emac_update_phystatus
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function emac_update_phystatus
_emac_update_phystatus:                 ; @emac_update_phystatus
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x0
	ldr	x19, [x0, #40]
Lloh0:
	adrp	x21, _EMAC_MACCONTROL@GOTPAGE
Lloh1:
	ldr	x21, [x21, _EMAC_MACCONTROL@GOTPAGEOFF]
	ldr	w0, [x21]
	bl	_emac_read
Lloh2:
	adrp	x8, _EMAC_MACCONTROL_FULLDUPLEXEN@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EMAC_MACCONTROL_FULLDUPLEXEN@GOTPAGEOFF]
	ldr	w10, [x8]
Lloh4:
	adrp	x9, _DUPLEX_FULL@GOTPAGE
Lloh5:
	ldr	x9, [x9, _DUPLEX_FULL@GOTPAGEOFF]
Lloh6:
	ldr	x9, [x9]
Lloh7:
	adrp	x11, _DUPLEX_HALF@GOTPAGE
Lloh8:
	ldr	x11, [x11, _DUPLEX_HALF@GOTPAGEOFF]
Lloh9:
	ldr	w11, [x11]
	tst	w10, w0
	csel	w10, w11, w9, eq
	ldr	x11, [x19]
	cbz	x11, LBB0_2
; %bb.1:
	ldr	w11, [x11]
	ldr	x12, [x20, #24]
	cbnz	x12, LBB0_3
	b	LBB0_5
LBB0_2:
	mov	x11, x9
	ldr	x12, [x20, #24]
	cbz	x12, LBB0_5
LBB0_3:
	cmp	w11, w10
	b.eq	LBB0_5
; %bb.4:
	str	w11, [x20]
	ldr	w8, [x8]
	cmp	x9, w11, sxtw
	bic	w9, w0, w8
	orr	w8, w8, w0
	csel	w0, w9, w8, ne
LBB0_5:
	ldr	x8, [x20, #8]
Lloh10:
	adrp	x9, _SPEED_1000@GOTPAGE
Lloh11:
	ldr	x9, [x9, _SPEED_1000@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.6:
	ldr	x9, [x20, #16]
Lloh13:
	adrp	x10, _EMAC_VERSION_2@GOTPAGE
Lloh14:
	ldr	x10, [x10, _EMAC_VERSION_2@GOTPAGEOFF]
Lloh15:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_8
; %bb.7:
	ldr	w0, [x21]
	bl	_emac_read
Lloh16:
	adrp	x8, _EMAC_DM646X_MACCONTORL_GIG@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EMAC_DM646X_MACCONTORL_GIG@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
Lloh19:
	adrp	x9, _EMAC_DM646X_MACCONTORL_GIGFORCE@GOTPAGE
Lloh20:
	ldr	x9, [x9, _EMAC_DM646X_MACCONTORL_GIGFORCE@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	orr	w8, w8, w0
	orr	w1, w8, w9
	b	LBB0_12
LBB0_8:
Lloh22:
	adrp	x9, _EMAC_DM646X_MACCONTORL_GIGFORCE@GOTPAGE
Lloh23:
	ldr	x9, [x9, _EMAC_DM646X_MACCONTORL_GIGFORCE@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
Lloh25:
	adrp	x10, _EMAC_DM646X_MACCONTORL_GIG@GOTPAGE
Lloh26:
	ldr	x10, [x10, _EMAC_DM646X_MACCONTORL_GIG@GOTPAGEOFF]
Lloh27:
	ldr	w10, [x10]
	orr	w9, w10, w9
	bic	w9, w0, w9
	ldr	x11, [x20, #32]
Lloh28:
	adrp	x10, _EMAC_MACCONTROL_RMIISPEED_MASK@GOTPAGE
Lloh29:
	ldr	x10, [x10, _EMAC_MACCONTROL_RMIISPEED_MASK@GOTPAGEOFF]
Lloh30:
	ldr	w10, [x10]
	cbz	x11, LBB0_11
; %bb.9:
Lloh31:
	adrp	x11, _SPEED_100@GOTPAGE
Lloh32:
	ldr	x11, [x11, _SPEED_100@GOTPAGEOFF]
Lloh33:
	ldr	x11, [x11]
	cmp	x8, x11
	b.ne	LBB0_11
; %bb.10:
	orr	w1, w10, w9
	b	LBB0_12
LBB0_11:
	bic	w1, w9, w10
LBB0_12:
	ldr	w0, [x21]
	bl	_emac_write
	ldr	x20, [x20, #24]
	mov	x0, x19
	bl	_netif_carrier_ok
	cbz	x20, LBB0_18
; %bb.13:
	cbnz	x0, LBB0_15
; %bb.14:
	mov	x0, x19
	bl	_netif_carrier_on
LBB0_15:
	mov	x0, x19
	bl	_netif_running
	cbz	x0, LBB0_21
; %bb.16:
	mov	x0, x19
	bl	_netif_queue_stopped
	cbz	x0, LBB0_21
; %bb.17:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_netif_wake_queue
LBB0_18:
	cbz	x0, LBB0_20
; %bb.19:
	mov	x0, x19
	bl	_netif_carrier_off
LBB0_20:
	mov	x0, x19
	bl	_netif_queue_stopped
	cbz	x0, LBB0_22
LBB0_21:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_22:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_netif_stop_queue
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_EMAC_MACCONTROL,4,2            ; @EMAC_MACCONTROL
	.comm	_EMAC_MACCONTROL_FULLDUPLEXEN,4,2 ; @EMAC_MACCONTROL_FULLDUPLEXEN
	.comm	_DUPLEX_FULL,8,3                ; @DUPLEX_FULL
	.comm	_DUPLEX_HALF,8,3                ; @DUPLEX_HALF
	.comm	_SPEED_1000,8,3                 ; @SPEED_1000
	.comm	_EMAC_VERSION_2,8,3             ; @EMAC_VERSION_2
	.comm	_EMAC_DM646X_MACCONTORL_GIG,4,2 ; @EMAC_DM646X_MACCONTORL_GIG
	.comm	_EMAC_DM646X_MACCONTORL_GIGFORCE,4,2 ; @EMAC_DM646X_MACCONTORL_GIGFORCE
	.comm	_SPEED_100,8,3                  ; @SPEED_100
	.comm	_EMAC_MACCONTROL_RMIISPEED_MASK,4,2 ; @EMAC_MACCONTROL_RMIISPEED_MASK
	.no_dead_strip	_emac_update_phystatus
.subsections_via_symbols
