	.file	"extr_sp887x.c_sp887x_attach.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	sp887x_attach
	.type	sp887x_attach, @function
sp887x_attach:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	r12, rdi
	mov	edi, 40
	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
	mov	esi, DWORD PTR GFP_KERNEL[rip]
	call	kzalloc@PLT
	mov	rbp, rax
	test	rax, rax
	je	.L2
	mov	QWORD PTR 32[rax], r12
	mov	esi, 512
	mov	rdi, rax
	mov	QWORD PTR 24[rax], rbx
	mov	QWORD PTR 16[rax], 0
	call	sp887x_readreg@PLT
	test	rax, rax
	js	.L2
	lea	rdi, 8[rbp]
	mov	edx, 4
	lea	rsi, sp887x_ops[rip]
	call	memcpy@PLT
	mov	QWORD PTR 0[rbp], rbp
	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
.L2:
	.cfi_restore_state
	mov	rdi, rbp
	call	kfree@PLT
	pop	rbx
	.cfi_def_cfa_offset 24
	xor	eax, eax
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	sp887x_attach, .-sp887x_attach
	.comm	sp887x_ops,4,4
	.comm	GFP_KERNEL,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_sp887x.c_sp887x_attach.c"
	.text
	.align	2
	.global	sp887x_attach
	.syntax unified
	.arm
	.fpu softvfp
	.type	sp887x_attach, %function
sp887x_attach:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r5, r1
	ldr	r1, .L9
	mov	r6, r0
	ldr	r1, [r1]
	mov	r0, #20
	bl	kzalloc
	subs	r4, r0, #0
	beq	.L2
	mov	r3, #0
	mov	r1, #512
	str	r6, [r4, #16]
	str	r5, [r4, #12]
	str	r3, [r4, #8]
	bl	sp887x_readreg
	cmp	r0, #0
	blt	.L2
	mov	r2, #4
	ldr	r1, .L9+4
	add	r0, r4, r2
	bl	memcpy
	mov	r0, r4
	str	r4, [r4]
	pop	{r4, r5, r6, pc}
.L2:
	mov	r0, r4
	bl	kfree
	mov	r0, #0
	pop	{r4, r5, r6, pc}
.L10:
	.align	2
.L9:
	.word	GFP_KERNEL
	.word	sp887x_ops
	.size	sp887x_attach, .-sp887x_attach
	.comm	sp887x_ops,4,4
	.comm	GFP_KERNEL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
