// File: /workspace/github_c_makefile_star2_O0/martincameron[P]towntalk/worker.c
// Function: evaluate_worker_expression
enum result evaluate_worker_expression( struct expression *this,
	struct variables *vars, struct variable *result ) {
	struct expression *parameter = this->parameters;
	struct element *elem, prev = { { 1, "$worker", 9, ELEMENT }, NULL, NULL, 0 };
	struct environment *env = vars->func->env;
	struct variable var = { 0, NULL };
	char message[ 128 ] = "";
	struct worker *work;
	enum result ret;
	if( vars->func->env->worker ) {
		ret = throw( vars, this, 0, "Operation not permitted." );
	} else {
		ret = evaluate_element( parameter, vars, &var, 0 );
	}
	if( ret ) {
		elem = ( struct element * ) var.string_value;
		if( ( size_t ) &ret < env->stack_limit ) {
			ret = throw_stack_overflow( vars, this );
		} else {
			prev.line = this->line;
			validate_syntax( "({0", elem, &prev, env, message );
			if( message[ 0 ] == 0 ) {
				work = parse_worker( elem, vars->func->file, message );
				if( work ) {
					result->string_value = &work->custom.str;
				} else {
					ret = throw( vars, this, 0, message );
				}
			} else {
				ret = throw( vars, this, 0, message );
			}
		}
		dispose_temporary( &var );
	}
	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x100, %rsp            # imm = 0x100
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 -0x58(%rbp), %rdi
leaq 0xa2a2(%rip), %rsi      # 0x20db0
movl $0x30, %edx
callq 0x3170
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x40(%rax), %rax
movq %rax, -0x60(%rbp)
leaq -0x70(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x30f0
leaq -0xf0(%rbp), %rdi
xorl %esi, %esi
movl $0x80, %edx
callq 0x30f0
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x40(%rax), %rax
cmpq $0x0, 0x3a0(%rax)
je 0x16b7f
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rsi
xorl %edx, %edx
leaq 0x5bb6(%rip), %rcx      # 0x1c728
callq 0x4330
movl %eax, -0xfc(%rbp)
jmp 0x16b98
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x70(%rbp), %rdx
xorl %ecx, %ecx
callq 0x5050
movl %eax, -0xfc(%rbp)
cmpl $0x0, -0xfc(%rbp)
je 0x16c8c
movq -0x68(%rbp), %rax
movq %rax, -0x28(%rbp)
leaq -0xfc(%rbp), %rax
movq -0x60(%rbp), %rcx
cmpq (%rcx), %rax
jae 0x16bd5
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0x5f50
movl %eax, -0xfc(%rbp)
jmp 0x16c83
movq -0x8(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x30(%rbp)
movq -0x28(%rbp), %rsi
movq -0x60(%rbp), %rcx
leaq -0xf0(%rbp), %r8
leaq 0x5a03(%rip), %rdi      # 0x1c5f7
leaq -0x58(%rbp), %rdx
callq 0x8430
movsbl -0xf0(%rbp), %eax
cmpl $0x0, %eax
jne 0x16c65
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x28(%rax), %rsi
leaq -0xf0(%rbp), %rdx
callq 0x16ca0
movq %rax, -0xf8(%rbp)
cmpq $0x0, -0xf8(%rbp)
je 0x16c47
movq -0xf8(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0x16c63
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rsi
leaq -0xf0(%rbp), %rcx
xorl %edx, %edx
callq 0x4330
movl %eax, -0xfc(%rbp)
jmp 0x16c81
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rsi
leaq -0xf0(%rbp), %rcx
xorl %edx, %edx
callq 0x4330
movl %eax, -0xfc(%rbp)
jmp 0x16c83
leaq -0x70(%rbp), %rdi
callq 0x3ce0
movl -0xfc(%rbp), %eax
addq $0x100, %rsp            # imm = 0x100
popq %rbp
retq
nopl (%rax,%rax)