	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function encode_flush
_encode_flush:                          ## @encode_flush
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movl	8(%rdi), %edi
	testl	%edi, %edi
	je	LBB0_7
## %bb.1:
	callq	_count_bits
	movl	%eax, %ebx
	cmpl	$32, %eax
	jl	LBB0_2
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movl	$31, %esi
	movl	$2147483647, %edx               ## imm = 0x7FFFFFFF
	callq	_put_bits
	leal	-31(%rbx), %ecx
	cmpl	$62, %ebx
	movl	%ecx, %ebx
	ja	LBB0_3
	jmp	LBB0_4
LBB0_2:
	movl	%ebx, %ecx
LBB0_4:
	movl	$-1, %edx
	shll	%cl, %edx
	notl	%edx
	movq	%r14, %rdi
	movl	%ecx, %esi
	callq	_put_bits
	movq	%r14, %rdi
	movl	$1, %esi
	xorl	%edx, %edx
	callq	_put_bits
	movl	8(%r14), %edx
	cmpl	$2, %edx
	jl	LBB0_6
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	andl	$1, %edx
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_put_bits
	movl	8(%r14), %eax
	movl	%eax, %edx
	sarl	%edx
	movl	%edx, 8(%r14)
	cmpl	$3, %eax
	jg	LBB0_5
LBB0_6:
	movl	$0, 8(%r14)
LBB0_7:
	movl	12(%r14), %ecx
	testl	%ecx, %ecx
	je	LBB0_17
## %bb.8:
	cmpl	$16, %ecx
	jl	LBB0_15
## %bb.9:
	movq	%r14, %rdi
	movl	$16, %esi
	movl	$65535, %edx                    ## imm = 0xFFFF
	callq	_put_bits
	movq	%r14, %rdi
	movl	$1, %esi
	xorl	%edx, %edx
	callq	_put_bits
	movl	12(%r14), %edi
	addl	$-16, %edi
	movl	%edi, 12(%r14)
	callq	_count_bits
	movl	%eax, %ebx
	cmpl	$32, %eax
	jl	LBB0_10
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movl	$31, %esi
	movl	$2147483647, %edx               ## imm = 0x7FFFFFFF
	callq	_put_bits
	leal	-31(%rbx), %ecx
	cmpl	$62, %ebx
	movl	%ecx, %ebx
	ja	LBB0_11
	jmp	LBB0_12
LBB0_15:
	movl	$-1, %edx
	shll	%cl, %edx
	notl	%edx
	movq	%r14, %rdi
	movl	%ecx, %esi
	callq	_put_bits
	jmp	LBB0_16
LBB0_10:
	movl	%ebx, %ecx
LBB0_12:
	movl	$-1, %edx
	shll	%cl, %edx
	notl	%edx
	movq	%r14, %rdi
	movl	%ecx, %esi
	callq	_put_bits
	movq	%r14, %rdi
	movl	$1, %esi
	xorl	%edx, %edx
	callq	_put_bits
	movl	12(%r14), %edx
	cmpl	$2, %edx
	jl	LBB0_14
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	andl	$1, %edx
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_put_bits
	movl	12(%r14), %eax
	movl	%eax, %edx
	sarl	%edx
	movl	%edx, 12(%r14)
	cmpl	$3, %eax
	jg	LBB0_13
LBB0_14:
	movq	$0, 24(%r14)
LBB0_16:
	movl	$0, 12(%r14)
LBB0_17:
	cmpq	$0, 24(%r14)
	je	LBB0_19
## %bb.18:
	movq	%r14, %rdi
	movl	$1, %esi
	xorl	%edx, %edx
	callq	_put_bits
	movq	$0, 24(%r14)
LBB0_19:
	movl	16(%r14), %esi
	testl	%esi, %esi
	je	LBB0_21
## %bb.20:
	movl	20(%r14), %edx
	movq	%r14, %rdi
	callq	_put_bits
	movq	$0, 16(%r14)
LBB0_21:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_encode_flush
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function encode_flush
_encode_flush:                          ; @encode_flush
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	w0, [x0, #8]
	cbz	w0, LBB0_7
; %bb.1:
	bl	_count_bits
	mov	x20, x0
	cmp	w0, #32
	b.lt	LBB0_3
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	w1, #31
	mov	w2, #2147483647
	bl	_put_bits
	sub	w1, w20, #31
	cmp	w20, #62
	mov	x20, x1
	b.hi	LBB0_2
	b	LBB0_4
LBB0_3:
	mov	x1, x20
LBB0_4:
	mov	w8, #-1
	lsl	w8, w8, w1
	mvn	w2, w8
	mov	x0, x19
	bl	_put_bits
	mov	x0, x19
	mov	w1, #1
	mov	w2, #0
	bl	_put_bits
	ldr	w8, [x19, #8]
	cmp	w8, #2
	b.lt	LBB0_6
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	and	w2, w8, #0x1
	mov	x0, x19
	mov	w1, #1
	bl	_put_bits
	ldr	w9, [x19, #8]
	asr	w8, w9, #1
	str	w8, [x19, #8]
	cmp	w9, #3
	b.gt	LBB0_5
LBB0_6:
	str	wzr, [x19, #8]
LBB0_7:
	ldr	w1, [x19, #12]
	cbz	w1, LBB0_17
; %bb.8:
	cmp	w1, #16
	b.lt	LBB0_11
; %bb.9:
	mov	x0, x19
	mov	w1, #16
	mov	w2, #65535
	bl	_put_bits
	mov	x0, x19
	mov	w1, #1
	mov	w2, #0
	bl	_put_bits
	ldr	w8, [x19, #12]
	sub	w0, w8, #16
	str	w0, [x19, #12]
	bl	_count_bits
	mov	x20, x0
	cmp	w0, #32
	b.lt	LBB0_12
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	w1, #31
	mov	w2, #2147483647
	bl	_put_bits
	sub	w1, w20, #31
	cmp	w20, #62
	mov	x20, x1
	b.hi	LBB0_10
	b	LBB0_13
LBB0_11:
	mov	w8, #-1
	lsl	w8, w8, w1
	mvn	w2, w8
	mov	x0, x19
	bl	_put_bits
	b	LBB0_16
LBB0_12:
	mov	x1, x20
LBB0_13:
	mov	w8, #-1
	lsl	w8, w8, w1
	mvn	w2, w8
	mov	x0, x19
	bl	_put_bits
	mov	x0, x19
	mov	w1, #1
	mov	w2, #0
	bl	_put_bits
	ldr	w8, [x19, #12]
	cmp	w8, #2
	b.lt	LBB0_15
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	and	w2, w8, #0x1
	mov	x0, x19
	mov	w1, #1
	bl	_put_bits
	ldr	w9, [x19, #12]
	asr	w8, w9, #1
	str	w8, [x19, #12]
	cmp	w9, #3
	b.gt	LBB0_14
LBB0_15:
	str	xzr, [x19, #24]
LBB0_16:
	str	wzr, [x19, #12]
LBB0_17:
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_19
; %bb.18:
	mov	x0, x19
	mov	w1, #1
	mov	w2, #0
	bl	_put_bits
	str	xzr, [x19, #24]
LBB0_19:
	ldr	w1, [x19, #16]
	cbz	w1, LBB0_21
; %bb.20:
	ldr	w2, [x19, #20]
	mov	x0, x19
	bl	_put_bits
	str	xzr, [x19, #16]
LBB0_21:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_encode_flush
.subsections_via_symbols
