// File: /workspace/github_c_makefile_star2_O2/martincameron[P]towntalk/towntalk.c
// Function: parse_member_call_expression
static struct element* parse_member_call_expression( struct structure *struc, struct expression *this,
	char *memb, struct element *elem, struct function *func, struct variables *vars, struct expression *prev, char *message ) {
	char qname[ 65 ];
	int num_params, qlen, mlen = strlen( memb );
	struct expression *expr;
	struct function *decl = NULL;
	struct element *next = elem->next;
	if( struc ) {
		while( struc && decl == NULL ) {
			qlen = struc->str.length + 1 + mlen;
			if( qlen < 65 ) {
				strcpy( qname, struc->str.string );
				qname[ struc->str.length ] = '_';
				strcpy( &qname[ struc->str.length + 1 ], memb );
				decl = ( struct function * ) get_decl_indexed( func, qname, qlen, FUNCTION );
			}
			struc = struc->super;
		}
		if( decl ) {
			expr = calloc( 1, sizeof( struct function_expression ) );
			if( expr ) {
				prev->next = expr;
				expr->line = elem->line;
				expr->parameters = this;
				( ( struct function_expression * ) expr )->function = decl;
				if( next && next->str.string[ 0 ] == '(' ) {
					parse_expressions( next->child, func, vars, 0, this, &num_params, message );
					if( message[ 0 ] == 0 ) {
						if( num_params + 1 == ( ( struct function_expression * ) expr )->function->num_parameters ) {
							expr->evaluate = evaluate_call_expression;
							next = next->next;
						} else {
							sprintf( message, "Wrong number of arguments to '%.64s()' on line %d.", decl->str.string, next->line );
						}
					}
				} else {
					sprintf( message, "Expected '(' after function name on line %d.", elem->line );
				}
			} else {
				strcpy( message, OUT_OF_MEMORY );
			}
		} else {
			sprintf( message, "Member function not found for expression '%.64s' on line %d.", elem->str.string, elem->line );
		}
	} else {
		sprintf( message, "Expression '%.64s' has no associated structure on line %d.", elem->str.string, elem->line );
	}
	return next;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rdi, %r12
movq 0xb8(%rsp), %rdi
movq 0x20(%rcx), %rbp
testq %r12, %r12
je 0x80a2
movq %r8, %r13
movq %rdx, %r15
movq %rcx, 0x10(%rsp)
movq %rsi, 0x28(%rsp)
movq %r9, 0x20(%rsp)
movq %rbp, 0x18(%rsp)
movq %rdx, %rdi
callq 0x30c0
movq %rax, %rbx
incl %ebx
xorl %r14d, %r14d
leaq 0x30(%rsp), %rbp
testq %r12, %r12
je 0x7ff2
testq %r14, %r14
jne 0x7ff2
movl 0x10(%r12), %r14d
addl %ebx, %r14d
cmpl $0x40, %r14d
jg 0x7fe8
movq 0x8(%r12), %rsi
movq %rbp, %rdi
callq 0x3070
movslq 0x10(%r12), %rax
movb $0x5f, 0x30(%rsp,%rax)
movslq 0x10(%r12), %rax
leaq (%rax,%rbp), %rdi
incq %rdi
movq %r15, %rsi
callq 0x3070
movq %r13, %rdi
movq %rbp, %rsi
movl %r14d, %edx
pushq $0x6
popq %rcx
callq 0x81c5
movq %rax, %r14
jmp 0x7feb
xorl %r14d, %r14d
movq 0x30(%r12), %r12
jmp 0x7f8f
testq %r14, %r14
je 0x80b9
pushq $0x1
popq %rdi
pushq $0x28
popq %rsi
callq 0x3130
testq %rax, %rax
movq 0x18(%rsp), %rbp
je 0x80fa
movq %rax, %rbx
movq 0xb0(%rsp), %rax
movq %rbx, 0x10(%rax)
movq 0x10(%rsp), %rax
movl 0x28(%rax), %edx
movl %edx, (%rbx)
movq 0x28(%rsp), %r8
movq %r8, 0x8(%rbx)
movq %r14, 0x20(%rbx)
testq %rbp, %rbp
je 0x80e2
movq 0x8(%rbp), %rax
cmpb $0x28, (%rax)
jne 0x80e2
movq 0x18(%rbp), %rdi
movq 0xb8(%rsp), %r15
movq %r15, (%rsp)
leaq 0xc(%rsp), %r9
movq %r13, %rsi
movq 0x20(%rsp), %rdx
xorl %ecx, %ecx
callq 0x7b36
cmpb $0x0, (%r15)
jne 0x810e
movl 0xc(%rsp), %eax
incl %eax
movq 0x20(%rbx), %rcx
cmpl 0x1c(%rcx), %eax
jne 0x8120
leaq -0x11d2(%rip), %rax     # 0x6ec6
movq %rax, 0x18(%rbx)
movq 0x20(%rbp), %rbp
jmp 0x810e
movq 0x8(%rcx), %rdx
movl 0x28(%rcx), %ecx
leaq 0x9762(%rip), %rsi      # 0x11812
xorl %eax, %eax
callq 0x3200
jmp 0x810e
movq 0x10(%rsp), %rax
movq 0x8(%rax), %rdx
movl 0x28(%rax), %ecx
leaq 0x9781(%rip), %rsi      # 0x1184d
movq 0xb8(%rsp), %rdi
xorl %eax, %eax
callq 0x3200
movq 0x18(%rsp), %rbp
jmp 0x810e
leaq 0x9598(%rip), %rsi      # 0x11681
movq 0xb8(%rsp), %rdi
xorl %eax, %eax
callq 0x3200
jmp 0x810e
movq 0x1006f(%rip), %rsi     # 0x18170
movq 0xb8(%rsp), %rdi
callq 0x3070
movq %rbp, %rax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x8(%r14), %rdx
movl 0x28(%rbp), %ecx
leaq 0x9520(%rip), %rsi      # 0x1164e
movq 0xb8(%rsp), %rdi
jmp 0x80b0