	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ogg_write_vorbiscomment
_ogg_write_vorbiscomment:               ## @ogg_write_vorbiscomment
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %rbx
                                        ## kill: def $r8d killed $r8d def $r8
	movq	%r8, -56(%rbp)                  ## 8-byte Spill
	movq	%rcx, %r13
	movq	%rdx, -80(%rbp)                 ## 8-byte Spill
                                        ## kill: def $edi killed $edi def $rdi
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movl	16(%rbp), %r12d
	testl	%esi, %esi
	jne	LBB0_1
## %bb.2:
	movq	_LIBAVFORMAT_IDENT@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	jmp	LBB0_3
LBB0_1:
	leaq	L_.str(%rip), %r15
LBB0_3:
	movq	_ff_vorbiscomment_metadata_conv@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%r14d, %r14d
	movq	%r13, %rdi
	xorl	%edx, %edx
	callq	_ff_metadata_conv
	movq	(%r13), %rdi
	movq	%r15, %rsi
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdx
	movl	%r12d, %ebx
	movl	%r12d, %ecx
	callq	_ff_vorbiscomment_length
	movl	%eax, %r12d
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	addl	%ecx, %eax
	addl	%eax, %r12d
	movq	_INT_MAX@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r12d
	jg	LBB0_9
## %bb.4:
	movl	%r12d, %edi
	callq	_av_mallocz
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movq	%rax, %r14
	movslq	-48(%rbp), %rax                 ## 4-byte Folded Reload
	leaq	(%r14,%rax,4), %rax
	movq	%rax, -64(%rbp)
	leaq	-64(%rbp), %rdi
	movq	%r13, %rsi
	movq	%r15, %rdx
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movl	%ebx, %r8d
	callq	_ff_vorbiscomment_write
	cmpl	$0, -56(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_8
## %bb.7:
	leaq	-64(%rbp), %rdi
	movl	$1, %esi
	callq	_bytestream_put_byte
LBB0_8:
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movl	%r12d, (%rax)
	jmp	LBB0_9
LBB0_5:
	xorl	%r14d, %r14d
LBB0_9:
	movq	%r14, %rax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ffmpeg"

	.comm	_LIBAVFORMAT_IDENT,8,3          ## @LIBAVFORMAT_IDENT
	.comm	_ff_vorbiscomment_metadata_conv,4,2 ## @ff_vorbiscomment_metadata_conv
	.comm	_INT_MAX,4,2                    ## @INT_MAX
	.no_dead_strip	_ogg_write_vorbiscomment
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ogg_write_vorbiscomment
_ogg_write_vorbiscomment:               ; @ogg_write_vorbiscomment
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	mov	x21, x6
	mov	x22, x5
	mov	x20, x4
	mov	x23, x3
	mov	x19, x2
	mov	x25, x0
Lloh0:
	adrp	x8, _LIBAVFORMAT_IDENT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LIBAVFORMAT_IDENT@GOTPAGEOFF]
Lloh2:
	adrp	x9, l_.str@PAGE
Lloh3:
	add	x9, x9, l_.str@PAGEOFF
Lloh4:
	ldr	x8, [x8]
	cmp	w1, #0
	csel	x24, x8, x9, eq
Lloh5:
	adrp	x8, _ff_vorbiscomment_metadata_conv@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ff_vorbiscomment_metadata_conv@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x3
	mov	x2, #0
	bl	_ff_metadata_conv
	ldr	x0, [x23]
	mov	x1, x24
	mov	x2, x22
	mov	x3, x21
	bl	_ff_vorbiscomment_length
	mov	x26, #0
	add	w8, w20, w25
	add	w27, w8, w0
Lloh8:
	adrp	x8, _INT_MAX@GOTPAGE
Lloh9:
	ldr	x8, [x8, _INT_MAX@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	cmp	w27, w8
	b.gt	LBB0_5
; %bb.1:
	mov	x0, x27
	bl	_av_mallocz
	mov	x26, x0
	cbz	x0, LBB0_5
; %bb.2:
	add	x8, x26, w25, sxtw #2
	str	x8, [sp, #8]
	add	x0, sp, #8
	mov	x1, x23
	mov	x2, x24
	mov	x3, x22
	mov	x4, x21
	bl	_ff_vorbiscomment_write
	cbz	w20, LBB0_4
; %bb.3:
	add	x0, sp, #8
	mov	w1, #1
	bl	_bytestream_put_byte
LBB0_4:
	str	w27, [x19]
LBB0_5:
	mov	x0, x26
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ffmpeg"

	.comm	_LIBAVFORMAT_IDENT,8,3          ; @LIBAVFORMAT_IDENT
	.comm	_ff_vorbiscomment_metadata_conv,4,2 ; @ff_vorbiscomment_metadata_conv
	.comm	_INT_MAX,4,2                    ; @INT_MAX
	.no_dead_strip	_ogg_write_vorbiscomment
.subsections_via_symbols
