	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_uvc_queue_buffer               ## -- Begin function uvc_queue_buffer
	.p2align	4, 0x90
_uvc_queue_buffer:                      ## @uvc_queue_buffer
	.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
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	_UVC_TRACE_CAPTURE@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	movq	(%rsi), %rdx
	leaq	L_.str(%rip), %rsi
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_uvc_trace
	movq	8(%rbx), %rdx
	movq	16(%rbx), %rcx
	cmpq	(%r15), %rdx
	jne	LBB0_7
## %bb.1:
	movq	_V4L2_MEMORY_MMAP@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rcx
	jne	LBB0_7
## %bb.2:
	leaq	20(%r15), %rdi
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	callq	_mutex_lock
	movq	(%rbx), %r13
	cmpq	8(%r15), %r13
	jae	LBB0_8
## %bb.3:
	movq	40(%r15), %r12
	shlq	$5, %r13
	movq	(%r12,%r13), %rdx
	movq	_UVC_BUF_STATE_IDLE@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	jne	LBB0_10
## %bb.4:
	movq	8(%rbx), %rax
	movq	_V4L2_BUF_TYPE_VIDEO_OUTPUT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_15
## %bb.5:
	movq	24(%rbx), %rax
	cmpq	16(%r12,%r13), %rax
	jle	LBB0_15
## %bb.6:
	movl	(%r14), %edi
	leaq	L_.str.4(%rip), %rsi
	jmp	LBB0_9
LBB0_7:
	movl	(%r14), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_uvc_trace
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r12d
	jmp	LBB0_14
LBB0_8:
	movl	(%r14), %edi
	leaq	L_.str.2(%rip), %rsi
LBB0_9:
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_uvc_trace
	jmp	LBB0_11
LBB0_10:
	movl	(%r14), %edi
	leaq	L_.str.3(%rip), %rsi
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_uvc_trace
LBB0_11:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_12:
	subl	(%rax), %r12d
LBB0_13:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
LBB0_14:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	leaq	24(%r15), %r14
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movq	_UVC_QUEUE_DISCONNECTED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 16(%r15)
	je	LBB0_17
## %bb.16:
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	jmp	LBB0_12
LBB0_17:
	movq	%r12, %rdx
	leaq	(%r12,%r13), %rax
	movq	_UVC_BUF_STATE_QUEUED@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, (%rax)
	movq	8(%rbx), %rax
	movq	_V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPCREL(%rip), %rcx
	xorl	%r12d, %r12d
	cmpq	(%rcx), %rax
	jne	LBB0_19
## %bb.18:
	xorl	%eax, %eax
	jmp	LBB0_20
LBB0_19:
	movq	24(%rbx), %rax
LBB0_20:
	movq	%rdx, %rbx
	movq	%rax, 24(%rdx,%r13)
	leaq	(%rdx,%r13), %rdi
	addq	$12, %rdi
	leaq	32(%r15), %rsi
	callq	_list_add_tail
	leaq	(%rbx,%r13), %rdi
	addq	$8, %rdi
	addq	$28, %r15
	movq	%r15, %rsi
	callq	_list_add_tail
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_UVC_TRACE_CAPTURE,4,2          ## @UVC_TRACE_CAPTURE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Queuing buffer %u.\n"

	.comm	_V4L2_MEMORY_MMAP,8,3           ## @V4L2_MEMORY_MMAP
L_.str.1:                               ## @.str.1
	.asciz	"[E] Invalid buffer type (%u) and/or memory (%u).\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.2:                               ## @.str.2
	.asciz	"[E] Out of range index.\n"

	.comm	_UVC_BUF_STATE_IDLE,8,3         ## @UVC_BUF_STATE_IDLE
L_.str.3:                               ## @.str.3
	.asciz	"[E] Invalid buffer state (%u).\n"

	.comm	_V4L2_BUF_TYPE_VIDEO_OUTPUT,8,3 ## @V4L2_BUF_TYPE_VIDEO_OUTPUT
L_.str.4:                               ## @.str.4
	.asciz	"[E] Bytes used out of bounds.\n"

	.comm	_UVC_QUEUE_DISCONNECTED,4,2     ## @UVC_QUEUE_DISCONNECTED
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_UVC_BUF_STATE_QUEUED,8,3       ## @UVC_BUF_STATE_QUEUED
	.comm	_V4L2_BUF_TYPE_VIDEO_CAPTURE,8,3 ## @V4L2_BUF_TYPE_VIDEO_CAPTURE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_uvc_queue_buffer               ; -- Begin function uvc_queue_buffer
	.p2align	2
_uvc_queue_buffer:                      ; @uvc_queue_buffer
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x21, x1
	mov	x20, x0
Lloh0:
	adrp	x22, _UVC_TRACE_CAPTURE@GOTPAGE
Lloh1:
	ldr	x22, [x22, _UVC_TRACE_CAPTURE@GOTPAGEOFF]
	ldr	w0, [x22]
	ldr	x8, [x1]
	str	x8, [sp]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_uvc_trace
	ldr	x10, [x20]
	ldp	x8, x9, [x21, #8]
Lloh4:
	adrp	x11, _V4L2_MEMORY_MMAP@GOTPAGE
Lloh5:
	ldr	x11, [x11, _V4L2_MEMORY_MMAP@GOTPAGEOFF]
Lloh6:
	ldr	x11, [x11]
	cmp	x8, x10
	ccmp	x9, x11, #0, eq
	b.eq	LBB0_2
; %bb.1:
	ldr	w0, [x22]
	stp	x8, x9, [sp]
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_uvc_trace
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_12
LBB0_2:
	add	x19, x20, #20
	mov	x0, x19
	bl	_mutex_lock
	ldr	x23, [x21]
	ldr	x8, [x20, #8]
	cmp	x23, x8
	b.hs	LBB0_7
; %bb.3:
	ldr	x24, [x20, #40]
	add	x25, x24, x23, lsl #5
	ldr	x8, [x25]
Lloh12:
	adrp	x9, _UVC_BUF_STATE_IDLE@GOTPAGE
Lloh13:
	ldr	x9, [x9, _UVC_BUF_STATE_IDLE@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.4:
	ldr	x8, [x21, #8]
Lloh15:
	adrp	x9, _V4L2_BUF_TYPE_VIDEO_OUTPUT@GOTPAGE
Lloh16:
	ldr	x9, [x9, _V4L2_BUF_TYPE_VIDEO_OUTPUT@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_13
; %bb.5:
	ldr	x8, [x21, #24]
	add	x9, x24, x23, lsl #5
	ldr	x9, [x9, #16]
	cmp	x8, x9
	b.le	LBB0_13
; %bb.6:
	ldr	w0, [x22]
Lloh18:
	adrp	x1, l_.str.4@PAGE
Lloh19:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_9
LBB0_7:
	ldr	w0, [x22]
Lloh20:
	adrp	x1, l_.str.2@PAGE
Lloh21:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_9
LBB0_8:
	ldr	w0, [x22]
	str	x8, [sp]
Lloh22:
	adrp	x1, l_.str.3@PAGE
Lloh23:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_9:
	bl	_uvc_trace
Lloh24:
	adrp	x8, _EINVAL@GOTPAGE
Lloh25:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_10:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_11:
	mov	x0, x19
	bl	_mutex_unlock
LBB0_12:
	mov	x0, x20
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_13:
	add	x22, x20, #24
	mov	x0, x22
	bl	_spin_lock_irqsave
	ldr	w8, [x20, #16]
Lloh26:
	adrp	x9, _UVC_QUEUE_DISCONNECTED@GOTPAGE
Lloh27:
	ldr	x9, [x9, _UVC_QUEUE_DISCONNECTED@GOTPAGEOFF]
Lloh28:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_15
; %bb.14:
	mov	x0, x22
	bl	_spin_unlock_irqrestore
Lloh29:
	adrp	x8, _ENODEV@GOTPAGE
Lloh30:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_10
LBB0_15:
Lloh31:
	adrp	x8, _UVC_BUF_STATE_QUEUED@GOTPAGE
Lloh32:
	ldr	x8, [x8, _UVC_BUF_STATE_QUEUED@GOTPAGEOFF]
Lloh33:
	ldr	x8, [x8]
	str	x8, [x25]
	ldr	x8, [x21, #8]
Lloh34:
	adrp	x9, _V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPAGE
Lloh35:
	ldr	x9, [x9, _V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPAGEOFF]
Lloh36:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_17
; %bb.16:
	mov	x8, #0
	b	LBB0_18
LBB0_17:
	ldr	x8, [x21, #24]
LBB0_18:
	add	x21, x24, x23, lsl #5
	str	x8, [x21, #24]
	add	x0, x21, #12
	add	x1, x20, #32
	bl	_list_add_tail
	add	x0, x21, #8
	add	x1, x20, #28
	bl	_list_add_tail
	mov	x0, x22
	bl	_spin_unlock_irqrestore
	mov	w20, #0
	b	LBB0_11
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_UVC_TRACE_CAPTURE,4,2          ; @UVC_TRACE_CAPTURE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Queuing buffer %u.\n"

	.comm	_V4L2_MEMORY_MMAP,8,3           ; @V4L2_MEMORY_MMAP
l_.str.1:                               ; @.str.1
	.asciz	"[E] Invalid buffer type (%u) and/or memory (%u).\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.2:                               ; @.str.2
	.asciz	"[E] Out of range index.\n"

	.comm	_UVC_BUF_STATE_IDLE,8,3         ; @UVC_BUF_STATE_IDLE
l_.str.3:                               ; @.str.3
	.asciz	"[E] Invalid buffer state (%u).\n"

	.comm	_V4L2_BUF_TYPE_VIDEO_OUTPUT,8,3 ; @V4L2_BUF_TYPE_VIDEO_OUTPUT
l_.str.4:                               ; @.str.4
	.asciz	"[E] Bytes used out of bounds.\n"

	.comm	_UVC_QUEUE_DISCONNECTED,4,2     ; @UVC_QUEUE_DISCONNECTED
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_UVC_BUF_STATE_QUEUED,8,3       ; @UVC_BUF_STATE_QUEUED
	.comm	_V4L2_BUF_TYPE_VIDEO_CAPTURE,8,3 ; @V4L2_BUF_TYPE_VIDEO_CAPTURE
.subsections_via_symbols
