	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qed_mcp_set_link               ## -- Begin function qed_mcp_set_link
	.p2align	4, 0x90
_qed_mcp_set_link:                      ## @qed_mcp_set_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
	subq	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movq	%rsi, %r14
	movq	%rdi, %r13
	movq	8(%rdi), %rbx
	leaq	-80(%rbp), %rdi
	xorl	%esi, %esi
	movl	$40, %edx
	callq	_memset
	testl	%r15d, %r15d
	jne	LBB0_1
## %bb.2:
	movq	_DRV_MSG_CODE_LINK_RESET@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_DRV_MSG_CODE_INIT_PHY@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %r12d
	cmpl	$0, 44(%rbx)
	jne	LBB0_5
## %bb.4:
	movl	40(%rbx), %eax
	movl	%eax, -44(%rbp)
LBB0_5:
	xorl	%eax, %eax
	cmpq	$0, 64(%rbx)
	movl	$0, %r8d
	je	LBB0_7
## %bb.6:
	movq	_ETH_PAUSE_AUTONEG@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r8d
LBB0_7:
	cmpq	$0, 56(%rbx)
	movl	$0, %ecx
	je	LBB0_9
## %bb.8:
	movq	_ETH_PAUSE_RX@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
LBB0_9:
	orl	-48(%rbp), %r8d
	cmpq	$0, 48(%rbx)
	je	LBB0_11
## %bb.10:
	movq	_ETH_PAUSE_TX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_11:
	orl	%eax, %ecx
	orl	%ecx, %r8d
	movl	%r8d, -48(%rbp)
	movl	36(%rbx), %r9d
	movl	%r9d, -52(%rbp)
	movl	32(%rbx), %r10d
	movl	%r10d, -56(%rbp)
	movq	8(%r13), %rax
	movq	_FW_MB_PARAM_FEATURE_SUPPORT_EEE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_20
## %bb.12:
	cmpq	$0, 24(%rbx)
	je	LBB0_20
## %bb.13:
	movq	_EEE_CFG_EEE_ENABLED@GOTPCREL(%rip), %rcx
	movl	-80(%rbp), %eax
	orl	(%rcx), %eax
	xorl	%ecx, %ecx
	cmpq	$0, 16(%rbx)
	je	LBB0_15
## %bb.14:
	movq	_EEE_CFG_TX_LPI@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
LBB0_15:
	orl	%ecx, %eax
	movq	_QED_EEE_1G_ADV@GOTPCREL(%rip), %rcx
	movl	8(%rbx), %edx
	movl	(%rcx), %ecx
	andl	%edx, %ecx
	je	LBB0_17
## %bb.16:
	movq	_EEE_CFG_ADV_SPEED_1G@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
LBB0_17:
	orl	%ecx, %eax
	movl	12(%rbx), %esi
	movq	_QED_EEE_10G_ADV@GOTPCREL(%rip), %rcx
	andl	(%rcx), %edx
	je	LBB0_19
## %bb.18:
	movq	_EEE_CFG_ADV_SPEED_10G@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
LBB0_19:
	movq	_EEE_TX_TIMER_USEC_OFFSET@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %esi
	movq	_EEE_TX_TIMER_USEC_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %esi
	orl	%edx, %esi
	orl	%esi, %eax
	movl	%eax, -80(%rbp)
LBB0_20:
	movl	%r15d, (%r13)
	movq	_NETIF_MSG_LINK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	testl	%r15d, %r15d
	je	LBB0_22
## %bb.21:
	movl	-60(%rbp), %ebx
	movl	-44(%rbp), %ecx
	leaq	L_.str(%rip), %rdx
	movq	%r13, %rdi
	xorl	%eax, %eax
	pushq	%rbx
	pushq	%r10
	callq	_DP_VERBOSE
	addq	$16, %rsp
	jmp	LBB0_23
LBB0_22:
	leaq	L_.str.1(%rip), %rdx
	movq	%r13, %rdi
	xorl	%eax, %eax
	callq	_DP_VERBOSE
LBB0_23:
	leaq	-120(%rbp), %rbx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$40, %edx
	callq	_memset
	movl	%r12d, -104(%rbp)
	leaq	-80(%rbp), %rax
	movq	%rax, -112(%rbp)
	movl	$40, -116(%rbp)
	movq	%r13, %rdi
	movq	%r14, %rsi
	movq	%rbx, %rdx
	callq	_qed_mcp_cmd_and_union
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_25
## %bb.24:
	leaq	L_.str.2(%rip), %rsi
	movq	%r13, %rdi
	callq	_DP_ERR
	jmp	LBB0_26
LBB0_25:
	xorl	%edx, %edx
	testl	%r15d, %r15d
	sete	%dl
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	_qed_mcp_handle_link_change
LBB0_26:
	movl	%ebx, %eax
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DRV_MSG_CODE_INIT_PHY,4,2      ## @DRV_MSG_CODE_INIT_PHY
	.comm	_DRV_MSG_CODE_LINK_RESET,4,2    ## @DRV_MSG_CODE_LINK_RESET
	.comm	_ETH_PAUSE_AUTONEG,4,2          ## @ETH_PAUSE_AUTONEG
	.comm	_ETH_PAUSE_RX,4,2               ## @ETH_PAUSE_RX
	.comm	_ETH_PAUSE_TX,4,2               ## @ETH_PAUSE_TX
	.comm	_FW_MB_PARAM_FEATURE_SUPPORT_EEE,4,2 ## @FW_MB_PARAM_FEATURE_SUPPORT_EEE
	.comm	_EEE_CFG_EEE_ENABLED,4,2        ## @EEE_CFG_EEE_ENABLED
	.comm	_EEE_CFG_TX_LPI,4,2             ## @EEE_CFG_TX_LPI
	.comm	_QED_EEE_1G_ADV,4,2             ## @QED_EEE_1G_ADV
	.comm	_EEE_CFG_ADV_SPEED_1G,4,2       ## @EEE_CFG_ADV_SPEED_1G
	.comm	_QED_EEE_10G_ADV,4,2            ## @QED_EEE_10G_ADV
	.comm	_EEE_CFG_ADV_SPEED_10G,4,2      ## @EEE_CFG_ADV_SPEED_10G
	.comm	_EEE_TX_TIMER_USEC_OFFSET,4,2   ## @EEE_TX_TIMER_USEC_OFFSET
	.comm	_EEE_TX_TIMER_USEC_MASK,4,2     ## @EEE_TX_TIMER_USEC_MASK
	.comm	_NETIF_MSG_LINK,4,2             ## @NETIF_MSG_LINK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Configuring Link: Speed 0x%08x, Pause 0x%08x, adv_speed 0x%08x, loopback 0x%08x, features 0x%08x\n"

L_.str.1:                               ## @.str.1
	.asciz	"Resetting link\n"

L_.str.2:                               ## @.str.2
	.asciz	"MCP response failure, aborting\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qed_mcp_set_link               ; -- Begin function qed_mcp_set_link
	.p2align	2
_qed_mcp_set_link:                      ; @qed_mcp_set_link
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #192
	.cfi_def_cfa_offset 192
	stp	x24, x23, [sp, #128]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #144]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #160]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #176]            ; 16-byte Folded Spill
	add	x29, sp, #176
	.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	x21, x2
	mov	x20, x1
	mov	x19, x0
	ldr	x23, [x0, #8]
	add	x0, sp, #48
	mov	w1, #0
	mov	w2, #40
	bl	_memset
Lloh0:
	adrp	x8, _DRV_MSG_CODE_INIT_PHY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DRV_MSG_CODE_INIT_PHY@GOTPAGEOFF]
Lloh2:
	adrp	x9, _DRV_MSG_CODE_LINK_RESET@GOTPAGE
Lloh3:
	ldr	x9, [x9, _DRV_MSG_CODE_LINK_RESET@GOTPAGEOFF]
	cmp	w21, #0
	csel	x8, x9, x8, eq
	ldr	w22, [x8]
	ldr	w8, [x23, #44]
	cbnz	w8, LBB0_2
; %bb.1:
	ldr	w8, [x23, #40]
	str	w8, [sp, #84]
LBB0_2:
	ldr	x8, [x23, #64]
Lloh4:
	adrp	x9, _ETH_PAUSE_AUTONEG@GOTPAGE
Lloh5:
	ldr	x9, [x9, _ETH_PAUSE_AUTONEG@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x9]
	cmp	x8, #0
	csel	w8, wzr, w9, eq
	ldr	w9, [sp, #80]
Lloh7:
	adrp	x10, _ETH_PAUSE_RX@GOTPAGE
Lloh8:
	ldr	x10, [x10, _ETH_PAUSE_RX@GOTPAGEOFF]
	orr	w8, w9, w8
Lloh9:
	ldr	w9, [x10]
	ldp	x11, x10, [x23, #48]
	cmp	x10, #0
	csel	w9, wzr, w9, eq
	orr	w8, w9, w8
Lloh10:
	adrp	x9, _ETH_PAUSE_TX@GOTPAGE
Lloh11:
	ldr	x9, [x9, _ETH_PAUSE_TX@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	cmp	x11, #0
	csel	w9, wzr, w9, eq
	orr	w8, w9, w8
	str	w8, [sp, #80]
	ldp	w10, w9, [x23, #32]
	stp	w10, w9, [sp, #72]
	ldr	x11, [x19, #8]
	ldr	w11, [x11]
Lloh13:
	adrp	x12, _FW_MB_PARAM_FEATURE_SUPPORT_EEE@GOTPAGE
Lloh14:
	ldr	x12, [x12, _FW_MB_PARAM_FEATURE_SUPPORT_EEE@GOTPAGEOFF]
Lloh15:
	ldr	w12, [x12]
	tst	w12, w11
	b.eq	LBB0_5
; %bb.3:
	ldr	x11, [x23, #24]
	cbz	x11, LBB0_5
; %bb.4:
Lloh16:
	adrp	x11, _EEE_CFG_EEE_ENABLED@GOTPAGE
Lloh17:
	ldr	x11, [x11, _EEE_CFG_EEE_ENABLED@GOTPAGEOFF]
Lloh18:
	ldr	w11, [x11]
	ldr	w12, [sp, #48]
	orr	w11, w12, w11
	ldr	x12, [x23, #16]
Lloh19:
	adrp	x13, _EEE_CFG_TX_LPI@GOTPAGE
Lloh20:
	ldr	x13, [x13, _EEE_CFG_TX_LPI@GOTPAGEOFF]
Lloh21:
	ldr	w13, [x13]
	cmp	x12, #0
	csel	w12, wzr, w13, eq
	orr	w11, w11, w12
Lloh22:
	adrp	x12, _QED_EEE_1G_ADV@GOTPAGE
Lloh23:
	ldr	x12, [x12, _QED_EEE_1G_ADV@GOTPAGEOFF]
Lloh24:
	ldr	w12, [x12]
Lloh25:
	adrp	x13, _EEE_CFG_ADV_SPEED_1G@GOTPAGE
Lloh26:
	ldr	x13, [x13, _EEE_CFG_ADV_SPEED_1G@GOTPAGEOFF]
Lloh27:
	ldr	w13, [x13]
	ldp	w14, w15, [x23, #8]
	tst	w12, w14
	csel	w12, wzr, w13, eq
Lloh28:
	adrp	x13, _QED_EEE_10G_ADV@GOTPAGE
Lloh29:
	ldr	x13, [x13, _QED_EEE_10G_ADV@GOTPAGEOFF]
	orr	w11, w11, w12
Lloh30:
	ldr	w12, [x13]
Lloh31:
	adrp	x13, _EEE_CFG_ADV_SPEED_10G@GOTPAGE
Lloh32:
	ldr	x13, [x13, _EEE_CFG_ADV_SPEED_10G@GOTPAGEOFF]
Lloh33:
	ldr	w13, [x13]
	tst	w12, w14
	csel	w12, wzr, w13, eq
	orr	w11, w11, w12
Lloh34:
	adrp	x12, _EEE_TX_TIMER_USEC_OFFSET@GOTPAGE
Lloh35:
	ldr	x12, [x12, _EEE_TX_TIMER_USEC_OFFSET@GOTPAGEOFF]
Lloh36:
	ldr	w12, [x12]
	lsl	w12, w15, w12
Lloh37:
	adrp	x13, _EEE_TX_TIMER_USEC_MASK@GOTPAGE
Lloh38:
	ldr	x13, [x13, _EEE_TX_TIMER_USEC_MASK@GOTPAGEOFF]
Lloh39:
	ldr	w13, [x13]
	and	w12, w12, w13
	orr	w11, w11, w12
	str	w11, [sp, #48]
LBB0_5:
	str	w21, [x19]
Lloh40:
	adrp	x11, _NETIF_MSG_LINK@GOTPAGE
Lloh41:
	ldr	x11, [x11, _NETIF_MSG_LINK@GOTPAGEOFF]
Lloh42:
	ldr	w1, [x11]
	cbz	w21, LBB0_7
; %bb.6:
	ldr	w11, [sp, #84]
	ldr	w12, [sp, #68]
	stp	x10, x12, [sp, #24]
	stp	x8, x9, [sp, #8]
	str	x11, [sp]
Lloh43:
	adrp	x2, l_.str@PAGE
Lloh44:
	add	x2, x2, l_.str@PAGEOFF
	b	LBB0_8
LBB0_7:
Lloh45:
	adrp	x2, l_.str.1@PAGE
Lloh46:
	add	x2, x2, l_.str.1@PAGEOFF
LBB0_8:
	mov	x0, x19
	bl	_DP_VERBOSE
	mov	w23, #40
	add	x0, sp, #88
	mov	w1, #0
	mov	w2, #40
	bl	_memset
	str	w22, [sp, #104]
	add	x8, sp, #48
	str	x8, [sp, #96]
	str	w23, [sp, #92]
	add	x2, sp, #88
	mov	x0, x19
	mov	x1, x20
	bl	_qed_mcp_cmd_and_union
	mov	x22, x0
	cbz	w0, LBB0_10
; %bb.9:
Lloh47:
	adrp	x1, l_.str.2@PAGE
Lloh48:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_DP_ERR
	b	LBB0_11
LBB0_10:
	cmp	w21, #0
	cset	w2, eq
	mov	x0, x19
	mov	x1, x20
	bl	_qed_mcp_handle_link_change
LBB0_11:
	mov	x0, x22
	ldp	x29, x30, [sp, #176]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #160]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #144]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #128]            ; 16-byte Folded Reload
	add	sp, sp, #192
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpAdd	Lloh43, Lloh44
	.loh AdrpAdd	Lloh45, Lloh46
	.loh AdrpAdd	Lloh47, Lloh48
	.cfi_endproc
                                        ; -- End function
	.comm	_DRV_MSG_CODE_INIT_PHY,4,2      ; @DRV_MSG_CODE_INIT_PHY
	.comm	_DRV_MSG_CODE_LINK_RESET,4,2    ; @DRV_MSG_CODE_LINK_RESET
	.comm	_ETH_PAUSE_AUTONEG,4,2          ; @ETH_PAUSE_AUTONEG
	.comm	_ETH_PAUSE_RX,4,2               ; @ETH_PAUSE_RX
	.comm	_ETH_PAUSE_TX,4,2               ; @ETH_PAUSE_TX
	.comm	_FW_MB_PARAM_FEATURE_SUPPORT_EEE,4,2 ; @FW_MB_PARAM_FEATURE_SUPPORT_EEE
	.comm	_EEE_CFG_EEE_ENABLED,4,2        ; @EEE_CFG_EEE_ENABLED
	.comm	_EEE_CFG_TX_LPI,4,2             ; @EEE_CFG_TX_LPI
	.comm	_QED_EEE_1G_ADV,4,2             ; @QED_EEE_1G_ADV
	.comm	_EEE_CFG_ADV_SPEED_1G,4,2       ; @EEE_CFG_ADV_SPEED_1G
	.comm	_QED_EEE_10G_ADV,4,2            ; @QED_EEE_10G_ADV
	.comm	_EEE_CFG_ADV_SPEED_10G,4,2      ; @EEE_CFG_ADV_SPEED_10G
	.comm	_EEE_TX_TIMER_USEC_OFFSET,4,2   ; @EEE_TX_TIMER_USEC_OFFSET
	.comm	_EEE_TX_TIMER_USEC_MASK,4,2     ; @EEE_TX_TIMER_USEC_MASK
	.comm	_NETIF_MSG_LINK,4,2             ; @NETIF_MSG_LINK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Configuring Link: Speed 0x%08x, Pause 0x%08x, adv_speed 0x%08x, loopback 0x%08x, features 0x%08x\n"

l_.str.1:                               ; @.str.1
	.asciz	"Resetting link\n"

l_.str.2:                               ; @.str.2
	.asciz	"MCP response failure, aborting\n"

.subsections_via_symbols
