	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function s5k6aa_set_awb
_s5k6aa_set_awb:                        ## @s5k6aa_set_awb
	.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, %r14d
	movq	%rdi, %rbx
	addq	$24, %rdi
	callq	_v4l2_get_subdevdata
	movq	%rax, %r15
	movq	_REG_DBG_AUTOALG_EN@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	leaq	-36(%rbp), %rdx
	movq	%rax, %rdi
	callq	_s5k6aa_read
	movl	%eax, %ecx
	orl	%r14d, %ecx
	je	LBB0_1
## %bb.7:
	testl	%eax, %eax
	jne	LBB0_9
LBB0_8:
	movl	-36(%rbp), %eax
	movq	_AALG_WB_EN_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%edx, %ecx
	orl	%eax, %ecx
	notl	%edx
	andl	%eax, %edx
	testl	%r14d, %r14d
	cmovnel	%ecx, %edx
	movl	%edx, -36(%rbp)
	movl	(%r12), %esi
	movq	%r15, %rdi
	callq	_s5k6aa_write
	jmp	LBB0_9
LBB0_1:
	movq	_REG_SF_RGAIN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	16(%rbx), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_s5k6aa_write
	testl	%eax, %eax
	jne	LBB0_9
## %bb.2:
	movq	_REG_SF_RGAIN_CHG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	$1, %edx
	callq	_s5k6aa_write
	testl	%eax, %eax
	jne	LBB0_9
## %bb.3:
	movq	_REG_SF_GGAIN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	8(%rbx), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_s5k6aa_write
	testl	%eax, %eax
	jne	LBB0_9
## %bb.4:
	movq	_REG_SF_GGAIN_CHG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	$1, %edx
	callq	_s5k6aa_write
	testl	%eax, %eax
	jne	LBB0_9
## %bb.5:
	movq	_REG_SF_BGAIN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	(%rbx), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_s5k6aa_write
	testl	%eax, %eax
	jne	LBB0_9
## %bb.6:
	movq	_REG_SF_BGAIN_CHG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	$1, %edx
	callq	_s5k6aa_write
	testl	%eax, %eax
	je	LBB0_8
LBB0_9:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_REG_DBG_AUTOALG_EN,4,2         ## @REG_DBG_AUTOALG_EN
	.comm	_REG_SF_RGAIN,4,2               ## @REG_SF_RGAIN
	.comm	_REG_SF_RGAIN_CHG,4,2           ## @REG_SF_RGAIN_CHG
	.comm	_REG_SF_GGAIN,4,2               ## @REG_SF_GGAIN
	.comm	_REG_SF_GGAIN_CHG,4,2           ## @REG_SF_GGAIN_CHG
	.comm	_REG_SF_BGAIN,4,2               ## @REG_SF_BGAIN
	.comm	_REG_SF_BGAIN_CHG,4,2           ## @REG_SF_BGAIN_CHG
	.comm	_AALG_WB_EN_MASK,4,2            ## @AALG_WB_EN_MASK
	.no_dead_strip	_s5k6aa_set_awb
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function s5k6aa_set_awb
_s5k6aa_set_awb:                        ; @s5k6aa_set_awb
	.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	x19, x1
	mov	x21, x0
	add	x0, x0, #24
	bl	_v4l2_get_subdevdata
	mov	x20, x0
Lloh0:
	adrp	x22, _REG_DBG_AUTOALG_EN@GOTPAGE
Lloh1:
	ldr	x22, [x22, _REG_DBG_AUTOALG_EN@GOTPAGEOFF]
	ldr	w1, [x22]
	add	x2, sp, #12
	bl	_s5k6aa_read
	orr	w8, w0, w19
	cbz	w8, LBB0_3
; %bb.1:
	cbnz	w0, LBB0_9
LBB0_2:
	ldr	w8, [sp, #12]
Lloh2:
	adrp	x9, _AALG_WB_EN_MASK@GOTPAGE
Lloh3:
	ldr	x9, [x9, _AALG_WB_EN_MASK@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	orr	w10, w9, w8
	bic	w8, w8, w9
	cmp	w19, #0
	csel	w2, w8, w10, eq
	str	w2, [sp, #12]
	ldr	w1, [x22]
	mov	x0, x20
	bl	_s5k6aa_write
	b	LBB0_9
LBB0_3:
Lloh5:
	adrp	x8, _REG_SF_RGAIN@GOTPAGE
Lloh6:
	ldr	x8, [x8, _REG_SF_RGAIN@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	ldr	x8, [x21, #16]
	ldr	w2, [x8]
	mov	x0, x20
	bl	_s5k6aa_write
	cbnz	w0, LBB0_9
; %bb.4:
Lloh8:
	adrp	x8, _REG_SF_RGAIN_CHG@GOTPAGE
Lloh9:
	ldr	x8, [x8, _REG_SF_RGAIN_CHG@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #1
	bl	_s5k6aa_write
	cbnz	w0, LBB0_9
; %bb.5:
Lloh11:
	adrp	x8, _REG_SF_GGAIN@GOTPAGE
Lloh12:
	ldr	x8, [x8, _REG_SF_GGAIN@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	ldr	x8, [x21, #8]
	ldr	w2, [x8]
	mov	x0, x20
	bl	_s5k6aa_write
	cbnz	w0, LBB0_9
; %bb.6:
Lloh14:
	adrp	x8, _REG_SF_GGAIN_CHG@GOTPAGE
Lloh15:
	ldr	x8, [x8, _REG_SF_GGAIN_CHG@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #1
	bl	_s5k6aa_write
	cbnz	w0, LBB0_9
; %bb.7:
Lloh17:
	adrp	x8, _REG_SF_BGAIN@GOTPAGE
Lloh18:
	ldr	x8, [x8, _REG_SF_BGAIN@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	ldr	x8, [x21]
	ldr	w2, [x8]
	mov	x0, x20
	bl	_s5k6aa_write
	cbnz	w0, LBB0_9
; %bb.8:
Lloh20:
	adrp	x8, _REG_SF_BGAIN_CHG@GOTPAGE
Lloh21:
	ldr	x8, [x8, _REG_SF_BGAIN_CHG@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #1
	bl	_s5k6aa_write
	cbz	w0, LBB0_2
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	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_REG_DBG_AUTOALG_EN,4,2         ; @REG_DBG_AUTOALG_EN
	.comm	_REG_SF_RGAIN,4,2               ; @REG_SF_RGAIN
	.comm	_REG_SF_RGAIN_CHG,4,2           ; @REG_SF_RGAIN_CHG
	.comm	_REG_SF_GGAIN,4,2               ; @REG_SF_GGAIN
	.comm	_REG_SF_GGAIN_CHG,4,2           ; @REG_SF_GGAIN_CHG
	.comm	_REG_SF_BGAIN,4,2               ; @REG_SF_BGAIN
	.comm	_REG_SF_BGAIN_CHG,4,2           ; @REG_SF_BGAIN_CHG
	.comm	_AALG_WB_EN_MASK,4,2            ; @AALG_WB_EN_MASK
	.no_dead_strip	_s5k6aa_set_awb
.subsections_via_symbols
