	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gswip_port_vlan_prepare
_gswip_port_vlan_prepare:               ## @gswip_port_vlan_prepare
	.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
	subq	$56, %rsp
	.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	(%rdi), %r12
	callq	_dsa_to_port
	movq	(%rax), %r13
	movq	8(%r12), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_dsa_is_cpu_port
	testl	%eax, %eax
	jne	LBB0_4
## %bb.1:
	testq	%r13, %r13
	jne	LBB0_4
## %bb.2:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rcx
	jmp	LBB0_3
LBB0_4:
	movq	(%r14), %rcx
	xorl	%eax, %eax
	cmpq	8(%r14), %rcx
	jg	LBB0_20
## %bb.5:
	movq	%r14, -80(%rbp)                 ## 8-byte Spill
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	movslq	%ebx, %rax
	leal	1(%rax), %edx
	movl	%edx, -48(%rbp)                 ## 4-byte Spill
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	shlq	$4, %rax
	orq	$8, %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movl	%ebx, %r14d
	movq	%r13, -88(%rbp)                 ## 8-byte Spill
LBB0_6:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_8 Depth 2
                                        ##     Child Loop BB0_14 Depth 2
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	(%r12), %rdi
	callq	_ARRAY_SIZE
	cmpl	%eax, %ebx
	jge	LBB0_12
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movl	-48(%rbp), %r15d                ## 4-byte Reload
	movq	-72(%rbp), %r13                 ## 8-byte Reload
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_8 Depth=2
	incq	%r13
	callq	_ARRAY_SIZE
	cltq
	incl	%r15d
	addq	$16, %rbx
	cmpq	%rax, %r13
	jge	LBB0_12
LBB0_8:                                 ##   Parent Loop BB0_6 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	(%r12), %rdi
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	cmpq	%rax, (%rdi,%rbx)
	jne	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=2
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	cmpq	%rax, -8(%rdi,%rbx)
	jne	LBB0_10
## %bb.11:                              ##   in Loop: Header=BB0_6 Depth=1
	testl	%r15d, %r15d
	jne	LBB0_18
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	(%r12), %rdi
	callq	_ARRAY_SIZE
	cmpl	%eax, %r14d
	jge	LBB0_17
## %bb.13:                              ##   in Loop: Header=BB0_6 Depth=1
	movslq	%r14d, %r15
	incl	%r14d
	movq	%r15, %rbx
	shlq	$4, %rbx
	orq	$8, %rbx
	.p2align	4, 0x90
LBB0_14:                                ##   Parent Loop BB0_6 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	(%r12), %rdi
	cmpq	$0, (%rdi,%rbx)
	je	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=2
	incq	%r15
	callq	_ARRAY_SIZE
	cltq
	incl	%r14d
	addq	$16, %rbx
	cmpq	%rax, %r15
	jl	LBB0_14
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_6 Depth=1
	testl	%r14d, %r14d
	je	LBB0_17
LBB0_18:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	leaq	1(%rdx), %rax
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	cmpq	8(%rcx), %rdx
	movq	%rax, %rcx
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	jl	LBB0_6
## %bb.19:
	xorl	%eax, %eax
	jmp	LBB0_20
LBB0_17:
	movq	_ENOSPC@GOTPCREL(%rip), %rcx
LBB0_3:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_20:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.comm	_ENOSPC,4,2                     ## @ENOSPC
	.no_dead_strip	_gswip_port_vlan_prepare
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gswip_port_vlan_prepare
_gswip_port_vlan_prepare:               ; @gswip_port_vlan_prepare
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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, x2
	mov	x20, x1
	mov	x21, x0
	ldr	x22, [x0]
	bl	_dsa_to_port
	ldr	x23, [x0]
	ldr	x8, [x22, #8]
	ldr	w24, [x8]
	mov	x0, x21
	mov	x1, x20
	bl	_dsa_is_cpu_port
	cbnz	w0, LBB0_3
; %bb.1:
	cbnz	x23, LBB0_3
; %bb.2:
Lloh0:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
	b	LBB0_19
LBB0_3:
	ldp	x20, x8, [x19]
	cmp	x20, x8
	b.le	LBB0_5
; %bb.4:
	mov	w0, #0
	b	LBB0_20
LBB0_5:
	sxtw	x25, w24
	add	w8, w24, #1
	str	w8, [sp, #12]                   ; 4-byte Folded Spill
	lsl	x8, x25, #4
	str	x8, [sp]                        ; 8-byte Folded Spill
	mov	x27, x24
LBB0_6:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_9 Depth 2
                                        ;     Child Loop BB0_14 Depth 2
	ldr	x0, [x22]
	bl	_ARRAY_SIZE
	cmp	w24, w0
	b.ge	LBB0_12
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x26, [sp]                       ; 8-byte Folded Reload
	ldr	w28, [sp, #12]                  ; 4-byte Folded Reload
	mov	x21, x25
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=2
	add	x21, x21, #1
	bl	_ARRAY_SIZE
	add	w28, w28, #1
	add	x26, x26, #16
	cmp	x21, w0, sxtw
	b.ge	LBB0_12
LBB0_9:                                 ;   Parent Loop BB0_6 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x0, [x22]
	add	x8, x0, x26
	ldr	x8, [x8, #8]
	cmp	x8, x23
	b.ne	LBB0_8
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=2
	ldr	x8, [x0, x26]
	cmp	x8, x20
	b.ne	LBB0_8
; %bb.11:                               ;   in Loop: Header=BB0_6 Depth=1
	cbnz	w28, LBB0_17
LBB0_12:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x0, [x22]
	bl	_ARRAY_SIZE
	cmp	w27, w0
	b.ge	LBB0_18
; %bb.13:                               ;   in Loop: Header=BB0_6 Depth=1
	sxtw	x26, w27
	add	w27, w27, #1
	mov	w21, #8
	bfi	x21, x26, #4, #60
LBB0_14:                                ;   Parent Loop BB0_6 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x0, [x22]
	ldr	x8, [x0, x21]
	cbz	x8, LBB0_16
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=2
	add	x26, x26, #1
	bl	_ARRAY_SIZE
	add	w27, w27, #1
	add	x21, x21, #16
	cmp	x26, w0, sxtw
	b.lt	LBB0_14
	b	LBB0_18
LBB0_16:                                ;   in Loop: Header=BB0_6 Depth=1
	cbz	w27, LBB0_18
LBB0_17:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	w0, #0
	add	x8, x20, #1
	ldr	x9, [x19, #8]
	cmp	x20, x9
	mov	x20, x8
	b.lt	LBB0_6
	b	LBB0_20
LBB0_18:
Lloh2:
	adrp	x8, _ENOSPC@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENOSPC@GOTPAGEOFF]
LBB0_19:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_20:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.comm	_ENOSPC,4,2                     ; @ENOSPC
	.no_dead_strip	_gswip_port_vlan_prepare
.subsections_via_symbols
