	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bnx2x_xmac_init
_bnx2x_xmac_init:                       ## @bnx2x_xmac_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	%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
	movq	%rsi, %r14
	movq	(%rdi), %rbx
	movq	%rbx, %rdi
	callq	_bnx2x_is_4_port_mode
	movq	%rax, %r15
	movq	%rbx, %rdi
	callq	_CHIP_NUM
	movq	_CHIP_NUM_57840_4_10@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_3
## %bb.1:
	movq	%rbx, %rdi
	callq	_CHIP_NUM
	movq	_CHIP_NUM_57840_2_20@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_3
## %bb.2:
	movq	%rbx, %rdi
	callq	_CHIP_NUM
	movq	_CHIP_NUM_57840_OBSOLETE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
LBB0_3:
	testq	%r15, %r15
	je	LBB0_5
## %bb.4:
	movq	_MISC_REG_RESET_REG_2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_REG_RD
	movq	_MISC_REGISTERS_RESET_REG_2_XMAC@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_5
## %bb.11:
	movq	_NETIF_MSG_LINK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_DP                             ## TAILCALL
LBB0_5:
	movq	_GRCBASE_MISC@GOTPCREL(%rip), %r12
	movq	_MISC_REGISTERS_RESET_REG_2_CLEAR@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r12), %rsi
	movq	_MISC_REGISTERS_RESET_REG_2_XMAC@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	movq	%rbx, %rdi
	callq	_REG_WR
	movl	$1000, %edi                     ## imm = 0x3E8
	movl	$2000, %esi                     ## imm = 0x7D0
	callq	_usleep_range
	movq	_MISC_REGISTERS_RESET_REG_2_SET@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r12), %rsi
	movl	(%r13), %edx
	movq	%rbx, %rdi
	callq	_REG_WR
	testq	%r15, %r15
	je	LBB0_7
## %bb.6:
	movq	_NETIF_MSG_LINK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_DP
	movq	_MISC_REG_XMAC_CORE_PORT_MODE@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%rbx, %rdi
	movl	$1, %edx
	callq	_REG_WR
	movl	$3, %edx
	movq	_MISC_REGISTERS_RESET_REG_2_CLEAR@GOTPCREL(%rip), %r14
	movq	_MISC_REGISTERS_RESET_REG_2_SET@GOTPCREL(%rip), %r15
	jmp	LBB0_10
LBB0_7:
	movq	_MISC_REG_XMAC_CORE_PORT_MODE@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_REG_WR
	movq	_SPEED_10000@GOTPCREL(%rip), %rax
	movq	_NETIF_MSG_LINK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	cmpq	%r14, (%rax)
	movq	_MISC_REGISTERS_RESET_REG_2_CLEAR@GOTPCREL(%rip), %r14
	movq	_MISC_REGISTERS_RESET_REG_2_SET@GOTPCREL(%rip), %r15
	jne	LBB0_9
## %bb.8:
	leaq	L_.str.2(%rip), %rsi
	callq	_DP
	movl	$3, %edx
	jmp	LBB0_10
LBB0_9:
	leaq	L_.str.3(%rip), %rsi
	callq	_DP
	movl	$1, %edx
LBB0_10:
	movq	_MISC_REG_XMAC_PHY_PORT_MODE@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%rbx, %rdi
	callq	_REG_WR
	movq	(%r14), %rsi
	addq	(%r12), %rsi
	movq	_MISC_REGISTERS_RESET_REG_2_XMAC_SOFT@GOTPCREL(%rip), %r14
	movl	(%r14), %edx
	movq	%rbx, %rdi
	callq	_REG_WR
	movl	$1000, %edi                     ## imm = 0x3E8
	movl	$2000, %esi                     ## imm = 0x7D0
	callq	_usleep_range
	movq	(%r15), %rsi
	addq	(%r12), %rsi
	movl	(%r14), %edx
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_REG_WR                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_CHIP_NUM_57840_4_10,8,3        ## @CHIP_NUM_57840_4_10
	.comm	_CHIP_NUM_57840_2_20,8,3        ## @CHIP_NUM_57840_2_20
	.comm	_CHIP_NUM_57840_OBSOLETE,8,3    ## @CHIP_NUM_57840_OBSOLETE
	.comm	_MISC_REG_RESET_REG_2,4,2       ## @MISC_REG_RESET_REG_2
	.comm	_MISC_REGISTERS_RESET_REG_2_XMAC,4,2 ## @MISC_REGISTERS_RESET_REG_2_XMAC
	.comm	_NETIF_MSG_LINK,4,2             ## @NETIF_MSG_LINK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"XMAC already out of reset in 4-port mode\n"

	.comm	_GRCBASE_MISC,8,3               ## @GRCBASE_MISC
	.comm	_MISC_REGISTERS_RESET_REG_2_CLEAR,8,3 ## @MISC_REGISTERS_RESET_REG_2_CLEAR
	.comm	_MISC_REGISTERS_RESET_REG_2_SET,8,3 ## @MISC_REGISTERS_RESET_REG_2_SET
L_.str.1:                               ## @.str.1
	.asciz	"Init XMAC to 2 ports x 10G per path\n"

	.comm	_MISC_REG_XMAC_CORE_PORT_MODE,8,3 ## @MISC_REG_XMAC_CORE_PORT_MODE
	.comm	_MISC_REG_XMAC_PHY_PORT_MODE,8,3 ## @MISC_REG_XMAC_PHY_PORT_MODE
	.comm	_SPEED_10000,8,3                ## @SPEED_10000
L_.str.2:                               ## @.str.2
	.asciz	"Init XMAC to 10G x 1 port per path\n"

L_.str.3:                               ## @.str.3
	.asciz	"Init XMAC to 20G x 2 ports per path\n"

	.comm	_MISC_REGISTERS_RESET_REG_2_XMAC_SOFT,4,2 ## @MISC_REGISTERS_RESET_REG_2_XMAC_SOFT
	.no_dead_strip	_bnx2x_xmac_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bnx2x_xmac_init
_bnx2x_xmac_init:                       ; @bnx2x_xmac_init
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x20, x1
	ldr	x19, [x0]
	mov	x0, x19
	bl	_bnx2x_is_4_port_mode
	mov	x21, x0
	mov	x0, x19
	bl	_CHIP_NUM
Lloh0:
	adrp	x8, _CHIP_NUM_57840_4_10@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CHIP_NUM_57840_4_10@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x25, _MISC_REGISTERS_RESET_REG_2_XMAC@GOTPAGE
Lloh4:
	ldr	x25, [x25, _MISC_REGISTERS_RESET_REG_2_XMAC@GOTPAGEOFF]
	cmp	x0, x8
	b.eq	LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_CHIP_NUM
Lloh5:
	adrp	x8, _CHIP_NUM_57840_2_20@GOTPAGE
Lloh6:
	ldr	x8, [x8, _CHIP_NUM_57840_2_20@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_3
LBB0_2:
	cbnz	x21, LBB0_4
	b	LBB0_6
LBB0_3:
	mov	x0, x19
	bl	_CHIP_NUM
Lloh8:
	adrp	x8, _CHIP_NUM_57840_OBSOLETE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _CHIP_NUM_57840_OBSOLETE@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	cmp	x0, x8
	ccmp	x21, #0, #4, eq
	b.eq	LBB0_6
LBB0_4:
Lloh11:
	adrp	x8, _MISC_REG_RESET_REG_2@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MISC_REG_RESET_REG_2@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_REG_RD
	ldr	w8, [x25]
	tst	w8, w0
	b.eq	LBB0_6
; %bb.5:
Lloh14:
	adrp	x8, _NETIF_MSG_LINK@GOTPAGE
Lloh15:
	ldr	x8, [x8, _NETIF_MSG_LINK@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
Lloh17:
	adrp	x1, l_.str@PAGE
Lloh18:
	add	x1, x1, l_.str@PAGEOFF
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_DP
LBB0_6:
Lloh19:
	adrp	x22, _GRCBASE_MISC@GOTPAGE
Lloh20:
	ldr	x22, [x22, _GRCBASE_MISC@GOTPAGEOFF]
	ldr	x8, [x22]
Lloh21:
	adrp	x23, _MISC_REGISTERS_RESET_REG_2_CLEAR@GOTPAGE
Lloh22:
	ldr	x23, [x23, _MISC_REGISTERS_RESET_REG_2_CLEAR@GOTPAGEOFF]
	ldr	x9, [x23]
	add	x1, x9, x8
	ldr	w2, [x25]
	mov	x0, x19
	bl	_REG_WR
	mov	w0, #1000
	mov	w1, #2000
	bl	_usleep_range
	ldr	x8, [x22]
Lloh23:
	adrp	x24, _MISC_REGISTERS_RESET_REG_2_SET@GOTPAGE
Lloh24:
	ldr	x24, [x24, _MISC_REGISTERS_RESET_REG_2_SET@GOTPAGEOFF]
	ldr	x9, [x24]
	add	x1, x9, x8
	ldr	w2, [x25]
	mov	x0, x19
	bl	_REG_WR
	cbz	x21, LBB0_8
; %bb.7:
Lloh25:
	adrp	x8, _NETIF_MSG_LINK@GOTPAGE
Lloh26:
	ldr	x8, [x8, _NETIF_MSG_LINK@GOTPAGEOFF]
Lloh27:
	ldr	w0, [x8]
Lloh28:
	adrp	x1, l_.str.1@PAGE
Lloh29:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_DP
Lloh30:
	adrp	x8, _MISC_REG_XMAC_CORE_PORT_MODE@GOTPAGE
Lloh31:
	ldr	x8, [x8, _MISC_REG_XMAC_CORE_PORT_MODE@GOTPAGEOFF]
Lloh32:
	ldr	x1, [x8]
	mov	x0, x19
	mov	w2, #1
	bl	_REG_WR
	mov	w2, #3
	b	LBB0_11
LBB0_8:
Lloh33:
	adrp	x8, _MISC_REG_XMAC_CORE_PORT_MODE@GOTPAGE
Lloh34:
	ldr	x8, [x8, _MISC_REG_XMAC_CORE_PORT_MODE@GOTPAGEOFF]
Lloh35:
	ldr	x1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_REG_WR
Lloh36:
	adrp	x8, _SPEED_10000@GOTPAGE
Lloh37:
	ldr	x8, [x8, _SPEED_10000@GOTPAGEOFF]
Lloh38:
	ldr	x8, [x8]
Lloh39:
	adrp	x9, _NETIF_MSG_LINK@GOTPAGE
Lloh40:
	ldr	x9, [x9, _NETIF_MSG_LINK@GOTPAGEOFF]
Lloh41:
	ldr	w0, [x9]
	cmp	x8, x20
	b.ne	LBB0_10
; %bb.9:
Lloh42:
	adrp	x1, l_.str.2@PAGE
Lloh43:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_DP
	mov	w2, #3
	b	LBB0_11
LBB0_10:
Lloh44:
	adrp	x1, l_.str.3@PAGE
Lloh45:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_DP
	mov	w2, #1
LBB0_11:
Lloh46:
	adrp	x8, _MISC_REG_XMAC_PHY_PORT_MODE@GOTPAGE
Lloh47:
	ldr	x8, [x8, _MISC_REG_XMAC_PHY_PORT_MODE@GOTPAGEOFF]
Lloh48:
	ldr	x1, [x8]
	mov	x0, x19
	bl	_REG_WR
	ldr	x8, [x22]
	ldr	x9, [x23]
	add	x1, x9, x8
Lloh49:
	adrp	x20, _MISC_REGISTERS_RESET_REG_2_XMAC_SOFT@GOTPAGE
Lloh50:
	ldr	x20, [x20, _MISC_REGISTERS_RESET_REG_2_XMAC_SOFT@GOTPAGEOFF]
	ldr	w2, [x20]
	mov	x0, x19
	bl	_REG_WR
	mov	w0, #1000
	mov	w1, #2000
	bl	_usleep_range
	ldr	x8, [x22]
	ldr	x9, [x24]
	add	x1, x9, x8
	ldr	w2, [x20]
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_REG_WR
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpAdd	Lloh42, Lloh43
	.loh AdrpAdd	Lloh44, Lloh45
	.loh AdrpLdrGot	Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.cfi_endproc
                                        ; -- End function
	.comm	_CHIP_NUM_57840_4_10,8,3        ; @CHIP_NUM_57840_4_10
	.comm	_CHIP_NUM_57840_2_20,8,3        ; @CHIP_NUM_57840_2_20
	.comm	_CHIP_NUM_57840_OBSOLETE,8,3    ; @CHIP_NUM_57840_OBSOLETE
	.comm	_MISC_REG_RESET_REG_2,4,2       ; @MISC_REG_RESET_REG_2
	.comm	_MISC_REGISTERS_RESET_REG_2_XMAC,4,2 ; @MISC_REGISTERS_RESET_REG_2_XMAC
	.comm	_NETIF_MSG_LINK,4,2             ; @NETIF_MSG_LINK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"XMAC already out of reset in 4-port mode\n"

	.comm	_GRCBASE_MISC,8,3               ; @GRCBASE_MISC
	.comm	_MISC_REGISTERS_RESET_REG_2_CLEAR,8,3 ; @MISC_REGISTERS_RESET_REG_2_CLEAR
	.comm	_MISC_REGISTERS_RESET_REG_2_SET,8,3 ; @MISC_REGISTERS_RESET_REG_2_SET
l_.str.1:                               ; @.str.1
	.asciz	"Init XMAC to 2 ports x 10G per path\n"

	.comm	_MISC_REG_XMAC_CORE_PORT_MODE,8,3 ; @MISC_REG_XMAC_CORE_PORT_MODE
	.comm	_MISC_REG_XMAC_PHY_PORT_MODE,8,3 ; @MISC_REG_XMAC_PHY_PORT_MODE
	.comm	_SPEED_10000,8,3                ; @SPEED_10000
l_.str.2:                               ; @.str.2
	.asciz	"Init XMAC to 10G x 1 port per path\n"

l_.str.3:                               ; @.str.3
	.asciz	"Init XMAC to 20G x 2 ports per path\n"

	.comm	_MISC_REGISTERS_RESET_REG_2_XMAC_SOFT,4,2 ; @MISC_REGISTERS_RESET_REG_2_XMAC_SOFT
	.no_dead_strip	_bnx2x_xmac_init
.subsections_via_symbols
