	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function ff_wmv2_encode_picture_header
LCPI0_0:
	.long	0                               ## 0x0
	.long	0                               ## 0x0
	.long	0                               ## 0x0
	.long	1                               ## 0x1
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_ff_wmv2_encode_picture_header
	.p2align	4, 0x90
_ff_wmv2_encode_picture_header:         ## @ff_wmv2_encode_picture_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
	leaq	64(%rdi), %r14
	movl	(%rdi), %edx
	decl	%edx
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_put_bits
	movslq	(%rbx), %rax
	movq	_AV_PICTURE_TYPE_I@GOTPCREL(%rip), %r12
	cmpq	%rax, (%r12)
	jne	LBB0_2
## %bb.1:
	movq	%r14, %rdi
	movl	$7, %esi
	xorl	%edx, %edx
	callq	_put_bits
LBB0_2:
	movl	4(%rbx), %edx
	movq	%r14, %rdi
	movl	$5, %esi
	callq	_put_bits
	leaq	8(%rbx), %r15
	movq	$0, 16(%rbx)
	movaps	LCPI0_0(%rip), %xmm0            ## xmm0 = [0,0,0,1]
	movups	%xmm0, (%rbx)
	movl	24(%rbx), %edi
	callq	_av_assert0
	movslq	(%rbx), %rax
	cmpq	%rax, (%r12)
	jne	LBB0_8
## %bb.3:
	xorl	%edi, %edi
	cmpl	$1, 28(%rbx)
	sete	%dil
	callq	_av_assert0
	cmpq	$0, 48(%rbx)
	je	LBB0_5
## %bb.4:
	movl	(%r15), %edx
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_put_bits
LBB0_5:
	movq	16(%rbx), %rdx
	testq	%rdx, %rdx
	je	LBB0_7
## %bb.6:
	movq	%r14, %rdi
	movl	$1, %esi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_put_bits
	cmpl	$0, 16(%rbx)
	jne	LBB0_17
LBB0_7:
	movl	32(%rbx), %esi
	movq	%r14, %rdi
	callq	_ff_msmpeg4_code012
	movl	36(%rbx), %esi
	movq	%r14, %rdi
	callq	_ff_msmpeg4_code012
	jmp	LBB0_17
LBB0_8:
	movq	_SKIP_TYPE_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	$2, %esi
	callq	_put_bits
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_ff_msmpeg4_code012
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_wmv2_get_cbp_table_index
	movl	%eax, 40(%rbx)
	cmpq	$0, 32(%rbx)
	je	LBB0_10
## %bb.9:
	movl	20(%rbx), %edx
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_put_bits
LBB0_10:
	cmpq	$0, 24(%rbx)
	je	LBB0_13
## %bb.11:
	movl	(%rbx), %edx
	xorl	$1, %edx
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_put_bits
	cmpl	$0, (%rbx)
	jne	LBB0_13
## %bb.12:
	movl	4(%rbx), %esi
	movq	%r14, %rdi
	callq	_ff_msmpeg4_code012
LBB0_13:
	movq	16(%rbx), %rdx
	testq	%rdx, %rdx
	je	LBB0_15
## %bb.14:
	movq	%r14, %rdi
	movl	$1, %esi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_put_bits
	cmpl	$0, 16(%rbx)
	jne	LBB0_16
LBB0_15:
	movl	36(%rbx), %esi
	movq	%r14, %rdi
	callq	_ff_msmpeg4_code012
	movl	36(%rbx), %eax
	movl	%eax, 32(%rbx)
LBB0_16:
	leaq	12(%rbx), %r12
	movl	(%r15), %edx
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_put_bits
	movq	%r12, %r15
LBB0_17:
	movl	(%r15), %edx
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_put_bits
	movq	$0, 56(%rbx)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 40(%rbx)
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_PICTURE_TYPE_I,8,3          ## @AV_PICTURE_TYPE_I
	.comm	_SKIP_TYPE_NONE,4,2             ## @SKIP_TYPE_NONE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ; -- Begin function ff_wmv2_encode_picture_header
lCPI0_0:
	.long	0                               ; 0x0
	.long	0                               ; 0x0
	.long	0                               ; 0x0
	.long	1                               ; 0x1
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_ff_wmv2_encode_picture_header
	.p2align	2
_ff_wmv2_encode_picture_header:         ; @ff_wmv2_encode_picture_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
	add	x20, x0, #64
	ldr	w8, [x0]
	sub	w2, w8, #1
	mov	x0, x20
	mov	w1, #1
	bl	_put_bits
	ldrsw	x8, [x19]
Lloh0:
	adrp	x22, _AV_PICTURE_TYPE_I@GOTPAGE
Lloh1:
	ldr	x22, [x22, _AV_PICTURE_TYPE_I@GOTPAGEOFF]
	ldr	x9, [x22]
	cmp	x9, x8
	b.ne	LBB0_2
; %bb.1:
	mov	x0, x20
	mov	w1, #7
	mov	w2, #0
	bl	_put_bits
LBB0_2:
	ldr	w2, [x19, #4]
	mov	x0, x20
	mov	w1, #5
	bl	_put_bits
	add	x21, x19, #8
	str	xzr, [x19, #16]
Lloh2:
	adrp	x8, lCPI0_0@PAGE
Lloh3:
	ldr	q0, [x8, lCPI0_0@PAGEOFF]
	str	q0, [x19]
	ldr	w0, [x19, #24]
	bl	_av_assert0
	ldrsw	x8, [x19]
	ldr	x9, [x22]
	cmp	x9, x8
	b.ne	LBB0_8
; %bb.3:
	ldr	w8, [x19, #28]
	cmp	w8, #1
	cset	w0, eq
	bl	_av_assert0
	ldr	x8, [x19, #48]
	cbz	x8, LBB0_5
; %bb.4:
	ldr	w2, [x21]
	mov	x0, x20
	mov	w1, #1
	bl	_put_bits
LBB0_5:
	ldr	x2, [x19, #16]
	cbz	x2, LBB0_7
; %bb.6:
	mov	x0, x20
	mov	w1, #1
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_put_bits
	ldr	w8, [x19, #16]
	cbnz	w8, LBB0_17
LBB0_7:
	ldr	w1, [x19, #32]
	mov	x0, x20
	bl	_ff_msmpeg4_code012
	ldr	w1, [x19, #36]
	mov	x0, x20
	bl	_ff_msmpeg4_code012
	b	LBB0_17
LBB0_8:
Lloh4:
	adrp	x8, _SKIP_TYPE_NONE@GOTPAGE
Lloh5:
	ldr	x8, [x8, _SKIP_TYPE_NONE@GOTPAGEOFF]
Lloh6:
	ldr	w2, [x8]
	mov	x0, x20
	mov	w1, #2
	bl	_put_bits
	mov	x0, x20
	mov	w1, #0
	bl	_ff_msmpeg4_code012
	mov	x0, x19
	mov	w1, #0
	bl	_wmv2_get_cbp_table_index
	str	w0, [x19, #40]
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_10
; %bb.9:
	ldr	w2, [x19, #20]
	mov	x0, x20
	mov	w1, #1
	bl	_put_bits
LBB0_10:
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_13
; %bb.11:
	ldr	w8, [x19]
	eor	w2, w8, #0x1
	mov	x0, x20
	mov	w1, #1
	bl	_put_bits
	ldr	w8, [x19]
	cbnz	w8, LBB0_13
; %bb.12:
	ldr	w1, [x19, #4]
	mov	x0, x20
	bl	_ff_msmpeg4_code012
LBB0_13:
	add	x22, x19, #12
	ldr	x2, [x19, #16]
	cbz	x2, LBB0_15
; %bb.14:
	mov	x0, x20
	mov	w1, #1
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_put_bits
	ldr	w8, [x19, #16]
	cbnz	w8, LBB0_16
LBB0_15:
	ldr	w1, [x19, #36]
	mov	x0, x20
	bl	_ff_msmpeg4_code012
	ldr	w8, [x19, #36]
	str	w8, [x19, #32]
LBB0_16:
	ldr	w2, [x21]
	mov	x0, x20
	mov	w1, #1
	bl	_put_bits
	mov	x21, x22
LBB0_17:
	ldr	w2, [x21]
	mov	x0, x20
	mov	w1, #1
	bl	_put_bits
	stp	xzr, xzr, [x19, #48]
	str	xzr, [x19, #40]
	mov	w0, #0
	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 AdrpLdr	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_PICTURE_TYPE_I,8,3          ; @AV_PICTURE_TYPE_I
	.comm	_SKIP_TYPE_NONE,4,2             ; @SKIP_TYPE_NONE
.subsections_via_symbols
