	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function spi_nor_set_addr_width
_spi_nor_set_addr_width:                ## @spi_nor_set_addr_width
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movl	(%rdi), %edx
	testl	%edx, %edx
	jne	LBB0_3
## %bb.1:
	movq	16(%rdi), %rax
	movl	(%rax), %edx
	testl	%edx, %edx
	je	LBB0_9
## %bb.2:
	movl	%edx, (%rdi)
LBB0_3:
	movq	_SPI_NOR_MAX_ADDR_WIDTH@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edx
	jle	LBB0_4
LBB0_11:
	movl	8(%rdi), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_12
LBB0_4:
	xorl	%ebx, %ebx
	cmpl	$4, %edx
	jne	LBB0_12
LBB0_5:
	movl	4(%rdi), %eax
	movq	_SNOR_F_4B_OPCODES@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	testl	%eax, (%rcx)
	je	LBB0_12
## %bb.6:
	movq	_SNOR_F_HAS_4BAIT@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_12
## %bb.7:
	callq	_spi_nor_set_4byte_opcodes
	jmp	LBB0_12
LBB0_9:
	cmpl	$16777216, 12(%rdi)             ## imm = 0x1000000
	jle	LBB0_10
## %bb.8:
	movl	$4, (%rdi)
	movq	_SPI_NOR_MAX_ADDR_WIDTH@GOTPCREL(%rip), %rax
	movl	$4, %edx
	cmpl	$4, (%rax)
	jl	LBB0_11
	jmp	LBB0_5
LBB0_10:
	movl	$3, (%rdi)
	movq	_SPI_NOR_MAX_ADDR_WIDTH@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	movl	$3, %edx
	cmpl	$2, (%rax)
	jle	LBB0_11
LBB0_12:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SPI_NOR_MAX_ADDR_WIDTH,4,2     ## @SPI_NOR_MAX_ADDR_WIDTH
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"address width is too large: %u\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_SNOR_F_4B_OPCODES,4,2          ## @SNOR_F_4B_OPCODES
	.comm	_SNOR_F_HAS_4BAIT,4,2           ## @SNOR_F_HAS_4BAIT
	.no_dead_strip	_spi_nor_set_addr_width
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function spi_nor_set_addr_width
_spi_nor_set_addr_width:                ; @spi_nor_set_addr_width
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	ldr	w2, [x0]
	cbnz	w2, LBB0_3
; %bb.1:
	ldr	x8, [x0, #16]
	ldr	w2, [x8]
	cbz	w2, LBB0_9
; %bb.2:
	str	w2, [x0]
LBB0_3:
Lloh0:
	adrp	x8, _SPI_NOR_MAX_ADDR_WIDTH@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SPI_NOR_MAX_ADDR_WIDTH@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w2, w8
	b.le	LBB0_5
LBB0_4:
	ldr	w0, [x0, #8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w0, w8
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_5:
	cmp	w2, #4
	b.ne	LBB0_12
LBB0_6:
	ldr	w8, [x0, #4]
Lloh8:
	adrp	x9, _SNOR_F_4B_OPCODES@GOTPAGE
Lloh9:
	ldr	x9, [x9, _SNOR_F_4B_OPCODES@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_12
; %bb.7:
Lloh11:
	adrp	x9, _SNOR_F_HAS_4BAIT@GOTPAGE
Lloh12:
	ldr	x9, [x9, _SNOR_F_HAS_4BAIT@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_12
; %bb.8:
	bl	_spi_nor_set_4byte_opcodes
	b	LBB0_12
LBB0_9:
	ldr	w8, [x0, #12]
	mov	w9, #16777216
	cmp	w8, w9
	b.le	LBB0_11
; %bb.10:
	mov	w2, #4
	str	w2, [x0]
Lloh14:
	adrp	x8, _SPI_NOR_MAX_ADDR_WIDTH@GOTPAGE
Lloh15:
	ldr	x8, [x8, _SPI_NOR_MAX_ADDR_WIDTH@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	cmp	w8, #4
	b.lt	LBB0_4
	b	LBB0_6
LBB0_11:
	mov	w2, #3
	str	w2, [x0]
Lloh17:
	adrp	x8, _SPI_NOR_MAX_ADDR_WIDTH@GOTPAGE
Lloh18:
	ldr	x8, [x8, _SPI_NOR_MAX_ADDR_WIDTH@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	cmp	w8, #2
	b.le	LBB0_4
LBB0_12:
	mov	w0, #0
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_SPI_NOR_MAX_ADDR_WIDTH,4,2     ; @SPI_NOR_MAX_ADDR_WIDTH
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"address width is too large: %u\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_SNOR_F_4B_OPCODES,4,2          ; @SNOR_F_4B_OPCODES
	.comm	_SNOR_F_HAS_4BAIT,4,2           ; @SNOR_F_HAS_4BAIT
	.no_dead_strip	_spi_nor_set_addr_width
.subsections_via_symbols
