	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function spansion_read_cr_quad_enable
_spansion_read_cr_quad_enable:          ## @spansion_read_cr_quad_enable
	.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
	movq	%rdi, %rbx
	movq	(%rdi), %r15
	movq	8(%rdi), %r14
	callq	_read_cr
	testl	%eax, %eax
	js	LBB0_7
## %bb.1:
	movl	%eax, %ecx
	movq	_CR_QUAD_EN_SPAN@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	xorl	%eax, %eax
	testl	%ecx, %edx
	jne	LBB0_10
## %bb.2:
	orl	%ecx, %edx
	movl	%edx, 4(%r15)
	movq	%rbx, %rdi
	callq	_read_sr
	testl	%eax, %eax
	js	LBB0_11
## %bb.3:
	movl	%eax, (%r15)
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_write_sr_cr
	testl	%eax, %eax
	jne	LBB0_10
## %bb.4:
	movq	%rbx, %rdi
	callq	_read_cr
	testl	%eax, %eax
	jle	LBB0_6
## %bb.5:
	movl	%eax, %ecx
	movl	$0, %eax
	testl	%ecx, (%r12)
	jne	LBB0_10
LBB0_6:
	movq	8(%rbx), %rdi
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_9
LBB0_7:
	leaq	L_.str(%rip), %rsi
LBB0_8:
	movq	%r14, %rdi
LBB0_9:
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_10:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"error while reading configuration register\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_CR_QUAD_EN_SPAN,4,2            ## @CR_QUAD_EN_SPAN
L_.str.1:                               ## @.str.1
	.asciz	"error while reading status register\n"

L_.str.2:                               ## @.str.2
	.asciz	"Spansion Quad bit not set\n"

	.no_dead_strip	_spansion_read_cr_quad_enable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function spansion_read_cr_quad_enable
_spansion_read_cr_quad_enable:          ; @spansion_read_cr_quad_enable
	.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
	ldp	x21, x20, [x0]
	bl	_read_cr
	tbnz	w0, #31, LBB0_3
; %bb.1:
Lloh0:
	adrp	x22, _CR_QUAD_EN_SPAN@GOTPAGE
Lloh1:
	ldr	x22, [x22, _CR_QUAD_EN_SPAN@GOTPAGEOFF]
	ldr	w8, [x22]
	tst	w8, w0
	b.eq	LBB0_7
LBB0_2:
	mov	w0, #0
	b	LBB0_6
LBB0_3:
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
LBB0_4:
	mov	x0, x20
LBB0_5:
	bl	_dev_err
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	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
LBB0_7:
	orr	w8, w8, w0
	str	w8, [x21, #4]
	mov	x0, x19
	bl	_read_sr
	tbnz	w0, #31, LBB0_12
; %bb.8:
	str	w0, [x21]
	mov	x0, x19
	mov	x1, x21
	bl	_write_sr_cr
	cbnz	w0, LBB0_6
; %bb.9:
	mov	x0, x19
	bl	_read_cr
	cmp	w0, #1
	b.lt	LBB0_11
; %bb.10:
	ldr	w8, [x22]
	tst	w8, w0
	b.ne	LBB0_2
LBB0_11:
	ldr	x0, [x19, #8]
Lloh7:
	adrp	x1, l_.str.2@PAGE
Lloh8:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_5
LBB0_12:
Lloh9:
	adrp	x1, l_.str.1@PAGE
Lloh10:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"error while reading configuration register\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_CR_QUAD_EN_SPAN,4,2            ; @CR_QUAD_EN_SPAN
l_.str.1:                               ; @.str.1
	.asciz	"error while reading status register\n"

l_.str.2:                               ; @.str.2
	.asciz	"Spansion Quad bit not set\n"

	.no_dead_strip	_spansion_read_cr_quad_enable
.subsections_via_symbols
