// File: cooljacket[P]Dormitory-distribution/Student.cpp
// Function: Student::Student(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&)
Student::Student(const vector<string>& row)
: Element(size, question_ratio), id(row[0]), name(row[1]) {
	for (int i = 2; i < row.size(); ++i)
		data[i-2] = str2int(row[i]);

	raw_data = data;

	data[2] = sqrt_trans(data[2] += 1);	// 起床时间
	data[3] = sqrt_trans(data[3] += 1);	// 就寝时间
	data[12] = sqrt_trans(data[12] += 1);// 家庭收入水平
	data[10] *= MAX[10];	// 性格分明，尽量不要出现三个安静+1个活跃
	for (int i = 0; i < size; ++i)
		if (MAX[i] > MIN[i])
			data[i] = (data[i] - MIN[i]) / (MAX[i] - MIN[i]);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x38(%rbp)
leaq 0x944e(%rip), %rdx      # 0x1c250
movl $0xf, %esi
callq 0x13ef0
movq -0x38(%rbp), %rax
addq $0x30, %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x13660
movq -0x30(%rbp), %rdi
movq %rax, %rsi
callq 0x3100
jmp 0x12e33
movq -0x38(%rbp), %rax
addq $0x50, %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x13660
movq -0x40(%rbp), %rdi
movq %rax, %rsi
callq 0x3100
jmp 0x12e5b
movq -0x38(%rbp), %rdi
addq $0x70, %rdi
movq %rdi, -0x48(%rbp)
callq 0x13640
movl $0x2, -0x20(%rbp)
movslq -0x20(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x10(%rbp), %rdi
callq 0x13680
movq %rax, %rcx
movq -0x50(%rbp), %rax
cmpq %rcx, %rax
jae 0x12f25
movq -0x10(%rbp), %rdi
movslq -0x20(%rbp), %rsi
callq 0x13660
movq %rax, %rdi
callq 0x5530
movl %eax, -0x54(%rbp)
jmp 0x12eae
movq -0x38(%rbp), %rdi
movl -0x54(%rbp), %eax
cvtsi2sd %eax, %xmm0
movsd %xmm0, -0x60(%rbp)
movl -0x20(%rbp), %eax
subl $0x2, %eax
movslq %eax, %rsi
callq 0xd270
movsd -0x60(%rbp), %xmm0
movsd %xmm0, (%rax)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x12e73
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
jmp 0x130f5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
jmp 0x130ec
movq -0x48(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
callq 0x7810
movq -0x40(%rbp), %rdi
callq 0x3180
jmp 0x130ec
movq -0x38(%rbp), %rsi
movq %rsi, %rdi
addq $0x70, %rdi
callq 0xd520
jmp 0x12f37
movq -0x38(%rbp), %rdi
movl $0x2, %esi
callq 0xd270
movq -0x38(%rbp), %rdi
movsd (%rax), %xmm0
movsd 0x92eb(%rip), %xmm1     # 0x1c240
addsd %xmm1, %xmm0
movsd %xmm0, (%rax)
callq 0x13110
movsd %xmm0, -0x68(%rbp)
jmp 0x12f69
movq -0x38(%rbp), %rdi
movl $0x2, %esi
callq 0xd270
movsd -0x68(%rbp), %xmm0
movq -0x38(%rbp), %rdi
movsd %xmm0, (%rax)
movl $0x3, %esi
callq 0xd270
movq -0x38(%rbp), %rdi
movsd (%rax), %xmm0
movsd 0x92a2(%rip), %xmm1     # 0x1c240
addsd %xmm1, %xmm0
movsd %xmm0, (%rax)
callq 0x13110
movsd %xmm0, -0x70(%rbp)
jmp 0x12fb2
movq -0x38(%rbp), %rdi
movl $0x3, %esi
callq 0xd270
movsd -0x70(%rbp), %xmm0
movq -0x38(%rbp), %rdi
movsd %xmm0, (%rax)
movl $0xc, %esi
callq 0xd270
movq -0x38(%rbp), %rdi
movsd (%rax), %xmm0
movsd 0x9259(%rip), %xmm1     # 0x1c240
addsd %xmm1, %xmm0
movsd %xmm0, (%rax)
callq 0x13110
movsd %xmm0, -0x78(%rbp)
jmp 0x12ffb
movq -0x38(%rbp), %rdi
movl $0xc, %esi
callq 0xd270
movsd -0x78(%rbp), %xmm0
movq -0x38(%rbp), %rdi
movsd %xmm0, (%rax)
movsd 0x9382(%rip), %xmm0     # 0x1c3a0
movsd %xmm0, -0x80(%rbp)
movl $0xa, %esi
callq 0xd270
movsd -0x80(%rbp), %xmm0
mulsd (%rax), %xmm0
movsd %xmm0, (%rax)
movl $0x0, -0x24(%rbp)
cmpl $0xf, -0x24(%rbp)
jge 0x130e3
movslq -0x24(%rbp), %rcx
leaq 0x92fa(%rip), %rax      # 0x1c350
movsd (%rax,%rcx,8), %xmm0
movslq -0x24(%rbp), %rcx
leaq 0x926a(%rip), %rax      # 0x1c2d0
ucomisd (%rax,%rcx,8), %xmm0
jbe 0x130d3
movq -0x38(%rbp), %rdi
movslq -0x24(%rbp), %rsi
callq 0xd270
movq -0x38(%rbp), %rdi
movsd (%rax), %xmm0
movslq -0x24(%rbp), %rcx
leaq 0x9243(%rip), %rax      # 0x1c2d0
subsd (%rax,%rcx,8), %xmm0
movslq -0x24(%rbp), %rcx
leaq 0x92b3(%rip), %rax      # 0x1c350
movsd (%rax,%rcx,8), %xmm1
movslq -0x24(%rbp), %rcx
leaq 0x9223(%rip), %rax      # 0x1c2d0
subsd (%rax,%rcx,8), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x88(%rbp)
movslq -0x24(%rbp), %rsi
callq 0xd270
movsd -0x88(%rbp), %xmm0
movsd %xmm0, (%rax)
jmp 0x130d5
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x13041
addq $0x90, %rsp
popq %rbp
retq
movq -0x30(%rbp), %rdi
callq 0x3180
movq -0x38(%rbp), %rdi
callq 0x7870
movq -0x18(%rbp), %rdi
callq 0x3440
nopw (%rax,%rax)