	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mtk_mdp_set_default_params
_mtk_mdp_set_default_params:            ## @mtk_mdp_set_default_params
	.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, %r14
	movq	(%rdi), %r15
	movq	_V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	callq	_mtk_mdp_ctx_get_frame
	movq	%rax, %rbx
	movl	(%r12), %esi
	xorl	%edi, %edi
	callq	_mtk_mdp_find_fmt_by_index
	movq	%rax, 16(%rbx)
	movq	(%r15), %rax
	movq	(%rax), %rax
	movl	(%rax), %ecx
	movl	%ecx, (%rbx)
	movl	4(%rax), %eax
	movl	%eax, 4(%rbx)
	imull	%ecx, %eax
	movq	8(%rbx), %rcx
	movl	%eax, (%rcx)
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%eax, %edx
	sarl	%edx
	movl	%edx, 4(%rcx)
	movq	_V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%r14, %rdi
	callq	_mtk_mdp_ctx_get_frame
	movq	%rax, %rbx
	movl	(%r12), %esi
	xorl	%edi, %edi
	callq	_mtk_mdp_find_fmt_by_index
	movq	%rax, 16(%rbx)
	movq	(%r15), %rax
	movq	(%rax), %rax
	movl	8(%rax), %ecx
	movl	%ecx, (%rbx)
	movl	12(%rax), %eax
	movl	%eax, 4(%rbx)
	imull	%ecx, %eax
	movq	8(%rbx), %rcx
	movl	%eax, (%rcx)
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%eax, %edx
	sarl	%edx
	movl	%edx, 4(%rcx)
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,4,2 ## @V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE
	.comm	_V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE,4,2 ## @V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE
	.no_dead_strip	_mtk_mdp_set_default_params
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mtk_mdp_set_default_params
_mtk_mdp_set_default_params:            ; @mtk_mdp_set_default_params
	.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	x19, x0
	ldr	x21, [x0]
Lloh0:
	adrp	x22, _V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE@GOTPAGE
Lloh1:
	ldr	x22, [x22, _V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE@GOTPAGEOFF]
	ldr	w1, [x22]
	bl	_mtk_mdp_ctx_get_frame
	mov	x20, x0
	ldr	w1, [x22]
	mov	w0, #0
	bl	_mtk_mdp_find_fmt_by_index
	str	x0, [x20, #16]
	ldr	x8, [x21]
	ldr	x8, [x8]
	ldp	w9, w8, [x8]
	stp	w9, w8, [x20]
	mul	w8, w8, w9
	ldr	x9, [x20, #8]
	cmp	w8, #0
	cinc	w10, w8, lt
	asr	w10, w10, #1
	stp	w8, w10, [x9]
Lloh2:
	adrp	x20, _V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE@GOTPAGE
Lloh3:
	ldr	x20, [x20, _V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_mtk_mdp_ctx_get_frame
	mov	x19, x0
	ldr	w1, [x20]
	mov	w0, #0
	bl	_mtk_mdp_find_fmt_by_index
	str	x0, [x19, #16]
	ldr	x8, [x21]
	ldr	x8, [x8]
	ldp	w9, w8, [x8, #8]
	stp	w9, w8, [x19]
	mul	w8, w8, w9
	ldr	x9, [x19, #8]
	cmp	w8, #0
	cinc	w10, w8, lt
	asr	w10, w10, #1
	stp	w8, w10, [x9]
	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 AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,4,2 ; @V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE
	.comm	_V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE,4,2 ; @V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE
	.no_dead_strip	_mtk_mdp_set_default_params
.subsections_via_symbols
