	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mt9m111_set_green_balance
_mt9m111_set_green_balance:             ## @mt9m111_set_green_balance
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -24
	movl	%esi, %ecx
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -16(%rbp)
	movzbl	%cl, %eax
	movl	%eax, -20(%rbp)
	movzbl	%ch, %eax
	movl	%eax, -24(%rbp)
	movq	_D_CONF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	callq	_gspca_dbg
	movq	_MT9M111_SC_GREEN_1_GAIN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-24(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$2, %ecx
	callq	_m5602_write_sensor
	testl	%eax, %eax
	js	LBB0_2
## %bb.1:
	movq	_MT9M111_SC_GREEN_2_GAIN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-24(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$2, %ecx
	callq	_m5602_write_sensor
LBB0_2:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-16(%rbp), %rcx
	jne	LBB0_4
## %bb.3:
	addq	$24, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_4:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_D_CONF,4,2                     ## @D_CONF
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Set green balance %d\n"

	.comm	_MT9M111_SC_GREEN_1_GAIN,4,2    ## @MT9M111_SC_GREEN_1_GAIN
	.comm	_MT9M111_SC_GREEN_2_GAIN,4,2    ## @MT9M111_SC_GREEN_2_GAIN
	.no_dead_strip	_mt9m111_set_green_balance
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mt9m111_set_green_balance
_mt9m111_set_green_balance:             ; @mt9m111_set_green_balance
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x3, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #8]
	and	w8, w1, #0xff
	ubfx	w9, w1, #8, #8
	stp	w9, w8, [sp]
Lloh3:
	adrp	x8, _D_CONF@GOTPAGE
Lloh4:
	ldr	x8, [x8, _D_CONF@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x2, l_.str@PAGE
Lloh7:
	add	x2, x2, l_.str@PAGEOFF
	bl	_gspca_dbg
Lloh8:
	adrp	x8, _MT9M111_SC_GREEN_1_GAIN@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MT9M111_SC_GREEN_1_GAIN@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x2, sp
	mov	x0, x19
	mov	w3, #2
	bl	_m5602_write_sensor
	tbnz	w0, #31, LBB0_2
; %bb.1:
Lloh11:
	adrp	x8, _MT9M111_SC_GREEN_2_GAIN@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MT9M111_SC_GREEN_2_GAIN@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x2, sp
	mov	x0, x19
	mov	w3, #2
	bl	_m5602_write_sensor
LBB0_2:
	ldr	x8, [sp, #8]
Lloh14:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh15:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_4
; %bb.3:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_4:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_D_CONF,4,2                     ; @D_CONF
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Set green balance %d\n"

	.comm	_MT9M111_SC_GREEN_1_GAIN,4,2    ; @MT9M111_SC_GREEN_1_GAIN
	.comm	_MT9M111_SC_GREEN_2_GAIN,4,2    ; @MT9M111_SC_GREEN_2_GAIN
	.no_dead_strip	_mt9m111_set_green_balance
.subsections_via_symbols
