	.file	"extr_pcxhr_core.c_pcxhr_set_pipe_state.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"error pipe start/stop\n"
.LC1:
	.string	"STOP"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC2:
	.string	"pcxhr_set_pipe_state %s (mask %x current %x)\n"
	.section	.rodata.str1.1
.LC3:
	.string	"START"
	.text
	.p2align 4
	.globl	pcxhr_set_pipe_state
	.type	pcxhr_set_pipe_state, @function
pcxhr_set_pipe_state:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15d, ecx
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rdi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	ecx, DWORD PTR PCXHR_PIPE_STATE_CAPTURE_OFFSET[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	sal	edx, cl
	mov	ebp, edx
	or	ebp, esi
	call	pcxhr_pipes_running@PLT
	mov	DWORD PTR 4[rsp], eax
	mov	r8d, eax
	test	r15d, r15d
	je	.L18
	mov	rdi, QWORD PTR 0[r13]
	mov	ecx, ebp
	lea	rsi, .LC2[rip]
	xor	eax, eax
	lea	rdx, .LC3[rip]
	xor	ebx, ebx
	lea	r14, 4[rsp]
	call	dev_dbg@PLT
	mov	esi, DWORD PTR 4[rsp]
	mov	eax, DWORD PTR MAX_WAIT_FOR_DSP[rip]
	not	esi
	and	ebp, esi
	mov	DWORD PTR 4[rsp], ebp
	mov	esi, ebp
	test	eax, eax
	jg	.L6
	.p2align 4,,10
	.p2align 3
.L5:
	test	ebp, ebp
	jne	.L7
.L11:
	xor	r12d, r12d
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L19
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L20:
	.cfi_restore_state
	mov	edx, DWORD PTR 4[rsp]
	test	edx, edx
	je	.L5
	mov	edi, 1
	add	ebx, 1
	call	mdelay@PLT
	cmp	DWORD PTR MAX_WAIT_FOR_DSP[rip], ebx
	jle	.L5
	mov	esi, DWORD PTR 4[rsp]
.L6:
	mov	rdx, r14
	mov	rdi, r13
	call	pcxhr_prepair_pipe_start@PLT
	mov	r12d, eax
	test	eax, eax
	je	.L20
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L18:
	mov	rdi, QWORD PTR 0[r13]
	mov	ecx, ebp
	lea	rdx, .LC1[rip]
	xor	eax, eax
	lea	rsi, .LC2[rip]
	call	dev_dbg@PLT
	and	ebp, DWORD PTR 4[rsp]
	test	ebp, ebp
	je	.L11
.L7:
	mov	esi, ebp
	mov	rdi, r13
	call	pcxhr_toggle_pipes@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L1
	test	r15d, r15d
	mov	ebx, eax
	cmovne	ebx, ebp
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L22:
	imul	eax, DWORD PTR MAX_WAIT_FOR_DSP[rip], 100
	add	r12d, 1
	cmp	eax, r12d
	jle	.L21
	mov	edi, 10
	call	udelay@PLT
.L10:
	mov	rdi, r13
	call	pcxhr_pipes_running@PLT
	mov	DWORD PTR 4[rsp], eax
	and	eax, ebp
	cmp	eax, ebx
	jne	.L22
	test	r15d, r15d
	jne	.L11
	mov	esi, ebp
	mov	rdi, r13
	call	pcxhr_stop_pipes@PLT
	mov	r12d, eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L21:
	mov	rdi, QWORD PTR 0[r13]
	lea	rsi, .LC0[rip]
	call	dev_err@PLT
	mov	r12d, DWORD PTR EBUSY[rip]
	neg	r12d
	jmp	.L1
.L19:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	pcxhr_set_pipe_state, .-pcxhr_set_pipe_state
	.comm	PCXHR_PIPE_STATE_CAPTURE_OFFSET,4,4
	.comm	MAX_WAIT_FOR_DSP,4,4
	.comm	EBUSY,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_pcxhr_core.c_pcxhr_set_pipe_state.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"error pipe start/stop\012\000"
	.align	2
.LC1:
	.ascii	"STOP\000"
	.align	2
.LC2:
	.ascii	"pcxhr_set_pipe_state %s (mask %x current %x)\012\000"
	.align	2
.LC3:
	.ascii	"START\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	pcxhr_set_pipe_state
	.syntax unified
	.arm
	.fpu softvfp
	.type	pcxhr_set_pipe_state, %function
pcxhr_set_pipe_state:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	ldr	ip, .L25
	mov	r7, r3
	ldr	r6, [ip]
	ldr	r3, .L25+4
	sub	sp, sp, #20
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	mov	r5, r0
	orr	r6, r1, r2, lsl r6
	bl	pcxhr_pipes_running
	cmp	r7, #0
	mov	r3, r0
	str	r0, [sp, #8]
	ldr	r0, [r5]
	beq	.L20
	ldr	r9, .L25+8
	ldr	r2, .L25+12
	ldr	r1, .L25+16
	str	r3, [sp]
	mov	r3, r6
	bl	dev_dbg
	ldr	r2, [sp, #8]
	ldr	r3, [r9]
	bic	r6, r6, r2
	cmp	r3, #0
	movgt	r1, r6
	movgt	r8, #0
	str	r6, [sp, #8]
	bgt	.L6
.L5:
	cmp	r6, #0
	bne	.L7
.L11:
	mov	r4, #0
.L1:
	ldr	r3, .L25+4
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L21
	mov	r0, r4
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L22:
	ldr	r3, [sp, #8]
	cmp	r3, #0
	beq	.L5
	mov	r0, #1
	bl	mdelay
	ldr	r3, [r9]
	add	r8, r8, #1
	cmp	r3, r8
	ble	.L5
	ldr	r1, [sp, #8]
.L6:
	mov	r0, r5
	add	r2, sp, #8
	bl	pcxhr_prepair_pipe_start
	subs	r4, r0, #0
	beq	.L22
	b	.L1
.L20:
	ldr	r2, .L25+20
	str	r3, [sp]
	ldr	r1, .L25+16
	mov	r3, r6
	bl	dev_dbg
	ldr	r2, [sp, #8]
	and	r6, r6, r2
	cmp	r6, #0
	beq	.L11
.L7:
	mov	r1, r6
	mov	r0, r5
	bl	pcxhr_toggle_pipes
	subs	r4, r0, #0
	bne	.L1
	cmp	r7, #0
	movne	r8, r6
	moveq	r8, #0
	ldr	r9, .L25+8
	b	.L10
.L24:
	ldr	ip, [r9]
	add	r4, r4, #1
	add	ip, ip, ip, lsl #2
	add	ip, ip, ip, lsl #2
	cmp	r4, ip, lsl #2
	bge	.L23
	mov	r0, #10
	bl	udelay
.L10:
	mov	r0, r5
	bl	pcxhr_pipes_running
	and	r3, r0, r6
	cmp	r3, r8
	str	r0, [sp, #8]
	bne	.L24
	cmp	r7, #0
	bne	.L11
	mov	r1, r6
	mov	r0, r5
	bl	pcxhr_stop_pipes
	mov	r4, r0
	b	.L1
.L23:
	ldr	r0, [r5]
	ldr	r1, .L25+24
	bl	dev_err
	ldr	r3, .L25+28
	ldr	r4, [r3]
	rsb	r4, r4, #0
	b	.L1
.L21:
	bl	__stack_chk_fail
.L26:
	.align	2
.L25:
	.word	PCXHR_PIPE_STATE_CAPTURE_OFFSET
	.word	.LC4
	.word	MAX_WAIT_FOR_DSP
	.word	.LC3
	.word	.LC2
	.word	.LC1
	.word	.LC0
	.word	EBUSY
	.size	pcxhr_set_pipe_state, .-pcxhr_set_pipe_state
	.comm	PCXHR_PIPE_STATE_CAPTURE_OFFSET,4,4
	.comm	MAX_WAIT_FOR_DSP,4,4
	.comm	EBUSY,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
