	.file	"extr_sa1111_generic.c_sa1111_pcmcia_configure_socket.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	sa1111_pcmcia_configure_socket
	.type	sa1111_pcmcia_configure_socket, @function
sa1111_pcmcia_configure_socket:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	r13, rsi
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	edi, DWORD PTR 4[rdi]
	call	SA1111_DEV@PLT
	mov	r12, rax
	mov	eax, DWORD PTR [rbx]
	test	eax, eax
	je	.L2
	cmp	eax, 1
	jne	.L19
	mov	eax, DWORD PTR 0[r13]
	mov	edi, DWORD PTR PCCR_S1_RST[rip]
	xor	ebx, ebx
	or	edi, DWORD PTR PCCR_S1_FLT[rip]
	or	edi, DWORD PTR PCCR_S1_PWAITEN[rip]
	or	edi, DWORD PTR PCCR_S1_PSE[rip]
	mov	ebp, edi
	test	eax, eax
	je	.L6
.L21:
	mov	ebx, DWORD PTR PCCR_S0_PWAITEN[rip]
	or	ebx, DWORD PTR PCCR_S1_PWAITEN[rip]
	cmp	eax, 50
	jne	.L6
	mov	eax, DWORD PTR PCCR_S0_PSE[rip]
	or	eax, DWORD PTR PCCR_S1_PSE[rip]
	or	ebx, eax
.L6:
	mov	eax, DWORD PTR 4[r13]
	test	DWORD PTR SS_RESET[rip], eax
	je	.L7
	mov	edx, DWORD PTR PCCR_S0_RST[rip]
	or	edx, DWORD PTR PCCR_S1_RST[rip]
	or	ebx, edx
.L7:
	test	DWORD PTR SS_OUTPUT_ENA[rip], eax
	jne	.L20
.L8:
	xor	r13d, r13d
	mov	rdi, r13
	call	local_irq_save@PLT
	mov	rdi, QWORD PTR SA1111_PCCR[rip]
	add	rdi, QWORD PTR [r12]
	call	sa1111_readl@PLT
	mov	rsi, QWORD PTR SA1111_PCCR[rip]
	add	rsi, QWORD PTR [r12]
	xor	ebx, eax
	mov	edi, ebx
	and	edi, ebp
	xor	edi, eax
	call	sa1111_writel@PLT
	mov	rdi, r13
	call	local_irq_restore@PLT
	add	rsp, 8
	.cfi_remember_state
	.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
	.p2align 4,,10
	.p2align 3
.L19:
	.cfi_restore_state
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, -1
	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
	.p2align 4,,10
	.p2align 3
.L20:
	.cfi_restore_state
	mov	eax, DWORD PTR PCCR_S0_FLT[rip]
	or	eax, DWORD PTR PCCR_S1_FLT[rip]
	or	ebx, eax
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L2:
	mov	eax, DWORD PTR 0[r13]
	mov	edi, DWORD PTR PCCR_S0_RST[rip]
	xor	ebx, ebx
	or	edi, DWORD PTR PCCR_S0_FLT[rip]
	or	edi, DWORD PTR PCCR_S0_PWAITEN[rip]
	or	edi, DWORD PTR PCCR_S0_PSE[rip]
	mov	ebp, edi
	test	eax, eax
	je	.L6
	jmp	.L21
	.cfi_endproc
.LFE0:
	.size	sa1111_pcmcia_configure_socket, .-sa1111_pcmcia_configure_socket
	.comm	SS_RESET,4,4
	.comm	SS_OUTPUT_ENA,4,4
	.comm	SA1111_PCCR,8,8
	.comm	PCCR_S1_RST,4,4
	.comm	PCCR_S1_PWAITEN,4,4
	.comm	PCCR_S1_PSE,4,4
	.comm	PCCR_S1_FLT,4,4
	.comm	PCCR_S0_RST,4,4
	.comm	PCCR_S0_PWAITEN,4,4
	.comm	PCCR_S0_PSE,4,4
	.comm	PCCR_S0_FLT,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_sa1111_generic.c_sa1111_pcmcia_configure_socket.c"
	.text
	.align	2
	.global	sa1111_pcmcia_configure_socket
	.syntax unified
	.arm
	.fpu softvfp
	.type	sa1111_pcmcia_configure_socket, %function
sa1111_pcmcia_configure_socket:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r4, r0
	ldr	r0, [r0, #4]
	mov	r5, r1
	bl	SA1111_DEV
	ldr	r3, [r4]
	mov	r7, r0
	cmp	r3, #0
	beq	.L2
	cmp	r3, #1
	bne	.L19
	ldr	r3, .L20
	ldr	r1, .L20+4
	ldr	r6, [r3]
	ldr	r2, .L20+8
	ldr	r4, [r1]
	ldr	r3, .L20+12
.L17:
	ldr	r0, [r2]
	orr	r4, r4, r6
	ldr	r6, [r3]
	orr	r4, r4, r0
	orr	r6, r4, r6
	ldr	r4, [r5]
	cmp	r4, #0
	beq	.L6
	ldr	r3, .L20+16
	ldr	r2, .L20+8
	ldr	r3, [r3]
	ldr	r0, [r2]
	cmp	r4, #50
	orr	r4, r3, r0
	bne	.L6
	ldr	r3, .L20+20
	ldr	r2, .L20+12
	ldr	r3, [r3]
	ldr	r2, [r2]
	orr	r3, r3, r2
	orr	r4, r4, r3
.L6:
	ldr	r2, .L20+24
	ldr	r3, [r5, #4]
	ldr	r2, [r2]
	tst	r3, r2
	beq	.L7
	ldr	r2, .L20+28
	ldr	r1, .L20+4
	ldr	r2, [r2]
	ldr	r1, [r1]
	orr	r2, r2, r1
	orr	r4, r4, r2
.L7:
	ldr	r2, .L20+32
	ldr	r2, [r2]
	tst	r3, r2
	beq	.L8
	ldr	r3, .L20+36
	ldr	r2, .L20
	ldr	r3, [r3]
	ldr	r2, [r2]
	orr	r3, r3, r2
	orr	r4, r4, r3
.L8:
	mov	r8, #0
	ldr	r5, .L20+40
	mov	r0, r8
	bl	local_irq_save
	ldr	r3, [r5]
	ldr	r0, [r7]
	add	r0, r0, r3
	bl	sa1111_readl
	ldr	r3, [r5]
	ldr	r1, [r7]
	eor	r4, r4, r0
	and	r4, r4, r6
	add	r1, r1, r3
	eor	r0, r0, r4
	bl	sa1111_writel
	mov	r0, r8
	bl	local_irq_restore
	mov	r0, r8
	pop	{r4, r5, r6, r7, r8, pc}
.L19:
	mvn	r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L2:
	ldr	r3, .L20+36
	ldr	r1, .L20+28
	ldr	r6, [r3]
	ldr	r2, .L20+16
	ldr	r4, [r1]
	ldr	r3, .L20+20
	b	.L17
.L21:
	.align	2
.L20:
	.word	PCCR_S1_FLT
	.word	PCCR_S1_RST
	.word	PCCR_S1_PWAITEN
	.word	PCCR_S1_PSE
	.word	PCCR_S0_PWAITEN
	.word	PCCR_S0_PSE
	.word	SS_RESET
	.word	PCCR_S0_RST
	.word	SS_OUTPUT_ENA
	.word	PCCR_S0_FLT
	.word	SA1111_PCCR
	.size	sa1111_pcmcia_configure_socket, .-sa1111_pcmcia_configure_socket
	.comm	SS_RESET,4,4
	.comm	SS_OUTPUT_ENA,4,4
	.comm	SA1111_PCCR,4,4
	.comm	PCCR_S1_RST,4,4
	.comm	PCCR_S1_PWAITEN,4,4
	.comm	PCCR_S1_PSE,4,4
	.comm	PCCR_S1_FLT,4,4
	.comm	PCCR_S0_RST,4,4
	.comm	PCCR_S0_PWAITEN,4,4
	.comm	PCCR_S0_PSE,4,4
	.comm	PCCR_S0_FLT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
