	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function spi_nor_default_setup
_spi_nor_default_setup:                 ## @spi_nor_default_setup
	.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, %r14
	movl	16(%rdi), %ebx
	andl	(%rsi), %ebx
	movl	%ebx, -28(%rbp)
	cmpq	$0, 8(%rdi)
	je	LBB0_2
## %bb.1:
	leaq	-28(%rbp), %rsi
	movq	%r14, %rdi
	callq	_spi_nor_spimem_adjust_hwcaps
	movl	-28(%rbp), %ebx
	jmp	LBB0_4
LBB0_2:
	movq	_SNOR_HWCAPS_X_X_X@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	testl	%ebx, %r15d
	je	LBB0_4
## %bb.3:
	movl	(%r14), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_dbg
	notl	%r15d
	andl	%r15d, %ebx
	movl	%ebx, -28(%rbp)
LBB0_4:
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_spi_nor_select_read
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_10
LBB0_6:
	movl	-28(%rbp), %esi
	movq	%r14, %rdi
	callq	_spi_nor_select_pp
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	movl	%eax, %ebx
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_10
LBB0_8:
	movq	%r14, %rdi
	callq	_spi_nor_select_erase
	testl	%eax, %eax
	je	LBB0_12
## %bb.9:
	movl	%eax, %ebx
	leaq	L_.str.3(%rip), %rsi
LBB0_10:
	movl	(%r14), %edi
	callq	_dev_err
LBB0_11:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	xorl	%ebx, %ebx
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_SNOR_HWCAPS_X_X_X,4,2          ## @SNOR_HWCAPS_X_X_X
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"SPI n-n-n protocols are not supported.\n"

L_.str.1:                               ## @.str.1
	.asciz	"can't select read settings supported by both the SPI controller and memory.\n"

L_.str.2:                               ## @.str.2
	.asciz	"can't select write settings supported by both the SPI controller and memory.\n"

L_.str.3:                               ## @.str.3
	.asciz	"can't select erase settings supported by both the SPI controller and memory.\n"

	.no_dead_strip	_spi_nor_default_setup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function spi_nor_default_setup
_spi_nor_default_setup:                 ; @spi_nor_default_setup
	.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, x0
	ldr	w8, [x1]
	ldr	w9, [x0, #16]
	and	w20, w9, w8
	str	w20, [sp, #12]
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_2
; %bb.1:
	add	x1, sp, #12
	mov	x0, x19
	bl	_spi_nor_spimem_adjust_hwcaps
	ldr	w20, [sp, #12]
	b	LBB0_4
LBB0_2:
Lloh0:
	adrp	x8, _SNOR_HWCAPS_X_X_X@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SNOR_HWCAPS_X_X_X@GOTPAGEOFF]
Lloh2:
	ldr	w21, [x8]
	tst	w21, w20
	b.eq	LBB0_4
; %bb.3:
	ldr	w0, [x19]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
	bic	w20, w20, w21
	str	w20, [sp, #12]
LBB0_4:
	mov	x0, x19
	mov	x1, x20
	bl	_spi_nor_select_read
	cbz	w0, LBB0_6
; %bb.5:
	mov	x20, x0
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_10
LBB0_6:
	ldr	w1, [sp, #12]
	mov	x0, x19
	bl	_spi_nor_select_pp
	cbz	w0, LBB0_8
; %bb.7:
	mov	x20, x0
Lloh7:
	adrp	x1, l_.str.2@PAGE
Lloh8:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_10
LBB0_8:
	mov	x0, x19
	bl	_spi_nor_select_erase
	mov	x20, x0
	cbz	w0, LBB0_11
; %bb.9:
Lloh9:
	adrp	x1, l_.str.3@PAGE
Lloh10:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_10:
	ldr	w0, [x19]
	bl	_dev_err
LBB0_11:
	mov	x0, x20
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_SNOR_HWCAPS_X_X_X,4,2          ; @SNOR_HWCAPS_X_X_X
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"SPI n-n-n protocols are not supported.\n"

l_.str.1:                               ; @.str.1
	.asciz	"can't select read settings supported by both the SPI controller and memory.\n"

l_.str.2:                               ; @.str.2
	.asciz	"can't select write settings supported by both the SPI controller and memory.\n"

l_.str.3:                               ; @.str.3
	.asciz	"can't select erase settings supported by both the SPI controller and memory.\n"

	.no_dead_strip	_spi_nor_default_setup
.subsections_via_symbols
