	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function amr_read_header
_amr_read_header:                       ## @amr_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	%r15
	pushq	%r14
	pushq	%rbx
	subq	$56, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	movq	(%rdi), %r15
	leaq	-80(%rbp), %rsi
	movq	%r15, %rdi
	movl	$6, %edx
	callq	_avio_read
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_avformat_new_stream
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r14
	movq	_AMR_header@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-80(%rbp), %rdi
	movl	$6, %edx
	callq	_memcmp
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	leaq	-56(%rbp), %rsi
	movq	%r15, %rdi
	movl	$3, %edx
	callq	_avio_read
	movq	_AMRWB_header@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-80(%rbp), %rdi
	movl	$9, %edx
	callq	_memcmp
	movq	%rax, %rcx
	movl	$-1, %eax
	testq	%rcx, %rcx
	jne	LBB0_7
## %bb.4:
	movl	$115, %edi
	movl	$97, %esi
	movl	$119, %edx
	movl	$98, %ecx
	callq	_MKTAG
	movl	$16000, %ecx                    ## imm = 0x3E80
	movq	_AV_CODEC_ID_AMR_WB@GOTPCREL(%rip), %rdx
	jmp	LBB0_6
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
	jmp	LBB0_7
LBB0_5:
	movl	$115, %edi
	movl	$97, %esi
	movl	$109, %edx
	movl	$114, %ecx
	callq	_MKTAG
	movl	$8000, %ecx                     ## imm = 0x1F40
	movq	_AV_CODEC_ID_AMR_NB@GOTPCREL(%rip), %rdx
LBB0_6:
	movq	(%r14), %rsi
	movq	%rax, 24(%rsi)
	movl	(%rdx), %eax
	movl	%eax, 16(%rsi)
	movl	%ecx, (%rsi)
	movl	$1, 4(%rsi)
	movq	_AV_CH_LAYOUT_MONO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%rsi)
	movq	_AVMEDIA_TYPE_AUDIO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%rsi)
	movq	%r14, %rdi
	movl	$64, %esi
	movl	$1, %edx
	callq	_avpriv_set_pts_info
	xorl	%eax, %eax
LBB0_7:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-32(%rbp), %rcx
	jne	LBB0_9
## %bb.8:
	addq	$56, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_AMR_header,4,2                 ## @AMR_header
	.comm	_AMRWB_header,4,2               ## @AMRWB_header
	.comm	_AV_CODEC_ID_AMR_WB,4,2         ## @AV_CODEC_ID_AMR_WB
	.comm	_AV_CODEC_ID_AMR_NB,4,2         ## @AV_CODEC_ID_AMR_NB
	.comm	_AV_CH_LAYOUT_MONO,4,2          ## @AV_CH_LAYOUT_MONO
	.comm	_AVMEDIA_TYPE_AUDIO,4,2         ## @AVMEDIA_TYPE_AUDIO
	.no_dead_strip	_amr_read_header
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function amr_read_header
_amr_read_header:                       ; @amr_read_header
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #40]
	ldr	x20, [x0]
	add	x1, sp, #4
	mov	x0, x20
	mov	w2, #6
	bl	_avio_read
	mov	x0, x19
	mov	x1, #0
	bl	_avformat_new_stream
	cbz	x0, LBB0_4
; %bb.1:
	mov	x19, x0
Lloh3:
	adrp	x8, _AMR_header@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AMR_header@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	add	x21, sp, #4
	add	x0, sp, #4
	mov	w2, #6
	bl	_memcmp
	cbz	x0, LBB0_5
; %bb.2:
	add	x1, x21, #24
	mov	x0, x20
	mov	w2, #3
	bl	_avio_read
Lloh6:
	adrp	x8, _AMRWB_header@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AMRWB_header@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	add	x0, sp, #4
	mov	w2, #9
	bl	_memcmp
	cbz	x0, LBB0_6
; %bb.3:
	mov	w0, #-1
	b	LBB0_8
LBB0_4:
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	bl	_AVERROR
	b	LBB0_8
LBB0_5:
	mov	w0, #115
	mov	w1, #97
	mov	w2, #109
	mov	w3, #114
	bl	_MKTAG
	mov	w3, #8000
Lloh12:
	adrp	x8, _AV_CODEC_ID_AMR_NB@GOTPAGE
Lloh13:
	ldr	x8, [x8, _AV_CODEC_ID_AMR_NB@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
	mov	w0, #115
	mov	w1, #97
	mov	w2, #119
	mov	w3, #98
	bl	_MKTAG
	mov	w3, #16000
Lloh14:
	adrp	x8, _AV_CODEC_ID_AMR_WB@GOTPAGE
Lloh15:
	ldr	x8, [x8, _AV_CODEC_ID_AMR_WB@GOTPAGEOFF]
LBB0_7:
	ldr	x9, [x19]
	str	x0, [x9, #24]
	ldr	w8, [x8]
	str	w8, [x9, #16]
	mov	w8, #1
	stp	w3, w8, [x9]
Lloh16:
	adrp	x8, _AV_CH_LAYOUT_MONO@GOTPAGE
Lloh17:
	ldr	x8, [x8, _AV_CH_LAYOUT_MONO@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
Lloh19:
	adrp	x10, _AVMEDIA_TYPE_AUDIO@GOTPAGE
Lloh20:
	ldr	x10, [x10, _AVMEDIA_TYPE_AUDIO@GOTPAGEOFF]
Lloh21:
	ldr	w10, [x10]
	stp	w10, w8, [x9, #8]
	mov	x0, x19
	mov	w1, #64
	mov	w2, #1
	bl	_avpriv_set_pts_info
	mov	w0, #0
LBB0_8:
	ldr	x8, [sp, #40]
Lloh22:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh23:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh24:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_10
; %bb.9:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_10:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_AMR_header,4,2                 ; @AMR_header
	.comm	_AMRWB_header,4,2               ; @AMRWB_header
	.comm	_AV_CODEC_ID_AMR_WB,4,2         ; @AV_CODEC_ID_AMR_WB
	.comm	_AV_CODEC_ID_AMR_NB,4,2         ; @AV_CODEC_ID_AMR_NB
	.comm	_AV_CH_LAYOUT_MONO,4,2          ; @AV_CH_LAYOUT_MONO
	.comm	_AVMEDIA_TYPE_AUDIO,4,2         ; @AVMEDIA_TYPE_AUDIO
	.no_dead_strip	_amr_read_header
.subsections_via_symbols
