	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bpa10x_send_frame
_bpa10x_send_frame:                     ## @bpa10x_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, %r13
	movq	8(%rdi), %r12
	movq	24(%r12), %r14
	movl	(%r12), %esi
	leaq	L_.str(%rip), %rdi
	callq	_BT_DBG
	movq	_HCI_RUNNING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	16(%r12), %rsi
	callq	_test_bit
	testl	%eax, %eax
	je	LBB0_7
## %bb.1:
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%ebx, %ebx
	xorl	%edi, %edi
	callq	_usb_alloc_urb
	testq	%rax, %rax
	je	LBB0_8
## %bb.2:
	movq	%rax, %r15
	movq	%r13, %rdi
	callq	_bt_cb
	movl	(%rax), %ebx
	movq	%r13, %rdi
	movl	$1, %esi
	callq	_skb_push
	movl	%ebx, (%rax)
	movq	%r13, %rdi
	callq	_bt_cb
	movl	(%rax), %eax
	cmpl	$128, %eax
	je	LBB0_9
## %bb.3:
	cmpl	$130, %eax
	je	LBB0_10
## %bb.4:
	cmpl	$129, %eax
	jne	LBB0_14
## %bb.5:
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$20, %edi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_15
## %bb.6:
	movq	%rax, %rbx
	movq	_USB_TYPE_VENDOR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rbx)
	movl	$0, 12(%rbx)
	movq	$0, 4(%rbx)
	movl	(%r13), %edi
	callq	___cpu_to_le16
	movl	%eax, (%rbx)
	movl	4(%r14), %edi
	xorl	%esi, %esi
	callq	_usb_sndctrlpipe
	movl	4(%r14), %esi
	movl	(%r13), %r9d
	movl	4(%r13), %r8d
	movq	_bpa10x_tx_complete@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	%r13, 8(%rsp)
	movl	%ecx, (%rsp)
	movq	%r15, %rdi
	movl	%eax, %edx
	movq	%rbx, %rcx
	callq	_usb_fill_control_urb
	leaq	12(%r12), %rax
	jmp	LBB0_11
LBB0_7:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	jmp	LBB0_16
LBB0_8:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_9:
	movl	4(%r14), %edi
	movl	$2, %esi
	callq	_usb_sndbulkpipe
	movl	4(%r14), %esi
	movl	(%r13), %r8d
	movl	4(%r13), %ecx
	movq	_bpa10x_tx_complete@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r9d
	movq	%r13, (%rsp)
	movq	%r15, %rdi
	movl	%eax, %edx
	callq	_usb_fill_bulk_urb
	leaq	4(%r12), %rax
	jmp	LBB0_11
LBB0_10:
	movl	4(%r14), %edi
	movl	$2, %esi
	callq	_usb_sndbulkpipe
	movl	4(%r14), %esi
	movl	(%r13), %r8d
	movl	4(%r13), %ecx
	movq	_bpa10x_tx_complete@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r9d
	movq	%r13, (%rsp)
	movq	%r15, %rdi
	movl	%eax, %edx
	callq	_usb_fill_bulk_urb
	leaq	8(%r12), %rax
LBB0_11:
	incl	(%rax)
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_usb_anchor_urb
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_usb_submit_urb
	testl	%eax, %eax
	jns	LBB0_13
## %bb.12:
	movl	(%r12), %esi
	leaq	L_.str.1(%rip), %rdi
	movq	%r15, %rdx
	callq	_BT_ERR
	movl	(%r15), %edi
	callq	_kfree
	movq	%r15, %rdi
	callq	_usb_unanchor_urb
LBB0_13:
	movq	%r15, %rdi
	callq	_usb_free_urb
	xorl	%ebx, %ebx
	jmp	LBB0_18
LBB0_14:
	movq	%r15, %rdi
	callq	_usb_free_urb
	movq	_EILSEQ@GOTPCREL(%rip), %rax
	jmp	LBB0_16
LBB0_15:
	movq	%r15, %rdi
	callq	_usb_free_urb
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_16:
	xorl	%ebx, %ebx
LBB0_17:
	subl	(%rax), %ebx
LBB0_18:
	movl	%ebx, %eax
	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	"%s"

	.comm	_HCI_RUNNING,4,2                ## @HCI_RUNNING
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_GFP_ATOMIC,4,2                 ## @GFP_ATOMIC
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_USB_TYPE_VENDOR,4,2            ## @USB_TYPE_VENDOR
	.comm	_bpa10x_tx_complete,4,2         ## @bpa10x_tx_complete
	.comm	_EILSEQ,4,2                     ## @EILSEQ
L_.str.1:                               ## @.str.1
	.asciz	"%s urb %p submission failed"

	.no_dead_strip	_bpa10x_send_frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bpa10x_send_frame
_bpa10x_send_frame:                     ; @bpa10x_send_frame
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x21, x0
	ldr	x23, [x0, #8]
	ldr	x20, [x23, #24]
	ldr	w1, [x23]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_BT_DBG
Lloh2:
	adrp	x8, _HCI_RUNNING@GOTPAGE
Lloh3:
	ldr	x8, [x8, _HCI_RUNNING@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	add	x1, x23, #16
	bl	_test_bit
	cbz	w0, LBB0_7
; %bb.1:
Lloh5:
	adrp	x24, _GFP_ATOMIC@GOTPAGE
Lloh6:
	ldr	x24, [x24, _GFP_ATOMIC@GOTPAGEOFF]
	ldr	w1, [x24]
	mov	w0, #0
	bl	_usb_alloc_urb
	cbz	x0, LBB0_15
; %bb.2:
	mov	x19, x0
	mov	x0, x21
	bl	_bt_cb
	ldr	w22, [x0]
	mov	x0, x21
	mov	w1, #1
	bl	_skb_push
	str	w22, [x0]
	mov	x0, x21
	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_13
; %bb.5:
	ldr	w1, [x24]
	mov	w0, #20
	bl	_kmalloc
	cbz	x0, LBB0_14
; %bb.6:
	mov	x22, x0
Lloh7:
	adrp	x8, _USB_TYPE_VENDOR@GOTPAGE
Lloh8:
	ldr	x8, [x8, _USB_TYPE_VENDOR@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	str	w8, [x0, #16]
	str	xzr, [x0, #8]
	str	wzr, [x0, #4]
	ldr	w0, [x21]
	bl	___cpu_to_le16
	str	w0, [x22]
	ldr	w0, [x20, #4]
	mov	w1, #0
	bl	_usb_sndctrlpipe
	mov	x2, x0
	ldr	w1, [x20, #4]
	ldp	w5, w4, [x21]
Lloh10:
	adrp	x8, _bpa10x_tx_complete@GOTPAGE
Lloh11:
	ldr	x8, [x8, _bpa10x_tx_complete@GOTPAGEOFF]
Lloh12:
	ldr	w6, [x8]
	mov	x0, x19
	mov	x3, x22
	mov	x7, x21
	bl	_usb_fill_control_urb
	add	x8, x23, #12
	b	LBB0_10
LBB0_7:
Lloh13:
	adrp	x8, _EBUSY@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_16
LBB0_8:
	ldr	w0, [x20, #4]
	mov	w1, #2
	bl	_usb_sndbulkpipe
	mov	x2, x0
	ldr	w1, [x20, #4]
	ldp	w4, w3, [x21]
Lloh15:
	adrp	x8, _bpa10x_tx_complete@GOTPAGE
Lloh16:
	ldr	x8, [x8, _bpa10x_tx_complete@GOTPAGEOFF]
Lloh17:
	ldr	w5, [x8]
	mov	x0, x19
	mov	x6, x21
	bl	_usb_fill_bulk_urb
	add	x8, x23, #4
	b	LBB0_10
LBB0_9:
	ldr	w0, [x20, #4]
	mov	w1, #2
	bl	_usb_sndbulkpipe
	mov	x2, x0
	ldr	w1, [x20, #4]
	ldp	w4, w3, [x21]
Lloh18:
	adrp	x8, _bpa10x_tx_complete@GOTPAGE
Lloh19:
	ldr	x8, [x8, _bpa10x_tx_complete@GOTPAGEOFF]
Lloh20:
	ldr	w5, [x8]
	mov	x0, x19
	mov	x6, x21
	bl	_usb_fill_bulk_urb
	add	x8, x23, #8
LBB0_10:
	ldr	w9, [x8]
	add	w9, w9, #1
	str	w9, [x8]
	mov	x0, x19
	mov	x1, x20
	bl	_usb_anchor_urb
	ldr	w1, [x24]
	mov	x0, x19
	bl	_usb_submit_urb
	tbz	w0, #31, LBB0_12
; %bb.11:
	ldr	w1, [x23]
Lloh21:
	adrp	x0, l_.str.1@PAGE
Lloh22:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x2, x19
	bl	_BT_ERR
	ldr	w0, [x19]
	bl	_kfree
	mov	x0, x19
	bl	_usb_unanchor_urb
LBB0_12:
	mov	x0, x19
	bl	_usb_free_urb
	mov	w0, #0
	b	LBB0_17
LBB0_13:
	mov	x0, x19
	bl	_usb_free_urb
Lloh23:
	adrp	x8, _EILSEQ@GOTPAGE
Lloh24:
	ldr	x8, [x8, _EILSEQ@GOTPAGEOFF]
	b	LBB0_16
LBB0_14:
	mov	x0, x19
	bl	_usb_free_urb
LBB0_15:
Lloh25:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh26:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_16:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_17:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s"

	.comm	_HCI_RUNNING,4,2                ; @HCI_RUNNING
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_GFP_ATOMIC,4,2                 ; @GFP_ATOMIC
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_USB_TYPE_VENDOR,4,2            ; @USB_TYPE_VENDOR
	.comm	_bpa10x_tx_complete,4,2         ; @bpa10x_tx_complete
	.comm	_EILSEQ,4,2                     ; @EILSEQ
l_.str.1:                               ; @.str.1
	.asciz	"%s urb %p submission failed"

	.no_dead_strip	_bpa10x_send_frame
.subsections_via_symbols
