	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bnx2x_8073_8727_external_rom_boot
_bnx2x_8073_8727_external_rom_boot:     ## @bnx2x_8073_8727_external_rom_boot
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	_MDIO_PMA_DEVAD@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	movq	_MDIO_PMA_REG_GEN_CTRL@GOTPCREL(%rip), %r14
	movl	(%r14), %ecx
	movl	$1, %r8d
	callq	_bnx2x_cl45_write
	movl	(%r12), %edx
	movl	(%r14), %ecx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movl	$140, %r8d
	callq	_bnx2x_cl45_write
	movl	(%r12), %edx
	movq	_MDIO_PMA_REG_MISC_CTRL1@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movl	$1, %r8d
	callq	_bnx2x_cl45_write
	movl	(%r12), %edx
	movl	(%r14), %ecx
	movq	_MDIO_PMA_REG_GEN_CTRL_ROM_MICRO_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_bnx2x_cl45_write
	movl	(%r12), %edx
	movl	(%r14), %ecx
	movq	_MDIO_PMA_REG_GEN_CTRL_ROM_RESET_INTERNAL_MP@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_bnx2x_cl45_write
	movl	$100, %edi
	callq	_msleep
	movl	$300, %r13d                     ## imm = 0x12C
	xorl	%r14d, %r14d
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_1 Depth=1
	decl	%r13d
	je	LBB0_6
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %edx
	movq	_MDIO_PMA_REG_ROM_VER1@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	leaq	-48(%rbp), %r8
	callq	_bnx2x_cl45_read
	movl	(%r12), %edx
	movq	_MDIO_PMA_REG_M8051_MSGOUT_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	leaq	-52(%rbp), %r8
	callq	_bnx2x_cl45_read
	movl	$1000, %edi                     ## imm = 0x3E8
	movl	$2000, %esi                     ## imm = 0x7D0
	callq	_usleep_range
	movl	-48(%rbp), %ecx
	testl	%ecx, %ecx
	je	LBB0_5
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	cmpl	$17185, %ecx                    ## imm = 0x4321
	je	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	cmpb	$3, -52(%rbp)
	je	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	(%rbx), %rax
	movq	_PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8073@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	je	LBB0_5
	jmp	LBB0_7
LBB0_6:
	movq	_NETIF_MSG_LINK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_DP
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_7:
	movl	(%r12), %edx
	movq	_MDIO_PMA_REG_MISC_CTRL1@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	xorl	%r8d, %r8d
	callq	_bnx2x_cl45_write
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %edx
	callq	_bnx2x_save_bcm_spirom_ver
	movq	_NETIF_MSG_LINK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	-48(%rbp), %ecx
	leaq	L_.str.1(%rip), %rsi
	movl	%ebx, %edx
	callq	_DP
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MDIO_PMA_DEVAD,4,2             ## @MDIO_PMA_DEVAD
	.comm	_MDIO_PMA_REG_GEN_CTRL,4,2      ## @MDIO_PMA_REG_GEN_CTRL
	.comm	_MDIO_PMA_REG_MISC_CTRL1,4,2    ## @MDIO_PMA_REG_MISC_CTRL1
	.comm	_MDIO_PMA_REG_GEN_CTRL_ROM_MICRO_RESET,4,2 ## @MDIO_PMA_REG_GEN_CTRL_ROM_MICRO_RESET
	.comm	_MDIO_PMA_REG_GEN_CTRL_ROM_RESET_INTERNAL_MP,4,2 ## @MDIO_PMA_REG_GEN_CTRL_ROM_RESET_INTERNAL_MP
	.comm	_NETIF_MSG_LINK,4,2             ## @NETIF_MSG_LINK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"bnx2x_8073_8727_external_rom_boot port %x:Download failed. fw version = 0x%x\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_MDIO_PMA_REG_ROM_VER1,4,2      ## @MDIO_PMA_REG_ROM_VER1
	.comm	_MDIO_PMA_REG_M8051_MSGOUT_REG,4,2 ## @MDIO_PMA_REG_M8051_MSGOUT_REG
	.comm	_PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8073,8,3 ## @PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8073
L_.str.1:                               ## @.str.1
	.asciz	"bnx2x_8073_8727_external_rom_boot port %x:Download complete. fw version = 0x%x\n"

	.no_dead_strip	_bnx2x_8073_8727_external_rom_boot
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bnx2x_8073_8727_external_rom_boot
_bnx2x_8073_8727_external_rom_boot:     ; @bnx2x_8073_8727_external_rom_boot
	.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, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x23, _MDIO_PMA_DEVAD@GOTPAGE
Lloh1:
	ldr	x23, [x23, _MDIO_PMA_DEVAD@GOTPAGEOFF]
	ldr	w2, [x23]
Lloh2:
	adrp	x22, _MDIO_PMA_REG_GEN_CTRL@GOTPAGE
Lloh3:
	ldr	x22, [x22, _MDIO_PMA_REG_GEN_CTRL@GOTPAGEOFF]
	ldr	w3, [x22]
	mov	w4, #1
	bl	_bnx2x_cl45_write
	ldr	w2, [x23]
	ldr	w3, [x22]
	mov	x0, x21
	mov	x1, x20
	mov	w4, #140
	bl	_bnx2x_cl45_write
	ldr	w2, [x23]
Lloh4:
	adrp	x24, _MDIO_PMA_REG_MISC_CTRL1@GOTPAGE
Lloh5:
	ldr	x24, [x24, _MDIO_PMA_REG_MISC_CTRL1@GOTPAGEOFF]
	ldr	w3, [x24]
	mov	x0, x21
	mov	x1, x20
	mov	w4, #1
	bl	_bnx2x_cl45_write
	ldr	w2, [x23]
	ldr	w3, [x22]
Lloh6:
	adrp	x8, _MDIO_PMA_REG_GEN_CTRL_ROM_MICRO_RESET@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MDIO_PMA_REG_GEN_CTRL_ROM_MICRO_RESET@GOTPAGEOFF]
Lloh8:
	ldr	w4, [x8]
	mov	x0, x21
	mov	x1, x20
	bl	_bnx2x_cl45_write
	ldr	w2, [x23]
	ldr	w3, [x22]
Lloh9:
	adrp	x8, _MDIO_PMA_REG_GEN_CTRL_ROM_RESET_INTERNAL_MP@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MDIO_PMA_REG_GEN_CTRL_ROM_RESET_INTERNAL_MP@GOTPAGEOFF]
Lloh11:
	ldr	w4, [x8]
	mov	x0, x21
	mov	x1, x20
	bl	_bnx2x_cl45_write
	mov	w0, #100
	bl	_msleep
Lloh12:
	adrp	x22, _MDIO_PMA_REG_ROM_VER1@GOTPAGE
Lloh13:
	ldr	x22, [x22, _MDIO_PMA_REG_ROM_VER1@GOTPAGEOFF]
	mov	w25, #300
Lloh14:
	adrp	x26, _MDIO_PMA_REG_M8051_MSGOUT_REG@GOTPAGE
Lloh15:
	ldr	x26, [x26, _MDIO_PMA_REG_M8051_MSGOUT_REG@GOTPAGEOFF]
	mov	w27, #17185
Lloh16:
	adrp	x28, _PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8073@GOTPAGE
Lloh17:
	ldr	x28, [x28, _PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8073@GOTPAGEOFF]
	b	LBB0_2
LBB0_1:                                 ;   in Loop: Header=BB0_2 Depth=1
	subs	w25, w25, #1
	b.eq	LBB0_6
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w2, [x23]
	ldr	w3, [x22]
	add	x4, sp, #12
	mov	x0, x21
	mov	x1, x20
	bl	_bnx2x_cl45_read
	ldr	w2, [x23]
	ldr	w3, [x26]
	add	x4, sp, #8
	mov	x0, x21
	mov	x1, x20
	bl	_bnx2x_cl45_read
	mov	w0, #1000
	mov	w1, #2000
	bl	_usleep_range
	ldr	w3, [sp, #12]
	cmp	w3, #0
	ccmp	w3, w27, #4, ne
	b.eq	LBB0_1
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldrb	w8, [sp, #8]
	cmp	w8, #3
	b.eq	LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x20]
	ldr	x9, [x28]
	cmp	x8, x9
	b.eq	LBB0_1
LBB0_5:
	mov	w22, #0
	b	LBB0_7
LBB0_6:
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
	mov	x2, x19
	bl	_DP
Lloh23:
	adrp	x8, _EINVAL@GOTPAGE
Lloh24:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_7:
	ldr	w2, [x23]
	ldr	w3, [x24]
	mov	x0, x21
	mov	x1, x20
	mov	w4, #0
	bl	_bnx2x_cl45_write
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	bl	_bnx2x_save_bcm_spirom_ver
Lloh26:
	adrp	x8, _NETIF_MSG_LINK@GOTPAGE
Lloh27:
	ldr	x8, [x8, _NETIF_MSG_LINK@GOTPAGEOFF]
Lloh28:
	ldr	w0, [x8]
	ldr	w3, [sp, #12]
Lloh29:
	adrp	x1, l_.str.1@PAGE
Lloh30:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x19
	bl	_DP
	mov	x0, x22
	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	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_MDIO_PMA_DEVAD,4,2             ; @MDIO_PMA_DEVAD
	.comm	_MDIO_PMA_REG_GEN_CTRL,4,2      ; @MDIO_PMA_REG_GEN_CTRL
	.comm	_MDIO_PMA_REG_MISC_CTRL1,4,2    ; @MDIO_PMA_REG_MISC_CTRL1
	.comm	_MDIO_PMA_REG_GEN_CTRL_ROM_MICRO_RESET,4,2 ; @MDIO_PMA_REG_GEN_CTRL_ROM_MICRO_RESET
	.comm	_MDIO_PMA_REG_GEN_CTRL_ROM_RESET_INTERNAL_MP,4,2 ; @MDIO_PMA_REG_GEN_CTRL_ROM_RESET_INTERNAL_MP
	.comm	_NETIF_MSG_LINK,4,2             ; @NETIF_MSG_LINK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"bnx2x_8073_8727_external_rom_boot port %x:Download failed. fw version = 0x%x\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_MDIO_PMA_REG_ROM_VER1,4,2      ; @MDIO_PMA_REG_ROM_VER1
	.comm	_MDIO_PMA_REG_M8051_MSGOUT_REG,4,2 ; @MDIO_PMA_REG_M8051_MSGOUT_REG
	.comm	_PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8073,8,3 ; @PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8073
l_.str.1:                               ; @.str.1
	.asciz	"bnx2x_8073_8727_external_rom_boot port %x:Download complete. fw version = 0x%x\n"

	.no_dead_strip	_bnx2x_8073_8727_external_rom_boot
.subsections_via_symbols
