	.file	"extr_usblp.c_usblp_rwait_and_lock.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	usblp_rwait_and_lock, @function
usblp_rwait_and_lock:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	r13, rdi
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	lea	rbp, 4[r13]
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	ebx, esi
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	esi, DWORD PTR current[rip]
	mov	edi, DWORD PTR waita[rip]
	call	DECLARE_WAITQUEUE@PLT
	lea	rsi, waita[rip]
	mov	rdi, r13
	call	add_wait_queue@PLT
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L2:
	mov	edi, DWORD PTR TASK_INTERRUPTIBLE[rip]
	call	set_current_state@PLT
	mov	esi, ebx
	mov	rdi, r13
	call	usblp_rtest@PLT
	mov	r12d, eax
	test	eax, eax
	js	.L11
	je	.L3
	mov	rdi, rbp
	call	mutex_unlock@PLT
	xor	eax, eax
	call	schedule@PLT
.L5:
	mov	rdi, rbp
	call	mutex_lock_interruptible@PLT
	test	rax, rax
	je	.L2
	mov	r12d, DWORD PTR EINTR[rip]
	neg	r12d
.L3:
	mov	edi, DWORD PTR TASK_RUNNING[rip]
	call	set_current_state@PLT
	mov	rdi, r13
	lea	rsi, waita[rip]
	call	remove_wait_queue@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	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
.L11:
	.cfi_restore_state
	mov	rdi, rbp
	call	mutex_unlock@PLT
	jmp	.L3
	.cfi_endproc
.LFE0:
	.size	usblp_rwait_and_lock, .-usblp_rwait_and_lock
	.comm	waita,4,4
	.comm	current,4,4
	.comm	TASK_RUNNING,4,4
	.comm	TASK_INTERRUPTIBLE,4,4
	.comm	EINTR,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_usblp.c_usblp_rwait_and_lock.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	usblp_rwait_and_lock, %function
usblp_rwait_and_lock:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r6, r0
	ldr	r3, .L9
	ldr	r4, .L9+4
	mov	r7, r1
	ldr	r0, [r4]
	ldr	r1, [r3]
	bl	DECLARE_WAITQUEUE
	mov	r1, r4
	mov	r0, r6
	bl	add_wait_queue
	ldr	r8, .L9+8
	add	r5, r6, #4
	b	.L5
.L2:
	ldr	r0, [r8]
	bl	set_current_state
	mov	r1, r7
	mov	r0, r6
	bl	usblp_rtest
	subs	r4, r0, #0
	blt	.L8
	beq	.L3
	mov	r0, r5
	bl	mutex_unlock
	bl	schedule
.L5:
	mov	r0, r5
	bl	mutex_lock_interruptible
	cmp	r0, #0
	beq	.L2
	ldr	r3, .L9+12
	ldr	r4, [r3]
	rsb	r4, r4, #0
.L3:
	ldr	r3, .L9+16
	ldr	r0, [r3]
	bl	set_current_state
	mov	r0, r6
	ldr	r1, .L9+4
	bl	remove_wait_queue
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L8:
	mov	r0, r5
	bl	mutex_unlock
	b	.L3
.L10:
	.align	2
.L9:
	.word	current
	.word	waita
	.word	TASK_INTERRUPTIBLE
	.word	EINTR
	.word	TASK_RUNNING
	.size	usblp_rwait_and_lock, .-usblp_rwait_and_lock
	.comm	waita,4,4
	.comm	current,4,4
	.comm	TASK_RUNNING,4,4
	.comm	TASK_INTERRUPTIBLE,4,4
	.comm	EINTR,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
