	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vpif_buffer_prepare
_vpif_buffer_prepare:                   ## @vpif_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, %rbx
	callq	_to_vb2_v4l2_buffer
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	(%rbx), %rdi
	callq	_vb2_get_drv_priv
	movq	(%rax), %r13
	movq	_VPIF_VIDEO_INDEX@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	leaq	(%rax,%rax,4), %r15
	movl	36(%r13,%r15,8), %edx
	xorl	%r14d, %r14d
	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
	jle	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_8
LBB0_2:
	movl	32(%r13,%r15,8), %eax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	movq	(%rbx), %rax
	movq	(%rax), %rax
	movq	_V4L2_BUF_TYPE_SLICED_VBI_OUTPUT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_8
## %bb.3:
	xorl	%r12d, %r12d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_vb2_dma_contig_plane_dma_addr
	movq	%rax, %rbx
	movq	24(%r13,%r15,8), %rdi
	addq	%rax, %rdi
	callq	_ISALIGNED
	testl	%eax, %eax
	je	LBB0_7
## %bb.4:
	movq	16(%r13,%r15,8), %rdi
	addq	%rbx, %rdi
	callq	_ISALIGNED
	testl	%eax, %eax
	je	LBB0_7
## %bb.5:
	movq	8(%r13,%r15,8), %rdi
	addq	%rbx, %rdi
	callq	_ISALIGNED
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	addq	(%r13,%r15,8), %rbx
	movq	%rbx, %rdi
	callq	_ISALIGNED
	xorl	%r14d, %r14d
	testl	%eax, %eax
	jne	LBB0_8
LBB0_7:
	leaq	L_.str(%rip), %rdi
	callq	_vpif_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r12d
	movl	%r12d, %r14d
LBB0_8:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VPIF_VIDEO_INDEX,8,3           ## @VPIF_VIDEO_INDEX
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_V4L2_BUF_TYPE_SLICED_VBI_OUTPUT,8,3 ## @V4L2_BUF_TYPE_SLICED_VBI_OUTPUT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"buffer offset not aligned to 8 bytes\n"

	.no_dead_strip	_vpif_buffer_prepare
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vpif_buffer_prepare
_vpif_buffer_prepare:                   ; @vpif_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	x0, [x19]
	bl	_vb2_get_drv_priv
	ldr	x22, [x0]
Lloh0:
	adrp	x8, _VPIF_VIDEO_INDEX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VPIF_VIDEO_INDEX@GOTPAGEOFF]
Lloh2:
	ldr	x23, [x8]
	mov	w8, #40
	madd	x8, x23, x8, x22
	ldr	w2, [x8, #36]
	mov	x0, x19
	mov	w1, #0
	bl	_vb2_set_plane_payload
	mov	x0, x19
	mov	w1, #0
	bl	_vb2_get_plane_payload
	mov	x21, x0
	mov	x0, x19
	mov	w1, #0
	bl	_vb2_plane_size
	cmp	x21, x0
	b.gt	LBB0_8
; %bb.1:
	mov	w8, #40
	madd	x8, x23, x8, x22
	ldr	w8, [x8, #32]
	str	w8, [x20]
	ldr	x8, [x19]
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _V4L2_BUF_TYPE_SLICED_VBI_OUTPUT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _V4L2_BUF_TYPE_SLICED_VBI_OUTPUT@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
LBB0_2:
	mov	w0, #0
	b	LBB0_9
LBB0_3:
	mov	x0, x19
	mov	w1, #0
	bl	_vb2_dma_contig_plane_dma_addr
	mov	x19, x0
	mov	w8, #40
	madd	x8, x23, x8, x22
	ldr	x8, [x8, #24]
	add	x0, x8, x0
	bl	_ISALIGNED
	cbz	w0, LBB0_7
; %bb.4:
	mov	w8, #40
	madd	x8, x23, x8, x22
	ldr	x8, [x8, #16]
	add	x0, x8, x19
	bl	_ISALIGNED
	cbz	w0, LBB0_7
; %bb.5:
	mov	w8, #40
	madd	x8, x23, x8, x22
	ldr	x8, [x8, #8]
	add	x0, x8, x19
	bl	_ISALIGNED
	cbz	w0, LBB0_7
; %bb.6:
	mov	w8, #40
	mul	x8, x23, x8
	ldr	x8, [x22, x8]
	add	x0, x8, x19
	bl	_ISALIGNED
	cbnz	w0, LBB0_2
LBB0_7:
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_vpif_err
LBB0_8:
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	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
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_VPIF_VIDEO_INDEX,8,3           ; @VPIF_VIDEO_INDEX
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_V4L2_BUF_TYPE_SLICED_VBI_OUTPUT,8,3 ; @V4L2_BUF_TYPE_SLICED_VBI_OUTPUT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"buffer offset not aligned to 8 bytes\n"

	.no_dead_strip	_vpif_buffer_prepare
.subsections_via_symbols
