// File: /workspace/github_cpp_makefile_star2_O1/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 %rbx
pushq %rax
movq %rdi, %rbx
movq 0x20(%rdi), %r14
cmpb $0x0, (%r14)
jne 0x37ac
movq %rbx, %rdi
callq 0x354c
testl %eax, %eax
je 0x38dd
movq 0x20(%rbx), %r14
cmpl $0x0, 0x8(%rbx)
je 0x37d2
leaq 0x2(%r14), %r15
movzbl -0x2(%r15), %eax
cmpl $0x2a, %eax
je 0x37c6
testl %eax, %eax
jne 0x37cd
jmp 0x382d
cmpb $0x2f, -0x1(%r15)
je 0x3839
incq %r15
jmp 0x37b6
movb (%r14), %bpl
testb %bpl, %bpl
je 0x37f9
callq 0x2370
movq (%rax), %rax
movsbq %bpl, %rcx
testb $0x20, 0x1(%rax,%rcx,2)
je 0x37f9
movb 0x1(%r14), %bpl
incq %r14
testb %bpl, %bpl
jne 0x37e2
cmpb $0x2f, %bpl
jne 0x3872
cmpb $0x2a, 0x1(%r14)
jne 0x385c
leaq 0x2(%r14), %r15
movq %r15, %rdi
callq 0x2120
leaq 0x1(%rax), %rdx
movq %r14, %rdi
movq %r15, %rsi
callq 0x22d0
movl $0x1, 0x8(%rbx)
jmp 0x3792
addq $-0x2, %r15
movq %r15, %r14
jmp 0x3792
movq %r15, %rdi
callq 0x2120
leaq 0x1(%rax), %rdx
movq %r14, %rdi
movq %r15, %rsi
callq 0x22d0
movl $0x0, 0x8(%rbx)
jmp 0x3792
cmpb $0x2f, %bpl
jne 0x3872
cmpb $0x2f, 0x1(%r14)
jne 0x3872
movb $0x0, (%r14)
jmp 0x3792
movsbl %bpl, %edi
callq 0x3741
testl %eax, %eax
jne 0x38eb
testb %bpl, %bpl
je 0x3792
movzbl %bpl, %eax
cmpl $0x22, %eax
jne 0x3924
xorl %eax, %eax
leaq 0x1(%r14), %r15
movzbl 0x1(%r14), %ecx
cmpl $0x22, %ecx
je 0x38ae
testl %ecx, %ecx
jne 0x38b9
jmp 0x3988
cmpb $0x22, 0x2(%r14)
jne 0x3988
xorl %edx, %edx
cmpb $0x22, %cl
sete %cl
jne 0x38c7
leaq 0x2(%r14), %r15
movb %cl, %dl
movb 0x1(%rdx,%r14), %cl
movq 0x30(%rbx), %rdx
movb %cl, (%rdx,%rax)
incq %rax
movq %r15, %r14
jmp 0x3897
movq 0x30(%rbx), %rax
movb $0x0, (%rax)
xorl %eax, %eax
jmp 0x39bb
movb (%r14), %bpl
testb %bpl, %bpl
je 0x39a1
xorl %r15d, %r15d
movsbl %bpl, %edi
callq 0x3741
testl %eax, %eax
je 0x391c
movq 0x30(%rbx), %rax
movb %bpl, (%rax,%r15)
movb 0x1(%r14,%r15), %bpl
incq %r15
testb %bpl, %bpl
jne 0x38fa
addq %r15, %r14
movl %r15d, %eax
jmp 0x39a3
leaq 0x1(%r14), %r15
movq 0x30(%rbx), %rax
movb %bpl, (%rax)
movq 0x30(%rbx), %rax
movb $0x0, 0x1(%rax)
movsbl 0x1(%r14), %ebp
testl %ebp, %ebp
je 0x39ae
movsbl (%r14), %esi
leaq 0xe7fc(%rip), %rdi      # 0x12147
movl $0xb, %edx
callq 0x21d0
testq %rax, %rax
je 0x39ae
leaq 0xe7e6(%rip), %rdi      # 0x12147
movl $0xb, %edx
movl %ebp, %esi
callq 0x21d0
testq %rax, %rax
je 0x39ae
addq $0x2, %r14
movq 0x30(%rbx), %rax
movb %bpl, 0x1(%rax)
movq 0x30(%rbx), %rax
movb $0x0, 0x2(%rax)
jmp 0x39ab
movq 0x30(%rbx), %rcx
movl %eax, %eax
movb $0x0, (%rcx,%rax)
leaq 0x2(%r14), %rax
cmpb $0x22, 0x1(%r14)
cmoveq %rax, %r15
jmp 0x39ae
xorl %eax, %eax
movq 0x30(%rbx), %rcx
movb $0x0, (%rcx,%rax)
movq %r14, %r15
movq %r15, 0x20(%rbx)
orb $0x2, 0x11(%rbx)
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq