// File: /workspace/github_c_makefile_star2_O1/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 $0x138, %rsp            # imm = 0x138
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
movups 0x874d(%rip), %xmm0     # 0x18a60
movaps %xmm0, 0xc0(%rsp)
movups 0x872e(%rip), %xmm0     # 0x18a50
movaps %xmm0, 0xb0(%rsp)
movups 0x870f(%rip), %xmm0     # 0x18a40
movaps %xmm0, 0xa0(%rsp)
movq 0x18(%rsi), %rax
movq 0x40(%rax), %r12
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%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)
movaps %xmm0, 0x20(%rsp)
movq 0x40(%rax), %rax
cmpq $0x0, 0x3a0(%rax)
je 0x1039b
leaq 0x2ed0(%rip), %rcx      # 0x1325c
movq %r14, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x3cc3
jmp 0x103aa
leaq 0x10(%rsp), %rdx
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x44a9
movl %eax, 0x4(%rsp)
testl %eax, %eax
je 0x1041c
leaq 0x4(%rsp), %rax
cmpq %rax, (%r12)
jbe 0x103ca
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4ed1
jmp 0x1040e
movq 0x18(%rsp), %r13
movl (%rbx), %eax
leaq 0xa0(%rsp), %rdx
movl %eax, 0x28(%rdx)
leaq 0x2d48(%rip), %rdi      # 0x1312b
leaq 0x20(%rsp), %rbp
movq %r13, %rsi
movq %r12, %rcx
movq %rbp, %r8
callq 0x66f3
cmpb $0x0, (%rbp)
je 0x10432
leaq 0x20(%rsp), %rcx
movq %r14, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x3cc3
movl %eax, 0x4(%rsp)
leaq 0x10(%rsp), %rdi
callq 0x3a87
movl 0x4(%rsp), %eax
addq $0x138, %rsp            # imm = 0x138
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x18(%r14), %rax
movq 0x28(%rax), %rax
movq %rax, 0x8(%rsp)
movl $0x1, %edi
movl $0x420, %esi            # imm = 0x420
callq 0x3130
testq %rax, %rax
je 0x104cf
movq %rax, %r12
leaq 0x9b33(%rip), %rax      # 0x19f90
movq %rax, 0x18(%r12)
movq 0x9b27(%rip), %rdi      # 0x19f90
movq %rdi, 0x8(%r12)
callq 0x30c0
movl %eax, 0x10(%r12)
movq $0x1, (%r12)
movb $0x9, 0x14(%r12)
movq %r12, %rbp
addq $0x20, %rbp
leaq 0x20(%rsp), %rdx
movl $0x10000, %esi          # imm = 0x10000
movq %rbp, %rdi
callq 0x7f0d
testl %eax, %eax
je 0x104c5
leaq 0x9b46(%rip), %rdi      # 0x19ff0
leaq 0x20(%rsp), %rdx
movq %rbp, %rsi
callq 0x7d09
testl %eax, %eax
je 0x104c5
movq %r12, 0x3c0(%r12)
jmp 0x104e6
movq %r12, %rdi
callq 0x3979
jmp 0x104e3
leaq 0x8c9a(%rip), %rax      # 0x19170
movq (%rax), %rsi
leaq 0x20(%rsp), %rdi
callq 0x3070
xorl %r12d, %r12d
testq %r12, %r12
je 0x1065a
movq $0x0, 0x100(%rsp)
leaq 0x20(%r12), %rbp
movq %rbp, 0x110(%rsp)
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x37cf
movq %rax, 0xf8(%rsp)
testq %rax, %rax
je 0x10604
movq %r15, 0x8(%rsp)
movq 0x8(%r12), %rsi
leaq 0xd0(%rsp), %rdx
leaq 0x20(%rsp), %rcx
movq %r13, %rdi
callq 0x7175
testq %rax, %rax
je 0x10639
movq %rax, %r15
movl 0x28(%r13), %esi
leaq 0x20(%rsp), %rcx
movq %rax, %rdi
movq %rbp, %rdx
callq 0x3f06
testq %rax, %rax
je 0x10631
movq %r15, 0x3b8(%r12)
movq %r15, %rbp
movslq 0x1c(%r15), %r13
movl $0x10, %esi
movq %r13, %rdi
callq 0x3130
movq %rax, 0x3c8(%r12)
testq %rax, %rax
je 0x105ad
movl $0x48, %esi
movq %r13, %rdi
callq 0x3130
movq %rax, 0x400(%r12)
cmpq $0x0, 0x400(%r12)
je 0x105cd
movl $0x30, %esi
movq %r13, %rdi
callq 0x3130
movq %rax, 0x3f0(%r12)
movq 0x3f0(%r12), %rax
testq %rax, %rax
je 0x1061a
testl %r13d, %r13d
jle 0x105f0
addq $0x20, %rax
movq %rax, -0x10(%rax)
addq $0x20, %rax
decq %r13
jne 0x105e3
leaq 0x20(%rsp), %rdx
movq %rbp, %r15
movq %rbp, %rdi
xorl %esi, %esi
callq 0x745e
jmp 0x10631
leaq 0x8b65(%rip), %rax      # 0x19170
movq (%rax), %rsi
leaq 0x20(%rsp), %rdi
callq 0x3070
jmp 0x1064b
leaq 0x8b4f(%rip), %rax      # 0x19170
movq (%rax), %rsi
leaq 0x20(%rsp), %rdi
callq 0x3070
movq %rbp, %r15
movq %r15, %rdi
callq 0x3979
movq 0xf8(%rsp), %rdi
callq 0x3979
movq 0x8(%rsp), %r15
cmpb $0x0, 0x20(%rsp)
je 0x1065d
movq %r12, %rdi
callq 0x3979
xorl %r12d, %r12d
testq %r12, %r12
je 0x103fc
movq %r12, 0x8(%r15)
jmp 0x10412