	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ov7740_set_white_balance
_ov7740_set_white_balance:              ## @ov7740_set_white_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	%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
	movl	%esi, %ebx
	movq	%rdi, %r14
	movq	16(%rdi), %r15
	movq	_REG_ISP_CTRL00@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	leaq	-36(%rbp), %rdx
	movq	%r15, %rdi
	callq	_regmap_read
	testl	%eax, %eax
	je	LBB0_1
LBB0_5:
	testl	%ebx, %ebx
	je	LBB0_6
LBB0_8:
	xorl	%eax, %eax
	jmp	LBB0_9
LBB0_1:
	movq	_ISPCTRL00_AWB_EN@GOTPCREL(%rip), %rax
	movq	_ISPCTRL00_AWB_GAIN_EN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	testl	%ebx, %ebx
	je	LBB0_3
## %bb.2:
	orl	-36(%rbp), %edx
	jmp	LBB0_4
LBB0_6:
	movq	_REG_BGAIN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	8(%r14), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_regmap_write
	testl	%eax, %eax
	jne	LBB0_9
## %bb.7:
	movq	_REG_RGAIN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	(%r14), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_regmap_write
	testl	%eax, %eax
	jne	LBB0_9
	jmp	LBB0_8
LBB0_3:
	notl	%edx
	andl	-36(%rbp), %edx
LBB0_4:
	movl	%edx, -36(%rbp)
	movl	(%r12), %esi
	movq	%r15, %rdi
	callq	_regmap_write
	testl	%eax, %eax
	je	LBB0_5
LBB0_9:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_REG_ISP_CTRL00,4,2             ## @REG_ISP_CTRL00
	.comm	_ISPCTRL00_AWB_EN,4,2           ## @ISPCTRL00_AWB_EN
	.comm	_ISPCTRL00_AWB_GAIN_EN,4,2      ## @ISPCTRL00_AWB_GAIN_EN
	.comm	_REG_BGAIN,4,2                  ## @REG_BGAIN
	.comm	_REG_RGAIN,4,2                  ## @REG_RGAIN
	.no_dead_strip	_ov7740_set_white_balance
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ov7740_set_white_balance
_ov7740_set_white_balance:              ; @ov7740_set_white_balance
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x21, x1
	mov	x20, x0
	ldr	x19, [x0, #16]
Lloh0:
	adrp	x22, _REG_ISP_CTRL00@GOTPAGE
Lloh1:
	ldr	x22, [x22, _REG_ISP_CTRL00@GOTPAGEOFF]
	ldr	w1, [x22]
	add	x2, sp, #12
	mov	x0, x19
	bl	_regmap_read
	cbz	w0, LBB0_3
LBB0_1:
	cbz	w21, LBB0_5
LBB0_2:
	mov	w0, #0
	b	LBB0_9
LBB0_3:
Lloh2:
	adrp	x8, _ISPCTRL00_AWB_EN@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ISPCTRL00_AWB_EN@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _ISPCTRL00_AWB_GAIN_EN@GOTPAGE
Lloh6:
	ldr	x9, [x9, _ISPCTRL00_AWB_GAIN_EN@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	orr	w8, w9, w8
	cbz	w21, LBB0_7
; %bb.4:
	ldr	w9, [sp, #12]
	orr	w2, w8, w9
	b	LBB0_8
LBB0_5:
Lloh8:
	adrp	x8, _REG_BGAIN@GOTPAGE
Lloh9:
	ldr	x8, [x8, _REG_BGAIN@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	ldr	x8, [x20, #8]
	ldr	w2, [x8]
	mov	x0, x19
	bl	_regmap_write
	cbnz	w0, LBB0_9
; %bb.6:
Lloh11:
	adrp	x8, _REG_RGAIN@GOTPAGE
Lloh12:
	ldr	x8, [x8, _REG_RGAIN@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	ldr	x8, [x20]
	ldr	w2, [x8]
	mov	x0, x19
	bl	_regmap_write
	cbnz	w0, LBB0_9
	b	LBB0_2
LBB0_7:
	ldr	w9, [sp, #12]
	bic	w2, w9, w8
LBB0_8:
	str	w2, [sp, #12]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_regmap_write
	cbz	w0, LBB0_1
LBB0_9:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_REG_ISP_CTRL00,4,2             ; @REG_ISP_CTRL00
	.comm	_ISPCTRL00_AWB_EN,4,2           ; @ISPCTRL00_AWB_EN
	.comm	_ISPCTRL00_AWB_GAIN_EN,4,2      ; @ISPCTRL00_AWB_GAIN_EN
	.comm	_REG_BGAIN,4,2                  ; @REG_BGAIN
	.comm	_REG_RGAIN,4,2                  ; @REG_RGAIN
	.no_dead_strip	_ov7740_set_white_balance
.subsections_via_symbols
