	.file	"extr_runner-win.c_process_read_last_line.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	process_read_last_line
	.type	process_read_last_line, @function
process_read_last_line:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	mov	r13, rdi
	xor	edi, edi
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	rbx, rdx
	sub	rsp, 32
	.cfi_def_cfa_offset 80
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	test	rdx, rdx
	setne	dil
	call	ASSERT@PLT
	mov	edi, DWORD PTR 0[r13]
	xor	esi, esi
	call	GetFileSize@PLT
	cmp	QWORD PTR INVALID_FILE_SIZE[rip], rax
	je	.L6
	mov	r12, rax
	test	rax, rax
	jne	.L4
	mov	BYTE PTR 0[rbp], 0
	mov	eax, 1
.L1:
	mov	rsi, QWORD PTR 24[rsp]
	xor	rsi, QWORD PTR fs:40
	jne	.L21
	add	rsp, 32
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	pop	rbx
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	.cfi_restore_state
	lea	r14, 16[rsp]
	xor	esi, esi
	mov	edx, 8
	mov	rdi, r14
	call	memset@PLT
	cmp	rbx, r12
	jbe	.L22
.L5:
	mov	edi, DWORD PTR 0[r13]
	lea	rcx, 8[rsp]
	lea	rdx, -1[rbx]
	mov	r8, r14
	mov	rsi, rbp
	call	ReadFile@PLT
	test	eax, eax
	je	.L6
	mov	rdx, QWORD PTR 8[rsp]
	lea	rbx, -1[rdx]
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L9:
	movzx	eax, BYTE PTR 0[rbp+rbx]
	lea	rcx, -1[rbx]
	cmp	al, 10
	je	.L8
	cmp	al, 13
	je	.L8
	mov	rbx, rcx
.L7:
	cmp	rbx, -1
	jne	.L9
.L10:
	sub	rdx, rbx
	lea	rsi, 0[rbp+rbx]
	mov	rdi, rbp
	call	memmove@PLT
	mov	rdx, QWORD PTR 8[rsp]
	sub	rdx, rbx
.L11:
	mov	BYTE PTR 0[rbp+rdx], 0
	xor	eax, eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L6:
	mov	eax, -1
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L22:
	mov	rax, rbx
	not	rax
	add	r12, rax
	mov	QWORD PTR 16[rsp], r12
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L8:
	test	rbx, rbx
	je	.L11
	jmp	.L10
.L21:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	process_read_last_line, .-process_read_last_line
	.comm	INVALID_FILE_SIZE,8,8
	.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_runner-win.c_process_read_last_line.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	process_read_last_line
	.syntax unified
	.arm
	.fpu softvfp
	.type	process_read_last_line, %function
process_read_last_line:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r6, r0
	ldr	r3, .L23
	subs	r0, r2, #0
	movne	r0, #1
	sub	sp, sp, #24
	ldr	r3, [r3]
	str	r3, [sp, #20]
	mov	r3,#0
	mov	r4, r1
	mov	r5, r2
	bl	ASSERT
	mov	r1, #0
	ldr	r0, [r6]
	bl	GetFileSize
	ldr	r3, .L23+4
	ldr	r3, [r3]
	cmp	r3, r0
	beq	.L6
	cmp	r0, #0
	strbeq	r0, [r4]
	moveq	r0, #1
	bne	.L21
.L1:
	ldr	r3, .L23
	ldr	r2, [r3]
	ldr	r3, [sp, #20]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L22
	add	sp, sp, #24
	@ sp needed
	pop	{r4, r5, r6, pc}
.L21:
	mov	r3, #0
	cmp	r5, r0
	str	r3, [sp, #16]
	mvnls	r3, r5
	addls	r0, r3, r0
	add	r3, sp, #16
	strls	r0, [sp, #16]
	mov	r1, r4
	ldr	r0, [r6]
	sub	r2, r5, #1
	str	r3, [sp]
	add	r3, sp, #12
	bl	ReadFile
	cmp	r0, #0
	beq	.L6
	ldr	r5, [sp, #12]
	mvn	ip, r4
	add	r3, r4, r5
	b	.L7
.L9:
	ldrb	r0, [r3, #-1]!	@ zero_extendqisi2
	cmp	r0, #13
	cmpne	r0, #10
	beq	.L8
.L7:
	cmp	r4, r3
	add	r1, ip, r3
	bne	.L9
	mvn	r1, #0
.L10:
	sub	r5, r5, r1
	mov	r2, r5
	mov	r0, r4
	add	r1, r4, r1
	bl	memmove
.L11:
	mov	r3, #0
	mov	r0, r3
	strb	r3, [r4, r5]
	b	.L1
.L6:
	mvn	r0, #0
	b	.L1
.L8:
	cmp	r1, #0
	beq	.L11
	b	.L10
.L22:
	bl	__stack_chk_fail
.L24:
	.align	2
.L23:
	.word	.LC0
	.word	INVALID_FILE_SIZE
	.size	process_read_last_line, .-process_read_last_line
	.comm	INVALID_FILE_SIZE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
