	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function s5k6aa_set_anti_flicker
_s5k6aa_set_anti_flicker:               ## @s5k6aa_set_anti_flicker
	.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
	movl	%esi, %r14d
	callq	_v4l2_get_subdevdata
	movq	%rax, %rbx
	movq	_REG_DBG_AUTOALG_EN@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	leaq	-28(%rbp), %rdx
	movq	%rax, %rdi
	callq	_s5k6aa_read
	testl	%eax, %eax
	jne	LBB0_7
## %bb.1:
	movq	_V4L2_CID_POWER_LINE_FREQUENCY_AUTO@GOTPCREL(%rip), %rax
	movq	_AALG_FLICKER_EN_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	cmpl	%r14d, (%rax)
	jne	LBB0_3
## %bb.2:
	orl	-28(%rbp), %edx
	movl	%edx, -28(%rbp)
LBB0_6:
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_s5k6aa_write
	jmp	LBB0_7
LBB0_3:
	notl	%edx
	andl	%edx, -28(%rbp)
	movq	_REG_SF_FLICKER_QUANT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	%r14d, %edx
	callq	_s5k6aa_write
	testl	%eax, %eax
	jne	LBB0_7
## %bb.4:
	movq	_REG_SF_FLICKER_QUANT_CHG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$1, %edx
	callq	_s5k6aa_write
	testl	%eax, %eax
	je	LBB0_5
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movl	-28(%rbp), %edx
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_REG_DBG_AUTOALG_EN,4,2         ## @REG_DBG_AUTOALG_EN
	.comm	_V4L2_CID_POWER_LINE_FREQUENCY_AUTO,4,2 ## @V4L2_CID_POWER_LINE_FREQUENCY_AUTO
	.comm	_AALG_FLICKER_EN_MASK,4,2       ## @AALG_FLICKER_EN_MASK
	.comm	_REG_SF_FLICKER_QUANT,4,2       ## @REG_SF_FLICKER_QUANT
	.comm	_REG_SF_FLICKER_QUANT_CHG,4,2   ## @REG_SF_FLICKER_QUANT_CHG
	.no_dead_strip	_s5k6aa_set_anti_flicker
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function s5k6aa_set_anti_flicker
_s5k6aa_set_anti_flicker:               ; @s5k6aa_set_anti_flicker
	.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	x20, x1
	bl	_v4l2_get_subdevdata
	mov	x19, x0
Lloh0:
	adrp	x21, _REG_DBG_AUTOALG_EN@GOTPAGE
Lloh1:
	ldr	x21, [x21, _REG_DBG_AUTOALG_EN@GOTPAGEOFF]
	ldr	w1, [x21]
	add	x2, sp, #12
	bl	_s5k6aa_read
	cbnz	w0, LBB0_6
; %bb.1:
Lloh2:
	adrp	x8, _V4L2_CID_POWER_LINE_FREQUENCY_AUTO@GOTPAGE
Lloh3:
	ldr	x8, [x8, _V4L2_CID_POWER_LINE_FREQUENCY_AUTO@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x8]
Lloh5:
	adrp	x8, _AALG_FLICKER_EN_MASK@GOTPAGE
Lloh6:
	ldr	x8, [x8, _AALG_FLICKER_EN_MASK@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	cmp	w9, w20
	b.ne	LBB0_4
; %bb.2:
	ldr	w9, [sp, #12]
	orr	w2, w9, w8
	str	w2, [sp, #12]
LBB0_3:
	ldr	w1, [x21]
	mov	x0, x19
	bl	_s5k6aa_write
	b	LBB0_6
LBB0_4:
	ldr	w9, [sp, #12]
	bic	w8, w9, w8
	str	w8, [sp, #12]
Lloh8:
	adrp	x8, _REG_SF_FLICKER_QUANT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _REG_SF_FLICKER_QUANT@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	bl	_s5k6aa_write
	cbnz	w0, LBB0_6
; %bb.5:
Lloh11:
	adrp	x8, _REG_SF_FLICKER_QUANT_CHG@GOTPAGE
Lloh12:
	ldr	x8, [x8, _REG_SF_FLICKER_QUANT_CHG@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #1
	bl	_s5k6aa_write
	cbz	w0, LBB0_7
LBB0_6:
	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
LBB0_7:
	ldr	w2, [sp, #12]
	b	LBB0_3
	.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_DBG_AUTOALG_EN,4,2         ; @REG_DBG_AUTOALG_EN
	.comm	_V4L2_CID_POWER_LINE_FREQUENCY_AUTO,4,2 ; @V4L2_CID_POWER_LINE_FREQUENCY_AUTO
	.comm	_AALG_FLICKER_EN_MASK,4,2       ; @AALG_FLICKER_EN_MASK
	.comm	_REG_SF_FLICKER_QUANT,4,2       ; @REG_SF_FLICKER_QUANT
	.comm	_REG_SF_FLICKER_QUANT_CHG,4,2   ; @REG_SF_FLICKER_QUANT_CHG
	.no_dead_strip	_s5k6aa_set_anti_flicker
.subsections_via_symbols
