	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function falcon_mtd_probe
_falcon_mtd_probe:                      ## @falcon_mtd_probe
	.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	%rdi, %r14
	movq	(%rdi), %r15
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
	xorl	%eax, %eax
	callq	_ASSERT_RTNL
	leaq	16(%r15), %rbx
	movq	%rbx, %rdi
	callq	_efx_spi_present
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	movq	(%rbx), %rax
	movq	_FALCON_FLASH_BOOTCODE_START@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jle	LBB0_6
## %bb.2:
	movq	%rcx, %r13
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$80, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rax, %r12
	movq	%rbx, 32(%rax)
	leaq	L_.str(%rip), %rax
	movq	%rax, (%r12)
	movq	_falcon_mtd_ops@GOTPCREL(%rip), %rax
	movq	%rax, 24(%r12)
	movl	$1, 8(%r12)
	movq	_MTD_NORFLASH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	16(%r12), %rcx
	movl	%eax, 36(%rcx)
	movq	_MTD_CAP_NORFLASH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%rcx)
	movq	16(%r15), %rax
	movq	(%r13), %rdx
	subq	%rdx, %rax
	movq	%rax, 24(%rcx)
	movl	24(%r15), %eax
	movl	%eax, 16(%rcx)
	movq	%rdx, 8(%rcx)
	leaq	L_.str.1(%rip), %rax
	movq	%rax, (%rcx)
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_efx_mtd_probe_device
	testl	%eax, %eax
	jne	LBB0_11
## %bb.5:
	xorl	%r13d, %r13d
LBB0_6:
	movq	%r15, %rdi
	callq	_efx_spi_present
	testq	%rax, %rax
	je	LBB0_12
## %bb.7:
	movq	(%r15), %rax
	movq	_EFX_EEPROM_BOOTCONFIG_START@GOTPCREL(%rip), %rbx
	cmpq	(%rbx), %rax
	jle	LBB0_12
## %bb.8:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$80, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_3
## %bb.9:
	movq	%rax, %r12
	movq	%r15, 32(%rax)
	leaq	L_.str.2(%rip), %rax
	movq	%rax, (%r12)
	movq	_falcon_mtd_ops@GOTPCREL(%rip), %rax
	movq	%rax, 24(%r12)
	movl	$1, 8(%r12)
	movq	_MTD_RAM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	16(%r12), %rcx
	movl	%eax, 36(%rcx)
	movq	_MTD_CAP_RAM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%rcx)
	movq	(%r15), %rdi
	movq	_EFX_EEPROM_BOOTCONFIG_END@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_min
	movq	(%rbx), %rcx
	subq	%rcx, %rax
	movq	16(%r12), %rdx
	movq	%rax, 24(%rdx)
	movl	8(%r15), %eax
	movl	%eax, 16(%rdx)
	movq	%rcx, 8(%rdx)
	leaq	L_.str.3(%rip), %rax
	movq	%rax, (%rdx)
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_efx_mtd_probe_device
	testl	%eax, %eax
	je	LBB0_10
LBB0_11:
	movl	%eax, %r13d
	movq	%r12, %rdi
	callq	_kfree
	jmp	LBB0_12
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
	jmp	LBB0_12
LBB0_10:
	xorl	%r13d, %r13d
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	_ENODEV,4,2                     ## @ENODEV
	.comm	_FALCON_FLASH_BOOTCODE_START,8,3 ## @FALCON_FLASH_BOOTCODE_START
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"flash"

	.comm	_falcon_mtd_ops,4,2             ## @falcon_mtd_ops
	.comm	_MTD_NORFLASH,4,2               ## @MTD_NORFLASH
	.comm	_MTD_CAP_NORFLASH,4,2           ## @MTD_CAP_NORFLASH
L_.str.1:                               ## @.str.1
	.asciz	"sfc_flash_bootrom"

	.comm	_EFX_EEPROM_BOOTCONFIG_START,8,3 ## @EFX_EEPROM_BOOTCONFIG_START
L_.str.2:                               ## @.str.2
	.asciz	"EEPROM"

	.comm	_MTD_RAM,4,2                    ## @MTD_RAM
	.comm	_MTD_CAP_RAM,4,2                ## @MTD_CAP_RAM
	.comm	_EFX_EEPROM_BOOTCONFIG_END,4,2  ## @EFX_EEPROM_BOOTCONFIG_END
L_.str.3:                               ## @.str.3
	.asciz	"sfc_bootconfig"

	.no_dead_strip	_falcon_mtd_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function falcon_mtd_probe
_falcon_mtd_probe:                      ; @falcon_mtd_probe
	.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	x19, x0
	ldr	x20, [x0]
Lloh0:
	adrp	x8, _ENODEV@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w21, w8
	bl	_ASSERT_RTNL
	add	x23, x20, #16
	mov	x0, x23
	bl	_efx_spi_present
	cbz	x0, LBB0_4
; %bb.1:
	ldr	x8, [x23]
Lloh3:
	adrp	x24, _FALCON_FLASH_BOOTCODE_START@GOTPAGE
Lloh4:
	ldr	x24, [x24, _FALCON_FLASH_BOOTCODE_START@GOTPAGEOFF]
	ldr	x9, [x24]
	cmp	x8, x9
	b.le	LBB0_4
; %bb.2:
Lloh5:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	w0, #80
	bl	_kzalloc
	cbz	x0, LBB0_9
; %bb.3:
	mov	x22, x0
Lloh8:
	adrp	x8, l_.str@PAGE
Lloh9:
	add	x8, x8, l_.str@PAGEOFF
Lloh10:
	adrp	x9, _falcon_mtd_ops@GOTPAGE
Lloh11:
	ldr	x9, [x9, _falcon_mtd_ops@GOTPAGEOFF]
	str	x8, [x0]
	stp	x9, x23, [x0, #24]
	mov	w8, #1
Lloh12:
	adrp	x9, _MTD_NORFLASH@GOTPAGE
Lloh13:
	ldr	x9, [x9, _MTD_NORFLASH@GOTPAGEOFF]
	str	w8, [x0, #8]
Lloh14:
	ldr	w8, [x9]
	ldr	x9, [x0, #16]
Lloh15:
	adrp	x10, _MTD_CAP_NORFLASH@GOTPAGE
Lloh16:
	ldr	x10, [x10, _MTD_CAP_NORFLASH@GOTPAGEOFF]
Lloh17:
	ldr	w10, [x10]
	stp	w10, w8, [x9, #32]
	ldr	x8, [x20, #16]
	ldr	x10, [x24]
	sub	x8, x8, x10
	str	x8, [x9, #24]
	ldr	w8, [x20, #24]
	str	w8, [x9, #16]
Lloh18:
	adrp	x8, l_.str.1@PAGE
Lloh19:
	add	x8, x8, l_.str.1@PAGEOFF
	stp	x8, x10, [x9]
	mov	x0, x19
	mov	x1, x22
	bl	_efx_mtd_probe_device
	mov	x21, x0
	cbnz	w0, LBB0_8
LBB0_4:
	mov	x0, x20
	bl	_efx_spi_present
	cbz	x0, LBB0_10
; %bb.5:
	ldr	x8, [x20]
Lloh20:
	adrp	x23, _EFX_EEPROM_BOOTCONFIG_START@GOTPAGE
Lloh21:
	ldr	x23, [x23, _EFX_EEPROM_BOOTCONFIG_START@GOTPAGEOFF]
	ldr	x9, [x23]
	cmp	x8, x9
	b.le	LBB0_10
; %bb.6:
Lloh22:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh23:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	mov	w0, #80
	bl	_kzalloc
	cbz	x0, LBB0_9
; %bb.7:
	mov	x22, x0
Lloh25:
	adrp	x8, l_.str.2@PAGE
Lloh26:
	add	x8, x8, l_.str.2@PAGEOFF
Lloh27:
	adrp	x9, _falcon_mtd_ops@GOTPAGE
Lloh28:
	ldr	x9, [x9, _falcon_mtd_ops@GOTPAGEOFF]
	str	x8, [x0]
	stp	x9, x20, [x0, #24]
	mov	w8, #1
Lloh29:
	adrp	x9, _MTD_RAM@GOTPAGE
Lloh30:
	ldr	x9, [x9, _MTD_RAM@GOTPAGEOFF]
	str	w8, [x0, #8]
Lloh31:
	ldr	w8, [x9]
	ldr	x9, [x0, #16]
Lloh32:
	adrp	x10, _MTD_CAP_RAM@GOTPAGE
Lloh33:
	ldr	x10, [x10, _MTD_CAP_RAM@GOTPAGEOFF]
Lloh34:
	ldr	w10, [x10]
	stp	w10, w8, [x9, #32]
	ldr	x0, [x20]
Lloh35:
	adrp	x8, _EFX_EEPROM_BOOTCONFIG_END@GOTPAGE
Lloh36:
	ldr	x8, [x8, _EFX_EEPROM_BOOTCONFIG_END@GOTPAGEOFF]
Lloh37:
	ldr	w1, [x8]
	bl	_min
	ldr	x8, [x23]
	sub	x9, x0, x8
	ldr	x10, [x22, #16]
	str	x9, [x10, #24]
	ldr	w9, [x20, #8]
	str	w9, [x10, #16]
Lloh38:
	adrp	x9, l_.str.3@PAGE
Lloh39:
	add	x9, x9, l_.str.3@PAGEOFF
	stp	x9, x8, [x10]
	mov	x0, x19
	mov	x1, x22
	bl	_efx_mtd_probe_device
	mov	x21, x0
	cbz	w0, LBB0_10
LBB0_8:
	mov	x0, x22
	bl	_kfree
	b	LBB0_10
LBB0_9:
Lloh40:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh41:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh42:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_10:
	mov	x0, x21
	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 AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.cfi_endproc
                                        ; -- End function
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_FALCON_FLASH_BOOTCODE_START,8,3 ; @FALCON_FLASH_BOOTCODE_START
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"flash"

	.comm	_falcon_mtd_ops,4,2             ; @falcon_mtd_ops
	.comm	_MTD_NORFLASH,4,2               ; @MTD_NORFLASH
	.comm	_MTD_CAP_NORFLASH,4,2           ; @MTD_CAP_NORFLASH
l_.str.1:                               ; @.str.1
	.asciz	"sfc_flash_bootrom"

	.comm	_EFX_EEPROM_BOOTCONFIG_START,8,3 ; @EFX_EEPROM_BOOTCONFIG_START
l_.str.2:                               ; @.str.2
	.asciz	"EEPROM"

	.comm	_MTD_RAM,4,2                    ; @MTD_RAM
	.comm	_MTD_CAP_RAM,4,2                ; @MTD_CAP_RAM
	.comm	_EFX_EEPROM_BOOTCONFIG_END,4,2  ; @EFX_EEPROM_BOOTCONFIG_END
l_.str.3:                               ; @.str.3
	.asciz	"sfc_bootconfig"

	.no_dead_strip	_falcon_mtd_probe
.subsections_via_symbols
