	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function opus_header
_opus_header:                           ## @opus_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, %r12
	movq	(%rdi), %rax
	movq	8(%rdi), %rcx
	movq	(%rcx), %rbx
	movslq	%esi, %r14
	movq	(%rax,%r14,8), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	shlq	$5, %r14
	movq	16(%rbx,%r14), %r15
	movslq	(%rbx,%r14), %r13
	shlq	$2, %r13
	addq	24(%rbx,%r14), %r13
	testq	%r15, %r15
	jne	LBB0_2
## %bb.1:
	leaq	(%rbx,%r14), %r15
	addq	$16, %r15
	movl	$8, %edi
	callq	_av_mallocz
	movq	%rax, (%r15)
	movq	%rax, %r15
	testq	%rax, %rax
	je	LBB0_14
LBB0_2:
	movq	_OGG_FLAG_BOS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%rbx,%r14)
	je	LBB0_8
## %bb.3:
	movl	8(%rbx,%r14), %eax
	movq	_OPUS_HEAD_SIZE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jl	LBB0_5
## %bb.4:
	leaq	32(%r13), %rdi
	callq	_AV_RL8
	testb	$-16, %al
	jne	LBB0_5
## %bb.6:
	addq	%r14, %rbx
	addq	$8, %rbx
	movq	_AVMEDIA_TYPE_AUDIO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	(%r14), %rcx
	movl	%eax, 24(%rcx)
	movq	_AV_CODEC_ID_OPUS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%rcx)
	leaq	36(%r13), %rdi
	callq	_AV_RL8
	movq	(%r14), %rcx
	movl	%eax, (%rcx)
	leaq	40(%r13), %rdi
	callq	_AV_RL16
	movl	%eax, 4(%r15)
	movq	(%r14), %rdi
	movl	%eax, 16(%rdi)
	addq	$12, %rdi
	callq	_av_freep
	movq	(%r14), %rdi
	movl	(%rbx), %esi
	callq	_ff_alloc_extradata
	testq	%rax, %rax
	je	LBB0_7
LBB0_14:
	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
LBB0_8:
	cmpl	$0, (%r15)
	je	LBB0_9
## %bb.10:
	cmpl	$8, 8(%rbx,%r14)
	jl	LBB0_5
## %bb.11:
	leaq	L_.str(%rip), %rsi
	movq	%r13, %rdi
	movl	$8, %edx
	callq	_memcmp
	testq	%rax, %rax
	je	LBB0_12
LBB0_5:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_13:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	xorl	%ebx, %ebx
	jmp	LBB0_13
LBB0_7:
	movq	(%r14), %rax
	movl	12(%rax), %edi
	movl	(%rbx), %edx
	movq	%r13, %rsi
	callq	_memcpy
	movq	(%r14), %rax
	movl	$48000, 4(%rax)                 ## imm = 0xBB80
	movq	_OPUS_SEEK_PREROLL_MS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$48000, %esi                    ## imm = 0xBB80
	movl	$1000, %edx                     ## imm = 0x3E8
	callq	_av_rescale
	movq	(%r14), %rcx
	movl	%eax, 8(%rcx)
	movl	$1, %ebx
	movq	%r14, %rdi
	movl	$64, %esi
	movl	$1, %edx
	movl	$48000, %ecx                    ## imm = 0xBB80
	callq	_avpriv_set_pts_info
	movl	$1, (%r15)
	jmp	LBB0_13
LBB0_12:
	leaq	(%rbx,%r14), %rax
	addq	$8, %rax
	addq	$32, %r13
	movl	(%rax), %ecx
	addl	$-8, %ecx
	movq	%r12, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movq	%r13, %rdx
	callq	_ff_vorbis_stream_comment
	decl	(%r15)
	movl	$1, %ebx
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_OGG_FLAG_BOS,4,2               ## @OGG_FLAG_BOS
	.comm	_OPUS_HEAD_SIZE,4,2             ## @OPUS_HEAD_SIZE
	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.comm	_AVMEDIA_TYPE_AUDIO,4,2         ## @AVMEDIA_TYPE_AUDIO
	.comm	_AV_CODEC_ID_OPUS,4,2           ## @AV_CODEC_ID_OPUS
	.comm	_OPUS_SEEK_PREROLL_MS,4,2       ## @OPUS_SEEK_PREROLL_MS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"OpusTags"

	.no_dead_strip	_opus_header
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function opus_header
_opus_header:                           ; @opus_header
	.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
                                        ; kill: def $w1 killed $w1 def $x1
	mov	x22, x0
	ldp	x9, x8, [x0]
	ldr	x23, [x8]
	sxtw	x24, w1
	ldr	x20, [x9, w1, sxtw #3]
	add	x25, x23, x24, lsl #5
	mov	x27, x25
	ldr	x19, [x27, #16]!
	ldr	x21, [x25, #24]
	ldrsw	x26, [x25]
	cbnz	x19, LBB0_2
; %bb.1:
	mov	w0, #8
	bl	_av_mallocz
	mov	x19, x0
	str	x0, [x27]
	cbz	x0, LBB0_6
LBB0_2:
	add	x21, x21, x26, lsl #2
	ldr	w8, [x25, #4]
Lloh0:
	adrp	x9, _OGG_FLAG_BOS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _OGG_FLAG_BOS@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_7
; %bb.3:
	add	x22, x23, x24, lsl #5
	ldr	w8, [x22, #8]!
Lloh3:
	adrp	x9, _OPUS_HEAD_SIZE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _OPUS_HEAD_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w8, w9
	b.lt	LBB0_10
; %bb.4:
	add	x0, x21, #32
	bl	_AV_RL8
	tst	w0, #0xf0
	b.ne	LBB0_10
; %bb.5:
Lloh6:
	adrp	x8, _AVMEDIA_TYPE_AUDIO@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AVMEDIA_TYPE_AUDIO@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	ldr	x9, [x20]
Lloh9:
	adrp	x10, _AV_CODEC_ID_OPUS@GOTPAGE
Lloh10:
	ldr	x10, [x10, _AV_CODEC_ID_OPUS@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	stp	w10, w8, [x9, #20]
	add	x0, x21, #36
	bl	_AV_RL8
	ldr	x8, [x20]
	str	w0, [x8]
	add	x0, x21, #40
	bl	_AV_RL16
	str	w0, [x19, #4]
	ldr	x8, [x20]
	str	w0, [x8, #16]
	add	x0, x8, #12
	bl	_av_freep
	ldr	x0, [x20]
	ldr	w1, [x22]
	bl	_ff_alloc_extradata
	cbz	x0, LBB0_13
LBB0_6:
Lloh12:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh14:
	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_7:
	ldr	w8, [x19]
	cbz	w8, LBB0_12
; %bb.8:
	add	x23, x23, x24, lsl #5
	ldr	w8, [x23, #8]!
	cmp	w8, #8
	b.lt	LBB0_10
; %bb.9:
Lloh15:
	adrp	x1, l_.str@PAGE
Lloh16:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	mov	w2, #8
	bl	_memcmp
	cbz	x0, LBB0_14
LBB0_10:
Lloh17:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh18:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh19:
	ldr	w21, [x8]
LBB0_11:
	mov	x0, x21
	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_12:
	mov	w21, #0
	b	LBB0_11
LBB0_13:
	ldr	x8, [x20]
	ldr	w0, [x8, #12]
	ldr	w2, [x22]
	mov	x1, x21
	bl	_memcpy
	ldr	x8, [x20]
	mov	w9, #48000
	str	w9, [x8, #4]
Lloh20:
	adrp	x8, _OPUS_SEEK_PREROLL_MS@GOTPAGE
Lloh21:
	ldr	x8, [x8, _OPUS_SEEK_PREROLL_MS@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
	mov	w1, #48000
	mov	w2, #1000
	bl	_av_rescale
	ldr	x8, [x20]
	str	w0, [x8, #8]
	mov	w21, #1
	mov	x0, x20
	mov	w1, #64
	mov	w2, #1
	mov	w3, #48000
	bl	_avpriv_set_pts_info
	str	w21, [x19]
	b	LBB0_11
LBB0_14:
	add	x2, x21, #32
	ldr	w8, [x23]
	sub	w3, w8, #8
	mov	x0, x22
	mov	x1, x20
	bl	_ff_vorbis_stream_comment
	ldr	w8, [x19]
	sub	w8, w8, #1
	str	w8, [x19]
	mov	w21, #1
	b	LBB0_11
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_OGG_FLAG_BOS,4,2               ; @OGG_FLAG_BOS
	.comm	_OPUS_HEAD_SIZE,4,2             ; @OPUS_HEAD_SIZE
	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.comm	_AVMEDIA_TYPE_AUDIO,4,2         ; @AVMEDIA_TYPE_AUDIO
	.comm	_AV_CODEC_ID_OPUS,4,2           ; @AV_CODEC_ID_OPUS
	.comm	_OPUS_SEEK_PREROLL_MS,4,2       ; @OPUS_SEEK_PREROLL_MS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"OpusTags"

	.no_dead_strip	_opus_header
.subsections_via_symbols
