	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bstp_enable                    ## -- Begin function bstp_enable
	.p2align	4, 0x90
_bstp_enable:                           ## @bstp_enable
	.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, %rbx
	movq	8(%rdi), %r15
	movq	16(%rdi), %r14
	xorl	%edi, %edi
	cmpl	$0, (%rbx)
	sete	%dil
	leaq	L_.str(%rip), %rsi
	callq	_KASSERT
	cmpl	$128, (%r15)
	jne	LBB0_1
## %bb.2:
	movq	%r14, %rdi
	callq	_BSTP_LOCK
	movq	_bp_next@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_LIST_INSERT_HEAD
	movl	$1, (%rbx)
	movq	_BSTP_PORT_NEWINFO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 4(%rbx)
	movq	%r14, %rdi
	callq	_bstp_reinit
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_bstp_update_roles
	movq	%r14, %rdi
	callq	_BSTP_UNLOCK
	xorl	%eax, %eax
	jmp	LBB0_3
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"already a bstp member"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_bp_next,4,2                    ## @bp_next
	.comm	_BSTP_PORT_NEWINFO,4,2          ## @BSTP_PORT_NEWINFO
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bstp_enable                    ; -- Begin function bstp_enable
	.p2align	2
_bstp_enable:                           ; @bstp_enable
	.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	x21, x19, [x0, #8]
	ldr	w8, [x0]
	cmp	w8, #0
	cset	w0, eq
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_KASSERT
	ldr	w8, [x21]
	cmp	w8, #128
	b.ne	LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_BSTP_LOCK
Lloh2:
	adrp	x8, _bp_next@GOTPAGE
Lloh3:
	ldr	x8, [x8, _bp_next@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x20
	bl	_LIST_INSERT_HEAD
	mov	w8, #1
	str	w8, [x20]
Lloh5:
	adrp	x8, _BSTP_PORT_NEWINFO@GOTPAGE
Lloh6:
	ldr	x8, [x8, _BSTP_PORT_NEWINFO@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	ldr	w9, [x20, #4]
	orr	w8, w9, w8
	str	w8, [x20, #4]
	mov	x0, x19
	bl	_bstp_reinit
	mov	x0, x19
	mov	x1, x20
	bl	_bstp_update_roles
	mov	x0, x19
	bl	_BSTP_UNLOCK
	mov	w0, #0
	b	LBB0_3
LBB0_2:
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
LBB0_3:
	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
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"already a bstp member"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_bp_next,4,2                    ; @bp_next
	.comm	_BSTP_PORT_NEWINFO,4,2          ; @BSTP_PORT_NEWINFO
.subsections_via_symbols
