	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bnx2x_prepare_xgxs
_bnx2x_prepare_xgxs:                    ## @bnx2x_prepare_xgxs
	.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	_PHY_XGXS_FLAG@GOTPCREL(%rip), %rcx
	movl	4(%rdx), %eax
	orl	(%rcx), %eax
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movl	%eax, 4(%rdx)
	movq	(%rdi), %rcx
	testq	%rcx, %rcx
	je	LBB0_3
## %bb.1:
	movq	_SPEED_100@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rcx
	je	LBB0_6
## %bb.2:
	movq	_SPEED_10@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rcx
	jne	LBB0_5
	jmp	LBB0_6
LBB0_3:
	movq	8(%rbx), %rcx
	movq	_PORT_HW_CFG_SPEED_CAPABILITY_D0_10M_FULL@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rcx
	jl	LBB0_5
## %bb.4:
	movq	_PORT_HW_CFG_SPEED_CAPABILITY_D0_1G@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rcx
	jl	LBB0_6
LBB0_5:
	movq	16(%rbx), %rcx
	movq	_PORT_HW_CFG_SERDES_EXT_PHY_TYPE_DIRECT_SD@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rcx
	jne	LBB0_7
LBB0_6:
	movq	_PHY_SGMII_FLAG@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	jmp	LBB0_8
LBB0_7:
	movq	_PHY_SGMII_FLAG@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	andl	%ecx, %eax
LBB0_8:
	movl	%eax, 4(%rdx)
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_bnx2x_calc_ieee_aneg_adv
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_bnx2x_set_aer_mmd
	movq	16(%rbx), %rax
	movq	_PORT_HW_CFG_XGXS_EXT_PHY_TYPE_DIRECT@GOTPCREL(%rip), %r12
	cmpq	(%r12), %rax
	jne	LBB0_10
## %bb.9:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_bnx2x_set_master_ln
LBB0_10:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	xorl	%edx, %edx
	callq	_bnx2x_reset_unicore
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_13
## %bb.11:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_bnx2x_set_aer_mmd
	movq	16(%rbx), %rax
	cmpq	(%r12), %rax
	jne	LBB0_13
## %bb.12:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_bnx2x_set_master_ln
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_bnx2x_set_swap_lanes
LBB0_13:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PHY_XGXS_FLAG,4,2              ## @PHY_XGXS_FLAG
	.comm	_SPEED_100,8,3                  ## @SPEED_100
	.comm	_SPEED_10,8,3                   ## @SPEED_10
	.comm	_PORT_HW_CFG_SPEED_CAPABILITY_D0_10M_FULL,8,3 ## @PORT_HW_CFG_SPEED_CAPABILITY_D0_10M_FULL
	.comm	_PORT_HW_CFG_SPEED_CAPABILITY_D0_1G,8,3 ## @PORT_HW_CFG_SPEED_CAPABILITY_D0_1G
	.comm	_PORT_HW_CFG_SERDES_EXT_PHY_TYPE_DIRECT_SD,8,3 ## @PORT_HW_CFG_SERDES_EXT_PHY_TYPE_DIRECT_SD
	.comm	_PHY_SGMII_FLAG,4,2             ## @PHY_SGMII_FLAG
	.comm	_PORT_HW_CFG_XGXS_EXT_PHY_TYPE_DIRECT,8,3 ## @PORT_HW_CFG_XGXS_EXT_PHY_TYPE_DIRECT
	.no_dead_strip	_bnx2x_prepare_xgxs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bnx2x_prepare_xgxs
_bnx2x_prepare_xgxs:                    ; @bnx2x_prepare_xgxs
	.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
Lloh0:
	adrp	x8, _PHY_XGXS_FLAG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PHY_XGXS_FLAG@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	w9, [x2, #4]
	orr	w8, w9, w8
	str	w8, [x2, #4]
	ldr	x9, [x0]
	cbz	x9, LBB0_2
; %bb.1:
Lloh3:
	adrp	x10, _SPEED_100@GOTPAGE
Lloh4:
	ldr	x10, [x10, _SPEED_100@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
Lloh6:
	adrp	x11, _SPEED_10@GOTPAGE
Lloh7:
	ldr	x11, [x11, _SPEED_10@GOTPAGEOFF]
Lloh8:
	ldr	x11, [x11]
	cmp	x9, x10
	ccmp	x9, x11, #4, ne
	b.ne	LBB0_3
	b	LBB0_4
LBB0_2:
	ldr	x9, [x19, #8]
Lloh9:
	adrp	x10, _PORT_HW_CFG_SPEED_CAPABILITY_D0_10M_FULL@GOTPAGE
Lloh10:
	ldr	x10, [x10, _PORT_HW_CFG_SPEED_CAPABILITY_D0_10M_FULL@GOTPAGEOFF]
Lloh11:
	ldr	x10, [x10]
Lloh12:
	adrp	x11, _PORT_HW_CFG_SPEED_CAPABILITY_D0_1G@GOTPAGE
Lloh13:
	ldr	x11, [x11, _PORT_HW_CFG_SPEED_CAPABILITY_D0_1G@GOTPAGEOFF]
Lloh14:
	ldr	x11, [x11]
	cmp	x9, x10
	ccmp	x9, x11, #0, ge
	b.lt	LBB0_4
LBB0_3:
	ldr	x9, [x19, #16]
Lloh15:
	adrp	x10, _PORT_HW_CFG_SERDES_EXT_PHY_TYPE_DIRECT_SD@GOTPAGE
Lloh16:
	ldr	x10, [x10, _PORT_HW_CFG_SERDES_EXT_PHY_TYPE_DIRECT_SD@GOTPAGEOFF]
Lloh17:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_5
LBB0_4:
Lloh18:
	adrp	x9, _PHY_SGMII_FLAG@GOTPAGE
Lloh19:
	ldr	x9, [x9, _PHY_SGMII_FLAG@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	orr	w8, w9, w8
	b	LBB0_6
LBB0_5:
Lloh21:
	adrp	x9, _PHY_SGMII_FLAG@GOTPAGE
Lloh22:
	ldr	x9, [x9, _PHY_SGMII_FLAG@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	bic	w8, w8, w9
LBB0_6:
	str	w8, [x2, #4]
	mov	x0, x19
	mov	x1, x20
	bl	_bnx2x_calc_ieee_aneg_adv
	mov	x0, x20
	mov	x1, x19
	bl	_bnx2x_set_aer_mmd
	ldr	x8, [x19, #16]
Lloh24:
	adrp	x22, _PORT_HW_CFG_XGXS_EXT_PHY_TYPE_DIRECT@GOTPAGE
Lloh25:
	ldr	x22, [x22, _PORT_HW_CFG_XGXS_EXT_PHY_TYPE_DIRECT@GOTPAGEOFF]
	ldr	x9, [x22]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.7:
	mov	x0, x20
	mov	x1, x19
	bl	_bnx2x_set_master_ln
LBB0_8:
	mov	x0, x20
	mov	x1, x19
	mov	w2, #0
	bl	_bnx2x_reset_unicore
	mov	x21, x0
	cbnz	w0, LBB0_11
; %bb.9:
	mov	x0, x20
	mov	x1, x19
	bl	_bnx2x_set_aer_mmd
	ldr	x8, [x19, #16]
	ldr	x9, [x22]
	cmp	x8, x9
	b.ne	LBB0_11
; %bb.10:
	mov	x0, x20
	mov	x1, x19
	bl	_bnx2x_set_master_ln
	mov	x0, x20
	mov	x1, x19
	bl	_bnx2x_set_swap_lanes
LBB0_11:
	mov	x0, x21
	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 AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_PHY_XGXS_FLAG,4,2              ; @PHY_XGXS_FLAG
	.comm	_SPEED_100,8,3                  ; @SPEED_100
	.comm	_SPEED_10,8,3                   ; @SPEED_10
	.comm	_PORT_HW_CFG_SPEED_CAPABILITY_D0_10M_FULL,8,3 ; @PORT_HW_CFG_SPEED_CAPABILITY_D0_10M_FULL
	.comm	_PORT_HW_CFG_SPEED_CAPABILITY_D0_1G,8,3 ; @PORT_HW_CFG_SPEED_CAPABILITY_D0_1G
	.comm	_PORT_HW_CFG_SERDES_EXT_PHY_TYPE_DIRECT_SD,8,3 ; @PORT_HW_CFG_SERDES_EXT_PHY_TYPE_DIRECT_SD
	.comm	_PHY_SGMII_FLAG,4,2             ; @PHY_SGMII_FLAG
	.comm	_PORT_HW_CFG_XGXS_EXT_PHY_TYPE_DIRECT,8,3 ; @PORT_HW_CFG_XGXS_EXT_PHY_TYPE_DIRECT
	.no_dead_strip	_bnx2x_prepare_xgxs
.subsections_via_symbols
