	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function atrac9_decode_block
_atrac9_decode_block:                   ## @atrac9_decode_block
	.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	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, %r15d
	movl	%r8d, -112(%rbp)                ## 4-byte Spill
	movq	%rcx, -120(%rbp)                ## 8-byte Spill
	movq	%rdx, %r13
	movq	%rsi, %rbx
	movq	%rdi, %r12
	movq	%rsi, %rdi
	callq	_get_bits1
	movl	%eax, %r14d
	testl	%eax, %eax
	sete	-80(%rbp)                       ## 1-byte Folded Spill
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_get_bits1
	movq	40(%r12), %rcx
	movq	(%rcx), %rcx
	movslq	%r15d, %r15
	movq	(%rcx,%r15,8), %rbx
	movq	_ATRAC9_BLOCK_TYPE_CPE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	cmpq	%rcx, %rbx
	sete	%dl
	movq	_ATRAC9_BLOCK_TYPE_LFE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rbx
	movq	%r13, -88(%rbp)                 ## 8-byte Spill
	jne	LBB0_12
## %bb.1:
	movq	%rbx, -104(%rbp)                ## 8-byte Spill
	movq	%r15, -96(%rbp)                 ## 8-byte Spill
	movq	%r12, -72(%rbp)                 ## 8-byte Spill
	movq	48(%r13), %r14
	xorl	%ebx, %ebx
	testl	%eax, %eax
	setne	%r15b
	movl	$2, (%r13)
	movl	$2, (%r14)
	movq	8(%r14), %rdi
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	movq	16(%r14), %rdi
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	movq	24(%r14), %rdi
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	cmpl	$0, (%r13)
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	jle	LBB0_4
## %bb.2:
	movb	%r15b, %bl
	leal	4(,%rbx,4), %r15d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movl	$5, %esi
	callq	_get_bits
	movq	8(%r14), %rcx
	movl	%eax, (%rcx,%rbx,4)
	movq	32(%r14), %rax
	movl	%r15d, (%rax,%rbx,4)
	movq	48(%r14), %rax
	movq	$0, (%rax,%rbx,8)
	incq	%rbx
	movslq	(%r13), %rax
	cmpq	%rax, %rbx
	jl	LBB0_3
LBB0_4:
	movl	(%r14), %eax
	testl	%eax, %eax
	jle	LBB0_11
## %bb.5:
	xorl	%esi, %esi
	movq	_at9_q_unit_to_coeff_idx@GOTPCREL(%rip), %rdx
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_6 Depth=1
	movslq	%eax, %rcx
	cmpq	%rcx, %rsi
	jge	LBB0_11
LBB0_6:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_8 Depth 2
	movq	%rsi, %rbx
	movq	(%rdx), %rcx
	movslq	(%rcx,%rsi,4), %r12
	incq	%rsi
	movl	4(%rcx,%rbx,4), %r13d
	cmpl	%r13d, %r12d
	jge	LBB0_10
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	%rsi, -80(%rbp)                 ## 8-byte Spill
	subl	%r12d, %r13d
	.p2align	4, 0x90
LBB0_8:                                 ##   Parent Loop BB0_6 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	32(%r14), %rax
	movl	(%rax,%rbx,4), %esi
	incl	%esi
	movq	%r15, %rdi
	callq	_get_bits
	movq	24(%r14), %rcx
	movl	%eax, (%rcx,%r12,4)
	incq	%r12
	decl	%r13d
	jne	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	(%r14), %eax
	movq	_at9_q_unit_to_coeff_idx@GOTPCREL(%rip), %rdx
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
	jmp	LBB0_10
LBB0_12:
	testl	%r14d, %r14d
	jne	LBB0_16
## %bb.13:
	testl	%eax, %eax
	je	LBB0_16
## %bb.14:
	movl	48(%r12), %edi
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
LBB0_15:
	xorl	%eax, %eax
	callq	_av_log
LBB0_31:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_52
LBB0_11:
	xorl	%r13d, %r13d
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	cmpq	%rax, -104(%rbp)                ## 8-byte Folded Reload
	sete	%r13b
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movq	-88(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rsi
	movq	%r14, %rdx
	callq	_dequantize
	movq	%rbx, %rdi
	movq	%r12, %rsi
	xorl	%edx, %edx
	callq	_apply_scalefactors
	incq	%r13
LBB0_49:
	leaq	32(%rbx), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movl	$10, %r15d
	xorl	%esi, %esi
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_50:                                ## =>This Inner Loop Header: Depth=1
	movq	%rsi, -80(%rbp)                 ## 8-byte Spill
	movq	48(%r12), %r14
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movq	40(%rbx), %rax
	movq	8(%rax), %rax
	movzbl	4(%rbx), %ecx
	movl	$1, %r12d
	shll	%cl, %r12d
	movq	-96(%rbp), %rdx                 ## 8-byte Reload
	movq	(%rax,%rdx,8), %rax
	movl	-112(%rbp), %edx                ## 4-byte Reload
	shll	%cl, %edx
	movslq	(%rax,%rsi,4), %rax
	shll	$2, %edx
	movq	-120(%rbp), %rcx                ## 8-byte Reload
	movq	(%rcx), %rcx
	movslq	%edx, %r13
	addq	(%rcx,%rax,8), %r13
	movq	8(%rbx), %rsi
	movl	4(%r14,%r15,4), %edx
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	*32(%rbx)
	movq	24(%rbx), %rax
	movl	(%r14,%r15,4), %esi
	movq	8(%rbx), %rdx
	movl	16(%rbx), %ecx
	movl	%r12d, %r14d
	sarl	%r14d
	movq	%r13, %rdi
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	movl	%r14d, %r8d
	callq	*(%rax)
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax,%r15,4), %edi
	movslq	%r14d, %rsi
	addq	8(%rbx), %rsi
	addl	%r12d, %r12d
	movl	%r12d, %edx
	movq	-88(%rbp), %r12                 ## 8-byte Reload
	callq	_memcpy
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
	incq	%rsi
	addq	$14, %r15
	cmpq	%rsi, %r13
	jne	LBB0_50
## %bb.51:
	xorl	%eax, %eax
LBB0_52:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	testl	%eax, %eax
	je	LBB0_17
## %bb.32:
	movq	-88(%rbp), %r13                 ## 8-byte Reload
	cmpl	$0, 4(%r13)
	je	LBB0_33
LBB0_30:
	movl	%edx, %r14d
	movl	$0, -60(%rbp)                   ## 4-byte Folded Spill
	movq	%r12, %rdi
	movq	%r13, %rsi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	callq	_parse_gradient
	testq	%rax, %rax
	jne	LBB0_31
## %bb.34:
	movq	%r12, -72(%rbp)                 ## 8-byte Spill
	movl	-60(%rbp), %eax                 ## 4-byte Reload
	movb	%r14b, %al
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	movl	$0, 24(%r13)
	movq	%rbx, -104(%rbp)                ## 8-byte Spill
	cmpq	-56(%rbp), %rbx                 ## 8-byte Folded Reload
	movq	%r13, %r12
	movb	-80(%rbp), %r13b                ## 1-byte Reload
	jne	LBB0_41
## %bb.35:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_get_bits1
	movl	%eax, 24(%r12)
	movq	%rbx, %rdi
	callq	_get_bits1
	testl	%eax, %eax
	je	LBB0_36
## %bb.39:
	movslq	16(%r12), %rbx
	cmpl	(%r12), %ebx
	jge	LBB0_41
	.p2align	4, 0x90
LBB0_40:                                ## =>This Inner Loop Header: Depth=1
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_get_bits1
	addl	%eax, %eax
	movl	$1, %ecx
	subl	%eax, %ecx
	movq	32(%r12), %rax
	movl	%ecx, (%rax,%rbx,4)
	incq	%rbx
	movslq	(%r12), %rax
	cmpq	%rax, %rbx
	jl	LBB0_40
	jmp	LBB0_41
LBB0_17:
	movb	%dl, -72(%rbp)                  ## 1-byte Spill
	movq	%rbx, %r14
	movq	%r15, -96(%rbp)                 ## 8-byte Spill
	movq	%r12, %r15
	xorl	%r13d, %r13d
	cmpl	$8, (%r12)
	setl	%r13b
	movq	-88(%rbp), %rbx                 ## 8-byte Reload
	movl	$0, 4(%rbx)
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	$4, %esi
	callq	_get_bits
                                        ## kill: def $eax killed $eax def $rax
	leal	(%rax,%r13,2), %ecx
	incl	%ecx
	movl	%ecx, 8(%rbx)
	movq	_at9_tab_band_q_unit_map@GOTPCREL(%rip), %r12
	movq	(%r12), %rax
	movslq	%ecx, %rdx
	movl	(%rax,%rdx,8), %eax
	movl	%eax, (%rbx)
	movl	%eax, 16(%rbx)
	movl	%eax, 12(%rbx)
	movq	_at9_tab_sri_max_bands@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	(%r15), %rsi
	cmpq	%rdx, (%rax,%rsi,8)
	jae	LBB0_19
## %bb.18:
	movl	48(%r15), %edi
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	jmp	LBB0_23
LBB0_33:
	movl	48(%r12), %edi
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.4(%rip), %rdx
	jmp	LBB0_15
LBB0_19:
	leal	1(%r13,%r13), %ebx
	cmpq	-56(%rbp), %r14                 ## 8-byte Folded Reload
	jne	LBB0_25
## %bb.20:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	$4, %esi
	callq	_get_bits
	addl	%ebx, %eax
	movq	-88(%rbp), %rdx                 ## 8-byte Reload
	cmpl	8(%rdx), %eax
	jle	LBB0_24
## %bb.21:
	movl	48(%r15), %edi
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	L_.str.2(%rip), %rdx
	jmp	LBB0_22
LBB0_24:
	movq	(%r12), %rcx
	cltq
	movl	(%rcx,%rax,8), %eax
	movl	%eax, 16(%rdx)
LBB0_25:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_get_bits1
	movq	-88(%rbp), %r13                 ## 8-byte Reload
	movl	%eax, 20(%r13)
	testl	%eax, %eax
	je	LBB0_29
## %bb.26:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	$4, %esi
	callq	_get_bits
	addl	%ebx, %eax
	cmpl	8(%r13), %eax
	jge	LBB0_28
## %bb.27:
	movl	48(%r15), %edi
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	L_.str.3(%rip), %rdx
LBB0_22:
	movl	%eax, %ecx
LBB0_23:
	xorl	%eax, %eax
	callq	_av_log
	jmp	LBB0_31
LBB0_28:
	movq	(%r12), %rcx
	cltq
	movl	(%rcx,%rax,8), %eax
	movl	%eax, 12(%r13)
LBB0_29:
	movl	$1, 4(%r13)
	movq	%r15, %r12
	movq	-96(%rbp), %r15                 ## 8-byte Reload
	movq	%r14, %rbx
	movb	-72(%rbp), %dl                  ## 1-byte Reload
	jmp	LBB0_30
LBB0_36:
	movq	32(%r12), %rdi
	callq	_FF_ARRAY_ELEMS
	testl	%eax, %eax
	jle	LBB0_41
## %bb.37:
	xorl	%ebx, %ebx
LBB0_38:                                ## =>This Inner Loop Header: Depth=1
	movq	32(%r12), %rdi
	movl	$1, (%rdi,%rbx,4)
	incq	%rbx
	callq	_FF_ARRAY_ELEMS
	cltq
	cmpq	%rax, %rbx
	jl	LBB0_38
LBB0_41:
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movl	-60(%rbp), %ecx                 ## 4-byte Reload
	callq	_parse_band_ext
	testq	%rax, %rax
	jne	LBB0_31
## %bb.42:
	movq	%r15, -96(%rbp)                 ## 8-byte Spill
	xorl	%r9d, %r9d
	movb	%r13b, %r9b
	xorl	%ecx, %ecx
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	cmpq	%rax, -104(%rbp)                ## 8-byte Folded Reload
	sete	%cl
	incq	%rcx
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	xorl	%r15d, %r15d
	xorl	%r8d, %r8d
	movl	%r9d, -108(%rbp)                ## 4-byte Spill
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_43:                                ## =>This Inner Loop Header: Depth=1
	movq	48(%r12), %rax
	leaq	(%rax,%r15), %r14
	movl	24(%r12), %ecx
	xorl	%edx, %edx
	cmpq	%rcx, %r8
	setne	%dl
	shlq	$4, %rdx
	movl	(%r12,%rdx), %ecx
	movl	%ecx, (%rax,%r15)
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movq	%r14, %rdx
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	%r8, -80(%rbp)                  ## 8-byte Spill
                                        ## kill: def $r8d killed $r8d killed $r8
	callq	_read_scalefactors
	testq	%rax, %rax
	jne	LBB0_31
## %bb.44:                              ##   in Loop: Header=BB0_43 Depth=1
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movq	%r14, %rdx
	callq	_calc_precision
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movq	%r14, %rdx
	callq	_calc_codebook_idx
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movq	%r14, %rdx
	movq	%r13, %rcx
	callq	_read_coeffs_coarse
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movq	%r14, %rdx
	movq	%r13, %rcx
	callq	_read_coeffs_fine
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movq	%r14, %rdx
	callq	_dequantize
	movq	-80(%rbp), %r8                  ## 8-byte Reload
	incq	%r8
	addq	$56, %r15
	cmpq	%r8, -56(%rbp)                  ## 8-byte Folded Reload
	movl	-108(%rbp), %r9d                ## 4-byte Reload
	jne	LBB0_43
## %bb.45:
	leaq	12(%r12), %rax
	cmpl	$0, 20(%r12)
	cmoveq	%r12, %rax
	movl	(%rax), %eax
	movl	%eax, 40(%r12)
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movl	-60(%rbp), %r14d                ## 4-byte Reload
	movl	%r14d, %edx
	callq	_apply_intensity_stereo
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movl	%r14d, %edx
	callq	_apply_scalefactors
	cmpl	$0, 20(%r12)
	je	LBB0_48
## %bb.46:
	cmpq	$0, 56(%r12)
	je	LBB0_48
## %bb.47:
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movl	-60(%rbp), %edx                 ## 4-byte Reload
	callq	_apply_band_extension
LBB0_48:
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	jmp	LBB0_49
	.cfi_endproc
                                        ## -- End function
	.comm	_ATRAC9_BLOCK_TYPE_CPE,8,3      ## @ATRAC9_BLOCK_TYPE_CPE
	.comm	_ATRAC9_BLOCK_TYPE_LFE,8,3      ## @ATRAC9_BLOCK_TYPE_LFE
	.comm	_at9_q_unit_to_coeff_idx,8,3    ## @at9_q_unit_to_coeff_idx
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid block flags!\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.comm	_at9_tab_band_q_unit_map,8,3    ## @at9_tab_band_q_unit_map
	.comm	_at9_tab_sri_max_bands,8,3      ## @at9_tab_sri_max_bands
L_.str.1:                               ## @.str.1
	.asciz	"Invalid band count %i!\n"

L_.str.2:                               ## @.str.2
	.asciz	"Invalid stereo band %i!\n"

L_.str.3:                               ## @.str.3
	.asciz	"Invalid extension band %i!\n"

L_.str.4:                               ## @.str.4
	.asciz	"invalid block reused!\n"

	.no_dead_strip	_atrac9_decode_block
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function atrac9_decode_block
_atrac9_decode_block:                   ; @atrac9_decode_block
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x25, x5
	mov	x22, x4
	mov	x21, x3
	mov	x23, x2
	mov	x24, x1
	mov	x19, x0
	mov	x0, x1
	bl	_get_bits1
	mov	x27, x0
	cmp	w0, #0
	cset	w28, eq
	mov	x0, x24
	bl	_get_bits1
	ldr	x8, [x19, #40]
	ldr	x8, [x8]
	ldr	x9, [x8, w25, sxtw #3]
Lloh0:
	adrp	x8, _ATRAC9_BLOCK_TYPE_CPE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ATRAC9_BLOCK_TYPE_CPE@GOTPAGEOFF]
Lloh2:
	ldr	x20, [x8]
	cmp	x9, x20
	cset	w26, eq
Lloh3:
	adrp	x8, _ATRAC9_BLOCK_TYPE_LFE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ATRAC9_BLOCK_TYPE_LFE@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x9, x8
	str	x23, [sp, #16]                  ; 8-byte Folded Spill
	b.ne	LBB0_11
; %bb.1:
	mov	x28, x9
	stp	x20, x25, [sp, #32]             ; 16-byte Folded Spill
	str	x21, [sp, #8]                   ; 8-byte Folded Spill
	ldr	x25, [x23, #48]
	mov	w8, #8
	mov	w9, #4
	cmp	w0, #0
	csel	w20, w9, w8, eq
	mov	w8, #2
	str	w8, [x23]
	str	w8, [x25]
	ldr	x0, [x25, #8]
	mov	w1, #0
	mov	w2, #8
	bl	_memset
	ldr	x0, [x25, #16]
	mov	w1, #0
	mov	w2, #8
	bl	_memset
	ldr	x0, [x25, #24]
	mov	w1, #0
	mov	w2, #8
	bl	_memset
	ldr	w8, [x23]
	cmp	w8, #1
	b.lt	LBB0_4
; %bb.2:
	mov	x21, #0
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x24
	mov	w1, #5
	bl	_get_bits
	ldr	x8, [x25, #8]
	lsl	x9, x21, #2
	str	w0, [x8, x9]
	ldr	x8, [x25, #32]
	str	w20, [x8, x9]
	ldr	x8, [x25, #48]
	str	xzr, [x8, x21, lsl #3]
	add	x21, x21, #1
	ldrsw	x8, [x23]
	cmp	x21, x8
	b.lt	LBB0_3
LBB0_4:
	ldr	w8, [x25]
	cmp	w8, #1
	b.lt	LBB0_14
; %bb.5:
	mov	x21, #0
Lloh6:
	adrp	x20, _at9_q_unit_to_coeff_idx@GOTPAGE
Lloh7:
	ldr	x20, [x20, _at9_q_unit_to_coeff_idx@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	cmp	x27, w8, sxtw
	mov	x21, x27
	b.ge	LBB0_14
LBB0_7:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_9 Depth 2
	ldr	x10, [x20]
	ldrsw	x9, [x10, x21, lsl #2]
	add	x27, x21, #1
	ldr	w10, [x10, x27, lsl #2]
	cmp	w9, w10
	b.ge	LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	lsl	x23, x9, #2
	sub	w26, w10, w9
LBB0_9:                                 ;   Parent Loop BB0_7 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x25, #32]
	ldr	w8, [x8, x21, lsl #2]
	add	w1, w8, #1
	mov	x0, x24
	bl	_get_bits
	ldr	x8, [x25, #24]
	str	w0, [x8, x23]
	add	x23, x23, #4
	subs	w26, w26, #1
	b.ne	LBB0_9
; %bb.10:                               ;   in Loop: Header=BB0_7 Depth=1
	ldr	w8, [x25]
	b	LBB0_6
LBB0_11:
	str	w28, [sp, #32]                  ; 4-byte Folded Spill
	cbnz	w27, LBB0_18
; %bb.12:
	cbz	w0, LBB0_18
; %bb.13:
	ldr	w0, [x19, #48]
Lloh8:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh9:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	adrp	x2, l_.str@PAGE
Lloh12:
	add	x2, x2, l_.str@PAGEOFF
	bl	_av_log
	b	LBB0_42
LBB0_14:
	mov	x21, x22
	mov	x0, x19
	ldr	x20, [sp, #16]                  ; 8-byte Folded Reload
	mov	x1, x20
	mov	x2, x25
	bl	_dequantize
	mov	x0, x19
	mov	x1, x20
	mov	w2, #0
	bl	_apply_scalefactors
	ldr	x8, [sp, #32]                   ; 8-byte Folded Reload
	cmp	x28, x8
	mov	w8, #1
	cinc	x20, x8, eq
LBB0_15:
	ldr	x22, [sp, #40]                  ; 8-byte Folded Reload
	str	w21, [sp, #28]                  ; 4-byte Folded Spill
	mov	x27, #0
	mov	x28, #0
	sxtw	x9, w22
	add	x8, x19, #32
	stp	x8, x9, [sp, #32]               ; 16-byte Folded Spill
	ldp	x21, x23, [sp, #8]              ; 16-byte Folded Reload
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	ldp	x9, x8, [x19, #32]
	ldr	x8, [x8, #8]
	ldp	x0, x10, [sp, #32]              ; 16-byte Folded Reload
	ldr	x8, [x8, x10, lsl #3]
	ldrsw	x8, [x8, x28, lsl #2]
	ldr	x10, [x23, #48]
	ldr	w11, [x19, #4]
	mov	w12, #1
	lsl	w22, w12, w11
	ldr	w12, [sp, #28]                  ; 4-byte Folded Reload
	lsl	w11, w12, w11
	lsl	w11, w11, #2
	ldr	x12, [x21]
	ldr	x8, [x12, x8, lsl #3]
	add	x24, x8, w11, sxtw
	ldr	x1, [x19, #8]
	add	x26, x10, x27
	ldr	w2, [x26, #44]
	blr	x9
	ldr	x8, [x19, #24]
	ldr	x8, [x8]
	ldr	w1, [x26, #40]
	ldr	x2, [x19, #8]
	ldr	w3, [x19, #16]
	asr	w25, w22, #1
	mov	x0, x24
	mov	x4, x25
	blr	x8
	ldr	w0, [x26, #40]
	ldr	x8, [x19, #8]
	add	x1, x8, w25, sxtw
	lsl	w2, w22, #1
	bl	_memcpy
	add	x28, x28, #1
	add	x27, x27, #56
	cmp	x20, x28
	b.ne	LBB0_16
; %bb.17:
	mov	w0, #0
	b	LBB0_43
LBB0_18:
	cbz	w0, LBB0_26
; %bb.19:
	ldr	x23, [sp, #16]                  ; 8-byte Folded Reload
	ldr	w8, [x23, #4]
	cbz	w8, LBB0_28
LBB0_20:
	mov	x28, x9
	mov	x0, x19
	mov	x1, x23
	mov	x2, x24
	bl	_parse_gradient
	cbnz	x0, LBB0_42
; %bb.21:
	mov	x27, x26
	str	x21, [sp, #8]                   ; 8-byte Folded Spill
	str	wzr, [x23, #24]
	mov	x26, x20
	cmp	x28, x20
	b.ne	LBB0_41
; %bb.22:
	mov	x0, x24
	bl	_get_bits1
	str	w0, [x23, #24]
	mov	x0, x24
	bl	_get_bits1
	cbz	w0, LBB0_38
; %bb.23:
	ldrsw	x20, [x23, #16]
	ldr	w8, [x23]
	cmp	w20, w8
	b.ge	LBB0_41
; %bb.24:
	mov	w21, #1
LBB0_25:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x24
	bl	_get_bits1
	sub	w8, w21, w0, lsl #1
	ldr	x9, [x23, #32]
	str	w8, [x9, x20, lsl #2]
	add	x20, x20, #1
	ldrsw	x8, [x23]
	cmp	x20, x8
	b.lt	LBB0_25
	b	LBB0_41
LBB0_26:
	mov	x28, x9
	str	w26, [sp, #40]                  ; 4-byte Folded Spill
	mov	x27, x20
	mov	x26, x22
	mov	x22, x25
	ldr	w8, [x19]
	cmp	w8, #7
	mov	w8, #3
	csinc	w25, w8, wzr, le
	ldr	x23, [sp, #16]                  ; 8-byte Folded Reload
	str	wzr, [x23, #4]
	mov	x0, x24
	mov	w1, #4
	bl	_get_bits
	add	w8, w0, w25
Lloh13:
	adrp	x20, _at9_tab_band_q_unit_map@GOTPAGE
Lloh14:
	ldr	x20, [x20, _at9_tab_band_q_unit_map@GOTPAGEOFF]
	ldr	x9, [x20]
	ldr	x9, [x9, w8, sxtw #3]
	str	w9, [x23]
	str	w9, [x23, #16]
Lloh15:
	adrp	x10, _at9_tab_sri_max_bands@GOTPAGE
Lloh16:
	ldr	x10, [x10, _at9_tab_sri_max_bands@GOTPAGEOFF]
	stp	w8, w9, [x23, #8]
Lloh17:
	ldr	x9, [x10]
	ldrsw	x10, [x19]
	ldr	x9, [x9, x10, lsl #3]
	cmp	x9, w8, sxtw
	b.hs	LBB0_29
; %bb.27:
	ldr	w0, [x19, #48]
Lloh18:
	adrp	x9, _AV_LOG_ERROR@GOTPAGE
Lloh19:
	ldr	x9, [x9, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x9]
	str	x8, [sp]
Lloh21:
	adrp	x2, l_.str.1@PAGE
Lloh22:
	add	x2, x2, l_.str.1@PAGEOFF
	bl	_av_log
	b	LBB0_42
LBB0_28:
	ldr	w0, [x19, #48]
Lloh23:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh24:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
Lloh26:
	adrp	x2, l_.str.4@PAGE
Lloh27:
	add	x2, x2, l_.str.4@PAGEOFF
	bl	_av_log
	b	LBB0_42
LBB0_29:
	cmp	x28, x27
	b.ne	LBB0_33
; %bb.30:
	mov	x0, x24
	mov	w1, #4
	bl	_get_bits
	ldr	w9, [x23, #8]
	add	w8, w0, w25
	cmp	w8, w9
	b.le	LBB0_32
; %bb.31:
	ldr	w0, [x19, #48]
Lloh28:
	adrp	x9, _AV_LOG_ERROR@GOTPAGE
Lloh29:
	ldr	x9, [x9, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh30:
	ldr	w1, [x9]
	str	x8, [sp]
Lloh31:
	adrp	x2, l_.str.2@PAGE
Lloh32:
	add	x2, x2, l_.str.2@PAGEOFF
	bl	_av_log
	b	LBB0_42
LBB0_32:
	ldr	x9, [x20]
	ldr	x8, [x9, w8, sxtw #3]
	str	w8, [x23, #16]
LBB0_33:
	mov	x0, x24
	bl	_get_bits1
	str	w0, [x23, #20]
	cbz	w0, LBB0_37
; %bb.34:
	mov	x0, x24
	mov	w1, #4
	bl	_get_bits
	ldr	w9, [x23, #8]
	add	w8, w0, w25
	cmp	w8, w9
	b.ge	LBB0_36
; %bb.35:
	ldr	w0, [x19, #48]
Lloh33:
	adrp	x9, _AV_LOG_ERROR@GOTPAGE
Lloh34:
	ldr	x9, [x9, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh35:
	ldr	w1, [x9]
	str	x8, [sp]
Lloh36:
	adrp	x2, l_.str.3@PAGE
Lloh37:
	add	x2, x2, l_.str.3@PAGEOFF
	bl	_av_log
	b	LBB0_42
LBB0_36:
	ldr	x9, [x20]
	ldr	x8, [x9, w8, sxtw #3]
	str	w8, [x23, #12]
LBB0_37:
	mov	w8, #1
	str	w8, [x23, #4]
	mov	x25, x22
	mov	x22, x26
	mov	x20, x27
	ldr	w26, [sp, #40]                  ; 4-byte Folded Reload
	mov	x9, x28
	b	LBB0_20
LBB0_38:
	ldr	x0, [x23, #32]
	bl	_FF_ARRAY_ELEMS
	cmp	w0, #1
	b.lt	LBB0_41
; %bb.39:
	mov	x20, #0
	mov	w21, #1
LBB0_40:                                ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x23, #32]
	str	w21, [x0, x20, lsl #2]
	add	x20, x20, #1
	bl	_FF_ARRAY_ELEMS
	cmp	x20, w0, sxtw
	b.lt	LBB0_40
LBB0_41:
	mov	x0, x19
	mov	x1, x23
	mov	x2, x24
	mov	x21, x27
	mov	x3, x27
	bl	_parse_band_ext
	cbz	x0, LBB0_44
LBB0_42:
Lloh38:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh39:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh40:
	ldr	w0, [x8]
LBB0_43:
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_44:
	str	x25, [sp, #40]                  ; 8-byte Folded Spill
	mov	x25, #0
	mov	x27, #0
	cmp	x28, x26
	mov	w8, #1
	cinc	x20, x8, eq
	mov	x26, x21
	ldr	w21, [sp, #32]                  ; 4-byte Folded Reload
LBB0_45:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x23, #48]
	add	x28, x8, x25
	ldr	w8, [x23, #24]
	cmp	x27, x8
	cset	w8, ne
	lsl	x8, x8, #4
	ldr	w8, [x23, x8]
	str	w8, [x28]
	mov	x0, x19
	mov	x1, x23
	mov	x2, x28
	mov	x3, x24
	mov	x4, x27
	mov	x5, x21
	bl	_read_scalefactors
	cbnz	x0, LBB0_42
; %bb.46:                               ;   in Loop: Header=BB0_45 Depth=1
	mov	x0, x19
	mov	x1, x23
	mov	x2, x28
	bl	_calc_precision
	mov	x0, x19
	mov	x1, x23
	mov	x2, x28
	bl	_calc_codebook_idx
	mov	x0, x19
	mov	x1, x23
	mov	x2, x28
	mov	x3, x24
	bl	_read_coeffs_coarse
	mov	x0, x19
	mov	x1, x23
	mov	x2, x28
	mov	x3, x24
	bl	_read_coeffs_fine
	mov	x0, x19
	mov	x1, x23
	mov	x2, x28
	bl	_dequantize
	add	x27, x27, #1
	add	x25, x25, #56
	cmp	x20, x27
	b.ne	LBB0_45
; %bb.47:
	ldr	w8, [x23, #20]
	cmp	w8, #0
	mov	w8, #12
	csel	x8, xzr, x8, eq
	ldr	w8, [x23, x8]
	str	w8, [x23, #40]
	mov	x0, x19
	mov	x1, x23
	mov	x2, x26
	bl	_apply_intensity_stereo
	mov	x0, x19
	mov	x1, x23
	mov	x2, x26
	bl	_apply_scalefactors
	ldr	w8, [x23, #20]
	cbz	w8, LBB0_50
; %bb.48:
	mov	x21, x22
	ldr	x8, [x23, #56]
	cbz	x8, LBB0_15
; %bb.49:
	mov	x0, x19
	mov	x1, x23
	mov	x2, x26
	bl	_apply_band_extension
	b	LBB0_15
LBB0_50:
	mov	x21, x22
	b	LBB0_15
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.cfi_endproc
                                        ; -- End function
	.comm	_ATRAC9_BLOCK_TYPE_CPE,8,3      ; @ATRAC9_BLOCK_TYPE_CPE
	.comm	_ATRAC9_BLOCK_TYPE_LFE,8,3      ; @ATRAC9_BLOCK_TYPE_LFE
	.comm	_at9_q_unit_to_coeff_idx,8,3    ; @at9_q_unit_to_coeff_idx
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid block flags!\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.comm	_at9_tab_band_q_unit_map,8,3    ; @at9_tab_band_q_unit_map
	.comm	_at9_tab_sri_max_bands,8,3      ; @at9_tab_sri_max_bands
l_.str.1:                               ; @.str.1
	.asciz	"Invalid band count %i!\n"

l_.str.2:                               ; @.str.2
	.asciz	"Invalid stereo band %i!\n"

l_.str.3:                               ; @.str.3
	.asciz	"Invalid extension band %i!\n"

l_.str.4:                               ; @.str.4
	.asciz	"invalid block reused!\n"

	.no_dead_strip	_atrac9_decode_block
.subsections_via_symbols
