	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ltq_mtd_probe
_ltq_mtd_probe:                         ## @ltq_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	movl	$24, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_5
## %bb.1:
	movq	%rax, %r15
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_platform_set_drvdata
	movq	_IORESOURCE_MEM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_platform_get_resource
	movq	%rax, 16(%r15)
	testq	%rax, %rax
	je	LBB0_7
## %bb.2:
	movl	(%r12), %edx
	movq	%r14, %rdi
	movl	$4, %esi
	callq	_devm_kzalloc
	movq	%rax, 8(%r15)
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	movq	16(%r15), %rdi
	movl	(%rdi), %ecx
	movl	%ecx, 48(%rax)
	callq	_resource_size
	movq	8(%r15), %rcx
	movl	%eax, 44(%rcx)
	movq	16(%r15), %rsi
	movq	%r14, %rdi
	callq	_devm_ioremap_resource
	movq	8(%r15), %rcx
	movl	%eax, 40(%rcx)
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_10
## %bb.4:
	movq	8(%r15), %rax
	movl	40(%rax), %edi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_5:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_6:
	xorl	%ebx, %ebx
	jmp	LBB0_8
LBB0_7:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
	movq	_ENOENT@GOTPCREL(%rip), %rax
LBB0_8:
	subl	(%rax), %ebx
LBB0_9:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	_ltq_map_name@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	8(%r15), %rsi
	movl	%eax, 36(%rsi)
	movl	$2, (%rsi)
	movq	_ltq_read16@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%rsi)
	movq	_ltq_write16@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 28(%rsi)
	movq	_ltq_copy_from@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%rsi)
	movq	_ltq_copy_to@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%rsi)
	movq	_LTQ_NOR_PROBING@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rsi)
	leaq	L_.str.1(%rip), %rdi
	callq	_do_map_probe
	movq	%rax, (%r15)
	movq	_LTQ_NOR_NORMAL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	8(%r15), %rdx
	movl	%ecx, 16(%rdx)
	testq	%rax, %rax
	je	LBB0_13
## %bb.11:
	movq	%r14, (%rax)
	movl	(%r14), %esi
	movq	%rax, %rdi
	callq	_mtd_set_of_node
	movq	8(%r15), %rax
	movq	8(%rax), %rax
	xorl	$1, (%rax)
	xorb	$1, 4(%rax)
	movq	(%r15), %rdi
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_mtd_device_register
	testl	%eax, %eax
	je	LBB0_9
## %bb.12:
	movl	%eax, %r12d
	leaq	L_.str.3(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
	movq	(%r15), %rdi
	callq	_map_destroy
	movl	%r12d, %ebx
	jmp	LBB0_9
LBB0_13:
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
	movq	_ENXIO@GOTPCREL(%rip), %rax
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_IORESOURCE_MEM,4,2             ## @IORESOURCE_MEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to get memory resource\n"

	.comm	_ENOENT,4,2                     ## @ENOENT
	.comm	_ltq_map_name,4,2               ## @ltq_map_name
	.comm	_ltq_read16,4,2                 ## @ltq_read16
	.comm	_ltq_write16,4,2                ## @ltq_write16
	.comm	_ltq_copy_from,4,2              ## @ltq_copy_from
	.comm	_ltq_copy_to,4,2                ## @ltq_copy_to
	.comm	_LTQ_NOR_PROBING,4,2            ## @LTQ_NOR_PROBING
L_.str.1:                               ## @.str.1
	.asciz	"cfi_probe"

	.comm	_LTQ_NOR_NORMAL,4,2             ## @LTQ_NOR_NORMAL
L_.str.2:                               ## @.str.2
	.asciz	"probing failed\n"

	.comm	_ENXIO,4,2                      ## @ENXIO
L_.str.3:                               ## @.str.3
	.asciz	"failed to add partitions\n"

	.no_dead_strip	_ltq_mtd_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ltq_mtd_probe
_ltq_mtd_probe:                         ; @ltq_mtd_probe
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x19, x0
Lloh0:
	adrp	x21, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x21, [x21, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w2, [x21]
	mov	w1, #24
	bl	_devm_kzalloc
	cbz	x0, LBB0_5
; %bb.1:
	mov	x20, x0
	mov	x0, x19
	mov	x1, x20
	bl	_platform_set_drvdata
Lloh2:
	adrp	x8, _IORESOURCE_MEM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _IORESOURCE_MEM@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_platform_get_resource
	str	x0, [x20, #16]
	cbz	x0, LBB0_6
; %bb.2:
	ldr	w2, [x21]
	mov	x0, x19
	mov	w1, #4
	bl	_devm_kzalloc
	str	x0, [x20, #8]
	cbz	x0, LBB0_5
; %bb.3:
	ldr	x8, [x20, #16]
	ldr	w9, [x8]
	str	w9, [x0, #48]
	mov	x0, x8
	bl	_resource_size
	ldp	x8, x1, [x20, #8]
	str	w0, [x8, #44]
	mov	x0, x19
	bl	_devm_ioremap_resource
	ldr	x8, [x20, #8]
	str	w0, [x8, #40]
	bl	_IS_ERR
	cbz	x0, LBB0_9
; %bb.4:
	ldr	x8, [x20, #8]
	ldr	w0, [x8, #40]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_PTR_ERR
LBB0_5:
Lloh5:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh9:
	adrp	x8, _ENOENT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_8:
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_9:
Lloh11:
	adrp	x8, _ltq_map_name@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ltq_map_name@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	ldr	x1, [x20, #8]
	mov	w9, #2
	str	w9, [x1]
Lloh14:
	adrp	x9, _ltq_read16@GOTPAGE
Lloh15:
	ldr	x9, [x9, _ltq_read16@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	stp	w9, w8, [x1, #32]
Lloh17:
	adrp	x8, _ltq_write16@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ltq_write16@GOTPAGEOFF]
Lloh19:
	adrp	x9, _ltq_copy_from@GOTPAGE
Lloh20:
	ldr	x9, [x9, _ltq_copy_from@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
Lloh22:
	ldr	w9, [x9]
	stp	w9, w8, [x1, #24]
Lloh23:
	adrp	x8, _ltq_copy_to@GOTPAGE
Lloh24:
	ldr	x8, [x8, _ltq_copy_to@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
Lloh26:
	adrp	x9, _LTQ_NOR_PROBING@GOTPAGE
Lloh27:
	ldr	x9, [x9, _LTQ_NOR_PROBING@GOTPAGEOFF]
Lloh28:
	ldr	w9, [x9]
	stp	w9, w8, [x1, #16]
Lloh29:
	adrp	x0, l_.str.1@PAGE
Lloh30:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_do_map_probe
	str	x0, [x20]
Lloh31:
	adrp	x8, _LTQ_NOR_NORMAL@GOTPAGE
Lloh32:
	ldr	x8, [x8, _LTQ_NOR_NORMAL@GOTPAGEOFF]
Lloh33:
	ldr	w8, [x8]
	ldr	x9, [x20, #8]
	str	w8, [x9, #16]
	cbz	x0, LBB0_12
; %bb.10:
	str	x19, [x0]
	ldr	w1, [x19]
	bl	_mtd_set_of_node
	ldp	x0, x8, [x20]
	ldr	x8, [x8, #8]
	ldr	d0, [x8]
	movi.2s	v1, #1
	eor.8b	v0, v0, v1
	str	d0, [x8]
	mov	x1, #0
	mov	w2, #0
	bl	_mtd_device_register
	mov	x21, x0
	cbz	w0, LBB0_8
; %bb.11:
Lloh34:
	adrp	x1, l_.str.3@PAGE
Lloh35:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	ldr	x0, [x20]
	bl	_map_destroy
	b	LBB0_8
LBB0_12:
Lloh36:
	adrp	x1, l_.str.2@PAGE
Lloh37:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh38:
	adrp	x8, _ENXIO@GOTPAGE
Lloh39:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
	b	LBB0_7
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh21
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh38, Lloh39
	.loh AdrpAdd	Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_IORESOURCE_MEM,4,2             ; @IORESOURCE_MEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to get memory resource\n"

	.comm	_ENOENT,4,2                     ; @ENOENT
	.comm	_ltq_map_name,4,2               ; @ltq_map_name
	.comm	_ltq_read16,4,2                 ; @ltq_read16
	.comm	_ltq_write16,4,2                ; @ltq_write16
	.comm	_ltq_copy_from,4,2              ; @ltq_copy_from
	.comm	_ltq_copy_to,4,2                ; @ltq_copy_to
	.comm	_LTQ_NOR_PROBING,4,2            ; @LTQ_NOR_PROBING
l_.str.1:                               ; @.str.1
	.asciz	"cfi_probe"

	.comm	_LTQ_NOR_NORMAL,4,2             ; @LTQ_NOR_NORMAL
l_.str.2:                               ; @.str.2
	.asciz	"probing failed\n"

	.comm	_ENXIO,4,2                      ; @ENXIO
l_.str.3:                               ; @.str.3
	.asciz	"failed to add partitions\n"

	.no_dead_strip	_ltq_mtd_probe
.subsections_via_symbols
