	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function marvell_set_polarity
_marvell_set_polarity:                  ## @marvell_set_polarity
	.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	%esi, %r12d
	movq	%rdi, %r14
	movq	_MII_M1011_PHY_SCR@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	callq	_phy_read
	movl	%eax, %r15d
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movq	_MII_M1011_PHY_SCR_AUTO_CROSS@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%ebx, %eax
	notl	%eax
	andl	%r15d, %eax
	cmpl	$128, %r12d
	je	LBB0_5
## %bb.3:
	cmpl	$131, %r12d
	jne	LBB0_7
## %bb.4:
	movq	_MII_M1011_PHY_SCR_MDI@GOTPCREL(%rip), %rcx
	jmp	LBB0_6
LBB0_1:
	movl	%r15d, %eax
	jmp	LBB0_10
LBB0_5:
	movq	_MII_M1011_PHY_SCR_MDI_X@GOTPCREL(%rip), %rcx
LBB0_6:
	movl	(%rcx), %ebx
LBB0_7:
	orl	%eax, %ebx
	cmpl	%r15d, %ebx
	je	LBB0_9
## %bb.8:
	movl	(%r13), %esi
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_phy_write
	testl	%eax, %eax
	jne	LBB0_10
LBB0_9:
	xorl	%eax, %eax
	cmpl	%r15d, %ebx
	setne	%al
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MII_M1011_PHY_SCR,4,2          ## @MII_M1011_PHY_SCR
	.comm	_MII_M1011_PHY_SCR_AUTO_CROSS,4,2 ## @MII_M1011_PHY_SCR_AUTO_CROSS
	.comm	_MII_M1011_PHY_SCR_MDI,4,2      ## @MII_M1011_PHY_SCR_MDI
	.comm	_MII_M1011_PHY_SCR_MDI_X,4,2    ## @MII_M1011_PHY_SCR_MDI_X
	.no_dead_strip	_marvell_set_polarity
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function marvell_set_polarity
_marvell_set_polarity:                  ; @marvell_set_polarity
	.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	x21, x1
	mov	x20, x0
Lloh0:
	adrp	x22, _MII_M1011_PHY_SCR@GOTPAGE
Lloh1:
	ldr	x22, [x22, _MII_M1011_PHY_SCR@GOTPAGEOFF]
	ldr	w1, [x22]
	bl	_phy_read
	mov	x19, x0
	tbnz	w0, #31, LBB0_4
; %bb.1:
Lloh2:
	adrp	x8, _MII_M1011_PHY_SCR_AUTO_CROSS@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MII_M1011_PHY_SCR_AUTO_CROSS@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x8]
	bic	w8, w19, w9
	cmp	w21, #128
	b.eq	LBB0_5
; %bb.2:
	cmp	w21, #131
	b.ne	LBB0_7
; %bb.3:
Lloh5:
	adrp	x9, _MII_M1011_PHY_SCR_MDI@GOTPAGE
Lloh6:
	ldr	x9, [x9, _MII_M1011_PHY_SCR_MDI@GOTPAGEOFF]
	b	LBB0_6
LBB0_4:
	mov	x0, x19
	b	LBB0_10
LBB0_5:
Lloh7:
	adrp	x9, _MII_M1011_PHY_SCR_MDI_X@GOTPAGE
Lloh8:
	ldr	x9, [x9, _MII_M1011_PHY_SCR_MDI_X@GOTPAGEOFF]
LBB0_6:
	ldr	w9, [x9]
LBB0_7:
	orr	w21, w9, w8
	cmp	w21, w19
	b.eq	LBB0_9
; %bb.8:
	ldr	w1, [x22]
	mov	x0, x20
	mov	x2, x21
	bl	_phy_write
	cbnz	w0, LBB0_10
LBB0_9:
	cmp	w21, w19
	cset	w0, ne
LBB0_10:
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_MII_M1011_PHY_SCR,4,2          ; @MII_M1011_PHY_SCR
	.comm	_MII_M1011_PHY_SCR_AUTO_CROSS,4,2 ; @MII_M1011_PHY_SCR_AUTO_CROSS
	.comm	_MII_M1011_PHY_SCR_MDI,4,2      ; @MII_M1011_PHY_SCR_MDI
	.comm	_MII_M1011_PHY_SCR_MDI_X,4,2    ; @MII_M1011_PHY_SCR_MDI_X
	.no_dead_strip	_marvell_set_polarity
.subsections_via_symbols
