	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bcm47xxnflash_ops_bcm4706_read_byte
_bcm47xxnflash_ops_bcm4706_read_byte:   ## @bcm47xxnflash_ops_bcm4706_read_byte
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_nand_to_mtd
	movq	%rax, %r15
	movq	%rbx, %rdi
	callq	_nand_get_controller_data
	movq	16(%rax), %r14
	movl	$0, -28(%rbp)
	movl	(%rax), %esi
	cmpl	$128, %esi
	je	LBB0_6
## %bb.1:
	cmpl	$129, %esi
	je	LBB0_8
## %bb.2:
	cmpl	$130, %esi
	jne	LBB0_9
## %bb.3:
	movq	%rax, %rbx
	movl	4(%rax), %r14d
	movq	8(%rax), %rdi
	callq	_ARRAY_SIZE
	cmpl	%eax, %r14d
	jge	LBB0_4
## %bb.5:
	movq	8(%rbx), %rax
	movslq	4(%rbx), %rcx
	leal	1(%rcx), %edx
	movl	%edx, 4(%rbx)
	movl	(%rax,%rcx,4), %eax
	jmp	LBB0_11
LBB0_6:
	movq	_NCTL_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_bcm47xxnflash_ops_bcm4706_ctl_cmd
	movl	%eax, %ecx
	xorl	%eax, %eax
	testl	%ecx, %ecx
	jne	LBB0_11
## %bb.7:
	movq	_BCMA_CC_NFLASH_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_bcma_cc_read32
	movzbl	%al, %eax
	jmp	LBB0_11
LBB0_8:
	leaq	-28(%rbp), %rsi
	movq	%r15, %rdi
	movl	$4, %edx
	callq	_bcm47xxnflash_ops_bcm4706_read
	movzbl	-28(%rbp), %eax
	jmp	LBB0_11
LBB0_9:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_10
LBB0_4:
	movl	4(%rbx), %esi
	leaq	L_.str(%rip), %rdi
LBB0_10:
	callq	_pr_err
	xorl	%eax, %eax
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Requested invalid id_data: %d\n"

	.comm	_NCTL_READ,4,2                  ## @NCTL_READ
	.comm	_BCMA_CC_NFLASH_DATA,4,2        ## @BCMA_CC_NFLASH_DATA
L_.str.1:                               ## @.str.1
	.asciz	"Invalid command for byte read: 0x%X\n"

	.no_dead_strip	_bcm47xxnflash_ops_bcm4706_read_byte
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bcm47xxnflash_ops_bcm4706_read_byte
_bcm47xxnflash_ops_bcm4706_read_byte:   ; @bcm47xxnflash_ops_bcm4706_read_byte
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x0
	bl	_nand_to_mtd
	mov	x20, x0
	mov	x0, x19
	bl	_nand_get_controller_data
	ldr	x21, [x0, #16]
	str	wzr, [sp, #12]
	ldr	w1, [x0]
	cmp	w1, #128
	b.eq	LBB0_5
; %bb.1:
	cmp	w1, #129
	b.eq	LBB0_7
; %bb.2:
	cmp	w1, #130
	b.ne	LBB0_8
; %bb.3:
	mov	x19, x0
	ldr	w20, [x0, #4]
	ldr	x0, [x0, #8]
	bl	_ARRAY_SIZE
	cmp	w20, w0
	b.ge	LBB0_9
; %bb.4:
	ldr	x8, [x19, #8]
	ldrsw	x9, [x19, #4]
	add	w10, w9, #1
	str	w10, [x19, #4]
	ldr	w0, [x8, x9, lsl #2]
	b	LBB0_12
LBB0_5:
Lloh0:
	adrp	x8, _NCTL_READ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NCTL_READ@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_bcm47xxnflash_ops_bcm4706_ctl_cmd
	cbnz	w0, LBB0_11
; %bb.6:
Lloh3:
	adrp	x8, _BCMA_CC_NFLASH_DATA@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BCMA_CC_NFLASH_DATA@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_bcma_cc_read32
	and	w0, w0, #0xff
	b	LBB0_12
LBB0_7:
	add	x1, sp, #12
	mov	x0, x20
	mov	w2, #4
	bl	_bcm47xxnflash_ops_bcm4706_read
	ldrb	w0, [sp, #12]
	b	LBB0_12
LBB0_8:
Lloh6:
	adrp	x0, l_.str.1@PAGE
Lloh7:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_10
LBB0_9:
	ldr	w1, [x19, #4]
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
LBB0_10:
	bl	_pr_err
LBB0_11:
	mov	w0, #0
LBB0_12:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Requested invalid id_data: %d\n"

	.comm	_NCTL_READ,4,2                  ; @NCTL_READ
	.comm	_BCMA_CC_NFLASH_DATA,4,2        ; @BCMA_CC_NFLASH_DATA
l_.str.1:                               ; @.str.1
	.asciz	"Invalid command for byte read: 0x%X\n"

	.no_dead_strip	_bcm47xxnflash_ops_bcm4706_read_byte
.subsections_via_symbols
