	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bnx2_write_phy
_bnx2_write_phy:                        ## @bnx2_write_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	%edx, %ebx
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	_BNX2_PHY_FLAG_INT_MODE_AUTO_POLLING@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rdi)
	je	LBB0_2
## %bb.1:
	movq	_BNX2_EMAC_MDIO_MODE@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%r15, %rdi
	callq	_BNX2_RD
	movq	_BNX2_EMAC_MDIO_MODE_AUTO_POLL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	notl	%edx
	andl	%eax, %edx
	movl	(%r12), %esi
	movq	%r15, %rdi
	callq	_BNX2_WR
	movl	(%r12), %esi
	movq	%r15, %rdi
	callq	_BNX2_RD
	movl	$40, %edi
	callq	_udelay
LBB0_2:
	movl	4(%r15), %eax
	shll	$21, %eax
	shll	$16, %r14d
	movq	_BNX2_EMAC_MDIO_COMM_COMMAND_WRITE@GOTPCREL(%rip), %rcx
	movq	_BNX2_EMAC_MDIO_COMM_START_BUSY@GOTPCREL(%rip), %rsi
	movq	_BNX2_EMAC_MDIO_COMM_DISEXT@GOTPCREL(%rip), %rdx
	orl	%ebx, %r14d
	orl	%eax, %r14d
	orl	(%rcx), %r14d
	orl	(%rsi), %r14d
	orl	(%rdx), %r14d
	movq	_BNX2_EMAC_MDIO_COMM@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%r15, %rdi
	movl	%r14d, %edx
	callq	_BNX2_WR
	movl	$50, %ebx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	$10, %edi
	callq	_udelay
	movl	(%r12), %esi
	movq	%r15, %rdi
	callq	_BNX2_RD
	movl	%eax, %r13d
	movq	_BNX2_EMAC_MDIO_COMM_START_BUSY@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	testl	%r13d, %r14d
	je	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_4 Depth=1
	decl	%ebx
	jne	LBB0_4
	jmp	LBB0_6
LBB0_5:
	movl	$5, %edi
	callq	_udelay
	movq	_BNX2_EMAC_MDIO_COMM_START_BUSY@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
LBB0_6:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_BNX2_PHY_FLAG_INT_MODE_AUTO_POLLING@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r15)
	je	LBB0_8
## %bb.7:
	movq	_BNX2_EMAC_MDIO_MODE@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%r15, %rdi
	callq	_BNX2_RD
	movq	_BNX2_EMAC_MDIO_MODE_AUTO_POLL@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	(%r12), %esi
	movq	%r15, %rdi
	movl	%eax, %edx
	callq	_BNX2_WR
	movl	(%r12), %esi
	movq	%r15, %rdi
	callq	_BNX2_RD
	movl	$40, %edi
	callq	_udelay
LBB0_8:
	andl	%r13d, %r14d
	negl	%ebx
	testl	%r14d, %r14d
	cmovel	%r14d, %ebx
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BNX2_PHY_FLAG_INT_MODE_AUTO_POLLING,4,2 ## @BNX2_PHY_FLAG_INT_MODE_AUTO_POLLING
	.comm	_BNX2_EMAC_MDIO_MODE,4,2        ## @BNX2_EMAC_MDIO_MODE
	.comm	_BNX2_EMAC_MDIO_MODE_AUTO_POLL,4,2 ## @BNX2_EMAC_MDIO_MODE_AUTO_POLL
	.comm	_BNX2_EMAC_MDIO_COMM_COMMAND_WRITE,4,2 ## @BNX2_EMAC_MDIO_COMM_COMMAND_WRITE
	.comm	_BNX2_EMAC_MDIO_COMM_START_BUSY,4,2 ## @BNX2_EMAC_MDIO_COMM_START_BUSY
	.comm	_BNX2_EMAC_MDIO_COMM_DISEXT,4,2 ## @BNX2_EMAC_MDIO_COMM_DISEXT
	.comm	_BNX2_EMAC_MDIO_COMM,4,2        ## @BNX2_EMAC_MDIO_COMM
	.comm	_EBUSY,4,2                      ## @EBUSY
	.no_dead_strip	_bnx2_write_phy
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bnx2_write_phy
_bnx2_write_phy:                        ; @bnx2_write_phy
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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, x2
	mov	x21, x1
	mov	x19, x0
	ldr	w8, [x0]
Lloh0:
	adrp	x24, _BNX2_PHY_FLAG_INT_MODE_AUTO_POLLING@GOTPAGE
Lloh1:
	ldr	x24, [x24, _BNX2_PHY_FLAG_INT_MODE_AUTO_POLLING@GOTPAGEOFF]
	ldr	w9, [x24]
Lloh2:
	adrp	x22, _BNX2_EMAC_MDIO_MODE@GOTPAGE
Lloh3:
	ldr	x22, [x22, _BNX2_EMAC_MDIO_MODE@GOTPAGEOFF]
Lloh4:
	adrp	x23, _BNX2_EMAC_MDIO_MODE_AUTO_POLL@GOTPAGE
Lloh5:
	ldr	x23, [x23, _BNX2_EMAC_MDIO_MODE_AUTO_POLL@GOTPAGEOFF]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
	ldr	w1, [x22]
	mov	x0, x19
	bl	_BNX2_RD
	ldr	w8, [x23]
	bic	w2, w0, w8
	ldr	w1, [x22]
	mov	x0, x19
	bl	_BNX2_WR
	ldr	w1, [x22]
	mov	x0, x19
	bl	_BNX2_RD
	mov	w0, #40
	bl	_udelay
LBB0_2:
	ldr	w8, [x19, #4]
Lloh6:
	adrp	x9, _BNX2_EMAC_MDIO_COMM_COMMAND_WRITE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _BNX2_EMAC_MDIO_COMM_COMMAND_WRITE@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
Lloh9:
	adrp	x25, _BNX2_EMAC_MDIO_COMM_START_BUSY@GOTPAGE
Lloh10:
	ldr	x25, [x25, _BNX2_EMAC_MDIO_COMM_START_BUSY@GOTPAGEOFF]
	ldr	w10, [x25]
Lloh11:
	adrp	x11, _BNX2_EMAC_MDIO_COMM_DISEXT@GOTPAGE
Lloh12:
	ldr	x11, [x11, _BNX2_EMAC_MDIO_COMM_DISEXT@GOTPAGEOFF]
Lloh13:
	ldr	w11, [x11]
	orr	w12, w20, w21, lsl #16
	orr	w8, w12, w8, lsl #21
	orr	w8, w8, w9
	orr	w8, w8, w10
	orr	w2, w8, w11
Lloh14:
	adrp	x26, _BNX2_EMAC_MDIO_COMM@GOTPAGE
Lloh15:
	ldr	x26, [x26, _BNX2_EMAC_MDIO_COMM@GOTPAGEOFF]
	ldr	w1, [x26]
	mov	x0, x19
	bl	_BNX2_WR
	mov	w27, #50
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #10
	bl	_udelay
	ldr	w1, [x26]
	mov	x0, x19
	bl	_BNX2_RD
	mov	x20, x0
	ldr	w21, [x25]
	tst	w21, w0
	b.eq	LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	subs	w27, w27, #1
	b.ne	LBB0_3
	b	LBB0_6
LBB0_5:
	mov	w0, #5
	bl	_udelay
	ldr	w21, [x25]
LBB0_6:
Lloh16:
	adrp	x8, _EBUSY@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh18:
	ldr	w25, [x8]
	ldr	w8, [x19]
	ldr	w9, [x24]
	tst	w9, w8
	b.eq	LBB0_8
; %bb.7:
	ldr	w1, [x22]
	mov	x0, x19
	bl	_BNX2_RD
	ldr	w8, [x23]
	orr	w2, w8, w0
	ldr	w1, [x22]
	mov	x0, x19
	bl	_BNX2_WR
	ldr	w1, [x22]
	mov	x0, x19
	bl	_BNX2_RD
	mov	w0, #40
	bl	_udelay
LBB0_8:
	tst	w21, w20
	csneg	w0, wzr, w25, eq
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_BNX2_PHY_FLAG_INT_MODE_AUTO_POLLING,4,2 ; @BNX2_PHY_FLAG_INT_MODE_AUTO_POLLING
	.comm	_BNX2_EMAC_MDIO_MODE,4,2        ; @BNX2_EMAC_MDIO_MODE
	.comm	_BNX2_EMAC_MDIO_MODE_AUTO_POLL,4,2 ; @BNX2_EMAC_MDIO_MODE_AUTO_POLL
	.comm	_BNX2_EMAC_MDIO_COMM_COMMAND_WRITE,4,2 ; @BNX2_EMAC_MDIO_COMM_COMMAND_WRITE
	.comm	_BNX2_EMAC_MDIO_COMM_START_BUSY,4,2 ; @BNX2_EMAC_MDIO_COMM_START_BUSY
	.comm	_BNX2_EMAC_MDIO_COMM_DISEXT,4,2 ; @BNX2_EMAC_MDIO_COMM_DISEXT
	.comm	_BNX2_EMAC_MDIO_COMM,4,2        ; @BNX2_EMAC_MDIO_COMM
	.comm	_EBUSY,4,2                      ; @EBUSY
	.no_dead_strip	_bnx2_write_phy
.subsections_via_symbols
