// File: /workspace/github_c_makefile_star2_O1/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 0x942e
movq %rdi, %r14
leaq 0x1f07(%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 0x94b2
movq 0x10(%r14), %rdi
callq 0x4320
movl 0x8(%r14), %edi
movq %rax, %rsi
xorl %eax, %eax
callq 0x4650
testq %rax, %rax
je 0x9407
movq %rax, %rbx
movq 0x10(%rax), %rdi
movq 0x10(%r14), %rsi
callq 0x4340
testl %eax, %eax
jne 0x93f7
jmp 0x9451
movsd 0x8(%r14), %xmm0
movl $0xb, %edi
jmp 0x9499
movswl 0x8(%r14), %esi
movl $0x4, %edi
jmp 0x947e
movq 0x8(%r14), %rsi
movl $0xc, %edi
jmp 0x94b2
movq 0x8(%r14), %rsi
movl $0x9, %edi
jmp 0x94b2
movsbl 0x8(%r14), %esi
movl $0x2, %edi
jmp 0x947e
movq 0x10(%r14), %rdi
xorl %esi, %esi
xorl %eax, %eax
callq 0x4610
testq %rax, %rax
je 0x9407
movq %rax, %rbx
movq 0x18(%rax), %rax
leaq 0x8(%rsp), %r15
movq %rax, (%r15)
movq 0x18(%r14), %rdi
leaq 0x141d(%rip), %rsi      # 0xa806
movq %r15, %rdx
callq 0x4380
cmpq $0x0, (%r15)
jne 0x9451
movq %rbx, %rdi
callq 0x97a8
movq %rbx, %rdi
callq 0x4460
xorl %ebx, %ebx
jmp 0x9451
movzbl 0x8(%r14), %esi
movl $0x3, %edi
jmp 0x947e
movl 0x8(%r14), %esi
movl $0x7, %edi
jmp 0x947e
movzbl 0x8(%r14), %esi
movl $0x1, %edi
jmp 0x947e
leaq 0x2233(%rip), %rsi      # 0xb668
leaq 0x2233(%rip), %rdx      # 0xb66f
leaq 0x1cdd(%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 0x947e
movq 0x8(%r14), %rsi
movl $0xd, %edi
jmp 0x94b2
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