	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mt753x_mii_write               ## -- Begin function mt753x_mii_write
	.p2align	4, 0x90
_mt753x_mii_write:                      ## @mt753x_mii_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r14d
	movl	%edx, %r15d
	movl	%esi, %ebx
	movq	%rdi, %r12
	movq	_MT753X_NUM_PHYS@GOTPCREL(%rip), %rax
	cmpl	%esi, (%rax)
	jle	LBB0_2
## %bb.1:
	addl	(%r12), %ebx
	movq	_MT753X_SMI_ADDR_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %ebx
LBB0_2:
	leaq	4(%r12), %r13
	movq	%r13, %rdi
	callq	_mutex_lock
	movq	_MDIO_CMD_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	_MDIO_ST_C22@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	%r12, %rdi
	movl	%ebx, %esi
	movl	%r15d, %edx
	movl	%r14d, %ecx
	callq	_mt753x_mii_rw
	movq	%r13, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mutex_unlock                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MT753X_NUM_PHYS,4,2            ## @MT753X_NUM_PHYS
	.comm	_MT753X_SMI_ADDR_MASK,4,2       ## @MT753X_SMI_ADDR_MASK
	.comm	_MDIO_CMD_WRITE,4,2             ## @MDIO_CMD_WRITE
	.comm	_MDIO_ST_C22,4,2                ## @MDIO_ST_C22
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mt753x_mii_write               ; -- Begin function mt753x_mii_write
	.p2align	2
_mt753x_mii_write:                      ; @mt753x_mii_write
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x3
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
Lloh0:
	adrp	x8, _MT753X_NUM_PHYS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MT753X_NUM_PHYS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w1
	b.le	LBB0_2
; %bb.1:
	ldr	w8, [x22]
Lloh3:
	adrp	x9, _MT753X_SMI_ADDR_MASK@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MT753X_SMI_ADDR_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	add	w8, w8, w21
	and	w21, w8, w9
LBB0_2:
	add	x23, x22, #4
	mov	x0, x23
	bl	_mutex_lock
Lloh6:
	adrp	x8, _MDIO_CMD_WRITE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MDIO_CMD_WRITE@GOTPAGEOFF]
Lloh8:
	ldr	w4, [x8]
Lloh9:
	adrp	x8, _MDIO_ST_C22@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MDIO_ST_C22@GOTPAGEOFF]
Lloh11:
	ldr	w5, [x8]
	mov	x0, x22
	mov	x1, x21
	mov	x2, x20
	mov	x3, x19
	bl	_mt753x_mii_rw
	mov	x0, x23
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_mutex_unlock
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_MT753X_NUM_PHYS,4,2            ; @MT753X_NUM_PHYS
	.comm	_MT753X_SMI_ADDR_MASK,4,2       ; @MT753X_SMI_ADDR_MASK
	.comm	_MDIO_CMD_WRITE,4,2             ; @MDIO_CMD_WRITE
	.comm	_MDIO_ST_C22,4,2                ; @MDIO_ST_C22
.subsections_via_symbols
