	.file	"extr_lx_core.c_lx_interrupt_request_new_buffer.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"->lx_interrupt_request_new_buffer\n"
	.align 8
.LC1:
	.string	"interrupt: needed %d, freed %d\n"
	.align 8
.LC2:
	.string	"interrupt: gave buffer index %x on 0x%lx (%d bytes)\n"
	.text
	.p2align 4
	.type	lx_interrupt_request_new_buffer, @function
lx_interrupt_request_new_buffer:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r15
	push	r14
	push	r13
	push	r12
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	mov	r12, rdi
	push	rbx
	.cfi_offset 3, -56
	mov	rbx, rsi
	sub	rsp, 56
	mov	rcx, QWORD PTR 8[rsi]
	mov	r15d, DWORD PTR [rsi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -56[rbp], rax
	xor	eax, eax
	mov	rdx, QWORD PTR 8[rcx]
	mov	eax, DWORD PTR [rdx]
	imul	eax, DWORD PTR 4[rdx]
	lea	r14d, [rax+rax*2]
	mov	eax, DWORD PTR 4[rsi]
	lea	r13d, 1[rax]
	cmp	r13d, DWORD PTR 8[rdx]
	mov	edx, 0
	cmove	r13d, edx
	imul	eax, r14d
	cdqe
	add	rax, QWORD PTR [rcx]
	mov	rcx, rsp
	mov	DWORD PTR -76[rbp], 0
	mov	r10, rax
	movsx	rax, DWORD PTR MAX_STREAM_BUFFER[rip]
	mov	DWORD PTR -72[rbp], 0
	mov	DWORD PTR -68[rbp], 0
	lea	rax, 15[0+rax*4]
	mov	rdx, rax
	and	rax, -4096
	sub	rcx, rax
	and	rdx, -16
	mov	rax, rcx
	cmp	rsp, rax
	je	.L4
.L13:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L13
.L4:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	jne	.L14
.L5:
	mov	rax, QWORD PTR 8[r12]
	mov	r9, rsp
	lea	rsi, .LC0[rip]
	mov	QWORD PTR -96[rbp], r10
	mov	QWORD PTR -88[rbp], r9
	mov	edi, DWORD PTR [rax]
	xor	eax, eax
	call	dev_dbg@PLT
	mov	rdi, r12
	call	mutex_lock@PLT
	mov	r9, QWORD PTR -88[rbp]
	lea	r8, -60[rbp]
	mov	edx, r15d
	xor	esi, esi
	lea	rcx, -64[rbp]
	mov	rdi, r12
	call	lx_buffer_ask@PLT
	mov	rax, QWORD PTR 8[r12]
	mov	ecx, DWORD PTR -60[rbp]
	lea	rsi, .LC1[rip]
	mov	edx, DWORD PTR -64[rbp]
	mov	edi, DWORD PTR [rax]
	xor	eax, eax
	call	dev_dbg@PLT
	mov	r10, QWORD PTR -96[rbp]
	lea	rdx, -76[rbp]
	lea	rsi, -72[rbp]
	mov	rdi, r10
	mov	QWORD PTR -88[rbp], r10
	call	unpack_pointer@PLT
	sub	rsp, 8
	lea	rax, -68[rbp]
	mov	edx, r15d
	push	rax
	mov	r9d, DWORD PTR -76[rbp]
	xor	esi, esi
	mov	ecx, r14d
	mov	r8d, DWORD PTR -72[rbp]
	mov	rdi, r12
	call	lx_buffer_give@PLT
	mov	r10, QWORD PTR -88[rbp]
	mov	edx, DWORD PTR -68[rbp]
	mov	r8d, r14d
	mov	r15d, eax
	mov	rax, QWORD PTR 8[r12]
	lea	rsi, .LC2[rip]
	mov	rcx, r10
	mov	edi, DWORD PTR [rax]
	xor	eax, eax
	call	dev_dbg@PLT
	mov	DWORD PTR 4[rbx], r13d
	mov	rdi, r12
	call	mutex_unlock@PLT
	mov	rax, QWORD PTR -56[rbp]
	xor	rax, QWORD PTR fs:40
	jne	.L15
	lea	rsp, -40[rbp]
	mov	eax, r15d
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	r15
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L14:
	.cfi_restore_state
	or	QWORD PTR -8[rsp+rdx], 0
	jmp	.L5
.L15:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	lx_interrupt_request_new_buffer, .-lx_interrupt_request_new_buffer
	.comm	MAX_STREAM_BUFFER,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_lx_core.c_lx_interrupt_request_new_buffer.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"->lx_interrupt_request_new_buffer\012\000"
	.align	2
.LC1:
	.ascii	"interrupt: needed %d, freed %d\012\000"
	.align	2
.LC2:
	.ascii	"interrupt: gave buffer index %x on 0x%lx (%d bytes)"
	.ascii	"\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	lx_interrupt_request_new_buffer, %function
lx_interrupt_request_new_buffer:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	add	fp, sp, #32
	sub	sp, sp, #44
	mov	r6, r1
	mov	r4, r0
	mov	r7, #0
	ldr	r3, [r1, #8]
	ldr	r2, .L8
	ldr	r1, [r3, #4]
	ldr	r2, [r2]
	ldr	r5, [r1]
	ldr	r0, [r1, #4]
	lsl	r2, r2, #2
	mul	r5, r0, r5
	ldr	ip, [r6, #4]
	add	r2, r2, #7
	ldr	lr, [r1, #8]
	ldr	r0, [r4, #4]
	bic	r2, r2, #7
	sub	sp, sp, r2
	add	r8, ip, #1
	ldr	r3, [r3]
	ldr	r2, .L8+4
	str	r7, [fp, #-60]
	str	r7, [fp, #-56]
	str	r7, [fp, #-52]
	cmp	r8, lr
	add	r5, r5, r5, lsl #1
	ldr	r1, .L8+8
	ldr	r0, [r0]
	moveq	r8, r7
	mla	r9, ip, r5, r3
	ldr	r2, [r2]
	str	r2, [fp, #-40]
	mov	r2,#0
	ldr	r10, [r6]
	bl	dev_dbg
	mov	r0, r4
	bl	mutex_lock
	add	r2, sp, #16
	sub	r3, fp, #44
	mov	r1, r7
	str	r2, [sp, #4]
	str	r3, [sp]
	mov	r2, r10
	sub	r3, fp, #48
	mov	r0, r4
	bl	lx_buffer_ask
	ldr	r2, [r4, #4]
	ldr	r3, [fp, #-44]
	ldr	r0, [r2]
	ldr	r1, .L8+12
	ldr	r2, [fp, #-48]
	bl	dev_dbg
	sub	r2, fp, #60
	sub	r1, fp, #56
	mov	r0, r9
	bl	unpack_pointer
	ldr	r0, [fp, #-60]
	ldr	r3, [fp, #-56]
	sub	ip, fp, #52
	stmib	sp, {r0, ip}
	mov	r2, r10
	mov	r1, r7
	str	r3, [sp]
	mov	r0, r4
	mov	r3, r5
	bl	lx_buffer_give
	mov	ip, r0
	ldr	r2, [r4, #4]
	mov	r3, r9
	ldr	r0, [r2]
	ldr	r1, .L8+16
	ldr	r2, [fp, #-52]
	str	r5, [sp]
	mov	r5, ip
	bl	dev_dbg
	mov	r0, r4
	str	r8, [r6, #4]
	bl	mutex_unlock
	ldr	r3, .L8+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-40]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L7
	mov	r0, r5
	sub	sp, fp, #32
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L7:
	bl	__stack_chk_fail
.L9:
	.align	2
.L8:
	.word	MAX_STREAM_BUFFER
	.word	.LC3
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.size	lx_interrupt_request_new_buffer, .-lx_interrupt_request_new_buffer
	.comm	MAX_STREAM_BUFFER,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
