	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_avformat_write_header          ## -- Begin function avformat_write_header
	.p2align	4, 0x90
_avformat_write_header:                 ## @avformat_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	(%rdi), %rax
	movl	4(%rax), %r14d
	cmpl	$0, (%rax)
	jne	LBB0_3
## %bb.1:
	movq	%r15, %rdi
	callq	_avformat_init_output
	testl	%eax, %eax
	js	LBB0_2
LBB0_3:
	movq	16(%r15), %rax
	movq	_AVFMT_NOFILE@GOTPCREL(%rip), %r12
	movl	(%r12), %ecx
	testl	%ecx, (%rax)
	jne	LBB0_6
## %bb.4:
	movq	8(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.5:
	movq	_AV_NOPTS_VALUE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_AVIO_DATA_MARKER_HEADER@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_avio_write_marker
	movq	16(%r15), %rax
LBB0_6:
	movq	8(%rax), %rcx
	testq	%rcx, %rcx
	je	LBB0_11
## %bb.7:
	movq	%r15, %rdi
	callq	*%rcx
	testl	%eax, %eax
	js	LBB0_16
## %bb.8:
	movq	8(%r15), %rax
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	movl	(%rax), %ebx
	testl	%ebx, %ebx
	js	LBB0_17
LBB0_10:
	movq	%r15, %rdi
	callq	_flush_if_needed
	movq	16(%r15), %rax
LBB0_11:
	movl	(%r12), %ecx
	testl	%ecx, (%rax)
	jne	LBB0_14
## %bb.12:
	movq	8(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_14
## %bb.13:
	movq	_AV_NOPTS_VALUE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_AVIO_DATA_MARKER_UNKNOWN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_avio_write_marker
LBB0_14:
	movq	(%r15), %rax
	cmpl	$0, 4(%rax)
	jne	LBB0_18
## %bb.15:
	movq	%r15, %rdi
	callq	_init_pts
	testl	%eax, %eax
	jns	LBB0_18
LBB0_16:
	movl	%eax, %ebx
LBB0_17:
	movq	%r15, %rdi
	callq	_deinit_muxer
	movl	%ebx, %r14d
	jmp	LBB0_18
LBB0_2:
	movl	%eax, %r14d
LBB0_18:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AVFMT_NOFILE,4,2               ## @AVFMT_NOFILE
	.comm	_AV_NOPTS_VALUE,4,2             ## @AV_NOPTS_VALUE
	.comm	_AVIO_DATA_MARKER_HEADER,4,2    ## @AVIO_DATA_MARKER_HEADER
	.comm	_AVIO_DATA_MARKER_UNKNOWN,4,2   ## @AVIO_DATA_MARKER_UNKNOWN
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_avformat_write_header          ; -- Begin function avformat_write_header
	.p2align	2
_avformat_write_header:                 ; @avformat_write_header
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x0
	ldr	x8, [x0]
	ldp	w9, w19, [x8]
	cbnz	w9, LBB0_2
; %bb.1:
	mov	x0, x20
	bl	_avformat_init_output
	tbnz	w0, #31, LBB0_16
LBB0_2:
	ldr	x8, [x20, #16]
	ldr	w9, [x8]
Lloh0:
	adrp	x21, _AVFMT_NOFILE@GOTPAGE
Lloh1:
	ldr	x21, [x21, _AVFMT_NOFILE@GOTPAGEOFF]
	ldr	w10, [x21]
	tst	w10, w9
	b.ne	LBB0_5
; %bb.3:
	ldr	x0, [x20, #8]
	cbz	x0, LBB0_5
; %bb.4:
Lloh2:
	adrp	x8, _AV_NOPTS_VALUE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _AV_NOPTS_VALUE@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
Lloh5:
	adrp	x8, _AVIO_DATA_MARKER_HEADER@GOTPAGE
Lloh6:
	ldr	x8, [x8, _AVIO_DATA_MARKER_HEADER@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	bl	_avio_write_marker
	ldr	x8, [x20, #16]
LBB0_5:
	ldr	x9, [x8, #8]
	cbz	x9, LBB0_10
; %bb.6:
	mov	x0, x20
	blr	x9
	tbnz	w0, #31, LBB0_15
; %bb.7:
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_9
; %bb.8:
	ldr	w8, [x8]
	tbnz	w8, #31, LBB0_17
LBB0_9:
	mov	x0, x20
	bl	_flush_if_needed
	ldr	x8, [x20, #16]
LBB0_10:
	ldr	w8, [x8]
	ldr	w9, [x21]
	tst	w9, w8
	b.ne	LBB0_13
; %bb.11:
	ldr	x0, [x20, #8]
	cbz	x0, LBB0_13
; %bb.12:
Lloh8:
	adrp	x8, _AV_NOPTS_VALUE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _AV_NOPTS_VALUE@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	adrp	x8, _AVIO_DATA_MARKER_UNKNOWN@GOTPAGE
Lloh12:
	ldr	x8, [x8, _AVIO_DATA_MARKER_UNKNOWN@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	bl	_avio_write_marker
LBB0_13:
	ldr	x8, [x20]
	ldr	w8, [x8, #4]
	cbnz	w8, LBB0_19
; %bb.14:
	mov	x0, x20
	bl	_init_pts
	tbz	w0, #31, LBB0_19
LBB0_15:
	mov	x19, x0
	b	LBB0_18
LBB0_16:
	mov	x19, x0
	b	LBB0_19
LBB0_17:
	mov	x19, x8
LBB0_18:
	mov	x0, x20
	bl	_deinit_muxer
LBB0_19:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_AVFMT_NOFILE,4,2               ; @AVFMT_NOFILE
	.comm	_AV_NOPTS_VALUE,4,2             ; @AV_NOPTS_VALUE
	.comm	_AVIO_DATA_MARKER_HEADER,4,2    ; @AVIO_DATA_MARKER_HEADER
	.comm	_AVIO_DATA_MARKER_UNKNOWN,4,2   ; @AVIO_DATA_MARKER_UNKNOWN
.subsections_via_symbols
