// File: hkbu-victor[P]SFastLDA/super_fast_final1_d.cpp
// Function: parse_args(int, char**)
int parse_args(int argc, char **argv){
	char *arg;

	dFile = NULL; oFile = NULL;
	T = 0; NN = 0; SEED = 0;
	argALPHA = 0.0, BETA = 0.01;

	if (argc < 10){
		show_help();
		return -1;
	}

	int i = 0;
	while (i < argc){
		arg = argv[i];

		if (strcmp(arg,"-dfile")==0){
			dFile = argv[++i];
		} else if (strcmp(arg,"-ofile")==0){
			oFile = argv[++i];
		} else if (strcmp(arg,"-alpha")==0){
			argALPHA = atof(argv[++i]);
		} else if (strcmp(arg,"-beta")==0){
			BETA = atof(argv[++i]);
		} else if (strcmp(arg,"-ntopics")==0){
			T = atoi(argv[++i]);
		} else if (strcmp(arg,"-niters")==0){
			NN = atoi(argv[++i]);
		} else if (strcmp(arg,"-seed")==0){
			SEED = atoi(argv[++i]);
		} else {
            // any more
		}

		i++;
	}
	return 0;
}

// Assembly:
subq $0x28, %rsp
movl %edi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq $0x0, 0x7d78(%rip) # 0x90d0
movq $0x0, 0x7d75(%rip) # 0x90d8
movl $0x0, 0x7d8b(%rip)      # 0x90f8
movl $0x0, 0x7d85(%rip)      # 0x90fc
movl $0x0, 0x7d7f(%rip)      # 0x9100
xorps %xmm0, %xmm0
movsd %xmm0, 0x7dec(%rip)     # 0x9178
movsd 0x4c74(%rip), %xmm0     # 0x6008
movsd %xmm0, 0x7de4(%rip)     # 0x9180
cmpl $0xa, 0x20(%rsp)
jge 0x13b5
callq 0x1270
movl $0xffffffff, 0x24(%rsp) # imm = 0xFFFFFFFF
jmp 0x15a2
movl $0x0, 0xc(%rsp)
movl 0xc(%rsp), %eax
cmpl 0x20(%rsp), %eax
jge 0x159a
movq 0x18(%rsp), %rax
movslq 0xc(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rdi
leaq 0x4eb5(%rip), %rsi      # 0x629f
callq 0x1110
cmpl $0x0, %eax
jne 0x1417
movq 0x18(%rsp), %rax
movl 0xc(%rsp), %ecx
addl $0x1, %ecx
movl %ecx, 0xc(%rsp)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x7cbe(%rip)      # 0x90d0
jmp 0x158a
movq 0x10(%rsp), %rdi
leaq 0x4e83(%rip), %rsi      # 0x62a6
callq 0x1110
cmpl $0x0, %eax
jne 0x1450
movq 0x18(%rsp), %rax
movl 0xc(%rsp), %ecx
addl $0x1, %ecx
movl %ecx, 0xc(%rsp)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x7c8d(%rip)      # 0x90d8
jmp 0x1588
movq 0x10(%rsp), %rdi
leaq 0x4e51(%rip), %rsi      # 0x62ad
callq 0x1110
cmpl $0x0, %eax
jne 0x148f
movq 0x18(%rsp), %rax
movl 0xc(%rsp), %ecx
addl $0x1, %ecx
movl %ecx, 0xc(%rsp)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
callq 0x1100
movsd %xmm0, 0x7cee(%rip)     # 0x9178
jmp 0x1586
movq 0x10(%rsp), %rdi
leaq 0x4e19(%rip), %rsi      # 0x62b4
callq 0x1110
cmpl $0x0, %eax
jne 0x14ce
movq 0x18(%rsp), %rax
movl 0xc(%rsp), %ecx
addl $0x1, %ecx
movl %ecx, 0xc(%rsp)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
callq 0x1100
movsd %xmm0, 0x7cb7(%rip)     # 0x9180
jmp 0x1584
movq 0x10(%rsp), %rdi
leaq 0x4de0(%rip), %rsi      # 0x62ba
callq 0x1110
cmpl $0x0, %eax
jne 0x1508
movq 0x18(%rsp), %rax
movl 0xc(%rsp), %ecx
addl $0x1, %ecx
movl %ecx, 0xc(%rsp)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
callq 0x1130
movl %eax, 0x7bf2(%rip)      # 0x90f8
jmp 0x1582
movq 0x10(%rsp), %rdi
leaq 0x4daf(%rip), %rsi      # 0x62c3
callq 0x1110
cmpl $0x0, %eax
jne 0x1542
movq 0x18(%rsp), %rax
movl 0xc(%rsp), %ecx
addl $0x1, %ecx
movl %ecx, 0xc(%rsp)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
callq 0x1130
movl %eax, 0x7bbc(%rip)      # 0x90fc
jmp 0x1580
movq 0x10(%rsp), %rdi
leaq 0x4d7d(%rip), %rsi      # 0x62cb
callq 0x1110
cmpl $0x0, %eax
jne 0x157c
movq 0x18(%rsp), %rax
movl 0xc(%rsp), %ecx
addl $0x1, %ecx
movl %ecx, 0xc(%rsp)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
callq 0x1130
movl %eax, 0x7b86(%rip)      # 0x9100
jmp 0x157e
jmp 0x157e
jmp 0x1580
jmp 0x1582
jmp 0x1584
jmp 0x1586
jmp 0x1588
jmp 0x158a
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x13bd
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopl (%rax,%rax)