	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mtk_mdp_m2m_g_fmt_mplane
_mtk_mdp_m2m_g_fmt_mplane:              ## @mtk_mdp_m2m_g_fmt_mplane
	.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	%rdx, %r15
	movq	%rsi, %rdi
	callq	_fh_to_ctx
	movq	%rax, %r14
	movl	(%rax), %edx
	movl	48(%r15), %ecx
	leaq	L_.str(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	callq	_mtk_mdp_dbg
	movl	48(%r15), %esi
	movq	%r14, %rdi
	callq	_mtk_mdp_ctx_get_frame
	movq	%rax, %r13
	movl	(%rax), %ecx
	movl	%ecx, (%r15)
	movl	4(%rax), %r8d
	movl	%r8d, 4(%r15)
	movq	_V4L2_FIELD_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 44(%r15)
	movq	8(%r13), %rax
	movl	24(%rax), %edx
	movl	%edx, 40(%r15)
	movl	(%rax), %eax
	movl	%eax, 8(%r15)
	movups	4(%r14), %xmm0
	movups	%xmm0, 24(%r15)
	movl	(%r14), %edx
	leaq	L_.str.1(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	callq	_mtk_mdp_dbg
	cmpl	$0, 8(%r15)
	jle	LBB0_3
## %bb.1:
	leaq	L_.str.2(%rip), %r12
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r13), %eax
	movq	8(%r13), %rcx
	movq	8(%rcx), %rdx
	movl	(%rdx,%rbx,4), %edx
	imull	%eax, %edx
	leal	7(%rdx), %r8d
	testl	%edx, %edx
	cmovnsl	%edx, %r8d
	sarl	$3, %r8d
	movq	16(%r15), %rdx
	movl	%r8d, (%rdx,%rbx,8)
	imull	4(%r13), %eax
	movq	16(%rcx), %rcx
	imull	(%rcx,%rbx,4), %eax
	leal	7(%rax), %r9d
	testl	%eax, %eax
	cmovnsl	%eax, %r9d
	sarl	$3, %r9d
	movl	%r9d, 4(%rdx,%rbx,8)
	movl	(%r14), %edx
	movl	$2, %edi
	movq	%r12, %rsi
	movl	%ebx, %ecx
	xorl	%eax, %eax
	callq	_mtk_mdp_dbg
	incq	%rbx
	movslq	8(%r15), %rax
	cmpq	%rax, %rbx
	jl	LBB0_2
LBB0_3:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"[%d] type:%d"

	.comm	_V4L2_FIELD_NONE,4,2            ## @V4L2_FIELD_NONE
L_.str.1:                               ## @.str.1
	.asciz	"[%d] wxh:%dx%d"

L_.str.2:                               ## @.str.2
	.asciz	"[%d] p%d, bpl:%d, sizeimage:%d"

	.no_dead_strip	_mtk_mdp_m2m_g_fmt_mplane
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mtk_mdp_m2m_g_fmt_mplane
_mtk_mdp_m2m_g_fmt_mplane:              ; @mtk_mdp_m2m_g_fmt_mplane
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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, x2
	mov	x0, x1
	bl	_fh_to_ctx
	mov	x20, x0
	ldr	w2, [x0]
	ldr	w3, [x19, #48]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #2
	bl	_mtk_mdp_dbg
	ldr	w1, [x19, #48]
	mov	x0, x20
	bl	_mtk_mdp_ctx_get_frame
	mov	x21, x0
	ldp	w3, w8, [x0]
	stp	w3, w8, [x19]
Lloh2:
	adrp	x9, _V4L2_FIELD_NONE@GOTPAGE
Lloh3:
	ldr	x9, [x9, _V4L2_FIELD_NONE@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	ldr	x10, [x0, #8]
	ldr	w11, [x10, #24]
	stp	w11, w9, [x19, #40]
	ldr	w9, [x10]
	str	w9, [x19, #8]
	ldur	q0, [x20, #4]
	stur	q0, [x19, #24]
	ldr	w2, [x20]
	str	x8, [sp]
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #2
	bl	_mtk_mdp_dbg
	ldr	w8, [x19, #8]
	cmp	w8, #1
	b.lt	LBB0_3
; %bb.1:
	mov	x24, #0
	mov	x22, #0
Lloh7:
	adrp	x23, l_.str.2@PAGE
Lloh8:
	add	x23, x23, l_.str.2@PAGEOFF
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21, #8]
	lsl	x9, x22, #2
	ldp	x10, x8, [x8, #8]
	ldr	w10, [x10, x9]
	ldp	w11, w12, [x21]
	mul	w10, w10, w11
	add	w13, w10, #7
	cmp	w10, #0
	csel	w10, w13, w10, lt
	asr	w10, w10, #3
	ldr	x13, [x19, #16]
	add	x13, x13, x24
	str	w10, [x13]
	mul	w11, w12, w11
	ldr	w8, [x8, x9]
	mul	w8, w11, w8
	add	w9, w8, #7
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w8, w8, #3
	str	w8, [x13, #4]
	ldr	w2, [x20]
	stp	x10, x8, [sp]
	mov	w0, #2
	mov	x1, x23
	mov	x3, x22
	bl	_mtk_mdp_dbg
	add	x22, x22, #1
	ldrsw	x8, [x19, #8]
	add	x24, x24, #8
	cmp	x22, x8
	b.lt	LBB0_2
LBB0_3:
	mov	w0, #0
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"[%d] type:%d"

	.comm	_V4L2_FIELD_NONE,4,2            ; @V4L2_FIELD_NONE
l_.str.1:                               ; @.str.1
	.asciz	"[%d] wxh:%dx%d"

l_.str.2:                               ; @.str.2
	.asciz	"[%d] p%d, bpl:%d, sizeimage:%d"

	.no_dead_strip	_mtk_mdp_m2m_g_fmt_mplane
.subsections_via_symbols
