	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mt9m111_init_controls          ## -- Begin function mt9m111_init_controls
	.p2align	4, 0x90
_mt9m111_init_controls:                 ## @mt9m111_init_controls
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	leaq	56(%rdi), %rbx
	movq	%rbx, 48(%rdi)
	movq	%rbx, %rdi
	movl	$7, %esi
	callq	_v4l2_ctrl_handler_init
	movq	_V4L2_CID_AUTO_WHITE_BALANCE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$0, (%rsp)
	movq	_mt9m111_ctrl_ops@GOTPCREL(%rip), %r12
	xorl	%r14d, %r14d
	movq	%rbx, %rdi
	movq	%r12, %rsi
	xorl	%ecx, %ecx
	movl	$1, %r8d
	movl	$1, %r9d
	callq	_v4l2_ctrl_new_std
	movq	%rax, 8(%r15)
	movq	_mt9m111_greenbal_cfg@GOTPCREL(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_v4l2_ctrl_new_custom
	movl	%eax, 40(%r15)
	movq	_V4L2_CID_RED_BALANCE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_MT9M111_RED_GAIN_DEFAULT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rsp)
	movq	%rbx, %rdi
	movq	%r12, %rsi
	xorl	%ecx, %ecx
	movl	$2047, %r8d                     ## imm = 0x7FF
	movl	$1, %r9d
	callq	_v4l2_ctrl_new_std
	movq	%rax, 32(%r15)
	movq	_V4L2_CID_BLUE_BALANCE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_MT9M111_BLUE_GAIN_DEFAULT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rsp)
	movq	%rbx, %rdi
	movq	%r12, %rsi
	xorl	%ecx, %ecx
	movl	$2047, %r8d                     ## imm = 0x7FF
	movl	$1, %r9d
	callq	_v4l2_ctrl_new_std
	movq	%rax, 24(%r15)
	movq	_V4L2_CID_GAIN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_INITIAL_MAX_GAIN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leal	-8(,%rax,8), %r8d
	movq	_MT9M111_DEFAULT_GAIN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rsp)
	movq	%rbx, %rdi
	movq	%r12, %rsi
	xorl	%ecx, %ecx
	movl	$1, %r9d
	callq	_v4l2_ctrl_new_std
	movq	_V4L2_CID_HFLIP@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$0, (%rsp)
	movq	%rbx, %rdi
	movq	%r12, %rsi
	xorl	%ecx, %ecx
	movl	$1, %r8d
	movl	$1, %r9d
	callq	_v4l2_ctrl_new_std
	movq	%rax, (%r15)
	movq	_V4L2_CID_VFLIP@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$0, (%rsp)
	movq	%rbx, %rdi
	movq	%r12, %rsi
	xorl	%ecx, %ecx
	movl	$1, %r8d
	movl	$1, %r9d
	callq	_v4l2_ctrl_new_std
	movq	%rax, 16(%r15)
	cmpl	$0, 56(%r15)
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	_pr_err
	movl	(%rbx), %r14d
	jmp	LBB0_3
LBB0_2:
	leaq	8(%r15), %rsi
	movl	$4, %edi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_v4l2_ctrl_auto_cluster
	movl	$2, %edi
	movq	%r15, %rsi
	callq	_v4l2_ctrl_cluster
LBB0_3:
	movl	%r14d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_mt9m111_ctrl_ops,4,2           ## @mt9m111_ctrl_ops
	.comm	_V4L2_CID_AUTO_WHITE_BALANCE,4,2 ## @V4L2_CID_AUTO_WHITE_BALANCE
	.comm	_mt9m111_greenbal_cfg,4,2       ## @mt9m111_greenbal_cfg
	.comm	_V4L2_CID_RED_BALANCE,4,2       ## @V4L2_CID_RED_BALANCE
	.comm	_MT9M111_RED_GAIN_DEFAULT,4,2   ## @MT9M111_RED_GAIN_DEFAULT
	.comm	_V4L2_CID_BLUE_BALANCE,4,2      ## @V4L2_CID_BLUE_BALANCE
	.comm	_MT9M111_BLUE_GAIN_DEFAULT,4,2  ## @MT9M111_BLUE_GAIN_DEFAULT
	.comm	_V4L2_CID_GAIN,4,2              ## @V4L2_CID_GAIN
	.comm	_INITIAL_MAX_GAIN,4,2           ## @INITIAL_MAX_GAIN
	.comm	_MT9M111_DEFAULT_GAIN,4,2       ## @MT9M111_DEFAULT_GAIN
	.comm	_V4L2_CID_HFLIP,4,2             ## @V4L2_CID_HFLIP
	.comm	_V4L2_CID_VFLIP,4,2             ## @V4L2_CID_VFLIP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Could not initialize controls\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mt9m111_init_controls          ; -- Begin function mt9m111_init_controls
	.p2align	2
_mt9m111_init_controls:                 ; @mt9m111_init_controls
	.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, #56
	str	x20, [x0, #48]
	mov	x0, x20
	mov	w1, #7
	bl	_v4l2_ctrl_handler_init
Lloh0:
	adrp	x8, _V4L2_CID_AUTO_WHITE_BALANCE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _V4L2_CID_AUTO_WHITE_BALANCE@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
Lloh3:
	adrp	x22, _mt9m111_ctrl_ops@GOTPAGE
Lloh4:
	ldr	x22, [x22, _mt9m111_ctrl_ops@GOTPAGEOFF]
	mov	x0, x20
	mov	x1, x22
	mov	w3, #0
	mov	w4, #1
	mov	w5, #1
	mov	w6, #0
	bl	_v4l2_ctrl_new_std
	mov	x21, x19
	str	x0, [x21, #8]!
Lloh5:
	adrp	x1, _mt9m111_greenbal_cfg@GOTPAGE
Lloh6:
	ldr	x1, [x1, _mt9m111_greenbal_cfg@GOTPAGEOFF]
	mov	x0, x20
	mov	x2, #0
	bl	_v4l2_ctrl_new_custom
	str	w0, [x19, #40]
Lloh7:
	adrp	x8, _V4L2_CID_RED_BALANCE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _V4L2_CID_RED_BALANCE@GOTPAGEOFF]
Lloh9:
	ldr	w2, [x8]
Lloh10:
	adrp	x8, _MT9M111_RED_GAIN_DEFAULT@GOTPAGE
Lloh11:
	ldr	x8, [x8, _MT9M111_RED_GAIN_DEFAULT@GOTPAGEOFF]
Lloh12:
	ldr	w6, [x8]
	mov	x0, x20
	mov	x1, x22
	mov	w3, #0
	mov	w4, #2047
	mov	w5, #1
	bl	_v4l2_ctrl_new_std
	str	x0, [x19, #32]
Lloh13:
	adrp	x8, _V4L2_CID_BLUE_BALANCE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _V4L2_CID_BLUE_BALANCE@GOTPAGEOFF]
Lloh15:
	ldr	w2, [x8]
Lloh16:
	adrp	x8, _MT9M111_BLUE_GAIN_DEFAULT@GOTPAGE
Lloh17:
	ldr	x8, [x8, _MT9M111_BLUE_GAIN_DEFAULT@GOTPAGEOFF]
Lloh18:
	ldr	w6, [x8]
	mov	x0, x20
	mov	x1, x22
	mov	w3, #0
	mov	w4, #2047
	mov	w5, #1
	bl	_v4l2_ctrl_new_std
	str	x0, [x19, #24]
Lloh19:
	adrp	x8, _V4L2_CID_GAIN@GOTPAGE
Lloh20:
	ldr	x8, [x8, _V4L2_CID_GAIN@GOTPAGEOFF]
Lloh21:
	ldr	w2, [x8]
Lloh22:
	adrp	x8, _INITIAL_MAX_GAIN@GOTPAGE
Lloh23:
	ldr	x8, [x8, _INITIAL_MAX_GAIN@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	lsl	w8, w8, #3
	sub	w4, w8, #8
Lloh25:
	adrp	x8, _MT9M111_DEFAULT_GAIN@GOTPAGE
Lloh26:
	ldr	x8, [x8, _MT9M111_DEFAULT_GAIN@GOTPAGEOFF]
Lloh27:
	ldr	w6, [x8]
	mov	x0, x20
	mov	x1, x22
	mov	w3, #0
	mov	w5, #1
	bl	_v4l2_ctrl_new_std
Lloh28:
	adrp	x8, _V4L2_CID_HFLIP@GOTPAGE
Lloh29:
	ldr	x8, [x8, _V4L2_CID_HFLIP@GOTPAGEOFF]
Lloh30:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, x22
	mov	w3, #0
	mov	w4, #1
	mov	w5, #1
	mov	w6, #0
	bl	_v4l2_ctrl_new_std
	str	x0, [x19]
Lloh31:
	adrp	x8, _V4L2_CID_VFLIP@GOTPAGE
Lloh32:
	ldr	x8, [x8, _V4L2_CID_VFLIP@GOTPAGEOFF]
Lloh33:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, x22
	mov	w3, #0
	mov	w4, #1
	mov	w5, #1
	mov	w6, #0
	bl	_v4l2_ctrl_new_std
	str	x0, [x19, #16]
	ldr	w8, [x19, #56]
	cbz	w8, LBB0_2
; %bb.1:
Lloh34:
	adrp	x0, l_.str@PAGE
Lloh35:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
	ldr	w0, [x20]
	b	LBB0_3
LBB0_2:
	mov	w0, #4
	mov	x1, x21
	mov	w2, #0
	mov	w3, #0
	bl	_v4l2_ctrl_auto_cluster
	mov	w0, #2
	mov	x1, x19
	bl	_v4l2_ctrl_cluster
	mov	w0, #0
LBB0_3:
	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	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_mt9m111_ctrl_ops,4,2           ; @mt9m111_ctrl_ops
	.comm	_V4L2_CID_AUTO_WHITE_BALANCE,4,2 ; @V4L2_CID_AUTO_WHITE_BALANCE
	.comm	_mt9m111_greenbal_cfg,4,2       ; @mt9m111_greenbal_cfg
	.comm	_V4L2_CID_RED_BALANCE,4,2       ; @V4L2_CID_RED_BALANCE
	.comm	_MT9M111_RED_GAIN_DEFAULT,4,2   ; @MT9M111_RED_GAIN_DEFAULT
	.comm	_V4L2_CID_BLUE_BALANCE,4,2      ; @V4L2_CID_BLUE_BALANCE
	.comm	_MT9M111_BLUE_GAIN_DEFAULT,4,2  ; @MT9M111_BLUE_GAIN_DEFAULT
	.comm	_V4L2_CID_GAIN,4,2              ; @V4L2_CID_GAIN
	.comm	_INITIAL_MAX_GAIN,4,2           ; @INITIAL_MAX_GAIN
	.comm	_MT9M111_DEFAULT_GAIN,4,2       ; @MT9M111_DEFAULT_GAIN
	.comm	_V4L2_CID_HFLIP,4,2             ; @V4L2_CID_HFLIP
	.comm	_V4L2_CID_VFLIP,4,2             ; @V4L2_CID_VFLIP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Could not initialize controls\n"

.subsections_via_symbols
