	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_uvc_queue_enable               ## -- Begin function uvc_queue_enable
	.p2align	4, 0x90
_uvc_queue_enable:                      ## @uvc_queue_enable
	.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
	movl	%esi, %ebx
	movq	%rdi, %r12
	leaq	4(%rdi), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	testl	%ebx, %ebx
	je	LBB0_4
## %bb.1:
	movq	%r12, %rdi
	callq	_uvc_queue_streaming
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_12
LBB0_4:
	xorl	%r15d, %r15d
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_uvc_queue_cancel
	leaq	24(%r12), %rdi
	callq	_INIT_LIST_HEAD
	movl	(%r12), %ecx
	testq	%rcx, %rcx
	je	LBB0_11
## %bb.5:
	movq	16(%r12), %r8
	cmpl	$1, %ecx
	jne	LBB0_7
## %bb.6:
	xorl	%edx, %edx
	jmp	LBB0_9
LBB0_3:
	movq	_UVC_QUEUE_STREAMING@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 8(%r12)
	movq	$0, 32(%r12)
	xorl	%r15d, %r15d
	jmp	LBB0_12
LBB0_7:
	movl	%ecx, %esi
	andl	$-2, %esi
	leaq	24(%r8), %rdi
	xorl	%edx, %edx
	movq	_UVC_BUF_STATE_IDLE@GOTPCREL(%rip), %rbx
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	$0, -16(%rdi)
	movl	(%rbx), %eax
	movl	%eax, -24(%rdi)
	movq	$0, (%rdi)
	movl	(%rbx), %eax
	movl	%eax, -8(%rdi)
	addq	$2, %rdx
	addq	$32, %rdi
	cmpq	%rdx, %rsi
	jne	LBB0_8
LBB0_9:
	testb	$1, %cl
	je	LBB0_11
## %bb.10:
	shlq	$4, %rdx
	movq	$0, 8(%r8,%rdx)
	movq	_UVC_BUF_STATE_IDLE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r8,%rdx)
LBB0_11:
	movq	_UVC_QUEUE_STREAMING@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, 8(%r12)
LBB0_12:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_UVC_QUEUE_STREAMING,4,2        ## @UVC_QUEUE_STREAMING
	.comm	_UVC_BUF_STATE_IDLE,4,2         ## @UVC_BUF_STATE_IDLE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_uvc_queue_enable               ; -- Begin function uvc_queue_enable
	.p2align	2
_uvc_queue_enable:                      ; @uvc_queue_enable
	.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	x21, x1
	mov	x20, x0
	add	x19, x0, #4
	mov	x0, x19
	bl	_mutex_lock
	mov	x0, x20
	cbz	w21, LBB0_3
; %bb.1:
	bl	_uvc_queue_streaming
	cbz	x0, LBB0_7
; %bb.2:
Lloh0:
	adrp	x8, _EBUSY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_8
LBB0_3:
	mov	w1, #0
	bl	_uvc_queue_cancel
	add	x0, x20, #24
	bl	_INIT_LIST_HEAD
	ldr	w8, [x20]
	cbz	w8, LBB0_6
; %bb.4:
	ldr	x9, [x20, #16]
	add	x9, x9, #8
Lloh3:
	adrp	x10, _UVC_BUF_STATE_IDLE@GOTPAGE
Lloh4:
	ldr	x10, [x10, _UVC_BUF_STATE_IDLE@GOTPAGEOFF]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	str	xzr, [x9]
	ldr	w11, [x10]
	stur	w11, [x9, #-8]
	add	x9, x9, #16
	subs	x8, x8, #1
	b.ne	LBB0_5
LBB0_6:
	mov	w21, #0
Lloh5:
	adrp	x8, _UVC_QUEUE_STREAMING@GOTPAGE
Lloh6:
	ldr	x8, [x8, _UVC_QUEUE_STREAMING@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	ldr	w9, [x20, #8]
	bic	w8, w9, w8
	str	w8, [x20, #8]
	b	LBB0_8
LBB0_7:
	mov	w21, #0
Lloh8:
	adrp	x8, _UVC_QUEUE_STREAMING@GOTPAGE
Lloh9:
	ldr	x8, [x8, _UVC_QUEUE_STREAMING@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	ldr	w9, [x20, #8]
	orr	w8, w9, w8
	str	w8, [x20, #8]
	str	xzr, [x20, #32]
LBB0_8:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x21
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_UVC_QUEUE_STREAMING,4,2        ; @UVC_QUEUE_STREAMING
	.comm	_UVC_BUF_STATE_IDLE,4,2         ; @UVC_BUF_STATE_IDLE
.subsections_via_symbols
