	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vc1test_write_header
_vc1test_write_header:                  ## @vc1test_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
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	(%rdi), %rax
	movq	(%rax), %rax
	movq	8(%rax), %r15
	movq	(%r15), %rax
	movq	_AV_CODEC_ID_WMV3@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_1
## %bb.2:
	movq	8(%r14), %rbx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_avio_wl24
	movq	%rbx, %rdi
	movl	$197, %esi
	callq	_avio_w8
	movq	%rbx, %rdi
	movl	$4, %esi
	callq	_avio_wl32
	movl	16(%r15), %esi
	movq	%rbx, %rdi
	movl	$4, %edx
	callq	_avio_write
	movl	8(%r15), %esi
	movq	%rbx, %rdi
	callq	_avio_wl32
	movl	12(%r15), %esi
	movq	%rbx, %rdi
	callq	_avio_wl32
	movq	%rbx, %rdi
	movl	$12, %esi
	callq	_avio_wl32
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_avio_wl24
	movq	%rbx, %rdi
	movl	$128, %esi
	callq	_avio_w8
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_avio_wl32
	movq	(%r14), %rax
	movq	(%rax), %rax
	movl	(%rax), %esi
	testl	%esi, %esi
	je	LBB0_4
## %bb.3:
	cmpl	$1, 4(%rax)
	je	LBB0_5
LBB0_4:
	movl	$-1, %esi
LBB0_5:
	movq	%rbx, %rdi
	callq	_avio_wl32
	movq	(%r14), %rax
	movq	(%rax), %rdi
	movl	$32, %esi
	movl	$1, %edx
	movl	$1000, %ecx                     ## imm = 0x3E8
	callq	_avpriv_set_pts_info
	xorl	%eax, %eax
	jmp	LBB0_6
LBB0_1:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rdi
	callq	_av_log
	movl	$-1, %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_CODEC_ID_WMV3,8,3           ## @AV_CODEC_ID_WMV3
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Only WMV3 is accepted!\n"

	.no_dead_strip	_vc1test_write_header
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vc1test_write_header
_vc1test_write_header:                  ; @vc1test_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	x8, [x0]
	ldr	x8, [x8]
	ldr	x21, [x8, #8]
	ldr	x8, [x21]
Lloh0:
	adrp	x9, _AV_CODEC_ID_WMV3@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AV_CODEC_ID_WMV3@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.1:
	ldr	x20, [x19, #8]
	mov	x0, x20
	mov	w1, #0
	bl	_avio_wl24
	mov	x0, x20
	mov	w1, #197
	bl	_avio_w8
	mov	x0, x20
	mov	w1, #4
	bl	_avio_wl32
	ldr	w1, [x21, #16]
	mov	x0, x20
	mov	w2, #4
	bl	_avio_write
	ldr	w1, [x21, #8]
	mov	x0, x20
	bl	_avio_wl32
	ldr	w1, [x21, #12]
	mov	x0, x20
	bl	_avio_wl32
	mov	x0, x20
	mov	w1, #12
	bl	_avio_wl32
	mov	x0, x20
	mov	w1, #0
	bl	_avio_wl24
	mov	x0, x20
	mov	w1, #128
	bl	_avio_w8
	mov	x0, x20
	mov	w1, #0
	bl	_avio_wl32
	ldr	x8, [x19]
	ldr	x8, [x8]
	ldr	w1, [x8]
	cbz	w1, LBB0_3
; %bb.2:
	ldr	w8, [x8, #4]
	cmp	w8, #1
	b.eq	LBB0_4
LBB0_3:
	mov	w1, #-1
LBB0_4:
	mov	x0, x20
	bl	_avio_wl32
	ldr	x8, [x19]
	ldr	x0, [x8]
	mov	w1, #32
	mov	w2, #1
	mov	w3, #1000
	bl	_avpriv_set_pts_info
	mov	w0, #0
	b	LBB0_6
LBB0_5:
Lloh3:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x2, l_.str@PAGE
Lloh7:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_av_log
	mov	w0, #-1
LBB0_6:
	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	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_CODEC_ID_WMV3,8,3           ; @AV_CODEC_ID_WMV3
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Only WMV3 is accepted!\n"

	.no_dead_strip	_vc1test_write_header
.subsections_via_symbols
