	.file	"extr_driver_chipcommon.c_bcma_core_chipcommon_flash_detect.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"Found serial flash\n"
.LC1:
	.string	"Found parallel flash\n"
.LC2:
	.string	"Flash type not supported\n"
.LC3:
	.string	"Found NAND flash\n"
	.text
	.p2align 4
	.type	bcma_core_chipcommon_flash_detect, @function
bcma_core_chipcommon_flash_detect:
.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
	mov	rbp, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	mov	rax, QWORD PTR 8[rdi]
	mov	r12, QWORD PTR 8[rax]
	mov	eax, DWORD PTR [rdi]
	and	eax, DWORD PTR BCMA_CC_CAP_FLASHT[rip]
	cmp	eax, 129
	je	.L2
	and	eax, -3
	cmp	eax, 128
	je	.L12
	lea	rsi, .LC2[rip]
	mov	rdi, r12
	call	bcma_err@PLT
.L4:
	mov	rax, QWORD PTR 8[rbp]
	cmp	DWORD PTR [rax], 38
	je	.L5
	mov	rax, QWORD PTR BCMA_CHIP_ID_BCM4706[rip]
	cmp	QWORD PTR [r12], rax
	je	.L5
.L1:
	add	rsp, 8
	.cfi_remember_state
	.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
.L5:
	.cfi_restore_state
	mov	eax, DWORD PTR 0[rbp]
	test	DWORD PTR BCMA_CC_CAP_NFLASH[rip], eax
	je	.L1
	mov	rdi, r12
	lea	rsi, .LC3[rip]
	call	bcma_debug@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	rdi, rbp
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	bcma_nflash_init@PLT
	.p2align 4,,10
	.p2align 3
.L12:
	.cfi_restore_state
	mov	rdi, r12
	lea	rsi, .LC0[rip]
	call	bcma_debug@PLT
	mov	rdi, rbp
	call	bcma_sflash_init@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L2:
	mov	rdi, r12
	lea	rsi, .LC1[rip]
	call	bcma_debug@PLT
	mov	rdi, rbp
	call	bcma_pflash_init@PLT
	jmp	.L4
	.cfi_endproc
.LFE0:
	.size	bcma_core_chipcommon_flash_detect, .-bcma_core_chipcommon_flash_detect
	.comm	BCMA_CHIP_ID_BCM4706,8,8
	.comm	BCMA_CC_CAP_NFLASH,4,4
	.comm	BCMA_CC_CAP_FLASHT,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_driver_chipcommon.c_bcma_core_chipcommon_flash_detect.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Found serial flash\012\000"
	.align	2
.LC1:
	.ascii	"Found parallel flash\012\000"
	.align	2
.LC2:
	.ascii	"Flash type not supported\012\000"
	.align	2
.LC3:
	.ascii	"Found NAND flash\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	bcma_core_chipcommon_flash_detect, %function
bcma_core_chipcommon_flash_detect:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r2, .L16
	ldr	r3, [r0]
	ldr	r1, [r2]
	ldr	r2, [r0, #4]
	and	r3, r3, r1
	cmp	r3, #129
	push	{r4, r5, r6, lr}
	mov	r4, r0
	ldr	r5, [r2, #4]
	beq	.L2
	bic	r3, r3, #2
	cmp	r3, #128
	beq	.L15
	mov	r0, r5
	ldr	r1, .L16+4
	bl	bcma_err
.L4:
	ldr	r3, [r4, #4]
	ldr	r3, [r3]
	cmp	r3, #38
	beq	.L5
	ldr	r3, .L16+8
	ldr	r2, [r5]
	ldr	r3, [r3]
	cmp	r2, r3
	popne	{r4, r5, r6, pc}
.L5:
	ldr	r3, .L16+12
	ldr	r2, [r4]
	ldr	r3, [r3]
	tst	r2, r3
	popeq	{r4, r5, r6, pc}
	mov	r0, r5
	ldr	r1, .L16+16
	bl	bcma_debug
	mov	r0, r4
	pop	{r4, r5, r6, lr}
	b	bcma_nflash_init
.L15:
	mov	r0, r5
	ldr	r1, .L16+20
	bl	bcma_debug
	mov	r0, r4
	bl	bcma_sflash_init
	b	.L4
.L2:
	mov	r0, r5
	ldr	r1, .L16+24
	bl	bcma_debug
	mov	r0, r4
	bl	bcma_pflash_init
	b	.L4
.L17:
	.align	2
.L16:
	.word	BCMA_CC_CAP_FLASHT
	.word	.LC2
	.word	BCMA_CHIP_ID_BCM4706
	.word	BCMA_CC_CAP_NFLASH
	.word	.LC3
	.word	.LC0
	.word	.LC1
	.size	bcma_core_chipcommon_flash_detect, .-bcma_core_chipcommon_flash_detect
	.comm	BCMA_CHIP_ID_BCM4706,4,4
	.comm	BCMA_CC_CAP_NFLASH,4,4
	.comm	BCMA_CC_CAP_FLASHT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
