	.file	"extr_bufmgr.c_ReleaseBuffer.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"bad buffer ID: %d"
	.text
	.p2align 4
	.globl	ReleaseBuffer
	.type	ReleaseBuffer, @function
ReleaseBuffer:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	mov	ebx, edi
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	call	BufferIsValid@PLT
	test	eax, eax
	je	.L8
.L2:
	mov	edi, ebx
	call	BufferIsLocal@PLT
	test	rax, rax
	jne	.L9
	lea	edi, -1[rbx]
	call	GetBufferDescriptor@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	esi, 1
	pop	rbx
	.cfi_def_cfa_offset 16
	mov	edi, eax
	pop	rbp
	.cfi_def_cfa_offset 8
	jmp	UnpinBuffer@PLT
	.p2align 4,,10
	.p2align 3
.L9:
	.cfi_restore_state
	mov	edi, DWORD PTR CurrentResourceOwner[rip]
	mov	esi, ebx
	neg	ebx
	movsx	rbx, ebx
	call	ResourceOwnerForgetBuffer@PLT
	mov	rax, QWORD PTR LocalRefCount[rip]
	sal	rbx, 3
	xor	edi, edi
	lea	rbp, -8[rbx]
	cmp	QWORD PTR -8[rax+rbx], 0
	setg	dil
	call	Assert@PLT
	mov	rax, QWORD PTR LocalRefCount[rip]
	add	rax, rbp
	sub	QWORD PTR [rax], 1
	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
	ret
	.p2align 4,,10
	.p2align 3
.L8:
	.cfi_restore_state
	mov	edi, DWORD PTR ERROR[rip]
	mov	edx, ebx
	lea	rsi, .LC0[rip]
	call	elog@PLT
	jmp	.L2
	.cfi_endproc
.LFE0:
	.size	ReleaseBuffer, .-ReleaseBuffer
	.comm	LocalRefCount,8,8
	.comm	ERROR,4,4
	.comm	CurrentResourceOwner,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_bufmgr.c_ReleaseBuffer.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"bad buffer ID: %d\000"
	.text
	.align	2
	.global	ReleaseBuffer
	.syntax unified
	.arm
	.fpu softvfp
	.type	ReleaseBuffer, %function
ReleaseBuffer:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r4, r0
	bl	BufferIsValid
	cmp	r0, #0
	beq	.L8
.L2:
	mov	r0, r4
	bl	BufferIsLocal
	cmp	r0, #0
	bne	.L9
	sub	r0, r4, #1
	bl	GetBufferDescriptor
	pop	{r4, r5, r6, lr}
	mov	r1, #1
	b	UnpinBuffer
.L9:
	mov	r1, r4
	lsl	r4, r4, #2
	eor	r4, r4, #3
	mvn	r4, r4
	ldr	r3, .L10
	ldr	r5, .L10+4
	ldr	r0, [r3]
	bl	ResourceOwnerForgetBuffer
	ldr	r3, [r5]
	ldr	r0, [r3, r4]
	cmp	r0, #0
	movle	r0, #0
	movgt	r0, #1
	bl	Assert
	ldr	r2, [r5]
	ldr	r3, [r2, r4]
	sub	r3, r3, #1
	str	r3, [r2, r4]
	pop	{r4, r5, r6, pc}
.L8:
	ldr	r3, .L10+8
	mov	r2, r4
	ldr	r0, [r3]
	ldr	r1, .L10+12
	bl	elog
	b	.L2
.L11:
	.align	2
.L10:
	.word	CurrentResourceOwner
	.word	LocalRefCount
	.word	ERROR
	.word	.LC0
	.size	ReleaseBuffer, .-ReleaseBuffer
	.comm	LocalRefCount,4,4
	.comm	ERROR,4,4
	.comm	CurrentResourceOwner,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
