	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function atp_calculate_abs
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
LCPI0_2:
	.long	8                               ## 0x8
	.long	8                               ## 0x8
	.long	8                               ## 0x8
	.long	8                               ## 0x8
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_atp_calculate_abs:                     ## @atp_calculate_abs
	.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
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %ebx
	movq	(%rdi), %rdx
	movl	$0, (%r9)
	testl	%ebx, %ebx
	jle	LBB0_55
## %bb.1:
	movq	%rdi, %r14
	movslq	%esi, %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	leaq	(%rdx,%rax,4), %r15
	movl	%ebx, %r12d
	movl	(%r15), %eax
	movq	_threshold@GOTPCREL(%rip), %r10
	cmpl	(%r10), %eax
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movl	%ecx, -68(%rbp)                 ## 4-byte Spill
	movq	%r8, -80(%rbp)                  ## 8-byte Spill
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	jge	LBB0_4
## %bb.2:
	xorl	%eax, %eax
	cmpl	$1, %ebx
	jne	LBB0_5
	jmp	LBB0_56
LBB0_4:
	movl	$1, (%r9)
	movl	$1, %eax
	cmpl	$1, %ebx
	je	LBB0_14
LBB0_5:
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rdx,%rcx,4), %r11
	addq	$4, %r11
	leaq	-1(%r12), %r13
	xorl	%r8d, %r8d
	xorl	%ebx, %ebx
	movl	%eax, %edi
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_8 Depth=1
	xorl	%edi, %edi
LBB0_7:                                 ##   in Loop: Header=BB0_8 Depth=1
	incq	%rbx
	cmpq	%rbx, %r13
	je	LBB0_13
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r11,%rbx,4), %ecx
	movl	(%r10), %edx
	cmpl	%edx, %ecx
	jl	LBB0_6
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movl	%ebx, %esi
	testl	%edi, %edi
	jne	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_8 Depth=1
	cmpl	%ecx, (%r15,%rsi,4)
	jge	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_8 Depth=1
	incl	%eax
	movl	%eax, (%r9)
	movl	$1, %edi
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_8 Depth=1
	movl	(%r15,%rsi,4), %esi
	subl	%ecx, %esi
	cmpl	%edx, %esi
	cmovgl	%r8d, %edi
	jmp	LBB0_7
LBB0_13:
	testl	%eax, %eax
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	jle	LBB0_55
LBB0_14:
	movq	8(%r14), %rdi
	xorl	%r13d, %r13d
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_memset
	movq	8(%r14), %rax
	cmpl	$8, %ebx
	jae	LBB0_21
## %bb.15:
	movq	-64(%rbp), %r9                  ## 8-byte Reload
LBB0_16:
	movq	%r13, %rdx
	notq	%rdx
	testb	$1, %r12b
	je	LBB0_18
## %bb.17:
	movl	(%r15,%r13,4), %esi
	movq	_ATP_SCALE@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %esi
	leaq	(,%r13,4), %rcx
	orq	$16, %rcx
	movl	%esi, (%rax,%rcx)
	orq	$1, %r13
LBB0_18:
	addq	%r12, %rdx
	je	LBB0_32
## %bb.19:
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%r9,%rcx,4), %rdx
	addq	$4, %rdx
	movq	_ATP_SCALE@GOTPCREL(%rip), %rsi
	.p2align	4, 0x90
LBB0_20:                                ## =>This Inner Loop Header: Depth=1
	movl	-4(%rdx,%r13,4), %edi
	movzbl	(%rsi), %ecx
	shll	%cl, %edi
	movl	%edi, 16(%rax,%r13,4)
	movl	(%rdx,%r13,4), %edi
	movzbl	(%rsi), %ecx
	shll	%cl, %edi
	movl	%edi, 20(%rax,%r13,4)
	addq	$2, %r13
	cmpq	%r13, %r12
	jne	LBB0_20
	jmp	LBB0_32
LBB0_21:
	leaq	16(%rax), %rdx
	leaq	(%rax,%r12,4), %rsi
	addq	$16, %rsi
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	addq	%r12, %rcx
	movq	-64(%rbp), %r9                  ## 8-byte Reload
	leaq	(%r9,%rcx,4), %rcx
	cmpq	%rcx, %rdx
	setb	%cl
	cmpq	%rsi, %r15
	setb	%bl
	movq	_ATP_SCALE@GOTPCREL(%rip), %r8
	leaq	4(%r8), %rdi
	cmpq	%rdi, %rdx
	setb	%dl
	cmpq	%r8, %rsi
	seta	%sil
	xorl	%r13d, %r13d
	testb	%bl, %cl
	jne	LBB0_27
## %bb.22:
	andb	%sil, %dl
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	jne	LBB0_16
## %bb.23:
	movl	%r12d, %r13d
	andl	$-8, %r13d
	leaq	-8(%r13), %rcx
	movq	%rcx, %rdx
	shrq	$3, %rdx
	incq	%rdx
	testq	%rcx, %rcx
	je	LBB0_28
## %bb.24:
	movq	%rdx, %rdi
	andq	$-2, %rdi
	movd	(%r8), %xmm0                    ## xmm0 = mem[0],zero,zero,zero
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%r9,%rcx,4), %rbx
	addq	$48, %rbx
	xorl	%esi, %esi
	pmovzxdq	%xmm0, %xmm0                    ## xmm0 = xmm0[0],zero,xmm0[1],zero
	.p2align	4, 0x90
LBB0_25:                                ## =>This Inner Loop Header: Depth=1
	movdqu	-48(%rbx,%rsi,4), %xmm1
	movdqu	-32(%rbx,%rsi,4), %xmm2
	pslld	%xmm0, %xmm1
	pslld	%xmm0, %xmm2
	movdqu	%xmm1, 16(%rax,%rsi,4)
	movdqu	%xmm2, 32(%rax,%rsi,4)
	movdqu	-16(%rbx,%rsi,4), %xmm1
	movdqu	(%rbx,%rsi,4), %xmm2
	pslld	%xmm0, %xmm1
	pslld	%xmm0, %xmm2
	movdqu	%xmm1, 48(%rax,%rsi,4)
	movdqu	%xmm2, 64(%rax,%rsi,4)
	addq	$16, %rsi
	addq	$-2, %rdi
	jne	LBB0_25
	jmp	LBB0_29
LBB0_27:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_16
LBB0_28:
	xorl	%esi, %esi
LBB0_29:
	testb	$1, %dl
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	je	LBB0_31
## %bb.30:
	movdqu	(%r15,%rsi,4), %xmm0
	movdqu	16(%r15,%rsi,4), %xmm1
	movd	(%r8), %xmm2                    ## xmm2 = mem[0],zero,zero,zero
	pslld	%xmm2, %xmm0
	pslld	%xmm2, %xmm1
	leaq	(,%rsi,4), %rcx
	orq	$16, %rcx
	movdqu	%xmm0, (%rax,%rcx)
	movdqu	%xmm1, 16(%rax,%rcx)
LBB0_31:
	cmpq	%r12, %r13
	jne	LBB0_16
LBB0_32:
	movslq	%ebx, %rcx
	leaq	(%rax,%rcx,4), %rdi
	addq	$16, %rdi
	xorl	%r13d, %r13d
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_memset
	leal	6(%rbx), %r15d
	cmpl	$2, %r15d
	movl	$1, %eax
	cmovll	%eax, %r15d
	leal	1(%r15), %r12d
	leal	2(%r15), %eax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
                                        ## kill: def $r15d killed $r15d killed $r15 def $r15
	andl	$2147483640, %r15d              ## imm = 0x7FFFFFF8
	leaq	1(%r15), %rax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	jmp	LBB0_34
	.p2align	4, 0x90
LBB0_33:                                ##   in Loop: Header=BB0_34 Depth=1
	leal	-1(%rcx), %eax
	movl	%ecx, %ecx
	movl	(%rdi,%rcx,4), %edx
	addl	(%rdi,%rax,4), %edx
	movl	%edx, %eax
	shrl	$31, %eax
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, (%rsi,%rcx,4)
	movl	$8, %edx
	callq	_memcpy
	incl	%r13d
	cmpl	$4, %r13d
	je	LBB0_43
LBB0_34:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_39 Depth 2
                                        ##     Child Loop BB0_41 Depth 2
	movq	8(%r14), %rdi
	movq	16(%r14), %rsi
	movl	4(%rdi), %eax
	addl	(%rdi), %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%eax, %ecx
	sarl	%ecx
	movl	%ecx, (%rsi)
	movl	$1, %ecx
	cmpl	$-5, %ebx
	jl	LBB0_33
## %bb.35:                              ##   in Loop: Header=BB0_34 Depth=1
	movl	$1, %eax
	cmpl	$8, -48(%rbp)                   ## 4-byte Folded Reload
	jb	LBB0_41
## %bb.36:                              ##   in Loop: Header=BB0_34 Depth=1
	leaq	4(%rsi), %rcx
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	leaq	(%rdi,%rdx,4), %rdx
	cmpq	%rdx, %rcx
	jae	LBB0_38
## %bb.37:                              ##   in Loop: Header=BB0_34 Depth=1
	leaq	(%rsi,%r12,4), %rcx
	cmpq	%rcx, %rdi
	jb	LBB0_41
LBB0_38:                                ##   in Loop: Header=BB0_34 Depth=1
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_39:                                ##   Parent Loop BB0_34 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movdqu	(%rdi,%rax,4), %xmm0
	movdqu	4(%rdi,%rax,4), %xmm1
	movdqu	8(%rdi,%rax,4), %xmm2
	paddd	%xmm0, %xmm2
	movdqu	16(%rdi,%rax,4), %xmm0
	movdqu	20(%rdi,%rax,4), %xmm3
	paddd	%xmm1, %xmm1
	paddd	%xmm2, %xmm1
	paddd	%xmm3, %xmm3
	movdqu	24(%rdi,%rax,4), %xmm2
	paddd	%xmm0, %xmm2
	paddd	%xmm3, %xmm2
	movdqa	%xmm1, %xmm0
	psrad	$31, %xmm0
	psrld	$30, %xmm0
	paddd	%xmm1, %xmm0
	psrad	$2, %xmm0
	movdqa	%xmm2, %xmm1
	psrad	$31, %xmm1
	psrld	$30, %xmm1
	paddd	%xmm2, %xmm1
	psrad	$2, %xmm1
	movdqu	%xmm0, 4(%rsi,%rax,4)
	movdqu	%xmm1, 20(%rsi,%rax,4)
	addq	$8, %rax
	cmpq	%rax, %r15
	jne	LBB0_39
## %bb.40:                              ##   in Loop: Header=BB0_34 Depth=1
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movl	%r12d, %ecx
	cmpq	-48(%rbp), %r15                 ## 8-byte Folded Reload
	je	LBB0_33
	.p2align	4, 0x90
LBB0_41:                                ##   Parent Loop BB0_34 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%rdi,%rax,4), %ecx
	movl	4(%rdi,%rax,4), %edx
	addl	%ecx, %ecx
	addl	-4(%rdi,%rax,4), %ecx
	leal	(%rdx,%rcx), %ebx
	addl	$3, %ebx
                                        ## kill: def $ecx killed $ecx killed $rcx
	addl	%edx, %ecx
	cmovnsl	%ecx, %ebx
	sarl	$2, %ebx
	movl	%ebx, (%rsi,%rax,4)
	leaq	1(%rax), %rcx
	movq	%rcx, %rax
	cmpq	%rcx, %r12
	jne	LBB0_41
## %bb.42:                              ##   in Loop: Header=BB0_34 Depth=1
	movl	%r12d, %ecx
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_33
LBB0_43:
	xorl	%eax, %eax
	cmpl	$-7, %ebx
	jl	LBB0_56
## %bb.44:
	movq	8(%r14), %r14
	movq	_ATP_SCALE@GOTPCREL(%rip), %r8
	movl	(%r8), %ecx
	addl	$7, %ebx
	xorl	%r10d, %r10d
	testl	%ebx, %ebx
	cmovlel	%r10d, %ebx
	leal	1(%rbx), %r11d
	cmpl	$3, %ebx
	jae	LBB0_46
## %bb.45:
	xorl	%r15d, %r15d
	xorl	%edi, %edi
	xorl	%eax, %eax
	jmp	LBB0_52
LBB0_46:
	movl	%r11d, %r15d
	andl	$-4, %r15d
	movd	%ecx, %xmm0
	leaq	-4(%r15), %rax
	movq	%rax, %r9
	shrq	$2, %r9
	incq	%r9
	pmovzxdq	%xmm0, %xmm2                    ## xmm2 = xmm0[0],zero,xmm0[1],zero
	testq	%rax, %rax
	je	LBB0_57
## %bb.47:
	movq	%r9, %rdi
	andq	$-2, %rdi
	movdqa	LCPI0_0(%rip), %xmm1            ## xmm1 = [0,1,2,3]
	pxor	%xmm10, %xmm10
	xorl	%eax, %eax
	movdqa	LCPI0_1(%rip), %xmm8            ## xmm8 = [4,4,4,4]
	movdqa	LCPI0_2(%rip), %xmm9            ## xmm9 = [8,8,8,8]
	pxor	%xmm0, %xmm0
	pxor	%xmm3, %xmm3
	.p2align	4, 0x90
LBB0_48:                                ## =>This Inner Loop Header: Depth=1
	movdqu	(%r14,%rax,4), %xmm4
	movdqu	16(%r14,%rax,4), %xmm5
	movdqa	%xmm4, %xmm7
	psrad	%xmm2, %xmm7
	pcmpgtd	%xmm10, %xmm7
	movdqa	%xmm4, %xmm6
	pmulld	%xmm1, %xmm6
	pand	%xmm7, %xmm6
	paddd	%xmm3, %xmm6
	pand	%xmm4, %xmm7
	paddd	%xmm0, %xmm7
	movdqa	%xmm1, %xmm3
	paddd	%xmm8, %xmm3
	movdqa	%xmm5, %xmm0
	psrad	%xmm2, %xmm0
	pcmpgtd	%xmm10, %xmm0
	pmulld	%xmm5, %xmm3
	pand	%xmm0, %xmm3
	paddd	%xmm6, %xmm3
	pand	%xmm5, %xmm0
	paddd	%xmm7, %xmm0
	addq	$8, %rax
	paddd	%xmm9, %xmm1
	addq	$-2, %rdi
	jne	LBB0_48
## %bb.49:
	testb	$1, %r9b
	je	LBB0_51
LBB0_50:
	movdqu	(%r14,%rax,4), %xmm4
	movdqa	%xmm4, %xmm5
	psrad	%xmm2, %xmm5
	pxor	%xmm2, %xmm2
	pcmpgtd	%xmm2, %xmm5
	pmulld	%xmm4, %xmm1
	pand	%xmm5, %xmm1
	paddd	%xmm1, %xmm3
	pand	%xmm4, %xmm5
	paddd	%xmm5, %xmm0
LBB0_51:
	pshufd	$238, %xmm3, %xmm1              ## xmm1 = xmm3[2,3,2,3]
	paddd	%xmm3, %xmm1
	pshufd	$85, %xmm1, %xmm2               ## xmm2 = xmm1[1,1,1,1]
	paddd	%xmm1, %xmm2
	movd	%xmm2, %eax
	pshufd	$238, %xmm0, %xmm1              ## xmm1 = xmm0[2,3,2,3]
	paddd	%xmm0, %xmm1
	pshufd	$85, %xmm1, %xmm0               ## xmm0 = xmm1[1,1,1,1]
	paddd	%xmm1, %xmm0
	movd	%xmm0, %edi
	cmpq	%r11, %r15
	je	LBB0_53
	.p2align	4, 0x90
LBB0_52:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r14,%r15,4), %edx
	movl	%edx, %esi
	sarl	%cl, %esi
	movl	%r15d, %ebx
	imull	%edx, %ebx
	testl	%esi, %esi
	cmovlel	%r10d, %ebx
	cmovlel	%r10d, %edx
	addl	%ebx, %eax
	addl	%edx, %edi
	incq	%r15
	cmpq	%r15, %r11
	jne	LBB0_52
LBB0_53:
	testl	%edi, %edi
	jle	LBB0_55
## %bb.54:
	movb	(%r8), %cl
	movl	%edi, %edx
	shrl	%cl, %edx
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	movl	%edx, (%rcx)
	imull	-68(%rbp), %eax                 ## 4-byte Folded Reload
	cltd
	idivl	%edi
	jmp	LBB0_56
LBB0_55:
	xorl	%eax, %eax
LBB0_56:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_57:
	movdqa	LCPI0_0(%rip), %xmm1            ## xmm1 = [0,1,2,3]
	pxor	%xmm0, %xmm0
	xorl	%eax, %eax
	pxor	%xmm3, %xmm3
	testb	$1, %r9b
	jne	LBB0_50
	jmp	LBB0_51
	.cfi_endproc
                                        ## -- End function
	.comm	_threshold,4,2                  ## @threshold
	.comm	_ATP_SCALE,4,2                  ## @ATP_SCALE
	.no_dead_strip	_atp_calculate_abs
.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 atp_calculate_abs
lCPI0_0:
	.long	0                               ; 0x0
	.long	1                               ; 0x1
	.long	2                               ; 0x2
	.long	3                               ; 0x3
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_atp_calculate_abs:                     ; @atp_calculate_abs
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	d9, d8, [sp, #16]               ; 16-byte Folded Spill
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset b8, -104
	.cfi_offset b9, -112
                                        ; kill: def $w1 killed $w1 def $x1
	ldr	x24, [x0]
	str	wzr, [x5]
	cmp	w2, #1
	b.lt	LBB0_44
; %bb.1:
	mov	x21, x2
	mov	x22, x0
	sxtw	x26, w1
	add	x19, x24, w1, sxtw #2
	mov	w25, w2
	ldr	w9, [x19]
Lloh0:
	adrp	x8, _threshold@GOTPAGE
Lloh1:
	ldr	x8, [x8, _threshold@GOTPAGEOFF]
	ldr	w10, [x8]
	cmp	w9, w10
	b.ge	LBB0_3
; %bb.2:
	mov	w9, #0
	mov	w0, #0
	cmp	w21, #1
	b.ne	LBB0_4
	b	LBB0_45
LBB0_3:
	mov	w9, #1
	str	w9, [x5]
	cmp	w21, #1
	b.eq	LBB0_13
LBB0_4:
	add	x10, x24, x26, lsl #2
	add	x10, x10, #4
	sub	x11, x25, #1
	mov	x12, #4294967296
	mov	x13, x9
	b	LBB0_7
LBB0_5:                                 ;   in Loop: Header=BB0_7 Depth=1
	mov	w13, #0
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	x12, x12, #1
	add	x10, x10, #4
	subs	x11, x11, #1
	b.eq	LBB0_12
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w14, [x10]
	ldr	w15, [x8]
	cmp	w14, w15
	b.lt	LBB0_5
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	and	x16, x12, #0xffffffff
	cbnz	w13, LBB0_11
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	w17, [x19, x16, lsl #2]
	cmp	w17, w14
	b.ge	LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_7 Depth=1
	add	w9, w9, #1
	str	w9, [x5]
	mov	w13, #1
	b	LBB0_6
LBB0_11:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	w16, [x19, x16, lsl #2]
	sub	w14, w16, w14
	cmp	w14, w15
	csel	w13, wzr, w13, gt
	b	LBB0_6
LBB0_12:
	cmp	w9, #1
	b.lt	LBB0_44
LBB0_13:
	str	x4, [sp]                        ; 8-byte Folded Spill
	str	w3, [sp, #12]                   ; 4-byte Folded Spill
	ldr	x0, [x22, #8]
	mov	w1, #0
	mov	w2, #16
	bl	_memset
	ldr	x8, [x22, #8]
Lloh2:
	adrp	x23, _ATP_SCALE@GOTPAGE
Lloh3:
	ldr	x23, [x23, _ATP_SCALE@GOTPAGEOFF]
	cmp	w21, #16
	b.hs	LBB0_33
; %bb.14:
	mov	x9, #0
LBB0_15:
	add	x10, x8, x9, lsl #2
	add	x10, x10, #16
	add	x11, x9, x26
	add	x11, x24, x11, lsl #2
	sub	x9, x25, x9
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	ldr	w12, [x11], #4
	ldr	w13, [x23]
	lsl	w12, w12, w13
	str	w12, [x10], #4
	subs	x9, x9, #1
	b.ne	LBB0_16
LBB0_17:
	add	w9, w21, #4
	add	x0, x8, w9, sxtw #2
	mov	w1, #0
	mov	w2, #16
	bl	_memset
	mov	w24, #0
	add	w8, w21, #6
	cmp	w8, #1
	csinc	w25, w8, wzr, gt
	add	w26, w25, #1
	add	w27, w25, #2
	and	x28, x25, #0x7ffffffc
	orr	x19, x28, #0x1
	add	x20, x25, #1
	b	LBB0_20
LBB0_18:                                ;   in Loop: Header=BB0_20 Depth=1
	mov	w8, #1
LBB0_19:                                ;   in Loop: Header=BB0_20 Depth=1
	sub	w9, w8, #1
	ldr	w9, [x0, w9, uxtw #2]
	mov	w8, w8
	lsl	x8, x8, #2
	ldr	w10, [x0, x8]
	add	w9, w10, w9
	cmp	w9, #0
	cinc	w9, w9, lt
	asr	w9, w9, #1
	str	w9, [x1, x8]
	mov	w2, #8
	bl	_memcpy
	add	w24, w24, #1
	cmp	w24, #4
	b.eq	LBB0_30
LBB0_20:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_24 Depth 2
                                        ;     Child Loop BB0_28 Depth 2
	ldp	x0, x1, [x22, #8]
	ldp	w8, w9, [x0]
	add	w8, w9, w8
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w8, w8, #1
	str	w8, [x1]
	cmn	w21, #5
	b.lt	LBB0_18
; %bb.21:                               ;   in Loop: Header=BB0_20 Depth=1
	cmp	w25, #4
	b.lo	LBB0_26
; %bb.22:                               ;   in Loop: Header=BB0_20 Depth=1
	add	x8, x1, #4
	add	x9, x1, x26, lsl #2
	add	x10, x0, x27, lsl #2
	cmp	x8, x10
	ccmp	x0, x9, #2, lo
	b.lo	LBB0_26
; %bb.23:                               ;   in Loop: Header=BB0_20 Depth=1
	add	x9, x0, #8
	mov	x10, x28
LBB0_24:                                ;   Parent Loop BB0_20 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldur	q0, [x9, #-8]
	ldur	q1, [x9, #-4]
	shl.4s	v1, v1, #1
	add.4s	v0, v1, v0
	ldr	q1, [x9], #16
	add.4s	v0, v0, v1
	cmlt.4s	v1, v0, #0
	usra.4s	v0, v1, #30
	sshr.4s	v0, v0, #2
	str	q0, [x8], #16
	subs	x10, x10, #4
	b.ne	LBB0_24
; %bb.25:                               ;   in Loop: Header=BB0_20 Depth=1
	mov	x9, x19
	mov	x8, x26
	cmp	x28, x25
	b.eq	LBB0_19
	b	LBB0_27
LBB0_26:                                ;   in Loop: Header=BB0_20 Depth=1
	mov	w9, #1
LBB0_27:                                ;   in Loop: Header=BB0_20 Depth=1
	sub	x8, x20, x9
	lsl	x10, x9, #2
	add	x9, x1, x10
	add	x10, x0, x10
LBB0_28:                                ;   Parent Loop BB0_20 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldp	w11, w12, [x10, #-4]
	add	w11, w11, w12, lsl #1
	ldr	w12, [x10, #4]!
	add	w11, w11, w12
	add	w12, w11, #3
	cmp	w11, #0
	csel	w11, w12, w11, lt
	asr	w11, w11, #2
	str	w11, [x9], #4
	subs	x8, x8, #1
	b.ne	LBB0_28
; %bb.29:                               ;   in Loop: Header=BB0_20 Depth=1
	mov	x8, x26
	b	LBB0_19
LBB0_30:
	cmn	w21, #7
	b.lt	LBB0_44
; %bb.31:
	ldr	x8, [x22, #8]
	ldr	w9, [x23]
	add	w10, w21, #7
	cmp	w10, #0
	csel	w11, w10, wzr, gt
	add	w10, w11, #1
	cmp	w11, #15
	b.hs	LBB0_38
; %bb.32:
	mov	x11, #0
	mov	w13, #0
	mov	w12, #0
	b	LBB0_41
LBB0_33:
	mov	x9, #0
	add	x11, x8, #16
	add	x10, x8, x25, lsl #2
	add	x12, x10, #16
	add	x10, x26, x25
	add	x13, x24, x10, lsl #2
	add	x10, x23, #4
	cmp	x11, x10
	ccmp	x12, x23, #0, lo
	cset	w10, hi
	cmp	x19, x12
	ccmp	x11, x13, #2, lo
	b.lo	LBB0_15
; %bb.34:
	tbnz	w10, #0, LBB0_15
; %bb.35:
	and	x9, x25, #0xfffffff0
	ld1r.4s	{ v0 }, [x23]
	add	x10, x24, x26, lsl #2
	add	x10, x10, #32
	add	x11, x8, #32
	mov	x12, x9
LBB0_36:                                ; =>This Inner Loop Header: Depth=1
	ldp	q1, q2, [x10, #-32]
	ldp	q3, q4, [x10], #64
	ushl.4s	v1, v1, v0
	ushl.4s	v2, v2, v0
	ushl.4s	v3, v3, v0
	ushl.4s	v4, v4, v0
	stp	q1, q2, [x11, #-16]
	stp	q3, q4, [x11, #16]
	add	x11, x11, #64
	subs	x12, x12, #16
	b.ne	LBB0_36
; %bb.37:
	cmp	x9, x25
	b.ne	LBB0_15
	b	LBB0_17
LBB0_38:
	dup.4s	v2, w9
	movi.2d	v0, #0000000000000000
	and	x11, x10, #0xfffffff0
	movi.4s	v1, #4
	movi.4s	v5, #8
Lloh4:
	adrp	x12, lCPI0_0@PAGE
Lloh5:
	ldr	q6, [x12, lCPI0_0@PAGEOFF]
	movi.4s	v7, #12
	add	x12, x8, #32
	neg.4s	v16, v2
	movi.4s	v17, #16
	mov	x13, x11
	movi.2d	v2, #0000000000000000
	movi.2d	v3, #0000000000000000
	movi.2d	v4, #0000000000000000
	movi.2d	v18, #0000000000000000
	movi.2d	v19, #0000000000000000
	movi.2d	v20, #0000000000000000
	movi.2d	v21, #0000000000000000
LBB0_39:                                ; =>This Inner Loop Header: Depth=1
	add.4s	v22, v6, v1
	add.4s	v23, v6, v5
	add.4s	v24, v6, v7
	ldp	q25, q26, [x12, #-32]
	sshl.4s	v27, v25, v16
	sshl.4s	v28, v26, v16
	ldp	q29, q30, [x12], #64
	sshl.4s	v31, v29, v16
	sshl.4s	v8, v30, v16
	cmgt.4s	v27, v27, #0
	cmgt.4s	v28, v28, #0
	cmgt.4s	v31, v31, #0
	cmgt.4s	v8, v8, #0
	mul.4s	v9, v25, v6
	mul.4s	v22, v26, v22
	mul.4s	v23, v29, v23
	mul.4s	v24, v30, v24
	and.16b	v9, v9, v27
	and.16b	v22, v22, v28
	and.16b	v23, v23, v31
	and.16b	v24, v24, v8
	add.4s	v18, v9, v18
	add.4s	v19, v22, v19
	add.4s	v20, v23, v20
	add.4s	v21, v24, v21
	and.16b	v22, v25, v27
	and.16b	v23, v26, v28
	and.16b	v24, v29, v31
	and.16b	v25, v30, v8
	add.4s	v0, v22, v0
	add.4s	v2, v23, v2
	add.4s	v3, v24, v3
	add.4s	v4, v25, v4
	add.4s	v6, v6, v17
	subs	x13, x13, #16
	b.ne	LBB0_39
; %bb.40:
	add.4s	v1, v19, v18
	add.4s	v1, v20, v1
	add.4s	v1, v21, v1
	addv.4s	s1, v1
	fmov	w12, s1
	add.4s	v0, v2, v0
	add.4s	v0, v3, v0
	add.4s	v0, v4, v0
	addv.4s	s0, v0
	fmov	w13, s0
	cmp	x11, x10
	b.eq	LBB0_42
LBB0_41:                                ; =>This Inner Loop Header: Depth=1
	ldr	w14, [x8, x11, lsl #2]
	asr	w15, w14, w9
	mul	w16, w14, w11
	cmp	w15, #0
	csel	w15, w16, wzr, gt
	add	w12, w15, w12
	csel	w14, w14, wzr, gt
	add	w13, w14, w13
	add	x11, x11, #1
	cmp	x10, x11
	b.ne	LBB0_41
LBB0_42:
	cmp	w13, #1
	b.lt	LBB0_44
; %bb.43:
	ldr	w8, [x23]
	lsr	w8, w13, w8
	ldr	x9, [sp]                        ; 8-byte Folded Reload
	str	w8, [x9]
	ldr	w8, [sp, #12]                   ; 4-byte Folded Reload
	mul	w8, w12, w8
	sdiv	w0, w8, w13
	b	LBB0_45
LBB0_44:
	mov	w0, #0
LBB0_45:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #16]               ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdr	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_threshold,4,2                  ; @threshold
	.comm	_ATP_SCALE,4,2                  ; @ATP_SCALE
	.no_dead_strip	_atp_calculate_abs
.subsections_via_symbols
