	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mt9m111_g_ctrl
_mt9m111_g_ctrl:                        ## @mt9m111_g_ctrl
	.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	%rsi, %r15
	callq	_v4l2_get_subdevdata
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_to_mt9m111
	movl	(%r15), %ecx
	xorl	%r14d, %r14d
	addl	$-128, %ecx
	cmpl	$4, %ecx
	ja	LBB0_19
## %bb.1:
	leaq	LJTI0_0(%rip), %rdx
	movslq	(%rdx,%rcx,4), %rcx
	addq	%rdx, %rcx
	jmpq	*%rcx
LBB0_2:
	movl	8(%rax), %eax
	movq	_HIGHPOWER@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_3
## %bb.4:
	movq	_READ_MODE_B@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_9:
	movl	8(%rax), %eax
	movq	_HIGHPOWER@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_10
## %bb.11:
	movq	_READ_MODE_B@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_14:
	movq	%rbx, %rdi
	callq	_mt9m111_get_global_gain
	testl	%eax, %eax
	jns	LBB0_18
## %bb.15:
	movl	%eax, %r14d
	jmp	LBB0_19
LBB0_16:
	movl	(%rax), %eax
	jmp	LBB0_18
LBB0_17:
	movl	4(%rax), %eax
LBB0_18:
	movl	%eax, 4(%r15)
	jmp	LBB0_19
LBB0_3:
	movq	_READ_MODE_A@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %edi
	callq	_reg_read
	testl	%eax, %eax
	js	LBB0_6
## %bb.7:
	movq	_MT9M111_RMB_MIRROR_ROWS@GOTPCREL(%rip), %rcx
	jmp	LBB0_8
LBB0_10:
	movq	_READ_MODE_A@GOTPCREL(%rip), %rax
LBB0_12:
	movl	(%rax), %edi
	callq	_reg_read
	testl	%eax, %eax
	js	LBB0_6
## %bb.13:
	movq	_MT9M111_RMB_MIRROR_COLS@GOTPCREL(%rip), %rcx
LBB0_8:
	xorl	%edx, %edx
	andl	(%rcx), %eax
	setne	%dl
	movl	%edx, 4(%r15)
	jmp	LBB0_19
LBB0_6:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_19:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_2, LBB0_2-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_14, LBB0_14-LJTI0_0
.set L0_0_set_16, LBB0_16-LJTI0_0
.set L0_0_set_17, LBB0_17-LJTI0_0
LJTI0_0:
	.long	L0_0_set_2
	.long	L0_0_set_9
	.long	L0_0_set_14
	.long	L0_0_set_16
	.long	L0_0_set_17
	.end_data_region
                                        ## -- End function
	.comm	_HIGHPOWER,4,2                  ## @HIGHPOWER
	.comm	_READ_MODE_B,4,2                ## @READ_MODE_B
	.comm	_READ_MODE_A,4,2                ## @READ_MODE_A
	.comm	_EIO,4,2                        ## @EIO
	.comm	_MT9M111_RMB_MIRROR_ROWS,4,2    ## @MT9M111_RMB_MIRROR_ROWS
	.comm	_MT9M111_RMB_MIRROR_COLS,4,2    ## @MT9M111_RMB_MIRROR_COLS
	.no_dead_strip	_mt9m111_g_ctrl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mt9m111_g_ctrl
_mt9m111_g_ctrl:                        ; @mt9m111_g_ctrl
	.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, x1
	bl	_v4l2_get_subdevdata
	mov	x20, x0
	bl	_to_mt9m111
	ldr	w9, [x19]
	sub	w9, w9, #128
	cmp	w9, #4
	b.hi	LBB0_4
; %bb.1:
	mov	x8, x0
Lloh0:
	adrp	x10, lJTI0_0@PAGE
Lloh1:
	add	x10, x10, lJTI0_0@PAGEOFF
	adr	x11, LBB0_2
	ldrb	w12, [x10, x9]
	add	x11, x11, x12, lsl #2
	br	x11
LBB0_2:
	ldr	w8, [x8, #8]
Lloh2:
	adrp	x9, _HIGHPOWER@GOTPAGE
Lloh3:
	ldr	x9, [x9, _HIGHPOWER@GOTPAGEOFF]
Lloh4:
	adrp	x10, _READ_MODE_B@GOTPAGE
Lloh5:
	ldr	x10, [x10, _READ_MODE_B@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x9]
Lloh7:
	adrp	x11, _READ_MODE_A@GOTPAGE
Lloh8:
	ldr	x11, [x11, _READ_MODE_A@GOTPAGEOFF]
	cmp	w8, w9
	csel	x8, x10, x11, eq
	ldr	w0, [x8]
	bl	_reg_read
	tbnz	w0, #31, LBB0_14
; %bb.3:
	mov	x8, x0
	mov	w0, #0
Lloh9:
	adrp	x9, _MT9M111_RMB_MIRROR_ROWS@GOTPAGE
Lloh10:
	ldr	x9, [x9, _MT9M111_RMB_MIRROR_ROWS@GOTPAGEOFF]
	b	LBB0_7
LBB0_4:
	mov	w0, #0
	b	LBB0_13
LBB0_5:
	ldr	w8, [x8, #8]
Lloh11:
	adrp	x9, _HIGHPOWER@GOTPAGE
Lloh12:
	ldr	x9, [x9, _HIGHPOWER@GOTPAGEOFF]
Lloh13:
	adrp	x10, _READ_MODE_B@GOTPAGE
Lloh14:
	ldr	x10, [x10, _READ_MODE_B@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
Lloh16:
	adrp	x11, _READ_MODE_A@GOTPAGE
Lloh17:
	ldr	x11, [x11, _READ_MODE_A@GOTPAGEOFF]
	cmp	w8, w9
	csel	x8, x10, x11, eq
	ldr	w0, [x8]
	bl	_reg_read
	tbnz	w0, #31, LBB0_14
; %bb.6:
	mov	x8, x0
	mov	w0, #0
Lloh18:
	adrp	x9, _MT9M111_RMB_MIRROR_COLS@GOTPAGE
Lloh19:
	ldr	x9, [x9, _MT9M111_RMB_MIRROR_COLS@GOTPAGEOFF]
LBB0_7:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w8, ne
	b	LBB0_12
LBB0_8:
	mov	x0, x20
	bl	_mt9m111_get_global_gain
	tbnz	w0, #31, LBB0_13
; %bb.9:
	str	w0, [x19, #4]
	mov	w0, #0
	b	LBB0_13
LBB0_10:
	mov	w0, #0
	ldr	w8, [x8]
	b	LBB0_12
LBB0_11:
	mov	w0, #0
	ldr	w8, [x8, #4]
LBB0_12:
	str	w8, [x19, #4]
LBB0_13:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_14:
Lloh20:
	adrp	x8, _EIO@GOTPAGE
Lloh21:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_13
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh6
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh15
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_5-LBB0_2)>>2
	.byte	(LBB0_8-LBB0_2)>>2
	.byte	(LBB0_10-LBB0_2)>>2
	.byte	(LBB0_11-LBB0_2)>>2
                                        ; -- End function
	.comm	_HIGHPOWER,4,2                  ; @HIGHPOWER
	.comm	_READ_MODE_B,4,2                ; @READ_MODE_B
	.comm	_READ_MODE_A,4,2                ; @READ_MODE_A
	.comm	_EIO,4,2                        ; @EIO
	.comm	_MT9M111_RMB_MIRROR_ROWS,4,2    ; @MT9M111_RMB_MIRROR_ROWS
	.comm	_MT9M111_RMB_MIRROR_COLS,4,2    ; @MT9M111_RMB_MIRROR_COLS
	.no_dead_strip	_mt9m111_g_ctrl
.subsections_via_symbols
