	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ov13858_enable_test_pattern
_ov13858_enable_test_pattern:           ## @ov13858_enable_test_pattern
	.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	_OV13858_REG_TEST_PATTERN@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	_OV13858_REG_VALUE_08BIT@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	leaq	-36(%rbp), %rcx
	callq	_ov13858_read_reg
	testl	%eax, %eax
	jne	LBB0_5
## %bb.1:
	testl	%ebx, %ebx
	je	LBB0_3
## %bb.2:
	movq	_OV13858_TEST_PATTERN_MASK@GOTPCREL(%rip), %rax
	movl	-36(%rbp), %ecx
	andl	(%rax), %ecx
	decl	%ebx
	orl	%ecx, %ebx
	movq	_OV13858_TEST_PATTERN_ENABLE@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	jmp	LBB0_4
LBB0_3:
	movq	_OV13858_TEST_PATTERN_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	notl	%ebx
	andl	-36(%rbp), %ebx
LBB0_4:
	movl	%ebx, -36(%rbp)
	movl	(%r15), %esi
	movl	(%r12), %edx
	movq	%r14, %rdi
	movl	%ebx, %ecx
	callq	_ov13858_write_reg
LBB0_5:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_OV13858_REG_TEST_PATTERN,4,2   ## @OV13858_REG_TEST_PATTERN
	.comm	_OV13858_REG_VALUE_08BIT,4,2    ## @OV13858_REG_VALUE_08BIT
	.comm	_OV13858_TEST_PATTERN_MASK,4,2  ## @OV13858_TEST_PATTERN_MASK
	.comm	_OV13858_TEST_PATTERN_ENABLE,4,2 ## @OV13858_TEST_PATTERN_ENABLE
	.no_dead_strip	_ov13858_enable_test_pattern
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ov13858_enable_test_pattern
_ov13858_enable_test_pattern:           ; @ov13858_enable_test_pattern
	.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
	mov	x19, x0
Lloh0:
	adrp	x21, _OV13858_REG_TEST_PATTERN@GOTPAGE
Lloh1:
	ldr	x21, [x21, _OV13858_REG_TEST_PATTERN@GOTPAGEOFF]
	ldr	w1, [x21]
Lloh2:
	adrp	x22, _OV13858_REG_VALUE_08BIT@GOTPAGE
Lloh3:
	ldr	x22, [x22, _OV13858_REG_VALUE_08BIT@GOTPAGEOFF]
	ldr	w2, [x22]
	add	x3, sp, #12
	bl	_ov13858_read_reg
	cbnz	w0, LBB0_5
; %bb.1:
	cbz	w20, LBB0_3
; %bb.2:
Lloh4:
	adrp	x8, _OV13858_TEST_PATTERN_MASK@GOTPAGE
Lloh5:
	ldr	x8, [x8, _OV13858_TEST_PATTERN_MASK@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	ldr	w9, [sp, #12]
	and	w8, w9, w8
	sub	w9, w20, #1
Lloh7:
	adrp	x10, _OV13858_TEST_PATTERN_ENABLE@GOTPAGE
Lloh8:
	ldr	x10, [x10, _OV13858_TEST_PATTERN_ENABLE@GOTPAGEOFF]
Lloh9:
	ldr	w10, [x10]
	orr	w8, w8, w9
	orr	w3, w8, w10
	b	LBB0_4
LBB0_3:
Lloh10:
	adrp	x8, _OV13858_TEST_PATTERN_ENABLE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _OV13858_TEST_PATTERN_ENABLE@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	ldr	w9, [sp, #12]
	bic	w3, w9, w8
LBB0_4:
	str	w3, [sp, #12]
	ldr	w1, [x21]
	ldr	w2, [x22]
	mov	x0, x19
	bl	_ov13858_write_reg
LBB0_5:
	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	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_OV13858_REG_TEST_PATTERN,4,2   ; @OV13858_REG_TEST_PATTERN
	.comm	_OV13858_REG_VALUE_08BIT,4,2    ; @OV13858_REG_VALUE_08BIT
	.comm	_OV13858_TEST_PATTERN_MASK,4,2  ; @OV13858_TEST_PATTERN_MASK
	.comm	_OV13858_TEST_PATTERN_ENABLE,4,2 ; @OV13858_TEST_PATTERN_ENABLE
	.no_dead_strip	_ov13858_enable_test_pattern
.subsections_via_symbols
