// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl (%rdi), %ecx
cmpq $0x10, %rcx
ja 0x947f
movq %rdi, %r14
leaq 0x1eb6(%rip), %rax      # 0xb214
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
xorl %edi, %edi
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x4670
movq 0x8(%r14), %rsi
movl $0x10, %edi
jmp 0x9503
movq 0x10(%r14), %rdi
callq 0x4320
movl 0x8(%r14), %edi
movq %rax, %rsi
xorl %eax, %eax
callq 0x4650
testq %rax, %rax
je 0x9458
movq %rax, %rbx
movq 0x10(%rax), %rdi
movq 0x10(%r14), %rsi
callq 0x4340
testl %eax, %eax
jne 0x9448
jmp 0x94a2
movsd 0x8(%r14), %xmm0
movl $0xb, %edi
jmp 0x94ea
movswl 0x8(%r14), %esi
movl $0x4, %edi
jmp 0x94cf
movq 0x8(%r14), %rsi
movl $0xc, %edi
jmp 0x9503
movq 0x8(%r14), %rsi
movl $0x9, %edi
jmp 0x9503
movsbl 0x8(%r14), %esi
movl $0x2, %edi
jmp 0x94cf
movq 0x10(%r14), %rdi
xorl %esi, %esi
xorl %eax, %eax
callq 0x4610
testq %rax, %rax
je 0x9458
movq %rax, %rbx
movq 0x18(%rax), %rax
leaq 0x8(%rsp), %r15
movq %rax, (%r15)
movq 0x18(%r14), %rdi
leaq 0x1164(%rip), %rsi      # 0xa59e
movq %r15, %rdx
callq 0x4380
cmpq $0x0, (%r15)
jne 0x94a2
movq %rbx, %rdi
callq 0x97f5
movq %rbx, %rdi
callq 0x4460
xorl %ebx, %ebx
jmp 0x94a2
movzbl 0x8(%r14), %esi
movl $0x3, %edi
jmp 0x94cf
movl 0x8(%r14), %esi
movl $0x7, %edi
jmp 0x94cf
movzbl 0x8(%r14), %esi
movl $0x1, %edi
jmp 0x94cf
leaq 0x20b2(%rip), %rsi      # 0xb538
leaq 0x20b2(%rip), %rdx      # 0xb53f
leaq 0x1c8c(%rip), %r8       # 0xb120
xorl %ebx, %ebx
movl $0x1, %edi
xorl %eax, %eax
callq 0x45d0
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movzwl 0x8(%r14), %esi
movl $0x5, %edi
jmp 0x94cf
movq 0x8(%r14), %rsi
movl $0xd, %edi
jmp 0x9503
movl 0x8(%r14), %esi
movl $0x6, %edi
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x4670
cvtss2sd 0x8(%r14), %xmm0
movl $0xa, %edi
movb $0x1, %al
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x4670
movq 0x8(%r14), %rsi
movl $0x8, %edi
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x4670