// File: tewalds[P]morat/lib/gtpcommon.cpp
// Function: Morat::GTPCommon::gtp_time(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>>>>)
GTPResponse GTPCommon::gtp_time(vecstr args){
	if(args.size() == 0)
		return GTPResponse(true, string("\n") +
			"Update the time settings, eg: time -s 2.5 -m 10 -g 600 -f 1\n" +
			"Method for distributing remaining time, current: " + time_control.method_name() + " " + to_str(time_control.param) + "\n" +
			"  -p --percent  Percentage of the remaining time every move            [10.0]\n" +
			"  -e --even     Multiple of even split of the maximum  remaining moves [2.0]\n" +
			"  -s --stats    Multiple of even split of the expected remaining moves [2.0]\n" +
			"Time allocation\n" +
			"  -m --move     Time per move                                          [" + to_str(time_control.move) + "]\n" +
			"  -g --game     Time per game                                          [" + to_str(time_control.game) + "]\n" +
			"  -f --flexible Add remaining time per move to remaining time          [" + to_str(time_control.flexible) + "]\n" +
			"  -i --maxsims  Maximum number of simulations per move                 [" + to_str(time_control.max_sims) + "]\n" +
			"Current game\n" +
			"  -r --remain   Remaining time for this game                           [" + to_str(time_control.remain) + "]\n");

	for(unsigned int i = 0; i < args.size(); i++) {
		string arg = args[i];

		if(arg == "-p" || arg == "--percent"){
			time_control.method = TimeControl::PERCENT;
			time_control.param = 10;
			if(i+1 < args.size() && from_str<double>(args[i+1]) > 0) time_control.param = from_str<double>(args[++i]);
		}else if(arg == "-e" || arg == "--even"){
			time_control.method = TimeControl::EVEN;
			time_control.param = 2;
			if(i+1 < args.size() && from_str<double>(args[i+1]) > 0) time_control.param = from_str<double>(args[++i]);
		}else if(arg == "-s" || arg == "--stats"){
			time_control.method = TimeControl::STATS;
			time_control.param = 2;
			if(i+1 < args.size() && from_str<double>(args[i+1]) > 0) time_control.param = from_str<double>(args[++i]);
		}else if((arg == "-m" || arg == "--move") && i+1 < args.size()){
			time_control.move = from_str<double>(args[++i]);
		}else if((arg == "-g" || arg == "--game") && i+1 < args.size()){
			time_control.game = from_str<float>(args[++i]);
			// TODO: should this only happen if the game hasn't started yet?
			time_control.remain = time_control.game;
		}else if((arg == "-f" || arg == "--flexible") && i+1 < args.size()){
			time_control.flexible = from_str<bool>(args[++i]);
		}else if((arg == "-i" || arg == "--maxsims") && i+1 < args.size()){
			time_control.max_sims = from_str<int>(args[++i]);
		}else if((arg == "-r" || arg == "--remain") && i+1 < args.size()){
			time_control.remain = from_str<double>(args[++i]);
		}else{
			return GTPResponse(false, "Missing or unknown parameter");
		}
	}

	return GTPResponse(true);
}

// Assembly:
subq $0x5f8, %rsp            # imm = 0x5F8
movq %rdx, 0xf0(%rsp)
movq %rdi, %rax
movq 0xf0(%rsp), %rdi
movq %rax, 0xf8(%rsp)
movq %rax, %rcx
movq %rcx, 0x100(%rsp)
movq %rax, 0x5f0(%rsp)
movq %rsi, 0x5e8(%rsp)
movq %rdi, 0x5e0(%rsp)
movq 0x5e8(%rsp), %rax
movq %rax, 0x108(%rsp)
callq 0x13c80
cmpq $0x0, %rax
jne 0x46edf
leaq 0x27f(%rsp), %rdi
movq %rdi, 0xe8(%rsp)
callq 0x5770
movq 0xe8(%rsp), %rdx
leaq 0x6500(%rip), %rsi      # 0x4c8e8
leaq 0x280(%rsp), %rdi
callq 0x5590
jmp 0x463f7
leaq 0xa6ca(%rip), %rdx      # 0x50ac8
leaq 0x2a0(%rsp), %rdi
leaq 0x280(%rsp), %rsi
callq 0xb910
jmp 0x46415
leaq 0xa6e9(%rip), %rdx      # 0x50b05
leaq 0x2c0(%rsp), %rdi
leaq 0x2a0(%rsp), %rsi
callq 0xb910
jmp 0x46433
movq 0x108(%rsp), %rsi
addq $0x30, %rsi
leaq 0x248(%rsp), %rdi
callq 0x47880
jmp 0x4644e
leaq 0x2e0(%rsp), %rdi
leaq 0x2c0(%rsp), %rsi
leaq 0x248(%rsp), %rdx
callq 0x19e40
jmp 0x4646d
leaq 0xa463(%rip), %rdx      # 0x508d7
leaq 0x300(%rsp), %rdi
leaq 0x2e0(%rsp), %rsi
callq 0xb910
jmp 0x4648b
movq 0x108(%rsp), %rax
vmovsd 0x38(%rax), %xmm0
leaq 0x228(%rsp), %rdi
callq 0x47a20
jmp 0x464a7
leaq 0x320(%rsp), %rdi
leaq 0x300(%rsp), %rsi
leaq 0x228(%rsp), %rdx
callq 0x19e40
jmp 0x464c6
leaq 0x641b(%rip), %rdx      # 0x4c8e8
leaq 0x340(%rsp), %rdi
leaq 0x320(%rsp), %rsi
callq 0xb910
jmp 0x464e4
leaq 0xa64c(%rip), %rdx      # 0x50b37
leaq 0x360(%rsp), %rdi
leaq 0x340(%rsp), %rsi
callq 0xb910
jmp 0x46502
leaq 0xa67d(%rip), %rdx      # 0x50b86
leaq 0x380(%rsp), %rdi
leaq 0x360(%rsp), %rsi
callq 0xb910
jmp 0x46520
leaq 0xa6ad(%rip), %rdx      # 0x50bd4
leaq 0x3a0(%rsp), %rdi
leaq 0x380(%rsp), %rsi
callq 0xb910
jmp 0x4653e
leaq 0xa6dd(%rip), %rdx      # 0x50c22
leaq 0x3c0(%rsp), %rdi
leaq 0x3a0(%rsp), %rsi
callq 0xb910
jmp 0x4655c
leaq 0xa6d0(%rip), %rdx      # 0x50c33
leaq 0x3e0(%rsp), %rdi
leaq 0x3c0(%rsp), %rsi
callq 0xb910
jmp 0x4657a
movq 0x108(%rsp), %rax
vmovsd 0x48(%rax), %xmm0
leaq 0x208(%rsp), %rdi
callq 0x47a20
jmp 0x46596
leaq 0x400(%rsp), %rdi
leaq 0x3e0(%rsp), %rsi
leaq 0x208(%rsp), %rdx
callq 0x19e40
jmp 0x465b5
leaq 0xa5c7(%rip), %rdx      # 0x50b83
leaq 0x420(%rsp), %rdi
leaq 0x400(%rsp), %rsi
callq 0xb910
jmp 0x465d3
leaq 0xa6a2(%rip), %rdx      # 0x50c7c
leaq 0x440(%rsp), %rdi
leaq 0x420(%rsp), %rsi
callq 0xb910
jmp 0x465f1
movq 0x108(%rsp), %rax
vmovsd 0x40(%rax), %xmm0
leaq 0x1e8(%rsp), %rdi
callq 0x47a20
jmp 0x4660d
leaq 0x460(%rsp), %rdi
leaq 0x440(%rsp), %rsi
leaq 0x1e8(%rsp), %rdx
callq 0x19e40
jmp 0x4662c
leaq 0xa550(%rip), %rdx      # 0x50b83
leaq 0x480(%rsp), %rdi
leaq 0x460(%rsp), %rsi
callq 0xb910
jmp 0x4664a
leaq 0xa674(%rip), %rdx      # 0x50cc5
leaq 0x4a0(%rsp), %rdi
leaq 0x480(%rsp), %rsi
callq 0xb910
jmp 0x46668
movq 0x108(%rsp), %rax
movzbl 0x50(%rax), %esi
andl $0x1, %esi
leaq 0x1c8(%rsp), %rdi
callq 0x3ede0
jmp 0x46686
leaq 0x4c0(%rsp), %rdi
leaq 0x4a0(%rsp), %rsi
leaq 0x1c8(%rsp), %rdx
callq 0x19e40
jmp 0x466a5
leaq 0xa4d7(%rip), %rdx      # 0x50b83
leaq 0x4e0(%rsp), %rdi
leaq 0x4c0(%rsp), %rsi
callq 0xb910
jmp 0x466c3
leaq 0xa644(%rip), %rdx      # 0x50d0e
leaq 0x500(%rsp), %rdi
leaq 0x4e0(%rsp), %rsi
callq 0xb910
jmp 0x466e1
movq 0x108(%rsp), %rax
movq 0x58(%rax), %rsi
leaq 0x1a8(%rsp), %rdi
callq 0x3ec50
jmp 0x466fc
leaq 0x520(%rsp), %rdi
leaq 0x500(%rsp), %rsi
leaq 0x1a8(%rsp), %rdx
callq 0x19e40
jmp 0x4671b
leaq 0xa461(%rip), %rdx      # 0x50b83
leaq 0x540(%rsp), %rdi
leaq 0x520(%rsp), %rsi
callq 0xb910
jmp 0x46739
leaq 0xa617(%rip), %rdx      # 0x50d57
leaq 0x560(%rsp), %rdi
leaq 0x540(%rsp), %rsi
callq 0xb910
jmp 0x46757
leaq 0xa607(%rip), %rdx      # 0x50d65
leaq 0x580(%rsp), %rdi
leaq 0x560(%rsp), %rsi
callq 0xb910
jmp 0x46775
movq 0x108(%rsp), %rax
vmovsd 0x60(%rax), %xmm0
leaq 0x188(%rsp), %rdi
callq 0x47a20
jmp 0x46791
leaq 0x5a0(%rsp), %rdi
leaq 0x580(%rsp), %rsi
leaq 0x188(%rsp), %rdx
callq 0x19e40
jmp 0x467b0
leaq 0xa3cc(%rip), %rdx      # 0x50b83
leaq 0x5c0(%rsp), %rdi
leaq 0x5a0(%rsp), %rsi
callq 0xb910
jmp 0x467ce
movq 0xf8(%rsp), %rdi
movl $0x1, %esi
leaq 0x5c0(%rsp), %rdx
callq 0xd9a0
jmp 0x467ea
leaq 0x5c0(%rsp), %rdi
callq 0x5260
leaq 0x5a0(%rsp), %rdi
callq 0x5260
leaq 0x188(%rsp), %rdi
callq 0x5260
leaq 0x580(%rsp), %rdi
callq 0x5260
leaq 0x560(%rsp), %rdi
callq 0x5260
leaq 0x540(%rsp), %rdi
callq 0x5260
leaq 0x520(%rsp), %rdi
callq 0x5260
leaq 0x1a8(%rsp), %rdi
callq 0x5260
leaq 0x500(%rsp), %rdi
callq 0x5260
leaq 0x4e0(%rsp), %rdi
callq 0x5260
leaq 0x4c0(%rsp), %rdi
callq 0x5260
leaq 0x1c8(%rsp), %rdi
callq 0x5260
leaq 0x4a0(%rsp), %rdi
callq 0x5260
leaq 0x480(%rsp), %rdi
callq 0x5260
leaq 0x460(%rsp), %rdi
callq 0x5260
leaq 0x1e8(%rsp), %rdi
callq 0x5260
leaq 0x440(%rsp), %rdi
callq 0x5260
leaq 0x420(%rsp), %rdi
callq 0x5260
leaq 0x400(%rsp), %rdi
callq 0x5260
leaq 0x208(%rsp), %rdi
callq 0x5260
leaq 0x3e0(%rsp), %rdi
callq 0x5260
leaq 0x3c0(%rsp), %rdi
callq 0x5260
leaq 0x3a0(%rsp), %rdi
callq 0x5260
leaq 0x380(%rsp), %rdi
callq 0x5260
leaq 0x360(%rsp), %rdi
callq 0x5260
leaq 0x340(%rsp), %rdi
callq 0x5260
leaq 0x320(%rsp), %rdi
callq 0x5260
leaq 0x228(%rsp), %rdi
callq 0x5260
leaq 0x300(%rsp), %rdi
callq 0x5260
leaq 0x2e0(%rsp), %rdi
callq 0x5260
leaq 0x248(%rsp), %rdi
callq 0x5260
leaq 0x2c0(%rsp), %rdi
callq 0x5260
leaq 0x2a0(%rsp), %rdi
callq 0x5260
leaq 0x280(%rsp), %rdi
callq 0x5260
leaq 0x27f(%rsp), %rdi
callq 0x5450
jmp 0x47858
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x270(%rsp)
movl %eax, 0x26c(%rsp)
jmp 0x46ecd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x270(%rsp)
movl %eax, 0x26c(%rsp)
jmp 0x46ec0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x270(%rsp)
movl %eax, 0x26c(%rsp)
jmp 0x46eb3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x270(%rsp)
movl %eax, 0x26c(%rsp)
jmp 0x46ea6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x270(%rsp)
movl %eax, 0x26c(%rsp)
jmp 0x46e99
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x270(%rsp)
movl %eax, 0x26c(%rsp)
jmp 0x46e8c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x270(%rsp)
movl %eax, 0x26c(%rsp)
jmp 0x46e7f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x270(%rsp)
movl %eax, 0x26c(%rsp)
jmp 0x46e72
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x270(%rsp)
movl %eax, 0x26c(%rsp)
jmp 0x46e65
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x270(%rsp)
movl %eax, 0x26c(%rsp)
jmp 0x46e58
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x270(%rsp)
movl %eax, 0x26c(%rsp)
jmp 0x46e4b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x270(%rsp)
movl %eax, 0x26c(%rsp)
jmp 0x46e3e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x270(%rsp)
movl %eax, 0x26c(%rsp)
jmp 0x46e31
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x270(%rsp)
movl %eax, 0x26c(%rsp)
jmp 0x46e24
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x270(%rsp)
movl %eax, 0x26c(%rsp)
jmp 0x46e17
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x270(%rsp)
movl %eax, 0x26c(%rsp)
jmp 0x46e0a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x270(%rsp)
movl %eax, 0x26c(%rsp)
jmp 0x46dfd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x270(%rsp)
movl %eax, 0x26c(%rsp)
jmp 0x46df0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x270(%rsp)
movl %eax, 0x26c(%rsp)
jmp 0x46de3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x270(%rsp)
movl %eax, 0x26c(%rsp)
jmp 0x46dd6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x270(%rsp)
movl %eax, 0x26c(%rsp)
jmp 0x46dc9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x270(%rsp)
movl %eax, 0x26c(%rsp)
jmp 0x46dbc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x270(%rsp)
movl %eax, 0x26c(%rsp)
jmp 0x46daf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x270(%rsp)
movl %eax, 0x26c(%rsp)
jmp 0x46da2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x270(%rsp)
movl %eax, 0x26c(%rsp)
jmp 0x46d95
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x270(%rsp)
movl %eax, 0x26c(%rsp)
jmp 0x46d88
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x270(%rsp)
movl %eax, 0x26c(%rsp)
jmp 0x46d7b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x270(%rsp)
movl %eax, 0x26c(%rsp)
jmp 0x46d6e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x270(%rsp)
movl %eax, 0x26c(%rsp)
jmp 0x46d61
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x270(%rsp)
movl %eax, 0x26c(%rsp)
jmp 0x46d54
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x270(%rsp)
movl %eax, 0x26c(%rsp)
jmp 0x46d47
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x270(%rsp)
movl %eax, 0x26c(%rsp)
jmp 0x46d3a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x270(%rsp)
movl %eax, 0x26c(%rsp)
jmp 0x46d2d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x270(%rsp)
movl %eax, 0x26c(%rsp)
jmp 0x46d20
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x270(%rsp)
movl %eax, 0x26c(%rsp)
leaq 0x5c0(%rsp), %rdi
callq 0x5260
leaq 0x5a0(%rsp), %rdi
callq 0x5260
leaq 0x188(%rsp), %rdi
callq 0x5260
leaq 0x580(%rsp), %rdi
callq 0x5260
leaq 0x560(%rsp), %rdi
callq 0x5260
leaq 0x540(%rsp), %rdi
callq 0x5260
leaq 0x520(%rsp), %rdi
callq 0x5260
leaq 0x1a8(%rsp), %rdi
callq 0x5260
leaq 0x500(%rsp), %rdi
callq 0x5260
leaq 0x4e0(%rsp), %rdi
callq 0x5260
leaq 0x4c0(%rsp), %rdi
callq 0x5260
leaq 0x1c8(%rsp), %rdi
callq 0x5260
leaq 0x4a0(%rsp), %rdi
callq 0x5260
leaq 0x480(%rsp), %rdi
callq 0x5260
leaq 0x460(%rsp), %rdi
callq 0x5260
leaq 0x1e8(%rsp), %rdi
callq 0x5260
leaq 0x440(%rsp), %rdi
callq 0x5260
leaq 0x420(%rsp), %rdi
callq 0x5260
leaq 0x400(%rsp), %rdi
callq 0x5260
leaq 0x208(%rsp), %rdi
callq 0x5260
leaq 0x3e0(%rsp), %rdi
callq 0x5260
leaq 0x3c0(%rsp), %rdi
callq 0x5260
leaq 0x3a0(%rsp), %rdi
callq 0x5260
leaq 0x380(%rsp), %rdi
callq 0x5260
leaq 0x360(%rsp), %rdi
callq 0x5260
leaq 0x340(%rsp), %rdi
callq 0x5260
leaq 0x320(%rsp), %rdi
callq 0x5260
leaq 0x228(%rsp), %rdi
callq 0x5260
leaq 0x300(%rsp), %rdi
callq 0x5260
leaq 0x2e0(%rsp), %rdi
callq 0x5260
leaq 0x248(%rsp), %rdi
callq 0x5260
leaq 0x2c0(%rsp), %rdi
callq 0x5260
leaq 0x2a0(%rsp), %rdi
callq 0x5260
leaq 0x280(%rsp), %rdi
callq 0x5260
leaq 0x27f(%rsp), %rdi
callq 0x5450
jmp 0x47868
movl $0x0, 0x184(%rsp)
movq 0xf0(%rsp), %rdi
movl 0x184(%rsp), %eax
movq %rax, 0xe0(%rsp)
callq 0x13c80
movq %rax, %rcx
movq 0xe0(%rsp), %rax
cmpq %rcx, %rax
jae 0x477af
movq 0xf0(%rsp), %rdi
movl 0x184(%rsp), %eax
movl %eax, %esi
callq 0x13ca0
movq %rax, %rsi
leaq 0x160(%rsp), %rdi
movq %rdi, 0xd0(%rsp)
callq 0x51b0
movq 0xd0(%rsp), %rdi
leaq 0x930c(%rip), %rsi      # 0x50263
callq 0xb0f0
movb %al, 0xdf(%rsp)
jmp 0x46f65
movb 0xdf(%rsp), %al
testb $0x1, %al
jne 0x46f9f
jmp 0x46f72
leaq 0x9e35(%rip), %rsi      # 0x50dae
leaq 0x160(%rsp), %rdi
callq 0xb0f0
movb %al, 0xcf(%rsp)
jmp 0x46f8f
movb 0xcf(%rsp), %al
testb $0x1, %al
jne 0x46f9f
jmp 0x47096
movq 0xf0(%rsp), %rdi
movq 0x108(%rsp), %rax
movl $0x0, 0x30(%rax)
vmovsd 0x9b02(%rip), %xmm0     # 0x50ac0
vmovsd %xmm0, 0x38(%rax)
movl 0x184(%rsp), %eax
addl $0x1, %eax
movl %eax, %eax
movq %rax, 0xc0(%rsp)
callq 0x13c80
movq %rax, %rcx
movq 0xc0(%rsp), %rax
cmpq %rcx, %rax
jae 0x47091
movq 0xf0(%rsp), %rdi
movl 0x184(%rsp), %eax
incl %eax
movl %eax, %esi
callq 0x13ca0
movq %rax, %rdi
callq 0x3eaa0
vmovsd %xmm0, 0xb8(%rsp)
jmp 0x4701b
vmovsd 0xb8(%rsp), %xmm0
vpxor %xmm1, %xmm1, %xmm1
vucomisd %xmm1, %xmm0
jbe 0x47091
movq 0xf0(%rsp), %rdi
movl 0x184(%rsp), %eax
incl %eax
movl %eax, 0x184(%rsp)
movl %eax, %esi
callq 0x13ca0
movq %rax, %rdi
callq 0x3eaa0
vmovsd %xmm0, 0xb0(%rsp)
jmp 0x47060
movq 0x108(%rsp), %rax
vmovsd 0xb0(%rsp), %xmm0
vmovsd %xmm0, 0x38(%rax)
jmp 0x47091
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x270(%rsp)
movl %eax, 0x26c(%rsp)
jmp 0x4779d
jmp 0x4775b
leaq 0x9087(%rip), %rsi      # 0x50124
leaq 0x160(%rsp), %rdi
callq 0xb0f0
movb %al, 0xaf(%rsp)
jmp 0x470b3
movb 0xaf(%rsp), %al
testb $0x1, %al
jne 0x470ed
jmp 0x470c0
leaq 0x9cf1(%rip), %rsi      # 0x50db8
leaq 0x160(%rsp), %rdi
callq 0xb0f0
movb %al, 0xae(%rsp)
jmp 0x470dd
movb 0xae(%rsp), %al
testb $0x1, %al
jne 0x470ed
jmp 0x471c9
movq 0xf0(%rsp), %rdi
movq 0x108(%rsp), %rax
movl $0x1, 0x30(%rax)
vmovsd 0x4f0c(%rip), %xmm0     # 0x4c018
vmovsd %xmm0, 0x38(%rax)
movl 0x184(%rsp), %eax
addl $0x1, %eax
movl %eax, %eax
movq %rax, 0xa0(%rsp)
callq 0x13c80
movq %rax, %rcx
movq 0xa0(%rsp), %rax
cmpq %rcx, %rax
jae 0x471c4
movq 0xf0(%rsp), %rdi
movl 0x184(%rsp), %eax
incl %eax
movl %eax, %esi
callq 0x13ca0
movq %rax, %rdi
callq 0x3eaa0
vmovsd %xmm0, 0x98(%rsp)
jmp 0x47169
vmovsd 0x98(%rsp), %xmm0
vpxor %xmm1, %xmm1, %xmm1
vucomisd %xmm1, %xmm0
jbe 0x471c4
movq 0xf0(%rsp), %rdi
movl 0x184(%rsp), %eax
incl %eax
movl %eax, 0x184(%rsp)
movl %eax, %esi
callq 0x13ca0
movq %rax, %rdi
callq 0x3eaa0
vmovsd %xmm0, 0x90(%rsp)
jmp 0x471ae
movq 0x108(%rsp), %rax
vmovsd 0x90(%rsp), %xmm0
vmovsd %xmm0, 0x38(%rax)
jmp 0x47759
leaq 0x8f9b(%rip), %rsi      # 0x5016b
leaq 0x160(%rsp), %rdi
callq 0xb0f0
movb %al, 0x8f(%rsp)
jmp 0x471e6
movb 0x8f(%rsp), %al
testb $0x1, %al
jne 0x47220
jmp 0x471f3
leaq 0x9bc5(%rip), %rsi      # 0x50dbf
leaq 0x160(%rsp), %rdi
callq 0xb0f0
movb %al, 0x8e(%rsp)
jmp 0x47210
movb 0x8e(%rsp), %al
testb $0x1, %al
jne 0x47220
jmp 0x472ec
movq 0xf0(%rsp), %rdi
movq 0x108(%rsp), %rax
movl $0x2, 0x30(%rax)
vmovsd 0x4dd9(%rip), %xmm0     # 0x4c018
vmovsd %xmm0, 0x38(%rax)
movl 0x184(%rsp), %eax
addl $0x1, %eax
movl %eax, %eax
movq %rax, 0x80(%rsp)
callq 0x13c80
movq %rax, %rcx
movq 0x80(%rsp), %rax
cmpq %rcx, %rax
jae 0x472e7
movq 0xf0(%rsp), %rdi
movl 0x184(%rsp), %eax
incl %eax
movl %eax, %esi
callq 0x13ca0
movq %rax, %rdi
callq 0x3eaa0
vmovsd %xmm0, 0x78(%rsp)
jmp 0x47295
vmovsd 0x78(%rsp), %xmm0
vpxor %xmm1, %xmm1, %xmm1
vucomisd %xmm1, %xmm0
jbe 0x472e7
movq 0xf0(%rsp), %rdi
movl 0x184(%rsp), %eax
incl %eax
movl %eax, 0x184(%rsp)
movl %eax, %esi
callq 0x13ca0
movq %rax, %rdi
callq 0x3eaa0
vmovsd %xmm0, 0x70(%rsp)
jmp 0x472d4
movq 0x108(%rsp), %rax
vmovsd 0x70(%rsp), %xmm0
vmovsd %xmm0, 0x38(%rax)
jmp 0x47757
leaq 0x8e95(%rip), %rsi      # 0x50188
leaq 0x160(%rsp), %rdi
callq 0xb0f0
movb %al, 0x6f(%rsp)
jmp 0x47306
movb 0x6f(%rsp), %al
testb $0x1, %al
jne 0x47334
jmp 0x47310
leaq 0x9ab0(%rip), %rsi      # 0x50dc7
leaq 0x160(%rsp), %rdi
callq 0xb0f0
movb %al, 0x6e(%rsp)
jmp 0x4732a
movb 0x6e(%rsp), %al
testb $0x1, %al
jne 0x47334
jmp 0x473a6
movq 0xf0(%rsp), %rdi
movl 0x184(%rsp), %eax
addl $0x1, %eax
movl %eax, %eax
movq %rax, 0x60(%rsp)
callq 0x13c80
movq %rax, %rcx
movq 0x60(%rsp), %rax
cmpq %rcx, %rax
jae 0x473a6
movq 0xf0(%rsp), %rdi
movl 0x184(%rsp), %eax
incl %eax
movl %eax, 0x184(%rsp)
movl %eax, %esi
callq 0x13ca0
movq %rax, %rdi
callq 0x3eaa0
vmovsd %xmm0, 0x58(%rsp)
jmp 0x4738e
movq 0x108(%rsp), %rax
vmovsd 0x58(%rsp), %xmm0
vmovsd %xmm0, 0x48(%rax)
jmp 0x47755
leaq 0x8ec3(%rip), %rsi      # 0x50270
leaq 0x160(%rsp), %rdi
callq 0xb0f0
movb %al, 0x57(%rsp)
jmp 0x473c0
movb 0x57(%rsp), %al
testb $0x1, %al
jne 0x473f1
jmp 0x473ca
leaq 0x99fd(%rip), %rsi      # 0x50dce
leaq 0x160(%rsp), %rdi
callq 0xb0f0
movb %al, 0x56(%rsp)
jmp 0x473e4
movb 0x56(%rsp), %al
testb $0x1, %al
jne 0x473f1
jmp 0x47471
movq 0xf0(%rsp), %rdi
movl 0x184(%rsp), %eax
addl $0x1, %eax
movl %eax, %eax
movq %rax, 0x48(%rsp)
callq 0x13c80
movq %rax, %rcx
movq 0x48(%rsp), %rax
cmpq %rcx, %rax
jae 0x47471
movq 0xf0(%rsp), %rdi
movl 0x184(%rsp), %eax
incl %eax
movl %eax, 0x184(%rsp)
movl %eax, %esi
callq 0x13ca0
movq %rax, %rdi
callq 0x1dd00
vmovss %xmm0, 0x44(%rsp)
jmp 0x4744b
movq 0x108(%rsp), %rax
vmovss 0x44(%rsp), %xmm1
vcvtss2sd %xmm1, %xmm0, %xmm0
vmovsd %xmm0, 0x40(%rax)
vmovsd 0x40(%rax), %xmm0
vmovsd %xmm0, 0x60(%rax)
jmp 0x47753
leaq 0x4d35(%rip), %rsi      # 0x4c1ad
leaq 0x160(%rsp), %rdi
callq 0xb0f0
movb %al, 0x43(%rsp)
jmp 0x4748b
movb 0x43(%rsp), %al
testb $0x1, %al
jne 0x474b9
jmp 0x47495
leaq 0x9939(%rip), %rsi      # 0x50dd5
leaq 0x160(%rsp), %rdi
callq 0xb0f0
movb %al, 0x42(%rsp)
jmp 0x474af
movb 0x42(%rsp), %al
testb $0x1, %al
jne 0x474b9
jmp 0x47528
movq 0xf0(%rsp), %rdi
movl 0x184(%rsp), %eax
addl $0x1, %eax
movl %eax, %eax
movq %rax, 0x38(%rsp)
callq 0x13c80
movq %rax, %rcx
movq 0x38(%rsp), %rax
cmpq %rcx, %rax
jae 0x47528
movq 0xf0(%rsp), %rdi
movl 0x184(%rsp), %eax
incl %eax
movl %eax, 0x184(%rsp)
movl %eax, %esi
callq 0x13ca0
movq %rax, %rdi
callq 0x3ef10
movb %al, 0x37(%rsp)
jmp 0x47511
movq 0x108(%rsp), %rax
movb 0x37(%rsp), %cl
andb $0x1, %cl
movb %cl, 0x50(%rax)
jmp 0x47751
leaq 0x98b1(%rip), %rsi      # 0x50de0
leaq 0x160(%rsp), %rdi
callq 0xb0f0
movb %al, 0x36(%rsp)
jmp 0x47542
movb 0x36(%rsp), %al
testb $0x1, %al
jne 0x47570
jmp 0x4754c
leaq 0x9890(%rip), %rsi      # 0x50de3
leaq 0x160(%rsp), %rdi
callq 0xb0f0
movb %al, 0x35(%rsp)
jmp 0x47566
movb 0x35(%rsp), %al
testb $0x1, %al
jne 0x47570
jmp 0x475e0
movq 0xf0(%rsp), %rdi
movl 0x184(%rsp), %eax
addl $0x1, %eax
movl %eax, %eax
movq %rax, 0x28(%rsp)
callq 0x13c80
movq %rax, %rcx
movq 0x28(%rsp), %rax
cmpq %rcx, %rax
jae 0x475e0
movq 0xf0(%rsp), %rdi
movl 0x184(%rsp), %eax
incl %eax
movl %eax, 0x184(%rsp)
movl %eax, %esi
callq 0x13ca0
movq %rax, %rdi
callq 0x10220
movl %eax, 0x24(%rsp)
jmp 0x475c8
movq 0x108(%rsp), %rax
movl 0x24(%rsp), %ecx
movslq %ecx, %rcx
movq %rcx, 0x58(%rax)
jmp 0x4774f
leaq 0x8bca(%rip), %rsi      # 0x501b1
leaq 0x160(%rsp), %rdi
callq 0xb0f0
movb %al, 0x23(%rsp)
jmp 0x475fa
movb 0x23(%rsp), %al
testb $0x1, %al
jne 0x47628
jmp 0x47604
leaq 0x97e2(%rip), %rsi      # 0x50ded
leaq 0x160(%rsp), %rdi
callq 0xb0f0
movb %al, 0x22(%rsp)
jmp 0x4761e
movb 0x22(%rsp), %al
testb $0x1, %al
jne 0x47628
jmp 0x4769a
movq 0xf0(%rsp), %rdi
movl 0x184(%rsp), %eax
addl $0x1, %eax
movl %eax, %eax
movq %rax, 0x18(%rsp)
callq 0x13c80
movq %rax, %rcx
movq 0x18(%rsp), %rax
cmpq %rcx, %rax
jae 0x4769a
movq 0xf0(%rsp), %rdi
movl 0x184(%rsp), %eax
incl %eax
movl %eax, 0x184(%rsp)
movl %eax, %esi
callq 0x13ca0
movq %rax, %rdi
callq 0x3eaa0
vmovsd %xmm0, 0x10(%rsp)
jmp 0x47682
movq 0x108(%rsp), %rax
vmovsd 0x10(%rsp), %xmm0
vmovsd %xmm0, 0x60(%rax)
jmp 0x4774d
leaq 0x13f(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x5770
movq 0x8(%rsp), %rdx
leaq 0x8bd7(%rip), %rsi      # 0x5028f
leaq 0x140(%rsp), %rdi
callq 0x5590
jmp 0x476c7
movq 0xf8(%rsp), %rdi
xorl %esi, %esi
leaq 0x140(%rsp), %rdx
callq 0xd9a0
jmp 0x476e0
leaq 0x140(%rsp), %rdi
callq 0x5260
leaq 0x13f(%rsp), %rdi
callq 0x5450
movl $0x1, 0x138(%rsp)
jmp 0x47766
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x270(%rsp)
movl %eax, 0x26c(%rsp)
jmp 0x4773e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x270(%rsp)
movl %eax, 0x26c(%rsp)
leaq 0x140(%rsp), %rdi
callq 0x5260
leaq 0x13f(%rsp), %rdi
callq 0x5450
jmp 0x4779d
jmp 0x4774f
jmp 0x47751
jmp 0x47753
jmp 0x47755
jmp 0x47757
jmp 0x47759
jmp 0x4775b
movl $0x0, 0x138(%rsp)
leaq 0x160(%rsp), %rdi
callq 0x5260
movl 0x138(%rsp), %eax
testl %eax, %eax
je 0x47785
jmp 0x47780
jmp 0x47858
jmp 0x47787
movl 0x184(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x184(%rsp)
jmp 0x46eea
leaq 0x160(%rsp), %rdi
callq 0x5260
jmp 0x47868
leaq 0x117(%rsp), %rdi
movq %rdi, (%rsp)
callq 0x5770
movq (%rsp), %rdx
leaq 0x511e(%rip), %rsi      # 0x4c8e9
leaq 0x118(%rsp), %rdi
callq 0x5590
jmp 0x477da
movq 0xf8(%rsp), %rdi
movl $0x1, %esi
leaq 0x118(%rsp), %rdx
callq 0xd9a0
jmp 0x477f6
leaq 0x118(%rsp), %rdi
callq 0x5260
leaq 0x117(%rsp), %rdi
callq 0x5450
jmp 0x47858
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x270(%rsp)
movl %eax, 0x26c(%rsp)
jmp 0x47849
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x270(%rsp)
movl %eax, 0x26c(%rsp)
leaq 0x118(%rsp), %rdi
callq 0x5260
leaq 0x117(%rsp), %rdi
callq 0x5450
jmp 0x47868
movq 0x100(%rsp), %rax
addq $0x5f8, %rsp            # imm = 0x5F8
retq
movq 0x270(%rsp), %rdi
callq 0x5760
nopw %cs:(%rax,%rax)
nop