	.file	"extr_agp_i810.c_agp_intel_gtt_map_memory.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	agp_intel_gtt_map_memory
	.type	agp_intel_gtt_map_memory, @function
agp_intel_gtt_map_memory:
.LFB0:
	.cfi_startproc
	endbr64
	cmp	QWORD PTR [rcx], 0
	je	.L12
	xor	eax, eax
	ret
	.p2align 4,,10
	.p2align 3
.L12:
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rcx
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	ebx, edx
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	call	device_get_softc@PLT
	mov	esi, DWORD PTR M_WAITOK[rip]
	mov	edi, ebx
	call	sglist_alloc@PLT
	mov	r13, rax
	test	ebx, ebx
	jle	.L5
	mov	rax, QWORD PTR [rax]
	lea	r14d, -1[rbx]
	xor	ebx, ebx
	.p2align 4,,10
	.p2align 3
.L4:
	mov	edi, DWORD PTR 0[rbp+rbx*4]
	lea	r15, [rax+rbx*8]
	call	VM_PAGE_TO_PHYS@PLT
	mov	edx, DWORD PTR PAGE_SIZE[rip]
	mov	DWORD PTR 4[r15], eax
	mov	rax, QWORD PTR 0[r13]
	mov	DWORD PTR [rax+rbx*8], edx
	mov	rdx, rbx
	add	rbx, 1
	cmp	r14, rdx
	jne	.L4
.L5:
	mov	QWORD PTR [r12], r13
	add	rsp, 8
	.cfi_def_cfa_offset 56
	xor	eax, eax
	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
	.cfi_endproc
.LFE0:
	.size	agp_intel_gtt_map_memory, .-agp_intel_gtt_map_memory
	.comm	PAGE_SIZE,4,4
	.comm	M_WAITOK,4,4
	.comm	BUS_SPACE_UNRESTRICTED,4,4
	.comm	BUS_SPACE_MAXADDR,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_agp_i810.c_agp_intel_gtt_map_memory.c"
	.text
	.align	2
	.global	agp_intel_gtt_map_memory
	.syntax unified
	.arm
	.fpu softvfp
	.type	agp_intel_gtt_map_memory, %function
agp_intel_gtt_map_memory:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r4, [r3]
	cmp	r4, #0
	beq	.L9
	mov	r0, #0
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L9:
	mov	r6, r2
	mov	r7, r3
	mov	r5, r1
	bl	device_get_softc
	ldr	r3, .L10
	mov	r0, r6
	ldr	r1, [r3]
	bl	sglist_alloc
	cmp	r6, #0
	mov	r8, r0
	ble	.L5
	sub	r5, r5, #4
	ldr	r1, [r0]
	ldr	r10, .L10+4
	add	r6, r5, r6, lsl #2
.L4:
	ldr	r0, [r5, #4]!
	add	r9, r1, r4
	bl	VM_PAGE_TO_PHYS
	ldr	r1, [r8]
	ldr	r2, [r10]
	cmp	r5, r6
	str	r0, [r9, #4]
	str	r2, [r1, r4]
	add	r4, r4, #8
	bne	.L4
.L5:
	mov	r0, #0
	str	r8, [r7]
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L11:
	.align	2
.L10:
	.word	M_WAITOK
	.word	PAGE_SIZE
	.size	agp_intel_gtt_map_memory, .-agp_intel_gtt_map_memory
	.comm	PAGE_SIZE,4,4
	.comm	M_WAITOK,4,4
	.comm	BUS_SPACE_UNRESTRICTED,4,4
	.comm	BUS_SPACE_MAXADDR,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
