	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function genmii_setup_aneg
_genmii_setup_aneg:                     ## @genmii_setup_aneg
	.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
	movl	%esi, %ebx
	movq	%rdi, %r14
	movl	$1, (%rdi)
	movq	_SPEED_10@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%rdi)
	movq	_DUPLEX_HALF@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rdi)
	movq	$0, 8(%rdi)
	movl	%esi, 4(%rdi)
	movq	_MII_ADVERTISE@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	callq	_phy_read
	movq	_ADVERTISE_ALL@GOTPCREL(%rip), %rdx
	movq	_ADVERTISE_100BASE4@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rdx), %ecx
	notl	%ecx
	movq	_ADVERTISED_10baseT_Half@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	andl	%ebx, %edx
	je	LBB0_2
## %bb.1:
	movq	_ADVERTISE_10HALF@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
LBB0_2:
	andl	%ecx, %eax
	movq	_ADVERTISED_10baseT_Full@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	%ebx, %ecx
	je	LBB0_4
## %bb.3:
	movq	_ADVERTISE_10FULL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
LBB0_4:
	orl	%eax, %edx
	movq	_ADVERTISED_100baseT_Half@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%ebx, %eax
	je	LBB0_6
## %bb.5:
	movq	_ADVERTISE_100HALF@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_6:
	orl	%eax, %ecx
	orl	%ecx, %edx
	movq	_ADVERTISED_100baseT_Full@GOTPCREL(%rip), %rax
	andl	(%rax), %ebx
	je	LBB0_8
## %bb.7:
	movq	_ADVERTISE_100FULL@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_8:
	orl	%ebx, %edx
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_phy_write
	movq	_MII_BMCR@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r14, %rdi
	callq	_phy_read
	movq	_BMCR_ANENABLE@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_BMCR_ANRESTART@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	(%rbx), %esi
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_phy_write
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SPEED_10,4,2                   ## @SPEED_10
	.comm	_DUPLEX_HALF,4,2                ## @DUPLEX_HALF
	.comm	_MII_ADVERTISE,4,2              ## @MII_ADVERTISE
	.comm	_ADVERTISE_ALL,4,2              ## @ADVERTISE_ALL
	.comm	_ADVERTISE_100BASE4,4,2         ## @ADVERTISE_100BASE4
	.comm	_ADVERTISED_10baseT_Half,4,2    ## @ADVERTISED_10baseT_Half
	.comm	_ADVERTISE_10HALF,4,2           ## @ADVERTISE_10HALF
	.comm	_ADVERTISED_10baseT_Full,4,2    ## @ADVERTISED_10baseT_Full
	.comm	_ADVERTISE_10FULL,4,2           ## @ADVERTISE_10FULL
	.comm	_ADVERTISED_100baseT_Half,4,2   ## @ADVERTISED_100baseT_Half
	.comm	_ADVERTISE_100HALF,4,2          ## @ADVERTISE_100HALF
	.comm	_ADVERTISED_100baseT_Full,4,2   ## @ADVERTISED_100baseT_Full
	.comm	_ADVERTISE_100FULL,4,2          ## @ADVERTISE_100FULL
	.comm	_MII_BMCR,4,2                   ## @MII_BMCR
	.comm	_BMCR_ANENABLE,4,2              ## @BMCR_ANENABLE
	.comm	_BMCR_ANRESTART,4,2             ## @BMCR_ANRESTART
	.no_dead_strip	_genmii_setup_aneg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function genmii_setup_aneg
_genmii_setup_aneg:                     ; @genmii_setup_aneg
	.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, x1
	mov	x19, x0
	mov	w8, #1
Lloh0:
	adrp	x9, _SPEED_10@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SPEED_10@GOTPAGEOFF]
	str	w8, [x0]
Lloh2:
	ldr	w8, [x9]
Lloh3:
	adrp	x9, _DUPLEX_HALF@GOTPAGE
Lloh4:
	ldr	x9, [x9, _DUPLEX_HALF@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	stp	w9, w8, [x0, #16]
	str	xzr, [x0, #8]
	str	w1, [x0, #4]
Lloh6:
	adrp	x21, _MII_ADVERTISE@GOTPAGE
Lloh7:
	ldr	x21, [x21, _MII_ADVERTISE@GOTPAGEOFF]
	ldr	w1, [x21]
	bl	_phy_read
Lloh8:
	adrp	x8, _ADVERTISE_ALL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ADVERTISE_ALL@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
Lloh11:
	adrp	x9, _ADVERTISE_100BASE4@GOTPAGE
Lloh12:
	ldr	x9, [x9, _ADVERTISE_100BASE4@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh14:
	adrp	x9, _ADVERTISED_10baseT_Half@GOTPAGE
Lloh15:
	ldr	x9, [x9, _ADVERTISED_10baseT_Half@GOTPAGEOFF]
	bic	w8, w0, w8
Lloh16:
	ldr	w9, [x9]
Lloh17:
	adrp	x10, _ADVERTISE_10HALF@GOTPAGE
Lloh18:
	ldr	x10, [x10, _ADVERTISE_10HALF@GOTPAGEOFF]
Lloh19:
	ldr	w10, [x10]
	tst	w9, w20
	csel	w9, wzr, w10, eq
	orr	w8, w9, w8
Lloh20:
	adrp	x9, _ADVERTISED_10baseT_Full@GOTPAGE
Lloh21:
	ldr	x9, [x9, _ADVERTISED_10baseT_Full@GOTPAGEOFF]
Lloh22:
	adrp	x10, _ADVERTISE_10FULL@GOTPAGE
Lloh23:
	ldr	x10, [x10, _ADVERTISE_10FULL@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
Lloh25:
	ldr	w10, [x10]
	tst	w9, w20
	csel	w9, wzr, w10, eq
Lloh26:
	adrp	x10, _ADVERTISED_100baseT_Half@GOTPAGE
Lloh27:
	ldr	x10, [x10, _ADVERTISED_100baseT_Half@GOTPAGEOFF]
	orr	w8, w8, w9
Lloh28:
	ldr	w9, [x10]
Lloh29:
	adrp	x10, _ADVERTISE_100HALF@GOTPAGE
Lloh30:
	ldr	x10, [x10, _ADVERTISE_100HALF@GOTPAGEOFF]
Lloh31:
	ldr	w10, [x10]
	tst	w9, w20
	csel	w9, wzr, w10, eq
	orr	w8, w8, w9
Lloh32:
	adrp	x9, _ADVERTISED_100baseT_Full@GOTPAGE
Lloh33:
	ldr	x9, [x9, _ADVERTISED_100baseT_Full@GOTPAGEOFF]
Lloh34:
	adrp	x10, _ADVERTISE_100FULL@GOTPAGE
Lloh35:
	ldr	x10, [x10, _ADVERTISE_100FULL@GOTPAGEOFF]
Lloh36:
	ldr	w9, [x9]
Lloh37:
	ldr	w10, [x10]
	tst	w9, w20
	csel	w9, wzr, w10, eq
	orr	w2, w8, w9
	ldr	w1, [x21]
	mov	x0, x19
	bl	_phy_write
Lloh38:
	adrp	x20, _MII_BMCR@GOTPAGE
Lloh39:
	ldr	x20, [x20, _MII_BMCR@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_phy_read
Lloh40:
	adrp	x8, _BMCR_ANENABLE@GOTPAGE
Lloh41:
	ldr	x8, [x8, _BMCR_ANENABLE@GOTPAGEOFF]
Lloh42:
	ldr	w8, [x8]
Lloh43:
	adrp	x9, _BMCR_ANRESTART@GOTPAGE
Lloh44:
	ldr	x9, [x9, _BMCR_ANRESTART@GOTPAGEOFF]
Lloh45:
	ldr	w9, [x9]
	orr	w8, w8, w0
	orr	w2, w8, w9
	ldr	w1, [x20]
	mov	x0, x19
	bl	_phy_write
	mov	w0, #0
	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
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGot	Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh36
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh24
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_SPEED_10,4,2                   ; @SPEED_10
	.comm	_DUPLEX_HALF,4,2                ; @DUPLEX_HALF
	.comm	_MII_ADVERTISE,4,2              ; @MII_ADVERTISE
	.comm	_ADVERTISE_ALL,4,2              ; @ADVERTISE_ALL
	.comm	_ADVERTISE_100BASE4,4,2         ; @ADVERTISE_100BASE4
	.comm	_ADVERTISED_10baseT_Half,4,2    ; @ADVERTISED_10baseT_Half
	.comm	_ADVERTISE_10HALF,4,2           ; @ADVERTISE_10HALF
	.comm	_ADVERTISED_10baseT_Full,4,2    ; @ADVERTISED_10baseT_Full
	.comm	_ADVERTISE_10FULL,4,2           ; @ADVERTISE_10FULL
	.comm	_ADVERTISED_100baseT_Half,4,2   ; @ADVERTISED_100baseT_Half
	.comm	_ADVERTISE_100HALF,4,2          ; @ADVERTISE_100HALF
	.comm	_ADVERTISED_100baseT_Full,4,2   ; @ADVERTISED_100baseT_Full
	.comm	_ADVERTISE_100FULL,4,2          ; @ADVERTISE_100FULL
	.comm	_MII_BMCR,4,2                   ; @MII_BMCR
	.comm	_BMCR_ANENABLE,4,2              ; @BMCR_ANENABLE
	.comm	_BMCR_ANRESTART,4,2             ; @BMCR_ANRESTART
	.no_dead_strip	_genmii_setup_aneg
.subsections_via_symbols
