	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function copy_bits
_copy_bits:                             ## @copy_bits
	.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
	movl	%r8d, %r15d
	movq	%rcx, %r12
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r14
	movq	%rcx, %rdi
	callq	_get_bits_left
	cmpl	%r15d, %eax
	jl	LBB0_5
## %bb.1:
	movl	%eax, %r13d
	movl	(%r14), %ebx
	movq	%r14, %rdi
	callq	_put_bits_count
	subl	%eax, %ebx
	cmpl	%r15d, %ebx
	jge	LBB0_2
LBB0_5:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movl	%r13d, %edi
	andl	$7, %edi
	movl	%r13d, %ebx
	sarl	$3, %ebx
	movl	%r15d, %esi
	callq	_FFMIN
	testl	%eax, %eax
	jle	LBB0_4
## %bb.3:
	movq	%r12, %rdi
	movl	%eax, %r12d
	movl	%eax, %esi
	callq	_get_bits
	movq	%r14, %rdi
	movl	%r12d, %esi
	movl	%eax, %edx
	callq	_put_bits
	movl	%r12d, %eax
LBB0_4:
	movslq	-44(%rbp), %rdx                 ## 4-byte Folded Reload
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rcx,%rdx,4), %rdx
	negl	%ebx
	movslq	%ebx, %rcx
	leaq	(%rdx,%rcx,4), %r12
	subl	%eax, %r15d
	andl	$-8, %r13d
	movl	%r15d, %edi
	movl	%r13d, %esi
	callq	_FFMIN
	movq	%r14, %rdi
	movq	%r12, %rsi
	movl	%eax, %edx
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_avpriv_copy_bits               ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_copy_bits
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function copy_bits
_copy_bits:                             ; @copy_bits
	.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	x20, x4
	mov	x24, x3
	mov	x21, x2
	mov	x22, x1
	mov	x19, x0
	mov	x0, x3
	bl	_get_bits_left
	cmp	w0, w20
	b.lt	LBB0_2
; %bb.1:
	mov	x23, x0
	ldr	w25, [x19]
	mov	x0, x19
	bl	_put_bits_count
	sub	w8, w25, w0
	cmp	w8, w20
	b.ge	LBB0_3
LBB0_2:
	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
LBB0_3:
	and	w0, w23, #0x7
	asr	w26, w23, #3
	mov	x1, x20
	bl	_FFMIN
	mov	x25, x0
	cmp	w0, #1
	b.lt	LBB0_5
; %bb.4:
	mov	x0, x24
	mov	x1, x25
	bl	_get_bits
	mov	x2, x0
	mov	x0, x19
	mov	x1, x25
	bl	_put_bits
LBB0_5:
	add	x8, x22, w21, sxtw #2
	neg	w9, w26
	add	x21, x8, w9, sxtw #2
	sub	w0, w20, w25
	and	w1, w23, #0xfffffff8
	bl	_FFMIN
	mov	x2, x0
	mov	x0, x19
	mov	x1, x21
	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
	b	_avpriv_copy_bits
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_copy_bits
.subsections_via_symbols
