	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function a64_write_header
_a64_write_header:                      ## @a64_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	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	movq	8(%rdi), %rax
	movq	(%rax), %rax
	movq	(%rax), %rax
	movl	l___const.a64_write_header.header+16(%rip), %ecx
	movl	%ecx, -48(%rbp)
	movaps	l___const.a64_write_header.header(%rip), %xmm0
	movaps	%xmm0, -64(%rbp)
	cmpl	$3, (%rax)
	jg	LBB0_3
## %bb.1:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%rbx, %rdi
	callq	_av_log
	jmp	LBB0_2
LBB0_3:
	movl	4(%rax), %ecx
	xorl	%r14d, %r14d
	cmpl	$129, %ecx
	je	LBB0_4
## %bb.5:
	cmpl	$128, %ecx
	jne	LBB0_2
## %bb.6:
	movl	$3, %r15d
	movl	$1, %ecx
	jmp	LBB0_7
LBB0_2:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	jmp	LBB0_8
LBB0_4:
	movl	$2, %r15d
	xorl	%ecx, %ecx
LBB0_7:
	movl	%ecx, -56(%rbp)
	movq	8(%rax), %rdi
	callq	_AV_RB32
	movl	%eax, -52(%rbp)
	movl	%r15d, -48(%rbp)
	movl	(%rbx), %edi
	leaq	-64(%rbp), %rsi
	movl	$2, %edx
	callq	_avio_write
LBB0_8:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-32(%rbp), %rax
	jne	LBB0_10
## %bb.9:
	movl	%r14d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	4                               ## @__const.a64_write_header.header
l___const.a64_write_header.header:
	.long	0                               ## 0x0
	.long	64                              ## 0x40
	.long	0                               ## 0x0
	.long	0                               ## 0x0
	.long	0                               ## 0x0

	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Missing extradata\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.no_dead_strip	_a64_write_header
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function a64_write_header
_a64_write_header:                      ; @a64_write_header
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	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
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	ldr	x8, [x0, #8]
	ldr	x8, [x8]
	ldr	x8, [x8]
Lloh3:
	adrp	x9, l___const.a64_write_header.header@PAGE
Lloh4:
	add	x9, x9, l___const.a64_write_header.header@PAGEOFF
	ldr	q0, [x9]
	str	q0, [sp]
	ldr	w9, [x9, #16]
	str	w9, [sp, #16]
	ldr	w9, [x8]
	cmp	w9, #3
	b.gt	LBB0_2
; %bb.1:
Lloh5:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
Lloh8:
	adrp	x2, l_.str@PAGE
Lloh9:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_av_log
	b	LBB0_5
LBB0_2:
	ldr	w9, [x8, #4]
	cmp	w9, #129
	b.eq	LBB0_6
; %bb.3:
	cmp	w9, #128
	b.ne	LBB0_5
; %bb.4:
	mov	w20, #3
	mov	w9, #1
	b	LBB0_7
LBB0_5:
Lloh10:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh11:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	b	LBB0_8
LBB0_6:
	mov	w9, #0
	mov	w20, #2
LBB0_7:
	str	w9, [sp, #8]
	ldr	x0, [x8, #8]
	bl	_AV_RB32
	stp	w0, w20, [sp, #12]
	ldr	w0, [x19]
	mov	x1, sp
	mov	w2, #2
	bl	_avio_write
	mov	w0, #0
LBB0_8:
	ldr	x8, [sp, #24]
Lloh13:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh14:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_10
; %bb.9:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_10:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
	.p2align	2                               ; @__const.a64_write_header.header
l___const.a64_write_header.header:
	.long	0                               ; 0x0
	.long	64                              ; 0x40
	.long	0                               ; 0x0
	.long	0                               ; 0x0
	.long	0                               ; 0x0

	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Missing extradata\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.no_dead_strip	_a64_write_header
.subsections_via_symbols
