// File: CK7[P]abawaca/src/Dimension.cpp
// Function: Dimension::Dimension(std::vector<unsigned long, std::allocator<unsigned long>> const&, std::vector<double, std::allocator<double>> const&, unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
Dimension::Dimension(const vector<size_t>& dp_ids, const vector<double>& dp_values, size_t _dimension_index, 
	string _dimension_name) : dimension_index(_dimension_index), dimension_name(_dimension_name)
{
	if(dp_values.size() != dp_ids.size()) {
		cerr <<  __FILE__ << " (" << __LINE__ << "): fatal error, number of datapoints (" << dp_ids.size() << ") and values (" 
			<< dp_values.size() << ")for dimension " << dimension_name << " is different" << endl << endl;
		exit(-1);
	}

	vector<size_t>::const_iterator vits = dp_ids.begin();
	vector<double>::const_iterator vitd = dp_values.begin();
	while(vits != dp_ids.end())
		this->insert(*(vits++), *(vitd++));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x100, %rsp            # imm = 0x100
movq %r8, -0x70(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x78(%rbp)
movq %rdi, %rax
movq %rax, -0x90(%rbp)
callq 0x1cc80
movq -0x78(%rbp), %rdi
addq $0x30, %rdi
movq %rdi, -0x88(%rbp)
callq 0x9e40
movq -0x78(%rbp), %rdi
addq $0x60, %rdi
movq %rdi, -0x80(%rbp)
callq 0x1cca0
movq -0x78(%rbp), %rdi
movq -0x70(%rbp), %rsi
movq -0x20(%rbp), %rax
movq %rax, 0x78(%rdi)
subq $-0x80, %rdi
movq %rdi, -0x68(%rbp)
callq 0x51a0
jmp 0x1c6ae
movq -0x18(%rbp), %rdi
callq 0x1ccc0
movq %rax, -0x98(%rbp)
movq -0x10(%rbp), %rdi
callq 0x1cce0
movq %rax, %rcx
movq -0x98(%rbp), %rax
cmpq %rcx, %rax
je 0x1c864
movq 0x30907(%rip), %rdi     # 0x4cfe8
leaq 0x19648(%rip), %rsi     # 0x35d30
callq 0x53f0
movq %rax, -0xa0(%rbp)
jmp 0x1c6f6
movq -0xa0(%rbp), %rdi
leaq 0x19821(%rip), %rsi     # 0x35f25
callq 0x53f0
movq %rax, -0xa8(%rbp)
jmp 0x1c712
movq -0xa8(%rbp), %rdi
movl $0xa, %esi
callq 0x5710
movq %rax, -0xb0(%rbp)
jmp 0x1c72c
movq -0xb0(%rbp), %rdi
leaq 0x19608(%rip), %rsi     # 0x35d42
callq 0x53f0
movq %rax, -0xb8(%rbp)
jmp 0x1c748
movq -0x10(%rbp), %rdi
callq 0x1cce0
movq -0xb8(%rbp), %rdi
movq %rax, %rsi
callq 0x50f0
movq %rax, -0xc0(%rbp)
jmp 0x1c769
movq -0xc0(%rbp), %rdi
leaq 0x195f2(%rip), %rsi     # 0x35d69
callq 0x53f0
movq %rax, -0xc8(%rbp)
jmp 0x1c785
movq -0x18(%rbp), %rdi
callq 0x1ccc0
movq -0xc8(%rbp), %rdi
movq %rax, %rsi
callq 0x50f0
movq %rax, -0xd0(%rbp)
jmp 0x1c7a6
movq -0xd0(%rbp), %rdi
leaq 0x195c4(%rip), %rsi     # 0x35d78
callq 0x53f0
movq %rax, -0xd8(%rbp)
jmp 0x1c7c2
movq -0xd8(%rbp), %rdi
movq -0x90(%rbp), %rsi
subq $-0x80, %rsi
callq 0x5360
movq %rax, -0xe0(%rbp)
jmp 0x1c7e2
movq -0xe0(%rbp), %rdi
leaq 0x19598(%rip), %rsi     # 0x35d88
callq 0x53f0
movq %rax, -0xe8(%rbp)
jmp 0x1c7fe
movq -0xe8(%rbp), %rdi
movq 0x30784(%rip), %rsi     # 0x4cf90
callq 0x5440
movq %rax, -0xf0(%rbp)
jmp 0x1c81a
movq -0xf0(%rbp), %rdi
movq 0x30768(%rip), %rsi     # 0x4cf90
callq 0x5440
jmp 0x1c82f
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x54f0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x1c906
movq -0x68(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
callq 0x5250
jmp 0x1c906
movq -0x10(%rbp), %rdi
callq 0x1cd00
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rdi
callq 0x1cd30
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rdi
callq 0x1cda0
movq %rax, -0x50(%rbp)
leaq -0x40(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x1cd60
testb $0x1, %al
jne 0x1c89e
jmp 0x1c8fd
leaq -0x40(%rbp), %rdi
xorl %esi, %esi
movl %esi, -0xfc(%rbp)
callq 0x1cdd0
movq %rax, -0x58(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x1ce10
movl -0xfc(%rbp), %esi
movq (%rax), %rax
movq %rax, -0xf8(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x1ce30
movq %rax, -0x60(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x1ce70
movq -0x90(%rbp), %rdi
movq -0xf8(%rbp), %rsi
movsd (%rax), %xmm0
callq 0x1c930
jmp 0x1c8fb
jmp 0x1c87e
addq $0x100, %rsp            # imm = 0x100
popq %rbp
retq
movq -0x80(%rbp), %rdi
callq 0x1ce90
movq -0x88(%rbp), %rdi
callq 0xa770
movq -0x78(%rbp), %rdi
callq 0x1cef0
movq -0x30(%rbp), %rdi
callq 0x5750
nopl (%rax)