// File: /workspace/github_cpp_makefile_star2_O2/corecodec[P]coremake/coremake.c
// Function: reader_read
int reader_read(reader* p)
{
	char* s = p->pos;
	for (;;)
	{
		if (!*s)
		{
			if (!reader_line(p))
			{
				p->token[0] = 0;
				return 0;
			}
			s = p->pos;
		}

		if (p->r.comment)
		{
			char* s0 = s;
			for (;*s;++s)
				if (s[0]=='*' && s[1]=='/')
				{
					s = strdel(s0,s+2);
					p->r.comment = 0;
					break;
				}
		}
		else
		{
			while (*s && isspace(*s))
				++s;

			if (s[0]=='/' && s[1]=='*')
			{
				s = strdel(s,s+2);
				p->r.comment = 1;
			}
			else
			if (s[0]=='/' && s[1]=='/')
				*s = 0;
			else
			if (isname(*s))
			{
				int i;
				for (i=0;*s && isname(*s);++s,++i)
					p->token[i] = *s;
				p->token[i] = 0;
				break;
			}
			else
			if (*s=='"')
			{
				int i;
				++s;
				for (i=0;*s && (s[0]!='"' || s[1]=='"');++s,++i)
                {
                    if (s[0]=='"')
                        ++s;
					p->token[i] = *s;
                }
				p->token[i] = 0;
				if (*s=='"')
					++s;
				break;
			}
			else
			if (*s)
			{
				p->token[0] = *(s++);
				p->token[1] = 0;

				if (*s && iscond(s[-1]) && iscond(*s))
				{
					p->token[1] = *(s++);
					p->token[2] = 0;
				}
				break;
			}
		}
	}

	p->pos = s;
	p->r.flags |= FLAG_READY;
	return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq 0x20(%rdi), %r14
cmpb $0x0, (%r14)
jne 0x34df
movq %rbx, %rdi
callq 0x32c0
testl %eax, %eax
je 0x35df
movq 0x20(%rbx), %r14
cmpl $0x0, 0x8(%rbx)
movq %r14, %rsi
je 0x3504
movzbl (%rsi), %eax
cmpl $0x2a, %eax
je 0x34f6
testl %eax, %eax
jne 0x34fc
jmp 0x354a
cmpb $0x2f, 0x1(%rsi)
je 0x3570
incq %rsi
jmp 0x34e8
incq %r14
movsbq (%r14), %r15
testq %r15, %r15
je 0x3552
callq 0x2360
movq (%rax), %rax
testb $0x20, 0x1(%rax,%r15,2)
jne 0x3501
cmpb $0x2f, %r15b
jne 0x3552
movzbl 0x1(%r14), %eax
cmpl $0x2f, %eax
je 0x3585
cmpl $0x2a, %eax
jne 0x3552
leaq 0x2(%r14), %rsi
movq %r14, %rdi
callq 0x33a5
movl $0x1, 0x8(%rbx)
jmp 0x34c5
movq %rsi, %r14
jmp 0x34c5
movl %r15d, %edi
callq 0x3476
testl %eax, %eax
jne 0x35ed
movzbl %r15b, %eax
testl %eax, %eax
je 0x34c5
jmp 0x358e
addq $0x2, %rsi
movq %r14, %rdi
callq 0x33a5
andl $0x0, 0x8(%rbx)
jmp 0x34c5
movb $0x0, (%r14)
jmp 0x34c5
cmpl $0x22, %eax
jne 0x3627
xorl %eax, %eax
leaq 0x1(%r14), %r12
movzbl 0x1(%r14), %ecx
cmpl $0x22, %ecx
je 0x35b0
testl %ecx, %ecx
jne 0x35bb
jmp 0x3671
cmpb $0x22, 0x2(%r14)
jne 0x3671
xorl %edx, %edx
cmpb $0x22, %cl
sete %cl
jne 0x35c9
leaq 0x2(%r14), %r12
movb %cl, %dl
movb 0x1(%rdx,%r14), %cl
movq 0x30(%rbx), %rdx
movb %cl, (%rdx,%rax)
incq %rax
movq %r12, %r14
jmp 0x3599
movq 0x30(%rbx), %rax
movb $0x0, (%rax)
xorl %eax, %eax
jmp 0x3693
xorl %r12d, %r12d
testb %r15b, %r15b
je 0x3614
movsbl %r15b, %edi
callq 0x3476
testl %eax, %eax
je 0x3614
movq 0x30(%rbx), %rax
movb %r15b, (%rax,%r12)
movb 0x1(%r14,%r12), %r15b
incq %r12
jmp 0x35f0
movq 0x30(%rbx), %rax
movl %r12d, %ecx
movb $0x0, (%rax,%rcx)
addq %r12, %r14
movq %r14, %r12
jmp 0x3688
leaq 0x1(%r14), %r12
movq 0x30(%rbx), %rax
movb %r15b, (%rax)
movq 0x30(%rbx), %rax
movb $0x0, 0x1(%rax)
movsbl 0x1(%r14), %ebp
testl %ebp, %ebp
je 0x3688
movsbl (%r14), %edi
callq 0x3458
testl %eax, %eax
je 0x3688
movl %ebp, %edi
callq 0x3458
testl %eax, %eax
je 0x3688
addq $0x2, %r14
movq 0x30(%rbx), %rax
movb %bpl, 0x1(%rax)
movq 0x30(%rbx), %rax
movb $0x0, 0x2(%rax)
jmp 0x3622
movq 0x30(%rbx), %rcx
movl %eax, %eax
movb $0x0, (%rcx,%rax)
leaq 0x2(%r14), %rax
cmpb $0x22, 0x1(%r14)
cmoveq %rax, %r12
movq %r12, 0x20(%rbx)
orb $0x2, 0x11(%rbx)
pushq $0x1
popq %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq