	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function encode_scalar
_encode_scalar:                         ## @encode_scalar
	.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	%esi, %ebx
	movq	%rdi, %r13
	movl	4(%rdi), %esi
	movl	%edx, %edi
	callq	_FFMIN
	movl	%eax, %r14d
	movl	$-1, %esi
	movl	%r14d, %ecx
	shll	%cl, %esi
	notl	%esi
	movl	%ebx, %eax
	cltd
	idivl	%esi
	cmpl	$9, %eax
	jl	LBB0_2
## %bb.1:
	movq	_ALAC_ESCAPE_CODE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	movl	$9, %esi
	callq	_put_bits
	movq	%r13, %rdi
	movl	%r12d, %esi
	movl	%ebx, %edx
	jmp	LBB0_7
LBB0_2:
	movl	%edx, %r15d
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	$-1, %edx
	movl	%eax, %ecx
	shll	%cl, %edx
	notl	%edx
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_put_bits
LBB0_4:
	movq	%r13, %rdi
	movl	$1, %esi
	xorl	%edx, %edx
	callq	_put_bits
	cmpl	$1, %r14d
	jne	LBB0_5
## %bb.9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	testl	%r15d, %r15d
	jle	LBB0_8
## %bb.6:
	incl	%r15d
	movq	%r13, %rdi
	movl	%r14d, %esi
	movl	%r15d, %edx
	jmp	LBB0_7
LBB0_8:
	decl	%r14d
	movq	%r13, %rdi
	movl	%r14d, %esi
	xorl	%edx, %edx
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_put_bits                       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ALAC_ESCAPE_CODE,4,2           ## @ALAC_ESCAPE_CODE
	.no_dead_strip	_encode_scalar
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function encode_scalar
_encode_scalar:                         ; @encode_scalar
	.cfi_startproc
; %bb.0:
	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
	mov	x23, x3
	mov	x20, x1
	mov	x19, x0
	ldr	w1, [x0, #4]
	mov	x0, x2
	bl	_FFMIN
	mov	w8, #-1
	lsl	w8, w8, w0
	mvn	w24, w8
	sdiv	w22, w20, w24
	cmp	w22, #9
	b.lt	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _ALAC_ESCAPE_CODE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ALAC_ESCAPE_CODE@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #9
	bl	_put_bits
	mov	x0, x19
	mov	x1, x23
	mov	x2, x20
	b	LBB0_9
LBB0_2:
	mov	x21, x0
	cbz	w22, LBB0_4
; %bb.3:
	mov	w8, #-1
	lsl	w8, w8, w22
	mvn	w2, w8
	mov	x0, x19
	mov	x1, x22
	bl	_put_bits
LBB0_4:
	mov	x0, x19
	mov	w1, #1
	mov	w2, #0
	bl	_put_bits
	subs	w1, w21, #1
	b.ne	LBB0_6
; %bb.5:
	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
	ret
LBB0_6:
	msub	w8, w22, w24, w20
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.7:
	add	w2, w8, #1
	mov	x0, x19
	mov	x1, x21
	b	LBB0_9
LBB0_8:
	mov	x0, x19
	mov	w2, #0
LBB0_9:
	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	_ALAC_ESCAPE_CODE,4,2           ; @ALAC_ESCAPE_CODE
	.no_dead_strip	_encode_scalar
.subsections_via_symbols
