	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mt9m111_set_blue_balance
_mt9m111_set_blue_balance:              ## @mt9m111_set_blue_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, %edx
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -16(%rbp)
	movq	(%rdi), %rax
	movq	_BLUE_BALANCE_IDX@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	%esi, (%rax,%rcx,4)
	movzbl	%dl, %eax
	movl	%eax, -20(%rbp)
	movzbl	%dh, %eax
	movl	%eax, -24(%rbp)
	movq	_D_V4L2@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_PDEBUG
	movq	_MT9M111_SC_BLUE_GAIN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-24(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$2, %ecx
	callq	_m5602_write_sensor
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-16(%rbp), %rcx
	jne	LBB0_2
## %bb.1:
	addq	$24, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_2:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_BLUE_BALANCE_IDX,8,3           ## @BLUE_BALANCE_IDX
	.comm	_D_V4L2,4,2                     ## @D_V4L2
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Set blue balance %d"

	.comm	_MT9M111_SC_BLUE_GAIN,4,2       ## @MT9M111_SC_BLUE_GAIN
	.no_dead_strip	_mt9m111_set_blue_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_blue_balance
_mt9m111_set_blue_balance:              ; @mt9m111_set_blue_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	x2, 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]
	ldr	x8, [x0]
Lloh3:
	adrp	x9, _BLUE_BALANCE_IDX@GOTPAGE
Lloh4:
	ldr	x9, [x9, _BLUE_BALANCE_IDX@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	str	w1, [x8, x9, lsl #2]
	and	w8, w1, #0xff
	ubfx	w9, w1, #8, #8
	stp	w9, w8, [sp]
Lloh6:
	adrp	x8, _D_V4L2@GOTPAGE
Lloh7:
	ldr	x8, [x8, _D_V4L2@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	bl	_PDEBUG
Lloh11:
	adrp	x8, _MT9M111_SC_BLUE_GAIN@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MT9M111_SC_BLUE_GAIN@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x2, sp
	mov	x0, x19
	mov	w3, #2
	bl	_m5602_write_sensor
	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_2
; %bb.1:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_2:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_BLUE_BALANCE_IDX,8,3           ; @BLUE_BALANCE_IDX
	.comm	_D_V4L2,4,2                     ; @D_V4L2
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Set blue balance %d"

	.comm	_MT9M111_SC_BLUE_GAIN,4,2       ; @MT9M111_SC_BLUE_GAIN
	.no_dead_strip	_mt9m111_set_blue_balance
.subsections_via_symbols
