	.file	"extr_pcmuio.c_switch_page.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	switch_page, @function
switch_page:
.LFB0:
	.cfi_startproc
	endbr64
	mov	rax, rdi
	test	esi, esi
	js	.L1
	mov	rcx, QWORD PTR thisboard[rip]
	cmp	DWORD PTR [rcx], esi
	jle	.L1
	test	edx, edx
	js	.L1
	cmp	DWORD PTR NUM_PAGES[rip], edx
	jg	.L4
.L1:
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	mov	rcx, QWORD PTR devpriv[rip]
	movsx	rdi, esi
	mov	rcx, QWORD PTR [rcx]
	lea	r8, [rcx+rdi*4]
	mov	edi, DWORD PTR REG_PAGE_MASK[rip]
	not	edi
	and	edi, DWORD PTR [r8]
	mov	DWORD PTR [r8], edi
	mov	ecx, DWORD PTR REG_PAGE_BITOFFSET[rip]
	sal	edx, cl
	or	edi, edx
	mov	DWORD PTR [r8], edi
	imul	esi, DWORD PTR ASIC_IOSIZE[rip]
	movsx	rsi, esi
	add	rsi, QWORD PTR [rax]
	add	rsi, QWORD PTR REG_PAGELOCK[rip]
	jmp	outb@PLT
	.cfi_endproc
.LFE0:
	.size	switch_page, .-switch_page
	.comm	thisboard,8,8
	.comm	devpriv,8,8
	.comm	REG_PAGE_MASK,4,4
	.comm	REG_PAGE_BITOFFSET,4,4
	.comm	REG_PAGELOCK,8,8
	.comm	NUM_PAGES,4,4
	.comm	ASIC_IOSIZE,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_pcmuio.c_switch_page.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	switch_page, %function
switch_page:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	cmp	r1, #0
	bxlt	lr
	ldr	r3, .L7
	ldr	r3, [r3]
	ldr	r3, [r3]
	cmp	r3, r1
	movgt	r3, #0
	movle	r3, #1
	orrs	r3, r3, r2, lsr #31
	bxne	lr
	ldr	r3, .L7+4
	ldr	r3, [r3]
	cmp	r3, r2
	bxle	lr
	ldr	r3, .L7+8
	ldr	ip, .L7+12
	ldr	r3, [r3]
	push	{r4, lr}
	ldr	r3, [r3]
	ldr	r4, [ip]
	ldr	ip, [r0]
	ldr	r0, [r3, r1, lsl #2]
	ldr	lr, .L7+16
	bic	r0, r0, r4
	str	r0, [r3, r1, lsl #2]
	ldr	r4, [lr]
	ldr	lr, .L7+20
	orr	r0, r0, r2, lsl r4
	str	r0, [r3, r1, lsl #2]
	ldr	r2, [lr]
	ldr	r3, .L7+24
	mla	r1, r2, r1, ip
	pop	{r4, lr}
	ldr	r3, [r3]
	add	r1, r1, r3
	b	outb
.L8:
	.align	2
.L7:
	.word	thisboard
	.word	NUM_PAGES
	.word	devpriv
	.word	REG_PAGE_MASK
	.word	REG_PAGE_BITOFFSET
	.word	ASIC_IOSIZE
	.word	REG_PAGELOCK
	.size	switch_page, .-switch_page
	.comm	thisboard,4,4
	.comm	devpriv,4,4
	.comm	REG_PAGE_MASK,4,4
	.comm	REG_PAGE_BITOFFSET,4,4
	.comm	REG_PAGELOCK,4,4
	.comm	NUM_PAGES,4,4
	.comm	ASIC_IOSIZE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
