// File: /workspace/github_c_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x148, %rsp            # imm = 0x148
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
movups 0x8c62(%rip), %xmm0     # 0x17d60
movaps %xmm0, 0xd0(%rsp)
movups 0x8c43(%rip), %xmm0     # 0x17d50
movaps %xmm0, 0xc0(%rsp)
movups 0x8c24(%rip), %xmm0     # 0x17d40
movaps %xmm0, 0xb0(%rsp)
movq 0x18(%rsi), %rax
movq 0x40(%rax), %r12
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, 0xa0(%rsp)
movaps %xmm0, 0x90(%rsp)
movaps %xmm0, 0x80(%rsp)
movaps %xmm0, 0x70(%rsp)
movaps %xmm0, 0x60(%rsp)
movaps %xmm0, 0x50(%rsp)
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
cmpq $0x0, 0x3a0(%r12)
je 0xf186
leaq 0x3121(%rip), %rcx      # 0x12298
movq %r14, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x3bb2
jmp 0xf195
leaq 0x10(%rsp), %rdx
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x42ce
movl %eax, 0xc(%rsp)
testl %eax, %eax
je 0xf1b8
leaq 0xc(%rsp), %rax
cmpq %rax, (%r12)
jbe 0xf1bf
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4ca3
jmp 0xf402
xorl %eax, %eax
jmp 0xf414
movq 0x18(%rsp), %rbp
movl (%rbx), %eax
leaq 0xb0(%rsp), %rdx
movl %eax, 0x28(%rdx)
leaq 0x2f91(%rip), %rdi      # 0x12169
leaq 0x30(%rsp), %r13
movq %rbp, %rsi
movq %r12, %rcx
movq %r13, %r8
callq 0x61d9
cmpb $0x0, (%r13)
jne 0xf3f0
movq 0x18(%r14), %rax
movq 0x28(%rax), %r12
pushq $0x1
popq %rdi
movl $0x420, %esi            # imm = 0x420
callq 0x3130
testq %rax, %rax
je 0xf333
movq %rax, %r13
movq %r12, 0x28(%rsp)
leaq 0x9d6d(%rip), %rax      # 0x18f90
movq %rax, 0x18(%r13)
movq 0x9d62(%rip), %rdi      # 0x18f90
movq %rdi, 0x8(%r13)
callq 0x30c0
movl %eax, 0x10(%r13)
movq $0x1, (%r13)
movb $0x9, 0x14(%r13)
movq %r13, %r12
addq $0x20, %r12
leaq 0x30(%rsp), %rdx
movl $0x10000, %esi          # imm = 0x10000
movq %r12, %rdi
callq 0x777a
testl %eax, %eax
je 0xf3e8
leaq 0x9d80(%rip), %rdi      # 0x18ff0
leaq 0x30(%rsp), %rdx
movq %r12, %rsi
callq 0x75ba
testl %eax, %eax
je 0xf3e8
andq $0x0, 0x110(%rsp)
movq %r13, 0x3c0(%r13)
movq %r12, 0x120(%rsp)
movq 0x28(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x3756
movq %rax, 0x108(%rsp)
testq %rax, %rax
je 0xf34c
movq 0x8(%r13), %rsi
leaq 0xe0(%rsp), %rdx
leaq 0x30(%rsp), %rcx
movq %rbp, %rdi
callq 0x6b26
testq %rax, %rax
je 0xf3d4
movl 0x28(%rbp), %esi
leaq 0x30(%rsp), %rcx
movq %rax, %rdi
movq %r12, %rdx
movq %rax, %rbp
callq 0x3d9a
testq %rax, %rax
je 0xf3cc
movq %rbp, 0x3b8(%r13)
movslq 0x1c(%rbp), %r12
pushq $0x10
popq %rsi
movq %r12, %rdi
callq 0x3130
movq %rax, 0x3c8(%r13)
testq %rax, %rax
je 0xf362
pushq $0x48
popq %rsi
movq %r12, %rdi
callq 0x3130
movq %rax, 0x400(%r13)
jmp 0xf369
leaq 0x8e36(%rip), %rax      # 0x18170
movq (%rax), %rsi
leaq 0x30(%rsp), %rdi
callq 0x3070
jmp 0xf3f0
leaq 0x8e1d(%rip), %rax      # 0x18170
movq (%rax), %rsi
leaq 0x30(%rsp), %rdi
callq 0x3070
jmp 0xf3e1
movq 0x400(%r13), %rax
testq %rax, %rax
je 0xf382
pushq $0x30
popq %rsi
movq %r12, %rdi
callq 0x3130
movq %rax, 0x3f0(%r13)
jmp 0xf389
movq 0x3f0(%r13), %rax
testq %rax, %rax
je 0xf3b8
xorl %ecx, %ecx
testl %r12d, %r12d
cmovgl %r12d, %ecx
addq $0x20, %rax
subq $0x1, %rcx
jb 0xf3a7
movq %rax, -0x10(%rax)
jmp 0xf397
leaq 0x30(%rsp), %rdx
movq %rbp, %rdi
xorl %esi, %esi
callq 0x6e19
jmp 0xf3cc
leaq 0x8db1(%rip), %rax      # 0x18170
movq (%rax), %rsi
leaq 0x30(%rsp), %rdi
callq 0x3070
movq %rbp, %rdi
callq 0x38b2
movq 0x108(%rsp), %rdi
callq 0x38b2
cmpb $0x0, 0x30(%rsp)
je 0xf426
movq %r13, %rdi
callq 0x38b2
leaq 0x30(%rsp), %rcx
movq %r14, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x3bb2
movl %eax, 0xc(%rsp)
leaq 0x10(%rsp), %rdi
callq 0x3988
movl 0xc(%rsp), %eax
addq $0x148, %rsp            # imm = 0x148
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r13, 0x8(%r15)
jmp 0xf406