	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mtk_vcodec_enc_ctrls_setup     ## -- Begin function mtk_vcodec_enc_ctrls_setup
	.p2align	4, 0x90
_mtk_vcodec_enc_ctrls_setup:            ## @mtk_vcodec_enc_ctrls_setup
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	_MTK_MAX_CTRLS_HINT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_v4l2_ctrl_handler_init
	movq	_V4L2_CID_MPEG_VIDEO_BITRATE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$4000000, (%rsp)                ## imm = 0x3D0900
	movq	_mtk_vcodec_enc_ctrl_ops@GOTPCREL(%rip), %r15
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movl	$1, %ecx
	movl	$4000000, %r8d                  ## imm = 0x3D0900
	movl	$1, %r9d
	callq	_v4l2_ctrl_new_std
	movq	_V4L2_CID_MPEG_VIDEO_B_FRAMES@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$0, (%rsp)
	xorl	%r14d, %r14d
	movq	%rbx, %rdi
	movq	%r15, %rsi
	xorl	%ecx, %ecx
	movl	$2, %r8d
	movl	$1, %r9d
	callq	_v4l2_ctrl_new_std
	movq	_V4L2_CID_MPEG_VIDEO_FRAME_RC_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$1, (%rsp)
	movq	%rbx, %rdi
	movq	%r15, %rsi
	xorl	%ecx, %ecx
	movl	$1, %r8d
	movl	$1, %r9d
	callq	_v4l2_ctrl_new_std
	movq	_V4L2_CID_MPEG_VIDEO_H264_MAX_QP@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$51, (%rsp)
	movq	%rbx, %rdi
	movq	%r15, %rsi
	xorl	%ecx, %ecx
	movl	$51, %r8d
	movl	$1, %r9d
	callq	_v4l2_ctrl_new_std
	movq	_V4L2_CID_MPEG_VIDEO_H264_I_PERIOD@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$0, (%rsp)
	movq	%rbx, %rdi
	movq	%r15, %rsi
	xorl	%ecx, %ecx
	movl	$65535, %r8d                    ## imm = 0xFFFF
	movl	$1, %r9d
	callq	_v4l2_ctrl_new_std
	movq	_V4L2_CID_MPEG_VIDEO_GOP_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$0, (%rsp)
	movq	%rbx, %rdi
	movq	%r15, %rsi
	xorl	%ecx, %ecx
	movl	$65535, %r8d                    ## imm = 0xFFFF
	movl	$1, %r9d
	callq	_v4l2_ctrl_new_std
	movq	_V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$0, (%rsp)
	movq	%rbx, %rdi
	movq	%r15, %rsi
	xorl	%ecx, %ecx
	movl	$1, %r8d
	movl	$1, %r9d
	callq	_v4l2_ctrl_new_std
	movq	_V4L2_CID_MPEG_VIDEO_FORCE_KEY_FRAME@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$0, (%rsp)
	movq	%rbx, %rdi
	movq	%r15, %rsi
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_v4l2_ctrl_new_std
	movq	_V4L2_CID_MPEG_VIDEO_HEADER_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_V4L2_MPEG_VIDEO_HEADER_MODE_JOINED_WITH_1ST_FRAME@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_V4L2_MPEG_VIDEO_HEADER_MODE_SEPARATE@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	%rbx, %rdi
	movq	%r15, %rsi
	xorl	%r8d, %r8d
	callq	_v4l2_ctrl_new_std_menu
	movq	_V4L2_CID_MPEG_VIDEO_H264_PROFILE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_V4L2_MPEG_VIDEO_H264_PROFILE_HIGH@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	movq	%r15, %rsi
	xorl	%r8d, %r8d
	movl	%ecx, %r9d
	callq	_v4l2_ctrl_new_std_menu
	movq	_V4L2_CID_MPEG_VIDEO_H264_LEVEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_V4L2_MPEG_VIDEO_H264_LEVEL_4_2@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_V4L2_MPEG_VIDEO_H264_LEVEL_4_0@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	%rbx, %rdi
	movq	%r15, %rsi
	xorl	%r8d, %r8d
	callq	_v4l2_ctrl_new_std_menu
	movl	(%rbx), %esi
	testl	%esi, %esi
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	_mtk_v4l2_err
	movl	(%rbx), %r14d
	jmp	LBB0_3
LBB0_2:
	movq	%rbx, %rdi
	callq	_v4l2_ctrl_handler_setup
LBB0_3:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_mtk_vcodec_enc_ctrl_ops,4,2    ## @mtk_vcodec_enc_ctrl_ops
	.comm	_MTK_MAX_CTRLS_HINT,4,2         ## @MTK_MAX_CTRLS_HINT
	.comm	_V4L2_CID_MPEG_VIDEO_BITRATE,4,2 ## @V4L2_CID_MPEG_VIDEO_BITRATE
	.comm	_V4L2_CID_MPEG_VIDEO_B_FRAMES,4,2 ## @V4L2_CID_MPEG_VIDEO_B_FRAMES
	.comm	_V4L2_CID_MPEG_VIDEO_FRAME_RC_ENABLE,4,2 ## @V4L2_CID_MPEG_VIDEO_FRAME_RC_ENABLE
	.comm	_V4L2_CID_MPEG_VIDEO_H264_MAX_QP,4,2 ## @V4L2_CID_MPEG_VIDEO_H264_MAX_QP
	.comm	_V4L2_CID_MPEG_VIDEO_H264_I_PERIOD,4,2 ## @V4L2_CID_MPEG_VIDEO_H264_I_PERIOD
	.comm	_V4L2_CID_MPEG_VIDEO_GOP_SIZE,4,2 ## @V4L2_CID_MPEG_VIDEO_GOP_SIZE
	.comm	_V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE,4,2 ## @V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE
	.comm	_V4L2_CID_MPEG_VIDEO_FORCE_KEY_FRAME,4,2 ## @V4L2_CID_MPEG_VIDEO_FORCE_KEY_FRAME
	.comm	_V4L2_CID_MPEG_VIDEO_HEADER_MODE,4,2 ## @V4L2_CID_MPEG_VIDEO_HEADER_MODE
	.comm	_V4L2_MPEG_VIDEO_HEADER_MODE_JOINED_WITH_1ST_FRAME,4,2 ## @V4L2_MPEG_VIDEO_HEADER_MODE_JOINED_WITH_1ST_FRAME
	.comm	_V4L2_MPEG_VIDEO_HEADER_MODE_SEPARATE,4,2 ## @V4L2_MPEG_VIDEO_HEADER_MODE_SEPARATE
	.comm	_V4L2_CID_MPEG_VIDEO_H264_PROFILE,4,2 ## @V4L2_CID_MPEG_VIDEO_H264_PROFILE
	.comm	_V4L2_MPEG_VIDEO_H264_PROFILE_HIGH,4,2 ## @V4L2_MPEG_VIDEO_H264_PROFILE_HIGH
	.comm	_V4L2_CID_MPEG_VIDEO_H264_LEVEL,4,2 ## @V4L2_CID_MPEG_VIDEO_H264_LEVEL
	.comm	_V4L2_MPEG_VIDEO_H264_LEVEL_4_2,4,2 ## @V4L2_MPEG_VIDEO_H264_LEVEL_4_2
	.comm	_V4L2_MPEG_VIDEO_H264_LEVEL_4_0,4,2 ## @V4L2_MPEG_VIDEO_H264_LEVEL_4_0
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Init control handler fail %d"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mtk_vcodec_enc_ctrls_setup     ; -- Begin function mtk_vcodec_enc_ctrls_setup
	.p2align	2
_mtk_vcodec_enc_ctrls_setup:            ; @mtk_vcodec_enc_ctrls_setup
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh0:
	adrp	x8, _MTK_MAX_CTRLS_HINT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MTK_MAX_CTRLS_HINT@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_v4l2_ctrl_handler_init
Lloh3:
	adrp	x8, _V4L2_CID_MPEG_VIDEO_BITRATE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _V4L2_CID_MPEG_VIDEO_BITRATE@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
Lloh6:
	adrp	x20, _mtk_vcodec_enc_ctrl_ops@GOTPAGE
Lloh7:
	ldr	x20, [x20, _mtk_vcodec_enc_ctrl_ops@GOTPAGEOFF]
	mov	x0, x19
	mov	x1, x20
	mov	w3, #1
	mov	w4, #2304
	movk	w4, #61, lsl #16
	mov	w5, #1
	mov	w6, #2304
	movk	w6, #61, lsl #16
	bl	_v4l2_ctrl_new_std
Lloh8:
	adrp	x8, _V4L2_CID_MPEG_VIDEO_B_FRAMES@GOTPAGE
Lloh9:
	ldr	x8, [x8, _V4L2_CID_MPEG_VIDEO_B_FRAMES@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x20
	mov	w3, #0
	mov	w4, #2
	mov	w5, #1
	mov	w6, #0
	bl	_v4l2_ctrl_new_std
Lloh11:
	adrp	x8, _V4L2_CID_MPEG_VIDEO_FRAME_RC_ENABLE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _V4L2_CID_MPEG_VIDEO_FRAME_RC_ENABLE@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x20
	mov	w3, #0
	mov	w4, #1
	mov	w5, #1
	mov	w6, #1
	bl	_v4l2_ctrl_new_std
Lloh14:
	adrp	x8, _V4L2_CID_MPEG_VIDEO_H264_MAX_QP@GOTPAGE
Lloh15:
	ldr	x8, [x8, _V4L2_CID_MPEG_VIDEO_H264_MAX_QP@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x20
	mov	w3, #0
	mov	w4, #51
	mov	w5, #1
	mov	w6, #51
	bl	_v4l2_ctrl_new_std
Lloh17:
	adrp	x8, _V4L2_CID_MPEG_VIDEO_H264_I_PERIOD@GOTPAGE
Lloh18:
	ldr	x8, [x8, _V4L2_CID_MPEG_VIDEO_H264_I_PERIOD@GOTPAGEOFF]
Lloh19:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x20
	mov	w3, #0
	mov	w4, #65535
	mov	w5, #1
	mov	w6, #0
	bl	_v4l2_ctrl_new_std
Lloh20:
	adrp	x8, _V4L2_CID_MPEG_VIDEO_GOP_SIZE@GOTPAGE
Lloh21:
	ldr	x8, [x8, _V4L2_CID_MPEG_VIDEO_GOP_SIZE@GOTPAGEOFF]
Lloh22:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x20
	mov	w3, #0
	mov	w4, #65535
	mov	w5, #1
	mov	w6, #0
	bl	_v4l2_ctrl_new_std
Lloh23:
	adrp	x8, _V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE@GOTPAGE
Lloh24:
	ldr	x8, [x8, _V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE@GOTPAGEOFF]
Lloh25:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x20
	mov	w3, #0
	mov	w4, #1
	mov	w5, #1
	mov	w6, #0
	bl	_v4l2_ctrl_new_std
Lloh26:
	adrp	x8, _V4L2_CID_MPEG_VIDEO_FORCE_KEY_FRAME@GOTPAGE
Lloh27:
	ldr	x8, [x8, _V4L2_CID_MPEG_VIDEO_FORCE_KEY_FRAME@GOTPAGEOFF]
Lloh28:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x20
	mov	w3, #0
	mov	w4, #0
	mov	w5, #0
	mov	w6, #0
	bl	_v4l2_ctrl_new_std
Lloh29:
	adrp	x8, _V4L2_CID_MPEG_VIDEO_HEADER_MODE@GOTPAGE
Lloh30:
	ldr	x8, [x8, _V4L2_CID_MPEG_VIDEO_HEADER_MODE@GOTPAGEOFF]
Lloh31:
	ldr	w2, [x8]
Lloh32:
	adrp	x8, _V4L2_MPEG_VIDEO_HEADER_MODE_JOINED_WITH_1ST_FRAME@GOTPAGE
Lloh33:
	ldr	x8, [x8, _V4L2_MPEG_VIDEO_HEADER_MODE_JOINED_WITH_1ST_FRAME@GOTPAGEOFF]
Lloh34:
	ldr	w3, [x8]
Lloh35:
	adrp	x8, _V4L2_MPEG_VIDEO_HEADER_MODE_SEPARATE@GOTPAGE
Lloh36:
	ldr	x8, [x8, _V4L2_MPEG_VIDEO_HEADER_MODE_SEPARATE@GOTPAGEOFF]
Lloh37:
	ldr	w5, [x8]
	mov	x0, x19
	mov	x1, x20
	mov	w4, #0
	bl	_v4l2_ctrl_new_std_menu
Lloh38:
	adrp	x8, _V4L2_CID_MPEG_VIDEO_H264_PROFILE@GOTPAGE
Lloh39:
	ldr	x8, [x8, _V4L2_CID_MPEG_VIDEO_H264_PROFILE@GOTPAGEOFF]
Lloh40:
	ldr	w2, [x8]
Lloh41:
	adrp	x8, _V4L2_MPEG_VIDEO_H264_PROFILE_HIGH@GOTPAGE
Lloh42:
	ldr	x8, [x8, _V4L2_MPEG_VIDEO_H264_PROFILE_HIGH@GOTPAGEOFF]
Lloh43:
	ldr	w3, [x8]
	mov	x0, x19
	mov	x1, x20
	mov	w4, #0
	mov	x5, x3
	bl	_v4l2_ctrl_new_std_menu
Lloh44:
	adrp	x8, _V4L2_CID_MPEG_VIDEO_H264_LEVEL@GOTPAGE
Lloh45:
	ldr	x8, [x8, _V4L2_CID_MPEG_VIDEO_H264_LEVEL@GOTPAGEOFF]
Lloh46:
	ldr	w2, [x8]
Lloh47:
	adrp	x8, _V4L2_MPEG_VIDEO_H264_LEVEL_4_2@GOTPAGE
Lloh48:
	ldr	x8, [x8, _V4L2_MPEG_VIDEO_H264_LEVEL_4_2@GOTPAGEOFF]
Lloh49:
	ldr	w3, [x8]
Lloh50:
	adrp	x8, _V4L2_MPEG_VIDEO_H264_LEVEL_4_0@GOTPAGE
Lloh51:
	ldr	x8, [x8, _V4L2_MPEG_VIDEO_H264_LEVEL_4_0@GOTPAGEOFF]
Lloh52:
	ldr	w5, [x8]
	mov	x0, x19
	mov	x1, x20
	mov	w4, #0
	bl	_v4l2_ctrl_new_std_menu
	ldr	w1, [x19]
	cbz	w1, LBB0_2
; %bb.1:
Lloh53:
	adrp	x0, l_.str@PAGE
Lloh54:
	add	x0, x0, l_.str@PAGEOFF
	bl	_mtk_v4l2_err
	ldr	w0, [x19]
	b	LBB0_3
LBB0_2:
	mov	x0, x19
	bl	_v4l2_ctrl_handler_setup
	mov	w0, #0
LBB0_3:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh50, Lloh51, Lloh52
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh53, Lloh54
	.cfi_endproc
                                        ; -- End function
	.comm	_mtk_vcodec_enc_ctrl_ops,4,2    ; @mtk_vcodec_enc_ctrl_ops
	.comm	_MTK_MAX_CTRLS_HINT,4,2         ; @MTK_MAX_CTRLS_HINT
	.comm	_V4L2_CID_MPEG_VIDEO_BITRATE,4,2 ; @V4L2_CID_MPEG_VIDEO_BITRATE
	.comm	_V4L2_CID_MPEG_VIDEO_B_FRAMES,4,2 ; @V4L2_CID_MPEG_VIDEO_B_FRAMES
	.comm	_V4L2_CID_MPEG_VIDEO_FRAME_RC_ENABLE,4,2 ; @V4L2_CID_MPEG_VIDEO_FRAME_RC_ENABLE
	.comm	_V4L2_CID_MPEG_VIDEO_H264_MAX_QP,4,2 ; @V4L2_CID_MPEG_VIDEO_H264_MAX_QP
	.comm	_V4L2_CID_MPEG_VIDEO_H264_I_PERIOD,4,2 ; @V4L2_CID_MPEG_VIDEO_H264_I_PERIOD
	.comm	_V4L2_CID_MPEG_VIDEO_GOP_SIZE,4,2 ; @V4L2_CID_MPEG_VIDEO_GOP_SIZE
	.comm	_V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE,4,2 ; @V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE
	.comm	_V4L2_CID_MPEG_VIDEO_FORCE_KEY_FRAME,4,2 ; @V4L2_CID_MPEG_VIDEO_FORCE_KEY_FRAME
	.comm	_V4L2_CID_MPEG_VIDEO_HEADER_MODE,4,2 ; @V4L2_CID_MPEG_VIDEO_HEADER_MODE
	.comm	_V4L2_MPEG_VIDEO_HEADER_MODE_JOINED_WITH_1ST_FRAME,4,2 ; @V4L2_MPEG_VIDEO_HEADER_MODE_JOINED_WITH_1ST_FRAME
	.comm	_V4L2_MPEG_VIDEO_HEADER_MODE_SEPARATE,4,2 ; @V4L2_MPEG_VIDEO_HEADER_MODE_SEPARATE
	.comm	_V4L2_CID_MPEG_VIDEO_H264_PROFILE,4,2 ; @V4L2_CID_MPEG_VIDEO_H264_PROFILE
	.comm	_V4L2_MPEG_VIDEO_H264_PROFILE_HIGH,4,2 ; @V4L2_MPEG_VIDEO_H264_PROFILE_HIGH
	.comm	_V4L2_CID_MPEG_VIDEO_H264_LEVEL,4,2 ; @V4L2_CID_MPEG_VIDEO_H264_LEVEL
	.comm	_V4L2_MPEG_VIDEO_H264_LEVEL_4_2,4,2 ; @V4L2_MPEG_VIDEO_H264_LEVEL_4_2
	.comm	_V4L2_MPEG_VIDEO_H264_LEVEL_4_0,4,2 ; @V4L2_MPEG_VIDEO_H264_LEVEL_4_0
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Init control handler fail %d"

.subsections_via_symbols
