	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function microdvd_write_header
_microdvd_write_header:                 ## @microdvd_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, %rbx
	cmpl	$1, (%rdi)
	jne	LBB0_2
## %bb.1:
	movq	8(%rbx), %rax
	movq	(%rax), %rdi
	movq	8(%rdi), %r12
	movq	(%r12), %rax
	movq	_AV_CODEC_ID_MICRODVD@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.3:
	movl	(%rdi), %r14d
	movl	4(%rdi), %r15d
	cmpq	$0, 8(%r12)
	je	LBB0_6
## %bb.4:
	cmpl	$0, 16(%r12)
	jle	LBB0_6
## %bb.5:
	movl	16(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	$11, %edx
	callq	_avio_write
	movl	16(%rbx), %edi
	movq	8(%r12), %rsi
	movl	16(%r12), %edx
	callq	_avio_write
	movl	16(%rbx), %edi
	callq	_avio_flush
	movq	8(%rbx), %rax
	movq	(%rax), %rdi
LBB0_6:
	movl	$64, %esi
	movl	%r15d, %edx
	movl	%r14d, %ecx
	callq	_avpriv_set_pts_info
	xorl	%eax, %eax
	jmp	LBB0_7
LBB0_2:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%rbx, %rdi
	callq	_av_log
	movl	$-1, %eax
LBB0_7:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_CODEC_ID_MICRODVD,8,3       ## @AV_CODEC_ID_MICRODVD
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Exactly one MicroDVD stream is needed.\n"

L_.str.1:                               ## @.str.1
	.asciz	"{DEFAULT}{}"

	.no_dead_strip	_microdvd_write_header
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function microdvd_write_header
_microdvd_write_header:                 ; @microdvd_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	x19, x0
	ldr	w8, [x0]
	cmp	w8, #1
	b.ne	LBB0_6
; %bb.1:
	ldr	x8, [x19, #8]
	ldr	x0, [x8]
	ldr	x22, [x0, #8]
	ldr	x8, [x22]
Lloh0:
	adrp	x9, _AV_CODEC_ID_MICRODVD@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AV_CODEC_ID_MICRODVD@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.2:
	ldp	w20, w21, [x0]
	ldr	x8, [x22, #8]
	cbz	x8, LBB0_5
; %bb.3:
	ldr	w8, [x22, #16]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.4:
	ldr	w0, [x19, #16]
Lloh3:
	adrp	x1, l_.str.1@PAGE
Lloh4:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w2, #11
	bl	_avio_write
	ldr	w0, [x19, #16]
	ldr	x1, [x22, #8]
	ldr	w2, [x22, #16]
	bl	_avio_write
	ldr	w0, [x19, #16]
	bl	_avio_flush
	ldr	x8, [x19, #8]
	ldr	x0, [x8]
LBB0_5:
	mov	w1, #64
	mov	x2, x21
	mov	x3, x20
	bl	_avpriv_set_pts_info
	mov	w0, #0
	b	LBB0_7
LBB0_6:
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
	mov	w0, #-1
LBB0_7:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_CODEC_ID_MICRODVD,8,3       ; @AV_CODEC_ID_MICRODVD
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Exactly one MicroDVD stream is needed.\n"

l_.str.1:                               ; @.str.1
	.asciz	"{DEFAULT}{}"

	.no_dead_strip	_microdvd_write_header
.subsections_via_symbols
