	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function atmel_nfc_exec_op
_atmel_nfc_exec_op:                     ## @atmel_nfc_exec_op
	.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	%esi, -44(%rbp)                 ## 4-byte Spill
	movq	%rdi, %r13
	movq	(%rdi), %r12
	movq	_ATMEL_HSMC_NFC_SR_CMDDONE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%rdi)
	cmpl	$0, 8(%rdi)
	jle	LBB0_1
## %bb.2:
	xorl	%ebx, %ebx
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	40(%r13), %rax
	movl	(%rax,%rbx,4), %esi
	movl	%ebx, %edi
	callq	_ATMEL_NFC_CMD
	orl	%eax, %r14d
	incq	%rbx
	movslq	8(%r13), %rax
	cmpq	%rax, %rbx
	jl	LBB0_3
	jmp	LBB0_4
LBB0_1:
	xorl	%r14d, %r14d
LBB0_4:
	movq	16(%r13), %rax
	movq	_ATMEL_NFC_MAX_ADDR_CYCLES@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.5:
	movl	52(%r13), %edi
	movq	_ATMEL_HSMC_NFC_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r12), %edx
	addq	$4, %r12
	callq	_regmap_write
LBB0_6:
	movl	36(%r13), %edi
	callq	_ATMEL_NFC_CSID
	movl	%eax, %r15d
	movq	16(%r13), %rdi
	callq	_ATMEL_NFC_ACYCLE
	xorl	%ecx, %ecx
	cmpl	$2, 8(%r13)
	jl	LBB0_8
## %bb.7:
	movq	_ATMEL_NFC_VCMD2@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
LBB0_8:
	orl	%r14d, %r15d
	orl	%eax, %r15d
	orl	%ecx, %r15d
	movl	4(%r12), %eax
	movl	8(%r12), %ecx
	shll	$8, %eax
	orl	(%r12), %eax
	shll	$16, %ecx
	movl	12(%r12), %r12d
	shll	$24, %r12d
	orl	%ecx, %r12d
	orl	%eax, %r12d
	movq	24(%r13), %rax
	movq	_ATMEL_NFC_NO_DATA@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_11
## %bb.9:
	movq	_ATMEL_NFC_DATAEN@GOTPCREL(%rip), %rcx
	orl	(%rcx), %r15d
	movq	_ATMEL_HSMC_NFC_SR_XFRDONE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	%ecx, 32(%r13)
	movq	_ATMEL_NFC_WRITE_DATA@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_11
## %bb.10:
	movq	_ATMEL_NFC_NFCWR@GOTPCREL(%rip), %rax
	orl	(%rax), %r15d
LBB0_11:
	movl	52(%r13), %edi
	movq	_ATMEL_HSMC_NFC_SR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-48(%rbp), %rdx
	callq	_regmap_read
	movl	56(%r13), %edi
	movl	%r15d, %esi
	movl	%r12d, %edx
	callq	_regmap_write
	movq	%r13, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	xorl	%edx, %edx
	callq	_atmel_nfc_wait
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_13
## %bb.12:
	movl	48(%r13), %edi
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	callq	_dev_err
LBB0_13:
	movq	%r13, %rdi
	xorl	%esi, %esi
	movl	$48, %edx
	callq	_memset
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ATMEL_HSMC_NFC_SR_CMDDONE,4,2  ## @ATMEL_HSMC_NFC_SR_CMDDONE
	.comm	_ATMEL_NFC_MAX_ADDR_CYCLES,8,3  ## @ATMEL_NFC_MAX_ADDR_CYCLES
	.comm	_ATMEL_HSMC_NFC_ADDR,4,2        ## @ATMEL_HSMC_NFC_ADDR
	.comm	_ATMEL_NFC_VCMD2,4,2            ## @ATMEL_NFC_VCMD2
	.comm	_ATMEL_NFC_NO_DATA,8,3          ## @ATMEL_NFC_NO_DATA
	.comm	_ATMEL_NFC_DATAEN,4,2           ## @ATMEL_NFC_DATAEN
	.comm	_ATMEL_HSMC_NFC_SR_XFRDONE,4,2  ## @ATMEL_HSMC_NFC_SR_XFRDONE
	.comm	_ATMEL_NFC_WRITE_DATA,8,3       ## @ATMEL_NFC_WRITE_DATA
	.comm	_ATMEL_NFC_NFCWR,4,2            ## @ATMEL_NFC_NFCWR
	.comm	_ATMEL_HSMC_NFC_SR,4,2          ## @ATMEL_HSMC_NFC_SR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to send NAND command (err = %d)!"

	.no_dead_strip	_atmel_nfc_exec_op
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function atmel_nfc_exec_op
_atmel_nfc_exec_op:                     ; @atmel_nfc_exec_op
	.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
	mov	x20, x1
	mov	x19, x0
	ldr	x22, [x0]
Lloh0:
	adrp	x8, _ATMEL_HSMC_NFC_SR_CMDDONE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ATMEL_HSMC_NFC_SR_CMDDONE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x0, #32]
	ldr	w8, [x0, #8]
	cmp	w8, #1
	b.lt	LBB0_3
; %bb.1:
	mov	x21, #0
	mov	w23, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #40]
	ldr	w1, [x8, x21, lsl #2]
	mov	x0, x21
	bl	_ATMEL_NFC_CMD
	orr	w23, w0, w23
	add	x21, x21, #1
	ldrsw	x8, [x19, #8]
	cmp	x21, x8
	b.lt	LBB0_2
	b	LBB0_4
LBB0_3:
	mov	w23, #0
LBB0_4:
	ldr	x8, [x19, #16]
Lloh3:
	adrp	x9, _ATMEL_NFC_MAX_ADDR_CYCLES@GOTPAGE
Lloh4:
	ldr	x9, [x9, _ATMEL_NFC_MAX_ADDR_CYCLES@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.5:
	ldr	w0, [x19, #52]
Lloh6:
	adrp	x8, _ATMEL_HSMC_NFC_ADDR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ATMEL_HSMC_NFC_ADDR@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	ldr	w2, [x22], #4
	bl	_regmap_write
LBB0_6:
	ldr	w0, [x19, #36]
	bl	_ATMEL_NFC_CSID
	mov	x21, x0
	ldr	x0, [x19, #16]
	bl	_ATMEL_NFC_ACYCLE
	ldr	w8, [x19, #8]
Lloh9:
	adrp	x9, _ATMEL_NFC_VCMD2@GOTPAGE
Lloh10:
	ldr	x9, [x9, _ATMEL_NFC_VCMD2@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	cmp	w8, #1
	csel	w8, w9, wzr, gt
	orr	w9, w21, w23
	orr	w9, w9, w0
	orr	w21, w9, w8
	ldp	w8, w9, [x22]
	orr	w8, w8, w9, lsl #8
	ldp	w9, w10, [x22, #8]
	orr	w8, w8, w9, lsl #16
	orr	w22, w8, w10, lsl #24
	ldr	x8, [x19, #24]
Lloh12:
	adrp	x9, _ATMEL_NFC_NO_DATA@GOTPAGE
Lloh13:
	ldr	x9, [x9, _ATMEL_NFC_NO_DATA@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_9
; %bb.7:
Lloh15:
	adrp	x9, _ATMEL_NFC_DATAEN@GOTPAGE
Lloh16:
	ldr	x9, [x9, _ATMEL_NFC_DATAEN@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	orr	w21, w9, w21
Lloh18:
	adrp	x9, _ATMEL_HSMC_NFC_SR_XFRDONE@GOTPAGE
Lloh19:
	ldr	x9, [x9, _ATMEL_HSMC_NFC_SR_XFRDONE@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	ldr	w10, [x19, #32]
	orr	w9, w10, w9
	str	w9, [x19, #32]
Lloh21:
	adrp	x9, _ATMEL_NFC_WRITE_DATA@GOTPAGE
Lloh22:
	ldr	x9, [x9, _ATMEL_NFC_WRITE_DATA@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.8:
Lloh24:
	adrp	x8, _ATMEL_NFC_NFCWR@GOTPAGE
Lloh25:
	ldr	x8, [x8, _ATMEL_NFC_NFCWR@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	orr	w21, w8, w21
LBB0_9:
	ldr	w0, [x19, #52]
Lloh27:
	adrp	x8, _ATMEL_HSMC_NFC_SR@GOTPAGE
Lloh28:
	ldr	x8, [x8, _ATMEL_HSMC_NFC_SR@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
	add	x2, sp, #12
	bl	_regmap_read
	ldr	w0, [x19, #56]
	mov	x1, x21
	mov	x2, x22
	bl	_regmap_write
	mov	x0, x19
	mov	x1, x20
	mov	w2, #0
	bl	_atmel_nfc_wait
	mov	x20, x0
	cbz	w0, LBB0_11
; %bb.10:
	ldr	w0, [x19, #48]
Lloh30:
	adrp	x1, l_.str@PAGE
Lloh31:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_dev_err
LBB0_11:
	mov	x0, x19
	mov	w1, #0
	mov	w2, #48
	bl	_memset
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.comm	_ATMEL_HSMC_NFC_SR_CMDDONE,4,2  ; @ATMEL_HSMC_NFC_SR_CMDDONE
	.comm	_ATMEL_NFC_MAX_ADDR_CYCLES,8,3  ; @ATMEL_NFC_MAX_ADDR_CYCLES
	.comm	_ATMEL_HSMC_NFC_ADDR,4,2        ; @ATMEL_HSMC_NFC_ADDR
	.comm	_ATMEL_NFC_VCMD2,4,2            ; @ATMEL_NFC_VCMD2
	.comm	_ATMEL_NFC_NO_DATA,8,3          ; @ATMEL_NFC_NO_DATA
	.comm	_ATMEL_NFC_DATAEN,4,2           ; @ATMEL_NFC_DATAEN
	.comm	_ATMEL_HSMC_NFC_SR_XFRDONE,4,2  ; @ATMEL_HSMC_NFC_SR_XFRDONE
	.comm	_ATMEL_NFC_WRITE_DATA,8,3       ; @ATMEL_NFC_WRITE_DATA
	.comm	_ATMEL_NFC_NFCWR,4,2            ; @ATMEL_NFC_NFCWR
	.comm	_ATMEL_HSMC_NFC_SR,4,2          ; @ATMEL_HSMC_NFC_SR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to send NAND command (err = %d)!"

	.no_dead_strip	_atmel_nfc_exec_op
.subsections_via_symbols
