	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xgbe_phy_set_redrv_mode
_xgbe_phy_set_redrv_mode:               ## @xgbe_phy_set_redrv_mode
	.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), %rbx
	cmpl	$0, 24(%rbx)
	je	LBB0_10
## %bb.1:
	movq	%rdi, %r15
	movq	_XGBE_PHY_REDRV_MODE_CX@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	(%rbx), %rax
	movq	_XGBE_PORT_MODE_SFP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.2:
	movq	8(%rbx), %rax
	movq	_XGBE_SFP_BASE_1000_CX@GOTPCREL(%rip), %rcx
	movq	_XGBE_SFP_BASE_10000_CR@GOTPCREL(%rip), %rsi
	movl	%r14d, %edx
	cmpq	(%rsi), %rax
	je	LBB0_4
## %bb.3:
	movq	_XGBE_PHY_REDRV_MODE_SR@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
LBB0_4:
	cmpq	(%rcx), %rax
	cmovnel	%edx, %r14d
LBB0_5:
	movq	%r15, %rdi
	callq	_xgbe_phy_get_comm_ownership
	testl	%eax, %eax
	je	LBB0_6
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	cmpq	$0, 16(%rbx)
	je	LBB0_8
## %bb.7:
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_xgbe_phy_set_redrv_mode_i2c
	jmp	LBB0_9
LBB0_8:
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_xgbe_phy_set_redrv_mode_mdio
LBB0_9:
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_xgbe_phy_put_comm_ownership    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_XGBE_PHY_REDRV_MODE_CX,4,2     ## @XGBE_PHY_REDRV_MODE_CX
	.comm	_XGBE_PORT_MODE_SFP,8,3         ## @XGBE_PORT_MODE_SFP
	.comm	_XGBE_SFP_BASE_1000_CX,8,3      ## @XGBE_SFP_BASE_1000_CX
	.comm	_XGBE_SFP_BASE_10000_CR,8,3     ## @XGBE_SFP_BASE_10000_CR
	.comm	_XGBE_PHY_REDRV_MODE_SR,4,2     ## @XGBE_PHY_REDRV_MODE_SR
	.no_dead_strip	_xgbe_phy_set_redrv_mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xgbe_phy_set_redrv_mode
_xgbe_phy_set_redrv_mode:               ; @xgbe_phy_set_redrv_mode
	.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
	ldr	x21, [x0]
	ldr	w8, [x21, #24]
	cbz	w8, LBB0_4
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x8, _XGBE_PHY_REDRV_MODE_CX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _XGBE_PHY_REDRV_MODE_CX@GOTPAGEOFF]
Lloh2:
	ldr	w20, [x8]
	ldr	x8, [x21]
Lloh3:
	adrp	x9, _XGBE_PORT_MODE_SFP@GOTPAGE
Lloh4:
	ldr	x9, [x9, _XGBE_PORT_MODE_SFP@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.2:
	ldr	x8, [x21, #8]
Lloh6:
	adrp	x9, _XGBE_SFP_BASE_1000_CX@GOTPAGE
Lloh7:
	ldr	x9, [x9, _XGBE_SFP_BASE_1000_CX@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
Lloh9:
	adrp	x10, _XGBE_SFP_BASE_10000_CR@GOTPAGE
Lloh10:
	ldr	x10, [x10, _XGBE_SFP_BASE_10000_CR@GOTPAGEOFF]
Lloh11:
	ldr	x10, [x10]
	cmp	x8, x10
	ccmp	x8, x9, #4, ne
Lloh12:
	adrp	x8, _XGBE_PHY_REDRV_MODE_SR@GOTPAGE
Lloh13:
	ldr	x8, [x8, _XGBE_PHY_REDRV_MODE_SR@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	csel	w20, w20, w8, eq
LBB0_3:
	mov	x0, x19
	bl	_xgbe_phy_get_comm_ownership
	cbz	w0, LBB0_5
LBB0_4:
	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
LBB0_5:
	ldr	x8, [x21, #16]
	cbz	x8, LBB0_7
; %bb.6:
	mov	x0, x19
	mov	x1, x20
	bl	_xgbe_phy_set_redrv_mode_i2c
	b	LBB0_8
LBB0_7:
	mov	x0, x19
	mov	x1, x20
	bl	_xgbe_phy_set_redrv_mode_mdio
LBB0_8:
	mov	x0, x19
	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
	b	_xgbe_phy_put_comm_ownership
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_XGBE_PHY_REDRV_MODE_CX,4,2     ; @XGBE_PHY_REDRV_MODE_CX
	.comm	_XGBE_PORT_MODE_SFP,8,3         ; @XGBE_PORT_MODE_SFP
	.comm	_XGBE_SFP_BASE_1000_CX,8,3      ; @XGBE_SFP_BASE_1000_CX
	.comm	_XGBE_SFP_BASE_10000_CR,8,3     ; @XGBE_SFP_BASE_10000_CR
	.comm	_XGBE_PHY_REDRV_MODE_SR,4,2     ; @XGBE_PHY_REDRV_MODE_SR
	.no_dead_strip	_xgbe_phy_set_redrv_mode
.subsections_via_symbols
