	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mt7530_mmd_write
_mt7530_mmd_write:                      ## @mt7530_mmd_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	%r8d, -48(%rbp)                 ## 4-byte Spill
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movl	%edx, %ebx
	movl	%esi, %r12d
	movq	%rdi, %r15
	movq	_MT753X_NUM_PHYS@GOTPCREL(%rip), %rax
	cmpl	%esi, (%rax)
	jle	LBB0_2
## %bb.1:
	addl	(%r15), %r12d
	movq	_MT753X_SMI_ADDR_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %r12d
LBB0_2:
	movq	8(%r15), %rdi
	callq	_mutex_lock
	movq	8(%r15), %rdi
	movq	_MII_MMD_ACC_CTL_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_MMD_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MMD_CMD_S@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %esi
	movq	_MMD_DEVAD_S@GOTPCREL(%rip), %r13
	movb	(%r13), %cl
	movl	%ebx, %eax
	shll	%cl, %eax
	movq	_MMD_DEVAD_M@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	orl	%esi, %eax
	movl	%r12d, %esi
	movl	%eax, %ecx
	callq	*8(%rdi)
	movq	8(%r15), %rdi
	movq	_MII_MMD_ADDR_DATA_REG@GOTPCREL(%rip), %r14
	movl	(%r14), %edx
	movl	%r12d, %esi
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	callq	*8(%rdi)
	movq	8(%r15), %rdi
	movq	_MMD_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_MMD_CMD_S@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
	movb	(%r13), %cl
	shll	%cl, %ebx
	movq	_MII_MMD_ACC_CTL_REG@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_MMD_DEVAD_M@GOTPCREL(%rip), %rcx
	andl	(%rcx), %ebx
	orl	%eax, %ebx
	movl	%r12d, %esi
	movl	%ebx, %ecx
	callq	*8(%rdi)
	movq	8(%r15), %rdi
	movl	(%r14), %edx
	movl	%r12d, %esi
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	callq	*8(%rdi)
	movq	8(%r15), %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	_MII_MMD_ACC_CTL_REG,4,2        ## @MII_MMD_ACC_CTL_REG
	.comm	_MMD_ADDR,4,2                   ## @MMD_ADDR
	.comm	_MMD_CMD_S,4,2                  ## @MMD_CMD_S
	.comm	_MMD_DEVAD_S,4,2                ## @MMD_DEVAD_S
	.comm	_MMD_DEVAD_M,4,2                ## @MMD_DEVAD_M
	.comm	_MII_MMD_ADDR_DATA_REG,4,2      ## @MII_MMD_ADDR_DATA_REG
	.comm	_MMD_DATA,4,2                   ## @MMD_DATA
	.no_dead_strip	_mt7530_mmd_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mt7530_mmd_write
_mt7530_mmd_write:                      ; @mt7530_mmd_write
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x4
	mov	x23, x3
	mov	x22, x2
	mov	x21, x1
	mov	x20, 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, [x20]
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:
	ldr	x0, [x20, #8]
	bl	_mutex_lock
	ldr	x0, [x20, #8]
Lloh6:
	adrp	x24, _MII_MMD_ACC_CTL_REG@GOTPAGE
Lloh7:
	ldr	x24, [x24, _MII_MMD_ACC_CTL_REG@GOTPAGEOFF]
	ldr	x8, [x0, #8]
	ldr	w2, [x24]
Lloh8:
	adrp	x9, _MMD_ADDR@GOTPAGE
Lloh9:
	ldr	x9, [x9, _MMD_ADDR@GOTPAGEOFF]
Lloh10:
	adrp	x25, _MMD_CMD_S@GOTPAGE
Lloh11:
	ldr	x25, [x25, _MMD_CMD_S@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	ldr	w10, [x25]
	lsl	w9, w9, w10
Lloh13:
	adrp	x26, _MMD_DEVAD_S@GOTPAGE
Lloh14:
	ldr	x26, [x26, _MMD_DEVAD_S@GOTPAGEOFF]
	ldr	w10, [x26]
	lsl	w10, w22, w10
Lloh15:
	adrp	x27, _MMD_DEVAD_M@GOTPAGE
Lloh16:
	ldr	x27, [x27, _MMD_DEVAD_M@GOTPAGEOFF]
	ldr	w11, [x27]
	and	w10, w10, w11
	orr	w3, w10, w9
	mov	x1, x21
	blr	x8
	ldr	x0, [x20, #8]
	ldr	x8, [x0, #8]
Lloh17:
	adrp	x28, _MII_MMD_ADDR_DATA_REG@GOTPAGE
Lloh18:
	ldr	x28, [x28, _MII_MMD_ADDR_DATA_REG@GOTPAGEOFF]
	ldr	w2, [x28]
	mov	x1, x21
	mov	x3, x23
	blr	x8
	ldr	x0, [x20, #8]
	ldr	x8, [x0, #8]
	ldr	w2, [x24]
Lloh19:
	adrp	x9, _MMD_DATA@GOTPAGE
Lloh20:
	ldr	x9, [x9, _MMD_DATA@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	ldr	w10, [x25]
	lsl	w9, w9, w10
	ldr	w10, [x26]
	lsl	w10, w22, w10
	ldr	w11, [x27]
	and	w10, w10, w11
	orr	w3, w10, w9
	mov	x1, x21
	blr	x8
	ldr	x0, [x20, #8]
	ldr	x8, [x0, #8]
	ldr	w2, [x28]
	mov	x1, x21
	mov	x3, x19
	blr	x8
	ldr	x0, [x20, #8]
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_mutex_unlock
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh12
	.loh AdrpLdrGot	Lloh6, Lloh7
	.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	_MII_MMD_ACC_CTL_REG,4,2        ; @MII_MMD_ACC_CTL_REG
	.comm	_MMD_ADDR,4,2                   ; @MMD_ADDR
	.comm	_MMD_CMD_S,4,2                  ; @MMD_CMD_S
	.comm	_MMD_DEVAD_S,4,2                ; @MMD_DEVAD_S
	.comm	_MMD_DEVAD_M,4,2                ; @MMD_DEVAD_M
	.comm	_MII_MMD_ADDR_DATA_REG,4,2      ; @MII_MMD_ADDR_DATA_REG
	.comm	_MMD_DATA,4,2                   ; @MMD_DATA
	.no_dead_strip	_mt7530_mmd_write
.subsections_via_symbols
