// File: /workspace/github_cpp_makefile_star2_O3/myudelson[P]hmm-scalable/trainhmm.cpp
// Function: parse_arguments_step1(int, char**, char*, char*, char*, char*)
void parse_arguments_step1(int argc, char **argv, char *input_file_name, char *output_file_name, char *predict_file_name, char *console_file_name) {
	// parse command line options, starting from 1 (0 is path to executable)
	// go in pairs, looking at whether first in pair starts with '-', if not, stop parsing arguments
    
    // at this time we do not know nO (the number of observations) yet
	int i;
    int n;
    char *ch, *ch2;
	for(i=1;i<argc;i++)
	{
		if(argv[i][0] != '-') break; // end of options stop parsing
		if(++i>=argc)
			exit_with_help();
		switch(argv[i-1][1])
		{
			case 'e':
				param.tol = atof( strtok(argv[i],",\t\n\r") );
                ch = strtok(NULL,",\t\n\r"); // could be NULL
                if(ch != NULL)
                    param.tol_mode = ch[0];
				if(param.tol<0) {
					fprintf(stderr,"ERROR! Fitting tolerance cannot be negative\n");
					exit_with_help();
				}
                if(param.tol>10) {
                    fprintf(stderr,"ERROR! Fitting tolerance cannot be >10\n");
                    exit_with_help();
                }
                if(param.tol_mode!='p' && param.tol_mode!='l') {
                    fprintf(stderr,"ERROR! Tolerance mode '%c' is not allowed\n",param.tol_mode);
                    exit_with_help();
                }
				break;
			case 't':
				param.sliced = (NPAR)atoi(argv[i]);
				if(param.sliced!=0 && param.sliced!=1) {
					fprintf(stderr,"ERROR! Time parameter should be either 0 (off) or 1(on)\n");
					exit_with_help();
				}
				break;
			case 'i':
				param.maxiter = atoi(argv[i]);
				if(param.maxiter<10) {
					fprintf(stderr,"ERROR! Maximum iterations should be at least 10\n");
					exit_with_help();
				}
				break;
			case 'q':
				param.quiet = (NPAR)atoi(argv[i]);
				if(param.quiet!=0 && param.quiet!=1) {
					fprintf(stderr,"ERROR! Quiet param should be 0 or 1\n");
					exit_with_help();
				}
				break;
			case 'n':
				param.nS = (NPAR)atoi(argv[i]);
				if(param.nS<2) {
					fprintf(stderr,"ERROR! Number of hidden states should be at least 2\n");
					exit_with_help();
				}
                if(param.nS != 2) {
                    param.stat_specd_gt2 = true;
                }
				break;
			case 'S':
				param.scaled = (NPAR)atoi(argv[i]);
				if(param.scaled < 0 || param.scaled > 1) {
					fprintf(stderr,"ERROR! Scaling flag should be either 0 (off) or 1 (in)\n");
					exit_with_help();
				}
				break;
			case 's':
				param.structure = (NPAR)atoi( strtok(argv[i],".\t\n\r") );
                ch = strtok(NULL,".\t\n\r"); // could be NULL (default GD solver)
                if(ch != NULL)
                    param.solver = (NPAR)atoi(ch);
                ch = strtok(NULL,"\t\n\r"); // could be NULL (default GD solver)
                if(ch != NULL)
                    param.solver_setting = (NPAR)atoi(ch);
                if( param.structure != STRUCTURE_SKILL && // param.structure != STRUCTURE_GROUP &&
                   param.structure != STRUCTURE_PIg   && param.structure != STRUCTURE_PIgk  &&
                   param.structure != STRUCTURE_PIAgk && param.structure != STRUCTURE_Agk &&
                   param.structure != STRUCTURE_PIABgk && param.structure != STRUCTURE_Agki &&
                   param.structure != STRUCTURE_PIgkww && param.structure != STRUCTURE_SKABslc &&
                   param.structure != STRUCTURE_SKAslc && param.structure != STRUCTURE_COMP &&
                   param.structure != STRUCTURE_ELOK ) {
                    fprintf(stderr, "Model Structure specified (%d) is out of range of allowed values\n",param.structure);
					exit_with_help();
                }
                if( param.solver != METHOD_BW  && param.solver != METHOD_GD &&
                   param.solver != METHOD_CGD && param.solver != METHOD_GDL &&
                   param.solver != METHOD_GBB) {
                    fprintf(stderr, "Method specified (%d) is out of range of allowed values\n",param.solver);
					exit_with_help();
                }
//                if( (param.structure == STRUCTURE_SKABslc || param.structure == STRUCTURE_SKAslc) && param.solver == METHOD_BW) {
//                    fprintf(stderr, "Method specified (%d) is not defined for this structure (%d) \n",param.solver,param.structure);
//                    exit_with_help();
//                }
                if( param.structure == STRUCTURE_COMP && param.solver == METHOD_BW) {
                    fprintf(stderr, "Method specified (%d) is not defined for this structure (%d) \n",param.solver,param.structure);
                    exit_with_help();
                }
                if( param.structure == STRUCTURE_ELOK && !(param.solver == METHOD_GD || param.solver == METHOD_CGD) ) {
                    fprintf(stderr, "Method specified (%d) is not defined for this structure (%d) \n",param.solver,param.structure);
                    exit_with_help();
                }
                if( param.solver == METHOD_BW && ( param.solver != STRUCTURE_SKILL /*&& param.solver != STRUCTURE_GROUP*/ ) ) {
                    fprintf(stderr, "Baum-Welch solver does not support model structure specified (%d)\n",param.solver);
					exit_with_help();
                }
                if( param.solver == METHOD_CGD  &&
                   ( param.solver_setting != 1 && param.solver_setting != 2 &&
                    param.solver_setting != 3 && param.solver_setting !=4 )
                   ) {
                    fprintf(stderr, "Conjugate Gradient Descent setting specified (%d) is out of range of allowed values\n",param.solver_setting);
					exit_with_help();
                }
				break;
            case 'f':
                param.single_skill = (NPAR)atoi(argv[i]);
                break;
			case 'm':
                param.metrics = atoi( strtok(argv[i],",\t\n\r"));
                ch = strtok(NULL, "\t\n\r");
                if(ch!=NULL) {
                    param.metrics_target_obs = (NPAR)(atoi(ch)-1);
                }
				if(param.metrics<0 || param.metrics>1) {
					fprintf(stderr,"value for -m should be either 0 or 1.\n");
					exit_with_help();
				}
				if(param.metrics_target_obs<0) {// || param.metrics_target_obs>(param.nO-1)) {
					fprintf(stderr,"target observation to compute metrics against cannot be '%d'\n",param.metrics_target_obs+1);
					exit_with_help();
				}
                break;
			case 'b':
                param.binaryinput = atoi( strtok(argv[i],"\t\n\r"));
                break;
			case 'v':
				param.cv_folds   = (NPAR)atoi( strtok(argv[i],",\t\n\r"));
                ch2 = strtok(NULL, ",\t\n\r");
                if(ch2!=NULL)
                    param.cv_strat = ch2[0];
                ch = strtok(NULL, ",\t\n\r");
                if(ch!=NULL)
                    param.cv_target_obs = (NPAR)(atoi(ch)-1);
                ch = strtok(NULL, ",\t\n\r");
                if(ch!=NULL)
                    strcpy(param.cv_folds_file, ch);
                ch = strtok(NULL, ",\t\n\r");
                if(ch!=NULL)
                    param.cv_inout_flag = ch[0];
                
				if(param.cv_folds<2) {
					fprintf(stderr,"number of cross-validation folds should be at least 2\n");

					exit_with_help();
				}
				if(param.cv_folds>10) {
					fprintf(stderr,"please keep number of cross-validation folds less than or equal to 10\n");
					exit_with_help();
				}
                if(param.cv_strat != CV_GROUP && param.cv_strat != CV_ITEM && param.cv_strat != CV_NSTR){
					fprintf(stderr,"cross-validation stratification parameter '%c' is illegal\n",param.cv_strat);
					exit_with_help();
                }
				if(param.cv_target_obs<0) {// || param.cv_target_obs>(param.nO-1)) {
					fprintf(stderr,"target observation to be cross-validated against cannot be '%d'\n",param.cv_target_obs+1);
					exit_with_help();
				}
                if( param.cv_inout_flag!='i' && param.cv_inout_flag!='o') {
					fprintf(stderr,"cross-validation folds input/output flag should be ither 'o' (out) or 'i' (in), while it is '%c'\n",param.cv_inout_flag);
					exit_with_help();
                }
                
				break;
            case  'p':
                param.predictions = atoi(argv[i]);
                if(param.predictions<0 || param.predictions>3) {
                    fprintf(stderr,"a flag of whether to report predictions for training data (-p) should be 0, 1, 2, or 3\n");
                    exit_with_help();
                }
                break;
            case  'U':
                param.update_known = *strtok(argv[i],",\t\n\r");
                ch = strtok(NULL, ",\t\n\r");
                param.update_unknown = ch[0];
                
                if( (param.update_known!='r' && param.update_known!='g') ||
                   (param.update_unknown!='t' && param.update_unknown!='g') ) {
                    fprintf(stderr,"specification of how probabilities of states should be updated (-U) is incorrect, it sould be r|g[,t|g] \n");
                    exit_with_help();
                }
                break;
            case  'd':
				param.multiskill = argv[i][0]; // just grab first character (later, maybe several)
                break;
            case  'P':
				n = atoi(argv[i]);
                if(n!=0 && n!=1 && n!=2) {
					fprintf(stderr,"parallel processing flag (-P) should be 0 or 1\n");
					exit_with_help();
                }
                param.parallel = (NPAR)n;
                break;
            case 'r': // coordinate descend parameters
                // if two first_iteration_qualify,iterations_to_qualify
                // if one iterations_to_qualify (first_iteration_qualify==0)
                n = atoi( strtok(argv[i],",\t\n\r") );
                ch = strtok(NULL,",\t\n\r"); // could be NULL (default GD solver)
                if(ch==NULL) {// one parameter
                    param.first_iteration_qualify = 0;
                    param.iterations_to_qualify   = (NPAR)n;
                } else {
                    param.first_iteration_qualify = (NPAR)n;
                    param.iterations_to_qualify   = (NPAR)atoi(ch);
                }
                break;
            case 'R': // coordinate descend parameter for hard iterations limit of skill/group/other fitting
                n = atoi(argv[i]);
                if(n<=0) {
                    fprintf(stderr,"skill/group gradient descent iteration limit (-R) should be an integer >0\n");
                    exit_with_help();
                }
                if(n<=0) {
                    fprintf(stderr,"skill/group gradient descent iteration limit (-R) should be an integer >0\n");
                    exit_with_help();
                }
                param.iterations_limit = (NPAR)n;
                break;
            /*
            case 'c': {
                    // this version is with single center of gravity per Pi, A, and B
                    StripedArray<NUMBER> * tmp_array = new StripedArray<NUMBER>();
                    ch = strtok(argv[i],",\t\n\r");
                    while( ch != NULL ) {
                        tmp_array->add( atof(ch) );
                        ch = strtok(NULL,",\t\n\r");
                    }
                    if( (tmp_array->getSize() % 4) != 0 ) {
                        fprintf(stderr,"The number of regularization parameters should be a multiple of 4 and it is %d\n",tmp_array->getSize());
                        exit_with_help();
                    }
                    param.Cslices = (NPAR) tmp_array->getSize() / 4;
                    param.Cw = Calloc(NUMBER, (size_t)param.Cslices);
                    param.Ccenters = Calloc(NUMBER, (size_t)(param.Cslices * 3) );
                    int c1 = 0, c2 = 0, i = 0;
                    for(int l=0; l<(int)tmp_array->getSize() / 4; l++) {
                        param.Cw[c1++] = tmp_array->get((NDAT)i++);
                        for(int j=0; j<3; j++)
                            param.Ccenters[c2++] = tmp_array->get((NDAT)i++);
                    }
                    delete tmp_array;
                }
                break;
                */
            case 'c': // just to keep it a valid option
                break;
            case 'o':
                param.duplicate_console = 1;
                strcpy(console_file_name,argv[i]);
                break;
            case '0':
                param.init_reset = true;
                break;
            case 'l': // just to keep it a valid option
                break;
            case 'u': // just to keep it a valid option
                break;
            case 'B': // just to keep it a valid option
                break;
			default:
				fprintf(stderr,"unknown option: -%c\n", argv[i-1][1]);
				exit_with_help();
				break;
		}
	}
    // post-process checks
    // -v and -m collision
    if(param.cv_folds>0 && param.metrics>0) { // correct for 0-start coding
        fprintf(stderr,"values for -v and -m cannot be both non-zeros\n");
        exit_with_help();
    }
    // scaling
    if(param.scaled == 1 && param.solver != METHOD_BW) {
        param.scaled = 0;
        printf("Scaling can only be enabled for Baum-Welch method. Setting it to off\n");
    }
    // specifying >2 states via -n and mandatory specification of -0 (initial parameters)
    if(param.nS > 2 && !param.init_reset) {
        fprintf(stderr,"when >2 latent states specified via '-n', initial values of parameters have to be explicitly set via '-0'!\n");
        exit_with_help();
    }
    // STRUCTURE_SKABslc solver and -t 1 should be set together
    if( (param.sliced==1) != (param.structure == STRUCTURE_SKABslc || param.structure == STRUCTURE_SKAslc) ) {
        fprintf(stderr,"Error! sliced parameter ('-t 1') and STRUCTURE_SKABslc or STRUCTURE_SKAslc structure should be either both set on or off.\n");
        exit_with_help();
    }
    
	// next argument should be input file name
	if(i>=argc) // if not
		exit_with_help(); // leave
	
	strcpy(input_file_name, argv[i++]); // copy and advance
	
	if(i>=argc) { // no output file name specified
		strcpy(output_file_name,"output.hmm");
		strcpy(predict_file_name,"predict_hmm.txt"); // the predict file too
	}
	else {
		strcpy(output_file_name,argv[i++]); // copy and advance
		if(i>=argc) // no prediction file name specified
			strcpy(predict_file_name,"predict_hmm.txt"); // the predict file too
		else
			strcpy(predict_file_name,argv[i]);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r9, 0x18(%rsp)
movq %r8, %r15
movq %rcx, %r13
movq %rdx, 0x20(%rsp)
movq %rsi, %r14
movl %edi, %ebp
cmpl $0x2, %edi
jl 0x7379
movq %r13, 0x8(%rsp)
movq %r15, 0x10(%rsp)
movl $0x1, %r12d
movl $0x2, %r15d
leaq 0x301ea(%rip), %r13     # 0x37054
movq -0x8(%r14,%r15,8), %rax
cmpb $0x2d, (%rax)
jne 0x7383
cmpl %ebp, %r15d
jge 0x7483
movzbl 0x1(%rax), %edi
leal -0x42(%rdi), %eax
cmpl $0x34, %eax
ja 0x6eb4
movslq (%r13,%rax,4), %rax
addq %r13, %rax
jmpq *%rax
movq (%r14,%r15,8), %rdi
callq 0x43d0
cmpl $0x3, %eax
jae 0x751b
movb %al, 0x3e43a(%rip)      # 0x452e9
jmp 0x7364
cmpl $0x30, %edi
jne 0x74a3
movb $0x1, 0x3ecfd(%rip)     # 0x45bc1
jmp 0x7364
movq (%r14,%r15,8), %rdi
callq 0x43d0
movb %al, 0x3e401(%rip)      # 0x452d9
testb $-0x2, %al
je 0x7364
jmp 0x7511
movq (%r14,%r15,8), %rdi
leaq 0x30497(%rip), %rbx     # 0x37387
movq %rbx, %rsi
callq 0x43e0
movb (%rax), %al
movb %al, 0x3e40c(%rip)      # 0x4530c
xorl %edi, %edi
movq %rbx, %rsi
callq 0x43e0
movzbl (%rax), %eax
movb %al, 0x3e3fa(%rip)      # 0x4530d
movzbl 0x3e3f2(%rip), %ecx     # 0x4530c
cmpl $0x72, %ecx
je 0x6f28
cmpl $0x67, %ecx
jne 0x750c
cmpl $0x67, %eax
je 0x7364
cmpl $0x74, %eax
je 0x7364
jmp 0x750c
movq (%r14,%r15,8), %rdi
callq 0x43d0
movb %al, 0x3e397(%rip)      # 0x452e5
jmp 0x7364
movq (%r14,%r15,8), %rdi
callq 0x43d0
movb %al, 0x3e379(%rip)      # 0x452db
testb $-0x2, %al
je 0x7364
jmp 0x74bf
movq (%r14,%r15,8), %rax
movb (%rax), %al
movb %al, 0x3ec45(%rip)      # 0x45bc0
jmp 0x7364
movq (%r14,%r15,8), %rdi
leaq 0x3057d(%rip), %rbx     # 0x37508
movq %rbx, %rsi
callq 0x43e0
movq %rax, %rdi
callq 0x43d0
movb %al, 0x3e345(%rip)      # 0x452e6
xorl %edi, %edi
movq %rbx, %rsi
callq 0x43e0
testq %rax, %rax
je 0x6fbe
movq %rax, %rdi
callq 0x43d0
movb %al, 0x3e329(%rip)      # 0x452e7
xorl %edi, %edi
leaq 0x303c1(%rip), %rsi     # 0x37388
callq 0x43e0
testq %rax, %rax
je 0x6fdf
movq %rax, %rdi
callq 0x43d0
movb %al, 0x3e309(%rip)      # 0x452e8
movzbl 0x3e300(%rip), %ecx     # 0x452e6
cmpl $0xe, %ecx
ja 0x7538
movl $0x7efa, %eax           # imm = 0x7EFA
btl %ecx, %eax
jae 0x7538
movb 0x3e2e4(%rip), %al      # 0x452e7
leal -0x6(%rax), %edx
cmpb $-0x6, %dl
jbe 0x74d9
movl %ecx, %edx
xorb $0xd, %dl
movl %eax, %esi
xorb $0x1, %sil
orb %dl, %sil
je 0x74d4
cmpb $0xe, %cl
setne %cl
movl %eax, %edx
andb $0x6, %dl
cmpb $0x2, %dl
sete %dl
orb %cl, %dl
je 0x74c4
cmpb $0x3, %al
sete %cl
movb 0x3e2a1(%rip), %al      # 0x452e8
leal -0x5(%rax), %edx
cmpb $-0x4, %dl
setb %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x7364
jmp 0x74cc
movq (%r14,%r15,8), %rdi
callq 0x43d0
movl %eax, 0x3e271(%rip)     # 0x452e0
cmpl $0x9, %eax
jg 0x7364
jmp 0x74fd
movq (%r14,%r15,8), %rdi
leaq 0x302ff(%rip), %rbx     # 0x37387
movq %rbx, %rsi
callq 0x43e0
movq %rax, %rdi
callq 0x4300
movsd %xmm0, 0x3e230(%rip)    # 0x452d0
xorl %edi, %edi
movq %rbx, %rsi
callq 0x43e0
testq %rax, %rax
je 0x70b7
movb (%rax), %al
movb %al, 0x3e221(%rip)      # 0x452d8
movsd 0x3e211(%rip), %xmm0    # 0x452d0
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
ja 0x7507
ucomisd 0x2ff3b(%rip), %xmm0    # 0x37010
ja 0x7502
movzbl 0x3e1f6(%rip), %eax     # 0x452d8
cmpl $0x6c, %eax
je 0x7364
cmpl $0x70, %eax
je 0x7364
jmp 0x7528
movq (%r14,%r15,8), %rdi
leaq 0x30284(%rip), %rsi     # 0x37388
callq 0x43e0
movq %rax, %rdi
callq 0x43d0
movl %eax, 0x3e1f9(%rip)     # 0x45310
jmp 0x7364
movq (%r14,%r15,8), %rdi
callq 0x43d0
testl %eax, %eax
jle 0x7516
movsbl %al, %eax
movl %eax, 0x3eaee(%rip)     # 0x45c24
jmp 0x7364
movq (%r14,%r15,8), %rdi
leaq 0x30241(%rip), %rsi     # 0x37387
callq 0x43e0
movq %rax, %rdi
callq 0x43d0
movl %eax, 0x3e1a7(%rip)     # 0x45300
xorl %edi, %edi
leaq 0x30226(%rip), %rsi     # 0x37388
callq 0x43e0
testq %rax, %rax
je 0x717c
movq %rax, %rdi
callq 0x43d0
decb %al
movb %al, 0x3e188(%rip)      # 0x45304
cmpl $0x2, 0x3e17d(%rip)     # 0x45300
jae 0x74f8
movb 0x3e175(%rip), %al      # 0x45304
testb %al, %al
jns 0x7364
jmp 0x74f0
movq (%r14,%r15,8), %rdi
callq 0x43d0
movb %al, 0x3e139(%rip)      # 0x452e4
testb $-0x2, %al
je 0x7364
jmp 0x74e1
movq (%r14,%r15,8), %rdi
leaq 0x301c4(%rip), %rbx     # 0x37387
movq %rbx, %rsi
callq 0x43e0
movq %rax, %rdi
callq 0x43d0
movb %al, 0x3e53b(%rip)      # 0x45714
xorl %edi, %edi
movq %rbx, %rsi
callq 0x43e0
testq %rax, %rax
je 0x71f0
movb (%rax), %al
movb %al, 0x3e525(%rip)      # 0x45715
xorl %edi, %edi
leaq 0x3018e(%rip), %rsi     # 0x37387
callq 0x43e0
testq %rax, %rax
je 0x7213
movq %rax, %rdi
callq 0x43d0
decb %al
movb %al, 0x3e503(%rip)      # 0x45716
xorl %edi, %edi
leaq 0x3016b(%rip), %rsi     # 0x37387
callq 0x43e0
testq %rax, %rax
je 0x7235
leaq 0x3e4ea(%rip), %rdi     # 0x45717
movq %rax, %rsi
callq 0x4210
xorl %edi, %edi
leaq 0x30149(%rip), %rsi     # 0x37387
callq 0x43e0
testq %rax, %rax
je 0x7250
movb (%rax), %al
movb %al, 0x3e8c7(%rip)      # 0x45b17
movb 0x3e4be(%rip), %al      # 0x45714
cmpb $0x1, %al
jle 0x74ba
cmpb $0xb, %al
jae 0x74b5
movzbl 0x3e4a8(%rip), %eax     # 0x45715
leal -0x67(%rax), %ecx
cmpl $0x7, %ecx
ja 0x7530
movl $0x85, %edx
btl %ecx, %edx
jae 0x7530
movb 0x3e489(%rip), %al      # 0x45716
testb %al, %al
js 0x74ad
movzbl 0x3e87b(%rip), %eax     # 0x45b17
cmpl $0x69, %eax
je 0x7364
cmpl $0x6f, %eax
je 0x7364
jmp 0x7520
movq (%r14,%r15,8), %rdi
callq 0x43d0
movb %al, 0x3e89e(%rip)      # 0x45b60
cmpb $0x1, %al
jle 0x74eb
cmpb $0x2, %al
je 0x7364
movb $0x1, 0x3e8eb(%rip)     # 0x45bc4
jmp 0x7364
movq (%r14,%r15,8), %rdi
callq 0x43d0
movl %eax, 0x3e01b(%rip)     # 0x45308
cmpl $0x4, %eax
jb 0x7364
jmp 0x74e6
movb $0x1, 0x3dfde(%rip)     # 0x452dc
movq (%r14,%r15,8), %rsi
movq 0x18(%rsp), %rdi
callq 0x4210
jmp 0x7364
movq (%r14,%r15,8), %rdi
leaq 0x3006e(%rip), %r13     # 0x37387
movq %r13, %rsi
callq 0x43e0
movq %rax, %rdi
callq 0x43d0
movl %eax, %ebx
xorl %edi, %edi
movq %r13, %rsi
callq 0x43e0
testq %rax, %rax
je 0x7350
movb %bl, 0x3e8e0(%rip)      # 0x45c20
movq %rax, %rdi
callq 0x43d0
movb %al, 0x3e8d3(%rip)      # 0x45c21
jmp 0x735d
movb $0x0, 0x3e8c9(%rip)     # 0x45c20
movb %bl, 0x3e8c4(%rip)      # 0x45c21
leaq 0x2fcf0(%rip), %r13     # 0x37054
addl $0x2, %r12d
addq $0x2, %r15
cmpl %ebp, %r12d
jl 0x6e6a
xorl %ebx, %ebx
jmp 0x7385
movl $0x1, %r12d
xorl %ebx, %ebx
jmp 0x738f
movb $0x1, %bl
movq 0x10(%rsp), %r15
movq 0x8(%rsp), %r13
cmpb $0x0, 0x3e37e(%rip)     # 0x45714
jle 0x73a5
cmpl $0x0, 0x3df61(%rip)     # 0x45300
jg 0x7499
cmpb $0x1, 0x3df2d(%rip)     # 0x452d9
jne 0x73ca
cmpb $0x1, 0x3df32(%rip)     # 0x452e7
je 0x73ca
movb $0x0, 0x3df1b(%rip)     # 0x452d9
leaq 0x30a90(%rip), %rdi     # 0x37e55
callq 0x43b0
cmpb $0x3, 0x3e78f(%rip)     # 0x45b60
jl 0x73e0
cmpb $0x0, 0x3e7e7(%rip)     # 0x45bc1
je 0x74a8
cmpb $0x1, 0x3def4(%rip)     # 0x452db
sete %al
movb 0x3def6(%rip), %cl      # 0x452e6
addb $-0xd, %cl
cmpb $-0x2, %cl
setb %cl
xorb %al, %cl
je 0x749e
testb %bl, %bl
je 0x7483
leal 0x1(%r12), %ebx
movl %r12d, %eax
movq (%r14,%rax,8), %rsi
movq 0x20(%rsp), %rdi
callq 0x4210
cmpl %ebp, %ebx
jge 0x7453
addl $0x2, %r12d
movl %ebx, %eax
movq (%r14,%rax,8), %rsi
movq %r13, %rdi
callq 0x4210
cmpl %ebp, %r12d
jge 0x7469
movl %r12d, %eax
movq (%r14,%rax,8), %rsi
movq %r15, %rdi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4210
movabsq $0x682e74757074756f, %rax # imm = 0x682E74757074756F
movq %rax, (%r13)
movl $0x6d6d68, 0x7(%r13)    # imm = 0x6D6D68
movups 0x305e0(%rip), %xmm0    # 0x37a50
movups %xmm0, (%r15)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x30a50(%rip), %rdi     # 0x37eda
callq 0x43b0
movl $0x1, %edi
callq 0x42e0
callq 0x4949
callq 0x4918
callq 0x4a0d
callq 0x48e7
movzbl %al, %edi
callq 0x45c5
callq 0x462d
callq 0x465e
callq 0x48b6
movzbl %al, %edi
callq 0x46f7
movzbl %al, %edi
callq 0x472b
callq 0x475c
movzbl %al, %edi
callq 0x4790
callq 0x4854
callq 0x4563
callq 0x4823
movzbl %al, %edi
callq 0x468f
callq 0x46c6
callq 0x4885
callq 0x49ab
callq 0x49dc
callq 0x4532
callq 0x47f2
callq 0x44d0
callq 0x4501
movzbl %al, %edi
callq 0x4594
movzbl %al, %edi
callq 0x497a
movzbl %al, %edi
callq 0x45fc
movzbl %cl, %edi
callq 0x47c1