	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bnx2x_get_cur_phy_idx          ## -- Begin function bnx2x_get_cur_phy_idx
	.p2align	4, 0x90
_bnx2x_get_cur_phy_idx:                 ## @bnx2x_get_cur_phy_idx
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	cmpl	$1, (%rdi)
	jg	LBB0_2
## %bb.1:
	movq	_INT_PHY@GOTPCREL(%rip), %rax
LBB0_10:
	movl	(%rax), %eax
LBB0_11:
	popq	%rbp
	retq
LBB0_2:
	cmpq	$0, 24(%rdi)
	je	LBB0_5
## %bb.3:
	movq	_EXT_PHY1@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_LINK_STATUS_SERDES_LINK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, 16(%rdi)
	je	LBB0_11
## %bb.4:
	movq	8(%rdi), %rcx
	movq	_EXT_PHY2@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movq	_SUPPORTED_FIBRE@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	testl	%esi, (%rcx,%rdx,4)
	cmovel	%eax, %edx
	movl	%edx, %eax
	popq	%rbp
	retq
LBB0_5:
	callq	_bnx2x_phy_selection
                                        ## kill: def $eax killed $eax def $rax
	leal	-130(%rax), %ecx
	cmpl	$3, %ecx
	jae	LBB0_6
## %bb.8:
	movq	_EXT_PHY1@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_6:
	addl	$-128, %eax
	cmpl	$2, %eax
	jae	LBB0_7
## %bb.9:
	movq	_EXT_PHY2@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_7:
	xorl	%eax, %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_INT_PHY,4,2                    ## @INT_PHY
	.comm	_EXT_PHY1,4,2                   ## @EXT_PHY1
	.comm	_LINK_STATUS_SERDES_LINK,4,2    ## @LINK_STATUS_SERDES_LINK
	.comm	_EXT_PHY2,8,3                   ## @EXT_PHY2
	.comm	_SUPPORTED_FIBRE,4,2            ## @SUPPORTED_FIBRE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bnx2x_get_cur_phy_idx          ; -- Begin function bnx2x_get_cur_phy_idx
	.p2align	2
_bnx2x_get_cur_phy_idx:                 ; @bnx2x_get_cur_phy_idx
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	ldr	w9, [x0]
	cmp	w9, #1
	b.gt	LBB0_4
; %bb.1:
Lloh0:
	adrp	x8, _INT_PHY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _INT_PHY@GOTPAGEOFF]
LBB0_2:
	ldr	w0, [x8]
LBB0_3:
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_4:
	mov	x8, x0
	ldr	x9, [x0, #24]
	cbz	x9, LBB0_7
; %bb.5:
Lloh2:
	adrp	x9, _EXT_PHY1@GOTPAGE
Lloh3:
	ldr	x9, [x9, _EXT_PHY1@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x9]
	ldr	w9, [x8, #16]
Lloh5:
	adrp	x10, _LINK_STATUS_SERDES_LINK@GOTPAGE
Lloh6:
	ldr	x10, [x10, _LINK_STATUS_SERDES_LINK@GOTPAGEOFF]
Lloh7:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_3
; %bb.6:
	ldr	x8, [x8, #8]
Lloh8:
	adrp	x9, _EXT_PHY2@GOTPAGE
Lloh9:
	ldr	x9, [x9, _EXT_PHY2@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	ldr	w8, [x8, x9, lsl #2]
Lloh11:
	adrp	x10, _SUPPORTED_FIBRE@GOTPAGE
Lloh12:
	ldr	x10, [x10, _SUPPORTED_FIBRE@GOTPAGEOFF]
Lloh13:
	ldr	w10, [x10]
	tst	w10, w8
	csel	w0, w0, w9, eq
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_7:
	mov	x0, x8
	bl	_bnx2x_phy_selection
	sub	w8, w0, #130
	cmp	w8, #3
	b.hs	LBB0_9
; %bb.8:
Lloh14:
	adrp	x8, _EXT_PHY1@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EXT_PHY1@GOTPAGEOFF]
	b	LBB0_2
LBB0_9:
	sub	w8, w0, #128
	cmp	w8, #2
	b.hs	LBB0_11
; %bb.10:
Lloh16:
	adrp	x8, _EXT_PHY2@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EXT_PHY2@GOTPAGEOFF]
	b	LBB0_2
LBB0_11:
	mov	w0, #0
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_INT_PHY,4,2                    ; @INT_PHY
	.comm	_EXT_PHY1,4,2                   ; @EXT_PHY1
	.comm	_LINK_STATUS_SERDES_LINK,4,2    ; @LINK_STATUS_SERDES_LINK
	.comm	_EXT_PHY2,8,3                   ; @EXT_PHY2
	.comm	_SUPPORTED_FIBRE,4,2            ; @SUPPORTED_FIBRE
.subsections_via_symbols
