// File: /workspace/github_cpp_makefile_star2_O1/rofl0r[P]ascc/tokenizer.c
// Function: tokenizer_next_real
int tokenizer_next_real(struct tokenizer *t, struct token* out) {
	char *s = t->buf;
	out->value = 0;
	int c = 0;
	if(t->peeking) {
		*out = t->peek_token;
		t->peeking = 0;
		return 1;
	}
	while(1) {
		c = tokenizer_getc(t);
		if(c == EOF) break;

		/* components of multi-line comment marker might be terminals themselves */
		if(sequence_follows(t, c, t->marker[MT_MULTILINE_COMMENT_START])) {
			ignore_until(t, t->marker[MT_MULTILINE_COMMENT_END], strlen(t->marker[MT_MULTILINE_COMMENT_START]));
			continue;
		}
		if(sequence_follows(t, c, t->marker[MT_SINGLELINE_COMMENT_START])) {
			ignore_until(t, "\n", strlen(t->marker[MT_SINGLELINE_COMMENT_START]));
			continue;
		}
		if(is_sep(c)) {
			if(s != t->buf && c == '\\' && !isspace(s[-1])) {
				c = tokenizer_getc(t);
				if(c == '\n') continue;
				tokenizer_ungetc(t, c);
				c = '\\';
			} else if(is_plus_or_minus(c) && s > t->buf+1 &&
				  (s[-1] == 'E' || s[-1] == 'e') && is_valid_float_until(t->buf, s-1)) {
				goto process_char;
			} else if(c == '.' && s != t->buf && is_valid_float_until(t->buf, s) == 1) {
				goto process_char;
			} else if(c == '.' && s == t->buf) {
				int jump = 0;
				c = tokenizer_getc(t);
				if(isdigit(c)) jump = 1;
				tokenizer_ungetc(t, c);
				c = '.';
				if(jump) goto process_char;
			}
			tokenizer_ungetc(t, c);
			break;
		}
		if((t->flags & TF_PARSE_WIDE_STRINGS) && s == t->buf && c == 'L') {
			c = tokenizer_getc(t);
			tokenizer_ungetc(t, c);
			tokenizer_ungetc(t, 'L');
			if(c == '\'' || c == '\"') break;
		}

process_char:;
		s = assign_bufchar(t, s, c);
		if(t->column + 1 >= MAX_TOK_LEN) {
			out->type = TT_OVERFLOW;
			return apply_coords(t, out, s, 0);
		}
	}
	if(s == t->buf) {
		if(c == EOF) {
			out->type = TT_EOF;
			return apply_coords(t, out, s, 1);
		}

		int wide = 0;
		c = tokenizer_getc(t);
		if((t->flags & TF_PARSE_WIDE_STRINGS) && c == 'L') {
			c = tokenizer_getc(t);
			assert(c == '\'' || c == '\"');
			wide = 1;
			goto string_handling;
		} else if (c == '.' && sequence_follows(t, c, "...")) {
			strcpy(t->buf, "...");
			out->type = TT_ELLIPSIS;
			return apply_coords(t, out, s+3, 1);
		}

		{
			int i;
			for(i = 0; i < t->custom_count; i++)
				if(sequence_follows(t, c, t->custom_tokens[i])) {
					const char *p = t->custom_tokens[i];
					while(*p) {
						s = assign_bufchar(t, s, *p);
						p++;
					}
					*s = 0;
					out->type = TT_CUSTOM + i;
					return apply_coords(t, out, s, 1);
				}
		}

string_handling:
		s = assign_bufchar(t, s, c);
		*s = 0;
		//s = assign_bufchar(t, s, 0);
		if(c == '"' || c == '\'')
			if(t->flags & TF_PARSE_STRINGS) return get_string(t, c, out, wide);
		out->type = TT_SEP;
		out->value = c;
		if(c == '\n') {
			apply_coords(t, out, s, 1);
			t->line++;
			t->column=0;
			return 1;
		}
		return apply_coords(t, out, s, 1);
	}
	//s = assign_bufchar(t, s, 0);
	*s = 0;
	out->type = categorize(t->buf);
	return apply_coords(t, out, s, out->type != TT_UNKNOWN);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movl $0x0, 0xc(%rsi)
cmpl $0x0, 0x18(%rdi)
je 0x17f6c
movups 0x1178(%r14), %xmm0
movups %xmm0, (%rbx)
movl $0x0, 0x18(%r14)
movl $0x1, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x120(%r14), %rax
movq %rax, 0x10(%rsp)
movl $0x120, %ecx            # imm = 0x120
leaq 0x5263(%rip), %r13      # 0x1d1e7
movq %rcx, 0x18(%rsp)
leaq (%r14,%rcx), %r12
movq %r14, %rdi
callq 0x17b5e
movl %eax, %r15d
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
cmpl $-0x1, %eax
je 0x18204
movq 0x1160(%r14), %rdx
movq %r14, %rdi
movl %r15d, %esi
callq 0x17e30
testl %eax, %eax
je 0x17fd7
movq 0x1160(%r14), %rdi
movq 0x1168(%r14), %r15
callq 0x31a0
movq %r14, %rdi
movq %r15, %rsi
jmp 0x17fff
movq 0x1158(%r14), %rdx
movq %r14, %rdi
movl %r15d, %esi
callq 0x17e30
testl %eax, %eax
je 0x18013
movq 0x1158(%r14), %rdi
callq 0x31a0
movq %r14, %rdi
movq %r13, %rsi
movl %eax, %edx
callq 0x17ecb
movq %r14, %rdi
callq 0x17b5e
movl %eax, %r15d
jmp 0x17f9d
testb %r15b, %r15b
js 0x18068
movslq %r15d, %rax
leaq 0x559e(%rip), %rcx      # 0x1d5c0
cmpb $0x0, (%rax,%rcx)
je 0x18068
cmpq $0x120, 0x18(%rsp)      # imm = 0x120
je 0x180d1
cmpl $0x5c, %r15d
jne 0x180d1
callq 0x3340
movq (%rax), %rax
movsbq -0x1(%r12), %rcx
testb $0x20, 0x1(%rax,%rcx,2)
jne 0x180d1
movq %r14, %rdi
callq 0x17b5e
cmpl $0xa, %eax
je 0x18006
jmp 0x183e9
testb $0x2, 0x10(%r14)
movq 0x18(%rsp), %rsi
je 0x18119
cmpq $0x120, %rsi            # imm = 0x120
setne %al
cmpl $0x4c, %r15d
setne %cl
orb %al, %cl
movl %r15d, %ebp
jne 0x181aa
movq %r14, %rdi
callq 0x17b5e
movl %eax, %ebp
movq %r14, %rdi
movl %eax, %esi
callq 0x17bab
movq %r14, %rdi
movl $0x4c, %esi
callq 0x17bab
cmpl $0x22, %ebp
je 0x18204
cmpl $0x27, %ebp
movq 0x18(%rsp), %rsi
jne 0x181aa
jmp 0x18209
leal -0x2b(%r15), %eax
testl $0xfffffffd, %eax       # imm = 0xFFFFFFFD
sete %al
movq 0x18(%rsp), %rsi
cmpq $0x122, %rsi            # imm = 0x122
setae %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x18121
movzbl -0x1(%r12), %eax
orl $0x20, %eax
cmpl $0x65, %eax
jne 0x18121
leaq -0x1(%r12), %rsi
movq 0x10(%rsp), %rdi
callq 0x18882
movq 0x18(%rsp), %rsi
testl %eax, %eax
je 0x18121
movl %r15d, %ebp
jmp 0x181aa
cmpq $0x120, %rsi            # imm = 0x120
sete %al
cmpl $0x2e, %r15d
setne %cl
orb %al, %cl
jne 0x18152
movq 0x10(%rsp), %rdi
movq %r12, %rsi
callq 0x18882
movq 0x18(%rsp), %rsi
movl $0x2e, %ebp
cmpl $0x1, %eax
je 0x181aa
cmpl $0x2e, %r15d
jne 0x183f9
cmpq $0x120, %rsi            # imm = 0x120
jne 0x18877
movq %r14, %rdi
callq 0x17b5e
movl %eax, %ebp
callq 0x3340
movq (%rax), %rax
movslq %ebp, %rsi
movq %rbx, %r15
movzwl (%rax,%rsi,2), %ebx
movq %r14, %rdi
callq 0x17bab
movq 0x18(%rsp), %rsi
btl $0xb, %ebx
movq %r15, %rbx
movl $0x2e, %r15d
movl $0x2e, %ebp
jae 0x183f9
incl 0xc(%r14)
movb %bpl, (%r14,%rsi)
leaq 0x1(%rsi), %rcx
movl 0xc(%r14), %eax
leal -0xfff(%rax), %edx
cmpl $0xfffff000, %edx       # imm = 0xFFFFF000
jae 0x17f84
movl $0xb, (%rbx)
movl 0x8(%r14), %ecx
movl %ecx, 0x4(%rbx)
subl %esi, %eax
addl $0x11f, %eax            # imm = 0x11F
movl %eax, 0x8(%rbx)
addq $-0x11e, %rsi           # imm = 0xFEE2
xorl %eax, %eax
cmpq 0x1120(%r14), %rsi
jb 0x17f5d
movl $0xb, (%rbx)
jmp 0x17f5d
movq 0x18(%rsp), %rsi
cmpq $0x120, %rsi            # imm = 0x120
jne 0x1827c
cmpl $-0x1, %ebp
je 0x18326
movq %r14, %rdi
callq 0x17b5e
movl %eax, %ebp
movb 0x10(%r14), %al
shrb %al
cmpl $0x4c, %ebp
sete %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x18358
movq %r14, %rdi
callq 0x17b5e
movl %eax, %ebp
movl $0x1, %ecx
cmpl $0x22, %eax
je 0x187d4
cmpl $0x27, %ebp
je 0x187d4
leaq 0x5223(%rip), %rdi      # 0x1d487
leaq 0x50fa(%rip), %rsi      # 0x1d365
leaq 0x522c(%rip), %rcx      # 0x1d49e
movl $0x1de, %edx            # imm = 0x1DE
callq 0x3240
movb $0x0, (%r12)
movq 0x10(%rsp), %rbp
movb (%rbp), %al
xorl %esi, %esi
movb %al, (%rsp)
cmpb $0x2d, %al
sete %sil
movb (%rbp,%rsi), %r13b
cmpb $0x30, %r13b
jne 0x1843f
movzbl 0x1(%rbp,%rsi), %eax
orl $0x20, %eax
cmpl $0x78, %eax
jne 0x1843f
movq %rbx, 0x20(%rsp)
movb 0x2(%rbp,%rsi), %bl
movl $0x5, %edx
testb %bl, %bl
je 0x18566
movq %rsi, %r15
callq 0x30c0
movq (%rax), %rbp
movq %r15, 0x8(%rsp)
addq %r14, %r15
addq $0x122, %r15            # imm = 0x122
xorl %r12d, %r12d
movsbq %bl, %rax
movl (%rbp,%rax,4), %esi
movl $0x11, %edx
leaq 0x5296(%rip), %rdi      # 0x1d591
callq 0x3380
testq %rax, %rax
je 0x18411
movb 0x1(%r15), %bl
incq %r15
decq %r12
testb %bl, %bl
jne 0x182e7
movq 0x20(%rsp), %rbx
movl $0x5, %edx
jmp 0x186f6
movl $0xe, (%rbx)
movl 0x8(%r14), %eax
movl %eax, 0x4(%rbx)
movl 0xc(%r14), %eax
movl %eax, 0x8(%rbx)
addq $-0x11f, %rsi           # imm = 0xFEE1
movl $0x1, %eax
cmpq 0x1120(%r14), %rsi
jb 0x17f5d
jmp 0x1886a
cmpl $0x2e, %ebp
jne 0x183ba
leaq 0x471d(%rip), %rdx      # 0x1ca81
movq %r14, %rdi
movl $0x2e, %esi
callq 0x17e30
testl %eax, %eax
je 0x183ba
movl $0x2e2e2e, 0x120(%r14) # imm = 0x2E2E2E
movl $0x4, (%rbx)
movl 0x8(%r14), %eax
movl %eax, 0x4(%rbx)
subq 0x10(%rsp), %r12
movl 0xc(%r14), %eax
subl %r12d, %eax
addl $-0x3, %eax
movl %eax, 0x8(%rbx)
addq $0x4, %r12
movl $0x1, %eax
cmpq 0x1120(%r14), %r12
jb 0x17f5d
jmp 0x1886a
movq %rbx, %r13
cmpl $0x0, 0x14(%r14)
setg %bl
jle 0x187c7
movq 0x20(%r14), %rdx
movq %r14, %rdi
movl %ebp, %esi
callq 0x17e30
testl %eax, %eax
je 0x18736
xorl %r15d, %r15d
jmp 0x1875e
movq %r14, %rdi
movl %eax, %esi
callq 0x17bab
movl $0x5c, %r15d
movq %r14, %rdi
movl %r15d, %esi
callq 0x17bab
movq 0x18(%rsp), %rsi
movl %r15d, %ebp
jmp 0x18209
testq %r12, %r12
movq 0x20(%rsp), %rbx
movq 0x10(%rsp), %rbp
movq 0x8(%rsp), %rsi
je 0x1843f
movq %r15, %rdi
callq 0x18c2d
movq 0x8(%rsp), %rsi
movl $0x5, %edx
testl %eax, %eax
jne 0x186f6
movb (%rsp), %cl
addb $-0x2b, %cl
xorl %r12d, %r12d
testb $-0x3, %cl
setne %al
sete %r12b
movzbl (%rbp,%r12), %r15d
movl $0x7, %edx
testl %r15d, %r15d
je 0x186f6
movb %al, 0x7(%rsp)
cmpl $0x30, %r15d
movb %cl, (%rsp)
movq %rsi, 0x8(%rsp)
jne 0x184b7
movq %rbp, %rax
movq %rbx, %rbp
movsbq 0x1(%rax,%r12), %rbx
testq %rbx, %rbx
je 0x186b6
callq 0x3340
movq 0x8(%rsp), %rsi
movl $0x7, %edx
movq (%rax), %rax
testb $0x8, 0x1(%rax,%rbx,2)
movq %rbp, %rbx
movq 0x10(%rsp), %rbp
jne 0x18523
testb %r15b, %r15b
je 0x186f6
callq 0x3340
movq 0x8(%rsp), %rsi
movl $0x7, %edx
movq (%rax), %rax
leaq (%r12,%r14), %rdi
addq $0x120, %rdi            # imm = 0x120
movsbq %r15b, %rcx
testb $0x8, 0x1(%rax,%rcx,2)
je 0x184f3
incq %r12
movb 0x1(%rdi), %r15b
incq %rdi
testb %r15b, %r15b
jne 0x184d4
jmp 0x186f6
testq %r12, %r12
sete %al
cmpq $0x2, %r12
setb %cl
movb 0x7(%rsp), %dl
notb %dl
andb %cl, %dl
orb %al, %dl
jne 0x18523
callq 0x18c2d
movq 0x8(%rsp), %rsi
movl $0x7, %edx
testl %eax, %eax
jne 0x186f6
movq %rbx, 0x20(%rsp)
cmpb $0x30, %r13b
jne 0x18570
leaq (%rsi,%r14), %rbx
addq $0x121, %rbx            # imm = 0x121
leaq 0x5069(%rip), %r15      # 0x1d5a9
movsbl %r13b, %esi
movl $0x9, %edx
movq %r15, %rdi
callq 0x3380
testq %rax, %rax
je 0x18570
movb (%rbx), %r13b
incq %rbx
testb %r13b, %r13b
jne 0x18540
movl $0x6, %edx
movq 0x20(%rsp), %rbx
jmp 0x186f6
movb (%rsp), %al
andb $-0x3, %al
cmpb $0x1, %al
movq %rbp, %r12
adcq $0x0, %r12
xorl %r15d, %r15d
movl $0x0, 0x8(%rsp)
movl $0x0, (%rsp)
movsbq (%r12), %rbx
testq %rbx, %rbx
je 0x186bb
movl %eax, %r13d
callq 0x30c0
cmpb $0x2e, %bl
jne 0x185cb
xorl %eax, %eax
movl %r15d, %ecx
movl $0x0, %edx
cmpl $0x0, (%rsp)
movl $0x1, (%rsp)
jne 0x1867b
jmp 0x18659
movq (%rax), %rax
movl (%rax,%rbx,4), %ebp
cmpl $0x66, %ebp
jne 0x1860d
cmpb $0x0, 0x1(%r12)
movq 0x10(%rsp), %rbp
jne 0x18677
movl (%rsp), %eax
orl %r15d, %eax
setne %al
cmpl $0x0, 0x8(%rsp)
setne %cl
testb %cl, %al
je 0x18677
movl $0x1, 0x8(%rsp)
xorl %edx, %edx
movl $0x1, %eax
jmp 0x1867b
callq 0x3340
movq (%rax), %rcx
testb $0x8, 0x1(%rcx,%rbx,2)
jne 0x18649
xorl %eax, %eax
cmpl $0x65, %ebp
jne 0x18666
cmpl $0x0, 0x8(%rsp)
movq 0x10(%rsp), %rbp
je 0x1866f
movb 0x1(%r12), %dl
addb $-0x2b, %dl
xorl %eax, %eax
testb $-0x3, %dl
setne %sil
jne 0x18685
leaq 0x2(%r12), %rdx
jmp 0x1868a
movl %r15d, %ecx
movl $0x1, 0x8(%rsp)
movq 0x10(%rsp), %rbp
incq %r12
movb $0x1, %dl
movl %ecx, %r15d
movl %r13d, %eax
jmp 0x1867b
xorl %edx, %edx
movq 0x10(%rsp), %rbp
jmp 0x1867b
movl $0x0, 0x8(%rsp)
xorl %eax, %eax
xorl %edx, %edx
testb %dl, %dl
jne 0x18590
jmp 0x186d4
leaq 0x1(%r12), %rdx
movb %sil, %al
negq %rax
movsbq 0x2(%r12,%rax), %rsi
xorl %eax, %eax
testb $0x8, 0x1(%rcx,%rsi,2)
movl $0x1, %ecx
movl $0x1, 0x8(%rsp)
movq %rdx, %r12
movl $0x0, %edx
jne 0x18659
jmp 0x1867b
movq %rbp, %rbx
jmp 0x186f6
cmpl $0x0, 0x8(%rsp)
movq 0x20(%rsp), %rbx
je 0x186e2
movl $0x8, %edx
orl (%rsp), %r15d
jne 0x186f6
jmp 0x186e2
movl $0x8, %edx
testl %eax, %eax
movq 0x20(%rsp), %rbx
jne 0x186f6
movq %rbp, %rdi
callq 0x18bf5
xorl %ecx, %ecx
testl %eax, %eax
sete %cl
leal (%rcx,%rcx,8), %edx
incl %edx
movl %edx, (%rbx)
xorl %eax, %eax
cmpl $0xa, %edx
setne %cl
movl 0x8(%r14), %edx
movl %edx, 0x4(%rbx)
movl 0xc(%r14), %edx
movq 0x18(%rsp), %rsi
subl %esi, %edx
addl $0x120, %edx            # imm = 0x120
movl %edx, 0x8(%rbx)
addq $-0x11f, %rsi           # imm = 0xFEE1
cmpq 0x1120(%r14), %rsi
jae 0x1886a
movb %cl, %al
jmp 0x17f5d
xorl %ecx, %ecx
leaq 0x1(%rcx), %r15
movslq 0x14(%r14), %rax
cmpq %rax, %r15
setl %bl
jge 0x187c7
movq 0x28(%r14,%rcx,8), %rdx
movq %r14, %rdi
movl %ebp, %esi
callq 0x17e30
movq %r15, %rcx
testl %eax, %eax
je 0x18738
movq 0x20(%r14,%r15,8), %rax
movb (%rax), %cl
testb %cl, %cl
je 0x18780
incq %rax
incl 0xc(%r14)
movb %cl, (%r12)
incq %r12
movb (%rax), %cl
incq %rax
testb %cl, %cl
jne 0x1876c
movb $0x0, (%r12)
leal 0x3e8(%r15), %eax
movl %eax, (%r13)
movl 0x8(%r14), %eax
movl %eax, 0x4(%r13)
movq %r12, %rcx
subq 0x10(%rsp), %rcx
movl 0xc(%r14), %eax
subl %ecx, %eax
movl %eax, 0x8(%r13)
incq %rcx
movl $0x1, %eax
cmpq 0x1120(%r14), %rcx
jb 0x187c7
movl $0xb, (%r13)
xorl %eax, %eax
jmp 0x187c7
xorl %ecx, %ecx
testb %bl, %bl
movq %r13, %rbx
jne 0x17f5d
incl 0xc(%r14)
movb %bpl, (%r12)
movb $0x0, 0x1(%r12)
cmpl $0x27, %ebp
je 0x187ec
cmpl $0x22, %ebp
jne 0x187f3
testb $0x1, 0x10(%r14)
jne 0x18842
incq %r12
movl $0x9, (%rbx)
movl %ebp, 0xc(%rbx)
movl 0x8(%r14), %eax
movl %eax, 0x4(%rbx)
subq 0x10(%rsp), %r12
movl 0xc(%r14), %ecx
subl %r12d, %ecx
incq %r12
movl %ecx, 0x8(%rbx)
movq 0x1120(%r14), %rcx
cmpl $0xa, %ebp
jne 0x1885c
cmpq %rcx, %r12
jb 0x1882f
movl $0xb, (%rbx)
incl %eax
movl %eax, 0x8(%r14)
movl $0x0, 0xc(%r14)
jmp 0x17f58
movsbl %bpl, %esi
movq %r14, %rdi
movq %rbx, %rdx
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x188d8
movl $0x1, %eax
cmpq %rcx, %r12
jb 0x17f5d
movl $0xb, (%rbx)
xorl %eax, %eax
jmp 0x17f5d
movl $0x2e, %r15d
jmp 0x183f9