	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bnxt_set_link_ksettings
_bnxt_set_link_ksettings:               ## @bnxt_set_link_ksettings
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r14
	callq	_netdev_priv
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_BNXT_SINGLE_PF
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	%r12, %rdi
	callq	_mutex_lock
	movq	(%r15), %rax
	movq	_AUTONEG_ENABLE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.3:
	movq	_advertising@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%edi, %edi
	movq	%r15, %rsi
	callq	_BNXT_ETHTOOL_TO_FW_SPDS
	movq	_BNXT_AUTONEG_SPEED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 32(%r12)
	movq	48(%r12), %rax
	movl	$1, %ebx
LBB0_14:
	movq	%rax, 24(%r12)
	movq	%r14, %rdi
	callq	_netif_running
	testq	%rax, %rax
	je	LBB0_15
## %bb.16:
	movq	%r12, %rdi
	movl	%ebx, %esi
	xorl	%edx, %edx
	callq	_bnxt_hwrm_set_link_setting
	movl	%eax, %ebx
	jmp	LBB0_17
LBB0_1:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_18
LBB0_4:
	movq	8(%r12), %rax
	movq	_PORT_PHY_QCFG_RESP_PHY_TYPE_BASET@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_7
## %bb.5:
	movq	_PORT_PHY_QCFG_RESP_PHY_TYPE_BASETE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_7
## %bb.6:
	movq	16(%r12), %rax
	movq	_PORT_PHY_QCFG_RESP_MEDIA_TYPE_TP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_9
LBB0_7:
	leaq	L_.str(%rip), %rsi
LBB0_8:
	movq	%r14, %rdi
	callq	_netdev_err
LBB0_12:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_17
LBB0_15:
	xorl	%ebx, %ebx
LBB0_17:
	movq	%r12, %rdi
	callq	_mutex_unlock
LBB0_18:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	8(%r15), %rax
	movq	_DUPLEX_HALF@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_11
## %bb.10:
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_8
LBB0_11:
	movl	16(%r15), %esi
	movq	%r14, %rdi
	callq	_bnxt_get_fw_speed
	testq	%rax, %rax
	je	LBB0_12
## %bb.13:
	movq	%rax, 40(%r12)
	movq	_BNXT_LINK_DUPLEX_FULL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 36(%r12)
	movl	$0, 32(%r12)
	xorl	%eax, %eax
	xorl	%ebx, %ebx
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.comm	_AUTONEG_ENABLE,8,3             ## @AUTONEG_ENABLE
	.comm	_advertising,4,2                ## @advertising
	.comm	_BNXT_AUTONEG_SPEED,4,2         ## @BNXT_AUTONEG_SPEED
	.comm	_PORT_PHY_QCFG_RESP_PHY_TYPE_BASET,8,3 ## @PORT_PHY_QCFG_RESP_PHY_TYPE_BASET
	.comm	_PORT_PHY_QCFG_RESP_PHY_TYPE_BASETE,8,3 ## @PORT_PHY_QCFG_RESP_PHY_TYPE_BASETE
	.comm	_PORT_PHY_QCFG_RESP_MEDIA_TYPE_TP,8,3 ## @PORT_PHY_QCFG_RESP_MEDIA_TYPE_TP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"10GBase-T devices must autoneg\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_DUPLEX_HALF,8,3                ## @DUPLEX_HALF
L_.str.1:                               ## @.str.1
	.asciz	"HALF DUPLEX is not supported!\n"

	.comm	_BNXT_LINK_DUPLEX_FULL,4,2      ## @BNXT_LINK_DUPLEX_FULL
	.no_dead_strip	_bnxt_set_link_ksettings
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bnxt_set_link_ksettings
_bnxt_set_link_ksettings:               ; @bnxt_set_link_ksettings
	.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	x21, x1
	mov	x20, x0
	bl	_netdev_priv
	mov	x19, x0
	bl	_BNXT_SINGLE_PF
	cbz	w0, LBB0_5
; %bb.1:
	mov	x0, x19
	bl	_mutex_lock
	ldr	x8, [x21]
Lloh0:
	adrp	x9, _AUTONEG_ENABLE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AUTONEG_ENABLE@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.2:
Lloh3:
	adrp	x8, _advertising@GOTPAGE
Lloh4:
	ldr	x8, [x8, _advertising@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, #0
	mov	x1, x21
	bl	_BNXT_ETHTOOL_TO_FW_SPDS
Lloh6:
	adrp	x8, _BNXT_AUTONEG_SPEED@GOTPAGE
Lloh7:
	ldr	x8, [x8, _BNXT_AUTONEG_SPEED@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	ldr	w9, [x19, #32]
	orr	w8, w9, w8
	str	w8, [x19, #32]
	ldr	x8, [x19, #48]
	mov	w21, #1
LBB0_3:
	str	x8, [x19, #24]
	mov	x0, x20
	bl	_netif_running
	cbz	x0, LBB0_11
; %bb.4:
	mov	x0, x19
	mov	x1, x21
	mov	w2, #0
	bl	_bnxt_hwrm_set_link_setting
	mov	x20, x0
	b	LBB0_12
LBB0_5:
Lloh9:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_13
LBB0_6:
	ldr	x8, [x19, #8]
Lloh12:
	adrp	x9, _PORT_PHY_QCFG_RESP_PHY_TYPE_BASET@GOTPAGE
Lloh13:
	ldr	x9, [x9, _PORT_PHY_QCFG_RESP_PHY_TYPE_BASET@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
Lloh15:
	adrp	x10, _PORT_PHY_QCFG_RESP_PHY_TYPE_BASETE@GOTPAGE
Lloh16:
	ldr	x10, [x10, _PORT_PHY_QCFG_RESP_PHY_TYPE_BASETE@GOTPAGEOFF]
Lloh17:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.eq	LBB0_8
; %bb.7:
	ldr	x8, [x19, #16]
Lloh18:
	adrp	x9, _PORT_PHY_QCFG_RESP_MEDIA_TYPE_TP@GOTPAGE
Lloh19:
	ldr	x9, [x9, _PORT_PHY_QCFG_RESP_MEDIA_TYPE_TP@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_14
LBB0_8:
Lloh21:
	adrp	x1, l_.str@PAGE
Lloh22:
	add	x1, x1, l_.str@PAGEOFF
LBB0_9:
	mov	x0, x20
	bl	_netdev_err
LBB0_10:
Lloh23:
	adrp	x8, _EINVAL@GOTPAGE
Lloh24:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_12
LBB0_11:
	mov	w20, #0
LBB0_12:
	mov	x0, x19
	bl	_mutex_unlock
LBB0_13:
	mov	x0, x20
	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_14:
	ldr	x8, [x21, #8]
Lloh26:
	adrp	x9, _DUPLEX_HALF@GOTPAGE
Lloh27:
	ldr	x9, [x9, _DUPLEX_HALF@GOTPAGEOFF]
Lloh28:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_16
; %bb.15:
Lloh29:
	adrp	x1, l_.str.1@PAGE
Lloh30:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_9
LBB0_16:
	ldr	w1, [x21, #16]
	mov	x0, x20
	bl	_bnxt_get_fw_speed
	cbz	x0, LBB0_10
; %bb.17:
	mov	x8, #0
	mov	w21, #0
	str	x0, [x19, #40]
Lloh31:
	adrp	x9, _BNXT_LINK_DUPLEX_FULL@GOTPAGE
Lloh32:
	ldr	x9, [x9, _BNXT_LINK_DUPLEX_FULL@GOTPAGEOFF]
Lloh33:
	ldr	w9, [x9]
	stp	wzr, w9, [x19, #32]
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.comm	_AUTONEG_ENABLE,8,3             ; @AUTONEG_ENABLE
	.comm	_advertising,4,2                ; @advertising
	.comm	_BNXT_AUTONEG_SPEED,4,2         ; @BNXT_AUTONEG_SPEED
	.comm	_PORT_PHY_QCFG_RESP_PHY_TYPE_BASET,8,3 ; @PORT_PHY_QCFG_RESP_PHY_TYPE_BASET
	.comm	_PORT_PHY_QCFG_RESP_PHY_TYPE_BASETE,8,3 ; @PORT_PHY_QCFG_RESP_PHY_TYPE_BASETE
	.comm	_PORT_PHY_QCFG_RESP_MEDIA_TYPE_TP,8,3 ; @PORT_PHY_QCFG_RESP_MEDIA_TYPE_TP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"10GBase-T devices must autoneg\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_DUPLEX_HALF,8,3                ; @DUPLEX_HALF
l_.str.1:                               ; @.str.1
	.asciz	"HALF DUPLEX is not supported!\n"

	.comm	_BNXT_LINK_DUPLEX_FULL,4,2      ; @BNXT_LINK_DUPLEX_FULL
	.no_dead_strip	_bnxt_set_link_ksettings
.subsections_via_symbols
