	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bnx2x_8726_common_init_phy
_bnx2x_8726_common_init_phy:            ## @bnx2x_8726_common_init_phy
	.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
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movq	%rdx, %r15
	movq	%rsi, %r12
	movq	%rdi, %r13
	movq	_MISC_REG_GPIO_EVENT_EN@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	callq	_REG_RD
	movq	_MISC_REGISTERS_GPIO_3@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_MISC_REGISTERS_GPIO_PORT_SHIFT@GOTPCREL(%rip), %rdx
	btsl	%ecx, %eax
	addl	(%rdx), %ecx
	btsl	%ecx, %eax
	movl	(%rbx), %esi
	movq	%r13, %rdi
	movl	%eax, %edx
	callq	_REG_WR
	xorl	%ebx, %ebx
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_bnx2x_ext_phy_hw_reset
	movl	$5000, %edi                     ## imm = 0x1388
	movl	$10000, %esi                    ## imm = 0x2710
	callq	_usleep_range
	movq	_PORT_MAX@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_6
## %bb.1:
	xorl	%ebx, %ebx
	leaq	-48(%rbp), %r14
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	callq	_CHIP_IS_E1x
	testq	%rax, %rax
	movl	$0, %eax
	cmoveq	%rbx, %rax
	movl	(%r15,%rax,4), %ecx
	movl	(%r12,%rax,4), %edx
	movq	%r13, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movq	%rbx, %r8
	movq	%r14, %r9
	callq	_bnx2x_populate_phy
	testq	%rax, %rax
	jne	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_MDIO_PMA_DEVAD@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_MDIO_PMA_REG_GEN_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r13, %rdi
	movq	%r14, %rsi
	movl	$1, %r8d
	callq	_bnx2x_cl45_write
	movq	_MISC_REGISTERS_GPIO_0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MISC_REGISTERS_GPIO_HIGH@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	movq	%rbx, %rcx
	callq	_bnx2x_set_gpio
	incq	%rbx
	movq	_PORT_MAX@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	jb	LBB0_2
## %bb.5:
	xorl	%ebx, %ebx
	jmp	LBB0_6
LBB0_3:
	movq	_NETIF_MSG_LINK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_DP
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_6:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MISC_REG_GPIO_EVENT_EN,4,2     ## @MISC_REG_GPIO_EVENT_EN
	.comm	_MISC_REGISTERS_GPIO_3,4,2      ## @MISC_REGISTERS_GPIO_3
	.comm	_MISC_REGISTERS_GPIO_PORT_SHIFT,4,2 ## @MISC_REGISTERS_GPIO_PORT_SHIFT
	.comm	_PORT_MAX,8,3                   ## @PORT_MAX
	.comm	_NETIF_MSG_LINK,4,2             ## @NETIF_MSG_LINK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"populate phy failed\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_MDIO_PMA_DEVAD,4,2             ## @MDIO_PMA_DEVAD
	.comm	_MDIO_PMA_REG_GEN_CTRL,4,2      ## @MDIO_PMA_REG_GEN_CTRL
	.comm	_MISC_REGISTERS_GPIO_0,4,2      ## @MISC_REGISTERS_GPIO_0
	.comm	_MISC_REGISTERS_GPIO_HIGH,4,2   ## @MISC_REGISTERS_GPIO_HIGH
	.no_dead_strip	_bnx2x_8726_common_init_phy
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bnx2x_8726_common_init_phy
_bnx2x_8726_common_init_phy:            ; @bnx2x_8726_common_init_phy
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x3
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
Lloh0:
	adrp	x23, _MISC_REG_GPIO_EVENT_EN@GOTPAGE
Lloh1:
	ldr	x23, [x23, _MISC_REG_GPIO_EVENT_EN@GOTPAGEOFF]
	ldr	w1, [x23]
	bl	_REG_RD
Lloh2:
	adrp	x8, _MISC_REGISTERS_GPIO_3@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MISC_REGISTERS_GPIO_3@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	mov	w9, #1
	lsl	w10, w9, w8
Lloh5:
	adrp	x11, _MISC_REGISTERS_GPIO_PORT_SHIFT@GOTPAGE
Lloh6:
	ldr	x11, [x11, _MISC_REGISTERS_GPIO_PORT_SHIFT@GOTPAGEOFF]
Lloh7:
	ldr	w11, [x11]
	add	w8, w11, w8
	lsl	w8, w9, w8
	orr	w9, w10, w0
	orr	w2, w9, w8
	ldr	w1, [x23]
	mov	x0, x22
	bl	_REG_WR
	mov	x0, x22
	mov	w1, #0
	bl	_bnx2x_ext_phy_hw_reset
	mov	w0, #5000
	mov	w1, #10000
	bl	_usleep_range
Lloh8:
	adrp	x24, _PORT_MAX@GOTPAGE
Lloh9:
	ldr	x24, [x24, _PORT_MAX@GOTPAGEOFF]
	ldr	x8, [x24]
	cbz	x8, LBB0_4
; %bb.1:
	mov	x23, #0
Lloh10:
	adrp	x25, _MDIO_PMA_DEVAD@GOTPAGE
Lloh11:
	ldr	x25, [x25, _MDIO_PMA_DEVAD@GOTPAGEOFF]
Lloh12:
	adrp	x26, _MDIO_PMA_REG_GEN_CTRL@GOTPAGE
Lloh13:
	ldr	x26, [x26, _MDIO_PMA_REG_GEN_CTRL@GOTPAGEOFF]
Lloh14:
	adrp	x27, _MISC_REGISTERS_GPIO_0@GOTPAGE
Lloh15:
	ldr	x27, [x27, _MISC_REGISTERS_GPIO_0@GOTPAGEOFF]
Lloh16:
	adrp	x28, _MISC_REGISTERS_GPIO_HIGH@GOTPAGE
Lloh17:
	ldr	x28, [x28, _MISC_REGISTERS_GPIO_HIGH@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x22
	bl	_CHIP_IS_E1x
	cmp	x0, #0
	csel	x8, x23, xzr, eq
	lsl	x8, x8, #2
	ldr	w3, [x20, x8]
	ldr	w2, [x21, x8]
	add	x5, sp, #8
	mov	x0, x22
	mov	x1, x19
	mov	x4, x23
	bl	_bnx2x_populate_phy
	cbnz	x0, LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w2, [x25]
	ldr	w3, [x26]
	add	x1, sp, #8
	mov	x0, x22
	mov	w4, #1
	bl	_bnx2x_cl45_write
	ldr	w1, [x27]
	ldr	w2, [x28]
	mov	x0, x22
	mov	x3, x23
	bl	_bnx2x_set_gpio
	add	x23, x23, #1
	ldr	x8, [x24]
	cmp	x23, x8
	b.lo	LBB0_2
LBB0_4:
	mov	w0, #0
	b	LBB0_6
LBB0_5:
Lloh18:
	adrp	x8, _NETIF_MSG_LINK@GOTPAGE
Lloh19:
	ldr	x8, [x8, _NETIF_MSG_LINK@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
Lloh21:
	adrp	x1, l_.str@PAGE
Lloh22:
	add	x1, x1, l_.str@PAGEOFF
	bl	_DP
Lloh23:
	adrp	x8, _EINVAL@GOTPAGE
Lloh24:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_MISC_REG_GPIO_EVENT_EN,4,2     ; @MISC_REG_GPIO_EVENT_EN
	.comm	_MISC_REGISTERS_GPIO_3,4,2      ; @MISC_REGISTERS_GPIO_3
	.comm	_MISC_REGISTERS_GPIO_PORT_SHIFT,4,2 ; @MISC_REGISTERS_GPIO_PORT_SHIFT
	.comm	_PORT_MAX,8,3                   ; @PORT_MAX
	.comm	_NETIF_MSG_LINK,4,2             ; @NETIF_MSG_LINK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"populate phy failed\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_MDIO_PMA_DEVAD,4,2             ; @MDIO_PMA_DEVAD
	.comm	_MDIO_PMA_REG_GEN_CTRL,4,2      ; @MDIO_PMA_REG_GEN_CTRL
	.comm	_MISC_REGISTERS_GPIO_0,4,2      ; @MISC_REGISTERS_GPIO_0
	.comm	_MISC_REGISTERS_GPIO_HIGH,4,2   ; @MISC_REGISTERS_GPIO_HIGH
	.no_dead_strip	_bnx2x_8726_common_init_phy
.subsections_via_symbols
