	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bstp_ifupdstatus
_bstp_ifupdstatus:                      ## @bstp_ifupdstatus
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpl	$0, 48(%rdi)
	je	LBB0_22
## %bb.1:
	movq	%rdi, %r15
	movq	56(%rdi), %r13
	movq	64(%rdi), %r14
	leaq	-48(%rbp), %r12
	movq	%r12, %rdi
	movl	$8, %esi
	callq	_bzero
	movq	_SIOCGIFMEDIA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	movl	%r12d, %edx
	callq	*(%r13)
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_BSTP_LOCK
	testl	%ebx, %ebx
	je	LBB0_2
LBB0_17:
	movq	40(%r15), %rax
	movq	_BSTP_INFO_DISABLED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_21
## %bb.18:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_bstp_disable_port
LBB0_20:
	movq	%r14, %rdi
	callq	_bstp_assign_roles
LBB0_21:
	movq	%r14, %rdi
	callq	_BSTP_UNLOCK
LBB0_22:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	_IFF_UP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 8(%r13)
	je	LBB0_17
## %bb.3:
	movq	_IFM_ACTIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, -48(%rbp)
	je	LBB0_13
## %bb.4:
	movl	(%r15), %eax
	movq	_BSTP_PORT_AUTOPTP@GOTPCREL(%rip), %rcx
	xorl	%r12d, %r12d
	testl	%eax, (%rcx)
	je	LBB0_7
## %bb.5:
	movq	_IFM_FDX@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	xorl	%ecx, %ecx
	testl	%edx, -44(%rbp)
	setne	%cl
	cmpl	%ecx, 4(%r15)
	je	LBB0_7
## %bb.6:
	movl	%ecx, 4(%r15)
	movl	$1, %r12d
LBB0_7:
	movq	_BSTP_PORT_PNDCOST@GOTPCREL(%rip), %rbx
	testl	%eax, (%rbx)
	je	LBB0_11
## %bb.8:
	movq	%r15, %rdi
	callq	_bstp_calc_path_cost
	cmpq	%rax, 8(%r15)
	je	LBB0_10
## %bb.9:
	movq	%rax, 8(%r15)
	movl	$1, %r12d
LBB0_10:
	movl	(%rbx), %eax
	notl	%eax
	andl	%eax, (%r15)
LBB0_11:
	movq	16(%r15), %rax
	movq	_BSTP_ROLE_DISABLED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_19
## %bb.12:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_bstp_enable_port
	jmp	LBB0_20
LBB0_13:
	movq	16(%r15), %rax
	movq	_BSTP_ROLE_DISABLED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_21
## %bb.14:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_bstp_disable_port
	movq	_BSTP_PORT_ADMEDGE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r15)
	je	LBB0_20
## %bb.15:
	movq	24(%r15), %rax
	movq	_BSTP_PROTO_RSTP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_20
## %bb.16:
	movl	$1, 32(%r15)
	jmp	LBB0_20
LBB0_19:
	testl	%r12d, %r12d
	jne	LBB0_20
	jmp	LBB0_21
	.cfi_endproc
                                        ## -- End function
	.comm	_SIOCGIFMEDIA,4,2               ## @SIOCGIFMEDIA
	.comm	_IFF_UP,4,2                     ## @IFF_UP
	.comm	_IFM_ACTIVE,4,2                 ## @IFM_ACTIVE
	.comm	_BSTP_PORT_AUTOPTP,4,2          ## @BSTP_PORT_AUTOPTP
	.comm	_IFM_FDX,4,2                    ## @IFM_FDX
	.comm	_BSTP_PORT_PNDCOST,4,2          ## @BSTP_PORT_PNDCOST
	.comm	_BSTP_ROLE_DISABLED,8,3         ## @BSTP_ROLE_DISABLED
	.comm	_BSTP_PORT_ADMEDGE,4,2          ## @BSTP_PORT_ADMEDGE
	.comm	_BSTP_PROTO_RSTP,8,3            ## @BSTP_PROTO_RSTP
	.comm	_BSTP_INFO_DISABLED,8,3         ## @BSTP_INFO_DISABLED
	.no_dead_strip	_bstp_ifupdstatus
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bstp_ifupdstatus
_bstp_ifupdstatus:                      ; @bstp_ifupdstatus
	.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
	ldr	w8, [x0, #48]
	cbz	w8, LBB0_6
; %bb.1:
	mov	x20, x0
	ldp	x21, x19, [x0, #56]
	add	x0, sp, #8
	mov	w1, #8
	bl	_bzero
	ldr	x8, [x21]
Lloh0:
	adrp	x9, _SIOCGIFMEDIA@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SIOCGIFMEDIA@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x9]
	add	x2, sp, #8
	mov	x0, x21
	blr	x8
	mov	x22, x0
	mov	x0, x19
	bl	_BSTP_LOCK
	cbz	w22, LBB0_7
LBB0_2:
	ldr	x8, [x20, #40]
Lloh3:
	adrp	x9, _BSTP_INFO_DISABLED@GOTPAGE
Lloh4:
	ldr	x9, [x9, _BSTP_INFO_DISABLED@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_5
; %bb.3:
	mov	x0, x19
	mov	x1, x20
	bl	_bstp_disable_port
LBB0_4:
	mov	x0, x19
	bl	_bstp_assign_roles
LBB0_5:
	mov	x0, x19
	bl	_BSTP_UNLOCK
LBB0_6:
	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
LBB0_7:
	ldr	w8, [x21, #8]
Lloh6:
	adrp	x9, _IFF_UP@GOTPAGE
Lloh7:
	ldr	x9, [x9, _IFF_UP@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.8:
	ldr	w8, [sp, #8]
Lloh9:
	adrp	x9, _IFM_ACTIVE@GOTPAGE
Lloh10:
	ldr	x9, [x9, _IFM_ACTIVE@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_12
; %bb.9:
	ldr	w8, [x20]
Lloh12:
	adrp	x9, _BSTP_PORT_AUTOPTP@GOTPAGE
Lloh13:
	ldr	x9, [x9, _BSTP_PORT_AUTOPTP@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_11
; %bb.10:
Lloh15:
	adrp	x9, _IFM_FDX@GOTPAGE
Lloh16:
	ldr	x9, [x9, _IFM_FDX@GOTPAGEOFF]
	ldr	w10, [sp, #12]
Lloh17:
	ldr	w9, [x9]
	tst	w9, w10
	cset	w9, ne
	ldr	w10, [x20, #4]
	cmp	w10, w9
	b.ne	LBB0_16
LBB0_11:
	mov	w21, #0
	b	LBB0_17
LBB0_12:
	ldr	x8, [x20, #16]
Lloh18:
	adrp	x9, _BSTP_ROLE_DISABLED@GOTPAGE
Lloh19:
	ldr	x9, [x9, _BSTP_ROLE_DISABLED@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_5
; %bb.13:
	mov	x0, x19
	mov	x1, x20
	bl	_bstp_disable_port
	ldr	w8, [x20]
Lloh21:
	adrp	x9, _BSTP_PORT_ADMEDGE@GOTPAGE
Lloh22:
	ldr	x9, [x9, _BSTP_PORT_ADMEDGE@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.14:
	ldr	x8, [x20, #24]
Lloh24:
	adrp	x9, _BSTP_PROTO_RSTP@GOTPAGE
Lloh25:
	ldr	x9, [x9, _BSTP_PROTO_RSTP@GOTPAGEOFF]
Lloh26:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.15:
	mov	w8, #1
	str	w8, [x20, #32]
	b	LBB0_4
LBB0_16:
	str	w9, [x20, #4]
	mov	w21, #1
LBB0_17:
Lloh27:
	adrp	x22, _BSTP_PORT_PNDCOST@GOTPAGE
Lloh28:
	ldr	x22, [x22, _BSTP_PORT_PNDCOST@GOTPAGEOFF]
	ldr	w9, [x22]
	tst	w9, w8
	b.eq	LBB0_21
; %bb.18:
	mov	x0, x20
	bl	_bstp_calc_path_cost
	ldr	x8, [x20, #8]
	cmp	x8, x0
	b.eq	LBB0_20
; %bb.19:
	str	x0, [x20, #8]
	mov	w21, #1
LBB0_20:
	ldr	w8, [x22]
	ldr	w9, [x20]
	bic	w8, w9, w8
	str	w8, [x20]
LBB0_21:
	ldr	x8, [x20, #16]
Lloh29:
	adrp	x9, _BSTP_ROLE_DISABLED@GOTPAGE
Lloh30:
	ldr	x9, [x9, _BSTP_ROLE_DISABLED@GOTPAGEOFF]
Lloh31:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_23
; %bb.22:
	mov	x0, x19
	mov	x1, x20
	bl	_bstp_enable_port
	b	LBB0_4
LBB0_23:
	cbnz	w21, LBB0_4
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.comm	_SIOCGIFMEDIA,4,2               ; @SIOCGIFMEDIA
	.comm	_IFF_UP,4,2                     ; @IFF_UP
	.comm	_IFM_ACTIVE,4,2                 ; @IFM_ACTIVE
	.comm	_BSTP_PORT_AUTOPTP,4,2          ; @BSTP_PORT_AUTOPTP
	.comm	_IFM_FDX,4,2                    ; @IFM_FDX
	.comm	_BSTP_PORT_PNDCOST,4,2          ; @BSTP_PORT_PNDCOST
	.comm	_BSTP_ROLE_DISABLED,8,3         ; @BSTP_ROLE_DISABLED
	.comm	_BSTP_PORT_ADMEDGE,4,2          ; @BSTP_PORT_ADMEDGE
	.comm	_BSTP_PROTO_RSTP,8,3            ; @BSTP_PROTO_RSTP
	.comm	_BSTP_INFO_DISABLED,8,3         ; @BSTP_INFO_DISABLED
	.no_dead_strip	_bstp_ifupdstatus
.subsections_via_symbols
