// File: /workspace/github_c_makefile_star2_O2/martincameron[P]towntalk/towntalk.c
// Function: parse_include
static struct element* parse_include( struct element *elem,
	struct function *func, struct variables *vars, struct statement *prev, char *message ) {
	struct element *next = elem->next;
	struct string_list *include;
	int path_len = str_idx( func->file->string, "/:\\", -1 ) + 1;
	int name_len = unquote_string( next->str.string, NULL, '"' );
	struct string *path = ( struct string * ) new_source( path_len + name_len );
	if( path ) {
		memcpy( path->string, func->file->string, sizeof( char ) * path_len );
		unquote_string( next->str.string, &path->string[ path_len ], '"' );
		if( strchr( "/\\", path->string[ path_len ] ) || strchr( &path->string[ path_len ], ':' ) ) {
			/* Absolute path. */
			unquote_string( next->str.string, path->string, '"' );
		}
		if( get_string_list_index( func->env->include_paths, next->str.string ) < 0 ) {
			include = new_string_list( &next->str, func->env->include_paths );
			if( include ) {
				func->env->include_paths = include;
				if( include_tt_file( path, func->env, message ) ) {
					next = next->next->next;
				}
				func->env->include_paths = include->next;
				unref_string( include->str );
				free( include );
			} else {
				strcpy( message, OUT_OF_MEMORY );
			}
		} else {
			sprintf( message, "File %.64s already included on line %d.\n", next->str.string, elem->line );
		}
		unref_string( path );
	} else {
		strcpy( message, OUT_OF_MEMORY );
	}
	return next;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r12
movq %rsi, %r15
movq %rdi, %r13
movq 0x20(%rdi), %rbx
movq 0x28(%rsi), %rax
movq 0x8(%rax), %rdi
leaq 0x9317(%rip), %rsi      # 0x11b56
pushq $-0x1
popq %rdx
callq 0x8ba5
movslq %eax, %rbp
incq %rbp
movq 0x8(%rbx), %rdi
pushq $0x22
popq %rdx
xorl %esi, %esi
callq 0x793e
leal (%rax,%rbp), %edi
callq 0x36ed
testq %rax, %rax
je 0x890c
movq %rax, %r14
movq %r12, (%rsp)
movq 0x8(%rax), %rdi
movq 0x28(%r15), %rax
movq 0x8(%rax), %rsi
movq %rbp, %rdx
callq 0x3180
movq 0x8(%rbx), %rdi
movq 0x8(%r14), %rsi
addq %rbp, %rsi
pushq $0x22
popq %rdx
callq 0x793e
movq 0x8(%r14), %r12
movzbl (%r12,%rbp), %eax
testl %eax, %eax
je 0x88c4
cmpl $0x2f, %eax
je 0x88c4
cmpl $0x5c, %eax
je 0x88c4
addq %r12, %rbp
pushq $0x3a
popq %rsi
movq %rbp, %rdi
callq 0x30d0
testq %rax, %rax
je 0x88d3
movq 0x8(%rbx), %rdi
pushq $0x22
popq %rdx
movq %r12, %rsi
callq 0x793e
movq 0x40(%r15), %rax
movq 0x390(%rax), %rbp
movq 0x8(%rbx), %r12
movq %rbp, %rdi
movq %r12, %rsi
callq 0x7d09
testl %eax, %eax
js 0x891d
movl 0x28(%r13), %ecx
leaq 0x925e(%rip), %rsi      # 0x11b5a
movq (%rsp), %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0x3200
jmp 0x8985
movq 0xf85d(%rip), %rsi      # 0x18170
movq %r12, %rdi
callq 0x3070
jmp 0x898d
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x3e43
testq %rax, %rax
je 0x8975
movq %rax, %r13
movq 0x40(%r15), %rsi
movq %rax, 0x390(%rsi)
movq %r14, %rdi
movq (%rsp), %rdx
callq 0x73b5
testl %eax, %eax
je 0x8953
movq 0x20(%rbx), %rax
movq 0x20(%rax), %rbx
movq 0x8(%r13), %rax
movq 0x40(%r15), %rcx
movq %rax, 0x390(%rcx)
movq (%r13), %rdi
callq 0x38b2
movq %r13, %rdi
callq 0x3030
jmp 0x8985
movq 0xf7f4(%rip), %rsi      # 0x18170
movq (%rsp), %rdi
callq 0x3070
movq %r14, %rdi
callq 0x38b2
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq