	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ar934x_nfc_cmdfunc
_ar934x_nfc_cmdfunc:                    ## @ar934x_nfc_cmdfunc
	.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
	movl	%ecx, %r15d
	movl	%edx, %r14d
	movl	%esi, %ebx
	movq	%rdi, %r12
	callq	_mtd_to_ar934x_nfc
	movq	%rax, %r13
	movl	$0, (%rax)
	cmpl	$136, %ebx
	jne	LBB0_1
## %bb.23:
	movl	40(%r13), %eax
	movq	_NAND_ECC_HW@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_24
LBB0_29:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movl	$0, 4(%r13)
	leal	-128(%rbx), %eax
	cmpl	$10, %eax
	ja	LBB0_27
## %bb.2:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_5:
	movl	4(%r12), %r8d
	addl	(%r12), %r8d
	cmpl	$0, 36(%r13)
	je	LBB0_28
## %bb.6:
	movq	%r13, %rdi
	movl	%ebx, %esi
	jmp	LBB0_7
LBB0_24:
	cmpl	$0, 36(%r13)
	je	LBB0_26
## %bb.25:
	movl	20(%r13), %esi
	movq	%r13, %rdi
	callq	_ar934x_nfc_send_cmd
LBB0_26:
	movl	4(%r13), %r8d
	movl	24(%r13), %edx
	movl	28(%r13), %ecx
	movq	%r13, %rdi
	movl	$136, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ar934x_nfc_send_write          ## TAILCALL
LBB0_16:
	movq	%r13, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ar934x_nfc_read_status         ## TAILCALL
LBB0_17:
	cmpl	$0, 36(%r13)
	je	LBB0_18
## %bb.19:
	movl	(%r12), %eax
	cmpl	%r14d, %eax
	jle	LBB0_20
## %bb.21:
	leal	-256(%r14), %ecx
	xorl	%eax, %eax
	cmpl	$256, %r14d                     ## imm = 0x100
	setl	%al
	cmovll	%r14d, %ecx
	orl	$134, %eax
	movl	%ecx, %r14d
	jmp	LBB0_22
LBB0_12:
	movl	36(%r13), %edi
	callq	_WARN_ON
	testl	%eax, %eax
	jne	LBB0_29
## %bb.13:
	movl	8(%r13), %ecx
	movl	12(%r13), %esi
	movl	4(%r12), %r8d
	addl	(%r12), %r8d
	movq	%r13, %rdi
	xorl	%edx, %edx
	callq	_ar934x_nfc_send_read
	movl	%r14d, 4(%r13)
	jmp	LBB0_29
LBB0_3:
	movq	%r13, %rdi
	movl	$131, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ar934x_nfc_send_cmd            ## TAILCALL
LBB0_9:
	cmpl	$0, 36(%r13)
	je	LBB0_11
## %bb.10:
	movl	4(%r12), %r8d
	movq	%r13, %rdi
	movl	$132, %esi
LBB0_7:
	movl	%r14d, %edx
LBB0_8:
	movl	%r15d, %ecx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ar934x_nfc_send_read           ## TAILCALL
LBB0_4:
	movl	$1, (%r13)
	movq	%r13, %rdi
	movl	$133, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ar934x_nfc_send_readid         ## TAILCALL
LBB0_27:
	movl	32(%r13), %edi
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	movl	%r14d, %ecx
	movl	%r15d, %r8d
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dev_err                        ## TAILCALL
LBB0_15:
	movl	16(%r13), %ecx
	movq	%r13, %rdi
	movl	$137, %esi
	movl	$-1, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ar934x_nfc_send_erase          ## TAILCALL
LBB0_14:
	movl	%r15d, 16(%r13)
	jmp	LBB0_29
LBB0_28:
	movq	%r13, %rdi
	movl	%ebx, %esi
	xorl	%edx, %edx
	movl	%r15d, %ecx
	callq	_ar934x_nfc_send_read
	movl	%r14d, 4(%r13)
	movl	%r15d, 8(%r13)
	movl	%ebx, 12(%r13)
	jmp	LBB0_29
LBB0_18:
	movl	$135, %eax
	jmp	LBB0_22
LBB0_11:
	movl	(%r12), %edx
	movl	4(%r12), %r8d
	movq	%r13, %rdi
	movl	$135, %esi
	jmp	LBB0_8
LBB0_20:
	subl	%eax, %r14d
	movl	$132, %eax
LBB0_22:
	movl	%eax, 20(%r13)
	movl	%r14d, 24(%r13)
	movl	%r15d, 28(%r13)
	jmp	LBB0_29
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_16, LBB0_16-LJTI0_0
.set L0_0_set_17, LBB0_17-LJTI0_0
.set L0_0_set_12, LBB0_12-LJTI0_0
.set L0_0_set_3, LBB0_3-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_5, LBB0_5-LJTI0_0
.set L0_0_set_27, LBB0_27-LJTI0_0
.set L0_0_set_15, LBB0_15-LJTI0_0
.set L0_0_set_14, LBB0_14-LJTI0_0
LJTI0_0:
	.long	L0_0_set_16
	.long	L0_0_set_17
	.long	L0_0_set_12
	.long	L0_0_set_3
	.long	L0_0_set_9
	.long	L0_0_set_4
	.long	L0_0_set_5
	.long	L0_0_set_5
	.long	L0_0_set_27
	.long	L0_0_set_15
	.long	L0_0_set_14
	.end_data_region
                                        ## -- End function
	.comm	_NAND_ECC_HW,4,2                ## @NAND_ECC_HW
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unsupported command: %x, column:%d page_addr=%d\n"

	.no_dead_strip	_ar934x_nfc_cmdfunc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ar934x_nfc_cmdfunc
_ar934x_nfc_cmdfunc:                    ; @ar934x_nfc_cmdfunc
	.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	x21, x3
	mov	x20, x2
	mov	x22, x1
	mov	x23, x0
	bl	_mtd_to_ar934x_nfc
	mov	x19, x0
	str	wzr, [x0]
	cmp	w22, #136
	b.ne	LBB0_3
; %bb.1:
	ldr	w8, [x19, #40]
Lloh0:
	adrp	x9, _NAND_ECC_HW@GOTPAGE
Lloh1:
	ldr	x9, [x9, _NAND_ECC_HW@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_7
LBB0_2:
	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_3:
	str	wzr, [x19, #4]
	sub	w8, w22, #128
	cmp	w8, #10
	b.hi	LBB0_21
; %bb.4:
Lloh3:
	adrp	x9, lJTI0_0@PAGE
Lloh4:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_5
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_5:
	ldr	w8, [x19, #36]
	ldp	w9, w10, [x23]
	add	w4, w10, w9
	cbz	w8, LBB0_24
; %bb.6:
	mov	x0, x19
	mov	x1, x22
	b	LBB0_18
LBB0_7:
	ldr	w8, [x19, #36]
	cbz	w8, LBB0_9
; %bb.8:
	ldr	w1, [x19, #20]
	mov	x0, x19
	bl	_ar934x_nfc_send_cmd
LBB0_9:
	ldp	w2, w3, [x19, #24]
	ldr	w4, [x19, #4]
	mov	x0, x19
	mov	w1, #136
	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
	b	_ar934x_nfc_send_write
LBB0_10:
	mov	x0, x19
	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
	b	_ar934x_nfc_read_status
LBB0_11:
	ldr	w8, [x19, #36]
	cbz	w8, LBB0_25
; %bb.12:
	ldr	w8, [x23]
	subs	w9, w20, #256
	mov	w10, #134
	cinc	w10, w10, lt
	csel	w9, w20, w9, lt
	sub	w11, w20, w8
	mov	w12, #132
	cmp	w8, w20
	csel	w8, w10, w12, gt
	csel	w20, w9, w11, gt
	b	LBB0_26
LBB0_13:
	ldr	w0, [x19, #36]
	bl	_WARN_ON
	cbnz	w0, LBB0_2
; %bb.14:
	ldp	w3, w1, [x19, #8]
	ldp	w8, w9, [x23]
	add	w4, w9, w8
	mov	x0, x19
	mov	w2, #0
	bl	_ar934x_nfc_send_read
	str	w20, [x19, #4]
	b	LBB0_2
LBB0_15:
	mov	x0, x19
	mov	w1, #131
	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
	b	_ar934x_nfc_send_cmd
LBB0_16:
	ldr	w8, [x19, #36]
	cbz	w8, LBB0_27
; %bb.17:
	ldr	w4, [x23, #4]
	mov	x0, x19
	mov	w1, #132
LBB0_18:
	mov	x2, x20
LBB0_19:
	mov	x3, x21
	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
	b	_ar934x_nfc_send_read
LBB0_20:
	mov	w8, #1
	str	w8, [x19]
	mov	x0, x19
	mov	w1, #133
	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
	b	_ar934x_nfc_send_readid
LBB0_21:
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	ldr	w0, [x19, #32]
	mov	x2, x22
	mov	x3, x20
	mov	x4, x21
	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
	b	_dev_err
LBB0_22:
	ldr	w3, [x19, #16]
	mov	x0, x19
	mov	w1, #137
	mov	w2, #-1
	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
	b	_ar934x_nfc_send_erase
LBB0_23:
	str	w21, [x19, #16]
	b	LBB0_2
LBB0_24:
	mov	x0, x19
	mov	x1, x22
	mov	w2, #0
	mov	x3, x21
	bl	_ar934x_nfc_send_read
	stp	w20, w21, [x19, #4]
	str	w22, [x19, #12]
	b	LBB0_2
LBB0_25:
	mov	w8, #135
LBB0_26:
	stp	w8, w20, [x19, #20]
	str	w21, [x19, #28]
	b	LBB0_2
LBB0_27:
	ldp	w2, w4, [x23]
	mov	x0, x19
	mov	w1, #135
	b	LBB0_19
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_10-LBB0_5)>>2
	.byte	(LBB0_11-LBB0_5)>>2
	.byte	(LBB0_13-LBB0_5)>>2
	.byte	(LBB0_15-LBB0_5)>>2
	.byte	(LBB0_16-LBB0_5)>>2
	.byte	(LBB0_20-LBB0_5)>>2
	.byte	(LBB0_5-LBB0_5)>>2
	.byte	(LBB0_5-LBB0_5)>>2
	.byte	(LBB0_21-LBB0_5)>>2
	.byte	(LBB0_22-LBB0_5)>>2
	.byte	(LBB0_23-LBB0_5)>>2
                                        ; -- End function
	.comm	_NAND_ECC_HW,4,2                ; @NAND_ECC_HW
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unsupported command: %x, column:%d page_addr=%d\n"

	.no_dead_strip	_ar934x_nfc_cmdfunc
.subsections_via_symbols
