	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function s5k6aa_set_auto_exposure
_s5k6aa_set_auto_exposure:              ## @s5k6aa_set_auto_exposure
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	%rdi, %rbx
	addq	$16, %rdi
	callq	_v4l2_get_subdevdata
	movq	%rax, %r14
	movq	8(%rbx), %rax
	movl	(%rax), %r12d
	movq	_REG_DBG_AUTOALG_EN@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	leaq	-44(%rbp), %rdx
	movq	%r14, %rdi
	callq	_s5k6aa_read
	testl	%eax, %eax
	jne	LBB0_7
## %bb.1:
	movq	_debug@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-44(%rbp), %eax
	movl	%eax, (%rsp)
	leaq	L_.str(%rip), %rcx
	movl	$1, %edi
	movq	%r14, %rdx
	movl	%r12d, %r8d
	movl	%r15d, %r9d
	callq	_v4l2_dbg
	movq	_V4L2_EXPOSURE_AUTO@GOTPCREL(%rip), %rax
	cmpl	%r15d, (%rax)
	jne	LBB0_3
## %bb.2:
	movq	_AALG_AE_EN_MASK@GOTPCREL(%rip), %rax
	movq	_AALG_DIVLEI_EN_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	orl	-44(%rbp), %edx
LBB0_6:
	movl	%edx, -44(%rbp)
	movl	(%r13), %esi
	movq	%r14, %rdi
	callq	_s5k6aa_write
	jmp	LBB0_7
LBB0_3:
	movq	%r14, %rdi
	movl	%r12d, %esi
	callq	_s5k6aa_set_user_exposure
	testl	%eax, %eax
	jne	LBB0_7
## %bb.4:
	movq	(%rbx), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_s5k6aa_set_user_gain
	testl	%eax, %eax
	je	LBB0_5
LBB0_7:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	_AALG_AE_EN_MASK@GOTPCREL(%rip), %rax
	movq	_AALG_DIVLEI_EN_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	notl	%edx
	andl	-44(%rbp), %edx
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_REG_DBG_AUTOALG_EN,4,2         ## @REG_DBG_AUTOALG_EN
	.comm	_debug,4,2                      ## @debug
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"man_exp: %d, auto_exp: %d, a_alg: 0x%x\n"

	.comm	_V4L2_EXPOSURE_AUTO,4,2         ## @V4L2_EXPOSURE_AUTO
	.comm	_AALG_AE_EN_MASK,4,2            ## @AALG_AE_EN_MASK
	.comm	_AALG_DIVLEI_EN_MASK,4,2        ## @AALG_DIVLEI_EN_MASK
	.no_dead_strip	_s5k6aa_set_auto_exposure
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function s5k6aa_set_auto_exposure
_s5k6aa_set_auto_exposure:              ; @s5k6aa_set_auto_exposure
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x21, x1
	mov	x20, x0
	add	x0, x0, #16
	bl	_v4l2_get_subdevdata
	mov	x19, x0
	ldr	x8, [x20, #8]
	ldr	w22, [x8]
Lloh0:
	adrp	x23, _REG_DBG_AUTOALG_EN@GOTPAGE
Lloh1:
	ldr	x23, [x23, _REG_DBG_AUTOALG_EN@GOTPAGEOFF]
	ldr	w1, [x23]
	add	x2, sp, #12
	bl	_s5k6aa_read
	cbnz	w0, LBB0_6
; %bb.1:
Lloh2:
	adrp	x8, _debug@GOTPAGE
Lloh3:
	ldr	x8, [x8, _debug@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	ldr	w6, [sp, #12]
Lloh5:
	adrp	x3, l_.str@PAGE
Lloh6:
	add	x3, x3, l_.str@PAGEOFF
	mov	w0, #1
	mov	x2, x19
	mov	x4, x22
	mov	x5, x21
	bl	_v4l2_dbg
Lloh7:
	adrp	x8, _V4L2_EXPOSURE_AUTO@GOTPAGE
Lloh8:
	ldr	x8, [x8, _V4L2_EXPOSURE_AUTO@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	cmp	w8, w21
	b.ne	LBB0_4
; %bb.2:
Lloh10:
	adrp	x8, _AALG_AE_EN_MASK@GOTPAGE
Lloh11:
	ldr	x8, [x8, _AALG_AE_EN_MASK@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
Lloh13:
	adrp	x9, _AALG_DIVLEI_EN_MASK@GOTPAGE
Lloh14:
	ldr	x9, [x9, _AALG_DIVLEI_EN_MASK@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	orr	w8, w9, w8
	ldr	w9, [sp, #12]
	orr	w2, w8, w9
LBB0_3:
	str	w2, [sp, #12]
	ldr	w1, [x23]
	mov	x0, x19
	bl	_s5k6aa_write
	b	LBB0_6
LBB0_4:
	mov	x0, x19
	mov	x1, x22
	bl	_s5k6aa_set_user_exposure
	cbnz	w0, LBB0_6
; %bb.5:
	ldr	x8, [x20]
	ldr	w1, [x8]
	mov	x0, x19
	bl	_s5k6aa_set_user_gain
	cbz	w0, LBB0_7
LBB0_6:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_7:
Lloh16:
	adrp	x8, _AALG_AE_EN_MASK@GOTPAGE
Lloh17:
	ldr	x8, [x8, _AALG_AE_EN_MASK@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
Lloh19:
	adrp	x9, _AALG_DIVLEI_EN_MASK@GOTPAGE
Lloh20:
	ldr	x9, [x9, _AALG_DIVLEI_EN_MASK@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	orr	w8, w9, w8
	ldr	w9, [sp, #12]
	bic	w2, w9, w8
	b	LBB0_3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_REG_DBG_AUTOALG_EN,4,2         ; @REG_DBG_AUTOALG_EN
	.comm	_debug,4,2                      ; @debug
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"man_exp: %d, auto_exp: %d, a_alg: 0x%x\n"

	.comm	_V4L2_EXPOSURE_AUTO,4,2         ; @V4L2_EXPOSURE_AUTO
	.comm	_AALG_AE_EN_MASK,4,2            ; @AALG_AE_EN_MASK
	.comm	_AALG_DIVLEI_EN_MASK,4,2        ; @AALG_DIVLEI_EN_MASK
	.no_dead_strip	_s5k6aa_set_auto_exposure
.subsections_via_symbols
