	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ubt_isoc_write_callback
_ubt_isoc_write_callback:               ## @ubt_isoc_write_callback
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	%rdi, %r12
	callq	_usbd_xfer_softc
	movq	%rax, %r14
	leaq	-40(%rbp), %rsi
	leaq	-36(%rbp), %r8
	movq	%r12, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_usbd_xfer_status
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_usbd_xfer_get_frame
	movq	%r12, %rdi
	callq	_USB_GET_STATE
	cmpl	$129, %eax
	je	LBB0_3
## %bb.1:
	cmpl	$128, %eax
	jne	LBB0_10
## %bb.2:
	movl	-40(%rbp), %edx
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_UBT_INFO
	movl	-40(%rbp), %esi
	movq	%r14, %rdi
	callq	_UBT_STAT_BYTES_SENT
	movq	%r14, %rdi
	callq	_UBT_STAT_PCKTS_SENT
	jmp	LBB0_3
LBB0_10:
	movq	_USB_ERR_CANCELLED@GOTPCREL(%rip), %rax
	cmpl	%r15d, (%rax)
	je	LBB0_9
## %bb.11:
	movq	%r14, %rdi
	callq	_UBT_STAT_OERROR
LBB0_3:
	movq	%r12, %rdi
	callq	_usbd_xfer_max_framelen
	movl	-36(%rbp), %ecx
	imull	%ecx, %eax
	testl	%eax, %eax
	jle	LBB0_5
## %bb.4:
	movq	%r14, %rdi
	callq	_UBT_NG_LOCK
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_NG_BT_MBUFQ_DEQUEUE
	movq	%r14, %rdi
	callq	_UBT_NG_UNLOCK
	movl	-36(%rbp), %ecx
LBB0_5:
	testl	%ecx, %ecx
	jle	LBB0_8
## %bb.6:
	xorl	%r14d, %r14d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	callq	_usbd_xfer_max_framelen
	movl	%r14d, %edi
	movl	%eax, %esi
	callq	_min
	movq	%r12, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_usbd_xfer_set_frame_len
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_usbd_xfer_frame_len
	subl	%eax, %r14d
	incl	%ebx
	cmpl	-36(%rbp), %ebx
	jl	LBB0_7
LBB0_8:
	movq	%r12, %rdi
	callq	_usbd_transfer_submit
LBB0_9:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"sent %d bytes to isoc-out pipe\n"

	.comm	_USB_ERR_CANCELLED,4,2          ## @USB_ERR_CANCELLED
	.no_dead_strip	_ubt_isoc_write_callback
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ubt_isoc_write_callback
_ubt_isoc_write_callback:               ; @ubt_isoc_write_callback
	.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	x21, x1
	mov	x19, x0
	bl	_usbd_xfer_softc
	mov	x20, x0
	add	x1, sp, #12
	add	x4, sp, #8
	mov	x0, x19
	mov	x2, #0
	mov	x3, #0
	bl	_usbd_xfer_status
	mov	x0, x19
	mov	w1, #0
	bl	_usbd_xfer_get_frame
	mov	x0, x19
	bl	_USB_GET_STATE
	cmp	w0, #129
	b.eq	LBB0_5
; %bb.1:
	cmp	w0, #128
	b.ne	LBB0_3
; %bb.2:
	ldr	w2, [sp, #12]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_UBT_INFO
	ldr	w1, [sp, #12]
	mov	x0, x20
	bl	_UBT_STAT_BYTES_SENT
	mov	x0, x20
	bl	_UBT_STAT_PCKTS_SENT
	b	LBB0_5
LBB0_3:
Lloh2:
	adrp	x8, _USB_ERR_CANCELLED@GOTPAGE
Lloh3:
	ldr	x8, [x8, _USB_ERR_CANCELLED@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	cmp	w8, w21
	b.eq	LBB0_11
; %bb.4:
	mov	x0, x20
	bl	_UBT_STAT_OERROR
LBB0_5:
	mov	x0, x19
	bl	_usbd_xfer_max_framelen
	ldr	w8, [sp, #8]
	mul	w9, w8, w0
	cmp	w9, #1
	b.lt	LBB0_7
; %bb.6:
	mov	x0, x20
	bl	_UBT_NG_LOCK
	mov	x0, x20
	mov	x1, #0
	bl	_NG_BT_MBUFQ_DEQUEUE
	mov	x0, x20
	bl	_UBT_NG_UNLOCK
	ldr	w8, [sp, #8]
LBB0_7:
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.8:
	mov	w20, #0
	mov	w21, #0
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_usbd_xfer_max_framelen
	mov	x1, x0
	mov	x0, x20
	bl	_min
	mov	x2, x0
	mov	x0, x19
	mov	x1, x21
	bl	_usbd_xfer_set_frame_len
	mov	x0, x19
	mov	x1, x21
	bl	_usbd_xfer_frame_len
	sub	w20, w20, w0
	add	w21, w21, #1
	ldr	w8, [sp, #8]
	cmp	w21, w8
	b.lt	LBB0_9
LBB0_10:
	mov	x0, x19
	bl	_usbd_transfer_submit
LBB0_11:
	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
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"sent %d bytes to isoc-out pipe\n"

	.comm	_USB_ERR_CANCELLED,4,2          ; @USB_ERR_CANCELLED
	.no_dead_strip	_ubt_isoc_write_callback
.subsections_via_symbols
