// File: /workspace/github_c_makefile_star2_O1/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 0x88dc
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
leaq 0x30(%rsp), %rbp
movl 0x10(%r12), %r14d
addl %ebx, %r14d
cmpl $0x40, %r14d
jg 0x8816
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
movl $0x6, %ecx
callq 0x8a06
movq %rax, %r14
jmp 0x8819
xorl %r14d, %r14d
movq 0x30(%r12), %r12
testq %r12, %r12
je 0x8828
testq %r14, %r14
je 0x87c5
testq %r14, %r14
je 0x88f3
movl $0x1, %edi
movl $0x28, %esi
callq 0x3130
testq %rax, %rax
movq 0x18(%rsp), %rbp
je 0x8934
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 0x891c
movq 0x8(%rbp), %rax
cmpb $0x28, (%rax)
jne 0x891c
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 0x8314
cmpb $0x0, (%r15)
jne 0x8948
movl 0xc(%rsp), %eax
incl %eax
movq 0x20(%rbx), %rcx
cmpl 0x1c(%rcx), %eax
jne 0x895a
leaq -0x13b9(%rip), %rax     # 0x7519
movq %rax, 0x18(%rbx)
movq 0x20(%rbp), %rbp
jmp 0x8948
movq 0x8(%rcx), %rdx
movl 0x28(%rcx), %ecx
leaq 0x9ee9(%rip), %rsi      # 0x127d3
xorl %eax, %eax
callq 0x3200
jmp 0x8948
movq 0x10(%rsp), %rax
movq 0x8(%rax), %rdx
movl 0x28(%rax), %ecx
leaq 0x9f08(%rip), %rsi      # 0x1280e
movq 0xb8(%rsp), %rdi
xorl %eax, %eax
callq 0x3200
movq 0x18(%rsp), %rbp
jmp 0x8948
leaq 0x9d19(%rip), %rsi      # 0x1263c
movq 0xb8(%rsp), %rdi
xorl %eax, %eax
callq 0x3200
jmp 0x8948
movq 0x10835(%rip), %rsi     # 0x19170
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 0x9ca1(%rip), %rsi      # 0x12609
movq 0xb8(%rsp), %rdi
jmp 0x88ea