	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function spi_nor_parse_smpt
_spi_nor_parse_smpt:                    ## @spi_nor_parse_smpt
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	movq	%rsi, %r12
	movq	%rdi, %r15
	movslq	(%rsi), %r13
	shlq	$2, %r13
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r14
	movq	%r12, %rdi
	callq	_SFDP_PARAM_HEADER_PTP
	movq	%r15, %rdi
	movl	%eax, %esi
	movq	%r13, %rdx
	movq	%r14, %rcx
	callq	_spi_nor_read_sfdp
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_11
## %bb.3:
	movl	(%r12), %edx
	testl	%edx, %edx
	jle	LBB0_7
## %bb.4:
	movq	%rbx, %r13
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r14,%rbx,4), %edi
	callq	_le32_to_cpu
	movl	%eax, (%r14,%rbx,4)
	incq	%rbx
	movslq	(%r12), %rdx
	cmpq	%rdx, %rbx
	jl	LBB0_5
## %bb.6:
	movq	%r13, %rbx
LBB0_7:
	movq	%r15, %rdi
	movq	%r14, %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_spi_nor_get_map_in_use
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movq	%r12, %rdi
	callq	_PTR_ERR
	movl	%eax, %r13d
	jmp	LBB0_11
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
	jmp	LBB0_12
LBB0_9:
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movq	%r12, %rdx
	callq	_spi_nor_init_non_uniform_erase_map
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_11
## %bb.10:
	movq	%rbx, %rdi
	callq	_spi_nor_regions_sort_erase_types
	xorl	%r13d, %r13d
LBB0_11:
	movq	%r14, %rdi
	callq	_kfree
LBB0_12:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_spi_nor_parse_smpt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function spi_nor_parse_smpt
_spi_nor_parse_smpt:                    ; @spi_nor_parse_smpt
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x2
	mov	x22, x1
	mov	x21, x0
	ldrsw	x8, [x1]
	lsl	x23, x8, #2
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x23
	bl	_kmalloc
	cbz	x0, LBB0_7
; %bb.1:
	mov	x19, x0
	mov	x0, x22
	bl	_SFDP_PARAM_HEADER_PTP
	mov	x1, x0
	mov	x0, x21
	mov	x2, x23
	mov	x3, x19
	bl	_spi_nor_read_sfdp
	mov	x23, x0
	cbnz	w0, LBB0_10
; %bb.2:
	ldr	w2, [x22]
	cmp	w2, #1
	b.lt	LBB0_5
; %bb.3:
	mov	x23, #0
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	lsl	x24, x23, #2
	ldr	w0, [x19, x24]
	bl	_le32_to_cpu
	str	w0, [x19, x24]
	add	x23, x23, #1
	ldrsw	x2, [x22]
	cmp	x23, x2
	b.lt	LBB0_4
LBB0_5:
	mov	x0, x21
	mov	x1, x19
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_spi_nor_get_map_in_use
	mov	x22, x0
	bl	_IS_ERR
	cbz	x0, LBB0_8
; %bb.6:
	mov	x0, x22
	bl	_PTR_ERR
	mov	x23, x0
	b	LBB0_10
LBB0_7:
Lloh3:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_11
LBB0_8:
	mov	x0, x21
	mov	x1, x20
	mov	x2, x22
	bl	_spi_nor_init_non_uniform_erase_map
	mov	x23, x0
	cbnz	w0, LBB0_10
; %bb.9:
	mov	x0, x20
	bl	_spi_nor_regions_sort_erase_types
LBB0_10:
	mov	x0, x19
	bl	_kfree
LBB0_11:
	mov	x0, x23
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_spi_nor_parse_smpt
.subsections_via_symbols
