	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hynix_nand_extract_ecc_requirements
_hynix_nand_extract_ecc_requirements:   ## @hynix_nand_extract_ecc_requirements
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	8(%rdi), %rax
	movl	16(%rax), %ecx
	shrl	$4, %ecx
	andl	$7, %ecx
	testl	%esi, %esi
	je	LBB0_4
## %bb.1:
	movl	$1024, (%rdi)                   ## imm = 0x400
	cmpl	$6, %ecx
	ja	LBB0_13
## %bb.2:
	movl	%ecx, %eax
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_14:
	movl	$4, 4(%rdi)
	popq	%rbp
	retq
LBB0_4:
	movl	20(%rax), %eax
	andl	$7, %eax
	cmpl	$2, %eax
	ja	LBB0_7
## %bb.5:
	cmpl	$4, %ecx
	ja	LBB0_11
## %bb.6:
	movl	$512, (%rdi)                    ## imm = 0x200
	jmp	LBB0_10
LBB0_7:
	testl	%ecx, %ecx
	je	LBB0_3
## %bb.8:
	cmpl	$4, %ecx
	ja	LBB0_21
## %bb.9:
	movl	$512, (%rdi)                    ## imm = 0x200
	decb	%cl
LBB0_10:
	movl	$1, %eax
                                        ## kill: def $cl killed $cl killed $rcx
	shll	%cl, %eax
	jmp	LBB0_22
LBB0_3:
	movq	$0, (%rdi)
	popq	%rbp
	retq
LBB0_11:
	cmpl	$5, %ecx
	je	LBB0_23
## %bb.12:
	cmpl	$7, %ecx
	jne	LBB0_24
LBB0_13:
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	popq	%rbp
	jmp	_WARN                           ## TAILCALL
LBB0_16:
	movl	$32, 4(%rdi)
	popq	%rbp
	retq
LBB0_17:
	movl	$40, 4(%rdi)
	popq	%rbp
	retq
LBB0_18:
	movl	$50, 4(%rdi)
	popq	%rbp
	retq
LBB0_19:
	movl	$60, 4(%rdi)
	popq	%rbp
	retq
LBB0_21:
	movl	$1024, (%rdi)                   ## imm = 0x400
	leal	-16(,%rcx,8), %eax
LBB0_22:
	movl	%eax, 4(%rdi)
	popq	%rbp
	retq
LBB0_23:
	movl	$2048, %eax                     ## imm = 0x800
	jmp	LBB0_25
LBB0_24:
	movl	$1024, %eax                     ## imm = 0x400
LBB0_25:
	movl	%eax, (%rdi)
LBB0_15:
	movl	$24, 4(%rdi)
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_3, LBB0_3-LJTI0_0
.set L0_0_set_14, LBB0_14-LJTI0_0
.set L0_0_set_15, LBB0_15-LJTI0_0
.set L0_0_set_16, LBB0_16-LJTI0_0
.set L0_0_set_17, LBB0_17-LJTI0_0
.set L0_0_set_18, LBB0_18-LJTI0_0
.set L0_0_set_19, LBB0_19-LJTI0_0
LJTI0_0:
	.long	L0_0_set_3
	.long	L0_0_set_14
	.long	L0_0_set_15
	.long	L0_0_set_16
	.long	L0_0_set_17
	.long	L0_0_set_18
	.long	L0_0_set_19
	.end_data_region
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid ECC requirements"

	.no_dead_strip	_hynix_nand_extract_ecc_requirements
.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_ecc_requirements
_hynix_nand_extract_ecc_requirements:   ; @hynix_nand_extract_ecc_requirements
	.cfi_startproc
; %bb.0:
	ldr	x9, [x0, #8]
	ldr	w8, [x9, #16]
	ubfx	w8, w8, #4, #3
	cbz	w1, LBB0_4
; %bb.1:
	mov	w9, #1024
	str	w9, [x0]
	cmp	w8, #6
	b.hi	LBB0_13
; %bb.2:
Lloh0:
	adrp	x9, lJTI0_0@PAGE
Lloh1:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_3
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_3:
	mov	w8, #4
	str	w8, [x0, #4]
	ret
LBB0_4:
	ldr	w9, [x9, #20]
	and	w9, w9, #0x7
	cmp	w9, #2
	b.hi	LBB0_7
; %bb.5:
	cmp	w8, #4
	b.hi	LBB0_11
; %bb.6:
	mov	w9, #512
	mov	w10, #1
	lsl	w8, w10, w8
	stp	w9, w8, [x0]
	ret
LBB0_7:
	cbz	w8, LBB0_10
; %bb.8:
	cmp	w8, #4
	b.hi	LBB0_19
; %bb.9:
	mov	w9, #512
	sub	w8, w8, #1
	mov	w10, #1
	lsl	w8, w10, w8
	stp	w9, w8, [x0]
	ret
LBB0_10:
	str	xzr, [x0]
	ret
LBB0_11:
	cmp	w8, #5
	b.eq	LBB0_20
; %bb.12:
	cmp	w8, #7
	b.ne	LBB0_21
LBB0_13:
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	b	_WARN
LBB0_14:
	mov	w8, #24
	str	w8, [x0, #4]
	ret
LBB0_15:
	mov	w8, #32
	str	w8, [x0, #4]
	ret
LBB0_16:
	mov	w8, #40
	str	w8, [x0, #4]
	ret
LBB0_17:
	mov	w8, #50
	str	w8, [x0, #4]
	ret
LBB0_18:
	mov	w8, #60
	str	w8, [x0, #4]
	ret
LBB0_19:
	mov	w9, #1024
	lsl	w8, w8, #3
	sub	w8, w8, #16
	stp	w9, w8, [x0]
	ret
LBB0_20:
	mov	w8, #2048
	b	LBB0_22
LBB0_21:
	mov	w8, #1024
LBB0_22:
	mov	w9, #24
	stp	w8, w9, [x0]
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_10-LBB0_3)>>2
	.byte	(LBB0_3-LBB0_3)>>2
	.byte	(LBB0_14-LBB0_3)>>2
	.byte	(LBB0_15-LBB0_3)>>2
	.byte	(LBB0_16-LBB0_3)>>2
	.byte	(LBB0_17-LBB0_3)>>2
	.byte	(LBB0_18-LBB0_3)>>2
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid ECC requirements"

	.no_dead_strip	_hynix_nand_extract_ecc_requirements
.subsections_via_symbols
