	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hci_request                    ## -- Begin function hci_request
	.p2align	4, 0x90
_hci_request:                           ## @hci_request
	.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	$536, %rsp                      ## imm = 0x218
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %r12
	movl	%ecx, %ebx
	movq	%rdx, %r14
	movl	%esi, %r15d
	movl	%edi, %r13d
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	xorl	%edi, %edi
	movq	%r8, -576(%rbp)                 ## 8-byte Spill
	testq	%r8, %r8
	setne	%dil
	callq	_assert
	xorl	%edi, %edi
	testq	%r12, %r12
	setne	%dil
	callq	_assert
	xorl	%edi, %edi
	cmpl	$0, (%r12)
	setg	%dil
	callq	_assert
	movq	_NG_HCI_CMD_PKT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -544(%rbp)
	movslq	%r15d, %rdi
	callq	_htole16
	movq	%rax, -552(%rbp)
	testq	%r14, %r14
	je	LBB0_2
## %bb.1:
	testl	%ebx, %ebx
	setg	%al
	movq	_NG_HCI_CMD_PKT_SIZE@GOTPCREL(%rip), %rcx
	cmpl	%ebx, (%rcx)
	setge	%cl
	andb	%al, %cl
	movzbl	%cl, %edi
	callq	_assert
	movslq	%ebx, %rdx
	movq	%rdx, -560(%rbp)
	leaq	-536(%rbp), %rdi
	movq	%r14, %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_memcpy
	jmp	LBB0_3
LBB0_2:
	movq	$0, -560(%rbp)
LBB0_3:
	addl	$24, %ebx
	leaq	-560(%rbp), %rsi
	movl	%r13d, %edi
	movl	%ebx, %edx
	callq	_hci_send
	movq	_ERROR@GOTPCREL(%rip), %rbx
	cmpq	(%rbx), %rax
	je	LBB0_23
## %bb.4:
	movl	$512, -564(%rbp)                ## imm = 0x200
	leaq	-560(%rbp), %rsi
	leaq	-564(%rbp), %rdx
	movl	%r13d, %edi
	callq	_hci_recv
	movq	(%rbx), %rcx
	cmpq	%rcx, %rax
	je	LBB0_23
## %bb.5:
	movq	_NG_HCI_EVENT_PKT@GOTPCREL(%rip), %r14
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_6 Depth=1
	movl	$512, -564(%rbp)                ## imm = 0x200
	movl	%r13d, %edi
	leaq	-560(%rbp), %rsi
	leaq	-564(%rbp), %rdx
	callq	_hci_recv
	movq	(%rbx), %rcx
	cmpq	%rcx, %rax
	je	LBB0_23
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	$15, -564(%rbp)
	jbe	LBB0_7
## %bb.9:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	-560(%rbp), %rax
	cmpq	(%r14), %rax
	jne	LBB0_10
## %bb.11:                              ##   in Loop: Header=BB0_6 Depth=1
	movl	-552(%rbp), %eax
	cmpl	$128, %eax
	je	LBB0_19
## %bb.12:                              ##   in Loop: Header=BB0_6 Depth=1
	cmpl	$129, %eax
	jne	LBB0_13
## %bb.14:                              ##   in Loop: Header=BB0_6 Depth=1
	movl	-544(%rbp), %edi
	callq	_le16toh
	movl	%eax, -544(%rbp)
	testl	%eax, %eax
	je	LBB0_13
## %bb.15:                              ##   in Loop: Header=BB0_6 Depth=1
	cmpl	%r15d, %eax
	jne	LBB0_13
	jmp	LBB0_16
	.p2align	4, 0x90
LBB0_19:                                ##   in Loop: Header=BB0_6 Depth=1
	movl	-544(%rbp), %edi
	callq	_le16toh
	movl	%eax, -544(%rbp)
	testl	%eax, %eax
	je	LBB0_13
## %bb.20:                              ##   in Loop: Header=BB0_6 Depth=1
	cmpl	%r15d, %eax
	jne	LBB0_13
## %bb.21:
	movl	$1, (%r12)
	movb	-540(%rbp), %al
	movq	-576(%rbp), %rcx                ## 8-byte Reload
	movb	%al, (%rcx)
	jmp	LBB0_22
LBB0_7:
	movq	_EMSGSIZE@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_10:
	movq	_EIO@GOTPCREL(%rip), %rax
LBB0_8:
	movl	(%rax), %eax
	movq	_errno@GOTPCREL(%rip), %rdx
	movl	%eax, (%rdx)
	movl	%ecx, %eax
	jmp	LBB0_23
LBB0_16:
	movl	-564(%rbp), %eax
	addl	$-20, %eax
	movl	%eax, -564(%rbp)
	movl	(%r12), %edx
	cmpl	%edx, %eax
	jge	LBB0_18
## %bb.17:
	movl	%eax, (%r12)
	movl	%eax, %edx
LBB0_18:
	leaq	-540(%rbp), %rsi
	movq	-576(%rbp), %rdi                ## 8-byte Reload
	callq	_memcpy
LBB0_22:
	movq	_OK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_23:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_25
## %bb.24:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$536, %rsp                      ## imm = 0x218
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_25:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_NG_HCI_CMD_PKT,4,2             ## @NG_HCI_CMD_PKT
	.comm	_NG_HCI_CMD_PKT_SIZE,4,2        ## @NG_HCI_CMD_PKT_SIZE
	.comm	_ERROR,8,3                      ## @ERROR
	.comm	_EMSGSIZE,4,2                   ## @EMSGSIZE
	.comm	_errno,4,2                      ## @errno
	.comm	_NG_HCI_EVENT_PKT,8,3           ## @NG_HCI_EVENT_PKT
	.comm	_EIO,4,2                        ## @EIO
	.comm	_OK,4,2                         ## @OK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hci_request                    ; -- Begin function hci_request
	.p2align	2
_hci_request:                           ; @hci_request
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [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 w25, -72
	.cfi_offset w26, -80
	sub	sp, sp, #528
	mov	x20, x5
	mov	x19, x4
	mov	x23, x3
	mov	x24, x2
	mov	x21, x1
	mov	x22, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
	cmp	x4, #0
	cset	w0, ne
	bl	_assert
	cmp	x20, #0
	cset	w0, ne
	bl	_assert
	ldr	w8, [x20]
	cmp	w8, #0
	cset	w0, gt
	bl	_assert
Lloh3:
	adrp	x8, _NG_HCI_CMD_PKT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _NG_HCI_CMD_PKT@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [sp, #24]
	sxtw	x0, w21
	bl	_htole16
	str	x0, [sp, #16]
	cbz	x24, LBB0_2
; %bb.1:
	cmp	w23, #0
Lloh6:
	adrp	x8, _NG_HCI_CMD_PKT_SIZE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _NG_HCI_CMD_PKT_SIZE@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	ccmp	w8, w23, #8, gt
	cset	w0, ge
	bl	_assert
	sxtw	x8, w23
	str	x8, [sp, #8]
	add	x8, sp, #8
	add	x0, x8, #24
	mov	x1, x24
	mov	x2, x23
	bl	_memcpy
	b	LBB0_3
LBB0_2:
	str	xzr, [sp, #8]
LBB0_3:
	add	w2, w23, #24
	add	x1, sp, #8
	mov	x0, x22
	bl	_hci_send
Lloh9:
	adrp	x23, _ERROR@GOTPAGE
Lloh10:
	ldr	x23, [x23, _ERROR@GOTPAGEOFF]
	ldr	x8, [x23]
	cmp	x0, x8
	b.ne	LBB0_5
; %bb.4:
                                        ; kill: def $w0 killed $w0 killed $x0 def $x0
	b	LBB0_24
LBB0_5:
	mov	w24, #512
	str	w24, [sp, #4]
	add	x1, sp, #8
	add	x2, sp, #4
	mov	x0, x22
	bl	_hci_recv
	ldr	x8, [x23]
	cmp	x0, x8
	b.eq	LBB0_24
; %bb.6:
Lloh11:
	adrp	x25, _NG_HCI_EVENT_PKT@GOTPAGE
Lloh12:
	ldr	x25, [x25, _NG_HCI_EVENT_PKT@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	str	w24, [sp, #4]
	add	x1, sp, #8
	add	x2, sp, #4
	mov	x0, x22
	bl	_hci_recv
	ldr	x8, [x23]
	cmp	x0, x8
	b.eq	LBB0_24
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w9, [sp, #4]
	cmp	w9, #15
	b.ls	LBB0_17
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	x9, [sp, #8]
	ldr	x10, [x25]
	cmp	x9, x10
	b.ne	LBB0_18
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	w8, [sp, #16]
	cmp	w8, #128
	b.eq	LBB0_14
; %bb.11:                               ;   in Loop: Header=BB0_8 Depth=1
	cmp	w8, #129
	b.ne	LBB0_7
; %bb.12:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	w0, [sp, #24]
	bl	_le16toh
	str	w0, [sp, #24]
	cbz	w0, LBB0_7
; %bb.13:                               ;   in Loop: Header=BB0_8 Depth=1
	cmp	w0, w21
	b.ne	LBB0_7
	b	LBB0_20
LBB0_14:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	w0, [sp, #24]
	bl	_le16toh
	str	w0, [sp, #24]
	cbz	w0, LBB0_7
; %bb.15:                               ;   in Loop: Header=BB0_8 Depth=1
	cmp	w0, w21
	b.ne	LBB0_7
; %bb.16:
	mov	w8, #1
	str	w8, [x20]
	ldrb	w8, [sp, #28]
	strb	w8, [x19]
	b	LBB0_23
LBB0_17:
Lloh13:
	adrp	x9, _EMSGSIZE@GOTPAGE
Lloh14:
	ldr	x9, [x9, _EMSGSIZE@GOTPAGEOFF]
	b	LBB0_19
LBB0_18:
Lloh15:
	adrp	x9, _EIO@GOTPAGE
Lloh16:
	ldr	x9, [x9, _EIO@GOTPAGEOFF]
LBB0_19:
	ldr	w9, [x9]
Lloh17:
	adrp	x10, _errno@GOTPAGE
Lloh18:
	ldr	x10, [x10, _errno@GOTPAGEOFF]
Lloh19:
	str	w9, [x10]
	mov	x0, x8
	b	LBB0_24
LBB0_20:
	ldr	w8, [sp, #4]
	sub	w8, w8, #20
	str	w8, [sp, #4]
	ldr	w2, [x20]
	cmp	w8, w2
	b.ge	LBB0_22
; %bb.21:
	str	w8, [x20]
	mov	x2, x8
LBB0_22:
	add	x8, sp, #8
	add	x1, x8, #20
	mov	x0, x19
	bl	_memcpy
LBB0_23:
Lloh20:
	adrp	x8, _OK@GOTPAGE
Lloh21:
	ldr	x8, [x8, _OK@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
LBB0_24:
	ldur	x8, [x29, #-72]
Lloh23:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh24:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh25:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_26
; %bb.25:
                                        ; kill: def $w0 killed $w0 killed $x0
	add	sp, sp, #528
	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	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_26:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotStr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_NG_HCI_CMD_PKT,4,2             ; @NG_HCI_CMD_PKT
	.comm	_NG_HCI_CMD_PKT_SIZE,4,2        ; @NG_HCI_CMD_PKT_SIZE
	.comm	_ERROR,8,3                      ; @ERROR
	.comm	_EMSGSIZE,4,2                   ; @EMSGSIZE
	.comm	_errno,4,2                      ; @errno
	.comm	_NG_HCI_EVENT_PKT,8,3           ; @NG_HCI_EVENT_PKT
	.comm	_EIO,4,2                        ; @EIO
	.comm	_OK,4,2                         ; @OK
.subsections_via_symbols
