	.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_decode_secondary_picture_header
LCPI0_0:
	.long	15                              ## 0xf
	.long	15                              ## 0xf
	.space	4
	.space	4
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_ff_wmv2_decode_secondary_picture_header
	.p2align	4, 0x90
_ff_wmv2_decode_secondary_picture_header: ## @ff_wmv2_decode_secondary_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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	movq	_AV_PICTURE_TYPE_I@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_12
## %bb.1:
	cmpq	$0, 64(%rbx)
	je	LBB0_2
## %bb.3:
	leaq	56(%rbx), %rdi
	callq	_get_bits1
	movl	%eax, (%rbx)
	testl	%eax, %eax
	jne	LBB0_10
## %bb.4:
	cmpq	$0, 40(%rbx)
	je	LBB0_5
LBB0_6:
	leaq	56(%rbx), %rdi
	callq	_get_bits1
	movl	%eax, 8(%rbx)
	testl	%eax, %eax
	jne	LBB0_8
	jmp	LBB0_7
LBB0_12:
	movl	$0, (%rbx)
	movq	%rbx, %rdi
	callq	_parse_mb_skip
	testl	%eax, %eax
	js	LBB0_29
## %bb.13:
	leaq	56(%rbx), %r14
	movq	%r14, %rdi
	callq	_decode012
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_wmv2_get_cbp_table_index
	movl	%eax, 24(%rbx)
	cmpq	$0, 56(%rbx)
	je	LBB0_14
## %bb.15:
	movq	%r14, %rdi
	callq	_get_bits1
	jmp	LBB0_16
LBB0_2:
	movl	$0, (%rbx)
	cmpq	$0, 40(%rbx)
	jne	LBB0_6
LBB0_5:
	movl	$0, 8(%rbx)
LBB0_7:
	leaq	56(%rbx), %r14
	movq	%r14, %rdi
	callq	_decode012
	movq	%rax, 96(%rbx)
	movq	%r14, %rdi
	callq	_decode012
	movq	%rax, 104(%rbx)
LBB0_8:
	leaq	56(%rbx), %r14
	movq	%r14, %rdi
	callq	_get_bits1
	movl	%eax, 12(%rbx)
	movq	%r14, %rdi
	callq	_get_bits_left
	cltq
	shlq	$3, %rax
	movq	16(%rbx), %xmm0                 ## xmm0 = mem[0],zero
	paddd	LCPI0_0(%rip), %xmm0
	movdqa	%xmm0, %xmm1
	psrad	$31, %xmm1
	psrld	$28, %xmm1
	paddd	%xmm0, %xmm1
	psrad	$4, %xmm1
	pextrd	$1, %xmm1, %ecx
	movd	%xmm1, %edx
	imull	%edx, %ecx
	movslq	%ecx, %rcx
	cmpq	%rcx, %rax
	jl	LBB0_9
LBB0_10:
	movl	$0, 88(%rbx)
	movl	$1, 24(%rbx)
	movq	112(%rbx), %rdi
	movq	_FF_DEBUG_PICT_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rdi)
	je	LBB0_26
## %bb.11:
	movq	_AV_LOG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	28(%rbx), %ecx
	movq	96(%rbx), %r8
	movl	104(%rbx), %r9d
	movl	12(%rbx), %r10d
	movl	(%rbx), %r11d
	movl	8(%rbx), %r14d
	subq	$8, %rsp
	leaq	L_.str(%rip), %rdx
	xorl	%eax, %eax
	pushq	%r11
	pushq	%r14
	pushq	%r10
	callq	_av_log
	addq	$32, %rsp
	jmp	LBB0_26
LBB0_14:
	xorl	%eax, %eax
LBB0_16:
	movl	%eax, 32(%rbx)
	cmpq	$0, 48(%rbx)
	je	LBB0_19
## %bb.17:
	movq	%r14, %rdi
	callq	_get_bits1
	xorl	$1, %eax
	movl	%eax, 4(%rbx)
	je	LBB0_18
LBB0_19:
	cmpq	$0, 40(%rbx)
	je	LBB0_20
LBB0_21:
	movq	%r14, %rdi
	callq	_get_bits1
	movl	%eax, 8(%rbx)
	testl	%eax, %eax
	jne	LBB0_23
	jmp	LBB0_22
LBB0_18:
	movq	%r14, %rdi
	callq	_decode012
	movq	%rax, 32(%rbx)
	cmpq	$0, 40(%rbx)
	jne	LBB0_21
LBB0_20:
	movl	$0, 8(%rbx)
LBB0_22:
	movq	%r14, %rdi
	callq	_decode012
	movq	%rax, 104(%rbx)
	movq	%rax, 96(%rbx)
LBB0_23:
	movq	%r14, %rdi
	callq	_get_bits_left
	cmpl	$1, %eax
	jg	LBB0_24
LBB0_9:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_29
LBB0_24:
	movq	%r14, %rdi
	callq	_get_bits1
	movl	%eax, 12(%rbx)
	movq	%r14, %rdi
	callq	_get_bits1
	movl	%eax, %r10d
	movl	%eax, 36(%rbx)
	movl	$0, 88(%rbx)
	movl	24(%rbx), %r11d
	xorl	$1, %r11d
	movl	%r11d, 24(%rbx)
	movq	112(%rbx), %rdi
	movq	_FF_DEBUG_PICT_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rdi)
	je	LBB0_26
## %bb.25:
	movq	_AV_LOG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	104(%rbx), %ecx
	movq	96(%rbx), %r8
	movl	12(%rbx), %r9d
	movl	4(%rbx), %r14d
	movl	8(%rbx), %r15d
	movl	28(%rbx), %r12d
	movl	32(%rbx), %r13d
	leaq	L_.str.1(%rip), %rdx
	xorl	%eax, %eax
	pushq	$0
	pushq	%r11
	pushq	32(%rbx)
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%r15
	pushq	%r10
	callq	_av_log
	addq	$64, %rsp
LBB0_26:
	pxor	%xmm0, %xmm0
	movdqu	%xmm0, 72(%rbx)
	incl	64(%rbx)
	cmpl	$0, (%rbx)
	je	LBB0_27
## %bb.28:
	leaq	20(%rbx), %rdi
	leaq	60(%rbx), %rsi
	leaq	56(%rbx), %rdx
	leaq	52(%rbx), %rcx
	leaq	48(%rbx), %r8
	movl	28(%rbx), %eax
	movl	40(%rbx), %r10d
	leal	(%rax,%rax), %r9d
	decl	%eax
	orl	$1, %eax
	movl	44(%rbx), %r11d
	subq	$8, %rsp
	pushq	%r10
	pushq	%r11
	pushq	%rax
	callq	_ff_intrax8_decode_picture
	addq	$32, %rsp
	leaq	16(%rbx), %rdi
	movl	8(%rbx), %ecx
	movl	12(%rbx), %r8d
	sarl	%ecx
	decl	%ecx
	sarl	%r8d
	decl	%r8d
	movq	_ER_MB_END@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_ff_er_add_slice
	movl	$1, %eax
	jmp	LBB0_29
LBB0_27:
	xorl	%eax, %eax
LBB0_29:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_PICTURE_TYPE_I,8,3          ## @AV_PICTURE_TYPE_I
	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.comm	_FF_DEBUG_PICT_INFO,4,2         ## @FF_DEBUG_PICT_INFO
	.comm	_AV_LOG_DEBUG,4,2               ## @AV_LOG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"qscale:%d rlc:%d rl:%d dc:%d mbrl:%d j_type:%d \n"

L_.str.1:                               ## @.str.1
	.asciz	"rl:%d rlc:%d dc:%d mv:%d mbrl:%d qp:%d mspel:%d per_mb_abt:%d abt_type:%d cbp:%d ii:%d\n"

	.comm	_ER_MB_END,4,2                  ## @ER_MB_END
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_wmv2_decode_secondary_picture_header ; -- Begin function ff_wmv2_decode_secondary_picture_header
	.p2align	2
_ff_wmv2_decode_secondary_picture_header: ; @ff_wmv2_decode_secondary_picture_header
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _AV_PICTURE_TYPE_I@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AV_PICTURE_TYPE_I@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.1:
	ldr	x8, [x19, #64]
	cbz	x8, LBB0_8
; %bb.2:
	add	x0, x19, #56
	bl	_get_bits1
	str	w0, [x19]
	cbnz	w0, LBB0_12
; %bb.3:
	ldr	x8, [x19, #40]
	cbz	x8, LBB0_9
LBB0_4:
	add	x0, x19, #56
	bl	_get_bits1
	str	w0, [x19, #8]
	cbnz	w0, LBB0_11
	b	LBB0_10
LBB0_5:
	str	wzr, [x19]
	mov	x0, x19
	bl	_parse_mb_skip
	tbnz	w0, #31, LBB0_30
; %bb.6:
	add	x20, x19, #56
	mov	x0, x20
	bl	_decode012
	mov	x1, x0
	mov	x0, x19
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_wmv2_get_cbp_table_index
	str	w0, [x19, #24]
	ldr	x8, [x19, #56]
	cbz	x8, LBB0_14
; %bb.7:
	mov	x0, x20
	bl	_get_bits1
	b	LBB0_15
LBB0_8:
	str	wzr, [x19]
	ldr	x8, [x19, #40]
	cbnz	x8, LBB0_4
LBB0_9:
	str	wzr, [x19, #8]
LBB0_10:
	add	x20, x19, #56
	mov	x0, x20
	bl	_decode012
	str	x0, [x19, #96]
	mov	x0, x20
	bl	_decode012
	str	x0, [x19, #104]
LBB0_11:
	add	x20, x19, #56
	mov	x0, x20
	bl	_get_bits1
	str	w0, [x19, #12]
	mov	x0, x20
	bl	_get_bits_left
	ldp	w8, w9, [x19, #16]
	add	w10, w8, #15
	add	w8, w8, #30
	cmp	w10, #0
	csel	w8, w8, w10, lt
	asr	w8, w8, #4
	add	w10, w9, #15
	add	w9, w9, #30
	cmp	w10, #0
	csel	w9, w9, w10, lt
	asr	w9, w9, #4
	mul	w8, w9, w8
	sxtw	x8, w8
	cmp	x8, w0, sxtw #3
	b.gt	LBB0_23
LBB0_12:
	str	wzr, [x19, #88]
	mov	w8, #1
	str	w8, [x19, #24]
	ldr	x0, [x19, #112]
	ldr	w8, [x0]
Lloh3:
	adrp	x9, _FF_DEBUG_PICT_INFO@GOTPAGE
Lloh4:
	ldr	x9, [x9, _FF_DEBUG_PICT_INFO@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_27
; %bb.13:
Lloh6:
	adrp	x8, _AV_LOG_DEBUG@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AV_LOG_DEBUG@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	ldr	w3, [x19, #28]
	ldr	x4, [x19, #96]
	ldr	w5, [x19, #104]
	ldp	w7, w6, [x19, #8]
	ldr	w8, [x19]
	str	w8, [sp]
Lloh9:
	adrp	x2, l_.str@PAGE
Lloh10:
	add	x2, x2, l_.str@PAGEOFF
	b	LBB0_26
LBB0_14:
	mov	w0, #0
LBB0_15:
	str	w0, [x19, #32]
	ldr	x8, [x19, #48]
	cbz	x8, LBB0_17
; %bb.16:
	mov	x0, x20
	bl	_get_bits1
	eor	w8, w0, #0x1
	str	w8, [x19, #4]
	cbz	w8, LBB0_19
LBB0_17:
	ldr	x8, [x19, #40]
	cbz	x8, LBB0_20
LBB0_18:
	mov	x0, x20
	bl	_get_bits1
	str	w0, [x19, #8]
	cbnz	w0, LBB0_22
	b	LBB0_21
LBB0_19:
	mov	x0, x20
	bl	_decode012
	str	x0, [x19, #32]
	ldr	x8, [x19, #40]
	cbnz	x8, LBB0_18
LBB0_20:
	str	wzr, [x19, #8]
LBB0_21:
	mov	x0, x20
	bl	_decode012
	stp	x0, x0, [x19, #96]
LBB0_22:
	mov	x0, x20
	bl	_get_bits_left
	cmp	w0, #1
	b.gt	LBB0_24
LBB0_23:
Lloh11:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh12:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	b	LBB0_30
LBB0_24:
	mov	x0, x20
	bl	_get_bits1
	str	w0, [x19, #12]
	mov	x0, x20
	bl	_get_bits1
	mov	x6, x0
	str	w0, [x19, #36]
	str	wzr, [x19, #88]
	ldr	w8, [x19, #24]
	eor	w8, w8, #0x1
	str	w8, [x19, #24]
	ldr	x0, [x19, #112]
	ldr	w9, [x0]
Lloh14:
	adrp	x10, _FF_DEBUG_PICT_INFO@GOTPAGE
Lloh15:
	ldr	x10, [x10, _FF_DEBUG_PICT_INFO@GOTPAGEOFF]
Lloh16:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_27
; %bb.25:
Lloh17:
	adrp	x9, _AV_LOG_DEBUG@GOTPAGE
Lloh18:
	ldr	x9, [x9, _AV_LOG_DEBUG@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x9]
	ldr	w3, [x19, #104]
	ldr	x4, [x19, #96]
	ldp	w7, w5, [x19, #8]
	ldp	w9, w11, [x19, #28]
	ldr	x10, [x19, #32]
	ldr	w12, [x19, #4]
	stp	x8, xzr, [sp, #32]
Lloh20:
	adrp	x2, l_.str.1@PAGE
Lloh21:
	add	x2, x2, l_.str.1@PAGEOFF
	stp	x12, x10, [sp, #16]
	str	x11, [sp, #8]
	str	w9, [sp]
LBB0_26:
	bl	_av_log
LBB0_27:
	stp	xzr, xzr, [x19, #72]
	ldr	w8, [x19, #64]
	add	w8, w8, #1
	str	w8, [x19, #64]
	ldr	w8, [x19]
	cbz	w8, LBB0_29
; %bb.28:
	add	x0, x19, #20
	add	x1, x19, #60
	add	x2, x19, #56
	add	x3, x19, #52
	add	x4, x19, #48
	ldr	w8, [x19, #28]
	lsl	w5, w8, #1
	sub	w8, w8, #1
	orr	w6, w8, #0x1
	ldp	w8, w7, [x19, #40]
	str	w8, [sp]
	bl	_ff_intrax8_decode_picture
	add	x0, x19, #16
	ldp	w8, w9, [x19, #8]
	asr	w8, w8, #1
	sub	w3, w8, #1
	asr	w8, w9, #1
	sub	w4, w8, #1
Lloh22:
	adrp	x8, _ER_MB_END@GOTPAGE
Lloh23:
	ldr	x8, [x8, _ER_MB_END@GOTPAGEOFF]
Lloh24:
	ldr	w5, [x8]
	mov	w1, #0
	mov	w2, #0
	bl	_ff_er_add_slice
	mov	w0, #1
	b	LBB0_30
LBB0_29:
	mov	w0, #0
LBB0_30:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_PICTURE_TYPE_I,8,3          ; @AV_PICTURE_TYPE_I
	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.comm	_FF_DEBUG_PICT_INFO,4,2         ; @FF_DEBUG_PICT_INFO
	.comm	_AV_LOG_DEBUG,4,2               ; @AV_LOG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"qscale:%d rlc:%d rl:%d dc:%d mbrl:%d j_type:%d \n"

l_.str.1:                               ; @.str.1
	.asciz	"rl:%d rlc:%d dc:%d mv:%d mbrl:%d qp:%d mspel:%d per_mb_abt:%d abt_type:%d cbp:%d ii:%d\n"

	.comm	_ER_MB_END,4,2                  ; @ER_MB_END
.subsections_via_symbols
