	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function efx_mcdi_phy_set_settings
_efx_mcdi_phy_set_settings:             ## @efx_mcdi_phy_set_settings
	.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	%rsi, %r14
	movq	%rdi, %r15
	movq	8(%rdi), %r13
	cmpq	$0, 8(%rsi)
	je	LBB0_5
## %bb.1:
	movl	(%r14), %edi
	callq	_ethtool_to_mcdi_cap
	movl	%eax, %r12d
	movq	_MC_CMD_PHY_CAP_AN_LBN@GOTPCREL(%rip), %rax
	movb	(%rax), %al
	btsl	%eax, %r12d
	jmp	LBB0_2
LBB0_5:
	movq	16(%r14), %rbx
	movq	%r14, %rdi
	callq	_ethtool_cmd_speed
	testq	%rbx, %rbx
	je	LBB0_16
## %bb.6:
	cmpl	$999, %eax                      ## imm = 0x3E7
	jg	LBB0_10
## %bb.7:
	cmpl	$10, %eax
	je	LBB0_13
## %bb.8:
	cmpl	$100, %eax
	jne	LBB0_22
## %bb.9:
	movq	_MC_CMD_PHY_CAP_100FDX_LBN@GOTPCREL(%rip), %rax
	jmp	LBB0_14
LBB0_16:
	cmpl	$1000, %eax                     ## imm = 0x3E8
	je	LBB0_21
## %bb.17:
	cmpl	$100, %eax
	je	LBB0_20
## %bb.18:
	cmpl	$10, %eax
	jne	LBB0_22
## %bb.19:
	movq	_MC_CMD_PHY_CAP_10HDX_LBN@GOTPCREL(%rip), %rax
	jmp	LBB0_14
LBB0_10:
	cmpl	$1000, %eax                     ## imm = 0x3E8
	je	LBB0_15
## %bb.11:
	cmpl	$10000, %eax                    ## imm = 0x2710
	jne	LBB0_22
## %bb.12:
	movq	_MC_CMD_PHY_CAP_10000FDX_LBN@GOTPCREL(%rip), %rax
	jmp	LBB0_14
LBB0_22:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_24
LBB0_13:
	movq	_MC_CMD_PHY_CAP_10FDX_LBN@GOTPCREL(%rip), %rax
	jmp	LBB0_14
LBB0_15:
	movq	_MC_CMD_PHY_CAP_1000FDX_LBN@GOTPCREL(%rip), %rax
	jmp	LBB0_14
LBB0_21:
	movq	_MC_CMD_PHY_CAP_1000HDX_LBN@GOTPCREL(%rip), %rax
	jmp	LBB0_14
LBB0_20:
	movq	_MC_CMD_PHY_CAP_100HDX_LBN@GOTPCREL(%rip), %rax
LBB0_14:
	movb	(%rax), %cl
	movl	$1, %r12d
	shll	%cl, %r12d
LBB0_2:
	movq	%r15, %rdi
	callq	_efx_get_mcdi_phy_flags
	movl	(%r15), %ecx
	movq	%r15, %rdi
	movl	%r12d, %esi
	movl	%eax, %edx
	xorl	%r8d, %r8d
	callq	_efx_mcdi_set_link
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_24
## %bb.3:
	cmpq	$0, 8(%r14)
	je	LBB0_23
## %bb.4:
	movq	_ADVERTISED_Autoneg@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	orl	(%r14), %esi
	movq	%r15, %rdi
	callq	_efx_link_set_advertising
	movl	$0, (%r13)
	xorl	%ebx, %ebx
	jmp	LBB0_24
LBB0_23:
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_efx_link_set_advertising
	movl	%r12d, (%r13)
LBB0_24:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MC_CMD_PHY_CAP_AN_LBN,4,2      ## @MC_CMD_PHY_CAP_AN_LBN
	.comm	_MC_CMD_PHY_CAP_10FDX_LBN,4,2   ## @MC_CMD_PHY_CAP_10FDX_LBN
	.comm	_MC_CMD_PHY_CAP_100FDX_LBN,4,2  ## @MC_CMD_PHY_CAP_100FDX_LBN
	.comm	_MC_CMD_PHY_CAP_1000FDX_LBN,4,2 ## @MC_CMD_PHY_CAP_1000FDX_LBN
	.comm	_MC_CMD_PHY_CAP_10000FDX_LBN,4,2 ## @MC_CMD_PHY_CAP_10000FDX_LBN
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_MC_CMD_PHY_CAP_10HDX_LBN,4,2   ## @MC_CMD_PHY_CAP_10HDX_LBN
	.comm	_MC_CMD_PHY_CAP_100HDX_LBN,4,2  ## @MC_CMD_PHY_CAP_100HDX_LBN
	.comm	_MC_CMD_PHY_CAP_1000HDX_LBN,4,2 ## @MC_CMD_PHY_CAP_1000HDX_LBN
	.comm	_ADVERTISED_Autoneg,4,2         ## @ADVERTISED_Autoneg
	.no_dead_strip	_efx_mcdi_phy_set_settings
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function efx_mcdi_phy_set_settings
_efx_mcdi_phy_set_settings:             ; @efx_mcdi_phy_set_settings
	.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
	ldr	x22, [x0, #8]
	ldr	x8, [x1, #8]
	cbz	x8, LBB0_2
; %bb.1:
	ldr	w0, [x20]
	bl	_ethtool_to_mcdi_cap
Lloh0:
	adrp	x8, _MC_CMD_PHY_CAP_AN_LBN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MC_CMD_PHY_CAP_AN_LBN@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	mov	w9, #1
	lsl	w8, w9, w8
	orr	w21, w8, w0
	b	LBB0_20
LBB0_2:
	ldr	x21, [x20, #16]
	mov	x0, x20
	bl	_ethtool_cmd_speed
	cbz	x21, LBB0_7
; %bb.3:
	cmp	w0, #999
	b.gt	LBB0_11
; %bb.4:
	cmp	w0, #10
	b.eq	LBB0_15
; %bb.5:
	cmp	w0, #100
	b.ne	LBB0_14
; %bb.6:
Lloh3:
	adrp	x8, _MC_CMD_PHY_CAP_100FDX_LBN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MC_CMD_PHY_CAP_100FDX_LBN@GOTPAGEOFF]
	b	LBB0_19
LBB0_7:
	cmp	w0, #1000
	b.eq	LBB0_17
; %bb.8:
	cmp	w0, #100
	b.eq	LBB0_18
; %bb.9:
	cmp	w0, #10
	b.ne	LBB0_14
; %bb.10:
Lloh5:
	adrp	x8, _MC_CMD_PHY_CAP_10HDX_LBN@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MC_CMD_PHY_CAP_10HDX_LBN@GOTPAGEOFF]
	b	LBB0_19
LBB0_11:
	cmp	w0, #1000
	b.eq	LBB0_16
; %bb.12:
	mov	w8, #10000
	cmp	w0, w8
	b.ne	LBB0_14
; %bb.13:
Lloh7:
	adrp	x8, _MC_CMD_PHY_CAP_10000FDX_LBN@GOTPAGE
Lloh8:
	ldr	x8, [x8, _MC_CMD_PHY_CAP_10000FDX_LBN@GOTPAGEOFF]
	b	LBB0_19
LBB0_14:
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_24
LBB0_15:
Lloh12:
	adrp	x8, _MC_CMD_PHY_CAP_10FDX_LBN@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MC_CMD_PHY_CAP_10FDX_LBN@GOTPAGEOFF]
	b	LBB0_19
LBB0_16:
Lloh14:
	adrp	x8, _MC_CMD_PHY_CAP_1000FDX_LBN@GOTPAGE
Lloh15:
	ldr	x8, [x8, _MC_CMD_PHY_CAP_1000FDX_LBN@GOTPAGEOFF]
	b	LBB0_19
LBB0_17:
Lloh16:
	adrp	x8, _MC_CMD_PHY_CAP_1000HDX_LBN@GOTPAGE
Lloh17:
	ldr	x8, [x8, _MC_CMD_PHY_CAP_1000HDX_LBN@GOTPAGEOFF]
	b	LBB0_19
LBB0_18:
Lloh18:
	adrp	x8, _MC_CMD_PHY_CAP_100HDX_LBN@GOTPAGE
Lloh19:
	ldr	x8, [x8, _MC_CMD_PHY_CAP_100HDX_LBN@GOTPAGEOFF]
LBB0_19:
	ldr	w8, [x8]
	mov	w9, #1
	lsl	w21, w9, w8
LBB0_20:
	mov	x0, x19
	bl	_efx_get_mcdi_phy_flags
	mov	x2, x0
	ldr	w3, [x19]
	mov	x0, x19
	mov	x1, x21
	mov	w4, #0
	bl	_efx_mcdi_set_link
	cbnz	w0, LBB0_24
; %bb.21:
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_23
; %bb.22:
	ldr	w8, [x20]
Lloh20:
	adrp	x9, _ADVERTISED_Autoneg@GOTPAGE
Lloh21:
	ldr	x9, [x9, _ADVERTISED_Autoneg@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	orr	w1, w9, w8
	mov	x0, x19
	bl	_efx_link_set_advertising
	mov	w0, #0
	str	wzr, [x22]
	b	LBB0_24
LBB0_23:
	mov	x0, x19
	mov	w1, #0
	bl	_efx_link_set_advertising
	mov	w0, #0
	str	w21, [x22]
LBB0_24:
	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	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_MC_CMD_PHY_CAP_AN_LBN,4,2      ; @MC_CMD_PHY_CAP_AN_LBN
	.comm	_MC_CMD_PHY_CAP_10FDX_LBN,4,2   ; @MC_CMD_PHY_CAP_10FDX_LBN
	.comm	_MC_CMD_PHY_CAP_100FDX_LBN,4,2  ; @MC_CMD_PHY_CAP_100FDX_LBN
	.comm	_MC_CMD_PHY_CAP_1000FDX_LBN,4,2 ; @MC_CMD_PHY_CAP_1000FDX_LBN
	.comm	_MC_CMD_PHY_CAP_10000FDX_LBN,4,2 ; @MC_CMD_PHY_CAP_10000FDX_LBN
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_MC_CMD_PHY_CAP_10HDX_LBN,4,2   ; @MC_CMD_PHY_CAP_10HDX_LBN
	.comm	_MC_CMD_PHY_CAP_100HDX_LBN,4,2  ; @MC_CMD_PHY_CAP_100HDX_LBN
	.comm	_MC_CMD_PHY_CAP_1000HDX_LBN,4,2 ; @MC_CMD_PHY_CAP_1000HDX_LBN
	.comm	_ADVERTISED_Autoneg,4,2         ; @ADVERTISED_Autoneg
	.no_dead_strip	_efx_mcdi_phy_set_settings
.subsections_via_symbols
