	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function spansion_quad_enable
_spansion_quad_enable:                  ## @spansion_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	(%rdi), %rsi
	movl	$0, (%rsi)
	movq	_CR_QUAD_EN_SPAN@GOTPCREL(%rip), %r14
	movl	(%r14), %eax
	movl	%eax, 4(%rsi)
	callq	_write_sr_cr
	testl	%eax, %eax
	jne	LBB0_4
## %bb.1:
	movq	%rbx, %rdi
	callq	_read_cr
	testl	%eax, %eax
	jle	LBB0_3
## %bb.2:
	movl	%eax, %ecx
	xorl	%eax, %eax
	testl	%ecx, (%r14)
	jne	LBB0_4
LBB0_3:
	movl	8(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_4:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CR_QUAD_EN_SPAN,4,2            ## @CR_QUAD_EN_SPAN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Spansion Quad bit not set\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_spansion_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_quad_enable
_spansion_quad_enable:                  ; @spansion_quad_enable
	.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	x1, [x0]
	str	wzr, [x1]
Lloh0:
	adrp	x20, _CR_QUAD_EN_SPAN@GOTPAGE
Lloh1:
	ldr	x20, [x20, _CR_QUAD_EN_SPAN@GOTPAGEOFF]
	ldr	w8, [x20]
	str	w8, [x1, #4]
	bl	_write_sr_cr
	cbnz	w0, LBB0_5
; %bb.1:
	mov	x0, x19
	bl	_read_cr
	cmp	w0, #1
	b.lt	LBB0_4
; %bb.2:
	ldr	w8, [x20]
	tst	w8, w0
	b.eq	LBB0_4
; %bb.3:
	mov	w0, #0
	b	LBB0_5
LBB0_4:
	ldr	w0, [x19, #8]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_CR_QUAD_EN_SPAN,4,2            ; @CR_QUAD_EN_SPAN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Spansion Quad bit not set\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_spansion_quad_enable
.subsections_via_symbols
