	.file	"extr_pcmcia.c_ssb_pcmcia_sprom_read.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	ssb_pcmcia_sprom_read, @function
ssb_pcmcia_sprom_read:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	lea	ebp, [rsi+rsi]
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	rbx, rdx
	movzx	edx, bpl
	sub	rsp, 16
	.cfi_def_cfa_offset 48
	mov	esi, DWORD PTR SSB_PCMCIA_SPROM_ADDRLO[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	call	ssb_pcmcia_cfg_write@PLT
	test	eax, eax
	je	.L6
.L1:
	mov	rcx, QWORD PTR 8[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L7
	add	rsp, 16
	.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
.L6:
	.cfi_restore_state
	mov	eax, ebp
	mov	esi, DWORD PTR SSB_PCMCIA_SPROM_ADDRHI[rip]
	mov	rdi, r12
	movzx	edx, ah
	call	ssb_pcmcia_cfg_write@PLT
	test	eax, eax
	jne	.L1
	mov	esi, DWORD PTR SSB_PCMCIA_SPROMCTL_READ[rip]
	mov	rdi, r12
	call	ssb_pcmcia_sprom_command@PLT
	test	eax, eax
	jne	.L1
	mov	esi, DWORD PTR SSB_PCMCIA_SPROM_DATALO[rip]
	mov	rdx, rsp
	mov	rdi, r12
	call	ssb_pcmcia_cfg_read@PLT
	test	eax, eax
	jne	.L1
	mov	esi, DWORD PTR SSB_PCMCIA_SPROM_DATAHI[rip]
	lea	rdx, 4[rsp]
	mov	rdi, r12
	call	ssb_pcmcia_cfg_read@PLT
	test	eax, eax
	jne	.L1
	mov	edx, DWORD PTR 4[rsp]
	sal	edx, 8
	or	edx, DWORD PTR [rsp]
	mov	DWORD PTR [rbx], edx
	jmp	.L1
.L7:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	ssb_pcmcia_sprom_read, .-ssb_pcmcia_sprom_read
	.comm	SSB_PCMCIA_SPROM_DATALO,4,4
	.comm	SSB_PCMCIA_SPROM_DATAHI,4,4
	.comm	SSB_PCMCIA_SPROM_ADDRLO,4,4
	.comm	SSB_PCMCIA_SPROM_ADDRHI,4,4
	.comm	SSB_PCMCIA_SPROMCTL_READ,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_pcmcia.c_ssb_pcmcia_sprom_read.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ssb_pcmcia_sprom_read, %function
ssb_pcmcia_sprom_read:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	ldr	r3, .L8
	lsl	r4, r1, #1
	ldr	r1, [r3]
	ldr	r3, .L8+4
	sub	sp, sp, #16
	mov	r5, r2
	and	r2, r4, #254
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	mov	r6, r0
	bl	ssb_pcmcia_cfg_write
	cmp	r0, #0
	beq	.L6
.L1:
	ldr	r3, .L8+4
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L7
	add	sp, sp, #16
	@ sp needed
	pop	{r4, r5, r6, pc}
.L6:
	ldr	r3, .L8+8
	asr	r2, r4, #8
	mov	r0, r6
	ldr	r1, [r3]
	and	r2, r2, #255
	bl	ssb_pcmcia_cfg_write
	cmp	r0, #0
	bne	.L1
	ldr	r3, .L8+12
	mov	r0, r6
	ldr	r1, [r3]
	bl	ssb_pcmcia_sprom_command
	cmp	r0, #0
	bne	.L1
	ldr	r3, .L8+16
	mov	r0, r6
	ldr	r1, [r3]
	add	r2, sp, #4
	bl	ssb_pcmcia_cfg_read
	cmp	r0, #0
	bne	.L1
	ldr	r3, .L8+20
	add	r2, sp, #8
	ldr	r1, [r3]
	mov	r0, r6
	bl	ssb_pcmcia_cfg_read
	cmp	r0, #0
	ldreq	r3, [sp, #4]
	ldreq	r2, [sp, #8]
	orreq	r3, r3, r2, lsl #8
	streq	r3, [r5]
	b	.L1
.L7:
	bl	__stack_chk_fail
.L9:
	.align	2
.L8:
	.word	SSB_PCMCIA_SPROM_ADDRLO
	.word	.LC0
	.word	SSB_PCMCIA_SPROM_ADDRHI
	.word	SSB_PCMCIA_SPROMCTL_READ
	.word	SSB_PCMCIA_SPROM_DATALO
	.word	SSB_PCMCIA_SPROM_DATAHI
	.size	ssb_pcmcia_sprom_read, .-ssb_pcmcia_sprom_read
	.comm	SSB_PCMCIA_SPROM_DATALO,4,4
	.comm	SSB_PCMCIA_SPROM_DATAHI,4,4
	.comm	SSB_PCMCIA_SPROM_ADDRLO,4,4
	.comm	SSB_PCMCIA_SPROM_ADDRHI,4,4
	.comm	SSB_PCMCIA_SPROMCTL_READ,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
