	.file	"extr_tce_64.c_tce_build.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	tce_build
	.type	tce_build, @function
tce_build:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	eax, 1
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12, rcx
	mov	r13d, eax
	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
	mov	ecx, DWORD PTR TCE_READ_SHIFT[rip]
	sal	r13d, cl
	cmp	DWORD PTR DMA_TO_DEVICE[rip], r8d
	je	.L2
	mov	ecx, DWORD PTR TCE_WRITE_SHIFT[rip]
	sal	eax, cl
	or	r13d, eax
.L2:
	mov	rax, QWORD PTR [rdi]
	lea	rbp, [rax+rsi*4]
	lea	eax, -1[rdx]
	test	edx, edx
	je	.L1
	lea	rbx, 4[rbp+rax*4]
	.p2align 4,,10
	.p2align 3
.L4:
	mov	rdi, r12
	call	virt_to_bus@PLT
	mov	ecx, DWORD PTR PAGE_SHIFT[rip]
	mov	edx, DWORD PTR TCE_RPN_MASK[rip]
	sar	eax, cl
	mov	ecx, DWORD PTR TCE_RPN_SHIFT[rip]
	not	edx
	and	edx, r13d
	sal	eax, cl
	or	eax, edx
	mov	edi, eax
	mov	r13d, eax
	call	cpu_to_be64@PLT
	mov	rdi, rbp
	add	rbp, 4
	mov	DWORD PTR -4[rbp], eax
	call	flush_tce@PLT
	add	r12, QWORD PTR PAGE_SIZE[rip]
	cmp	rbp, rbx
	jne	.L4
.L1:
	add	rsp, 8
	.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
	.cfi_endproc
.LFE0:
	.size	tce_build, .-tce_build
	.comm	TCE_WRITE_SHIFT,4,4
	.comm	TCE_RPN_SHIFT,4,4
	.comm	TCE_RPN_MASK,4,4
	.comm	TCE_READ_SHIFT,4,4
	.comm	PAGE_SIZE,8,8
	.comm	PAGE_SHIFT,4,4
	.comm	DMA_TO_DEVICE,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_tce_64.c_tce_build.c"
	.text
	.align	2
	.global	tce_build
	.syntax unified
	.arm
	.fpu softvfp
	.type	tce_build, %function
tce_build:
	@ args = 4, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	mov	ip, #1
	push	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	lr, .L11
	ldr	r4, [sp, #40]
	ldr	r5, [lr]
	ldr	lr, .L11+4
	cmp	r5, r4
	mov	r9, r3
	ldrne	r3, .L11+8
	ldr	fp, [lr]
	ldrne	r3, [r3]
	ldr	r4, [r0]
	lsl	fp, ip, fp
	orrne	fp, fp, ip, lsl r3
	cmp	r2, #0
	add	r4, r4, r1, lsl #2
	sub	r5, r2, #1
	popeq	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
	ldr	r8, .L11+12
	ldr	r7, .L11+16
	ldr	r6, .L11+20
	ldr	r10, .L11+24
.L4:
	mov	r0, r9
	bl	virt_to_bus
	ldr	r1, [r7]
	ldr	r2, [r8]
	ldr	r3, [r6]
	asr	r0, r0, r1
	bic	r2, fp, r2
	orr	fp, r2, r0, lsl r3
	mov	r0, fp
	bl	cpu_to_be64
	mov	r3, r0
	mov	r0, r4
	str	r3, [r4]
	bl	flush_tce
	sub	r5, r5, #1
	ldr	r3, [r10]
	cmn	r5, #1
	add	r4, r4, #4
	add	r9, r9, r3
	bne	.L4
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L12:
	.align	2
.L11:
	.word	DMA_TO_DEVICE
	.word	TCE_READ_SHIFT
	.word	TCE_WRITE_SHIFT
	.word	TCE_RPN_MASK
	.word	PAGE_SHIFT
	.word	TCE_RPN_SHIFT
	.word	PAGE_SIZE
	.size	tce_build, .-tce_build
	.comm	TCE_WRITE_SHIFT,4,4
	.comm	TCE_RPN_SHIFT,4,4
	.comm	TCE_RPN_MASK,4,4
	.comm	TCE_READ_SHIFT,4,4
	.comm	PAGE_SIZE,4,4
	.comm	PAGE_SHIFT,4,4
	.comm	DMA_TO_DEVICE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
