// File: /workspace/github_c_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x218, %rsp            # imm = 0x218
movq %rsi, %rbx
cmpl $0x1, %edi
jne 0x160e
leaq 0x224e(%rip), %rdi      # 0x3832
callq 0x1040
movq (%rbx), %rsi
leaq 0x1d71(%rip), %rdi      # 0x3364
xorl %eax, %eax
callq 0x1070
leaq 0x2277(%rip), %rdi      # 0x3878
callq 0x1040
pushq $0x1
popq %rbp
jmp 0x2a1a
movl %edi, %r15d
movq 0x8(%rbx), %rax
movb (%rax), %cl
cmpl $0x2, %edi
jg 0x1629
cmpb $0x2d, %cl
jne 0x15dd
cmpb $0x68, 0x1(%rax)
jne 0x15dd
jmp 0x1634
cmpb $0x2d, %cl
jne 0x165f
cmpb $0x68, 0x1(%rax)
jne 0x165f
leaq 0x21f7(%rip), %rdi      # 0x3832
callq 0x1040
movq (%rbx), %rsi
leaq 0x1d48(%rip), %rdi      # 0x3392
xorl %ebp, %ebp
xorl %eax, %eax
callq 0x1070
leaq 0x1eed(%rip), %rdi      # 0x3547
jmp 0x1b85
cmpl $0x5, %r15d
jb 0x1afe
leal -0x2(%r15), %ebp
pushq $0x1
popq %r13
movss 0x1a0f(%rip), %xmm0     # 0x3088
movl $0x3e8, 0x58(%rsp)      # imm = 0x3E8
movss 0x1a17(%rip), %xmm1     # 0x30a0
movss %xmm1, 0x48(%rsp)
movb $0x5e, %r12b
movl $0x0, 0x28(%rsp)
movss 0x19ea(%rip), %xmm7     # 0x308c
movss 0x19e6(%rip), %xmm6     # 0x3090
movss 0x19e2(%rip), %xmm5     # 0x3094
movss 0x19de(%rip), %xmm1     # 0x3098
movss 0x19e2(%rip), %xmm2     # 0x30a4
movss %xmm2, 0x38(%rsp)
movss 0x19cc(%rip), %xmm4     # 0x309c
leaq 0x19d9(%rip), %r14      # 0x30b0
movl $0x0, 0x40(%rsp)
movl %r13d, 0x54(%rsp)
movl %r13d, 0x50(%rsp)
cmpl %ebp, %r13d
jge 0x1b8f
movslq %r13d, %rax
movq (%rbx,%rax,8), %rsi
cmpb $0x2d, (%rsi)
jne 0x1b58
movzbl 0x1(%rsi), %ecx
leal -0x62(%rcx), %edx
cmpl $0x10, %edx
ja 0x1b58
movslq (%r14,%rdx,4), %rdx
addq %r14, %rdx
jmpq *%rdx
decl %r13d
pushq $0x1
popq %rax
movl %eax, 0x28(%rsp)
jmp 0x1af5
cmpb $0x64, 0x2(%rsi)
jne 0x1b58
movq 0x8(%rbx,%rax,8), %rdi
movss %xmm0, 0x18(%rsp)
movss %xmm6, 0x10(%rsp)
movss %xmm5, 0x24(%rsp)
movss %xmm7, 0x14(%rsp)
movss %xmm1, 0x20(%rsp)
movss %xmm4, 0x1c(%rsp)
callq 0x1140
movss 0x1c(%rsp), %xmm4
movss 0x20(%rsp), %xmm1
movss 0x14(%rsp), %xmm7
movss 0x24(%rsp), %xmm5
movss 0x10(%rsp), %xmm6
movss 0x18(%rsp), %xmm0
movl %eax, 0x54(%rsp)
jmp 0x1af5
cmpb $0x72, 0x2(%rsi)
jne 0x1b58
movq 0x8(%rbx,%rax,8), %rax
movsbq (%rax), %r12
leaq 0x1957(%rip), %rax      # 0x3100
cvtsd2ss -0x200(%rax,%r12,8), %xmm2
movss %xmm2, 0x48(%rsp)
jmp 0x1af5
cmpb $0x72, 0x2(%rsi)
jne 0x1b58
movq 0x8(%rbx,%rax,8), %rdi
movss %xmm0, 0x18(%rsp)
movss %xmm6, 0x10(%rsp)
movss %xmm5, 0x24(%rsp)
movss %xmm7, 0x14(%rsp)
movss %xmm1, 0x20(%rsp)
movss %xmm4, 0x1c(%rsp)
callq 0x1050
movss 0x1c(%rsp), %xmm4
movss 0x20(%rsp), %xmm1
movss 0x14(%rsp), %xmm7
movss 0x24(%rsp), %xmm5
movss 0x10(%rsp), %xmm6
cvttsd2si %xmm0, %eax
movl %eax, 0x58(%rsp)
jmp 0x1aef
cmpb $0x64, 0x2(%rsi)
movss %xmm6, 0x10(%rsp)
movss %xmm5, 0x24(%rsp)
movss %xmm7, 0x14(%rsp)
movss %xmm1, 0x20(%rsp)
jne 0x18d9
movq 0x8(%rbx,%rax,8), %rdi
movss %xmm0, 0x18(%rsp)
movss %xmm4, 0x1c(%rsp)
callq 0x1140
movss 0x1c(%rsp), %xmm4
movss 0x20(%rsp), %xmm1
movss 0x14(%rsp), %xmm7
movss 0x24(%rsp), %xmm5
movss 0x10(%rsp), %xmm6
movss 0x18(%rsp), %xmm0
movl %eax, 0x50(%rsp)
jmp 0x1af5
cmpb $0x6d, 0x2(%rsi)
jne 0x191a
movq 0x8(%rbx,%rax,8), %rdi
movss %xmm0, 0x18(%rsp)
movss %xmm6, 0x10(%rsp)
movss %xmm5, 0x24(%rsp)
movss %xmm7, 0x14(%rsp)
movss %xmm4, 0x1c(%rsp)
callq 0x1050
movss 0x1c(%rsp), %xmm4
movss 0x14(%rsp), %xmm7
movss 0x24(%rsp), %xmm5
movss 0x10(%rsp), %xmm6
cvtsd2ss %xmm0, %xmm1
jmp 0x1aef
cmpb $0x6d, 0x2(%rsi)
jne 0x196d
movq 0x8(%rbx,%rax,8), %rdi
movss %xmm4, 0x1c(%rsp)
callq 0x1050
movss 0x1c(%rsp), %xmm4
movss 0x20(%rsp), %xmm1
movss 0x14(%rsp), %xmm7
movss 0x24(%rsp), %xmm5
movss 0x10(%rsp), %xmm6
cvtsd2ss %xmm0, %xmm0
jmp 0x1af5
cmpb $0x73, 0x2(%rsi)
jne 0x19ed
movq 0x8(%rbx,%rax,8), %rdi
movss %xmm0, 0x18(%rsp)
movss %xmm6, 0x10(%rsp)
movss %xmm7, 0x14(%rsp)
movss %xmm1, 0x20(%rsp)
movss %xmm4, 0x1c(%rsp)
callq 0x1050
movss 0x1c(%rsp), %xmm4
movss 0x20(%rsp), %xmm1
movss 0x14(%rsp), %xmm7
movss 0x10(%rsp), %xmm6
cvtsd2ss %xmm0, %xmm5
jmp 0x1aef
cmpb $0x70, 0x2(%rsi)
jne 0x19b6
movq 0x8(%rbx,%rax,8), %rdi
movss %xmm0, 0x18(%rsp)
movss %xmm4, 0x1c(%rsp)
callq 0x1050
movss 0x1c(%rsp), %xmm4
movss 0x20(%rsp), %xmm1
movss 0x14(%rsp), %xmm7
movss 0x24(%rsp), %xmm5
movss 0x10(%rsp), %xmm6
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x38(%rsp)
jmp 0x1aef
cmpb $0x73, 0x2(%rsi)
jne 0x19ed
movq 0x8(%rbx,%rax,8), %rdi
movss %xmm0, 0x18(%rsp)
callq 0x1050
movss 0x20(%rsp), %xmm1
movss 0x14(%rsp), %xmm7
movss 0x24(%rsp), %xmm5
movss 0x10(%rsp), %xmm6
cvtsd2ss %xmm0, %xmm4
jmp 0x1aef
cmpl $0x62, %ecx
je 0x171b
cmpl $0x70, %ecx
je 0x1a57
cmpl $0x72, %ecx
jne 0x1b58
cmpb $0x6c, 0x2(%rsi)
movss %xmm0, 0x18(%rsp)
movss %xmm5, 0x24(%rsp)
movss %xmm1, 0x20(%rsp)
movss %xmm4, 0x1c(%rsp)
jne 0x1ab9
movq 0x8(%rbx,%rax,8), %rdi
movss %xmm7, 0x14(%rsp)
callq 0x1050
movss 0x1c(%rsp), %xmm4
movss 0x20(%rsp), %xmm1
movss 0x14(%rsp), %xmm7
movss 0x24(%rsp), %xmm5
cvtsd2ss %xmm0, %xmm6
jmp 0x1aef
cmpb $0x73, 0x2(%rsi)
jne 0x1b58
movq 0x8(%rbx,%rax,8), %rdi
movss %xmm0, 0x18(%rsp)
movss %xmm6, 0x10(%rsp)
movss %xmm5, 0x24(%rsp)
movss %xmm7, 0x14(%rsp)
movss %xmm1, 0x20(%rsp)
movss %xmm4, 0x1c(%rsp)
callq 0x1140
movss 0x1c(%rsp), %xmm4
movss 0x20(%rsp), %xmm1
movss 0x14(%rsp), %xmm7
movss 0x24(%rsp), %xmm5
movss 0x10(%rsp), %xmm6
movss 0x18(%rsp), %xmm0
movl %eax, 0x40(%rsp)
jmp 0x1af5
cmpb $0x73, 0x2(%rsi)
jne 0x1b58
movq 0x8(%rbx,%rax,8), %rdi
movss %xmm6, 0x10(%rsp)
callq 0x1050
movss 0x1c(%rsp), %xmm4
movss 0x20(%rsp), %xmm1
movss 0x24(%rsp), %xmm5
movss 0x10(%rsp), %xmm6
cvtsd2ss %xmm0, %xmm7
movss 0x18(%rsp), %xmm0
addl $0x2, %r13d
jmp 0x16e9
pushq $0x1
popq %rdx
xorl %r8d, %r8d
movss 0x157c(%rip), %xmm0     # 0x3088
movl $0x3e8, 0x58(%rsp)      # imm = 0x3E8
movsd 0x155c(%rip), %xmm3     # 0x3078
pushq $0x5e
popq %rcx
movb $0x1, 0xf(%rsp)
movss 0x1560(%rip), %xmm7     # 0x308c
movss 0x155c(%rip), %xmm6     # 0x3090
movss 0x1558(%rip), %xmm5     # 0x3094
movss 0x1554(%rip), %xmm1     # 0x3098
movsd 0x14cc(%rip), %xmm2     # 0x3018
movss 0x1548(%rip), %xmm4     # 0x309c
movl %edx, %esi
jmp 0x1bb6
movq 0x8(%rbx,%rax,8), %rdx
leaq 0x185d(%rip), %rdi      # 0x33c1
xorl %ebp, %ebp
xorl %eax, %eax
callq 0x1070
movq (%rbx), %rsi
leaq 0x17ed(%rip), %rdi      # 0x3364
xorl %eax, %eax
callq 0x1070
leaq 0x1cf3(%rip), %rdi      # 0x3878
callq 0x1040
jmp 0x2a1a
cvtss2sd 0x38(%rsp), %xmm2
cvtss2sd 0x48(%rsp), %xmm3
movsbl %r12b, %ecx
cmpl $0x0, 0x28(%rsp)
sete 0xf(%rsp)
movl 0x54(%rsp), %edx
movl 0x50(%rsp), %esi
movl 0x40(%rsp), %r8d
movss %xmm0, 0x18(%rsp)
cvtss2sd %xmm0, %xmm0
movss %xmm1, 0x20(%rsp)
cvtss2sd %xmm1, %xmm1
movss %xmm4, 0x1c(%rsp)
cvtss2sd %xmm4, %xmm4
movss %xmm5, 0x24(%rsp)
cvtss2sd %xmm5, %xmm5
movss %xmm6, 0x10(%rsp)
cvtss2sd %xmm6, %xmm6
movss %xmm7, 0x14(%rsp)
cvtss2sd %xmm7, %xmm7
leaq 0x17fd(%rip), %rdi      # 0x33f6
movl %esi, 0x50(%rsp)
movl %edx, 0x54(%rsp)
movsd %xmm2, 0xc8(%rsp)
movsd %xmm3, 0x48(%rsp)
movl %ecx, 0x74(%rsp)
movl %r8d, 0x40(%rsp)
movb $0x8, %al
callq 0x1070
movl %r15d, %r14d
movq -0x10(%rbx,%r14,8), %rsi
leaq 0x1849(%rip), %rdi      # 0x3478
xorl %eax, %eax
callq 0x1070
movq -0x8(%rbx,%r14,8), %rsi
leaq 0x1846(%rip), %rdi      # 0x3488
xorl %eax, %eax
callq 0x1070
movq -0x10(%rbx,%r14,8), %rdi
leaq 0x1844(%rip), %rsi      # 0x3499
callq 0x1120
movq %rax, %r12
pushq $0x1
popq %r13
pushq $0x70
popq %rsi
movq %r13, %rdi
callq 0x10b0
movq %rax, %r15
pushq $0x20
popq %rsi
movq %r13, %rdi
callq 0x10b0
movq %rax, %rbp
movq %r12, 0x18(%rax)
movl $0x4000, %edi           # imm = 0x4000
callq 0x1100
movq %rax, (%rbp)
movq %rbp, 0x68(%r15)
leaq 0x1887(%rip), %rdi      # 0x3521
callq 0x1040
xorps %xmm0, %xmm0
movaps %xmm0, 0x140(%rsp)
movaps %xmm0, 0x190(%rsp)
movaps %xmm0, 0x180(%rsp)
movaps %xmm0, 0x170(%rsp)
movaps %xmm0, 0x160(%rsp)
andl $0x0, 0x1a0(%rsp)
movaps %xmm0, 0x150(%rsp)
movl $0x74726170, %eax       # imm = 0x74726170
movl %eax, 0x140(%rsp)
movw $0x5f31, 0x144(%rsp)    # imm = 0x5F31
movaps %xmm0, 0xd0(%rsp)
movaps %xmm0, 0x120(%rsp)
movaps %xmm0, 0x110(%rsp)
movaps %xmm0, 0x100(%rsp)
movaps %xmm0, 0xf0(%rsp)
andl $0x0, 0x130(%rsp)
movaps %xmm0, 0xe0(%rsp)
movl %eax, 0xd0(%rsp)
movw $0x5f32, 0xd4(%rsp)     # imm = 0x5F32
leaq 0x15c0(%rip), %rsi      # 0x3300
pushq $0x64
popq %rcx
leaq 0x1b0(%rsp), %rdi
rep  movsb (%rsi), %es:(%rdi)
movq -0x8(%rbx,%r14,8), %rbx
movb 0xf(%rsp), %r14b
testb %r14b, %r14b
je 0x1d75
leaq 0x1738(%rip), %rsi      # 0x349b
movq %rbx, %rdi
callq 0x1130
movq %rax, %r13
movq %rax, 0x28(%rsp)
jmp 0x1de8
leaq 0x140(%rsp), %r12
movq %r12, %rdi
movq %rbx, %rsi
callq 0x1150
leaq 0xd0(%rsp), %r13
movq %r13, %rdi
movq %rbx, %rsi
callq 0x1150
leaq 0x1b0(%rsp), %rdi
movq %rbx, %rsi
callq 0x1150
leaq 0x16e9(%rip), %rbx      # 0x349b
movq %r12, %rdi
movq %rbx, %rsi
callq 0x1130
movq %rax, 0x28(%rsp)
movq %r13, %rdi
movq %rbx, %rsi
callq 0x1130
movq %rax, %r13
leaq 0x1b0(%rsp), %rdi
movq %rbx, %rsi
callq 0x1130
movq %rax, 0xb0(%rsp)
xorl %ebx, %ebx
xorl %edi, %edi
callq 0x10f0
movl %eax, %edi
callq 0x10a0
leaq 0x48(%r15), %rax
movq %rax, 0xc0(%rsp)
leaq 0x30(%r15), %rax
movq %rax, 0xa8(%rsp)
movq %r15, %rax
addq $0x18, %rax
movq %rax, 0xb8(%rsp)
movslq 0x40(%rsp), %rax
movq %rax, 0x40(%rsp)
movl 0x58(%rsp), %eax
testl %eax, %eax
cmovlel %ebx, %eax
movl %eax, 0x58(%rsp)
xorl %eax, %eax
movq %rcx, 0x90(%rsp)
movq %r15, 0x38(%rsp)
testl %eax, %eax
jne 0x1e6c
movq %rbp, %rdi
callq 0x2a2e
cmpl $-0x1, %eax
je 0x29f4
cmpl $0x40, %eax
je 0x1e64
cmpl $0x3e, %eax
jne 0x1e49
movl %eax, 0x5c(%rsp)
movl %eax, 0x60(%r15)
andq $0x0, 0x48(%r15)
andq $0x0, 0x30(%r15)
andq $0x0, 0x18(%r15)
movq %rbp, %rdi
xorl %esi, %esi
movq %r15, %rdx
leaq 0x5c(%rsp), %rcx
callq 0x2a9b
testl %eax, %eax
js 0x29f4
cmpl $0xa, 0x5c(%rsp)
je 0x1eb1
movq %rbp, %rdi
pushq $0x2
popq %rsi
movq 0xb8(%rsp), %rdx
xorl %ecx, %ecx
callq 0x2a9b
cmpq $0x0, 0x40(%r15)
jne 0x1ece
movq $0x100, 0x38(%r15)      # imm = 0x100
movl $0x100, %edi            # imm = 0x100
callq 0x1100
movq %rax, 0x40(%r15)
movq %rbp, %rdi
callq 0x2a2e
movl %eax, 0x5c(%rsp)
cmpl $0xa, %eax
je 0x1ece
cmpl $-0x1, %eax
je 0x1f25
cmpl $0x2b, %eax
je 0x1f25
cmpl $0x3e, %eax
je 0x1f21
cmpl $0x40, %eax
je 0x1f21
movq 0x30(%r15), %rcx
movq 0x40(%r15), %rdx
leaq 0x1(%rcx), %rsi
movq %rsi, 0x30(%r15)
movb %al, (%rdx,%rcx)
movq %rbp, %rdi
pushq $0x2
popq %rsi
movq 0xa8(%rsp), %rdx
xorl %ecx, %ecx
pushq $0x1
popq %r8
callq 0x2aa0
jmp 0x1ece
movl %eax, 0x60(%r15)
movq 0x30(%r15), %rbx
movq 0x38(%r15), %rdx
leaq 0x1(%rbx), %rcx
movq 0x40(%r15), %rax
cmpq %rdx, %rcx
jae 0x1f41
movq %rdx, 0x68(%rsp)
jmp 0x1f8a
movq %rcx, %rdx
shrq %rdx
orq %rcx, %rdx
movq %rdx, %rcx
shrq $0x2, %rcx
orq %rdx, %rcx
movq %rcx, %rdx
shrq $0x4, %rdx
orq %rcx, %rdx
movq %rdx, %rcx
shrq $0x8, %rcx
orq %rdx, %rcx
movq %rcx, %rsi
shrq $0x10, %rsi
orq %rcx, %rsi
incq %rsi
movq %rsi, 0x38(%r15)
movq %rax, %rdi
movq %rsi, 0x68(%rsp)
callq 0x1110
movq %rax, 0x40(%r15)
movb $0x0, (%rax,%rbx)
cmpl $0x2b, 0x5c(%rsp)
jne 0x200f
movq 0x68(%rsp), %rsi
cmpq %rsi, 0x50(%r15)
jae 0x1fb1
movq %rsi, 0x50(%r15)
movq 0x58(%r15), %rdi
callq 0x1110
movq %rax, 0x58(%r15)
movq %rbp, %rdi
callq 0x2a2e
movl %eax, 0x5c(%rsp)
cmpl $-0x1, %eax
je 0x29f4
cmpl $0xa, %eax
jne 0x1fb1
movq %rbp, %rdi
pushq $0x2
popq %rsi
movq 0xc0(%rsp), %rbx
movq %rbx, %rdx
xorl %ecx, %ecx
pushq $0x1
popq %r8
callq 0x2aa0
movq 0xa8(%rsp), %rcx
movq (%rcx), %rdx
movq (%rbx), %rcx
movq %rdx, %rbx
testl %eax, %eax
js 0x2001
cmpq %rbx, %rcx
jb 0x1fcb
andl $0x0, 0x60(%r15)
cmpq %rcx, %rbx
jne 0x29f4
testl %ebx, %ebx
js 0x29f4
movq 0x10(%r15), %rsi
leaq 0x147b(%rip), %rdi      # 0x349d
xorl %eax, %eax
callq 0x1070
cmpq $0x0, 0x18(%r15)
je 0x2042
movq 0x28(%r15), %rsi
leaq 0x1485(%rip), %rdi      # 0x34c0
xorl %eax, %eax
callq 0x1070
leaq 0x1484(%rip), %rdi      # 0x34cd
movl %ebx, %esi
xorl %eax, %eax
callq 0x1070
movl %ebx, %ebp
andl $0x7fffffff, %ebp       # imm = 0x7FFFFFFF
movq %rbp, %rdi
pushq $0x4
popq %rsi
callq 0x10b0
movq %rax, %rdi
xorl %eax, %eax
cmpq %rax, %rbp
je 0x2078
andl $0x0, (%rdi,%rax,4)
incq %rax
jmp 0x206a
cvtsi2ss %ebx, %xmm0
movss %xmm0, 0x7c(%rsp)
xorl %eax, %eax
movq %rbx, 0x88(%rsp)
movq %rbp, 0x80(%rsp)
movq %rdi, 0x98(%rsp)
cmpl 0x58(%rsp), %eax
je 0x29b5
movl %eax, 0x68(%rsp)
callq 0x1180
cvtsi2sd %eax, %xmm0
mulsd 0xf4d(%rip), %xmm0      # 0x3008
movsd 0xc8(%rsp), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x21c0
cmpl $0x1, 0x50(%rsp)
jne 0x20f9
movss 0x18(%rsp), %xmm0
movss 0x1c(%rsp), %xmm1
movss 0xfb3(%rip), %xmm2      # 0x309c
movss 0x7c(%rsp), %xmm3
callq 0x1584
cvttsd2si %xmm0, %r12d
callq 0x1180
cvtsi2sd %eax, %xmm2
mulsd 0xefe(%rip), %xmm2      # 0x3008
cmpl $0x1, 0x54(%rsp)
jne 0x2174
cvtsi2ss %r12d, %xmm3
movss %xmm3, 0x30(%rsp)
movss 0x10(%rsp), %xmm0
movsd %xmm2, 0x60(%rsp)
movss 0x14(%rsp), %xmm1
movss 0xf66(%rip), %xmm2      # 0x309c
callq 0x1584
cvttsd2si %xmm0, %eax
movq %rax, 0x90(%rsp)
movss 0x10(%rsp), %xmm0
movss 0x14(%rsp), %xmm1
movss 0xf41(%rip), %xmm2      # 0x309c
movss 0x30(%rsp), %xmm3
callq 0x1584
movsd 0x60(%rsp), %xmm2
cvttsd2si %xmm0, %eax
movl %eax, 0x78(%rsp)
movl %ebx, %eax
subl %r12d, %eax
cvtsi2sd %eax, %xmm0
mulsd %xmm0, %xmm2
cvttsd2si %xmm2, %ecx
movq %rcx, 0x30(%rsp)
movslq %ecx, %rbx
movq 0x90(%rsp), %rax
testl %eax, %eax
movl $0x0, %r15d
cmovgl %eax, %r15d
movq 0x98(%rsp), %rdx
leaq (%rdx,%rbx,4), %rax
xorl %ecx, %ecx
cmpq %rcx, %r15
je 0x22af
incl (%rax,%rcx,4)
incq %rcx
jmp 0x21af
cmpl $0x1, 0x50(%rsp)
jne 0x21eb
movss 0x20(%rsp), %xmm0
movss 0x24(%rsp), %xmm1
movss 0xec1(%rip), %xmm2      # 0x309c
movss 0x7c(%rsp), %xmm3
callq 0x1584
cvttsd2si %xmm0, %r12d
callq 0x1180
cvtsi2sd %eax, %xmm2
mulsd 0xe0c(%rip), %xmm2      # 0x3008
cmpl $0x1, 0x54(%rsp)
jne 0x2266
cvtsi2ss %r12d, %xmm3
movss %xmm3, 0x30(%rsp)
movss 0x10(%rsp), %xmm0
movsd %xmm2, 0x60(%rsp)
movss 0x14(%rsp), %xmm1
movss 0xe74(%rip), %xmm2      # 0x309c
callq 0x1584
cvttsd2si %xmm0, %eax
movq %rax, 0x90(%rsp)
movss 0x10(%rsp), %xmm0
movss 0x14(%rsp), %xmm1
movss 0xe4f(%rip), %xmm2      # 0x309c
movss 0x30(%rsp), %xmm3
callq 0x1584
movsd 0x60(%rsp), %xmm2
cvttsd2si %xmm0, %eax
movl %eax, 0x78(%rsp)
movl %ebx, %eax
subl %r12d, %eax
cvtsi2sd %eax, %xmm0
mulsd %xmm0, %xmm2
cvttsd2si %xmm2, %ecx
movq 0x90(%rsp), %rax
movq %rcx, 0x30(%rsp)
leal (%rax,%rcx), %r14d
testl %eax, %eax
movl $0x0, %ebp
cmovgl %eax, %ebp
movl %r14d, %eax
movq %rbp, %rcx
movq 0x98(%rsp), %rsi
subq $0x1, %rcx
jb 0x22df
cltq
incl (%rsi,%rax,4)
decl %eax
jmp 0x22a0
movl 0x78(%rsp), %eax
testl %eax, %eax
movl $0x0, %ebp
cmovgl %eax, %ebp
movq 0x30(%rsp), %rax
leal (%r12,%rax), %r14d
decl %r14d
movq %rbp, %rax
movl %r14d, %ecx
subq $0x1, %rax
jb 0x2317
movslq %ecx, %rcx
incl (%rdx,%rcx,4)
decl %ecx
jmp 0x22cf
movq 0x30(%rsp), %rax
addl %r12d, %eax
movl 0x78(%rsp), %edx
movl %edx, %ecx
notl %ecx
addl %eax, %ecx
movslq %ecx, %rbx
testl %edx, %edx
movl $0x0, %r15d
cmovgl %edx, %r15d
leaq (%rsi,%rbx,4), %rax
xorl %ecx, %ecx
cmpq %rcx, %r15
je 0x23b5
incl (%rax,%rcx,4)
incq %rcx
jmp 0x2306
callq 0x1180
cvtsi2sd %eax, %xmm0
mulsd 0xce0(%rip), %xmm0      # 0x3008
movsd %xmm0, 0xa0(%rsp)
movq 0x28(%rsp), %rdi
leaq 0x119c(%rip), %rsi      # 0x34d9
movl 0x68(%rsp), %edx
movq 0x30(%rsp), %rcx
movq %r12, 0x60(%rsp)
movl %r12d, %r8d
xorl %eax, %eax
callq 0x10d0
movsd 0xcbb(%rip), %xmm0      # 0x3018
ucomisd 0xa0(%rsp), %xmm0
jbe 0x249a
xorl %r12d, %r12d
cmpq %r12, %r15
je 0x252a
movsd 0xd00(%rip), %xmm0      # 0x3080
cmpq 0x40(%rsp), %r12
jl 0x238d
movsd 0x48(%rsp), %xmm0
movq 0x38(%rsp), %rax
movq 0x40(%rax), %rax
addq %rbx, %rax
movsbl (%r12,%rax), %edi
callq 0x12bb
movsbl %al, %edi
movq 0x28(%rsp), %rsi
callq 0x1090
incq %r12
jmp 0x236f
callq 0x1180
cvtsi2sd %eax, %xmm0
mulsd 0xc42(%rip), %xmm0      # 0x3008
movsd %xmm0, 0xa0(%rsp)
movq 0x28(%rsp), %rdi
leaq 0x111a(%rip), %rsi      # 0x34f5
movl 0x68(%rsp), %edx
movq 0x30(%rsp), %rcx
movq %r12, 0x60(%rsp)
movl %r12d, %r8d
xorl %eax, %eax
callq 0x10d0
movsd 0xc1d(%rip), %xmm0      # 0x3018
ucomisd 0xa0(%rsp), %xmm0
jbe 0x255f
xorl %r12d, %r12d
cmpq %r12, %rbp
movsd 0x48(%rsp), %xmm0
je 0x25a8
movq 0x38(%rsp), %rax
movq 0x40(%rax), %rax
movslq %r14d, %rcx
movzbl (%rax,%rcx), %eax
cmpq 0x40(%rsp), %r12
jge 0x2446
cmpl $0x41, %eax
je 0x2461
cmpl $0x47, %eax
je 0x2459
cmpl $0x54, %eax
jne 0x2469
movb $0x41, %al
jmp 0x246b
cmpl $0x41, %eax
je 0x2465
cmpl $0x47, %eax
je 0x245d
cmpl $0x54, %eax
jne 0x2478
movb $0x41, %al
jmp 0x247a
movb $0x43, %al
jmp 0x246b
movb $0x43, %al
jmp 0x247a
movb $0x54, %al
jmp 0x246b
movb $0x54, %al
jmp 0x247a
movb $0x47, %al
movzbl %al, %edi
movsd 0xc0a(%rip), %xmm0      # 0x3080
jmp 0x247d
movb $0x47, %al
movzbl %al, %edi
callq 0x12bb
movsbl %al, %edi
movq 0x28(%rsp), %rsi
callq 0x1090
incq %r12
decl %r14d
jmp 0x240d
xorl %r12d, %r12d
cmpq %r12, %rbp
movsd 0x48(%rsp), %xmm0
je 0x25dc
movq 0x38(%rsp), %rax
movq 0x40(%rax), %rax
movslq %r14d, %rcx
movzbl (%rax,%rcx), %eax
cmpq 0x40(%rsp), %r12
jge 0x24d6
cmpl $0x41, %eax
je 0x24f1
cmpl $0x47, %eax
je 0x24e9
cmpl $0x54, %eax
jne 0x24f9
movb $0x41, %al
jmp 0x24fb
cmpl $0x41, %eax
je 0x24f5
cmpl $0x47, %eax
je 0x24ed
cmpl $0x54, %eax
jne 0x2508
movb $0x41, %al
jmp 0x250a
movb $0x43, %al
jmp 0x24fb
movb $0x43, %al
jmp 0x250a
movb $0x54, %al
jmp 0x24fb
movb $0x54, %al
jmp 0x250a
movb $0x47, %al
movzbl %al, %edi
movsd 0xb7a(%rip), %xmm0      # 0x3080
jmp 0x250d
movb $0x47, %al
movzbl %al, %edi
callq 0x12bb
movsbl %al, %edi
movq 0x28(%rsp), %rsi
callq 0x1090
incq %r12
decl %r14d
jmp 0x249d
leaq 0xfc0(%rip), %rdi       # 0x34f1
pushq $0x3
popq %rsi
pushq $0x1
popq %rdx
movq 0x28(%rsp), %rcx
callq 0x1160
movl 0x74(%rsp), %r12d
subl $0x1, %r15d
jb 0x2610
movl %r12d, %edi
movq 0x28(%rsp), %rsi
callq 0x1090
jmp 0x2546
xorl %r12d, %r12d
cmpq %r12, %r15
je 0x26c9
movsd 0xb0d(%rip), %xmm0      # 0x3080
cmpq 0x40(%rsp), %r12
jl 0x2580
movsd 0x48(%rsp), %xmm0
movq 0x38(%rsp), %rax
movq 0x40(%rax), %rax
addq %rbx, %rax
movsbl (%r12,%rax), %edi
callq 0x12bb
movsbl %al, %edi
movq 0x28(%rsp), %rsi
callq 0x1090
incq %r12
jmp 0x2562
leaq 0xf42(%rip), %rdi       # 0x34f1
pushq $0x3
popq %rsi
pushq $0x1
popq %rdx
movq 0x28(%rsp), %rcx
callq 0x1160
movl 0x74(%rsp), %r12d
subl $0x1, %ebp
jb 0x26fe
movl %r12d, %edi
movq 0x28(%rsp), %rsi
callq 0x1090
jmp 0x25c4
leaq 0xf0e(%rip), %rdi       # 0x34f1
pushq $0x3
popq %rsi
pushq $0x1
popq %rdx
movq 0x28(%rsp), %rcx
callq 0x1160
movl 0x74(%rsp), %r12d
subl $0x1, %ebp
jb 0x2779
movl %r12d, %edi
movq 0x28(%rsp), %rsi
callq 0x1090
jmp 0x25f8
pushq $0xa
popq %rdi
movq 0x28(%rsp), %rsi
callq 0x1090
movq %r13, %rdi
leaq 0xeb2(%rip), %rsi       # 0x34d9
movl 0x68(%rsp), %edx
movq 0x30(%rsp), %rcx
movq 0x60(%rsp), %r8
xorl %eax, %eax
callq 0x10d0
xorl %ebx, %ebx
movq 0x38(%rsp), %r15
cmpq %rbx, %rbp
movsd 0x48(%rsp), %xmm0
je 0x27f4
movq 0x40(%r15), %rax
movslq %r14d, %rcx
movzbl (%rax,%rcx), %eax
cmpq 0x40(%rsp), %rbx
jge 0x2677
cmpl $0x41, %eax
je 0x2692
cmpl $0x47, %eax
je 0x268a
cmpl $0x54, %eax
jne 0x269a
movb $0x41, %al
jmp 0x269c
cmpl $0x41, %eax
je 0x2696
cmpl $0x47, %eax
je 0x268e
cmpl $0x54, %eax
jne 0x26a9
movb $0x41, %al
jmp 0x26ab
movb $0x43, %al
jmp 0x269c
movb $0x43, %al
jmp 0x26ab
movb $0x54, %al
jmp 0x269c
movb $0x54, %al
jmp 0x26ab
movb $0x47, %al
movzbl %al, %edi
movsd 0x9d9(%rip), %xmm0      # 0x3080
jmp 0x26ae
movb $0x47, %al
movzbl %al, %edi
callq 0x12bb
movsbl %al, %edi
movq %r13, %rsi
callq 0x1090
incq %rbx
decl %r14d
jmp 0x2643
leaq 0xe21(%rip), %rdi       # 0x34f1
pushq $0x3
popq %rsi
pushq $0x1
popq %rdx
movq 0x28(%rsp), %rcx
callq 0x1160
movl 0x74(%rsp), %r12d
subl $0x1, %r15d
jb 0x282c
movl %r12d, %edi
movq 0x28(%rsp), %rsi
callq 0x1090
jmp 0x26e5
pushq $0xa
popq %rdi
movq 0x28(%rsp), %rsi
callq 0x1090
movq %r13, %rdi
leaq 0xde0(%rip), %rsi       # 0x34f5
movl 0x68(%rsp), %edx
movq 0x30(%rsp), %rcx
movq 0x60(%rsp), %r8
xorl %eax, %eax
callq 0x10d0
xorl %r14d, %r14d
movq 0x80(%rsp), %rbp
cmpq %r14, %r15
je 0x28e5
movsd 0x93a(%rip), %xmm0      # 0x3080
cmpq 0x40(%rsp), %r14
jl 0x2753
movsd 0x48(%rsp), %xmm0
movq 0x38(%rsp), %rax
movq 0x40(%rax), %rax
addq %rbx, %rax
movsbl (%r14,%rax), %edi
callq 0x12bb
movsbl %al, %edi
movq %r13, %rsi
callq 0x1090
incq %r14
jmp 0x2735
pushq $0xa
popq %rdi
movq 0x28(%rsp), %rsi
callq 0x1090
movq %r13, %rdi
leaq 0xd49(%rip), %rsi       # 0x34d9
movl 0x68(%rsp), %edx
movq 0x30(%rsp), %rcx
movq 0x60(%rsp), %r8
xorl %eax, %eax
callq 0x10d0
xorl %r14d, %r14d
movq 0x80(%rsp), %rbp
cmpq %r14, %r15
je 0x291a
movsd 0x8bf(%rip), %xmm0      # 0x3080
cmpq 0x40(%rsp), %r14
jl 0x27ce
movsd 0x48(%rsp), %xmm0
movq 0x38(%rsp), %rax
movq 0x40(%rax), %rax
addq %rbx, %rax
movsbl (%r14,%rax), %edi
callq 0x12bb
movsbl %al, %edi
movq %r13, %rsi
callq 0x1090
incq %r14
jmp 0x27b0
leaq 0xcf6(%rip), %rdi       # 0x34f1
pushq $0x3
popq %rsi
pushq $0x1
popq %rdx
movq %r13, %rcx
callq 0x1160
movb 0xf(%rsp), %r14b
movq 0x88(%rsp), %rbx
subl $0x1, %ebp
jb 0x298a
movl %r12d, %edi
movq %r13, %rsi
callq 0x1090
jmp 0x2816
pushq $0xa
popq %rdi
movq 0x28(%rsp), %rsi
callq 0x1090
movq %r13, %rdi
leaq 0xcc8(%rip), %rsi       # 0x350b
movl 0x68(%rsp), %edx
movq 0x30(%rsp), %rcx
movq 0x60(%rsp), %r8
xorl %eax, %eax
callq 0x10d0
xorl %ebx, %ebx
movq 0x38(%rsp), %r15
cmpq %rbx, %rbp
movsd 0x48(%rsp), %xmm0
je 0x2956
movq 0x40(%r15), %rax
movslq %r14d, %rcx
movzbl (%rax,%rcx), %eax
cmpq 0x40(%rsp), %rbx
jge 0x2893
cmpl $0x41, %eax
je 0x28ae
cmpl $0x47, %eax
je 0x28a6
cmpl $0x54, %eax
jne 0x28b6
movb $0x41, %al
jmp 0x28b8
cmpl $0x41, %eax
je 0x28b2
cmpl $0x47, %eax
je 0x28aa
cmpl $0x54, %eax
jne 0x28c5
movb $0x41, %al
jmp 0x28c7
movb $0x43, %al
jmp 0x28b8
movb $0x43, %al
jmp 0x28c7
movb $0x54, %al
jmp 0x28b8
movb $0x54, %al
jmp 0x28c7
movb $0x47, %al
movzbl %al, %edi
movsd 0x7bd(%rip), %xmm0      # 0x3080
jmp 0x28ca
movb $0x47, %al
movzbl %al, %edi
callq 0x12bb
movsbl %al, %edi
movq %r13, %rsi
callq 0x1090
incq %rbx
decl %r14d
jmp 0x285f
leaq 0xc05(%rip), %rdi       # 0x34f1
pushq $0x3
popq %rsi
pushq $0x1
popq %rdx
movq %r13, %rcx
callq 0x1160
movb 0xf(%rsp), %r14b
movq 0x88(%rsp), %rbx
subl $0x1, %r15d
jb 0x294f
movl %r12d, %edi
movq %r13, %rsi
callq 0x1090
jmp 0x2907
leaq 0xbd0(%rip), %rdi       # 0x34f1
pushq $0x3
popq %rsi
pushq $0x1
popq %rdx
movq %r13, %rcx
callq 0x1160
movb 0xf(%rsp), %r14b
movq 0x88(%rsp), %rbx
subl $0x1, %r15d
jb 0x294f
movl %r12d, %edi
movq %r13, %rsi
callq 0x1090
jmp 0x293c
movq 0x38(%rsp), %r15
jmp 0x2992
leaq 0xb94(%rip), %rdi       # 0x34f1
pushq $0x3
popq %rsi
pushq $0x1
popq %rdx
movq %r13, %rcx
callq 0x1160
movb 0xf(%rsp), %r14b
movq 0x88(%rsp), %rbx
subl $0x1, %ebp
jb 0x298a
movl %r12d, %edi
movq %r13, %rsi
callq 0x1090
jmp 0x2978
movq 0x80(%rsp), %rbp
pushq $0xa
popq %rdi
movq %r13, %rsi
callq 0x1090
movl 0x68(%rsp), %eax
incl %eax
movq 0x60(%rsp), %r12
movq 0x98(%rsp), %rdi
jmp 0x209c
xorl %ebx, %ebx
cmpq %rbx, %rbp
je 0x29e2
movl (%rdi,%rbx,4), %edx
movq 0xb0(%rsp), %rdi
leaq 0xb07(%rip), %rsi       # 0x34d5
xorl %eax, %eax
callq 0x10d0
movq 0x98(%rsp), %rdi
incq %rbx
jmp 0x29b7
callq 0x1030
movq 0x68(%r15), %rbp
movl 0x60(%r15), %eax
jmp 0x1e45
movq 0x28(%rsp), %rdi
callq 0x1060
testb %r14b, %r14b
jne 0x2a18
movq %r13, %rdi
callq 0x1060
movq 0xb0(%rsp), %rdi
callq 0x1060
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x218, %rsp            # imm = 0x218
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq