	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hci_sock_sendmsg
_hci_sock_sendmsg:                      ## @hci_sock_sendmsg
	.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
	movq	%rcx, %r14
	movq	%rdx, %rbx
	movq	(%rsi), %r13
	leaq	L_.str(%rip), %rdi
	movq	%r13, %rdx
	callq	_BT_DBG
	movl	(%rbx), %eax
	movq	_MSG_OOB@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_3
## %bb.1:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_3:
	movq	_MSG_DONTWAIT@GOTPCREL(%rip), %r12
	movq	_MSG_NOSIGNAL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%r12), %ecx
	movq	_MSG_ERRQUEUE@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
	notl	%ecx
	testl	%ecx, %eax
	je	LBB0_5
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_25:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	cmpq	$4, %r14
	jb	LBB0_4
## %bb.6:
	movq	_HCI_MAX_FRAME_SIZE@GOTPCREL(%rip), %rax
	cmpq	%r14, (%rax)
	jb	LBB0_4
## %bb.7:
	movq	%r13, %rdi
	callq	_lock_sock
	movq	%r13, %rdi
	callq	_hci_pi
	movq	(%rax), %r15
	testq	%r15, %r15
	je	LBB0_8
## %bb.9:
	movl	(%r12), %edx
	andl	(%rbx), %edx
	leaq	-44(%rbp), %rcx
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	_bt_skb_send_alloc
	testq	%rax, %rax
	je	LBB0_24
## %bb.10:
	movq	%rax, %r12
	movq	%rax, %rdi
	movq	%r14, %rsi
	callq	_skb_put
	movl	4(%rbx), %esi
	movl	%eax, %edi
	movq	%r14, %rdx
	callq	_memcpy_fromiovec
	testq	%rax, %rax
	je	LBB0_13
## %bb.11:
	movq	_EFAULT@GOTPCREL(%rip), %rax
LBB0_12:
	xorl	%ecx, %ecx
	subl	(%rax), %ecx
	movl	%ecx, -44(%rbp)
	movq	%r12, %rdi
	callq	_kfree_skb
	jmp	LBB0_24
LBB0_8:
	movq	_EBADFD@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	subl	(%rax), %ecx
	movl	%ecx, -44(%rbp)
	jmp	LBB0_24
LBB0_13:
	movq	(%r12), %rax
	movb	(%rax), %bl
	movq	%r12, %rdi
	callq	_bt_cb
	movb	%bl, (%rax)
	movq	%r12, %rdi
	movl	$1, %esi
	callq	_skb_pull
	movq	%r15, 8(%r12)
	movq	%r12, %rdi
	callq	_bt_cb
	movb	(%rax), %al
	movq	_HCI_COMMAND_PKT@GOTPCREL(%rip), %rcx
	cmpb	(%rcx), %al
	jne	LBB0_20
## %bb.14:
	movq	(%r12), %rdi
	callq	_get_unaligned_le16
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_hci_opcode_ogf
	movq	%rbx, %rdi
	movq	%rax, %rbx
	callq	_hci_opcode_ocf
	movq	_HCI_SFLT_MAX_OGF@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rbx
	ja	LBB0_16
## %bb.15:
	movq	_HCI_FLT_OCF_BITS@GOTPCREL(%rip), %rcx
	andq	(%rcx), %rax
	movq	_hci_sec_filter@GOTPCREL(%rip), %rcx
	leaq	(,%rbx,4), %rsi
	addq	(%rcx), %rsi
	movq	%rax, %rdi
	callq	_hci_test_bit
	testl	%eax, %eax
	jne	LBB0_17
LBB0_16:
	movq	_CAP_NET_RAW@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_capable
	testl	%eax, %eax
	je	LBB0_21
LBB0_17:
	movq	_HCI_RAW@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	8(%r15), %rsi
	callq	_test_bit
	testq	%rax, %rax
	jne	LBB0_22
## %bb.18:
	cmpq	$63, %rbx
	je	LBB0_22
## %bb.19:
	leaq	4(%r15), %rdi
	movq	%r12, %rsi
	callq	_skb_queue_tail
	movq	%r15, %rdi
	callq	_hci_sched_cmd
	jmp	LBB0_23
LBB0_20:
	movq	_CAP_NET_RAW@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_capable
	testl	%eax, %eax
	je	LBB0_21
LBB0_22:
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_skb_queue_tail
	movq	%r15, %rdi
	callq	_hci_sched_tx
LBB0_23:
	movl	%r14d, -44(%rbp)
LBB0_24:
	movq	%r13, %rdi
	callq	_release_sock
	movl	-44(%rbp), %eax
	jmp	LBB0_25
LBB0_21:
	movq	_EPERM@GOTPCREL(%rip), %rax
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.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	_MSG_DONTWAIT,4,2               ## @MSG_DONTWAIT
	.comm	_MSG_NOSIGNAL,4,2               ## @MSG_NOSIGNAL
	.comm	_MSG_ERRQUEUE,4,2               ## @MSG_ERRQUEUE
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_HCI_MAX_FRAME_SIZE,8,3         ## @HCI_MAX_FRAME_SIZE
	.comm	_EBADFD,4,2                     ## @EBADFD
	.comm	_EFAULT,4,2                     ## @EFAULT
	.comm	_HCI_COMMAND_PKT,1,0            ## @HCI_COMMAND_PKT
	.comm	_HCI_SFLT_MAX_OGF,8,3           ## @HCI_SFLT_MAX_OGF
	.comm	_HCI_FLT_OCF_BITS,8,3           ## @HCI_FLT_OCF_BITS
	.comm	_hci_sec_filter,8,3             ## @hci_sec_filter
	.comm	_CAP_NET_RAW,4,2                ## @CAP_NET_RAW
	.comm	_EPERM,4,2                      ## @EPERM
	.comm	_HCI_RAW,4,2                    ## @HCI_RAW
	.no_dead_strip	_hci_sock_sendmsg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hci_sock_sendmsg
_hci_sock_sendmsg:                      ; @hci_sock_sendmsg
	.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	x20, x3
	mov	x23, x2
	ldr	x19, [x1]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x2, x19
	bl	_BT_DBG
	ldr	w8, [x23]
Lloh2:
	adrp	x9, _MSG_OOB@GOTPAGE
Lloh3:
	ldr	x9, [x9, _MSG_OOB@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
Lloh5:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:
Lloh7:
	adrp	x22, _MSG_DONTWAIT@GOTPAGE
Lloh8:
	ldr	x22, [x22, _MSG_DONTWAIT@GOTPAGEOFF]
	ldr	w9, [x22]
Lloh9:
	adrp	x10, _MSG_NOSIGNAL@GOTPAGE
Lloh10:
	ldr	x10, [x10, _MSG_NOSIGNAL@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	orr	w9, w10, w9
Lloh12:
	adrp	x10, _MSG_ERRQUEUE@GOTPAGE
Lloh13:
	ldr	x10, [x10, _MSG_ERRQUEUE@GOTPAGEOFF]
Lloh14:
	ldr	w10, [x10]
	orr	w9, w9, w10
	bics	wzr, w8, w9
	b.eq	LBB0_6
LBB0_3:
Lloh15:
	adrp	x8, _EINVAL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	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
LBB0_6:
	cmp	x20, #4
	b.lo	LBB0_3
; %bb.7:
Lloh17:
	adrp	x8, _HCI_MAX_FRAME_SIZE@GOTPAGE
Lloh18:
	ldr	x8, [x8, _HCI_MAX_FRAME_SIZE@GOTPAGEOFF]
Lloh19:
	ldr	x8, [x8]
	cmp	x8, x20
	b.lo	LBB0_3
; %bb.8:
	mov	x0, x19
	bl	_lock_sock
	mov	x0, x19
	bl	_hci_pi
	ldr	x21, [x0]
	cbz	x21, LBB0_13
; %bb.9:
	ldr	w8, [x23]
	ldr	w9, [x22]
	and	w2, w9, w8
	add	x3, sp, #12
	mov	x0, x19
	mov	x1, x20
	bl	_bt_skb_send_alloc
	cbz	x0, LBB0_24
; %bb.10:
	mov	x22, x0
	mov	x1, x20
	bl	_skb_put
	ldr	w1, [x23, #4]
	mov	x2, x20
	bl	_memcpy_fromiovec
	cbz	x0, LBB0_14
; %bb.11:
Lloh20:
	adrp	x8, _EFAULT@GOTPAGE
Lloh21:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
LBB0_12:
	ldr	w8, [x8]
	neg	w8, w8
	str	w8, [sp, #12]
	mov	x0, x22
	bl	_kfree_skb
	b	LBB0_24
LBB0_13:
Lloh22:
	adrp	x8, _EBADFD@GOTPAGE
Lloh23:
	ldr	x8, [x8, _EBADFD@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	neg	w8, w8
	str	w8, [sp, #12]
	b	LBB0_24
LBB0_14:
	ldr	x8, [x22]
	ldrb	w23, [x8]
	mov	x0, x22
	bl	_bt_cb
	strb	w23, [x0]
	mov	x0, x22
	mov	w1, #1
	bl	_skb_pull
	str	x21, [x22, #8]
	mov	x0, x22
	bl	_bt_cb
	ldrb	w8, [x0]
Lloh25:
	adrp	x9, _HCI_COMMAND_PKT@GOTPAGE
Lloh26:
	ldr	x9, [x9, _HCI_COMMAND_PKT@GOTPAGEOFF]
	ldrb	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_21
; %bb.15:
	ldr	x0, [x22]
	bl	_get_unaligned_le16
	mov	x24, x0
	bl	_hci_opcode_ogf
	mov	x23, x0
	mov	x0, x24
	bl	_hci_opcode_ocf
Lloh27:
	adrp	x8, _HCI_SFLT_MAX_OGF@GOTPAGE
Lloh28:
	ldr	x8, [x8, _HCI_SFLT_MAX_OGF@GOTPAGEOFF]
Lloh29:
	ldr	x8, [x8]
	cmp	x23, x8
	b.hi	LBB0_17
; %bb.16:
Lloh30:
	adrp	x8, _HCI_FLT_OCF_BITS@GOTPAGE
Lloh31:
	ldr	x8, [x8, _HCI_FLT_OCF_BITS@GOTPAGEOFF]
Lloh32:
	ldr	x8, [x8]
	and	x0, x8, x0
Lloh33:
	adrp	x8, _hci_sec_filter@GOTPAGE
Lloh34:
	ldr	x8, [x8, _hci_sec_filter@GOTPAGEOFF]
Lloh35:
	ldr	x8, [x8]
	add	x1, x8, x23, lsl #2
	bl	_hci_test_bit
	cbnz	w0, LBB0_18
LBB0_17:
Lloh36:
	adrp	x8, _CAP_NET_RAW@GOTPAGE
Lloh37:
	ldr	x8, [x8, _CAP_NET_RAW@GOTPAGEOFF]
Lloh38:
	ldr	w0, [x8]
	bl	_capable
	cbz	w0, LBB0_25
LBB0_18:
Lloh39:
	adrp	x8, _HCI_RAW@GOTPAGE
Lloh40:
	ldr	x8, [x8, _HCI_RAW@GOTPAGEOFF]
Lloh41:
	ldr	w0, [x8]
	add	x1, x21, #8
	bl	_test_bit
	cbnz	x0, LBB0_22
; %bb.19:
	cmp	x23, #63
	b.eq	LBB0_22
; %bb.20:
	add	x0, x21, #4
	mov	x1, x22
	bl	_skb_queue_tail
	mov	x0, x21
	bl	_hci_sched_cmd
	b	LBB0_23
LBB0_21:
Lloh42:
	adrp	x8, _CAP_NET_RAW@GOTPAGE
Lloh43:
	ldr	x8, [x8, _CAP_NET_RAW@GOTPAGEOFF]
Lloh44:
	ldr	w0, [x8]
	bl	_capable
	cbz	w0, LBB0_25
LBB0_22:
	mov	x0, x21
	mov	x1, x22
	bl	_skb_queue_tail
	mov	x0, x21
	bl	_hci_sched_tx
LBB0_23:
	str	w20, [sp, #12]
LBB0_24:
	mov	x0, x19
	bl	_release_sock
	ldr	w0, [sp, #12]
	b	LBB0_5
LBB0_25:
Lloh45:
	adrp	x8, _EPERM@GOTPAGE
Lloh46:
	ldr	x8, [x8, _EPERM@GOTPAGEOFF]
	b	LBB0_12
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGot	Lloh45, Lloh46
	.cfi_endproc
                                        ; -- End function
	.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	_MSG_DONTWAIT,4,2               ; @MSG_DONTWAIT
	.comm	_MSG_NOSIGNAL,4,2               ; @MSG_NOSIGNAL
	.comm	_MSG_ERRQUEUE,4,2               ; @MSG_ERRQUEUE
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_HCI_MAX_FRAME_SIZE,8,3         ; @HCI_MAX_FRAME_SIZE
	.comm	_EBADFD,4,2                     ; @EBADFD
	.comm	_EFAULT,4,2                     ; @EFAULT
	.comm	_HCI_COMMAND_PKT,1,0            ; @HCI_COMMAND_PKT
	.comm	_HCI_SFLT_MAX_OGF,8,3           ; @HCI_SFLT_MAX_OGF
	.comm	_HCI_FLT_OCF_BITS,8,3           ; @HCI_FLT_OCF_BITS
	.comm	_hci_sec_filter,8,3             ; @hci_sec_filter
	.comm	_CAP_NET_RAW,4,2                ; @CAP_NET_RAW
	.comm	_EPERM,4,2                      ; @EPERM
	.comm	_HCI_RAW,4,2                    ; @HCI_RAW
	.no_dead_strip	_hci_sock_sendmsg
.subsections_via_symbols
