	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function carp_sc_state
_carp_sc_state:                         ## @carp_sc_state
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	callq	_CARP_LOCK_ASSERT
	movq	16(%rbx), %rax
	movq	(%rax), %rcx
	movq	_LINK_STATE_UP@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_3
## %bb.1:
	movq	_IFF_UP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, 8(%rax)
	je	LBB0_3
## %bb.2:
	movq	_V_carp_allow@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_3
## %bb.6:
	movq	_INIT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdx
	movq	%rbx, %rdi
	callq	_carp_set_state
	xorl	%r14d, %r14d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_carp_setrun
	cmpl	$0, (%rbx)
	je	LBB0_8
## %bb.7:
	movq	_V_carp_ifdown_adj@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
	leaq	L_.str.3(%rip), %rsi
	movl	%r14d, %edi
	callq	_carp_demote_adj
LBB0_8:
	movl	$0, (%rbx)
	jmp	LBB0_9
LBB0_3:
	leaq	12(%rbx), %rdi
	callq	_callout_stop
	movq	_INIT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%rbx, %rdi
	callq	_carp_set_state
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_carp_setrun
	cmpl	$0, (%rbx)
	jne	LBB0_5
## %bb.4:
	movq	_V_carp_ifdown_adj@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_carp_demote_adj
LBB0_5:
	movl	$1, (%rbx)
LBB0_9:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LINK_STATE_UP,8,3              ## @LINK_STATE_UP
	.comm	_IFF_UP,4,2                     ## @IFF_UP
	.comm	_V_carp_allow,4,2               ## @V_carp_allow
	.comm	_INIT,4,2                       ## @INIT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"hardware interface down"

	.comm	_V_carp_ifdown_adj,4,2          ## @V_carp_ifdown_adj
L_.str.1:                               ## @.str.1
	.asciz	"interface down"

L_.str.2:                               ## @.str.2
	.asciz	"hardware interface up"

L_.str.3:                               ## @.str.3
	.asciz	"interface up"

	.no_dead_strip	_carp_sc_state
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function carp_sc_state
_carp_sc_state:                         ; @carp_sc_state
	.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, x0
	bl	_CARP_LOCK_ASSERT
	ldr	x8, [x19, #16]
	ldr	x9, [x8]
Lloh0:
	adrp	x10, _LINK_STATE_UP@GOTPAGE
Lloh1:
	ldr	x10, [x10, _LINK_STATE_UP@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_2
; %bb.1:
	ldr	w8, [x8, #8]
Lloh3:
	adrp	x9, _IFF_UP@GOTPAGE
Lloh4:
	ldr	x9, [x9, _IFF_UP@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	and	w8, w9, w8
Lloh6:
	adrp	x9, _V_carp_allow@GOTPAGE
Lloh7:
	ldr	x9, [x9, _V_carp_allow@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	cmp	w8, #0
	ccmp	w9, #0, #4, ne
	b.ne	LBB0_5
LBB0_2:
	add	x0, x19, #12
	bl	_callout_stop
Lloh9:
	adrp	x8, _INIT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _INIT@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
Lloh12:
	adrp	x2, l_.str@PAGE
Lloh13:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_carp_set_state
	mov	x0, x19
	mov	w1, #0
	bl	_carp_setrun
	ldr	w8, [x19]
	cbnz	w8, LBB0_4
; %bb.3:
Lloh14:
	adrp	x8, _V_carp_ifdown_adj@GOTPAGE
Lloh15:
	ldr	x8, [x8, _V_carp_ifdown_adj@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
Lloh17:
	adrp	x1, l_.str.1@PAGE
Lloh18:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_carp_demote_adj
LBB0_4:
	mov	w8, #1
	str	w8, [x19]
	b	LBB0_8
LBB0_5:
Lloh19:
	adrp	x8, _INIT@GOTPAGE
Lloh20:
	ldr	x8, [x8, _INIT@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
Lloh22:
	adrp	x2, l_.str.2@PAGE
Lloh23:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_carp_set_state
	mov	x0, x19
	mov	w1, #0
	bl	_carp_setrun
	ldr	w8, [x19]
	cbz	w8, LBB0_7
; %bb.6:
Lloh24:
	adrp	x8, _V_carp_ifdown_adj@GOTPAGE
Lloh25:
	ldr	x8, [x8, _V_carp_ifdown_adj@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	neg	w0, w8
Lloh27:
	adrp	x1, l_.str.3@PAGE
Lloh28:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_carp_demote_adj
LBB0_7:
	str	wzr, [x19]
LBB0_8:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_LINK_STATE_UP,8,3              ; @LINK_STATE_UP
	.comm	_IFF_UP,4,2                     ; @IFF_UP
	.comm	_V_carp_allow,4,2               ; @V_carp_allow
	.comm	_INIT,4,2                       ; @INIT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"hardware interface down"

	.comm	_V_carp_ifdown_adj,4,2          ; @V_carp_ifdown_adj
l_.str.1:                               ; @.str.1
	.asciz	"interface down"

l_.str.2:                               ; @.str.2
	.asciz	"hardware interface up"

l_.str.3:                               ; @.str.3
	.asciz	"interface up"

	.no_dead_strip	_carp_sc_state
.subsections_via_symbols
