	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cinepak_decode_codebook
_cinepak_decode_codebook:               ## @cinepak_decode_codebook
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movslq	%edx, %rax
	leaq	(%rcx,%rax,4), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	testb	$4, %r14b
	sete	%al
	addq	%rax, %rax
	addq	$4, %rax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movq	(%rdi), %r13
	xorl	%edx, %edx
	movl	$44, %r12d
	xorl	%esi, %esi
	movl	%r14d, -52(%rbp)                ## 4-byte Spill
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_1 Depth=1
	movl	16(%rcx), %eax
	movl	20(%rcx), %ebx
	movl	%eax, %r14d
	shrl	$31, %r14d
	addl	%eax, %r14d
	sarl	%r14d
	addl	%ebx, %r14d
	addl	%ebx, %ebx
	movl	%ebx, -48(%rbp)                 ## 4-byte Spill
	addl	%eax, %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	-44(%r13,%r12), %edi
	addl	%ebx, %edi
	movl	-40(%r13,%r12), %r15d
	subl	%r14d, %r15d
	movl	-36(%r13,%r12), %ebx
	addl	%eax, %ebx
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	movl	%edx, -60(%rbp)                 ## 4-byte Spill
	movl	%esi, -56(%rbp)                 ## 4-byte Spill
	callq	_av_clip_uint8
	movl	%eax, -44(%r13,%r12)
	movl	%r15d, %edi
	callq	_av_clip_uint8
	movl	%eax, -40(%r13,%r12)
	movl	%ebx, %edi
	callq	_av_clip_uint8
	movl	%eax, -36(%r13,%r12)
	movl	-32(%r13,%r12), %edi
	addl	-48(%rbp), %edi                 ## 4-byte Folded Reload
	movl	-28(%r13,%r12), %ebx
	subl	%r14d, %ebx
	movl	-24(%r13,%r12), %r15d
	addl	-44(%rbp), %r15d                ## 4-byte Folded Reload
	callq	_av_clip_uint8
	movl	%eax, -32(%r13,%r12)
	movl	%ebx, %edi
	callq	_av_clip_uint8
	movl	%eax, -28(%r13,%r12)
	movl	%r15d, %edi
	callq	_av_clip_uint8
	movl	%eax, -24(%r13,%r12)
	movl	-20(%r13,%r12), %edi
	addl	-48(%rbp), %edi                 ## 4-byte Folded Reload
	movl	-16(%r13,%r12), %ebx
	subl	%r14d, %ebx
	movl	-12(%r13,%r12), %r15d
	addl	-44(%rbp), %r15d                ## 4-byte Folded Reload
	callq	_av_clip_uint8
	movl	%eax, -20(%r13,%r12)
	movl	%ebx, %edi
	callq	_av_clip_uint8
	movl	%eax, -16(%r13,%r12)
	movl	%r15d, %edi
	callq	_av_clip_uint8
	movl	%eax, -12(%r13,%r12)
	movl	-48(%rbp), %edi                 ## 4-byte Reload
	addl	-8(%r13,%r12), %edi
	movl	-4(%r13,%r12), %ebx
	subl	%r14d, %ebx
	movl	-52(%rbp), %r14d                ## 4-byte Reload
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	addl	(%r13,%r12), %r15d
	callq	_av_clip_uint8
	movl	%eax, -8(%r13,%r12)
	movl	%ebx, %edi
	callq	_av_clip_uint8
	movl	%eax, -4(%r13,%r12)
	movl	%r15d, %edi
	callq	_av_clip_uint8
	movl	-56(%rbp), %esi                 ## 4-byte Reload
	movl	-60(%rbp), %edx                 ## 4-byte Reload
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%r13,%r12)
	addq	$24, %rcx
LBB0_11:                                ##   in Loop: Header=BB0_1 Depth=1
	addq	$48, %r12
	cmpl	$12332, %r12d                   ## imm = 0x302C
	je	LBB0_12
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	testb	$1, %r14b
	je	LBB0_7
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	cmpl	$1, %esi
	ja	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	leaq	16(%rcx), %rbx
	cmpq	-72(%rbp), %rbx                 ## 8-byte Folded Reload
	ja	LBB0_12
## %bb.5:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%rcx, %rdi
	callq	_AV_RB32
	movl	%eax, %edx
	movl	$-2147483648, %esi              ## imm = 0x80000000
	movq	%rbx, %rcx
	testl	%esi, %edx
	jne	LBB0_7
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_1 Depth=1
	sarl	%esi
	testl	%esi, %edx
	je	LBB0_11
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rcx,%rax,4), %rax
	cmpq	-72(%rbp), %rax                 ## 8-byte Folded Reload
	ja	LBB0_12
## %bb.8:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	(%rcx), %eax
	movl	%eax, -44(%r13,%r12)
	movl	%eax, -40(%r13,%r12)
	movl	%eax, -36(%r13,%r12)
	movl	4(%rcx), %eax
	movl	%eax, -32(%r13,%r12)
	movl	%eax, -28(%r13,%r12)
	movl	%eax, -24(%r13,%r12)
	movl	8(%rcx), %eax
	movl	%eax, -20(%r13,%r12)
	movl	%eax, -16(%r13,%r12)
	movl	%eax, -12(%r13,%r12)
	movl	12(%rcx), %eax
	movl	%eax, -8(%r13,%r12)
	movl	%eax, -4(%r13,%r12)
	movl	%eax, (%r13,%r12)
	testb	$4, %r14b
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_1 Depth=1
	addq	$16, %rcx
	jmp	LBB0_11
LBB0_12:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_cinepak_decode_codebook
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cinepak_decode_codebook
_cinepak_decode_codebook:               ; @cinepak_decode_codebook
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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	x20, x3
	mov	x22, x1
	mov	x24, #0
	mov	w10, #0
	mov	w11, #0
	add	x23, x3, w2, sxtw #2
	tst	w1, #0x4
	mov	w8, #4
	mov	w9, #6
	csel	x25, x9, x8, eq
	ldr	x8, [x0]
	add	x27, x8, #44
	str	w1, [sp, #20]                   ; 4-byte Folded Spill
	stp	x25, x23, [sp]                  ; 16-byte Folded Spill
	b	LBB0_3
LBB0_1:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldp	w8, w9, [x20, #16]
	lsl	w26, w9, #1
	cmp	w8, #0
	stp	w11, w10, [sp, #24]             ; 8-byte Folded Spill
	cinc	w10, w8, lt
	add	w28, w9, w10, asr #1
	lsl	w25, w8, #1
	ldur	w8, [x19, #-44]
	add	w0, w8, w26
	ldp	w8, w9, [x21, #-40]
	sub	w22, w8, w28
	add	w23, w9, w25
	bl	_av_clip_uint8
	stur	w0, [x19, #-44]
	mov	x0, x22
	bl	_av_clip_uint8
	stur	w0, [x21, #-40]
	mov	x0, x23
	bl	_av_clip_uint8
	stur	w0, [x21, #-36]
	ldp	w8, w9, [x21, #-32]
	add	w0, w8, w26
	sub	w22, w9, w28
	ldur	w8, [x21, #-24]
	add	w23, w8, w25
	bl	_av_clip_uint8
	stur	w0, [x21, #-32]
	mov	x0, x22
	bl	_av_clip_uint8
	stur	w0, [x21, #-28]
	mov	x0, x23
	bl	_av_clip_uint8
	stur	w0, [x21, #-24]
	ldp	w8, w9, [x21, #-20]
	add	w0, w8, w26
	sub	w22, w9, w28
	ldur	w8, [x21, #-12]
	add	w23, w8, w25
	bl	_av_clip_uint8
	stur	w0, [x21, #-20]
	mov	x0, x22
	bl	_av_clip_uint8
	stur	w0, [x21, #-16]
	mov	x0, x23
	bl	_av_clip_uint8
	stur	w0, [x21, #-12]
	ldp	w8, w9, [x21, #-8]
	add	w0, w8, w26
	sub	w22, w9, w28
	ldr	w8, [x27, x24]
	add	w23, w8, w25
	ldr	x25, [sp]                       ; 8-byte Folded Reload
	bl	_av_clip_uint8
	stur	w0, [x21, #-8]
	mov	x0, x22
	ldr	w22, [sp, #20]                  ; 4-byte Folded Reload
	bl	_av_clip_uint8
	stur	w0, [x21, #-4]
	mov	x0, x23
	ldr	x23, [sp, #8]                   ; 8-byte Folded Reload
	bl	_av_clip_uint8
	ldp	w11, w10, [sp, #24]             ; 8-byte Folded Reload
	str	w0, [x27, x24]
	add	x20, x20, #24
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x24, x24, #48
	cmp	w24, #3, lsl #12                ; =12288
	b.eq	LBB0_11
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	tbz	w22, #0, LBB0_8
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	cmp	w11, #1
	b.hi	LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x19, x20, #16
	cmp	x19, x23
	b.hi	LBB0_11
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x20
	bl	_AV_RB32
	mov	x10, x0
	mov	w11, #-2147483648
	mov	x20, x19
	tst	w10, w11
	b.ne	LBB0_8
	b	LBB0_2
LBB0_7:                                 ;   in Loop: Header=BB0_3 Depth=1
	asr	w11, w11, #1
	tst	w10, w11
	b.eq	LBB0_2
LBB0_8:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x8, x20, x25, lsl #2
	cmp	x8, x23
	b.hi	LBB0_11
; %bb.9:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x19, x27, x24
	ldr	w8, [x20]
	add	x21, x27, x24
	stur	w8, [x19, #-44]
	stp	w8, w8, [x21, #-40]
	ldr	w8, [x20, #4]
	stp	w8, w8, [x21, #-32]
	stur	w8, [x21, #-24]
	ldr	w8, [x20, #8]
	stp	w8, w8, [x21, #-20]
	stur	w8, [x21, #-12]
	ldr	w8, [x20, #12]
	stp	w8, w8, [x21, #-8]
	str	w8, [x21]
	tbz	w22, #2, LBB0_1
; %bb.10:                               ;   in Loop: Header=BB0_3 Depth=1
	add	x20, x20, #16
	b	LBB0_2
LBB0_11:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_cinepak_decode_codebook
.subsections_via_symbols
