	.file	"extr_ev-layer.c_do_lock.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	do_lock, @function
do_lock:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	mov	eax, DWORD PTR [rdi]
	mov	rbx, rdi
	cmp	eax, 129
	jle	.L21
	cmp	eax, 130
	jne	.L4
.L5:
	mov	edx, DWORD PTR M_UNKNOWN[rip]
	mov	eax, DWORD PTR 8[rbx]
	mov	DWORD PTR [rbx], 130
	mov	DWORD PTR 8[rbx], edx
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L21:
	.cfi_restore_state
	cmp	eax, 127
	jg	.L22
.L4:
	mov	eax, DWORD PTR EBUSY[rip]
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	neg	eax
	ret
	.p2align 4,,10
	.p2align 3
.L22:
	.cfi_restore_state
	mov	edi, DWORD PTR 32[rdi]
	test	edi, edi
	jne	.L4
	lea	rdi, 28[rbx]
	call	list_empty@PLT
	test	eax, eax
	je	.L4
	mov	esi, DWORD PTR 24[rbx]
	test	esi, esi
	jne	.L4
	mov	edx, DWORD PTR 4[rbx]
	test	edx, edx
	jle	.L8
	mov	rax, QWORD PTR 16[rbx]
	sub	edx, 1
	lea	rdx, 4[rax+rdx*4]
	.p2align 4,,10
	.p2align 3
.L11:
	mov	ecx, DWORD PTR [rax]
	test	ecx, ecx
	jne	.L4
	add	rax, 4
	cmp	rax, rdx
	jne	.L11
.L8:
	mov	rdi, rbx
	call	gigaset_get_channels@PLT
	test	eax, eax
	jne	.L5
	jmp	.L4
	.cfi_endproc
.LFE0:
	.size	do_lock, .-do_lock
	.comm	M_UNKNOWN,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_ev-layer.c_do_lock.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	do_lock, %function
do_lock:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, [r0]
	push	{r4, lr}
	cmp	r3, #129
	mov	r4, r0
	ble	.L22
	cmp	r3, #130
	bne	.L4
.L5:
	mov	r2, #130
	ldr	r3, .L24
	ldr	r0, [r4, #8]
	ldr	r3, [r3]
	str	r2, [r4]
	str	r3, [r4, #8]
	pop	{r4, pc}
.L22:
	cmp	r3, #127
	bgt	.L23
.L4:
	ldr	r3, .L24+4
	ldr	r0, [r3]
	rsb	r0, r0, #0
	pop	{r4, pc}
.L23:
	ldr	r3, [r0, #24]
	cmp	r3, #0
	bne	.L4
	add	r0, r0, #20
	bl	list_empty
	cmp	r0, #0
	beq	.L4
	ldr	r3, [r4, #16]
	cmp	r3, #0
	bne	.L4
	ldr	r0, [r4, #4]
	cmp	r0, #0
	ldrgt	r2, [r4, #12]
	subgt	r2, r2, #4
	ble	.L8
.L11:
	ldr	r1, [r2, #4]!
	add	r3, r3, #1
	cmp	r1, #0
	bne	.L4
	cmp	r3, r0
	bne	.L11
.L8:
	mov	r0, r4
	bl	gigaset_get_channels
	cmp	r0, #0
	bne	.L5
	b	.L4
.L25:
	.align	2
.L24:
	.word	M_UNKNOWN
	.word	EBUSY
	.size	do_lock, .-do_lock
	.comm	M_UNKNOWN,4,4
	.comm	EBUSY,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
