	.file	"extr_tpm_infineon.c_tpm_inf_send.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"Timeout while clearing FIFO\n"
	.text
	.p2align 4
	.type	tpm_inf_send, @function
tpm_inf_send:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	r13, rdx
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rsi
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	esi, DWORD PTR CMD[rip]
	mov	edi, DWORD PTR RESET_LP_IRQC_DISABLE[rip]
	call	tpm_data_out@PLT
	mov	esi, 1
	mov	rdi, r12
	call	empty_fifo@PLT
	test	eax, eax
	jne	.L13
	mov	esi, DWORD PTR STAT_XFE[rip]
	mov	rdi, r12
	call	wait@PLT
	test	eax, eax
	je	.L4
	mov	eax, DWORD PTR EIO[rip]
	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
	neg	eax
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	.cfi_restore_state
	mov	rsi, QWORD PTR TPM_VL_VER[rip]
	mov	rdi, r12
	lea	rbp, 6[r13]
	call	wait_and_send@PLT
	mov	rsi, QWORD PTR TPM_CTRL_DATA[rip]
	mov	rdi, r12
	call	wait_and_send@PLT
	mov	rsi, rbp
	mov	rdi, r12
	shr	rsi, 8
	and	esi, 16777215
	call	wait_and_send@PLT
	movzx	esi, bpl
	mov	rdi, r12
	call	wait_and_send@PLT
	mov	rsi, QWORD PTR TPM_VL_VER[rip]
	mov	rdi, r12
	call	wait_and_send@PLT
	mov	rsi, QWORD PTR TPM_VL_CHANNEL_TPM[rip]
	mov	rdi, r12
	call	wait_and_send@PLT
	mov	rsi, r13
	mov	rdi, r12
	shr	rsi, 24
	movzx	esi, sil
	call	wait_and_send@PLT
	mov	rsi, r13
	mov	rdi, r12
	shr	rsi, 16
	movzx	esi, sil
	call	wait_and_send@PLT
	mov	rax, r13
	mov	rdi, r12
	movzx	esi, ah
	call	wait_and_send@PLT
	movzx	esi, r13b
	mov	rdi, r12
	call	wait_and_send@PLT
	test	r13, r13
	je	.L5
	lea	rbp, [rbx+r13*8]
	.p2align 4,,10
	.p2align 3
.L6:
	mov	rsi, QWORD PTR [rbx]
	mov	rdi, r12
	add	rbx, 8
	call	wait_and_send@PLT
	cmp	rbx, rbp
	jne	.L6
.L5:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r13d
	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
.L13:
	.cfi_restore_state
	mov	edi, DWORD PTR [r12]
	lea	rsi, .LC0[rip]
	call	dev_err@PLT
	mov	eax, DWORD PTR EIO[rip]
	add	rsp, 8
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	neg	eax
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	tpm_inf_send, .-tpm_inf_send
	.comm	TPM_VL_VER,8,8
	.comm	TPM_VL_CHANNEL_TPM,8,8
	.comm	TPM_CTRL_DATA,8,8
	.comm	STAT_XFE,4,4
	.comm	RESET_LP_IRQC_DISABLE,4,4
	.comm	EIO,4,4
	.comm	CMD,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_tpm_infineon.c_tpm_inf_send.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Timeout while clearing FIFO\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	tpm_inf_send, %function
tpm_inf_send:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r6, r0
	ldr	r3, .L14
	mov	r4, r1
	ldr	r1, .L14+4
	ldr	r0, [r3]
	ldr	r1, [r1]
	mov	r7, r2
	bl	tpm_data_out
	mov	r0, r6
	mov	r1, #1
	bl	empty_fifo
	cmp	r0, #0
	bne	.L13
	ldr	r3, .L14+8
	mov	r0, r6
	ldr	r1, [r3]
	bl	wait
	cmp	r0, #0
	beq	.L4
	ldr	r3, .L14+12
	ldr	r0, [r3]
	rsb	r0, r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L4:
	ldr	r8, .L14+16
	mov	r0, r6
	ldr	r1, [r8]
	bl	wait_and_send
	ldr	r3, .L14+20
	add	r5, r7, #6
	ldr	r1, [r3]
	mov	r0, r6
	bl	wait_and_send
	lsr	r1, r5, #8
	mov	r0, r6
	bl	wait_and_send
	and	r1, r5, #255
	mov	r0, r6
	bl	wait_and_send
	ldr	r1, [r8]
	mov	r0, r6
	bl	wait_and_send
	ldr	r3, .L14+24
	mov	r0, r6
	ldr	r1, [r3]
	bl	wait_and_send
	lsr	r1, r7, #24
	mov	r0, r6
	bl	wait_and_send
	lsr	r1, r7, #16
	and	r1, r1, #255
	mov	r0, r6
	bl	wait_and_send
	lsr	r1, r7, #8
	and	r1, r1, #255
	mov	r0, r6
	bl	wait_and_send
	mov	r0, r6
	and	r1, r7, #255
	bl	wait_and_send
	cmp	r7, #0
	beq	.L5
	sub	r4, r4, #4
	add	r5, r4, r7, lsl #2
.L6:
	ldr	r1, [r4, #4]!
	mov	r0, r6
	bl	wait_and_send
	cmp	r4, r5
	bne	.L6
.L5:
	mov	r0, r7
	pop	{r4, r5, r6, r7, r8, pc}
.L13:
	ldr	r0, [r6]
	ldr	r1, .L14+28
	bl	dev_err
	ldr	r3, .L14+12
	ldr	r0, [r3]
	rsb	r0, r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L15:
	.align	2
.L14:
	.word	RESET_LP_IRQC_DISABLE
	.word	CMD
	.word	STAT_XFE
	.word	EIO
	.word	TPM_VL_VER
	.word	TPM_CTRL_DATA
	.word	TPM_VL_CHANNEL_TPM
	.word	.LC0
	.size	tpm_inf_send, .-tpm_inf_send
	.comm	TPM_VL_VER,4,4
	.comm	TPM_VL_CHANNEL_TPM,4,4
	.comm	TPM_CTRL_DATA,4,4
	.comm	STAT_XFE,4,4
	.comm	RESET_LP_IRQC_DISABLE,4,4
	.comm	EIO,4,4
	.comm	CMD,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
