	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_server_init                    ## -- Begin function server_init
	.p2align	4, 0x90
_server_init:                           ## @server_init
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	xorl	%edi, %edi
	testq	%rbx, %rbx
	setne	%dil
	callq	_assert
	movq	$-1, (%rbx)
	leaq	16(%rbx), %r14
	movq	%r14, %rdi
	callq	_FD_ZERO
	leaq	28(%rbx), %rdi
	callq	_FD_ZERO
	leaq	24(%rbx), %rdi
	callq	_LIST_INIT
	movq	_O_RDWR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdi
	callq	_open
	movl	%eax, 8(%rbx)
	testl	%eax, %eax
	js	LBB0_8
## %bb.1:
	movq	_PF_BLUETOOTH@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	movq	_SOCK_SEQPACKET@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	_BLUETOOTH_PROTO_L2CAP@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	callq	_socket
	movl	%eax, (%rbx)
	testl	%eax, %eax
	js	LBB0_9
## %bb.2:
	movl	$40, -80(%rbp)
	movq	_AF_BLUETOOTH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)
	leaq	-52(%rbp), %rdi
	leaq	20(%rbx), %rsi
	movl	$4, %edx
	callq	_memcpy
	movl	$17, %edi
	callq	_htole16
	movq	%rax, -72(%rbp)
	movq	_BDADDR_BREDR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -56(%rbp)
	movq	$0, -64(%rbp)
	movl	(%rbx), %edi
	leaq	-80(%rbp), %rsi
	movl	$40, %edx
	callq	_bind
	testq	%rax, %rax
	js	LBB0_10
## %bb.3:
	movl	(%rbx), %edi
	movl	$10, %esi
	callq	_listen
	testq	%rax, %rax
	js	LBB0_11
## %bb.4:
	movl	(%r15), %edi
	movl	(%r12), %esi
	movl	(%r13), %edx
	callq	_socket
	movl	%eax, 4(%rbx)
	testl	%eax, %eax
	js	LBB0_12
## %bb.5:
	movl	$19, %edi
	callq	_htole16
	movq	%rax, -72(%rbp)
	movl	4(%rbx), %edi
	leaq	-80(%rbp), %rsi
	movl	$40, %edx
	callq	_bind
	testq	%rax, %rax
	js	LBB0_18
## %bb.6:
	movl	4(%rbx), %edi
	movl	$10, %esi
	callq	_listen
	testq	%rax, %rax
	js	LBB0_19
## %bb.7:
	movl	(%rbx), %edi
	movq	%r14, %rsi
	callq	_FD_SET
	movl	4(%rbx), %edi
	movq	%r14, %rsi
	callq	_FD_SET
	movl	(%rbx), %edi
	movl	4(%rbx), %esi
	callq	_max
	movl	%eax, 12(%rbx)
	xorl	%eax, %eax
	jmp	LBB0_17
LBB0_8:
	movq	_LOG_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_errno@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	callq	_strerror
	movl	(%r14), %ecx
	leaq	L_.str.1(%rip), %rsi
	movl	%ebx, %edi
	movl	%eax, %edx
	callq	_syslog
	jmp	LBB0_16
LBB0_9:
	movq	_LOG_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_errno@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	callq	_strerror
	movl	(%r15), %ecx
	leaq	L_.str.2(%rip), %rsi
	movl	%r14d, %edi
	movl	%eax, %edx
	callq	_syslog
	jmp	LBB0_15
LBB0_10:
	movq	_LOG_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_errno@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	callq	_strerror
	movl	(%r15), %ecx
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_13
LBB0_11:
	movq	_LOG_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_errno@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	callq	_strerror
	movl	(%r15), %ecx
	leaq	L_.str.4(%rip), %rsi
	jmp	LBB0_13
LBB0_12:
	movq	_LOG_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_errno@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	callq	_strerror
	movl	(%r15), %ecx
	leaq	L_.str.5(%rip), %rsi
LBB0_13:
	movl	%r14d, %edi
	movl	%eax, %edx
	callq	_syslog
LBB0_14:
	movl	(%rbx), %edi
	callq	_close
LBB0_15:
	movl	8(%rbx), %edi
	callq	_close
LBB0_16:
	movl	$-1, %eax
LBB0_17:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_18:
	movq	_LOG_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_errno@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	callq	_strerror
	movl	(%r15), %ecx
	leaq	L_.str.6(%rip), %rsi
	jmp	LBB0_20
LBB0_19:
	movq	_LOG_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_errno@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	callq	_strerror
	movl	(%r15), %ecx
	leaq	L_.str.7(%rip), %rsi
LBB0_20:
	movl	%r14d, %edi
	movl	%eax, %edx
	callq	_syslog
	movl	4(%rbx), %edi
	callq	_close
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"/dev/consolectl"

	.comm	_O_RDWR,4,2                     ## @O_RDWR
	.comm	_LOG_ERR,4,2                    ## @LOG_ERR
L_.str.1:                               ## @.str.1
	.asciz	"Could not open /dev/consolectl. %s (%d)"

	.comm	_errno,4,2                      ## @errno
	.comm	_PF_BLUETOOTH,4,2               ## @PF_BLUETOOTH
	.comm	_SOCK_SEQPACKET,4,2             ## @SOCK_SEQPACKET
	.comm	_BLUETOOTH_PROTO_L2CAP,4,2      ## @BLUETOOTH_PROTO_L2CAP
L_.str.2:                               ## @.str.2
	.asciz	"Could not create control L2CAP socket. %s (%d)"

	.comm	_AF_BLUETOOTH,4,2               ## @AF_BLUETOOTH
	.comm	_BDADDR_BREDR,4,2               ## @BDADDR_BREDR
L_.str.3:                               ## @.str.3
	.asciz	"Could not bind control L2CAP socket. %s (%d)"

L_.str.4:                               ## @.str.4
	.asciz	"Could not listen on control L2CAP socket. %s (%d)"

L_.str.5:                               ## @.str.5
	.asciz	"Could not create interrupt L2CAP socket. %s (%d)"

L_.str.6:                               ## @.str.6
	.asciz	"Could not bind interrupt L2CAP socket. %s (%d)"

L_.str.7:                               ## @.str.7
	.asciz	"Could not listen on interrupt L2CAP socket. %s (%d)"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_server_init                    ; -- Begin function server_init
	.p2align	2
_server_init:                           ; @server_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
	cmp	x0, #0
	cset	w0, ne
	bl	_assert
	movi.2d	v0, #0xffffffffffffffff
	str	d0, [x19]
	add	x20, x19, #16
	mov	x0, x20
	bl	_FD_ZERO
	add	x0, x19, #28
	bl	_FD_ZERO
	add	x0, x19, #24
	bl	_LIST_INIT
Lloh0:
	adrp	x8, _O_RDWR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _O_RDWR@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_open
	str	w0, [x19, #8]
	tbnz	w0, #31, LBB0_8
; %bb.1:
Lloh5:
	adrp	x21, _PF_BLUETOOTH@GOTPAGE
Lloh6:
	ldr	x21, [x21, _PF_BLUETOOTH@GOTPAGEOFF]
	ldr	w0, [x21]
Lloh7:
	adrp	x22, _SOCK_SEQPACKET@GOTPAGE
Lloh8:
	ldr	x22, [x22, _SOCK_SEQPACKET@GOTPAGEOFF]
	ldr	w1, [x22]
Lloh9:
	adrp	x23, _BLUETOOTH_PROTO_L2CAP@GOTPAGE
Lloh10:
	ldr	x23, [x23, _BLUETOOTH_PROTO_L2CAP@GOTPAGEOFF]
	ldr	w2, [x23]
	bl	_socket
	str	w0, [x19]
	tbnz	w0, #31, LBB0_9
; %bb.2:
	mov	w8, #40
Lloh11:
	adrp	x9, _AF_BLUETOOTH@GOTPAGE
Lloh12:
	ldr	x9, [x9, _AF_BLUETOOTH@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	str	w8, [sp, #8]
	str	w9, [sp, #40]
	add	x8, sp, #8
	add	x0, x8, #28
	add	x1, x19, #20
	mov	w2, #4
	bl	_memcpy
	mov	w0, #17
	bl	_htole16
Lloh14:
	adrp	x8, _BDADDR_BREDR@GOTPAGE
Lloh15:
	ldr	x8, [x8, _BDADDR_BREDR@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	str	w8, [sp, #32]
	stp	x0, xzr, [sp, #16]
	ldr	w0, [x19]
	add	x1, sp, #8
	mov	w2, #40
	bl	_bind
	tbnz	x0, #63, LBB0_10
; %bb.3:
	ldr	w0, [x19]
	mov	w1, #10
	bl	_listen
	tbnz	x0, #63, LBB0_11
; %bb.4:
	ldr	w0, [x21]
	ldr	w1, [x22]
	ldr	w2, [x23]
	bl	_socket
	str	w0, [x19, #4]
	tbnz	w0, #31, LBB0_12
; %bb.5:
	mov	w0, #19
	bl	_htole16
	str	x0, [sp, #16]
	ldr	w0, [x19, #4]
	add	x1, sp, #8
	mov	w2, #40
	bl	_bind
	tbnz	x0, #63, LBB0_18
; %bb.6:
	ldr	w0, [x19, #4]
	mov	w1, #10
	bl	_listen
	tbnz	x0, #63, LBB0_19
; %bb.7:
	ldr	w0, [x19]
	mov	x1, x20
	bl	_FD_SET
	ldr	w0, [x19, #4]
	mov	x1, x20
	bl	_FD_SET
	ldp	w0, w1, [x19]
	bl	_max
	mov	x8, x0
	mov	w0, #0
	str	w8, [x19, #12]
	b	LBB0_17
LBB0_8:
Lloh17:
	adrp	x8, _LOG_ERR@GOTPAGE
Lloh18:
	ldr	x8, [x8, _LOG_ERR@GOTPAGEOFF]
Lloh19:
	ldr	w19, [x8]
Lloh20:
	adrp	x20, _errno@GOTPAGE
Lloh21:
	ldr	x20, [x20, _errno@GOTPAGEOFF]
	ldr	w0, [x20]
	bl	_strerror
	mov	x2, x0
	ldr	w3, [x20]
Lloh22:
	adrp	x1, l_.str.1@PAGE
Lloh23:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_syslog
	b	LBB0_16
LBB0_9:
Lloh24:
	adrp	x8, _LOG_ERR@GOTPAGE
Lloh25:
	ldr	x8, [x8, _LOG_ERR@GOTPAGEOFF]
Lloh26:
	ldr	w20, [x8]
Lloh27:
	adrp	x21, _errno@GOTPAGE
Lloh28:
	ldr	x21, [x21, _errno@GOTPAGEOFF]
	ldr	w0, [x21]
	bl	_strerror
	mov	x2, x0
	ldr	w3, [x21]
Lloh29:
	adrp	x1, l_.str.2@PAGE
Lloh30:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_syslog
	b	LBB0_15
LBB0_10:
Lloh31:
	adrp	x8, _LOG_ERR@GOTPAGE
Lloh32:
	ldr	x8, [x8, _LOG_ERR@GOTPAGEOFF]
Lloh33:
	ldr	w20, [x8]
Lloh34:
	adrp	x21, _errno@GOTPAGE
Lloh35:
	ldr	x21, [x21, _errno@GOTPAGEOFF]
	ldr	w0, [x21]
	bl	_strerror
	mov	x2, x0
	ldr	w3, [x21]
Lloh36:
	adrp	x1, l_.str.3@PAGE
Lloh37:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_13
LBB0_11:
Lloh38:
	adrp	x8, _LOG_ERR@GOTPAGE
Lloh39:
	ldr	x8, [x8, _LOG_ERR@GOTPAGEOFF]
Lloh40:
	ldr	w20, [x8]
Lloh41:
	adrp	x21, _errno@GOTPAGE
Lloh42:
	ldr	x21, [x21, _errno@GOTPAGEOFF]
	ldr	w0, [x21]
	bl	_strerror
	mov	x2, x0
	ldr	w3, [x21]
Lloh43:
	adrp	x1, l_.str.4@PAGE
Lloh44:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_13
LBB0_12:
Lloh45:
	adrp	x8, _LOG_ERR@GOTPAGE
Lloh46:
	ldr	x8, [x8, _LOG_ERR@GOTPAGEOFF]
Lloh47:
	ldr	w20, [x8]
Lloh48:
	adrp	x21, _errno@GOTPAGE
Lloh49:
	ldr	x21, [x21, _errno@GOTPAGEOFF]
	ldr	w0, [x21]
	bl	_strerror
	mov	x2, x0
	ldr	w3, [x21]
Lloh50:
	adrp	x1, l_.str.5@PAGE
Lloh51:
	add	x1, x1, l_.str.5@PAGEOFF
LBB0_13:
	mov	x0, x20
	bl	_syslog
LBB0_14:
	ldr	w0, [x19]
	bl	_close
LBB0_15:
	ldr	w0, [x19, #8]
	bl	_close
LBB0_16:
	mov	w0, #-1
LBB0_17:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_18:
Lloh52:
	adrp	x8, _LOG_ERR@GOTPAGE
Lloh53:
	ldr	x8, [x8, _LOG_ERR@GOTPAGEOFF]
Lloh54:
	ldr	w20, [x8]
Lloh55:
	adrp	x21, _errno@GOTPAGE
Lloh56:
	ldr	x21, [x21, _errno@GOTPAGEOFF]
	ldr	w0, [x21]
	bl	_strerror
	mov	x2, x0
	ldr	w3, [x21]
Lloh57:
	adrp	x1, l_.str.6@PAGE
Lloh58:
	add	x1, x1, l_.str.6@PAGEOFF
	b	LBB0_20
LBB0_19:
Lloh59:
	adrp	x8, _LOG_ERR@GOTPAGE
Lloh60:
	ldr	x8, [x8, _LOG_ERR@GOTPAGEOFF]
Lloh61:
	ldr	w20, [x8]
Lloh62:
	adrp	x21, _errno@GOTPAGE
Lloh63:
	ldr	x21, [x21, _errno@GOTPAGEOFF]
	ldr	w0, [x21]
	bl	_strerror
	mov	x2, x0
	ldr	w3, [x21]
Lloh64:
	adrp	x1, l_.str.7@PAGE
Lloh65:
	add	x1, x1, l_.str.7@PAGEOFF
LBB0_20:
	mov	x0, x20
	bl	_syslog
	ldr	w0, [x19, #4]
	bl	_close
	b	LBB0_14
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpAdd	Lloh43, Lloh44
	.loh AdrpLdrGot	Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpAdd	Lloh50, Lloh51
	.loh AdrpLdrGot	Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpAdd	Lloh57, Lloh58
	.loh AdrpLdrGot	Lloh55, Lloh56
	.loh AdrpLdrGotLdr	Lloh52, Lloh53, Lloh54
	.loh AdrpAdd	Lloh64, Lloh65
	.loh AdrpLdrGot	Lloh62, Lloh63
	.loh AdrpLdrGotLdr	Lloh59, Lloh60, Lloh61
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"/dev/consolectl"

	.comm	_O_RDWR,4,2                     ; @O_RDWR
	.comm	_LOG_ERR,4,2                    ; @LOG_ERR
l_.str.1:                               ; @.str.1
	.asciz	"Could not open /dev/consolectl. %s (%d)"

	.comm	_errno,4,2                      ; @errno
	.comm	_PF_BLUETOOTH,4,2               ; @PF_BLUETOOTH
	.comm	_SOCK_SEQPACKET,4,2             ; @SOCK_SEQPACKET
	.comm	_BLUETOOTH_PROTO_L2CAP,4,2      ; @BLUETOOTH_PROTO_L2CAP
l_.str.2:                               ; @.str.2
	.asciz	"Could not create control L2CAP socket. %s (%d)"

	.comm	_AF_BLUETOOTH,4,2               ; @AF_BLUETOOTH
	.comm	_BDADDR_BREDR,4,2               ; @BDADDR_BREDR
l_.str.3:                               ; @.str.3
	.asciz	"Could not bind control L2CAP socket. %s (%d)"

l_.str.4:                               ; @.str.4
	.asciz	"Could not listen on control L2CAP socket. %s (%d)"

l_.str.5:                               ; @.str.5
	.asciz	"Could not create interrupt L2CAP socket. %s (%d)"

l_.str.6:                               ; @.str.6
	.asciz	"Could not bind interrupt L2CAP socket. %s (%d)"

l_.str.7:                               ; @.str.7
	.asciz	"Could not listen on interrupt L2CAP socket. %s (%d)"

.subsections_via_symbols
