	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sharpsl_nand_get_logical_num
_sharpsl_nand_get_logical_num:          ## @sharpsl_nand_get_logical_num
	.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
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	_NAND_NOOB_LOGADDR_00@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movl	(%rdi,%rdx,4), %r9d
	movq	_NAND_NOOB_LOGADDR_10@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movl	(%rdi,%rsi,4), %ebx
	cmpl	%ebx, %r9d
	jne	LBB0_2
## %bb.1:
	movq	_NAND_NOOB_LOGADDR_01@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movl	(%rdi,%rcx,4), %r8d
	movq	_NAND_NOOB_LOGADDR_11@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpl	(%rdi,%rax,4), %r8d
	je	LBB0_7
LBB0_2:
	movq	_NAND_NOOB_LOGADDR_20@GOTPCREL(%rip), %rax
	movq	(%rax), %r8
	movl	(%rdi,%r8,4), %eax
	cmpl	%eax, %ebx
	jne	LBB0_4
## %bb.3:
	movq	_NAND_NOOB_LOGADDR_11@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rdi,%rcx,4), %r10d
	movq	_NAND_NOOB_LOGADDR_21@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rbx
	movq	%rsi, %rdx
	cmpl	(%rdi,%rbx,4), %r10d
	je	LBB0_7
LBB0_4:
	cmpl	%r9d, %eax
	jne	LBB0_6
## %bb.5:
	movq	_NAND_NOOB_LOGADDR_21@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movl	(%rdi,%rcx,4), %eax
	movq	_NAND_NOOB_LOGADDR_01@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rsi
	movq	%r8, %rdx
	cmpl	(%rdi,%rsi,4), %eax
	jne	LBB0_6
LBB0_7:
	movslq	%edx, %rax
	movslq	%ecx, %rcx
	movl	(%rdi,%rcx,4), %ebx
	shll	$8, %ebx
	orl	(%rdi,%rax,4), %ebx
	movl	%ebx, %edi
	callq	_hweight16
	movq	_BLOCK_UNMASK_COMPLEMENT@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_8
LBB0_6:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_10:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_8:
	movq	_BLOCK_IS_RESERVED@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	je	LBB0_10
## %bb.9:
	sarl	%ebx
	movl	$9, %edi
	xorl	%esi, %esi
	callq	_GENMASK
	andl	%eax, %ebx
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_NAND_NOOB_LOGADDR_00,8,3       ## @NAND_NOOB_LOGADDR_00
	.comm	_NAND_NOOB_LOGADDR_10,8,3       ## @NAND_NOOB_LOGADDR_10
	.comm	_NAND_NOOB_LOGADDR_01,8,3       ## @NAND_NOOB_LOGADDR_01
	.comm	_NAND_NOOB_LOGADDR_11,8,3       ## @NAND_NOOB_LOGADDR_11
	.comm	_NAND_NOOB_LOGADDR_20,8,3       ## @NAND_NOOB_LOGADDR_20
	.comm	_NAND_NOOB_LOGADDR_21,8,3       ## @NAND_NOOB_LOGADDR_21
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_BLOCK_UNMASK_COMPLEMENT,4,2    ## @BLOCK_UNMASK_COMPLEMENT
	.comm	_BLOCK_IS_RESERVED,4,2          ## @BLOCK_IS_RESERVED
	.no_dead_strip	_sharpsl_nand_get_logical_num
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sharpsl_nand_get_logical_num
_sharpsl_nand_get_logical_num:          ; @sharpsl_nand_get_logical_num
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x8, _NAND_NOOB_LOGADDR_00@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NAND_NOOB_LOGADDR_00@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	w10, [x0, x8, lsl #2]
Lloh3:
	adrp	x9, _NAND_NOOB_LOGADDR_10@GOTPAGE
Lloh4:
	ldr	x9, [x9, _NAND_NOOB_LOGADDR_10@GOTPAGEOFF]
Lloh5:
	ldr	x11, [x9]
	ldr	w12, [x0, x11, lsl #2]
	cmp	w10, w12
	b.ne	LBB0_2
; %bb.1:
Lloh6:
	adrp	x9, _NAND_NOOB_LOGADDR_01@GOTPAGE
Lloh7:
	ldr	x9, [x9, _NAND_NOOB_LOGADDR_01@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	ldr	w13, [x0, x9, lsl #2]
Lloh9:
	adrp	x14, _NAND_NOOB_LOGADDR_11@GOTPAGE
Lloh10:
	ldr	x14, [x14, _NAND_NOOB_LOGADDR_11@GOTPAGEOFF]
Lloh11:
	ldr	x14, [x14]
	ldr	w14, [x0, x14, lsl #2]
	cmp	w13, w14
	b.eq	LBB0_7
LBB0_2:
Lloh12:
	adrp	x8, _NAND_NOOB_LOGADDR_20@GOTPAGE
Lloh13:
	ldr	x8, [x8, _NAND_NOOB_LOGADDR_20@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	ldr	w13, [x0, x8, lsl #2]
	cmp	w12, w13
	b.ne	LBB0_5
; %bb.3:
Lloh15:
	adrp	x9, _NAND_NOOB_LOGADDR_11@GOTPAGE
Lloh16:
	ldr	x9, [x9, _NAND_NOOB_LOGADDR_11@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	ldr	w12, [x0, x9, lsl #2]
Lloh18:
	adrp	x14, _NAND_NOOB_LOGADDR_21@GOTPAGE
Lloh19:
	ldr	x14, [x14, _NAND_NOOB_LOGADDR_21@GOTPAGEOFF]
Lloh20:
	ldr	x14, [x14]
	ldr	w14, [x0, x14, lsl #2]
	cmp	w12, w14
	b.ne	LBB0_5
; %bb.4:
	mov	x8, x11
	b	LBB0_7
LBB0_5:
	cmp	w13, w10
	b.ne	LBB0_8
; %bb.6:
Lloh21:
	adrp	x9, _NAND_NOOB_LOGADDR_21@GOTPAGE
Lloh22:
	ldr	x9, [x9, _NAND_NOOB_LOGADDR_21@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
	ldr	w10, [x0, x9, lsl #2]
Lloh24:
	adrp	x11, _NAND_NOOB_LOGADDR_01@GOTPAGE
Lloh25:
	ldr	x11, [x11, _NAND_NOOB_LOGADDR_01@GOTPAGEOFF]
Lloh26:
	ldr	x11, [x11]
	ldr	w11, [x0, x11, lsl #2]
	cmp	w10, w11
	b.ne	LBB0_8
LBB0_7:
	sbfiz	x8, x8, #2, #32
	ldr	w8, [x0, x8]
	sbfiz	x9, x9, #2, #32
	ldr	w9, [x0, x9]
	orr	w19, w8, w9, lsl #8
	mov	x0, x19
	bl	_hweight16
Lloh27:
	adrp	x8, _BLOCK_UNMASK_COMPLEMENT@GOTPAGE
Lloh28:
	ldr	x8, [x8, _BLOCK_UNMASK_COMPLEMENT@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_10
LBB0_8:
Lloh30:
	adrp	x8, _EINVAL@GOTPAGE
Lloh31:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
	neg	w19, w8
LBB0_9:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_10:
Lloh33:
	adrp	x8, _BLOCK_IS_RESERVED@GOTPAGE
Lloh34:
	ldr	x8, [x8, _BLOCK_IS_RESERVED@GOTPAGEOFF]
Lloh35:
	ldr	w8, [x8]
	cmp	w19, w8
	b.eq	LBB0_9
; %bb.11:
	mov	w0, #9
	mov	w1, #0
	bl	_GENMASK
	and	w19, w0, w19, asr #1
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_NAND_NOOB_LOGADDR_00,8,3       ; @NAND_NOOB_LOGADDR_00
	.comm	_NAND_NOOB_LOGADDR_10,8,3       ; @NAND_NOOB_LOGADDR_10
	.comm	_NAND_NOOB_LOGADDR_01,8,3       ; @NAND_NOOB_LOGADDR_01
	.comm	_NAND_NOOB_LOGADDR_11,8,3       ; @NAND_NOOB_LOGADDR_11
	.comm	_NAND_NOOB_LOGADDR_20,8,3       ; @NAND_NOOB_LOGADDR_20
	.comm	_NAND_NOOB_LOGADDR_21,8,3       ; @NAND_NOOB_LOGADDR_21
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_BLOCK_UNMASK_COMPLEMENT,4,2    ; @BLOCK_UNMASK_COMPLEMENT
	.comm	_BLOCK_IS_RESERVED,4,2          ; @BLOCK_IS_RESERVED
	.no_dead_strip	_sharpsl_nand_get_logical_num
.subsections_via_symbols
