// File: /workspace/github_cpp_makefile_star2_O3/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 %rdi, %r14
movl $0x0, 0xc(%rsi)
cmpl $0x0, 0x18(%rdi)
je 0x17ce9
movups 0x1178(%r14), %xmm0
movups %xmm0, (%rsi)
movl $0x0, 0x18(%r14)
movl $0x1, %eax
jmp 0x1835c
movq %rsi, 0x20(%rsp)
leaq 0x120(%r14), %rax
movq %rax, (%rsp)
movl $0x120, %ecx            # imm = 0x120
leaq 0x54e2(%rip), %r13      # 0x1d1e7
movq %rcx, %r15
leaq (%r14,%rcx), %r12
movq %r14, %rdi
callq 0x17901
cmpl $-0x1, %eax
je 0x17f3a
movl %eax, %ebp
leaq -0x1(%r12), %rbx
movq 0x1160(%r14), %rdx
movq %r14, %rdi
movl %ebp, %esi
callq 0x17bd3
testl %eax, %eax
je 0x17d54
movq 0x1160(%r14), %rdi
movq 0x1168(%r14), %rbp
callq 0x31a0
movq %r14, %rdi
movq %rbp, %rsi
jmp 0x17d7b
movq 0x1158(%r14), %rdx
movq %r14, %rdi
movl %ebp, %esi
callq 0x17bd3
testl %eax, %eax
je 0x17d96
movq 0x1158(%r14), %rdi
callq 0x31a0
movq %r14, %rdi
movq %r13, %rsi
movl %eax, %edx
callq 0x17c50
movq %r14, %rdi
callq 0x17901
movl %eax, %ebp
cmpl $-0x1, %eax
jne 0x17d24
jmp 0x17f3a
testb %bpl, %bpl
js 0x17de6
movslq %ebp, %rax
leaq 0x580b(%rip), %rcx      # 0x1d5b0
cmpb $0x0, (%rax,%rcx)
je 0x17de6
cmpq $0x120, %r15            # imm = 0x120
je 0x17e41
cmpl $0x5c, %ebp
jne 0x17e41
callq 0x3340
movq (%rax), %rax
movsbq (%rbx), %rcx
testb $0x20, 0x1(%rax,%rcx,2)
jne 0x17e41
movq %r14, %rdi
callq 0x17901
cmpl $0xa, %eax
je 0x17d82
jmp 0x17f6e
testb $0x2, 0x10(%r14)
je 0x17ef6
cmpq $0x120, %r15            # imm = 0x120
setne %al
cmpl $0x4c, %ebp
setne %cl
orb %al, %cl
jne 0x17ef6
movq %r14, %rdi
callq 0x17901
movl %eax, %ebp
movq %r14, %rdi
movl %eax, %esi
callq 0x17957
movq %r14, %rdi
movl $0x4c, %esi
callq 0x17957
cmpl $0x22, %ebp
je 0x1839b
cmpl $0x27, %ebp
jne 0x17ef6
jmp 0x1839b
leal -0x2b(%rbp), %eax
testl $0xfffffffd, %eax       # imm = 0xFFFFFFFD
sete %al
cmpq $0x122, %r15            # imm = 0x122
setae %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x17e81
movzbl (%rbx), %eax
orl $0x20, %eax
cmpl $0x65, %eax
movq (%rsp), %rdi
jne 0x17f7d
movq %rbx, %rsi
callq 0x185b7
testl %eax, %eax
jne 0x17ef6
jmp 0x17f7d
cmpq $0x120, %r15            # imm = 0x120
sete %al
cmpl $0x2e, %ebp
setne %cl
orb %al, %cl
movq (%rsp), %rdi
jne 0x17eb0
movq %r12, %rsi
callq 0x185b7
movl $0x2e, %ebp
cmpl $0x1, %eax
je 0x17ef6
jmp 0x17f7d
cmpl $0x2e, %ebp
jne 0x1836b
cmpq $0x120, %r15            # imm = 0x120
jne 0x18384
movq %r14, %rdi
callq 0x17901
movl %eax, %ebx
callq 0x3340
movq (%rax), %rax
movslq %ebx, %rsi
movzwl (%rax,%rsi,2), %ebx
movq %r14, %rdi
callq 0x17957
btl $0xb, %ebx
movl $0x2e, %ebp
jae 0x1838e
incl 0xc(%r14)
movb %bpl, (%r14,%r15)
leaq 0x1(%r15), %rcx
movl 0xc(%r14), %eax
leal -0xfff(%rax), %edx
cmpl $0xfffff000, %edx       # imm = 0xFFFFF000
jae 0x17d05
movq 0x20(%rsp), %rdx
movl $0xb, (%rdx)
movl 0x8(%r14), %ecx
movl %ecx, 0x4(%rdx)
subl %r15d, %eax
addl $0x11f, %eax            # imm = 0x11F
movl %eax, 0x8(%rdx)
jmp 0x1835a
cmpq $0x120, %r15            # imm = 0x120
jne 0x17f87
movq 0x20(%rsp), %rcx
movl $0xe, (%rcx)
movq 0x8(%r14), %rax
movq %rax, 0x4(%rcx)
movl $0x1, %eax
cmpq $0x1, 0x1120(%r14)
jbe 0x18354
jmp 0x1835c
movq %r14, %rdi
movl %eax, %esi
callq 0x17957
movl $0x5c, %ebp
movq %r14, %rdi
movl %ebp, %esi
callq 0x17957
movb $0x0, (%r12)
movq (%rsp), %rcx
movsbl (%rcx), %r13d
xorl %edx, %edx
cmpl $0x2d, %r13d
sete %dl
movb (%rcx,%rdx), %sil
cmpb $0x30, %sil
jne 0x18070
movzbl 0x1(%rcx,%rdx), %eax
orl $0x20, %eax
cmpl $0x78, %eax
jne 0x18070
movb 0x2(%rcx,%rdx), %r12b
movl $0x5, %ebp
movl $0x1, 0xc(%rsp)
testb %r12b, %r12b
je 0x18323
movb %sil, 0x8(%rsp)
movq %r13, 0x10(%rsp)
movq %rdx, %rbx
callq 0x30c0
movq (%rax), %rbp
movq %rbx, 0x18(%rsp)
addq %r14, %rbx
addq $0x122, %rbx            # imm = 0x122
xorl %r13d, %r13d
movsbq %r12b, %rax
movl (%rbp,%rax,4), %esi
movl $0x11, %edx
leaq 0x5579(%rip), %rdi      # 0x1d58b
callq 0x3380
testq %rax, %rax
je 0x18035
movb 0x1(%rbx), %r12b
incq %rbx
decq %r13
testb %r12b, %r12b
jne 0x17ffe
movl $0x5, %ebp
jmp 0x18323
testq %r13, %r13
movq (%rsp), %rcx
movq 0x10(%rsp), %r13
movl $0x5, %ebp
movq 0x18(%rsp), %rdx
movb 0x8(%rsp), %sil
je 0x18070
movq %rbx, %rdi
callq 0x188ce
movb 0x8(%rsp), %sil
movq 0x18(%rsp), %rdx
movq (%rsp), %rcx
testl %eax, %eax
jne 0x18323
leal -0x2b(%r13), %eax
xorl %r12d, %r12d
testb $-0x3, %al
setne %al
sete %r12b
movzbl (%rcx,%r12), %ebx
movl $0x7, %ebp
testl %ebx, %ebx
je 0x180d5
cmpl $0x30, %ebx
jne 0x180e2
movq %r13, %rbp
movl $0x1, 0xc(%rsp)
movsbq 0x1(%rcx,%r12), %r13
testq %r13, %r13
je 0x182b2
movb %al, 0x10(%rsp)
movb %sil, 0x8(%rsp)
movq %rdx, 0x18(%rsp)
callq 0x3340
movq (%rax), %rax
testb $0x8, 0x1(%rax,%r13,2)
movq %rbp, %r13
movl $0x7, %ebp
je 0x18100
jmp 0x1814c
movl $0x1, 0xc(%rsp)
jmp 0x18323
movb %al, 0x10(%rsp)
movb %sil, 0x8(%rsp)
movq %rdx, 0x18(%rsp)
movl $0x1, 0xc(%rsp)
callq 0x3340
movq (%rax), %rax
leaq (%r12,%r14), %rdi
addq $0x120, %rdi            # imm = 0x120
movsbq %bl, %rcx
testb $0x8, 0x1(%rax,%rcx,2)
je 0x18128
incq %r12
movb 0x1(%rdi), %bl
incq %rdi
testb %bl, %bl
jne 0x1810b
jmp 0x18323
testq %r12, %r12
setne %al
cmpq $0x2, %r12
setae %cl
movb 0x10(%rsp), %dl
orb %cl, %dl
testb %dl, %al
je 0x1814c
callq 0x188ce
testl %eax, %eax
jne 0x18323
cmpb $0x30, 0x8(%rsp)
jne 0x18196
movq 0x18(%rsp), %rax
leaq (%rax,%r14), %r12
addq $0x121, %r12            # imm = 0x121
movb $0x30, %al
leaq 0x5437(%rip), %rbx      # 0x1d5a3
movsbl %al, %esi
movl $0x9, %edx
movq %rbx, %rdi
callq 0x3380
testq %rax, %rax
je 0x18196
movb (%r12), %al
incq %r12
testb %al, %al
jne 0x1816c
movl $0x6, %ebp
jmp 0x18323
leal -0x2b(%r13), %eax
andb $-0x3, %al
cmpb $0x1, %al
movq (%rsp), %rax
adcq $0x0, %rax
movb (%rax), %bpl
testb %bpl, %bpl
je 0x182d5
movq %rax, %rbx
callq 0x30c0
movq %rbx, %rdx
movq (%rax), %rax
movq %rax, 0x18(%rsp)
xorl %r8d, %r8d
xorl %ecx, %ecx
movl $0x0, 0x10(%rsp)
cmpb $0x2e, %bpl
jne 0x181ec
testl %r8d, %r8d
movl $0x1, %r8d
je 0x1828b
jmp 0x182d5
movsbq %bpl, %r12
movq 0x18(%rsp), %rax
movl (%rax,%r12,4), %ebp
cmpl $0x66, %ebp
je 0x182b9
movl %ecx, 0x8(%rsp)
movl %r8d, (%rsp)
movq %r13, %rbx
movq %rdx, %r13
callq 0x3340
movq (%rax), %rax
testb $0x8, 0x1(%rax,%r12,2)
jne 0x18256
cmpl $0x65, %ebp
movq %r13, %rdi
movq %rbx, %r13
movl (%rsp), %r8d
movl 0x8(%rsp), %ecx
jne 0x182d5
testl %ecx, %ecx
je 0x182d5
movb 0x1(%rdi), %dl
addb $-0x2b, %dl
xorl %ecx, %ecx
testb $-0x3, %dl
setne %sil
jne 0x18267
leaq 0x2(%rdi), %rdx
jmp 0x1826b
movl $0x1, %ecx
movq %r13, %rdx
movq %rbx, %r13
movl (%rsp), %r8d
jmp 0x1828b
leaq 0x1(%rdi), %rdx
movb %sil, %cl
negq %rcx
movsbq 0x2(%rdi,%rcx), %rcx
movl $0x1, 0x10(%rsp)
testb $0x8, 0x1(%rax,%rcx,2)
movl $0x1, %ecx
je 0x182d5
movb 0x1(%rdx), %bpl
incq %rdx
testb %bpl, %bpl
jne 0x181d2
orl %r8d, 0x10(%rsp)
sete %al
testl %ecx, %ecx
je 0x182d5
movl $0x8, %ebp
testb %al, %al
je 0x18323
jmp 0x182d5
movl $0x7, %ebp
jmp 0x18323
cmpb $0x0, 0x1(%rdx)
jne 0x182d5
orl 0x10(%rsp), %r8d
setne %al
testl %ecx, %ecx
setne %cl
movl $0x8, %ebp
testb %cl, %al
jne 0x18323
movl $0xa, %ebp
movl $0x0, 0xc(%rsp)
testb %r13b, %r13b
js 0x18323
movl %r13d, %ecx
leaq 0x533f(%rip), %rax      # 0x1d630
cmpb $0x1, (%rcx,%rax)
jne 0x18323
leaq 0x121(%r14), %rcx
movsbl (%rcx), %edx
testl %edx, %edx
je 0x18316
testb %dl, %dl
js 0x18323
movl %edx, %edx
incq %rcx
cmpb $0x0, (%rdx,%rax)
jne 0x182fe
jmp 0x18323
movl $0x1, 0xc(%rsp)
movl $0x1, %ebp
movq 0x20(%rsp), %rcx
movl %ebp, (%rcx)
movl 0x8(%r14), %eax
movl %eax, 0x4(%rcx)
movl 0xc(%r14), %eax
subl %r15d, %eax
addl $0x120, %eax            # imm = 0x120
movl %eax, 0x8(%rcx)
addq $-0x11f, %r15           # imm = 0xFEE1
cmpq 0x1120(%r14), %r15
movl 0xc(%rsp), %eax
jb 0x1835c
movl $0xb, (%rcx)
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
movl %ebp, %esi
callq 0x17957
cmpq $0x120, %r15            # imm = 0x120
jne 0x17f87
jmp 0x1839b
movl $0x2e, %ebp
jmp 0x17f7d
movq %r14, %rdi
movl $0x2e, %esi
callq 0x17957
movq %r14, %rdi
callq 0x17901
movl %eax, %ebx
movb 0x10(%r14), %al
shrb %al
cmpl $0x4c, %ebx
sete %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x18401
movq %r14, %rdi
callq 0x17901
movl %eax, %ebx
movl $0x1, %ecx
cmpl $0x22, %eax
je 0x1849d
cmpl $0x27, %ebx
movq 0x20(%rsp), %r13
movq (%rsp), %rdx
je 0x184a6
leaq 0x5098(%rip), %rdi      # 0x1d481
leaq 0x4f6f(%rip), %rsi      # 0x1d35f
leaq 0x50a1(%rip), %rcx      # 0x1d498
movl $0x1de, %edx            # imm = 0x1DE
callq 0x3240
cmpl $0x2e, %ebx
jne 0x18467
leaq 0x4674(%rip), %rdx      # 0x1ca81
movq %r14, %rdi
movl $0x2e, %esi
callq 0x17bd3
testl %eax, %eax
je 0x18467
movl $0x2e2e2e, 0x120(%r14) # imm = 0x2E2E2E
movq 0x20(%rsp), %rcx
movl $0x4, (%rcx)
movl 0x8(%r14), %eax
movl %eax, 0x4(%rcx)
subq (%rsp), %r12
movl 0xc(%r14), %eax
subl %r12d, %eax
addl $-0x3, %eax
movl %eax, 0x8(%rcx)
addq $0x4, %r12
movl $0x1, %eax
cmpq 0x1120(%r14), %r12
jae 0x18354
jmp 0x1835c
cmpl $0x0, 0x14(%r14)
movq 0x20(%rsp), %r13
jle 0x18499
xorl %r15d, %r15d
movq 0x20(%r14,%r15,8), %rdx
movq %r14, %rdi
movl %ebx, %esi
callq 0x17bd3
testl %eax, %eax
jne 0x18543
incq %r15
movslq 0x14(%r14), %rax
cmpq %rax, %r15
jl 0x18476
xorl %ecx, %ecx
jmp 0x184a2
movq 0x20(%rsp), %r13
movq (%rsp), %rdx
incl 0xc(%r14)
movb %bl, (%r12)
movb $0x0, 0x1(%r12)
incq %r12
cmpl $0x27, %ebx
je 0x184c1
cmpl $0x22, %ebx
jne 0x184f5
testb $0x1, 0x10(%r14)
jne 0x184d9
movl $0x9, (%r13)
movl %ebx, 0xc(%r13)
jmp 0x1857f
movsbl %bl, %esi
movq %r14, %rdi
movq %r13, %rdx
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1860d
movl $0x9, (%r13)
movl %ebx, 0xc(%r13)
cmpl $0xa, %ebx
jne 0x1857f
movl 0x8(%r14), %eax
movl %eax, 0x4(%r13)
subq %rdx, %r12
movl 0xc(%r14), %ecx
subl %r12d, %ecx
movl %ecx, 0x8(%r13)
incq %r12
cmpq 0x1120(%r14), %r12
jb 0x18530
movl $0xb, (%r13)
incl %eax
movl %eax, 0x8(%r14)
movl $0x0, 0xc(%r14)
jmp 0x17cdf
movq 0x20(%r14,%r15,8), %rax
movb (%rax), %cl
testb %cl, %cl
je 0x1856b
incq %rax
movq (%rsp), %rdx
incl 0xc(%r14)
movb %cl, (%r12)
incq %r12
movb (%rax), %cl
incq %rax
testb %cl, %cl
jne 0x18555
jmp 0x1856f
movq (%rsp), %rdx
movb $0x0, (%r12)
addl $0x3e8, %r15d           # imm = 0x3E8
movl %r15d, (%r13)
movl 0x8(%r14), %eax
movl %eax, 0x4(%r13)
subq %rdx, %r12
movl 0xc(%r14), %eax
subl %r12d, %eax
movl %eax, 0x8(%r13)
incq %r12
movl $0x1, %eax
cmpq 0x1120(%r14), %r12
jb 0x1835c
movl $0xb, (%r13)
jmp 0x1835a