// File: /workspace/github_cpp_makefile_star2_O3/uclaopt[P]AsyncQVI/include/util.h
// Function: parse_input_argv(Params*, int, char**)
void parse_input_argv(Params* para, int argc, char *argv[]){
	
	if (argc < 2) {
		cout << "Input number error: [0]" << endl;
		return;
	}

	for (int i = 1; i < argc; ++i)
	{
		if (argv[i][0] != '-') {
			break;
		}
		if (++i >= argc) {
			cout << "Input number error: [1]" << endl;
			return;
		}
		else if (std::string(argv[i - 1]) == "-len_state") {
			para->len_state = atoi(argv[i]);
		}
		else if (std::string(argv[i - 1]) == "-len_action") {
			para->len_action = atoi(argv[i]);
		}
		else if (std::string(argv[i - 1]) == "-probs") {
			para->probs = atof(argv[i]);
		}
		else if (std::string(argv[i - 1]) == "-d") {
			para->d = atof(argv[i]);
		}
		else if (std::string(argv[i - 1]) == "-max_outer_iter") {
			para->max_outer_iter = atoi(argv[i]);
		}
		else if (std::string(argv[i - 1]) == "-max_inner_iter") {
			para->max_inner_iter = atoi(argv[i]);
		}
		else if (std::string(argv[i - 1]) == "-test_max_episode") {
			para->test_max_episode = atoi(argv[i]);
		}
		else if (std::string(argv[i - 1]) == "-test_max_step") {
			para->test_max_step = atoi(argv[i]);
		}
		else if (std::string(argv[i - 1]) == "-sample_num_1") {
			para->sample_num_1 = atoi(argv[i]);
		}
		else if (std::string(argv[i - 1]) == "-sample_num_2") {
			para->sample_num_2 = atoi(argv[i]);
		}
		else if (std::string(argv[i - 1]) == "-check_step") {
			para->check_step = atoi(argv[i]);
		}
		else if (std::string(argv[i - 1]) == "-style") {
			para->style = atoi(argv[i]);
		}
		else if (std::string(argv[i - 1]) == "-save") {
			para->save = atoi(argv[i]);
		}
		else if (std::string(argv[i - 1]) == "-alpha") {
			para->alpha = atof(argv[i]);
		}
		else if (std::string(argv[i - 1]) == "-alpha1") {
			para->alpha1 = atof(argv[i]);
		}
		else if (std::string(argv[i - 1]) == "-explore") {
			para->explore = atof(argv[i]);
		}
		else if (std::string(argv[i - 1]) == "-gamma") {
			para->gamma = atof(argv[i]);
		}
		else if (std::string(argv[i - 1]) == "-epsilon") {
			para->epsilon = atof(argv[i]);
		}
		else if (std::string(argv[i - 1]) == "-algo") {
			para->algo = atoi(argv[i]);
		}
		else if (std::string(argv[i - 1]) == "-nthreads") {
			para->total_num_threads = atoi(argv[i]);
		}
		else {
			cout << "Input number error: [2]" << endl;
			return;
		}
	}
	return;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, 0x10(%rsp)
cmpl $0x2, %esi
jge 0x25d4
movq 0x6a4d(%rip), %rbx      # 0x8fd8
leaq 0x3b9a(%rip), %rsi      # 0x612c
movl $0x17, %edx
movq %rbx, %rdi
callq 0x2220
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21e0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2100
movq %rdx, %rbx
movl %esi, %ebp
movl $0x2, %r14d
movl $0x1, %r12d
leaq 0x18(%rsp), %r15
movq -0x8(%rbx,%r14,8), %rsi
cmpb $0x2d, (%rsi)
jne 0x2db3
cmpl %ebp, %r14d
jge 0x2d71
movq %r15, %rdi
leaq 0xf(%rsp), %rdx
callq 0x3b60
movq %r15, %rdi
leaq 0x3b44(%rip), %rsi      # 0x615c
callq 0x2050
movl %eax, %r13d
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x263c
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x2200
testl %r13d, %r13d
je 0x2bc6
movq -0x8(%rbx,%r14,8), %rsi
movq %r15, %rdi
leaq 0xf(%rsp), %rdx
callq 0x3b60
movq %r15, %rdi
leaq 0x3b06(%rip), %rsi      # 0x6167
callq 0x2050
movl %eax, %r13d
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x2685
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x2200
testl %r13d, %r13d
je 0x2bdb
movq -0x8(%rbx,%r14,8), %rsi
movq %r15, %rdi
leaq 0xf(%rsp), %rdx
callq 0x3b60
movq %r15, %rdi
leaq 0x3ac9(%rip), %rsi      # 0x6173
callq 0x2050
movl %eax, %r13d
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x26ce
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x2200
testl %r13d, %r13d
je 0x2bf1
movq -0x8(%rbx,%r14,8), %rsi
movq %r15, %rdi
leaq 0xf(%rsp), %rdx
callq 0x3b60
movq %r15, %rdi
leaq 0x3a87(%rip), %rsi      # 0x617a
callq 0x2050
movl %eax, %r13d
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x2717
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x2200
testl %r13d, %r13d
je 0x2c09
movq -0x8(%rbx,%r14,8), %rsi
movq %r15, %rdi
leaq 0xf(%rsp), %rdx
callq 0x3b60
movq %r15, %rdi
leaq 0x3a41(%rip), %rsi      # 0x617d
callq 0x2050
movl %eax, %r13d
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x2760
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x2200
testl %r13d, %r13d
je 0x2c21
movq -0x8(%rbx,%r14,8), %rsi
movq %r15, %rdi
leaq 0xf(%rsp), %rdx
callq 0x3b60
movq %r15, %rdi
leaq 0x3a08(%rip), %rsi      # 0x618d
callq 0x2050
movl %eax, %r13d
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x27a9
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x2200
testl %r13d, %r13d
je 0x2c37
movq -0x8(%rbx,%r14,8), %rsi
movq %r15, %rdi
leaq 0xf(%rsp), %rdx
callq 0x3b60
movq %r15, %rdi
leaq 0x39cf(%rip), %rsi      # 0x619d
callq 0x2050
movl %eax, %r13d
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x27f2
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x2200
testl %r13d, %r13d
je 0x2c4d
movq -0x8(%rbx,%r14,8), %rsi
movq %r15, %rdi
leaq 0xf(%rsp), %rdx
callq 0x3b60
movq %r15, %rdi
leaq 0x3998(%rip), %rsi      # 0x61af
callq 0x2050
movl %eax, %r13d
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x283b
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x2200
testl %r13d, %r13d
je 0x2c63
movq -0x8(%rbx,%r14,8), %rsi
movq %r15, %rdi
leaq 0xf(%rsp), %rdx
callq 0x3b60
movq %r15, %rdi
leaq 0x395e(%rip), %rsi      # 0x61be
callq 0x2050
movl %eax, %r13d
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x2884
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x2200
testl %r13d, %r13d
je 0x2c79
movq -0x8(%rbx,%r14,8), %rsi
movq %r15, %rdi
leaq 0xf(%rsp), %rdx
callq 0x3b60
movq %r15, %rdi
leaq 0x3923(%rip), %rsi      # 0x61cc
callq 0x2050
movl %eax, %r13d
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x28cd
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x2200
testl %r13d, %r13d
je 0x2c8f
movq -0x8(%rbx,%r14,8), %rsi
movq %r15, %rdi
leaq 0xf(%rsp), %rdx
callq 0x3b60
movq %r15, %rdi
leaq 0x38e8(%rip), %rsi      # 0x61da
callq 0x2050
movl %eax, %r13d
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x2916
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x2200
testl %r13d, %r13d
je 0x2ca5
movq -0x8(%rbx,%r14,8), %rsi
movq %r15, %rdi
leaq 0xf(%rsp), %rdx
callq 0x3b60
movq %r15, %rdi
leaq 0x38ab(%rip), %rsi      # 0x61e6
callq 0x2050
movl %eax, %r13d
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x295f
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x2200
testl %r13d, %r13d
je 0x2cbb
movq -0x8(%rbx,%r14,8), %rsi
movq %r15, %rdi
leaq 0xf(%rsp), %rdx
callq 0x3b60
movq %r15, %rdi
leaq 0x3869(%rip), %rsi      # 0x61ed
callq 0x2050
movl %eax, %r13d
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x29a8
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x2200
testl %r13d, %r13d
je 0x2cd1
movq -0x8(%rbx,%r14,8), %rsi
movq %r15, %rdi
leaq 0xf(%rsp), %rdx
callq 0x3b60
movq %r15, %rdi
leaq 0x3826(%rip), %rsi      # 0x61f3
callq 0x2050
movl %eax, %r13d
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x29f1
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x2200
testl %r13d, %r13d
je 0x2ce4
movq -0x8(%rbx,%r14,8), %rsi
movq %r15, %rdi
leaq 0xf(%rsp), %rdx
callq 0x3b60
movq %r15, %rdi
leaq 0x37e4(%rip), %rsi      # 0x61fa
callq 0x2050
movl %eax, %r13d
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x2a3a
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x2200
testl %r13d, %r13d
je 0x2cf9
movq -0x8(%rbx,%r14,8), %rsi
movq %r15, %rdi
leaq 0xf(%rsp), %rdx
callq 0x3b60
movq %r15, %rdi
leaq 0x37a3(%rip), %rsi      # 0x6202
callq 0x2050
movl %eax, %r13d
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x2a83
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x2200
testl %r13d, %r13d
je 0x2d0e
movq -0x8(%rbx,%r14,8), %rsi
movq %r15, %rdi
leaq 0xf(%rsp), %rdx
callq 0x3b60
movq %r15, %rdi
leaq 0x3763(%rip), %rsi      # 0x620b
callq 0x2050
movl %eax, %r13d
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x2acc
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x2200
testl %r13d, %r13d
je 0x2d23
movq -0x8(%rbx,%r14,8), %rsi
movq %r15, %rdi
leaq 0xf(%rsp), %rdx
callq 0x3b60
movq %r15, %rdi
leaq 0x3721(%rip), %rsi      # 0x6212
callq 0x2050
movl %eax, %r13d
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x2b15
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x2200
testl %r13d, %r13d
je 0x2d38
movq -0x8(%rbx,%r14,8), %rsi
movq %r15, %rdi
leaq 0xf(%rsp), %rdx
callq 0x3b60
movq %r15, %rdi
leaq 0x36e1(%rip), %rsi      # 0x621b
callq 0x2050
movl %eax, %r13d
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x2b5e
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x2200
testl %r13d, %r13d
je 0x2d4d
movq -0x8(%rbx,%r14,8), %rsi
movq %r15, %rdi
leaq 0xf(%rsp), %rdx
callq 0x3b60
movq %r15, %rdi
leaq 0x369e(%rip), %rsi      # 0x6221
callq 0x2050
movl %eax, %r13d
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x2ba7
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x2200
testl %r13d, %r13d
jne 0x2dc2
movq (%rbx,%r14,8), %rdi
callq 0x22c0
movq 0x10(%rsp), %rcx
movl %eax, 0x30(%rcx)
jmp 0x2d5e
movq (%rbx,%r14,8), %rdi
callq 0x22c0
movq 0x10(%rsp), %rcx
movl %eax, (%rcx)
jmp 0x2d5e
movq (%rbx,%r14,8), %rdi
callq 0x22c0
movq 0x10(%rsp), %rcx
movl %eax, 0x4(%rcx)
jmp 0x2d5e
movq (%rbx,%r14,8), %rdi
callq 0x2240
movq 0x10(%rsp), %rax
movsd %xmm0, 0x8(%rax)
jmp 0x2d5e
movq (%rbx,%r14,8), %rdi
callq 0x2240
movq 0x10(%rsp), %rax
movsd %xmm0, 0x10(%rax)
jmp 0x2d5e
movq (%rbx,%r14,8), %rdi
callq 0x22c0
movq 0x10(%rsp), %rcx
movl %eax, 0x34(%rcx)
jmp 0x2d5e
movq (%rbx,%r14,8), %rdi
callq 0x22c0
movq 0x10(%rsp), %rcx
movl %eax, 0x38(%rcx)
jmp 0x2d5e
movq (%rbx,%r14,8), %rdi
callq 0x22c0
movq 0x10(%rsp), %rcx
movl %eax, 0x20(%rcx)
jmp 0x2d5e
movq (%rbx,%r14,8), %rdi
callq 0x22c0
movq 0x10(%rsp), %rcx
movl %eax, 0x24(%rcx)
jmp 0x2d5e
movq (%rbx,%r14,8), %rdi
callq 0x22c0
movq 0x10(%rsp), %rcx
movl %eax, 0x3c(%rcx)
jmp 0x2d5e
movq (%rbx,%r14,8), %rdi
callq 0x22c0
movq 0x10(%rsp), %rcx
movl %eax, 0x40(%rcx)
jmp 0x2d5e
movq (%rbx,%r14,8), %rdi
callq 0x22c0
movq 0x10(%rsp), %rcx
movl %eax, 0x6c(%rcx)
jmp 0x2d5e
movq (%rbx,%r14,8), %rdi
callq 0x22c0
movq 0x10(%rsp), %rcx
movl %eax, 0x2c(%rcx)
jmp 0x2d5e
movq (%rbx,%r14,8), %rdi
callq 0x22c0
movq 0x10(%rsp), %rcx
movl %eax, 0x68(%rcx)
jmp 0x2d5e
movq (%rbx,%r14,8), %rdi
callq 0x2240
movq 0x10(%rsp), %rax
movsd %xmm0, 0x50(%rax)
jmp 0x2d5e
movq (%rbx,%r14,8), %rdi
callq 0x2240
movq 0x10(%rsp), %rax
movsd %xmm0, 0x58(%rax)
jmp 0x2d5e
movq (%rbx,%r14,8), %rdi
callq 0x2240
movq 0x10(%rsp), %rax
movsd %xmm0, 0x48(%rax)
jmp 0x2d5e
movq (%rbx,%r14,8), %rdi
callq 0x2240
movq 0x10(%rsp), %rax
movsd %xmm0, 0x18(%rax)
jmp 0x2d5e
movq (%rbx,%r14,8), %rdi
callq 0x2240
movq 0x10(%rsp), %rax
movsd %xmm0, 0x60(%rax)
jmp 0x2d5e
movq (%rbx,%r14,8), %rdi
callq 0x22c0
movq 0x10(%rsp), %rcx
movl %eax, 0x28(%rcx)
addq $0x2, %r14
addl $0x2, %r12d
cmpl %ebp, %r12d
jl 0x25ea
jmp 0x2db3
movq 0x6260(%rip), %rbx      # 0x8fd8
leaq 0x33c5(%rip), %rsi      # 0x6144
movl $0x17, %edx
movq %rbx, %rdi
callq 0x2220
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21e0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2100
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x620f(%rip), %rbx      # 0x8fd8
leaq 0x345b(%rip), %rsi      # 0x622b
movl $0x17, %edx
movq %rbx, %rdi
callq 0x2220
movq %rbx, %rdi
callq 0x20b0
jmp 0x2db3