	.file	"extr_sun4c.c_sun4c_lockarea.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"DMA vaddr=0x%p size=%08lx\n"
.LC1:
	.string	"Out of iobuffer table"
	.text
	.p2align 4
	.type	sun4c_lockarea, @function
sun4c_lockarea:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15, rsi
	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
	xor	r12d, r12d
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	eax, DWORD PTR PAGE_SIZE[rip]
	mov	r14, QWORD PTR PAGE_MASK[rip]
	mov	rcx, QWORD PTR PAGE_SHIFT[rip]
	mov	QWORD PTR 8[rsp], rdi
	sub	eax, 1
	not	r14
	cdqe
	and	r14, rdi
	xor	edi, edi
	add	rax, rsi
	add	r14, rax
	shr	r14, cl
	call	local_irq_save@PLT
.L7:
	mov	rsi, QWORD PTR iobuffer_map_size[rip]
	mov	edi, DWORD PTR sun4c_iobuffer_map[rip]
	mov	rdx, r12
	call	find_next_zero_bit@PLT
	lea	rbx, [r14+rax]
	cmp	rbx, QWORD PTR iobuffer_map_size[rip]
	mov	rbp, rax
	ja	.L18
	cmp	rbx, rax
	jbe	.L8
	mov	r12, rax
	.p2align 4,,10
	.p2align 3
.L4:
	mov	esi, DWORD PTR sun4c_iobuffer_map[rip]
	mov	rdi, r12
	call	test_bit@PLT
	test	rax, rax
	jne	.L7
	add	r12, 1
	cmp	rbx, r12
	jne	.L4
.L8:
	mov	rcx, QWORD PTR PAGE_SHIFT[rip]
	mov	rdi, rbx
	sal	rdi, cl
	add	rdi, QWORD PTR sun4c_iobuffer_start[rip]
	call	SUN4C_REAL_PGDIR_ALIGN@PLT
	mov	rdi, QWORD PTR sun4c_iobuffer_high[rip]
	mov	r12, rax
	cmp	rax, rdi
	jbe	.L6
	.p2align 4,,10
	.p2align 3
.L5:
	call	get_locked_segment@PLT
	mov	rdi, QWORD PTR SUN4C_REAL_PGDIR_SIZE[rip]
	add	rdi, QWORD PTR sun4c_iobuffer_high[rip]
	mov	QWORD PTR sun4c_iobuffer_high[rip], rdi
	cmp	rdi, r12
	jb	.L5
.L6:
	mov	r13, QWORD PTR 8[rsp]
	and	r13, QWORD PTR PAGE_MASK[rip]
	cmp	rbx, rbp
	jbe	.L9
	mov	r14, rbp
	.p2align 4,,10
	.p2align 3
.L10:
	mov	rcx, QWORD PTR PAGE_SHIFT[rip]
	mov	edi, DWORD PTR SUN4C_PAGE_KERNEL[rip]
	mov	r12, r13
	sub	r12, QWORD PTR PAGE_OFFSET[rip]
	mov	r15, r12
	shr	r15, cl
	call	pgprot_val@PLT
	mov	esi, DWORD PTR sun4c_iobuffer_map[rip]
	mov	rdi, r14
	or	rax, QWORD PTR _SUN4C_PAGE_NOCACHE[rip]
	mov	r12, rax
	call	set_bit@PLT
	mov	rcx, QWORD PTR PAGE_SHIFT[rip]
	or	r12, r15
	mov	r15, r14
	mov	rdi, r13
	add	r14, 1
	sal	r15, cl
	add	r15, QWORD PTR sun4c_iobuffer_start[rip]
	call	sun4c_flush_page@PLT
	mov	rsi, r12
	mov	rdi, r15
	call	sun4c_put_pte@PLT
	movsx	rax, DWORD PTR PAGE_SIZE[rip]
	add	r13, rax
	cmp	rbx, r14
	jne	.L10
.L9:
	xor	edi, edi
	call	local_irq_restore@PLT
	mov	rax, QWORD PTR PAGE_MASK[rip]
	mov	r13, QWORD PTR 8[rsp]
	mov	rcx, QWORD PTR PAGE_SHIFT[rip]
	not	rax
	and	r13, rax
	mov	rax, QWORD PTR sun4c_iobuffer_start[rip]
	sal	rbp, cl
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	add	rax, r13
	add	rax, rbp
	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
.L18:
	.cfi_restore_state
	xor	edi, edi
	call	local_irq_restore@PLT
	mov	rsi, QWORD PTR 8[rsp]
	mov	rdx, r15
	lea	rdi, .LC0[rip]
	call	printk@PLT
	lea	rdi, .LC1[rip]
	call	panic@PLT
	add	rsp, 24
	.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	sun4c_lockarea, .-sun4c_lockarea
	.comm	sun4c_iobuffer_start,8,8
	.comm	sun4c_iobuffer_map,4,4
	.comm	sun4c_iobuffer_high,8,8
	.comm	iobuffer_map_size,8,8
	.comm	_SUN4C_PAGE_NOCACHE,8,8
	.comm	SUN4C_REAL_PGDIR_SIZE,8,8
	.comm	SUN4C_PAGE_KERNEL,4,4
	.comm	PAGE_SIZE,4,4
	.comm	PAGE_SHIFT,8,8
	.comm	PAGE_OFFSET,8,8
	.comm	PAGE_MASK,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_sun4c.c_sun4c_lockarea.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"DMA vaddr=0x%p size=%08lx\012\000"
	.align	2
.LC1:
	.ascii	"Out of iobuffer table\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	sun4c_lockarea, %function
sun4c_lockarea:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r2, .L21
	sub	sp, sp, #20
	ldr	r4, [r2]
	str	r0, [sp, #8]
	bic	r4, r0, r4
	mov	r0, #0
	mov	r6, r1
	mov	r10, r0
	ldr	fp, .L21+4
	ldr	r9, .L21+8
	ldr	r3, [fp]
	ldr	r2, [r9]
	sub	r3, r3, #1
	add	r3, r3, r1
	add	r4, r4, r3
	lsr	r4, r4, r2
	bl	local_irq_save
	str	r6, [sp, #4]
	mov	r6, r10
	mov	r10, r4
	ldr	r5, .L21+12
	ldr	r8, .L21+16
.L7:
	mov	r2, r6
	ldr	r1, [r5]
	ldr	r0, [r8]
	bl	find_next_zero_bit
	ldr	r3, [r5]
	add	r7, r10, r0
	cmp	r7, r3
	mov	r4, r0
	bhi	.L20
	cmp	r7, r0
	bls	.L18
	mov	r6, r0
.L4:
	mov	r0, r6
	ldr	r1, [r8]
	bl	test_bit
	cmp	r0, #0
	bne	.L7
	add	r6, r6, #1
	cmp	r7, r6
	bne	.L4
.L18:
	ldr	r10, .L21+20
	ldr	r0, [r9]
	ldr	r3, [r10]
	str	r4, [sp, #12]
	add	r0, r3, r7, lsl r0
	bl	SUN4C_REAL_PGDIR_ALIGN
	mov	r4, r0
	ldr	r5, .L21+24
	ldr	r0, [r5]
	cmp	r4, r0
	bls	.L6
	ldr	r6, .L21+28
.L5:
	bl	get_locked_segment
	ldr	r0, [r5]
	ldr	r3, [r6]
	add	r0, r0, r3
	cmp	r0, r4
	str	r0, [r5]
	bcc	.L5
.L6:
	ldr	r3, .L21
	ldr	r5, [sp, #12]
	ldr	r6, [r3]
	ldr	r3, [sp, #8]
	cmp	r7, r5
	and	r6, r6, r3
	bls	.L9
	ldr	r2, .L21+32
	str	r7, [sp, #4]
.L10:
	ldr	r4, [r2]
	ldr	r2, .L21+36
	ldr	r3, [r9]
	ldr	r0, [r2]
	sub	r4, r6, r4
	lsr	r4, r4, r3
	bl	pgprot_val
	ldr	r3, .L21+40
	ldr	r1, [r8]
	ldr	r3, [r3]
	orr	r3, r0, r3
	mov	r0, r5
	orr	r4, r3, r4
	bl	set_bit
	ldr	r3, [r10]
	ldr	r1, [r9]
	mov	r0, r6
	add	r7, r3, r5, lsl r1
	bl	sun4c_flush_page
	mov	r1, r4
	mov	r0, r7
	bl	sun4c_put_pte
	ldr	r2, [sp, #4]
	ldr	r3, [fp]
	add	r5, r5, #1
	cmp	r2, r5
	add	r6, r6, r3
	ldr	r2, .L21+32
	bne	.L10
.L9:
	mov	r0, #0
	bl	local_irq_restore
	ldr	r3, .L21
	ldr	r2, [r10]
	ldr	r0, [r3]
	ldr	r3, [sp, #8]
	bic	r0, r3, r0
	add	r0, r0, r2
	ldr	r3, [r9]
	ldr	r2, [sp, #12]
	add	r0, r0, r2, lsl r3
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L20:
	ldr	r6, [sp, #4]
	mov	r0, #0
	bl	local_irq_restore
	mov	r2, r6
	ldr	r1, [sp, #8]
	ldr	r0, .L21+44
	bl	printk
	ldr	r0, .L21+48
	bl	panic
	mov	r0, #0
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L22:
	.align	2
.L21:
	.word	PAGE_MASK
	.word	PAGE_SIZE
	.word	PAGE_SHIFT
	.word	iobuffer_map_size
	.word	sun4c_iobuffer_map
	.word	sun4c_iobuffer_start
	.word	sun4c_iobuffer_high
	.word	SUN4C_REAL_PGDIR_SIZE
	.word	PAGE_OFFSET
	.word	SUN4C_PAGE_KERNEL
	.word	_SUN4C_PAGE_NOCACHE
	.word	.LC0
	.word	.LC1
	.size	sun4c_lockarea, .-sun4c_lockarea
	.comm	sun4c_iobuffer_start,4,4
	.comm	sun4c_iobuffer_map,4,4
	.comm	sun4c_iobuffer_high,4,4
	.comm	iobuffer_map_size,4,4
	.comm	_SUN4C_PAGE_NOCACHE,4,4
	.comm	SUN4C_REAL_PGDIR_SIZE,4,4
	.comm	SUN4C_PAGE_KERNEL,4,4
	.comm	PAGE_SIZE,4,4
	.comm	PAGE_SHIFT,4,4
	.comm	PAGE_OFFSET,4,4
	.comm	PAGE_MASK,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
