	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ng_hci_new_con                 ## -- Begin function ng_hci_new_con
	.p2align	4, 0x90
_ng_hci_new_con:                        ## @ng_hci_new_con
	.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
	movl	%esi, %r15d
	movq	%rdi, %r14
	movq	_M_NETGRAPH_HCI@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_M_NOWAIT@GOTPCREL(%rip), %rax
	movq	_M_ZERO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movl	$32, %edi
	callq	_malloc
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_7
## %bb.1:
	movq	%r14, 24(%rbx)
	movq	_NG_HCI_CON_CLOSED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rbx)
	movl	_ng_hci_new_con.fake_con_handle(%rip), %eax
	leal	1(%rax), %ecx
	movl	%ecx, _ng_hci_new_con.fake_con_handle(%rip)
	movl	%eax, 12(%rbx)
	cmpl	$4095, %eax                     ## imm = 0xFFF
	jl	LBB0_3
## %bb.2:
	movl	$3840, _ng_hci_new_con.fake_con_handle(%rip) ## imm = 0xF00
LBB0_3:
	movl	%r15d, (%rbx)
	movq	_NG_HCI_LINK_SCO@GOTPCREL(%rip), %rax
	movl	4(%r14), %edi
	cmpl	%r15d, (%rax)
	jne	LBB0_4
## %bb.5:
	callq	_NG_HCI_BUFF_SCO_TOTAL
	jmp	LBB0_6
LBB0_4:
	callq	_NG_HCI_BUFF_ACL_TOTAL
LBB0_6:
	leaq	8(%rbx), %rdi
	callq	_NG_BT_ITEMQ_INIT
	movq	%rbx, %rdi
	addq	$4, %rdi
	callq	_ng_callout_init
	movq	_next@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_LIST_INSERT_HEAD
LBB0_7:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__DATA,__data
	.p2align	2                               ## @ng_hci_new_con.fake_con_handle
_ng_hci_new_con.fake_con_handle:
	.long	3840                            ## 0xf00

	.comm	_M_NETGRAPH_HCI,4,2             ## @M_NETGRAPH_HCI
	.comm	_M_NOWAIT,4,2                   ## @M_NOWAIT
	.comm	_M_ZERO,4,2                     ## @M_ZERO
	.comm	_NG_HCI_CON_CLOSED,4,2          ## @NG_HCI_CON_CLOSED
	.comm	_NG_HCI_LINK_SCO,4,2            ## @NG_HCI_LINK_SCO
	.comm	_next,4,2                       ## @next
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ng_hci_new_con                 ; -- Begin function ng_hci_new_con
	.p2align	2
_ng_hci_new_con:                        ; @ng_hci_new_con
	.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	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _M_NETGRAPH_HCI@GOTPAGE
Lloh1:
	ldr	x8, [x8, _M_NETGRAPH_HCI@GOTPAGEOFF]
Lloh2:
	adrp	x9, _M_NOWAIT@GOTPAGE
Lloh3:
	ldr	x9, [x9, _M_NOWAIT@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
Lloh5:
	ldr	w8, [x9]
Lloh6:
	adrp	x9, _M_ZERO@GOTPAGE
Lloh7:
	ldr	x9, [x9, _M_ZERO@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	w0, #32
	bl	_malloc
	mov	x20, x0
	cbz	x0, LBB0_7
; %bb.1:
	str	x19, [x20, #24]
Lloh9:
	adrp	x8, _NG_HCI_CON_CLOSED@GOTPAGE
Lloh10:
	ldr	x8, [x8, _NG_HCI_CON_CLOSED@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x8]
	adrp	x8, _ng_hci_new_con.fake_con_handle@PAGE
	ldr	w10, [x8, _ng_hci_new_con.fake_con_handle@PAGEOFF]
	add	w11, w10, #1
	str	w11, [x8, _ng_hci_new_con.fake_con_handle@PAGEOFF]
	stp	w10, w9, [x20, #12]
	cmp	w10, #4095
	b.lt	LBB0_3
; %bb.2:
	mov	w9, #3840
	str	w9, [x8, _ng_hci_new_con.fake_con_handle@PAGEOFF]
LBB0_3:
	str	w21, [x20]
Lloh12:
	adrp	x8, _NG_HCI_LINK_SCO@GOTPAGE
Lloh13:
	ldr	x8, [x8, _NG_HCI_LINK_SCO@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	ldr	w0, [x19, #4]
	cmp	w8, w21
	b.ne	LBB0_5
; %bb.4:
	bl	_NG_HCI_BUFF_SCO_TOTAL
	b	LBB0_6
LBB0_5:
	bl	_NG_HCI_BUFF_ACL_TOTAL
LBB0_6:
	add	x0, x20, #8
	bl	_NG_BT_ITEMQ_INIT
	add	x0, x20, #4
	bl	_ng_callout_init
Lloh15:
	adrp	x8, _next@GOTPAGE
Lloh16:
	ldr	x8, [x8, _next@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x20
	bl	_LIST_INSERT_HEAD
LBB0_7:
	mov	x0, x20
	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	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.section	__DATA,__data
	.p2align	2                               ; @ng_hci_new_con.fake_con_handle
_ng_hci_new_con.fake_con_handle:
	.long	3840                            ; 0xf00

	.comm	_M_NETGRAPH_HCI,4,2             ; @M_NETGRAPH_HCI
	.comm	_M_NOWAIT,4,2                   ; @M_NOWAIT
	.comm	_M_ZERO,4,2                     ; @M_ZERO
	.comm	_NG_HCI_CON_CLOSED,4,2          ; @NG_HCI_CON_CLOSED
	.comm	_NG_HCI_LINK_SCO,4,2            ; @NG_HCI_LINK_SCO
	.comm	_next,4,2                       ; @next
.subsections_via_symbols
