	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bfusb_send_frame
_bfusb_send_frame:                      ## @bfusb_send_frame
	.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	%rdi, %r14
	movq	8(%rdi), %rbx
	callq	_bt_cb
	movl	(%rax), %ecx
	movl	(%r14), %r8d
	leaq	L_.str(%rip), %rdi
	movq	%rbx, %rsi
	movq	%r14, %rdx
	callq	_BT_DBG
	testq	%rbx, %rbx
	je	LBB0_1
## %bb.2:
	movq	_HCI_RUNNING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	24(%rbx), %rsi
	callq	_test_bit
	testl	%eax, %eax
	je	LBB0_3
## %bb.5:
	movq	16(%rbx), %r15
	movq	%r14, %rdi
	callq	_bt_cb
	movl	(%rax), %eax
	cmpl	$128, %eax
	je	LBB0_10
## %bb.6:
	cmpl	$130, %eax
	je	LBB0_9
## %bb.7:
	cmpl	$129, %eax
	jne	LBB0_11
## %bb.8:
	incl	8(%rbx)
	jmp	LBB0_11
LBB0_1:
	leaq	L_.str.1(%rip), %rdi
	callq	_BT_ERR
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	jmp	LBB0_4
LBB0_3:
	movq	_EBUSY@GOTPCREL(%rip), %rcx
	jmp	LBB0_4
LBB0_10:
	incl	(%rbx)
	jmp	LBB0_11
LBB0_9:
	incl	4(%rbx)
LBB0_11:
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_skb_push
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_bt_cb
	movl	%ebx, %edi
	movq	%rax, %rsi
	movl	$1, %edx
	callq	_memcpy
	movl	(%r14), %ebx
	leal	32(%rbx), %edi
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_bt_skb_alloc
	testq	%rax, %rax
	je	LBB0_12
## %bb.13:
	movq	%rax, %r12
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movq	%r15, 8(%rax)
	testl	%ebx, %ebx
	movq	%r14, %r15
	je	LBB0_16
## %bb.14:
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	movq	_uint@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_BFUSB_MAX_BLOCK_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%ebx, %esi
	callq	_min_t
	movl	%eax, %r13d
	testl	%r14d, %r14d
	sete	%al
	shlb	$2, %al
	cmpl	%r13d, %ebx
	sete	%cl
	shlb	$3, %cl
	orb	%al, %cl
	orb	$-63, %cl
	movb	%cl, -43(%rbp)
	movq	_BFUSB_MAX_BLOCK_SIZE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r13d
	movb	$0, -42(%rbp)
	movl	%r13d, %eax
	movl	$0, %ecx
	cmovel	%ecx, %eax
	movb	%al, -41(%rbp)
	movq	%r12, %rdi
	movl	$3, %esi
	callq	_skb_put
	movl	%eax, %edi
	leaq	-43(%rbp), %rsi
	movl	$3, %edx
	callq	_memcpy
	movq	%r12, %rdi
	movl	%r13d, %esi
	callq	_skb_put
	movq	%r15, %rdi
	movl	%r14d, %esi
	movl	%eax, %edx
	movl	%r13d, %ecx
	callq	_skb_copy_from_linear_data_offset
	addl	%r13d, %r14d
	subl	%r13d, %ebx
	jne	LBB0_15
LBB0_16:
	movl	(%r12), %eax
	cltd
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	idivl	(%rbx)
	testl	%edx, %edx
	jne	LBB0_18
## %bb.17:
	movw	$221, -43(%rbp)
	movq	%r12, %rdi
	movl	$2, %esi
	callq	_skb_put
	leaq	-43(%rbp), %rsi
	movl	%eax, %edi
	movl	$2, %edx
	callq	_memcpy
LBB0_18:
	leaq	4(%rbx), %r14
	movq	%r14, %rdi
	callq	_read_lock
	leaq	8(%rbx), %rdi
	movq	%r12, %rsi
	callq	_skb_queue_tail
	movq	%rbx, %rdi
	callq	_bfusb_tx_wakeup
	movq	%r14, %rdi
	callq	_read_unlock
	movq	%r15, %rdi
	callq	_kfree_skb
	xorl	%eax, %eax
	jmp	LBB0_19
LBB0_12:
	leaq	L_.str.2(%rip), %rdi
	callq	_BT_ERR
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
LBB0_4:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_19:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"hdev %p skb %p type %d len %d"

L_.str.1:                               ## @.str.1
	.asciz	"Frame for unknown HCI device (hdev=NULL)"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_HCI_RUNNING,4,2                ## @HCI_RUNNING
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_GFP_ATOMIC,4,2                 ## @GFP_ATOMIC
L_.str.2:                               ## @.str.2
	.asciz	"Can't allocate memory for new packet"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_uint,4,2                       ## @uint
	.comm	_BFUSB_MAX_BLOCK_SIZE,4,2       ## @BFUSB_MAX_BLOCK_SIZE
	.no_dead_strip	_bfusb_send_frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bfusb_send_frame
_bfusb_send_frame:                      ; @bfusb_send_frame
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
	ldr	x21, [x0, #8]
	bl	_bt_cb
	ldr	w3, [x0]
	ldr	w4, [x19]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x21
	mov	x2, x19
	bl	_BT_DBG
	cbz	x21, LBB0_6
; %bb.1:
Lloh2:
	adrp	x8, _HCI_RUNNING@GOTPAGE
Lloh3:
	ldr	x8, [x8, _HCI_RUNNING@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	add	x1, x21, #24
	bl	_test_bit
	cbz	w0, LBB0_7
; %bb.2:
	ldr	x20, [x21, #16]
	mov	x0, x19
	bl	_bt_cb
	ldr	w8, [x0]
	cmp	w8, #128
	b.eq	LBB0_8
; %bb.3:
	cmp	w8, #130
	b.eq	LBB0_9
; %bb.4:
	cmp	w8, #129
	b.ne	LBB0_10
; %bb.5:
	ldr	w8, [x21, #8]
	add	w8, w8, #1
	str	w8, [x21, #8]
	b	LBB0_10
LBB0_6:
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_BT_ERR
Lloh7:
	adrp	x8, _ENODEV@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_18
LBB0_7:
Lloh9:
	adrp	x8, _EBUSY@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_18
LBB0_8:
	ldr	w8, [x21]
	add	w8, w8, #1
	str	w8, [x21]
	b	LBB0_10
LBB0_9:
	ldr	w8, [x21, #4]
	add	w8, w8, #1
	str	w8, [x21, #4]
LBB0_10:
	mov	x0, x19
	mov	w1, #1
	bl	_skb_push
	mov	x21, x0
	mov	x0, x19
	bl	_bt_cb
	mov	x1, x0
	mov	x0, x21
	mov	w2, #1
	bl	_memcpy
	ldr	w22, [x19]
	add	w0, w22, #32
Lloh11:
	adrp	x8, _GFP_ATOMIC@GOTPAGE
Lloh12:
	ldr	x8, [x8, _GFP_ATOMIC@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	bl	_bt_skb_alloc
	cbz	x0, LBB0_17
; %bb.11:
	mov	x21, x0
	str	x20, [x0, #8]
	cbz	w22, LBB0_14
; %bb.12:
	mov	w23, #0
Lloh14:
	adrp	x25, _uint@GOTPAGE
Lloh15:
	ldr	x25, [x25, _uint@GOTPAGEOFF]
Lloh16:
	adrp	x26, _BFUSB_MAX_BLOCK_SIZE@GOTPAGE
Lloh17:
	ldr	x26, [x26, _BFUSB_MAX_BLOCK_SIZE@GOTPAGEOFF]
	mov	w27, #-63
	mov	w28, #-59
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x25]
	ldr	w2, [x26]
	mov	x1, x22
	bl	_min_t
	mov	x24, x0
	cmp	w23, #0
	csel	w8, w28, w27, eq
	subs	w22, w22, w0
	cset	w9, eq
	bfi	w8, w9, #3, #1
	strb	w8, [sp, #13]
	strb	wzr, [sp, #14]
	ldr	w8, [x26]
	cmp	w0, w8
	csel	w8, wzr, w0, eq
	strb	w8, [sp, #15]
	mov	x0, x21
	mov	w1, #3
	bl	_skb_put
	add	x1, sp, #13
	mov	w2, #3
	bl	_memcpy
	mov	x0, x21
	mov	x1, x24
	bl	_skb_put
	mov	x2, x0
	mov	x0, x19
	mov	x1, x23
	mov	x3, x24
	bl	_skb_copy_from_linear_data_offset
	add	w23, w24, w23
	cbnz	w22, LBB0_13
LBB0_14:
	ldr	w8, [x21]
	ldr	w9, [x20]
	sdiv	w10, w8, w9
	msub	w8, w10, w9, w8
	cbnz	w8, LBB0_16
; %bb.15:
	mov	w8, #221
	sturh	w8, [sp, #13]
	mov	x0, x21
	mov	w1, #2
	bl	_skb_put
	add	x1, sp, #13
	mov	w2, #2
	bl	_memcpy
LBB0_16:
	add	x22, x20, #4
	mov	x0, x22
	bl	_read_lock
	add	x0, x20, #8
	mov	x1, x21
	bl	_skb_queue_tail
	mov	x0, x20
	bl	_bfusb_tx_wakeup
	mov	x0, x22
	bl	_read_unlock
	mov	x0, x19
	bl	_kfree_skb
	mov	w0, #0
	b	LBB0_19
LBB0_17:
Lloh18:
	adrp	x0, l_.str.2@PAGE
Lloh19:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_BT_ERR
Lloh20:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_18:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_19:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"hdev %p skb %p type %d len %d"

l_.str.1:                               ; @.str.1
	.asciz	"Frame for unknown HCI device (hdev=NULL)"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_HCI_RUNNING,4,2                ; @HCI_RUNNING
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_GFP_ATOMIC,4,2                 ; @GFP_ATOMIC
l_.str.2:                               ; @.str.2
	.asciz	"Can't allocate memory for new packet"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_uint,4,2                       ; @uint
	.comm	_BFUSB_MAX_BLOCK_SIZE,4,2       ; @BFUSB_MAX_BLOCK_SIZE
	.no_dead_strip	_bfusb_send_frame
.subsections_via_symbols
