	.file	"extr_pcmciamtd.c_remap_window.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"device removed"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC1:
	.string	"Remapping window from 0x%8.8x to 0x%8.8x"
	.text
	.p2align 4
	.type	remap_window, @function
remap_window:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	rbx, rsi
	sub	rsp, 32
	.cfi_def_cfa_offset 64
	mov	r12, QWORD PTR 8[rdi]
	mov	ebp, DWORD PTR [rdi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	mov	edi, DWORD PTR 24[r12]
	call	pcmcia_dev_present@PLT
	test	eax, eax
	je	.L9
	mov	eax, DWORD PTR [r12]
	mov	rdx, QWORD PTR 8[r12]
	mov	ecx, eax
	neg	ecx
	movsx	rcx, ecx
	and	rcx, rbx
	mov	QWORD PTR [rsp], rcx
	cmp	rcx, rdx
	jne	.L10
.L4:
	lea	esi, -1[rax]
	mov	rax, QWORD PTR 16[r12]
	movsx	rsi, esi
	and	rsi, rbx
	lea	rax, [rax+rsi*4]
.L1:
	mov	rdx, QWORD PTR 24[rsp]
	xor	rdx, QWORD PTR fs:40
	jne	.L11
	add	rsp, 32
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	pop	rbx
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore_state
	lea	rsi, .LC1[rip]
	mov	edi, 2
	xor	eax, eax
	call	DEBUG@PLT
	mov	rsi, rsp
	mov	edi, ebp
	mov	QWORD PTR 8[rsp], 0
	call	pcmcia_map_mem_page@PLT
	test	eax, eax
	jne	.L12
	mov	rax, QWORD PTR [rsp]
	mov	QWORD PTR 8[r12], rax
	mov	eax, DWORD PTR [r12]
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L9:
	lea	rsi, .LC0[rip]
	mov	edi, 1
	call	DEBUG@PLT
	xor	eax, eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L12:
	mov	edi, DWORD PTR 24[r12]
	mov	esi, DWORD PTR MapMemPage[rip]
	mov	edx, eax
	call	cs_error@PLT
	xor	eax, eax
	jmp	.L1
.L11:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	remap_window, .-remap_window
	.comm	MapMemPage,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_pcmciamtd.c_remap_window.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"device removed\000"
	.align	2
.LC1:
	.ascii	"Remapping window from 0x%8.8x to 0x%8.8x\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	remap_window, %function
remap_window:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	mov	r3, r0
	push	{r4, r5, r6, r7, lr}
	ldr	r5, [r0, #4]
	ldr	r2, .L13
	sub	sp, sp, #20
	ldr	r0, [r5, #12]
	mov	r6, r1
	ldr	r2, [r2]
	str	r2, [sp, #12]
	mov	r2,#0
	ldr	r7, [r3]
	bl	pcmcia_dev_present
	subs	r4, r0, #0
	beq	.L9
	ldr	ip, [r5]
	ldr	r2, [r5, #4]
	rsb	r3, ip, #0
	and	r3, r3, r6
	cmp	r3, r2
	str	r3, [sp, #4]
	bne	.L10
.L4:
	ldr	r0, [r5, #8]
	sub	ip, ip, #1
	and	r1, ip, r6
	add	r0, r0, r1, lsl #2
.L1:
	ldr	r3, .L13
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L11
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L10:
	mov	r4, #0
	ldr	r1, .L13+4
	mov	r0, #2
	bl	DEBUG
	mov	r0, r7
	add	r1, sp, #4
	str	r4, [sp, #8]
	bl	pcmcia_map_mem_page
	subs	r2, r0, #0
	bne	.L12
	ldr	r3, [sp, #4]
	ldr	ip, [r5]
	str	r3, [r5, #4]
	b	.L4
.L9:
	mov	r0, #1
	ldr	r1, .L13+8
	bl	DEBUG
	mov	r0, r4
	b	.L1
.L12:
	ldr	r3, .L13+12
	ldr	r0, [r5, #12]
	ldr	r1, [r3]
	bl	cs_error
	mov	r0, r4
	b	.L1
.L11:
	bl	__stack_chk_fail
.L14:
	.align	2
.L13:
	.word	.LC2
	.word	.LC1
	.word	.LC0
	.word	MapMemPage
	.size	remap_window, .-remap_window
	.comm	MapMemPage,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
