	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rbtx4939_flash_probe
_rbtx4939_flash_probe:                  ## @rbtx4939_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
	subq	$24, %rsp
	.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_7
## %bb.1:
	movq	%rdi, %r15
	movq	_IORESOURCE_MEM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%ebx, %ebx
	xorl	%edx, %edx
	callq	_platform_get_resource
	testq	%rax, %rax
	je	LBB0_8
## %bb.2:
	movq	%rax, %r12
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movl	$48, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_9
## %bb.3:
	movq	%rax, %r14
	movq	%r15, %rdi
	movq	%rax, %rsi
	callq	_platform_set_drvdata
	movq	%r12, %rdi
	callq	_resource_size
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	leaq	L_.str(%rip), %rdi
	xorl	%ebx, %ebx
	movq	%r12, %rsi
	xorl	%eax, %eax
	callq	_pr_notice
	movl	(%r12), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	%r15, %rdi
	callq	_dev_name
	movq	%r15, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movl	%eax, %ecx
	callq	_devm_request_mem_region
	testl	%eax, %eax
	je	LBB0_10
## %bb.4:
	movq	%r15, %rdi
	callq	_dev_name
	movl	%eax, 44(%r14)
	movl	(%r12), %esi
	movl	%esi, 36(%r14)
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movq	%rdx, 24(%r14)
	movl	16(%r13), %eax
	movl	%eax, 40(%r14)
	movq	%r15, %rdi
	callq	_devm_ioremap
	movl	%eax, 32(%r14)
	testl	%eax, %eax
	je	LBB0_11
## %bb.5:
	movq	%r14, %r12
	addq	$24, %r12
	movq	8(%r13), %rax
	movq	%r12, %rdi
	testq	%rax, %rax
	je	LBB0_15
## %bb.6:
	callq	*%rax
	jmp	LBB0_16
LBB0_7:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_8:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_9:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_10:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_11:
	movq	_EBUSY@GOTPCREL(%rip), %rax
LBB0_12:
	xorl	%ebx, %ebx
LBB0_13:
	subl	(%rax), %ebx
LBB0_14:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	callq	_simple_map_init
LBB0_16:
	movq	8(%r14), %rax
	testq	%rax, %rax
	jne	LBB0_20
## %bb.17:
	movq	_rom_probe_types@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	.p2align	4, 0x90
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_21
## %bb.19:                              ##   in Loop: Header=BB0_18 Depth=1
	movq	%r12, %rsi
	callq	_do_map_probe
	movq	%rax, 8(%r14)
	addq	$8, %rbx
	testq	%rax, %rax
	je	LBB0_18
LBB0_20:
	movq	_THIS_MODULE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, (%rax)
	movq	%rax, %rdi
	callq	_add_mtd_device
	xorl	%ebx, %ebx
	jmp	LBB0_14
LBB0_21:
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_err
	movq	_ENXIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	movq	%r15, %rdi
	callq	_rbtx4939_flash_remove
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_IORESOURCE_MEM,4,2             ## @IORESOURCE_MEM
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"rbtx4939 platform flash device: %pR\n"

	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_rom_probe_types,8,3            ## @rom_probe_types
L_.str.1:                               ## @.str.1
	.asciz	"map_probe failed\n"

	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_THIS_MODULE,4,2                ## @THIS_MODULE
	.comm	_part_probe_types,4,2           ## @part_probe_types
	.no_dead_strip	_rbtx4939_flash_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rbtx4939_flash_probe
_rbtx4939_flash_probe:                  ; @rbtx4939_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	x24, [x0]
	cbz	x24, LBB0_7
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x8, _IORESOURCE_MEM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IORESOURCE_MEM@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_platform_get_resource
	cbz	x0, LBB0_7
; %bb.2:
	mov	x21, x0
Lloh3:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #48
	bl	_devm_kzalloc
	cbz	x0, LBB0_11
; %bb.3:
	mov	x20, x0
	mov	x0, x19
	mov	x1, x20
	bl	_platform_set_drvdata
	mov	x0, x21
	bl	_resource_size
	mov	x23, x0
	str	x21, [sp]
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_notice
	ldr	w22, [x21]
	mov	x0, x19
	bl	_dev_name
	mov	x3, x0
	mov	x0, x19
	mov	x1, x22
	mov	x2, x23
	bl	_devm_request_mem_region
	cbz	w0, LBB0_10
; %bb.4:
	mov	x0, x19
	bl	_dev_name
	mov	x22, x20
	str	x23, [x22, #24]!
	str	w0, [x22, #20]
	ldr	w1, [x21]
	ldr	w8, [x24, #16]
	stp	w1, w8, [x22, #12]
	mov	x0, x19
	mov	x2, x23
	bl	_devm_ioremap
	str	w0, [x22, #8]
	cbz	w0, LBB0_10
; %bb.5:
	ldr	x8, [x24, #8]
	cbz	x8, LBB0_12
; %bb.6:
	mov	x0, x22
	blr	x8
	ldr	x0, [x20, #8]
	cbnz	x0, LBB0_16
	b	LBB0_13
LBB0_7:
Lloh8:
	adrp	x8, _ENODEV@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_9:
	mov	x0, x20
	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_10:
Lloh10:
	adrp	x8, _EBUSY@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_8
LBB0_11:
Lloh12:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_8
LBB0_12:
	mov	x0, x22
	bl	_simple_map_init
	ldr	x0, [x20, #8]
	cbnz	x0, LBB0_16
LBB0_13:
Lloh14:
	adrp	x8, _rom_probe_types@GOTPAGE
Lloh15:
	ldr	x8, [x8, _rom_probe_types@GOTPAGEOFF]
Lloh16:
	ldr	x21, [x8]
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x21]
	cbz	x0, LBB0_17
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=1
	mov	x1, x22
	bl	_do_map_probe
	str	x0, [x20, #8]
	add	x21, x21, #8
	cbz	x0, LBB0_14
LBB0_16:
Lloh17:
	adrp	x8, _THIS_MODULE@GOTPAGE
Lloh18:
	ldr	x8, [x8, _THIS_MODULE@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	str	w8, [x0]
	bl	_add_mtd_device
	mov	w20, #0
	b	LBB0_9
LBB0_17:
Lloh20:
	adrp	x1, l_.str.1@PAGE
Lloh21:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh22:
	adrp	x8, _ENXIO@GOTPAGE
Lloh23:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	neg	w20, w8
	mov	x0, x19
	bl	_rbtx4939_flash_remove
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_IORESOURCE_MEM,4,2             ; @IORESOURCE_MEM
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"rbtx4939 platform flash device: %pR\n"

	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_rom_probe_types,8,3            ; @rom_probe_types
l_.str.1:                               ; @.str.1
	.asciz	"map_probe failed\n"

	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_THIS_MODULE,4,2                ; @THIS_MODULE
	.comm	_part_probe_types,4,2           ; @part_probe_types
	.no_dead_strip	_rbtx4939_flash_probe
.subsections_via_symbols
