	.file	"extr_pcie-altera.c_get_tlp_header.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	get_tlp_header, @function
get_tlp_header:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15, r8
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13d, ecx
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12d, edx
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rsi
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	rax, QWORD PTR 8[rdi]
	mov	r14, QWORD PTR TLP_READ_TAG[rip]
	mov	rsi, QWORD PTR [rax]
	mov	rcx, QWORD PTR 8[rax]
	mov	rdx, QWORD PTR 16[rax]
	mov	rdi, QWORD PTR 24[rax]
	test	r9d, r9d
	jne	.L3
	mov	r14, QWORD PTR TLP_WRITE_TAG[rip]
	mov	rdx, rdi
	mov	rsi, rcx
.L3:
	mov	rcx, QWORD PTR ALTERA_PCIE_V1[rip]
	cmp	QWORD PTR 32[rax], rcx
	jne	.L4
	cmp	QWORD PTR 0[rbp], rbx
	cmovne	rsi, rdx
.L5:
	mov	rdi, rbp
	call	TLP_CFG_DW0@PLT
	mov	rcx, QWORD PTR 80[rsp]
	mov	rdx, r15
	mov	rsi, r14
	mov	rdi, rbp
	mov	DWORD PTR [rcx], eax
	call	TLP_CFG_DW1@PLT
	mov	rdi, QWORD PTR 80[rsp]
	mov	edx, r13d
	mov	esi, r12d
	mov	DWORD PTR 4[rdi], eax
	mov	rdi, rbx
	call	TLP_CFG_DW2@PLT
	mov	rbx, QWORD PTR 80[rsp]
	mov	DWORD PTR 8[rbx], eax
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	.cfi_restore_state
	mov	rdi, rbp
	mov	QWORD PTR 8[rsp], rdx
	mov	QWORD PTR [rsp], rsi
	call	S10_RP_SECONDARY@PLT
	mov	rsi, QWORD PTR [rsp]
	mov	rdx, QWORD PTR 8[rsp]
	cmp	rax, rbx
	cmovge	rsi, rdx
	jmp	.L5
	.cfi_endproc
.LFE0:
	.size	get_tlp_header, .-get_tlp_header
	.comm	TLP_WRITE_TAG,8,8
	.comm	TLP_READ_TAG,8,8
	.comm	ALTERA_PCIE_V1,8,8
	.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_pcie-altera.c_get_tlp_header.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	get_tlp_header, %function
get_tlp_header:
	@ args = 12, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r4, r0
	ldr	r0, [sp, #44]
	ldr	ip, [r4, #4]
	cmp	r0, #0
	mov	r9, r3
	ldmib	ip, {r3, fp}
	ldr	r6, [ip]
	ldrne	r3, .L8
	moveq	r6, r3
	ldreq	r3, .L8+4
	mov	r8, r2
	ldr	r10, [r3]
	ldr	r2, [ip, #12]
	ldr	r3, .L8+8
	moveq	fp, r2
	ldr	r3, [r3]
	ldr	r2, [ip, #16]
	mov	r5, r1
	cmp	r2, r3
	ldr	r7, [sp, #48]
	bne	.L4
	ldr	r3, [r4]
	cmp	r3, r1
	movne	r6, fp
.L5:
	mov	r1, r6
	mov	r0, r4
	bl	TLP_CFG_DW0
	mov	r1, r10
	ldr	r2, [sp, #40]
	str	r0, [r7]
	mov	r0, r4
	bl	TLP_CFG_DW1
	mov	r2, r9
	str	r0, [r7, #4]
	mov	r1, r8
	mov	r0, r5
	bl	TLP_CFG_DW2
	str	r0, [r7, #8]
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L4:
	mov	r0, r4
	bl	S10_RP_SECONDARY
	cmp	r0, r5
	movge	r6, fp
	b	.L5
.L9:
	.align	2
.L8:
	.word	TLP_READ_TAG
	.word	TLP_WRITE_TAG
	.word	ALTERA_PCIE_V1
	.size	get_tlp_header, .-get_tlp_header
	.comm	TLP_WRITE_TAG,4,4
	.comm	TLP_READ_TAG,4,4
	.comm	ALTERA_PCIE_V1,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
