	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ogg_build_speex_headers
_ogg_build_speex_headers:               ## @ogg_build_speex_headers
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	_SPEEX_HEADER_SIZE@GOTPCREL(%rip), %r13
	movq	(%r13), %rdi
	cmpq	%rdi, (%rbx)
	jge	LBB0_2
## %bb.1:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_6
LBB0_2:
	movq	%rcx, %r14
	movl	%edx, %r15d
	movq	%rsi, %r12
	callq	_av_mallocz
	movq	%rax, -48(%rbp)
	testq	%rax, %rax
	je	LBB0_7
## %bb.3:
	movq	(%r12), %rcx
	movq	%rax, (%rcx)
	movq	(%r13), %rax
	movq	8(%r12), %rcx
	movq	%rax, (%rcx)
	movl	8(%rbx), %esi
	movq	(%r13), %rdx
	leaq	-48(%rbp), %rdi
	callq	_bytestream_put_buffer
	movq	(%r12), %rax
	movl	$272, %edi                      ## imm = 0x110
	addq	(%rax), %rdi
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	callq	_AV_WL32
	movq	8(%r12), %rdx
	addq	$8, %rdx
	movl	$0, (%rsp)
	xorl	%edi, %edi
	movl	%r15d, %esi
	movq	%r14, %rcx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_ogg_write_vorbiscomment
	movq	%rax, -48(%rbp)
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	(%r12), %rcx
	movq	%rax, 8(%rcx)
	jmp	LBB0_6
LBB0_7:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
LBB0_4:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
	movl	%eax, %ebx
LBB0_6:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SPEEX_HEADER_SIZE,8,3          ## @SPEEX_HEADER_SIZE
	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_ogg_build_speex_headers
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ogg_build_speex_headers
_ogg_build_speex_headers:               ; @ogg_build_speex_headers
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x22, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x23, _SPEEX_HEADER_SIZE@GOTPAGE
Lloh1:
	ldr	x23, [x23, _SPEEX_HEADER_SIZE@GOTPAGEOFF]
	ldr	x0, [x23]
	cmp	x8, x0
	b.ge	LBB0_2
; %bb.1:
Lloh2:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh3:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	b	LBB0_7
LBB0_2:
	mov	x20, x3
	mov	x21, x2
	mov	x19, x1
	bl	_av_mallocz
	str	x0, [sp, #8]
	cbz	x0, LBB0_5
; %bb.3:
	ldr	x8, [x19]
	str	x0, [x8]
	ldr	x8, [x23]
	ldr	x9, [x19, #8]
	str	x8, [x9]
	ldr	w1, [x22, #8]
	ldr	x2, [x23]
	add	x0, sp, #8
	bl	_bytestream_put_buffer
	ldr	x8, [x19]
	ldr	x8, [x8]
	add	x0, x8, #272
	mov	w1, #0
	bl	_AV_WL32
	ldr	x8, [x19, #8]
	add	x2, x8, #8
	mov	w0, #0
	mov	x1, x21
	mov	x3, x20
	mov	w4, #0
	mov	x5, #0
	mov	w6, #0
	bl	_ogg_write_vorbiscomment
	str	x0, [sp, #8]
	cbz	x0, LBB0_6
; %bb.4:
	mov	x8, x0
	mov	w0, #0
	ldr	x9, [x19]
	str	x8, [x9, #8]
	b	LBB0_7
LBB0_5:
Lloh5:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_AVERROR
LBB0_6:
Lloh8:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	bl	_AVERROR
LBB0_7:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_SPEEX_HEADER_SIZE,8,3          ; @SPEEX_HEADER_SIZE
	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_ogg_build_speex_headers
.subsections_via_symbols
