	.file	"extr_iommu.c_tce_build_pSeries.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	tce_build_pSeries, @function
tce_build_pSeries:
.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
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rcx
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	cmp	DWORD PTR DMA_TO_DEVICE[rip], r8d
	mov	ebx, DWORD PTR TCE_PCI_READ[rip]
	je	.L2
	or	ebx, DWORD PTR TCE_PCI_WRITE[rip]
.L2:
	mov	rax, QWORD PTR [rdi]
	lea	r12, -1[rdx]
	lea	r13, [rax+rsi*4]
	test	rdx, rdx
	je	.L3
	.p2align 4,,10
	.p2align 3
.L4:
	mov	rdi, rbp
	sub	r12, 1
	add	r13, 4
	call	virt_to_abs@PLT
	mov	ecx, DWORD PTR TCE_SHIFT[rip]
	add	rbp, QWORD PTR TCE_PAGE_SIZE[rip]
	sar	eax, cl
	mov	ecx, DWORD PTR TCE_RPN_SHIFT[rip]
	and	eax, DWORD PTR TCE_RPN_MASK[rip]
	sal	eax, cl
	or	eax, ebx
	mov	DWORD PTR -4[r13], eax
	cmp	r12, -1
	jne	.L4
.L3:
	add	rsp, 8
	.cfi_def_cfa_offset 40
	xor	eax, eax
	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_pSeries, .-tce_build_pSeries
	.comm	TCE_SHIFT,4,4
	.comm	TCE_RPN_SHIFT,4,4
	.comm	TCE_RPN_MASK,4,4
	.comm	TCE_PCI_WRITE,4,4
	.comm	TCE_PCI_READ,4,4
	.comm	TCE_PAGE_SIZE,8,8
	.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_iommu.c_tce_build_pSeries.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	tce_build_pSeries, %function
tce_build_pSeries:
	@ args = 8, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	ip, .L11
	push	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	lr, [sp, #40]
	ldr	r4, [ip]
	mov	r5, r3
	cmp	r4, lr
	ldrne	r3, .L11+4
	ldr	ip, .L11+8
	ldrne	r3, [r3]
	ldr	r7, [ip]
	ldr	r6, [r0]
	orrne	r7, r7, r3
	cmp	r2, #0
	add	r6, r6, r1, lsl #2
	sub	r4, r2, #1
	beq	.L3
	ldr	fp, .L11+12
	ldr	r10, .L11+16
	ldr	r9, .L11+20
	ldr	r8, .L11+24
.L4:
	mov	r0, r5
	bl	virt_to_abs
	ldr	r3, [fp]
	ldr	r2, [r10]
	ldr	r1, [r9]
	and	r2, r2, r0, asr r3
	sub	r4, r4, #1
	ldr	r3, [r8]
	orr	r2, r7, r2, lsl r1
	cmn	r4, #1
	str	r2, [r6], #4
	add	r5, r5, r3
	bne	.L4
.L3:
	mov	r0, #0
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L12:
	.align	2
.L11:
	.word	DMA_TO_DEVICE
	.word	TCE_PCI_WRITE
	.word	TCE_PCI_READ
	.word	TCE_SHIFT
	.word	TCE_RPN_MASK
	.word	TCE_RPN_SHIFT
	.word	TCE_PAGE_SIZE
	.size	tce_build_pSeries, .-tce_build_pSeries
	.comm	TCE_SHIFT,4,4
	.comm	TCE_RPN_SHIFT,4,4
	.comm	TCE_RPN_MASK,4,4
	.comm	TCE_PCI_WRITE,4,4
	.comm	TCE_PCI_READ,4,4
	.comm	TCE_PAGE_SIZE,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
