	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hclge_set_phy_loopback
_hclge_set_phy_loopback:                ## @hclge_set_phy_loopback
	.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
	movl	%esi, %r15d
	movq	8(%rdi), %rsi
	testq	%rsi, %rsi
	je	LBB0_1
## %bb.2:
	movq	%rdi, %r14
	testl	%r15d, %r15d
	je	LBB0_4
## %bb.3:
	callq	_hclge_enable_phy_loopback
	jmp	LBB0_5
LBB0_1:
	movq	_ENOTSUPP@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_10
LBB0_4:
	callq	_hclge_disable_phy_loopback
LBB0_5:
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	movq	(%r14), %rdi
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_10
LBB0_7:
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_hclge_cfg_mac_mode
	movq	_TRUE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_hclge_mac_phy_link_status_wait
	testl	%eax, %eax
	je	LBB0_8
## %bb.9:
	movl	%eax, %ebx
	movq	(%r14), %rdi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_10
LBB0_8:
	xorl	%ebx, %ebx
LBB0_10:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOTSUPP,4,2                   ## @ENOTSUPP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"set phy loopback fail, ret = %d\n"

	.comm	_TRUE,4,2                       ## @TRUE
L_.str.1:                               ## @.str.1
	.asciz	"phy loopback config mac mode timeout\n"

	.no_dead_strip	_hclge_set_phy_loopback
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hclge_set_phy_loopback
_hclge_set_phy_loopback:                ; @hclge_set_phy_loopback
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	ldr	x1, [x0, #8]
	cbz	x1, LBB0_4
; %bb.1:
	mov	x19, x0
	cbz	w21, LBB0_5
; %bb.2:
	bl	_hclge_enable_phy_loopback
	mov	x20, x0
	cbz	w0, LBB0_6
LBB0_3:
	ldr	x0, [x19]
	str	x20, [sp]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_8
LBB0_4:
Lloh2:
	adrp	x8, _ENOTSUPP@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENOTSUPP@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_9
LBB0_5:
	bl	_hclge_disable_phy_loopback
	mov	x20, x0
	cbnz	w0, LBB0_3
LBB0_6:
	mov	x0, x19
	mov	x1, x21
	bl	_hclge_cfg_mac_mode
Lloh5:
	adrp	x8, _TRUE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x21
	bl	_hclge_mac_phy_link_status_wait
	mov	x20, x0
	cbz	w0, LBB0_9
; %bb.7:
	ldr	x0, [x19]
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_8:
	bl	_dev_err
LBB0_9:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOTSUPP,4,2                   ; @ENOTSUPP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"set phy loopback fail, ret = %d\n"

	.comm	_TRUE,4,2                       ; @TRUE
l_.str.1:                               ; @.str.1
	.asciz	"phy loopback config mac mode timeout\n"

	.no_dead_strip	_hclge_set_phy_loopback
.subsections_via_symbols
