	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ov511_upload_quan_tables
_ov511_upload_quan_tables:              ## @ov511_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_yQuanTable511@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	movq	_uvQuanTable511@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	movq	_R511_COMP_LUT_BEGIN@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	leaq	L_.str(%rip), %rsi
	movl	$4, %edi
	callq	_PDEBUG
	movq	_OV511_QUANTABLESIZE@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	cmpl	$2, (%rdx)
	jl	LBB0_10
## %bb.1:
	xorl	%r13d, %r13d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	addq	$2, %r12
	movq	_OV511_QUANTABLESIZE@GOTPCREL(%rip), %rdx
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	incl	%ebx
	incl	%r13d
	movl	(%rdx), %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%eax, %ecx
	sarl	%ecx
	cmpl	%ecx, %r13d
	jge	LBB0_9
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	_ENABLE_Y_QUANTABLE@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movzbl	(%r15), %eax
	movzbl	1(%r15), %ecx
	andb	$15, %al
	shlb	$4, %cl
	orb	%al, %cl
	movzbl	%cl, %edx
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_reg_w
	testl	%eax, %eax
	js	LBB0_10
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	addq	$2, %r15
	movq	_OV511_QUANTABLESIZE@GOTPCREL(%rip), %rdx
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	_ENABLE_UV_QUANTABLE@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movzbl	(%r12), %eax
	movzbl	1(%r12), %ecx
	andb	$15, %al
	shlb	$4, %cl
	orb	%al, %cl
	movl	(%rdx), %eax
	movl	%eax, %esi
	shrl	$31, %esi
	addl	%eax, %esi
	sarl	%esi
	addl	%ebx, %esi
	movzbl	%cl, %edx
	movq	%r14, %rdi
	callq	_reg_w
	testl	%eax, %eax
	jns	LBB0_7
	jmp	LBB0_10
LBB0_9:
	xorl	%eax, %eax
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_yQuanTable511,8,3              ## @yQuanTable511
	.comm	_uvQuanTable511,8,3             ## @uvQuanTable511
	.comm	_R511_COMP_LUT_BEGIN,4,2        ## @R511_COMP_LUT_BEGIN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Uploading quantization tables"

	.comm	_OV511_QUANTABLESIZE,4,2        ## @OV511_QUANTABLESIZE
	.comm	_ENABLE_Y_QUANTABLE,8,3         ## @ENABLE_Y_QUANTABLE
	.comm	_ENABLE_UV_QUANTABLE,8,3        ## @ENABLE_UV_QUANTABLE
	.no_dead_strip	_ov511_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 ov511_upload_quan_tables
_ov511_upload_quan_tables:              ; @ov511_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, _yQuanTable511@GOTPAGE
Lloh1:
	ldr	x8, [x8, _yQuanTable511@GOTPAGEOFF]
Lloh2:
	ldr	x20, [x8]
Lloh3:
	adrp	x8, _uvQuanTable511@GOTPAGE
Lloh4:
	ldr	x8, [x8, _uvQuanTable511@GOTPAGEOFF]
Lloh5:
	ldr	x21, [x8]
Lloh6:
	adrp	x8, _R511_COMP_LUT_BEGIN@GOTPAGE
Lloh7:
	ldr	x8, [x8, _R511_COMP_LUT_BEGIN@GOTPAGEOFF]
Lloh8:
	ldr	w22, [x8]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #4
	bl	_PDEBUG
Lloh11:
	adrp	x23, _OV511_QUANTABLESIZE@GOTPAGE
Lloh12:
	ldr	x23, [x23, _OV511_QUANTABLESIZE@GOTPAGEOFF]
	ldr	w8, [x23]
	cmp	w8, #2
	b.lt	LBB0_9
; %bb.1:
	mov	w24, #0
Lloh13:
	adrp	x25, _ENABLE_Y_QUANTABLE@GOTPAGE
Lloh14:
	ldr	x25, [x25, _ENABLE_Y_QUANTABLE@GOTPAGEOFF]
Lloh15:
	adrp	x26, _ENABLE_UV_QUANTABLE@GOTPAGE
Lloh16:
	ldr	x26, [x26, _ENABLE_UV_QUANTABLE@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x21, x21, #2
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	w24, w24, #1
	ldr	w8, [x23]
	cmp	w8, #0
	cinc	w8, w8, lt
	cmp	w24, w8, asr #1
	b.ge	LBB0_9
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x25]
	cbz	x8, LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	w1, w22, w24
	ldrb	w8, [x20]
	ldrb	w9, [x20, #1]
	and	w2, w8, #0xf
	bfi	w2, w9, #4, #4
	mov	x0, x19
	bl	_reg_w
	tbnz	w0, #31, LBB0_10
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x20, x20, #2
LBB0_7:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x26]
	cbz	x8, LBB0_3
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	ldrb	w8, [x21]
	ldrb	w9, [x21, #1]
	and	w2, w8, #0xf
	bfi	w2, w9, #4, #4
	ldr	w8, [x23]
	cmp	w8, #0
	cinc	w8, w8, lt
	add	w9, w22, w24
	add	w1, w9, w8, asr #1
	mov	x0, x19
	bl	_reg_w
	tbz	w0, #31, LBB0_2
	b	LBB0_10
LBB0_9:
	mov	w0, #0
LBB0_10:
	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 AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_yQuanTable511,8,3              ; @yQuanTable511
	.comm	_uvQuanTable511,8,3             ; @uvQuanTable511
	.comm	_R511_COMP_LUT_BEGIN,4,2        ; @R511_COMP_LUT_BEGIN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Uploading quantization tables"

	.comm	_OV511_QUANTABLESIZE,4,2        ; @OV511_QUANTABLESIZE
	.comm	_ENABLE_Y_QUANTABLE,8,3         ; @ENABLE_Y_QUANTABLE
	.comm	_ENABLE_UV_QUANTABLE,8,3        ; @ENABLE_UV_QUANTABLE
	.no_dead_strip	_ov511_upload_quan_tables
.subsections_via_symbols
