	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bnx2x_emac_init
_bnx2x_emac_init:                       ## @bnx2x_emac_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	16(%rdi), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movl	(%rdi), %r15d
	testl	%r15d, %r15d
	jne	LBB0_1
## %bb.2:
	movq	_GRCBASE_EMAC0@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_GRCBASE_EMAC1@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %r13d
	movq	_GRCBASE_MISC@GOTPCREL(%rip), %r14
	movq	_MISC_REGISTERS_RESET_REG_2_CLEAR@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r14), %rsi
	movq	_MISC_REGISTERS_RESET_REG_2_RST_EMAC0_HARD_CORE@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	movl	%r15d, %ecx
	shll	%cl, %edx
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_REG_WR
	movl	$5, %edi
	callq	_udelay
	movq	_MISC_REGISTERS_RESET_REG_2_SET@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r14), %rsi
	movl	(%r12), %edx
	movl	%r15d, %ecx
	shll	%cl, %edx
	movq	%rbx, %rdi
	callq	_REG_WR
	movq	_EMAC_REG_EMAC_MODE@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	addl	%r13d, %esi
	movq	%rbx, %rdi
	callq	_REG_RD
	movl	(%r14), %esi
	movq	_EMAC_MODE_RESET@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	%rbx, %rdi
	movl	%eax, %edx
	callq	_EMAC_WR
	movl	$-201, %r12d
	movq	_NETIF_MSG_LINK@GOTPCREL(%rip), %r14
	leaq	L_.str(%rip), %r15
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	_EMAC_REG_EMAC_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	addl	%r13d, %esi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_REG_RD
	movl	%eax, %ebx
	movl	(%r14), %edi
	movq	%r15, %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_DP
	incl	%r12d
	je	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	_EMAC_MODE_RESET@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	jne	LBB0_4
## %bb.6:
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rsi
	callq	_bnx2x_set_mdio_emac_per_phy
	movq	8(%rbx), %rax
	movl	(%rax), %edx
	shll	$8, %edx
	orl	4(%rax), %edx
	movq	_EMAC_REG_EMAC_MAC_MATCH@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%r15, %rdi
	callq	_EMAC_WR
	movq	8(%rbx), %rax
	movl	8(%rax), %ecx
	movl	12(%rax), %esi
	shll	$24, %ecx
	shll	$16, %esi
	orl	%ecx, %esi
	movl	16(%rax), %edx
	shll	$8, %edx
	orl	%esi, %edx
	orl	20(%rax), %edx
	movl	(%r14), %esi
	addl	$4, %esi
	movq	%r15, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_EMAC_WR                        ## TAILCALL
LBB0_7:
	movl	(%r14), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_DP                             ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_GRCBASE_EMAC1,4,2              ## @GRCBASE_EMAC1
	.comm	_GRCBASE_EMAC0,4,2              ## @GRCBASE_EMAC0
	.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_RST_EMAC0_HARD_CORE,4,2 ## @MISC_REGISTERS_RESET_REG_2_RST_EMAC0_HARD_CORE
	.comm	_MISC_REGISTERS_RESET_REG_2_SET,8,3 ## @MISC_REGISTERS_RESET_REG_2_SET
	.comm	_EMAC_REG_EMAC_MODE,4,2         ## @EMAC_REG_EMAC_MODE
	.comm	_EMAC_MODE_RESET,4,2            ## @EMAC_MODE_RESET
	.comm	_NETIF_MSG_LINK,4,2             ## @NETIF_MSG_LINK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"EMAC reset reg is %u\n"

L_.str.1:                               ## @.str.1
	.asciz	"EMAC timeout!\n"

	.comm	_EMAC_REG_EMAC_MAC_MATCH,4,2    ## @EMAC_REG_EMAC_MAC_MATCH
	.no_dead_strip	_bnx2x_emac_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bnx2x_emac_init
_bnx2x_emac_init:                       ; @bnx2x_emac_init
	.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	x20, x0
	ldr	x19, [x0, #16]
	ldr	w21, [x0]
Lloh0:
	adrp	x8, _GRCBASE_EMAC1@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GRCBASE_EMAC1@GOTPAGEOFF]
Lloh2:
	adrp	x9, _GRCBASE_EMAC0@GOTPAGE
Lloh3:
	ldr	x9, [x9, _GRCBASE_EMAC0@GOTPAGEOFF]
	cmp	x21, #0
	csel	x8, x9, x8, eq
	ldr	w23, [x8]
Lloh4:
	adrp	x22, _GRCBASE_MISC@GOTPAGE
Lloh5:
	ldr	x22, [x22, _GRCBASE_MISC@GOTPAGEOFF]
	ldr	x8, [x22]
Lloh6:
	adrp	x9, _MISC_REGISTERS_RESET_REG_2_CLEAR@GOTPAGE
Lloh7:
	ldr	x9, [x9, _MISC_REGISTERS_RESET_REG_2_CLEAR@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	add	x1, x9, x8
Lloh9:
	adrp	x24, _MISC_REGISTERS_RESET_REG_2_RST_EMAC0_HARD_CORE@GOTPAGE
Lloh10:
	ldr	x24, [x24, _MISC_REGISTERS_RESET_REG_2_RST_EMAC0_HARD_CORE@GOTPAGEOFF]
	ldr	w8, [x24]
	lsl	w2, w8, w21
	mov	x0, x19
	bl	_REG_WR
	mov	w0, #5
	bl	_udelay
	ldr	x8, [x22]
Lloh11:
	adrp	x9, _MISC_REGISTERS_RESET_REG_2_SET@GOTPAGE
Lloh12:
	ldr	x9, [x9, _MISC_REGISTERS_RESET_REG_2_SET@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	add	x1, x9, x8
	ldr	w8, [x24]
	lsl	w2, w8, w21
	mov	x0, x19
	bl	_REG_WR
Lloh14:
	adrp	x24, _EMAC_REG_EMAC_MODE@GOTPAGE
Lloh15:
	ldr	x24, [x24, _EMAC_REG_EMAC_MODE@GOTPAGEOFF]
	ldr	w8, [x24]
	add	w1, w8, w23
	mov	x0, x19
	bl	_REG_RD
	ldr	w1, [x24]
Lloh16:
	adrp	x25, _EMAC_MODE_RESET@GOTPAGE
Lloh17:
	ldr	x25, [x25, _EMAC_MODE_RESET@GOTPAGEOFF]
	ldr	w8, [x25]
	orr	w2, w8, w0
	mov	x0, x19
	bl	_EMAC_WR
	mov	w26, #-201
Lloh18:
	adrp	x27, _NETIF_MSG_LINK@GOTPAGE
Lloh19:
	ldr	x27, [x27, _NETIF_MSG_LINK@GOTPAGEOFF]
Lloh20:
	adrp	x21, l_.str@PAGE
Lloh21:
	add	x21, x21, l_.str@PAGEOFF
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x24]
	add	w1, w8, w23
	mov	x0, x19
	bl	_REG_RD
	mov	x22, x0
	ldr	w0, [x27]
	str	x22, [sp]
	mov	x1, x21
	bl	_DP
	adds	w26, w26, #1
	b.hs	LBB0_4
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w8, [x25]
	tst	w8, w22
	b.ne	LBB0_1
; %bb.3:
	mov	x0, x19
	mov	x1, x20
	bl	_bnx2x_set_mdio_emac_per_phy
	ldr	x8, [x20, #8]
	ldp	w9, w8, [x8]
	orr	w2, w8, w9, lsl #8
Lloh22:
	adrp	x21, _EMAC_REG_EMAC_MAC_MATCH@GOTPAGE
Lloh23:
	ldr	x21, [x21, _EMAC_REG_EMAC_MAC_MATCH@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_EMAC_WR
	ldr	x8, [x20, #8]
	ldp	w9, w10, [x8, #8]
	lsl	w10, w10, #16
	orr	w9, w10, w9, lsl #24
	ldp	w10, w8, [x8, #16]
	orr	w9, w9, w10, lsl #8
	orr	w2, w9, w8
	ldr	w8, [x21]
	add	w1, w8, #4
	mov	x0, x19
	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
	b	_EMAC_WR
LBB0_4:
	ldr	w0, [x27]
Lloh24:
	adrp	x1, l_.str.1@PAGE
Lloh25:
	add	x1, x1, l_.str.1@PAGEOFF
	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
	b	_DP
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_GRCBASE_EMAC1,4,2              ; @GRCBASE_EMAC1
	.comm	_GRCBASE_EMAC0,4,2              ; @GRCBASE_EMAC0
	.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_RST_EMAC0_HARD_CORE,4,2 ; @MISC_REGISTERS_RESET_REG_2_RST_EMAC0_HARD_CORE
	.comm	_MISC_REGISTERS_RESET_REG_2_SET,8,3 ; @MISC_REGISTERS_RESET_REG_2_SET
	.comm	_EMAC_REG_EMAC_MODE,4,2         ; @EMAC_REG_EMAC_MODE
	.comm	_EMAC_MODE_RESET,4,2            ; @EMAC_MODE_RESET
	.comm	_NETIF_MSG_LINK,4,2             ; @NETIF_MSG_LINK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"EMAC reset reg is %u\n"

l_.str.1:                               ; @.str.1
	.asciz	"EMAC timeout!\n"

	.comm	_EMAC_REG_EMAC_MAC_MATCH,4,2    ; @EMAC_REG_EMAC_MAC_MATCH
	.no_dead_strip	_bnx2x_emac_init
.subsections_via_symbols
