	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function btusb_submit_isoc_urb
_btusb_submit_isoc_urb:                 ## @btusb_submit_isoc_urb
	.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	%esi, %ebx
	movq	%rdi, %r14
	movq	8(%rdi), %r12
	movl	(%rdi), %esi
	leaq	L_.str(%rip), %rdi
	callq	_BT_DBG
	cmpq	$0, 8(%r12)
	je	LBB0_6
## %bb.1:
	movq	_BTUSB_MAX_ISOC_FRAMES@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	movl	%ebx, %esi
	callq	_usb_alloc_urb
	testq	%rax, %rax
	je	LBB0_9
## %bb.2:
	movq	%rax, %r15
	movq	8(%r12), %rax
	movl	(%rax), %edi
	callq	_le16_to_cpu
	movq	%r13, %rcx
	movl	%eax, %r13d
	imull	(%rcx), %r13d
	movl	%r13d, %edi
	movl	%ebx, %esi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_8
## %bb.3:
	movl	16(%r12), %edi
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	8(%r12), %rax
	movl	8(%rax), %esi
	callq	_usb_rcvisocpipe
	movl	16(%r12), %ecx
	movl	%ecx, 40(%r15)
	movl	%eax, (%r15)
	movq	%r14, 32(%r15)
	movq	_btusb_isoc_complete@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%r15)
	movq	8(%r12), %rax
	movl	4(%rax), %ecx
	movl	%ecx, 20(%r15)
	movq	_URB_FREE_BUFFER@GOTPCREL(%rip), %rcx
	movq	_URB_ISO_ASAP@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	movl	%edx, 4(%r15)
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	%rcx, 8(%r15)
	movl	%r13d, 16(%r15)
	movl	(%rax), %edi
	callq	_le16_to_cpu
	movq	%r15, %rdi
	movl	%r13d, %esi
	movl	%eax, %edx
	callq	___fill_isoc_descriptor
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_usb_anchor_urb
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_usb_submit_urb
	movl	%eax, %ebx
	testl	%eax, %eax
	jns	LBB0_5
## %bb.4:
	movl	(%r14), %esi
	movl	%ebx, %ecx
	negl	%ecx
	leaq	L_.str.1(%rip), %rdi
	movq	%r15, %rdx
	callq	_BT_ERR
	movq	%r15, %rdi
	callq	_usb_unanchor_urb
LBB0_5:
	movq	%r15, %rdi
	callq	_usb_free_urb
	jmp	LBB0_11
LBB0_6:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_8:
	movq	%r15, %rdi
	callq	_usb_free_urb
LBB0_9:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_10:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_11:
	movl	%ebx, %eax
	addq	$8, %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	_ENODEV,4,2                     ## @ENODEV
	.comm	_BTUSB_MAX_ISOC_FRAMES,4,2      ## @BTUSB_MAX_ISOC_FRAMES
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_btusb_isoc_complete,4,2        ## @btusb_isoc_complete
	.comm	_URB_FREE_BUFFER,4,2            ## @URB_FREE_BUFFER
	.comm	_URB_ISO_ASAP,4,2               ## @URB_ISO_ASAP
L_.str.1:                               ## @.str.1
	.asciz	"%s urb %p submission failed (%d)"

	.no_dead_strip	_btusb_submit_isoc_urb
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function btusb_submit_isoc_urb
_btusb_submit_isoc_urb:                 ; @btusb_submit_isoc_urb
	.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, x1
	mov	x20, x0
	ldr	x22, [x0, #8]
	ldr	w1, [x0]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_BT_DBG
	ldr	x8, [x22, #8]
	cbz	x8, LBB0_6
; %bb.1:
Lloh2:
	adrp	x23, _BTUSB_MAX_ISOC_FRAMES@GOTPAGE
Lloh3:
	ldr	x23, [x23, _BTUSB_MAX_ISOC_FRAMES@GOTPAGEOFF]
	ldr	w0, [x23]
	mov	x1, x21
	bl	_usb_alloc_urb
	cbz	x0, LBB0_8
; %bb.2:
	mov	x19, x0
	ldr	x8, [x22, #8]
	ldr	w0, [x8]
	bl	_le16_to_cpu
	ldr	w8, [x23]
	mul	w23, w8, w0
	mov	x0, x23
	mov	x1, x21
	bl	_kmalloc
	cbz	x0, LBB0_7
; %bb.3:
	mov	x24, x0
	ldr	w0, [x22, #16]
	ldr	x8, [x22, #8]
	ldr	w1, [x8, #8]
	bl	_usb_rcvisocpipe
	ldr	w8, [x22, #16]
	str	w8, [x19, #40]
	str	w0, [x19]
	str	x20, [x19, #32]
Lloh4:
	adrp	x8, _btusb_isoc_complete@GOTPAGE
Lloh5:
	ldr	x8, [x8, _btusb_isoc_complete@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	str	w8, [x19, #24]
Lloh7:
	adrp	x8, _URB_FREE_BUFFER@GOTPAGE
Lloh8:
	ldr	x8, [x8, _URB_FREE_BUFFER@GOTPAGEOFF]
	ldr	x9, [x22, #8]
Lloh9:
	ldr	w8, [x8]
Lloh10:
	adrp	x10, _URB_ISO_ASAP@GOTPAGE
Lloh11:
	ldr	x10, [x10, _URB_ISO_ASAP@GOTPAGEOFF]
Lloh12:
	ldr	w10, [x10]
	orr	w8, w10, w8
	str	w8, [x19, #4]
	str	x24, [x19, #8]
	ldp	w0, w8, [x9]
	stp	w23, w8, [x19, #16]
	bl	_le16_to_cpu
	mov	x2, x0
	mov	x0, x19
	mov	x1, x23
	bl	___fill_isoc_descriptor
	mov	x0, x19
	mov	x1, x22
	bl	_usb_anchor_urb
	mov	x0, x19
	mov	x1, x21
	bl	_usb_submit_urb
	mov	x21, x0
	tbz	w0, #31, LBB0_5
; %bb.4:
	ldr	w1, [x20]
	neg	w3, w21
Lloh13:
	adrp	x0, l_.str.1@PAGE
Lloh14:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x2, x19
	bl	_BT_ERR
	mov	x0, x19
	bl	_usb_unanchor_urb
LBB0_5:
	mov	x0, x19
	bl	_usb_free_urb
	b	LBB0_10
LBB0_6:
Lloh15:
	adrp	x8, _ENODEV@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_9
LBB0_7:
	mov	x0, x19
	bl	_usb_free_urb
LBB0_8:
Lloh17:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_10:
	mov	x0, x21
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_BTUSB_MAX_ISOC_FRAMES,4,2      ; @BTUSB_MAX_ISOC_FRAMES
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_btusb_isoc_complete,4,2        ; @btusb_isoc_complete
	.comm	_URB_FREE_BUFFER,4,2            ; @URB_FREE_BUFFER
	.comm	_URB_ISO_ASAP,4,2               ; @URB_ISO_ASAP
l_.str.1:                               ; @.str.1
	.asciz	"%s urb %p submission failed (%d)"

	.no_dead_strip	_btusb_submit_isoc_urb
.subsections_via_symbols
