	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cobalt_flash_probe             ## -- Begin function cobalt_flash_probe
	.p2align	4, 0x90
_cobalt_flash_probe:                    ## @cobalt_flash_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movq	_cobalt_flash_map@GOTPCREL(%rip), %rbx
	movl	20(%rbx), %edi
	callq	_map_bankwidth_supported
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_BUG_ON
	movl	16(%r14), %eax
	movl	%eax, 16(%rbx)
	movq	_flash_read16@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%rbx)
	movq	_flash_write16@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%rbx)
	movq	_flash_copy_from@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%rbx)
	movq	_flash_copy_to@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rbx)
	leaq	L_.str(%rip), %rdi
	movq	%rbx, %rsi
	callq	_do_map_probe
	movq	%rax, 8(%r14)
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	_THIS_MODULE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 8(%rax)
	movq	(%r14), %rcx
	movq	%rcx, (%rax)
	xorl	%ebx, %ebx
	movq	%rax, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_mtd_device_register
	jmp	LBB0_3
LBB0_1:
	leaq	L_.str.1(%rip), %rdi
	callq	_cobalt_err
	movl	$-1, %ebx
LBB0_3:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_cobalt_flash_map,24,2          ## @cobalt_flash_map
	.comm	_flash_read16,4,2               ## @flash_read16
	.comm	_flash_write16,4,2              ## @flash_write16
	.comm	_flash_copy_from,4,2            ## @flash_copy_from
	.comm	_flash_copy_to,4,2              ## @flash_copy_to
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cfi_probe"

L_.str.1:                               ## @.str.1
	.asciz	"Probe CFI flash failed!\n"

	.comm	_THIS_MODULE,4,2                ## @THIS_MODULE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cobalt_flash_probe             ; -- Begin function cobalt_flash_probe
	.p2align	2
_cobalt_flash_probe:                    ; @cobalt_flash_probe
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh0:
	adrp	x20, _cobalt_flash_map@GOTPAGE
Lloh1:
	ldr	x20, [x20, _cobalt_flash_map@GOTPAGEOFF]
	ldr	w0, [x20, #20]
	bl	_map_bankwidth_supported
	cmp	w0, #0
	cset	w0, eq
	bl	_BUG_ON
	ldr	w8, [x19, #16]
	str	w8, [x20, #16]
Lloh2:
	adrp	x8, _flash_read16@GOTPAGE
Lloh3:
	ldr	x8, [x8, _flash_read16@GOTPAGEOFF]
Lloh4:
	adrp	x9, _flash_write16@GOTPAGE
Lloh5:
	ldr	x9, [x9, _flash_write16@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
Lloh7:
	ldr	w9, [x9]
	stp	w9, w8, [x20, #8]
Lloh8:
	adrp	x8, _flash_copy_from@GOTPAGE
Lloh9:
	ldr	x8, [x8, _flash_copy_from@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
Lloh11:
	adrp	x9, _flash_copy_to@GOTPAGE
Lloh12:
	ldr	x9, [x9, _flash_copy_to@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	stp	w9, w8, [x20]
Lloh14:
	adrp	x0, l_.str@PAGE
Lloh15:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	bl	_do_map_probe
	str	x0, [x19, #8]
	cbz	x0, LBB0_2
; %bb.1:
Lloh16:
	adrp	x8, _THIS_MODULE@GOTPAGE
Lloh17:
	ldr	x8, [x8, _THIS_MODULE@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	str	w8, [x0, #8]
	ldr	x8, [x19]
	str	x8, [x0]
	mov	x1, #0
	mov	w2, #0
	bl	_mtd_device_register
	mov	w0, #0
	b	LBB0_3
LBB0_2:
Lloh19:
	adrp	x0, l_.str.1@PAGE
Lloh20:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_cobalt_err
	mov	w0, #-1
LBB0_3:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh6
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_cobalt_flash_map,24,2          ; @cobalt_flash_map
	.comm	_flash_read16,4,2               ; @flash_read16
	.comm	_flash_write16,4,2              ; @flash_write16
	.comm	_flash_copy_from,4,2            ; @flash_copy_from
	.comm	_flash_copy_to,4,2              ; @flash_copy_to
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cfi_probe"

l_.str.1:                               ; @.str.1
	.asciz	"Probe CFI flash failed!\n"

	.comm	_THIS_MODULE,4,2                ; @THIS_MODULE
.subsections_via_symbols
