// File: /workspace/github_c_makefile_star2_O0/martincameron[P]towntalk/towntalk.c
// Function: evaluate_call_expression
static enum result evaluate_call_expression( struct expression *this,
	struct variables *vars, struct variable *result ) {
	int idx, count;
	enum result ret = OKAY;
	struct statement *stmt;
	struct variables call_vars;
	struct expression *parameter = this->parameters;
	call_vars.parent = vars;
	call_vars.line = this->line;
	call_vars.func = ( ( struct function_expression * ) this )->function;
	count = sizeof( struct variable ) * call_vars.func->num_variables;
	if( ( size_t ) &this < call_vars.func->env->stack_limit ) {
		return throw( vars, this, 0, "Stack overflow." );
	}
	call_vars.locals = alloca( count );
	call_vars.exception = vars->exception;
	memset( call_vars.locals, 0, count );
	idx = 0, count = call_vars.func->num_parameters;
	while( idx < count ) {
		ret = parameter->evaluate( parameter, vars, &call_vars.locals[ idx++ ] );
		if( ret ) {
			parameter = parameter->next;
		} else {
			break;
		}
	}
	while( ret ) {
		stmt = call_vars.func->statements;
		while( stmt && ( ret = stmt->execute( stmt, &call_vars, result ) ) == OKAY ) {
			stmt = stmt->next;
		}
		if( stmt ) {
			if( ret == RETURN ) {
				ret = OKAY;
			} else if( ret == AGAIN ) {
				continue;
			} else if( ret ) {
				ret = throw( vars, this, ret, "Unhandled 'break' or 'continue'." );
			}
		}
		break;
	}
	idx = 0, count = call_vars.func->num_variables;
	while( idx < count ) {
		dispose_temporary( &call_vars.locals[ idx++ ] );
	}
	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl $0x1, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x68(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x40(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movslq 0x20(%rax), %rax
shlq $0x4, %rax
movl %eax, -0x28(%rbp)
leaq -0x10(%rbp), %rax
movq -0x48(%rbp), %rcx
movq 0x40(%rcx), %rcx
cmpq (%rcx), %rax
jae 0x9892
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
xorl %edx, %edx
leaq 0x11ea2(%rip), %rcx     # 0x1b727
callq 0x4330
movl %eax, -0x4(%rbp)
jmp 0x9a09
movslq -0x28(%rbp), %rcx
addq $0xf, %rcx
andq $-0x10, %rcx
movq %rsp, %rax
subq %rcx, %rax
movq %rax, %rsp
movq %rax, -0x50(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x50(%rbp), %rdi
movslq -0x28(%rbp), %rdx
xorl %esi, %esi
callq 0x30f0
movl $0x0, -0x24(%rbp)
movq -0x48(%rbp), %rax
movl 0x1c(%rax), %eax
movl %eax, -0x28(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x28(%rbp), %eax
jge 0x9928
movq -0x68(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x68(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x50(%rbp), %rdx
movl -0x24(%rbp), %ecx
movl %ecx, %r8d
addl $0x1, %r8d
movl %r8d, -0x24(%rbp)
movslq %ecx, %rcx
shlq $0x4, %rcx
addq %rcx, %rdx
callq *%rax
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
je 0x9924
movq -0x68(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x68(%rbp)
jmp 0x9926
jmp 0x9928
jmp 0x98d7
jmp 0x992a
cmpl $0x0, -0x2c(%rbp)
je 0x99cb
movq -0x48(%rbp), %rax
movq 0x58(%rax), %rax
movq %rax, -0x38(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x38(%rbp)
movb %al, -0x69(%rbp)
je 0x996e
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x38(%rbp), %rdi
movq -0x20(%rbp), %rdx
leaq -0x60(%rbp), %rsi
callq *%rax
movl %eax, -0x2c(%rbp)
cmpl $0x1, %eax
sete %al
movb %al, -0x69(%rbp)
movb -0x69(%rbp), %al
testb $0x1, %al
jne 0x9977
jmp 0x9985
movq -0x38(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x38(%rbp)
jmp 0x9940
cmpq $0x0, -0x38(%rbp)
je 0x99c9
cmpl $0x2, -0x2c(%rbp)
jne 0x999b
movl $0x1, -0x2c(%rbp)
jmp 0x99c7
cmpl $0x5, -0x2c(%rbp)
jne 0x99a3
jmp 0x992a
cmpl $0x0, -0x2c(%rbp)
je 0x99c3
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x2c(%rbp), %edx
leaq 0x124cc(%rip), %rcx     # 0x1be87
callq 0x4330
movl %eax, -0x2c(%rbp)
jmp 0x99c5
jmp 0x99c7
jmp 0x99c9
jmp 0x99cb
movl $0x0, -0x24(%rbp)
movq -0x48(%rbp), %rax
movl 0x20(%rax), %eax
movl %eax, -0x28(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x28(%rbp), %eax
jge 0x9a03
movq -0x50(%rbp), %rdi
movl -0x24(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0x24(%rbp)
cltq
shlq $0x4, %rax
addq %rax, %rdi
callq 0x3ce0
jmp 0x99dc
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
movq %rbp, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)