	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function s5p_mfc_buf_init
_s5p_mfc_buf_init:                      ## @s5p_mfc_buf_init
	.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, %r13
	callq	_to_vb2_v4l2_buffer
	movq	%rax, %r15
	movq	8(%r13), %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_3
## %bb.1:
	movl	32(%r14), %edi
	movq	%r13, %rsi
	callq	_check_vb_with_fmt
	testl	%eax, %eax
	js	LBB0_8
## %bb.2:
	movl	(%r13), %ebx
	movq	24(%r14), %rax
	shlq	$4, %rbx
	movq	%r15, 8(%rax,%rbx)
	xorl	%r12d, %r12d
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_vb2_dma_contig_plane_dma_addr
	movq	24(%r14), %rcx
	movq	%rax, (%rcx,%rbx)
	incl	20(%r14)
	jmp	LBB0_9
LBB0_3:
	movq	_V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rsi
	jne	LBB0_6
## %bb.4:
	movl	16(%r14), %edi
	movq	%r13, %rsi
	callq	_check_vb_with_fmt
	testl	%eax, %eax
	js	LBB0_8
## %bb.5:
	movl	(%r13), %eax
	movq	8(%r14), %rcx
	shlq	$3, %rax
	leaq	(%rax,%rax,2), %rbx
	movq	%r15, 16(%rcx,%rbx)
	xorl	%r12d, %r12d
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_vb2_dma_contig_plane_dma_addr
	movq	8(%r14), %rcx
	movq	%rax, 8(%rcx,%rbx)
	movq	%r13, %rdi
	movl	$1, %esi
	callq	_vb2_dma_contig_plane_dma_addr
	movq	8(%r14), %rcx
	movq	%rax, (%rcx,%rbx)
	incl	(%r14)
	jmp	LBB0_9
LBB0_8:
	movl	%eax, %r12d
	jmp	LBB0_9
LBB0_6:
	leaq	L_.str(%rip), %rdi
	callq	_mfc_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
LBB0_9:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	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
	.comm	_V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,8,3 ## @V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid queue type: %d\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_s5p_mfc_buf_init
.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_init
_s5p_mfc_buf_init:                      ; @s5p_mfc_buf_init
	.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
	bl	_to_vb2_v4l2_buffer
	mov	x21, x0
	ldr	x22, [x20, #8]
	ldr	w0, [x22, #8]
	bl	_fh_to_ctx
	mov	x19, x0
	ldr	x1, [x22]
Lloh0:
	adrp	x8, _V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x1, x8
	b.ne	LBB0_3
; %bb.1:
	ldr	w0, [x19, #32]
	mov	x1, x20
	bl	_check_vb_with_fmt
	tbnz	w0, #31, LBB0_7
; %bb.2:
	ldr	w8, [x20]
	ldr	x9, [x19, #24]
	lsl	x22, x8, #4
	add	x8, x9, x22
	str	x21, [x8, #8]
	mov	x0, x20
	mov	w1, #0
	bl	_vb2_dma_contig_plane_dma_addr
	mov	x8, x0
	mov	w0, #0
	ldr	x9, [x19, #24]
	str	x8, [x9, x22]
	ldr	w8, [x19, #20]
	add	w8, w8, #1
	str	w8, [x19, #20]
	b	LBB0_7
LBB0_3:
Lloh3:
	adrp	x8, _V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x1, x8
	b.ne	LBB0_6
; %bb.4:
	ldr	w0, [x19, #16]
	mov	x1, x20
	bl	_check_vb_with_fmt
	tbnz	w0, #31, LBB0_7
; %bb.5:
	ldr	w8, [x20]
	ldr	x9, [x19, #8]
	add	x8, x8, x8, lsl #1
	lsl	x22, x8, #3
	add	x8, x9, x22
	str	x21, [x8, #16]
	mov	x0, x20
	mov	w1, #0
	bl	_vb2_dma_contig_plane_dma_addr
	ldr	x8, [x19, #8]
	add	x8, x8, x22
	str	x0, [x8, #8]
	mov	x0, x20
	mov	w1, #1
	bl	_vb2_dma_contig_plane_dma_addr
	mov	x8, x0
	mov	w0, #0
	ldr	x9, [x19, #8]
	str	x8, [x9, x22]
	ldr	w8, [x19]
	add	w8, w8, #1
	str	w8, [x19]
	b	LBB0_7
LBB0_6:
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_mfc_err
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE,8,3 ; @V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE
	.comm	_V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,8,3 ; @V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid queue type: %d\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_s5p_mfc_buf_init
.subsections_via_symbols
