	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ksz8795_port_mirror_add
_ksz8795_port_mirror_add:               ## @ksz8795_port_mirror_add
	.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
	movq	%rdx, %r14
	movl	%esi, %r15d
	movq	(%rdi), %rbx
	movq	_P_MIRROR_CTRL@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	testl	%ecx, %ecx
	je	LBB0_2
## %bb.1:
	movq	_PORT_MIRROR_RX@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	movl	%r15d, %esi
	movl	$1, %r8d
	callq	_ksz_port_cfg
	movl	%r15d, %edi
	callq	_BIT
	leaq	4(%rbx), %rcx
	jmp	LBB0_3
LBB0_2:
	movq	_PORT_MIRROR_TX@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	movl	%r15d, %esi
	movl	$1, %r8d
	callq	_ksz_port_cfg
	movl	%r15d, %edi
	callq	_BIT
	movq	%rbx, %rcx
LBB0_3:
	orl	%eax, (%rcx)
	movl	(%r12), %edx
	movq	_PORT_MIRROR_SNIFFER@GOTPCREL(%rip), %r13
	movl	(%r13), %ecx
	movq	%rbx, %rdi
	movl	%r15d, %esi
	xorl	%r8d, %r8d
	callq	_ksz_port_cfg
	cmpl	$0, 4(%rbx)
	jne	LBB0_5
## %bb.4:
	cmpl	$0, (%rbx)
	je	LBB0_6
LBB0_5:
	movl	(%r14), %esi
	movl	(%r12), %edx
	movl	(%r13), %ecx
	movq	%rbx, %rdi
	movl	$1, %r8d
	callq	_ksz_port_cfg
LBB0_6:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_P_MIRROR_CTRL,4,2              ## @P_MIRROR_CTRL
	.comm	_PORT_MIRROR_RX,4,2             ## @PORT_MIRROR_RX
	.comm	_PORT_MIRROR_TX,4,2             ## @PORT_MIRROR_TX
	.comm	_PORT_MIRROR_SNIFFER,4,2        ## @PORT_MIRROR_SNIFFER
	.no_dead_strip	_ksz8795_port_mirror_add
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ksz8795_port_mirror_add
_ksz8795_port_mirror_add:               ; @ksz8795_port_mirror_add
	.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	x20, x2
	mov	x21, x1
	ldr	x19, [x0]
Lloh0:
	adrp	x22, _P_MIRROR_CTRL@GOTPAGE
Lloh1:
	ldr	x22, [x22, _P_MIRROR_CTRL@GOTPAGEOFF]
	ldr	w2, [x22]
	cbz	w3, LBB0_2
; %bb.1:
Lloh2:
	adrp	x8, _PORT_MIRROR_RX@GOTPAGE
Lloh3:
	ldr	x8, [x8, _PORT_MIRROR_RX@GOTPAGEOFF]
Lloh4:
	ldr	w3, [x8]
	mov	x0, x19
	mov	x1, x21
	mov	w4, #1
	bl	_ksz_port_cfg
	mov	x0, x21
	bl	_BIT
	add	x8, x19, #4
	b	LBB0_3
LBB0_2:
Lloh5:
	adrp	x8, _PORT_MIRROR_TX@GOTPAGE
Lloh6:
	ldr	x8, [x8, _PORT_MIRROR_TX@GOTPAGEOFF]
Lloh7:
	ldr	w3, [x8]
	mov	x0, x19
	mov	x1, x21
	mov	w4, #1
	bl	_ksz_port_cfg
	mov	x0, x21
	bl	_BIT
	mov	x8, x19
LBB0_3:
	ldr	w9, [x8]
	orr	w9, w9, w0
	str	w9, [x8]
	ldr	w2, [x22]
Lloh8:
	adrp	x23, _PORT_MIRROR_SNIFFER@GOTPAGE
Lloh9:
	ldr	x23, [x23, _PORT_MIRROR_SNIFFER@GOTPAGEOFF]
	ldr	w3, [x23]
	mov	x0, x19
	mov	x1, x21
	mov	w4, #0
	bl	_ksz_port_cfg
	ldr	w8, [x19, #4]
	cbnz	w8, LBB0_5
; %bb.4:
	ldr	w8, [x19]
	cbz	w8, LBB0_6
LBB0_5:
	ldr	w1, [x20]
	ldr	w2, [x22]
	ldr	w3, [x23]
	mov	x0, x19
	mov	w4, #1
	bl	_ksz_port_cfg
LBB0_6:
	mov	w0, #0
	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
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_P_MIRROR_CTRL,4,2              ; @P_MIRROR_CTRL
	.comm	_PORT_MIRROR_RX,4,2             ; @PORT_MIRROR_RX
	.comm	_PORT_MIRROR_TX,4,2             ; @PORT_MIRROR_TX
	.comm	_PORT_MIRROR_SNIFFER,4,2        ; @PORT_MIRROR_SNIFFER
	.no_dead_strip	_ksz8795_port_mirror_add
.subsections_via_symbols
