	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mtk_mdp_ctrls_create
_mtk_mdp_ctrls_create:                  ## @mtk_mdp_ctrls_create
	.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
	leaq	16(%rdi), %r14
	movq	_MTK_MDP_MAX_CTRL_NUM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_v4l2_ctrl_handler_init
	movq	_V4L2_CID_ROTATE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$0, (%rsp)
	movq	_mtk_mdp_ctrl_ops@GOTPCREL(%rip), %r15
	movq	%r14, %rdi
	movq	%r15, %rsi
	xorl	%ecx, %ecx
	movl	$270, %r8d                      ## imm = 0x10E
	movl	$90, %r9d
	callq	_v4l2_ctrl_new_std
	movq	%rax, 48(%rbx)
	movq	_V4L2_CID_HFLIP@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$0, (%rsp)
	movq	%r14, %rdi
	movq	%r15, %rsi
	xorl	%ecx, %ecx
	movl	$1, %r8d
	movl	$1, %r9d
	callq	_v4l2_ctrl_new_std
	movq	%rax, 40(%rbx)
	movq	_V4L2_CID_VFLIP@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$0, (%rsp)
	movq	%r14, %rdi
	movq	%r15, %rsi
	xorl	%ecx, %ecx
	movl	$1, %r8d
	movl	$1, %r9d
	callq	_v4l2_ctrl_new_std
	movq	%rax, 32(%rbx)
	movq	_V4L2_CID_ALPHA_COMPONENT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$0, (%rsp)
	movq	%r14, %rdi
	movq	%r15, %rsi
	xorl	%ecx, %ecx
	movl	$255, %r8d
	movl	$1, %r9d
	callq	_v4l2_ctrl_new_std
	movq	%rax, 24(%rbx)
	movl	16(%rbx), %r15d
	xorl	%eax, %eax
	testl	%r15d, %r15d
	sete	%al
	movl	%eax, (%rbx)
	je	LBB0_2
## %bb.1:
	movq	%r14, %rdi
	callq	_v4l2_ctrl_handler_free
	movq	8(%rbx), %rax
	movq	(%rax), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
LBB0_2:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MTK_MDP_MAX_CTRL_NUM,4,2       ## @MTK_MDP_MAX_CTRL_NUM
	.comm	_mtk_mdp_ctrl_ops,4,2           ## @mtk_mdp_ctrl_ops
	.comm	_V4L2_CID_ROTATE,4,2            ## @V4L2_CID_ROTATE
	.comm	_V4L2_CID_HFLIP,4,2             ## @V4L2_CID_HFLIP
	.comm	_V4L2_CID_VFLIP,4,2             ## @V4L2_CID_VFLIP
	.comm	_V4L2_CID_ALPHA_COMPONENT,4,2   ## @V4L2_CID_ALPHA_COMPONENT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to create control handlers\n"

	.no_dead_strip	_mtk_mdp_ctrls_create
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mtk_mdp_ctrls_create
_mtk_mdp_ctrls_create:                  ; @mtk_mdp_ctrls_create
	.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
	add	x20, x0, #16
Lloh0:
	adrp	x8, _MTK_MDP_MAX_CTRL_NUM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MTK_MDP_MAX_CTRL_NUM@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_v4l2_ctrl_handler_init
Lloh3:
	adrp	x8, _V4L2_CID_ROTATE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _V4L2_CID_ROTATE@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
Lloh6:
	adrp	x21, _mtk_mdp_ctrl_ops@GOTPAGE
Lloh7:
	ldr	x21, [x21, _mtk_mdp_ctrl_ops@GOTPAGEOFF]
	mov	x0, x20
	mov	x1, x21
	mov	w3, #0
	mov	w4, #270
	mov	w5, #90
	mov	w6, #0
	bl	_v4l2_ctrl_new_std
	str	x0, [x19, #48]
Lloh8:
	adrp	x8, _V4L2_CID_HFLIP@GOTPAGE
Lloh9:
	ldr	x8, [x8, _V4L2_CID_HFLIP@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, x21
	mov	w3, #0
	mov	w4, #1
	mov	w5, #1
	mov	w6, #0
	bl	_v4l2_ctrl_new_std
	str	x0, [x19, #40]
Lloh11:
	adrp	x8, _V4L2_CID_VFLIP@GOTPAGE
Lloh12:
	ldr	x8, [x8, _V4L2_CID_VFLIP@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, x21
	mov	w3, #0
	mov	w4, #1
	mov	w5, #1
	mov	w6, #0
	bl	_v4l2_ctrl_new_std
	str	x0, [x19, #32]
Lloh14:
	adrp	x8, _V4L2_CID_ALPHA_COMPONENT@GOTPAGE
Lloh15:
	ldr	x8, [x8, _V4L2_CID_ALPHA_COMPONENT@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, x21
	mov	w3, #0
	mov	w4, #255
	mov	w5, #1
	mov	w6, #0
	bl	_v4l2_ctrl_new_std
	str	x0, [x19, #24]
	ldr	w21, [x19, #16]
	cmp	w21, #0
	cset	w8, eq
	str	w8, [x19]
	cbz	w21, LBB0_2
; %bb.1:
	mov	x0, x20
	bl	_v4l2_ctrl_handler_free
	ldr	x8, [x19, #8]
	ldr	x0, [x8]
Lloh17:
	adrp	x1, l_.str@PAGE
Lloh18:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
LBB0_2:
	mov	x0, x21
	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	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	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_MTK_MDP_MAX_CTRL_NUM,4,2       ; @MTK_MDP_MAX_CTRL_NUM
	.comm	_mtk_mdp_ctrl_ops,4,2           ; @mtk_mdp_ctrl_ops
	.comm	_V4L2_CID_ROTATE,4,2            ; @V4L2_CID_ROTATE
	.comm	_V4L2_CID_HFLIP,4,2             ; @V4L2_CID_HFLIP
	.comm	_V4L2_CID_VFLIP,4,2             ; @V4L2_CID_VFLIP
	.comm	_V4L2_CID_ALPHA_COMPONENT,4,2   ; @V4L2_CID_ALPHA_COMPONENT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to create control handlers\n"

	.no_dead_strip	_mtk_mdp_ctrls_create
.subsections_via_symbols
