	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function save_bits
_save_bits:                             ## @save_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r12d
	movl	%edx, %r14d
	movq	%rsi, %r15
	movq	%rdi, %rbx
	testl	%ecx, %ecx
	je	LBB0_1
## %bb.2:
	testl	%r14d, %r14d
	jg	LBB0_3
	jmp	LBB0_4
LBB0_1:
	movq	%r15, %rdi
	callq	_get_bits_count
	andl	$7, %eax
	movl	%eax, (%rbx)
	movl	%eax, 4(%rbx)
	leaq	24(%rbx), %rdi
	movl	8(%rbx), %edx
	movl	20(%rbx), %esi
	callq	_init_put_bits
	testl	%r14d, %r14d
	jle	LBB0_4
LBB0_3:
	movl	4(%rbx), %eax
	addl	%r14d, %eax
	leal	8(%rax), %ecx
	sarl	$3, %ecx
	cmpl	8(%rbx), %ecx
	jle	LBB0_5
LBB0_4:
	movl	28(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	callq	_avpriv_request_sample
	movl	$1, 12(%rbx)
	movl	$0, 4(%rbx)
	jmp	LBB0_9
LBB0_5:
	movl	%eax, 4(%rbx)
	testl	%r12d, %r12d
	je	LBB0_6
## %bb.7:
	movq	%r15, %rdi
	callq	_get_bits_count
	andl	$7, %eax
	movl	$8, %edi
	subl	%eax, %edi
	movl	%r14d, %esi
	callq	_FFMIN
	movl	%eax, %r12d
	leaq	24(%rbx), %r13
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_get_bits
	movq	%r13, %rdi
	movl	%r12d, %esi
	movl	%eax, %edx
	callq	_put_bits
	subl	%r12d, %r14d
	movq	(%r15), %r12
	movq	%r15, %rdi
	callq	_get_bits_count
	sarl	$3, %eax
	movslq	%eax, %rsi
	addq	%r12, %rsi
	movq	%r13, %rdi
	movl	%r14d, %edx
	jmp	LBB0_8
LBB0_6:
	leaq	24(%rbx), %r12
	movq	(%r15), %r13
	movq	%r15, %rdi
	callq	_get_bits_count
	sarl	$3, %eax
	movslq	%eax, %rsi
	addq	%r13, %rsi
	movl	4(%rbx), %edx
	movq	%r12, %rdi
LBB0_8:
	callq	_avpriv_copy_bits
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_skip_bits_long
	movl	24(%rbx), %eax
	movl	%eax, -44(%rbp)
	leaq	-44(%rbp), %rdi
	callq	_flush_put_bits
	leaq	16(%rbx), %r14
	movl	4(%rbx), %edx
	movl	20(%rbx), %esi
	movq	%r14, %rdi
	callq	_init_get_bits
	movl	(%rbx), %esi
	movq	%r14, %rdi
	callq	_skip_bits
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Too small input buffer"

	.no_dead_strip	_save_bits
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function save_bits
_save_bits:                             ; @save_bits
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x22, x3
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	cbz	w3, LBB0_2
; %bb.1:
	cmp	w20, #1
	b.ge	LBB0_3
	b	LBB0_4
LBB0_2:
	mov	x0, x21
	bl	_get_bits_count
	and	w8, w0, #0x7
	stp	w8, w8, [x19]
	add	x0, x19, #24
	ldr	w1, [x19, #20]
	ldr	w2, [x19, #8]
	bl	_init_put_bits
	cmp	w20, #1
	b.lt	LBB0_4
LBB0_3:
	ldp	w8, w9, [x19, #4]
	add	w8, w8, w20
	add	w10, w8, #8
	cmp	w9, w10, asr #3
	b.ge	LBB0_5
LBB0_4:
	ldr	w0, [x19, #28]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_avpriv_request_sample
	mov	w8, #1
	str	w8, [x19, #12]
	str	wzr, [x19, #4]
	b	LBB0_9
LBB0_5:
	str	w8, [x19, #4]
	cbz	w22, LBB0_7
; %bb.6:
	mov	x0, x21
	bl	_get_bits_count
	and	w8, w0, #0x7
	mov	w9, #8
	sub	w0, w9, w8
	mov	x1, x20
	bl	_FFMIN
	mov	x22, x0
	add	x23, x19, #24
	mov	x0, x21
	mov	x1, x22
	bl	_get_bits
	mov	x2, x0
	mov	x0, x23
	mov	x1, x22
	bl	_put_bits
	sub	w20, w20, w22
	ldr	x22, [x21]
	mov	x0, x21
	bl	_get_bits_count
	asr	w8, w0, #3
	add	x1, x22, w8, sxtw
	mov	x0, x23
	mov	x2, x20
	b	LBB0_8
LBB0_7:
	add	x22, x19, #24
	ldr	x23, [x21]
	mov	x0, x21
	bl	_get_bits_count
	asr	w8, w0, #3
	add	x1, x23, w8, sxtw
	ldr	w2, [x19, #4]
	mov	x0, x22
LBB0_8:
	bl	_avpriv_copy_bits
	mov	x0, x21
	mov	x1, x20
	bl	_skip_bits_long
	ldr	w8, [x19, #24]
	str	w8, [sp, #12]
	add	x0, sp, #12
	bl	_flush_put_bits
	add	x20, x19, #16
	ldr	w1, [x19, #20]
	ldr	w2, [x19, #4]
	mov	x0, x20
	bl	_init_get_bits
	ldr	w1, [x19]
	mov	x0, x20
	bl	_skip_bits
LBB0_9:
	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
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Too small input buffer"

	.no_dead_strip	_save_bits
.subsections_via_symbols
