	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fixup_vorbis_headers
_fixup_vorbis_headers:                  ## @fixup_vorbis_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpq	$0, (%rdx)
	je	LBB0_2
## %bb.1:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_4
LBB0_2:
	movq	%rdx, %r14
	movq	%rsi, %rbx
	movq	(%rsi), %rax
	movl	4(%rax), %ecx
	addl	(%rax), %ecx
	addl	8(%rax), %ecx
	movslq	%ecx, %rax
	imulq	$-2139062143, %rax, %rcx        ## imm = 0x80808081
	shrq	$32, %rcx
	addl	%eax, %ecx
	movl	%ecx, %edx
	shrl	$31, %edx
	sarl	$7, %ecx
	addl	%edx, %ecx
	leal	(%rax,%rcx), %r12d
	addl	$64, %r12d
	xorl	%edi, %edi
	movl	%r12d, %esi
	callq	_av_realloc
	movq	%rax, (%r14)
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	movq	%rax, %r15
	movq	%rax, %rdi
	xorl	%esi, %esi
	movl	%r12d, %edx
	callq	_memset
	movb	$2, (%r15)
	leaq	1(%r15), %rdi
	movq	(%rbx), %rax
	movl	(%rax), %esi
	callq	_av_xiphlacing
	movq	%rax, %r12
	incl	%eax
	movslq	%eax, %rdi
	addq	%r15, %rdi
	movq	(%rbx), %rax
	movl	4(%rax), %esi
	callq	_av_xiphlacing
	addl	%r12d, %eax
	incl	%eax
	movslq	%eax, %r12
	leaq	(%r15,%r12), %rdi
	movq	(%rbx), %rax
	movq	8(%rbx), %rcx
	movl	(%rcx), %esi
	movl	(%rax), %edx
	callq	_memcpy
	movq	(%rbx), %rax
	movq	8(%rbx), %rdi
	movslq	(%rax), %r13
	addq	%r12, %r13
	callq	_av_freep
	leaq	(%r15,%r13), %rdi
	movq	(%rbx), %rax
	movq	8(%rbx), %rcx
	movl	4(%rcx), %esi
	movl	4(%rax), %edx
	callq	_memcpy
	movq	(%rbx), %rax
	movq	8(%rbx), %rdi
	movslq	4(%rax), %rax
	movslq	%r13d, %r12
	addq	%rax, %r12
	addq	$4, %rdi
	callq	_av_freep
	addq	%r12, %r15
	movq	(%rbx), %rax
	movq	8(%rbx), %rcx
	movl	8(%rcx), %esi
	movl	8(%rax), %edx
	movq	%r15, %rdi
	callq	_memcpy
	movq	(%rbx), %rax
	movq	8(%rbx), %rdi
	movslq	8(%rax), %rax
	movslq	%r12d, %rbx
	addq	%rax, %rbx
	addq	$8, %rdi
	callq	_av_freep
	movq	_AV_INPUT_BUFFER_PADDING_SIZE@GOTPCREL(%rip), %rax
	movq	%rbx, %rsi
	addq	(%rax), %rsi
	movq	%r14, %rdi
	callq	_av_reallocp
	testl	%eax, %eax
	cmovnsl	%ebx, %eax
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	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	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_AV_INPUT_BUFFER_PADDING_SIZE,8,3 ## @AV_INPUT_BUFFER_PADDING_SIZE
	.no_dead_strip	_fixup_vorbis_headers
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fixup_vorbis_headers
_fixup_vorbis_headers:                  ; @fixup_vorbis_headers
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	ldr	x8, [x2]
	cbz	x8, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	b	LBB0_4
LBB0_2:
	mov	x19, x2
	mov	x20, x1
	ldr	x8, [x1]
	ldp	w9, w10, [x8]
	ldr	w8, [x8, #8]
	add	w9, w10, w9
	add	w8, w9, w8
	mov	w9, #32897
	movk	w9, #32896, lsl #16
	smull	x9, w8, w9
	lsr	x9, x9, #32
	add	w9, w9, w8
	asr	w10, w9, #7
	add	w9, w10, w9, lsr #31
	add	w8, w8, w9
	add	w22, w8, #64
	mov	x0, #0
	mov	x1, x22
	bl	_av_realloc
	str	x0, [x19]
	cbz	x0, LBB0_5
; %bb.3:
	mov	x21, x0
	mov	w1, #0
	mov	x2, x22
	bl	_memset
	mov	w8, #2
	mov	x0, x21
	strb	w8, [x0], #1
	ldr	x8, [x20]
	ldr	w1, [x8]
	bl	_av_xiphlacing
	add	w22, w0, #1
	add	x0, x21, w22, sxtw
	ldr	x8, [x20]
	ldr	w1, [x8, #4]
	bl	_av_xiphlacing
	add	w8, w22, w0
	sxtw	x22, w8
	add	x0, x21, x22
	ldp	x9, x8, [x20]
	ldr	w1, [x8]
	ldr	w2, [x9]
	bl	_memcpy
	ldp	x8, x0, [x20]
	ldrsw	x8, [x8]
	add	x22, x8, x22
	bl	_av_freep
	add	x0, x21, x22
	ldp	x9, x8, [x20]
	ldr	w1, [x8, #4]
	ldr	w2, [x9, #4]
	bl	_memcpy
	ldp	x8, x9, [x20]
	ldrsw	x8, [x8, #4]
	add	x22, x8, w22, sxtw
	add	x0, x9, #4
	bl	_av_freep
	add	x0, x21, x22
	ldp	x9, x8, [x20]
	ldr	w1, [x8, #8]
	ldr	w2, [x9, #8]
	bl	_memcpy
	ldp	x8, x9, [x20]
	ldrsw	x8, [x8, #8]
	add	x20, x8, w22, sxtw
	add	x0, x9, #8
	bl	_av_freep
Lloh3:
	adrp	x8, _AV_INPUT_BUFFER_PADDING_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AV_INPUT_BUFFER_PADDING_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	add	x1, x8, x20
	mov	x0, x19
	bl	_av_reallocp
	cmp	w0, #0
	csel	w0, w0, w20, lt
LBB0_4:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_5:
Lloh6:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_AVERROR
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_AV_INPUT_BUFFER_PADDING_SIZE,8,3 ; @AV_INPUT_BUFFER_PADDING_SIZE
	.no_dead_strip	_fixup_vorbis_headers
.subsections_via_symbols
