	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function webm_chunk_write_header
_webm_chunk_write_header:               ## @webm_chunk_write_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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	movq	%rsp, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	48(%rdi), %r15
	movq	$0, -56(%rbp)
	movq	_MAX_FILENAME_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r12
	cmpl	$1, (%r13)
	jne	LBB0_13
## %bb.1:
	movl	24(%r15), %eax
	movl	%eax, 28(%r15)
	movl	40(%r13), %esi
	leaq	L_.str(%rip), %rdi
	leaq	L_.str.1(%rip), %rdx
	callq	_av_guess_format
	movl	%eax, 20(%r15)
	testl	%eax, %eax
	je	LBB0_14
## %bb.2:
	movq	_AV_NOPTS_VALUE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r15)
	movq	%r13, %rdi
	callq	_chunk_mux_init
	testl	%eax, %eax
	js	LBB0_15
## %bb.3:
	movq	8(%r15), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	%r13, %rdi
	movl	$1, %esi
	movq	%r12, %rdx
	callq	_get_chunk_filename
	testl	%eax, %eax
	js	LBB0_15
## %bb.4:
	movq	%r12, %rdi
	callq	_av_strdup
	testq	%rax, %rax
	je	LBB0_17
## %bb.5:
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_ff_format_set_url
	movq	(%r15), %rdx
	testq	%rdx, %rdx
	je	LBB0_7
## %bb.6:
	leaq	L_.str.2(%rip), %rsi
	leaq	-56(%rbp), %rdi
	xorl	%ecx, %ecx
	callq	_av_dict_set
LBB0_7:
	leaq	24(%r14), %rsi
	movl	40(%r14), %edx
	movq	_AVIO_FLAG_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-56(%rbp), %r12
	movq	%r13, %rdi
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	movq	%r12, %r8
	callq	*8(%r13)
	movq	%r14, %r15
	movl	%eax, %r14d
	movq	%r12, %rdi
	callq	_av_dict_free
	testl	%r14d, %r14d
	js	LBB0_20
## %bb.8:
	movq	24(%r15), %rax
	movq	$0, (%rax)
	movq	32(%r15), %rax
	movq	%r15, %rdi
	callq	*(%rax)
	testl	%eax, %eax
	js	LBB0_15
## %bb.9:
	movq	%r13, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	callq	_ff_format_io_close
	cmpl	$0, (%r13)
	jle	LBB0_19
## %bb.10:
	movq	%rbx, %r15
	xorl	%r14d, %r14d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movq	16(%r13), %rax
	movl	(%rax,%rbx,4), %edi
	movl	$64, %esi
	movl	$1, %edx
	movl	$1000, %ecx                     ## imm = 0x3E8
	callq	_avpriv_set_pts_info
	incq	%rbx
	movslq	(%r13), %rax
	cmpq	%rax, %rbx
	jl	LBB0_11
## %bb.12:
	movq	%r15, %rbx
	jmp	LBB0_20
LBB0_13:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	jmp	LBB0_20
LBB0_14:
	movq	_AVERROR_MUXER_NOT_FOUND@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	jmp	LBB0_20
LBB0_17:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
LBB0_15:
	movl	%eax, %r14d
LBB0_20:
	movq	%rbx, %rsp
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_22
## %bb.21:
	movl	%r14d, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_19:
	xorl	%r14d, %r14d
	jmp	LBB0_20
LBB0_22:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_FILENAME_SIZE,4,2          ## @MAX_FILENAME_SIZE
	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"webm"

L_.str.1:                               ## @.str.1
	.asciz	"video/webm"

	.comm	_AVERROR_MUXER_NOT_FOUND,4,2    ## @AVERROR_MUXER_NOT_FOUND
	.comm	_AV_NOPTS_VALUE,4,2             ## @AV_NOPTS_VALUE
	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.2:                               ## @.str.2
	.asciz	"method"

	.comm	_AVIO_FLAG_WRITE,4,2            ## @AVIO_FLAG_WRITE
	.no_dead_strip	_webm_chunk_write_header
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function webm_chunk_write_header
_webm_chunk_write_header:               ; @webm_chunk_write_header
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	sub	sp, sp, #16
	mov	x19, x0
	mov	x23, sp
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
	ldr	x24, [x0, #48]
	stur	xzr, [x29, #-64]
Lloh3:
	adrp	x8, _MAX_FILENAME_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAX_FILENAME_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x1fffffff0
	sub	x22, x9, x8
	mov	sp, x22
	ldr	w8, [x0]
	cmp	w8, #1
	b.ne	LBB0_12
; %bb.1:
	ldr	w8, [x24, #24]
	str	w8, [x24, #28]
	ldr	w1, [x19, #40]
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
Lloh10:
	adrp	x2, l_.str.1@PAGE
Lloh11:
	add	x2, x2, l_.str.1@PAGEOFF
	bl	_av_guess_format
	str	w0, [x24, #20]
	cbz	w0, LBB0_13
; %bb.2:
Lloh12:
	adrp	x8, _AV_NOPTS_VALUE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _AV_NOPTS_VALUE@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	str	w8, [x24, #16]
	mov	x0, x19
	bl	_chunk_mux_init
	tbnz	w0, #31, LBB0_15
; %bb.3:
	ldr	x20, [x24, #8]
	mov	x0, x19
	mov	w1, #1
	mov	x2, x22
	bl	_get_chunk_filename
	tbnz	w0, #31, LBB0_15
; %bb.4:
	mov	x0, x22
	bl	_av_strdup
	cbz	x0, LBB0_14
; %bb.5:
	mov	x1, x0
	mov	x0, x20
	bl	_ff_format_set_url
	ldr	x2, [x24]
	cbz	x2, LBB0_7
; %bb.6:
Lloh15:
	adrp	x1, l_.str.2@PAGE
Lloh16:
	add	x1, x1, l_.str.2@PAGEOFF
	sub	x0, x29, #64
	mov	w3, #0
	bl	_av_dict_set
LBB0_7:
	ldr	x8, [x19, #8]
	add	x22, x20, #24
	ldr	w2, [x20, #40]
Lloh17:
	adrp	x9, _AVIO_FLAG_WRITE@GOTPAGE
Lloh18:
	ldr	x9, [x9, _AVIO_FLAG_WRITE@GOTPAGEOFF]
Lloh19:
	ldr	w3, [x9]
	sub	x4, x29, #64
	mov	x0, x19
	mov	x1, x22
	blr	x8
	mov	x21, x0
	sub	x0, x29, #64
	bl	_av_dict_free
	tbnz	w21, #31, LBB0_16
; %bb.8:
	ldr	x8, [x20, #24]
	str	xzr, [x8]
	ldr	x8, [x20, #32]
	ldr	x8, [x8]
	mov	x0, x20
	blr	x8
	tbnz	w0, #31, LBB0_15
; %bb.9:
	mov	x0, x19
	mov	x1, x22
	bl	_ff_format_io_close
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_18
; %bb.10:
	mov	x20, #0
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #16]
	ldr	w0, [x8, x20, lsl #2]
	mov	w1, #64
	mov	w2, #1
	mov	w3, #1000
	bl	_avpriv_set_pts_info
	mov	w21, #0
	add	x20, x20, #1
	ldrsw	x8, [x19]
	cmp	x20, x8
	b.lt	LBB0_11
	b	LBB0_16
LBB0_12:
Lloh20:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh21:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh22:
	ldr	w21, [x8]
	b	LBB0_16
LBB0_13:
Lloh23:
	adrp	x8, _AVERROR_MUXER_NOT_FOUND@GOTPAGE
Lloh24:
	ldr	x8, [x8, _AVERROR_MUXER_NOT_FOUND@GOTPAGEOFF]
Lloh25:
	ldr	w21, [x8]
	b	LBB0_16
LBB0_14:
Lloh26:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh27:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh28:
	ldr	w0, [x8]
	bl	_AVERROR
LBB0_15:
	mov	x21, x0
LBB0_16:
	mov	sp, x23
	ldur	x8, [x29, #-56]
Lloh29:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh30:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh31:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_19
; %bb.17:
	mov	x0, x21
	sub	sp, x29, #48
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_18:
	mov	w21, #0
	b	LBB0_16
LBB0_19:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_FILENAME_SIZE,4,2          ; @MAX_FILENAME_SIZE
	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"webm"

l_.str.1:                               ; @.str.1
	.asciz	"video/webm"

	.comm	_AVERROR_MUXER_NOT_FOUND,4,2    ; @AVERROR_MUXER_NOT_FOUND
	.comm	_AV_NOPTS_VALUE,4,2             ; @AV_NOPTS_VALUE
	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.2:                               ; @.str.2
	.asciz	"method"

	.comm	_AVIO_FLAG_WRITE,4,2            ; @AVIO_FLAG_WRITE
	.no_dead_strip	_webm_chunk_write_header
.subsections_via_symbols
