	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function write_chunk_header
_write_chunk_header:                    ## @write_chunk_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
	movl	%ecx, %r15d
	movl	%edx, %r12d
	movq	%rsi, %r14
	movq	(%rdi), %rbx
	movq	8(%rdi), %r13
	movq	%rbx, %rdi
	callq	_avio_tell
	subq	24(%r13), %rax
	movq	%rax, 8(%r13)
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_ff_put_guid
	addl	$32, %r12d
	movq	%rbx, %rdi
	movl	%r12d, %esi
	callq	_avio_wl32
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_avio_wl32
	movl	4(%r13), %esi
	movq	%rbx, %rdi
	callq	_avio_wl64
	cmpq	_ff_index_guid@GOTPCREL(%rip), %r14
	je	LBB0_3
## %bb.1:
	testl	%r15d, %r15d
	jns	LBB0_3
## %bb.2:
	movq	16(%r13), %r12
	movslq	(%r13), %rbx
	movq	_MAX_NB_INDEX@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	cmpq	%rbx, (%rax)
	setg	%dil
	callq	_av_assert0
	movq	8(%r13), %rax
	shlq	$5, %rbx
	movq	%rax, 24(%r12,%rbx)
	movl	4(%r13), %eax
	movl	%eax, 16(%r12,%rbx)
	movq	%r14, 8(%r12,%rbx)
	andl	$1073741823, %r15d              ## imm = 0x3FFFFFFF
	movl	%r15d, (%r12,%rbx)
	incl	(%r13)
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ff_index_guid,4,2              ## @ff_index_guid
	.comm	_MAX_NB_INDEX,8,3               ## @MAX_NB_INDEX
	.no_dead_strip	_write_chunk_header
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function write_chunk_header
_write_chunk_header:                    ; @write_chunk_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
	mov	x19, x3
	mov	x21, x2
	mov	x20, x1
	ldp	x22, x23, [x0]
	mov	x0, x22
	bl	_avio_tell
	ldr	x8, [x23, #24]
	sub	x8, x0, x8
	str	x8, [x23, #8]
	mov	x0, x22
	mov	x1, x20
	bl	_ff_put_guid
	add	w1, w21, #32
	mov	x0, x22
	bl	_avio_wl32
	mov	x0, x22
	mov	x1, x19
	bl	_avio_wl32
	ldr	w1, [x23, #4]
	mov	x0, x22
	bl	_avio_wl64
Lloh0:
	adrp	x8, _ff_index_guid@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ff_index_guid@GOTPAGEOFF]
	cmp	x20, x8
	b.eq	LBB0_3
; %bb.1:
	tbz	w19, #31, LBB0_3
; %bb.2:
	ldr	x21, [x23, #16]
	ldrsw	x22, [x23]
Lloh2:
	adrp	x8, _MAX_NB_INDEX@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MAX_NB_INDEX@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	cmp	x8, x22
	cset	w0, gt
	bl	_av_assert0
	ldr	x8, [x23, #8]
	add	x9, x21, x22, lsl #5
	str	x8, [x9, #24]
	ldp	w10, w8, [x23]
	str	w8, [x9, #16]
	str	x20, [x9, #8]
	and	w8, w19, #0x3fffffff
	str	w8, [x9]
	add	w8, w10, #1
	str	w8, [x23]
LBB0_3:
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_ff_index_guid,4,2              ; @ff_index_guid
	.comm	_MAX_NB_INDEX,8,3               ; @MAX_NB_INDEX
	.no_dead_strip	_write_chunk_header
.subsections_via_symbols
