	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bnx2_set_phy_loopback
_bnx2_set_phy_loopback:                 ## @bnx2_set_phy_loopback
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	leaq	4(%rdi), %rbx
	movq	%rbx, %rdi
	callq	_spin_lock_bh
	movq	_BMCR_LOOPBACK@GOTPCREL(%rip), %rax
	movq	_BMCR_FULLDPLX@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movl	8(%r15), %esi
	movq	_BMCR_SPEED1000@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	%r15, %rdi
	callq	_bnx2_write_phy
	movl	%eax, %r14d
	movq	%rbx, %rdi
	callq	_spin_unlock_bh
	testl	%r14d, %r14d
	jne	LBB0_13
## %bb.1:
	movq	%r15, %rdi
	callq	_bnx2_test_link
	testq	%rax, %rax
	je	LBB0_12
## %bb.2:
	movl	$100, %edi
	callq	_msleep
	movq	%r15, %rdi
	callq	_bnx2_test_link
	testq	%rax, %rax
	je	LBB0_12
## %bb.3:
	movl	$100, %edi
	callq	_msleep
	movq	%r15, %rdi
	callq	_bnx2_test_link
	testq	%rax, %rax
	je	LBB0_12
## %bb.4:
	movl	$100, %edi
	callq	_msleep
	movq	%r15, %rdi
	callq	_bnx2_test_link
	testq	%rax, %rax
	je	LBB0_12
## %bb.5:
	movl	$100, %edi
	callq	_msleep
	movq	%r15, %rdi
	callq	_bnx2_test_link
	testq	%rax, %rax
	je	LBB0_12
## %bb.6:
	movl	$100, %edi
	callq	_msleep
	movq	%r15, %rdi
	callq	_bnx2_test_link
	testq	%rax, %rax
	je	LBB0_12
## %bb.7:
	movl	$100, %edi
	callq	_msleep
	movq	%r15, %rdi
	callq	_bnx2_test_link
	testq	%rax, %rax
	je	LBB0_12
## %bb.8:
	movl	$100, %edi
	callq	_msleep
	movq	%r15, %rdi
	callq	_bnx2_test_link
	testq	%rax, %rax
	je	LBB0_12
## %bb.9:
	movl	$100, %edi
	callq	_msleep
	movq	%r15, %rdi
	callq	_bnx2_test_link
	testq	%rax, %rax
	je	LBB0_12
## %bb.10:
	movl	$100, %edi
	callq	_msleep
	movq	%r15, %rdi
	callq	_bnx2_test_link
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	movl	$100, %edi
	callq	_msleep
LBB0_12:
	movq	_BNX2_EMAC_MODE@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r15, %rdi
	callq	_BNX2_RD
	movq	_BNX2_EMAC_MODE_PORT@GOTPCREL(%rip), %rcx
	movq	_BNX2_EMAC_MODE_HALF_DUPLEX@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	movq	_BNX2_EMAC_MODE_MAC_LOOP@GOTPCREL(%rip), %rcx
	orl	(%rcx), %edx
	movq	_BNX2_EMAC_MODE_FORCE_LINK@GOTPCREL(%rip), %rcx
	orl	(%rcx), %edx
	movq	_BNX2_EMAC_MODE_25G_MODE@GOTPCREL(%rip), %rcx
	orl	(%rcx), %edx
	notl	%edx
	andl	%eax, %edx
	movq	_BNX2_EMAC_MODE_PORT_GMII@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movl	(%rbx), %esi
	movq	%r15, %rdi
	callq	_BNX2_WR
	movl	$1, (%r15)
LBB0_13:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BMCR_LOOPBACK,4,2              ## @BMCR_LOOPBACK
	.comm	_BMCR_FULLDPLX,4,2              ## @BMCR_FULLDPLX
	.comm	_BMCR_SPEED1000,4,2             ## @BMCR_SPEED1000
	.comm	_BNX2_EMAC_MODE,4,2             ## @BNX2_EMAC_MODE
	.comm	_BNX2_EMAC_MODE_PORT,4,2        ## @BNX2_EMAC_MODE_PORT
	.comm	_BNX2_EMAC_MODE_HALF_DUPLEX,4,2 ## @BNX2_EMAC_MODE_HALF_DUPLEX
	.comm	_BNX2_EMAC_MODE_MAC_LOOP,4,2    ## @BNX2_EMAC_MODE_MAC_LOOP
	.comm	_BNX2_EMAC_MODE_FORCE_LINK,4,2  ## @BNX2_EMAC_MODE_FORCE_LINK
	.comm	_BNX2_EMAC_MODE_25G_MODE,4,2    ## @BNX2_EMAC_MODE_25G_MODE
	.comm	_BNX2_EMAC_MODE_PORT_GMII,4,2   ## @BNX2_EMAC_MODE_PORT_GMII
	.no_dead_strip	_bnx2_set_phy_loopback
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bnx2_set_phy_loopback
_bnx2_set_phy_loopback:                 ; @bnx2_set_phy_loopback
	.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	x19, x0
	add	x21, x0, #4
	mov	x0, x21
	bl	_spin_lock_bh
	ldr	w1, [x19, #8]
Lloh0:
	adrp	x8, _BMCR_LOOPBACK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BMCR_LOOPBACK@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _BMCR_FULLDPLX@GOTPAGE
Lloh4:
	ldr	x9, [x9, _BMCR_FULLDPLX@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh6:
	adrp	x9, _BMCR_SPEED1000@GOTPAGE
Lloh7:
	ldr	x9, [x9, _BMCR_SPEED1000@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w2, w8, w9
	mov	x0, x19
	bl	_bnx2_write_phy
	mov	x20, x0
	mov	x0, x21
	bl	_spin_unlock_bh
	cbnz	w20, LBB0_13
; %bb.1:
	mov	x0, x19
	bl	_bnx2_test_link
	cbz	x0, LBB0_12
; %bb.2:
	mov	w0, #100
	bl	_msleep
	mov	x0, x19
	bl	_bnx2_test_link
	cbz	x0, LBB0_12
; %bb.3:
	mov	w0, #100
	bl	_msleep
	mov	x0, x19
	bl	_bnx2_test_link
	cbz	x0, LBB0_12
; %bb.4:
	mov	w0, #100
	bl	_msleep
	mov	x0, x19
	bl	_bnx2_test_link
	cbz	x0, LBB0_12
; %bb.5:
	mov	w0, #100
	bl	_msleep
	mov	x0, x19
	bl	_bnx2_test_link
	cbz	x0, LBB0_12
; %bb.6:
	mov	w0, #100
	bl	_msleep
	mov	x0, x19
	bl	_bnx2_test_link
	cbz	x0, LBB0_12
; %bb.7:
	mov	w0, #100
	bl	_msleep
	mov	x0, x19
	bl	_bnx2_test_link
	cbz	x0, LBB0_12
; %bb.8:
	mov	w0, #100
	bl	_msleep
	mov	x0, x19
	bl	_bnx2_test_link
	cbz	x0, LBB0_12
; %bb.9:
	mov	w0, #100
	bl	_msleep
	mov	x0, x19
	bl	_bnx2_test_link
	cbz	x0, LBB0_12
; %bb.10:
	mov	w0, #100
	bl	_msleep
	mov	x0, x19
	bl	_bnx2_test_link
	cbz	x0, LBB0_12
; %bb.11:
	mov	w0, #100
	bl	_msleep
LBB0_12:
Lloh9:
	adrp	x21, _BNX2_EMAC_MODE@GOTPAGE
Lloh10:
	ldr	x21, [x21, _BNX2_EMAC_MODE@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_BNX2_RD
Lloh11:
	adrp	x8, _BNX2_EMAC_MODE_PORT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _BNX2_EMAC_MODE_PORT@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
Lloh14:
	adrp	x9, _BNX2_EMAC_MODE_HALF_DUPLEX@GOTPAGE
Lloh15:
	ldr	x9, [x9, _BNX2_EMAC_MODE_HALF_DUPLEX@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh17:
	adrp	x9, _BNX2_EMAC_MODE_MAC_LOOP@GOTPAGE
Lloh18:
	ldr	x9, [x9, _BNX2_EMAC_MODE_MAC_LOOP@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh20:
	adrp	x9, _BNX2_EMAC_MODE_FORCE_LINK@GOTPAGE
Lloh21:
	ldr	x9, [x9, _BNX2_EMAC_MODE_FORCE_LINK@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh23:
	adrp	x9, _BNX2_EMAC_MODE_25G_MODE@GOTPAGE
Lloh24:
	ldr	x9, [x9, _BNX2_EMAC_MODE_25G_MODE@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	orr	w8, w8, w9
	bic	w8, w0, w8
Lloh26:
	adrp	x9, _BNX2_EMAC_MODE_PORT_GMII@GOTPAGE
Lloh27:
	ldr	x9, [x9, _BNX2_EMAC_MODE_PORT_GMII@GOTPAGEOFF]
Lloh28:
	ldr	w9, [x9]
	orr	w2, w8, w9
	ldr	w1, [x21]
	mov	x0, x19
	bl	_BNX2_WR
	mov	w8, #1
	str	w8, [x19]
LBB0_13:
	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	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_BMCR_LOOPBACK,4,2              ; @BMCR_LOOPBACK
	.comm	_BMCR_FULLDPLX,4,2              ; @BMCR_FULLDPLX
	.comm	_BMCR_SPEED1000,4,2             ; @BMCR_SPEED1000
	.comm	_BNX2_EMAC_MODE,4,2             ; @BNX2_EMAC_MODE
	.comm	_BNX2_EMAC_MODE_PORT,4,2        ; @BNX2_EMAC_MODE_PORT
	.comm	_BNX2_EMAC_MODE_HALF_DUPLEX,4,2 ; @BNX2_EMAC_MODE_HALF_DUPLEX
	.comm	_BNX2_EMAC_MODE_MAC_LOOP,4,2    ; @BNX2_EMAC_MODE_MAC_LOOP
	.comm	_BNX2_EMAC_MODE_FORCE_LINK,4,2  ; @BNX2_EMAC_MODE_FORCE_LINK
	.comm	_BNX2_EMAC_MODE_25G_MODE,4,2    ; @BNX2_EMAC_MODE_25G_MODE
	.comm	_BNX2_EMAC_MODE_PORT_GMII,4,2   ; @BNX2_EMAC_MODE_PORT_GMII
	.no_dead_strip	_bnx2_set_phy_loopback
.subsections_via_symbols
