	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vsp1_video_buffer_prepare
_vsp1_video_buffer_prepare:             ## @vsp1_video_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, %r15
	callq	_to_vb2_v4l2_buffer
	movq	%rax, %r14
	movl	4(%r15), %edi
	callq	_vb2_get_drv_priv
	movq	%rax, %rbx
	movq	%r14, %rdi
	callq	_to_vsp1_vb2_buffer
	movq	%rax, %r14
	movq	(%rbx), %r12
	movl	(%r15), %eax
	cmpl	(%r12), %eax
	jae	LBB0_1
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_8
LBB0_1:
	movl	$0, %ebx
	testl	%eax, %eax
	je	LBB0_7
## %bb.2:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_vb2_dma_contig_plane_dma_addr
	movq	(%r14), %rcx
	movq	%rax, (%rcx,%rbx,8)
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_vb2_plane_size
	movq	8(%r12), %rcx
	cmpq	(%rcx,%rbx,8), %rax
	jl	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	incq	%rbx
	movl	(%r15), %eax
	cmpq	%rax, %rbx
	jb	LBB0_3
## %bb.6:
	xorl	%eax, %eax
	cmpl	$2, %ebx
	ja	LBB0_8
LBB0_7:
	movl	%ebx, %edi
	shlq	$3, %rdi
	addq	(%r14), %rdi
	movl	$2, %eax
	subl	%ebx, %eax
	leaq	8(,%rax,8), %rsi
	callq	___bzero
	xorl	%eax, %eax
LBB0_8:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_vsp1_video_buffer_prepare
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vsp1_video_buffer_prepare
_vsp1_video_buffer_prepare:             ; @vsp1_video_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, #4]
	bl	_vb2_get_drv_priv
	mov	x21, x0
	mov	x0, x20
	bl	_to_vsp1_vb2_buffer
	ldr	x22, [x21]
	ldr	w8, [x19]
	ldr	w9, [x22]
	cmp	w8, w9
	b.hs	LBB0_2
LBB0_1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_10
LBB0_2:
	mov	x20, x0
	cbz	w8, LBB0_7
; %bb.3:
	mov	x21, #0
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x21
	bl	_vb2_dma_contig_plane_dma_addr
	ldr	x8, [x20]
	lsl	x23, x21, #3
	str	x0, [x8, x23]
	mov	x0, x19
	mov	x1, x21
	bl	_vb2_plane_size
	ldr	x8, [x22, #8]
	ldr	x8, [x8, x23]
	cmp	x0, x8
	b.lt	LBB0_1
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x21, x21, #1
	ldr	w8, [x19]
	cmp	x21, x8
	b.lo	LBB0_4
; %bb.6:
	cmp	w21, #2
	b.ls	LBB0_8
	b	LBB0_9
LBB0_7:
	mov	w21, #0
LBB0_8:
	ldr	x8, [x20]
	add	x0, x8, w21, uxtw #3
	mov	w8, #2
	sub	w8, w8, w21
	lsl	x8, x8, #3
	add	x1, x8, #8
	bl	_bzero
LBB0_9:
	mov	w0, #0
LBB0_10:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_vsp1_video_buffer_prepare
.subsections_via_symbols
