// File: /workspace/github_c_makefile_star2_O0/lucvoo[P]sparse-dev/tokenize.c
// Function: eat_string
static int eat_string(int next, stream_t *stream, enum token_type type)
{
	static char buffer[MAX_STRING];
	struct string *string;
	struct token *token = stream->token;
	int len = 0;
	int escape;
	int want_hex = 0;
	char delim = type < TOKEN_STRING ? '\'' : '"';

	for (escape = 0; escape || next != delim; next = nextchar(stream)) {
		if (len < MAX_STRING)
			buffer[len] = next;
		len++;
		if (next == '\n') {
			warning(stream_pos(stream),
				"missing terminating %c character", delim);
			/* assume delimiter is lost */
			break;
		}
		if (next == EOF) {
			warning(stream_pos(stream),
				"End of file in middle of string");
			return next;
		}
		if (!escape) {
			if (want_hex && !(cclass[next + 1] & Hex))
				warning(stream_pos(stream),
					"\\x used with no following hex digits");
			want_hex = 0;
			escape = next == '\\';
		} else {
			escape = 0;
			want_hex = next == 'x';
		}
	}
	if (want_hex)
		warning(stream_pos(stream),
			"\\x used with no following hex digits");
	if (len > MAX_STRING) {
		warning(stream_pos(stream), "string too long (%d bytes, %d bytes max)", len, MAX_STRING);
		len = MAX_STRING;
	}
	if (delim == '\'' && len && len <= 4) {
		token_type(token) = type + len;
		memset(buffer + len, '\0', 4 - len);
		memcpy(token->embedded, buffer, 4);
	} else {
		token_type(token) = type;
		string = __alloc_string(len+1);
		memcpy(string->data, buffer, len);
		string->data[len] = '\0';
		string->length = len+1;
		token->string = string;
	}

	/* Pass it on.. */
	token = stream->token;
	add_token(stream);
	return nextchar(stream);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movl $0x0, -0x34(%rbp)
movl -0x14(%rbp), %edx
movl $0x22, %eax
movl $0x27, %ecx
cmpl $0x10, %edx
cmovbl %ecx, %eax
movb %al, -0x35(%rbp)
movl $0x0, -0x30(%rbp)
movb $0x1, %al
cmpl $0x0, -0x30(%rbp)
movb %al, -0x61(%rbp)
jne 0x45ec3
movl -0x8(%rbp), %eax
movsbl -0x35(%rbp), %ecx
cmpl %ecx, %eax
setne %al
movb %al, -0x61(%rbp)
movb -0x61(%rbp), %al
testb $0x1, %al
jne 0x45ecf
jmp 0x45fda
cmpl $0x1fff, -0x2c(%rbp)    # imm = 0x1FFF
jge 0x45eeb
movl -0x8(%rbp), %eax
movb %al, %dl
movslq -0x2c(%rbp), %rcx
leaq 0x6db18(%rip), %rax     # 0xb3a00
movb %dl, (%rax,%rcx)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
cmpl $0xa, -0x8(%rbp)
jne 0x45f22
movq -0x10(%rbp), %rdi
callq 0x453d0
movq %rax, -0x40(%rbp)
movsbl -0x35(%rbp), %edx
movq -0x40(%rbp), %rdi
leaq 0x242f3(%rip), %rsi     # 0x6a209
movb $0x0, %al
callq 0x16d80
jmp 0x45fda
cmpl $-0x1, -0x8(%rbp)
jne 0x45f52
movq -0x10(%rbp), %rdi
callq 0x453d0
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rdi
leaq 0x242ea(%rip), %rsi     # 0x6a22a
movb $0x0, %al
callq 0x16d80
movl -0x8(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x46132
cmpl $0x0, -0x30(%rbp)
jne 0x45fb1
cmpl $0x0, -0x34(%rbp)
je 0x45f99
movl -0x8(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rcx
leaq 0x24042(%rip), %rax     # 0x69fb0
movsbl (%rax,%rcx), %eax
andl $0x4, %eax
cmpl $0x0, %eax
jne 0x45f99
movq -0x10(%rbp), %rdi
callq 0x453d0
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rdi
leaq 0x242b8(%rip), %rsi     # 0x6a24a
movb $0x0, %al
callq 0x16d80
movl $0x0, -0x34(%rbp)
cmpl $0x5c, -0x8(%rbp)
sete %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x30(%rbp)
jmp 0x45fc7
movl $0x0, -0x30(%rbp)
cmpl $0x78, -0x8(%rbp)
sete %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x34(%rbp)
jmp 0x45fc9
movq -0x10(%rbp), %rdi
callq 0x454d0
movl %eax, -0x8(%rbp)
jmp 0x45ea9
cmpl $0x0, -0x34(%rbp)
je 0x45fff
movq -0x10(%rbp), %rdi
callq 0x453d0
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rdi
leaq 0x24252(%rip), %rsi     # 0x6a24a
movb $0x0, %al
callq 0x16d80
cmpl $0x1fff, -0x2c(%rbp)    # imm = 0x1FFF
jle 0x46036
movq -0x10(%rbp), %rdi
callq 0x453d0
movq %rax, -0x60(%rbp)
movl -0x2c(%rbp), %edx
movq -0x60(%rbp), %rdi
leaq 0x2424c(%rip), %rsi     # 0x6a26f
movl $0x1fff, %ecx           # imm = 0x1FFF
movb $0x0, %al
callq 0x16d80
movl $0x1fff, -0x2c(%rbp)    # imm = 0x1FFF
movsbl -0x35(%rbp), %eax
cmpl $0x27, %eax
jne 0x46099
cmpl $0x0, -0x2c(%rbp)
je 0x46099
cmpl $0x4, -0x2c(%rbp)
jg 0x46099
movl -0x14(%rbp), %ecx
addl -0x2c(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, %ecx
movl %ecx, %edx
movq (%rax), %rcx
andq $0x3f, %rdx
andq $-0x40, %rcx
orq %rdx, %rcx
movq %rcx, (%rax)
movslq -0x2c(%rbp), %rax
leaq 0x6d98b(%rip), %rdi     # 0xb3a00
addq %rax, %rdi
movl $0x4, %eax
subl -0x2c(%rbp), %eax
movslq %eax, %rdx
xorl %esi, %esi
callq 0x11130
movq -0x28(%rbp), %rax
movl 0x6d96c(%rip), %ecx     # 0xb3a00
movl %ecx, 0x10(%rax)
jmp 0x46111
movl -0x14(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, %ecx
movl %ecx, %edx
movq (%rax), %rcx
andq $0x3f, %rdx
andq $-0x40, %rcx
orq %rdx, %rcx
movq %rcx, (%rax)
movl -0x2c(%rbp), %edi
addl $0x1, %edi
callq 0x46f20
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
addq $0x4, %rdi
movslq -0x2c(%rbp), %rdx
leaq 0x6d929(%rip), %rsi     # 0xb3a00
callq 0x111d0
movq -0x20(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movb $0x0, 0x4(%rax,%rcx)
movl -0x2c(%rbp), %edx
addl $0x1, %edx
movq -0x20(%rbp), %rax
movl (%rax), %ecx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
andl $0x80000000, %ecx       # imm = 0x80000000
orl %edx, %ecx
movl %ecx, (%rax)
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
callq 0x45e10
movq -0x10(%rbp), %rdi
callq 0x454d0
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax,%rax)