	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xgbe_phy_perform_ratechange
_xgbe_phy_perform_ratechange:           ## @xgbe_phy_perform_ratechange
	.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, -44(%rbp)                 ## 4-byte Spill
	movl	%esi, %r15d
	movq	%rdi, %r14
	movq	_XP_DRIVER_INT_RO@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	_STATUS@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	callq	_XP_IOREAD_BITS
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_link@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r14), %edx
	leaq	L_.str(%rip), %rcx
	movq	%r14, %rdi
	callq	_netif_dbg
LBB0_2:
	movq	_XP_DRIVER_SCRATCH_0@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	_COMMAND@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%edi, %edi
	movl	%r15d, %ecx
	callq	_XP_SET_BITS
	movl	(%rbx), %esi
	movq	_SUB_COMMAND@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%edi, %edi
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	callq	_XP_SET_BITS
	movl	(%rbx), %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_XP_IOWRITE
	movq	_XP_DRIVER_SCRATCH_1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_XP_IOWRITE
	movq	_XP_DRIVER_INT_REQ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_REQUEST@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	$1, %ecx
	callq	_XP_IOWRITE_BITS
	movq	_XGBE_RATECHANGE_COUNT@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	testl	%ebx, %ebx
	je	LBB0_5
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %esi
	movl	(%r13), %edx
	movq	%r14, %rdi
	callq	_XP_IOREAD_BITS
	testq	%rax, %rax
	je	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	$1000, %edi                     ## imm = 0x3E8
	movl	$2000, %esi                     ## imm = 0x7D0
	callq	_usleep_range
	decl	%ebx
	jne	LBB0_3
LBB0_5:
	movq	_link@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r14), %edx
	leaq	L_.str.1(%rip), %rcx
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_netif_dbg                      ## TAILCALL
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_XP_DRIVER_INT_RO,4,2           ## @XP_DRIVER_INT_RO
	.comm	_STATUS,4,2                     ## @STATUS
	.comm	_link,4,2                       ## @link
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"firmware mailbox not ready for command\n"

	.comm	_XP_DRIVER_SCRATCH_0,4,2        ## @XP_DRIVER_SCRATCH_0
	.comm	_COMMAND,4,2                    ## @COMMAND
	.comm	_SUB_COMMAND,4,2                ## @SUB_COMMAND
	.comm	_XP_DRIVER_SCRATCH_1,4,2        ## @XP_DRIVER_SCRATCH_1
	.comm	_XP_DRIVER_INT_REQ,4,2          ## @XP_DRIVER_INT_REQ
	.comm	_REQUEST,4,2                    ## @REQUEST
	.comm	_XGBE_RATECHANGE_COUNT,4,2      ## @XGBE_RATECHANGE_COUNT
L_.str.1:                               ## @.str.1
	.asciz	"firmware mailbox command did not complete\n"

	.no_dead_strip	_xgbe_phy_perform_ratechange
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xgbe_phy_perform_ratechange
_xgbe_phy_perform_ratechange:           ; @xgbe_phy_perform_ratechange
	.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
Lloh0:
	adrp	x22, _XP_DRIVER_INT_RO@GOTPAGE
Lloh1:
	ldr	x22, [x22, _XP_DRIVER_INT_RO@GOTPAGEOFF]
	ldr	w1, [x22]
Lloh2:
	adrp	x23, _STATUS@GOTPAGE
Lloh3:
	ldr	x23, [x23, _STATUS@GOTPAGEOFF]
	ldr	w2, [x23]
	bl	_XP_IOREAD_BITS
Lloh4:
	adrp	x24, _link@GOTPAGE
Lloh5:
	ldr	x24, [x24, _link@GOTPAGEOFF]
	cbz	x0, LBB0_2
; %bb.1:
	ldr	w1, [x24]
	ldr	w2, [x19]
Lloh6:
	adrp	x3, l_.str@PAGE
Lloh7:
	add	x3, x3, l_.str@PAGEOFF
	mov	x0, x19
	bl	_netif_dbg
LBB0_2:
Lloh8:
	adrp	x25, _XP_DRIVER_SCRATCH_0@GOTPAGE
Lloh9:
	ldr	x25, [x25, _XP_DRIVER_SCRATCH_0@GOTPAGEOFF]
	ldr	w1, [x25]
Lloh10:
	adrp	x8, _COMMAND@GOTPAGE
Lloh11:
	ldr	x8, [x8, _COMMAND@GOTPAGEOFF]
Lloh12:
	ldr	w2, [x8]
	mov	w0, #0
	mov	x3, x21
	bl	_XP_SET_BITS
	ldr	w1, [x25]
Lloh13:
	adrp	x8, _SUB_COMMAND@GOTPAGE
Lloh14:
	ldr	x8, [x8, _SUB_COMMAND@GOTPAGEOFF]
Lloh15:
	ldr	w2, [x8]
	mov	w0, #0
	mov	x3, x20
	bl	_XP_SET_BITS
	ldr	w1, [x25]
	mov	x0, x19
	mov	w2, #0
	bl	_XP_IOWRITE
Lloh16:
	adrp	x8, _XP_DRIVER_SCRATCH_1@GOTPAGE
Lloh17:
	ldr	x8, [x8, _XP_DRIVER_SCRATCH_1@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_XP_IOWRITE
Lloh19:
	adrp	x8, _XP_DRIVER_INT_REQ@GOTPAGE
Lloh20:
	ldr	x8, [x8, _XP_DRIVER_INT_REQ@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
Lloh22:
	adrp	x8, _REQUEST@GOTPAGE
Lloh23:
	ldr	x8, [x8, _REQUEST@GOTPAGEOFF]
Lloh24:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w3, #1
	bl	_XP_IOWRITE_BITS
Lloh25:
	adrp	x8, _XGBE_RATECHANGE_COUNT@GOTPAGE
Lloh26:
	ldr	x8, [x8, _XGBE_RATECHANGE_COUNT@GOTPAGEOFF]
Lloh27:
	ldr	w20, [x8]
	cbz	w20, LBB0_5
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x22]
	ldr	w2, [x23]
	mov	x0, x19
	bl	_XP_IOREAD_BITS
	cbz	x0, LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	sub	w20, w20, #1
	mov	w0, #1000
	mov	w1, #2000
	bl	_usleep_range
	cbnz	w20, LBB0_3
LBB0_5:
	ldr	w1, [x24]
	ldr	w2, [x19]
Lloh28:
	adrp	x3, l_.str.1@PAGE
Lloh29:
	add	x3, x3, l_.str.1@PAGEOFF
	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	_netif_dbg
LBB0_6:
	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 AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_XP_DRIVER_INT_RO,4,2           ; @XP_DRIVER_INT_RO
	.comm	_STATUS,4,2                     ; @STATUS
	.comm	_link,4,2                       ; @link
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"firmware mailbox not ready for command\n"

	.comm	_XP_DRIVER_SCRATCH_0,4,2        ; @XP_DRIVER_SCRATCH_0
	.comm	_COMMAND,4,2                    ; @COMMAND
	.comm	_SUB_COMMAND,4,2                ; @SUB_COMMAND
	.comm	_XP_DRIVER_SCRATCH_1,4,2        ; @XP_DRIVER_SCRATCH_1
	.comm	_XP_DRIVER_INT_REQ,4,2          ; @XP_DRIVER_INT_REQ
	.comm	_REQUEST,4,2                    ; @REQUEST
	.comm	_XGBE_RATECHANGE_COUNT,4,2      ; @XGBE_RATECHANGE_COUNT
l_.str.1:                               ; @.str.1
	.asciz	"firmware mailbox command did not complete\n"

	.no_dead_strip	_xgbe_phy_perform_ratechange
.subsections_via_symbols
