	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hynix_nand_extract_oobsize
_hynix_nand_extract_oobsize:            ## @hynix_nand_extract_oobsize
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r12d
	movq	%rdi, %rbx
	callq	_nand_to_mtd
	movq	%rax, %r14
	leaq	8(%rbx), %rdi
	callq	_nanddev_get_memorg
	movq	%rax, %r15
	movq	(%rbx), %rax
	movl	12(%rax), %ecx
	movl	%ecx, %edx
	shrl	$2, %edx
	andl	$3, %edx
	shrl	$4, %ecx
	andl	$4, %ecx
	orl	%edx, %ecx
	testl	%r12d, %r12d
	je	LBB0_8
## %bb.1:
	cmpl	$3, %ecx
	ja	LBB0_7
## %bb.2:
	movl	%ecx, %eax
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_3:
	movl	$2048, (%r15)                   ## imm = 0x800
	jmp	LBB0_20
LBB0_8:
	cmpl	$6, %ecx
	ja	LBB0_17
## %bb.9:
	movl	%ecx, %ecx
	leaq	LJTI0_1(%rip), %rdx
	movslq	(%rdx,%rcx,4), %rcx
	addq	%rdx, %rcx
	jmpq	*%rcx
LBB0_10:
	movl	$128, (%r15)
	cmpl	$222, 4(%rax)
	je	LBB0_19
	jmp	LBB0_20
LBB0_7:
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	callq	_WARN
	jmp	LBB0_20
LBB0_4:
	movl	$1664, (%r15)                   ## imm = 0x680
	jmp	LBB0_20
LBB0_5:
	movl	$1024, (%r15)                   ## imm = 0x400
	jmp	LBB0_20
LBB0_6:
	movl	$640, (%r15)                    ## imm = 0x280
	jmp	LBB0_20
LBB0_17:
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	callq	_WARN
	movq	(%rbx), %rax
	cmpl	$222, 4(%rax)
	je	LBB0_19
	jmp	LBB0_20
LBB0_11:
	movl	$224, (%r15)
	cmpl	$222, 4(%rax)
	je	LBB0_19
	jmp	LBB0_20
LBB0_12:
	movl	$448, (%r15)                    ## imm = 0x1C0
	cmpl	$222, 4(%rax)
	je	LBB0_19
	jmp	LBB0_20
LBB0_13:
	movl	$64, (%r15)
	cmpl	$222, 4(%rax)
	je	LBB0_19
	jmp	LBB0_20
LBB0_14:
	movl	$32, (%r15)
	cmpl	$222, 4(%rax)
	je	LBB0_19
	jmp	LBB0_20
LBB0_15:
	movl	$16, (%r15)
	cmpl	$222, 4(%rax)
	je	LBB0_19
	jmp	LBB0_20
LBB0_16:
	movl	$640, (%r15)                    ## imm = 0x280
	cmpl	$222, 4(%rax)
	jne	LBB0_20
LBB0_19:
	movl	4(%r15), %eax
	movq	_SZ_8K@GOTPCREL(%rip), %rcx
	cltd
	idivl	(%rcx)
	imull	(%r15), %eax
	movl	%eax, (%r15)
LBB0_20:
	movl	(%r15), %eax
	movl	%eax, (%r14)
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_3, LBB0_3-LJTI0_0
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_5, LBB0_5-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
LJTI0_0:
	.long	L0_0_set_3
	.long	L0_0_set_4
	.long	L0_0_set_5
	.long	L0_0_set_6
.set L0_1_set_10, LBB0_10-LJTI0_1
.set L0_1_set_11, LBB0_11-LJTI0_1
.set L0_1_set_12, LBB0_12-LJTI0_1
.set L0_1_set_13, LBB0_13-LJTI0_1
.set L0_1_set_14, LBB0_14-LJTI0_1
.set L0_1_set_15, LBB0_15-LJTI0_1
.set L0_1_set_16, LBB0_16-LJTI0_1
LJTI0_1:
	.long	L0_1_set_10
	.long	L0_1_set_11
	.long	L0_1_set_12
	.long	L0_1_set_13
	.long	L0_1_set_14
	.long	L0_1_set_15
	.long	L0_1_set_16
	.end_data_region
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid OOB size"

	.comm	_SZ_8K,4,2                      ## @SZ_8K
	.no_dead_strip	_hynix_nand_extract_oobsize
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hynix_nand_extract_oobsize
_hynix_nand_extract_oobsize:            ; @hynix_nand_extract_oobsize
	.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	x22, x1
	mov	x21, x0
	bl	_nand_to_mtd
	mov	x19, x0
	add	x0, x21, #8
	bl	_nanddev_get_memorg
	mov	x20, x0
	ldr	x8, [x21]
	ldr	w10, [x8, #12]
	lsr	w9, w10, #4
	and	w9, w9, #0x4
	bfxil	w9, w10, #2, #2
	cbz	w22, LBB0_4
; %bb.1:
	cmp	w9, #3
	b.hi	LBB0_7
; %bb.2:
Lloh0:
	adrp	x8, lJTI0_0@PAGE
Lloh1:
	add	x8, x8, lJTI0_0@PAGEOFF
	adr	x10, LBB0_3
	ldrb	w11, [x8, x9]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_3:
	mov	w8, #2048
	b	LBB0_21
LBB0_4:
	cmp	w9, #6
	b.hi	LBB0_11
; %bb.5:
Lloh2:
	adrp	x10, lJTI0_1@PAGE
Lloh3:
	add	x10, x10, lJTI0_1@PAGEOFF
	adr	x11, LBB0_6
	ldrb	w12, [x10, x9]
	add	x11, x11, x12, lsl #2
	br	x11
LBB0_6:
	mov	w9, #128
	b	LBB0_18
LBB0_7:
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_WARN
	b	LBB0_22
LBB0_8:
	mov	w8, #1664
	b	LBB0_21
LBB0_9:
	mov	w8, #1024
	b	LBB0_21
LBB0_10:
	mov	w8, #640
	b	LBB0_21
LBB0_11:
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_WARN
	ldr	x8, [x21]
	b	LBB0_19
LBB0_12:
	mov	w9, #224
	b	LBB0_18
LBB0_13:
	mov	w9, #448
	b	LBB0_18
LBB0_14:
	mov	w9, #64
	b	LBB0_18
LBB0_15:
	mov	w9, #32
	b	LBB0_18
LBB0_16:
	mov	w9, #16
	b	LBB0_18
LBB0_17:
	mov	w9, #640
LBB0_18:
	str	w9, [x20]
LBB0_19:
	ldr	w8, [x8, #4]
	cmp	w8, #222
	b.ne	LBB0_22
; %bb.20:
Lloh8:
	adrp	x8, _SZ_8K@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SZ_8K@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	ldp	w10, w9, [x20]
	sdiv	w8, w9, w8
	mul	w8, w10, w8
LBB0_21:
	str	w8, [x20]
LBB0_22:
	ldr	w8, [x20]
	str	w8, [x19]
	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
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_3-LBB0_3)>>2
	.byte	(LBB0_8-LBB0_3)>>2
	.byte	(LBB0_9-LBB0_3)>>2
	.byte	(LBB0_10-LBB0_3)>>2
lJTI0_1:
	.byte	(LBB0_6-LBB0_6)>>2
	.byte	(LBB0_12-LBB0_6)>>2
	.byte	(LBB0_13-LBB0_6)>>2
	.byte	(LBB0_14-LBB0_6)>>2
	.byte	(LBB0_15-LBB0_6)>>2
	.byte	(LBB0_16-LBB0_6)>>2
	.byte	(LBB0_17-LBB0_6)>>2
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid OOB size"

	.comm	_SZ_8K,4,2                      ; @SZ_8K
	.no_dead_strip	_hynix_nand_extract_oobsize
.subsections_via_symbols
