	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mtk_venc_set_param
_mtk_venc_set_param:                    ## @mtk_venc_set_param
	.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	%rsi, %r14
	movq	%rdi, %rbx
	movq	32(%rdi), %r15
	movq	_MTK_Q_DATA_SRC@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	leaq	(%rax,%rax,2), %r12
	movq	16(%r15,%r12,8), %rax
	movl	(%rax), %esi
	leal	-128(%rsi), %eax
	cmpl	$3, %eax
	ja	LBB0_7
## %bb.1:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_4:
	movq	_VENC_YUV_FORMAT_YV12@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_7:
	leaq	L_.str(%rip), %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_mtk_v4l2_err
	movl	40(%r14), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	jmp	LBB0_8
LBB0_2:
	movq	_VENC_YUV_FORMAT_I420@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_6:
	movq	_VENC_YUV_FORMAT_NV21@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_5:
	movq	_VENC_YUV_FORMAT_NV12@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	%eax, 40(%r14)
LBB0_8:
	movq	20(%rbx), %r8
	movq	%r8, %xmm0
	movq	8(%r15,%r12,8), %r11
	movq	%r11, %xmm1
	punpcklqdq	%xmm0, %xmm1            ## xmm1 = xmm1[0],xmm0[0]
	movq	%r11, %r9
	shrq	$32, %r9
	movdqu	%xmm1, 24(%r14)
	movl	(%rbx), %eax
	cltd
	idivl	4(%rbx)
                                        ## kill: def $eax killed $eax def $rax
	movl	%eax, (%r14)
	movl	16(%rbx), %r13d
	movl	%r13d, 4(%r14)
	movq	(%r15,%r12,8), %r15
	movq	%r15, %xmm0
	movl	8(%rbx), %r12d
	movl	12(%rbx), %r10d
	movd	%r10d, %xmm1
	pinsrd	$1, %r12d, %xmm1
	punpcklqdq	%xmm0, %xmm1            ## xmm1 = xmm1[0],xmm0[0]
	movdqu	%xmm1, 8(%r14)
	movq	%r8, %rcx
	shrq	$32, %rcx
	movq	%r15, %rbx
	shrq	$32, %rbx
	subq	$8, %rsp
	leaq	L_.str.1(%rip), %rsi
	xorl	%edi, %edi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
                                        ## kill: def $ecx killed $ecx killed $rcx
                                        ## kill: def $r8d killed $r8d killed $r8
                                        ## kill: def $r9d killed $r9d killed $r9
	pushq	%r13
	pushq	%r10
	pushq	%r12
	pushq	%rax
	pushq	%r15
	pushq	%rbx
	pushq	%r11
	callq	_mtk_v4l2_debug
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_2, LBB0_2-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_5, LBB0_5-LJTI0_0
LJTI0_0:
	.long	L0_0_set_4
	.long	L0_0_set_2
	.long	L0_0_set_6
	.long	L0_0_set_5
	.end_data_region
                                        ## -- End function
	.comm	_MTK_Q_DATA_SRC,8,3             ## @MTK_Q_DATA_SRC
	.comm	_VENC_YUV_FORMAT_I420,4,2       ## @VENC_YUV_FORMAT_I420
	.comm	_VENC_YUV_FORMAT_YV12,4,2       ## @VENC_YUV_FORMAT_YV12
	.comm	_VENC_YUV_FORMAT_NV12,4,2       ## @VENC_YUV_FORMAT_NV12
	.comm	_VENC_YUV_FORMAT_NV21,4,2       ## @VENC_YUV_FORMAT_NV21
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unsupported fourcc =%d"

L_.str.1:                               ## @.str.1
	.asciz	"fmt 0x%x, P/L %d/%d, w/h %d/%d, buf %d/%d, fps/bps %d/%d, gop %d, i_period %d"

	.no_dead_strip	_mtk_venc_set_param
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mtk_venc_set_param
_mtk_venc_set_param:                    ; @mtk_venc_set_param
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x19, x1
	mov	x20, x0
	ldr	x21, [x0, #32]
Lloh0:
	adrp	x8, _MTK_Q_DATA_SRC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MTK_Q_DATA_SRC@GOTPAGEOFF]
Lloh2:
	ldr	x22, [x8]
	mov	w8, #24
	madd	x8, x22, x8, x21
	ldr	x8, [x8, #16]
	ldr	w1, [x8]
	sub	w8, w1, #128
	cmp	w8, #3
	b.hi	LBB0_3
; %bb.1:
Lloh3:
	adrp	x9, lJTI0_0@PAGE
Lloh4:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_2
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_2:
Lloh5:
	adrp	x8, _VENC_YUV_FORMAT_YV12@GOTPAGE
Lloh6:
	ldr	x8, [x8, _VENC_YUV_FORMAT_YV12@GOTPAGEOFF]
	b	LBB0_7
LBB0_3:
Lloh7:
	adrp	x0, l_.str@PAGE
Lloh8:
	add	x0, x0, l_.str@PAGEOFF
	bl	_mtk_v4l2_err
	ldr	w2, [x19, #40]
	b	LBB0_8
LBB0_4:
Lloh9:
	adrp	x8, _VENC_YUV_FORMAT_I420@GOTPAGE
Lloh10:
	ldr	x8, [x8, _VENC_YUV_FORMAT_I420@GOTPAGEOFF]
	b	LBB0_7
LBB0_5:
Lloh11:
	adrp	x8, _VENC_YUV_FORMAT_NV21@GOTPAGE
Lloh12:
	ldr	x8, [x8, _VENC_YUV_FORMAT_NV21@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
Lloh13:
	adrp	x8, _VENC_YUV_FORMAT_NV12@GOTPAGE
Lloh14:
	ldr	x8, [x8, _VENC_YUV_FORMAT_NV12@GOTPAGEOFF]
LBB0_7:
	ldr	w2, [x8]
	str	w2, [x19, #40]
LBB0_8:
	mov	w8, #24
	madd	x8, x22, x8, x21
	ldur	d0, [x20, #20]
	ldr	d1, [x8, #8]
	fmov	w6, s1
	mov.s	w5, v1[1]
	mov.d	v1[1], v0[0]
	stur	q1, [x19, #24]
	ldp	w9, w10, [x20]
	sdiv	w9, w9, w10
	ldr	w10, [x20, #16]
	stp	w9, w10, [x19]
	ldr	d1, [x8]
	ldp	w11, w8, [x20, #8]
	fmov	s2, w8
	mov.s	v2[1], w11
	mov.d	v2[1], v1[0]
	stur	q2, [x19, #8]
	mov.s	w3, v0[1]
	fmov	w4, s0
	mov.s	w7, v1[1]
	stp	w8, w10, [sp, #12]
	stp	w9, w11, [sp, #4]
	str	s1, [sp]
Lloh15:
	adrp	x1, l_.str.1@PAGE
Lloh16:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #0
	bl	_mtk_v4l2_debug
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_4-LBB0_2)>>2
	.byte	(LBB0_5-LBB0_2)>>2
	.byte	(LBB0_6-LBB0_2)>>2
                                        ; -- End function
	.comm	_MTK_Q_DATA_SRC,8,3             ; @MTK_Q_DATA_SRC
	.comm	_VENC_YUV_FORMAT_I420,4,2       ; @VENC_YUV_FORMAT_I420
	.comm	_VENC_YUV_FORMAT_YV12,4,2       ; @VENC_YUV_FORMAT_YV12
	.comm	_VENC_YUV_FORMAT_NV12,4,2       ; @VENC_YUV_FORMAT_NV12
	.comm	_VENC_YUV_FORMAT_NV21,4,2       ; @VENC_YUV_FORMAT_NV21
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unsupported fourcc =%d"

l_.str.1:                               ; @.str.1
	.asciz	"fmt 0x%x, P/L %d/%d, w/h %d/%d, buf %d/%d, fps/bps %d/%d, gop %d, i_period %d"

	.no_dead_strip	_mtk_venc_set_param
.subsections_via_symbols
