	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ov51x_upload_quan_tables
_ov51x_upload_quan_tables:              ## @ov51x_upload_quan_tables
	.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
	movq	%rdi, %r15
	movq	_R51x_COMP_LUT_BEGIN@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_D_PROBE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	callq	_gspca_dbg
	movq	(%r15), %rax
	movq	_BRIDGE_OV511@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	sete	%cl
	movq	_BRIDGE_OV511PLUS@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	sete	%al
	orb	%cl, %al
	leaq	_ov51x_upload_quan_tables.uvQuanTable511(%rip), %rcx
	leaq	_ov51x_upload_quan_tables.uvQuanTable518(%rip), %r12
	cmovneq	%rcx, %r12
	leaq	_ov51x_upload_quan_tables.yQuanTable511(%rip), %rcx
	leaq	_ov51x_upload_quan_tables.yQuanTable518(%rip), %rbx
	cmovneq	%rcx, %rbx
	movzbl	%al, %r13d
	shll	$4, %r13d
	addl	$16, %r13d
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	leaq	(%r14,%r13), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	leal	(%rax,%r14), %esi
	movzbl	(%rbx,%r14,2), %eax
	movzbl	1(%rbx,%r14,2), %ecx
	andb	$15, %al
	shlb	$4, %cl
	orb	%al, %cl
	movzbl	%cl, %edx
	movq	%r15, %rdi
	callq	_reg_w
	movzbl	(%r12,%r14,2), %eax
	movzbl	1(%r12,%r14,2), %ecx
	andb	$15, %al
	shlb	$4, %cl
	orb	%al, %cl
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	leal	(%rax,%r14), %esi
	movzbl	%cl, %edx
	movq	%r15, %rdi
	callq	_reg_w
	incq	%r14
	cmpl	%r14d, %r13d
	jne	LBB0_1
## %bb.2:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	4                               ## @ov51x_upload_quan_tables.yQuanTable511
_ov51x_upload_quan_tables.yQuanTable511:
	.ascii	"\000\001\001\002\002\003\003\004\001\001\001\002\002\003\004\004\001\001\002\002\003\004\004\004\002\002\002\003\004\004\004\004\002\002\003\004\004\005\005\005\003\003\004\004\005\005\005\005\003\004\004\004\005\005\005\005\004\004\004\004\005\005\005\005"

	.p2align	4                               ## @ov51x_upload_quan_tables.uvQuanTable511
_ov51x_upload_quan_tables.uvQuanTable511:
	.ascii	"\000\002\002\003\004\004\004\004\002\002\002\004\004\004\004\004\002\002\003\004\004\004\004\004\003\004\004\004\004\004\004\004\004\004\004\004\004\004\004\004\004\004\004\004\004\004\004\004\004\004\004\004\004\004\004\004\004\004\004\004\004\004\004\004"

	.p2align	4                               ## @ov51x_upload_quan_tables.yQuanTable518
_ov51x_upload_quan_tables.yQuanTable518:
	.ascii	"\005\004\005\006\006\007\007\007\005\005\005\005\006\007\007\007\006\006\006\006\007\007\007\b\007\007\006\007\007\007\b\b"

	.p2align	4                               ## @ov51x_upload_quan_tables.uvQuanTable518
_ov51x_upload_quan_tables.uvQuanTable518:
	.ascii	"\006\006\006\007\007\007\007\007\006\006\006\007\007\007\007\007\006\006\006\007\007\007\007\b\007\007\007\007\007\007\b\b"

	.comm	_R51x_COMP_LUT_BEGIN,4,2        ## @R51x_COMP_LUT_BEGIN
	.comm	_D_PROBE,4,2                    ## @D_PROBE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Uploading quantization tables\n"

	.comm	_BRIDGE_OV511,8,3               ## @BRIDGE_OV511
	.comm	_BRIDGE_OV511PLUS,8,3           ## @BRIDGE_OV511PLUS
	.no_dead_strip	_ov51x_upload_quan_tables
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ov51x_upload_quan_tables
_ov51x_upload_quan_tables:              ; @ov51x_upload_quan_tables
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
Lloh0:
	adrp	x8, _R51x_COMP_LUT_BEGIN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _R51x_COMP_LUT_BEGIN@GOTPAGEOFF]
Lloh2:
	ldr	w20, [x8]
Lloh3:
	adrp	x8, _D_PROBE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _D_PROBE@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x2, l_.str@PAGE
Lloh7:
	add	x2, x2, l_.str@PAGEOFF
	bl	_gspca_dbg
	mov	w21, #0
	ldr	x8, [x19]
Lloh8:
	adrp	x9, _BRIDGE_OV511@GOTPAGE
Lloh9:
	ldr	x9, [x9, _BRIDGE_OV511@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x8, x9
Lloh11:
	adrp	x9, _BRIDGE_OV511PLUS@GOTPAGE
Lloh12:
	ldr	x9, [x9, _BRIDGE_OV511PLUS@GOTPAGEOFF]
Lloh13:
	adrp	x10, _ov51x_upload_quan_tables.uvQuanTable518@PAGE
Lloh14:
	add	x10, x10, _ov51x_upload_quan_tables.uvQuanTable518@PAGEOFF
Lloh15:
	ldr	x9, [x9]
	ccmp	x8, x9, #4, ne
Lloh16:
	adrp	x8, _ov51x_upload_quan_tables.uvQuanTable511@PAGE
Lloh17:
	add	x8, x8, _ov51x_upload_quan_tables.uvQuanTable511@PAGEOFF
Lloh18:
	adrp	x9, _ov51x_upload_quan_tables.yQuanTable518@PAGE
Lloh19:
	add	x9, x9, _ov51x_upload_quan_tables.yQuanTable518@PAGEOFF
Lloh20:
	adrp	x11, _ov51x_upload_quan_tables.yQuanTable511@PAGE
Lloh21:
	add	x11, x11, _ov51x_upload_quan_tables.yQuanTable511@PAGEOFF
	csel	x22, x8, x10, eq
	csel	x23, x11, x9, eq
	mov	w8, #16
	mov	w9, #32
	csel	w24, w9, w8, eq
	add	w25, w24, w20
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	add	w1, w20, w21
	ldrb	w8, [x23]
	ldrb	w9, [x23, #1]
	and	w2, w8, #0xf
	bfi	w2, w9, #4, #4
	mov	x0, x19
	bl	_reg_w
	ldrb	w8, [x22]
	ldrb	w9, [x22, #1]
	and	w2, w8, #0xf
	bfi	w2, w9, #4, #4
	add	w1, w25, w21
	mov	x0, x19
	bl	_reg_w
	add	w21, w21, #1
	add	x23, x23, #2
	add	x22, x22, #2
	cmp	w24, w21
	b.ne	LBB0_1
; %bb.2:
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh15
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
_ov51x_upload_quan_tables.yQuanTable511: ; @ov51x_upload_quan_tables.yQuanTable511
	.ascii	"\000\001\001\002\002\003\003\004\001\001\001\002\002\003\004\004\001\001\002\002\003\004\004\004\002\002\002\003\004\004\004\004\002\002\003\004\004\005\005\005\003\003\004\004\005\005\005\005\003\004\004\004\005\005\005\005\004\004\004\004\005\005\005\005"

_ov51x_upload_quan_tables.uvQuanTable511: ; @ov51x_upload_quan_tables.uvQuanTable511
	.ascii	"\000\002\002\003\004\004\004\004\002\002\002\004\004\004\004\004\002\002\003\004\004\004\004\004\003\004\004\004\004\004\004\004\004\004\004\004\004\004\004\004\004\004\004\004\004\004\004\004\004\004\004\004\004\004\004\004\004\004\004\004\004\004\004\004"

_ov51x_upload_quan_tables.yQuanTable518: ; @ov51x_upload_quan_tables.yQuanTable518
	.ascii	"\005\004\005\006\006\007\007\007\005\005\005\005\006\007\007\007\006\006\006\006\007\007\007\b\007\007\006\007\007\007\b\b"

_ov51x_upload_quan_tables.uvQuanTable518: ; @ov51x_upload_quan_tables.uvQuanTable518
	.ascii	"\006\006\006\007\007\007\007\007\006\006\006\007\007\007\007\007\006\006\006\007\007\007\007\b\007\007\007\007\007\007\b\b"

	.comm	_R51x_COMP_LUT_BEGIN,4,2        ; @R51x_COMP_LUT_BEGIN
	.comm	_D_PROBE,4,2                    ; @D_PROBE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Uploading quantization tables\n"

	.comm	_BRIDGE_OV511,8,3               ; @BRIDGE_OV511
	.comm	_BRIDGE_OV511PLUS,8,3           ; @BRIDGE_OV511PLUS
	.no_dead_strip	_ov51x_upload_quan_tables
.subsections_via_symbols
