	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nxp_spifi_setup_memory_cmd
_nxp_spifi_setup_memory_cmd:            ## @nxp_spifi_setup_memory_cmd
	.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
	movl	4(%rdi), %eax
	addl	$-128, %eax
	cmpl	$3, %eax
	jae	LBB0_1
## %bb.2:
	cltq
	leaq	l_switch.table.nxp_spifi_setup_memory_cmd(%rip), %rcx
	movq	(%rcx,%rax,8), %rax
	movl	(%rax), %eax
	movl	%eax, (%rbx)
	movl	8(%rbx), %eax
	addl	$-5, %eax
	cmpl	$-5, %eax
	jbe	LBB0_3
## %bb.4:
	movl	16(%rbx), %edi
	callq	_SPIFI_CMD_OPCODE
	movl	%eax, %r14d
	movl	12(%rbx), %eax
	leal	7(%rax), %edi
	testl	%eax, %eax
	cmovnsl	%eax, %edi
	sarl	$3, %edi
	callq	_SPIFI_CMD_INTLEN
	movl	%eax, %r15d
	movl	8(%rbx), %edi
	incl	%edi
	callq	_SPIFI_CMD_FRAMEFORM
	orl	%r14d, %eax
	orl	%r15d, %eax
	orl	%eax, (%rbx)
	xorl	%eax, %eax
	jmp	LBB0_5
LBB0_1:
	movl	20(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
LBB0_3:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SPIFI_CMD_FIELDFORM_ALL_SERIAL,4,2 ## @SPIFI_CMD_FIELDFORM_ALL_SERIAL
	.comm	_SPIFI_CMD_FIELDFORM_QUAD_DUAL_DATA,4,2 ## @SPIFI_CMD_FIELDFORM_QUAD_DUAL_DATA
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unsupported SPI read mode\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_nxp_spifi_setup_memory_cmd
	.section	__DATA,__const
	.p2align	3                               ## @switch.table.nxp_spifi_setup_memory_cmd
l_switch.table.nxp_spifi_setup_memory_cmd:
	.quad	_SPIFI_CMD_FIELDFORM_QUAD_DUAL_DATA
	.quad	_SPIFI_CMD_FIELDFORM_QUAD_DUAL_DATA
	.quad	_SPIFI_CMD_FIELDFORM_ALL_SERIAL

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nxp_spifi_setup_memory_cmd
_nxp_spifi_setup_memory_cmd:            ; @nxp_spifi_setup_memory_cmd
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	w8, [x0, #4]
	sub	w8, w8, #128
	cmp	w8, #3
	b.hs	LBB0_3
; %bb.1:
Lloh0:
	adrp	x9, l_switch.table.nxp_spifi_setup_memory_cmd@PAGE
Lloh1:
	add	x9, x9, l_switch.table.nxp_spifi_setup_memory_cmd@PAGEOFF
	ldr	x8, [x9, w8, sxtw #3]
	ldr	w8, [x8]
	str	w8, [x19]
	ldr	w8, [x19, #8]
	sub	w8, w8, #5
	cmn	w8, #5
	b.ls	LBB0_4
; %bb.2:
	ldr	w0, [x19, #16]
	bl	_SPIFI_CMD_OPCODE
	mov	x20, x0
	ldr	w8, [x19, #12]
	add	w9, w8, #7
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w0, w8, #3
	bl	_SPIFI_CMD_INTLEN
	orr	w20, w0, w20
	ldr	w8, [x19, #8]
	add	w0, w8, #1
	bl	_SPIFI_CMD_FRAMEFORM
	mov	x8, x0
	mov	w0, #0
	orr	w8, w20, w8
	ldr	w9, [x19]
	orr	w8, w8, w9
	str	w8, [x19]
	b	LBB0_5
LBB0_3:
	ldr	w0, [x19, #20]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
LBB0_4:
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_SPIFI_CMD_FIELDFORM_ALL_SERIAL,4,2 ; @SPIFI_CMD_FIELDFORM_ALL_SERIAL
	.comm	_SPIFI_CMD_FIELDFORM_QUAD_DUAL_DATA,4,2 ; @SPIFI_CMD_FIELDFORM_QUAD_DUAL_DATA
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unsupported SPI read mode\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_nxp_spifi_setup_memory_cmd
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.nxp_spifi_setup_memory_cmd
l_switch.table.nxp_spifi_setup_memory_cmd:
	.quad	_SPIFI_CMD_FIELDFORM_QUAD_DUAL_DATA
	.quad	_SPIFI_CMD_FIELDFORM_QUAD_DUAL_DATA
	.quad	_SPIFI_CMD_FIELDFORM_ALL_SERIAL

.subsections_via_symbols
