	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ar8xxx_sw_set_ports
_ar8xxx_sw_set_ports:                   ## @ar8xxx_sw_set_ports
	.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
	movq	%rsi, %r14
	callq	_swdev_to_ar8xxx
	movq	(%rax), %r11
	movq	(%r14), %r8
	movl	$0, (%r11,%r8,4)
	cmpl	$0, 8(%r14)
	jle	LBB0_11
## %bb.1:
	movq	16(%r14), %r15
	xorl	%esi, %esi
	movq	_SWITCH_PORT_FLAG_TAGGED@GOTPCREL(%rip), %r9
	movq	_AR8X16_MAX_VLANS@GOTPCREL(%rip), %r10
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_2 Depth=1
	orl	%edx, 8(%rax)
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=1
	orl	%edx, (%r11,%r8,4)
	incq	%rsi
	movslq	8(%r14), %rcx
	cmpq	%rcx, %rsi
	jge	LBB0_11
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_6 Depth 2
	movl	(%r15,%rsi,8), %ebx
	movl	(%r9), %edi
	movslq	4(%r15,%rsi,8), %rcx
	movl	$1, %edx
	shll	%cl, %edx
	btl	%edi, %ebx
	jb	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%edx, %edi
	notl	%edi
	andl	%edi, 8(%rax)
	movq	(%r14), %rdi
	movq	16(%rax), %rbx
	movq	%rdi, (%rbx,%rcx,8)
	movl	(%r10), %ecx
	testl	%ecx, %ecx
	jle	LBB0_10
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r14), %rbx
	xorl	%edx, %edx
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_6 Depth=2
	incq	%rdx
	movslq	%ecx, %rdi
	cmpq	%rdi, %rdx
	jge	LBB0_9
LBB0_6:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpq	%rdx, %rbx
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=2
	movzbl	4(%r15,%rsi,8), %ecx
	movl	$-2, %edi
	roll	%cl, %edi
	andl	%edi, (%r11,%rdx,4)
	movl	(%r10), %ecx
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	movb	4(%r15,%rsi,8), %cl
	movl	$1, %edx
	shll	%cl, %edx
	jmp	LBB0_10
LBB0_11:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SWITCH_PORT_FLAG_TAGGED,4,2    ## @SWITCH_PORT_FLAG_TAGGED
	.comm	_AR8X16_MAX_VLANS,4,2           ## @AR8X16_MAX_VLANS
	.no_dead_strip	_ar8xxx_sw_set_ports
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ar8xxx_sw_set_ports
_ar8xxx_sw_set_ports:                   ; @ar8xxx_sw_set_ports
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
	bl	_swdev_to_ar8xxx
	ldr	x8, [x0]
	ldr	x13, [x19]
	str	wzr, [x8, x13, lsl #2]
	ldr	w9, [x19, #8]
	cmp	w9, #1
	b.lt	LBB0_11
; %bb.1:
	mov	x9, #0
	ldr	x10, [x19, #16]
Lloh0:
	adrp	x11, _SWITCH_PORT_FLAG_TAGGED@GOTPAGE
Lloh1:
	ldr	x11, [x11, _SWITCH_PORT_FLAG_TAGGED@GOTPAGEOFF]
	mov	w12, #1
	lsl	x13, x13, #2
Lloh2:
	adrp	x14, _AR8X16_MAX_VLANS@GOTPAGE
Lloh3:
	ldr	x14, [x14, _AR8X16_MAX_VLANS@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w15, [x0, #8]
	orr	w15, w15, w16
	str	w15, [x0, #8]
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w15, [x8, x13]
	orr	w15, w15, w16
	str	w15, [x8, x13]
	add	x9, x9, #1
	ldrsw	x15, [x19, #8]
	cmp	x9, x15
	b.ge	LBB0_11
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_8 Depth 2
	lsl	x15, x9, #3
	ldr	w1, [x10, x15]
	add	x15, x10, x15
	ldr	w2, [x11]
	ldr	w17, [x15, #4]!
	lsl	w16, w12, w17
	lsr	w1, w1, w2
	tbnz	w1, #0, LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	sxtw	x17, w17
	ldr	w1, [x0, #8]
	bic	w1, w1, w16
	str	w1, [x0, #8]
	ldr	x1, [x19]
	ldr	x2, [x0, #16]
	str	x1, [x2, x17, lsl #3]
	ldr	w1, [x14]
	cmp	w1, #1
	b.lt	LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x16, #0
	ldr	x17, [x19]
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=2
	add	x16, x16, #1
	cmp	x16, w1, sxtw
	b.ge	LBB0_10
LBB0_8:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	cmp	x17, x16
	b.eq	LBB0_7
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=2
	ldr	w1, [x15]
	lsl	w1, w12, w1
	lsl	x2, x16, #2
	ldr	w3, [x8, x2]
	bic	w1, w3, w1
	str	w1, [x8, x2]
	ldr	w1, [x14]
	b	LBB0_7
LBB0_10:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w15, [x15]
	lsl	w16, w12, w15
	b	LBB0_3
LBB0_11:
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_SWITCH_PORT_FLAG_TAGGED,4,2    ; @SWITCH_PORT_FLAG_TAGGED
	.comm	_AR8X16_MAX_VLANS,4,2           ; @AR8X16_MAX_VLANS
	.no_dead_strip	_ar8xxx_sw_set_ports
.subsections_via_symbols
