// File: /workspace/github_cpp_makefile_star2_O2/myudelson[P]hmm-scalable/trainhmm.cpp
// Function: parse_arguments_step2(int, char**, _IO_FILE*)
void parse_arguments_step2(int argc, char **argv, FILE *fid_console) {
	// 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 know nO (the number of observations)
	int i;
    int n, expected_n;
    char *ch;
	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 '0': // init_params
				int len;
				len = (int)strlen( argv[i] );
				// count delimiters
				n = 1; // start with 1
				for(int j=0;j<len;j++) {
					n += (argv[i][j]==',')?1:0;
                    if( (argv[i][j] >= 'a' && argv[i][j] <= 'z') || (argv[i][j] >= 'A' && argv[i][j] <= 'Z') ) {
                        strcpy(param.initfile, argv[i]);
                        break;
                    }
                }
                // init parameters
                if(param.init_params!=NULL) free(param.init_params);
                param.init_params = Calloc(NUMBER, (size_t)n);
                param.init_params_n = (NPAR)n;
                // read params and write to params
                param.init_params[0] = atof( strtok(argv[i],",\t\n\r") );
                for(int j=1; j<n; j++) {
                    param.init_params[j] = atof( strtok(NULL,",\t\n\r") );
                }
				break;
			case 'l': // lower boundaries
				len = (int)strlen( argv[i] );
				// count delimiters
				n = 1; // start with 1
				for(int j=0;j<len;j++)
					n += (NPAR)((argv[i][j]==',')?1:0);
				// init params
				if(param.param_lo!=NULL) free(param.param_lo);
				param.param_lo = Calloc(NUMBER, (size_t)n);
				// read params and write to params
				param.param_lo[0] = atof( strtok(argv[i],",\t\n\r") );
                for(int j=1; j<n; j++) {
					param.param_lo[j] = atof( strtok(NULL,",\t\n\r") );
//                    if(param.param_lo[j] >0) {
//                        int a = 0;
//                    }
                }
                // check if the number of lower boundaries corresponds
                expected_n = param.nS +
                    ((param.sliced==1 && (param.structure==STRUCTURE_SKAslc || param.structure==STRUCTURE_SKABslc) )?param.nZ:1)*param.nS*param.nS +
                    ((param.sliced==1 && param.structure==STRUCTURE_SKABslc )?param.nZ:1)*param.nS*param.nO;
                if( n != expected_n ) {
//                    fprintf(stderr,"Structure=%d, nS=%d, nO=%d, nZ=%d, The expected n=%d specified=%d\n",param.structure,param.nS,param.nO,param.nZ,expected_n,n);
                    fprintf(stderr,"The expected number of lower parameter boundaries is %d and it is %d\n",expected_n,n);
                    exit_with_help();
                }
                param.lo_lims_specd = true;
				break;
			case 'u': // upper boundaries
				len = (int)strlen( argv[i] );
				// count delimiters
				n = 1; // start with 1
				for(int j=0;j<len;j++)
					n += (argv[i][j]==',')?1:0;
				// init params
				if(param.param_hi!=NULL) free(param.param_hi);
				param.param_hi = Calloc(NUMBER, (size_t)n);
				// read params and write to params
				param.param_hi[0] = atof( strtok(argv[i],",\t\n\r") );
                for(int j=1; j<n; j++) {
					param.param_hi[j] = atof( strtok(NULL,",\t\n\r") );
//                    if(param.param_hi[j] < 1) {
//                        int a = 0;
//                    }
                }
                // check if the number of upper boundaries corresponds
                expected_n = param.nS +
                    ((param.sliced==1 && (param.structure==STRUCTURE_SKAslc || param.structure==STRUCTURE_SKABslc) )?param.nZ:1)*param.nS*param.nS +
                    ((param.sliced==1 && param.structure==STRUCTURE_SKABslc )?param.nZ:1)*param.nS*param.nO;
                if( n != expected_n ) {
                    fprintf(stderr,"The expected number of upper parameter boundaries is %d and it is %d\n",expected_n,n);
                    exit_with_help();
                }
                param.hi_lims_specd = true;
				break;
			case 'B': // block fitting
                // first
				param.block_fitting[0] = (NPAR)atoi( strtok(argv[i],",\t\n\r") );
                if(param.block_fitting[0]!=0 && param.block_fitting[0]!=1) {
                    fprintf(stderr,"Values of blocking the fitting flags shuld only be 0 or 1.\n");
                    if(param.duplicate_console==1) fprintf(fid_console,"Values of blocking the fitting flags shuld only be 0 or 1.\n");
                    exit_with_help();
                }
                // second
                ch = strtok(NULL,",\t\n\r"); // could be NULL (default GD solver)
                if(ch != NULL) {
                    param.block_fitting[1] = (NPAR)atoi(ch);
                    if(param.block_fitting[1]!=0 && param.block_fitting[1]!=1) {
                        fprintf(stderr,"Values of blocking the fitting flags shuld only be 0 or 1.\n");
                        if(param.duplicate_console==1) fprintf(fid_console,"Values of blocking the fitting flags shuld only be 0 or 1.\n");
                        exit_with_help();
                    }
                }
                else {
                    fprintf(stderr,"There should be 3 blockig the fitting flags specified.\n");
                    if(param.duplicate_console==1) fprintf(fid_console,"There should be 3 blockig the fitting flags specified.\n");
                    exit_with_help();
                }
                // third
                ch = strtok(NULL,",\t\n\r"); // could be NULL (default GD solver)
                if(ch != NULL) {
                    param.block_fitting[2] = (NPAR)atoi(ch);
                    if(param.block_fitting[2]!=0 && param.block_fitting[2]!=1) {
                        fprintf(stderr,"Values of blocking the fitting flags shuld only be 0 or 1.\n");
                        if(param.duplicate_console==1) fprintf(fid_console,"Values of blocking the fitting flags shuld only be 0 or 1.\n");
                        exit_with_help();
                    }
                }
                else {
                    fprintf(stderr,"There should be 3 blockig the fitting flags specified.\n");
                    if(param.duplicate_console==1) fprintf(fid_console,"There should be 3 blockig the fitting flags specified.\n");
                    exit_with_help();
                }
				break;
			case 'c': {
                    // this version with per-parameter center of gravity in Pi, A, and B
                    NPAR nS = param.nS;
                    NPAR nO = param.nO;
                    int nPerSlice = 1 + nS + nS*nS + nS*nO; // parameters per slice
                    int nCenters = nS + nS*nS + nS*nO; // centers per slice
                    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() % nPerSlice) != 0 ) {
                        fprintf(stderr,"The number of regularization parameters should be a multiple of %d and it is %d\n",nPerSlice,tmp_array->getSize());
                        exit_with_help();
                    }
                    param.Cslices = (NPAR) ( tmp_array->getSize() / nPerSlice );
                    param.Cw = Calloc(NUMBER, (size_t)param.Cslices);
                    param.Ccenters = Calloc(NUMBER, (size_t)(param.Cslices * nCenters) );
                    int c1 = 0/*counter for weights*/, c2 = 0/*counter for centers*/, i = 0/*counter for tmp_array*/;
                    for(int l=0; l<(int)tmp_array->getSize() / nPerSlice; l++) {
                        param.Cw[c1++] = tmp_array->get((NDAT)i++);
                        for(int j=0; j<nCenters; j++)
                            param.Ccenters[c2++] = tmp_array->get((NDAT)i++);
                    }
                    delete tmp_array;
                }
                break;
                
        } // end switch
    }// end for
    // post parse actions
    
    if(!param.lo_lims_specd && (param.nS!=2 || param.nO!=2) ) { // if not specified, and it's not 2-state 2-obs case, set to 0
        if(param.param_lo!=NULL) free(param.param_lo);
        param.param_lo = Calloc(NUMBER, (size_t)( param.nS*(1+param.nS+param.nO) ) );
    }
 
    if(!param.hi_lims_specd && (param.nS!=2 || param.nO!=2) ) {  // if not specified, and it's not 2-state 2-obs case, set to 1
        if(param.param_hi!=NULL) free(param.param_hi);  // if not specified, set to 1
        param.param_hi = Calloc(NUMBER, (size_t)( param.nS*(1+param.nS+param.nO) ) );
        for(int j=0; j<( param.nS*(1+param.nS+param.nO) ); j++)
            param.param_hi[j] = (NUMBER)1.0;
    }
    
    // post-argument checks
    if( 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);
        if(param.duplicate_console==1) fprintf(fid_console,"target observation to be cross-validated against cannot be '%d'\n",param.cv_target_obs+1);
        exit_with_help();
    }
    if(param.metrics_target_obs>(param.nO-1)) {
        fprintf(stderr,"target observation to compute metrics against cannot be '%d'\n",param.metrics_target_obs+1);
        if(param.duplicate_console==1) fprintf(fid_console,"target observation to compute metrics against cannot be '%d'\n",param.metrics_target_obs+1);
        exit_with_help();
    }
    
    // upper and lower bounds
    if( (param.sliced==1) && (param.structure == STRUCTURE_SKABslc || param.structure == STRUCTURE_SKAslc) &&
       !(param.lo_lims_specd && param.hi_lims_specd)) {
        fprintf(stderr,"Error! when parameter slicing is enabled, lower and upper boundaries for all parameters have to be set explicitly.\n");
        exit_with_help();
    }

    
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, (%rsp)
movq %rsi, %r12
movl %edi, %r13d
movslq %edi, %rbp
pushq $0x1
popq %r14
pushq $0x1
popq %r15
movq %rbp, 0x20(%rsp)
movq %rsi, 0x30(%rsp)
movl %edi, 0x18(%rsp)
cmpq %rbp, %r14
jge 0x6a37
movq (%r12,%r14,8), %rax
cmpb $0x2d, (%rax)
jne 0x6a37
leal 0x1(%r14), %ecx
cmpl %r13d, %ecx
jge 0x6c47
movzbl 0x1(%rax), %eax
cmpl $0x75, %eax
movq %r14, 0x28(%rsp)
je 0x6899
cmpl $0x42, %eax
je 0x65de
cmpl $0x63, %eax
je 0x6747
cmpl $0x6c, %eax
je 0x6663
cmpl $0x30, %eax
jne 0x6a29
movq 0x28(%rsp), %r14
movq 0x8(%r12,%r14,8), %rbx
movq %rbx, %rdi
callq 0x40f0
testl %eax, %eax
movl $0x0, %ecx
cmovlel %ecx, %eax
xorl %ecx, %ecx
movl %r15d, %ebp
cmpq %rcx, %rax
je 0x6559
movb (%rbx,%rcx), %dl
xorl %esi, %esi
cmpb $0x2c, %dl
sete %sil
addl %esi, %ebp
andb $-0x21, %dl
addb $-0x41, %dl
incq %rcx
cmpb $0x19, %dl
ja 0x6529
leaq 0x37de3(%rip), %rdi     # 0x3e334
movq %rbx, %rsi
callq 0x4210
movq 0x37d70(%rip), %rdi     # 0x3e2d0
callq 0x42c0
movslq %ebp, %rbx
movq %rbx, %rdi
pushq $0x8
popq %rsi
callq 0x4130
movq %rax, 0x37d56(%rip)     # 0x3e2d0
movb %bl, 0x37d58(%rip)      # 0x3e2d8
movq 0x8(%r12,%r14,8), %rdi
leaq 0x28dab(%rip), %rsi     # 0x2f337
callq 0x43f0
movq %rax, %rdi
callq 0x42f0
movq 0x37d30(%rip), %rax     # 0x3e2d0
movsd %xmm0, (%rax)
pushq $0x1
popq %r14
movq 0x20(%rsp), %rbp
cmpq %rbx, %r14
jge 0x6a29
xorl %edi, %edi
leaq 0x28d78(%rip), %rsi     # 0x2f337
callq 0x43f0
movq %rax, %rdi
callq 0x42f0
movq 0x37cfd(%rip), %rax     # 0x3e2d0
movsd %xmm0, (%rax,%r14,8)
incq %r14
jmp 0x65ad
movq 0x8(%r12,%r14,8), %rdi
leaq 0x28d4d(%rip), %rbx     # 0x2f337
movq %rbx, %rsi
callq 0x43f0
movq %rax, %rdi
callq 0x43e0
movb %al, 0x38649(%rip)      # 0x3ec49
testb $-0x2, %al
jne 0x6bdc
xorl %edi, %edi
movq %rbx, %rsi
callq 0x43f0
testq %rax, %rax
je 0x6c0c
movq %rax, %rdi
callq 0x43e0
movb %al, 0x38621(%rip)      # 0x3ec4a
testb $-0x2, %al
jne 0x6bdc
xorl %edi, %edi
leaq 0x28cfd(%rip), %rsi     # 0x2f337
callq 0x43f0
testq %rax, %rax
je 0x6c0c
movq %rax, %rdi
callq 0x43e0
movb %al, 0x385f5(%rip)      # 0x3ec4b
testb $-0x2, %al
je 0x6a29
jmp 0x6bdc
movl %r15d, %ebx
movq 0x8(%r12,%r14,8), %r15
movq %r15, %rdi
callq 0x40f0
testl %eax, %eax
movl $0x0, %ecx
cmovlel %ecx, %eax
xorl %ecx, %ecx
cmpq %rcx, %rax
je 0x6695
xorl %edx, %edx
cmpb $0x2c, (%r15,%rcx)
sete %dl
addl %edx, %ebx
incq %rcx
jmp 0x667f
movq 0x37c44(%rip), %rdi     # 0x3e2e0
callq 0x42c0
movl %ebx, %r15d
movq %r15, %rdi
pushq $0x8
popq %rsi
callq 0x4130
movq %rax, 0x37c2a(%rip)     # 0x3e2e0
movq 0x8(%r12,%r14,8), %rdi
leaq 0x28c75(%rip), %rsi     # 0x2f337
callq 0x43f0
movq %rax, %rdi
callq 0x42f0
movq 0x37c0a(%rip), %rax     # 0x3e2e0
movsd %xmm0, (%rax)
pushq $0x1
popq %r14
cmpq %r15, %r14
jae 0x670b
xorl %edi, %edi
leaq 0x28c4b(%rip), %rsi     # 0x2f337
callq 0x43f0
movq %rax, %rdi
callq 0x42f0
movq 0x37be0(%rip), %rax     # 0x3e2e0
movsd %xmm0, (%rax,%r14,8)
incq %r14
jmp 0x66de
movsbl 0x3846e(%rip), %eax     # 0x3eb80
movb 0x37be3(%rip), %cl      # 0x3e2fb
movb 0x37be8(%rip), %dl      # 0x3e306
cmpb $0x1, %cl
jne 0x69a5
leal -0xb(%rdx), %esi
cmpb $0x2, %sil
movl 0x3845c(%rip), %edi     # 0x3eb90
movl %edi, %esi
pushq $0x1
popq %r15
cmovael %r15d, %esi
movsbl %sil, %esi
jmp 0x69b3
movq %r14, %r15
movsbl 0x3842e(%rip), %r14d    # 0x3eb80
movsbl 0x38428(%rip), %ebx     # 0x3eb81
leal 0x1(%r14), %eax
imull %r14d, %eax
movq %rax, 0x10(%rsp)
leal 0x1(%rax), %ebp
pushq $0x18
popq %rdi
callq 0x4250
movq %rax, %r13
movabsq $0x4e2000000000, %rax   # imm = 0x4E2000000000
movq %rax, (%r13)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%r13)
movq 0x8(%r12,%r15,8), %rdi
leaq 0x28ba1(%rip), %r15     # 0x2f337
movq %r15, %rsi
callq 0x43f0
testq %rax, %rax
je 0x67b7
movq %rax, %rdi
callq 0x42f0
movq %r13, %rdi
callq 0x81fa
xorl %edi, %edi
jmp 0x6796
imull %r14d, %ebx
addl %ebx, %ebp
movl (%r13), %r15d
movl %r15d, %eax
cltd
movl %ebp, 0xc(%rsp)
idivl %ebp
testl %edx, %edx
jne 0x6c74
movl %eax, %ebp
movq 0x10(%rsp), %r14
addl %ebx, %r14d
movb %bpl, 0x37b26(%rip)     # 0x3e30a
movsbq %bpl, %rdi
pushq $0x8
popq %rbx
movq %rbx, %rsi
callq 0x4130
movq %rax, 0x37b16(%rip)     # 0x3e310
movsbl %bpl, %eax
imull %r14d, %eax
movslq %eax, %rdi
movq %rbx, %rsi
callq 0x4130
xorl %r12d, %r12d
testl %r14d, %r14d
cmovlel %r12d, %r14d
movq %rax, 0x37afa(%rip)     # 0x3e318
movq %r14, 0x10(%rsp)
movl %r14d, %ecx
xorl %ebx, %ebx
xorl %ebp, %ebp
movl %r15d, %eax
cltd
idivl 0xc(%rsp)
cmpl %r12d, %eax
jle 0x697a
movl %ecx, 0x1c(%rsp)
movslq %ecx, %r15
movq %r13, %rdi
movl %ebp, %esi
callq 0x8276
movq 0x37abd(%rip), %rax     # 0x3e310
movsd %xmm0, (%rax,%r12,8)
movslq %ebx, %r14
movq 0x10(%rsp), %rax
leal (%rax,%r14), %ebx
incl %ebp
cmpq %r14, %r15
je 0x6888
movq %r13, %rdi
movl %ebp, %esi
callq 0x8276
movq 0x37a9b(%rip), %rax     # 0x3e318
movsd %xmm0, (%rax,%r14,8)
incq %r14
jmp 0x6865
incq %r12
movl (%r13), %r15d
movl 0x1c(%rsp), %ecx
addl 0x10(%rsp), %ecx
jmp 0x682a
movl %r15d, %ebx
movq 0x8(%r12,%r14,8), %r15
movq %r15, %rdi
callq 0x40f0
testl %eax, %eax
movl $0x0, %ecx
cmovlel %ecx, %eax
xorl %ecx, %ecx
cmpq %rcx, %rax
je 0x68cb
xorl %edx, %edx
cmpb $0x2c, (%r15,%rcx)
sete %dl
addl %edx, %ebx
incq %rcx
jmp 0x68b5
movq 0x37a16(%rip), %rdi     # 0x3e2e8
callq 0x42c0
movl %ebx, %r15d
movq %r15, %rdi
pushq $0x8
popq %rsi
callq 0x4130
movq %rax, 0x379fc(%rip)     # 0x3e2e8
movq 0x8(%r12,%r14,8), %rdi
leaq 0x28a3f(%rip), %rsi     # 0x2f337
callq 0x43f0
movq %rax, %rdi
callq 0x42f0
movq 0x379dc(%rip), %rax     # 0x3e2e8
movsd %xmm0, (%rax)
pushq $0x1
popq %r14
cmpq %r15, %r14
jae 0x6941
xorl %edi, %edi
leaq 0x28a15(%rip), %rsi     # 0x2f337
callq 0x43f0
movq %rax, %rdi
callq 0x42f0
movq 0x379b2(%rip), %rax     # 0x3e2e8
movsd %xmm0, (%rax,%r14,8)
incq %r14
jmp 0x6914
movsbl 0x38238(%rip), %eax     # 0x3eb80
movb 0x379ad(%rip), %cl      # 0x3e2fb
movb 0x379b2(%rip), %dl      # 0x3e306
cmpb $0x1, %cl
jne 0x69e8
leal -0xb(%rdx), %esi
cmpb $0x2, %sil
movl 0x38226(%rip), %edi     # 0x3eb90
movl %edi, %esi
pushq $0x1
popq %r15
cmovael %r15d, %esi
movsbl %sil, %esi
jmp 0x69f6
movq %r13, %rdi
callq 0x82b8
movq %r13, %rdi
pushq $0x18
popq %rsi
callq 0x4260
movq 0x30(%rsp), %r12
movl 0x18(%rsp), %r13d
movq 0x20(%rsp), %rbp
pushq $0x1
popq %r15
jmp 0x6a29
movb 0x381e4(%rip), %dil     # 0x3eb90
pushq $0x1
popq %r15
movl %r15d, %esi
xorb $0x1, %cl
imull %eax, %esi
xorb $0xb, %dl
orb %cl, %dl
movsbl %dil, %ecx
cmovnel %r15d, %ecx
movsbl 0x381b4(%rip), %edx     # 0x3eb81
imull %ecx, %edx
addl %esi, %edx
incl %edx
imull %eax, %edx
cmpl %edx, %ebx
jne 0x6c4c
movb $0x1, 0x381fc(%rip)     # 0x3ebe2
jmp 0x6a29
movb 0x381a1(%rip), %dil     # 0x3eb90
pushq $0x1
popq %r15
movl %r15d, %esi
xorb $0x1, %cl
imull %eax, %esi
xorb $0xb, %dl
orb %cl, %dl
movsbl %dil, %ecx
cmovnel %r15d, %ecx
movsbl 0x38171(%rip), %edx     # 0x3eb81
imull %ecx, %edx
addl %esi, %edx
incl %edx
imull %eax, %edx
cmpl %edx, %ebx
jne 0x6c5f
movb $0x1, 0x381ba(%rip)     # 0x3ebe3
movq 0x28(%rsp), %r14
addq $0x2, %r14
jmp 0x64af
movb 0x38143(%rip), %r14b    # 0x3eb81
cmpb $0x0, 0x3819d(%rip)     # 0x3ebe2
jne 0x6a91
movb 0x38133(%rip), %al      # 0x3eb80
xorb $0x2, %al
xorb $0x2, %r14b
orb %al, %r14b
movb $0x2, %r14b
je 0x6a91
movq 0x3787e(%rip), %rdi     # 0x3e2e0
callq 0x42c0
movsbl 0x38112(%rip), %eax     # 0x3eb80
movsbl 0x3810b(%rip), %r14d    # 0x3eb81
leal (%rax,%r14), %ecx
incl %ecx
imull %eax, %ecx
movslq %ecx, %rdi
pushq $0x8
popq %rsi
callq 0x4130
movq %rax, 0x3784f(%rip)     # 0x3e2e0
cmpb $0x0, 0x3814b(%rip)     # 0x3ebe3
jne 0x6b06
movb 0x380e0(%rip), %al      # 0x3eb80
xorb $0x2, %al
xorb $0x2, %r14b
orb %al, %r14b
movb $0x2, %r14b
je 0x6b06
movq 0x37833(%rip), %rdi     # 0x3e2e8
callq 0x42c0
movsbl 0x380bf(%rip), %eax     # 0x3eb80
movsbl 0x380b8(%rip), %r14d    # 0x3eb81
leal (%rax,%r14), %ecx
incl %ecx
imull %eax, %ecx
movslq %ecx, %rbx
pushq $0x8
popq %rsi
movq %rbx, %rdi
callq 0x4130
movq %rax, 0x37801(%rip)     # 0x3e2e8
xorl %ecx, %ecx
testl %ebx, %ebx
cmovlel %ecx, %ebx
movabsq $0x3ff0000000000000, %rdx # imm = 0x3FF0000000000000
cmpq %rcx, %rbx
je 0x6b06
movq %rdx, (%rax,%rcx,8)
incq %rcx
jmp 0x6af8
movsbl 0x37c29(%rip), %edx     # 0x3e736
cmpb %dl, %r14b
jle 0x6b5c
movsbl 0x3780b(%rip), %edx     # 0x3e324
cmpb %dl, %r14b
jle 0x6b95
cmpb $0x1, 0x377d6(%rip)     # 0x3e2fb
jne 0x6b4d
movb 0x377d9(%rip), %al      # 0x3e306
addb $-0xb, %al
cmpb $0x1, %al
ja 0x6b4d
cmpb $0x1, 0x380a8(%rip)     # 0x3ebe2
jne 0x6c98
cmpb $0x0, 0x3809c(%rip)     # 0x3ebe3
je 0x6c98
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x37475(%rip), %rax     # 0x3dfd8
movq (%rax), %rdi
incl %edx
leaq 0x28b7b(%rip), %rsi     # 0x2f6ea
xorl %eax, %eax
callq 0x4380
cmpb $0x1, 0x3777f(%rip)     # 0x3e2fc
jne 0x6c47
movsbl 0x37bac(%rip), %edx     # 0x3e736
incl %edx
leaq 0x28b57(%rip), %rsi     # 0x2f6ea
jmp 0x6bcc
movq 0x3743c(%rip), %rax     # 0x3dfd8
movq (%rax), %rdi
incl %edx
leaq 0x28a4b(%rip), %rsi     # 0x2f5f3
xorl %eax, %eax
callq 0x4380
cmpb $0x1, 0x37746(%rip)     # 0x3e2fc
jne 0x6c47
movsbl 0x37761(%rip), %edx     # 0x3e324
incl %edx
leaq 0x28a27(%rip), %rsi     # 0x2f5f3
movq (%rsp), %rdi
xorl %eax, %eax
callq 0x4380
callq 0x8140
movq 0x373f5(%rip), %rax     # 0x3dfd8
movq (%rax), %rcx
leaq 0x28eaf(%rip), %rdi     # 0x2fa9c
pushq $0x3b
popq %rsi
pushq $0x1
popq %rdx
callq 0x44e0
cmpb $0x1, 0x376fd(%rip)     # 0x3e2fc
jne 0x6c47
leaq 0x28e94(%rip), %rdi     # 0x2fa9c
pushq $0x3b
jmp 0x6c3a
movq 0x373c5(%rip), %rax     # 0x3dfd8
movq (%rax), %rcx
leaq 0x28ebb(%rip), %rdi     # 0x2fad8
pushq $0x37
popq %rsi
pushq $0x1
popq %rdx
callq 0x44e0
cmpb $0x1, 0x376cd(%rip)     # 0x3e2fc
jne 0x6c47
leaq 0x28ea0(%rip), %rdi     # 0x2fad8
pushq $0x37
popq %rsi
pushq $0x1
popq %rdx
movq (%rsp), %rcx
callq 0x44e0
callq 0x8140
movq 0x37385(%rip), %rax     # 0x3dfd8
movq (%rax), %rdi
leaq 0x28db3(%rip), %rsi     # 0x2fa10
jmp 0x6c70
movq 0x37372(%rip), %rax     # 0x3dfd8
movq (%rax), %rdi
leaq 0x28de6(%rip), %rsi     # 0x2fa56
movl %ebx, %ecx
jmp 0x6c8c
movq 0x3735d(%rip), %rax     # 0x3dfd8
movq (%rax), %rdi
leaq 0x28e8b(%rip), %rsi     # 0x2fb10
movl 0xc(%rsp), %edx
movl %r15d, %ecx
xorl %eax, %eax
callq 0x4380
callq 0x8140
movq 0x37339(%rip), %rax     # 0x3dfd8
movq (%rax), %rcx
leaq 0x28eb8(%rip), %rdi     # 0x2fb61
pushq $0x73
popq %rsi
pushq $0x1
popq %rdx
callq 0x44e0
callq 0x8140