// File: /workspace/github_c_makefile_star2_O0/martincameron[P]towntalk/towntalk.c
// Function: evaluate_elem_expression
static enum result evaluate_elem_expression( struct expression *this,
	struct variables *vars, struct variable *result ) {
	struct expression *parameter = this->parameters;
	struct variable elem = { 0, NULL }, child = { 0, NULL }, next = { 0, NULL };
	struct element *value;
	enum result ret = evaluate_element( parameter, vars, &elem, 0 );
	if( ret ) {
		parameter = parameter->next;
		ret = evaluate_element( parameter, vars, &child, 1 );
		if( ret ) {
			if( !child.string_value || strchr( "([{", elem.string_value->string[ 0 ] ) ) {
				parameter = parameter->next;
				ret = evaluate_element( parameter, vars, &next, 1 );
				if( ret ) {
					if( elem.string_value->reference_count > 1 ) {
						value = new_element( elem.string_value->length );
						if( value ) {
							memcpy( value->str.string, elem.string_value->string,
								sizeof( char ) * elem.string_value->length );
						} else {
							ret = throw_out_of_memory( vars, this );
						}
					} else { /* Re-use element. */
						value = ( struct element * ) elem.string_value;
						value->line = 0;
						if( value->child ) {
							unref_string( &value->child->str );
							value->child = NULL;
						}
						if( value->next ) {
							unref_string( &value->next->str );
							value->next = NULL;
						}
						value->str.reference_count++;
					}
					if( ret ) {
						if( child.string_value ) {
							value->child = ( struct element * ) child.string_value;
							child.string_value->reference_count++;
						}
						if( next.string_value ) {
							value->next = ( struct element * ) next.string_value;
							next.string_value->reference_count++;
						}
						result->string_value = &value->str;
					}
					dispose_temporary( &next );
				}
			} else {
				ret = throw( vars, this, 0, "Parent elements must have value '()', '[]' or '{}'." );
			}
			dispose_temporary( &child );
		}
		dispose_temporary( &elem );
	}
	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
leaq -0x30(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x30f0
leaq -0x40(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x30f0
leaq -0x50(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x30f0
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x30(%rbp), %rdx
xorl %ecx, %ecx
callq 0x5050
movl %eax, -0x5c(%rbp)
cmpl $0x0, -0x5c(%rbp)
je 0x12f1f
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x40(%rbp), %rdx
movl $0x1, %ecx
callq 0x5050
movl %eax, -0x5c(%rbp)
cmpl $0x0, -0x5c(%rbp)
je 0x12f16
cmpq $0x0, -0x38(%rbp)
je 0x12da7
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movsbl (%rax), %esi
leaq 0x9808(%rip), %rdi      # 0x1c5a0
callq 0x30d0
cmpq $0x0, %rax
je 0x12ef4
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x50(%rbp), %rdx
movl $0x1, %ecx
callq 0x5050
movl %eax, -0x5c(%rbp)
cmpl $0x0, -0x5c(%rbp)
je 0x12ef2
movq -0x28(%rbp), %rax
cmpq $0x1, (%rax)
jbe 0x12e2c
movq -0x28(%rbp), %rax
movl 0x10(%rax), %edi
callq 0x3780
movq %rax, -0x58(%rbp)
cmpq $0x0, -0x58(%rbp)
je 0x12e1a
movq -0x58(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x28(%rbp), %rax
movslq 0x10(%rax), %rdx
shlq $0x0, %rdx
callq 0x3170
jmp 0x12e2a
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0x5f20
movl %eax, -0x5c(%rbp)
jmp 0x12e95
movq -0x28(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movl $0x0, 0x28(%rax)
movq -0x58(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x12e63
movq -0x58(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x3c20
movq -0x58(%rbp), %rax
movq $0x0, 0x18(%rax)
movq -0x58(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x12e87
movq -0x58(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x3c20
movq -0x58(%rbp), %rax
movq $0x0, 0x20(%rax)
movq -0x58(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
cmpl $0x0, -0x5c(%rbp)
je 0x12ee9
cmpq $0x0, -0x38(%rbp)
je 0x12ebc
movq -0x38(%rbp), %rcx
movq -0x58(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x38(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
cmpq $0x0, -0x48(%rbp)
je 0x12edd
movq -0x48(%rbp), %rcx
movq -0x58(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x48(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movq -0x58(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
leaq -0x50(%rbp), %rdi
callq 0x3ce0
jmp 0x12f0d
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rsi
xorl %edx, %edx
leaq 0x969f(%rip), %rcx      # 0x1c5a4
callq 0x4330
movl %eax, -0x5c(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x3ce0
leaq -0x30(%rbp), %rdi
callq 0x3ce0
movl -0x5c(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax,%rax)