	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vpbe_buffer_prepare
_vpbe_buffer_prepare:                   ## @vpbe_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	(%rdi), %rdi
	callq	_vb2_get_drv_priv
	movq	%rax, %r15
	movq	8(%rax), %rax
	movq	(%rax), %r14
	movq	_debug@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rcx
	movl	$1, %edi
	movq	%r14, %rdx
	callq	_v4l2_dbg
	movl	(%r15), %edx
	xorl	%r15d, %r15d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_vb2_set_plane_payload
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_vb2_get_plane_payload
	movq	%rax, %r12
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_vb2_plane_size
	cmpq	%rax, %r12
	jg	LBB0_3
## %bb.1:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_vb2_dma_contig_plane_dma_addr
	movq	%rax, %rdi
	movl	$8, %esi
	callq	_IS_ALIGNED
	testl	%eax, %eax
	jne	LBB0_4
## %bb.2:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	callq	_v4l2_err
LBB0_3:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_4:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_debug,4,2                      ## @debug
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"vpbe_buffer_prepare\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"buffer_prepare:offset is not aligned to 32 bytes\n"

	.no_dead_strip	_vpbe_buffer_prepare
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vpbe_buffer_prepare
_vpbe_buffer_prepare:                   ; @vpbe_buffer_prepare
	.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	x20, x0
	ldr	x0, [x0]
	bl	_vb2_get_drv_priv
	mov	x21, x0
	ldr	x8, [x0, #8]
	ldr	x19, [x8]
Lloh0:
	adrp	x8, _debug@GOTPAGE
Lloh1:
	ldr	x8, [x8, _debug@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x3, l_.str@PAGE
Lloh4:
	add	x3, x3, l_.str@PAGEOFF
	mov	w0, #1
	mov	x2, x19
	bl	_v4l2_dbg
	ldr	w2, [x21]
	mov	x0, x20
	mov	w1, #0
	bl	_vb2_set_plane_payload
	mov	x0, x20
	mov	w1, #0
	bl	_vb2_get_plane_payload
	mov	x21, x0
	mov	x0, x20
	mov	w1, #0
	bl	_vb2_plane_size
	cmp	x21, x0
	b.gt	LBB0_3
; %bb.1:
	mov	x0, x20
	mov	w1, #0
	bl	_vb2_dma_contig_plane_dma_addr
	mov	w1, #8
	bl	_IS_ALIGNED
	mov	x8, x0
	mov	w0, #0
	cbnz	w8, LBB0_4
; %bb.2:
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_v4l2_err
LBB0_3:
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_4:
	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 AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_debug,4,2                      ; @debug
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"vpbe_buffer_prepare\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"buffer_prepare:offset is not aligned to 32 bytes\n"

	.no_dead_strip	_vpbe_buffer_prepare
.subsections_via_symbols
