	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function brcmnand_cs_offset
_brcmnand_cs_offset:                    ## @brcmnand_cs_offset
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	24(%rdi), %rax
	movq	_BRCMNAND_CS0_BASE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rax,%rcx,8), %r8
	testl	%esi, %esi
	je	LBB0_1
## %bb.5:
	movq	_BRCMNAND_CS1_BASE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rax,%rcx,8), %rax
	movl	%edx, %edx
	shlq	$3, %rdx
	addq	8(%rdi), %rdx
	xorl	%ecx, %ecx
	testq	%rax, %rax
	setne	%cl
	cmovneq	%rax, %r8
	subl	%ecx, %esi
	jmp	LBB0_4
LBB0_1:
	movq	16(%rdi), %rax
	testq	%rax, %rax
	jne	LBB0_3
## %bb.2:
	movq	8(%rdi), %rax
LBB0_3:
	movl	%edx, %ecx
	leaq	(%rax,%rcx,8), %rdx
LBB0_4:
	movslq	(%rdi), %rcx
	movslq	%esi, %rax
	imulq	%rcx, %rax
	addq	%r8, %rax
	addq	(%rdx), %rax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BRCMNAND_CS0_BASE,8,3          ## @BRCMNAND_CS0_BASE
	.comm	_BRCMNAND_CS1_BASE,8,3          ## @BRCMNAND_CS1_BASE
	.no_dead_strip	_brcmnand_cs_offset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function brcmnand_cs_offset
_brcmnand_cs_offset:                    ; @brcmnand_cs_offset
	.cfi_startproc
; %bb.0:
                                        ; kill: def $w1 killed $w1 def $x1
	ldr	x9, [x0, #24]
Lloh0:
	adrp	x8, _BRCMNAND_CS0_BASE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BRCMNAND_CS0_BASE@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	x8, [x9, x8, lsl #3]
	cbz	w1, LBB0_2
; %bb.1:
Lloh3:
	adrp	x10, _BRCMNAND_CS1_BASE@GOTPAGE
Lloh4:
	ldr	x10, [x10, _BRCMNAND_CS1_BASE@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	ldr	x10, [x9, x10, lsl #3]
	ldr	x9, [x0, #8]
	add	x9, x9, w2, uxtw #3
	cmp	x10, #0
	csel	x8, x8, x10, eq
	cset	w10, ne
	sub	w1, w1, w10
	b	LBB0_5
LBB0_2:
	ldr	x9, [x0, #16]
	cbnz	x9, LBB0_4
; %bb.3:
	ldr	x9, [x0, #8]
LBB0_4:
	add	x9, x9, w2, uxtw #3
LBB0_5:
	ldr	x9, [x9]
	ldrsw	x10, [x0]
	sxtw	x11, w1
	madd	x8, x10, x11, x8
	add	x0, x8, x9
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_BRCMNAND_CS0_BASE,8,3          ; @BRCMNAND_CS0_BASE
	.comm	_BRCMNAND_CS1_BASE,8,3          ; @BRCMNAND_CS1_BASE
	.no_dead_strip	_brcmnand_cs_offset
.subsections_via_symbols
