	.file	"extr_xloginsert.c_XLogRegisterBuffer.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"too many registered buffers"
	.text
	.p2align 4
	.globl	XLogRegisterBuffer
	.type	XLogRegisterBuffer, @function
XLogRegisterBuffer:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	r12d, esi
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	ebp, edx
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	movsx	rbx, edi
	mov	edi, 1
	test	DWORD PTR REGBUF_FORCE_IMAGE[rip], edx
	je	.L2
	xor	edi, edi
	test	DWORD PTR REGBUF_NO_IMAGE[rip], edx
	sete	dil
.L2:
	call	Assert@PLT
	mov	edi, DWORD PTR begininsert_called[rip]
	call	Assert@PLT
	cmp	DWORD PTR max_registered_block_id[rip], ebx
	jg	.L3
	cmp	DWORD PTR max_registered_buffers[rip], ebx
	jle	.L10
.L4:
	lea	eax, 1[rbx]
	mov	DWORD PTR max_registered_block_id[rip], eax
.L3:
	sal	rbx, 6
	add	rbx, QWORD PTR registered_buffers[rip]
	mov	edi, r12d
	lea	rcx, 8[rbx]
	lea	rsi, 24[rbx]
	mov	rdx, rbx
	call	BufferGetTag@PLT
	mov	edi, r12d
	call	BufferGetPage@PLT
	mov	DWORD PTR 16[rbx], ebp
	mov	DWORD PTR 56[rbx], eax
	lea	rax, 40[rbx]
	mov	QWORD PTR 48[rbx], rax
	mov	QWORD PTR 32[rbx], 0
	mov	DWORD PTR 20[rbx], 1
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore_state
	mov	edi, DWORD PTR ERROR[rip]
	lea	rsi, .LC0[rip]
	call	elog@PLT
	jmp	.L4
	.cfi_endproc
.LFE0:
	.size	XLogRegisterBuffer, .-XLogRegisterBuffer
	.comm	registered_buffers,8,8
	.comm	max_registered_buffers,4,4
	.comm	max_registered_block_id,4,4
	.comm	begininsert_called,4,4
	.comm	REGBUF_NO_IMAGE,4,4
	.comm	REGBUF_FORCE_IMAGE,4,4
	.comm	ERROR,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_xloginsert.c_XLogRegisterBuffer.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"too many registered buffers\000"
	.text
	.align	2
	.global	XLogRegisterBuffer
	.syntax unified
	.arm
	.fpu softvfp
	.type	XLogRegisterBuffer, %function
XLogRegisterBuffer:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, .L9
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r3, [r3]
	mov	r4, r0
	tst	r2, r3
	mov	r5, r2
	mov	r6, r1
	moveq	r0, #1
	beq	.L2
	ldr	r3, .L9+4
	ldr	r3, [r3]
	tst	r2, r3
	moveq	r0, #1
	movne	r0, #0
.L2:
	bl	Assert
	ldr	r3, .L9+8
	ldr	r7, .L9+12
	ldr	r0, [r3]
	bl	Assert
	ldr	r3, [r7]
	cmp	r3, r4
	bgt	.L3
	ldr	r3, .L9+16
	ldr	r3, [r3]
	cmp	r3, r4
	ble	.L8
.L4:
	add	r3, r4, #1
	str	r3, [r7]
.L3:
	ldr	r2, .L9+20
	add	r3, r4, r4, lsl #3
	ldr	r4, [r2]
	mov	r0, r6
	add	r4, r4, r3, lsl #2
	mov	r2, r4
	add	r3, r4, #4
	add	r1, r4, #16
	bl	BufferGetTag
	mov	r0, r6
	bl	BufferGetPage
	mov	r2, #0
	mov	r3, #1
	add	r1, r4, #24
	str	r0, [r4, #32]
	str	r5, [r4, #8]
	str	r1, [r4, #28]
	str	r2, [r4, #20]
	str	r3, [r4, #12]
	pop	{r4, r5, r6, r7, r8, pc}
.L8:
	ldr	r3, .L9+24
	ldr	r1, .L9+28
	ldr	r0, [r3]
	bl	elog
	b	.L4
.L10:
	.align	2
.L9:
	.word	REGBUF_FORCE_IMAGE
	.word	REGBUF_NO_IMAGE
	.word	begininsert_called
	.word	max_registered_block_id
	.word	max_registered_buffers
	.word	registered_buffers
	.word	ERROR
	.word	.LC0
	.size	XLogRegisterBuffer, .-XLogRegisterBuffer
	.comm	registered_buffers,4,4
	.comm	max_registered_buffers,4,4
	.comm	max_registered_block_id,4,4
	.comm	begininsert_called,4,4
	.comm	REGBUF_NO_IMAGE,4,4
	.comm	REGBUF_FORCE_IMAGE,4,4
	.comm	ERROR,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
