	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ov7670_store_cmatrix
_ov7670_store_cmatrix:                  ## @ov7670_store_cmatrix
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r14
	movb	$0, -41(%rbp)
	movq	_REG_CMATRIX_SIGN@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rsi
	leaq	-41(%rbp), %rdx
	callq	_ov7670_read
	movl	%eax, %r12d
	movb	-41(%rbp), %al
	andb	$-64, %al
	movb	%al, -41(%rbp)
	movq	_CMATRIX_LEN@GOTPCREL(%rip), %rcx
	cmpl	$0, (%rcx)
	jle	LBB0_9
## %bb.1:
	xorl	%ebx, %ebx
	movq	_REG_CMATRIX_BASE@GOTPCREL(%rip), %r13
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$255, %eax
	movl	$255, %ecx
	cmovael	%ecx, %eax
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	%eax, %ecx
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r13), %rsi
	addq	%rbx, %rsi
	movzbl	%cl, %edx
	movq	%r14, %rdi
	callq	_ov7670_write
	addl	%eax, %r12d
	incq	%rbx
	movq	_CMATRIX_LEN@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	cmpq	%rax, %rbx
	jge	LBB0_8
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15,%rbx,4), %eax
	testl	%eax, %eax
	jns	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	$1, %edx
	movl	%ebx, %ecx
	shll	%cl, %edx
	orb	%dl, -41(%rbp)
	movb	$-1, %cl
	cmpl	$-255, %eax
	jb	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	negb	%al
	jmp	LBB0_6
LBB0_8:
	movb	-41(%rbp), %al
	movq	_REG_CMATRIX_SIGN@GOTPCREL(%rip), %rbx
LBB0_9:
	movq	(%rbx), %rsi
	movzbl	%al, %edx
	movq	%r14, %rdi
	callq	_ov7670_write
	addl	%r12d, %eax
                                        ## kill: def $eax killed $eax killed $rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CMATRIX_LEN,4,2                ## @CMATRIX_LEN
	.comm	_REG_CMATRIX_SIGN,8,3           ## @REG_CMATRIX_SIGN
	.comm	_REG_CMATRIX_BASE,8,3           ## @REG_CMATRIX_BASE
	.no_dead_strip	_ov7670_store_cmatrix
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ov7670_store_cmatrix
_ov7670_store_cmatrix:                  ; @ov7670_store_cmatrix
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x1
	mov	x19, x0
	strb	wzr, [sp, #15]
Lloh0:
	adrp	x22, _REG_CMATRIX_SIGN@GOTPAGE
Lloh1:
	ldr	x22, [x22, _REG_CMATRIX_SIGN@GOTPAGEOFF]
	ldr	x1, [x22]
	add	x2, sp, #15
	bl	_ov7670_read
	mov	x20, x0
	ldrb	w8, [sp, #15]
	and	w8, w8, #0xffffffc0
	strb	w8, [sp, #15]
Lloh2:
	adrp	x23, _CMATRIX_LEN@GOTPAGE
Lloh3:
	ldr	x23, [x23, _CMATRIX_LEN@GOTPAGEOFF]
	ldr	w9, [x23]
	cmp	w9, #1
	b.lt	LBB0_7
; %bb.1:
	mov	x24, #0
	mov	w25, #1
	mov	w26, #255
Lloh4:
	adrp	x27, _REG_CMATRIX_BASE@GOTPAGE
Lloh5:
	ldr	x27, [x27, _REG_CMATRIX_BASE@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	cmp	w8, #255
	csel	w8, w8, w26, lo
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x9, [x27]
	add	x1, x24, x9
	and	w2, w8, #0xff
	mov	x0, x19
	bl	_ov7670_write
	add	w20, w20, w0
	add	x24, x24, #1
	ldrsw	x8, [x23]
	cmp	x24, x8
	b.ge	LBB0_6
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x21, x24, lsl #2]
	tbz	w8, #31, LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	lsl	w9, w25, w24
	ldrb	w10, [sp, #15]
	orr	w9, w10, w9
	strb	w9, [sp, #15]
	cmn	w8, #255
	csneg	w8, w26, w8, lo
	b	LBB0_3
LBB0_6:
	ldrb	w8, [sp, #15]
LBB0_7:
	ldr	x1, [x22]
	and	w2, w8, #0xff
	mov	x0, x19
	bl	_ov7670_write
	add	w0, w20, w0
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_CMATRIX_LEN,4,2                ; @CMATRIX_LEN
	.comm	_REG_CMATRIX_SIGN,8,3           ; @REG_CMATRIX_SIGN
	.comm	_REG_CMATRIX_BASE,8,3           ; @REG_CMATRIX_BASE
	.no_dead_strip	_ov7670_store_cmatrix
.subsections_via_symbols
