	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hci_periodic_inquiry           ## -- Begin function hci_periodic_inquiry
	.p2align	4, 0x90
_hci_periodic_inquiry:                  ## @hci_periodic_inquiry
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %r14
	movl	%r8d, -52(%rbp)                 ## 4-byte Spill
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	movl	%edx, %r13d
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movl	%edi, %r15d
	movq	_hci_dev@GOTPCREL(%rip), %r12
	movq	(%r12), %rax
	movq	8(%rax), %rsi
	testq	%rsi, %rsi
	je	LBB0_3
## %bb.1:
	addq	$8, %rax
	movq	_hci_inq_results@GOTPCREL(%rip), %rbx
	movq	%rax, %rcx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rsi), %rax
	movq	%rax, (%rcx)
	movq	%rbx, %rdi
	callq	_btmemb_free
	movq	(%r12), %rax
	leaq	8(%rax), %rcx
	movq	8(%rax), %rsi
	testq	%rsi, %rsi
	jne	LBB0_2
LBB0_3:
	movq	%r14, (%rax)
	movq	_PBUF_RAW@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_HCI_PERIODIC_INQUIRY_PLEN@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	_PBUF_RAM@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_btpbuf_alloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	_HCI_PERIODIC_INQUIRY_OCF@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_HCI_LINK_CTRL_OGF@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	(%rbx), %ecx
	movq	%rax, %rdi
	callq	_hci_cmd_ass
	movq	%rax, %rbx
	movl	%r13d, %edi
	callq	_htole16
	movq	8(%rbx), %rcx
	movl	%eax, 8(%rcx)
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_htole16
	movq	8(%rbx), %rcx
	movl	%eax, 12(%rcx)
	movzbl	%r15b, %eax
	movl	%eax, 32(%rcx)
	movl	%r15d, %eax
	sarl	$8, %eax
	movl	%eax, 36(%rcx)
	sarl	$16, %r15d
	movl	%r15d, 40(%rcx)
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 44(%rcx)
	movl	-52(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 48(%rcx)
	movl	(%rbx), %esi
	movq	%rbx, %rdi
	callq	_physbusif_output
	movq	%rbx, %rdi
	callq	_btpbuf_free
	movq	_ERR_OK@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_4:
	leaq	L_.str(%rip), %rdi
	callq	_ERROR
	movq	_ERR_MEM@GOTPCREL(%rip), %rax
LBB0_6:
	movl	(%rax), %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_hci_dev,8,3                    ## @hci_dev
	.comm	_hci_inq_results,4,2            ## @hci_inq_results
	.comm	_PBUF_RAW,4,2                   ## @PBUF_RAW
	.comm	_HCI_PERIODIC_INQUIRY_PLEN,4,2  ## @HCI_PERIODIC_INQUIRY_PLEN
	.comm	_PBUF_RAM,4,2                   ## @PBUF_RAM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"hci_periodic_inquiry: Could not allocate memory for pbuf\n"

	.comm	_ERR_MEM,4,2                    ## @ERR_MEM
	.comm	_HCI_PERIODIC_INQUIRY_OCF,4,2   ## @HCI_PERIODIC_INQUIRY_OCF
	.comm	_HCI_LINK_CTRL_OGF,4,2          ## @HCI_LINK_CTRL_OGF
	.comm	_ERR_OK,4,2                     ## @ERR_OK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function hci_periodic_inquiry
lCPI0_0:
	.long	4294967288                      ; 0xfffffff8
	.long	4294967280                      ; 0xfffffff0
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_hci_periodic_inquiry
	.p2align	2
_hci_periodic_inquiry:                  ; @hci_periodic_inquiry
	.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
	mov	x24, x5
	mov	x19, x4
	mov	x20, x3
	mov	x23, x2
	mov	x22, x1
	mov	x21, x0
Lloh0:
	adrp	x26, _hci_dev@GOTPAGE
Lloh1:
	ldr	x26, [x26, _hci_dev@GOTPAGEOFF]
	ldr	x8, [x26]
	mov	x9, x8
	ldr	x1, [x9, #8]!
	cbz	x1, LBB0_3
; %bb.1:
Lloh2:
	adrp	x25, _hci_inq_results@GOTPAGE
Lloh3:
	ldr	x25, [x25, _hci_inq_results@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x1]
	str	x8, [x9]
	mov	x0, x25
	bl	_btmemb_free
	ldr	x8, [x26]
	mov	x9, x8
	ldr	x1, [x9, #8]!
	cbnz	x1, LBB0_2
LBB0_3:
	str	x24, [x8]
Lloh4:
	adrp	x8, _PBUF_RAW@GOTPAGE
Lloh5:
	ldr	x8, [x8, _PBUF_RAW@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
Lloh7:
	adrp	x24, _HCI_PERIODIC_INQUIRY_PLEN@GOTPAGE
Lloh8:
	ldr	x24, [x24, _HCI_PERIODIC_INQUIRY_PLEN@GOTPAGEOFF]
	ldr	w1, [x24]
Lloh9:
	adrp	x8, _PBUF_RAM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _PBUF_RAM@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	bl	_btpbuf_alloc
	cbz	x0, LBB0_5
; %bb.4:
Lloh12:
	adrp	x8, _HCI_PERIODIC_INQUIRY_OCF@GOTPAGE
Lloh13:
	ldr	x8, [x8, _HCI_PERIODIC_INQUIRY_OCF@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
Lloh15:
	adrp	x8, _HCI_LINK_CTRL_OGF@GOTPAGE
Lloh16:
	ldr	x8, [x8, _HCI_LINK_CTRL_OGF@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
	ldr	w3, [x24]
	bl	_hci_cmd_ass
	mov	x24, x0
	mov	x0, x23
	bl	_htole16
	ldr	x8, [x24, #8]
	str	w0, [x8, #8]
	mov	x0, x22
	bl	_htole16
	ldr	x8, [x24, #8]
	str	w0, [x8, #12]
	and	w9, w21, #0xff
	str	w9, [x8, #32]
	dup.2s	v0, w21
Lloh18:
	adrp	x9, lCPI0_0@PAGE
Lloh19:
	ldr	d1, [x9, lCPI0_0@PAGEOFF]
	sshl.2s	v0, v0, v1
	stur	d0, [x8, #36]
	stp	w20, w19, [x8, #44]
	ldr	w1, [x24]
	mov	x0, x24
	bl	_physbusif_output
	mov	x0, x24
	bl	_btpbuf_free
Lloh20:
	adrp	x8, _ERR_OK@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ERR_OK@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:
Lloh22:
	adrp	x0, l_.str@PAGE
Lloh23:
	add	x0, x0, l_.str@PAGEOFF
	bl	_ERROR
Lloh24:
	adrp	x8, _ERR_MEM@GOTPAGE
Lloh25:
	ldr	x8, [x8, _ERR_MEM@GOTPAGEOFF]
LBB0_6:
	ldr	w0, [x8]
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdr	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpAdd	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_hci_dev,8,3                    ; @hci_dev
	.comm	_hci_inq_results,4,2            ; @hci_inq_results
	.comm	_PBUF_RAW,4,2                   ; @PBUF_RAW
	.comm	_HCI_PERIODIC_INQUIRY_PLEN,4,2  ; @HCI_PERIODIC_INQUIRY_PLEN
	.comm	_PBUF_RAM,4,2                   ; @PBUF_RAM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"hci_periodic_inquiry: Could not allocate memory for pbuf\n"

	.comm	_ERR_MEM,4,2                    ; @ERR_MEM
	.comm	_HCI_PERIODIC_INQUIRY_OCF,4,2   ; @HCI_PERIODIC_INQUIRY_OCF
	.comm	_HCI_LINK_CTRL_OGF,4,2          ; @HCI_LINK_CTRL_OGF
	.comm	_ERR_OK,4,2                     ; @ERR_OK
.subsections_via_symbols
