	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_br_port_carrier_check          ## -- Begin function br_port_carrier_check
	.p2align	4, 0x90
_br_port_carrier_check:                 ## @br_port_carrier_check
	.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
	movq	%rdi, %r15
	movq	16(%rdi), %r14
	movq	24(%rdi), %rbx
	movq	%rbx, %rdi
	callq	_netif_carrier_ok
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	callq	_port_cost
	movl	%eax, 8(%r15)
LBB0_2:
	movl	4(%r14), %edi
	callq	_netif_running
	testq	%rax, %rax
	je	LBB0_9
## %bb.3:
	movq	%r14, %rdi
	callq	_spin_lock_bh
	movq	%rbx, %rdi
	callq	_netif_carrier_ok
	movq	(%r15), %rcx
	movq	_BR_STATE_DISABLED@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	testq	%rax, %rax
	je	LBB0_6
## %bb.4:
	cmpq	%rdx, %rcx
	jne	LBB0_8
## %bb.5:
	movq	%r15, %rdi
	callq	_br_stp_enable_port
	jmp	LBB0_8
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	cmpq	%rdx, %rcx
	je	LBB0_8
## %bb.7:
	movq	%r15, %rdi
	callq	_br_stp_disable_port
LBB0_8:
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_spin_unlock_bh                 ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_BR_STATE_DISABLED,8,3          ## @BR_STATE_DISABLED
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_br_port_carrier_check          ; -- Begin function br_port_carrier_check
	.p2align	2
_br_port_carrier_check:                 ; @br_port_carrier_check
	.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
	mov	x20, x0
	ldp	x19, x21, [x0, #16]
	mov	x0, x21
	bl	_netif_carrier_ok
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x21
	bl	_port_cost
	str	w0, [x20, #8]
LBB0_2:
	ldr	w0, [x19, #4]
	bl	_netif_running
	cbz	x0, LBB0_6
; %bb.3:
	mov	x0, x19
	bl	_spin_lock_bh
	mov	x0, x21
	bl	_netif_carrier_ok
	ldr	x8, [x20]
Lloh0:
	adrp	x9, _BR_STATE_DISABLED@GOTPAGE
Lloh1:
	ldr	x9, [x9, _BR_STATE_DISABLED@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	cbz	x0, LBB0_7
; %bb.4:
	b.ne	LBB0_9
; %bb.5:
	mov	x0, x20
	bl	_br_stp_enable_port
	b	LBB0_9
LBB0_6:
	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_7:
	b.eq	LBB0_9
; %bb.8:
	mov	x0, x20
	bl	_br_stp_disable_port
LBB0_9:
	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	_spin_unlock_bh
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_BR_STATE_DISABLED,8,3          ; @BR_STATE_DISABLED
.subsections_via_symbols
