	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ar8327_set_mirror_regs
_ar8327_set_mirror_regs:                ## @ar8327_set_mirror_regs
	.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	%rdi, %r14
	movq	_AR8327_REG_FWD_CTRL0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_AR8327_FWD_CTRL0_MIRROR_PORT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_AR8327_FWD_CTRL0_MIRROR_PORT_S@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	$15, %eax
	shll	%cl, %eax
	movl	%eax, %ecx
	callq	_ar8xxx_rmw
	movq	_AR8327_NUM_PORTS@GOTPCREL(%rip), %r15
	movl	(%r15), %ecx
	testl	%ecx, %ecx
	jle	LBB0_3
## %bb.1:
	xorl	%ebx, %ebx
	movq	_AR8327_PORT_LOOKUP_ING_MIRROR_EN@GOTPCREL(%rip), %r12
	movq	_AR8327_PORT_HOL_CTRL1_EG_MIRROR_EN@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edi
	callq	_AR8327_REG_PORT_LOOKUP
	movl	(%r12), %edx
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_ar8xxx_reg_clear
	movl	%ebx, %edi
	callq	_AR8327_REG_PORT_HOL_CTRL1
	movl	(%r13), %edx
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_ar8xxx_reg_clear
	incl	%ebx
	movl	(%r15), %ecx
	cmpl	%ecx, %ebx
	jl	LBB0_2
LBB0_3:
	movl	(%r14), %edx
	cmpl	%ecx, %edx
	jge	LBB0_9
## %bb.4:
	movl	4(%r14), %eax
	cmpl	%ecx, %eax
	jge	LBB0_9
## %bb.5:
	cmpl	%eax, %edx
	je	LBB0_9
## %bb.6:
	movq	_AR8327_REG_FWD_CTRL0@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_AR8327_FWD_CTRL0_MIRROR_PORT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_AR8327_FWD_CTRL0_MIRROR_PORT_S@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
	movq	%r14, %rdi
	movl	%eax, %ecx
	callq	_ar8xxx_rmw
	cmpq	$0, 16(%r14)
	je	LBB0_8
## %bb.7:
	movl	(%r14), %edi
	callq	_AR8327_REG_PORT_LOOKUP
	movq	_AR8327_PORT_LOOKUP_ING_MIRROR_EN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_ar8xxx_reg_set
LBB0_8:
	cmpq	$0, 8(%r14)
	je	LBB0_9
## %bb.10:
	movl	(%r14), %edi
	callq	_AR8327_REG_PORT_HOL_CTRL1
	movq	_AR8327_PORT_HOL_CTRL1_EG_MIRROR_EN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%r14, %rdi
	movl	%eax, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ar8xxx_reg_set                 ## TAILCALL
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AR8327_REG_FWD_CTRL0,4,2       ## @AR8327_REG_FWD_CTRL0
	.comm	_AR8327_FWD_CTRL0_MIRROR_PORT,4,2 ## @AR8327_FWD_CTRL0_MIRROR_PORT
	.comm	_AR8327_FWD_CTRL0_MIRROR_PORT_S,4,2 ## @AR8327_FWD_CTRL0_MIRROR_PORT_S
	.comm	_AR8327_NUM_PORTS,4,2           ## @AR8327_NUM_PORTS
	.comm	_AR8327_PORT_LOOKUP_ING_MIRROR_EN,4,2 ## @AR8327_PORT_LOOKUP_ING_MIRROR_EN
	.comm	_AR8327_PORT_HOL_CTRL1_EG_MIRROR_EN,4,2 ## @AR8327_PORT_HOL_CTRL1_EG_MIRROR_EN
	.no_dead_strip	_ar8327_set_mirror_regs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ar8327_set_mirror_regs
_ar8327_set_mirror_regs:                ; @ar8327_set_mirror_regs
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
Lloh0:
	adrp	x21, _AR8327_REG_FWD_CTRL0@GOTPAGE
Lloh1:
	ldr	x21, [x21, _AR8327_REG_FWD_CTRL0@GOTPAGEOFF]
	ldr	w1, [x21]
Lloh2:
	adrp	x22, _AR8327_FWD_CTRL0_MIRROR_PORT@GOTPAGE
Lloh3:
	ldr	x22, [x22, _AR8327_FWD_CTRL0_MIRROR_PORT@GOTPAGEOFF]
	ldr	w2, [x22]
Lloh4:
	adrp	x23, _AR8327_FWD_CTRL0_MIRROR_PORT_S@GOTPAGE
Lloh5:
	ldr	x23, [x23, _AR8327_FWD_CTRL0_MIRROR_PORT_S@GOTPAGEOFF]
	ldr	w8, [x23]
	mov	w9, #15
	lsl	w3, w9, w8
	bl	_ar8xxx_rmw
Lloh6:
	adrp	x24, _AR8327_NUM_PORTS@GOTPAGE
Lloh7:
	ldr	x24, [x24, _AR8327_NUM_PORTS@GOTPAGEOFF]
	ldr	w8, [x24]
	cmp	w8, #1
	b.lt	LBB0_3
; %bb.1:
	mov	w20, #0
Lloh8:
	adrp	x25, _AR8327_PORT_LOOKUP_ING_MIRROR_EN@GOTPAGE
Lloh9:
	ldr	x25, [x25, _AR8327_PORT_LOOKUP_ING_MIRROR_EN@GOTPAGEOFF]
Lloh10:
	adrp	x26, _AR8327_PORT_HOL_CTRL1_EG_MIRROR_EN@GOTPAGE
Lloh11:
	ldr	x26, [x26, _AR8327_PORT_HOL_CTRL1_EG_MIRROR_EN@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_AR8327_REG_PORT_LOOKUP
	mov	x1, x0
	ldr	w2, [x25]
	mov	x0, x19
	bl	_ar8xxx_reg_clear
	mov	x0, x20
	bl	_AR8327_REG_PORT_HOL_CTRL1
	mov	x1, x0
	ldr	w2, [x26]
	mov	x0, x19
	bl	_ar8xxx_reg_clear
	add	w20, w20, #1
	ldr	w8, [x24]
	cmp	w20, w8
	b.lt	LBB0_2
LBB0_3:
	ldr	w10, [x19]
	cmp	w10, w8
	b.ge	LBB0_9
; %bb.4:
	ldr	w9, [x19, #4]
	cmp	w9, w8
	ccmp	w10, w9, #4, lt
	b.eq	LBB0_9
; %bb.5:
	ldr	w1, [x21]
	ldr	w2, [x22]
	ldr	w8, [x23]
	lsl	w3, w9, w8
	mov	x0, x19
	bl	_ar8xxx_rmw
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_7
; %bb.6:
	ldr	w0, [x19]
	bl	_AR8327_REG_PORT_LOOKUP
	mov	x1, x0
Lloh12:
	adrp	x8, _AR8327_PORT_LOOKUP_ING_MIRROR_EN@GOTPAGE
Lloh13:
	ldr	x8, [x8, _AR8327_PORT_LOOKUP_ING_MIRROR_EN@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_ar8xxx_reg_set
LBB0_7:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_9
; %bb.8:
	ldr	w0, [x19]
	bl	_AR8327_REG_PORT_HOL_CTRL1
	mov	x1, x0
Lloh15:
	adrp	x8, _AR8327_PORT_HOL_CTRL1_EG_MIRROR_EN@GOTPAGE
Lloh16:
	ldr	x8, [x8, _AR8327_PORT_HOL_CTRL1_EG_MIRROR_EN@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_ar8xxx_reg_set
LBB0_9:
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_AR8327_REG_FWD_CTRL0,4,2       ; @AR8327_REG_FWD_CTRL0
	.comm	_AR8327_FWD_CTRL0_MIRROR_PORT,4,2 ; @AR8327_FWD_CTRL0_MIRROR_PORT
	.comm	_AR8327_FWD_CTRL0_MIRROR_PORT_S,4,2 ; @AR8327_FWD_CTRL0_MIRROR_PORT_S
	.comm	_AR8327_NUM_PORTS,4,2           ; @AR8327_NUM_PORTS
	.comm	_AR8327_PORT_LOOKUP_ING_MIRROR_EN,4,2 ; @AR8327_PORT_LOOKUP_ING_MIRROR_EN
	.comm	_AR8327_PORT_HOL_CTRL1_EG_MIRROR_EN,4,2 ; @AR8327_PORT_HOL_CTRL1_EG_MIRROR_EN
	.no_dead_strip	_ar8327_set_mirror_regs
.subsections_via_symbols
