	.file	"extr_mpc52xx_psc_spi.c_mpc52xx_psc_spi_setup.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	mpc52xx_psc_spi_setup, @function
mpc52xx_psc_spi_setup:
.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	edi, DWORD PTR 16[rdi]
	call	spi_master_get_devdata@PLT
	mov	edx, DWORD PTR 0[rbp]
	test	dl, 7
	jne	.L9
	mov	r12, rax
	mov	rax, QWORD PTR 8[rbp]
	test	rax, rax
	je	.L10
.L4:
	mov	DWORD PTR [rax], edx
	mov	edx, DWORD PTR 4[rbp]
	xor	esi, esi
	mov	rdi, r12
	mov	DWORD PTR 4[rax], edx
	call	spin_lock_irqsave@PLT
	mov	eax, DWORD PTR 4[r12]
	test	eax, eax
	je	.L11
.L6:
	xor	esi, esi
	mov	rdi, r12
	call	spin_unlock_irqrestore@PLT
	xor	eax, eax
.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
.L11:
	.cfi_restore_state
	mov	rdi, rbp
	call	mpc52xx_psc_spi_deactivate_cs@PLT
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L9:
	mov	eax, DWORD PTR EINVAL[rip]
	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
	neg	eax
	ret
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore_state
	mov	esi, DWORD PTR GFP_KERNEL[rip]
	mov	edi, 8
	call	kzalloc@PLT
	test	rax, rax
	je	.L12
	mov	QWORD PTR 8[rbp], rax
	mov	edx, DWORD PTR 0[rbp]
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L12:
	mov	eax, DWORD PTR ENOMEM[rip]
	neg	eax
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	mpc52xx_psc_spi_setup, .-mpc52xx_psc_spi_setup
	.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_mpc52xx_psc_spi.c_mpc52xx_psc_spi_setup.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	mpc52xx_psc_spi_setup, %function
mpc52xx_psc_spi_setup:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r4, r0
	ldr	r0, [r0, #12]
	bl	spi_master_get_devdata
	ldr	r3, [r4]
	tst	r3, #7
	bne	.L9
	mov	r5, r0
	ldr	r0, [r4, #8]
	cmp	r0, #0
	beq	.L10
.L4:
	ldr	r2, [r4, #4]
	mov	r1, #0
	str	r3, [r0]
	str	r2, [r0, #4]
	mov	r0, r5
	bl	spin_lock_irqsave
	ldr	r3, [r5, #4]
	cmp	r3, #0
	beq	.L11
.L6:
	mov	r0, r5
	mov	r1, #0
	bl	spin_unlock_irqrestore
	mov	r0, #0
	pop	{r4, r5, r6, pc}
.L11:
	mov	r0, r4
	bl	mpc52xx_psc_spi_deactivate_cs
	b	.L6
.L9:
	ldr	r3, .L13
	ldr	r0, [r3]
	rsb	r0, r0, #0
	pop	{r4, r5, r6, pc}
.L10:
	ldr	r3, .L13+4
	mov	r0, #8
	ldr	r1, [r3]
	bl	kzalloc
	cmp	r0, #0
	ldrne	r3, [r4]
	strne	r0, [r4, #8]
	bne	.L4
.L12:
	ldr	r3, .L13+8
	ldr	r0, [r3]
	rsb	r0, r0, #0
	pop	{r4, r5, r6, pc}
.L14:
	.align	2
.L13:
	.word	EINVAL
	.word	GFP_KERNEL
	.word	ENOMEM
	.size	mpc52xx_psc_spi_setup, .-mpc52xx_psc_spi_setup
	.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
