	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ams_delta_init
_ams_delta_init:                        ## @ams_delta_init
	.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, %r12
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$96, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	leaq	80(%rax), %r14
	movq	%r14, %rdi
	callq	_nand_to_mtd
	movq	%rax, %r15
	movq	%r12, (%rax)
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_nand_set_controller_data
	movq	_GPIOD_IN@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	callq	_devm_gpiod_get_optional
	movq	%rax, 72(%rbx)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	72(%rbx), %rdi
	callq	_PTR_ERR
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdi
	movl	%eax, %edx
	callq	_dev_warn
	jmp	LBB0_23
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_23
LBB0_4:
	movq	_NAND_ECC_SOFT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 92(%rbx)
	movq	_NAND_ECC_HAMMING@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 88(%rbx)
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_platform_set_drvdata
	movq	_GPIOD_OUT_HIGH@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.2(%rip), %rsi
	movq	%r12, %rdi
	callq	_devm_gpiod_get
	movq	%rax, 64(%rbx)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	64(%rbx), %rdi
	callq	_PTR_ERR
	movl	%eax, %ebx
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_18
LBB0_6:
	movq	_GPIOD_OUT_HIGH@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.4(%rip), %rsi
	movq	%r12, %rdi
	callq	_devm_gpiod_get
	movq	%rax, 56(%rbx)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movq	56(%rbx), %rdi
	callq	_PTR_ERR
	movl	%eax, %ebx
	leaq	L_.str.5(%rip), %rsi
	jmp	LBB0_18
LBB0_8:
	movq	_GPIOD_OUT_HIGH@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.6(%rip), %rsi
	movq	%r12, %rdi
	callq	_devm_gpiod_get
	movq	%rax, 48(%rbx)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	movq	48(%rbx), %rdi
	callq	_PTR_ERR
	movl	%eax, %ebx
	leaq	L_.str.7(%rip), %rsi
	jmp	LBB0_18
LBB0_10:
	movq	_GPIOD_OUT_HIGH@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.8(%rip), %rsi
	movq	%r12, %rdi
	callq	_devm_gpiod_get
	movq	%rax, 40(%rbx)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	movq	40(%rbx), %rdi
	callq	_PTR_ERR
	movl	%eax, %ebx
	leaq	L_.str.9(%rip), %rsi
	jmp	LBB0_18
LBB0_12:
	movq	_GPIOD_OUT_LOW@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.10(%rip), %rsi
	movq	%r12, %rdi
	callq	_devm_gpiod_get
	movq	%rax, 32(%rbx)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_14
## %bb.13:
	movq	32(%rbx), %rdi
	callq	_PTR_ERR
	movl	%eax, %ebx
	leaq	L_.str.11(%rip), %rsi
	jmp	LBB0_18
LBB0_14:
	movq	_GPIOD_OUT_LOW@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.12(%rip), %rsi
	movq	%r12, %rdi
	callq	_devm_gpiod_get
	movq	%rax, 24(%rbx)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_16
## %bb.15:
	movq	24(%rbx), %rdi
	callq	_PTR_ERR
	movl	%eax, %ebx
	leaq	L_.str.13(%rip), %rsi
	jmp	LBB0_18
LBB0_16:
	movl	(%r13), %edx
	leaq	L_.str.14(%rip), %rsi
	movq	%r12, %rdi
	callq	_devm_gpiod_get_array
	movq	%rax, %r13
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_19
## %bb.17:
	movq	%r13, %rdi
	callq	_PTR_ERR
	movl	%eax, %ebx
	leaq	L_.str.15(%rip), %rsi
LBB0_18:
	movq	%r12, %rdi
	movl	%eax, %edx
	callq	_dev_err
LBB0_23:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_19:
	movq	%r13, 16(%rbx)
	movl	$1, (%rbx)
	movq	%rbx, %r12
	addq	$8, %r12
	movq	_ams_delta_ops@GOTPCREL(%rip), %rax
	movq	%rax, 8(%rbx)
	movq	%r12, %rdi
	callq	_nand_controller_init
	movq	%r12, 80(%rbx)
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_nand_scan
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_23
## %bb.20:
	movq	_partition_info@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%ebx, %edi
	callq	_ARRAY_SIZE
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_mtd_device_register
	testl	%eax, %eax
	je	LBB0_21
## %bb.22:
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_nand_cleanup
	jmp	LBB0_23
LBB0_21:
	xorl	%ebx, %ebx
	jmp	LBB0_23
	.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	"rdy"

	.comm	_GPIOD_IN,4,2                   ## @GPIOD_IN
L_.str.1:                               ## @.str.1
	.asciz	"RDY GPIO request failed (%d)\n"

	.comm	_NAND_ECC_SOFT,4,2              ## @NAND_ECC_SOFT
	.comm	_NAND_ECC_HAMMING,4,2           ## @NAND_ECC_HAMMING
L_.str.2:                               ## @.str.2
	.asciz	"nwp"

	.comm	_GPIOD_OUT_HIGH,4,2             ## @GPIOD_OUT_HIGH
L_.str.3:                               ## @.str.3
	.asciz	"NWP GPIO request failed (%d)\n"

L_.str.4:                               ## @.str.4
	.asciz	"nce"

L_.str.5:                               ## @.str.5
	.asciz	"NCE GPIO request failed (%d)\n"

L_.str.6:                               ## @.str.6
	.asciz	"nre"

L_.str.7:                               ## @.str.7
	.asciz	"NRE GPIO request failed (%d)\n"

L_.str.8:                               ## @.str.8
	.asciz	"nwe"

L_.str.9:                               ## @.str.9
	.asciz	"NWE GPIO request failed (%d)\n"

L_.str.10:                              ## @.str.10
	.asciz	"ale"

	.comm	_GPIOD_OUT_LOW,4,2              ## @GPIOD_OUT_LOW
L_.str.11:                              ## @.str.11
	.asciz	"ALE GPIO request failed (%d)\n"

L_.str.12:                              ## @.str.12
	.asciz	"cle"

L_.str.13:                              ## @.str.13
	.asciz	"CLE GPIO request failed (%d)\n"

L_.str.14:                              ## @.str.14
	.asciz	"data"

L_.str.15:                              ## @.str.15
	.asciz	"data GPIO request failed: %d\n"

	.comm	_ams_delta_ops,4,2              ## @ams_delta_ops
	.comm	_partition_info,4,2             ## @partition_info
	.no_dead_strip	_ams_delta_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ams_delta_init
_ams_delta_init:                        ; @ams_delta_init
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	w1, #96
	bl	_devm_kzalloc
	cbz	x0, LBB0_3
; %bb.1:
	mov	x22, x0
	add	x20, x0, #80
	mov	x0, x20
	bl	_nand_to_mtd
	mov	x21, x0
	str	x19, [x0]
	mov	x0, x20
	mov	x1, x22
	bl	_nand_set_controller_data
Lloh3:
	adrp	x23, _GPIOD_IN@GOTPAGE
Lloh4:
	ldr	x23, [x23, _GPIOD_IN@GOTPAGEOFF]
	ldr	w2, [x23]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_devm_gpiod_get_optional
	str	x0, [x22, #72]
	bl	_IS_ERR
	cbz	x0, LBB0_4
; %bb.2:
	ldr	x0, [x22, #72]
	bl	_PTR_ERR
	mov	x22, x0
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x2, x22
	bl	_dev_warn
	b	LBB0_19
LBB0_3:
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_19
LBB0_4:
Lloh12:
	adrp	x8, _NAND_ECC_SOFT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _NAND_ECC_SOFT@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
Lloh15:
	adrp	x9, _NAND_ECC_HAMMING@GOTPAGE
Lloh16:
	ldr	x9, [x9, _NAND_ECC_HAMMING@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	stp	w9, w8, [x22, #88]
	mov	x0, x19
	mov	x1, x22
	bl	_platform_set_drvdata
Lloh18:
	adrp	x24, _GPIOD_OUT_HIGH@GOTPAGE
Lloh19:
	ldr	x24, [x24, _GPIOD_OUT_HIGH@GOTPAGEOFF]
	ldr	w2, [x24]
Lloh20:
	adrp	x1, l_.str.2@PAGE
Lloh21:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_devm_gpiod_get
	str	x0, [x22, #64]
	bl	_IS_ERR
	cbz	x0, LBB0_6
; %bb.5:
	ldr	x0, [x22, #64]
	bl	_PTR_ERR
	mov	x22, x0
Lloh22:
	adrp	x1, l_.str.3@PAGE
Lloh23:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_18
LBB0_6:
	ldr	w2, [x24]
Lloh24:
	adrp	x1, l_.str.4@PAGE
Lloh25:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_devm_gpiod_get
	str	x0, [x22, #56]
	bl	_IS_ERR
	cbz	x0, LBB0_8
; %bb.7:
	ldr	x0, [x22, #56]
	bl	_PTR_ERR
	mov	x22, x0
Lloh26:
	adrp	x1, l_.str.5@PAGE
Lloh27:
	add	x1, x1, l_.str.5@PAGEOFF
	b	LBB0_18
LBB0_8:
	ldr	w2, [x24]
Lloh28:
	adrp	x1, l_.str.6@PAGE
Lloh29:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	x0, x19
	bl	_devm_gpiod_get
	str	x0, [x22, #48]
	bl	_IS_ERR
	cbz	x0, LBB0_10
; %bb.9:
	ldr	x0, [x22, #48]
	bl	_PTR_ERR
	mov	x22, x0
Lloh30:
	adrp	x1, l_.str.7@PAGE
Lloh31:
	add	x1, x1, l_.str.7@PAGEOFF
	b	LBB0_18
LBB0_10:
	ldr	w2, [x24]
Lloh32:
	adrp	x1, l_.str.8@PAGE
Lloh33:
	add	x1, x1, l_.str.8@PAGEOFF
	mov	x0, x19
	bl	_devm_gpiod_get
	str	x0, [x22, #40]
	bl	_IS_ERR
	cbz	x0, LBB0_12
; %bb.11:
	ldr	x0, [x22, #40]
	bl	_PTR_ERR
	mov	x22, x0
Lloh34:
	adrp	x1, l_.str.9@PAGE
Lloh35:
	add	x1, x1, l_.str.9@PAGEOFF
	b	LBB0_18
LBB0_12:
Lloh36:
	adrp	x24, _GPIOD_OUT_LOW@GOTPAGE
Lloh37:
	ldr	x24, [x24, _GPIOD_OUT_LOW@GOTPAGEOFF]
	ldr	w2, [x24]
Lloh38:
	adrp	x1, l_.str.10@PAGE
Lloh39:
	add	x1, x1, l_.str.10@PAGEOFF
	mov	x0, x19
	bl	_devm_gpiod_get
	str	x0, [x22, #32]
	bl	_IS_ERR
	cbz	x0, LBB0_14
; %bb.13:
	ldr	x0, [x22, #32]
	bl	_PTR_ERR
	mov	x22, x0
Lloh40:
	adrp	x1, l_.str.11@PAGE
Lloh41:
	add	x1, x1, l_.str.11@PAGEOFF
	b	LBB0_18
LBB0_14:
	ldr	w2, [x24]
Lloh42:
	adrp	x1, l_.str.12@PAGE
Lloh43:
	add	x1, x1, l_.str.12@PAGEOFF
	mov	x0, x19
	bl	_devm_gpiod_get
	str	x0, [x22, #24]
	bl	_IS_ERR
	cbz	x0, LBB0_16
; %bb.15:
	ldr	x0, [x22, #24]
	bl	_PTR_ERR
	mov	x22, x0
Lloh44:
	adrp	x1, l_.str.13@PAGE
Lloh45:
	add	x1, x1, l_.str.13@PAGEOFF
	b	LBB0_18
LBB0_16:
	ldr	w2, [x23]
Lloh46:
	adrp	x1, l_.str.14@PAGE
Lloh47:
	add	x1, x1, l_.str.14@PAGEOFF
	mov	x0, x19
	bl	_devm_gpiod_get_array
	mov	x23, x0
	bl	_IS_ERR
	cbz	x0, LBB0_20
; %bb.17:
	mov	x0, x23
	bl	_PTR_ERR
	mov	x22, x0
Lloh48:
	adrp	x1, l_.str.15@PAGE
Lloh49:
	add	x1, x1, l_.str.15@PAGEOFF
LBB0_18:
	mov	x0, x19
	mov	x2, x22
	bl	_dev_err
LBB0_19:
	mov	x0, x22
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_20:
	str	x23, [x22, #16]
	mov	w8, #1
	str	w8, [x22]
Lloh50:
	adrp	x8, _ams_delta_ops@GOTPAGE
Lloh51:
	ldr	x8, [x8, _ams_delta_ops@GOTPAGEOFF]
	mov	x19, x22
	str	x8, [x19, #8]!
	mov	x0, x19
	bl	_nand_controller_init
	str	x19, [x22, #80]
	mov	x0, x20
	mov	w1, #1
	bl	_nand_scan
	mov	x22, x0
	cbnz	w0, LBB0_19
; %bb.21:
Lloh52:
	adrp	x8, _partition_info@GOTPAGE
Lloh53:
	ldr	x8, [x8, _partition_info@GOTPAGEOFF]
Lloh54:
	ldr	w19, [x8]
	mov	x0, x19
	bl	_ARRAY_SIZE
	mov	x2, x0
	mov	x0, x21
	mov	x1, x19
	bl	_mtd_device_register
	mov	x22, x0
	cbz	w0, LBB0_19
; %bb.22:
	mov	x0, x20
	bl	_nand_cleanup
	b	LBB0_19
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpLdrGot	Lloh36, Lloh37
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpAdd	Lloh42, Lloh43
	.loh AdrpAdd	Lloh44, Lloh45
	.loh AdrpAdd	Lloh46, Lloh47
	.loh AdrpAdd	Lloh48, Lloh49
	.loh AdrpLdrGot	Lloh50, Lloh51
	.loh AdrpLdrGotLdr	Lloh52, Lloh53, Lloh54
	.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	"rdy"

	.comm	_GPIOD_IN,4,2                   ; @GPIOD_IN
l_.str.1:                               ; @.str.1
	.asciz	"RDY GPIO request failed (%d)\n"

	.comm	_NAND_ECC_SOFT,4,2              ; @NAND_ECC_SOFT
	.comm	_NAND_ECC_HAMMING,4,2           ; @NAND_ECC_HAMMING
l_.str.2:                               ; @.str.2
	.asciz	"nwp"

	.comm	_GPIOD_OUT_HIGH,4,2             ; @GPIOD_OUT_HIGH
l_.str.3:                               ; @.str.3
	.asciz	"NWP GPIO request failed (%d)\n"

l_.str.4:                               ; @.str.4
	.asciz	"nce"

l_.str.5:                               ; @.str.5
	.asciz	"NCE GPIO request failed (%d)\n"

l_.str.6:                               ; @.str.6
	.asciz	"nre"

l_.str.7:                               ; @.str.7
	.asciz	"NRE GPIO request failed (%d)\n"

l_.str.8:                               ; @.str.8
	.asciz	"nwe"

l_.str.9:                               ; @.str.9
	.asciz	"NWE GPIO request failed (%d)\n"

l_.str.10:                              ; @.str.10
	.asciz	"ale"

	.comm	_GPIOD_OUT_LOW,4,2              ; @GPIOD_OUT_LOW
l_.str.11:                              ; @.str.11
	.asciz	"ALE GPIO request failed (%d)\n"

l_.str.12:                              ; @.str.12
	.asciz	"cle"

l_.str.13:                              ; @.str.13
	.asciz	"CLE GPIO request failed (%d)\n"

l_.str.14:                              ; @.str.14
	.asciz	"data"

l_.str.15:                              ; @.str.15
	.asciz	"data GPIO request failed: %d\n"

	.comm	_ams_delta_ops,4,2              ; @ams_delta_ops
	.comm	_partition_info,4,2             ; @partition_info
	.no_dead_strip	_ams_delta_init
.subsections_via_symbols
