	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gd5fxgq4uexxg_ecc_get_status
_gd5fxgq4uexxg_ecc_get_status:          ## @gd5fxgq4uexxg_ecc_get_status
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	%rdi, %r14
	movq	_GD5FXGQ4UEXXG_REG_STATUS2@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-36(%rbp), %rsi
	callq	_SPINAND_GET_FEATURE_OP
	movl	%eax, -32(%rbp)
	movq	_STATUS_ECC_MASK@GOTPCREL(%rip), %r15
	movl	(%r15), %ecx
	andl	%ebx, %ecx
	addl	$-128, %ecx
	cmpl	$3, %ecx
	ja	LBB0_6
## %bb.1:
	xorl	%eax, %eax
	leaq	LJTI0_0(%rip), %rdx
	movslq	(%rdx,%rcx,4), %rcx
	addq	%rdx, %rcx
	jmpq	*%rcx
LBB0_5:
	movq	_EBADMSG@GOTPCREL(%rip), %rcx
	jmp	LBB0_7
LBB0_6:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_7:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_8
LBB0_4:
	movl	$8, %eax
	jmp	LBB0_8
LBB0_2:
	movl	(%r14), %edi
	leaq	-32(%rbp), %rsi
	callq	_spi_mem_exec_op
	testl	%eax, %eax
	jne	LBB0_8
## %bb.3:
	movl	(%r15), %eax
	andl	%eax, %ebx
	sarl	$2, %ebx
	andl	-36(%rbp), %eax
	sarl	$4, %eax
	orl	%ebx, %eax
LBB0_8:
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_5, LBB0_5-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_2, LBB0_2-LJTI0_0
LJTI0_0:
	.long	L0_0_set_5
	.long	L0_0_set_8
	.long	L0_0_set_4
	.long	L0_0_set_2
	.end_data_region
                                        ## -- End function
	.comm	_GD5FXGQ4UEXXG_REG_STATUS2,4,2  ## @GD5FXGQ4UEXXG_REG_STATUS2
	.comm	_STATUS_ECC_MASK,4,2            ## @STATUS_ECC_MASK
	.comm	_EBADMSG,4,2                    ## @EBADMSG
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_gd5fxgq4uexxg_ecc_get_status
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gd5fxgq4uexxg_ecc_get_status
_gd5fxgq4uexxg_ecc_get_status:          ; @gd5fxgq4uexxg_ecc_get_status
	.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, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _GD5FXGQ4UEXXG_REG_STATUS2@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GD5FXGQ4UEXXG_REG_STATUS2@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	add	x1, sp, #12
	bl	_SPINAND_GET_FEATURE_OP
	str	w0, [sp, #8]
Lloh3:
	adrp	x21, _STATUS_ECC_MASK@GOTPAGE
Lloh4:
	ldr	x21, [x21, _STATUS_ECC_MASK@GOTPAGEOFF]
	ldr	w8, [x21]
	and	w8, w8, w19
	sub	w8, w8, #128
	cmp	w8, #3
	b.hi	LBB0_3
; %bb.1:
	mov	w0, #0
Lloh5:
	adrp	x9, lJTI0_0@PAGE
Lloh6:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_2
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_2:
Lloh7:
	adrp	x8, _EBADMSG@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EBADMSG@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_8
LBB0_5:
	mov	w0, #8
	b	LBB0_8
LBB0_6:
	ldr	w0, [x20]
	add	x1, sp, #8
	bl	_spi_mem_exec_op
	cbnz	w0, LBB0_8
; %bb.7:
	ldr	w8, [x21]
	and	w9, w8, w19
	ldr	w10, [sp, #12]
	and	w8, w10, w8
	asr	w8, w8, #4
	orr	w0, w8, w9, asr #2
LBB0_8:
	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 AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_8-LBB0_2)>>2
	.byte	(LBB0_5-LBB0_2)>>2
	.byte	(LBB0_6-LBB0_2)>>2
                                        ; -- End function
	.comm	_GD5FXGQ4UEXXG_REG_STATUS2,4,2  ; @GD5FXGQ4UEXXG_REG_STATUS2
	.comm	_STATUS_ECC_MASK,4,2            ; @STATUS_ECC_MASK
	.comm	_EBADMSG,4,2                    ; @EBADMSG
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_gd5fxgq4uexxg_ecc_get_status
.subsections_via_symbols
