// File: /workspace/github_c_makefile_star2_O0/martincameron[P]towntalk/towntalk.c
// Function: parse_struct_expression
static struct element* parse_struct_expression( struct element *elem,
	struct function *func, struct variables *vars, struct structure *struc, struct expression *prev, char *message ) {
	int idx, count;
	struct element *next = elem->next;
	char *field = field_end( elem->str.string, "!." );
	struct expression param = { 0 }, *expr = calloc( 1, sizeof( struct value_expression ) );
	if( expr ) {
		prev->next = expr;
		expr->line = elem->line;
		( ( struct value_expression * ) expr )->str = &struc->str;
		if( field[ 0 ] == '!' && !field[ 1 ] ) {
			field++;
		}
		if( field[ 0 ] ) {
			idx = get_string_list_index( struc->fields, &field[ 1 ] );
			if( idx >= 0 ) {
				expr->index = idx;
				( ( struct value_expression * ) expr )->num = idx;
				if( next && next->str.string[ 0 ] == '(' ) {
					parse_expressions( next->child, func, vars, 0, &param, &count, message );
					expr->parameters = param.next;
					if( message[ 0 ] == 0 ) {
						if( count == 1 ) {
							expr->evaluate = evaluate_member_expression;
							next = next->next;
						} else {
							sprintf( message, "Wrong number of arguments to struct expression on line %d.", next->line );
						}
					}
				} else {
					expr->evaluate = evaluate_number_literal_expression;
				}
			} else {
				sprintf( message, "Field '%.64s' not declared on line %d.", elem->str.string, elem->line );
			}
		} else {
			idx = ARRAY + 1;
			expr->index = idx;
			( ( struct value_expression * ) expr )->num = idx;
			struc->str.reference_count++;
			expr->evaluate = evaluate_string_literal_expression;
		}
	} else {
		strcpy( message, OUT_OF_MEMORY );
	}
	return next;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
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 -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x13b4a(%rip), %rsi     # 0x1bbc8
callq 0xaf10
movq %rax, -0x48(%rbp)
leaq -0x68(%rbp), %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0x30f0
movl $0x1, %edi
movl $0x30, %esi
callq 0x3120
movq %rax, -0x70(%rbp)
cmpq $0x0, -0x70(%rbp)
je 0x8247
movq -0x70(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x8(%rbp), %rax
movl 0x28(%rax), %ecx
movq -0x70(%rbp), %rax
movl %ecx, (%rax)
movq -0x20(%rbp), %rcx
movq -0x70(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x48(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x21, %eax
jne 0x80fc
movq -0x48(%rbp), %rax
cmpb $0x0, 0x1(%rax)
jne 0x80fc
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
cmpb $0x0, (%rax)
je 0x820d
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rdi
movq -0x48(%rbp), %rsi
addq $0x1, %rsi
callq 0xafd0
movl %eax, -0x34(%rbp)
cmpl $0x0, -0x34(%rbp)
jl 0x81ea
movl -0x34(%rbp), %ecx
movq -0x70(%rbp), %rax
movl %ecx, 0x4(%rax)
movl -0x34(%rbp), %ecx
movq -0x70(%rbp), %rax
movl %ecx, 0x28(%rax)
cmpq $0x0, -0x40(%rbp)
je 0x81d9
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rax
movsbl (%rax), %eax
cmpl $0x28, %eax
jne 0x81d9
movq -0x40(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x30(%rbp), %rax
xorl %ecx, %ecx
leaq -0x68(%rbp), %r8
leaq -0x38(%rbp), %r9
movq %rax, (%rsp)
callq 0xac40
movq -0x58(%rbp), %rcx
movq -0x70(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x30(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x81d7
cmpl $0x1, -0x38(%rbp)
jne 0x81bc
movq -0x70(%rbp), %rax
leaq 0x34b6(%rip), %rcx      # 0xb660
movq %rcx, 0x18(%rax)
movq -0x40(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x40(%rbp)
jmp 0x81d5
movq -0x30(%rbp), %rdi
movq -0x40(%rbp), %rax
movl 0x28(%rax), %edx
leaq 0x13b49(%rip), %rsi     # 0x1bd17
movb $0x0, %al
callq 0x31f0
jmp 0x81d7
jmp 0x81e8
movq -0x70(%rbp), %rax
leaq -0x4464(%rip), %rcx     # 0x3d80
movq %rcx, 0x18(%rax)
jmp 0x820b
movq -0x30(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdx
movq -0x8(%rbp), %rax
movl 0x28(%rax), %ecx
leaq 0x139c7(%rip), %rsi     # 0x1bbcb
movb $0x0, %al
callq 0x31f0
jmp 0x8245
movl $0x3, -0x34(%rbp)
movl -0x34(%rbp), %ecx
movq -0x70(%rbp), %rax
movl %ecx, 0x4(%rax)
movl -0x34(%rbp), %ecx
movq -0x70(%rbp), %rax
movl %ecx, 0x28(%rax)
movq -0x20(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movq -0x70(%rbp), %rax
leaq -0x4491(%rip), %rcx     # 0x3db0
movq %rcx, 0x18(%rax)
jmp 0x8257
movq -0x30(%rbp), %rdi
movq 0x18f0e(%rip), %rsi     # 0x21160
callq 0x3070
movq -0x40(%rbp), %rax
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)