	.file	"extr_spi-s3c24xx.c_s3c24xx_spi_setup.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	s3c24xx_spi_setup, @function
s3c24xx_spi_setup:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	r12, QWORD PTR [rdi]
	mov	rbp, rdi
	call	to_hw@PLT
	mov	r13, rax
	test	r12, r12
	je	.L8
.L2:
	xor	esi, esi
	mov	rdi, rbp
	call	s3c24xx_spi_update_state@PLT
	mov	r12d, eax
	test	eax, eax
	je	.L9
.L1:
	mov	eax, r12d
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L9:
	.cfi_restore_state
	mov	rdi, r13
	call	mutex_lock@PLT
	mov	eax, DWORD PTR 16[r13]
	test	eax, eax
	jne	.L5
	mov	esi, DWORD PTR BITBANG_CS_INACTIVE[rip]
	mov	rdi, rbp
	call	[QWORD PTR 8[r13]]
.L5:
	mov	rdi, r13
	call	mutex_unlock@PLT
	mov	eax, r12d
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L8:
	.cfi_restore_state
	mov	edx, DWORD PTR GFP_KERNEL[rip]
	lea	rdi, 8[rbp]
	mov	esi, 8
	call	devm_kzalloc@PLT
	mov	r12d, DWORD PTR ENOMEM[rip]
	neg	r12d
	test	rax, rax
	je	.L1
	mov	edx, DWORD PTR SPCON_DEFAULT[rip]
	mov	DWORD PTR [rax], -1
	mov	DWORD PTR 4[rax], edx
	mov	QWORD PTR 0[rbp], rax
	jmp	.L2
	.cfi_endproc
.LFE0:
	.size	s3c24xx_spi_setup, .-s3c24xx_spi_setup
	.comm	SPCON_DEFAULT,4,4
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,4,4
	.comm	BITBANG_CS_INACTIVE,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_spi-s3c24xx.c_s3c24xx_spi_setup.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	s3c24xx_spi_setup, %function
s3c24xx_spi_setup:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	ldr	r5, [r0]
	mov	r4, r0
	bl	to_hw
	cmp	r5, #0
	mov	r6, r0
	beq	.L8
.L2:
	mov	r1, #0
	mov	r0, r4
	bl	s3c24xx_spi_update_state
	subs	r5, r0, #0
	beq	.L9
.L1:
	mov	r0, r5
	pop	{r4, r5, r6, pc}
.L9:
	mov	r0, r6
	bl	mutex_lock
	ldr	r3, [r6, #8]
	cmp	r3, #0
	bne	.L5
	ldr	r3, .L11
	mov	r0, r4
	ldr	r1, [r3]
	ldr	r3, [r6, #4]
	blx	r3
.L5:
	mov	r0, r6
	bl	mutex_unlock
	mov	r0, r5
	pop	{r4, r5, r6, pc}
.L8:
	ldr	r3, .L11+4
	mov	r1, #8
	ldr	r2, [r3]
	add	r0, r4, #4
	bl	devm_kzalloc
	cmp	r0, #0
	beq	.L10
	mvn	r2, #0
	ldr	r3, .L11+8
	ldr	r3, [r3]
	stm	r0, {r2, r3}
	str	r0, [r4]
	b	.L2
.L10:
	ldr	r3, .L11+12
	ldr	r0, [r3]
	rsb	r5, r0, #0
	b	.L1
.L12:
	.align	2
.L11:
	.word	BITBANG_CS_INACTIVE
	.word	GFP_KERNEL
	.word	SPCON_DEFAULT
	.word	ENOMEM
	.size	s3c24xx_spi_setup, .-s3c24xx_spi_setup
	.comm	SPCON_DEFAULT,4,4
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,4,4
	.comm	BITBANG_CS_INACTIVE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
