	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function s6gmac_adjust_link
_s6gmac_adjust_link:                    ## @s6gmac_adjust_link
	.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	%rdi, %r14
	callq	_netdev_priv
	movq	%rax, %rbx
	movq	48(%rax), %r15
	cmpq	$0, 40(%rax)
	je	LBB0_7
## %bb.1:
	cmpq	$0, 16(%r15)
	je	LBB0_4
## %bb.2:
	movl	16(%rbx), %eax
	cmpl	(%r15), %eax
	jne	LBB0_4
## %bb.3:
	movq	24(%rbx), %rax
	cmpq	8(%r15), %rax
	je	LBB0_6
LBB0_4:
	movq	$0, 40(%rbx)
	movq	%r14, %rdi
	callq	_netif_tx_disable
	cmpq	$0, 16(%r15)
	je	LBB0_5
LBB0_6:
	cmpq	$0, 40(%rbx)
	jne	LBB0_15
	jmp	LBB0_7
LBB0_5:
	movq	%r14, %rdi
	callq	_netif_carrier_off
	movq	%r15, %rdi
	callq	_phy_print_status
	cmpq	$0, 40(%rbx)
	jne	LBB0_15
LBB0_7:
	cmpq	$0, 16(%r15)
	je	LBB0_15
## %bb.8:
	movq	24(%rbx), %rax
	cmpq	8(%r15), %rax
	je	LBB0_10
## %bb.9:
	movq	_S6_GMAC_MACCONF2@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	addq	8(%rbx), %rdi
	callq	_readl
	movq	_S6_GMAC_MACCONF2_FULL@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movl	%eax, %edi
	btsl	%ecx, %edi
	btrl	%ecx, %eax
	cmpq	$0, 8(%r15)
	cmovel	%eax, %edi
	movq	(%r12), %rsi
	addq	8(%rbx), %rsi
	callq	_writel
LBB0_10:
	xorl	%eax, %eax
	cmpl	$1000, (%r15)                   ## imm = 0x3E8
	sete	%al
	cmpl	%eax, 32(%rbx)
	je	LBB0_12
## %bb.11:
	movq	_S6_GMAC_FIFOCONF5@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	8(%rbx), %rdi
	callq	_readl
	movl	%eax, %r12d
	movq	_S6_GMAC_MACCONF2@GOTPCREL(%rip), %r13
	movq	(%r13), %rdi
	addq	8(%rbx), %rdi
	callq	_readl
	movq	_S6_GMAC_MACCONF2_IFMODE_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_S6_GMAC_MACCONF2_IFMODE@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %edx
	notl	%edx
	andl	%eax, %edx
	movq	_S6_GMAC_FIFOCONF5_CFGBYTM@GOTPCREL(%rip), %rax
	movb	(%rax), %al
	movl	%r12d, %esi
	btsl	%eax, %esi
	btrl	%eax, %r12d
	cmpl	$1000, (%r15)                   ## imm = 0x3E8
	cmovel	%esi, %r12d
	movq	_S6_GMAC_MACCONF2_IFMODE_NIBBLE@GOTPCREL(%rip), %rax
	cmoveq	_S6_GMAC_MACCONF2_IFMODE_BYTE@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	shll	%cl, %r15d
	orl	%edx, %r15d
	movq	_S6_GMAC_FIFOCONF5@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%rbx), %rsi
	movl	%r12d, %edi
	callq	_writel
	movq	(%r13), %rsi
	addq	8(%rbx), %rsi
	movl	%r15d, %edi
	callq	_writel
LBB0_12:
	movl	(%rbx), %esi
	movl	4(%rbx), %edi
	callq	_s6dmac_fifo_full
	testl	%eax, %eax
	jne	LBB0_14
## %bb.13:
	movq	%r14, %rdi
	callq	_netif_wake_queue
LBB0_14:
	movq	%r14, %rdi
	movl	$1, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_s6gmac_linkisup                ## TAILCALL
LBB0_15:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_S6_GMAC_MACCONF2,8,3           ## @S6_GMAC_MACCONF2
	.comm	_S6_GMAC_MACCONF2_FULL,4,2      ## @S6_GMAC_MACCONF2_FULL
	.comm	_S6_GMAC_FIFOCONF5,8,3          ## @S6_GMAC_FIFOCONF5
	.comm	_S6_GMAC_MACCONF2_IFMODE_MASK,4,2 ## @S6_GMAC_MACCONF2_IFMODE_MASK
	.comm	_S6_GMAC_MACCONF2_IFMODE,4,2    ## @S6_GMAC_MACCONF2_IFMODE
	.comm	_S6_GMAC_FIFOCONF5_CFGBYTM,4,2  ## @S6_GMAC_FIFOCONF5_CFGBYTM
	.comm	_S6_GMAC_MACCONF2_IFMODE_BYTE,4,2 ## @S6_GMAC_MACCONF2_IFMODE_BYTE
	.comm	_S6_GMAC_MACCONF2_IFMODE_NIBBLE,4,2 ## @S6_GMAC_MACCONF2_IFMODE_NIBBLE
	.no_dead_strip	_s6gmac_adjust_link
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function s6gmac_adjust_link
_s6gmac_adjust_link:                    ; @s6gmac_adjust_link
	.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	x19, x0
	bl	_netdev_priv
	mov	x20, x0
	ldp	x8, x21, [x0, #40]
	cbz	x8, LBB0_7
; %bb.1:
	ldr	x8, [x21, #16]
	cbz	x8, LBB0_4
; %bb.2:
	ldr	w8, [x20, #16]
	ldr	w9, [x21]
	cmp	w8, w9
	b.ne	LBB0_4
; %bb.3:
	ldr	x8, [x20, #24]
	ldr	x9, [x21, #8]
	cmp	x8, x9
	b.eq	LBB0_5
LBB0_4:
	str	xzr, [x20, #40]
	mov	x0, x19
	bl	_netif_tx_disable
	ldr	x8, [x21, #16]
	cbz	x8, LBB0_6
LBB0_5:
	ldr	x8, [x20, #40]
	cbnz	x8, LBB0_15
	b	LBB0_7
LBB0_6:
	mov	x0, x19
	bl	_netif_carrier_off
	mov	x0, x21
	bl	_phy_print_status
	ldr	x8, [x20, #40]
	cbnz	x8, LBB0_15
LBB0_7:
	ldr	x8, [x21, #16]
	cbz	x8, LBB0_15
; %bb.8:
	ldr	x8, [x20, #24]
	ldr	x9, [x21, #8]
	cmp	x8, x9
	b.eq	LBB0_10
; %bb.9:
	ldr	x8, [x20, #8]
Lloh0:
	adrp	x22, _S6_GMAC_MACCONF2@GOTPAGE
Lloh1:
	ldr	x22, [x22, _S6_GMAC_MACCONF2@GOTPAGEOFF]
	ldr	x9, [x22]
	add	x0, x9, x8
	bl	_readl
	ldr	x8, [x21, #8]
Lloh2:
	adrp	x9, _S6_GMAC_MACCONF2_FULL@GOTPAGE
Lloh3:
	ldr	x9, [x9, _S6_GMAC_MACCONF2_FULL@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	mov	w10, #1
	lsl	w9, w10, w9
	orr	w10, w9, w0
	bic	w9, w0, w9
	cmp	x8, #0
	csel	w0, w9, w10, eq
	ldr	x8, [x20, #8]
	ldr	x9, [x22]
	add	x1, x9, x8
	bl	_writel
LBB0_10:
	ldr	w8, [x20, #32]
	ldr	w9, [x21]
	cmp	w9, #1000
	cset	w9, eq
	cmp	w8, w9
	b.eq	LBB0_12
; %bb.11:
	ldr	x8, [x20, #8]
Lloh5:
	adrp	x23, _S6_GMAC_FIFOCONF5@GOTPAGE
Lloh6:
	ldr	x23, [x23, _S6_GMAC_FIFOCONF5@GOTPAGEOFF]
	ldr	x9, [x23]
	add	x0, x9, x8
	bl	_readl
	mov	x22, x0
	ldr	x8, [x20, #8]
Lloh7:
	adrp	x24, _S6_GMAC_MACCONF2@GOTPAGE
Lloh8:
	ldr	x24, [x24, _S6_GMAC_MACCONF2@GOTPAGEOFF]
	ldr	x9, [x24]
	add	x0, x9, x8
	bl	_readl
Lloh9:
	adrp	x8, _S6_GMAC_MACCONF2_IFMODE_MASK@GOTPAGE
Lloh10:
	ldr	x8, [x8, _S6_GMAC_MACCONF2_IFMODE_MASK@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
Lloh12:
	adrp	x9, _S6_GMAC_MACCONF2_IFMODE@GOTPAGE
Lloh13:
	ldr	x9, [x9, _S6_GMAC_MACCONF2_IFMODE@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	lsl	w8, w8, w9
	bic	w8, w0, w8
	ldr	w10, [x21]
Lloh15:
	adrp	x11, _S6_GMAC_FIFOCONF5_CFGBYTM@GOTPAGE
Lloh16:
	ldr	x11, [x11, _S6_GMAC_FIFOCONF5_CFGBYTM@GOTPAGEOFF]
Lloh17:
	ldr	w11, [x11]
	mov	w12, #1
	lsl	w11, w12, w11
	orr	w12, w11, w22
	bic	w11, w22, w11
	cmp	w10, #1000
	csel	w0, w12, w11, eq
Lloh18:
	adrp	x10, _S6_GMAC_MACCONF2_IFMODE_BYTE@GOTPAGE
Lloh19:
	ldr	x10, [x10, _S6_GMAC_MACCONF2_IFMODE_BYTE@GOTPAGEOFF]
Lloh20:
	adrp	x11, _S6_GMAC_MACCONF2_IFMODE_NIBBLE@GOTPAGE
Lloh21:
	ldr	x11, [x11, _S6_GMAC_MACCONF2_IFMODE_NIBBLE@GOTPAGEOFF]
	csel	x10, x10, x11, eq
	ldr	w10, [x10]
	lsl	w9, w10, w9
	orr	w21, w9, w8
	ldr	x8, [x20, #8]
	ldr	x9, [x23]
	add	x1, x9, x8
	bl	_writel
	ldr	x8, [x20, #8]
	ldr	x9, [x24]
	add	x1, x9, x8
	mov	x0, x21
	bl	_writel
LBB0_12:
	ldp	w1, w0, [x20]
	bl	_s6dmac_fifo_full
	cbnz	w0, LBB0_14
; %bb.13:
	mov	x0, x19
	bl	_netif_wake_queue
LBB0_14:
	mov	x0, x19
	mov	w1, #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
	b	_s6gmac_linkisup
LBB0_15:
	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
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_S6_GMAC_MACCONF2,8,3           ; @S6_GMAC_MACCONF2
	.comm	_S6_GMAC_MACCONF2_FULL,4,2      ; @S6_GMAC_MACCONF2_FULL
	.comm	_S6_GMAC_FIFOCONF5,8,3          ; @S6_GMAC_FIFOCONF5
	.comm	_S6_GMAC_MACCONF2_IFMODE_MASK,4,2 ; @S6_GMAC_MACCONF2_IFMODE_MASK
	.comm	_S6_GMAC_MACCONF2_IFMODE,4,2    ; @S6_GMAC_MACCONF2_IFMODE
	.comm	_S6_GMAC_FIFOCONF5_CFGBYTM,4,2  ; @S6_GMAC_FIFOCONF5_CFGBYTM
	.comm	_S6_GMAC_MACCONF2_IFMODE_BYTE,4,2 ; @S6_GMAC_MACCONF2_IFMODE_BYTE
	.comm	_S6_GMAC_MACCONF2_IFMODE_NIBBLE,4,2 ; @S6_GMAC_MACCONF2_IFMODE_NIBBLE
	.no_dead_strip	_s6gmac_adjust_link
.subsections_via_symbols
