	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function atrac3p_decode_frame
_atrac3p_decode_frame:                  ## @atrac3p_decode_frame
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r14
	movq	%rdx, %rbx
	movq	%rdi, %r15
	movq	16(%rdi), %r12
	movq	8(%rsi), %r13
	movq	_ATRAC3P_FRAME_SAMPLES@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rsi)
	xorl	%edx, %edx
	callq	_ff_get_buffer
	testl	%eax, %eax
	js	LBB0_21
## %bb.1:
	movq	%rbx, -96(%rbp)                 ## 8-byte Spill
	leaq	36(%r12), %rbx
	movl	(%r14), %edx
	movl	4(%r14), %esi
	movq	%rbx, %rdi
	callq	_init_get_bits8
	testl	%eax, %eax
	js	LBB0_21
## %bb.2:
	movq	%rbx, %rdi
	callq	_get_bits1
	testq	%rax, %rax
	je	LBB0_3
## %bb.8:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
LBB0_9:
	movq	%r15, %rdi
	callq	_av_log
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
LBB0_20:
	movl	(%rax), %eax
LBB0_21:
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_get_bits_left
	cmpl	$2, %eax
	jl	LBB0_18
## %bb.4:
	xorl	%eax, %eax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	movq	%r15, -88(%rbp)                 ## 8-byte Spill
	movq	%r13, -72(%rbp)                 ## 8-byte Spill
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_5 Depth=1
	incq	-64(%rbp)                       ## 8-byte Folded Spill
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	addl	%eax, -44(%rbp)                 ## 4-byte Folded Spill
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_get_bits_left
	cmpl	$1, %eax
	movq	-88(%rbp), %r15                 ## 8-byte Reload
	jle	LBB0_18
LBB0_5:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_16 Depth 2
	movq	%rbx, %rdi
	movl	$2, %esi
	callq	_get_bits
	movl	%eax, %edx
	movq	_CH_UNIT_TERMINATOR@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edx
	je	LBB0_18
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	_CH_UNIT_EXTENSION@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edx
	je	LBB0_7
## %bb.10:                              ##   in Loop: Header=BB0_5 Depth=1
	movslq	(%r12), %rax
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	cmpq	%rax, %rcx
	jge	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	8(%r12), %rax
	cmpl	%edx, (%rax,%rcx,4)
	jne	LBB0_12
## %bb.13:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	24(%r12), %rax
	leaq	(%rax,%rcx,4), %rsi
	movl	%edx, (%rax,%rcx,4)
	movq	%r15, %r14
	leal	1(%rdx), %r15d
	movq	%rbx, %rdi
	movq	%rdx, -104(%rbp)                ## 8-byte Spill
	movl	%r15d, %edx
	movq	%rcx, %r13
	movq	%r14, %rcx
	callq	_ff_atrac3p_decode_channel_unit
	testl	%eax, %eax
	js	LBB0_21
## %bb.14:                              ##   in Loop: Header=BB0_5 Depth=1
	leaq	(,%r13,4), %r13
	movq	24(%r12), %rsi
	addq	%r13, %rsi
	movl	32(%r12), %edx
	movq	%r12, %rdi
	movl	%r15d, %ecx
	movq	%r14, %r8
	callq	_decode_residual_spectrum
	addq	24(%r12), %r13
	movq	%r12, %rdi
	movq	%r13, %rsi
	movl	%r15d, -48(%rbp)                ## 4-byte Spill
	movl	%r15d, %edx
	movq	%r14, %rcx
	callq	_reconstruct_frame
	cmpl	$0, -104(%rbp)                  ## 4-byte Folded Reload
	movq	_ATRAC3P_FRAME_SAMPLES@GOTPCREL(%rip), %r15
	js	LBB0_17
## %bb.15:                              ##   in Loop: Header=BB0_5 Depth=1
	movslq	-44(%rbp), %rax                 ## 4-byte Folded Reload
	movl	-48(%rbp), %r14d                ## 4-byte Reload
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rcx,%rax,8), %r13
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_16:                                ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	(%r13,%rbx,8), %rdi
	movq	16(%r12), %rax
	movl	(%rax,%rbx,4), %esi
	movl	(%r15), %edx
	shll	$2, %edx
	callq	_memcpy
	incq	%rbx
	cmpq	%rbx, %r14
	jne	LBB0_16
	jmp	LBB0_17
LBB0_18:
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	movl	$1, (%rax)
	movq	(%r15), %rax
	movq	_AV_CODEC_ID_ATRAC3P@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_19
## %bb.22:
	movl	8(%r15), %edi
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %esi
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_FFMIN                          ## TAILCALL
LBB0_19:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	jmp	LBB0_20
LBB0_12:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdx
	jmp	LBB0_9
LBB0_7:
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	callq	_avpriv_report_missing_feature
	movq	_AVERROR_PATCHWELCOME@GOTPCREL(%rip), %rax
	jmp	LBB0_20
	.cfi_endproc
                                        ## -- End function
	.comm	_ATRAC3P_FRAME_SAMPLES,4,2      ## @ATRAC3P_FRAME_SAMPLES
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid start bit!\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.comm	_CH_UNIT_TERMINATOR,4,2         ## @CH_UNIT_TERMINATOR
	.comm	_CH_UNIT_EXTENSION,4,2          ## @CH_UNIT_EXTENSION
L_.str.1:                               ## @.str.1
	.asciz	"Channel unit extension"

	.comm	_AVERROR_PATCHWELCOME,4,2       ## @AVERROR_PATCHWELCOME
L_.str.2:                               ## @.str.2
	.asciz	"Frame data doesn't match channel configuration!\n"

	.comm	_AV_CODEC_ID_ATRAC3P,8,3        ## @AV_CODEC_ID_ATRAC3P
	.no_dead_strip	_atrac3p_decode_frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function atrac3p_decode_frame
_atrac3p_decode_frame:                  ; @atrac3p_decode_frame
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x20, x3
	mov	x21, x2
	mov	x19, x0
	ldr	x22, [x0, #16]
	ldr	x24, [x1, #8]
Lloh0:
	adrp	x27, _ATRAC3P_FRAME_SAMPLES@GOTPAGE
Lloh1:
	ldr	x27, [x27, _ATRAC3P_FRAME_SAMPLES@GOTPAGEOFF]
	ldr	w8, [x27]
	str	w8, [x1]
	mov	w2, #0
	bl	_ff_get_buffer
	tbnz	w0, #31, LBB0_6
; %bb.1:
	add	x23, x22, #36
	ldp	w2, w1, [x20]
	mov	x0, x23
	bl	_init_get_bits8
	tbnz	w0, #31, LBB0_6
; %bb.2:
	mov	x0, x23
	bl	_get_bits1
	cbz	x0, LBB0_7
; %bb.3:
Lloh2:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
Lloh5:
	adrp	x2, l_.str@PAGE
Lloh6:
	add	x2, x2, l_.str@PAGEOFF
LBB0_4:
	mov	x0, x19
	bl	_av_log
Lloh7:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh8:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
LBB0_5:
	ldr	w0, [x8]
LBB0_6:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_7:
	stp	x21, x24, [sp]                  ; 16-byte Folded Spill
	mov	x0, x23
	bl	_get_bits_left
	cmp	w0, #2
	b.lt	LBB0_18
; %bb.8:
	mov	x28, #0
	mov	w21, #0
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=1
	add	x28, x28, #1
	add	w21, w24, w21
	mov	x0, x23
	bl	_get_bits_left
	cmp	w0, #1
	b.le	LBB0_18
LBB0_10:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_17 Depth 2
	mov	x0, x23
	mov	w1, #2
	bl	_get_bits
Lloh9:
	adrp	x8, _CH_UNIT_TERMINATOR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _CH_UNIT_TERMINATOR@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	cmp	w0, w8
	b.eq	LBB0_18
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	mov	x25, x0
Lloh12:
	adrp	x8, _CH_UNIT_EXTENSION@GOTPAGE
Lloh13:
	ldr	x8, [x8, _CH_UNIT_EXTENSION@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	cmp	w0, w8
	b.eq	LBB0_22
; %bb.12:                               ;   in Loop: Header=BB0_10 Depth=1
	ldrsw	x8, [x22]
	cmp	x28, x8
	b.ge	LBB0_21
; %bb.13:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	x8, [x22, #8]
	ldr	w8, [x8, x28, lsl #2]
	cmp	w8, w25
	b.ne	LBB0_21
; %bb.14:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	x8, [x22, #24]
	add	x1, x8, x28, lsl #2
	str	w25, [x1]
	add	w24, w25, #1
	mov	x0, x23
	mov	x2, x24
	mov	x3, x19
	bl	_ff_atrac3p_decode_channel_unit
	tbnz	w0, #31, LBB0_6
; %bb.15:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	x8, [x22, #24]
	lsl	x26, x28, #2
	add	x1, x8, x26
	ldr	w2, [x22, #32]
	mov	x0, x22
	mov	x3, x24
	mov	x4, x19
	bl	_decode_residual_spectrum
	ldr	x8, [x22, #24]
	add	x1, x8, x26
	mov	x0, x22
	mov	x2, x24
	mov	x3, x19
	bl	_reconstruct_frame
	tbnz	w25, #31, LBB0_9
; %bb.16:                               ;   in Loop: Header=BB0_10 Depth=1
	mov	x25, #0
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	add	x26, x8, w21, sxtw #3
LBB0_17:                                ;   Parent Loop BB0_10 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x0, [x26, x25, lsl #3]
	ldr	x8, [x22, #16]
	ldr	w1, [x8, x25, lsl #2]
	ldr	w8, [x27]
	lsl	w2, w8, #2
	bl	_memcpy
	add	x25, x25, #1
	cmp	x24, x25
	b.ne	LBB0_17
	b	LBB0_9
LBB0_18:
	mov	w8, #1
	ldr	x9, [sp]                        ; 8-byte Folded Reload
	str	w8, [x9]
	ldr	x8, [x19]
Lloh15:
	adrp	x9, _AV_CODEC_ID_ATRAC3P@GOTPAGE
Lloh16:
	ldr	x9, [x9, _AV_CODEC_ID_ATRAC3P@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_20
; %bb.19:
	ldr	w0, [x19, #8]
	ldr	w1, [x20]
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_FFMIN
LBB0_20:
	ldr	w0, [x20]
	b	LBB0_6
LBB0_21:
Lloh18:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh19:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
Lloh21:
	adrp	x2, l_.str.2@PAGE
Lloh22:
	add	x2, x2, l_.str.2@PAGEOFF
	b	LBB0_4
LBB0_22:
Lloh23:
	adrp	x1, l_.str.1@PAGE
Lloh24:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_avpriv_report_missing_feature
Lloh25:
	adrp	x8, _AVERROR_PATCHWELCOME@GOTPAGE
Lloh26:
	ldr	x8, [x8, _AVERROR_PATCHWELCOME@GOTPAGEOFF]
	b	LBB0_5
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpAdd	Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_ATRAC3P_FRAME_SAMPLES,4,2      ; @ATRAC3P_FRAME_SAMPLES
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid start bit!\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.comm	_CH_UNIT_TERMINATOR,4,2         ; @CH_UNIT_TERMINATOR
	.comm	_CH_UNIT_EXTENSION,4,2          ; @CH_UNIT_EXTENSION
l_.str.1:                               ; @.str.1
	.asciz	"Channel unit extension"

	.comm	_AVERROR_PATCHWELCOME,4,2       ; @AVERROR_PATCHWELCOME
l_.str.2:                               ; @.str.2
	.asciz	"Frame data doesn't match channel configuration!\n"

	.comm	_AV_CODEC_ID_ATRAC3P,8,3        ; @AV_CODEC_ID_ATRAC3P
	.no_dead_strip	_atrac3p_decode_frame
.subsections_via_symbols
