	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function read_completed
_read_completed:                        ## @read_completed
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpq	$0, 32(%rdi)
	jne	LBB0_23
## %bb.1:
	movq	%rdi, %r14
	movq	24(%rdi), %rax
	testq	%rax, %rax
	je	LBB0_23
## %bb.2:
	movq	8(%rax), %r13
	cmpl	$0, 24(%r13)
	je	LBB0_23
## %bb.3:
	movq	_N_URBS@GOTPCREL(%rip), %r15
	cmpl	$0, (%r15)
	jle	LBB0_7
## %bb.4:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edi
	movq	%r13, %rsi
	callq	_test_and_set_bit
	testq	%rax, %rax
	je	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	incq	%rbx
	cmpl	(%r15), %ebx
	jl	LBB0_5
	jmp	LBB0_7
LBB0_23:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	16(%r13), %rax
	movq	(%rax,%rbx,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_7
## %bb.9:
	movq	_FRAMES_PER_URB@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	testl	%ecx, %ecx
	jle	LBB0_18
## %bb.10:
	leaq	12(%r13), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	xorl	%ebx, %ebx
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	xorl	%esi, %esi
	xorl	%r8d, %r8d
	movq	%r14, -72(%rbp)                 ## 8-byte Spill
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_11 Depth=1
	addq	%r12, %rax
	incl	%esi
	movq	_FRAMES_PER_URB@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	-72(%rbp), %r14                 ## 8-byte Reload
LBB0_15:                                ##   in Loop: Header=BB0_11 Depth=1
	incq	%r15
	movslq	%ecx, %rdx
	addq	$24, %rbx
	cmpq	%rdx, %r15
	jge	LBB0_16
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movq	16(%r14), %rdx
	cmpq	$0, 16(%rdx,%rbx)
	jne	LBB0_15
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	movslq	%esi, %r14
	leaq	(,%r14,8), %rcx
	leaq	(%rcx,%rcx,2), %rcx
	movslq	(%rdx,%rcx), %r12
	movq	16(%rdi), %rdx
	movl	%r12d, 4(%rdx,%rcx)
	movl	$0, (%rdx,%rcx)
	movq	%rax, 8(%rdx,%rcx)
	testq	%r12, %r12
	jle	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	%esi, -52(%rbp)                 ## 4-byte Spill
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	callq	_spin_lock
	leaq	(%r14,%r14,2), %rdx
	shlq	$3, %rdx
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	addq	16(%rax), %rdx
	movq	%r13, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	callq	_fill_out_urb
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	movq	16(%rsi), %rdx
	addq	%rbx, %rdx
	movq	%r13, %rdi
	callq	_read_in_urb
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_spin_unlock
	movl	8(%r13), %esi
	movq	%r13, %rdi
	callq	_check_for_elapsed_periods
	movl	4(%r13), %esi
	movq	%r13, %rdi
	callq	_check_for_elapsed_periods
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	$1, %r8d
	jmp	LBB0_14
LBB0_7:
	leaq	L_.str(%rip), %rdi
	callq	_log
LBB0_19:
	movq	_FRAMES_PER_URB@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	testl	%edi, %edi
	jle	LBB0_22
## %bb.20:
	movq	16(%r14), %rcx
	addq	$8, %rcx
	xorl	%edx, %edx
	movq	_BYTES_PER_FRAME@GOTPCREL(%rip), %rsi
	.p2align	4, 0x90
LBB0_21:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rsi), %edi
	movl	%edx, %ebx
	imull	%edi, %ebx
	movslq	%ebx, %rbx
	movq	%rbx, (%rcx)
	movl	%edi, -4(%rcx)
	movl	$0, -8(%rcx)
	incq	%rdx
	movslq	(%rax), %rdi
	addq	$24, %rcx
	cmpq	%rdi, %rdx
	jl	LBB0_21
LBB0_22:
	movl	%edi, (%r14)
	movq	_URB_ISO_ASAP@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%r14)
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_usb_submit_urb                 ## TAILCALL
LBB0_16:
	testl	%r8d, %r8d
	je	LBB0_18
## %bb.17:
	movl	%esi, (%rdi)
	movq	_URB_ISO_ASAP@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%rdi)
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_usb_submit_urb
	jmp	LBB0_19
LBB0_18:
	movq	24(%rdi), %rax
	movl	(%rax), %edi
	movq	%r13, %rsi
	callq	_clear_bit
	jmp	LBB0_19
	.cfi_endproc
                                        ## -- End function
	.comm	_N_URBS,4,2                     ## @N_URBS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unable to find an output urb to use\n"

	.comm	_FRAMES_PER_URB,4,2             ## @FRAMES_PER_URB
	.comm	_URB_ISO_ASAP,8,3               ## @URB_ISO_ASAP
	.comm	_GFP_ATOMIC,4,2                 ## @GFP_ATOMIC
	.comm	_BYTES_PER_FRAME,4,2            ## @BYTES_PER_FRAME
	.no_dead_strip	_read_completed
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function read_completed
_read_completed:                        ; @read_completed
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	ldp	x8, x9, [x0, #24]
	cmp	x9, #0
	ccmp	x8, #0, #4, eq
	b.eq	LBB0_6
; %bb.1:
	ldr	x20, [x8, #8]
	ldr	w8, [x20, #24]
	cbz	w8, LBB0_6
; %bb.2:
	mov	x19, x0
Lloh0:
	adrp	x22, _N_URBS@GOTPAGE
Lloh1:
	ldr	x22, [x22, _N_URBS@GOTPAGEOFF]
Lloh2:
	adrp	x25, _FRAMES_PER_URB@GOTPAGE
Lloh3:
	ldr	x25, [x25, _FRAMES_PER_URB@GOTPAGEOFF]
	ldr	w8, [x22]
Lloh4:
	adrp	x24, _URB_ISO_ASAP@GOTPAGE
Lloh5:
	ldr	x24, [x24, _URB_ISO_ASAP@GOTPAGEOFF]
Lloh6:
	adrp	x23, _GFP_ATOMIC@GOTPAGE
Lloh7:
	ldr	x23, [x23, _GFP_ATOMIC@GOTPAGEOFF]
	cmp	w8, #1
	b.lt	LBB0_15
; %bb.3:
	mov	x21, #0
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	mov	x1, x20
	bl	_test_and_set_bit
	cbz	x0, LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x22]
	add	x21, x21, #1
	cmp	w21, w8
	b.lt	LBB0_4
	b	LBB0_15
LBB0_6:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_7:
	ldr	x8, [x20, #16]
	ldr	x0, [x8, x21, lsl #3]
	cbz	x0, LBB0_15
; %bb.8:
	ldr	w9, [x25]
	cmp	w9, #1
	b.lt	LBB0_22
; %bb.9:
	mov	x27, #0
	mov	x28, #0
	mov	x12, #0
	mov	w26, #0
	mov	w8, #0
	add	x10, x20, #12
	str	x10, [sp]                       ; 8-byte Folded Spill
	mov	x21, x10
	b	LBB0_12
LBB0_10:                                ;   in Loop: Header=BB0_12 Depth=1
	add	x12, x12, x24
	add	w26, w26, #1
	ldr	w9, [x25]
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=1
	add	x28, x28, #1
	add	x27, x27, #24
	cmp	x28, w9, sxtw
	b.ge	LBB0_20
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x19, #16]
	add	x11, x10, x27
	ldr	x11, [x11, #16]
	cbnz	x11, LBB0_11
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	sxtw	x22, w26
	add	x9, x22, w26, sxtw #1
	lsl	x9, x9, #3
	ldrsw	x24, [x10, x9]
	ldr	x10, [x0, #16]
	add	x9, x10, x9
	stp	wzr, w24, [x9]
	str	x12, [x9, #8]
	cmp	w24, #1
	b.lt	LBB0_10
; %bb.14:                               ;   in Loop: Header=BB0_12 Depth=1
	mov	x23, x0
	mov	x0, x21
	str	x12, [sp, #8]                   ; 8-byte Folded Spill
	bl	_spin_lock
	ldr	x8, [x23, #16]
	mov	w9, #24
	madd	x2, x22, x9, x8
	mov	x0, x20
	mov	x1, x23
	bl	_fill_out_urb
	ldr	x8, [x19, #16]
	add	x2, x8, x27
	mov	x0, x20
	mov	x1, x19
	bl	_read_in_urb
	mov	x0, x21
	bl	_spin_unlock
	ldr	w1, [x20, #8]
	mov	x0, x20
	bl	_check_for_elapsed_periods
	ldr	w1, [x20, #4]
	mov	x0, x20
	bl	_check_for_elapsed_periods
	ldr	x12, [sp, #8]                   ; 8-byte Folded Reload
	mov	x0, x23
	mov	w8, #1
	b	LBB0_10
LBB0_15:
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	bl	_log
LBB0_16:
	ldr	w11, [x25]
	cmp	w11, #1
	b.lt	LBB0_19
; %bb.17:
	mov	x8, #0
	ldr	x9, [x19, #16]
	add	x9, x9, #8
Lloh10:
	adrp	x10, _BYTES_PER_FRAME@GOTPAGE
Lloh11:
	ldr	x10, [x10, _BYTES_PER_FRAME@GOTPAGEOFF]
LBB0_18:                                ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x10]
	mul	w12, w11, w8
	sxtw	x12, w12
	str	x12, [x9]
	stp	wzr, w11, [x9, #-8]
	add	x8, x8, #1
	ldrsw	x11, [x25]
	add	x9, x9, #24
	cmp	x8, x11
	b.lt	LBB0_18
LBB0_19:
	str	w11, [x19]
	ldr	x8, [x24]
	str	x8, [x19, #8]
	ldr	w1, [x23]
	mov	x0, x19
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_usb_submit_urb
LBB0_20:
Lloh12:
	adrp	x23, _GFP_ATOMIC@GOTPAGE
Lloh13:
	ldr	x23, [x23, _GFP_ATOMIC@GOTPAGEOFF]
Lloh14:
	adrp	x24, _URB_ISO_ASAP@GOTPAGE
Lloh15:
	ldr	x24, [x24, _URB_ISO_ASAP@GOTPAGEOFF]
	cbz	w8, LBB0_22
; %bb.21:
	str	w26, [x0]
	ldr	x8, [x24]
	str	x8, [x0, #8]
	ldr	w1, [x23]
	bl	_usb_submit_urb
	b	LBB0_16
LBB0_22:
	ldr	x8, [x0, #24]
	ldr	w0, [x8]
	mov	x1, x20
	bl	_clear_bit
	b	LBB0_16
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_N_URBS,4,2                     ; @N_URBS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unable to find an output urb to use\n"

	.comm	_FRAMES_PER_URB,4,2             ; @FRAMES_PER_URB
	.comm	_URB_ISO_ASAP,8,3               ; @URB_ISO_ASAP
	.comm	_GFP_ATOMIC,4,2                 ; @GFP_ATOMIC
	.comm	_BYTES_PER_FRAME,4,2            ; @BYTES_PER_FRAME
	.no_dead_strip	_read_completed
.subsections_via_symbols
