	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mvebu_a3700_comphy_set_mode
_mvebu_a3700_comphy_set_mode:           ## @mvebu_a3700_comphy_set_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movl	%esi, %r14d
	callq	_phy_get_drvdata
	movq	%rax, %rbx
	movq	_PHY_INTERFACE_MODE_1000BASEX@GOTPCREL(%rip), %rax
	cmpl	%r15d, (%rax)
	jne	LBB0_2
## %bb.1:
	movq	_PHY_INTERFACE_MODE_SGMII@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
LBB0_2:
	movl	12(%rbx), %esi
	movl	16(%rbx), %edi
	movl	%r14d, %edx
	movl	%r15d, %ecx
	callq	_mvebu_a3700_comphy_get_fw_mode
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:
	movl	%r14d, (%rbx)
	movl	%r15d, 4(%rbx)
	xorl	%r12d, %r12d
	jmp	LBB0_5
LBB0_3:
	movl	%eax, %r12d
	movl	8(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
LBB0_5:
	movl	%r12d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PHY_INTERFACE_MODE_1000BASEX,4,2 ## @PHY_INTERFACE_MODE_1000BASEX
	.comm	_PHY_INTERFACE_MODE_SGMII,4,2   ## @PHY_INTERFACE_MODE_SGMII
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid COMPHY mode\n"

	.no_dead_strip	_mvebu_a3700_comphy_set_mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mvebu_a3700_comphy_set_mode
_mvebu_a3700_comphy_set_mode:           ; @mvebu_a3700_comphy_set_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
	mov	x21, x2
	mov	x19, x1
	bl	_phy_get_drvdata
	mov	x20, x0
Lloh0:
	adrp	x8, _PHY_INTERFACE_MODE_1000BASEX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PHY_INTERFACE_MODE_1000BASEX@GOTPAGEOFF]
Lloh2:
	adrp	x9, _PHY_INTERFACE_MODE_SGMII@GOTPAGE
Lloh3:
	ldr	x9, [x9, _PHY_INTERFACE_MODE_SGMII@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	ldr	w9, [x9]
	cmp	w8, w21
	csel	w22, w9, w21, eq
	ldr	w0, [x0, #16]
	ldr	w1, [x20, #12]
	mov	x2, x19
	mov	x3, x22
	bl	_mvebu_a3700_comphy_get_fw_mode
	tbnz	w0, #31, LBB0_2
; %bb.1:
	mov	w21, #0
	stp	w19, w22, [x20]
	b	LBB0_3
LBB0_2:
	mov	x21, x0
	ldr	w0, [x20, #8]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
LBB0_3:
	mov	x0, x21
	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 AdrpLdrGotLdr	Lloh2, Lloh3, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_PHY_INTERFACE_MODE_1000BASEX,4,2 ; @PHY_INTERFACE_MODE_1000BASEX
	.comm	_PHY_INTERFACE_MODE_SGMII,4,2   ; @PHY_INTERFACE_MODE_SGMII
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid COMPHY mode\n"

	.no_dead_strip	_mvebu_a3700_comphy_set_mode
.subsections_via_symbols
