	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bnx2x_initial_phy_init         ## -- Begin function bnx2x_initial_phy_init
	.p2align	4, 0x90
_bnx2x_initial_phy_init:                ## @bnx2x_initial_phy_init
	.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
	movl	%esi, %r14d
	movq	%rdi, %rbx
	callq	_bnx2x_get_link_cfg_idx
	movq	(%rbx), %rcx
	movslq	%eax, %r15
	movq	(%rcx,%r15,8), %r12
	movq	%rbx, %rdi
	callq	_BP_NOMCP
	testl	%eax, %eax
	je	LBB0_1
## %bb.14:
	leaq	L_.str(%rip), %rdi
	callq	_BNX2X_ERR
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_15
LBB0_1:
	movq	%rbx, %rdi
	callq	_bnx2x_set_requested_fc
	movq	%rbx, %rdi
	callq	_bnx2x_acquire_phy_lock
	movq	_LOAD_DIAG@GOTPCREL(%rip), %rax
	cmpl	%r14d, (%rax)
	jne	LBB0_9
## %bb.2:
	movq	_LOOPBACK_XGXS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rbx)
	movq	(%rbx), %rax
	movq	_SPEED_20000@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	%rcx, (%rax,%r15,8)
	jge	LBB0_9
## %bb.3:
	movq	8(%rbx), %rdx
	movl	(%rdx,%r15,4), %edx
	movq	_PORT_HW_CFG_SPEED_CAPABILITY_D0_20G@GOTPCREL(%rip), %rsi
	testl	%edx, (%rsi)
	jne	LBB0_8
## %bb.4:
	movq	_PORT_HW_CFG_SPEED_CAPABILITY_D0_10G@GOTPCREL(%rip), %rcx
	testl	%edx, (%rcx)
	je	LBB0_6
## %bb.5:
	movq	_SPEED_10000@GOTPCREL(%rip), %rcx
	jmp	LBB0_7
LBB0_6:
	movq	_SPEED_1000@GOTPCREL(%rip), %rcx
LBB0_7:
	movq	(%rcx), %rcx
LBB0_8:
	movq	%rcx, (%rax,%r15,8)
LBB0_9:
	movq	_LOAD_LOOPBACK_EXT@GOTPCREL(%rip), %rax
	cmpl	%r14d, (%rax)
	jne	LBB0_11
## %bb.10:
	movq	_LOOPBACK_EXT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rbx)
LBB0_11:
	leaq	32(%rbx), %rsi
	movq	%rbx, %rdi
	callq	_bnx2x_phy_init
	movl	%eax, %r14d
	movq	%rbx, %rdi
	callq	_bnx2x_release_phy_lock
	movq	%rbx, %rdi
	callq	_bnx2x_init_dropless_fc
	movq	%rbx, %rdi
	callq	_bnx2x_calc_fc_adv
	cmpq	$0, 32(%rbx)
	je	LBB0_13
## %bb.12:
	movq	_STATS_EVENT_LINK_UP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_bnx2x_stats_handle
	movq	%rbx, %rdi
	callq	_bnx2x_link_report
LBB0_13:
	movq	_bnx2x_wq@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	24(%rbx), %rsi
	xorl	%edx, %edx
	callq	_queue_delayed_work
	movq	(%rbx), %rax
	movq	%r12, (%rax,%r15,8)
LBB0_15:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LOAD_DIAG,4,2                  ## @LOAD_DIAG
	.comm	_LOOPBACK_XGXS,4,2              ## @LOOPBACK_XGXS
	.comm	_SPEED_20000,8,3                ## @SPEED_20000
	.comm	_PORT_HW_CFG_SPEED_CAPABILITY_D0_20G,4,2 ## @PORT_HW_CFG_SPEED_CAPABILITY_D0_20G
	.comm	_PORT_HW_CFG_SPEED_CAPABILITY_D0_10G,4,2 ## @PORT_HW_CFG_SPEED_CAPABILITY_D0_10G
	.comm	_SPEED_10000,8,3                ## @SPEED_10000
	.comm	_SPEED_1000,8,3                 ## @SPEED_1000
	.comm	_LOAD_LOOPBACK_EXT,4,2          ## @LOAD_LOOPBACK_EXT
	.comm	_LOOPBACK_EXT,4,2               ## @LOOPBACK_EXT
	.comm	_STATS_EVENT_LINK_UP,4,2        ## @STATS_EVENT_LINK_UP
	.comm	_bnx2x_wq,4,2                   ## @bnx2x_wq
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Bootcode is missing - can not initialize link\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bnx2x_initial_phy_init         ; -- Begin function bnx2x_initial_phy_init
	.p2align	2
_bnx2x_initial_phy_init:                ; @bnx2x_initial_phy_init
	.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
	bl	_bnx2x_get_link_cfg_idx
	mov	x21, x0
	ldr	x8, [x19]
	ldr	x22, [x8, w0, sxtw #3]
	mov	x0, x19
	bl	_BP_NOMCP
	cbz	w0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_BNX2X_ERR
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_15
LBB0_2:
	sxtw	x21, w21
	mov	x0, x19
	bl	_bnx2x_set_requested_fc
	mov	x0, x19
	bl	_bnx2x_acquire_phy_lock
Lloh5:
	adrp	x8, _LOAD_DIAG@GOTPAGE
Lloh6:
	ldr	x8, [x8, _LOAD_DIAG@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	cmp	w8, w20
	b.ne	LBB0_10
; %bb.3:
Lloh8:
	adrp	x8, _LOOPBACK_XGXS@GOTPAGE
Lloh9:
	ldr	x8, [x8, _LOOPBACK_XGXS@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	str	w8, [x19, #16]
	ldr	x8, [x19]
	ldr	x10, [x8, x21, lsl #3]
Lloh11:
	adrp	x9, _SPEED_20000@GOTPAGE
Lloh12:
	ldr	x9, [x9, _SPEED_20000@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x10, x9
	b.ge	LBB0_10
; %bb.4:
	ldr	x10, [x19, #8]
	ldr	w10, [x10, x21, lsl #2]
Lloh14:
	adrp	x11, _PORT_HW_CFG_SPEED_CAPABILITY_D0_20G@GOTPAGE
Lloh15:
	ldr	x11, [x11, _PORT_HW_CFG_SPEED_CAPABILITY_D0_20G@GOTPAGEOFF]
Lloh16:
	ldr	w11, [x11]
	tst	w11, w10
	b.ne	LBB0_9
; %bb.5:
Lloh17:
	adrp	x9, _PORT_HW_CFG_SPEED_CAPABILITY_D0_10G@GOTPAGE
Lloh18:
	ldr	x9, [x9, _PORT_HW_CFG_SPEED_CAPABILITY_D0_10G@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	tst	w9, w10
	b.eq	LBB0_7
; %bb.6:
Lloh20:
	adrp	x9, _SPEED_10000@GOTPAGE
Lloh21:
	ldr	x9, [x9, _SPEED_10000@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
Lloh22:
	adrp	x9, _SPEED_1000@GOTPAGE
Lloh23:
	ldr	x9, [x9, _SPEED_1000@GOTPAGEOFF]
LBB0_8:
	ldr	x9, [x9]
LBB0_9:
	str	x9, [x8, x21, lsl #3]
LBB0_10:
Lloh24:
	adrp	x8, _LOAD_LOOPBACK_EXT@GOTPAGE
Lloh25:
	ldr	x8, [x8, _LOAD_LOOPBACK_EXT@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	cmp	w8, w20
	b.ne	LBB0_12
; %bb.11:
Lloh27:
	adrp	x8, _LOOPBACK_EXT@GOTPAGE
Lloh28:
	ldr	x8, [x8, _LOOPBACK_EXT@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	str	w8, [x19, #16]
LBB0_12:
	add	x1, x19, #32
	mov	x0, x19
	bl	_bnx2x_phy_init
	mov	x20, x0
	mov	x0, x19
	bl	_bnx2x_release_phy_lock
	mov	x0, x19
	bl	_bnx2x_init_dropless_fc
	mov	x0, x19
	bl	_bnx2x_calc_fc_adv
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_14
; %bb.13:
Lloh30:
	adrp	x8, _STATS_EVENT_LINK_UP@GOTPAGE
Lloh31:
	ldr	x8, [x8, _STATS_EVENT_LINK_UP@GOTPAGEOFF]
Lloh32:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_bnx2x_stats_handle
	mov	x0, x19
	bl	_bnx2x_link_report
LBB0_14:
Lloh33:
	adrp	x8, _bnx2x_wq@GOTPAGE
Lloh34:
	ldr	x8, [x8, _bnx2x_wq@GOTPAGEOFF]
Lloh35:
	ldr	w0, [x8]
	add	x1, x19, #24
	mov	w2, #0
	bl	_queue_delayed_work
	ldr	x8, [x19]
	str	x22, [x8, x21, lsl #3]
LBB0_15:
	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
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_LOAD_DIAG,4,2                  ; @LOAD_DIAG
	.comm	_LOOPBACK_XGXS,4,2              ; @LOOPBACK_XGXS
	.comm	_SPEED_20000,8,3                ; @SPEED_20000
	.comm	_PORT_HW_CFG_SPEED_CAPABILITY_D0_20G,4,2 ; @PORT_HW_CFG_SPEED_CAPABILITY_D0_20G
	.comm	_PORT_HW_CFG_SPEED_CAPABILITY_D0_10G,4,2 ; @PORT_HW_CFG_SPEED_CAPABILITY_D0_10G
	.comm	_SPEED_10000,8,3                ; @SPEED_10000
	.comm	_SPEED_1000,8,3                 ; @SPEED_1000
	.comm	_LOAD_LOOPBACK_EXT,4,2          ; @LOAD_LOOPBACK_EXT
	.comm	_LOOPBACK_EXT,4,2               ; @LOOPBACK_EXT
	.comm	_STATS_EVENT_LINK_UP,4,2        ; @STATS_EVENT_LINK_UP
	.comm	_bnx2x_wq,4,2                   ; @bnx2x_wq
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Bootcode is missing - can not initialize link\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
.subsections_via_symbols
