	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ea_read_header
_ea_read_header:                        ## @ea_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, %rbx
	movq	(%rdi), %r14
	callq	_process_ea_header
	testq	%rax, %rax
	jle	LBB0_1
## %bb.3:
	leaq	28(%r14), %rsi
	movq	%rbx, %rdi
	callq	_init_video_stream
	testq	%rax, %rax
	jne	LBB0_5
## %bb.4:
	leaq	24(%r14), %rsi
	movq	%rbx, %rdi
	callq	_init_video_stream
	testq	%rax, %rax
	je	LBB0_6
LBB0_5:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_1:
	movq	_EIO@GOTPCREL(%rip), %rax
LBB0_2:
	movl	(%rax), %edi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
LBB0_6:
	cmpq	$0, 16(%r14)
	je	LBB0_16
## %bb.7:
	movl	(%r14), %ecx
	leal	-3(%rcx), %eax
	cmpl	$-3, %eax
	ja	LBB0_9
## %bb.8:
	movq	_AV_LOG_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%rbx, %rdi
                                        ## kill: def $ecx killed $ecx killed $rcx
	jmp	LBB0_11
LBB0_9:
	movl	4(%r14), %ecx
	testl	%ecx, %ecx
	jle	LBB0_10
## %bb.12:
	movl	8(%r14), %ecx
	leal	-3(%rcx), %eax
	cmpl	$-3, %eax
	ja	LBB0_14
## %bb.13:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdx
	movq	%rbx, %rdi
                                        ## kill: def $ecx killed $ecx killed $rcx
	callq	_av_log
	movq	_AV_CODEC_ID_NONE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 16(%r14)
	jmp	LBB0_16
LBB0_10:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%rbx, %rdi
LBB0_11:
	callq	_av_log
	movq	$0, 16(%r14)
LBB0_16:
	movl	$1, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_14:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_avformat_new_stream
	testq	%rax, %rax
	je	LBB0_5
## %bb.15:
	movq	%rax, %rbx
	movl	4(%r14), %ecx
	movq	%rax, %rdi
	movl	$33, %esi
	movl	$1, %edx
	callq	_avpriv_set_pts_info
	movq	_AVMEDIA_TYPE_AUDIO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	16(%rbx), %rcx
	movl	%eax, 40(%rcx)
	movq	16(%r14), %rax
	movq	%rax, 32(%rcx)
	movq	$0, 24(%rcx)
	movl	(%r14), %eax
	movl	%eax, (%rcx)
	movl	4(%r14), %edx
	movl	%edx, 4(%rcx)
	movl	8(%r14), %esi
	shll	$3, %esi
	movl	%esi, 8(%rcx)
	imull	%eax, %esi
	imull	%esi, %edx
	leal	3(%rdx), %eax
	testl	%edx, %edx
	cmovnsl	%edx, %eax
	sarl	$2, %eax
	movl	%eax, 12(%rcx)
	movl	%esi, 16(%rcx)
	movl	8(%rbx), %eax
	movl	%eax, 12(%r14)
	movq	$0, (%rbx)
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_EIO,4,2                        ## @EIO
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_AV_LOG_WARNING,4,2             ## @AV_LOG_WARNING
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unsupported number of channels: %d\n"

	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
L_.str.1:                               ## @.str.1
	.asciz	"Unsupported sample rate: %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"Invalid number of bytes per sample: %d\n"

	.comm	_AV_CODEC_ID_NONE,8,3           ## @AV_CODEC_ID_NONE
	.comm	_AVMEDIA_TYPE_AUDIO,4,2         ## @AVMEDIA_TYPE_AUDIO
	.no_dead_strip	_ea_read_header
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ea_read_header
_ea_read_header:                        ; @ea_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
	ldr	x20, [x0]
	bl	_process_ea_header
	cmp	x0, #0
	b.le	LBB0_4
; %bb.1:
	add	x1, x20, #28
	mov	x0, x19
	bl	_init_video_stream
	cbnz	x0, LBB0_3
; %bb.2:
	add	x1, x20, #24
	mov	x0, x19
	bl	_init_video_stream
	cbz	x0, LBB0_6
LBB0_3:
Lloh0:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:
Lloh2:
	adrp	x8, _EIO@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
LBB0_5:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_AVERROR
LBB0_6:
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_14
; %bb.7:
	ldr	w3, [x20]
	sub	w8, w3, #3
	cmn	w8, #3
	b.hi	LBB0_9
; %bb.8:
Lloh4:
	adrp	x8, _AV_LOG_WARNING@GOTPAGE
Lloh5:
	ldr	x8, [x8, _AV_LOG_WARNING@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
Lloh7:
	adrp	x2, l_.str@PAGE
Lloh8:
	add	x2, x2, l_.str@PAGEOFF
	b	LBB0_13
LBB0_9:
	ldr	w3, [x20, #4]
	cmp	w3, #0
	b.le	LBB0_12
; %bb.10:
	ldr	w3, [x20, #8]
	sub	w8, w3, #3
	cmn	w8, #3
	b.hi	LBB0_15
; %bb.11:
Lloh9:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
Lloh12:
	adrp	x2, l_.str.2@PAGE
Lloh13:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_av_log
Lloh14:
	adrp	x8, _AV_CODEC_ID_NONE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _AV_CODEC_ID_NONE@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
	str	x8, [x20, #16]
	b	LBB0_14
LBB0_12:
Lloh17:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh18:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
Lloh20:
	adrp	x2, l_.str.1@PAGE
Lloh21:
	add	x2, x2, l_.str.1@PAGEOFF
LBB0_13:
	mov	x0, x19
	bl	_av_log
	str	xzr, [x20, #16]
LBB0_14:
	mov	w0, #1
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_15:
	mov	x0, x19
	mov	x1, #0
	bl	_avformat_new_stream
	cbz	x0, LBB0_3
; %bb.16:
	mov	x19, x0
	ldr	w3, [x20, #4]
	mov	w1, #33
	mov	w2, #1
	bl	_avpriv_set_pts_info
Lloh22:
	adrp	x8, _AVMEDIA_TYPE_AUDIO@GOTPAGE
Lloh23:
	ldr	x8, [x8, _AVMEDIA_TYPE_AUDIO@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	ldr	x9, [x19, #16]
	str	w8, [x9, #40]
	ldp	w8, w10, [x20]
	stp	w8, w10, [x9]
	ldr	w11, [x20, #8]
	lsl	w11, w11, #3
	mul	w8, w11, w8
	mul	w10, w8, w10
	orr	w12, w10, #0x3
	cmp	w10, #0
	csel	w10, w12, w10, lt
	ldr	x12, [x20, #16]
	stp	xzr, x12, [x9, #24]
	asr	w10, w10, #2
	stp	w11, w10, [x9, #8]
	str	w8, [x9, #16]
	ldr	w8, [x19, #8]
	str	w8, [x20, #12]
	str	xzr, [x19]
	b	LBB0_14
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_EIO,4,2                        ; @EIO
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_AV_LOG_WARNING,4,2             ; @AV_LOG_WARNING
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unsupported number of channels: %d\n"

	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
l_.str.1:                               ; @.str.1
	.asciz	"Unsupported sample rate: %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"Invalid number of bytes per sample: %d\n"

	.comm	_AV_CODEC_ID_NONE,8,3           ; @AV_CODEC_ID_NONE
	.comm	_AVMEDIA_TYPE_AUDIO,4,2         ; @AVMEDIA_TYPE_AUDIO
	.no_dead_strip	_ea_read_header
.subsections_via_symbols
