// File: /workspace/github_c_makefile_star2_O0/DeforaOS[P]libSystem/src/variable.c
// Function: variable_new_copy
Variable * variable_new_copy(Variable const * from)
{
	switch(from->type)
	{
		case VT_NULL:
			return variable_new(from->type);
		case VT_BOOL:
			return variable_new(from->type, from->u.b);
		case VT_INT8:
			return variable_new(from->type, from->u.int8);
		case VT_UINT8:
			return variable_new(from->type, from->u.uint8);
		case VT_INT16:
			return variable_new(from->type, from->u.int16);
		case VT_UINT16:
			return variable_new(from->type, from->u.uint16);
		case VT_INT32:
			return variable_new(from->type, from->u.int32);
		case VT_UINT32:
			return variable_new(from->type, from->u.uint32);
		case VT_INT64:
			return variable_new(from->type, from->u.int64);
		case VT_UINT64:
			return variable_new(from->type, from->u.uint64);
		case VT_FLOAT:
			return variable_new(from->type, from->u.f);
		case VT_DOUBLE:
			return variable_new(from->type, from->u.d);
		case VT_STRING:
			return variable_new(from->type, from->u.string);
		case VT_BUFFER:
			return variable_new(from->type, from->u.buffer);
		case VT_ARRAY:
			return _new_copy_array(from);
		case VT_COMPOUND:
			return _new_copy_compound(from);
		case VT_POINTER:
			return variable_new(from->type, from->u.pointer);
	}
	error_set_code(1, "%s%u%s", "Unable to copy this type of variable (",
			from->type, ")");
	return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
movq %rax, -0x18(%rbp)
subq $0x10, %rax
ja 0xcaae
movq -0x18(%rbp), %rax
leaq 0x3939(%rip), %rcx      # 0x10204
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x10(%rbp), %rax
movl (%rax), %edi
movb $0x0, %al
callq 0x46e0
movq %rax, -0x8(%rbp)
jmp 0xcadd
movq -0x10(%rbp), %rax
movl (%rax), %edi
movq -0x10(%rbp), %rax
movb 0x8(%rax), %al
andb $0x1, %al
movzbl %al, %esi
movb $0x0, %al
callq 0x46e0
movq %rax, -0x8(%rbp)
jmp 0xcadd
movq -0x10(%rbp), %rax
movl (%rax), %edi
movq -0x10(%rbp), %rax
movsbl 0x8(%rax), %esi
movb $0x0, %al
callq 0x46e0
movq %rax, -0x8(%rbp)
jmp 0xcadd
movq -0x10(%rbp), %rax
movl (%rax), %edi
movq -0x10(%rbp), %rax
movzbl 0x8(%rax), %esi
movb $0x0, %al
callq 0x46e0
movq %rax, -0x8(%rbp)
jmp 0xcadd
movq -0x10(%rbp), %rax
movl (%rax), %edi
movq -0x10(%rbp), %rax
movswl 0x8(%rax), %esi
movb $0x0, %al
callq 0x46e0
movq %rax, -0x8(%rbp)
jmp 0xcadd
movq -0x10(%rbp), %rax
movl (%rax), %edi
movq -0x10(%rbp), %rax
movzwl 0x8(%rax), %esi
movb $0x0, %al
callq 0x46e0
movq %rax, -0x8(%rbp)
jmp 0xcadd
movq -0x10(%rbp), %rax
movl (%rax), %edi
movq -0x10(%rbp), %rax
movl 0x8(%rax), %esi
movb $0x0, %al
callq 0x46e0
movq %rax, -0x8(%rbp)
jmp 0xcadd
movq -0x10(%rbp), %rax
movl (%rax), %edi
movq -0x10(%rbp), %rax
movl 0x8(%rax), %esi
movb $0x0, %al
callq 0x46e0
movq %rax, -0x8(%rbp)
jmp 0xcadd
movq -0x10(%rbp), %rax
movl (%rax), %edi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
movb $0x0, %al
callq 0x46e0
movq %rax, -0x8(%rbp)
jmp 0xcadd
movq -0x10(%rbp), %rax
movl (%rax), %edi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
movb $0x0, %al
callq 0x46e0
movq %rax, -0x8(%rbp)
jmp 0xcadd
movq -0x10(%rbp), %rax
movl (%rax), %edi
movq -0x10(%rbp), %rax
movss 0x8(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movb $0x1, %al
callq 0x46e0
movq %rax, -0x8(%rbp)
jmp 0xcadd
movq -0x10(%rbp), %rax
movl (%rax), %edi
movq -0x10(%rbp), %rax
movsd 0x8(%rax), %xmm0
movb $0x1, %al
callq 0x46e0
movq %rax, -0x8(%rbp)
jmp 0xcadd
movq -0x10(%rbp), %rax
movl (%rax), %edi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
movb $0x0, %al
callq 0x46e0
movq %rax, -0x8(%rbp)
jmp 0xcadd
movq -0x10(%rbp), %rax
movl (%rax), %edi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
movb $0x0, %al
callq 0x46e0
movq %rax, -0x8(%rbp)
jmp 0xcadd
movq -0x10(%rbp), %rdi
callq 0xcaf0
movq %rax, -0x8(%rbp)
jmp 0xcadd
movq -0x10(%rbp), %rdi
callq 0xcb80
movq %rax, -0x8(%rbp)
jmp 0xcadd
movq -0x10(%rbp), %rax
movl (%rax), %edi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
movb $0x0, %al
callq 0x46e0
movq %rax, -0x8(%rbp)
jmp 0xcadd
movq -0x10(%rbp), %rax
movl (%rax), %ecx
movl $0x1, %edi
leaq 0x3a28(%rip), %rsi      # 0x104e8
leaq 0x3a28(%rip), %rdx      # 0x104ef
leaq 0x3652(%rip), %r8       # 0x10120
movb $0x0, %al
callq 0x4630
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)