// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0xc0, %rsp
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x18(%rbp), %rdi
callq 0x30c0
movl %eax, -0x8c(%rbp)
movq $0x0, -0xa0(%rbp)
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0xa8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0xb623
jmp 0xb3e1
xorl %eax, %eax
cmpq $0x0, -0x8(%rbp)
movb %al, -0xa9(%rbp)
je 0xb401
cmpq $0x0, -0xa0(%rbp)
sete %al
movb %al, -0xa9(%rbp)
movb -0xa9(%rbp), %al
testb $0x1, %al
jne 0xb410
jmp 0xb499
movq -0x8(%rbp), %rax
movl 0x10(%rax), %eax
addl $0x1, %eax
addl -0x8c(%rbp), %eax
movl %eax, -0x88(%rbp)
cmpl $0x41, -0x88(%rbp)
jge 0xb488
leaq -0x80(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x3070
movq -0x8(%rbp), %rax
movslq 0x10(%rax), %rax
movb $0x5f, -0x80(%rbp,%rax)
movq -0x8(%rbp), %rax
movl 0x10(%rax), %eax
addl $0x1, %eax
cltq
leaq -0x80(%rbp), %rdi
addq %rax, %rdi
movq -0x18(%rbp), %rsi
callq 0x3070
movq -0x28(%rbp), %rdi
leaq -0x80(%rbp), %rsi
movl -0x88(%rbp), %edx
movl $0x6, %ecx
callq 0xb770
movq %rax, -0xa0(%rbp)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0xb3e1
cmpq $0x0, -0xa0(%rbp)
je 0xb600
movl $0x1, %edi
movl $0x28, %esi
callq 0x3120
movq %rax, -0x98(%rbp)
cmpq $0x0, -0x98(%rbp)
je 0xb5ee
movq -0x98(%rbp), %rcx
movq 0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x20(%rbp), %rax
movl 0x28(%rax), %ecx
movq -0x98(%rbp), %rax
movl %ecx, (%rax)
movq -0x10(%rbp), %rcx
movq -0x98(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0xa0(%rbp), %rcx
movq -0x98(%rbp), %rax
movq %rcx, 0x20(%rax)
cmpq $0x0, -0xa8(%rbp)
je 0xb5d3
movq -0xa8(%rbp), %rax
movq 0x8(%rax), %rax
movsbl (%rax), %eax
cmpl $0x28, %eax
jne 0xb5d3
movq -0xa8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x28(%rbp), %rsi
movq -0x30(%rbp), %rdx
movq -0x10(%rbp), %r8
movq 0x18(%rbp), %rax
xorl %ecx, %ecx
leaq -0x84(%rbp), %r9
movq %rax, (%rsp)
callq 0xac40
movq 0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0xb5d1
movl -0x84(%rbp), %eax
addl $0x1, %eax
movq -0x98(%rbp), %rcx
movq 0x20(%rcx), %rcx
cmpl 0x1c(%rcx), %eax
jne 0xb5a8
movq -0x98(%rbp), %rax
leaq -0x1d80(%rip), %rcx     # 0x9810
movq %rcx, 0x18(%rax)
movq -0xa8(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0xa8(%rbp)
jmp 0xb5cf
movq 0x18(%rbp), %rdi
movq -0xa0(%rbp), %rax
movq 0x8(%rax), %rdx
movq -0xa8(%rbp), %rax
movl 0x28(%rax), %ecx
leaq 0x1050d(%rip), %rsi     # 0x1bad5
movb $0x0, %al
callq 0x31f0
jmp 0xb5d1
jmp 0xb5ec
movq 0x18(%rbp), %rdi
movq -0x20(%rbp), %rax
movl 0x28(%rax), %edx
leaq 0x10523(%rip), %rsi     # 0x1bb08
movb $0x0, %al
callq 0x31f0
jmp 0xb5fe
movq 0x18(%rbp), %rdi
movq 0x15b67(%rip), %rsi     # 0x21160
callq 0x3070
jmp 0xb621
movq 0x18(%rbp), %rdi
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rdx
movq -0x20(%rbp), %rax
movl 0x28(%rax), %ecx
leaq 0x106c0(%rip), %rsi     # 0x1bcda
movb $0x0, %al
callq 0x31f0
jmp 0xb644
movq 0x18(%rbp), %rdi
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rdx
movq -0x20(%rbp), %rax
movl 0x28(%rax), %ecx
leaq 0x10662(%rip), %rsi     # 0x1bc9f
movb $0x0, %al
callq 0x31f0
movq -0xa8(%rbp), %rax
addq $0xc0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)