	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ixp2000_flash_probe
_ixp2000_flash_probe:                   ## @ixp2000_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	%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), %r13
	testq	%r13, %r13
	je	LBB0_10
## %bb.1:
	movq	16(%r13), %r12
	testq	%r12, %r12
	je	LBB0_10
## %bb.2:
	movq	%rdi, %r15
	movq	8(%rdi), %rax
	movslq	(%rax), %r14
	movslq	4(%rax), %rax
	subq	%rax, %r14
	incq	%r14
	movq	(%r13), %rdx
	movl	%r14d, %ecx
	sarl	$20, %ecx
	leaq	L_.str.2(%rip), %rsi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_dev_info
	movl	(%r12), %edx
	cmpl	$1, %edx
	jne	LBB0_11
## %bb.3:
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$80, %edi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_13
## %bb.4:
	movq	%rax, %r12
	movq	%rax, %rdi
	xorl	%esi, %esi
	movl	$80, %edx
	callq	_memset
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_platform_set_drvdata
	movq	_NO_XIP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 68(%r12)
	imulq	(%r13), %r14
	movq	%r14, 16(%r12)
	movl	$1, 24(%r12)
	movq	8(%r13), %rax
	movq	%rax, 32(%r12)
	movq	%r15, %rdi
	callq	_dev_name
	movl	%eax, 64(%r12)
	movq	_ixp2000_flash_read8@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 60(%r12)
	movq	_ixp2000_flash_write8@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 56(%r12)
	movq	_ixp2000_flash_copy_from@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 52(%r12)
	movq	_ixp2000_flash_copy_to@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 48(%r12)
	movq	8(%r15), %rax
	movl	(%rax), %ebx
	movl	4(%rax), %r13d
	subl	%r13d, %ebx
	incl	%ebx
	movq	%r15, %rdi
	callq	_dev_name
	movl	%r13d, %edi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_request_mem_region
	movl	%eax, 72(%r12)
	testl	%eax, %eax
	je	LBB0_12
## %bb.5:
	movq	8(%r15), %rax
	movl	(%rax), %esi
	movl	4(%rax), %edi
	subl	%edi, %esi
	incl	%esi
	callq	_ioremap
	movq	%rax, 40(%r12)
	testq	%rax, %rax
	je	LBB0_17
## %bb.6:
	movq	%r12, %rsi
	addq	$16, %rsi
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	4(%rax), %edi
	callq	_do_map_probe
	movq	%rax, 8(%r12)
	testq	%rax, %rax
	je	LBB0_18
## %bb.7:
	movq	_THIS_MODULE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, (%rax)
	leaq	_ixp2000_flash_probe.probes(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%rax, %rdi
	movq	%r12, %rdx
	xorl	%ecx, %ecx
	callq	_parse_mtd_partitions
	movl	%eax, %r14d
	testl	%eax, %eax
	jle	LBB0_19
## %bb.8:
	movq	8(%r12), %rdi
	movl	(%r12), %esi
	movl	%r14d, %edx
	callq	_add_mtd_partitions
	testl	%eax, %eax
	je	LBB0_16
## %bb.9:
	movl	%eax, %r14d
	leaq	L_.str.7(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_15
LBB0_10:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_16
LBB0_11:
	shll	$3, %edx
	leaq	L_.str.3(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EIO@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_16
LBB0_12:
	leaq	L_.str.4(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_err
LBB0_13:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
LBB0_14:
	subl	(%rax), %r14d
LBB0_15:
	movq	%r15, %rdi
	callq	_ixp2000_flash_remove
	movl	%r14d, %ebx
LBB0_16:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	leaq	L_.str.5(%rip), %rsi
	xorl	%r14d, %r14d
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EIO@GOTPCREL(%rip), %rax
	jmp	LBB0_14
LBB0_18:
	leaq	L_.str.6(%rip), %rsi
	xorl	%r14d, %r14d
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_ENXIO@GOTPCREL(%rip), %rax
	jmp	LBB0_14
LBB0_19:
	jne	LBB0_15
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.section	__DATA,__data
	.p2align	4                               ## @ixp2000_flash_probe.probes
_ixp2000_flash_probe.probes:
	.quad	L_.str
	.quad	L_.str.1
	.quad	0

	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"RedBoot"

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

	.comm	_ENODEV,4,2                     ## @ENODEV
L_.str.2:                               ## @.str.2
	.asciz	"Probe of IXP2000 flash(%d banks x %dMiB)\n"

L_.str.3:                               ## @.str.3
	.asciz	"IXP2000 MTD map only supports 8-bit mode, asking for %d\n"

	.comm	_EIO,4,2                        ## @EIO
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_NO_XIP,4,2                     ## @NO_XIP
	.comm	_ixp2000_flash_read8,4,2        ## @ixp2000_flash_read8
	.comm	_ixp2000_flash_write8,4,2       ## @ixp2000_flash_write8
	.comm	_ixp2000_flash_copy_from,4,2    ## @ixp2000_flash_copy_from
	.comm	_ixp2000_flash_copy_to,4,2      ## @ixp2000_flash_copy_to
L_.str.4:                               ## @.str.4
	.asciz	"Could not reserve memory region\n"

L_.str.5:                               ## @.str.5
	.asciz	"Failed to ioremap flash region\n"

L_.str.6:                               ## @.str.6
	.asciz	"map_probe failed\n"

	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_THIS_MODULE,4,2                ## @THIS_MODULE
L_.str.7:                               ## @.str.7
	.asciz	"Could not parse partitions\n"

	.comm	_erratum44_workaround,8,3       ## @erratum44_workaround
	.no_dead_strip	_ixp2000_flash_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ixp2000_flash_probe
_ixp2000_flash_probe:                   ; @ixp2000_flash_probe
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	ldr	x21, [x0]
	cbz	x21, LBB0_10
; %bb.1:
	ldr	x24, [x21, #16]
	cbz	x24, LBB0_10
; %bb.2:
	mov	x19, x0
	ldr	x8, [x0, #8]
	ldpsw	x9, x8, [x8]
	sub	x8, x9, x8
	add	x22, x8, #1
	ldr	x8, [x21]
	asr	w9, w22, #20
	stp	x8, x9, [sp]
Lloh0:
	adrp	x1, l_.str.2@PAGE
Lloh1:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_info
	ldr	w8, [x24]
	cmp	w8, #1
	b.ne	LBB0_11
; %bb.3:
Lloh2:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	w0, #80
	bl	_kmalloc
	cbz	x0, LBB0_15
; %bb.4:
	mov	x20, x0
	mov	w1, #0
	mov	w2, #80
	bl	_memset
	mov	x0, x19
	mov	x1, x20
	bl	_platform_set_drvdata
Lloh5:
	adrp	x8, _NO_XIP@GOTPAGE
Lloh6:
	ldr	x8, [x8, _NO_XIP@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	ldp	x9, x10, [x21]
	mul	x9, x9, x22
	mov	x21, x20
	str	x9, [x21, #16]!
	str	w8, [x21, #52]
	mov	w8, #1
	str	w8, [x21, #8]
	str	x10, [x21, #16]
	mov	x0, x19
	bl	_dev_name
	str	w0, [x21, #48]
Lloh8:
	adrp	x8, _ixp2000_flash_read8@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ixp2000_flash_read8@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
Lloh11:
	adrp	x9, _ixp2000_flash_write8@GOTPAGE
Lloh12:
	ldr	x9, [x9, _ixp2000_flash_write8@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
Lloh14:
	adrp	x10, _ixp2000_flash_copy_from@GOTPAGE
Lloh15:
	ldr	x10, [x10, _ixp2000_flash_copy_from@GOTPAGEOFF]
	stp	w9, w8, [x21, #40]
Lloh16:
	ldr	w8, [x10]
Lloh17:
	adrp	x9, _ixp2000_flash_copy_to@GOTPAGE
Lloh18:
	ldr	x9, [x9, _ixp2000_flash_copy_to@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	stp	w9, w8, [x21, #32]
	ldr	x8, [x19, #8]
	ldp	w8, w22, [x8]
	sub	w8, w8, w22
	add	w23, w8, #1
	mov	x0, x19
	bl	_dev_name
	mov	x2, x0
	mov	x0, x22
	mov	x1, x23
	bl	_request_mem_region
	str	w0, [x21, #56]
	cbz	w0, LBB0_14
; %bb.5:
	ldr	x8, [x19, #8]
	ldp	w8, w0, [x8]
	sub	w8, w8, w0
	add	w1, w8, #1
	bl	_ioremap
	str	x0, [x20, #40]
	cbz	x0, LBB0_18
; %bb.6:
	ldr	w0, [x24, #4]
	mov	x1, x21
	bl	_do_map_probe
	str	x0, [x20, #8]
	cbz	x0, LBB0_19
; %bb.7:
Lloh20:
	adrp	x8, _THIS_MODULE@GOTPAGE
Lloh21:
	ldr	x8, [x8, _THIS_MODULE@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	str	w8, [x0]
Lloh23:
	adrp	x1, _ixp2000_flash_probe.probes@PAGE
Lloh24:
	add	x1, x1, _ixp2000_flash_probe.probes@PAGEOFF
	mov	x2, x20
	mov	w3, #0
	bl	_parse_mtd_partitions
	mov	x21, x0
	cmp	w0, #1
	b.lt	LBB0_20
; %bb.8:
	ldr	x0, [x20, #8]
	ldr	w1, [x20]
	mov	x2, x21
	bl	_add_mtd_partitions
	mov	x21, x0
	cbz	w0, LBB0_13
; %bb.9:
Lloh25:
	adrp	x1, l_.str.7@PAGE
Lloh26:
	add	x1, x1, l_.str.7@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	b	LBB0_17
LBB0_10:
Lloh27:
	adrp	x8, _ENODEV@GOTPAGE
Lloh28:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_12
LBB0_11:
	lsl	w8, w8, #3
	str	x8, [sp]
Lloh29:
	adrp	x1, l_.str.3@PAGE
Lloh30:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh31:
	adrp	x8, _EIO@GOTPAGE
Lloh32:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
LBB0_12:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_13:
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_14:
Lloh33:
	adrp	x1, l_.str.4@PAGE
Lloh34:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_dev_err
LBB0_15:
Lloh35:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh36:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_16:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_17:
	mov	x0, x19
	bl	_ixp2000_flash_remove
	b	LBB0_13
LBB0_18:
Lloh37:
	adrp	x1, l_.str.5@PAGE
Lloh38:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh39:
	adrp	x8, _EIO@GOTPAGE
Lloh40:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_16
LBB0_19:
Lloh41:
	adrp	x1, l_.str.6@PAGE
Lloh42:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh43:
	adrp	x8, _ENXIO@GOTPAGE
Lloh44:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
	b	LBB0_16
LBB0_20:
	cbnz	w21, LBB0_17
	b	LBB0_13
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh35, Lloh36
	.loh AdrpLdrGot	Lloh39, Lloh40
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpLdrGot	Lloh43, Lloh44
	.loh AdrpAdd	Lloh41, Lloh42
	.cfi_endproc
                                        ; -- End function
	.section	__DATA,__data
	.p2align	3                               ; @ixp2000_flash_probe.probes
_ixp2000_flash_probe.probes:
	.quad	l_.str
	.quad	l_.str.1
	.quad	0

	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"RedBoot"

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

	.comm	_ENODEV,4,2                     ; @ENODEV
l_.str.2:                               ; @.str.2
	.asciz	"Probe of IXP2000 flash(%d banks x %dMiB)\n"

l_.str.3:                               ; @.str.3
	.asciz	"IXP2000 MTD map only supports 8-bit mode, asking for %d\n"

	.comm	_EIO,4,2                        ; @EIO
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_NO_XIP,4,2                     ; @NO_XIP
	.comm	_ixp2000_flash_read8,4,2        ; @ixp2000_flash_read8
	.comm	_ixp2000_flash_write8,4,2       ; @ixp2000_flash_write8
	.comm	_ixp2000_flash_copy_from,4,2    ; @ixp2000_flash_copy_from
	.comm	_ixp2000_flash_copy_to,4,2      ; @ixp2000_flash_copy_to
l_.str.4:                               ; @.str.4
	.asciz	"Could not reserve memory region\n"

l_.str.5:                               ; @.str.5
	.asciz	"Failed to ioremap flash region\n"

l_.str.6:                               ; @.str.6
	.asciz	"map_probe failed\n"

	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_THIS_MODULE,4,2                ; @THIS_MODULE
l_.str.7:                               ; @.str.7
	.asciz	"Could not parse partitions\n"

	.comm	_erratum44_workaround,8,3       ; @erratum44_workaround
	.no_dead_strip	_ixp2000_flash_probe
.subsections_via_symbols
