	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function s5p_mfc_buf_prepare
_s5p_mfc_buf_prepare:                   ## @s5p_mfc_buf_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, %r12
	movq	(%rdi), %rbx
	movl	8(%rbx), %edi
	callq	_fh_to_ctx
	movq	%rax, %r14
	movq	(%rbx), %rsi
	movq	_V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rsi
	jne	LBB0_4
## %bb.1:
	movl	28(%r14), %edi
	movq	%r12, %rsi
	callq	_check_vb_with_fmt
	testl	%eax, %eax
	js	LBB0_13
## %bb.2:
	xorl	%r15d, %r15d
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_vb2_plane_size
	movq	(%r14), %rcx
	leaq	L_.str(%rip), %rsi
	movl	$2, %edi
	movq	%rax, %rdx
	callq	_mfc_debug
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_vb2_plane_size
	cmpq	(%r14), %rax
	jge	LBB0_14
## %bb.3:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_9
LBB0_4:
	movq	_V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rsi
	jne	LBB0_10
## %bb.5:
	movl	24(%r14), %edi
	movq	%r12, %rsi
	callq	_check_vb_with_fmt
	testl	%eax, %eax
	js	LBB0_13
## %bb.6:
	xorl	%r15d, %r15d
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_vb2_plane_size
	movq	8(%r14), %rcx
	leaq	L_.str.2(%rip), %rsi
	movl	$2, %edi
	movq	%rax, %rdx
	callq	_mfc_debug
	movq	%r12, %rdi
	movl	$1, %esi
	callq	_vb2_plane_size
	movq	16(%r14), %rcx
	leaq	L_.str.3(%rip), %rsi
	movl	$2, %edi
	movq	%rax, %rdx
	callq	_mfc_debug
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_vb2_plane_size
	cmpq	8(%r14), %rax
	jl	LBB0_8
## %bb.7:
	movq	%r12, %rdi
	movl	$1, %esi
	callq	_vb2_plane_size
	cmpq	16(%r14), %rax
	jge	LBB0_14
LBB0_8:
	leaq	L_.str.4(%rip), %rdi
LBB0_9:
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_mfc_err
	jmp	LBB0_11
LBB0_13:
	movl	%eax, %r15d
	jmp	LBB0_14
LBB0_10:
	leaq	L_.str.5(%rip), %rdi
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_mfc_err
LBB0_11:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
LBB0_14:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE,8,3 ## @V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"plane size: %ld, dst size: %zu\n"

L_.str.1:                               ## @.str.1
	.asciz	"plane size is too small for capture\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,8,3 ## @V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE
L_.str.2:                               ## @.str.2
	.asciz	"plane size: %ld, luma size: %d\n"

L_.str.3:                               ## @.str.3
	.asciz	"plane size: %ld, chroma size: %d\n"

L_.str.4:                               ## @.str.4
	.asciz	"plane size is too small for output\n"

L_.str.5:                               ## @.str.5
	.asciz	"invalid queue type: %d\n"

	.no_dead_strip	_s5p_mfc_buf_prepare
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function s5p_mfc_buf_prepare
_s5p_mfc_buf_prepare:                   ; @s5p_mfc_buf_prepare
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x20, x0
	ldr	x21, [x0]
	ldr	w0, [x21, #8]
	bl	_fh_to_ctx
	mov	x19, x0
	ldr	x8, [x21]
Lloh0:
	adrp	x9, _V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.1:
	ldr	w0, [x19, #28]
	mov	x1, x20
	bl	_check_vb_with_fmt
	tbnz	w0, #31, LBB0_11
; %bb.2:
	mov	x0, x20
	mov	w1, #0
	bl	_vb2_plane_size
	mov	x2, x0
	ldr	x3, [x19]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #2
	bl	_mfc_debug
	mov	x0, x20
	mov	w1, #0
	bl	_vb2_plane_size
	mov	x8, x0
	mov	w0, #0
	ldr	x9, [x19]
	cmp	x8, x9
	b.ge	LBB0_11
; %bb.3:
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_10
LBB0_4:
Lloh7:
	adrp	x9, _V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE@GOTPAGE
Lloh8:
	ldr	x9, [x9, _V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.5:
	ldr	w0, [x19, #24]
	mov	x1, x20
	bl	_check_vb_with_fmt
	tbnz	w0, #31, LBB0_11
; %bb.6:
	mov	x0, x20
	mov	w1, #0
	bl	_vb2_plane_size
	mov	x2, x0
	ldr	x3, [x19, #8]
Lloh10:
	adrp	x1, l_.str.2@PAGE
Lloh11:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #2
	bl	_mfc_debug
	mov	x0, x20
	mov	w1, #1
	bl	_vb2_plane_size
	mov	x2, x0
	ldr	x3, [x19, #16]
Lloh12:
	adrp	x1, l_.str.3@PAGE
Lloh13:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	w0, #2
	bl	_mfc_debug
	mov	x0, x20
	mov	w1, #0
	bl	_vb2_plane_size
	ldr	x8, [x19, #8]
	cmp	x0, x8
	b.lt	LBB0_8
; %bb.7:
	mov	x0, x20
	mov	w1, #1
	bl	_vb2_plane_size
	ldr	x8, [x19, #16]
	cmp	x0, x8
	b.ge	LBB0_12
LBB0_8:
Lloh14:
	adrp	x0, l_.str.4@PAGE
Lloh15:
	add	x0, x0, l_.str.4@PAGEOFF
	b	LBB0_10
LBB0_9:
	str	x8, [sp]
Lloh16:
	adrp	x0, l_.str.5@PAGE
Lloh17:
	add	x0, x0, l_.str.5@PAGEOFF
LBB0_10:
	bl	_mfc_err
Lloh18:
	adrp	x8, _EINVAL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_11:
	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
	add	sp, sp, #64
	ret
LBB0_12:
	mov	w0, #0
	b	LBB0_11
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE,8,3 ; @V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"plane size: %ld, dst size: %zu\n"

l_.str.1:                               ; @.str.1
	.asciz	"plane size is too small for capture\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,8,3 ; @V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE
l_.str.2:                               ; @.str.2
	.asciz	"plane size: %ld, luma size: %d\n"

l_.str.3:                               ; @.str.3
	.asciz	"plane size: %ld, chroma size: %d\n"

l_.str.4:                               ; @.str.4
	.asciz	"plane size is too small for output\n"

l_.str.5:                               ; @.str.5
	.asciz	"invalid queue type: %d\n"

	.no_dead_strip	_s5p_mfc_buf_prepare
.subsections_via_symbols
