	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function ready_residue
LCPI0_0:
	.quad	0x3fe999999999999a              ## double 0.80000000000000004
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_ready_residue:                         ## @ready_residue
	.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	%rsi, -48(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r15
	xorl	%edi, %edi
	cmpl	$2, (%r15)
	sete	%dil
	callq	_av_assert0
	movl	16(%r15), %edi
	movl	$8, %esi
	callq	_av_mallocz_array
	movq	%rax, 8(%r15)
	testq	%rax, %rax
	je	LBB0_29
## %bb.1:
	cmpl	$0, 16(%r15)
	jle	LBB0_28
## %bb.2:
	xorl	%r12d, %r12d
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_23:                                ##   in Loop: Header=BB0_3 Depth=1
	incq	%r12
	movslq	16(%r15), %rax
	cmpq	%rax, %r12
	jge	LBB0_5
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_17 Depth 2
	movq	24(%r15), %rax
	movq	(%rax,%r12,8), %rax
	cmpl	$-1, (%rax)
	je	LBB0_8
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	xorl	%ecx, %ecx
	jmp	LBB0_15
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	$1, %ecx
	cmpl	$-1, 4(%rax)
	jne	LBB0_15
## %bb.9:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	$2, %ecx
	cmpl	$-1, 8(%rax)
	jne	LBB0_15
## %bb.10:                              ##   in Loop: Header=BB0_3 Depth=1
	movl	$3, %ecx
	cmpl	$-1, 12(%rax)
	jne	LBB0_15
## %bb.11:                              ##   in Loop: Header=BB0_3 Depth=1
	movl	$4, %ecx
	cmpl	$-1, 16(%rax)
	jne	LBB0_15
## %bb.12:                              ##   in Loop: Header=BB0_3 Depth=1
	movl	$5, %ecx
	cmpl	$-1, 20(%rax)
	jne	LBB0_15
## %bb.13:                              ##   in Loop: Header=BB0_3 Depth=1
	movl	$6, %ecx
	cmpl	$-1, 24(%rax)
	jne	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_3 Depth=1
	movl	$7, %ecx
	cmpl	$-1, 28(%rax)
	je	LBB0_23
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movq	(%rdx), %r14
	movslq	(%rax,%rcx,4), %rbx
	shlq	$5, %rbx
	xorl	%edi, %edi
	cmpl	$2, (%r14,%rbx)
	setge	%dil
	callq	_assert
	movl	4(%r14,%rbx), %edi
	callq	_assert
	cmpl	$0, 8(%r14,%rbx)
	jle	LBB0_23
## %bb.16:                              ##   in Loop: Header=BB0_3 Depth=1
	leaq	(%r14,%rbx), %r13
	addq	%r14, %rbx
	addq	$8, %rbx
	xorl	%r14d, %r14d
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_22:                                ##   in Loop: Header=BB0_17 Depth=2
	incq	%r14
	movslq	(%rbx), %rax
	cmpq	%rax, %r14
	jge	LBB0_23
LBB0_17:                                ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	16(%rbx), %rax
	cmpl	$0, (%rax,%r14,4)
	je	LBB0_22
## %bb.18:                              ##   in Loop: Header=BB0_17 Depth=2
	movq	8(%rbx), %rax
	movslq	(%r13), %rcx
	movslq	%r14d, %rdx
	imulq	%rcx, %rdx
	movl	(%rax,%rdx,4), %edi
	callq	_fabs
	movq	8(%r15), %rax
	movq	(%rax,%r12,8), %rax
	ucomiss	(%rax), %xmm0
	jbe	LBB0_20
## %bb.19:                              ##   in Loop: Header=BB0_17 Depth=2
	movss	%xmm0, (%rax)
LBB0_20:                                ##   in Loop: Header=BB0_17 Depth=2
	movq	8(%rbx), %rax
	movslq	(%r13), %rcx
	movslq	%r14d, %rdx
	imulq	%rcx, %rdx
	movl	4(%rax,%rdx,4), %edi
	callq	_fabs
	movq	8(%r15), %rax
	movq	(%rax,%r12,8), %rax
	ucomiss	4(%rax), %xmm0
	jbe	LBB0_22
## %bb.21:                              ##   in Loop: Header=BB0_17 Depth=2
	movss	%xmm0, 4(%rax)
	jmp	LBB0_22
LBB0_5:
	movl	%eax, %eax
	testl	%eax, %eax
	jle	LBB0_28
## %bb.6:
	movq	8(%r15), %rcx
	cmpl	$1, %eax
	jne	LBB0_24
## %bb.7:
	xorl	%edx, %edx
	jmp	LBB0_26
LBB0_29:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
LBB0_24:
	movl	%eax, %esi
	andl	$-2, %esi
	xorl	%edx, %edx
	movsd	LCPI0_0(%rip), %xmm0            ## xmm0 = mem[0],zero
	.p2align	4, 0x90
LBB0_25:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rcx,%rdx,8), %rdi
	movss	(%rdi), %xmm1                   ## xmm1 = mem[0],zero,zero,zero
	movss	4(%rdi), %xmm2                  ## xmm2 = mem[0],zero,zero,zero
	cvtss2sd	%xmm1, %xmm1
	addsd	%xmm0, %xmm1
	cvtsd2ss	%xmm1, %xmm1
	movss	%xmm1, (%rdi)
	xorps	%xmm1, %xmm1
	cvtss2sd	%xmm2, %xmm1
	addsd	%xmm0, %xmm1
	cvtsd2ss	%xmm1, %xmm1
	movss	%xmm1, 4(%rdi)
	movq	8(%rcx,%rdx,8), %rdi
	movss	(%rdi), %xmm1                   ## xmm1 = mem[0],zero,zero,zero
	movss	4(%rdi), %xmm2                  ## xmm2 = mem[0],zero,zero,zero
	cvtss2sd	%xmm1, %xmm1
	addsd	%xmm0, %xmm1
	cvtsd2ss	%xmm1, %xmm1
	cvtss2sd	%xmm2, %xmm2
	addsd	%xmm0, %xmm2
	cvtsd2ss	%xmm2, %xmm2
	movss	%xmm1, (%rdi)
	movss	%xmm2, 4(%rdi)
	addq	$2, %rdx
	cmpq	%rdx, %rsi
	jne	LBB0_25
LBB0_26:
	testb	$1, %al
	je	LBB0_28
## %bb.27:
	movq	(%rcx,%rdx,8), %rax
	movss	(%rax), %xmm0                   ## xmm0 = mem[0],zero,zero,zero
	movss	4(%rax), %xmm1                  ## xmm1 = mem[0],zero,zero,zero
	cvtss2sd	%xmm0, %xmm0
	movsd	LCPI0_0(%rip), %xmm2            ## xmm2 = mem[0],zero
	addsd	%xmm2, %xmm0
	cvtsd2ss	%xmm0, %xmm0
	movss	%xmm0, (%rax)
	xorps	%xmm0, %xmm0
	cvtss2sd	%xmm1, %xmm0
	addsd	%xmm2, %xmm0
	cvtsd2ss	%xmm0, %xmm0
	movss	%xmm0, 4(%rax)
LBB0_28:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_ready_residue
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ready_residue
_ready_residue:                         ; @ready_residue
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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 w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x1
	mov	x19, x0
	ldr	w8, [x0]
	cmp	w8, #2
	cset	w0, eq
	bl	_av_assert0
	ldr	w0, [x19, #16]
	mov	w1, #8
	bl	_av_mallocz_array
	str	x0, [x19, #8]
	cbz	x0, LBB0_32
; %bb.1:
	ldr	w8, [x19, #16]
	cmp	w8, #1
	b.lt	LBB0_31
; %bb.2:
	mov	x21, #0
	orr	w22, wzr, #0x1
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x21, x21, #1
	ldrsw	x8, [x19, #16]
	cmp	x21, x8
	b.ge	LBB0_28
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_23 Depth 2
	ldr	x8, [x19, #24]
	ldr	x8, [x8, x21, lsl #3]
	ldr	w9, [x8]
	cmn	w9, #1
	b.eq	LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x9, #0
	b	LBB0_20
LBB0_6:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w9, [x8, #4]
	cmn	w9, #1
	b.eq	LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w9, #1
	b	LBB0_20
LBB0_8:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w9, [x8, #8]
	cmn	w9, #1
	b.eq	LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w9, #2
	b	LBB0_20
LBB0_10:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w9, [x8, #12]
	cmn	w9, #1
	b.eq	LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	w9, #3
	b	LBB0_20
LBB0_12:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w9, [x8, #16]
	cmn	w9, #1
	b.eq	LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	w9, #4
	b	LBB0_20
LBB0_14:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w9, [x8, #20]
	cmn	w9, #1
	b.eq	LBB0_16
; %bb.15:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	w9, #5
	b	LBB0_20
LBB0_16:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w9, [x8, #24]
	cmn	w9, #1
	b.eq	LBB0_18
; %bb.17:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	w9, #6
	b	LBB0_20
LBB0_18:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w9, [x8, #28]
	cmn	w9, #1
	b.eq	LBB0_3
; %bb.19:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	w9, #7
LBB0_20:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x10, [x20]
	ldrsw	x8, [x8, x9, lsl #2]
	add	x23, x10, x8, lsl #5
	ldr	w8, [x23]
	cmp	w8, #1
	cset	w0, gt
	bl	_assert
	ldr	w0, [x23, #4]
	bl	_assert
	mov	x24, x23
	ldr	w8, [x24, #8]!
	cmp	w8, #1
	b.lt	LBB0_3
; %bb.21:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	x25, #0
	add	x26, x23, #24
	add	x27, x23, #16
	b	LBB0_23
LBB0_22:                                ;   in Loop: Header=BB0_23 Depth=2
	add	x25, x25, #1
	ldrsw	x8, [x24]
	cmp	x25, x8
	b.ge	LBB0_3
LBB0_23:                                ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x26]
	ldr	w8, [x8, x25, lsl #2]
	cbz	w8, LBB0_22
; %bb.24:                               ;   in Loop: Header=BB0_23 Depth=2
	ldr	x8, [x27]
	ldr	w9, [x23]
	mul	w9, w9, w25
	ldr	w0, [x8, w9, sxtw #2]
	bl	_fabs
	ldr	x8, [x19, #8]
	ldr	x8, [x8, x21, lsl #3]
	ldr	s1, [x8]
	fcmp	s0, s1
	b.le	LBB0_26
; %bb.25:                               ;   in Loop: Header=BB0_23 Depth=2
	str	s0, [x8]
LBB0_26:                                ;   in Loop: Header=BB0_23 Depth=2
	ldr	x8, [x27]
	ldr	w9, [x23]
	madd	w9, w9, w25, w22
	ldr	w0, [x8, w9, sxtw #2]
	bl	_fabs
	ldr	x8, [x19, #8]
	ldr	x8, [x8, x21, lsl #3]
	ldr	s1, [x8, #4]
	fcmp	s0, s1
	b.le	LBB0_22
; %bb.27:                               ;   in Loop: Header=BB0_23 Depth=2
	str	s0, [x8, #4]
	b	LBB0_22
LBB0_28:
	and	x8, x8, #0xffffffff
	cmp	w8, #1
	b.lt	LBB0_31
; %bb.29:
	ldr	x9, [x19, #8]
	mov	x10, #-7378697629483820647
	movk	x10, #39322
	movk	x10, #16361, lsl #48
	dup.2d	v0, x10
LBB0_30:                                ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x9], #8
	ldr	d1, [x10]
	fcvtl	v1.2d, v1.2s
	fadd.2d	v1, v1, v0
	fcvtn	v1.2s, v1.2d
	str	d1, [x10]
	subs	x8, x8, #1
	b.ne	LBB0_30
LBB0_31:
	mov	w0, #0
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_32:
Lloh0:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_AVERROR
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_ready_residue
.subsections_via_symbols
