	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function get_diff_limited_q
LCPI0_0:
	.quad	0x3ff0000000000000              ## double 1
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_get_diff_limited_q:                    ## @get_diff_limited_q
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	(%rdi), %r15
	movq	8(%rdi), %rdx
	movslq	(%rsi), %rbx
	movq	16(%rdi), %rcx
	movsd	(%rdx,%rcx,8), %xmm2            ## xmm2 = mem[0],zero
	movq	_AV_PICTURE_TYPE_I@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	cmpl	%eax, %ebx
	jne	LBB0_4
## %bb.1:
	movq	_AV_PICTURE_TYPE_P@GOTPCREL(%rip), %rsi
	movq	(%rsi), %rsi
	movsd	(%rdx,%rsi,8), %xmm4            ## xmm4 = mem[0],zero
	movsd	(%r15), %xmm1                   ## xmm1 = mem[0],zero
	xorpd	%xmm3, %xmm3
	ucomisd	%xmm3, %xmm1
	ja	LBB0_3
## %bb.2:
	cmpq	%rsi, %rcx
	je	LBB0_3
LBB0_4:
	movq	_AV_PICTURE_TYPE_B@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ebx
	jne	LBB0_7
## %bb.5:
	movsd	16(%r15), %xmm1                 ## xmm1 = mem[0],zero
	xorpd	%xmm3, %xmm3
	ucomisd	%xmm3, %xmm1
	jbe	LBB0_7
## %bb.6:
	mulsd	%xmm1, %xmm2
	addsd	24(%r15), %xmm2
	movapd	%xmm2, %xmm0
	jmp	LBB0_7
LBB0_3:
	movapd	%xmm1, %xmm0
	movsd	%xmm4, -40(%rbp)                ## 8-byte Spill
	callq	_FFABS
	movsd	-40(%rbp), %xmm1                ## 8-byte Reload
                                        ## xmm1 = mem[0],zero
	mulsd	%xmm0, %xmm1
	addsd	8(%r15), %xmm1
	movapd	%xmm1, %xmm0
	movq	16(%r14), %rcx
	movl	(%r12), %eax
LBB0_7:
	movsd	LCPI0_0(%rip), %xmm1            ## xmm1 = mem[0],zero
	maxsd	%xmm0, %xmm1
	movq	8(%r14), %rdx
	cmpq	%rbx, %rcx
	je	LBB0_10
## %bb.8:
	cmpl	%eax, %ebx
	jne	LBB0_10
## %bb.9:
	movapd	%xmm1, %xmm0
	jmp	LBB0_13
LBB0_10:
	movq	_FF_QP2LAMBDA@GOTPCREL(%rip), %rax
	movl	32(%r15), %ecx
	imull	(%rax), %ecx
	xorps	%xmm3, %xmm3
	cvtsi2sd	%ecx, %xmm3
	movsd	(%rdx,%rbx,8), %xmm2            ## xmm2 = mem[0],zero
	movapd	%xmm2, %xmm0
	addsd	%xmm3, %xmm0
	ucomisd	%xmm0, %xmm1
	ja	LBB0_13
## %bb.11:
	subsd	%xmm3, %xmm2
	ucomisd	%xmm1, %xmm2
	movapd	%xmm1, %xmm0
	jbe	LBB0_13
## %bb.12:
	movapd	%xmm2, %xmm0
LBB0_13:
	movsd	%xmm0, (%rdx,%rbx,8)
	movq	_AV_PICTURE_TYPE_B@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	je	LBB0_15
## %bb.14:
	movq	%rbx, 16(%r14)
LBB0_15:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_PICTURE_TYPE_P,8,3          ## @AV_PICTURE_TYPE_P
	.comm	_AV_PICTURE_TYPE_I,4,2          ## @AV_PICTURE_TYPE_I
	.comm	_AV_PICTURE_TYPE_B,4,2          ## @AV_PICTURE_TYPE_B
	.comm	_FF_QP2LAMBDA,4,2               ## @FF_QP2LAMBDA
	.no_dead_strip	_get_diff_limited_q
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function get_diff_limited_q
_get_diff_limited_q:                    ; @get_diff_limited_q
	.cfi_startproc
; %bb.0:
	stp	d9, d8, [sp, #-80]!             ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset b8, -72
	.cfi_offset b9, -80
	mov	x19, x0
	ldrsw	x20, [x1]
	ldp	x22, x10, [x0]
	ldr	x9, [x0, #16]
	ldr	d2, [x10, x9, lsl #3]
Lloh0:
	adrp	x23, _AV_PICTURE_TYPE_I@GOTPAGE
Lloh1:
	ldr	x23, [x23, _AV_PICTURE_TYPE_I@GOTPAGEOFF]
	ldr	w8, [x23]
Lloh2:
	adrp	x21, _AV_PICTURE_TYPE_B@GOTPAGE
Lloh3:
	ldr	x21, [x21, _AV_PICTURE_TYPE_B@GOTPAGEOFF]
	cmp	w20, w8
	b.ne	LBB0_3
; %bb.1:
Lloh4:
	adrp	x11, _AV_PICTURE_TYPE_P@GOTPAGE
Lloh5:
	ldr	x11, [x11, _AV_PICTURE_TYPE_P@GOTPAGEOFF]
Lloh6:
	ldr	x11, [x11]
	ldr	d1, [x22]
	fcmp	d1, #0.0
	ccmp	x9, x11, #4, le
	b.ne	LBB0_3
; %bb.2:
	ldr	d8, [x10, x11, lsl #3]
	fmov	d0, d1
	bl	_FFABS
	ldr	d1, [x22, #8]
	fmadd	d0, d8, d0, d1
	ldr	x9, [x19, #16]
	ldr	w8, [x23]
	b	LBB0_6
LBB0_3:
	ldr	w10, [x21]
	cmp	w20, w10
	b.ne	LBB0_6
; %bb.4:
	ldr	d1, [x22, #16]
	fcmp	d1, #0.0
	b.le	LBB0_6
; %bb.5:
	ldr	d0, [x22, #24]
	fmadd	d0, d2, d1, d0
LBB0_6:
	fmov	d1, #1.00000000
	fmax	d1, d0, d1
	ldr	x10, [x19, #8]
	cmp	x9, x20
	b.eq	LBB0_9
; %bb.7:
	cmp	w20, w8
	b.ne	LBB0_9
; %bb.8:
	fmov	d0, d1
	b	LBB0_12
LBB0_9:
	ldr	d2, [x10, x20, lsl #3]
Lloh7:
	adrp	x8, _FF_QP2LAMBDA@GOTPAGE
Lloh8:
	ldr	x8, [x8, _FF_QP2LAMBDA@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	ldr	w9, [x22, #32]
	mul	w8, w9, w8
	scvtf	d3, w8
	fadd	d0, d2, d3
	fcmp	d1, d0
	b.gt	LBB0_12
; %bb.10:
	fsub	d2, d2, d3
	fcmp	d1, d2
	fmov	d0, d1
	b.pl	LBB0_12
; %bb.11:
	fmov	d0, d2
LBB0_12:
	str	d0, [x10, x20, lsl #3]
	ldr	w8, [x21]
	cmp	w20, w8
	b.eq	LBB0_14
; %bb.13:
	str	x20, [x19, #16]
LBB0_14:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp], #80               ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_PICTURE_TYPE_P,8,3          ; @AV_PICTURE_TYPE_P
	.comm	_AV_PICTURE_TYPE_I,4,2          ; @AV_PICTURE_TYPE_I
	.comm	_AV_PICTURE_TYPE_B,4,2          ; @AV_PICTURE_TYPE_B
	.comm	_FF_QP2LAMBDA,4,2               ; @FF_QP2LAMBDA
	.no_dead_strip	_get_diff_limited_q
.subsections_via_symbols
