	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function btusb_bulk_complete
_btusb_bulk_complete:                   ## @btusb_bulk_complete
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	16(%rdi), %r14
	movq	16(%r14), %r15
	movl	(%r14), %esi
	movl	(%rdi), %r8d
	movl	8(%rdi), %ecx
	leaq	L_.str(%rip), %rdi
	movq	%rbx, %rdx
	callq	_BT_DBG
	movq	_HCI_RUNNING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	12(%r14), %rsi
	callq	_test_bit
	testl	%eax, %eax
	je	LBB0_6
## %bb.1:
	cmpl	$0, 8(%rbx)
	jne	LBB0_4
## %bb.2:
	movl	(%rbx), %ecx
	addl	%ecx, 8(%r14)
	movq	_HCI_ACLDATA_PKT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	4(%rbx), %edx
	movq	%r14, %rdi
	callq	_hci_recv_fragment
	testq	%rax, %rax
	jns	LBB0_4
## %bb.3:
	movl	(%r14), %esi
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_BT_ERR
	incl	4(%r14)
LBB0_4:
	movq	_BTUSB_BULK_RUNNING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	8(%r15), %rsi
	callq	_test_bit
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	leaq	4(%r15), %rsi
	movq	%rbx, %rdi
	callq	_usb_anchor_urb
	movl	(%r15), %edi
	callq	_usb_mark_last_busy
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_usb_submit_urb
	testl	%eax, %eax
	js	LBB0_7
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movl	(%r14), %esi
	negl	%eax
	leaq	L_.str.2(%rip), %rdi
	movq	%rbx, %rdx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_BT_ERR
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_usb_unanchor_urb               ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s urb %p status %d count %d"

	.comm	_HCI_RUNNING,4,2                ## @HCI_RUNNING
	.comm	_HCI_ACLDATA_PKT,4,2            ## @HCI_ACLDATA_PKT
L_.str.1:                               ## @.str.1
	.asciz	"%s corrupted ACL packet"

	.comm	_BTUSB_BULK_RUNNING,4,2         ## @BTUSB_BULK_RUNNING
	.comm	_GFP_ATOMIC,4,2                 ## @GFP_ATOMIC
L_.str.2:                               ## @.str.2
	.asciz	"%s urb %p failed to resubmit (%d)"

	.no_dead_strip	_btusb_bulk_complete
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function btusb_bulk_complete
_btusb_bulk_complete:                   ; @btusb_bulk_complete
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
	ldr	x20, [x0, #16]
	ldr	x21, [x20, #16]
	ldr	w1, [x20]
	ldr	w3, [x0, #8]
	ldr	w4, [x0]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x2, x19
	bl	_BT_DBG
Lloh2:
	adrp	x8, _HCI_RUNNING@GOTPAGE
Lloh3:
	ldr	x8, [x8, _HCI_RUNNING@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	add	x1, x20, #12
	bl	_test_bit
	cbz	w0, LBB0_6
; %bb.1:
	ldr	w8, [x19, #8]
	cbnz	w8, LBB0_4
; %bb.2:
	ldr	w8, [x20, #8]
	ldp	w3, w2, [x19]
	add	w8, w8, w3
	str	w8, [x20, #8]
Lloh5:
	adrp	x8, _HCI_ACLDATA_PKT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _HCI_ACLDATA_PKT@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_hci_recv_fragment
	tbz	x0, #63, LBB0_4
; %bb.3:
	ldr	w1, [x20]
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_BT_ERR
	ldr	w8, [x20, #4]
	add	w8, w8, #1
	str	w8, [x20, #4]
LBB0_4:
Lloh10:
	adrp	x8, _BTUSB_BULK_RUNNING@GOTPAGE
Lloh11:
	ldr	x8, [x8, _BTUSB_BULK_RUNNING@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	add	x1, x21, #8
	bl	_test_bit
	cbz	w0, LBB0_6
; %bb.5:
	add	x1, x21, #4
	mov	x0, x19
	bl	_usb_anchor_urb
	ldr	w0, [x21]
	bl	_usb_mark_last_busy
Lloh13:
	adrp	x8, _GFP_ATOMIC@GOTPAGE
Lloh14:
	ldr	x8, [x8, _GFP_ATOMIC@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_usb_submit_urb
	tbnz	w0, #31, LBB0_7
LBB0_6:
	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
	add	sp, sp, #64
	ret
LBB0_7:
	ldr	w1, [x20]
	neg	w8, w0
	stp	x19, x8, [sp]
Lloh16:
	adrp	x0, l_.str.2@PAGE
Lloh17:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_BT_ERR
	mov	x0, x19
	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
	add	sp, sp, #64
	b	_usb_unanchor_urb
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s urb %p status %d count %d"

	.comm	_HCI_RUNNING,4,2                ; @HCI_RUNNING
	.comm	_HCI_ACLDATA_PKT,4,2            ; @HCI_ACLDATA_PKT
l_.str.1:                               ; @.str.1
	.asciz	"%s corrupted ACL packet"

	.comm	_BTUSB_BULK_RUNNING,4,2         ; @BTUSB_BULK_RUNNING
	.comm	_GFP_ATOMIC,4,2                 ; @GFP_ATOMIC
l_.str.2:                               ; @.str.2
	.asciz	"%s urb %p failed to resubmit (%d)"

	.no_dead_strip	_btusb_bulk_complete
.subsections_via_symbols
