// File: /workspace/github_c_makefile_star2_O0/martincameron[P]towntalk/towntalk.c
// Function: find_decl
static struct string* find_decl( struct function *func, char *name, enum reference_type type, char *terminators ) {
	char qname[ 65 ];
	struct string *str;
	struct string_list *imports = NULL;
	int qlen, flen = terminators ? field_end( name, terminators ) - name : strlen( name );
	if( func->file->type == SOURCE ) {
		imports = ( ( struct source * ) func->file )->imports;
	}
	str = get_decl( func->env->decls_index[ hash_code( name, name[ flen ] ) ], name, flen, type );
	while( str == NULL && imports ) {
		qlen = imports->str->length;
		if( qlen + 1 + flen < 65 ) {
			strcpy( qname, imports->str->string );
			qname[ qlen++ ] = '_';
			strncpy( &qname[ qlen ], name, flen );
			qlen += flen;
			qname[ qlen ] = 0;
			str = get_decl( func->env->decls_index[ hash_code( qname, 0 ) ], qname, qlen, type );
		}
		imports = imports->next;
	}
	if( name[ flen ] && str && str->type == FUNCTION && ( name[ flen + 1 ] || name[ flen ] != '!' ) ) {
		str = NULL;
	}
	return str;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movq $0x0, -0x80(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x7bc6
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0xaf10
movq -0x10(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x90(%rbp)
jmp 0x7bd6
movq -0x10(%rbp), %rdi
callq 0x30c0
movq %rax, -0x90(%rbp)
movq -0x90(%rbp), %rax
movl %eax, -0x88(%rbp)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movsbl 0x14(%rax), %eax
cmpl $0x8, %eax
jne 0x7c04
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq 0x18(%rax), %rax
movq %rax, -0x80(%rbp)
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movq %rax, -0x98(%rbp)
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movslq -0x88(%rbp), %rcx
movsbl (%rax,%rcx), %esi
callq 0x7960
movl %eax, %ecx
movq -0x98(%rbp), %rax
movslq %ecx, %rcx
movq 0x280(%rax,%rcx,8), %rdi
movq -0x10(%rbp), %rsi
movl -0x88(%rbp), %edx
movl -0x14(%rbp), %ecx
callq 0xb7d0
movq %rax, -0x78(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x78(%rbp)
movb %al, -0x99(%rbp)
jne 0x7c72
cmpq $0x0, -0x80(%rbp)
setne %al
movb %al, -0x99(%rbp)
movb -0x99(%rbp), %al
testb $0x1, %al
jne 0x7c81
jmp 0x7d66
movq -0x80(%rbp), %rax
movq (%rax), %rax
movl 0x10(%rax), %eax
movl %eax, -0x84(%rbp)
movl -0x84(%rbp), %eax
addl $0x1, %eax
addl -0x88(%rbp), %eax
cmpl $0x41, %eax
jge 0x7d55
leaq -0x70(%rbp), %rdi
movq -0x80(%rbp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rsi
callq 0x3070
movl -0x84(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0x84(%rbp)
cltq
movb $0x5f, -0x70(%rbp,%rax)
movslq -0x84(%rbp), %rax
leaq -0x70(%rbp), %rdi
addq %rax, %rdi
movq -0x10(%rbp), %rsi
movslq -0x88(%rbp), %rdx
callq 0x3050
movl -0x88(%rbp), %eax
addl -0x84(%rbp), %eax
movl %eax, -0x84(%rbp)
movslq -0x84(%rbp), %rax
movb $0x0, -0x70(%rbp,%rax)
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movq %rax, -0xa8(%rbp)
leaq -0x70(%rbp), %rdi
xorl %esi, %esi
callq 0x7960
movl %eax, %ecx
movq -0xa8(%rbp), %rax
movslq %ecx, %rcx
movq 0x280(%rax,%rcx,8), %rdi
leaq -0x70(%rbp), %rsi
movl -0x84(%rbp), %edx
movl -0x14(%rbp), %ecx
callq 0xb7d0
movq %rax, -0x78(%rbp)
movq -0x80(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x80(%rbp)
jmp 0x7c55
movq -0x10(%rbp), %rax
movslq -0x88(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x0, %eax
je 0x7dc3
cmpq $0x0, -0x78(%rbp)
je 0x7dc3
movq -0x78(%rbp), %rax
movsbl 0x14(%rax), %eax
cmpl $0x6, %eax
jne 0x7dc3
movq -0x10(%rbp), %rax
movl -0x88(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x0, %eax
jne 0x7dbb
movq -0x10(%rbp), %rax
movslq -0x88(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x21, %eax
je 0x7dc3
movq $0x0, -0x78(%rbp)
movq -0x78(%rbp), %rax
addq $0xb0, %rsp
popq %rbp
retq