	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function calc_rank_cd
LCPI0_0:
	.quad	0x3ff0000000000000              ## double 1
LCPI0_1:
	.quad	0x3fe0000000000000              ## double 0.5
LCPI0_2:
	.quad	0x3fe62e42fefa39ef              ## double 0.69314718055994529
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_calc_rank_cd:                          ## @calc_rank_cd
	.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	$120, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, -84(%rbp)                 ## 4-byte Spill
	movq	%rdx, -72(%rbp)                 ## 8-byte Spill
	movq	%rsi, -112(%rbp)                ## 8-byte Spill
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movl	$0, -60(%rbp)
	movq	_weights@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	callq	_lengthof
	movq	%rsp, -144(%rbp)                ## 8-byte Spill
	movl	%eax, %eax
	shlq	$3, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r15
	movq	(%rbx), %rdi
	callq	_lengthof
	testl	%eax, %eax
	jle	LBB0_7
## %bb.1:
	xorl	%r13d, %r13d
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_2:                                 ##   in Loop: Header=BB0_3 Depth=1
	xorps	%xmm0, %xmm0
	cvtsi2sd	%r12, %xmm0
	movsd	LCPI0_0(%rip), %xmm1            ## xmm1 = mem[0],zero
	divsd	%xmm0, %xmm1
	movsd	%xmm1, (%r15,%r13,8)
	incq	%r13
	movq	(%rbx), %rdi
	callq	_lengthof
	cltq
	cmpq	%rax, %r13
	jge	LBB0_7
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r14,%r13,8), %r12
	testq	%r12, %r12
	js	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpq	$2, %r12
	jl	LBB0_2
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	(%rbx), %rax
	movq	(%rax,%r13,8), %r12
	cmpq	$2, %r12
	jl	LBB0_2
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	%r14, %rbx
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_ERRCODE_INVALID_PARAMETER_VALUE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_errcode
	leaq	L_.str(%rip), %rdi
	callq	_errmsg
	movl	%r14d, %edi
	movq	%rbx, %r14
	movq	_weights@GOTPCREL(%rip), %rbx
	movl	%eax, %esi
	callq	_ereport
	jmp	LBB0_2
LBB0_7:
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, -96(%rbp)
	movl	(%rax), %edi
	shll	$2, %edi
	callq	_palloc0
	movq	%rax, -104(%rbp)
	leaq	-104(%rbp), %rsi
	leaq	-60(%rbp), %rdx
	movq	-112(%rbp), %rdi                ## 8-byte Reload
	callq	_get_docrep
	testq	%rax, %rax
	je	LBB0_19
## %bb.8:
	movq	%rax, %r13
	leaq	-136(%rbp), %r12
	xorl	%r14d, %r14d
	movq	%r12, %rdi
	xorl	%esi, %esi
	movl	$24, %edx
	callq	_MemSet
	movl	-60(%rbp), %esi
	leaq	-104(%rbp), %rdx
	movq	%r13, %rdi
	movq	%r12, %rcx
	callq	_Cover
	testq	%rax, %rax
	je	LBB0_20
## %bb.9:
	xorpd	%xmm1, %xmm1
	xorl	%r14d, %r14d
	xorpd	%xmm0, %xmm0
	movsd	%xmm0, -80(%rbp)                ## 8-byte Spill
	xorpd	%xmm0, %xmm0
	movsd	%xmm0, -56(%rbp)                ## 8-byte Spill
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_11 Depth=1
	xorps	%xmm0, %xmm0
	cvtsi2sd	%rcx, %xmm0
	divsd	%xmm2, %xmm0
	xorps	%xmm1, %xmm1
	cvtsi2sd	%eax, %xmm1
	divsd	%xmm1, %xmm0
	movsd	-56(%rbp), %xmm1                ## 8-byte Reload
                                        ## xmm1 = mem[0],zero
	addsd	%xmm0, %xmm1
	movsd	%xmm1, -56(%rbp)                ## 8-byte Spill
	incl	%r14d
	movl	-60(%rbp), %esi
	movq	%r13, %rdi
	leaq	-104(%rbp), %rdx
	leaq	-136(%rbp), %rcx
	callq	_Cover
	testq	%rax, %rax
	movsd	-72(%rbp), %xmm1                ## 8-byte Reload
                                        ## xmm1 = mem[0],zero
	je	LBB0_21
LBB0_11:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_14 Depth 2
	movq	-128(%rbp), %r12
	movq	-120(%rbp), %rax
	cmpq	%rax, %r12
	jbe	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	xorpd	%xmm2, %xmm2
	jmp	LBB0_16
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_11 Depth=1
	movsd	%xmm1, -152(%rbp)               ## 8-byte Spill
	xorps	%xmm2, %xmm2
	.p2align	4, 0x90
LBB0_14:                                ##   Parent Loop BB0_11 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movsd	%xmm2, -72(%rbp)                ## 8-byte Spill
	movl	(%r12), %edi
	callq	_WEP_GETWEIGHT
	movsd	-72(%rbp), %xmm2                ## 8-byte Reload
                                        ## xmm2 = mem[0],zero
	addsd	(%r15,%rax,8), %xmm2
	addq	$4, %r12
	movq	-120(%rbp), %rax
	cmpq	%rax, %r12
	jbe	LBB0_14
## %bb.15:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	-128(%rbp), %r12
	movsd	-152(%rbp), %xmm1               ## 8-byte Reload
                                        ## xmm1 = mem[0],zero
LBB0_16:                                ##   in Loop: Header=BB0_11 Depth=1
	subq	%r12, %rax
	movq	%rax, %rdx
	sarq	$2, %rdx
	leaq	1(%rdx), %rcx
	movl	-136(%rbp), %esi
	movl	-132(%rbp), %edi
	leal	(%rdx,%rdi), %ebx
	addl	%esi, %edi
	subl	%ebx, %esi
	shrq	$63, %rax
	addq	%rdx, %rax
	shrq	%rax
	testl	%esi, %esi
	cmovnsl	%esi, %eax
	incl	%eax
	xorps	%xmm0, %xmm0
	cvtsi2sd	%edi, %xmm0
	mulsd	LCPI0_1(%rip), %xmm0
	testl	%r14d, %r14d
	movsd	%xmm0, -72(%rbp)                ## 8-byte Spill
	je	LBB0_10
## %bb.17:                              ##   in Loop: Header=BB0_11 Depth=1
	ucomisd	%xmm1, %xmm0
	jbe	LBB0_10
## %bb.18:                              ##   in Loop: Header=BB0_11 Depth=1
	subsd	%xmm1, %xmm0
	movsd	LCPI0_0(%rip), %xmm1            ## xmm1 = mem[0],zero
	divsd	%xmm0, %xmm1
	movsd	-80(%rbp), %xmm0                ## 8-byte Reload
                                        ## xmm0 = mem[0],zero
	addsd	%xmm1, %xmm0
	movsd	%xmm0, -80(%rbp)                ## 8-byte Spill
	jmp	LBB0_10
LBB0_19:
	movq	-104(%rbp), %rdi
	callq	_pfree
	xorl	%eax, %eax
	jmp	LBB0_43
LBB0_20:
	xorpd	%xmm0, %xmm0
	movsd	%xmm0, -56(%rbp)                ## 8-byte Spill
	xorpd	%xmm0, %xmm0
	movsd	%xmm0, -80(%rbp)                ## 8-byte Spill
LBB0_21:
	movq	_RANK_NORM_LOGLENGTH@GOTPCREL(%rip), %rax
	movl	-84(%rbp), %ebx                 ## 4-byte Reload
	testl	%ebx, (%rax)
	movq	-112(%rbp), %r15                ## 8-byte Reload
	je	LBB0_25
## %bb.22:
	cmpq	$0, (%r15)
	jle	LBB0_25
## %bb.23:
	movq	%r15, %rdi
	callq	_cnt_length
	incl	%eax
	xorps	%xmm0, %xmm0
	cvtsi2sd	%eax, %xmm0
	callq	_log
	movsd	-56(%rbp), %xmm1                ## 8-byte Reload
                                        ## xmm1 = mem[0],zero
	divsd	%xmm0, %xmm1
	jmp	LBB0_26
LBB0_25:
	movsd	-56(%rbp), %xmm1                ## 8-byte Reload
                                        ## xmm1 = mem[0],zero
LBB0_26:
	movq	_RANK_NORM_LENGTH@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_30
## %bb.27:
	movsd	%xmm1, -56(%rbp)                ## 8-byte Spill
	movq	%r15, %rdi
	callq	_cnt_length
	testl	%eax, %eax
	jle	LBB0_29
## %bb.28:
	xorps	%xmm0, %xmm0
	cvtsi2sd	%eax, %xmm0
	movsd	-56(%rbp), %xmm1                ## 8-byte Reload
                                        ## xmm1 = mem[0],zero
	divsd	%xmm0, %xmm1
	jmp	LBB0_30
LBB0_29:
	movsd	-56(%rbp), %xmm1                ## 8-byte Reload
                                        ## xmm1 = mem[0],zero
LBB0_30:
	movq	_RANK_NORM_EXTDIST@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_34
## %bb.31:
	testl	%r14d, %r14d
	je	LBB0_34
## %bb.32:
	xorpd	%xmm0, %xmm0
	movsd	-80(%rbp), %xmm2                ## 8-byte Reload
                                        ## xmm2 = mem[0],zero
	ucomisd	%xmm0, %xmm2
	jbe	LBB0_34
## %bb.33:
	movapd	%xmm2, %xmm0
	xorps	%xmm0, %xmm0
	cvtsi2sd	%r14d, %xmm0
	divsd	%xmm2, %xmm0
	divsd	%xmm0, %xmm1
LBB0_34:
	movq	_RANK_NORM_UNIQ@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_37
## %bb.35:
	movq	(%r15), %rax
	testq	%rax, %rax
	jle	LBB0_37
## %bb.36:
	xorps	%xmm0, %xmm0
	cvtsi2sd	%rax, %xmm0
	divsd	%xmm0, %xmm1
LBB0_37:
	movq	_RANK_NORM_LOGUNIQ@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_40
## %bb.38:
	movq	(%r15), %rax
	testq	%rax, %rax
	jle	LBB0_40
## %bb.39:
	incq	%rax
	xorps	%xmm0, %xmm0
	cvtsi2sd	%rax, %xmm0
	movsd	%xmm1, -56(%rbp)                ## 8-byte Spill
	callq	_log
	movsd	-56(%rbp), %xmm1                ## 8-byte Reload
                                        ## xmm1 = mem[0],zero
	divsd	LCPI0_2(%rip), %xmm0
	divsd	%xmm0, %xmm1
LBB0_40:
	movq	_RANK_NORM_RDIVRPLUS1@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_42
## %bb.41:
	movsd	LCPI0_0(%rip), %xmm0            ## xmm0 = mem[0],zero
	addsd	%xmm1, %xmm0
	divsd	%xmm0, %xmm1
LBB0_42:
	movsd	%xmm1, -56(%rbp)                ## 8-byte Spill
	movq	%r13, %rdi
	callq	_pfree
	movq	-104(%rbp), %rdi
	callq	_pfree
	cvttsd2si	-56(%rbp), %rax         ## 8-byte Folded Reload
LBB0_43:
	movq	-144(%rbp), %rsp                ## 8-byte Reload
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_45
## %bb.44:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_45:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_weights,8,3                    ## @weights
	.comm	_ERROR,4,2                      ## @ERROR
	.comm	_ERRCODE_INVALID_PARAMETER_VALUE,4,2 ## @ERRCODE_INVALID_PARAMETER_VALUE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"weight out of range"

	.comm	_RANK_NORM_LOGLENGTH,4,2        ## @RANK_NORM_LOGLENGTH
	.comm	_RANK_NORM_LENGTH,4,2           ## @RANK_NORM_LENGTH
	.comm	_RANK_NORM_EXTDIST,4,2          ## @RANK_NORM_EXTDIST
	.comm	_RANK_NORM_UNIQ,4,2             ## @RANK_NORM_UNIQ
	.comm	_RANK_NORM_LOGUNIQ,4,2          ## @RANK_NORM_LOGUNIQ
	.comm	_RANK_NORM_RDIVRPLUS1,4,2       ## @RANK_NORM_RDIVRPLUS1
	.no_dead_strip	_calc_rank_cd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function calc_rank_cd
_calc_rank_cd:                          ; @calc_rank_cd
	.cfi_startproc
; %bb.0:
	stp	d13, d12, [sp, #-144]!          ; 16-byte Folded Spill
	.cfi_def_cfa_offset 144
	stp	d11, d10, [sp, #16]             ; 16-byte Folded Spill
	stp	d9, d8, [sp, #32]               ; 16-byte Folded Spill
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	.cfi_offset b10, -120
	.cfi_offset b11, -128
	.cfi_offset b12, -136
	.cfi_offset b13, -144
	sub	sp, sp, #80
	stur	w3, [x29, #-204]                ; 4-byte Folded Spill
	mov	x21, x2
	stur	x1, [x29, #-200]                ; 8-byte Folded Spill
	mov	x22, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-136]
	stur	wzr, [x29, #-140]
Lloh3:
	adrp	x27, _weights@GOTPAGE
Lloh4:
	ldr	x27, [x27, _weights@GOTPAGEOFF]
	ldr	x0, [x27]
	bl	_lengthof
	mov	x8, sp
	stur	x8, [x29, #-192]                ; 8-byte Folded Spill
	mov	w8, w0
	lsl	x8, x8, #3
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0xffffffff0
	sub	x26, x9, x8
	mov	sp, x26
	ldr	x0, [x27]
	bl	_lengthof
	cmp	w0, #1
	b.lt	LBB0_7
; %bb.1:
	mov	x28, #0
Lloh7:
	adrp	x25, _ERROR@GOTPAGE
Lloh8:
	ldr	x25, [x25, _ERROR@GOTPAGEOFF]
Lloh9:
	adrp	x20, _ERRCODE_INVALID_PARAMETER_VALUE@GOTPAGE
Lloh10:
	ldr	x20, [x20, _ERRCODE_INVALID_PARAMETER_VALUE@GOTPAGEOFF]
Lloh11:
	adrp	x23, l_.str@PAGE
Lloh12:
	add	x23, x23, l_.str@PAGEOFF
	fmov	d8, #1.00000000
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	scvtf	d0, x19
	fdiv	d0, d8, d0
	str	d0, [x26, x28, lsl #3]
	add	x28, x28, #1
	ldr	x0, [x27]
	bl	_lengthof
	cmp	x28, w0, sxtw
	b.ge	LBB0_7
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x19, [x22, x28, lsl #3]
	tbnz	x19, #63, LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	cmp	x19, #2
	b.lt	LBB0_2
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x27]
	ldr	x19, [x8, x28, lsl #3]
	cmp	x19, #2
	b.lt	LBB0_2
LBB0_6:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w24, [x25]
	ldr	w0, [x20]
	bl	_errcode
	mov	x0, x23
	bl	_errmsg
	mov	x1, x0
	mov	x0, x24
	bl	_ereport
	b	LBB0_2
LBB0_7:
	stur	x21, [x29, #-176]
	ldr	w8, [x21]
	lsl	w0, w8, #2
	bl	_palloc0
	stur	x0, [x29, #-184]
	sub	x1, x29, #184
	sub	x2, x29, #140
	ldur	x23, [x29, #-200]               ; 8-byte Folded Reload
	mov	x0, x23
	bl	_get_docrep
	cbz	x0, LBB0_14
; %bb.8:
	mov	x21, x0
	sub	x0, x29, #168
	mov	w1, #0
	mov	w2, #24
	bl	_MemSet
	ldur	w1, [x29, #-140]
	sub	x2, x29, #184
	sub	x3, x29, #168
	mov	x0, x21
	bl	_Cover
	mov	w22, #0
	cbz	x0, LBB0_15
; %bb.9:
	movi	d12, #0000000000000000
	fmov	d10, #0.50000000
	fmov	d11, #1.00000000
	movi	d9, #0000000000000000
	movi	d8, #0000000000000000
	ldur	w19, [x29, #-204]               ; 4-byte Folded Reload
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	sub	x8, x8, x20
	asr	x8, x8, #2
	add	x9, x8, #1
	scvtf	d0, x9
	fdiv	d0, d0, d13
	ldp	w9, w10, [x29, #-168]
	add	w11, w10, w8
	sub	w11, w9, w11
	cmp	x8, #0
	cinc	x8, x8, lt
	lsr	x8, x8, #1
	cmp	w11, #0
	csel	w8, w8, w11, lt
	add	w8, w8, #1
	scvtf	d1, w8
	fdiv	d0, d0, d1
	fadd	d8, d8, d0
	add	w8, w10, w9
	scvtf	d0, w8
	fmul	d13, d0, d10
	fcmp	d13, d12
	fsub	d0, d13, d12
	fdiv	d0, d11, d0
	fadd	d0, d9, d0
	fcsel	d0, d9, d0, le
	cmp	w22, #0
	fcsel	d9, d9, d0, eq
	add	w22, w22, #1
	ldur	w1, [x29, #-140]
	sub	x2, x29, #184
	sub	x3, x29, #168
	mov	x0, x21
	bl	_Cover
	fmov	d12, d13
	cbz	x0, LBB0_16
LBB0_11:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_12 Depth 2
	ldp	x20, x8, [x29, #-160]
	movi	d13, #0000000000000000
	cmp	x20, x8
	b.hi	LBB0_10
LBB0_12:                                ;   Parent Loop BB0_11 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w0, [x20], #4
	bl	_WEP_GETWEIGHT
	ldr	d0, [x26, x0, lsl #3]
	fadd	d13, d13, d0
	ldur	x8, [x29, #-152]
	cmp	x20, x8
	b.ls	LBB0_12
; %bb.13:                               ;   in Loop: Header=BB0_11 Depth=1
	ldur	x20, [x29, #-160]
	b	LBB0_10
LBB0_14:
	ldur	x0, [x29, #-184]
	bl	_pfree
	mov	x0, #0
	b	LBB0_35
LBB0_15:
	movi	d8, #0000000000000000
	movi	d9, #0000000000000000
	ldur	w19, [x29, #-204]               ; 4-byte Folded Reload
LBB0_16:
Lloh13:
	adrp	x8, _RANK_NORM_LOGLENGTH@GOTPAGE
Lloh14:
	ldr	x8, [x8, _RANK_NORM_LOGLENGTH@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	tst	w8, w19
	b.eq	LBB0_19
; %bb.17:
	ldr	x8, [x23]
	cmp	x8, #1
	b.lt	LBB0_19
; %bb.18:
	mov	x0, x23
	bl	_cnt_length
	add	w8, w0, #1
	scvtf	d0, w8
	bl	_log
	fdiv	d8, d8, d0
LBB0_19:
Lloh16:
	adrp	x8, _RANK_NORM_LENGTH@GOTPAGE
Lloh17:
	ldr	x8, [x8, _RANK_NORM_LENGTH@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	tst	w8, w19
	b.eq	LBB0_22
; %bb.20:
	mov	x0, x23
	bl	_cnt_length
	cmp	w0, #1
	b.lt	LBB0_22
; %bb.21:
	scvtf	d0, w0
	fdiv	d8, d8, d0
LBB0_22:
Lloh19:
	adrp	x8, _RANK_NORM_EXTDIST@GOTPAGE
Lloh20:
	ldr	x8, [x8, _RANK_NORM_EXTDIST@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	tst	w8, w19
	b.eq	LBB0_26
; %bb.23:
	cbz	w22, LBB0_26
; %bb.24:
	fcmp	d9, #0.0
	b.le	LBB0_26
; %bb.25:
	scvtf	d0, w22
	fdiv	d0, d0, d9
	fdiv	d8, d8, d0
LBB0_26:
Lloh22:
	adrp	x8, _RANK_NORM_UNIQ@GOTPAGE
Lloh23:
	ldr	x8, [x8, _RANK_NORM_UNIQ@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	tst	w8, w19
	b.eq	LBB0_29
; %bb.27:
	ldr	x8, [x23]
	cmp	x8, #1
	b.lt	LBB0_29
; %bb.28:
	scvtf	d0, x8
	fdiv	d8, d8, d0
LBB0_29:
Lloh25:
	adrp	x8, _RANK_NORM_LOGUNIQ@GOTPAGE
Lloh26:
	ldr	x8, [x8, _RANK_NORM_LOGUNIQ@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	tst	w8, w19
	b.eq	LBB0_32
; %bb.30:
	ldr	x8, [x23]
	cmp	x8, #1
	b.lt	LBB0_32
; %bb.31:
	add	x8, x8, #1
	scvtf	d0, x8
	bl	_log
	mov	x8, #14831
	movk	x8, #65274, lsl #16
	movk	x8, #11842, lsl #32
	movk	x8, #16358, lsl #48
	fmov	d1, x8
	fdiv	d0, d0, d1
	fdiv	d8, d8, d0
LBB0_32:
Lloh28:
	adrp	x8, _RANK_NORM_RDIVRPLUS1@GOTPAGE
Lloh29:
	ldr	x8, [x8, _RANK_NORM_RDIVRPLUS1@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
	tst	w8, w19
	b.eq	LBB0_34
; %bb.33:
	fmov	d0, #1.00000000
	fadd	d0, d8, d0
	fdiv	d8, d8, d0
LBB0_34:
	mov	x0, x21
	bl	_pfree
	ldur	x0, [x29, #-184]
	bl	_pfree
	fcvtzs	x0, d8
LBB0_35:
	ldur	x8, [x29, #-192]                ; 8-byte Folded Reload
	mov	sp, x8
	ldur	x8, [x29, #-136]
Lloh31:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh32:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh33:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_37
; %bb.36:
	sub	sp, x29, #128
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #32]               ; 16-byte Folded Reload
	ldp	d11, d10, [sp, #16]             ; 16-byte Folded Reload
	ldp	d13, d12, [sp], #144            ; 16-byte Folded Reload
	ret
LBB0_37:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_weights,8,3                    ; @weights
	.comm	_ERROR,4,2                      ; @ERROR
	.comm	_ERRCODE_INVALID_PARAMETER_VALUE,4,2 ; @ERRCODE_INVALID_PARAMETER_VALUE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"weight out of range"

	.comm	_RANK_NORM_LOGLENGTH,4,2        ; @RANK_NORM_LOGLENGTH
	.comm	_RANK_NORM_LENGTH,4,2           ; @RANK_NORM_LENGTH
	.comm	_RANK_NORM_EXTDIST,4,2          ; @RANK_NORM_EXTDIST
	.comm	_RANK_NORM_UNIQ,4,2             ; @RANK_NORM_UNIQ
	.comm	_RANK_NORM_LOGUNIQ,4,2          ; @RANK_NORM_LOGUNIQ
	.comm	_RANK_NORM_RDIVRPLUS1,4,2       ; @RANK_NORM_RDIVRPLUS1
	.no_dead_strip	_calc_rank_cd
.subsections_via_symbols
