	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_avpriv_copy_bits               ## -- Begin function avpriv_copy_bits
	.p2align	4, 0x90
_avpriv_copy_bits:                      ## @avpriv_copy_bits
	.cfi_startproc
## %bb.0:
	testl	%edx, %edx
	je	LBB0_12
## %bb.1:
	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
	movl	%edx, %r12d
	movq	%rsi, %r15
	movq	%rdi, %r13
	movl	%edx, %r14d
	sarl	$4, %r14d
	movl	%edx, %ebx
	andl	$15, %ebx
	callq	_put_bits_left
	xorl	%edi, %edi
	cmpl	%r12d, %eax
	setge	%dil
	callq	_av_assert0
	cmpl	$256, %r12d                     ## imm = 0x100
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	jl	LBB0_8
## %bb.2:
	movq	_CONFIG_SMALL@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jne	LBB0_8
## %bb.3:
	movq	%r13, %rdi
	callq	_put_bits_count
	testb	$7, %al
	jne	LBB0_9
## %bb.4:
	movq	%r13, %rdi
	callq	_put_bits_count
	xorl	%ebx, %ebx
	testb	$31, %al
	je	LBB0_7
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15,%rbx,4), %edx
	movq	%r13, %rdi
	movl	$8, %esi
	callq	_put_bits
	incq	%rbx
	movq	%r13, %rdi
	callq	_put_bits_count
	testb	$31, %al
	jne	LBB0_5
LBB0_7:
	movq	%r13, %rdi
	callq	_flush_put_bits
	movq	%r13, %rdi
	callq	_put_bits_ptr
	movl	%ebx, %ecx
	leaq	(%r15,%rcx,4), %rsi
	leal	(%r14,%r14), %r12d
	subl	%ebx, %r12d
	movl	%eax, %edi
	movl	%r12d, %edx
	callq	_memcpy
	movq	%r13, %rdi
	movl	%r12d, %esi
	callq	_skip_put_bytes
	jmp	LBB0_11
LBB0_12:
	retq
LBB0_8:
	cmpl	$16, %r12d
	jl	LBB0_11
LBB0_9:
	cmpl	$2, %r14d
	movl	$1, %r12d
	cmovgel	%r14d, %r12d
	movq	%r15, %rbx
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_AV_RB16
	movq	%r13, %rdi
	movl	$16, %esi
	movl	%eax, %edx
	callq	_put_bits
	addq	$8, %rbx
	decq	%r12
	jne	LBB0_10
LBB0_11:
	addl	%r14d, %r14d
	movslq	%r14d, %rax
	leaq	(%r15,%rax,4), %rdi
	callq	_AV_RB16
	movb	$16, %cl
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	subb	%sil, %cl
	sarl	%cl, %eax
	movq	%r13, %rdi
	movl	%eax, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_put_bits                       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_CONFIG_SMALL,8,3               ## @CONFIG_SMALL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_avpriv_copy_bits               ; -- Begin function avpriv_copy_bits
	.p2align	2
_avpriv_copy_bits:                      ; @avpriv_copy_bits
	.cfi_startproc
; %bb.0:
	cbz	w2, LBB0_7
; %bb.1:
	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
	.cfi_remember_state
	mov	x22, x2
	mov	x21, x1
	mov	x19, x0
	asr	w24, w2, #4
	and	w20, w2, #0xf
	bl	_put_bits_left
	cmp	w0, w22
	cset	w0, ge
	bl	_av_assert0
	lsl	w23, w24, #1
	cmp	w22, #256
	b.lt	LBB0_8
; %bb.2:
Lloh0:
	adrp	x8, _CONFIG_SMALL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CONFIG_SMALL@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cbnz	x8, LBB0_8
; %bb.3:
	mov	x0, x19
	bl	_put_bits_count
	tst	w0, #0x7
	b.ne	LBB0_9
; %bb.4:
	mov	x0, x19
	bl	_put_bits_count
	tst	w0, #0x1f
	b.eq	LBB0_11
; %bb.5:
	mov	x22, #0
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w2, [x21, x22, lsl #2]
	mov	x0, x19
	mov	w1, #8
	bl	_put_bits
	add	x22, x22, #1
	mov	x0, x19
	bl	_put_bits_count
	tst	w0, #0x1f
	b.ne	LBB0_6
	b	LBB0_12
LBB0_7:
	.cfi_def_cfa wsp, 0
	.cfi_same_value w30
	.cfi_same_value w29
	.cfi_same_value w19
	.cfi_same_value w20
	.cfi_same_value w21
	.cfi_same_value w22
	.cfi_same_value w23
	.cfi_same_value w24
	ret
LBB0_8:
	.cfi_restore_state
	cmp	w22, #16
	b.lt	LBB0_13
LBB0_9:
	cmp	w24, #1
	csinc	w24, w24, wzr, gt
	mov	x22, x21
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x22
	bl	_AV_RB16
	mov	x2, x0
	mov	x0, x19
	mov	w1, #16
	bl	_put_bits
	add	x22, x22, #8
	subs	x24, x24, #1
	b.ne	LBB0_10
	b	LBB0_13
LBB0_11:
	mov	w22, #0
LBB0_12:
	mov	x0, x19
	bl	_flush_put_bits
	mov	x0, x19
	bl	_put_bits_ptr
	add	x1, x21, w22, uxtw #2
	sub	w22, w23, w22
	mov	x2, x22
	bl	_memcpy
	mov	x0, x19
	mov	x1, x22
	bl	_skip_put_bytes
LBB0_13:
	add	x0, x21, w23, sxtw #2
	bl	_AV_RB16
	mov	w8, #16
	sub	w8, w8, w20
	asr	w2, w0, w8
	mov	x0, x19
	mov	x1, x20
	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
	b	_put_bits
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_CONFIG_SMALL,8,3               ; @CONFIG_SMALL
.subsections_via_symbols
