	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function set_port_vid
_set_port_vid:                          ## @set_port_vid
	.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
	movl	$-1, %ebx
	cmpl	$2, %esi
	jl	LBB0_8
## %bb.1:
	movq	%rdi, %r15
	movq	8(%rdx), %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_strtol
	movl	%eax, %r14d
	movq	_IEEE802DOT1Q_VID_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	testl	%r14d, %r14d
	js	LBB0_3
## %bb.2:
	cmpl	%edx, %r14d
	jle	LBB0_4
LBB0_3:
	movq	_EX_USAGE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_errx
LBB0_4:
	leaq	-32(%rbp), %rbx
	movq	%rbx, %rdi
	movl	$8, %esi
	callq	_bzero
	movl	4(%r15), %eax
	movl	%eax, -28(%rbp)
	movl	(%r15), %edi
	movq	_IOETHERSWITCHGETPORT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdx
	callq	_ioctl
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	_EX_OSERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_err
LBB0_6:
	movl	%r14d, -32(%rbp)
	movl	(%r15), %edi
	movq	_IOETHERSWITCHSETPORT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-32(%rbp), %rdx
	callq	_ioctl
	xorl	%ebx, %ebx
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movq	_EX_OSERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_err
LBB0_8:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IEEE802DOT1Q_VID_MAX,4,2       ## @IEEE802DOT1Q_VID_MAX
	.comm	_EX_USAGE,4,2                   ## @EX_USAGE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"pvid must be between 0 and %d"

	.comm	_IOETHERSWITCHGETPORT,4,2       ## @IOETHERSWITCHGETPORT
	.comm	_EX_OSERR,4,2                   ## @EX_OSERR
L_.str.1:                               ## @.str.1
	.asciz	"ioctl(IOETHERSWITCHGETPORT)"

	.comm	_IOETHERSWITCHSETPORT,4,2       ## @IOETHERSWITCHSETPORT
L_.str.2:                               ## @.str.2
	.asciz	"ioctl(IOETHERSWITCHSETPORT)"

	.no_dead_strip	_set_port_vid
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function set_port_vid
_set_port_vid:                          ; @set_port_vid
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	cmp	w1, #2
	b.ge	LBB0_2
; %bb.1:
	mov	w0, #-1
	b	LBB0_9
LBB0_2:
	mov	x19, x0
	ldr	x0, [x2, #8]
	mov	x1, #0
	mov	w2, #0
	bl	_strtol
	mov	x20, x0
Lloh0:
	adrp	x8, _IEEE802DOT1Q_VID_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IEEE802DOT1Q_VID_MAX@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	tbnz	w0, #31, LBB0_4
; %bb.3:
	cmp	w20, w2
	b.le	LBB0_5
LBB0_4:
Lloh3:
	adrp	x8, _EX_USAGE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EX_USAGE@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_errx
LBB0_5:
	add	x0, sp, #8
	mov	w1, #8
	bl	_bzero
	ldp	w0, w8, [x19]
	str	w8, [sp, #12]
Lloh8:
	adrp	x8, _IOETHERSWITCHGETPORT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _IOETHERSWITCHGETPORT@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	add	x2, sp, #8
	bl	_ioctl
Lloh11:
	adrp	x21, _EX_OSERR@GOTPAGE
Lloh12:
	ldr	x21, [x21, _EX_OSERR@GOTPAGEOFF]
	cbz	x0, LBB0_7
; %bb.6:
	ldr	w0, [x21]
Lloh13:
	adrp	x1, l_.str.1@PAGE
Lloh14:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_err
LBB0_7:
	str	w20, [sp, #8]
	ldr	w0, [x19]
Lloh15:
	adrp	x8, _IOETHERSWITCHSETPORT@GOTPAGE
Lloh16:
	ldr	x8, [x8, _IOETHERSWITCHSETPORT@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	add	x2, sp, #8
	bl	_ioctl
	cbz	x0, LBB0_9
; %bb.8:
	ldr	w0, [x21]
Lloh18:
	adrp	x1, l_.str.2@PAGE
Lloh19:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_err
	mov	w0, #0
LBB0_9:
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_IEEE802DOT1Q_VID_MAX,4,2       ; @IEEE802DOT1Q_VID_MAX
	.comm	_EX_USAGE,4,2                   ; @EX_USAGE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"pvid must be between 0 and %d"

	.comm	_IOETHERSWITCHGETPORT,4,2       ; @IOETHERSWITCHGETPORT
	.comm	_EX_OSERR,4,2                   ; @EX_OSERR
l_.str.1:                               ; @.str.1
	.asciz	"ioctl(IOETHERSWITCHGETPORT)"

	.comm	_IOETHERSWITCHSETPORT,4,2       ; @IOETHERSWITCHSETPORT
l_.str.2:                               ; @.str.2
	.asciz	"ioctl(IOETHERSWITCHSETPORT)"

	.no_dead_strip	_set_port_vid
.subsections_via_symbols
