	.file	"extr_i2c.c_pn544_hci_i2c_platform_init.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"low"
.LC1:
	.string	"high"
.LC2:
	.string	"Detecting nfc_en polarity\n"
.LC3:
	.string	"Sending reset cmd\n"
.LC4:
	.string	"nfc_en polarity : active %s\n"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC5:
	.string	"Could not detect nfc_en polarity, fallback to active high\n"
	.text
	.p2align 4
	.type	pn544_hci_i2c_platform_init, @function
pn544_hci_i2c_platform_init:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	mov	edx, -6717
	lea	rsi, .LC2[rip]
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	lea	r13, .LC3[rip]
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	xor	r12d, r12d
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	rbx, rdi
	sub	rsp, 16
	.cfi_def_cfa_offset 64
	mov	rdi, QWORD PTR 8[rdi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	mov	WORD PTR 6[rsp], dx
	lea	r14, 2[rsp]
	mov	DWORD PTR 2[rsp], 325893
	call	nfc_info@PLT
	mov	edi, DWORD PTR 16[rbx]
	xor	esi, esi
	call	gpiod_set_value_cansleep@PLT
.L7:
	mov	DWORD PTR [rbx], r12d
	mov	eax, r12d
	mov	ebp, 3
.L6:
	mov	edi, DWORD PTR 4[rbx]
	xor	esi, esi
	test	eax, eax
	sete	sil
	call	gpiod_set_value_cansleep@PLT
	mov	esi, 15000
	mov	edi, 10000
	call	usleep_range@PLT
	mov	edi, DWORD PTR 4[rbx]
	mov	esi, DWORD PTR [rbx]
	call	gpiod_set_value_cansleep@PLT
	mov	esi, 15000
	mov	edi, 10000
	call	usleep_range@PLT
	mov	rdi, QWORD PTR 8[rbx]
	mov	rsi, r13
	call	dev_dbg@PLT
	mov	rdi, QWORD PTR 8[rbx]
	mov	edx, 6
	mov	rsi, r14
	call	i2c_master_send@PLT
	cmp	eax, 6
	je	.L13
	sub	ebp, 1
	je	.L5
	mov	eax, DWORD PTR [rbx]
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L5:
	cmp	r12d, 1
	jne	.L10
	mov	rdi, QWORD PTR 8[rbx]
	lea	rsi, .LC5[rip]
	call	nfc_err@PLT
.L4:
	mov	eax, DWORD PTR [rbx]
	xor	esi, esi
	mov	edi, DWORD PTR 4[rbx]
	test	eax, eax
	sete	sil
	call	gpiod_set_value_cansleep@PLT
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L14
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	pop	rbx
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore_state
	mov	r12d, 1
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L13:
	test	r12d, r12d
	lea	rax, .LC1[rip]
	mov	rdi, QWORD PTR 8[rbx]
	lea	rdx, .LC0[rip]
	cmovne	rdx, rax
	lea	rsi, .LC4[rip]
	xor	eax, eax
	call	nfc_info@PLT
	jmp	.L4
.L14:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	pn544_hci_i2c_platform_init, .-pn544_hci_i2c_platform_init
	.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_i2c.c_pn544_hci_i2c_platform_init.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"low\000"
	.align	2
.LC1:
	.ascii	"high\000"
	.align	2
.LC3:
	.ascii	"Detecting nfc_en polarity\012\000"
	.align	2
.LC4:
	.ascii	"Sending reset cmd\012\000"
	.align	2
.LC5:
	.ascii	"nfc_en polarity : active %s\012\000"
	.align	2
.LC6:
	.ascii	"Could not detect nfc_en polarity, fallback to activ"
	.ascii	"e high\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC7:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	pn544_hci_i2c_platform_init, %function
pn544_hci_i2c_platform_init:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	mov	r4, r0
	ldr	r3, .L15
	ldr	r2, .L15+4
	sub	sp, sp, #20
	ldm	r3, {r0, r1}
	ldr	r2, [r2]
	str	r2, [sp, #12]
	mov	r2,#0
	str	r0, [sp, #4]
	strh	r1, [sp, #8]	@ movhi
	ldr	r0, [r4, #8]
	ldr	r1, .L15+8
	bl	nfc_info
	mov	r1, #0
	ldr	r0, [r4, #12]
	bl	gpiod_set_value_cansleep
	mov	r8, #0
	ldr	r7, .L15+12
	ldr	r6, .L15+16
	ldr	r9, .L15+20
.L7:
	mov	r1, r8
	mov	r5, #3
	str	r8, [r4]
.L6:
	clz	r1, r1
	ldr	r0, [r4, #4]
	lsr	r1, r1, #5
	bl	gpiod_set_value_cansleep
	mov	r1, r7
	mov	r0, r6
	bl	usleep_range
	ldr	r1, [r4]
	ldr	r0, [r4, #4]
	bl	gpiod_set_value_cansleep
	mov	r1, r7
	mov	r0, r6
	bl	usleep_range
	mov	r1, r9
	ldr	r0, [r4, #8]
	bl	dev_dbg
	mov	r2, #6
	ldr	r0, [r4, #8]
	add	r1, sp, #4
	bl	i2c_master_send
	cmp	r0, #6
	beq	.L13
	subs	r5, r5, #1
	ldrne	r1, [r4]
	bne	.L6
.L5:
	cmp	r8, #1
	bne	.L10
	ldr	r1, .L15+24
	ldr	r0, [r4, #8]
	bl	nfc_err
.L4:
	ldr	r1, [r4]
	ldr	r0, [r4, #4]
	clz	r1, r1
	lsr	r1, r1, #5
	bl	gpiod_set_value_cansleep
	ldr	r3, .L15+4
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L14
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L10:
	mov	r8, #1
	b	.L7
.L13:
	ldr	r3, .L15+28
	cmp	r8, #0
	ldr	r2, .L15+32
	ldr	r1, .L15+36
	movne	r2, r3
	ldr	r0, [r4, #8]
	bl	nfc_info
	b	.L4
.L14:
	bl	__stack_chk_fail
.L16:
	.align	2
.L15:
	.word	.LANCHOR0
	.word	.LC7
	.word	.LC3
	.word	15000
	.word	10000
	.word	.LC4
	.word	.LC6
	.word	.LC1
	.word	.LC0
	.word	.LC5
	.size	pn544_hci_i2c_platform_init, .-pn544_hci_i2c_platform_init
	.section	.rodata
	.align	2
	.set	.LANCHOR0,. + 0
.LC2:
	.ascii	"\005\371\004\000\303\345"
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
