	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function speex_header
_speex_header:                          ## @speex_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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	(%rdi), %rax
	movq	8(%rdi), %rcx
	movq	(%rcx), %r13
	movslq	%esi, %rcx
	leaq	(%rcx,%rcx,2), %r15
	movq	8(%r13,%r15,8), %r12
	movq	(%rax,%rcx,8), %rsi
	movslq	(%r13,%r15,8), %rbx
	shlq	$2, %rbx
	addq	16(%r13,%r15,8), %rbx
	testq	%r12, %r12
	jne	LBB0_3
## %bb.1:
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movl	$8, %edi
	callq	_av_mallocz
	testq	%rax, %rax
	je	LBB0_27
## %bb.2:
	movq	%rax, %r12
	leaq	8(,%r15,8), %rax
	addq	%r13, %rax
	movq	%r12, (%rax)
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
LBB0_3:
	movl	(%r12), %ecx
	xorl	%eax, %eax
	cmpl	$1, %ecx
	jg	LBB0_26
## %bb.4:
	testl	%ecx, %ecx
	je	LBB0_5
## %bb.24:
	movl	4(%r13,%r15,8), %ecx
	movq	%r14, %rdi
	movq	%rbx, %rdx
	callq	_ff_vorbis_stream_comment
LBB0_25:
	incl	(%r12)
	movl	$1, %eax
	jmp	LBB0_26
LBB0_5:
	movq	_AVMEDIA_TYPE_AUDIO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	(%rsi), %rcx
	movl	%eax, 28(%rcx)
	movq	_AV_CODEC_ID_SPEEX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%rcx)
	cmpl	$67, 4(%r13,%r15,8)
	jg	LBB0_9
## %bb.6:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	jmp	LBB0_7
LBB0_9:
	leaq	144(%rbx), %rdi
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	callq	_AV_RL32
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %rcx
	movq	%rax, (%rcx)
	testq	%rax, %rax
	jg	LBB0_11
## %bb.10:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%r14, %rdi
	movq	%rax, %rcx
	xorl	%eax, %eax
	callq	_av_log
	jmp	LBB0_8
LBB0_11:
	leaq	192(%rbx), %rdi
	callq	_AV_RL32
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %rcx
	movl	%eax, 8(%rcx)
	leal	-3(%rax), %edx
	cmpl	$-3, %edx
	ja	LBB0_13
## %bb.12:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdx
LBB0_7:
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_av_log
LBB0_8:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_26:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	cmpl	$1, %eax
	jne	LBB0_14
## %bb.15:
	movq	_AV_CH_LAYOUT_MONO@GOTPCREL(%rip), %rax
	jmp	LBB0_16
LBB0_14:
	movq	_AV_CH_LAYOUT_STEREO@GOTPCREL(%rip), %rax
LBB0_16:
	movl	(%rax), %eax
	movl	%eax, 20(%rcx)
	leaq	224(%rbx), %rdi
	callq	_AV_RL32
	movl	%eax, 4(%r12)
	leaq	256(%rbx), %rdi
	callq	_AV_RL32
	movl	4(%r12), %ecx
	testl	%ecx, %ecx
	js	LBB0_19
## %bb.17:
	testl	%eax, %eax
	js	LBB0_19
## %bb.18:
	movl	%ecx, %edx
	imull	%eax, %edx
	movq	_INT32_MAX@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	leal	255(%rsi), %edi
	testl	%esi, %esi
	cmovnsl	%esi, %edi
	sarl	$8, %edi
	cmpl	%edi, %edx
	jle	LBB0_20
LBB0_19:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
	leaq	L_.str.3(%rip), %rdx
	movq	%r14, %rdi
	movl	%eax, %r8d
	xorl	%eax, %eax
	callq	_av_log
	movl	$0, 4(%r12)
	jmp	LBB0_8
LBB0_20:
	leaq	4(,%r15,8), %rcx
	addq	%r13, %rcx
	testl	%eax, %eax
	je	LBB0_22
## %bb.21:
	movl	%edx, 4(%r12)
LBB0_22:
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	(%r14), %rdi
	movl	(%rcx), %esi
	callq	_ff_alloc_extradata
	testq	%rax, %rax
	js	LBB0_27
## %bb.23:
	movq	(%r14), %rax
	movl	12(%rax), %edx
	movl	16(%rax), %edi
	movq	%rbx, %rsi
	callq	_memcpy
	movq	(%r14), %rax
	movq	(%rax), %rcx
	movq	%r14, %rdi
	movl	$64, %esi
	movl	$1, %edx
	callq	_avpriv_set_pts_info
	jmp	LBB0_25
LBB0_27:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_AVMEDIA_TYPE_AUDIO,4,2         ## @AVMEDIA_TYPE_AUDIO
	.comm	_AV_CODEC_ID_SPEEX,4,2          ## @AV_CODEC_ID_SPEEX
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"speex packet too small\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
L_.str.1:                               ## @.str.1
	.asciz	"Invalid sample rate %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"invalid channel count. Speex must be mono or stereo.\n"

	.comm	_AV_CH_LAYOUT_MONO,4,2          ## @AV_CH_LAYOUT_MONO
	.comm	_AV_CH_LAYOUT_STEREO,4,2        ## @AV_CH_LAYOUT_STEREO
	.comm	_INT32_MAX,4,2                  ## @INT32_MAX
L_.str.3:                               ## @.str.3
	.asciz	"invalid packet_size, frames_per_packet %d %d\n"

	.no_dead_strip	_speex_header
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function speex_header
_speex_header:                          ; @speex_header
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	mov	x22, x1
	mov	x20, x0
	ldp	x9, x8, [x0]
	ldr	x23, [x8]
	mov	w8, #24
	smaddl	x26, w1, w8, x23
	ldr	x24, [x26, #16]
	ldrsw	x25, [x26]
	ldr	x19, [x26, #8]!
	ldr	x21, [x9, w1, sxtw #3]
	cbnz	x19, LBB0_3
; %bb.1:
	mov	w0, #8
	bl	_av_mallocz
	cbz	x0, LBB0_25
; %bb.2:
	mov	x19, x0
	str	x0, [x26]
LBB0_3:
	ldr	w9, [x19]
	cmp	w9, #1
	b.le	LBB0_5
; %bb.4:
	mov	w0, #0
	b	LBB0_16
LBB0_5:
	sxtw	x8, w22
	add	x22, x24, x25, lsl #2
	cbz	w9, LBB0_8
; %bb.6:
	mov	w9, #24
	madd	x8, x8, x9, x23
	ldr	w3, [x8, #4]
	mov	x0, x20
	mov	x1, x21
	mov	x2, x22
	bl	_ff_vorbis_stream_comment
LBB0_7:
	ldr	w8, [x19]
	add	w8, w8, #1
	str	w8, [x19]
	mov	w0, #1
	b	LBB0_16
LBB0_8:
Lloh0:
	adrp	x9, _AVMEDIA_TYPE_AUDIO@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AVMEDIA_TYPE_AUDIO@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	ldr	x10, [x21]
Lloh3:
	adrp	x11, _AV_CODEC_ID_SPEEX@GOTPAGE
Lloh4:
	ldr	x11, [x11, _AV_CODEC_ID_SPEEX@GOTPAGEOFF]
Lloh5:
	ldr	w11, [x11]
	stp	w11, w9, [x10, #24]
	mov	w9, #24
	madd	x23, x8, x9, x23
	ldr	w8, [x23, #4]!
	cmp	w8, #67
	b.gt	LBB0_10
; %bb.9:
Lloh6:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
Lloh9:
	adrp	x2, l_.str@PAGE
Lloh10:
	add	x2, x2, l_.str@PAGEOFF
	b	LBB0_14
LBB0_10:
	add	x0, x22, #144
	bl	_AV_RL32
	ldr	x8, [x21]
	str	x0, [x8]
	cmp	x0, #0
	b.gt	LBB0_12
; %bb.11:
Lloh11:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh12:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	str	x0, [sp]
Lloh14:
	adrp	x2, l_.str.1@PAGE
Lloh15:
	add	x2, x2, l_.str.1@PAGEOFF
	b	LBB0_14
LBB0_12:
	add	x0, x22, #192
	bl	_AV_RL32
	ldr	x8, [x21]
	str	w0, [x8, #8]
	sub	w9, w0, #3
	cmn	w9, #3
	b.hi	LBB0_17
; %bb.13:
Lloh16:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh17:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
Lloh19:
	adrp	x2, l_.str.2@PAGE
Lloh20:
	add	x2, x2, l_.str.2@PAGEOFF
LBB0_14:
	mov	x0, x20
	bl	_av_log
LBB0_15:
Lloh21:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh22:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
LBB0_16:
	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
	add	sp, sp, #96
	ret
LBB0_17:
Lloh24:
	adrp	x9, _AV_CH_LAYOUT_MONO@GOTPAGE
Lloh25:
	ldr	x9, [x9, _AV_CH_LAYOUT_MONO@GOTPAGEOFF]
Lloh26:
	adrp	x10, _AV_CH_LAYOUT_STEREO@GOTPAGE
Lloh27:
	ldr	x10, [x10, _AV_CH_LAYOUT_STEREO@GOTPAGEOFF]
	cmp	w0, #1
	csel	x9, x9, x10, eq
	ldr	w9, [x9]
	str	w9, [x8, #20]
	add	x0, x22, #224
	bl	_AV_RL32
	str	w0, [x19, #4]
	add	x0, x22, #256
	bl	_AV_RL32
                                        ; kill: def $w0 killed $w0 killed $x0 def $x0
	ldr	w8, [x19, #4]
	tbnz	w8, #31, LBB0_20
; %bb.18:
	tbnz	w0, #31, LBB0_20
; %bb.19:
Lloh28:
	adrp	x10, _INT32_MAX@GOTPAGE
Lloh29:
	ldr	x10, [x10, _INT32_MAX@GOTPAGEOFF]
	mul	w9, w8, w0
Lloh30:
	ldr	w10, [x10]
	add	w11, w10, #255
	cmp	w10, #0
	csel	w10, w11, w10, lt
	cmp	w9, w10, asr #8
	b.le	LBB0_21
LBB0_20:
Lloh31:
	adrp	x9, _AV_LOG_ERROR@GOTPAGE
Lloh32:
	ldr	x9, [x9, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh33:
	ldr	w1, [x9]
	stp	x8, x0, [sp]
Lloh34:
	adrp	x2, l_.str.3@PAGE
Lloh35:
	add	x2, x2, l_.str.3@PAGEOFF
	mov	x0, x20
	bl	_av_log
	str	wzr, [x19, #4]
	b	LBB0_15
LBB0_21:
	cbz	w0, LBB0_23
; %bb.22:
	str	w9, [x19, #4]
LBB0_23:
	ldr	x0, [x21]
	ldr	w1, [x23]
	bl	_ff_alloc_extradata
	tbnz	x0, #63, LBB0_25
; %bb.24:
	ldr	x8, [x21]
	ldp	w2, w0, [x8, #12]
	mov	x1, x22
	bl	_memcpy
	ldr	x8, [x21]
	ldr	x3, [x8]
	mov	x0, x21
	mov	w1, #64
	mov	w2, #1
	bl	_avpriv_set_pts_info
	b	LBB0_7
LBB0_25:
Lloh36:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh37:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh38:
	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
	add	sp, sp, #96
	b	_AVERROR
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_AVMEDIA_TYPE_AUDIO,4,2         ; @AVMEDIA_TYPE_AUDIO
	.comm	_AV_CODEC_ID_SPEEX,4,2          ; @AV_CODEC_ID_SPEEX
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"speex packet too small\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
l_.str.1:                               ; @.str.1
	.asciz	"Invalid sample rate %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"invalid channel count. Speex must be mono or stereo.\n"

	.comm	_AV_CH_LAYOUT_MONO,4,2          ; @AV_CH_LAYOUT_MONO
	.comm	_AV_CH_LAYOUT_STEREO,4,2        ; @AV_CH_LAYOUT_STEREO
	.comm	_INT32_MAX,4,2                  ; @INT32_MAX
l_.str.3:                               ; @.str.3
	.asciz	"invalid packet_size, frames_per_packet %d %d\n"

	.no_dead_strip	_speex_header
.subsections_via_symbols
