	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tw5864_encoder_tables_upload
_tw5864_encoder_tables_upload:          ## @tw5864_encoder_tables_upload
	.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	_TW5864_VLC_RD@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movl	$1, %esi
	callq	_tw_writel
	movq	_VLC_LOOKUP_TABLE_LEN@GOTPCREL(%rip), %r15
	cmpl	$0, (%r15)
	jle	LBB0_3
## %bb.1:
	xorl	%ebx, %ebx
	movq	_TW5864_VLC_STREAM_MEM_START@GOTPCREL(%rip), %r12
	movq	_encoder_vlc_lookup_table@GOTPCREL(%rip), %r13
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rdi
	addq	%rbx, %rdi
	movq	(%r13), %rax
	movl	(%rax,%rbx), %esi
	callq	_tw_writel
	incq	%r14
	movslq	(%r15), %rax
	addq	$4, %rbx
	cmpq	%rax, %r14
	jl	LBB0_2
LBB0_3:
	movq	_TW5864_VLC_RD@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	xorl	%esi, %esi
	callq	_tw_writel
	movq	_QUANTIZATION_TABLE_LEN@GOTPCREL(%rip), %r14
	cmpl	$0, (%r14)
	jle	LBB0_9
## %bb.4:
	xorl	%ebx, %ebx
	movq	_TW5864_QUAN_TAB@GOTPCREL(%rip), %r15
	movq	_forward_quantization_table@GOTPCREL(%rip), %r12
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rdi
	addq	%rbx, %rdi
	movq	(%r12), %rax
	movl	(%rax,%rbx), %esi
	callq	_tw_writel
	incq	%r13
	movslq	(%r14), %rax
	addq	$4, %rbx
	cmpq	%rax, %r13
	jl	LBB0_5
## %bb.6:
	testl	%eax, %eax
	jle	LBB0_9
## %bb.7:
	xorl	%ebx, %ebx
	movq	_inverse_quantization_table@GOTPCREL(%rip), %r12
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rdi
	addq	%rbx, %rdi
	movq	(%r12), %rax
	movl	(%rax,%rbx), %esi
	callq	_tw_writel
	incq	%r13
	movslq	(%r14), %rax
	addq	$4, %rbx
	cmpq	%rax, %r13
	jl	LBB0_8
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TW5864_VLC_RD,8,3              ## @TW5864_VLC_RD
	.comm	_VLC_LOOKUP_TABLE_LEN,4,2       ## @VLC_LOOKUP_TABLE_LEN
	.comm	_TW5864_VLC_STREAM_MEM_START,8,3 ## @TW5864_VLC_STREAM_MEM_START
	.comm	_encoder_vlc_lookup_table,8,3   ## @encoder_vlc_lookup_table
	.comm	_QUANTIZATION_TABLE_LEN,4,2     ## @QUANTIZATION_TABLE_LEN
	.comm	_TW5864_QUAN_TAB,8,3            ## @TW5864_QUAN_TAB
	.comm	_forward_quantization_table,8,3 ## @forward_quantization_table
	.comm	_inverse_quantization_table,8,3 ## @inverse_quantization_table
	.no_dead_strip	_tw5864_encoder_tables_upload
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tw5864_encoder_tables_upload
_tw5864_encoder_tables_upload:          ; @tw5864_encoder_tables_upload
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
Lloh0:
	adrp	x19, _TW5864_VLC_RD@GOTPAGE
Lloh1:
	ldr	x19, [x19, _TW5864_VLC_RD@GOTPAGEOFF]
	ldr	x0, [x19]
	mov	w1, #1
	bl	_tw_writel
Lloh2:
	adrp	x20, _VLC_LOOKUP_TABLE_LEN@GOTPAGE
Lloh3:
	ldr	x20, [x20, _VLC_LOOKUP_TABLE_LEN@GOTPAGEOFF]
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_3
; %bb.1:
	mov	x21, #0
	mov	x22, #0
Lloh4:
	adrp	x23, _TW5864_VLC_STREAM_MEM_START@GOTPAGE
Lloh5:
	ldr	x23, [x23, _TW5864_VLC_STREAM_MEM_START@GOTPAGEOFF]
Lloh6:
	adrp	x24, _encoder_vlc_lookup_table@GOTPAGE
Lloh7:
	ldr	x24, [x24, _encoder_vlc_lookup_table@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x23]
	add	x0, x21, x8
	ldr	x8, [x24]
	ldr	w1, [x8, x21]
	bl	_tw_writel
	add	x22, x22, #1
	ldrsw	x8, [x20]
	add	x21, x21, #4
	cmp	x22, x8
	b.lt	LBB0_2
LBB0_3:
	ldr	x0, [x19]
	mov	w1, #0
	bl	_tw_writel
Lloh8:
	adrp	x19, _QUANTIZATION_TABLE_LEN@GOTPAGE
Lloh9:
	ldr	x19, [x19, _QUANTIZATION_TABLE_LEN@GOTPAGEOFF]
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.4:
	mov	x21, #0
	mov	x22, #0
Lloh10:
	adrp	x20, _TW5864_QUAN_TAB@GOTPAGE
Lloh11:
	ldr	x20, [x20, _TW5864_QUAN_TAB@GOTPAGEOFF]
Lloh12:
	adrp	x23, _forward_quantization_table@GOTPAGE
Lloh13:
	ldr	x23, [x23, _forward_quantization_table@GOTPAGEOFF]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20]
	add	x0, x21, x8
	ldr	x8, [x23]
	ldr	w1, [x8, x21]
	bl	_tw_writel
	add	x22, x22, #1
	ldrsw	x8, [x19]
	add	x21, x21, #4
	cmp	x22, x8
	b.lt	LBB0_5
; %bb.6:
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.7:
	mov	x21, #0
	mov	x22, #0
Lloh14:
	adrp	x23, _inverse_quantization_table@GOTPAGE
Lloh15:
	ldr	x23, [x23, _inverse_quantization_table@GOTPAGEOFF]
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20]
	add	x0, x21, x8
	ldr	x8, [x23]
	ldr	w1, [x8, x21]
	bl	_tw_writel
	add	x22, x22, #1
	ldrsw	x8, [x19]
	add	x21, x21, #4
	cmp	x22, x8
	b.lt	LBB0_8
LBB0_9:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_TW5864_VLC_RD,8,3              ; @TW5864_VLC_RD
	.comm	_VLC_LOOKUP_TABLE_LEN,4,2       ; @VLC_LOOKUP_TABLE_LEN
	.comm	_TW5864_VLC_STREAM_MEM_START,8,3 ; @TW5864_VLC_STREAM_MEM_START
	.comm	_encoder_vlc_lookup_table,8,3   ; @encoder_vlc_lookup_table
	.comm	_QUANTIZATION_TABLE_LEN,4,2     ; @QUANTIZATION_TABLE_LEN
	.comm	_TW5864_QUAN_TAB,8,3            ; @TW5864_QUAN_TAB
	.comm	_forward_quantization_table,8,3 ; @forward_quantization_table
	.comm	_inverse_quantization_table,8,3 ; @inverse_quantization_table
	.no_dead_strip	_tw5864_encoder_tables_upload
.subsections_via_symbols
