	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ubt_task
_ubt_task:                              ## @ubt_task
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	callq	_UBT_NG_LOCK
	movl	(%r12), %r15d
	movl	$0, (%r12)
	movq	%r12, %rdi
	callq	_UBT_NG_UNLOCK
	movq	_UBT_FLAG_T_STOP_ALL@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_4
## %bb.1:
	movq	_UBT_N_TRANSFER@GOTPCREL(%rip), %r14
	cmpl	$0, (%r14)
	jle	LBB0_4
## %bb.2:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r12), %rax
	movl	(%rax,%rbx,4), %edi
	callq	_usbd_transfer_drain
	incq	%rbx
	movslq	(%r14), %rax
	cmpq	%rax, %rbx
	jl	LBB0_3
LBB0_4:
	movq	_UBT_FLAG_T_START_ALL@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_6
## %bb.5:
	leaq	4(%r12), %r14
	movq	%r14, %rdi
	callq	_mtx_lock
	movq	_UBT_IF_0_INTR_DT_RD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_ubt_xfer_start
	movq	_UBT_IF_0_BULK_DT_RD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_ubt_xfer_start
	movq	_UBT_IF_1_ISOC_DT_RD1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_ubt_xfer_start
	movq	_UBT_IF_1_ISOC_DT_RD2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_ubt_xfer_start
	movq	_UBT_IF_1_ISOC_DT_WR1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_ubt_xfer_start
	movq	_UBT_IF_1_ISOC_DT_WR2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_ubt_xfer_start
	movq	%r14, %rdi
	callq	_mtx_unlock
LBB0_6:
	movq	_UBT_FLAG_T_START_CTRL@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_8
## %bb.7:
	leaq	4(%r12), %r14
	movq	%r14, %rdi
	callq	_mtx_lock
	movq	_UBT_IF_0_CTRL_DT_WR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_ubt_xfer_start
	movq	%r14, %rdi
	callq	_mtx_unlock
LBB0_8:
	movq	_UBT_FLAG_T_START_BULK@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_9
## %bb.10:
	leaq	4(%r12), %r14
	movq	%r14, %rdi
	callq	_mtx_lock
	movq	_UBT_IF_0_BULK_DT_WR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_ubt_xfer_start
	movq	%r14, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mtx_unlock                     ## TAILCALL
LBB0_9:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_UBT_FLAG_T_STOP_ALL,4,2        ## @UBT_FLAG_T_STOP_ALL
	.comm	_UBT_N_TRANSFER,4,2             ## @UBT_N_TRANSFER
	.comm	_UBT_FLAG_T_START_ALL,4,2       ## @UBT_FLAG_T_START_ALL
	.comm	_UBT_IF_0_INTR_DT_RD,4,2        ## @UBT_IF_0_INTR_DT_RD
	.comm	_UBT_IF_0_BULK_DT_RD,4,2        ## @UBT_IF_0_BULK_DT_RD
	.comm	_UBT_IF_1_ISOC_DT_RD1,4,2       ## @UBT_IF_1_ISOC_DT_RD1
	.comm	_UBT_IF_1_ISOC_DT_RD2,4,2       ## @UBT_IF_1_ISOC_DT_RD2
	.comm	_UBT_IF_1_ISOC_DT_WR1,4,2       ## @UBT_IF_1_ISOC_DT_WR1
	.comm	_UBT_IF_1_ISOC_DT_WR2,4,2       ## @UBT_IF_1_ISOC_DT_WR2
	.comm	_UBT_FLAG_T_START_CTRL,4,2      ## @UBT_FLAG_T_START_CTRL
	.comm	_UBT_IF_0_CTRL_DT_WR,4,2        ## @UBT_IF_0_CTRL_DT_WR
	.comm	_UBT_FLAG_T_START_BULK,4,2      ## @UBT_FLAG_T_START_BULK
	.comm	_UBT_IF_0_BULK_DT_WR,4,2        ## @UBT_IF_0_BULK_DT_WR
	.no_dead_strip	_ubt_task
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ubt_task
_ubt_task:                              ; @ubt_task
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	bl	_UBT_NG_LOCK
	ldr	w21, [x19]
	str	wzr, [x19]
	mov	x0, x19
	bl	_UBT_NG_UNLOCK
Lloh0:
	adrp	x8, _UBT_FLAG_T_STOP_ALL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _UBT_FLAG_T_STOP_ALL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	and	w8, w8, w21
Lloh3:
	adrp	x20, _UBT_N_TRANSFER@GOTPAGE
Lloh4:
	ldr	x20, [x20, _UBT_N_TRANSFER@GOTPAGEOFF]
	ldr	w9, [x20]
	cmp	w8, #0
	ccmp	w9, #1, #8, ne
	b.lt	LBB0_3
; %bb.1:
	mov	x22, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	ldr	w0, [x8, x22, lsl #2]
	bl	_usbd_transfer_drain
	add	x22, x22, #1
	ldrsw	x8, [x20]
	cmp	x22, x8
	b.lt	LBB0_2
LBB0_3:
Lloh5:
	adrp	x8, _UBT_FLAG_T_START_ALL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _UBT_FLAG_T_START_ALL@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_5
; %bb.4:
	add	x20, x19, #4
	mov	x0, x20
	bl	_mtx_lock
Lloh8:
	adrp	x8, _UBT_IF_0_INTR_DT_RD@GOTPAGE
Lloh9:
	ldr	x8, [x8, _UBT_IF_0_INTR_DT_RD@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ubt_xfer_start
Lloh11:
	adrp	x8, _UBT_IF_0_BULK_DT_RD@GOTPAGE
Lloh12:
	ldr	x8, [x8, _UBT_IF_0_BULK_DT_RD@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ubt_xfer_start
Lloh14:
	adrp	x8, _UBT_IF_1_ISOC_DT_RD1@GOTPAGE
Lloh15:
	ldr	x8, [x8, _UBT_IF_1_ISOC_DT_RD1@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ubt_xfer_start
Lloh17:
	adrp	x8, _UBT_IF_1_ISOC_DT_RD2@GOTPAGE
Lloh18:
	ldr	x8, [x8, _UBT_IF_1_ISOC_DT_RD2@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ubt_xfer_start
Lloh20:
	adrp	x8, _UBT_IF_1_ISOC_DT_WR1@GOTPAGE
Lloh21:
	ldr	x8, [x8, _UBT_IF_1_ISOC_DT_WR1@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ubt_xfer_start
Lloh23:
	adrp	x8, _UBT_IF_1_ISOC_DT_WR2@GOTPAGE
Lloh24:
	ldr	x8, [x8, _UBT_IF_1_ISOC_DT_WR2@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ubt_xfer_start
	mov	x0, x20
	bl	_mtx_unlock
LBB0_5:
Lloh26:
	adrp	x8, _UBT_FLAG_T_START_CTRL@GOTPAGE
Lloh27:
	ldr	x8, [x8, _UBT_FLAG_T_START_CTRL@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_7
; %bb.6:
	add	x20, x19, #4
	mov	x0, x20
	bl	_mtx_lock
Lloh29:
	adrp	x8, _UBT_IF_0_CTRL_DT_WR@GOTPAGE
Lloh30:
	ldr	x8, [x8, _UBT_IF_0_CTRL_DT_WR@GOTPAGEOFF]
Lloh31:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ubt_xfer_start
	mov	x0, x20
	bl	_mtx_unlock
LBB0_7:
Lloh32:
	adrp	x8, _UBT_FLAG_T_START_BULK@GOTPAGE
Lloh33:
	ldr	x8, [x8, _UBT_FLAG_T_START_BULK@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_9
; %bb.8:
	add	x20, x19, #4
	mov	x0, x20
	bl	_mtx_lock
Lloh35:
	adrp	x8, _UBT_IF_0_BULK_DT_WR@GOTPAGE
Lloh36:
	ldr	x8, [x8, _UBT_IF_0_BULK_DT_WR@GOTPAGEOFF]
Lloh37:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ubt_xfer_start
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_mtx_unlock
LBB0_9:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.comm	_UBT_FLAG_T_STOP_ALL,4,2        ; @UBT_FLAG_T_STOP_ALL
	.comm	_UBT_N_TRANSFER,4,2             ; @UBT_N_TRANSFER
	.comm	_UBT_FLAG_T_START_ALL,4,2       ; @UBT_FLAG_T_START_ALL
	.comm	_UBT_IF_0_INTR_DT_RD,4,2        ; @UBT_IF_0_INTR_DT_RD
	.comm	_UBT_IF_0_BULK_DT_RD,4,2        ; @UBT_IF_0_BULK_DT_RD
	.comm	_UBT_IF_1_ISOC_DT_RD1,4,2       ; @UBT_IF_1_ISOC_DT_RD1
	.comm	_UBT_IF_1_ISOC_DT_RD2,4,2       ; @UBT_IF_1_ISOC_DT_RD2
	.comm	_UBT_IF_1_ISOC_DT_WR1,4,2       ; @UBT_IF_1_ISOC_DT_WR1
	.comm	_UBT_IF_1_ISOC_DT_WR2,4,2       ; @UBT_IF_1_ISOC_DT_WR2
	.comm	_UBT_FLAG_T_START_CTRL,4,2      ; @UBT_FLAG_T_START_CTRL
	.comm	_UBT_IF_0_CTRL_DT_WR,4,2        ; @UBT_IF_0_CTRL_DT_WR
	.comm	_UBT_FLAG_T_START_BULK,4,2      ; @UBT_FLAG_T_START_BULK
	.comm	_UBT_IF_0_BULK_DT_WR,4,2        ; @UBT_IF_0_BULK_DT_WR
	.no_dead_strip	_ubt_task
.subsections_via_symbols
