	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bt_sock_register               ## -- Begin function bt_sock_register
	.p2align	4, 0x90
_bt_sock_register:                      ## @bt_sock_register
	.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
	testl	%edi, %edi
	js	LBB0_2
## %bb.1:
	movl	%edi, %ebx
	movq	_BT_MAX_PROTO@GOTPCREL(%rip), %rax
	cmpl	%edi, (%rax)
	jle	LBB0_2
## %bb.3:
	movq	%rsi, %r14
	movq	_bt_proto_lock@GOTPCREL(%rip), %rdi
	callq	_write_lock
	movq	_bt_proto@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	%ebx, %ecx
	cmpq	$0, (%rax,%rcx,8)
	je	LBB0_5
## %bb.4:
	movq	_EEXIST@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_6
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_7
LBB0_5:
	movq	%r14, (%rax,%rcx,8)
	xorl	%ebx, %ebx
LBB0_6:
	movq	_bt_proto_lock@GOTPCREL(%rip), %rdi
	callq	_write_unlock
LBB0_7:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BT_MAX_PROTO,4,2               ## @BT_MAX_PROTO
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_bt_proto_lock,4,2              ## @bt_proto_lock
	.comm	_bt_proto,8,3                   ## @bt_proto
	.comm	_EEXIST,4,2                     ## @EEXIST
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bt_sock_register               ; -- Begin function bt_sock_register
	.p2align	2
_bt_sock_register:                      ; @bt_sock_register
	.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
	tbnz	w0, #31, LBB0_4
; %bb.1:
	mov	x21, x0
Lloh0:
	adrp	x8, _BT_MAX_PROTO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BT_MAX_PROTO@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w0
	b.le	LBB0_4
; %bb.2:
	mov	x20, x1
Lloh3:
	adrp	x0, _bt_proto_lock@GOTPAGE
Lloh4:
	ldr	x0, [x0, _bt_proto_lock@GOTPAGEOFF]
	bl	_write_lock
Lloh5:
	adrp	x8, _bt_proto@GOTPAGE
Lloh6:
	ldr	x8, [x8, _bt_proto@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	ldr	x9, [x8, w21, uxtw #3]
	cbz	x9, LBB0_5
; %bb.3:
Lloh8:
	adrp	x8, _EEXIST@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EEXIST@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w19, w8
	b	LBB0_6
LBB0_4:
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w19, w8
	b	LBB0_7
LBB0_5:
	mov	w19, #0
	mov	w9, w21
	str	x20, [x8, x9, lsl #3]
LBB0_6:
Lloh14:
	adrp	x0, _bt_proto_lock@GOTPAGE
Lloh15:
	ldr	x0, [x0, _bt_proto_lock@GOTPAGEOFF]
	bl	_write_unlock
LBB0_7:
	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
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_BT_MAX_PROTO,4,2               ; @BT_MAX_PROTO
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_bt_proto_lock,4,2              ; @bt_proto_lock
	.comm	_bt_proto,8,3                   ; @bt_proto
	.comm	_EEXIST,4,2                     ; @EEXIST
.subsections_via_symbols
