	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hclge_mdio_write
_hclge_mdio_write:                      ## @hclge_mdio_write
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %ebx
	movl	%edx, %r12d
	movl	%esi, %r13d
	movq	(%rdi), %r14
	movq	_HCLGE_STATE_CMD_DISABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	12(%r14), %rsi
	callq	_test_bit
	xorl	%r15d, %r15d
	testq	%rax, %rax
	jne	LBB0_3
## %bb.1:
	movq	_HCLGE_OPC_MDIO_CONFIG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-56(%rbp), %rdi
	xorl	%r15d, %r15d
	xorl	%edx, %edx
	callq	_hclge_cmd_setup_basic_desc
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movq	-56(%rbp), %rbx
	movl	12(%rbx), %edi
	movq	_HCLGE_MDIO_PHYID_M@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_HCLGE_MDIO_PHYID_S@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r13d, %ecx
	callq	_hnae3_set_field
	movl	8(%rbx), %edi
	movq	_HCLGE_MDIO_PHYREG_M@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_HCLGE_MDIO_PHYREG_S@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r12d, %ecx
	callq	_hnae3_set_field
	movl	4(%rbx), %edi
	movq	_HCLGE_MDIO_CTRL_START_B@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$1, %edx
	callq	_hnae3_set_bit
	movl	4(%rbx), %edi
	movq	_HCLGE_MDIO_CTRL_ST_M@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_HCLGE_MDIO_CTRL_ST_S@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$1, %ecx
	callq	_hnae3_set_field
	movl	4(%rbx), %edi
	movq	_HCLGE_MDIO_CTRL_OP_M@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_HCLGE_MDIO_CTRL_OP_S@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_HCLGE_MDIO_C22_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_hnae3_set_field
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_cpu_to_le16
	movl	%eax, (%rbx)
	leaq	8(%r14), %rdi
	leaq	-56(%rbp), %rsi
	movl	$1, %edx
	callq	_hclge_cmd_send
	testl	%eax, %eax
	je	LBB0_3
## %bb.2:
	movl	%eax, %ebx
	movq	(%r14), %rdi
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	callq	_dev_err
	movl	%ebx, %r15d
LBB0_3:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HCLGE_STATE_CMD_DISABLE,4,2    ## @HCLGE_STATE_CMD_DISABLE
	.comm	_HCLGE_OPC_MDIO_CONFIG,4,2      ## @HCLGE_OPC_MDIO_CONFIG
	.comm	_HCLGE_MDIO_PHYID_M,4,2         ## @HCLGE_MDIO_PHYID_M
	.comm	_HCLGE_MDIO_PHYID_S,4,2         ## @HCLGE_MDIO_PHYID_S
	.comm	_HCLGE_MDIO_PHYREG_M,4,2        ## @HCLGE_MDIO_PHYREG_M
	.comm	_HCLGE_MDIO_PHYREG_S,4,2        ## @HCLGE_MDIO_PHYREG_S
	.comm	_HCLGE_MDIO_CTRL_START_B,4,2    ## @HCLGE_MDIO_CTRL_START_B
	.comm	_HCLGE_MDIO_CTRL_ST_M,4,2       ## @HCLGE_MDIO_CTRL_ST_M
	.comm	_HCLGE_MDIO_CTRL_ST_S,4,2       ## @HCLGE_MDIO_CTRL_ST_S
	.comm	_HCLGE_MDIO_CTRL_OP_M,4,2       ## @HCLGE_MDIO_CTRL_OP_M
	.comm	_HCLGE_MDIO_CTRL_OP_S,4,2       ## @HCLGE_MDIO_CTRL_OP_S
	.comm	_HCLGE_MDIO_C22_WRITE,4,2       ## @HCLGE_MDIO_C22_WRITE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"mdio write fail when sending cmd, status is %d.\n"

	.no_dead_strip	_hclge_mdio_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hclge_mdio_write
_hclge_mdio_write:                      ; @hclge_mdio_write
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x19, x3
	mov	x20, x2
	mov	x21, x1
	ldr	x22, [x0]
Lloh0:
	adrp	x8, _HCLGE_STATE_CMD_DISABLE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HCLGE_STATE_CMD_DISABLE@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	add	x1, x22, #12
	bl	_test_bit
	cbz	x0, LBB0_2
; %bb.1:
	mov	w19, #0
	b	LBB0_4
LBB0_2:
Lloh3:
	adrp	x8, _HCLGE_OPC_MDIO_CONFIG@GOTPAGE
Lloh4:
	ldr	x8, [x8, _HCLGE_OPC_MDIO_CONFIG@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	add	x0, sp, #8
	mov	w2, #0
	bl	_hclge_cmd_setup_basic_desc
	ldr	x23, [sp, #8]
	ldr	w0, [x23, #12]
Lloh6:
	adrp	x8, _HCLGE_MDIO_PHYID_M@GOTPAGE
Lloh7:
	ldr	x8, [x8, _HCLGE_MDIO_PHYID_M@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
Lloh9:
	adrp	x8, _HCLGE_MDIO_PHYID_S@GOTPAGE
Lloh10:
	ldr	x8, [x8, _HCLGE_MDIO_PHYID_S@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	mov	x3, x21
	bl	_hnae3_set_field
	ldr	w0, [x23, #8]
Lloh12:
	adrp	x8, _HCLGE_MDIO_PHYREG_M@GOTPAGE
Lloh13:
	ldr	x8, [x8, _HCLGE_MDIO_PHYREG_M@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
Lloh15:
	adrp	x8, _HCLGE_MDIO_PHYREG_S@GOTPAGE
Lloh16:
	ldr	x8, [x8, _HCLGE_MDIO_PHYREG_S@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
	mov	x3, x20
	bl	_hnae3_set_field
	ldr	w0, [x23, #4]
Lloh18:
	adrp	x8, _HCLGE_MDIO_CTRL_START_B@GOTPAGE
Lloh19:
	ldr	x8, [x8, _HCLGE_MDIO_CTRL_START_B@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	mov	w2, #1
	bl	_hnae3_set_bit
	ldr	w0, [x23, #4]
Lloh21:
	adrp	x8, _HCLGE_MDIO_CTRL_ST_M@GOTPAGE
Lloh22:
	ldr	x8, [x8, _HCLGE_MDIO_CTRL_ST_M@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
Lloh24:
	adrp	x8, _HCLGE_MDIO_CTRL_ST_S@GOTPAGE
Lloh25:
	ldr	x8, [x8, _HCLGE_MDIO_CTRL_ST_S@GOTPAGEOFF]
Lloh26:
	ldr	w2, [x8]
	mov	w3, #1
	bl	_hnae3_set_field
	ldr	w0, [x23, #4]
Lloh27:
	adrp	x8, _HCLGE_MDIO_CTRL_OP_M@GOTPAGE
Lloh28:
	ldr	x8, [x8, _HCLGE_MDIO_CTRL_OP_M@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
Lloh30:
	adrp	x8, _HCLGE_MDIO_CTRL_OP_S@GOTPAGE
Lloh31:
	ldr	x8, [x8, _HCLGE_MDIO_CTRL_OP_S@GOTPAGEOFF]
Lloh32:
	ldr	w2, [x8]
Lloh33:
	adrp	x8, _HCLGE_MDIO_C22_WRITE@GOTPAGE
Lloh34:
	ldr	x8, [x8, _HCLGE_MDIO_C22_WRITE@GOTPAGEOFF]
Lloh35:
	ldr	w3, [x8]
	bl	_hnae3_set_field
	mov	x0, x19
	bl	_cpu_to_le16
	str	w0, [x23]
	add	x0, x22, #8
	add	x1, sp, #8
	mov	w2, #1
	bl	_hclge_cmd_send
	mov	x19, x0
	cbz	w0, LBB0_4
; %bb.3:
	ldr	x0, [x22]
Lloh36:
	adrp	x1, l_.str@PAGE
Lloh37:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x19
	bl	_dev_err
LBB0_4:
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.comm	_HCLGE_STATE_CMD_DISABLE,4,2    ; @HCLGE_STATE_CMD_DISABLE
	.comm	_HCLGE_OPC_MDIO_CONFIG,4,2      ; @HCLGE_OPC_MDIO_CONFIG
	.comm	_HCLGE_MDIO_PHYID_M,4,2         ; @HCLGE_MDIO_PHYID_M
	.comm	_HCLGE_MDIO_PHYID_S,4,2         ; @HCLGE_MDIO_PHYID_S
	.comm	_HCLGE_MDIO_PHYREG_M,4,2        ; @HCLGE_MDIO_PHYREG_M
	.comm	_HCLGE_MDIO_PHYREG_S,4,2        ; @HCLGE_MDIO_PHYREG_S
	.comm	_HCLGE_MDIO_CTRL_START_B,4,2    ; @HCLGE_MDIO_CTRL_START_B
	.comm	_HCLGE_MDIO_CTRL_ST_M,4,2       ; @HCLGE_MDIO_CTRL_ST_M
	.comm	_HCLGE_MDIO_CTRL_ST_S,4,2       ; @HCLGE_MDIO_CTRL_ST_S
	.comm	_HCLGE_MDIO_CTRL_OP_M,4,2       ; @HCLGE_MDIO_CTRL_OP_M
	.comm	_HCLGE_MDIO_CTRL_OP_S,4,2       ; @HCLGE_MDIO_CTRL_OP_S
	.comm	_HCLGE_MDIO_C22_WRITE,4,2       ; @HCLGE_MDIO_C22_WRITE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"mdio write fail when sending cmd, status is %d.\n"

	.no_dead_strip	_hclge_mdio_write
.subsections_via_symbols
