	.file	"extr_s3cmci.c_get_data_buffer.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"no more buffers (%i/%i)\n"
.LC1:
	.string	"new buffer (%i/%i)\n"
	.text
	.p2align 4
	.type	get_data_buffer, @function
get_data_buffer:
.LFB0:
	.cfi_startproc
	endbr64
	mov	rax, QWORD PTR XFER_NONE[rip]
	cmp	QWORD PTR [rdi], rax
	je	.L16
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	mov	rax, QWORD PTR 16[rdi]
	test	rax, rax
	je	.L4
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	je	.L4
	mov	rcx, QWORD PTR 8[rdi]
	mov	r8, QWORD PTR [rax]
	cmp	rcx, r8
	jnb	.L17
	mov	rax, QWORD PTR 8[rax]
	mov	rbx, rdx
	lea	rdi, [rax+rcx*4]
	mov	eax, DWORD PTR [rdi]
	mov	DWORD PTR [rsi], eax
	call	sg_virt@PLT
	mov	esi, DWORD PTR dbg_sg[rip]
	mov	rdi, rbp
	lea	rdx, .LC1[rip]
	mov	QWORD PTR [rbx], rax
	mov	rax, QWORD PTR 8[rbp]
	lea	rcx, 1[rax]
	mov	rax, QWORD PTR 16[rbp]
	mov	QWORD PTR 8[rbp], rcx
	mov	rax, QWORD PTR [rax]
	mov	r8, QWORD PTR [rax]
	call	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
.L4:
	.cfi_restore_state
	mov	eax, DWORD PTR EINVAL[rip]
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	neg	eax
	ret
	.p2align 4,,10
	.p2align 3
.L17:
	.cfi_restore_state
	mov	esi, DWORD PTR dbg_debug[rip]
	lea	rdx, .LC0[rip]
	call	dbg@PLT
	mov	eax, DWORD PTR EBUSY[rip]
	add	rsp, 8
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	neg	eax
	ret
	.p2align 4,,10
	.p2align 3
.L16:
	.cfi_restore 3
	.cfi_restore 6
	mov	eax, DWORD PTR EINVAL[rip]
	neg	eax
	ret
	.cfi_endproc
.LFE0:
	.size	get_data_buffer, .-get_data_buffer
	.comm	dbg_sg,4,4
	.comm	dbg_debug,4,4
	.comm	XFER_NONE,8,8
	.comm	EINVAL,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_s3cmci.c_get_data_buffer.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"no more buffers (%i/%i)\012\000"
	.align	2
.LC1:
	.ascii	"new buffer (%i/%i)\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	get_data_buffer, %function
get_data_buffer:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, .L18
	ldr	ip, [r0]
	ldr	r3, [r3]
	cmp	ip, r3
	beq	.L16
	push	{r4, r5, lr}
	ldr	r3, [r0, #8]
	mov	r4, r0
	cmp	r3, #0
	sub	sp, sp, #12
	beq	.L4
	ldr	ip, [r3]
	cmp	ip, #0
	beq	.L4
	mov	r5, r2
	ldr	r3, [r0, #4]
	ldr	r2, [ip]
	cmp	r3, r2
	bcs	.L17
	ldr	r0, [ip, #4]
	ldr	r2, [r0, r3, lsl #2]
	add	r0, r0, r3, lsl #2
	str	r2, [r1]
	bl	sg_virt
	ldr	r2, [r4, #8]
	ldr	r3, [r4, #4]
	ldr	r1, [r2]
	ldr	r2, .L18+4
	ldr	r1, [r1]
	add	r3, r3, #1
	str	r0, [r5]
	str	r1, [sp]
	ldr	r1, [r2]
	mov	r0, r4
	ldr	r2, .L18+8
	str	r3, [r4, #4]
	bl	dbg
	mov	r0, #0
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, pc}
.L4:
	ldr	r3, .L18+12
	ldr	r0, [r3]
	rsb	r0, r0, #0
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, pc}
.L17:
	ldr	r1, .L18+16
	str	r2, [sp]
	ldr	r1, [r1]
	ldr	r2, .L18+20
	bl	dbg
	ldr	r3, .L18+24
	ldr	r0, [r3]
	rsb	r0, r0, #0
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, pc}
.L16:
	ldr	r3, .L18+12
	ldr	r0, [r3]
	rsb	r0, r0, #0
	bx	lr
.L19:
	.align	2
.L18:
	.word	XFER_NONE
	.word	dbg_sg
	.word	.LC1
	.word	EINVAL
	.word	dbg_debug
	.word	.LC0
	.word	EBUSY
	.size	get_data_buffer, .-get_data_buffer
	.comm	dbg_sg,4,4
	.comm	dbg_debug,4,4
	.comm	XFER_NONE,4,4
	.comm	EINVAL,4,4
	.comm	EBUSY,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
