	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function alac_entropy_coder
_alac_entropy_coder:                    ## @alac_entropy_coder
	.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
	cmpl	$0, 8(%rdi)
	jle	LBB0_15
## %bb.1:
	movq	(%rdi), %rax
	movslq	%esi, %rcx
	movq	(%rax,%rcx,8), %r14
	movl	16(%rdi), %r15d
	xorl	%r12d, %r12d
	xorl	%r13d, %r13d
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_2 Depth=1
	xorl	%r13d, %r13d
LBB0_14:                                ##   in Loop: Header=BB0_2 Depth=1
	cmpl	8(%rdi), %r12d
	jge	LBB0_15
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_9 Depth 2
	movl	%r15d, %edi
	shrl	$9, %edi
	addl	$3, %edi
	callq	_av_log2
	movl	(%r14), %ecx
	addl	%ecx, %ecx
	notl	%ecx
	movl	%ecx, %ebx
	sarl	$31, %ebx
	xorl	%ecx, %ebx
	addq	$4, %r14
	incl	%r12d
	addl	%ebx, %r13d
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	12(%rcx), %ecx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%r13d, %esi
	movl	%eax, %edx
	callq	_encode_scalar
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	20(%rdi), %ecx
	movl	%ebx, %eax
	imull	%ecx, %eax
	imull	%r15d, %ecx
	shrl	$9, %ecx
	subl	%ecx, %eax
	addl	%r15d, %eax
	cmpl	$65536, %ebx                    ## imm = 0x10000
	movl	%eax, %r15d
	movl	$65535, %ecx                    ## imm = 0xFFFF
	cmovgel	%ecx, %r15d
	cmpl	$127, %r15d
	ja	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	8(%rdi), %r12d
	jge	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	movl	%r15d, %edi
	callq	_av_log2
	addl	$16, %r15d
	shrl	$6, %r15d
	subl	%eax, %r15d
	movl	%r15d, %edx
	addl	$7, %edx
	xorl	%r15d, %r15d
	cmpl	$0, (%r14)
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r14, %r12
	xorl	%ebx, %ebx
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	xorl	%r13d, %r13d
	movl	%eax, %r15d
	jmp	LBB0_14
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	8(%rax), %eax
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	cmpl	%edi, %eax
	movl	%edi, %ecx
	cmovgl	%eax, %ecx
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_9:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	leal	(%rdi,%rbx), %esi
	cmpl	%eax, %esi
	jge	LBB0_10
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=2
	leaq	4(%r14), %r12
	incl	%ebx
	cmpl	$0, 4(%r14)
	movq	%r12, %r14
	je	LBB0_9
## %bb.12:                              ##   in Loop: Header=BB0_2 Depth=1
	addl	%ebx, %edi
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_13
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	%ecx, %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%r14, %r12
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%ebx, %esi
	movl	$16, %ecx
	callq	_encode_scalar
	cmpl	$65536, %ebx                    ## imm = 0x10000
	movl	$0, %r13d
	sbbl	%r13d, %r13d
	movq	%r12, %r14
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	jmp	LBB0_14
LBB0_15:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_alac_entropy_coder
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function alac_entropy_coder
_alac_entropy_coder:                    ; @alac_entropy_coder
	.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
	ldr	w8, [x0, #8]
	cmp	w8, #1
	b.lt	LBB0_15
; %bb.1:
	mov	x19, x0
	mov	w22, #0
	mov	w21, #0
	ldr	x8, [x0]
	ldr	x23, [x8, w1, sxtw #3]
	ldr	w20, [x0, #16]
	mov	w24, #65535
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	w21, #0
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x19, #8]
	cmp	w22, w8
	b.ge	LBB0_15
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_10 Depth 2
	lsr	w8, w20, #9
	add	w0, w8, #3
	bl	_av_log2
	mov	x2, x0
	ldr	w8, [x23], #4
	lsl	w8, w8, #1
	mvn	w9, w8
	eon	w25, w8, w9, asr #31
	add	w22, w22, #1
	add	w1, w25, w21
	ldr	w3, [x19, #12]
	mov	x0, x19
	bl	_encode_scalar
	ldr	w8, [x19, #20]
	mul	w9, w25, w8
	mul	w8, w8, w20
	sub	w8, w9, w8, lsr #9
	add	w8, w8, w20
	cmp	w25, #16, lsl #12               ; =65536
	csel	w20, w24, w8, ge
	cmp	w20, #127
	b.hi	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w9, [x19, #8]
	cmp	w22, w9
	b.ge	LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x20
	bl	_av_log2
	add	w8, w20, #16
	lsr	w8, w8, #6
	sub	w8, w8, w0
	ldr	w9, [x23]
	cbz	w9, LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w21, #0
	b	LBB0_14
LBB0_8:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	w21, #0
	mov	x20, x8
	b	LBB0_3
LBB0_9:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	w21, #0
	ldr	w9, [x19, #8]
	cmp	w9, w22
	csel	w10, w9, w22, gt
LBB0_10:                                ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	add	w11, w22, w21
	cmp	w11, w9
	b.ge	LBB0_13
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=2
	ldr	w11, [x23, #4]!
	add	w21, w21, #1
	cbz	w11, LBB0_10
; %bb.12:                               ;   in Loop: Header=BB0_4 Depth=1
	add	w22, w22, w21
	b	LBB0_14
LBB0_13:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x22, x10
LBB0_14:                                ;   in Loop: Header=BB0_4 Depth=1
	add	w2, w8, #7
	mov	x0, x19
	mov	x1, x21
	mov	w3, #16
	bl	_encode_scalar
	mov	w20, #0
	cmp	w21, #16, lsl #12               ; =65536
	csetm	w21, lo
	b	LBB0_3
LBB0_15:
	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
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_alac_entropy_coder
.subsections_via_symbols
