	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function toshiba_nand_decode_id
_toshiba_nand_decode_id:                ## @toshiba_nand_decode_id
	.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, %r14
	movq	%rbx, %rdi
	callq	_nanddev_get_memorg
	movq	%rax, %r15
	movq	%rbx, %rdi
	callq	_nand_decode_ext_id
	cmpl	$6, 8(%rbx)
	jl	LBB0_14
## %bb.1:
	movq	%rbx, %rdi
	callq	_nand_is_slc
	testq	%rax, %rax
	je	LBB0_5
## %bb.2:
	movq	16(%rbx), %rax
	movl	20(%rax), %ecx
	andl	$7, %ecx
	cmpl	$6, %ecx
	jne	LBB0_5
## %bb.3:
	testb	$-128, 16(%rax)
	jne	LBB0_5
## %bb.4:
	movl	4(%r15), %eax
	sarl	$4, %eax
	movl	%eax, (%r15)
	movl	%eax, (%r14)
LBB0_5:
	cmpl	$6, 8(%rbx)
	jl	LBB0_14
## %bb.6:
	movq	%rbx, %rdi
	callq	_nand_is_slc
	testq	%rax, %rax
	je	LBB0_14
## %bb.7:
	movl	$512, (%rbx)                    ## imm = 0x200
	movq	16(%rbx), %rax
	movl	20(%rax), %eax
	andl	$7, %eax
	cmpl	$6, %eax
	je	LBB0_12
## %bb.8:
	cmpl	$5, %eax
	je	LBB0_11
## %bb.9:
	cmpl	$4, %eax
	jne	LBB0_13
## %bb.10:
	movl	$1, 4(%rbx)
	jmp	LBB0_14
LBB0_12:
	movl	$8, 4(%rbx)
	jmp	LBB0_14
LBB0_11:
	movl	$4, 4(%rbx)
	jmp	LBB0_14
LBB0_13:
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	callq	_WARN
	movl	$0, (%rbx)
LBB0_14:
	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	"Could not get ECC info"

	.no_dead_strip	_toshiba_nand_decode_id
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function toshiba_nand_decode_id
_toshiba_nand_decode_id:                ; @toshiba_nand_decode_id
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	_nanddev_get_memorg
	mov	x21, x0
	mov	x0, x19
	bl	_nand_decode_ext_id
	ldr	w8, [x19, #8]
	cmp	w8, #6
	b.lt	LBB0_14
; %bb.1:
	mov	x0, x19
	bl	_nand_is_slc
	cbz	x0, LBB0_5
; %bb.2:
	ldr	x8, [x19, #16]
	ldr	w9, [x8, #20]
	and	w9, w9, #0x7
	cmp	w9, #6
	b.ne	LBB0_5
; %bb.3:
	ldrb	w8, [x8, #16]
	tbnz	w8, #7, LBB0_5
; %bb.4:
	ldr	w8, [x21, #4]
	asr	w8, w8, #4
	str	w8, [x21]
	str	w8, [x20]
LBB0_5:
	ldr	w8, [x19, #8]
	cmp	w8, #6
	b.lt	LBB0_14
; %bb.6:
	mov	x0, x19
	bl	_nand_is_slc
	cbz	x0, LBB0_14
; %bb.7:
	mov	w8, #512
	str	w8, [x19]
	ldr	x8, [x19, #16]
	ldr	w8, [x8, #20]
	and	w8, w8, #0x7
	cmp	w8, #6
	b.eq	LBB0_11
; %bb.8:
	cmp	w8, #5
	b.eq	LBB0_12
; %bb.9:
	cmp	w8, #4
	b.ne	LBB0_13
; %bb.10:
	mov	w8, #1
	str	w8, [x19, #4]
	b	LBB0_14
LBB0_11:
	mov	w8, #8
	str	w8, [x19, #4]
	b	LBB0_14
LBB0_12:
	mov	w8, #4
	str	w8, [x19, #4]
	b	LBB0_14
LBB0_13:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_WARN
	str	wzr, [x19]
LBB0_14:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Could not get ECC info"

	.no_dead_strip	_toshiba_nand_decode_id
.subsections_via_symbols
