// File: /workspace/github_c_makefile_star2_O1/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
subq $0x18, %rsp
movq %r8, %r13
movq %rdi, 0x10(%rsp)
movq 0x20(%rdi), %rbx
movq %rsi, 0x8(%rsp)
movq 0x28(%rsi), %r15
movq 0x8(%r15), %rdi
leaq 0x9a4a(%rip), %rsi      # 0x12b17
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x94a1
movslq %eax, %rbp
incq %rbp
movq 0x8(%rbx), %rdi
xorl %esi, %esi
movl $0x22, %edx
callq 0x80dc
movl %eax, %r12d
addl %ebp, %r12d
movslq %r12d, %rdi
addq $0x21, %rdi
callq 0x31b0
testq %rax, %rax
je 0x91df
movq %rax, %r14
movq %r13, (%rsp)
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movups %xmm0, 0x10(%rax)
movq %rax, %rdi
addq $0x20, %rdi
movq %rdi, 0x8(%rax)
movq $0x1, (%rax)
movl %r12d, 0x10(%rax)
movb $0x8, 0x14(%rax)
movq 0x8(%r15), %rsi
movq %rbp, %rdx
callq 0x3180
movq 0x8(%rbx), %rdi
movq 0x8(%r14), %rsi
addq %rbp, %rsi
movl $0x22, %edx
callq 0x80dc
movq 0x8(%r14), %r12
movsbl (%r12,%rbp), %esi
leaq 0x99b7(%rip), %rdi      # 0x12b1b
movl $0x3, %edx
callq 0x3110
testq %rax, %rax
jne 0x9188
addq %r12, %rbp
movq %rbp, %rdi
movl $0x3a, %esi
callq 0x30d0
testq %rax, %rax
je 0x9199
movq 0x8(%rbx), %rdi
movq %r12, %rsi
movl $0x22, %edx
callq 0x80dc
movq 0x8(%rsp), %rax
movq 0x40(%rax), %r12
movq 0x390(%r12), %rbp
movq 0x8(%rbx), %r15
movq %rbp, %rdi
movq %r15, %rsi
callq 0x852b
testl %eax, %eax
js 0x91f0
movq 0x10(%rsp), %rax
movl 0x28(%rax), %ecx
leaq 0x9952(%rip), %rsi      # 0x12b1e
movq (%rsp), %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x3200
jmp 0x9266
movq 0xff8a(%rip), %rsi      # 0x19170
movq %r13, %rdi
callq 0x3070
jmp 0x926e
movl $0x10, %edi
callq 0x31b0
testq %rax, %rax
je 0x9256
movq %rax, %r13
movq %rbx, (%rax)
incq (%rbx)
movq %rbp, 0x8(%rax)
movq %rax, 0x390(%r12)
movq %r14, %rdi
movq %r12, %rsi
movq (%rsp), %rdx
callq 0x7ac8
testl %eax, %eax
je 0x922f
movq 0x20(%rbx), %rax
movq 0x20(%rax), %rbx
movq 0x8(%rsp), %rcx
movq 0x8(%r13), %rax
movq 0x40(%rcx), %rcx
movq %rax, 0x390(%rcx)
movq (%r13), %rdi
callq 0x3979
movq %r13, %rdi
callq 0x3030
jmp 0x9266
movq 0xff13(%rip), %rsi      # 0x19170
movq (%rsp), %rdi
callq 0x3070
movq %r14, %rdi
callq 0x3979
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq