	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function get_amv
LCPI0_0:
	.long	0                               ## 0x0
	.long	1                               ## 0x1
	.long	2                               ## 0x2
	.long	3                               ## 0x3
LCPI0_1:
	.long	4                               ## 0x4
	.long	4                               ## 0x4
	.long	4                               ## 0x4
	.long	4                               ## 0x4
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_get_amv:                               ## @get_amv
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%esi, %r9d
	movb	16(%rdi), %cl
	addb	$4, %cl
	movl	$1, %r14d
	shll	%cl, %r14d
	movq	_FF_BUG_AMV@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 24(%rdi)
	je	LBB0_2
## %bb.1:
	movb	28(%rdi), %cl
	sarl	%cl, %r14d
LBB0_2:
	movl	20(%rdi), %esi
	cmpl	$1, 32(%rdi)
	jne	LBB0_8
## %bb.3:
	cmpl	$500, (%rdi)                    ## imm = 0x1F4
	jne	LBB0_7
## %bb.4:
	cmpl	$413, 4(%rdi)                   ## imm = 0x19D
	jne	LBB0_7
## %bb.5:
	movl	%esi, %ecx
	subl	28(%rdi), %ecx
	jge	LBB0_6
LBB0_7:
	movq	40(%rdi), %rax
	movq	(%rax), %rax
	movslq	%r9d, %rcx
	movl	(%rax,%rcx,4), %eax
	movb	28(%rdi), %cl
	shll	%cl, %eax
	jmp	LBB0_11
LBB0_8:
	movq	48(%rdi), %rcx
	movslq	%r9d, %rax
	movq	(%rcx,%rax,8), %r11
	movq	8(%rdi), %rcx
	movq	40(%rdi), %r10
	movl	(%rcx), %r8d
	leal	(%rsi,%r8), %ecx
	incb	%cl
	movl	$-1, %ebx
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %ebx
	xorl	%ecx, %ecx
	testl	%eax, %eax
	cmovel	%ebx, %ecx
	cmovel	%r9d, %ebx
	addl	(%r11), %ecx
	movq	(%r10), %r9
	movl	56(%rdi), %edx
	imull	%ecx, %edx
	shll	$4, %edx
	addl	(%r9,%rax,4), %edx
	addl	4(%r11), %ebx
	movd	60(%rdi), %xmm0                 ## xmm0 = mem[0],zero,zero,zero
	pshufd	$0, %xmm0, %xmm11               ## xmm11 = xmm0[0,0,0,0]
	pslld	$4, %xmm11
	movd	%ebx, %xmm1
	pshufd	$0, %xmm1, %xmm9                ## xmm9 = xmm1[0,0,0,0]
	movd	%edx, %xmm2
	pshufd	$0, %xmm2, %xmm10               ## xmm10 = xmm2[0,0,0,0]
	movd	%r8d, %xmm5
	movd	%ecx, %xmm3
	pshufd	$0, %xmm3, %xmm3                ## xmm3 = xmm3[0,0,0,0]
	pxor	%xmm6, %xmm6
	movdqa	LCPI0_0(%rip), %xmm4            ## xmm4 = [0,1,2,3]
	movl	$16, %eax
	pmovzxdq	%xmm5, %xmm5                    ## xmm5 = xmm5[0],zero,xmm5[1],zero
	movdqa	LCPI0_1(%rip), %xmm8            ## xmm8 = [4,4,4,4]
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movdqa	%xmm4, %xmm7
	paddd	%xmm11, %xmm7
	pmulld	%xmm9, %xmm7
	paddd	%xmm10, %xmm7
	movdqa	%xmm7, %xmm1
	psrad	%xmm5, %xmm1
	paddd	%xmm3, %xmm7
	movdqa	%xmm7, %xmm2
	psrad	%xmm5, %xmm2
	paddd	%xmm6, %xmm1
	paddd	%xmm3, %xmm7
	movdqa	%xmm7, %xmm6
	psrad	%xmm5, %xmm6
	paddd	%xmm1, %xmm2
	paddd	%xmm3, %xmm7
	movdqa	%xmm7, %xmm1
	psrad	%xmm5, %xmm1
	paddd	%xmm2, %xmm6
	paddd	%xmm3, %xmm7
	movdqa	%xmm7, %xmm2
	psrad	%xmm5, %xmm2
	paddd	%xmm6, %xmm1
	paddd	%xmm3, %xmm7
	movdqa	%xmm7, %xmm6
	psrad	%xmm5, %xmm6
	paddd	%xmm1, %xmm2
	paddd	%xmm3, %xmm7
	movdqa	%xmm7, %xmm1
	psrad	%xmm5, %xmm1
	paddd	%xmm2, %xmm6
	paddd	%xmm3, %xmm7
	movdqa	%xmm7, %xmm2
	psrad	%xmm5, %xmm2
	paddd	%xmm6, %xmm1
	paddd	%xmm3, %xmm7
	movdqa	%xmm7, %xmm6
	psrad	%xmm5, %xmm6
	paddd	%xmm1, %xmm2
	paddd	%xmm3, %xmm7
	movdqa	%xmm7, %xmm1
	psrad	%xmm5, %xmm1
	paddd	%xmm2, %xmm6
	paddd	%xmm3, %xmm7
	movdqa	%xmm7, %xmm2
	psrad	%xmm5, %xmm2
	paddd	%xmm6, %xmm1
	paddd	%xmm3, %xmm7
	movdqa	%xmm7, %xmm6
	psrad	%xmm5, %xmm6
	paddd	%xmm1, %xmm2
	paddd	%xmm3, %xmm7
	movdqa	%xmm7, %xmm1
	psrad	%xmm5, %xmm1
	paddd	%xmm2, %xmm6
	paddd	%xmm3, %xmm7
	movdqa	%xmm7, %xmm2
	psrad	%xmm5, %xmm2
	paddd	%xmm6, %xmm1
	paddd	%xmm3, %xmm7
	movdqa	%xmm7, %xmm0
	psrad	%xmm5, %xmm0
	paddd	%xmm1, %xmm2
	paddd	%xmm3, %xmm7
	psrad	%xmm5, %xmm7
	paddd	%xmm2, %xmm0
	movdqa	%xmm7, %xmm6
	paddd	%xmm0, %xmm6
	paddd	%xmm8, %xmm4
	addl	$-4, %eax
	jne	LBB0_9
## %bb.10:
	pshufd	$238, %xmm6, %xmm0              ## xmm0 = xmm6[2,3,2,3]
	paddd	%xmm6, %xmm0
	pshufd	$85, %xmm0, %xmm1               ## xmm1 = xmm0[1,1,1,1]
	paddd	%xmm0, %xmm1
	movd	%xmm1, %eax
	subl	28(%rdi), %esi
	addl	$8, %esi
LBB0_11:
	movl	%eax, %edi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_RSHIFT
LBB0_12:
	movl	%r14d, %edx
	negl	%edx
	leal	-1(%r14), %ecx
	cmpl	%r14d, %eax
	cmovll	%eax, %ecx
	cmpl	%edx, %eax
	cmovll	%edx, %ecx
	movl	%ecx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_6:
	movq	40(%rdi), %rax
	movq	(%rax), %rax
	movl	$1, %esi
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %esi
	movslq	%r9d, %rcx
	movl	(%rax,%rcx,4), %eax
	cltd
	idivl	%esi
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_FF_BUG_AMV,4,2                 ## @FF_BUG_AMV
	.no_dead_strip	_get_amv
.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 get_amv
lCPI0_0:
	.long	0                               ; 0x0
	.long	1                               ; 0x1
	.long	2                               ; 0x2
	.long	3                               ; 0x3
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_get_amv:                               ; @get_amv
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x8, x1
	ldr	w9, [x0, #16]
	add	w9, w9, #4
	mov	w10, #1
	lsl	w19, w10, w9
	ldr	w9, [x0, #24]
Lloh0:
	adrp	x10, _FF_BUG_AMV@GOTPAGE
Lloh1:
	ldr	x10, [x10, _FF_BUG_AMV@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_2
; %bb.1:
	ldr	w9, [x0, #28]
	asr	w19, w19, w9
LBB0_2:
	ldr	w1, [x0, #20]
	ldr	w9, [x0, #32]
	cmp	w9, #1
	b.ne	LBB0_7
; %bb.3:
	ldr	w9, [x0]
	cmp	w9, #500
	b.ne	LBB0_6
; %bb.4:
	ldr	w9, [x0, #4]
	cmp	w9, #413
	b.ne	LBB0_6
; %bb.5:
	ldr	w9, [x0, #28]
	subs	w9, w1, w9
	b.ge	LBB0_12
LBB0_6:
	ldr	x9, [x0, #40]
	ldr	x9, [x9]
	ldr	w8, [x9, w8, sxtw #2]
	ldr	w9, [x0, #28]
	lsl	w0, w8, w9
	b	LBB0_10
LBB0_7:
	ldp	x10, x9, [x0, #40]
	ldr	x9, [x9, w8, sxtw #3]
	ldr	x11, [x0, #8]
	ldr	w11, [x11]
	add	w12, w1, w11
	add	w12, w12, #1
	mov	w13, #-1
	lsl	w12, w13, w12
	cmp	w8, #0
	csel	w13, w12, wzr, eq
	ldr	x10, [x10]
	ldr	w8, [x10, w8, sxtw #2]
	ldp	w10, w9, [x9]
	add	w10, w10, w13
	ldp	w13, w14, [x0, #56]
	mul	w13, w10, w13
	add	w8, w8, w13, lsl #4
	lsl	w13, w14, #4
	csel	w12, wzr, w12, eq
	add	w9, w9, w12
	dup.4s	v0, w13
	dup.4s	v1, w9
	dup.4s	v2, w8
	dup.4s	v5, w11
	dup.4s	v3, w10
Lloh3:
	adrp	x8, lCPI0_0@PAGE
Lloh4:
	ldr	q4, [x8, lCPI0_0@PAGEOFF]
	movi.2d	v7, #0000000000000000
	mov	w8, #16
	neg.4s	v5, v5
	movi.4s	v6, #4
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	add.4s	v16, v4, v0
	mov.16b	v17, v2
	mla.4s	v17, v16, v1
	sshl.4s	v16, v17, v5
	add.4s	v7, v16, v7
	add.4s	v16, v17, v3
	sshl.4s	v17, v16, v5
	add.4s	v7, v17, v7
	add.4s	v16, v16, v3
	sshl.4s	v17, v16, v5
	add.4s	v7, v17, v7
	add.4s	v16, v16, v3
	sshl.4s	v17, v16, v5
	add.4s	v7, v17, v7
	add.4s	v16, v16, v3
	sshl.4s	v17, v16, v5
	add.4s	v7, v17, v7
	add.4s	v16, v16, v3
	sshl.4s	v17, v16, v5
	add.4s	v7, v17, v7
	add.4s	v16, v16, v3
	sshl.4s	v17, v16, v5
	add.4s	v7, v17, v7
	add.4s	v16, v16, v3
	sshl.4s	v17, v16, v5
	add.4s	v7, v17, v7
	add.4s	v16, v16, v3
	sshl.4s	v17, v16, v5
	add.4s	v7, v17, v7
	add.4s	v16, v16, v3
	sshl.4s	v17, v16, v5
	add.4s	v7, v17, v7
	add.4s	v16, v16, v3
	sshl.4s	v17, v16, v5
	add.4s	v7, v17, v7
	add.4s	v16, v16, v3
	sshl.4s	v17, v16, v5
	add.4s	v7, v17, v7
	add.4s	v16, v16, v3
	sshl.4s	v17, v16, v5
	add.4s	v7, v17, v7
	add.4s	v16, v16, v3
	sshl.4s	v17, v16, v5
	add.4s	v7, v17, v7
	add.4s	v16, v16, v3
	sshl.4s	v17, v16, v5
	add.4s	v7, v17, v7
	add.4s	v16, v16, v3
	sshl.4s	v16, v16, v5
	add.4s	v7, v16, v7
	add.4s	v4, v4, v6
	subs	w8, w8, #4
	b.ne	LBB0_8
; %bb.9:
	addv.4s	s0, v7
	fmov	w2, s0
	ldr	w8, [x0, #28]
	sub	w8, w1, w8
	add	w1, w8, #8
	mov	x0, x2
LBB0_10:
	bl	_RSHIFT
LBB0_11:
	sub	w8, w19, #1
	cmp	w0, w19
	csel	w8, w0, w8, lt
	neg	w9, w19
	cmp	w0, w9
	csneg	w0, w8, w19, ge
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_12:
	ldr	x10, [x0, #40]
	ldr	x10, [x10]
	ldr	w8, [x10, w8, sxtw #2]
	mov	w10, #1
	lsl	w9, w10, w9
	sdiv	w0, w8, w9
	b	LBB0_11
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdr	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_FF_BUG_AMV,4,2                 ; @FF_BUG_AMV
	.no_dead_strip	_get_amv
.subsections_via_symbols
