	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function numrank
_numrank:                               ## @numrank
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movl	%edi, %r15d
	movl	%esi, %edi
	callq	_RANK_CNT_BITS
	movl	$1, %ebx
	movl	%eax, %ecx
	shll	%cl, %ebx
	movq	_HASWELL@GOTPCREL(%rip), %rax
	cmpl	%r15d, (%rax)
	sete	%al
	movq	_BROADWELL@GOTPCREL(%rip), %rcx
	cmpl	%r15d, (%rcx)
	sete	%cl
	orb	%al, %cl
	movq	_KNIGHTS_LANDING@GOTPCREL(%rip), %rax
	cmpl	%r15d, (%rax)
	sete	%al
	orb	%cl, %al
	movzbl	%al, %eax
	leal	4(,%rax,4), %r15d
	cmpl	%r15d, %ebx
	jle	LBB0_2
## %bb.1:
	movl	%r14d, %edi
	callq	_RANK_CNT_BITS
	leaq	L_.str(%rip), %rsi
	xorl	%r12d, %r12d
	xorl	%edi, %edi
	movl	%ebx, %edx
	movl	%r15d, %ecx
	movl	%eax, %r8d
	movl	%r14d, %r9d
	callq	_edac_dbg
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r12d
	movl	%r12d, %ebx
LBB0_2:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HASWELL,4,2                    ## @HASWELL
	.comm	_BROADWELL,4,2                  ## @BROADWELL
	.comm	_KNIGHTS_LANDING,4,2            ## @KNIGHTS_LANDING
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid number of ranks: %d (max = %i) raw value = %x (%04x)\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_numrank
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function numrank
_numrank:                               ; @numrank
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x1
	mov	x21, x0
	mov	x0, x1
	bl	_RANK_CNT_BITS
	mov	w8, #1
	lsl	w20, w8, w0
Lloh0:
	adrp	x8, _HASWELL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HASWELL@GOTPAGEOFF]
Lloh2:
	adrp	x9, _BROADWELL@GOTPAGE
Lloh3:
	ldr	x9, [x9, _BROADWELL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	ldr	w9, [x9]
Lloh6:
	adrp	x10, _KNIGHTS_LANDING@GOTPAGE
Lloh7:
	ldr	x10, [x10, _KNIGHTS_LANDING@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	cmp	w10, w21
	ccmp	w9, w21, #4, ne
	ccmp	w8, w21, #4, ne
	mov	w8, #4
	mov	w9, #8
	csel	w21, w9, w8, eq
	cmp	w20, w21
	b.le	LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_RANK_CNT_BITS
	mov	x4, x0
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #0
	mov	x2, x20
	mov	x3, x21
	mov	x5, x19
	bl	_edac_dbg
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_2:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_HASWELL,4,2                    ; @HASWELL
	.comm	_BROADWELL,4,2                  ; @BROADWELL
	.comm	_KNIGHTS_LANDING,4,2            ; @KNIGHTS_LANDING
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid number of ranks: %d (max = %i) raw value = %x (%04x)\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_numrank
.subsections_via_symbols
