	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function falcon_probe_spi_devices
_falcon_probe_spi_devices:              ## @falcon_probe_spi_devices
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	8(%rdi), %r14
	movq	_FR_AB_GPIO_CTL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-32(%rbp), %rsi
	callq	_ef4_reado
	movq	_FR_AB_NIC_STAT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-36(%rbp), %rsi
	movq	%r15, %rdi
	callq	_ef4_reado
	movq	_FR_AB_EE_VPD_CFG0@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	leaq	-28(%rbp), %rsi
	movq	%r15, %rdi
	callq	_ef4_reado
	movl	-32(%rbp), %edi
	movq	_FRF_AB_GPIO3_PWRUP_VALUE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_EF4_OWORD_FIELD
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movl	-36(%rbp), %edi
	movq	_FRF_AB_SF_PRST@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_EF4_OWORD_FIELD
	movq	_FFE_AB_SPI_DEVICE_FLASH@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, %ebx
	testq	%rax, %rax
	jne	LBB0_3
## %bb.2:
	movq	_FFE_AB_SPI_DEVICE_EEPROM@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_3:
	movq	_probe@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r15), %edx
	cmpl	%ecx, %ebx
	leaq	L_.str.1(%rip), %rax
	leaq	L_.str.2(%rip), %r8
	cmoveq	%rax, %r8
	leaq	L_.str(%rip), %rcx
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_netif_dbg
	jmp	LBB0_5
LBB0_4:
	movq	_probe@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r15), %edx
	leaq	L_.str.3(%rip), %rcx
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_netif_dbg
	movl	-28(%rbp), %edi
	movq	_FRF_AB_EE_VPD_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_FRF_AB_EE_SF_CLOCK_DIV@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_FRF_AB_EE_EE_CLOCK_DIV@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movl	$63, (%rsp)
	xorl	%edx, %edx
	movl	$7, %r8d
	callq	_EF4_POPULATE_OWORD_3
	movl	(%rbx), %edx
	leaq	-28(%rbp), %rsi
	movq	%r15, %rdi
	callq	_ef4_writeo
	movl	$-1, %ebx
LBB0_5:
	leaq	8(%r14), %rdi
	callq	_mutex_init
	movq	_FFE_AB_SPI_DEVICE_FLASH@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jne	LBB0_7
## %bb.6:
	leaq	4(%r14), %rsi
	movq	_default_flash_type@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	_falcon_spi_device_init
LBB0_7:
	movq	_FFE_AB_SPI_DEVICE_EEPROM@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jne	LBB0_9
## %bb.8:
	movq	_large_eeprom_type@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rdi
	movq	%r14, %rsi
	movl	%ebx, %edx
	callq	_falcon_spi_device_init
LBB0_9:
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FR_AB_GPIO_CTL,4,2             ## @FR_AB_GPIO_CTL
	.comm	_FR_AB_NIC_STAT,4,2             ## @FR_AB_NIC_STAT
	.comm	_FR_AB_EE_VPD_CFG0,4,2          ## @FR_AB_EE_VPD_CFG0
	.comm	_FRF_AB_GPIO3_PWRUP_VALUE,4,2   ## @FRF_AB_GPIO3_PWRUP_VALUE
	.comm	_FRF_AB_SF_PRST,4,2             ## @FRF_AB_SF_PRST
	.comm	_FFE_AB_SPI_DEVICE_FLASH,4,2    ## @FFE_AB_SPI_DEVICE_FLASH
	.comm	_FFE_AB_SPI_DEVICE_EEPROM,4,2   ## @FFE_AB_SPI_DEVICE_EEPROM
	.comm	_probe,4,2                      ## @probe
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Booted from %s\n"

L_.str.1:                               ## @.str.1
	.asciz	"flash"

L_.str.2:                               ## @.str.2
	.asciz	"EEPROM"

L_.str.3:                               ## @.str.3
	.asciz	"Booted from internal ASIC settings; setting SPI config\n"

	.comm	_FRF_AB_EE_VPD_EN,4,2           ## @FRF_AB_EE_VPD_EN
	.comm	_FRF_AB_EE_SF_CLOCK_DIV,4,2     ## @FRF_AB_EE_SF_CLOCK_DIV
	.comm	_FRF_AB_EE_EE_CLOCK_DIV,4,2     ## @FRF_AB_EE_EE_CLOCK_DIV
	.comm	_default_flash_type,4,2         ## @default_flash_type
	.comm	_large_eeprom_type,4,2          ## @large_eeprom_type
	.no_dead_strip	_falcon_probe_spi_devices
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function falcon_probe_spi_devices
_falcon_probe_spi_devices:              ; @falcon_probe_spi_devices
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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, x0
	ldr	x19, [x0, #8]
Lloh0:
	adrp	x8, _FR_AB_GPIO_CTL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FR_AB_GPIO_CTL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	add	x1, sp, #24
	bl	_ef4_reado
Lloh3:
	adrp	x8, _FR_AB_NIC_STAT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _FR_AB_NIC_STAT@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	add	x1, sp, #28
	mov	x0, x20
	bl	_ef4_reado
Lloh6:
	adrp	x21, _FR_AB_EE_VPD_CFG0@GOTPAGE
Lloh7:
	ldr	x21, [x21, _FR_AB_EE_VPD_CFG0@GOTPAGEOFF]
	ldr	w2, [x21]
	add	x1, sp, #20
	mov	x0, x20
	bl	_ef4_reado
	ldr	w0, [sp, #24]
Lloh8:
	adrp	x8, _FRF_AB_GPIO3_PWRUP_VALUE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _FRF_AB_GPIO3_PWRUP_VALUE@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	bl	_EF4_OWORD_FIELD
Lloh11:
	adrp	x23, _FFE_AB_SPI_DEVICE_FLASH@GOTPAGE
Lloh12:
	ldr	x23, [x23, _FFE_AB_SPI_DEVICE_FLASH@GOTPAGEOFF]
Lloh13:
	adrp	x22, _FFE_AB_SPI_DEVICE_EEPROM@GOTPAGE
Lloh14:
	ldr	x22, [x22, _FFE_AB_SPI_DEVICE_EEPROM@GOTPAGEOFF]
	cbz	x0, LBB0_2
; %bb.1:
	ldr	w0, [sp, #28]
Lloh15:
	adrp	x8, _FRF_AB_SF_PRST@GOTPAGE
Lloh16:
	ldr	x8, [x8, _FRF_AB_SF_PRST@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	bl	_EF4_OWORD_FIELD
	ldr	w8, [x23]
	ldr	w9, [x22]
	cmp	x0, #0
	csel	w21, w9, w8, eq
Lloh18:
	adrp	x9, _probe@GOTPAGE
Lloh19:
	ldr	x9, [x9, _probe@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x9]
	ldr	w2, [x20]
Lloh21:
	adrp	x9, l_.str.2@PAGE
Lloh22:
	add	x9, x9, l_.str.2@PAGEOFF
Lloh23:
	adrp	x10, l_.str.1@PAGE
Lloh24:
	add	x10, x10, l_.str.1@PAGEOFF
	cmp	w21, w8
	csel	x8, x10, x9, eq
	str	x8, [sp]
Lloh25:
	adrp	x3, l_.str@PAGE
Lloh26:
	add	x3, x3, l_.str@PAGEOFF
	mov	x0, x20
	bl	_netif_dbg
	b	LBB0_3
LBB0_2:
Lloh27:
	adrp	x8, _probe@GOTPAGE
Lloh28:
	ldr	x8, [x8, _probe@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
	ldr	w2, [x20]
Lloh30:
	adrp	x3, l_.str.3@PAGE
Lloh31:
	add	x3, x3, l_.str.3@PAGEOFF
	mov	x0, x20
	bl	_netif_dbg
	ldr	w0, [sp, #20]
Lloh32:
	adrp	x8, _FRF_AB_EE_VPD_EN@GOTPAGE
Lloh33:
	ldr	x8, [x8, _FRF_AB_EE_VPD_EN@GOTPAGEOFF]
Lloh34:
	ldr	w1, [x8]
Lloh35:
	adrp	x8, _FRF_AB_EE_SF_CLOCK_DIV@GOTPAGE
Lloh36:
	ldr	x8, [x8, _FRF_AB_EE_SF_CLOCK_DIV@GOTPAGEOFF]
Lloh37:
	ldr	w3, [x8]
Lloh38:
	adrp	x8, _FRF_AB_EE_EE_CLOCK_DIV@GOTPAGE
Lloh39:
	ldr	x8, [x8, _FRF_AB_EE_EE_CLOCK_DIV@GOTPAGEOFF]
Lloh40:
	ldr	w5, [x8]
	mov	w2, #0
	mov	w4, #7
	mov	w6, #63
	bl	_EF4_POPULATE_OWORD_3
	ldr	w2, [x21]
	add	x1, sp, #20
	mov	x0, x20
	bl	_ef4_writeo
	mov	w21, #-1
LBB0_3:
	add	x0, x19, #8
	bl	_mutex_init
	ldr	w8, [x23]
	cmp	w21, w8
	b.ne	LBB0_5
; %bb.4:
	add	x1, x19, #4
Lloh41:
	adrp	x8, _default_flash_type@GOTPAGE
Lloh42:
	ldr	x8, [x8, _default_flash_type@GOTPAGEOFF]
Lloh43:
	ldr	w3, [x8]
	mov	x0, x20
	mov	x2, x21
	bl	_falcon_spi_device_init
LBB0_5:
	ldr	w8, [x22]
	cmp	w21, w8
	b.ne	LBB0_7
; %bb.6:
Lloh44:
	adrp	x8, _large_eeprom_type@GOTPAGE
Lloh45:
	ldr	x8, [x8, _large_eeprom_type@GOTPAGEOFF]
Lloh46:
	ldr	w3, [x8]
	mov	x0, x20
	mov	x1, x19
	mov	x2, x21
	bl	_falcon_spi_device_init
LBB0_7:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.cfi_endproc
                                        ; -- End function
	.comm	_FR_AB_GPIO_CTL,4,2             ; @FR_AB_GPIO_CTL
	.comm	_FR_AB_NIC_STAT,4,2             ; @FR_AB_NIC_STAT
	.comm	_FR_AB_EE_VPD_CFG0,4,2          ; @FR_AB_EE_VPD_CFG0
	.comm	_FRF_AB_GPIO3_PWRUP_VALUE,4,2   ; @FRF_AB_GPIO3_PWRUP_VALUE
	.comm	_FRF_AB_SF_PRST,4,2             ; @FRF_AB_SF_PRST
	.comm	_FFE_AB_SPI_DEVICE_FLASH,4,2    ; @FFE_AB_SPI_DEVICE_FLASH
	.comm	_FFE_AB_SPI_DEVICE_EEPROM,4,2   ; @FFE_AB_SPI_DEVICE_EEPROM
	.comm	_probe,4,2                      ; @probe
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Booted from %s\n"

l_.str.1:                               ; @.str.1
	.asciz	"flash"

l_.str.2:                               ; @.str.2
	.asciz	"EEPROM"

l_.str.3:                               ; @.str.3
	.asciz	"Booted from internal ASIC settings; setting SPI config\n"

	.comm	_FRF_AB_EE_VPD_EN,4,2           ; @FRF_AB_EE_VPD_EN
	.comm	_FRF_AB_EE_SF_CLOCK_DIV,4,2     ; @FRF_AB_EE_SF_CLOCK_DIV
	.comm	_FRF_AB_EE_EE_CLOCK_DIV,4,2     ; @FRF_AB_EE_EE_CLOCK_DIV
	.comm	_default_flash_type,4,2         ; @default_flash_type
	.comm	_large_eeprom_type,4,2          ; @large_eeprom_type
	.no_dead_strip	_falcon_probe_spi_devices
.subsections_via_symbols
