	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function amr_handle_packet
_amr_handle_packet:                     ## @amr_handle_packet
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %r12
	movq	%rcx, %r13
	movq	%rdx, %rbx
	movl	16(%rbp), %r14d
	movq	8(%rdx), %rax
	movq	(%rax), %rcx
	movq	_AV_CODEC_ID_AMR_NB@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_4
## %bb.1:
	movq	_frame_sizes_nb@GOTPCREL(%rip), %rcx
	cmpl	$1, 8(%rax)
	jne	LBB0_3
LBB0_8:
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movq	(%rcx), %rcx
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	movq	_AV_CH_LAYOUT_MONO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 12(%rax)
	movl	$1, %r15d
	cmpl	$2, %r14d
	jl	LBB0_13
## %bb.9:
	movl	%r14d, %eax
	movl	$1, %r15d
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	testb	$-128, (%r12,%r15,4)
	je	LBB0_13
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	incq	%r15
	cmpq	%r15, %rax
	jne	LBB0_10
## %bb.12:
	movl	%r14d, %r15d
LBB0_13:
	leal	1(%r15), %eax
	cmpl	%r14d, %eax
	jge	LBB0_14
## %bb.15:
	leal	-1(%r14), %esi
	movq	%r13, %rdi
	callq	_av_new_packet
	testq	%rax, %rax
	je	LBB0_16
## %bb.24:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.3(%rip), %rdx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_av_log
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
LBB0_4:
	movq	_AV_CODEC_ID_AMR_WB@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_6
## %bb.5:
	movq	_frame_sizes_wb@GOTPCREL(%rip), %rcx
	cmpl	$1, 8(%rax)
	je	LBB0_8
LBB0_3:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	jmp	LBB0_7
LBB0_6:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	jmp	LBB0_7
LBB0_14:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
LBB0_7:
	callq	_av_log
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
LBB0_23:
	movl	%r12d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	leaq	4(%r12), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movl	%r15d, %eax
	leaq	(%r12,%rax,4), %rsi
	addq	$4, %rsi
	movl	(%rbx), %eax
	movl	%eax, 12(%r13)
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	movq	(%r13), %r13
	movslq	%r14d, %rax
	leaq	(%r12,%rax,4), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	cmpl	$2, %r15d
	movl	$1, %r12d
	cmovael	%r15d, %r12d
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax,%r15,4), %eax
	movq	%rax, %rcx
	shrq	%rcx
	andl	$60, %ecx
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	movslq	(%rdx,%rcx), %rbx
	leaq	(%rsi,%rbx,4), %r14
	cmpq	-64(%rbp), %r14                 ## 8-byte Folded Reload
	ja	LBB0_18
## %bb.19:                              ##   in Loop: Header=BB0_17 Depth=1
	incq	%r15
	andl	$124, %eax
	leaq	4(%r13), %rdi
	movl	%eax, (%r13)
	movl	%ebx, %edx
	callq	_memcpy
	leaq	4(%r13,%rbx,4), %r13
	movq	%r14, %rsi
	cmpq	%r15, %r12
	jne	LBB0_17
## %bb.20:
	xorl	%r12d, %r12d
	cmpq	-64(%rbp), %r14                 ## 8-byte Folded Reload
	jae	LBB0_23
## %bb.21:
	movq	_AV_LOG_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.5(%rip), %rdx
	jmp	LBB0_22
LBB0_18:
	movq	_AV_LOG_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.4(%rip), %rdx
LBB0_22:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_av_log
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movl	8(%rbx), %edx
	shlq	$2, %rdx
	addq	(%rbx), %rdx
	subq	%r13, %rdx
	shrq	$2, %rdx
	xorl	%r12d, %r12d
	movq	%r13, %rdi
	xorl	%esi, %esi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_memset
	subq	(%rbx), %r13
	shrq	$2, %r13
	movl	%r13d, 8(%rbx)
	jmp	LBB0_23
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_CODEC_ID_AMR_NB,8,3         ## @AV_CODEC_ID_AMR_NB
	.comm	_frame_sizes_nb,8,3             ## @frame_sizes_nb
	.comm	_AV_CODEC_ID_AMR_WB,8,3         ## @AV_CODEC_ID_AMR_WB
	.comm	_frame_sizes_wb,8,3             ## @frame_sizes_wb
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Bad codec ID\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
L_.str.1:                               ## @.str.1
	.asciz	"Only mono AMR is supported\n"

	.comm	_AV_CH_LAYOUT_MONO,4,2          ## @AV_CH_LAYOUT_MONO
L_.str.2:                               ## @.str.2
	.asciz	"No speech data found\n"

L_.str.3:                               ## @.str.3
	.asciz	"Out of memory\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_AV_LOG_WARNING,4,2             ## @AV_LOG_WARNING
L_.str.4:                               ## @.str.4
	.asciz	"Too little speech data in the RTP packet\n"

L_.str.5:                               ## @.str.5
	.asciz	"Too much speech data in the RTP packet?\n"

	.no_dead_strip	_amr_handle_packet
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function amr_handle_packet
_amr_handle_packet:                     ; @amr_handle_packet
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	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
	.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	x22, x6
	mov	x23, x5
	mov	x19, x3
	mov	x21, x2
	mov	x20, x0
	ldr	x8, [x2, #8]
	ldr	x9, [x8]
Lloh0:
	adrp	x10, _AV_CODEC_ID_AMR_NB@GOTPAGE
Lloh1:
	ldr	x10, [x10, _AV_CODEC_ID_AMR_NB@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_2
; %bb.1:
Lloh3:
	adrp	x9, _frame_sizes_nb@GOTPAGE
Lloh4:
	ldr	x9, [x9, _frame_sizes_nb@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:
Lloh5:
	adrp	x10, _AV_CODEC_ID_AMR_WB@GOTPAGE
Lloh6:
	ldr	x10, [x10, _AV_CODEC_ID_AMR_WB@GOTPAGEOFF]
Lloh7:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_11
; %bb.3:
Lloh8:
	adrp	x9, _frame_sizes_wb@GOTPAGE
Lloh9:
	ldr	x9, [x9, _frame_sizes_wb@GOTPAGEOFF]
LBB0_4:
	ldr	w10, [x8, #8]
	cmp	w10, #1
	b.ne	LBB0_10
; %bb.5:
	ldr	x24, [x9]
Lloh10:
	adrp	x9, _AV_CH_LAYOUT_MONO@GOTPAGE
Lloh11:
	ldr	x9, [x9, _AV_CH_LAYOUT_MONO@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	str	w9, [x8, #12]
	cmp	w22, #2
	b.lt	LBB0_12
; %bb.6:
	mov	w8, w22
	mov	w26, #1
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w9, [x23, x26, lsl #2]
	tbz	w9, #7, LBB0_13
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	add	x26, x26, #1
	cmp	x8, x26
	b.ne	LBB0_7
; %bb.9:
	mov	x26, x8
	b	LBB0_13
LBB0_10:
Lloh13:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh14:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
Lloh16:
	adrp	x2, l_.str.1@PAGE
Lloh17:
	add	x2, x2, l_.str.1@PAGEOFF
	b	LBB0_17
LBB0_11:
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
	b	LBB0_17
LBB0_12:
	mov	w26, #1
LBB0_13:
	add	w8, w26, #1
	cmp	w8, w22
	b.ge	LBB0_16
; %bb.14:
	sub	w1, w22, #1
	mov	x0, x19
	bl	_av_new_packet
	cbz	x0, LBB0_19
; %bb.15:
Lloh23:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh24:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
Lloh26:
	adrp	x2, l_.str.3@PAGE
Lloh27:
	add	x2, x2, l_.str.3@PAGEOFF
	mov	x0, x20
	bl	_av_log
Lloh28:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh29:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh30:
	ldr	w0, [x8]
	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
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_AVERROR
LBB0_16:
Lloh31:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh32:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh33:
	ldr	w1, [x8]
Lloh34:
	adrp	x2, l_.str.2@PAGE
Lloh35:
	add	x2, x2, l_.str.2@PAGEOFF
LBB0_17:
	mov	x0, x20
	bl	_av_log
Lloh36:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh37:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh38:
	ldr	w0, [x8]
LBB0_18:
	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
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_19:
	add	x25, x23, #4
	add	x1, x25, w26, uxtw #2
	ldr	w8, [x21]
	str	w8, [x19, #12]
	ldr	x21, [x19]
	add	x23, x23, w22, sxtw #2
	cmp	w26, #1
	csinc	w26, w26, wzr, hi
LBB0_20:                                ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x25]
	ubfx	x9, x8, #3, #4
	ldrsw	x22, [x24, x9, lsl #2]
	add	x27, x1, x22, lsl #2
	cmp	x27, x23
	b.hi	LBB0_24
; %bb.21:                               ;   in Loop: Header=BB0_20 Depth=1
	and	w8, w8, #0x7c
	str	w8, [x21], #4
	mov	x0, x21
	mov	x2, x22
	bl	_memcpy
	add	x21, x21, x22, lsl #2
	add	x25, x25, #4
	mov	x1, x27
	subs	x26, x26, #1
	b.ne	LBB0_20
; %bb.22:
	cmp	x27, x23
	b.hs	LBB0_26
; %bb.23:
Lloh39:
	adrp	x8, _AV_LOG_WARNING@GOTPAGE
Lloh40:
	ldr	x8, [x8, _AV_LOG_WARNING@GOTPAGEOFF]
Lloh41:
	ldr	w1, [x8]
Lloh42:
	adrp	x2, l_.str.5@PAGE
Lloh43:
	add	x2, x2, l_.str.5@PAGEOFF
	b	LBB0_25
LBB0_24:
Lloh44:
	adrp	x8, _AV_LOG_WARNING@GOTPAGE
Lloh45:
	ldr	x8, [x8, _AV_LOG_WARNING@GOTPAGEOFF]
Lloh46:
	ldr	w1, [x8]
Lloh47:
	adrp	x2, l_.str.4@PAGE
Lloh48:
	add	x2, x2, l_.str.4@PAGEOFF
LBB0_25:
	mov	x0, x20
	bl	_av_log
	ldr	x8, [x19]
	ldr	w9, [x19, #8]
	add	x8, x8, x9, lsl #2
	sub	x8, x8, x21
	lsr	x2, x8, #2
	mov	x0, x21
	mov	w1, #0
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_memset
	mov	w0, #0
	ldr	x8, [x19]
	sub	x8, x21, x8
	lsr	x8, x8, #2
	str	w8, [x19, #8]
	b	LBB0_18
LBB0_26:
	mov	w0, #0
	b	LBB0_18
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpAdd	Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpAdd	Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_CODEC_ID_AMR_NB,8,3         ; @AV_CODEC_ID_AMR_NB
	.comm	_frame_sizes_nb,8,3             ; @frame_sizes_nb
	.comm	_AV_CODEC_ID_AMR_WB,8,3         ; @AV_CODEC_ID_AMR_WB
	.comm	_frame_sizes_wb,8,3             ; @frame_sizes_wb
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Bad codec ID\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
l_.str.1:                               ; @.str.1
	.asciz	"Only mono AMR is supported\n"

	.comm	_AV_CH_LAYOUT_MONO,4,2          ; @AV_CH_LAYOUT_MONO
l_.str.2:                               ; @.str.2
	.asciz	"No speech data found\n"

l_.str.3:                               ; @.str.3
	.asciz	"Out of memory\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_AV_LOG_WARNING,4,2             ; @AV_LOG_WARNING
l_.str.4:                               ; @.str.4
	.asciz	"Too little speech data in the RTP packet\n"

l_.str.5:                               ; @.str.5
	.asciz	"Too much speech data in the RTP packet?\n"

	.no_dead_strip	_amr_handle_packet
.subsections_via_symbols
