	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hci_add_sco_connection
_hci_add_sco_connection:                ## @hci_add_sco_connection
	.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	$552, %rsp                      ## imm = 0x228
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movl	%esi, %ebx
	movl	%edi, -580(%rbp)                ## 4-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	leaq	-576(%rbp), %rdi
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	movq	_NG_HCI_PKT_HV1@GOTPCREL(%rip), %r12
	movq	_NG_HCI_PKT_HV2@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	orl	(%r12), %edi
	movq	_NG_HCI_PKT_HV3@GOTPCREL(%rip), %r14
	orl	(%r14), %edi
	callq	_htole16
	movl	%eax, -576(%rbp)
	cmpl	$1, %ebx
	je	LBB0_6
## %bb.1:
	cmpl	$2, %ebx
	jne	LBB0_3
## %bb.2:
	movq	8(%r15), %rdi
	leaq	L_.str(%rip), %rsi
	leaq	-564(%rbp), %rdx
	callq	_sscanf
	cmpl	$1, %eax
	jne	LBB0_3
## %bb.4:
	movl	(%r13), %edi
	orl	(%r12), %edi
	orl	(%r14), %edi
	andl	-564(%rbp), %edi
	movl	%edi, -564(%rbp)
	je	LBB0_3
## %bb.5:
	andl	$4095, %edi                     ## imm = 0xFFF
	movl	%edi, -576(%rbp)
	callq	_htole16
	movl	%eax, -576(%rbp)
LBB0_6:
	movq	(%r15), %rdi
	leaq	L_.str.1(%rip), %rsi
	leaq	-564(%rbp), %rdx
	callq	_sscanf
	cmpl	$1, %eax
	jne	LBB0_3
## %bb.7:
	movl	-564(%rbp), %edi
	testl	%edi, %edi
	jle	LBB0_3
## %bb.8:
	cmpl	$3840, %edi                     ## imm = 0xF00
	jge	LBB0_3
## %bb.9:
	movl	%edi, -572(%rbp)
	callq	_htole16
	movl	%eax, -572(%rbp)
	movl	$512, -564(%rbp)                ## imm = 0x200
	movq	_NG_HCI_OGF_LINK_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_NG_HCI_OCF_ADD_SCO_CON@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_NG_HCI_OPCODE
	leaq	-576(%rbp), %rdx
	leaq	-560(%rbp), %r8
	leaq	-564(%rbp), %r9
	movl	-580(%rbp), %ebx                ## 4-byte Reload
	movl	%ebx, %edi
	movl	%eax, %esi
	movl	$8, %ecx
	callq	_hci_request
	movq	_ERROR@GOTPCREL(%rip), %r13
	cmpq	(%r13), %rax
	je	LBB0_22
## %bb.10:
	cmpb	$0, -560(%rbp)
	je	LBB0_11
## %bb.24:
	movq	_FAILED@GOTPCREL(%rip), %rax
	jmp	LBB0_21
LBB0_3:
	movq	_USAGE@GOTPCREL(%rip), %rax
LBB0_21:
	movl	(%rax), %eax
LBB0_22:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_25
## %bb.23:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$552, %rsp                      ## imm = 0x228
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	leaq	-560(%rbp), %r15
	leaq	-564(%rbp), %r14
	movq	_NG_HCI_EVENT_CON_COMPL@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movl	$512, -564(%rbp)                ## imm = 0x200
	movl	%ebx, %edi
	movq	%r15, %rsi
	movq	%r14, %rdx
	callq	_hci_recv
	movq	(%r13), %rcx
	cmpq	%rcx, %rax
	je	LBB0_22
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	cmpl	$7, -564(%rbp)
	jbe	LBB0_14
## %bb.15:                              ##   in Loop: Header=BB0_12 Depth=1
	movq	-560(%rbp), %rax
	cmpq	(%r12), %rax
	jne	LBB0_12
## %bb.16:
	movl	-552(%rbp), %r14d
	movq	_stdout@GOTPCREL(%rip), %r15
	movl	(%r15), %ebx
	testl	%r14d, %r14d
	je	LBB0_18
## %bb.17:
	movl	%r14d, %edi
	callq	_hci_status2str
	movl	-552(%rbp), %ecx
	leaq	L_.str.2(%rip), %rsi
	movl	%ebx, %edi
	movq	%rax, %rdx
	xorl	%eax, %eax
	callq	_fprintf
	movq	_FAILED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_19
LBB0_14:
	movq	_EIO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_errno@GOTPCREL(%rip), %rdx
	movl	%eax, (%rdx)
	movl	%ecx, %eax
	jmp	LBB0_22
LBB0_18:
	leaq	-540(%rbp), %rdi
	callq	_hci_bdaddr2str
	leaq	L_.str.3(%rip), %rsi
	movl	%ebx, %edi
	movq	%rax, %rdx
	xorl	%eax, %eax
	callq	_fprintf
	movl	(%r15), %ebx
	movl	-544(%rbp), %edi
	callq	_le16toh
	leaq	L_.str.4(%rip), %rsi
	movl	%ebx, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_fprintf
	movl	(%r15), %ebx
	movl	-548(%rbp), %edi
	xorl	%esi, %esi
	callq	_hci_encrypt2str
	movl	-548(%rbp), %ecx
	leaq	L_.str.5(%rip), %rsi
	movl	%ebx, %edi
	movq	%rax, %rdx
	xorl	%eax, %eax
	callq	_fprintf
                                        ## implicit-def: $eax
LBB0_19:
	testl	%r14d, %r14d
	jne	LBB0_22
## %bb.20:
	movq	_OK@GOTPCREL(%rip), %rax
	jmp	LBB0_21
LBB0_25:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_NG_HCI_PKT_HV1,4,2             ## @NG_HCI_PKT_HV1
	.comm	_NG_HCI_PKT_HV2,4,2             ## @NG_HCI_PKT_HV2
	.comm	_NG_HCI_PKT_HV3,4,2             ## @NG_HCI_PKT_HV3
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%x"

	.comm	_USAGE,4,2                      ## @USAGE
L_.str.1:                               ## @.str.1
	.asciz	"%d"

	.comm	_NG_HCI_OGF_LINK_CONTROL,4,2    ## @NG_HCI_OGF_LINK_CONTROL
	.comm	_NG_HCI_OCF_ADD_SCO_CON,4,2     ## @NG_HCI_OCF_ADD_SCO_CON
	.comm	_ERROR,8,3                      ## @ERROR
	.comm	_FAILED,4,2                     ## @FAILED
	.comm	_EIO,4,2                        ## @EIO
	.comm	_errno,4,2                      ## @errno
	.comm	_NG_HCI_EVENT_CON_COMPL,8,3     ## @NG_HCI_EVENT_CON_COMPL
	.comm	_stdout,4,2                     ## @stdout
L_.str.2:                               ## @.str.2
	.asciz	"Status: %s [%#02x]\n"

L_.str.3:                               ## @.str.3
	.asciz	"BD_ADDR: %s\n"

L_.str.4:                               ## @.str.4
	.asciz	"Connection handle: %d\n"

L_.str.5:                               ## @.str.5
	.asciz	"Encryption mode: %s [%d]\n"

	.comm	_OK,4,2                         ## @OK
	.no_dead_strip	_hci_add_sco_connection
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hci_add_sco_connection
_hci_add_sco_connection:                ; @hci_add_sco_connection
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w27, -72
	.cfi_offset w28, -80
	sub	sp, sp, #560
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
	add	x0, sp, #24
	mov	w1, #0
	mov	w2, #8
	bl	_memset
Lloh3:
	adrp	x22, _NG_HCI_PKT_HV1@GOTPAGE
Lloh4:
	ldr	x22, [x22, _NG_HCI_PKT_HV1@GOTPAGEOFF]
	ldr	w8, [x22]
Lloh5:
	adrp	x23, _NG_HCI_PKT_HV2@GOTPAGE
Lloh6:
	ldr	x23, [x23, _NG_HCI_PKT_HV2@GOTPAGEOFF]
	ldr	w9, [x23]
	orr	w8, w9, w8
Lloh7:
	adrp	x24, _NG_HCI_PKT_HV3@GOTPAGE
Lloh8:
	ldr	x24, [x24, _NG_HCI_PKT_HV3@GOTPAGEOFF]
	ldr	w9, [x24]
	orr	w0, w8, w9
	bl	_htole16
	str	w0, [sp, #24]
	cmp	w21, #1
	b.eq	LBB0_5
; %bb.1:
	cmp	w21, #2
	b.ne	LBB0_10
; %bb.2:
	ldr	x0, [x20, #8]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	add	x2, sp, #36
	bl	_sscanf
	cmp	w0, #1
	b.ne	LBB0_10
; %bb.3:
	ldr	w8, [x22]
	ldr	w9, [x23]
	orr	w8, w9, w8
	ldr	w9, [x24]
	orr	w8, w8, w9
	ldr	w9, [sp, #36]
	ands	w8, w9, w8
	str	w8, [sp, #36]
	b.eq	LBB0_10
; %bb.4:
	and	w0, w8, #0xfff
	str	w0, [sp, #24]
	bl	_htole16
	str	w0, [sp, #24]
LBB0_5:
	ldr	x0, [x20]
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	add	x2, sp, #36
	bl	_sscanf
	mov	x8, x0
	ldr	w0, [sp, #36]
	cmp	w8, #1
	ccmp	w0, #1, #8, eq
	b.lt	LBB0_10
; %bb.6:
	cmp	w0, #3840
	b.ge	LBB0_10
; %bb.7:
	str	w0, [sp, #28]
	bl	_htole16
	str	w0, [sp, #28]
	mov	w8, #512
	str	w8, [sp, #36]
Lloh13:
	adrp	x8, _NG_HCI_OGF_LINK_CONTROL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _NG_HCI_OGF_LINK_CONTROL@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
Lloh16:
	adrp	x8, _NG_HCI_OCF_ADD_SCO_CON@GOTPAGE
Lloh17:
	ldr	x8, [x8, _NG_HCI_OCF_ADD_SCO_CON@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	bl	_NG_HCI_OPCODE
	mov	x1, x0
	add	x2, sp, #24
	add	x4, sp, #40
	add	x5, sp, #36
	mov	x0, x19
	mov	w3, #8
	bl	_hci_request
Lloh19:
	adrp	x20, _ERROR@GOTPAGE
Lloh20:
	ldr	x20, [x20, _ERROR@GOTPAGEOFF]
	ldr	x8, [x20]
	cmp	x0, x8
	b.eq	LBB0_12
; %bb.8:
	ldrb	w8, [sp, #40]
	cbz	w8, LBB0_14
; %bb.9:
Lloh21:
	adrp	x8, _FAILED@GOTPAGE
Lloh22:
	ldr	x8, [x8, _FAILED@GOTPAGEOFF]
	b	LBB0_11
LBB0_10:
Lloh23:
	adrp	x8, _USAGE@GOTPAGE
Lloh24:
	ldr	x8, [x8, _USAGE@GOTPAGEOFF]
LBB0_11:
	ldr	w0, [x8]
LBB0_12:
	ldur	x8, [x29, #-72]
Lloh25:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh26:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh27:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_24
; %bb.13:
                                        ; kill: def $w0 killed $w0 killed $x0
	add	sp, sp, #560
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_14:
	mov	w21, #512
Lloh28:
	adrp	x22, _NG_HCI_EVENT_CON_COMPL@GOTPAGE
Lloh29:
	ldr	x22, [x22, _NG_HCI_EVENT_CON_COMPL@GOTPAGEOFF]
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	str	w21, [sp, #36]
	add	x1, sp, #40
	add	x2, sp, #36
	mov	x0, x19
	bl	_hci_recv
	ldr	x8, [x20]
	cmp	x0, x8
	b.eq	LBB0_20
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=1
	ldr	w9, [sp, #36]
	cmp	w9, #7
	b.ls	LBB0_21
; %bb.17:                               ;   in Loop: Header=BB0_15 Depth=1
	ldr	x8, [sp, #40]
	ldr	x9, [x22]
	cmp	x8, x9
	b.ne	LBB0_15
; %bb.18:
	ldr	w19, [sp, #48]
Lloh30:
	adrp	x21, _stdout@GOTPAGE
Lloh31:
	ldr	x21, [x21, _stdout@GOTPAGEOFF]
	ldr	w20, [x21]
	cbz	w19, LBB0_22
; %bb.19:
	mov	x0, x19
	bl	_hci_status2str
	ldr	w8, [sp, #48]
	stp	x0, x8, [sp]
Lloh32:
	adrp	x1, l_.str.2@PAGE
Lloh33:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_fprintf
Lloh34:
	adrp	x8, _FAILED@GOTPAGE
Lloh35:
	ldr	x8, [x8, _FAILED@GOTPAGEOFF]
Lloh36:
	ldr	w8, [x8]
	b	LBB0_23
LBB0_20:
                                        ; kill: def $w0 killed $w0 killed $x0 def $x0
	b	LBB0_12
LBB0_21:
Lloh37:
	adrp	x9, _EIO@GOTPAGE
Lloh38:
	ldr	x9, [x9, _EIO@GOTPAGEOFF]
Lloh39:
	ldr	w9, [x9]
Lloh40:
	adrp	x10, _errno@GOTPAGE
Lloh41:
	ldr	x10, [x10, _errno@GOTPAGEOFF]
Lloh42:
	str	w9, [x10]
	mov	x0, x8
	b	LBB0_12
LBB0_22:
	add	x8, sp, #40
	add	x0, x8, #20
	bl	_hci_bdaddr2str
	str	x0, [sp]
Lloh43:
	adrp	x1, l_.str.3@PAGE
Lloh44:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x20
	bl	_fprintf
	ldr	w20, [x21]
	ldr	w0, [sp, #56]
	bl	_le16toh
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh45:
	adrp	x1, l_.str.4@PAGE
Lloh46:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x20
	bl	_fprintf
	ldr	w20, [x21]
	ldr	w0, [sp, #52]
	mov	w1, #0
	bl	_hci_encrypt2str
	ldr	w8, [sp, #52]
	stp	x0, x8, [sp]
Lloh47:
	adrp	x1, l_.str.5@PAGE
Lloh48:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x20
	bl	_fprintf
                                        ; implicit-def: $w8
LBB0_23:
Lloh49:
	adrp	x9, _OK@GOTPAGE
Lloh50:
	ldr	x9, [x9, _OK@GOTPAGEOFF]
Lloh51:
	ldr	w9, [x9]
	cmp	w19, #0
	csel	w0, w9, w8, eq
	b	LBB0_12
LBB0_24:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGotStr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpAdd	Lloh47, Lloh48
	.loh AdrpAdd	Lloh45, Lloh46
	.loh AdrpAdd	Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.cfi_endproc
                                        ; -- End function
	.comm	_NG_HCI_PKT_HV1,4,2             ; @NG_HCI_PKT_HV1
	.comm	_NG_HCI_PKT_HV2,4,2             ; @NG_HCI_PKT_HV2
	.comm	_NG_HCI_PKT_HV3,4,2             ; @NG_HCI_PKT_HV3
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%x"

	.comm	_USAGE,4,2                      ; @USAGE
l_.str.1:                               ; @.str.1
	.asciz	"%d"

	.comm	_NG_HCI_OGF_LINK_CONTROL,4,2    ; @NG_HCI_OGF_LINK_CONTROL
	.comm	_NG_HCI_OCF_ADD_SCO_CON,4,2     ; @NG_HCI_OCF_ADD_SCO_CON
	.comm	_ERROR,8,3                      ; @ERROR
	.comm	_FAILED,4,2                     ; @FAILED
	.comm	_EIO,4,2                        ; @EIO
	.comm	_errno,4,2                      ; @errno
	.comm	_NG_HCI_EVENT_CON_COMPL,8,3     ; @NG_HCI_EVENT_CON_COMPL
	.comm	_stdout,4,2                     ; @stdout
l_.str.2:                               ; @.str.2
	.asciz	"Status: %s [%#02x]\n"

l_.str.3:                               ; @.str.3
	.asciz	"BD_ADDR: %s\n"

l_.str.4:                               ; @.str.4
	.asciz	"Connection handle: %d\n"

l_.str.5:                               ; @.str.5
	.asciz	"Encryption mode: %s [%d]\n"

	.comm	_OK,4,2                         ; @OK
	.no_dead_strip	_hci_add_sco_connection
.subsections_via_symbols
