	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function i5100_rank_to_slot
_i5100_rank_to_slot:                    ## @i5100_rank_to_slot
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	.cfi_offset %rbx, -24
                                        ## kill: def $esi killed $esi def $rsi
	movq	_I5100_MAX_DIMM_SLOTS_PER_CHAN@GOTPCREL(%rip), %rax
	movl	(%rax), %r10d
	movl	$-1, %eax
	testl	%r10d, %r10d
	jle	LBB0_8
## %bb.1:
	movq	(%rdi), %r8
	movq	(%r8), %rcx
	movslq	%esi, %rdi
	movq	(%rcx,%rdi,8), %r9
	xorl	%r11d, %r11d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%r11
	cmpq	%r10, %r11
	je	LBB0_8
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_5 Depth 2
	movl	(%r9,%r11,4), %ecx
	testl	%ecx, %ecx
	jle	LBB0_7
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%r8), %rdi
	movq	(%rdi,%r11,8), %rdi
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_5:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpl	%edx, (%rdi,%rbx,4)
	je	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_5 Depth=2
	incq	%rbx
	cmpq	%rbx, %rcx
	jne	LBB0_5
	jmp	LBB0_7
LBB0_6:
	leal	(%rsi,%r11,2), %eax
LBB0_8:
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_I5100_MAX_DIMM_SLOTS_PER_CHAN,4,2 ## @I5100_MAX_DIMM_SLOTS_PER_CHAN
	.no_dead_strip	_i5100_rank_to_slot
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function i5100_rank_to_slot
_i5100_rank_to_slot:                    ; @i5100_rank_to_slot
	.cfi_startproc
; %bb.0:
Lloh0:
	adrp	x8, _I5100_MAX_DIMM_SLOTS_PER_CHAN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _I5100_MAX_DIMM_SLOTS_PER_CHAN@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.1:
	mov	x9, #0
	ldr	x10, [x0]
	ldr	x11, [x10]
	ldr	x11, [x11, w1, sxtw #3]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x9, x9, #1
	cmp	x9, x8
	b.eq	LBB0_8
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_5 Depth 2
	ldr	w12, [x11, x9, lsl #2]
	cmp	w12, #1
	b.lt	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x13, [x10, #8]
	ldr	x13, [x13, x9, lsl #3]
LBB0_5:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w14, [x13]
	cmp	w14, w2
	b.eq	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=2
	add	x13, x13, #4
	subs	x12, x12, #1
	b.ne	LBB0_5
	b	LBB0_2
LBB0_7:
	add	w0, w1, w9, lsl #1
	ret
LBB0_8:
	mov	w0, #-1
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_I5100_MAX_DIMM_SLOTS_PER_CHAN,4,2 ; @I5100_MAX_DIMM_SLOTS_PER_CHAN
	.no_dead_strip	_i5100_rank_to_slot
.subsections_via_symbols
