	.file	"extr_vf610_nfc.c_vf610_nfc_select_target.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	vf610_nfc_select_target, @function
vf610_nfc_select_target:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12d, esi
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	call	chip_to_nfc@PLT
	mov	rbp, rax
	mov	rax, QWORD PTR NFC_VFC610[rip]
	cmp	QWORD PTR 0[rbp], rax
	je	.L5
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L5:
	.cfi_restore_state
	mov	esi, DWORD PTR NFC_ROW_ADDR[rip]
	mov	rdi, rbp
	mov	r13d, 1
	call	vf610_nfc_read@PLT
	mov	ecx, DWORD PTR ROW_ADDR_CHIP_SEL_RB_SHIFT[rip]
	mov	ebx, DWORD PTR ROW_ADDR_CHIP_SEL_RB_MASK[rip]
	mov	edi, r12d
	or	ebx, DWORD PTR ROW_ADDR_CHIP_SEL_MASK[rip]
	not	ebx
	sal	r13d, cl
	and	ebx, eax
	call	BIT@PLT
	mov	ecx, DWORD PTR ROW_ADDR_CHIP_SEL_SHIFT[rip]
	mov	edx, r13d
	mov	rdi, rbp
	mov	esi, DWORD PTR NFC_ROW_ADDR[rip]
	add	rsp, 8
	.cfi_def_cfa_offset 40
	sal	eax, cl
	or	ebx, eax
	or	edx, ebx
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	jmp	vf610_nfc_write@PLT
	.cfi_endproc
.LFE0:
	.size	vf610_nfc_select_target, .-vf610_nfc_select_target
	.comm	ROW_ADDR_CHIP_SEL_SHIFT,4,4
	.comm	ROW_ADDR_CHIP_SEL_RB_SHIFT,4,4
	.comm	ROW_ADDR_CHIP_SEL_RB_MASK,4,4
	.comm	ROW_ADDR_CHIP_SEL_MASK,4,4
	.comm	NFC_VFC610,8,8
	.comm	NFC_ROW_ADDR,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_vf610_nfc.c_vf610_nfc_select_target.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	vf610_nfc_select_target, %function
vf610_nfc_select_target:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r5, r1
	bl	chip_to_nfc
	ldr	r3, .L5
	ldr	r2, [r0]
	ldr	r3, [r3]
	cmp	r2, r3
	popne	{r4, r5, r6, r7, r8, pc}
	ldr	r7, .L5+4
	mov	r4, r0
	ldr	r1, [r7]
	bl	vf610_nfc_read
	mov	r6, #1
	mov	r2, r0
	ldr	r1, .L5+8
	ldr	r3, .L5+12
	ldr	ip, [r1]
	ldr	r1, .L5+16
	ldr	r3, [r3]
	ldr	r1, [r1]
	mov	r0, r5
	orr	r5, r3, ip
	bic	r5, r2, r5
	lsl	r6, r6, r1
	bl	BIT
	mov	r3, r0
	ldr	r2, .L5+20
	mov	r0, r4
	ldr	r2, [r2]
	ldr	r1, [r7]
	orr	r2, r5, r3, lsl r2
	orr	r2, r6, r2
	pop	{r4, r5, r6, r7, r8, lr}
	b	vf610_nfc_write
.L6:
	.align	2
.L5:
	.word	NFC_VFC610
	.word	NFC_ROW_ADDR
	.word	ROW_ADDR_CHIP_SEL_MASK
	.word	ROW_ADDR_CHIP_SEL_RB_MASK
	.word	ROW_ADDR_CHIP_SEL_RB_SHIFT
	.word	ROW_ADDR_CHIP_SEL_SHIFT
	.size	vf610_nfc_select_target, .-vf610_nfc_select_target
	.comm	ROW_ADDR_CHIP_SEL_SHIFT,4,4
	.comm	ROW_ADDR_CHIP_SEL_RB_SHIFT,4,4
	.comm	ROW_ADDR_CHIP_SEL_RB_MASK,4,4
	.comm	ROW_ADDR_CHIP_SEL_MASK,4,4
	.comm	NFC_VFC610,4,4
	.comm	NFC_ROW_ADDR,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
