// File: /workspace/github_c_makefile_star2_O0/sc932[P]ALE/src/synthReadGen.c
// Function: main
int main(int argc, char **argv){
  if (argc == 1) {
    printf("%s", WELCOME_MSG);
    printf("Usage: %s [options] <inputFile> <outputFile>\n", argv[0]);
    printf("%s", SHORT_OPTIONS);
    return 1;
  }
  if (argc < 3){
    if(argv[1][0] == '-' && argv[1][1] == 'h'){
      printf("%s", WELCOME_MSG);
      printf("Usage: %s [options] <inputFile> <outputFile>\n\n", argv[0]);
      printf("%s", LONG_OPTIONS);
      return 0;
    }
    printf("%s", WELCOME_MSG);
    printf("Usage: %s [options] <inputFile> <outputFile>\n", argv[0]);
    printf("%s", SHORT_OPTIONS);
    return 1;
  }
  int i;
  int insDistToUse = 1; // distribution to use for insert lengths 1 = normal, 2 = poisson
  int lenDistToUse = 1; // distribution to use for read lengths 1 = normal, 2 = poisson
  int perfectStart = 0; // no error for first x bases in a read
  float inwardInsLenMean = 200.0; // inward insert length mean
  float inwardInsLenSigma = 10.0; // inward insert length sigma
  float inwardProb = 0.5; // probability of an inward insert
  float outwardInsLenMean = 500.0; // outward insert length mean
  float outwardInsLenSigma = 15.0; // inward insert length sigma
  float readLengthMean = 85.0; // read length mean
  float readLengthSigma = 7.0; // read length sigma
  int bowtieOutput = 0;
  char illuminaChar = '^';
  float errorRate = getQualityP(illuminaChar); // 1 - prob of substitution error
  int numReads = 1000;
  if(argv[1][0] == '-' && argv[1][1] == 'h'){
      printf("%s", WELCOME_MSG);
      printf("Usage: %s [options] <inputFile> <outputFile>\n\n", argv[0]);
      printf("%s", LONG_OPTIONS);
      return 0;
  }
  if (argc > 4){
    for(i = 1; i < argc - 2; i++){
      if(argv[i][0] == '-' && argv[i][1] == 'i' && argv[i][2] == 'd'){ // insert distance change
    insDistToUse = atoi(argv[i+1]);
      }else if(argv[i][0] == '-' && argv[i][1] == 'l' && argv[i][2] == 'd'){
    lenDistToUse = atoi(argv[i+1]);
      }else if(argv[i][0] == '-' && argv[i][1] == 'i' && argv[i][2] == 'm'){
    inwardInsLenMean = atof(argv[i+1]);
      }else if(argv[i][0] == '-' && argv[i][1] == 'i' && argv[i][2] == 'p'){
    inwardProb = atof(argv[i+1]);
      }else if(argv[i][0] == '-' && argv[i][1] == 'o' && argv[i][2] == 'm'){
    outwardInsLenMean = atof(argv[i+1]);
      }else if(argv[i][0] == '-' && argv[i][1] == 'e' && argv[i][2] == 'r'){
    illuminaChar = argv[i+1][0];
    errorRate = getQualityP(illuminaChar);
    //errorRate = atof(argv[i+1]);
      }else if(argv[i][0] == '-' && argv[i][1] == 'n' && argv[i][2] == 'r'){
    numReads = atof(argv[i+1]);
      }else if(argv[i][0] == '-' && argv[i][1] == 'i' && argv[i][2] == 's'){
    inwardInsLenSigma = atof(argv[i+1]);
      }else if(argv[i][0] == '-' && argv[i][1] == 'o' && argv[i][2] == 's'){
    outwardInsLenSigma = atof(argv[i+1]);
      }else if(argv[i][0] == '-' && argv[i][1] == 'r' && argv[i][2] == 'l'){
    readLengthMean = atof(argv[i+1]);
      }else if(argv[i][0] == '-' && argv[i][1] == 'r' && argv[i][2] == 's'){
    readLengthSigma = atof(argv[i+1]);
      }else if(argv[i][0] == '-' && argv[i][1] == 'p' && argv[i][2] == 's'){
    perfectStart = atoi(argv[i+1]);
      }else if(argv[i][0] == '-' && argv[i][1] == 'b'){
          bowtieOutput = 1;
          i--;
      }else{
    printf("Error! Could not recognize option: %s with value %s\n", argv[i], argv[i+1]);
    printf("Usage: %s [options] <inputFile> <outputFile>\n", argv[0]);
    printf("%s", SHORT_OPTIONS);
    return 0;
      }
      i++;
    }
  }
  printf("Starting with parameters: id = %i; ld = %i; im = %f; om = %f; ip = %f; er = %f (%c); is = %f; os = %f; rm = %f; rs = %f; ps = %i\n", insDistToUse, lenDistToUse, inwardInsLenMean, outwardInsLenMean, inwardProb,  errorRate, illuminaChar, inwardInsLenSigma, outwardInsLenSigma, readLengthMean, readLengthSigma, perfectStart);
  
  printf("Input file: %s\n", argv[argc - 2]);
  printf("Output file: %s\n", argv[argc - 1]);
  
  // open up input file (with the assembly to parse into reads)
  gzFile fp;
  kseq_t *seq;
  int l;
  fp = gzopen(argv[argc - 2], "r");
  seq = kseq_init(fp);
  printf("Read in file, now making sequences...\n");
  int seqLen;
  
  // open up output file
  FILE *fo1, *fo2, *foD;
  char fileName1[100] = "part1_", fileName2[100] = "part2_";
  char debugName[100] = "synthDebug_";
  if(bowtieOutput == 0){
      fo1 = fopen(argv[argc - 1], "w");
      fo2 = fo1;
  }else{
      strcat(fileName1, argv[argc - 1]);
      strcat(fileName2, argv[argc - 1]);
      strcat(debugName, argv[argc - 1]);
      fo1 = fopen(fileName1, "w");
      fo2 = fopen(fileName2, "w");
      foD = fopen(debugName, "w");
  }
  
  // seed the random number generator
  unsigned int iseed = (unsigned int)time(NULL);
  srand (iseed);
  
  int insertLength;
  int placement;
  int leftReadLength;
  int rightReadLength;
  int readOn = 0;

  while ((l = kseq_read(seq)) >= 0) {
    seqLen = (unsigned int)(seq->seq.l);
    printf("Name of assembly seq to parse: %s\n", seq->name.s);
    if (seq->comment.l) printf("comment: %s\n", seq->comment.s);
    printf("length: %d\n", seqLen);

    int *placementDepth = (int*) calloc(seqLen, sizeof(int));
    for(i=0; i<seqLen; i++){
        placementDepth[i] = 0;
    }
    
    for(readOn = 0; readOn < numReads; readOn++){
      // decide if this is going to be an inward or outward facing read
      
      // INWARD CODE FIRST
      
      if(rand()/( RAND_MAX + 1.0 ) < inwardProb){ // we are making an inward facing read!
        if(insDistToUse == 1){ // use normal distribution
          insertLength = (int)TruncatedNormal(inwardInsLenMean, inwardInsLenSigma, 10, seqLen);
        }
        // now we want to place it uniformly
        placement = (int)(rand()/( RAND_MAX + 1.0 )*(seqLen - insertLength));
        if(lenDistToUse == 1){ // use normal distribution
          leftReadLength = (int)TruncatedNormal(readLengthMean, readLengthSigma, 10, insertLength);
          rightReadLength = (int)TruncatedNormal(readLengthMean, readLengthSigma, 10, insertLength);
        }

        for(i = 0; i < leftReadLength; i++){
            placementDepth[placement + i]++;
        }
        for(i = 0; i < rightReadLength; i++){
            placementDepth[placement + insertLength - 1 - i]++;
        }
    
        if(rand()/( RAND_MAX + 1.0 ) < 0.5){ // forward first
          fprintf(fo1, "@synthR%iFi1,p:%i,i:%i\n", readOn, placement, insertLength);
          for(i = 0; i < leftReadLength; i++){
            if(i < perfectStart){
              fprintf(fo1, "%c",getBaseWithError(seq->seq.s[placement + i], 1.0));
            }else{
              fprintf(fo1, "%c",getBaseWithError(seq->seq.s[placement + i], errorRate));
            }
          }
          fprintf(fo1, "\n+\n");
          for(i = 0; i < leftReadLength; i++){fprintf(fo1, "%c",illuminaChar);}
          fprintf(fo1, "\n");
          fprintf(fo2, "@synthR%iFi1,p:%i,i:%i\n", readOn, placement, insertLength);
          for(i = 0; i < rightReadLength; i++){
            if(i < perfectStart){
              fprintf(fo2, "%c",getBaseWithError(getComplimentRes(seq->seq.s[placement + insertLength - 1 - i]), 1.0));
            }else{
              fprintf(fo2, "%c",getBaseWithError(getComplimentRes(seq->seq.s[placement + insertLength - 1 - i]), errorRate));
            }
          }
          fprintf(fo2, "\n+\n");
          for(i = 0; i < rightReadLength; i++){fprintf(fo2, "%c",illuminaChar);}
          fprintf(fo2, "\n");
        }else{ // backward first
          fprintf(fo1, "@synthR%iFi1,p:%i,i:%i\n", readOn, placement, insertLength);
          for(i = 0; i < rightReadLength; i++){
            if(i < perfectStart){
              fprintf(fo1, "%c",getBaseWithError(getComplimentRes(seq->seq.s[placement + insertLength - 1 - i]), 1.0));
            }else{
              fprintf(fo1, "%c",getBaseWithError(getComplimentRes(seq->seq.s[placement + insertLength - 1 - i]), errorRate));
            }
          }
          fprintf(fo1, "\n+\n");
          for(i = 0; i < rightReadLength; i++){fprintf(fo1, "%c",illuminaChar);}
          fprintf(fo1, "\n");
          fprintf(fo2, "@synthR%iFi1,p:%i,i:%i\n", readOn, placement, insertLength);
          for(i = 0; i < leftReadLength; i++){
            if(i < perfectStart){
              fprintf(fo2, "%c",getBaseWithError(seq->seq.s[placement + i], 1.0));
            }else{
              fprintf(fo2, "%c",getBaseWithError(seq->seq.s[placement + i], errorRate));
            }
          }
          fprintf(fo2, "\n+\n");
          for(i = 0; i < leftReadLength; i++){fprintf(fo2, "%c",illuminaChar);}
          fprintf(fo2, "\n");
        }
      }else{ // make an outward facing read

        // OUTWARD FACING READ

        if(insDistToUse == 1){ // use normal distribution
          insertLength = (int)TruncatedNormal(outwardInsLenMean, outwardInsLenSigma, 10, seqLen);
        }
        // now we want to place it uniformly
        placement = (int)(rand()/( RAND_MAX + 1.0 )*(seqLen - insertLength));
        if(lenDistToUse == 1){ // use normal distribution
          leftReadLength = (int)TruncatedNormal(readLengthMean, readLengthSigma, 10, insertLength);
          rightReadLength = (int)TruncatedNormal(readLengthMean, readLengthSigma, 10, insertLength);
        }

        for(i = 0; i < leftReadLength; i++){
            placementDepth[placement + leftReadLength - i]++;
        }
        for(i = 0; i < rightReadLength; i++){
            placementDepth[placement + insertLength - 1 - rightReadLength + i]++;
        }

        if(rand()/( RAND_MAX + 1.0 ) < 0.5){ // the left read first
          fprintf(fo1, "@synthR%iL,p:%i,i:%i\n", readOn, placement, insertLength);
          for(i = 0; i < leftReadLength; i++){
            if(i < perfectStart){
              fprintf(fo1, "%c",getBaseWithError(getComplimentRes(seq->seq.s[placement + leftReadLength - i]), 1.0));
            }else{
              fprintf(fo1, "%c",getBaseWithError(getComplimentRes(seq->seq.s[placement + leftReadLength - i]), errorRate));
            }
          }
          fprintf(fo1, "\n+\n");
          for(i = 0; i < leftReadLength; i++){fprintf(fo1, "%c",illuminaChar);}
          fprintf(fo1, "\n");
          fprintf(fo2, "@synthR%iL,p:%i,i:%i\n", readOn, placement, insertLength);
          for(i = 0; i < rightReadLength; i++){
            if(i < perfectStart){
              fprintf(fo2, "%c",getBaseWithError(seq->seq.s[placement + insertLength - 1 - rightReadLength + i], 1.0));
            }else{
              fprintf(fo2, "%c",getBaseWithError(seq->seq.s[placement + insertLength - 1 - rightReadLength + i], errorRate));
            }
          }
          fprintf(fo2, "\n+\n");
          for(i = 0; i < rightReadLength; i++){fprintf(fo2, "%c",illuminaChar);}
          fprintf(fo2, "\n");
        }else{ // the right read first
          fprintf(fo1, "@synthR%iL,p:%i,i:%i\n", readOn, placement, insertLength);
          for(i = 0; i < rightReadLength; i++){
            if(i < perfectStart){
              fprintf(fo1, "%c",getBaseWithError(seq->seq.s[placement + insertLength - 1 - rightReadLength + i], 1.0));
            }else{
              fprintf(fo1, "%c",getBaseWithError(seq->seq.s[placement + insertLength - 1 - rightReadLength + i], errorRate));
            }
          }
          fprintf(fo1, "\n+\n");
          for(i = 0; i < rightReadLength; i++){fprintf(fo1, "%c",illuminaChar);}
          fprintf(fo1, "\n");
          fprintf(fo2, "@synthR%il,p:%i,i:%i\n", readOn, placement, insertLength);
          for(i = 0; i < leftReadLength; i++){
            if(i < perfectStart){
              fprintf(fo2, "%c",getBaseWithError(getComplimentRes(seq->seq.s[placement + leftReadLength - i]), 1.0));
            }else{
              fprintf(fo2, "%c",getBaseWithError(getComplimentRes(seq->seq.s[placement + leftReadLength - i]), errorRate));
            }
          }
          fprintf(fo2, "\n+\n");
          for(i = 0; i < leftReadLength; i++){fprintf(fo2, "%c",illuminaChar);}
          fprintf(fo2, "\n");
        }
      }
    }

    for(i=0; i<seqLen; i++){
        fprintf(foD, "%d\n",placementDepth[i]);
    }
    free(placementDepth);
  }
  fclose(fo1);
  if (bowtieOutput != 0) {
	  fclose(fo2);
	  fclose(foD);
  }
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x270, %rsp            # imm = 0x270
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpl $0x1, -0x8(%rbp)
jne 0x190a
leaq 0x27c6(%rip), %rdi      # 0x408c
leaq 0x29b3(%rip), %rsi      # 0x4280
movb $0x0, %al
callq 0x1060
movq -0x10(%rbp), %rax
movq (%rax), %rsi
leaq 0x27ad(%rip), %rdi      # 0x408f
movb $0x0, %al
callq 0x1060
leaq 0x279c(%rip), %rdi      # 0x408c
leaq 0x29d9(%rip), %rsi      # 0x42d0
movb $0x0, %al
callq 0x1060
movl $0x1, -0x4(%rbp)
jmp 0x318f
cmpl $0x3, -0x8(%rbp)
jge 0x19cb
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x1980
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movsbl 0x1(%rax), %eax
cmpl $0x68, %eax
jne 0x1980
leaq 0x2750(%rip), %rdi      # 0x408c
leaq 0x293d(%rip), %rsi      # 0x4280
movb $0x0, %al
callq 0x1060
movq -0x10(%rbp), %rax
movq (%rax), %rsi
leaq 0x2765(%rip), %rdi      # 0x40bd
movb $0x0, %al
callq 0x1060
leaq 0x2726(%rip), %rdi      # 0x408c
leaq 0x29b3(%rip), %rsi      # 0x4320
movb $0x0, %al
callq 0x1060
movl $0x0, -0x4(%rbp)
jmp 0x318f
leaq 0x2705(%rip), %rdi      # 0x408c
leaq 0x28f2(%rip), %rsi      # 0x4280
movb $0x0, %al
callq 0x1060
movq -0x10(%rbp), %rax
movq (%rax), %rsi
leaq 0x26ec(%rip), %rdi      # 0x408f
movb $0x0, %al
callq 0x1060
leaq 0x26db(%rip), %rdi      # 0x408c
leaq 0x2918(%rip), %rsi      # 0x42d0
movb $0x0, %al
callq 0x1060
movl $0x1, -0x4(%rbp)
jmp 0x318f
movl $0x1, -0x18(%rbp)
movl $0x1, -0x1c(%rbp)
movl $0x0, -0x20(%rbp)
movss 0x26a0(%rip), %xmm0     # 0x4088
movss %xmm0, -0x24(%rbp)
movss 0x268f(%rip), %xmm0     # 0x4084
movss %xmm0, -0x28(%rbp)
movss 0x267e(%rip), %xmm0     # 0x4080
movss %xmm0, -0x2c(%rbp)
movss 0x266d(%rip), %xmm0     # 0x407c
movss %xmm0, -0x30(%rbp)
movss 0x265c(%rip), %xmm0     # 0x4078
movss %xmm0, -0x34(%rbp)
movss 0x264b(%rip), %xmm0     # 0x4074
movss %xmm0, -0x38(%rbp)
movss 0x263a(%rip), %xmm0     # 0x4070
movss %xmm0, -0x3c(%rbp)
movl $0x0, -0x40(%rbp)
movb $0x5e, -0x41(%rbp)
movsbl -0x41(%rbp), %edi
callq 0x1870
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x48(%rbp)
movl $0x3e8, -0x4c(%rbp)     # imm = 0x3E8
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x1acb
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movsbl 0x1(%rax), %eax
cmpl $0x68, %eax
jne 0x1acb
leaq 0x2605(%rip), %rdi      # 0x408c
leaq 0x27f2(%rip), %rsi      # 0x4280
movb $0x0, %al
callq 0x1060
movq -0x10(%rbp), %rax
movq (%rax), %rsi
leaq 0x261a(%rip), %rdi      # 0x40bd
movb $0x0, %al
callq 0x1060
leaq 0x25db(%rip), %rdi      # 0x408c
leaq 0x2868(%rip), %rsi      # 0x4320
movb $0x0, %al
callq 0x1060
movl $0x0, -0x4(%rbp)
jmp 0x318f
cmpl $0x4, -0x8(%rbp)
jle 0x2047
movl $0x1, -0x14(%rbp)
movl -0x14(%rbp), %eax
movl -0x8(%rbp), %ecx
subl $0x2, %ecx
cmpl %ecx, %eax
jge 0x2045
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x1b49
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl 0x1(%rax), %eax
cmpl $0x69, %eax
jne 0x1b49
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl 0x2(%rax), %eax
cmpl $0x64, %eax
jne 0x1b49
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
callq 0x1130
movl %eax, -0x18(%rbp)
jmp 0x202e
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x1ba5
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl 0x1(%rax), %eax
cmpl $0x6c, %eax
jne 0x1ba5
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl 0x2(%rax), %eax
cmpl $0x64, %eax
jne 0x1ba5
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
callq 0x1130
movl %eax, -0x1c(%rbp)
jmp 0x202c
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x1c07
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl 0x1(%rax), %eax
cmpl $0x69, %eax
jne 0x1c07
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl 0x2(%rax), %eax
cmpl $0x6d, %eax
jne 0x1c07
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
callq 0x1040
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x24(%rbp)
jmp 0x202a
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x1c69
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl 0x1(%rax), %eax
cmpl $0x69, %eax
jne 0x1c69
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl 0x2(%rax), %eax
cmpl $0x70, %eax
jne 0x1c69
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
callq 0x1040
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x2c(%rbp)
jmp 0x2028
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x1ccb
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl 0x1(%rax), %eax
cmpl $0x6f, %eax
jne 0x1ccb
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl 0x2(%rax), %eax
cmpl $0x6d, %eax
jne 0x1ccb
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
callq 0x1040
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x30(%rbp)
jmp 0x2026
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x1d36
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl 0x1(%rax), %eax
cmpl $0x65, %eax
jne 0x1d36
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl 0x2(%rax), %eax
cmpl $0x72, %eax
jne 0x1d36
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movb (%rax), %al
movb %al, -0x41(%rbp)
movsbl -0x41(%rbp), %edi
callq 0x1870
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x48(%rbp)
jmp 0x2024
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x1d96
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl 0x1(%rax), %eax
cmpl $0x6e, %eax
jne 0x1d96
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl 0x2(%rax), %eax
cmpl $0x72, %eax
jne 0x1d96
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
callq 0x1040
cvttsd2si %xmm0, %eax
movl %eax, -0x4c(%rbp)
jmp 0x2022
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x1df8
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl 0x1(%rax), %eax
cmpl $0x69, %eax
jne 0x1df8
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl 0x2(%rax), %eax
cmpl $0x73, %eax
jne 0x1df8
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
callq 0x1040
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x28(%rbp)
jmp 0x2020
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x1e5a
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl 0x1(%rax), %eax
cmpl $0x6f, %eax
jne 0x1e5a
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl 0x2(%rax), %eax
cmpl $0x73, %eax
jne 0x1e5a
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
callq 0x1040
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x34(%rbp)
jmp 0x201e
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x1ebc
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl 0x1(%rax), %eax
cmpl $0x72, %eax
jne 0x1ebc
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl 0x2(%rax), %eax
cmpl $0x6c, %eax
jne 0x1ebc
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
callq 0x1040
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x38(%rbp)
jmp 0x201c
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x1f1e
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl 0x1(%rax), %eax
cmpl $0x72, %eax
jne 0x1f1e
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl 0x2(%rax), %eax
cmpl $0x73, %eax
jne 0x1f1e
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
callq 0x1040
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x3c(%rbp)
jmp 0x201a
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x1f7a
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl 0x1(%rax), %eax
cmpl $0x70, %eax
jne 0x1f7a
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl 0x2(%rax), %eax
cmpl $0x73, %eax
jne 0x1f7a
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
callq 0x1130
movl %eax, -0x20(%rbp)
jmp 0x2018
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x1fb5
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl 0x1(%rax), %eax
cmpl $0x62, %eax
jne 0x1fb5
movl $0x1, -0x40(%rbp)
movl -0x14(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x2016
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdx
leaq 0x2113(%rip), %rdi      # 0x40ec
movb $0x0, %al
callq 0x1060
movq -0x10(%rbp), %rax
movq (%rax), %rsi
leaq 0x20a1(%rip), %rdi      # 0x408f
movb $0x0, %al
callq 0x1060
leaq 0x2090(%rip), %rdi      # 0x408c
leaq 0x22cd(%rip), %rsi      # 0x42d0
movb $0x0, %al
callq 0x1060
movl $0x0, -0x4(%rbp)
jmp 0x318f
jmp 0x2018
jmp 0x201a
jmp 0x201c
jmp 0x201e
jmp 0x2020
jmp 0x2022
jmp 0x2024
jmp 0x2026
jmp 0x2028
jmp 0x202a
jmp 0x202c
jmp 0x202e
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x1adc
jmp 0x2047
movl -0x18(%rbp), %esi
movl -0x1c(%rbp), %edx
movss -0x24(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movss -0x30(%rbp), %xmm1
cvtss2sd %xmm1, %xmm1
movss -0x2c(%rbp), %xmm2
cvtss2sd %xmm2, %xmm2
movss -0x48(%rbp), %xmm3
cvtss2sd %xmm3, %xmm3
movsbl -0x41(%rbp), %ecx
movss -0x28(%rbp), %xmm4
cvtss2sd %xmm4, %xmm4
movss -0x34(%rbp), %xmm5
cvtss2sd %xmm5, %xmm5
movss -0x38(%rbp), %xmm6
cvtss2sd %xmm6, %xmm6
movss -0x3c(%rbp), %xmm7
cvtss2sd %xmm7, %xmm7
movl -0x20(%rbp), %r8d
leaq 0x207d(%rip), %rdi      # 0x4121
movb $0x8, %al
callq 0x1060
movq -0x10(%rbp), %rax
movl -0x8(%rbp), %ecx
subl $0x2, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rsi
leaq 0x20e0(%rip), %rdi      # 0x41a3
movb $0x0, %al
callq 0x1060
movq -0x10(%rbp), %rax
movl -0x8(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rsi
leaq 0x20d1(%rip), %rdi      # 0x41b3
movb $0x0, %al
callq 0x1060
movq -0x10(%rbp), %rax
movl -0x8(%rbp), %ecx
subl $0x2, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x20c3(%rip), %rsi      # 0x41c4
callq 0x1110
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rdi
callq 0x31a0
movq %rax, -0x60(%rbp)
leaq 0x20a8(%rip), %rdi      # 0x41c6
movb $0x0, %al
callq 0x1060
leaq -0xf0(%rbp), %rdi
xorl %esi, %esi
movl $0x64, %edx
callq 0x1070
movb $0x70, -0xf0(%rbp)
movb $0x61, -0xef(%rbp)
movb $0x72, -0xee(%rbp)
movb $0x74, -0xed(%rbp)
movb $0x31, -0xec(%rbp)
movb $0x5f, -0xeb(%rbp)
leaq -0x160(%rbp), %rdi
xorl %esi, %esi
movl $0x64, %edx
callq 0x1070
movb $0x70, -0x160(%rbp)
movb $0x61, -0x15f(%rbp)
movb $0x72, -0x15e(%rbp)
movb $0x74, -0x15d(%rbp)
movb $0x32, -0x15c(%rbp)
movb $0x5f, -0x15b(%rbp)
leaq -0x1d0(%rbp), %rdi
leaq 0x2573(%rip), %rsi      # 0x4720
movl $0x64, %edx
callq 0x10d0
cmpl $0x0, -0x40(%rbp)
jne 0x21eb
movq -0x10(%rbp), %rax
movl -0x8(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x2018(%rip), %rsi      # 0x41ed
callq 0x1120
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
movq %rax, -0x78(%rbp)
jmp 0x2287
leaq -0xf0(%rbp), %rdi
movq -0x10(%rbp), %rax
movl -0x8(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rsi
callq 0x1140
leaq -0x160(%rbp), %rdi
movq -0x10(%rbp), %rax
movl -0x8(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rsi
callq 0x1140
leaq -0x1d0(%rbp), %rdi
movq -0x10(%rbp), %rax
movl -0x8(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rsi
callq 0x1140
leaq -0xf0(%rbp), %rdi
leaq 0x1f9d(%rip), %rsi      # 0x41ed
callq 0x1120
movq %rax, -0x70(%rbp)
leaq -0x160(%rbp), %rdi
leaq 0x1f86(%rip), %rsi      # 0x41ed
callq 0x1120
movq %rax, -0x78(%rbp)
leaq -0x1d0(%rbp), %rdi
leaq 0x1f6f(%rip), %rsi      # 0x41ed
callq 0x1120
movq %rax, -0x80(%rbp)
xorl %eax, %eax
movl %eax, %edi
callq 0x10e0
movl %eax, -0x1d4(%rbp)
movl -0x1d4(%rbp), %edi
callq 0x1090
movl $0x0, -0x1e8(%rbp)
movq -0x60(%rbp), %rdi
callq 0x31e0
movl %eax, -0x64(%rbp)
cmpl $0x0, %eax
jl 0x3167
movq -0x60(%rbp), %rax
movq 0x30(%rax), %rax
movl %eax, -0x68(%rbp)
movq -0x60(%rbp), %rax
movq 0x10(%rax), %rsi
leaq 0x1f15(%rip), %rdi      # 0x41ef
movb $0x0, %al
callq 0x1060
movq -0x60(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x2302
movq -0x60(%rbp), %rax
movq 0x28(%rax), %rsi
leaq 0x1f17(%rip), %rdi      # 0x4212
movb $0x0, %al
callq 0x1060
movl -0x68(%rbp), %esi
leaq 0x1f13(%rip), %rdi      # 0x421f
movb $0x0, %al
callq 0x1060
movslq -0x68(%rbp), %rdi
movl $0x4, %esi
callq 0x10a0
movq %rax, -0x1f0(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x68(%rbp), %eax
jge 0x2354
movq -0x1f0(%rbp), %rax
movslq -0x14(%rbp), %rcx
movl $0x0, (%rax,%rcx,4)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x232f
movl $0x0, -0x1e8(%rbp)
movl -0x1e8(%rbp), %eax
cmpl -0x4c(%rbp), %eax
jge 0x311c
callq 0x1160
cvtsi2sd %eax, %xmm1
movsd 0x1c8a(%rip), %xmm0     # 0x4008
divsd %xmm0, %xmm1
movss -0x2c(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
ucomisd %xmm1, %xmm0
jbe 0x2a31
cmpl $0x1, -0x18(%rbp)
jne 0x23c1
movss -0x24(%rbp), %xmm0
movss -0x28(%rbp), %xmm1
cvtsi2ssl -0x68(%rbp), %xmm3
movss 0x1cd2(%rip), %xmm2     # 0x4084
callq 0x17e0
cvttsd2si %xmm0, %eax
movl %eax, -0x1d8(%rbp)
callq 0x1160
cvtsi2sd %eax, %xmm0
movsd 0x1c36(%rip), %xmm1     # 0x4008
divsd %xmm1, %xmm0
movl -0x68(%rbp), %eax
subl -0x1d8(%rbp), %eax
cvtsi2sd %eax, %xmm1
mulsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movl %eax, -0x1dc(%rbp)
cmpl $0x1, -0x1c(%rbp)
jne 0x2449
movss -0x38(%rbp), %xmm0
movss -0x3c(%rbp), %xmm1
cvtsi2ssl -0x1d8(%rbp), %xmm3
movss 0x1c73(%rip), %xmm2     # 0x4084
callq 0x17e0
cvttsd2si %xmm0, %eax
movl %eax, -0x1e0(%rbp)
movss -0x38(%rbp), %xmm0
movss -0x3c(%rbp), %xmm1
cvtsi2ssl -0x1d8(%rbp), %xmm3
movss 0x1c4a(%rip), %xmm2     # 0x4084
callq 0x17e0
cvttsd2si %xmm0, %eax
movl %eax, -0x1e4(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x1e0(%rbp), %eax
jge 0x2482
movq -0x1f0(%rbp), %rax
movl -0x1dc(%rbp), %ecx
addl -0x14(%rbp), %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %edx
addl $0x1, %edx
movl %edx, (%rax,%rcx,4)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x2450
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x1e4(%rbp), %eax
jge 0x24c4
movq -0x1f0(%rbp), %rax
movl -0x1dc(%rbp), %ecx
addl -0x1d8(%rbp), %ecx
subl $0x1, %ecx
subl -0x14(%rbp), %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %edx
addl $0x1, %edx
movl %edx, (%rax,%rcx,4)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x2489
callq 0x1160
cvtsi2sd %eax, %xmm1
movsd 0x1b33(%rip), %xmm0     # 0x4008
divsd %xmm0, %xmm1
movsd 0x1b3f(%rip), %xmm0     # 0x4020
ucomisd %xmm1, %xmm0
jbe 0x278e
movq -0x70(%rbp), %rdi
movl -0x1e8(%rbp), %edx
movl -0x1dc(%rbp), %ecx
movl -0x1d8(%rbp), %r8d
leaq 0x1d22(%rip), %rsi      # 0x422b
movb $0x0, %al
callq 0x10c0
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x1e0(%rbp), %eax
jge 0x25d3
movl -0x14(%rbp), %eax
cmpl -0x20(%rbp), %eax
jge 0x2578
movq -0x70(%rbp), %rax
movq %rax, -0x1f8(%rbp)
movq -0x60(%rbp), %rax
movq 0x40(%rax), %rax
movl -0x1dc(%rbp), %ecx
addl -0x14(%rbp), %ecx
movslq %ecx, %rcx
movsd 0x1b13(%rip), %xmm0     # 0x4068
movsbl (%rax,%rcx), %edi
callq 0x1300
movq -0x1f8(%rbp), %rdi
movsbl %al, %edx
leaq 0x1cd4(%rip), %rsi      # 0x4243
movb $0x0, %al
callq 0x10c0
jmp 0x25c3
movq -0x70(%rbp), %rax
movq %rax, -0x200(%rbp)
movq -0x60(%rbp), %rax
movq 0x40(%rax), %rax
movl -0x1dc(%rbp), %ecx
addl -0x14(%rbp), %ecx
movslq %ecx, %rcx
movb (%rax,%rcx), %al
movss -0x48(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movsbl %al, %edi
callq 0x1300
movq -0x200(%rbp), %rdi
movsbl %al, %edx
leaq 0x1c87(%rip), %rsi      # 0x4243
movb $0x0, %al
callq 0x10c0
jmp 0x25c5
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x2517
movq -0x70(%rbp), %rdi
leaq 0x1c68(%rip), %rsi      # 0x4246
movb $0x0, %al
callq 0x10c0
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x1e0(%rbp), %eax
jge 0x2618
movq -0x70(%rbp), %rdi
movsbl -0x41(%rbp), %edx
leaq 0x1c3d(%rip), %rsi      # 0x4243
movb $0x0, %al
callq 0x10c0
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x25ec
movq -0x70(%rbp), %rdi
leaq 0x1ac7(%rip), %rsi      # 0x40ea
movb $0x0, %al
callq 0x10c0
movq -0x78(%rbp), %rdi
movl -0x1e8(%rbp), %edx
movl -0x1dc(%rbp), %ecx
movl -0x1d8(%rbp), %r8d
leaq 0x1be3(%rip), %rsi      # 0x422b
movb $0x0, %al
callq 0x10c0
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x1e4(%rbp), %eax
jge 0x2732
movl -0x14(%rbp), %eax
cmpl -0x20(%rbp), %eax
jge 0x26c8
movq -0x78(%rbp), %rax
movq %rax, -0x208(%rbp)
movq -0x60(%rbp), %rax
movq 0x40(%rax), %rax
movl -0x1dc(%rbp), %ecx
addl -0x1d8(%rbp), %ecx
subl $0x1, %ecx
subl -0x14(%rbp), %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %edi
callq 0x1280
movsd 0x19c2(%rip), %xmm0     # 0x4068
movsbl %al, %edi
callq 0x1300
movq -0x208(%rbp), %rdi
movsbl %al, %edx
leaq 0x1b84(%rip), %rsi      # 0x4243
movb $0x0, %al
callq 0x10c0
jmp 0x2722
movq -0x78(%rbp), %rax
movq %rax, -0x210(%rbp)
movq -0x60(%rbp), %rax
movq 0x40(%rax), %rax
movl -0x1dc(%rbp), %ecx
addl -0x1d8(%rbp), %ecx
subl $0x1, %ecx
subl -0x14(%rbp), %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %edi
callq 0x1280
movss -0x48(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movsbl %al, %edi
callq 0x1300
movq -0x210(%rbp), %rdi
movsbl %al, %edx
leaq 0x1b28(%rip), %rsi      # 0x4243
movb $0x0, %al
callq 0x10c0
jmp 0x2724
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x2656
movq -0x78(%rbp), %rdi
leaq 0x1b09(%rip), %rsi      # 0x4246
movb $0x0, %al
callq 0x10c0
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x1e4(%rbp), %eax
jge 0x2777
movq -0x78(%rbp), %rdi
movsbl -0x41(%rbp), %edx
leaq 0x1ade(%rip), %rsi      # 0x4243
movb $0x0, %al
callq 0x10c0
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x274b
movq -0x78(%rbp), %rdi
leaq 0x1968(%rip), %rsi      # 0x40ea
movb $0x0, %al
callq 0x10c0
jmp 0x2a2c
movq -0x70(%rbp), %rdi
movl -0x1e8(%rbp), %edx
movl -0x1dc(%rbp), %ecx
movl -0x1d8(%rbp), %r8d
leaq 0x1a7f(%rip), %rsi      # 0x422b
movb $0x0, %al
callq 0x10c0
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x1e4(%rbp), %eax
jge 0x2896
movl -0x14(%rbp), %eax
cmpl -0x20(%rbp), %eax
jge 0x282c
movq -0x70(%rbp), %rax
movq %rax, -0x218(%rbp)
movq -0x60(%rbp), %rax
movq 0x40(%rax), %rax
movl -0x1dc(%rbp), %ecx
addl -0x1d8(%rbp), %ecx
subl $0x1, %ecx
subl -0x14(%rbp), %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %edi
callq 0x1280
movsd 0x185e(%rip), %xmm0     # 0x4068
movsbl %al, %edi
callq 0x1300
movq -0x218(%rbp), %rdi
movsbl %al, %edx
leaq 0x1a20(%rip), %rsi      # 0x4243
movb $0x0, %al
callq 0x10c0
jmp 0x2886
movq -0x70(%rbp), %rax
movq %rax, -0x220(%rbp)
movq -0x60(%rbp), %rax
movq 0x40(%rax), %rax
movl -0x1dc(%rbp), %ecx
addl -0x1d8(%rbp), %ecx
subl $0x1, %ecx
subl -0x14(%rbp), %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %edi
callq 0x1280
movss -0x48(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movsbl %al, %edi
callq 0x1300
movq -0x220(%rbp), %rdi
movsbl %al, %edx
leaq 0x19c4(%rip), %rsi      # 0x4243
movb $0x0, %al
callq 0x10c0
jmp 0x2888
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x27ba
movq -0x70(%rbp), %rdi
leaq 0x19a5(%rip), %rsi      # 0x4246
movb $0x0, %al
callq 0x10c0
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x1e4(%rbp), %eax
jge 0x28db
movq -0x70(%rbp), %rdi
movsbl -0x41(%rbp), %edx
leaq 0x197a(%rip), %rsi      # 0x4243
movb $0x0, %al
callq 0x10c0
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x28af
movq -0x70(%rbp), %rdi
leaq 0x1804(%rip), %rsi      # 0x40ea
movb $0x0, %al
callq 0x10c0
movq -0x78(%rbp), %rdi
movl -0x1e8(%rbp), %edx
movl -0x1dc(%rbp), %ecx
movl -0x1d8(%rbp), %r8d
leaq 0x1920(%rip), %rsi      # 0x422b
movb $0x0, %al
callq 0x10c0
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x1e0(%rbp), %eax
jge 0x29d5
movl -0x14(%rbp), %eax
cmpl -0x20(%rbp), %eax
jge 0x297a
movq -0x78(%rbp), %rax
movq %rax, -0x228(%rbp)
movq -0x60(%rbp), %rax
movq 0x40(%rax), %rax
movl -0x1dc(%rbp), %ecx
addl -0x14(%rbp), %ecx
movslq %ecx, %rcx
movsd 0x1711(%rip), %xmm0     # 0x4068
movsbl (%rax,%rcx), %edi
callq 0x1300
movq -0x228(%rbp), %rdi
movsbl %al, %edx
leaq 0x18d2(%rip), %rsi      # 0x4243
movb $0x0, %al
callq 0x10c0
jmp 0x29c5
movq -0x78(%rbp), %rax
movq %rax, -0x230(%rbp)
movq -0x60(%rbp), %rax
movq 0x40(%rax), %rax
movl -0x1dc(%rbp), %ecx
addl -0x14(%rbp), %ecx
movslq %ecx, %rcx
movb (%rax,%rcx), %al
movss -0x48(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movsbl %al, %edi
callq 0x1300
movq -0x230(%rbp), %rdi
movsbl %al, %edx
leaq 0x1885(%rip), %rsi      # 0x4243
movb $0x0, %al
callq 0x10c0
jmp 0x29c7
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x2919
movq -0x78(%rbp), %rdi
leaq 0x1866(%rip), %rsi      # 0x4246
movb $0x0, %al
callq 0x10c0
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x1e0(%rbp), %eax
jge 0x2a1a
movq -0x78(%rbp), %rdi
movsbl -0x41(%rbp), %edx
leaq 0x183b(%rip), %rsi      # 0x4243
movb $0x0, %al
callq 0x10c0
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x29ee
movq -0x78(%rbp), %rdi
leaq 0x16c5(%rip), %rsi      # 0x40ea
movb $0x0, %al
callq 0x10c0
jmp 0x3106
cmpl $0x1, -0x18(%rbp)
jne 0x2a5d
movss -0x30(%rbp), %xmm0
movss -0x34(%rbp), %xmm1
cvtsi2ssl -0x68(%rbp), %xmm3
movss 0x1636(%rip), %xmm2     # 0x4084
callq 0x17e0
cvttsd2si %xmm0, %eax
movl %eax, -0x1d8(%rbp)
callq 0x1160
cvtsi2sd %eax, %xmm0
movsd 0x159a(%rip), %xmm1     # 0x4008
divsd %xmm1, %xmm0
movl -0x68(%rbp), %eax
subl -0x1d8(%rbp), %eax
cvtsi2sd %eax, %xmm1
mulsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movl %eax, -0x1dc(%rbp)
cmpl $0x1, -0x1c(%rbp)
jne 0x2ae5
movss -0x38(%rbp), %xmm0
movss -0x3c(%rbp), %xmm1
cvtsi2ssl -0x1d8(%rbp), %xmm3
movss 0x15d7(%rip), %xmm2     # 0x4084
callq 0x17e0
cvttsd2si %xmm0, %eax
movl %eax, -0x1e0(%rbp)
movss -0x38(%rbp), %xmm0
movss -0x3c(%rbp), %xmm1
cvtsi2ssl -0x1d8(%rbp), %xmm3
movss 0x15ae(%rip), %xmm2     # 0x4084
callq 0x17e0
cvttsd2si %xmm0, %eax
movl %eax, -0x1e4(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x1e0(%rbp), %eax
jge 0x2b24
movq -0x1f0(%rbp), %rax
movl -0x1dc(%rbp), %ecx
addl -0x1e0(%rbp), %ecx
subl -0x14(%rbp), %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %edx
addl $0x1, %edx
movl %edx, (%rax,%rcx,4)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x2aec
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x1e4(%rbp), %eax
jge 0x2b6c
movq -0x1f0(%rbp), %rax
movl -0x1dc(%rbp), %ecx
addl -0x1d8(%rbp), %ecx
subl $0x1, %ecx
subl -0x1e4(%rbp), %ecx
addl -0x14(%rbp), %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %edx
addl $0x1, %edx
movl %edx, (%rax,%rcx,4)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x2b2b
callq 0x1160
cvtsi2sd %eax, %xmm1
movsd 0x148b(%rip), %xmm0     # 0x4008
divsd %xmm0, %xmm1
movsd 0x1497(%rip), %xmm0     # 0x4020
ucomisd %xmm1, %xmm0
jbe 0x2e4e
movq -0x70(%rbp), %rdi
movl -0x1e8(%rbp), %edx
movl -0x1dc(%rbp), %ecx
movl -0x1d8(%rbp), %r8d
leaq 0x1699(%rip), %rsi      # 0x424a
movb $0x0, %al
callq 0x10c0
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x1e0(%rbp), %eax
jge 0x2c95
movl -0x14(%rbp), %eax
cmpl -0x20(%rbp), %eax
jge 0x2c2e
movq -0x70(%rbp), %rax
movq %rax, -0x238(%rbp)
movq -0x60(%rbp), %rax
movq 0x40(%rax), %rax
movl -0x1dc(%rbp), %ecx
addl -0x1e0(%rbp), %ecx
subl -0x14(%rbp), %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %edi
callq 0x1280
movsd 0x145c(%rip), %xmm0     # 0x4068
movsbl %al, %edi
callq 0x1300
movq -0x238(%rbp), %rdi
movsbl %al, %edx
leaq 0x161e(%rip), %rsi      # 0x4243
movb $0x0, %al
callq 0x10c0
jmp 0x2c85
movq -0x70(%rbp), %rax
movq %rax, -0x240(%rbp)
movq -0x60(%rbp), %rax
movq 0x40(%rax), %rax
movl -0x1dc(%rbp), %ecx
addl -0x1e0(%rbp), %ecx
subl -0x14(%rbp), %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %edi
callq 0x1280
movss -0x48(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movsbl %al, %edi
callq 0x1300
movq -0x240(%rbp), %rdi
movsbl %al, %edx
leaq 0x15c5(%rip), %rsi      # 0x4243
movb $0x0, %al
callq 0x10c0
jmp 0x2c87
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x2bbf
movq -0x70(%rbp), %rdi
leaq 0x15a6(%rip), %rsi      # 0x4246
movb $0x0, %al
callq 0x10c0
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x1e0(%rbp), %eax
jge 0x2cda
movq -0x70(%rbp), %rdi
movsbl -0x41(%rbp), %edx
leaq 0x157b(%rip), %rsi      # 0x4243
movb $0x0, %al
callq 0x10c0
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x2cae
movq -0x70(%rbp), %rdi
leaq 0x1405(%rip), %rsi      # 0x40ea
movb $0x0, %al
callq 0x10c0
movq -0x78(%rbp), %rdi
movl -0x1e8(%rbp), %edx
movl -0x1dc(%rbp), %ecx
movl -0x1d8(%rbp), %r8d
leaq 0x1540(%rip), %rsi      # 0x424a
movb $0x0, %al
callq 0x10c0
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x1e4(%rbp), %eax
jge 0x2df2
movl -0x14(%rbp), %eax
cmpl -0x20(%rbp), %eax
jge 0x2d88
movq -0x78(%rbp), %rax
movq %rax, -0x248(%rbp)
movq -0x60(%rbp), %rax
movq 0x40(%rax), %rax
movl -0x1dc(%rbp), %ecx
addl -0x1d8(%rbp), %ecx
subl $0x1, %ecx
subl -0x1e4(%rbp), %ecx
addl -0x14(%rbp), %ecx
movslq %ecx, %rcx
movsd 0x1303(%rip), %xmm0     # 0x4068
movsbl (%rax,%rcx), %edi
callq 0x1300
movq -0x248(%rbp), %rdi
movsbl %al, %edx
leaq 0x14c4(%rip), %rsi      # 0x4243
movb $0x0, %al
callq 0x10c0
jmp 0x2de2
movq -0x78(%rbp), %rax
movq %rax, -0x250(%rbp)
movq -0x60(%rbp), %rax
movq 0x40(%rax), %rax
movl -0x1dc(%rbp), %ecx
addl -0x1d8(%rbp), %ecx
subl $0x1, %ecx
subl -0x1e4(%rbp), %ecx
addl -0x14(%rbp), %ecx
movslq %ecx, %rcx
movb (%rax,%rcx), %al
movss -0x48(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movsbl %al, %edi
callq 0x1300
movq -0x250(%rbp), %rdi
movsbl %al, %edx
leaq 0x1468(%rip), %rsi      # 0x4243
movb $0x0, %al
callq 0x10c0
jmp 0x2de4
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x2d18
movq -0x78(%rbp), %rdi
leaq 0x1449(%rip), %rsi      # 0x4246
movb $0x0, %al
callq 0x10c0
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x1e4(%rbp), %eax
jge 0x2e37
movq -0x78(%rbp), %rdi
movsbl -0x41(%rbp), %edx
leaq 0x141e(%rip), %rsi      # 0x4243
movb $0x0, %al
callq 0x10c0
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x2e0b
movq -0x78(%rbp), %rdi
leaq 0x12a8(%rip), %rsi      # 0x40ea
movb $0x0, %al
callq 0x10c0
jmp 0x3104
movq -0x70(%rbp), %rdi
movl -0x1e8(%rbp), %edx
movl -0x1dc(%rbp), %ecx
movl -0x1d8(%rbp), %r8d
leaq 0x13de(%rip), %rsi      # 0x424a
movb $0x0, %al
callq 0x10c0
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x1e4(%rbp), %eax
jge 0x2f54
movl -0x14(%rbp), %eax
cmpl -0x20(%rbp), %eax
jge 0x2eea
movq -0x70(%rbp), %rax
movq %rax, -0x258(%rbp)
movq -0x60(%rbp), %rax
movq 0x40(%rax), %rax
movl -0x1dc(%rbp), %ecx
addl -0x1d8(%rbp), %ecx
subl $0x1, %ecx
subl -0x1e4(%rbp), %ecx
addl -0x14(%rbp), %ecx
movslq %ecx, %rcx
movsd 0x11a1(%rip), %xmm0     # 0x4068
movsbl (%rax,%rcx), %edi
callq 0x1300
movq -0x258(%rbp), %rdi
movsbl %al, %edx
leaq 0x1362(%rip), %rsi      # 0x4243
movb $0x0, %al
callq 0x10c0
jmp 0x2f44
movq -0x70(%rbp), %rax
movq %rax, -0x260(%rbp)
movq -0x60(%rbp), %rax
movq 0x40(%rax), %rax
movl -0x1dc(%rbp), %ecx
addl -0x1d8(%rbp), %ecx
subl $0x1, %ecx
subl -0x1e4(%rbp), %ecx
addl -0x14(%rbp), %ecx
movslq %ecx, %rcx
movb (%rax,%rcx), %al
movss -0x48(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movsbl %al, %edi
callq 0x1300
movq -0x260(%rbp), %rdi
movsbl %al, %edx
leaq 0x1306(%rip), %rsi      # 0x4243
movb $0x0, %al
callq 0x10c0
jmp 0x2f46
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x2e7a
movq -0x70(%rbp), %rdi
leaq 0x12e7(%rip), %rsi      # 0x4246
movb $0x0, %al
callq 0x10c0
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x1e4(%rbp), %eax
jge 0x2f99
movq -0x70(%rbp), %rdi
movsbl -0x41(%rbp), %edx
leaq 0x12bc(%rip), %rsi      # 0x4243
movb $0x0, %al
callq 0x10c0
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x2f6d
movq -0x70(%rbp), %rdi
leaq 0x1146(%rip), %rsi      # 0x40ea
movb $0x0, %al
callq 0x10c0
movq -0x78(%rbp), %rdi
movl -0x1e8(%rbp), %edx
movl -0x1dc(%rbp), %ecx
movl -0x1d8(%rbp), %r8d
leaq 0x1297(%rip), %rsi      # 0x4260
movb $0x0, %al
callq 0x10c0
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x1e0(%rbp), %eax
jge 0x30ad
movl -0x14(%rbp), %eax
cmpl -0x20(%rbp), %eax
jge 0x3046
movq -0x78(%rbp), %rax
movq %rax, -0x268(%rbp)
movq -0x60(%rbp), %rax
movq 0x40(%rax), %rax
movl -0x1dc(%rbp), %ecx
addl -0x1e0(%rbp), %ecx
subl -0x14(%rbp), %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %edi
callq 0x1280
movsd 0x1044(%rip), %xmm0     # 0x4068
movsbl %al, %edi
callq 0x1300
movq -0x268(%rbp), %rdi
movsbl %al, %edx
leaq 0x1206(%rip), %rsi      # 0x4243
movb $0x0, %al
callq 0x10c0
jmp 0x309d
movq -0x78(%rbp), %rax
movq %rax, -0x270(%rbp)
movq -0x60(%rbp), %rax
movq 0x40(%rax), %rax
movl -0x1dc(%rbp), %ecx
addl -0x1e0(%rbp), %ecx
subl -0x14(%rbp), %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %edi
callq 0x1280
movss -0x48(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movsbl %al, %edi
callq 0x1300
movq -0x270(%rbp), %rdi
movsbl %al, %edx
leaq 0x11ad(%rip), %rsi      # 0x4243
movb $0x0, %al
callq 0x10c0
jmp 0x309f
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x2fd7
movq -0x78(%rbp), %rdi
leaq 0x118e(%rip), %rsi      # 0x4246
movb $0x0, %al
callq 0x10c0
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x1e0(%rbp), %eax
jge 0x30f2
movq -0x78(%rbp), %rdi
movsbl -0x41(%rbp), %edx
leaq 0x1163(%rip), %rsi      # 0x4243
movb $0x0, %al
callq 0x10c0
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x30c6
movq -0x78(%rbp), %rdi
leaq 0xfed(%rip), %rsi       # 0x40ea
movb $0x0, %al
callq 0x10c0
jmp 0x3106
jmp 0x3108
movl -0x1e8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1e8(%rbp)
jmp 0x235e
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x68(%rbp), %eax
jge 0x3156
movq -0x80(%rbp), %rdi
movq -0x1f0(%rbp), %rax
movslq -0x14(%rbp), %rcx
movl (%rax,%rcx,4), %edx
leaq 0x10e3(%rip), %rsi      # 0x4227
movb $0x0, %al
callq 0x10c0
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x3123
movq -0x1f0(%rbp), %rdi
callq 0x1030
jmp 0x22ab
movq -0x70(%rbp), %rdi
callq 0x1050
cmpl $0x0, -0x40(%rbp)
je 0x3188
movq -0x78(%rbp), %rdi
callq 0x1050
movq -0x80(%rbp), %rdi
callq 0x1050
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x270, %rsp            # imm = 0x270
popq %rbp
retq
nopl (%rax,%rax)