	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function set_last_buffer
_set_last_buffer:                       ## @set_last_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	_V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rdx, %rdi
	callq	_get_q_data
	movq	%rax, %r12
	leaq	16(%rbx), %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_vb2_set_plane_payload
	movslq	(%r12), %rax
	leal	1(%rax), %ecx
	movl	%ecx, (%r12)
	movq	%rax, 8(%rbx)
	xorl	%edx, %edx
	cmpl	$0, (%r15)
	sete	%dl
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_v4l2_m2m_buf_copy_metadata
	movq	_V4L2_BUF_FLAG_LAST@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%rbx)
	movq	_VB2_BUF_STATE_DONE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_v4l2_m2m_buf_done              ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_BUF_TYPE_VIDEO_CAPTURE,4,2 ## @V4L2_BUF_TYPE_VIDEO_CAPTURE
	.comm	_V4L2_BUF_FLAG_LAST,4,2         ## @V4L2_BUF_FLAG_LAST
	.comm	_VB2_BUF_STATE_DONE,4,2         ## @VB2_BUF_STATE_DONE
	.no_dead_strip	_set_last_buffer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function set_last_buffer
_set_last_buffer:                       ; @set_last_buffer
	.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, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x2
	bl	_get_q_data
	mov	x22, x0
	add	x0, x21, #16
	mov	w1, #0
	mov	w2, #0
	bl	_vb2_set_plane_payload
	ldrsw	x8, [x22]
	add	w9, w8, #1
	str	w9, [x22]
	str	x8, [x21, #8]
	ldr	w8, [x19]
	cmp	w8, #0
	cset	w2, eq
	mov	x0, x20
	mov	x1, x21
	bl	_v4l2_m2m_buf_copy_metadata
Lloh3:
	adrp	x8, _V4L2_BUF_FLAG_LAST@GOTPAGE
Lloh4:
	ldr	x8, [x8, _V4L2_BUF_FLAG_LAST@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	ldr	w9, [x21]
	orr	w8, w9, w8
	str	w8, [x21]
Lloh6:
	adrp	x8, _VB2_BUF_STATE_DONE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _VB2_BUF_STATE_DONE@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	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
	b	_v4l2_m2m_buf_done
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_BUF_TYPE_VIDEO_CAPTURE,4,2 ; @V4L2_BUF_TYPE_VIDEO_CAPTURE
	.comm	_V4L2_BUF_FLAG_LAST,4,2         ; @V4L2_BUF_FLAG_LAST
	.comm	_VB2_BUF_STATE_DONE,4,2         ; @VB2_BUF_STATE_DONE
	.no_dead_strip	_set_last_buffer
.subsections_via_symbols
