	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function oob_reg_read
_oob_reg_read:                          ## @oob_reg_read
	.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
	movl	$119, %eax
	cmpl	%esi, (%rdi)
	jle	LBB0_6
## %bb.1:
	movl	%esi, %ebx
	movq	8(%rdi), %rax
	movq	_BRCMNAND_OOB_READ_BASE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rax,%rcx,8), %rsi
	cmpl	$16, %ebx
	jl	LBB0_4
## %bb.2:
	movq	_BRCMNAND_OOB_READ_10_BASE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rax,%rcx,8), %rax
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	leal	-16(%rbx), %ecx
	andl	$-4, %ecx
	addq	%rcx, %rax
	movq	%rax, %rsi
	jmp	LBB0_5
LBB0_4:
	movl	%ebx, %eax
	andl	$-4, %eax
	cltq
	addq	%rax, %rsi
LBB0_5:
	callq	_nand_readreg
	shll	$3, %ebx
	notb	%bl
	andb	$24, %bl
	movl	%ebx, %ecx
	sarl	%cl, %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BRCMNAND_OOB_READ_BASE,8,3     ## @BRCMNAND_OOB_READ_BASE
	.comm	_BRCMNAND_OOB_READ_10_BASE,8,3  ## @BRCMNAND_OOB_READ_10_BASE
	.no_dead_strip	_oob_reg_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function oob_reg_read
_oob_reg_read:                          ; @oob_reg_read
	.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
	ldr	w8, [x0]
	cmp	w8, w1
	b.le	LBB0_4
; %bb.1:
	mov	x19, x1
	ldr	x10, [x0, #8]
Lloh0:
	adrp	x8, _BRCMNAND_OOB_READ_BASE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BRCMNAND_OOB_READ_BASE@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	x8, [x10, x8, lsl #3]
	subs	w9, w1, #16
	b.lt	LBB0_5
; %bb.2:
Lloh3:
	adrp	x11, _BRCMNAND_OOB_READ_10_BASE@GOTPAGE
Lloh4:
	ldr	x11, [x11, _BRCMNAND_OOB_READ_10_BASE@GOTPAGEOFF]
Lloh5:
	ldr	x11, [x11]
	ldr	x10, [x10, x11, lsl #3]
	cbz	x10, LBB0_5
; %bb.3:
	and	w8, w9, #0xfffffffc
	add	x1, x10, x8
	b	LBB0_6
LBB0_4:
	mov	w0, #119
	b	LBB0_7
LBB0_5:
	and	w9, w19, #0xfffffffc
	add	x1, x8, w9, sxtw
LBB0_6:
	bl	_nand_readreg
	mov	w8, #24
	bic	w8, w8, w19, lsl #3
	asr	w0, w0, w8
LBB0_7:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_BRCMNAND_OOB_READ_BASE,8,3     ; @BRCMNAND_OOB_READ_BASE
	.comm	_BRCMNAND_OOB_READ_10_BASE,8,3  ; @BRCMNAND_OOB_READ_10_BASE
	.no_dead_strip	_oob_reg_read
.subsections_via_symbols
