	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bstp_set_port_role
_bstp_set_port_role:                    ## @bstp_set_port_role
	.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	(%rdi), %eax
	cmpl	%esi, %eax
	jne	LBB0_1
## %bb.14:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movl	%esi, %ebx
	movq	%rdi, %r14
	movq	72(%rdi), %r15
	addl	$-128, %eax
	cmpl	$4, %eax
	ja	LBB0_8
## %bb.2:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_6:
	leaq	48(%r14), %rdi
	movq	_BSTP_DEFAULT_FORWARD_DELAY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	jmp	LBB0_7
LBB0_3:
	leaq	60(%r14), %rdi
	movl	4(%r14), %esi
LBB0_7:
	callq	_bstp_timer_start
	jmp	LBB0_8
LBB0_4:
	leaq	64(%r14), %rdi
	movl	8(%r14), %esi
	addl	%esi, %esi
	callq	_bstp_timer_start
LBB0_5:
	leaq	60(%r14), %rdi
	movl	12(%r14), %esi
	callq	_bstp_timer_start
	movl	$1, 16(%r14)
	movq	$0, 52(%r14)
LBB0_8:
	movl	%ebx, (%r14)
	movq	$0, 40(%r14)
	movq	$0, (%r15)
	addl	$-128, %ebx
	cmpl	$4, %ebx
	ja	LBB0_13
## %bb.9:
	leaq	LJTI0_1(%rip), %rax
	movslq	(%rax,%rbx,4), %rcx
	addq	%rax, %rcx
	jmpq	*%rcx
LBB0_10:
	movq	32(%r14), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdi
	callq	_DPRINTF
	movq	_BSTP_IFSTATE_DISCARDING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_bstp_set_port_state
	leaq	48(%r14), %rdi
	callq	_bstp_timer_stop
	leaq	60(%r14), %rdi
	callq	_bstp_timer_latch
	movl	$1, 16(%r14)
	movq	$0, 52(%r14)
	jmp	LBB0_13
LBB0_11:
	movq	32(%r14), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdi
	callq	_DPRINTF
	movq	_BSTP_IFSTATE_DISCARDING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_bstp_set_port_state
	leaq	48(%r14), %rdi
	callq	_bstp_timer_latch
	movq	$0, 40(%r14)
	jmp	LBB0_13
LBB0_12:
	movq	32(%r14), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdi
	callq	_DPRINTF
	leaq	24(%r14), %rdi
	movl	8(%r14), %esi
	callq	_bstp_timer_start
	movl	$0, 20(%r14)
LBB0_13:
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_bstp_update_tc                 ## TAILCALL
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_3, LBB0_3-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_5, LBB0_5-LJTI0_0
LJTI0_0:
	.long	L0_0_set_6
	.long	L0_0_set_3
	.long	L0_0_set_8
	.long	L0_0_set_4
	.long	L0_0_set_5
.set L0_1_set_11, LBB0_11-LJTI0_1
.set L0_1_set_10, LBB0_10-LJTI0_1
.set L0_1_set_12, LBB0_12-LJTI0_1
LJTI0_1:
	.long	L0_1_set_11
	.long	L0_1_set_10
	.long	L0_1_set_12
	.long	L0_1_set_10
	.long	L0_1_set_10
	.end_data_region
                                        ## -- End function
	.comm	_BSTP_DEFAULT_FORWARD_DELAY,4,2 ## @BSTP_DEFAULT_FORWARD_DELAY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s role -> ALT/BACK/DISABLED\n"

	.comm	_BSTP_IFSTATE_DISCARDING,4,2    ## @BSTP_IFSTATE_DISCARDING
L_.str.1:                               ## @.str.1
	.asciz	"%s role -> ROOT\n"

L_.str.2:                               ## @.str.2
	.asciz	"%s role -> DESIGNATED\n"

	.no_dead_strip	_bstp_set_port_role
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bstp_set_port_role
_bstp_set_port_role:                    ; @bstp_set_port_role
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	ldr	w8, [x0]
	cmp	w8, w1
	b.ne	LBB0_2
; %bb.1:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_2:
	mov	x20, x1
	mov	x19, x0
	ldr	x21, [x0, #72]
	sub	w8, w8, #128
	cmp	w8, #4
	b.hi	LBB0_9
; %bb.3:
Lloh0:
	adrp	x9, lJTI0_0@PAGE
Lloh1:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_4
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_4:
	add	x0, x19, #48
Lloh2:
	adrp	x8, _BSTP_DEFAULT_FORWARD_DELAY@GOTPAGE
Lloh3:
	ldr	x8, [x8, _BSTP_DEFAULT_FORWARD_DELAY@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	b	LBB0_6
LBB0_5:
	add	x0, x19, #60
	ldr	w1, [x19, #4]
LBB0_6:
	bl	_bstp_timer_start
	b	LBB0_9
LBB0_7:
	add	x0, x19, #64
	ldr	w8, [x19, #8]
	lsl	w1, w8, #1
	bl	_bstp_timer_start
LBB0_8:
	add	x0, x19, #60
	ldr	w1, [x19, #12]
	bl	_bstp_timer_start
	mov	w8, #1
	str	w8, [x19, #16]
	stp	wzr, wzr, [x19, #52]
LBB0_9:
	str	w20, [x19]
	str	xzr, [x19, #40]
	str	xzr, [x21]
	sub	w8, w20, #128
	cmp	w8, #4
	b.hi	LBB0_14
; %bb.10:
Lloh5:
	adrp	x9, lJTI0_1@PAGE
Lloh6:
	add	x9, x9, lJTI0_1@PAGEOFF
	adr	x10, LBB0_11
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_11:
	ldr	x8, [x19, #32]
	ldr	w1, [x8]
Lloh7:
	adrp	x0, l_.str@PAGE
Lloh8:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DPRINTF
Lloh9:
	adrp	x8, _BSTP_IFSTATE_DISCARDING@GOTPAGE
Lloh10:
	ldr	x8, [x8, _BSTP_IFSTATE_DISCARDING@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_bstp_set_port_state
	add	x0, x19, #48
	bl	_bstp_timer_stop
	add	x0, x19, #60
	bl	_bstp_timer_latch
	mov	w8, #1
	str	w8, [x19, #16]
	stp	wzr, wzr, [x19, #52]
	b	LBB0_14
LBB0_12:
	ldr	x8, [x19, #32]
	ldr	w1, [x8]
Lloh12:
	adrp	x0, l_.str.1@PAGE
Lloh13:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DPRINTF
Lloh14:
	adrp	x8, _BSTP_IFSTATE_DISCARDING@GOTPAGE
Lloh15:
	ldr	x8, [x8, _BSTP_IFSTATE_DISCARDING@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_bstp_set_port_state
	add	x0, x19, #48
	bl	_bstp_timer_latch
	str	xzr, [x19, #40]
	b	LBB0_14
LBB0_13:
	ldr	x8, [x19, #32]
	ldr	w1, [x8]
Lloh17:
	adrp	x0, l_.str.2@PAGE
Lloh18:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_DPRINTF
	add	x0, x19, #24
	ldr	w1, [x19, #8]
	bl	_bstp_timer_start
	str	wzr, [x19, #20]
LBB0_14:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_bstp_update_tc
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_4-LBB0_4)>>2
	.byte	(LBB0_5-LBB0_4)>>2
	.byte	(LBB0_9-LBB0_4)>>2
	.byte	(LBB0_7-LBB0_4)>>2
	.byte	(LBB0_8-LBB0_4)>>2
lJTI0_1:
	.byte	(LBB0_12-LBB0_11)>>2
	.byte	(LBB0_11-LBB0_11)>>2
	.byte	(LBB0_13-LBB0_11)>>2
	.byte	(LBB0_11-LBB0_11)>>2
	.byte	(LBB0_11-LBB0_11)>>2
                                        ; -- End function
	.comm	_BSTP_DEFAULT_FORWARD_DELAY,4,2 ; @BSTP_DEFAULT_FORWARD_DELAY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s role -> ALT/BACK/DISABLED\n"

	.comm	_BSTP_IFSTATE_DISCARDING,4,2    ; @BSTP_IFSTATE_DISCARDING
l_.str.1:                               ; @.str.1
	.asciz	"%s role -> ROOT\n"

l_.str.2:                               ; @.str.2
	.asciz	"%s role -> DESIGNATED\n"

	.no_dead_strip	_bstp_set_port_role
.subsections_via_symbols
