	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bnxt_update_phy_setting
_bnxt_update_phy_setting:               ## @bnxt_update_phy_setting
	.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, %rbx
	movl	$1, %esi
	callq	_bnxt_update_link
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %r14d
	movl	(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	callq	_netdev_err
LBB0_16:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	%rbx, %rdi
	callq	_BNXT_SINGLE_PF
	xorl	%r14d, %r14d
	testl	%eax, %eax
	je	LBB0_16
## %bb.3:
	movl	8(%rbx), %eax
	movq	_BNXT_AUTONEG_FLOW_CTRL@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_5
## %bb.4:
	movq	_BNXT_LINK_PAUSE_BOTH@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r13d
	andl	12(%rbx), %r13d
	jmp	LBB0_6
LBB0_5:
	movl	20(%rbx), %r13d
LBB0_6:
	movl	16(%rbx), %ecx
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	cmpl	%ecx, %r13d
	setne	-41(%rbp)                       ## 1-byte Folded Spill
	movq	_BNXT_AUTONEG_SPEED@GOTPCREL(%rip), %rcx
	movq	24(%rbx), %rdi
	testl	%eax, (%rcx)
	je	LBB0_7
## %bb.8:
	movq	_BNXT_LINK_AUTO_NONE@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdi
	sete	%al
	movq	64(%rbx), %rcx
	cmpq	72(%rbx), %rcx
	setne	%r15b
	orb	%al, %r15b
	jmp	LBB0_9
LBB0_7:
	callq	_BNXT_AUTO_MODE
	movq	32(%rbx), %rcx
	movq	48(%rbx), %rdx
	xorq	40(%rbx), %rcx
	xorq	56(%rbx), %rdx
	orq	%rcx, %rdx
	orq	%rax, %rdx
	setne	%r15b
LBB0_9:
	movl	(%rbx), %edi
	callq	_netif_carrier_ok
	movl	%eax, %r12d
	movq	%rbx, %rdi
	callq	_bnxt_eee_config_ok
	testl	%r12d, %r12d
	je	LBB0_11
## %bb.10:
	testb	%r15b, %r15b
	jne	LBB0_11
## %bb.12:
	cmpl	-48(%rbp), %r13d                ## 4-byte Folded Reload
	je	LBB0_16
## %bb.13:
	movq	%rbx, %rdi
	callq	_bnxt_hwrm_set_pause
	jmp	LBB0_14
LBB0_11:
	xorl	%esi, %esi
	movb	-41(%rbp), %cl                  ## 1-byte Reload
	movb	%cl, %sil
	xorl	%edx, %edx
	testl	%eax, %eax
	sete	%dl
	movq	%rbx, %rdi
	callq	_bnxt_hwrm_set_link_setting
LBB0_14:
	movl	%eax, %r15d
	testl	%eax, %eax
	je	LBB0_16
## %bb.15:
	movl	(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%r15d, %edx
	callq	_netdev_err
	movl	%r15d, %r14d
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to update link (rc: %x)\n"

	.comm	_BNXT_AUTONEG_FLOW_CTRL,4,2     ## @BNXT_AUTONEG_FLOW_CTRL
	.comm	_BNXT_LINK_PAUSE_BOTH,4,2       ## @BNXT_LINK_PAUSE_BOTH
	.comm	_BNXT_AUTONEG_SPEED,4,2         ## @BNXT_AUTONEG_SPEED
	.comm	_BNXT_LINK_AUTO_NONE,8,3        ## @BNXT_LINK_AUTO_NONE
L_.str.1:                               ## @.str.1
	.asciz	"failed to update phy setting (rc: %x)\n"

	.no_dead_strip	_bnxt_update_phy_setting
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bnxt_update_phy_setting
_bnxt_update_phy_setting:               ; @bnxt_update_phy_setting
	.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
	mov	w1, #1
	bl	_bnxt_update_link
	cbz	w0, LBB0_3
; %bb.1:
	mov	x20, x0
	ldr	w0, [x19]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
LBB0_2:
	mov	x2, x20
	bl	_netdev_err
	b	LBB0_18
LBB0_3:
	mov	x0, x19
	bl	_BNXT_SINGLE_PF
	cbz	w0, LBB0_14
; %bb.4:
	ldr	w8, [x19, #8]
Lloh2:
	adrp	x9, _BNXT_AUTONEG_FLOW_CTRL@GOTPAGE
Lloh3:
	ldr	x9, [x9, _BNXT_AUTONEG_FLOW_CTRL@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.5:
	ldr	w9, [x19, #12]
Lloh5:
	adrp	x10, _BNXT_LINK_PAUSE_BOTH@GOTPAGE
Lloh6:
	ldr	x10, [x10, _BNXT_LINK_PAUSE_BOTH@GOTPAGEOFF]
Lloh7:
	ldr	w10, [x10]
	and	w22, w10, w9
	b	LBB0_7
LBB0_6:
	ldr	w22, [x19, #20]
LBB0_7:
	ldr	w23, [x19, #16]
	cmp	w22, w23
	cset	w20, ne
Lloh8:
	adrp	x9, _BNXT_AUTONEG_SPEED@GOTPAGE
Lloh9:
	ldr	x9, [x9, _BNXT_AUTONEG_SPEED@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	ldr	x0, [x19, #24]
	tst	w9, w8
	b.eq	LBB0_9
; %bb.8:
Lloh11:
	adrp	x8, _BNXT_LINK_AUTO_NONE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _BNXT_LINK_AUTO_NONE@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	ldp	x9, x10, [x19, #64]
	cmp	x9, x10
	ccmp	x0, x8, #4, eq
	cset	w24, eq
	b	LBB0_10
LBB0_9:
	bl	_BNXT_AUTO_MODE
	ldp	x8, x9, [x19, #32]
	ldp	x10, x11, [x19, #48]
	cmp	x10, x11
	ccmp	x8, x9, #0, eq
	ccmp	x0, #0, #0, eq
	cset	w24, ne
LBB0_10:
	ldr	w0, [x19]
	bl	_netif_carrier_ok
	mov	x21, x0
	mov	x0, x19
	bl	_bnxt_eee_config_ok
	cbz	w21, LBB0_15
; %bb.11:
	cbnz	w24, LBB0_15
; %bb.12:
	cmp	w22, w23
	b.eq	LBB0_14
; %bb.13:
	mov	x0, x19
	bl	_bnxt_hwrm_set_pause
	b	LBB0_16
LBB0_14:
	mov	w20, #0
	b	LBB0_18
LBB0_15:
	cmp	w0, #0
	cset	w2, eq
	mov	x0, x19
	mov	x1, x20
	bl	_bnxt_hwrm_set_link_setting
LBB0_16:
	mov	x20, x0
	cbz	w0, LBB0_18
; %bb.17:
	ldr	w0, [x19]
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_2
LBB0_18:
	mov	x0, x20
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to update link (rc: %x)\n"

	.comm	_BNXT_AUTONEG_FLOW_CTRL,4,2     ; @BNXT_AUTONEG_FLOW_CTRL
	.comm	_BNXT_LINK_PAUSE_BOTH,4,2       ; @BNXT_LINK_PAUSE_BOTH
	.comm	_BNXT_AUTONEG_SPEED,4,2         ; @BNXT_AUTONEG_SPEED
	.comm	_BNXT_LINK_AUTO_NONE,8,3        ; @BNXT_LINK_AUTO_NONE
l_.str.1:                               ; @.str.1
	.asciz	"failed to update phy setting (rc: %x)\n"

	.no_dead_strip	_bnxt_update_phy_setting
.subsections_via_symbols
