	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rv34_decode_cbp
_rv34_decode_cbp:                       ## @rv34_decode_cbp
	.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	%rsi, %r12
	movq	8(%rsi), %rax
	movslq	%edx, %r13
	movl	(%rax,%r13,4), %esi
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movl	$9, %edx
	movl	$2, %ecx
	callq	_get_vlc2
	movl	%eax, %ebx
	andl	$15, %eax
	movq	_rv34_count_ones@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movslq	(%rcx,%rax,4), %r14
	xorl	%r15d, %r15d
	testb	$8, %bl
	jne	LBB0_1
## %bb.2:
	testb	$4, %bl
	jne	LBB0_3
LBB0_4:
	testb	$2, %bl
	jne	LBB0_5
LBB0_6:
	testb	$1, %bl
	je	LBB0_8
LBB0_7:
	movq	(%r12), %rax
	movq	(%rax,%r13,8), %rax
	movl	(%rax,%r14,8), %edx
	movl	4(%rax,%r14,8), %esi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	$1, %ecx
	callq	_get_vlc2
	shll	$10, %eax
	orl	%eax, %r15d
LBB0_8:
	sarl	$4, %ebx
	movslq	%ebx, %r14
	movq	_modulo_three_table@GOTPCREL(%rip), %r13
	movq	(%r13), %rax
	movl	(%rax,%r14,4), %r12d
	movl	%r12d, %ebx
	shrl	$6, %ebx
	andl	$3, %ebx
	cmpl	$1, %ebx
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	jne	LBB0_10
## %bb.9:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_get_bits1
	leaq	_rv34_decode_cbp.cbp_masks(%rip), %rcx
	orl	(%rcx,%rax,4), %r15d
	movq	(%r13), %rax
	movl	(%rax,%r14,4), %r12d
LBB0_10:
	xorl	%r14d, %r14d
	cmpl	$2, %ebx
	movl	$1114112, %r13d                 ## imm = 0x110000
	cmovnel	%r14d, %r13d
	orl	%r15d, %r13d
	movl	%r12d, %ebx
	shrl	$4, %ebx
	andl	$3, %ebx
	cmpl	$1, %ebx
	jne	LBB0_12
## %bb.11:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_get_bits1
	leaq	_rv34_decode_cbp.cbp_masks(%rip), %rcx
	movl	(%rcx,%rax,4), %eax
	addl	%eax, %eax
	orl	%eax, %r13d
	movq	_modulo_three_table@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	(%rax,%rcx,4), %r12d
LBB0_12:
	cmpl	$2, %ebx
	movl	$2228224, %eax                  ## imm = 0x220000
	cmovel	%eax, %r14d
	orl	%r13d, %r14d
	movl	%r12d, %ebx
	shrl	$2, %ebx
	andl	$3, %ebx
	cmpl	$1, %ebx
	jne	LBB0_14
## %bb.13:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_get_bits1
	leaq	_rv34_decode_cbp.cbp_masks(%rip), %rcx
	movl	(%rcx,%rax,4), %eax
	shll	$2, %eax
	orl	%eax, %r14d
	movq	_modulo_three_table@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	(%rax,%rcx,4), %r12d
LBB0_14:
	xorl	%r15d, %r15d
	cmpl	$2, %ebx
	movl	$4456448, %ebx                  ## imm = 0x440000
	cmovnel	%r15d, %ebx
	orl	%r14d, %ebx
	andl	$3, %r12d
	cmpl	$1, %r12d
	jne	LBB0_16
## %bb.15:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_get_bits1
	leaq	_rv34_decode_cbp.cbp_masks(%rip), %rcx
	movl	(%rcx,%rax,4), %eax
	shll	$3, %eax
	orl	%eax, %ebx
LBB0_16:
	cmpl	$2, %r12d
	movl	$8912896, %eax                  ## imm = 0x880000
	cmovel	%eax, %r15d
	orl	%ebx, %r15d
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	(%r12), %rax
	movq	(%rax,%r13,8), %rax
	movl	(%rax,%r14,8), %edx
	movl	4(%rax,%r14,8), %esi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	$1, %ecx
	callq	_get_vlc2
	movl	%eax, %r15d
	testb	$4, %bl
	je	LBB0_4
LBB0_3:
	movq	(%r12), %rax
	movq	(%rax,%r13,8), %rax
	movl	(%rax,%r14,8), %edx
	movl	4(%rax,%r14,8), %esi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	$1, %ecx
	callq	_get_vlc2
	shll	$2, %eax
	orl	%eax, %r15d
	testb	$2, %bl
	je	LBB0_6
LBB0_5:
	movq	(%r12), %rax
	movq	(%rax,%r13,8), %rax
	movl	(%rax,%r14,8), %edx
	movl	4(%rax,%r14,8), %esi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	$1, %ecx
	callq	_get_vlc2
	shll	$8, %eax
	orl	%eax, %r15d
	testb	$1, %bl
	jne	LBB0_7
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	2                               ## @rv34_decode_cbp.cbp_masks
_rv34_decode_cbp.cbp_masks:
	.long	1048576                         ## 0x100000
	.long	65536                           ## 0x10000
	.long	1114112                         ## 0x110000

	.comm	_rv34_count_ones,8,3            ## @rv34_count_ones
	.comm	_modulo_three_table,8,3         ## @modulo_three_table
	.no_dead_strip	_rv34_decode_cbp
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rv34_decode_cbp
_rv34_decode_cbp:                       ; @rv34_decode_cbp
	.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
                                        ; kill: def $w2 killed $w2 def $x2
	mov	x22, x1
	mov	x19, x0
	ldr	x8, [x1, #8]
	sxtw	x23, w2
	ldr	w1, [x8, w2, sxtw #2]
	mov	w2, #9
	mov	w3, #2
	bl	_get_vlc2
	mov	x21, x0
	and	w8, w0, #0xf
Lloh0:
	adrp	x9, _rv34_count_ones@GOTPAGE
Lloh1:
	ldr	x9, [x9, _rv34_count_ones@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	ldrsw	x24, [x9, w8, uxtw #2]
	tbnz	w0, #3, LBB0_2
; %bb.1:
	mov	w20, #0
	tbnz	w21, #2, LBB0_3
	b	LBB0_4
LBB0_2:
	ldr	x8, [x22]
	ldr	x8, [x8, x23, lsl #3]
	add	x8, x8, x24, lsl #3
	ldp	w2, w1, [x8]
	mov	x0, x19
	mov	w3, #1
	bl	_get_vlc2
	mov	x20, x0
	tbz	w21, #2, LBB0_4
LBB0_3:
	ldr	x8, [x22]
	ldr	x8, [x8, x23, lsl #3]
	add	x8, x8, x24, lsl #3
	ldp	w2, w1, [x8]
	mov	x0, x19
	mov	w3, #1
	bl	_get_vlc2
	orr	w20, w20, w0, lsl #2
LBB0_4:
	tbnz	w21, #1, LBB0_16
; %bb.5:
	tbz	w21, #0, LBB0_7
LBB0_6:
	ldr	x8, [x22]
	ldr	x8, [x8, x23, lsl #3]
	add	x8, x8, x24, lsl #3
	ldp	w2, w1, [x8]
	mov	x0, x19
	mov	w3, #1
	bl	_get_vlc2
	orr	w20, w20, w0, lsl #10
LBB0_7:
	asr	w8, w21, #4
	sbfx	x22, x21, #4, #28
Lloh3:
	adrp	x23, _modulo_three_table@GOTPAGE
Lloh4:
	ldr	x23, [x23, _modulo_three_table@GOTPAGEOFF]
	ldr	x9, [x23]
	ldr	w8, [x9, w8, sxtw #2]
	ubfx	w24, w8, #6, #2
Lloh5:
	adrp	x21, _rv34_decode_cbp.cbp_masks@PAGE
Lloh6:
	add	x21, x21, _rv34_decode_cbp.cbp_masks@PAGEOFF
	cmp	w24, #1
	b.ne	LBB0_9
; %bb.8:
	mov	x0, x19
	bl	_get_bits1
	ldr	w8, [x21, x0, lsl #2]
	orr	w20, w8, w20
	ldr	x8, [x23]
	ldr	w8, [x8, x22, lsl #2]
LBB0_9:
	mov	w9, #1114112
	cmp	w24, #2
	csel	w9, w9, wzr, eq
	orr	w20, w20, w9
	ubfx	w24, w8, #4, #2
	cmp	w24, #1
	b.ne	LBB0_11
; %bb.10:
	mov	x0, x19
	bl	_get_bits1
	ldr	w8, [x21, x0, lsl #2]
	orr	w20, w20, w8, lsl #1
	ldr	x8, [x23]
	ldr	w8, [x8, x22, lsl #2]
LBB0_11:
	mov	w9, #2228224
	cmp	w24, #2
	csel	w9, w9, wzr, eq
	orr	w20, w20, w9
	ubfx	w24, w8, #2, #2
	cmp	w24, #1
	b.ne	LBB0_13
; %bb.12:
	mov	x0, x19
	bl	_get_bits1
	ldr	w8, [x21, x0, lsl #2]
	orr	w20, w20, w8, lsl #2
	ldr	x8, [x23]
	ldr	w8, [x8, x22, lsl #2]
LBB0_13:
	mov	w9, #4456448
	cmp	w24, #2
	csel	w9, w9, wzr, eq
	orr	w20, w20, w9
	and	w22, w8, #0x3
	cmp	w22, #1
	b.ne	LBB0_15
; %bb.14:
	mov	x0, x19
	bl	_get_bits1
	ldr	w8, [x21, x0, lsl #2]
	orr	w20, w20, w8, lsl #3
LBB0_15:
	mov	w8, #8912896
	cmp	w22, #2
	csel	w8, w8, wzr, eq
	orr	w0, w20, w8
	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
LBB0_16:
	ldr	x8, [x22]
	ldr	x8, [x8, x23, lsl #3]
	add	x8, x8, x24, lsl #3
	ldp	w2, w1, [x8]
	mov	x0, x19
	mov	w3, #1
	bl	_get_vlc2
	orr	w20, w20, w0, lsl #8
	tbnz	w21, #0, LBB0_6
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
	.p2align	2                               ; @rv34_decode_cbp.cbp_masks
_rv34_decode_cbp.cbp_masks:
	.long	1048576                         ; 0x100000
	.long	65536                           ; 0x10000
	.long	1114112                         ; 0x110000

	.comm	_rv34_count_ones,8,3            ; @rv34_count_ones
	.comm	_modulo_three_table,8,3         ; @modulo_three_table
	.no_dead_strip	_rv34_decode_cbp
.subsections_via_symbols
