	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function aea_read_header
_aea_read_header:                       ## @aea_read_header
	.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
	xorl	%esi, %esi
	callq	_avformat_new_stream
	testq	%rax, %rax
	je	LBB0_8
## %bb.1:
	movq	%rax, %rbx
	movl	(%r14), %edi
	movl	$264, %esi                      ## imm = 0x108
	callq	_avio_skip
	movl	(%r14), %edi
	callq	_avio_r8
	movq	(%rbx), %rcx
	movl	%eax, (%rcx)
	movl	(%r14), %edi
	movl	$1783, %esi                     ## imm = 0x6F7
	callq	_avio_skip
	movq	_AVMEDIA_TYPE_AUDIO@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	(%rbx), %rax
	movl	%ecx, 24(%rax)
	movq	_AV_CODEC_ID_ATRAC1@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 20(%rax)
	movabsq	$1254130450476100, %rcx         ## imm = 0x474A00000AC44
	movq	%rcx, 4(%rax)
	movl	(%rax), %ecx
	leal	-1(%rcx), %edx
	cmpl	$2, %edx
	jae	LBB0_2
## %bb.3:
	cmpl	$1, %ecx
	jne	LBB0_4
## %bb.5:
	movq	_AV_CH_LAYOUT_MONO@GOTPCREL(%rip), %rdx
	jmp	LBB0_6
LBB0_8:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
LBB0_2:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rdi
                                        ## kill: def $ecx killed $ecx killed $rcx
	callq	_av_log
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_7
LBB0_4:
	movq	_AV_CH_LAYOUT_STEREO@GOTPCREL(%rip), %rdx
LBB0_6:
	movl	(%rdx), %edx
	movl	%edx, 16(%rax)
	movq	_AT1_SU_SIZE@GOTPCREL(%rip), %rdx
	imull	(%rdx), %ecx
	movl	%ecx, 12(%rax)
	xorl	%eax, %eax
LBB0_7:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_AVMEDIA_TYPE_AUDIO,4,2         ## @AVMEDIA_TYPE_AUDIO
	.comm	_AV_CODEC_ID_ATRAC1,4,2         ## @AV_CODEC_ID_ATRAC1
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Channels %d not supported!\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.comm	_AV_CH_LAYOUT_MONO,4,2          ## @AV_CH_LAYOUT_MONO
	.comm	_AV_CH_LAYOUT_STEREO,4,2        ## @AV_CH_LAYOUT_STEREO
	.comm	_AT1_SU_SIZE,4,2                ## @AT1_SU_SIZE
	.no_dead_strip	_aea_read_header
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function aea_read_header
lCPI0_0:
	.long	44100                           ; 0xac44
	.long	292000                          ; 0x474a0
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_aea_read_header:                       ; @aea_read_header
	.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
	mov	x1, #0
	bl	_avformat_new_stream
	cbz	x0, LBB0_3
; %bb.1:
	mov	x20, x0
	ldr	w0, [x19]
	mov	w1, #264
	bl	_avio_skip
	ldr	w0, [x19]
	bl	_avio_r8
	ldr	x8, [x20]
	str	w0, [x8]
	ldr	w0, [x19]
	mov	w1, #1783
	bl	_avio_skip
Lloh0:
	adrp	x8, _AVMEDIA_TYPE_AUDIO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AVMEDIA_TYPE_AUDIO@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x8]
	ldr	x8, [x20]
Lloh3:
	adrp	x10, _AV_CODEC_ID_ATRAC1@GOTPAGE
Lloh4:
	ldr	x10, [x10, _AV_CODEC_ID_ATRAC1@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	stp	w10, w9, [x8, #20]
Lloh6:
	adrp	x9, lCPI0_0@PAGE
Lloh7:
	ldr	d0, [x9, lCPI0_0@PAGEOFF]
	stur	d0, [x8, #4]
	ldr	w3, [x8]
	sub	w9, w3, #1
	cmp	w9, #2
	b.hs	LBB0_4
; %bb.2:
	mov	w0, #0
Lloh8:
	adrp	x9, _AV_CH_LAYOUT_MONO@GOTPAGE
Lloh9:
	ldr	x9, [x9, _AV_CH_LAYOUT_MONO@GOTPAGEOFF]
Lloh10:
	adrp	x10, _AV_CH_LAYOUT_STEREO@GOTPAGE
Lloh11:
	ldr	x10, [x10, _AV_CH_LAYOUT_STEREO@GOTPAGEOFF]
	cmp	w3, #1
	csel	x9, x9, x10, eq
	ldr	w9, [x9]
Lloh12:
	adrp	x10, _AT1_SU_SIZE@GOTPAGE
Lloh13:
	ldr	x10, [x10, _AT1_SU_SIZE@GOTPAGEOFF]
Lloh14:
	ldr	w10, [x10]
	mul	w10, w10, w3
	stp	w10, w9, [x8, #12]
	b	LBB0_5
LBB0_3:
Lloh15:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_AVERROR
LBB0_4:
Lloh18:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh19:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
Lloh21:
	adrp	x2, l_.str@PAGE
Lloh22:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_av_log
Lloh23:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh24:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh25:
	ldr	w0, [x8]
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdr	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_AVMEDIA_TYPE_AUDIO,4,2         ; @AVMEDIA_TYPE_AUDIO
	.comm	_AV_CODEC_ID_ATRAC1,4,2         ; @AV_CODEC_ID_ATRAC1
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Channels %d not supported!\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.comm	_AV_CH_LAYOUT_MONO,4,2          ; @AV_CH_LAYOUT_MONO
	.comm	_AV_CH_LAYOUT_STEREO,4,2        ; @AV_CH_LAYOUT_STEREO
	.comm	_AT1_SU_SIZE,4,2                ; @AT1_SU_SIZE
	.no_dead_strip	_aea_read_header
.subsections_via_symbols
