	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function uvc_buffer_prepare
_uvc_buffer_prepare:                    ## @uvc_buffer_prepare
	.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	%rdi, %r13
	callq	_to_vb2_v4l2_buffer
	movq	%rax, %rbx
	movl	8(%r13), %edi
	callq	_vb2_get_drv_priv
	movq	%rax, %r12
	movq	%rbx, %rdi
	callq	_uvc_vbuf_to_buffer
	movq	%rax, %r14
	movq	(%r13), %rax
	movq	_V4L2_BUF_TYPE_VIDEO_OUTPUT@GOTPCREL(%rip), %rbx
	cmpq	(%rbx), %rax
	jne	LBB0_3
## %bb.1:
	xorl	%r15d, %r15d
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_vb2_get_plane_payload
	movq	%rax, %rbx
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_vb2_plane_size
	cmpq	%rax, %rbx
	movq	_V4L2_BUF_TYPE_VIDEO_OUTPUT@GOTPCREL(%rip), %rbx
	jle	LBB0_3
## %bb.2:
	movq	_UVC_TRACE_CAPTURE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_uvc_trace
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	jmp	LBB0_8
LBB0_3:
	movq	_UVC_QUEUE_DISCONNECTED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	andl	(%r12), %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_8
LBB0_5:
	movq	_UVC_BUF_STATE_QUEUED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%r14)
	movq	$0, 24(%r14)
	xorl	%r15d, %r15d
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_vb2_plane_vaddr
	movl	%eax, 16(%r14)
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_vb2_plane_size
	movq	%rax, 8(%r14)
	movq	(%r13), %rax
	cmpq	(%rbx), %rax
	jne	LBB0_6
## %bb.7:
	xorl	%r15d, %r15d
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_vb2_get_plane_payload
	movq	%rax, (%r14)
	jmp	LBB0_8
LBB0_6:
	movq	$0, (%r14)
LBB0_8:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_BUF_TYPE_VIDEO_OUTPUT,8,3 ## @V4L2_BUF_TYPE_VIDEO_OUTPUT
	.comm	_UVC_TRACE_CAPTURE,4,2          ## @UVC_TRACE_CAPTURE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"[E] Bytes used out of bounds.\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_UVC_QUEUE_DISCONNECTED,4,2     ## @UVC_QUEUE_DISCONNECTED
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_UVC_BUF_STATE_QUEUED,4,2       ## @UVC_BUF_STATE_QUEUED
	.no_dead_strip	_uvc_buffer_prepare
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function uvc_buffer_prepare
_uvc_buffer_prepare:                    ; @uvc_buffer_prepare
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
	bl	_to_vb2_v4l2_buffer
	mov	x20, x0
	ldr	w0, [x19, #8]
	bl	_vb2_get_drv_priv
	mov	x21, x0
	mov	x0, x20
	bl	_uvc_vbuf_to_buffer
	mov	x20, x0
	ldr	x8, [x19]
Lloh0:
	adrp	x23, _V4L2_BUF_TYPE_VIDEO_OUTPUT@GOTPAGE
Lloh1:
	ldr	x23, [x23, _V4L2_BUF_TYPE_VIDEO_OUTPUT@GOTPAGEOFF]
	ldr	x9, [x23]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.1:
	mov	x0, x19
	mov	w1, #0
	bl	_vb2_get_plane_payload
	mov	x22, x0
	mov	x0, x19
	mov	w1, #0
	bl	_vb2_plane_size
	cmp	x22, x0
	b.le	LBB0_3
; %bb.2:
Lloh2:
	adrp	x8, _UVC_TRACE_CAPTURE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _UVC_TRACE_CAPTURE@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	bl	_uvc_trace
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_5
LBB0_3:
	ldr	w8, [x21]
Lloh9:
	adrp	x9, _UVC_QUEUE_DISCONNECTED@GOTPAGE
Lloh10:
	ldr	x9, [x9, _UVC_QUEUE_DISCONNECTED@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	and	w0, w9, w8
	bl	_unlikely
	cbz	x0, LBB0_7
; %bb.4:
Lloh12:
	adrp	x8, _ENODEV@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_7:
Lloh14:
	adrp	x8, _UVC_BUF_STATE_QUEUED@GOTPAGE
Lloh15:
	ldr	x8, [x8, _UVC_BUF_STATE_QUEUED@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	str	w8, [x20, #32]
	str	xzr, [x20, #24]
	mov	x0, x19
	mov	w1, #0
	bl	_vb2_plane_vaddr
	str	w0, [x20, #16]
	mov	x0, x19
	mov	w1, #0
	bl	_vb2_plane_size
	str	x0, [x20, #8]
	ldr	x8, [x19]
	ldr	x9, [x23]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.8:
	mov	x0, x19
	mov	w1, #0
	bl	_vb2_get_plane_payload
	mov	x8, x0
	mov	w0, #0
	str	x8, [x20]
	b	LBB0_6
LBB0_9:
	mov	w0, #0
	str	xzr, [x20]
	b	LBB0_6
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_BUF_TYPE_VIDEO_OUTPUT,8,3 ; @V4L2_BUF_TYPE_VIDEO_OUTPUT
	.comm	_UVC_TRACE_CAPTURE,4,2          ; @UVC_TRACE_CAPTURE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"[E] Bytes used out of bounds.\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_UVC_QUEUE_DISCONNECTED,4,2     ; @UVC_QUEUE_DISCONNECTED
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_UVC_BUF_STATE_QUEUED,4,2       ; @UVC_BUF_STATE_QUEUED
	.no_dead_strip	_uvc_buffer_prepare
.subsections_via_symbols
