	.file	"extr_cafe_ccic.c_cafe_read_setup.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	cafe_read_setup, @function
cafe_read_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	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	ebx, esi
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	cmp	QWORD PTR [rdi], 0
	jne	.L2
	xor	esi, esi
	call	cafe_alloc_dma_bufs@PLT
	test	rax, rax
	jne	.L14
.L2:
	mov	rdi, rbp
	call	cafe_needs_config@PLT
	test	rax, rax
	jne	.L4
.L5:
	lea	r12, 12[rbp]
	xor	r13d, r13d
	mov	rsi, r13
	mov	rdi, r12
	call	spin_lock_irqsave@PLT
	mov	rdi, rbp
	call	cafe_reset_buffers@PLT
	mov	rdi, rbp
	call	cafe_ctlr_irq_enable@PLT
	mov	DWORD PTR 8[rbp], ebx
	mov	rdi, rbp
	call	cafe_ctlr_start@PLT
	mov	rsi, r13
	mov	rdi, r12
	call	spin_unlock_irqrestore@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.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
.L4:
	.cfi_restore_state
	mov	rdi, rbp
	call	cafe_cam_configure@PLT
	mov	rdi, rbp
	call	cafe_ctlr_configure@PLT
	test	eax, eax
	je	.L5
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.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
.L14:
	.cfi_restore_state
	mov	eax, DWORD PTR ENOMEM[rip]
	add	rsp, 8
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	neg	eax
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	cafe_read_setup, .-cafe_read_setup
	.comm	ENOMEM,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_cafe_ccic.c_cafe_read_setup.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	cafe_read_setup, %function
cafe_read_setup:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, [r0]
	push	{r4, r5, r6, r7, r8, lr}
	cmp	r3, #0
	mov	r4, r0
	mov	r7, r1
	bne	.L2
	mov	r1, r3
	bl	cafe_alloc_dma_bufs
	cmp	r0, #0
	bne	.L14
.L2:
	mov	r0, r4
	bl	cafe_needs_config
	cmp	r0, #0
	beq	.L5
	mov	r0, r4
	bl	cafe_cam_configure
	mov	r0, r4
	bl	cafe_ctlr_configure
	cmp	r0, #0
	popne	{r4, r5, r6, r7, r8, pc}
.L5:
	mov	r6, #0
	add	r5, r4, #8
	mov	r1, r6
	mov	r0, r5
	bl	spin_lock_irqsave
	mov	r0, r4
	bl	cafe_reset_buffers
	mov	r0, r4
	bl	cafe_ctlr_irq_enable
	mov	r0, r4
	str	r7, [r4, #4]
	bl	cafe_ctlr_start
	mov	r1, r6
	mov	r0, r5
	bl	spin_unlock_irqrestore
	mov	r0, r6
	pop	{r4, r5, r6, r7, r8, pc}
.L14:
	ldr	r3, .L15
	ldr	r0, [r3]
	rsb	r0, r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L16:
	.align	2
.L15:
	.word	ENOMEM
	.size	cafe_read_setup, .-cafe_read_setup
	.comm	ENOMEM,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
