	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hci_sock_recvmsg
_hci_sock_recvmsg:                      ## @hci_sock_recvmsg
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, %r12d
	movq	%rcx, %r15
	movq	%rdx, %r14
	movq	_MSG_DONTWAIT@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	andl	%r8d, %ebx
	movq	(%rsi), %r13
	leaq	L_.str(%rip), %rdi
	movq	%r13, %rdx
	callq	_BT_DBG
	movq	_MSG_OOB@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_2
## %bb.1:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_8
LBB0_2:
	movq	$0, 8(%r14)
	movq	(%r13), %rcx
	movq	_BT_CLOSED@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	cmpq	(%rdx), %rcx
	je	LBB0_8
## %bb.3:
	leaq	-44(%rbp), %rcx
	movq	%r13, %rdi
	movl	%r12d, %esi
	movl	%ebx, %edx
	callq	_skb_recv_datagram
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rax, %r12
	movslq	(%rax), %rbx
	cmpq	%r15, %rbx
	jbe	LBB0_7
## %bb.6:
	movq	_MSG_TRUNC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 4(%r14)
	movl	%r15d, %ebx
LBB0_7:
	movq	%r12, %rdi
	callq	_skb_reset_transport_header
	movl	(%r14), %edx
	movq	%r12, %rdi
	xorl	%esi, %esi
	movl	%ebx, %ecx
	callq	_skb_copy_datagram_iovec
	movl	%eax, -44(%rbp)
	movq	%r13, %rdi
	movq	%r14, %rsi
	movq	%r12, %rdx
	callq	_hci_sock_cmsg
	movq	%r13, %rdi
	movq	%r12, %rsi
	callq	_skb_free_datagram
	movl	-44(%rbp), %eax
	testl	%eax, %eax
	cmovel	%ebx, %eax
	jmp	LBB0_8
LBB0_4:
	movl	-44(%rbp), %eax
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MSG_DONTWAIT,4,2               ## @MSG_DONTWAIT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"sock %p, sk %p"

	.comm	_MSG_OOB,4,2                    ## @MSG_OOB
	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.comm	_BT_CLOSED,8,3                  ## @BT_CLOSED
	.comm	_MSG_TRUNC,4,2                  ## @MSG_TRUNC
	.no_dead_strip	_hci_sock_recvmsg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hci_sock_recvmsg
_hci_sock_recvmsg:                      ; @hci_sock_recvmsg
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x22, x4
	mov	x21, x3
	mov	x20, x2
Lloh0:
	adrp	x8, _MSG_DONTWAIT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MSG_DONTWAIT@GOTPAGEOFF]
Lloh2:
	ldr	w23, [x8]
	ldr	x19, [x1]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	mov	x2, x19
	bl	_BT_DBG
Lloh5:
	adrp	x8, _MSG_OOB@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MSG_OOB@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_2
; %bb.1:
Lloh8:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_9
LBB0_2:
	str	xzr, [x20, #8]
	ldr	x8, [x19]
Lloh11:
	adrp	x9, _BT_CLOSED@GOTPAGE
Lloh12:
	ldr	x9, [x9, _BT_CLOSED@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.3:
	mov	w0, #0
	b	LBB0_9
LBB0_4:
	and	w2, w23, w22
	add	x3, sp, #12
	mov	x0, x19
	mov	x1, x22
	bl	_skb_recv_datagram
	cbz	x0, LBB0_8
; %bb.5:
	mov	x22, x0
	ldrsw	x23, [x0]
	cmp	x23, x21
	b.ls	LBB0_7
; %bb.6:
Lloh14:
	adrp	x8, _MSG_TRUNC@GOTPAGE
Lloh15:
	ldr	x8, [x8, _MSG_TRUNC@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	ldr	w9, [x20, #4]
	orr	w8, w9, w8
	str	w8, [x20, #4]
	mov	x23, x21
LBB0_7:
	mov	x0, x22
	bl	_skb_reset_transport_header
	ldr	w2, [x20]
	mov	x0, x22
	mov	w1, #0
	mov	x3, x23
	bl	_skb_copy_datagram_iovec
	str	w0, [sp, #12]
	mov	x0, x19
	mov	x1, x20
	mov	x2, x22
	bl	_hci_sock_cmsg
	mov	x0, x19
	mov	x1, x22
	bl	_skb_free_datagram
	ldr	w8, [sp, #12]
	cmp	w8, #0
	csel	w0, w23, w8, eq
	b	LBB0_9
LBB0_8:
	ldr	w0, [sp, #12]
LBB0_9:
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_MSG_DONTWAIT,4,2               ; @MSG_DONTWAIT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"sock %p, sk %p"

	.comm	_MSG_OOB,4,2                    ; @MSG_OOB
	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.comm	_BT_CLOSED,8,3                  ; @BT_CLOSED
	.comm	_MSG_TRUNC,4,2                  ; @MSG_TRUNC
	.no_dead_strip	_hci_sock_recvmsg
.subsections_via_symbols
