	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bnx2_read_phy
_bnx2_read_phy:                         ## @bnx2_read_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
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	movl	%esi, %r15d
	movq	%rdi, %r14
	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), %rbx
	movl	(%rbx), %esi
	movq	%r14, %rdi
	callq	_BNX2_RD
	movq	_BNX2_EMAC_MDIO_MODE_AUTO_POLL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	notl	%edx
	andl	%eax, %edx
	movl	(%rbx), %esi
	movq	%r14, %rdi
	callq	_BNX2_WR
	movl	(%rbx), %esi
	movq	%r14, %rdi
	callq	_BNX2_RD
	movl	$40, %edi
	callq	_udelay
LBB0_2:
	movl	4(%r14), %eax
	shll	$21, %eax
	shll	$16, %r15d
	orl	%eax, %r15d
	movq	_BNX2_EMAC_MDIO_COMM_COMMAND_READ@GOTPCREL(%rip), %rax
	orl	(%rax), %r15d
	movq	_BNX2_EMAC_MDIO_COMM_DISEXT@GOTPCREL(%rip), %rax
	orl	(%rax), %r15d
	movq	_BNX2_EMAC_MDIO_COMM_START_BUSY@GOTPCREL(%rip), %r13
	orl	(%r13), %r15d
	movq	_BNX2_EMAC_MDIO_COMM@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%r14, %rdi
	movl	%r15d, %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	%r14, %rdi
	callq	_BNX2_RD
	movl	(%r13), %ecx
	testl	%eax, %ecx
	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
	movl	(%r12), %esi
	movq	%r14, %rdi
	callq	_BNX2_RD
	movq	_BNX2_EMAC_MDIO_COMM_DATA@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movl	(%r13), %ecx
LBB0_6:
	movq	_BNX2_PHY_FLAG_INT_MODE_AUTO_POLLING@GOTPCREL(%rip), %rdx
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	testl	%eax, %ecx
	je	LBB0_8
## %bb.7:
	movl	$0, (%rsi)
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_9
LBB0_8:
	movl	%eax, (%rsi)
	xorl	%ebx, %ebx
LBB0_9:
	movl	(%rdx), %eax
	testl	%eax, (%r14)
	je	LBB0_11
## %bb.10:
	movq	_BNX2_EMAC_MDIO_MODE@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_BNX2_RD
	movq	_BNX2_EMAC_MDIO_MODE_AUTO_POLL@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	(%r15), %esi
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_BNX2_WR
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_BNX2_RD
	movl	$40, %edi
	callq	_udelay
LBB0_11:
	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_READ,4,2 ## @BNX2_EMAC_MDIO_COMM_COMMAND_READ
	.comm	_BNX2_EMAC_MDIO_COMM_DISEXT,4,2 ## @BNX2_EMAC_MDIO_COMM_DISEXT
	.comm	_BNX2_EMAC_MDIO_COMM_START_BUSY,4,2 ## @BNX2_EMAC_MDIO_COMM_START_BUSY
	.comm	_BNX2_EMAC_MDIO_COMM,4,2        ## @BNX2_EMAC_MDIO_COMM
	.comm	_BNX2_EMAC_MDIO_COMM_DATA,4,2   ## @BNX2_EMAC_MDIO_COMM_DATA
	.comm	_EBUSY,4,2                      ## @EBUSY
	.no_dead_strip	_bnx2_read_phy
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bnx2_read_phy
_bnx2_read_phy:                         ; @bnx2_read_phy
	.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, 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]
	lsl	w8, w8, #21
	orr	w8, w8, w21, lsl #16
Lloh6:
	adrp	x9, _BNX2_EMAC_MDIO_COMM_COMMAND_READ@GOTPAGE
Lloh7:
	ldr	x9, [x9, _BNX2_EMAC_MDIO_COMM_COMMAND_READ@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh9:
	adrp	x9, _BNX2_EMAC_MDIO_COMM_DISEXT@GOTPAGE
Lloh10:
	ldr	x9, [x9, _BNX2_EMAC_MDIO_COMM_DISEXT@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
Lloh12:
	adrp	x21, _BNX2_EMAC_MDIO_COMM_START_BUSY@GOTPAGE
Lloh13:
	ldr	x21, [x21, _BNX2_EMAC_MDIO_COMM_START_BUSY@GOTPAGEOFF]
	orr	w8, w8, w9
	ldr	w9, [x21]
	orr	w2, w8, w9
Lloh14:
	adrp	x25, _BNX2_EMAC_MDIO_COMM@GOTPAGE
Lloh15:
	ldr	x25, [x25, _BNX2_EMAC_MDIO_COMM@GOTPAGEOFF]
	ldr	w1, [x25]
	mov	x0, x19
	bl	_BNX2_WR
	mov	w26, #50
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #10
	bl	_udelay
	ldr	w1, [x25]
	mov	x0, x19
	bl	_BNX2_RD
	ldr	w8, [x21]
	tst	w8, w0
	b.eq	LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	subs	w26, w26, #1
	b.ne	LBB0_3
; %bb.5:
	tst	w8, w0
	b.eq	LBB0_8
LBB0_6:
	str	wzr, [x20]
Lloh16:
	adrp	x8, _EBUSY@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_9
LBB0_7:
	mov	w0, #5
	bl	_udelay
	ldr	w1, [x25]
	mov	x0, x19
	bl	_BNX2_RD
Lloh19:
	adrp	x8, _BNX2_EMAC_MDIO_COMM_DATA@GOTPAGE
Lloh20:
	ldr	x8, [x8, _BNX2_EMAC_MDIO_COMM_DATA@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	and	w0, w8, w0
	ldr	w8, [x21]
	tst	w8, w0
	b.ne	LBB0_6
LBB0_8:
	mov	w21, #0
	str	w0, [x20]
LBB0_9:
	ldr	w8, [x19]
	ldr	w9, [x24]
	tst	w9, w8
	b.eq	LBB0_11
; %bb.10:
	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_11:
	mov	x0, x21
	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
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.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_READ,4,2 ; @BNX2_EMAC_MDIO_COMM_COMMAND_READ
	.comm	_BNX2_EMAC_MDIO_COMM_DISEXT,4,2 ; @BNX2_EMAC_MDIO_COMM_DISEXT
	.comm	_BNX2_EMAC_MDIO_COMM_START_BUSY,4,2 ; @BNX2_EMAC_MDIO_COMM_START_BUSY
	.comm	_BNX2_EMAC_MDIO_COMM,4,2        ; @BNX2_EMAC_MDIO_COMM
	.comm	_BNX2_EMAC_MDIO_COMM_DATA,4,2   ; @BNX2_EMAC_MDIO_COMM_DATA
	.comm	_EBUSY,4,2                      ; @EBUSY
	.no_dead_strip	_bnx2_read_phy
.subsections_via_symbols
