LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/lucvoo[P]sparse-dev/pre-process.c
// Function: show_token_sequence
static const char *show_token_sequence(struct token *token, int quote)
{
	static char buffer[MAX_STRING];
	char *ptr = buffer;
	int whitespace = 0;

	if (!token && !quote)
		return "<none>";
	while (!eof_token(token)) {
		const char *val = quote ? quote_token(token) : show_token(token);
		int len = strlen(val);

		if (ptr + whitespace + len >= buffer + sizeof(buffer)) {
			sparse_error(token->pos, "too long token expansion");
			break;
		}

		if (whitespace)
			*ptr++ = ' ';
		memcpy(ptr, val, len);
		ptr += len;
		token = token->next;
		whitespace = token->pos.whitespace;
	}
	*ptr = 0;
	return buffer;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
sete %al
movl %esi, 0x4(%rsp)
testl %esi, %esi
sete %cl
testb %cl, %al
jne 0x20c9b
movq %rdi, %r14
leaq 0x46554(%rip), %rbx     # 0x67160
cmpq 0x3f2d5(%rip), %rdi     # 0x5fee8
je 0x20cbf
xorl %ebp, %ebp
leaq 0x4653e(%rip), %rbx     # 0x67160
xorl %r13d, %r13d
cmpl $0x0, 0x4(%rsp)
je 0x20c36
movq %r14, %rdi
callq 0x2e2a1
jmp 0x20c3e
movq %r14, %rdi
callq 0x2df90
movq %rax, %r15
movq %rax, %rdi
callq 0xe0d0
movl %ebp, %ecx
addq %r13, %rcx
movslq %eax, %r12
addq %r12, %rcx
cmpq $0x1fff, %rcx           # imm = 0x1FFF
jge 0x20ca4
testl %ebp, %ebp
je 0x20c67
incq %r13
movb $0x20, (%rbx)
leaq 0x464f2(%rip), %rbx     # 0x67160
leaq (%rbx,%r13), %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0xe1e0
addq %r12, %r13
movq 0x8(%r14), %r14
movl (%r14), %ebp
shrl $0x15, %ebp
andl $0x1, %ebp
addq %r13, %rbx
cmpq 0x3f251(%rip), %r14     # 0x5fee8
jne 0x20c25
jmp 0x20cbf
leaq 0x2098b(%rip), %rax     # 0x4162d
jmp 0x20cc9
movq (%r14), %rdi
leaq 0x25452(%rip), %rsi     # 0x46100
xorl %eax, %eax
callq 0x11a80
leaq 0x464a4(%rip), %rbx     # 0x67160
addq %r13, %rbx
movb $0x0, (%rbx)
leaq 0x46497(%rip), %rax     # 0x67160
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/lucvoo[P]sparse-dev/pre-process.c
// Function: expand_list
static void expand_list(struct token **list)
{
	struct token *next;
	while (!eof_token(next = scan_next(list))) {
		if (token_type(next) != TOKEN_IDENT || expand_one_symbol(list))
			list = &next->next;
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x6562f(%rip), %r14     # 0x865e0
movq (%rbx), %r15
movl (%r15), %eax
andl $0x3f, %eax
cmpl $0x1a, %eax
jne 0x20fd9
movq 0x10(%r15), %rax
andb $-0x2, 0x11(%rax)
movq 0x8(%r15), %r15
movl (%r15), %eax
andl $0x3f, %eax
cmpl $0x1a, %eax
je 0x20fbf
movq %r15, (%rbx)
cmpq %r14, %r15
je 0x20ffe
movl (%r15), %eax
andl $0x3f, %eax
cmpl $0x3, %eax
jne 0x20ff5
movq %rbx, %rdi
callq 0x211ab
testl %eax, %eax
je 0x20fb1
addq $0x8, %r15
movq %r15, %rbx
jmp 0x20fb1
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/lucvoo[P]sparse-dev/pre-process.c
// Function: try_include
static int try_include(struct position pos, const char *path, const char *filename, int flen, struct token **where, const char **next_path)
{
	int fd;
	int plen = strlen(path);
	static char fullname[PATH_MAX];

	memcpy(fullname, path, plen);
	if (plen && path[plen-1] != '/') {
		fullname[plen] = '/';
		plen++;
	}
	memcpy(fullname+plen, filename, flen);
	if (already_tokenized(fullname))
		return 1;
	fd = open(fullname, O_RDONLY);
	if (fd >= 0) {
		char *streamname = xmemdup(fullname, plen + flen);
		*where = tokenize(&pos, streamname, fd, *where, next_path);
		close(fd);
		return 1;
	}
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, (%rsp)
movq %rcx, 0x8(%rsp)
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, 0x10(%rsp)
movq %rsi, %rdi
callq 0xe0d0
movq %rax, %r15
movslq %r15d, %r13
leaq 0x48436(%rip), %r12     # 0x69470
movq %r12, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0xe1e0
testl %r13d, %r13d
je 0x2107a
movq %r15, %rax
shlq $0x20, %rax
movabsq $-0x100000000, %rcx     # imm = 0xFFFFFFFF00000000
addq %rax, %rcx
sarq $0x20, %rcx
cmpb $0x2f, (%r14,%rcx)
je 0x2107d
movb $0x2f, (%r13,%r12)
incl %r13d
movl %r13d, %r15d
jmp 0x2107d
xorl %r15d, %r15d
movslq %r15d, %rdi
addq %r12, %rdi
movslq %ebp, %rdx
leaq 0x482e3(%rip), %rsi     # 0x69370
callq 0xe1e0
movq %r12, %rdi
callq 0x2e5cc
movl (%rax), %ebx
testl %ebx, %ebx
js 0x21140
leaq 0x4cefd(%rip), %rax     # 0x6dfa8
movq (%rax), %r14
leaq 0x483bb(%rip), %r12     # 0x69470
movl %ebx, %eax
leaq (%rax,%rax,4), %rax
shlq $0x4, %rax
leaq (%r14,%rax), %r13
movl 0x30(%r14,%rax), %ebx
cmpl $0x0, 0x34(%r14,%rax)
je 0x210e5
movq 0x8(%r13), %rsi
movq %r12, %rdi
callq 0xe1c0
testl %eax, %eax
jne 0x21138
jmp 0x21193
cmpl $0x3, 0x28(%r13)
jne 0x21138
movq 0x8(%r13), %rsi
movq %r12, %rdi
callq 0xe1c0
testl %eax, %eax
jne 0x21138
movq 0x38(%r13), %rdi
movl $0x1, %r13d
testq %rdi, %rdi
je 0x21199
movl $0x81, %esi
callq 0x2afd5
leaq 0x4ce88(%rip), %rcx     # 0x6dfa8
movq (%rcx), %r14
testq %rax, %rax
je 0x21138
movl (%rax), %eax
movl $0x1ff00, %ecx          # imm = 0x1FF00
andl %ecx, %eax
cmpl $0x100, %eax            # imm = 0x100
je 0x21199
testl %ebx, %ebx
jns 0x210b5
leaq 0x48329(%rip), %rdi     # 0x69470
xorl %r13d, %r13d
xorl %esi, %esi
xorl %eax, %eax
callq 0xe290
testl %eax, %eax
js 0x21199
movl %eax, %r12d
addl %ebp, %r15d
movslq %r15d, %rsi
leaq 0x48309(%rip), %rdi     # 0x69470
callq 0x2f572
movq 0x8(%rsp), %rbx
movq (%rbx), %rcx
leaq 0x10(%rsp), %rdi
movq %rax, %rsi
movl %r12d, %edx
movq (%rsp), %r8
callq 0x2ed56
movq %rax, (%rbx)
movl %r12d, %edi
callq 0xe150
movl $0x1, %r13d
movl %r13d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/lucvoo[P]sparse-dev/pre-process.c
// Function: expand_one_symbol
static int expand_one_symbol(struct token **list)
{
	struct token *token = *list;
	struct symbol *sym;

	if (token->pos.noexpand)
		return 1;

	sym = lookup_macro(token->ident);
	if (!sym)
		return 1;
	if (sym->expand_simple) {
		sym->expand_simple(token);
		return 1;
	} else {
		int rc;

		sym->used_in = file_scope;
		expanding = 1;
		rc = expand(list, sym);
		expanding = 0;
		return rc;
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq (%rdi), %r14
cmpq $0x0, (%r14)
js 0x211eb
movq %rdi, %rbx
movq 0x10(%r14), %rdi
movl $0x81, %esi
callq 0x2afd5
testq %rax, %rax
je 0x211eb
movl $0x1ff00, %ecx          # imm = 0x1FF00
andl (%rax), %ecx
cmpl $0x100, %ecx            # imm = 0x100
jne 0x211eb
movq 0x60(%rax), %rcx
testq %rcx, %rcx
je 0x211f8
movq %r14, %rdi
callq *%rcx
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x42b99(%rip), %rcx     # 0x63d98
movq (%rcx), %rcx
movq %rcx, 0x58(%rax)
movb $0x1, 0x47f53(%rip)     # 0x69160
movq %rbx, %rdi
movq %rax, %rsi
callq 0x21221
movb $0x0, 0x47f41(%rip)     # 0x69160
jmp 0x211f0
// File: /workspace/github_c_makefile_star2_O3/lucvoo[P]sparse-dev/pre-process.c
// Function: preprocessor_line
static void preprocessor_line(struct stream *stream, struct token **line)
{
	struct token *start = *line, *next;
	struct token **tp = &start->next;

	for (;;) {
		next = *tp;
		if (next->pos.newline)
			break;
		tp = &next->next;
	}
	*line = next;
	*tp = &eof_token_entry;
	handle_preprocessor_line(stream, line, start);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r15
movq (%rsi), %r12
movq %r12, %rcx
movq %rcx, %rax
movq 0x8(%rcx), %rcx
testb $0x10, 0x2(%rcx)
je 0x21f23
movq %rcx, (%r14)
leaq 0x646a6(%rip), %rcx     # 0x865e0
movq %rcx, 0x8(%rax)
movq 0x8(%r12), %rbx
cmpq %rcx, %rbx
je 0x22013
movl (%rbx), %eax
andl $0x3f, %eax
movb $0x1, %bpl
cmpl $0x5, %eax
je 0x21f8a
cmpl $0x3, %eax
jne 0x21f81
movq 0x10(%rbx), %rdi
movl $0x40, %esi
callq 0x2afd5
testq %rax, %rax
je 0x21f81
movq 0x48(%rax), %r13
cmpl $0x0, 0x50(%rax)
setne %bpl
jne 0x21f91
jmp 0x21fb8
leaq 0x9a(%rip), %r13        # 0x22022
jmp 0x21f91
leaq -0x210c(%rip), %r13     # 0x1fe85
cmpl $0x0, 0x2c(%r15)
jne 0x21faf
movl $0x1, 0x2c(%r15)
cmpq $0x0, 0x40(%r15)
jne 0x21faf
movq $0x0, 0x38(%r15)
cmpl $0x0, 0x471ae(%rip)     # 0x69164
jne 0x21ff9
cmpb $0x1, 0x471a1(%rip)     # 0x69160
jne 0x21fe9
leaq 0x44e58(%rip), %rax     # 0x66e20
cmpl $0x0, (%rax)
setne %al
orb %al, %bpl
cmpb $0x1, %bpl
jne 0x21fe9
movq (%r12), %rdi
leaq 0x241e0(%rip), %rsi     # 0x461c2
xorl %eax, %eax
callq 0x118fc
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq *%r13
testl %eax, %eax
je 0x22013
testb $0x3f, (%rbx)
je 0x22013
movq 0x8(%rbx), %r14
movq %rbx, %rdi
callq 0x2f875
testb $0x3f, (%r14)
movq %r14, %rbx
jne 0x21ffe
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/lucvoo[P]sparse-dev/pre-process.c
// Function: add_path_entry
static void add_path_entry(struct token *token, const char *path,
	const char ***where)
{
	const char **dst;
	const char *next;

	/* Need one free entry.. */
	if (includepath[INCLUDEPATHS-2])
		error_die(token->pos, "too many include path entries");

	/* check that this is not a duplicate */
	dst = includepath;
	while (*dst) {
		if (strcmp(*dst, path) == 0)
			return;
		dst++;
	}
	next = path;
	dst = *where;

	update_inc_ptrs(where);

	/*
	 * Move them all up starting at dst,
	 * insert the new entry..
	 */
	do {
		const char *tmp = *dst;
		*dst = next;
		next = tmp;
		dst++;
	} while (next);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
cmpq $0x0, 0x41c38(%rip)     # 0x63d00
jne 0x221aa
movq %rdx, %r14
movq %rsi, %rbx
movq 0x412d5(%rip), %rdi     # 0x633b0
testq %rdi, %rdi
je 0x22103
leaq 0x412d1(%rip), %r15     # 0x633b8
movq %rbx, %rsi
callq 0xe1c0
testl %eax, %eax
je 0x221a4
movq (%r15), %rdi
addq $0x8, %r15
testq %rdi, %rdi
jne 0x220e7
movq (%r14), %rax
movq 0x41c2b(%rip), %rdx     # 0x63d38
movq %rax, %rcx
cmpq %rdx, %rax
ja 0x2212f
addq $0x8, %rdx
movq %rdx, 0x41c18(%rip)     # 0x63d38
leaq 0x41c11(%rip), %rcx     # 0x63d38
cmpq %rcx, %r14
je 0x22192
movq (%r14), %rcx
movq 0x41bf2(%rip), %rdx     # 0x63d28
cmpq %rdx, %rcx
ja 0x22155
addq $0x8, %rdx
movq %rdx, 0x41be2(%rip)     # 0x63d28
leaq 0x41bdb(%rip), %rcx     # 0x63d28
cmpq %rcx, %r14
je 0x22192
movq (%r14), %rcx
movq 0x41bd4(%rip), %rdx     # 0x63d30
cmpq %rdx, %rcx
ja 0x2217b
addq $0x8, %rdx
movq %rdx, 0x41bc4(%rip)     # 0x63d30
leaq 0x41bbd(%rip), %rcx     # 0x63d30
cmpq %rcx, %r14
je 0x22192
movq (%r14), %rcx
movq 0x41b96(%rip), %rdx     # 0x63d18
cmpq %rdx, %rcx
ja 0x22192
addq $0x8, %rdx
movq %rdx, 0x41b86(%rip)     # 0x63d18
movq (%rax), %rcx
movq %rbx, (%rax)
addq $0x8, %rax
movq %rcx, %rbx
testq %rcx, %rcx
jne 0x22192
popq %rbx
popq %r14
popq %r15
retq
movq (%rdi), %rdi
leaq 0x240c3(%rip), %rsi     # 0x46277
xorl %eax, %eax
callq 0x11b9c
// File: /workspace/github_c_makefile_star2_O3/lucvoo[P]sparse-dev/pre-process.c
// Function: token_defined
static int token_defined(struct token *token)
{
	if (token_type(token) == TOKEN_IDENT) {
		struct symbol *sym = lookup_macro(token->ident);
		if (sym) {
			sym->used_in = file_scope;
			return 1;
		}
		return 0;
	}

	sparse_error(token->pos, "expected preprocessor identifier");
	return 0;
}

// Assembly:
pushq %rbx
movq %rdi, %rax
movq (%rdi), %rdi
movl %edi, %ecx
andl $0x3f, %ecx
cmpl $0x3, %ecx
jne 0x22205
movq 0x10(%rax), %rdi
movl $0x81, %esi
callq 0x2afd5
xorl %ebx, %ebx
testq %rax, %rax
je 0x22215
movl $0x1ff00, %ecx          # imm = 0x1FF00
andl (%rax), %ecx
cmpl $0x100, %ecx            # imm = 0x100
jne 0x22215
leaq 0x41ba1(%rip), %rcx     # 0x63d98
movq (%rcx), %rcx
movq %rcx, 0x58(%rax)
movl $0x1, %ebx
jmp 0x22215
leaq 0x24089(%rip), %rsi     # 0x46295
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x11a80
movl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/lucvoo[P]sparse-dev/pre-process.c
// Function: preprocessor_if
static int preprocessor_if(struct stream *stream, struct token *token, int cond)
{
	token_type(token) = false_nesting ? TOKEN_SKIP_GROUPS : TOKEN_IF;
	free_preprocessor_line(token->next);
	token->next = stream->top_if;
	stream->top_if = token;
	if (false_nesting || cond != 1)
		false_nesting++;
	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r14
movl 0x46f38(%rip), %eax     # 0x69164
cmpl $0x1, %eax
movl $0x1d, %ecx
sbbq $0x0, %rcx
movq %rdi, %r15
movq (%rsi), %rdx
movq 0x8(%rsi), %rdi
andq $-0x40, %rdx
orq %rcx, %rdx
movq %rdx, (%rsi)
testb $0x3f, (%rdi)
je 0x2226a
movq 0x8(%rdi), %r12
callq 0x2f875
testb $0x3f, (%r12)
movq %r12, %rdi
jne 0x22251
movl 0x46efa(%rip), %eax     # 0x69164
movq 0x48(%r15), %rcx
movq %rcx, 0x8(%r14)
movq %r14, 0x48(%r15)
xorl $0x1, %ebx
orl %eax, %ebx
je 0x22285
incl %eax
movl %eax, 0x46edf(%rip)     # 0x69164
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/lucvoo[P]sparse-dev/ptrlist.c
// Function: ptr_list_size
int ptr_list_size(struct ptr_list *head)
{
	int nr = 0;

	if (head) {
		struct ptr_list *list = head;
		do {
			nr += list->nr - list->rm;
		} while ((list = list->next) != head);
	}
	return nr;
}

// Assembly:
xorl %eax, %eax
testq %rdi, %rdi
je 0x22553
movq %rdi, %rcx
movswl (%rcx), %edx
movsbl %dl, %esi
sarl $0x8, %edx
subl %edx, %esi
movswl %si, %edx
addl %edx, %eax
movq 0x10(%rcx), %rcx
cmpq %rdi, %rcx
jne 0x2253a
retq
// File: /workspace/github_c_makefile_star2_O3/lucvoo[P]sparse-dev/ptrlist.c
// Function: ptr_list_multiple
bool ptr_list_multiple(const struct ptr_list *head)
{
	const struct ptr_list *list = head;
	int nr = 0;

	if (!head)
		return false;

	do {
		nr += list->nr - list->rm;
		if (nr > 1)
			return true;
	} while ((list = list->next) != head);

	return false;
}

// Assembly:
xorl %edx, %edx
testq %rdi, %rdi
je 0x225ad
movq %rdi, %rcx
movl %edx, %eax
movswl (%rcx), %edx
movsbl %dl, %esi
sarl $0x8, %edx
subl %edx, %esi
movswl %si, %edx
addl %eax, %edx
cmpl $0x2, %edx
setge %al
jge 0x225ac
movq 0x10(%rcx), %rcx
cmpq %rdi, %rcx
jne 0x22589
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/lucvoo[P]sparse-dev/ptrlist.c
// Function: last_ptr_list
void *last_ptr_list(struct ptr_list *head)
{
	struct ptr_list *list;

	if (!head)
		return NULL;
	list = head->prev;
	while (list->nr == 0) {
		if (list == head)
			return NULL;
		list = list->prev;
	}
	return PTR_ENTRY_NOTAG(list, list->nr-1);
}

// Assembly:
xorl %eax, %eax
testq %rdi, %rdi
je 0x225eb
movq %rdi, %rcx
movq 0x8(%rcx), %rcx
movl (%rcx), %edx
shll $0x8, %edx
testw %dx, %dx
jne 0x225ec
cmpq %rdi, %rcx
jne 0x225d8
retq
movswl %dx, %eax
shrl $0x8, %eax
movswq %ax, %rax
movq 0x10(%rcx,%rax,8), %rax
retq
// File: /workspace/github_c_makefile_star2_O3/lucvoo[P]sparse-dev/ptrlist.c
// Function: ptr_list_nth_entry
void *ptr_list_nth_entry(struct ptr_list *list, unsigned int idx)
{
	struct ptr_list *head = list;

	if (!head)
		return NULL;

	do {
		unsigned int nr = list->nr;

		if (idx < nr)
			return list->list[idx];
		else
			idx -= nr;
	} while ((list = list->next) != head);
	return NULL;
}

// Assembly:
xorl %eax, %eax
testq %rdi, %rdi
je 0x2261c
movq %rdi, %rcx
movl %esi, %edx
movsbl (%rcx), %r8d
subl %r8d, %edx
jb 0x2261d
movq 0x10(%rcx), %rcx
movl %edx, %esi
cmpq %rdi, %rcx
jne 0x22608
retq
movl %esi, %eax
movq 0x18(%rcx,%rax,8), %rax
retq
// File: /workspace/github_c_makefile_star2_O3/lucvoo[P]sparse-dev/ptrlist.c
// Function: linearize_ptr_list
int linearize_ptr_list(struct ptr_list *head, void **arr, int max)
{
	int nr = 0;
	if (head && max > 0) {
		struct ptr_list *list = head;

		do {
			int i = list->nr;
			nr += i;
			if (max == 0)
				continue;
			if (i > max) 
				i = max;
			memcpy(arr, list->list, i*sizeof(void *));
			arr += i;
			max -= i;
		} while ((list = list->next) != head);
	}
	return nr;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, (%rsp)
testq %rdi, %rdi
sete %al
testl %edx, %edx
setle %cl
xorl %r15d, %r15d
orb %al, %cl
jne 0x22695
movl %edx, %ebp
movq %rsi, %rbx
xorl %r15d, %r15d
movq (%rsp), %r12
movsbl (%r12), %r13d
testl %ebp, %ebp
je 0x22685
cmpl %r13d, %ebp
movl %r13d, %eax
cmovll %ebp, %eax
leaq 0x18(%r12), %rsi
movslq %eax, %r14
leaq (,%r14,8), %rdx
movq %rbx, %rdi
callq 0xe1e0
leaq (%rbx,%r14,8), %rbx
subl %r14d, %ebp
jmp 0x22687
xorl %ebp, %ebp
addl %r13d, %r15d
movq 0x10(%r12), %r12
cmpq (%rsp), %r12
jne 0x22652
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/lucvoo[P]sparse-dev/ptrlist.c
// Function: pack_ptr_list
void pack_ptr_list(struct ptr_list **listp)
{
	struct ptr_list *head = *listp;

	if (head) {
		struct ptr_list *entry = head;
		do {
			struct ptr_list *next;
restart:
			next = entry->next;
			if (!entry->nr) {
				struct ptr_list *prev;
				if (next == entry) {
					__free_ptrlist(entry);
					*listp = NULL;
					return;
				}
				prev = entry->prev;
				prev->next = next;
				next->prev = prev;
				__free_ptrlist(entry);
				if (entry == head) {
					*listp = next;
					head = next;
					entry = next;
					goto restart;
				}
			}
			entry = next;
		} while (entry != head);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq (%rdi), %r15
testq %r15, %r15
je 0x2272e
movq %rdi, %rbx
leaq 0x4167e(%rip), %r14     # 0x63d40
movq %r15, %r12
movq 0x10(%r15), %rax
cmpb $0x0, (%r15)
je 0x226d9
movq %rax, %r15
cmpq %r12, %rax
jne 0x226c5
jmp 0x2272e
cmpq %r15, %rax
je 0x22718
movq %rax, %r13
movq 0x8(%r15), %rax
movq %r13, 0x10(%rax)
movq %rax, 0x8(%r13)
movq %r14, %rdi
movq %r15, %rsi
callq 0x2f6f4
cmpq %r12, %r15
jne 0x22713
movq %r13, (%rbx)
movq 0x10(%r13), %rax
cmpb $0x0, (%r13)
movq %r13, %r12
movq %r13, %r15
je 0x226d9
jmp 0x226cf
movq %r13, %rax
jmp 0x226cf
leaq 0x41621(%rip), %rdi     # 0x63d40
movq %r15, %rsi
callq 0x2f6f4
movq $0x0, (%rbx)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/lucvoo[P]sparse-dev/ptrlist.c
// Function: split_ptr_list_head
void split_ptr_list_head(struct ptr_list *head)
{
	int old = head->nr, nr = old / 2;
	struct ptr_list *newlist = __alloc_ptrlist(0);
	struct ptr_list *next = head->next;

	old -= nr;
	head->nr = old;
	newlist->next = next;
	next->prev = newlist;
	newlist->prev = head;
	head->next = newlist;
	newlist->nr = nr;
	memcpy(newlist->list, head->list + old, nr * sizeof(void *));
	memset(head->list + old, 0xf0, nr * sizeof(void *));
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movsbl (%rdi), %ebp
movl %ebp, %eax
shrb $0x7, %al
addb %bpl, %al
sarb %al
movsbl %al, %r14d
leaq 0x415e9(%rip), %rdi     # 0x63d40
movl $0x80, %esi
callq 0x2f700
movq 0x10(%rbx), %rcx
subl %r14d, %ebp
movb %bpl, (%rbx)
movq %rcx, 0x10(%rax)
movq %rax, 0x8(%rcx)
movq %rbx, 0x8(%rax)
movq %rax, 0x10(%rbx)
movb %r14b, (%rax)
leaq 0x18(%rax), %rdi
movslq %ebp, %rax
leaq (%rbx,%rax,8), %rbx
addq $0x18, %rbx
movsbq %r14b, %r14
shlq $0x3, %r14
movq %rbx, %rsi
movq %r14, %rdx
callq 0xe1e0
movq %rbx, %rdi
movl $0xf0, %esi
movq %r14, %rdx
popq %rbx
popq %r14
popq %rbp
jmp 0xe130
// File: /workspace/github_c_makefile_star2_O3/lucvoo[P]sparse-dev/ptrlist.c
// Function: _add_ptr_list
void **__add_ptr_list(struct ptr_list **listp, void *ptr)
{
	struct ptr_list *list = *listp;
	struct ptr_list *last = NULL; /* gcc complains needlessly */
	void **ret;
	int nr;

	if (!list || (nr = (last = list->prev)->nr) >= LIST_NODE_NR) {
		struct ptr_list *newlist = __alloc_ptrlist(0);
		if (!list) {
			newlist->next = newlist;
			newlist->prev = newlist;
			*listp = newlist;
		} else {
			newlist->prev = last;
			newlist->next = list;
			list->prev = newlist;
			last->next = newlist;
		}
		last = newlist;
		nr = 0;
	}
	ret = last->list + nr;
	*ret = ptr;
	nr++;
	last->nr = nr;
	return ret;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq (%rdi), %r12
testq %r12, %r12
je 0x227ff
movq 0x8(%r12), %r14
movsbl (%r14), %eax
cmpw $0xc, %ax
jle 0x22825
leaq 0x41563(%rip), %rdi     # 0x63d40
movl $0x80, %esi
callq 0x2f700
movq %r14, 0x8(%rax)
movq %r12, 0x10(%rax)
movq %rax, 0x8(%r12)
movq %rax, 0x10(%r14)
xorl %ecx, %ecx
movq %rax, %r14
jmp 0x22828
movq %rdi, %r15
leaq 0x41537(%rip), %rdi     # 0x63d40
movl $0x80, %esi
callq 0x2f700
movq %rax, %r14
movq %rax, 0x10(%rax)
movq %rax, 0x8(%rax)
movq %rax, (%r15)
xorl %ecx, %ecx
jmp 0x22828
movswl %ax, %ecx
movslq %ecx, %rcx
leaq (%r14,%rcx,8), %rax
addq $0x18, %rax
movq %rbx, (%rax)
incb %cl
movb %cl, (%r14)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/lucvoo[P]sparse-dev/ptrlist.c
// Function: _add_ptr_list_tag
void **__add_ptr_list_tag(struct ptr_list **listp, void *ptr, unsigned long tag)
{
	/* The low two bits are reserved for tags */
	assert((3 & (unsigned long)ptr) == 0);
	assert((~3 & tag) == 0);

	ptr = (void *)(tag | (unsigned long)ptr);

	return __add_ptr_list(listp, ptr);
}

// Assembly:
pushq %rax
testb $0x3, %sil
jne 0x2285d
cmpq $0x4, %rdx
jae 0x2287c
orq %rdx, %rsi
popq %rax
jmp 0x227b4
leaq 0x23b56(%rip), %rdi     # 0x463ba
leaq 0x23b6d(%rip), %rsi     # 0x463d8
leaq 0x23b70(%rip), %rcx     # 0x463e2
movl $0x12d, %edx            # imm = 0x12D
callq 0xe120
leaq 0x23ba4(%rip), %rdi     # 0x46427
leaq 0x23b4e(%rip), %rsi     # 0x463d8
leaq 0x23b51(%rip), %rcx     # 0x463e2
movl $0x12e, %edx            # imm = 0x12E
callq 0xe120
// File: /workspace/github_c_makefile_star2_O3/lucvoo[P]sparse-dev/ptrlist.c
// Function: lookup_ptr_list_entry
bool lookup_ptr_list_entry(const struct ptr_list *head, const void *entry)
{
	const struct ptr_list *list = head;

	if (!head)
		return false;
	do {
		int nr = list->nr;
		int i;
		for (i = 0; i < nr; i++)
			if (list->list[i] == entry)
				return true;
	} while ((list = list->next) != head);
	return false;
}

// Assembly:
testq %rdi, %rdi
je 0x228c8
movq %rdi, %rax
movsbl (%rax), %ecx
testw %cx, %cx
jle 0x228bf
movzwl %cx, %ecx
xorl %edx, %edx
cmpq %rsi, 0x18(%rax,%rdx,8)
je 0x228cb
incq %rdx
cmpq %rdx, %rcx
jne 0x228b0
movq 0x10(%rax), %rax
cmpq %rdi, %rax
jne 0x228a3
xorl %eax, %eax
retq
movb $0x1, %al
retq
// File: /workspace/github_c_makefile_star2_O3/lucvoo[P]sparse-dev/ptrlist.c
// Function: delete_ptr_list_entry
int delete_ptr_list_entry(struct ptr_list **list, void *entry, int count)
{
	void *ptr;

	FOR_EACH_PTR(*list, ptr) {
		if (ptr == entry) {
			DELETE_CURRENT_PTR(ptr);
			if (!--count)
				goto out;
		}
	} END_FOR_EACH_PTR(ptr);
	assert(count <= 0);
out:
	pack_ptr_list(list);
	return count;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movq (%rdi), %rax
testq %rax, %rax
je 0x229a3
movl $0xf0f0f0f0, %ecx       # imm = 0xF0F0F0F0
movq %rax, %rdx
movzwl (%rdx), %r11d
movsbl %r11b, %ebp
testw %bp, %bp
jle 0x22996
leaq 0x18(%rdx), %r8
leaq 0x10(%rdx), %r9
xorl %r10d, %r10d
movslq %r10d, %r14
movq (%r8,%r14,8), %r15
movzwl %r11w, %r12d
cmpl $0x100, %r12d           # imm = 0x100
setb %r12b
testq %r15, %r15
setne %r13b
orb %r12b, %r13b
cmpb $0x1, %r13b
jne 0x22982
cmpq %rsi, %r15
jne 0x22982
leaq (%r8,%r14,8), %r11
movswq %bp, %r14
leaq (%r9,%r14,8), %r14
cmpq %r14, %r11
jae 0x2295c
leaq 0x8(%r11), %r15
movq 0x8(%r11), %r12
movq %r12, (%r11)
movq %r15, %r11
cmpq %r14, %r15
jb 0x22947
jmp 0x2295f
movq %r11, %r15
movq %rcx, (%r15)
movl (%rdx), %r11d
leal -0x1(%r11), %ebp
movzbl %bpl, %ebp
andl $0xffffff00, %r11d      # imm = 0xFFFFFF00
orl %ebp, %r11d
movw %r11w, (%rdx)
decl %ebx
je 0x229c6
decl %r10d
incl %r10d
movsbl %r11b, %ebp
movsbl %r11b, %r14d
cmpl %r14d, %r10d
jl 0x2290b
movq 0x10(%rdx), %rdx
cmpq %rax, %rdx
jne 0x228ef
testl %ebx, %ebx
jle 0x229c8
leaq 0x23a89(%rip), %rdi     # 0x46437
leaq 0x23a23(%rip), %rsi     # 0x463d8
leaq 0x23a86(%rip), %rcx     # 0x46442
movl $0x15a, %edx            # imm = 0x15A
callq 0xe120
xorl %ebx, %ebx
callq 0x226a7
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/lucvoo[P]sparse-dev/ptrlist.c
// Function: replace_ptr_list_entry
int replace_ptr_list_entry(struct ptr_list **list, void *old_ptr,
	void *new_ptr, int count)
{
	void *ptr;

	FOR_EACH_PTR(*list, ptr) {
		if (ptr==old_ptr) {
			REPLACE_CURRENT_PTR(ptr, new_ptr);
			if (!--count)
				goto out;
		}
	}END_FOR_EACH_PTR(ptr);
	assert(count <= 0);
out:
	return count;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq (%rdi), %rax
testq %rax, %rax
je 0x22a3d
movq %rax, %rdi
movzwl (%rdi), %r8d
testb %r8b, %r8b
jle 0x22a34
movl %r8d, %r9d
andl $0x7f, %r9d
xorl %r10d, %r10d
cmpl $0x100, %r8d            # imm = 0x100
setb %bl
movq 0x18(%rdi,%r10,8), %r11
testq %r11, %r11
setne %bpl
orb %bl, %bpl
cmpb $0x1, %bpl
jne 0x22a2c
cmpq %rsi, %r11
jne 0x22a2c
movq %rdx, 0x18(%rdi,%r10,8)
decl %ecx
je 0x22a60
incq %r10
cmpq %r9, %r10
jb 0x229ff
movq 0x10(%rdi), %rdi
cmpq %rax, %rdi
jne 0x229ec
testl %ecx, %ecx
jle 0x22a62
leaq 0x239ef(%rip), %rdi     # 0x46437
leaq 0x23989(%rip), %rsi     # 0x463d8
leaq 0x23a27(%rip), %rcx     # 0x4647d
movl $0x172, %edx            # imm = 0x172
callq 0xe120
xorl %ecx, %ecx
movl %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/lucvoo[P]sparse-dev/ptrlist.c
// Function: undo_ptr_list_last
void * undo_ptr_list_last(struct ptr_list **head)
{
	struct ptr_list *last, *first = *head;

	if (!first)
		return NULL;
	last = first;
	do {
		last = last->prev;
		if (last->nr) {
			void *ptr;
			int nr = --last->nr;
			ptr = last->list[nr];
			last->list[nr] = (void *)0xf1f1f1f1;
			return ptr;
		}
	} while (last != first);
	return NULL;
}

// Assembly:
movq (%rdi), %rdx
xorl %eax, %eax
testq %rdx, %rdx
je 0x22a89
movq %rdx, %rcx
movq 0x8(%rcx), %rcx
movzwl (%rcx), %esi
testb %sil, %sil
jne 0x22a8a
cmpq %rdx, %rcx
jne 0x22a78
retq
leal -0x1(%rsi), %eax
movzbl %al, %edx
andl $0xffffff00, %esi       # imm = 0xFFFFFF00
orl %edx, %esi
movw %si, (%rcx)
movsbq %al, %rdx
movq 0x18(%rcx,%rdx,8), %rax
movl $0xf1f1f1f1, %esi       # imm = 0xF1F1F1F1
movq %rsi, 0x18(%rcx,%rdx,8)
retq
// File: /workspace/github_c_makefile_star2_O3/lucvoo[P]sparse-dev/ptrlist.c
// Function: delete_ptr_list_last
void * delete_ptr_list_last(struct ptr_list **head)
{
	void *ptr = NULL;
	struct ptr_list *last, *first = *head;

	if (!first)
		return NULL;
	last = first->prev;
	if (last->nr)
		ptr = last->list[--last->nr];
	if (last->nr <=0) {
		first->prev = last->prev;
		last->prev->next = first;
		if (last == first)
			*head = NULL;
		__free_ptrlist(last);
	}
	return ptr;
}

// Assembly:
pushq %rbx
movq (%rdi), %rax
testq %rax, %rax
je 0x22ae1
movq 0x8(%rax), %rsi
movzwl (%rsi), %ecx
testb %cl, %cl
je 0x22ae5
leal -0x1(%rcx), %edx
movzbl %dl, %r8d
andl $0xffffff00, %ecx       # imm = 0xFFFFFF00
orl %r8d, %ecx
movw %cx, (%rsi)
movsbq %dl, %rdx
movq 0x18(%rsi,%rdx,8), %rbx
jmp 0x22ae7
xorl %ebx, %ebx
jmp 0x22b0f
xorl %ebx, %ebx
testb %cl, %cl
jg 0x22b0f
movq 0x8(%rsi), %rcx
movq %rcx, 0x8(%rax)
movq %rax, 0x10(%rcx)
cmpq %rax, %rsi
jne 0x22b03
movq $0x0, (%rdi)
leaq 0x41236(%rip), %rdi     # 0x63d40
callq 0x2f6f4
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/lucvoo[P]sparse-dev/ptrlist.c
// Function: concat_ptr_list
void concat_ptr_list(struct ptr_list *a, struct ptr_list **b)
{
	void *entry;
	FOR_EACH_PTR(a, entry) {
		add_ptr_list(b, entry);
	} END_FOR_EACH_PTR(entry);
}

// Assembly:
testq %rdi, %rdi
je 0x22b79
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq %rdi, %r15
movzwl (%r15), %eax
testb %al, %al
jle 0x22b65
xorl %r12d, %r12d
movq 0x18(%r15,%r12,8), %rsi
movzwl %ax, %ecx
cmpl $0x100, %ecx            # imm = 0x100
jb 0x22b4a
testq %rsi, %rsi
je 0x22b56
movq %rbx, %rdi
callq 0x227b4
movzwl (%r15), %eax
incq %r12
movzwl %ax, %ecx
movsbq %cl, %rcx
cmpq %rcx, %r12
jl 0x22b35
movq 0x10(%r15), %r15
cmpq %r14, %r15
jne 0x22b2a
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/lucvoo[P]sparse-dev/ptrlist.c
// Function: copy_ptr_list
void copy_ptr_list(struct ptr_list **listp, struct ptr_list *src)
{
	struct ptr_list *head, *tail;
	struct ptr_list *cur = src;
	int idx;

	if (!src)
		return;
	head = *listp;
	if (!head) {
		*listp = src;
		return;
	}

	tail = head->prev;
	idx = tail->nr;
	do {
		struct ptr_list *next;
		int nr = cur->nr;
		int i;
		for (i = 0; i < nr;) {
			void *ptr = cur->list[i++];
			if (!ptr)
				continue;
			if (idx >= LIST_NODE_NR) {
				struct ptr_list *prev = tail;
				tail = __alloc_ptrlist(0);
				prev->next = tail;
				tail->prev = prev;
				prev->nr = idx;
				idx = 0;
			}
			tail->list[idx++] = ptr;
		}

		next = cur->next;
		__free_ptrlist(cur);
		cur = next;
	} while (cur != src);

	tail->nr = idx;
	head->prev = tail;
	tail->next = head;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, 0x8(%rsp)
testq %rsi, %rsi
je 0x22c3f
movq (%rdi), %rax
testq %rax, %rax
je 0x22c37
movq %rax, 0x10(%rsp)
movq 0x8(%rax), %r13
movsbl (%r13), %ebp
movq 0x8(%rsp), %r15
movsbl (%r15), %eax
testw %ax, %ax
jle 0x22c07
movzwl %ax, %r12d
xorl %ebx, %ebx
movq 0x18(%r15,%rbx,8), %r14
testq %r14, %r14
je 0x22bff
cmpl $0xd, %ebp
jl 0x22bf5
leaq 0x41166(%rip), %rdi     # 0x63d40
movl $0x80, %esi
callq 0x2f700
movq %rax, 0x10(%r13)
movq %r13, 0x8(%rax)
movb %bpl, (%r13)
xorl %ebp, %ebp
movq %rax, %r13
movslq %ebp, %rax
incl %ebp
movq %r14, 0x18(%r13,%rax,8)
incq %rbx
cmpq %rbx, %r12
jne 0x22bc4
movq 0x10(%r15), %rbx
leaq 0x4112e(%rip), %rdi     # 0x63d40
movq %r15, %rsi
callq 0x2f6f4
movq %rbx, %r15
cmpq 0x8(%rsp), %rbx
jne 0x22bb5
movb %bpl, (%r13)
movq 0x10(%rsp), %rax
movq %r13, 0x8(%rax)
movq %rax, 0x10(%r13)
jmp 0x22c3f
movq 0x8(%rsp), %rax
movq %rax, (%rdi)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/lucvoo[P]sparse-dev/ptrlist.c
// Function: _free_ptr_list
void __free_ptr_list(struct ptr_list **listp)
{
	struct ptr_list *tmp, *list = *listp;

	if (!list)
		return;

	list->prev->next = NULL;
	while (list) {
		tmp = list;
		list = list->next;
		__free_ptrlist(tmp);
	}

	*listp = NULL;
}

// Assembly:
movq (%rdi), %rsi
testq %rsi, %rsi
je 0x22c91
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rsi), %rax
movq $0x0, 0x10(%rax)
leaq 0x410cf(%rip), %r14     # 0x63d40
movq 0x10(%rsi), %r15
movq %r14, %rdi
callq 0x2f6f4
movq %r15, %rsi
testq %r15, %r15
jne 0x22c71
movq $0x0, (%rbx)
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O3/lucvoo[P]sparse-dev/scope.c
// Function: rebind_scope
void rebind_scope(struct symbol *sym, struct scope *new)
{
	struct scope *old = sym->scope;

	if (old == new)
		return;

	if (old)
		delete_ptr_list_entry((struct ptr_list**) &old->symbols, sym, 1);

	bind_scope(sym, new);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x30(%rdi), %rdi
cmpq %rsi, %rdi
je 0x22ced
movq %rsi, %r14
testq %rdi, %rdi
je 0x22cd7
movq %rbx, %rsi
movl $0x1, %edx
callq 0x228ce
movq %r14, 0x30(%rbx)
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x227b4
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/lucvoo[P]sparse-dev/scope.c
// Function: start_file_scope
void start_file_scope(void)
{
	struct scope *scope = __alloc_scope(0);

	scope->next = &builtin_scope;
	file_scope = scope;

	/* top-level stuff defaults to file scope, "extern" etc will choose global scope */
	function_scope = scope;
	block_scope = scope;
}

// Assembly:
pushq %rax
xorl %edi, %edi
callq 0x2fb1e
leaq 0x41074(%rip), %rcx     # 0x63d78
movq %rcx, 0x8(%rax)
movq %rax, 0x41089(%rip)     # 0x63d98
movq %rax, 0x4107a(%rip)     # 0x63d90
movq %rax, 0x4106b(%rip)     # 0x63d88
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O3/lucvoo[P]sparse-dev/scope.c
// Function: end_scope
static void end_scope(struct scope **s)
{
	struct scope *scope = *s;
	struct symbol_list *symbols = scope->symbols;
	struct symbol *sym;

	*s = scope->next;
	scope->symbols = NULL;
	FOR_EACH_PTR(symbols, sym) {
		remove_symbol_scope(sym);
	} END_FOR_EACH_PTR(sym);
}

// Assembly:
movq (%rdi), %rcx
movq (%rcx), %rax
movq 0x8(%rcx), %rdx
movq %rdx, (%rdi)
movq $0x0, (%rcx)
testq %rax, %rax
je 0x22df6
movq %rax, %rcx
movzwl (%rcx), %esi
testb %sil, %sil
jle 0x22ded
xorl %edx, %edx
movq 0x18(%rcx,%rdx,8), %rdi
movzwl %si, %r8d
cmpl $0x100, %r8d            # imm = 0x100
jb 0x22dbd
testq %rdi, %rdi
je 0x22dde
movq 0x18(%rdi), %rsi
addq $0x8, %rsi
movq %rsi, %r8
movq (%rsi), %r9
leaq 0x20(%r9), %rsi
cmpq %rdi, %r9
jne 0x22dc5
movq 0x20(%rdi), %rsi
movq %rsi, (%r8)
movzwl (%rcx), %esi
incq %rdx
movzwl %si, %edi
movsbq %dil, %rdi
cmpq %rdi, %rdx
jl 0x22da6
movq 0x10(%rcx), %rcx
cmpq %rax, %rcx
jne 0x22d9c
retq
// File: /workspace/github_c_makefile_star2_O3/lucvoo[P]sparse-dev/scope.c
// Function: end_label_scope
void end_label_scope(void)
{
	struct symbol *sym;

	FOR_EACH_PTR(label_scope->symbols, sym) {
		if (!sym->stmt || sym->used)
			continue;
		if (sym->label_modifiers & MOD_UNUSED)
			continue;
		warning(sym->pos, "unused label '%s'", show_ident(sym->ident));
	} END_FOR_EACH_PTR(sym);

	end_scope(&label_scope);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq 0x47624(%rip), %rax     # 0x6a498
movq (%rax), %r14
testq %r14, %r14
je 0x22ef4
leaq 0x23647(%rip), %rbx     # 0x464ca
movq %r14, %r15
movzwl (%r15), %eax
testb %al, %al
jle 0x22eeb
xorl %r12d, %r12d
movq 0x18(%r15,%r12,8), %r13
movzwl %ax, %ecx
cmpl $0x100, %ecx            # imm = 0x100
jb 0x22ea6
testq %r13, %r13
je 0x22edc
cmpq $0x0, 0x90(%r13)
je 0x22edc
testb $0x2, 0x2(%r13)
jne 0x22edc
testb $0x40, 0x5a(%r13)
jne 0x22edc
movq 0x18(%r13), %rdi
callq 0x2de35
movq 0x4(%r13), %rdi
movq %rbx, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x118fc
movzwl (%r15), %eax
incq %r12
movzwl %ax, %ecx
movsbq %cl, %rcx
cmpq %rcx, %r12
jl 0x22e91
movq 0x10(%r15), %r15
cmpq %r14, %r15
jne 0x22e86
leaq 0x4759d(%rip), %rdi     # 0x6a498
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x22d80
// File: /workspace/github_c_makefile_star2_O3/lucvoo[P]sparse-dev/scope.c
// Function: is_in_scope
int is_in_scope(struct scope *outer, struct scope *inner)
{
	while (inner != outer) {
		if (inner == function_scope)
			return 0;
		inner = inner->next;
	}
	return 1;
}

// Assembly:
movl $0x1, %eax
cmpq %rdi, %rsi
je 0x22f6a
movq 0x40e34(%rip), %rcx     # 0x63d90
cmpq %rcx, %rsi
je 0x22f6b
movq 0x8(%rsi), %rsi
cmpq %rdi, %rsi
jne 0x22f5c
retq
xorl %eax, %eax
retq
nop
// File: /workspace/github_c_makefile_star2_O3/lucvoo[P]sparse-dev/show-parse.c
// Function: show_modifiers
static const char *show_modifiers(unsigned long mod, int term)
{
	static char buffer[100];
	int len = 0;
	int i;
	struct mod_name {
		unsigned long mod;
		const char *name;
	} *m;

	static struct mod_name mod_names[] = {
		{MOD_AUTO,		"auto"},
		{MOD_EXTERN,		"extern"},
		{MOD_REGISTER,		"register"},
		{MOD_STATIC,		"static"},
		{MOD_INLINE,		"inline"},
		{MOD_CONST,		"const"},
		{MOD_RESTRICT,		"restrict"},
		{MOD_VOLATILE,		"volatile"},
		{MOD_ADDRESSABLE,	"[addressable]"},
		{MOD_ASSIGNED,		"[assigned]"},
		{MOD_ATOMIC,		"[atomic]"},
		{MOD_BITWISE,		"[bitwise]"},
		{MOD_EXPLICITLY_SIGNED,	"[explicitly-signed]"},
		{MOD_GNU_INLINE,	"[gnu_inline]"},
		{MOD_NOCAST,		"[nocast]"},
		{MOD_NODEREF,		"[noderef]"},
		{MOD_NORETURN,		"[noreturn]"},
		{MOD_PURE,		"[pure]"},
		{MOD_SAFE,		"[safe]"},
		{MOD_SIGNED,		"[signed]"},
		{MOD_TLS,		"[tls]"},
		{MOD_TOPLEVEL,		"[toplevel]"},
		{MOD_UNSIGNED,		"[unsigned]"},
		{MOD_UNUSED,		"[unused]"},
		{MOD_USERTYPE,		"[usertype]"},
	};

	for (i = 0; i < ARRAY_SIZE(mod_names); i++) {
		m = mod_names + i;
		if (mod & m->mod) {
			char c;
			const char *name = m->name;
			while ((c = *name++) != '\0' && len + 2 < sizeof buffer)
				buffer[len++] = c;
			buffer[len++] = ' ';
		}
	}
	if (len && !term)		// strip the trailing space
		--len;
	buffer[len] = 0;
	return buffer;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
xorl %edx, %edx
leaq 0x35ef1(%rip), %r8      # 0x58ea0
leaq 0x475ba(%rip), %rax     # 0x6a570
xorl %ecx, %ecx
movq %rdx, %r9
shlq $0x4, %r9
testq %rdi, (%r9,%r8)
je 0x23017
addq %r8, %r9
movq 0x8(%r9), %r9
movb (%r9), %r10b
testb %r10b, %r10b
je 0x2300d
leal 0x2(%rcx), %r11d
cmpl $0x63, %r11d
ja 0x2300d
movslq %ecx, %r11
leaq 0x3(%r11), %rbx
xorl %r14d, %r14d
leaq (%r11,%r14), %r15
movb %r10b, (%rax,%r15)
movb 0x1(%r9,%r14), %r10b
leaq 0x1(%r14), %r15
testb %r10b, %r10b
je 0x2300a
addq %rbx, %r14
cmpq $0x64, %r14
movq %r15, %r14
jb 0x22fe8
addl %r15d, %ecx
movslq %ecx, %r9
incl %ecx
movb $0x20, (%r9,%rax)
incq %rdx
cmpq $0x19, %rdx
jne 0x22fb8
testl %ecx, %ecx
setne %dl
testl %esi, %esi
sete %sil
andb %dl, %sil
movslq %ecx, %rcx
movzbl %sil, %edx
subq %rdx, %rcx
movb $0x0, (%rcx,%rax)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/lucvoo[P]sparse-dev/show-parse.c
// Function: show_symbol_list
void show_symbol_list(struct symbol_list *list)
{
	struct symbol *sym;
	const char *prepend = "";

	FOR_EACH_PTR(list, sym) {
		puts(prepend);
		prepend = ", ";
		show_symbol(sym);
	} END_FOR_EACH_PTR(sym);
}

// Assembly:
testq %rdi, %rdi
je 0x230cd
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
leaq 0x1d862(%rip), %rdi     # 0x408cd
leaq 0x1e709(%rip), %r15     # 0x4177b
movq %rbx, %r12
movzwl (%r12), %eax
testb %al, %al
jle 0x230ba
xorl %r13d, %r13d
movq 0x18(%r12,%r13,8), %r14
movzwl %ax, %ecx
cmpl $0x100, %ecx            # imm = 0x100
jb 0x23096
testq %r14, %r14
je 0x230ab
callq 0xe0a0
movq %r14, %rdi
callq 0x230ce
movzwl (%r12), %eax
movq %r15, %rdi
incq %r13
movzwl %ax, %ecx
movsbq %cl, %rcx
cmpq %rcx, %r13
jl 0x23081
movq 0x10(%r12), %r12
cmpq %rbx, %r12
jne 0x23075
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/lucvoo[P]sparse-dev/show-parse.c
// Function: show_symbol
void show_symbol(struct symbol *sym)
{
	struct symbol *type;

	if (!sym)
		return;

	if (sym->ctype.alignment)
		printf(".align %ld\n", sym->ctype.alignment);

	show_type(sym);
	type = sym->ctype.base_type;
	if (!type) {
		printf("\n");
		return;
	}

	/*
	 * Show actual implementation information
	 */
	switch (type->type) {
		struct symbol *member;

	case SYM_STRUCT:
	case SYM_UNION:
		printf(" {\n");
		FOR_EACH_PTR(type->symbol_list, member) {
			show_struct_member(member);
		} END_FOR_EACH_PTR(member);
		printf("}\n");
		break;

	case SYM_FN: {
		struct statement *stmt = type->stmt;
		printf("\n");
		if (stmt) {
			int val;
			val = show_statement(stmt);
			if (val)
				printf("\tmov.%d\t\tretval,%d\n", stmt->ret->bit_size, val);
			printf("\tret\n");
		}
		break;
	}

	default:
		printf("\n");
		break;
	}

	if (sym->initializer) {
		printf(" = \n");
		show_expression(sym->initializer);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x23259
movq %rdi, %rbx
movq 0x70(%rdi), %rsi
testq %rsi, %rsi
je 0x230fc
leaq 0x234fe(%rip), %rdi     # 0x465f3
xorl %eax, %eax
callq 0xe0f0
movq %rbx, %rdi
callq 0x232f8
movq 0x60(%rbx), %r14
testq %r14, %r14
je 0x231bb
movzbl (%r14), %eax
leal -0x7(%rax), %ecx
cmpl $0x2, %ecx
jae 0x231d3
leaq 0x23ba4(%rip), %rdi     # 0x46ccc
callq 0xe0a0
movq 0x98(%r14), %r15
testq %r15, %r15
je 0x231b2
leaq 0x2391a(%rip), %r14     # 0x46a5a
movq %r15, %r12
movzwl (%r12), %eax
testb %al, %al
jle 0x231a8
xorl %r13d, %r13d
movq 0x18(%r12,%r13,8), %rbp
movzwl %ax, %ecx
cmpl $0x100, %ecx            # imm = 0x100
jb 0x23164
testq %rbp, %rbp
je 0x23199
movq 0x18(%rbp), %rdi
callq 0x2de35
movl 0x50(%rbp), %edx
movq 0x70(%rbp), %rcx
movq 0x48(%rbp), %r8
movzbl 0x54(%rbp), %r9d
movq %r14, %rdi
movq %rax, %rsi
xorl %eax, %eax
callq 0xe0f0
movl $0xa, %edi
callq 0xe040
movzwl (%r12), %eax
incq %r13
movzwl %ax, %ecx
movsbq %cl, %rcx
cmpq %rcx, %r13
jl 0x2314f
movq 0x10(%r12), %r12
cmpq %r15, %r12
jne 0x23143
leaq 0x23b16(%rip), %rdi     # 0x46ccf
jmp 0x23218
movl $0xa, %edi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xe040
cmpl $0x5, %eax
jne 0x2321f
movq 0x90(%r14), %r14
movl $0xa, %edi
callq 0xe040
testq %r14, %r14
je 0x23229
movq %r14, %rdi
callq 0x237f3
testl %eax, %eax
je 0x23211
movq 0x18(%r14), %rcx
movl 0x50(%rcx), %esi
leaq 0x233f7(%rip), %rdi     # 0x465ff
movl %eax, %edx
xorl %eax, %eax
callq 0xe0f0
leaq 0x23aaf(%rip), %rdi     # 0x46cc7
callq 0xe0a0
jmp 0x23229
movl $0xa, %edi
callq 0xe040
cmpq $0x0, 0xb0(%rbx)
je 0x23259
leaq 0x23a97(%rip), %rdi     # 0x46cd1
callq 0xe0a0
movq 0xb0(%rbx), %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x23ded
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/lucvoo[P]sparse-dev/show-parse.c
// Function: show_type
void show_type(struct symbol *sym)
{
	char array[200];
	struct type_name name;

	name.start = name.end = array+100;
	do_show_type(sym, &name);
	*name.end = 0;
	printf("%s", name.start);
}

// Assembly:
pushq %rbx
subq $0xe0, %rsp
leaq 0x74(%rsp), %rax
movq %rsp, %rbx
movq %rax, 0x8(%rbx)
movq %rax, (%rbx)
movq %rbx, %rsi
callq 0x23338
movq 0x8(%rbx), %rax
movb $0x0, (%rax)
movq (%rbx), %rsi
leaq 0x28115(%rip), %rdi     # 0x4b43d
xorl %eax, %eax
callq 0xe0f0
addq $0xe0, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/lucvoo[P]sparse-dev/show-parse.c
// Function: show_typename
const char *show_typename(struct symbol *sym)
{
	static char array[200];
	struct type_name name;

	name.start = name.end = array+100;
	do_show_type(sym, &name);
	*name.end = 0;
	return name.start;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
leaq 0x46d33(%rip), %rax     # 0x6a504
movq %rsp, %rbx
movq %rax, 0x8(%rbx)
movq %rax, (%rbx)
movq %rbx, %rsi
callq 0x23338
movq 0x8(%rbx), %rax
movb $0x0, (%rax)
movq (%rbx), %rax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/lucvoo[P]sparse-dev/show-parse.c
// Function: show_symbol_decl
static void show_symbol_decl(struct symbol_list *syms)
{
	struct symbol *sym;
	FOR_EACH_PTR(syms, sym) {
		show_symbol_init(sym);
	} END_FOR_EACH_PTR(sym);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, (%rsp)
testq %rdi, %rdi
je 0x241f5
leaq 0x228f7(%rip), %r14     # 0x46a76
movq (%rsp), %r13
movzwl (%r13), %eax
testb %al, %al
jle 0x241eb
xorl %ebx, %ebx
movq 0x18(%r13,%rbx,8), %r15
movzwl %ax, %ecx
cmpl $0x100, %ecx            # imm = 0x100
jb 0x241a3
testq %r15, %r15
je 0x241dc
movq 0xb0(%r15), %rdi
testq %rdi, %rdi
je 0x241dc
movq 0x10(%rdi), %rax
movl 0x50(%rax), %ebp
callq 0x23ded
movl %eax, %r12d
movq %r15, %rdi
callq 0x24204
movq %r14, %rdi
movl %ebp, %esi
movl %r12d, %edx
movl %eax, %ecx
xorl %eax, %eax
callq 0xe0f0
movzwl (%r13), %eax
incq %rbx
movzwl %ax, %ecx
movsbq %cl, %rcx
cmpq %rcx, %rbx
jl 0x2418e
movq 0x10(%r13), %r13
cmpq (%rsp), %r13
jne 0x24183
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/lucvoo[P]sparse-dev/show-parse.c
// Function: show_symbol_expr
static int show_symbol_expr(struct symbol *sym)
{
	int new = new_pseudo();

	if (sym->initializer && sym->initializer->type == EXPR_STRING)
		return show_string_expr(sym->initializer);

	if (sym->ctype.modifiers & (MOD_TOPLEVEL | MOD_EXTERN | MOD_STATIC)) {
		printf("\tmovi.%d\t\tv%d,$%s\n", bits_in_pointer, new, show_ident(sym->ident));
		return new;
	}
	if (sym->ctype.modifiers & MOD_ADDRESSABLE) {
		printf("\taddi.%d\t\tv%d,vFP,$%lld\n", bits_in_pointer, new, 0LL);
		return new;
	}
	printf("\taddi.%d\t\tv%d,vFP,$offsetof(%s:%p)\n", bits_in_pointer, new, show_ident(sym->ident), sym);
	return new;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movl 0x467cb(%rip), %r15d    # 0x6a9e0
leal 0x1(%r15), %ebx
movl %ebx, 0x467c1(%rip)     # 0x6a9e0
movq 0xb0(%rdi), %rax
testq %rax, %rax
je 0x24268
cmpb $0x2, (%rax)
jne 0x24268
movq 0x28(%rax), %rdi
addl $0x2, %r15d
movl %r15d, 0x467a1(%rip)    # 0x6a9e0
leaq 0x404e6(%rip), %rax     # 0x6472c
movl (%rax), %ebx
callq 0x2de83
leaq 0x229e2(%rip), %rdi     # 0x46c36
movl %ebx, %esi
movl %r15d, %edx
movq %rax, %rcx
xorl %eax, %eax
callq 0xe0f0
movl %r15d, %ebx
jmp 0x242d8
movq 0x68(%r14), %rax
testb $0x1c, %al
je 0x24292
leaq 0x404b5(%rip), %rax     # 0x6472c
movl (%rax), %ebp
movq 0x18(%r14), %rdi
callq 0x2de35
leaq 0x22858(%rip), %rdi     # 0x46ae1
movl %ebp, %esi
movl %ebx, %edx
movq %rax, %rcx
jmp 0x242d1
btl $0x8, %eax
leaq 0x4048f(%rip), %rax     # 0x6472c
movl (%rax), %ebp
jb 0x242c4
movq 0x18(%r14), %rdi
callq 0x2de35
leaq 0x2285c(%rip), %rdi     # 0x46b0d
movl %ebp, %esi
movl %ebx, %edx
movq %rax, %rcx
movq %r14, %r8
xorl %eax, %eax
callq 0xe0f0
jmp 0x242d8
leaq 0x22829(%rip), %rdi     # 0x46af4
movl %ebp, %esi
movl %ebx, %edx
xorl %ecx, %ecx
xorl %eax, %eax
callq 0xe0f0
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/lucvoo[P]sparse-dev/show-parse.c
// Function: show_symbol_expr_init
int show_symbol_expr_init(struct symbol *sym)
{
	struct expression *expr = sym->initializer;

	if (expr)
		show_expression(expr);
	return show_symbol_expr(sym);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0xb0(%rdi), %rdi
testq %rdi, %rdi
je 0x242fa
callq 0x23ded
movq %rbx, %rdi
popq %rbx
jmp 0x24204
// File: /workspace/github_c_makefile_star2_O3/lucvoo[P]sparse-dev/show-parse.c
// Function: show_call_expression
static int show_call_expression(struct expression *expr)
{
	struct symbol *direct;
	struct expression *arg, *fn;
	int fncall, retval;
	int framesize;

	if (!expr->ctype) {
		warning(expr->pos, "\tcall with no type!");
		return 0;
	}

	framesize = 0;
	FOR_EACH_PTR_REVERSE(expr->args, arg) {
		int new = show_expression(arg);
		int size = arg->ctype->bit_size;
		printf("\tpush.%d\t\tv%d\n", size, new);
		framesize += bits_to_bytes(size);
	} END_FOR_EACH_PTR_REVERSE(arg);

	fn = expr->fn;

	/* Remove dereference, if any */
	direct = NULL;
	if (fn->type == EXPR_PREOP) {
		if (fn->unop->type == EXPR_SYMBOL) {
			struct symbol *sym = fn->unop->symbol;
			if (sym->ctype.base_type->type == SYM_FN)
				direct = sym;
		}
	}
	if (direct) {
		printf("\tcall\t\t%s\n", show_ident(direct->ident));
	} else {
		fncall = show_expression(fn);
		printf("\tcall\t\t*v%d\n", fncall);
	}
	if (framesize)
		printf("\tadd.%d\t\tvSP,vSP,$%d\n", bits_in_pointer, framesize);

	retval = new_pseudo();
	printf("\tmov.%d\t\tv%d,retval\n", expr->ctype->bit_size, retval);
	return retval;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
cmpq $0x0, 0x10(%rdi)
je 0x243a6
movq %rdi, (%rsp)
movq 0x28(%rdi), %rbx
testq %rbx, %rbx
je 0x243bf
leaq 0x22814(%rip), %r14     # 0x46b45
movq %rbx, %r12
xorl %ebp, %ebp
movq 0x8(%r12), %r12
movsbq (%r12), %r13
movl %r13d, %r13d
testl %r13d, %r13d
jle 0x2439f
movq 0x10(%r12,%r13,8), %r15
decq %r13
cmpw $0x100, (%r12)          # imm = 0x100
jb 0x2435e
testq %r15, %r15
je 0x24343
movq %r15, %rdi
callq 0x23ded
movq 0x10(%r15), %rcx
movl 0x50(%rcx), %r15d
movq %r14, %rdi
movl %r15d, %esi
movl %eax, %edx
xorl %eax, %eax
callq 0xe0f0
testl %r15d, %r15d
js 0x24396
leaq 0x40377(%rip), %rax     # 0x64700
movl (%rax), %ecx
leal (%r15,%rcx), %eax
decl %eax
cltd
idivl %ecx
jmp 0x2439b
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addl %eax, %ebp
jmp 0x24340
cmpq %rbx, %r12
jne 0x24336
jmp 0x243c1
movq 0x8(%rdi), %rdi
leaq 0x22780(%rip), %rsi     # 0x46b31
xorl %ebp, %ebp
xorl %eax, %eax
callq 0x118fc
jmp 0x24457
xorl %ebp, %ebp
movq (%rsp), %rbx
movq 0x20(%rbx), %rdi
cmpb $0x9, (%rdi)
jne 0x24400
movq 0x20(%rdi), %rax
cmpb $0x3, (%rax)
jne 0x24400
movq 0x20(%rax), %rax
movq 0x60(%rax), %rcx
cmpb $0x5, (%rcx)
jne 0x24400
movq 0x18(%rax), %rdi
callq 0x2de35
leaq 0x22760(%rip), %rdi     # 0x46b54
movq %rax, %rsi
xorl %eax, %eax
callq 0xe0f0
jmp 0x24415
callq 0x23ded
leaq 0x22753(%rip), %rdi     # 0x46b5f
movl %eax, %esi
xorl %eax, %eax
callq 0xe0f0
testl %ebp, %ebp
je 0x24432
leaq 0x4030c(%rip), %rax     # 0x6472c
movl (%rax), %esi
leaq 0x22743(%rip), %rdi     # 0x46b6c
movl %ebp, %edx
xorl %eax, %eax
callq 0xe0f0
movl 0x465a8(%rip), %ebp     # 0x6a9e0
incl %ebp
movl %ebp, 0x465a0(%rip)     # 0x6a9e0
movq 0x10(%rbx), %rax
movl 0x50(%rax), %esi
leaq 0x22734(%rip), %rdi     # 0x46b82
movl %ebp, %edx
xorl %eax, %eax
callq 0xe0f0
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq