	.file	"extr_hardware.c_PrintRingBufferOffset.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"PrintRingBufferOffset(): ulLinesInRingBuffer is 0\n"
	.align 8
.LC1:
	.string	"PrintRingBufferOffset(): ulLinesInRingBuffer < ulOffset+ulLines\n"
	.align 8
.LC2:
	.string	"PrintRingBufferOffset(): ulOutPos == ulInPos\n"
	.text
	.p2align 4
	.globl	PrintRingBufferOffset
	.type	PrintRingBufferOffset, @function
PrintRingBufferOffset:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	xor	eax, eax
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	rbx, rsi
	call	LinesInRingBuffer@PLT
	test	rax, rax
	je	.L16
	cmp	rax, rbp
	cmovle	rbp, rax
	lea	rdx, 0[rbp+rbx]
	cmp	rdx, rax
	jg	.L17
	mov	edi, ebx
	call	DPRINT@PLT
	mov	rax, QWORD PTR ulInPos[rip]
	sub	rax, rbx
	sub	rax, rbp
	cqo
	idiv	QWORD PTR LINES_IN_BUFFER[rip]
	mov	edi, edx
	mov	r12, rdx
	call	DPRINT@PLT
	cmp	QWORD PTR ulInPos[rip], r12
	je	.L18
	mov	rdi, QWORD PTR OUTPUT_WINDOW[rip]
	call	Home@PLT
	test	rbp, rbp
	je	.L6
	xor	ebx, ebx
	.p2align 4,,10
	.p2align 3
.L7:
	mov	rcx, QWORD PTR OUTPUT_WINDOW[rip]
	sal	rcx, 5
	add	rcx, QWORD PTR wWindow[rip]
	mov	rdi, QWORD PTR [rcx]
	add	rdi, rbx
	add	rbx, 1
	call	ClrLine@PLT
	mov	rax, QWORD PTR aBuffers[rip]
	mov	edi, DWORD PTR OUTPUT_WINDOW_UNBUFFERED[rip]
	mov	rsi, QWORD PTR [rax+r12*8]
	call	Print@PLT
	lea	rax, 1[r12]
	cqo
	idiv	QWORD PTR LINES_IN_BUFFER[rip]
	mov	r12, rdx
	cmp	rbp, rbx
	jne	.L7
.L6:
	mov	rdx, QWORD PTR ulInPos[rip]
	mov	rax, QWORD PTR aBuffers[rip]
	mov	rax, QWORD PTR [rax+rdx*8]
	cmp	BYTE PTR [rax], 58
	je	.L19
.L8:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	eax, DWORD PTR TRUE[rip]
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L17:
	.cfi_restore_state
	lea	rax, .LC1[rip]
.L14:
	lea	edi, [rax]
	call	DPRINT@PLT
	xor	eax, eax
	call	LEAVE_FUNC@PLT
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	eax, DWORD PTR FALSE[rip]
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L16:
	.cfi_restore_state
	lea	rax, .LC0[rip]
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L18:
	lea	rax, .LC2[rip]
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L19:
	mov	rax, QWORD PTR OUTPUT_WINDOW[rip]
	sal	rax, 5
	add	rax, QWORD PTR wWindow[rip]
	mov	rdi, QWORD PTR 8[rax]
	add	rdi, QWORD PTR [rax]
	sub	rdi, 1
	call	ClrLine@PLT
	mov	rax, QWORD PTR OUTPUT_WINDOW[rip]
	mov	edi, DWORD PTR OUTPUT_WINDOW_UNBUFFERED[rip]
	sal	rax, 5
	add	rax, QWORD PTR wWindow[rip]
	mov	rdx, QWORD PTR 8[rax]
	sub	rdx, 1
	mov	QWORD PTR 16[rax], rdx
	mov	rdx, QWORD PTR ulInPos[rip]
	mov	rax, QWORD PTR aBuffers[rip]
	mov	rsi, QWORD PTR [rax+rdx*8]
	call	Print@PLT
	mov	rdx, QWORD PTR ulInPos[rip]
	mov	rax, QWORD PTR aBuffers[rip]
	mov	rdi, QWORD PTR [rax+rdx*8]
	call	PICE_strlen@PLT
	mov	r8, rax
	mov	rax, QWORD PTR OUTPUT_WINDOW[rip]
	lea	rdx, 1[r8]
	sal	rax, 5
	add	rax, QWORD PTR wWindow[rip]
	mov	QWORD PTR 24[rax], rdx
	jmp	.L8
	.cfi_endproc
.LFE0:
	.size	PrintRingBufferOffset, .-PrintRingBufferOffset
	.comm	wWindow,8,8
	.comm	ulInPos,8,8
	.comm	aBuffers,8,8
	.comm	TRUE,4,4
	.comm	OUTPUT_WINDOW_UNBUFFERED,4,4
	.comm	OUTPUT_WINDOW,8,8
	.comm	LINES_IN_BUFFER,8,8
	.comm	FALSE,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_hardware.c_PrintRingBufferOffset.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"PrintRingBufferOffset(): ulLinesInRingBuffer is 0\012"
	.ascii	"\000"
	.align	2
.LC1:
	.ascii	"PrintRingBufferOffset(): ulLinesInRingBuffer < ulOf"
	.ascii	"fset+ulLines\012\000"
	.global	__aeabi_idivmod
	.align	2
.LC2:
	.ascii	"PrintRingBufferOffset(): ulOutPos == ulInPos\012\000"
	.text
	.align	2
	.global	PrintRingBufferOffset
	.syntax unified
	.arm
	.fpu softvfp
	.type	PrintRingBufferOffset, %function
PrintRingBufferOffset:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r6, r0
	mov	r4, r1
	bl	LinesInRingBuffer
	subs	r3, r0, #0
	beq	.L15
	cmp	r3, r6
	movlt	r6, r3
	add	r2, r6, r4
	cmp	r2, r3
	bgt	.L16
	ldr	r5, .L19
	mov	r0, r4
	bl	DPRINT
	ldr	r0, [r5]
	ldr	r7, .L19+4
	sub	r0, r0, r4
	ldr	r1, [r7]
	sub	r0, r0, r6
	bl	__aeabi_idivmod
	mov	r4, r1
	mov	r0, r1
	bl	DPRINT
	ldr	r3, [r5]
	cmp	r3, r4
	beq	.L17
	ldr	fp, .L19+8
	ldr	r0, [fp]
	bl	Home
	cmp	r6, #0
	ldreq	r8, .L19+12
	beq	.L6
	mov	r5, #0
	ldr	r10, .L19+16
	ldr	r8, .L19+12
	ldr	r9, .L19+20
.L7:
	ldr	r1, [fp]
	ldr	r2, [r10]
	ldr	r0, [r2, r1, lsl #4]
	add	r0, r5, r0
	bl	ClrLine
	ldr	r2, [r8]
	ldr	r0, [r9]
	ldr	r1, [r2, r4, lsl #2]
	bl	Print
	add	r0, r4, #1
	ldr	r1, [r7]
	bl	__aeabi_idivmod
	add	r5, r5, #1
	cmp	r6, r5
	mov	r4, r1
	bne	.L7
.L6:
	ldr	r3, .L19
	ldr	r2, [r3]
	ldr	r3, [r8]
	ldr	r3, [r3, r2, lsl #2]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #58
	beq	.L18
.L8:
	ldr	r3, .L19+24
	ldr	r0, [r3]
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L16:
	ldr	r0, .L19+28
	bl	DPRINT
	bl	LEAVE_FUNC
	ldr	r3, .L19+32
	ldr	r0, [r3]
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L15:
	ldr	r0, .L19+36
	bl	DPRINT
	bl	LEAVE_FUNC
	ldr	r3, .L19+32
	ldr	r0, [r3]
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L17:
	ldr	r0, .L19+40
	bl	DPRINT
	bl	LEAVE_FUNC
	ldr	r3, .L19+32
	ldr	r0, [r3]
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L18:
	ldr	r4, .L19+16
	ldr	r2, [fp]
	ldr	r3, [r4]
	ldr	r5, .L19
	add	r1, r3, r2, lsl #4
	ldr	r0, [r3, r2, lsl #4]
	ldr	r1, [r1, #4]
	add	r0, r0, r1
	sub	r0, r0, #1
	bl	ClrLine
	ldr	r2, [fp]
	ldr	r3, [r4]
	ldr	r0, [r5]
	add	r3, r3, r2, lsl #4
	ldr	r2, [r3, #4]
	ldr	r1, [r8]
	sub	r2, r2, #1
	str	r2, [r3, #8]
	ldr	r3, .L19+20
	ldr	r1, [r1, r0, lsl #2]
	ldr	r0, [r3]
	bl	Print
	ldr	r2, [r5]
	ldr	r3, [r8]
	ldr	r0, [r3, r2, lsl #2]
	bl	PICE_strlen
	ldr	r3, [r4]
	ldr	r2, [fp]
	add	r0, r0, #1
	add	r3, r3, r2, lsl #4
	str	r0, [r3, #12]
	b	.L8
.L20:
	.align	2
.L19:
	.word	ulInPos
	.word	LINES_IN_BUFFER
	.word	OUTPUT_WINDOW
	.word	aBuffers
	.word	wWindow
	.word	OUTPUT_WINDOW_UNBUFFERED
	.word	TRUE
	.word	.LC1
	.word	FALSE
	.word	.LC0
	.word	.LC2
	.size	PrintRingBufferOffset, .-PrintRingBufferOffset
	.comm	wWindow,4,4
	.comm	ulInPos,4,4
	.comm	aBuffers,4,4
	.comm	TRUE,4,4
	.comm	OUTPUT_WINDOW_UNBUFFERED,4,4
	.comm	OUTPUT_WINDOW,4,4
	.comm	LINES_IN_BUFFER,4,4
	.comm	FALSE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
