// File: /workspace/github_c_makefile_star2_O3/rikuu[P]kermit/marker.c
// Function: marker_read
int marker_read(marker_file_t *pf, marker_rec_t *r)
{
	int ret, dret;
file_read_more:
	ret = ks_getuntil((kstream_t*)pf->fp, KS_SEP_LINE, &pf->buf, &dret);
	if (ret < 0) return ret;
	ret = marker_parse(pf->buf.l, pf->buf.s, r);
	if (ret < 0) goto file_read_more;
	return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, 0x8(%rsp)
movq %rdi, %r14
movq (%r14), %r12
movq $0x0, 0x8(%r14)
movl (%r12), %ecx
movl 0x4(%r12), %eax
cmpl %eax, %ecx
jl 0x8d58
testb $0x3, 0x8(%r12)
jne 0x8f6b
cmpl %eax, %ecx
jl 0x8dad
movl 0x8(%r12), %edx
testb $0x3, %dl
jne 0x8e7f
movl $0x0, (%r12)
movq 0x10(%r12), %rdi
movq 0x18(%r12), %rsi
sarl $0x2, %edx
callq 0x1110
movl %eax, 0x4(%r12)
movl 0x8(%r12), %ecx
movl %ecx, %edx
sarl $0x2, %edx
cmpl %edx, %eax
jge 0x8da1
andl $-0x4, %ecx
incl %ecx
movl %ecx, 0x8(%r12)
testl %eax, %eax
je 0x8e7f
movl (%r12), %ecx
movl %ecx, %r13d
cmpl %eax, %ecx
jge 0x8dd2
movslq %ecx, %rdx
addq 0x18(%r12), %rdx
movl %ecx, %r13d
cmpb $0xa, (%rdx)
je 0x8dd2
incl %r13d
incq %rdx
cmpl %r13d, %eax
jne 0x8dbf
movl %eax, %r13d
movq 0x8(%r14), %rdi
movq 0x10(%r14), %rsi
subq %rdi, %rsi
movl %r13d, %edx
subl %ecx, %edx
leal 0x1(%rdx), %eax
movslq %eax, %r8
movq 0x18(%r14), %rax
cmpq %r8, %rsi
jae 0x8e48
movslq %edx, %rcx
addq %rcx, %rdi
movq %rdi, %rcx
shrq %rcx
orq %rdi, %rcx
movq %rcx, %rdx
shrq $0x2, %rdx
orq %rcx, %rdx
movq %rdx, %rcx
shrq $0x4, %rcx
orq %rdx, %rcx
movq %rcx, %rdx
shrq $0x8, %rdx
orq %rcx, %rdx
movq %rdx, %rsi
shrq $0x10, %rsi
orq %rdx, %rsi
incq %rsi
movq %rsi, 0x10(%r14)
movq %rax, %rdi
callq 0x1180
movq %rax, 0x18(%r14)
movq 0x8(%r14), %rdi
movl (%r12), %ecx
movl %r13d, %edx
subl %ecx, %edx
addq %rax, %rdi
movslq %ecx, %rsi
addq 0x18(%r12), %rsi
movslq %edx, %rdx
callq 0x1140
movslq (%r12), %rax
movslq %r13d, %rcx
subq %rax, %rcx
addq %rcx, 0x8(%r14)
leal 0x1(%r13), %ecx
movl %ecx, (%r12)
movl 0x4(%r12), %eax
cmpl %eax, %r13d
jge 0x8d58
movq 0x18(%r14), %rax
testq %rax, %rax
je 0x8ea2
movq 0x8(%r14), %rcx
cmpq $0x2, %rcx
jb 0x8ec1
cmpb $0xd, -0x1(%rax,%rcx)
jne 0x8ec1
decq %rcx
movq %rcx, 0x8(%r14)
jmp 0x8ec1
movq $0x1, 0x10(%r14)
movl $0x1, %edi
movl $0x1, %esi
callq 0x10f0
movq %rax, 0x18(%r14)
movq 0x8(%r14), %rcx
movb $0x0, (%rax,%rcx)
movq 0x8(%r14), %r12
testl %r12d, %r12d
js 0x8f71
movq 0x18(%r14), %rdi
movl %r12d, %r13d
andl $0x7fffffff, %r13d      # imm = 0x7FFFFFFF
incl %r12d
leaq 0x1(%rdi), %rbp
xorl %r15d, %r15d
xorl %ebx, %ebx
cmpq %r13, %r15
jae 0x8ef7
cmpb $0x9, -0x1(%rbp)
jne 0x8f52
movb $0x0, -0x1(%rbp)
cmpl $0x2, %ebx
je 0x8f2c
cmpl $0x1, %ebx
je 0x8f13
testl %ebx, %ebx
jne 0x8f44
movq 0x8(%rsp), %rax
movq %rdi, (%rax)
jmp 0x8f44
leaq 0x10(%rsp), %rsi
movl $0xa, %edx
callq 0x1130
movq 0x8(%rsp), %rcx
movl %eax, 0x8(%rcx)
jmp 0x8f44
leaq 0x10(%rsp), %rsi
movl $0xa, %edx
callq 0x1130
movq 0x8(%rsp), %rcx
movw %ax, 0xc(%rcx)
incl %ebx
cmpq %r13, %r15
movl $0x0, %edi
cmovbq %rbp, %rdi
incq %r15
incq %rbp
cmpq %r15, %r12
jne 0x8eec
cmpl $0x2, %ebx
jl 0x8d34
xorl %r12d, %r12d
jmp 0x8f71
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
movl %r12d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop