	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_of_flash_probe_versatile       ## -- Begin function of_flash_probe_versatile
	.p2align	4, 0x90
_of_flash_probe_versatile:              ## @of_flash_probe_versatile
	.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, %r15
	movq	%rsi, %rax
	movq	%rdi, %r14
	leaq	L_.str(%rip), %rsi
	movq	%rax, %rdi
	callq	_of_device_is_compatible
	xorl	%ebx, %ebx
	testl	%eax, %eax
	je	LBB0_16
## %bb.1:
	movq	_syscon_regmap@GOTPCREL(%rip), %r13
	cmpq	$0, (%r13)
	je	LBB0_2
LBB0_7:
	movl	_of_flash_probe_versatile.versatile_flashprot(%rip), %eax
	leal	-128(%rax), %ecx
	cmpl	$2, %ecx
	jb	LBB0_13
## %bb.8:
	cmpl	$130, %eax
	je	LBB0_12
## %bb.9:
	cmpl	$131, %eax
	jne	LBB0_14
## %bb.10:
	movq	%r14, %rdi
	callq	_ap_flash_init
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_16
## %bb.11:
	movq	_ap_flash_set_vpp@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r15)
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_info
	xorl	%ebx, %ebx
	jmp	LBB0_16
LBB0_2:
	movq	_syscon_match@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%r12d, %r12d
	leaq	-48(%rbp), %rdx
	xorl	%edi, %edi
	callq	_of_find_matching_node_and_match
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	-48(%rbp), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, _of_flash_probe_versatile.versatile_flashprot(%rip)
	movq	%rax, %rdi
	callq	_syscon_node_to_regmap
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	%r12, %rdi
	callq	_PTR_ERR
	movl	%eax, %ebx
	jmp	LBB0_16
LBB0_13:
	movq	_versatile_flash_set_vpp@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r15)
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_15
LBB0_12:
	movq	_cp_flash_set_vpp@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r15)
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_15
LBB0_14:
	leaq	L_.str.4(%rip), %rsi
LBB0_15:
	movq	%r14, %rdi
	callq	_dev_info
LBB0_16:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	subl	(%rax), %r12d
	movl	%r12d, %ebx
	jmp	LBB0_16
LBB0_6:
	movq	%r12, (%r13)
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_of_flash_probe_versatile.versatile_flashprot,4,2 ## @of_flash_probe_versatile.versatile_flashprot
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"arm,versatile-flash"

	.comm	_syscon_regmap,8,3              ## @syscon_regmap
	.comm	_syscon_match,4,2               ## @syscon_match
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_ap_flash_set_vpp,4,2           ## @ap_flash_set_vpp
L_.str.1:                               ## @.str.1
	.asciz	"Integrator/AP flash protection\n"

	.comm	_cp_flash_set_vpp,4,2           ## @cp_flash_set_vpp
L_.str.2:                               ## @.str.2
	.asciz	"Integrator/CP flash protection\n"

	.comm	_versatile_flash_set_vpp,4,2    ## @versatile_flash_set_vpp
L_.str.3:                               ## @.str.3
	.asciz	"versatile/realview flash protection\n"

L_.str.4:                               ## @.str.4
	.asciz	"device marked as Versatile flash but no system controller was found\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_of_flash_probe_versatile       ; -- Begin function of_flash_probe_versatile
	.p2align	2
_of_flash_probe_versatile:              ; @of_flash_probe_versatile
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x20, x2
	mov	x8, x1
	mov	x19, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x8
	bl	_of_device_is_compatible
	cbz	w0, LBB0_14
; %bb.1:
Lloh2:
	adrp	x22, _syscon_regmap@GOTPAGE
Lloh3:
	ldr	x22, [x22, _syscon_regmap@GOTPAGEOFF]
	ldr	x8, [x22]
	cbz	x8, LBB0_7
LBB0_2:
Lloh4:
	adrp	x8, _of_flash_probe_versatile.versatile_flashprot@PAGE
Lloh5:
	ldr	w8, [x8, _of_flash_probe_versatile.versatile_flashprot@PAGEOFF]
	sub	w9, w8, #128
	cmp	w9, #2
	b.lo	LBB0_10
; %bb.3:
	cmp	w8, #130
	b.eq	LBB0_11
; %bb.4:
	cmp	w8, #131
	b.ne	LBB0_12
; %bb.5:
	mov	x0, x19
	bl	_ap_flash_init
	cbnz	w0, LBB0_14
; %bb.6:
Lloh6:
	adrp	x8, _ap_flash_set_vpp@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ap_flash_set_vpp@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	str	w8, [x20]
Lloh9:
	adrp	x1, l_.str.1@PAGE
Lloh10:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_13
LBB0_7:
Lloh11:
	adrp	x8, _syscon_match@GOTPAGE
Lloh12:
	ldr	x8, [x8, _syscon_match@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	add	x2, sp, #8
	mov	x0, #0
	bl	_of_find_matching_node_and_match
	cbz	x0, LBB0_15
; %bb.8:
	ldr	x8, [sp, #8]
	ldr	x8, [x8]
	adrp	x9, _of_flash_probe_versatile.versatile_flashprot@PAGE
	str	w8, [x9, _of_flash_probe_versatile.versatile_flashprot@PAGEOFF]
	bl	_syscon_node_to_regmap
	mov	x21, x0
	bl	_IS_ERR
	cbz	x0, LBB0_16
; %bb.9:
	mov	x0, x21
	bl	_PTR_ERR
	b	LBB0_14
LBB0_10:
Lloh14:
	adrp	x8, _versatile_flash_set_vpp@GOTPAGE
Lloh15:
	ldr	x8, [x8, _versatile_flash_set_vpp@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	str	w8, [x20]
Lloh17:
	adrp	x1, l_.str.3@PAGE
Lloh18:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_13
LBB0_11:
Lloh19:
	adrp	x8, _cp_flash_set_vpp@GOTPAGE
Lloh20:
	ldr	x8, [x8, _cp_flash_set_vpp@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	str	w8, [x20]
Lloh22:
	adrp	x1, l_.str.2@PAGE
Lloh23:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_13
LBB0_12:
Lloh24:
	adrp	x1, l_.str.4@PAGE
Lloh25:
	add	x1, x1, l_.str.4@PAGEOFF
LBB0_13:
	mov	x0, x19
	bl	_dev_info
	mov	w0, #0
LBB0_14:
	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
	add	sp, sp, #64
	ret
LBB0_15:
Lloh26:
	adrp	x8, _ENODEV@GOTPAGE
Lloh27:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_14
LBB0_16:
	str	x21, [x22]
	b	LBB0_2
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdr	Lloh4, Lloh5
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_of_flash_probe_versatile.versatile_flashprot,4,2 ; @of_flash_probe_versatile.versatile_flashprot
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"arm,versatile-flash"

	.comm	_syscon_regmap,8,3              ; @syscon_regmap
	.comm	_syscon_match,4,2               ; @syscon_match
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_ap_flash_set_vpp,4,2           ; @ap_flash_set_vpp
l_.str.1:                               ; @.str.1
	.asciz	"Integrator/AP flash protection\n"

	.comm	_cp_flash_set_vpp,4,2           ; @cp_flash_set_vpp
l_.str.2:                               ; @.str.2
	.asciz	"Integrator/CP flash protection\n"

	.comm	_versatile_flash_set_vpp,4,2    ; @versatile_flash_set_vpp
l_.str.3:                               ; @.str.3
	.asciz	"versatile/realview flash protection\n"

l_.str.4:                               ; @.str.4
	.asciz	"device marked as Versatile flash but no system controller was found\n"

.subsections_via_symbols
