	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ip17xx_set_tag
_ip17xx_set_tag:                        ## @ip17xx_set_tag
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdx, %rbx
	callq	_get_state
	movl	(%rbx), %ecx
	testl	%ecx, %ecx
	js	LBB0_3
## %bb.1:
	movq	_MAX_VLANS@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	jge	LBB0_3
## %bb.2:
	movl	4(%rbx), %edx
	cmpl	$4096, %edx                     ## imm = 0x1000
	jb	LBB0_4
LBB0_3:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_4:
	movq	8(%rax), %rsi
	movl	%edx, (%rsi,%rcx,4)
	movq	(%rax), %rcx
	movq	%rax, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmpq	*(%rcx)                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_VLANS,4,2                  ## @MAX_VLANS
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_ip17xx_set_tag
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ip17xx_set_tag
_ip17xx_set_tag:                        ; @ip17xx_set_tag
	.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, x2
	bl	_get_state
	ldr	w8, [x19]
	tbnz	w8, #31, LBB0_3
; %bb.1:
Lloh0:
	adrp	x9, _MAX_VLANS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MAX_VLANS@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ge	LBB0_3
; %bb.2:
	ldr	w9, [x19, #4]
	cmp	w9, #1, lsl #12                 ; =4096
	b.lo	LBB0_4
LBB0_3:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_4:
	ldp	x11, x10, [x0]
	str	w9, [x10, x8, lsl #2]
	ldr	x1, [x11]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	br	x1
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_VLANS,4,2                  ; @MAX_VLANS
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_ip17xx_set_tag
.subsections_via_symbols
