	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function oob_reg_write
_oob_reg_write:                         ## @oob_reg_write
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
                                        ## kill: def $esi killed $esi def $rsi
	cmpl	%esi, (%rdi)
	jle	LBB0_6
## %bb.1:
	movq	8(%rdi), %rcx
	movq	_BRCMNAND_OOB_WRITE_BASE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rcx,%rax,8), %r8
	cmpl	$16, %esi
	jl	LBB0_4
## %bb.2:
	movq	_BRCMNAND_OOB_WRITE_10_BASE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rcx,%rax,8), %rcx
	testq	%rcx, %rcx
	je	LBB0_4
## %bb.3:
	addl	$-16, %esi
	andl	$-4, %esi
	addq	%rsi, %rcx
	movq	%rcx, %r8
	jmp	LBB0_5
LBB0_6:
	popq	%rbp
	retq
LBB0_4:
	andl	$-4, %esi
	movslq	%esi, %rax
	addq	%rax, %r8
LBB0_5:
	movq	%r8, %rsi
	popq	%rbp
	jmp	_nand_writereg                  ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_BRCMNAND_OOB_WRITE_BASE,8,3    ## @BRCMNAND_OOB_WRITE_BASE
	.comm	_BRCMNAND_OOB_WRITE_10_BASE,8,3 ## @BRCMNAND_OOB_WRITE_10_BASE
	.no_dead_strip	_oob_reg_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function oob_reg_write
_oob_reg_write:                         ; @oob_reg_write
	.cfi_startproc
; %bb.0:
	ldr	w8, [x0]
	cmp	w8, w1
	b.le	LBB0_4
; %bb.1:
	ldr	x10, [x0, #8]
Lloh0:
	adrp	x8, _BRCMNAND_OOB_WRITE_BASE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BRCMNAND_OOB_WRITE_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_WRITE_10_BASE@GOTPAGE
Lloh4:
	ldr	x11, [x11, _BRCMNAND_OOB_WRITE_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	_nand_writereg
LBB0_4:
	ret
LBB0_5:
	and	w9, w1, #0xfffffffc
	add	x1, x8, w9, sxtw
	b	_nand_writereg
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_BRCMNAND_OOB_WRITE_BASE,8,3    ; @BRCMNAND_OOB_WRITE_BASE
	.comm	_BRCMNAND_OOB_WRITE_10_BASE,8,3 ; @BRCMNAND_OOB_WRITE_10_BASE
	.no_dead_strip	_oob_reg_write
.subsections_via_symbols
