	.file	"extr_chip.c_brcmf_chip_attach.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	brcmf_chip_attach
	.type	brcmf_chip_attach, @function
brcmf_chip_attach:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	r12, rdi
	xor	edi, edi
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	ecx, DWORD PTR 16[rsi]
	mov	rbx, rsi
	test	ecx, ecx
	sete	dil
	xor	ebp, ebp
	call	WARN_ON@PLT
	test	rax, rax
	je	.L2
	mov	ebp, DWORD PTR EINVAL[rip]
	neg	ebp
.L2:
	mov	edx, DWORD PTR 12[rbx]
	xor	edi, edi
	test	edx, edx
	sete	dil
	call	WARN_ON@PLT
	test	rax, rax
	je	.L3
	mov	ebp, DWORD PTR EINVAL[rip]
	neg	ebp
.L3:
	xor	edi, edi
	cmp	QWORD PTR [rbx], 0
	sete	dil
	call	WARN_ON@PLT
	test	rax, rax
	je	.L4
	mov	ebp, DWORD PTR EINVAL[rip]
	neg	ebp
.L4:
	mov	eax, DWORD PTR 8[rbx]
	xor	edi, edi
	test	eax, eax
	sete	dil
	call	WARN_ON@PLT
	test	rax, rax
	je	.L5
	mov	ebp, DWORD PTR EINVAL[rip]
	neg	ebp
.L5:
	mov	edi, DWORD PTR EINVAL[rip]
	test	ebp, ebp
	js	.L23
	mov	esi, DWORD PTR GFP_KERNEL[rip]
	mov	edi, 40
	call	kzalloc@PLT
	mov	rbp, rax
	test	rax, rax
	je	.L25
	lea	rdi, 32[rax]
	call	INIT_LIST_HEAD@PLT
	mov	QWORD PTR 8[rbp], r12
	mov	rdi, r12
	mov	QWORD PTR 24[rbp], 0
	mov	QWORD PTR 16[rbp], rbx
	call	[QWORD PTR [rbx]]
	mov	r12d, eax
	test	eax, eax
	js	.L8
	mov	rdi, rbp
	call	brcmf_chip_recognition@PLT
	mov	r12d, eax
	test	eax, eax
	js	.L8
	mov	rdi, rbp
	call	brcmf_chip_setup@PLT
	mov	r12d, eax
	test	eax, eax
	js	.L8
	mov	rax, rbp
	pop	rbx
	.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
.L8:
	.cfi_restore_state
	mov	rdi, rbp
	call	brcmf_chip_detach@PLT
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	edi, r12d
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	ERR_PTR@PLT
	.p2align 4,,10
	.p2align 3
.L25:
	.cfi_restore_state
	mov	edi, DWORD PTR ENOMEM[rip]
.L23:
	pop	rbx
	.cfi_def_cfa_offset 24
	neg	edi
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	ERR_PTR@PLT
	.cfi_endproc
.LFE0:
	.size	brcmf_chip_attach, .-brcmf_chip_attach
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,4,4
	.comm	EINVAL,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_chip.c_brcmf_chip_attach.c"
	.text
	.align	2
	.global	brcmf_chip_attach
	.syntax unified
	.arm
	.fpu softvfp
	.type	brcmf_chip_attach, %function
brcmf_chip_attach:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, [r1, #12]
	push	{r4, r5, r6, lr}
	mov	r6, r0
	clz	r0, r3
	lsr	r0, r0, #5
	mov	r5, r1
	bl	WARN_ON
	subs	r4, r0, #0
	ldr	r0, [r5, #8]
	ldrne	r3, .L26
	clz	r0, r0
	ldrne	r4, [r3]
	lsr	r0, r0, #5
	rsbne	r4, r4, #0
	bl	WARN_ON
	cmp	r0, #0
	ldr	r0, [r5]
	ldrne	r3, .L26
	clz	r0, r0
	ldrne	r4, [r3]
	lsr	r0, r0, #5
	rsbne	r4, r4, #0
	bl	WARN_ON
	cmp	r0, #0
	ldr	r0, [r5, #4]
	ldrne	r3, .L26
	clz	r0, r0
	ldrne	r4, [r3]
	lsr	r0, r0, #5
	rsbne	r4, r4, #0
	bl	WARN_ON
	cmp	r0, #0
	ldrne	r3, .L26
	ldrne	r4, [r3]
	rsbne	r4, r4, #0
	cmp	r4, #0
	blt	.L24
	ldr	r3, .L26+4
	mov	r0, #20
	ldr	r1, [r3]
	bl	kzalloc
	subs	r4, r0, #0
	beq	.L25
	add	r0, r4, #16
	bl	INIT_LIST_HEAD
	mov	r2, #0
	ldr	r3, [r5]
	str	r5, [r4, #8]
	mov	r0, r6
	str	r6, [r4, #4]
	str	r2, [r4, #12]
	blx	r3
	subs	r5, r0, #0
	blt	.L8
	mov	r0, r4
	bl	brcmf_chip_recognition
	subs	r5, r0, #0
	blt	.L8
	mov	r0, r4
	bl	brcmf_chip_setup
	subs	r5, r0, #0
	blt	.L8
	mov	r0, r4
	pop	{r4, r5, r6, pc}
.L8:
	mov	r0, r4
	bl	brcmf_chip_detach
	mov	r0, r5
	pop	{r4, r5, r6, lr}
	b	ERR_PTR
.L24:
	ldr	r3, .L26
	pop	{r4, r5, r6, lr}
	ldr	r0, [r3]
	rsb	r0, r0, #0
	b	ERR_PTR
.L25:
	ldr	r3, .L26+8
	pop	{r4, r5, r6, lr}
	ldr	r0, [r3]
	rsb	r0, r0, #0
	b	ERR_PTR
.L27:
	.align	2
.L26:
	.word	EINVAL
	.word	GFP_KERNEL
	.word	ENOMEM
	.size	brcmf_chip_attach, .-brcmf_chip_attach
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
