	.file	"extr_common.c_gigaset_get_channels.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"allocated all channels"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC1:
	.string	"could not allocate all channels"
	.text
	.p2align 4
	.globl	gigaset_get_channels
	.type	gigaset_get_channels, @function
gigaset_get_channels:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	lea	rbp, 4[rdi]
	xor	esi, esi
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	mov	rbx, rdi
	mov	rdi, rbp
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	call	spin_lock_irqsave@PLT
	mov	eax, DWORD PTR [rbx]
	test	eax, eax
	jle	.L7
	mov	rcx, QWORD PTR 8[rbx]
	sub	eax, 1
	lea	rdx, 8[rcx]
	lea	rsi, [rdx+rax*8]
	mov	rax, rcx
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L4:
	add	rax, 8
	cmp	rax, rsi
	je	.L6
.L5:
	cmp	QWORD PTR [rax], 0
	je	.L4
	mov	rdi, rbp
	xor	esi, esi
	call	spin_unlock_irqrestore@PLT
	mov	edi, DWORD PTR DEBUG_ANY[rip]
	lea	rsi, .LC1[rip]
	call	gig_dbg@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L12:
	.cfi_restore_state
	add	rdx, 8
.L6:
	add	QWORD PTR [rcx], 1
	mov	rcx, rdx
	cmp	rdx, rsi
	jne	.L12
.L7:
	mov	rdi, rbp
	xor	esi, esi
	call	spin_unlock_irqrestore@PLT
	mov	edi, DWORD PTR DEBUG_ANY[rip]
	lea	rsi, .LC0[rip]
	call	gig_dbg@PLT
	add	rsp, 8
	.cfi_def_cfa_offset 24
	mov	eax, 1
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	gigaset_get_channels, .-gigaset_get_channels
	.comm	DEBUG_ANY,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_common.c_gigaset_get_channels.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"allocated all channels\000"
	.align	2
.LC1:
	.ascii	"could not allocate all channels\000"
	.text
	.align	2
	.global	gigaset_get_channels
	.syntax unified
	.arm
	.fpu softvfp
	.type	gigaset_get_channels, %function
gigaset_get_channels:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r5, r0
	add	r4, r0, #4
	mov	r0, r4
	mov	r1, #0
	bl	spin_lock_irqsave
	ldr	ip, [r5]
	cmp	ip, #0
	ble	.L7
	ldr	lr, [r5, #8]
	mov	r3, #0
	sub	lr, lr, #4
	mov	r0, lr
	mov	r2, lr
	b	.L5
.L4:
	cmp	r3, ip
	beq	.L12
.L5:
	ldr	r1, [r2, #4]!
	add	r3, r3, #1
	cmp	r1, #0
	beq	.L4
	mov	r0, r4
	mov	r1, #0
	bl	spin_unlock_irqrestore
	ldr	r3, .L13
	ldr	r1, .L13+4
	ldr	r0, [r3]
	bl	gig_dbg
	mov	r0, #0
	pop	{r4, r5, r6, pc}
.L12:
	add	r3, lr, r3, lsl #2
.L6:
	ldr	r2, [r0, #4]!
	add	r2, r2, #1
	cmp	r0, r3
	str	r2, [r0]
	bne	.L6
.L7:
	mov	r0, r4
	mov	r1, #0
	bl	spin_unlock_irqrestore
	ldr	r3, .L13
	ldr	r1, .L13+8
	ldr	r0, [r3]
	bl	gig_dbg
	mov	r0, #1
	pop	{r4, r5, r6, pc}
.L14:
	.align	2
.L13:
	.word	DEBUG_ANY
	.word	.LC1
	.word	.LC0
	.size	gigaset_get_channels, .-gigaset_get_channels
	.comm	DEBUG_ANY,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
