	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mt7530_port_enable
_mt7530_port_enable:                    ## @mt7530_port_enable
	.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, %r14d
	movq	(%rdi), %r15
	callq	_dsa_is_user_port
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movq	%r15, %rdi
	callq	_mutex_lock
	movq	_MT7530_CPU_PORT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_BIT
	movl	%eax, %edi
	callq	_PCR_MATRIX
	movq	8(%r15), %rcx
	movslq	%r14d, %rbx
	orl	%eax, 4(%rcx,%rbx,8)
	movl	$1, (%rcx,%rbx,8)
	movl	%r14d, %edi
	callq	_MT7530_PCR_P
	movq	_PCR_MATRIX_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	8(%r15), %rcx
	movl	4(%rcx,%rbx,8), %ecx
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_mt7530_rmw
	movq	%r15, %rdi
	movl	%r14d, %esi
	xorl	%edx, %edx
	callq	_mt7530_port_set_status
	movq	%r15, %rdi
	callq	_mutex_unlock
LBB0_2:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MT7530_CPU_PORT,4,2            ## @MT7530_CPU_PORT
	.comm	_PCR_MATRIX_MASK,4,2            ## @PCR_MATRIX_MASK
	.no_dead_strip	_mt7530_port_enable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mt7530_port_enable
_mt7530_port_enable:                    ; @mt7530_port_enable
	.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	x20, x1
	ldr	x19, [x0]
	bl	_dsa_is_user_port
	cbz	w0, LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_mutex_lock
Lloh0:
	adrp	x8, _MT7530_CPU_PORT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MT7530_CPU_PORT@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_BIT
	bl	_PCR_MATRIX
	ldr	x8, [x19, #8]
	sbfiz	x21, x20, #3, #32
	add	x8, x8, x21
	ldr	w9, [x8, #4]
	orr	w9, w9, w0
	mov	w10, #1
	stp	w10, w9, [x8]
	mov	x0, x20
	bl	_MT7530_PCR_P
	mov	x1, x0
Lloh3:
	adrp	x8, _PCR_MATRIX_MASK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PCR_MATRIX_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	ldr	x8, [x19, #8]
	add	x8, x8, x21
	ldr	w3, [x8, #4]
	mov	x0, x19
	bl	_mt7530_rmw
	mov	x0, x19
	mov	x1, x20
	mov	w2, #0
	bl	_mt7530_port_set_status
	mov	x0, x19
	bl	_mutex_unlock
LBB0_2:
	mov	w0, #0
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_MT7530_CPU_PORT,4,2            ; @MT7530_CPU_PORT
	.comm	_PCR_MATRIX_MASK,4,2            ; @PCR_MATRIX_MASK
	.no_dead_strip	_mt7530_port_enable
.subsections_via_symbols
