	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ogg_new_stream
_ogg_new_stream:                        ## @ogg_new_stream
	.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	(%rdi), %r13
	cmpq	$0, 16(%r13)
	je	LBB0_2
## %bb.1:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%rbx, %rdi
	callq	_av_log
	movq	_AVERROR_BUG@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	jmp	LBB0_9
LBB0_2:
	movl	%esi, %r12d
	movl	(%r13), %r14d
	leal	1(%r14), %edi
	leaq	-56(%rbp), %rdx
	movl	$32, %esi
	callq	_av_size_mult
	testq	%rax, %rax
	js	LBB0_4
## %bb.3:
	movq	8(%r13), %rdi
	movq	-56(%rbp), %rsi
	callq	_av_realloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rax, %r15
	movl	%r12d, -44(%rbp)                ## 4-byte Spill
	movslq	%r14d, %r12
	movq	%rax, 8(%r13)
	shlq	$5, %r12
	leaq	(%rax,%r12), %rdi
	xorl	%esi, %esi
	movl	$32, %edx
	callq	_memset
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 24(%r15,%r12)
	movq	_DECODER_BUFFER_SIZE@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	%rdi, 16(%r15,%r12)
	movq	_AV_INPUT_BUFFER_PADDING_SIZE@GOTPCREL(%rip), %rax
	addq	(%rax), %rdi
	callq	_av_malloc
	movl	%eax, 4(%r15,%r12)
	movl	$-1, (%r15,%r12)
	movq	_OGG_NOGRANULE_VALUE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 8(%r15,%r12)
	testl	%eax, %eax
	je	LBB0_4
## %bb.6:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_avformat_new_stream
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:
	movl	%r14d, (%rax)
	movq	%rax, %rdi
	movl	$64, %esi
	movl	$1, %edx
	movl	$1000000, %ecx                  ## imm = 0xF4240
	callq	_avpriv_set_pts_info
	incl	(%r13)
	jmp	LBB0_9
LBB0_7:
	leaq	(%r15,%r12), %rdi
	addq	$4, %rdi
	callq	_av_freep
LBB0_4:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
	movl	%eax, %r14d
LBB0_9:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"New streams are not supposed to be added in between Ogg context save/restore operations.\n"

	.comm	_AVERROR_BUG,4,2                ## @AVERROR_BUG
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_DECODER_BUFFER_SIZE,8,3        ## @DECODER_BUFFER_SIZE
	.comm	_AV_INPUT_BUFFER_PADDING_SIZE,8,3 ## @AV_INPUT_BUFFER_PADDING_SIZE
	.comm	_OGG_NOGRANULE_VALUE,4,2        ## @OGG_NOGRANULE_VALUE
	.no_dead_strip	_ogg_new_stream
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ogg_new_stream
_ogg_new_stream:                        ; @ogg_new_stream
	.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	x20, x0
	ldr	x23, [x0]
	ldr	x8, [x23, #16]
	cbz	x8, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x20
	bl	_av_log
Lloh5:
	adrp	x8, _AVERROR_BUG@GOTPAGE
Lloh6:
	ldr	x8, [x8, _AVERROR_BUG@GOTPAGEOFF]
Lloh7:
	ldr	w19, [x8]
	b	LBB0_9
LBB0_2:
	mov	x21, x1
	ldr	w19, [x23]
	add	w0, w19, #1
	add	x2, sp, #8
	mov	w1, #32
	bl	_av_size_mult
	tbnz	x0, #63, LBB0_8
; %bb.3:
	ldr	x0, [x23, #8]
	ldr	x1, [sp, #8]
	bl	_av_realloc
	cbz	x0, LBB0_8
; %bb.4:
	sxtw	x8, w19
	str	x0, [x23, #8]
	add	x22, x0, x8, lsl #5
	mov	x0, x22
	mov	w1, #0
	mov	w2, #32
	bl	_memset
	str	w21, [x22, #24]
Lloh8:
	adrp	x8, _DECODER_BUFFER_SIZE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _DECODER_BUFFER_SIZE@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	str	x8, [x22, #16]
Lloh11:
	adrp	x9, _AV_INPUT_BUFFER_PADDING_SIZE@GOTPAGE
Lloh12:
	ldr	x9, [x9, _AV_INPUT_BUFFER_PADDING_SIZE@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_av_malloc
	mov	x21, x22
	str	w0, [x21, #4]!
	mov	w8, #-1
	str	w8, [x22]
Lloh14:
	adrp	x8, _OGG_NOGRANULE_VALUE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _OGG_NOGRANULE_VALUE@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	str	w8, [x22, #8]
	cbz	w0, LBB0_8
; %bb.5:
	mov	x0, x20
	mov	x1, #0
	bl	_avformat_new_stream
	cbz	x0, LBB0_7
; %bb.6:
	str	w19, [x0]
	mov	w1, #64
	mov	w2, #1
	mov	w3, #16960
	movk	w3, #15, lsl #16
	bl	_avpriv_set_pts_info
	ldr	w8, [x23]
	add	w8, w8, #1
	str	w8, [x23]
	b	LBB0_9
LBB0_7:
	mov	x0, x21
	bl	_av_freep
LBB0_8:
Lloh17:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
	bl	_AVERROR
	mov	x19, x0
LBB0_9:
	mov	x0, x19
	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 AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"New streams are not supposed to be added in between Ogg context save/restore operations.\n"

	.comm	_AVERROR_BUG,4,2                ; @AVERROR_BUG
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_DECODER_BUFFER_SIZE,8,3        ; @DECODER_BUFFER_SIZE
	.comm	_AV_INPUT_BUFFER_PADDING_SIZE,8,3 ; @AV_INPUT_BUFFER_PADDING_SIZE
	.comm	_OGG_NOGRANULE_VALUE,4,2        ; @OGG_NOGRANULE_VALUE
	.no_dead_strip	_ogg_new_stream
.subsections_via_symbols
