	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function socrates_nand_probe
_socrates_nand_probe:                   ## @socrates_nand_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, %r15
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$48, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	movq	%rax, %rbx
	movl	(%r15), %edi
	xorl	%r13d, %r13d
	xorl	%esi, %esi
	callq	_of_iomap
	movq	%rax, (%rbx)
	testq	%rax, %rax
	je	LBB0_7
## %bb.2:
	movq	%rbx, %r14
	addq	$16, %r14
	movq	%r14, %rdi
	callq	_nand_to_mtd
	movq	%rax, %r12
	movq	%r15, 8(%rbx)
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_nand_set_controller_data
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_nand_set_flash_node
	leaq	L_.str.1(%rip), %rax
	movq	%rax, (%r12)
	movq	%r15, 8(%r12)
	movq	_socrates_nand_cmd_ctrl@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 36(%rbx)
	movq	_socrates_nand_read_byte@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%rbx)
	movq	_socrates_nand_write_buf@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 28(%rbx)
	movq	_socrates_nand_read_buf@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%rbx)
	movq	_socrates_nand_device_ready@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%rbx)
	movq	_NAND_ECC_SOFT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 44(%rbx)
	movq	_NAND_ECC_HAMMING@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 40(%rbx)
	movl	$20, 16(%rbx)
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_dev_set_drvdata
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_nand_scan
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_5
## %bb.3:
	xorl	%r13d, %r13d
	movq	%r12, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_mtd_device_register
	testl	%eax, %eax
	je	LBB0_9
## %bb.4:
	movl	%eax, %r15d
	movq	%r14, %rdi
	callq	_nand_release
	movl	%r15d, %r13d
LBB0_5:
	movq	(%rbx), %rdi
	callq	_iounmap
	jmp	LBB0_9
LBB0_6:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	jmp	LBB0_8
LBB0_7:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_err
	movq	_EIO@GOTPCREL(%rip), %rax
LBB0_8:
	subl	(%rax), %r13d
LBB0_9:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ioremap failed\n"

	.comm	_EIO,4,2                        ## @EIO
L_.str.1:                               ## @.str.1
	.asciz	"socrates_nand"

	.comm	_socrates_nand_cmd_ctrl,4,2     ## @socrates_nand_cmd_ctrl
	.comm	_socrates_nand_read_byte,4,2    ## @socrates_nand_read_byte
	.comm	_socrates_nand_write_buf,4,2    ## @socrates_nand_write_buf
	.comm	_socrates_nand_read_buf,4,2     ## @socrates_nand_read_buf
	.comm	_socrates_nand_device_ready,4,2 ## @socrates_nand_device_ready
	.comm	_NAND_ECC_SOFT,4,2              ## @NAND_ECC_SOFT
	.comm	_NAND_ECC_HAMMING,4,2           ## @NAND_ECC_HAMMING
	.no_dead_strip	_socrates_nand_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function socrates_nand_probe
_socrates_nand_probe:                   ; @socrates_nand_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	x21, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	w1, #48
	bl	_devm_kzalloc
	cbz	x0, LBB0_6
; %bb.1:
	mov	x19, x0
	ldr	w0, [x21]
	mov	w1, #0
	bl	_of_iomap
	str	x0, [x19]
	cbz	x0, LBB0_7
; %bb.2:
	add	x20, x19, #16
	mov	x0, x20
	bl	_nand_to_mtd
	mov	x22, x0
	str	x21, [x19, #8]
	mov	x0, x20
	mov	x1, x19
	bl	_nand_set_controller_data
	ldr	w1, [x21]
	mov	x0, x20
	bl	_nand_set_flash_node
Lloh3:
	adrp	x8, l_.str.1@PAGE
Lloh4:
	add	x8, x8, l_.str.1@PAGEOFF
	stp	x8, x21, [x22]
Lloh5:
	adrp	x8, _socrates_nand_cmd_ctrl@GOTPAGE
Lloh6:
	ldr	x8, [x8, _socrates_nand_cmd_ctrl@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x9, _socrates_nand_read_byte@GOTPAGE
Lloh9:
	ldr	x9, [x9, _socrates_nand_read_byte@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	stp	w9, w8, [x19, #32]
Lloh11:
	adrp	x8, _socrates_nand_write_buf@GOTPAGE
Lloh12:
	ldr	x8, [x8, _socrates_nand_write_buf@GOTPAGEOFF]
Lloh13:
	adrp	x9, _socrates_nand_read_buf@GOTPAGE
Lloh14:
	ldr	x9, [x9, _socrates_nand_read_buf@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
Lloh16:
	ldr	w9, [x9]
	stp	w9, w8, [x19, #24]
Lloh17:
	adrp	x8, _socrates_nand_device_ready@GOTPAGE
Lloh18:
	ldr	x8, [x8, _socrates_nand_device_ready@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
Lloh20:
	adrp	x9, _NAND_ECC_SOFT@GOTPAGE
Lloh21:
	ldr	x9, [x9, _NAND_ECC_SOFT@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
Lloh23:
	adrp	x10, _NAND_ECC_HAMMING@GOTPAGE
Lloh24:
	ldr	x10, [x10, _NAND_ECC_HAMMING@GOTPAGEOFF]
Lloh25:
	ldr	w10, [x10]
	stp	w10, w9, [x19, #40]
	mov	w9, #20
	stp	w9, w8, [x19, #16]
	mov	x0, x21
	mov	x1, x19
	bl	_dev_set_drvdata
	mov	x0, x20
	mov	w1, #1
	bl	_nand_scan
	mov	x21, x0
	cbnz	w0, LBB0_5
; %bb.3:
	mov	x0, x22
	mov	x1, #0
	mov	w2, #0
	bl	_mtd_device_register
	mov	x21, x0
	cbz	w0, LBB0_9
; %bb.4:
	mov	x0, x20
	bl	_nand_release
LBB0_5:
	ldr	x0, [x19]
	bl	_iounmap
	b	LBB0_9
LBB0_6:
Lloh26:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh27:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
Lloh28:
	adrp	x1, l_.str@PAGE
Lloh29:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_dev_err
Lloh30:
	adrp	x8, _EIO@GOTPAGE
Lloh31:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_9:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh15
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpAdd	Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ioremap failed\n"

	.comm	_EIO,4,2                        ; @EIO
l_.str.1:                               ; @.str.1
	.asciz	"socrates_nand"

	.comm	_socrates_nand_cmd_ctrl,4,2     ; @socrates_nand_cmd_ctrl
	.comm	_socrates_nand_read_byte,4,2    ; @socrates_nand_read_byte
	.comm	_socrates_nand_write_buf,4,2    ; @socrates_nand_write_buf
	.comm	_socrates_nand_read_buf,4,2     ; @socrates_nand_read_buf
	.comm	_socrates_nand_device_ready,4,2 ; @socrates_nand_device_ready
	.comm	_NAND_ECC_SOFT,4,2              ; @NAND_ECC_SOFT
	.comm	_NAND_ECC_HAMMING,4,2           ; @NAND_ECC_HAMMING
	.no_dead_strip	_socrates_nand_probe
.subsections_via_symbols
