// File: /workspace/github_c_makefile_star2_O0/martincameron[P]towntalk/towntalk.c
// Function: evaluate_pack_expression
static enum result evaluate_pack_expression( struct expression *this,
	struct variables *vars, struct variable *result ) {
	int idx, len;
	long_int in;
	number *src;
	char *out;
	struct string *str;
	struct variable val = { 0, NULL };
	enum result ret = this->parameters->evaluate( this->parameters, vars, &val );
	if( ret ) {
		if( val.string_value && val.string_value && val.string_value->type == ARRAY ) {
			src = ( ( struct array * ) val.string_value )->number_values;
			len = ( ( struct array * ) val.string_value )->length * 4;
		} else {
			src = &val.number_value;
			ret = to_num( &val, src, vars, this->parameters );
			len = 4;
		}
		if( ret ) {
			str = new_string( len );
			if( str ) {
				idx = 0;
				out = str->string;
				while( idx < len ) {
					in = src[ idx >> 2 ];
					out[ idx ] = in >> 24;
					out[ idx + 1 ] = in >> 16;
					out[ idx + 2 ] = in >> 8;
					out[ idx + 3 ] = in;
					idx += 4;
				}
				out[ idx ] = 0;
				result->string_value = str;
			} else {
				ret = throw_out_of_memory( vars, this );
			}
		}
		dispose_temporary( &val );
	}
	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
leaq -0x50(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x30f0
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x18(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x8(%rcx), %rdi
movq -0x10(%rbp), %rsi
leaq -0x50(%rbp), %rdx
callq *%rax
movl %eax, -0x54(%rbp)
cmpl $0x0, -0x54(%rbp)
je 0x131d7
cmpq $0x0, -0x48(%rbp)
je 0x130c5
cmpq $0x0, -0x48(%rbp)
je 0x130c5
movq -0x48(%rbp), %rax
movsbl 0x14(%rax), %eax
cmpl $0x2, %eax
jne 0x130c5
movq -0x48(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x48(%rbp), %rax
movl 0x40(%rax), %eax
shll $0x2, %eax
movl %eax, -0x20(%rbp)
jmp 0x130f0
leaq -0x50(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rsi
movq -0x10(%rbp), %rdx
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rcx
leaq -0x50(%rbp), %rdi
callq 0x51c0
movl %eax, -0x54(%rbp)
movl $0x4, -0x20(%rbp)
cmpl $0x0, -0x54(%rbp)
je 0x131ce
movl -0x20(%rbp), %edi
callq 0x39b0
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
je 0x131bc
movl $0x0, -0x1c(%rbp)
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x38(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x20(%rbp), %eax
jge 0x131a2
movq -0x30(%rbp), %rax
movl -0x1c(%rbp), %ecx
sarl $0x2, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
sarl $0x18, %eax
movb %al, %dl
movq -0x38(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movb %dl, (%rax,%rcx)
movl -0x24(%rbp), %eax
sarl $0x10, %eax
movb %al, %dl
movq -0x38(%rbp), %rax
movl -0x1c(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movl -0x24(%rbp), %eax
sarl $0x8, %eax
movb %al, %dl
movq -0x38(%rbp), %rax
movl -0x1c(%rbp), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movl -0x24(%rbp), %eax
movb %al, %dl
movq -0x38(%rbp), %rax
movl -0x1c(%rbp), %ecx
addl $0x3, %ecx
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movl -0x1c(%rbp), %eax
addl $0x4, %eax
movl %eax, -0x1c(%rbp)
jmp 0x13124
movq -0x38(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movq -0x40(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0x131cc
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0x5f20
movl %eax, -0x54(%rbp)
jmp 0x131ce
leaq -0x50(%rbp), %rdi
callq 0x3ce0
movl -0x54(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq