// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3MeshPropertySet.cpp
// Function: gaps::R3MeshPropertySet::ReadNumpy(char const*)
int R3MeshPropertySet::
ReadNumpy(const char *filename)
{
  // Open file
  FILE *fp = fopen(filename, "rb");
  if (!fp) {
    fprintf(stderr, "Unable to open npy file %s\n", filename);
    return 0;
  }
  
  // Read magic string
  unsigned char magic[6];
  if (fread(magic, sizeof(unsigned char), 6, fp) != (unsigned int) 6) {
    fprintf(stderr, "Unable to read first character from npy file\n");
    fclose(fp);
    return 0;
  }

  // Check magic string
  if ((magic[0] != 0x93) || (magic[1] != 'N') || (magic[2] != 'U') ||
      (magic[3] != 'M')  || (magic[4] != 'P') || (magic[5] != 'Y')) {
    fprintf(stderr, "Unrecognized format in npy file\n");
    fclose(fp);
    return 0;
  }

  // Read version info
  unsigned char version[2];
  if (fread(version, sizeof(unsigned char), 2, fp) != (unsigned int) 2) {
    fprintf(stderr, "Unable to read version in npy file\n");
    fclose(fp);
    return 0;
  }
  
  // Read header length
  unsigned short int header_length;
  if (fread(&header_length, sizeof(unsigned short), 1, fp) != (unsigned int) 1) {
    fprintf(stderr, "Unable to read header length in npy file\n");
    fclose(fp);
    return 0;
  }

  // Check header length
  if (header_length <= 0) {
    fprintf(stderr, "Invalid header length in npy file\n");
    fclose(fp);
    return 0;
  }

  // Read header
  char *header = new char [ header_length + 1 ];
  if (fread(header, sizeof(char), header_length, fp) != (unsigned int) header_length) {
    fprintf(stderr, "Unable to read header in npy file\n");
    delete [] header;
    fclose(fp);
    return 0;
  }
  header[header_length] = '\0';

  // Extract data type and size
  int data_type = 0;
  int data_size = 0;
  char *start = strstr(header, "'descr'");
  if (start) {
    start = strchr(start, '<');
    if (start) {
      start++;
      while (*start == ' ') start++;
      data_type = *start;
      start++;
      char *end = strchr(start, '\'');
      if (end && (start < end)) {
        *end = '\0';
        data_size = atoi(start);
        *end = '\'';
      }
    }
  }

  // Extract fortrain order
  int fortran_order = 0;
  start = strstr(header, "'fortran_order'");
  if (start) {
    start = strchr(start, ':');
    if (start) {
      start++;
      while (*start == ' ') start++;
      char *end = strchr(start, ',');
      if (end && (start < end)) {
        *end = '\0';
        if (!strcmp(start, "True")) fortran_order = 1;
        if (!strcmp(start, "true")) fortran_order = 1;
        *end = ',';
      }
    }
  }

  // Extract width
  int width = 1;
  start = strstr(header, "'shape'");
  if (start) {
    start = strchr(start, '(');
    if (start) {
      start++;
      while (*start == ' ') start++;
      char *end = strchr(start, ',');
      if (end && (start < end)) {
        *end = '\0';
        width = atoi(start);
        *end = ',';
      }
    }
  }

  // Extract height
  int height = 1;
  start = strstr(header, "'shape'");
  if (start) {
    start = strchr(start, ',');
    if (start) {
      start++;
      while (*start == ' ') start++;
      char *end1 = strchr(start, ',');
      char *end2 = strchr(start, ')');
      char *end = (end1 < end2) ? end1 : end2;
      if (end && (start < end)) {
        *end = '\0';
        height = atoi(start);
        *end = ')';
      }
    }
  }

  // Delete header
  delete [] header;

  // Read values
  unsigned int nbytes = width * height * NumpyDataTypeSize(data_type, data_size);
  unsigned char *array = new unsigned char [ nbytes ];
  unsigned int read_nbytes = 0;
  while (read_nbytes < nbytes) {
    size_t k = fread(&array[read_nbytes], sizeof(unsigned char), nbytes - read_nbytes, fp);
    if (k <= 0) {
      fprintf(stderr, "Unable to read array in npy file (%lu %u %u)\n", k, read_nbytes, nbytes);
      if (k < 0) {
        delete [] array;
        fclose(fp);
        return 0;
      }
    }
    read_nbytes += k;
  }

  // Close file
  fclose(fp);

  // Create properties
  for (int j = 0; j < height; j++) {
    char property_name[128];
    sprintf(property_name, "P%d", j);
    Insert(new R3MeshProperty(mesh, property_name));
  }

  // Fill property values
  unsigned char *arrayp = array;
  if (fortran_order) {
    // Fortran order
    for (int j = 0; j < height; j++) {
      for (int i = 0; i < width; i++) {
        if (data_size == 4) {
          float *a = (float *) arrayp;
          Property(j)->SetVertexValue(i, (float) *a);
          arrayp += 4;
        }
        else if (data_size == 8) {
          double *a = (double *) arrayp;
          Property(j)->SetVertexValue(i, (float) *a);
          arrayp += 8;
        }
      }
    }
  }
  else {
    // C order
    for (int i = 0; i < width; i++) {
      for (int j = 0; j < height; j++) {
        if (data_size == 4) {
          float *a = (float *) arrayp;
          Property(j)->SetVertexValue(i, (float) *a);
          arrayp += 4;
        }
        else if (data_size == 8) {
          double *a = (double *) arrayp;
          Property(j)->SetVertexValue(i, (float) *a);
          arrayp += 8;
        }
      }
    }
  }

  // Delete array
  delete [] array;
  
  // Return success
  return 1;
}

// Assembly:
subq $0x1d8, %rsp            # imm = 0x1D8
movq %rdi, 0x1c8(%rsp)
movq %rsi, 0x1c0(%rsp)
movq 0x1c8(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x1c0(%rsp), %rdi
leaq 0x12c736(%rip), %rsi    # 0x196449
callq 0x22bf0
movq %rax, 0x1b8(%rsp)
cmpq $0x0, 0x1b8(%rsp)
jne 0x69d5b
movq 0x194296(%rip), %rax    # 0x1fdfc8
movq (%rax), %rdi
movq 0x1c0(%rsp), %rdx
leaq 0x12e293(%rip), %rsi    # 0x197fd7
movb $0x0, %al
callq 0x22f10
movl $0x0, 0x1d4(%rsp)
jmp 0x6a93e
leaq 0x1b2(%rsp), %rdi
movq 0x1b8(%rsp), %rcx
movl $0x1, %esi
movl $0x6, %edx
callq 0x22fd0
cmpq $0x6, %rax
je 0x69db5
movq 0x194241(%rip), %rax    # 0x1fdfc8
movq (%rax), %rdi
leaq 0x12e262(%rip), %rsi    # 0x197ff3
movb $0x0, %al
callq 0x22f10
movq 0x1b8(%rsp), %rdi
callq 0x229c0
movl $0x0, 0x1d4(%rsp)
jmp 0x6a93e
movzbl 0x1b2(%rsp), %eax
cmpl $0x93, %eax
jne 0x69e05
movzbl 0x1b3(%rsp), %eax
cmpl $0x4e, %eax
jne 0x69e05
movzbl 0x1b4(%rsp), %eax
cmpl $0x55, %eax
jne 0x69e05
movzbl 0x1b5(%rsp), %eax
cmpl $0x4d, %eax
jne 0x69e05
movzbl 0x1b6(%rsp), %eax
cmpl $0x50, %eax
jne 0x69e05
movzbl 0x1b7(%rsp), %eax
cmpl $0x59, %eax
je 0x69e3a
movq 0x1941bc(%rip), %rax    # 0x1fdfc8
movq (%rax), %rdi
leaq 0x12e20b(%rip), %rsi    # 0x198021
movb $0x0, %al
callq 0x22f10
movq 0x1b8(%rsp), %rdi
callq 0x229c0
movl $0x0, 0x1d4(%rsp)
jmp 0x6a93e
leaq 0x1b0(%rsp), %rdi
movq 0x1b8(%rsp), %rcx
movl $0x1, %esi
movl $0x2, %edx
callq 0x22fd0
cmpq $0x2, %rax
je 0x69e94
movq 0x194162(%rip), %rax    # 0x1fdfc8
movq (%rax), %rdi
leaq 0x12e1d2(%rip), %rsi    # 0x198042
movb $0x0, %al
callq 0x22f10
movq 0x1b8(%rsp), %rdi
callq 0x229c0
movl $0x0, 0x1d4(%rsp)
jmp 0x6a93e
movq 0x1b8(%rsp), %rcx
leaq 0x1ae(%rsp), %rdi
movl $0x2, %esi
movl $0x1, %edx
callq 0x22fd0
cmpq $0x1, %rax
je 0x69eee
movq 0x194108(%rip), %rax    # 0x1fdfc8
movq (%rax), %rdi
leaq 0x12e19c(%rip), %rsi    # 0x198066
movb $0x0, %al
callq 0x22f10
movq 0x1b8(%rsp), %rdi
callq 0x229c0
movl $0x0, 0x1d4(%rsp)
jmp 0x6a93e
movzwl 0x1ae(%rsp), %eax
cmpl $0x0, %eax
jg 0x69f30
movq 0x1940c6(%rip), %rax    # 0x1fdfc8
movq (%rax), %rdi
leaq 0x12e184(%rip), %rsi    # 0x198090
movb $0x0, %al
callq 0x22f10
movq 0x1b8(%rsp), %rdi
callq 0x229c0
movl $0x0, 0x1d4(%rsp)
jmp 0x6a93e
movzwl 0x1ae(%rsp), %eax
addl $0x1, %eax
movslq %eax, %rdi
callq 0x22040
movq %rax, 0x1a0(%rsp)
movq 0x1a0(%rsp), %rdi
movzwl 0x1ae(%rsp), %eax
movl %eax, %edx
movq 0x1b8(%rsp), %rcx
movl $0x1, %esi
callq 0x22fd0
movzwl 0x1ae(%rsp), %ecx
movl %ecx, %ecx
cmpq %rcx, %rax
je 0x69fd0
movq 0x194043(%rip), %rax    # 0x1fdfc8
movq (%rax), %rdi
leaq 0x12e124(%rip), %rsi    # 0x1980b3
movb $0x0, %al
callq 0x22f10
movq 0x1a0(%rsp), %rax
movq %rax, 0x48(%rsp)
cmpq $0x0, %rax
je 0x69fb3
movq 0x48(%rsp), %rdi
callq 0x22d80
movq 0x1b8(%rsp), %rdi
callq 0x229c0
movl $0x0, 0x1d4(%rsp)
jmp 0x6a93e
movq 0x1a0(%rsp), %rax
movzwl 0x1ae(%rsp), %ecx
movb $0x0, (%rax,%rcx)
movl $0x0, 0x19c(%rsp)
movl $0x0, 0x198(%rsp)
movq 0x1a0(%rsp), %rdi
leaq 0x12e0cd(%rip), %rsi    # 0x1980d6
callq 0x22190
movq %rax, 0x190(%rsp)
cmpq $0x0, 0x190(%rsp)
je 0x6a113
movq 0x190(%rsp), %rdi
movl $0x3c, %esi
callq 0x22340
movq %rax, 0x190(%rsp)
cmpq $0x0, 0x190(%rsp)
je 0x6a111
movq 0x190(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x190(%rsp)
movq 0x190(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x20, %eax
jne 0x6a088
movq 0x190(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x190(%rsp)
jmp 0x6a062
movq 0x190(%rsp), %rax
movsbl (%rax), %eax
movl %eax, 0x19c(%rsp)
movq 0x190(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x190(%rsp)
movq 0x190(%rsp), %rdi
movl $0x27, %esi
callq 0x22340
movq %rax, 0x188(%rsp)
cmpq $0x0, 0x188(%rsp)
je 0x6a10f
movq 0x190(%rsp), %rax
cmpq 0x188(%rsp), %rax
jae 0x6a10f
movq 0x188(%rsp), %rax
movb $0x0, (%rax)
movq 0x190(%rsp), %rdi
callq 0x23070
movl %eax, 0x198(%rsp)
movq 0x188(%rsp), %rax
movb $0x27, (%rax)
jmp 0x6a111
jmp 0x6a113
movl $0x0, 0x184(%rsp)
movq 0x1a0(%rsp), %rdi
leaq 0x12dfb1(%rip), %rsi    # 0x1980de
callq 0x22190
movq %rax, 0x190(%rsp)
cmpq $0x0, 0x190(%rsp)
je 0x6a245
movq 0x190(%rsp), %rdi
movl $0x3a, %esi
callq 0x22340
movq %rax, 0x190(%rsp)
cmpq $0x0, 0x190(%rsp)
je 0x6a243
movq 0x190(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x190(%rsp)
movq 0x190(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x20, %eax
jne 0x6a1ac
movq 0x190(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x190(%rsp)
jmp 0x6a186
movq 0x190(%rsp), %rdi
movl $0x2c, %esi
callq 0x22340
movq %rax, 0x178(%rsp)
cmpq $0x0, 0x178(%rsp)
je 0x6a241
movq 0x190(%rsp), %rax
cmpq 0x178(%rsp), %rax
jae 0x6a241
movq 0x178(%rsp), %rax
movb $0x0, (%rax)
movq 0x190(%rsp), %rdi
leaq 0x12def1(%rip), %rsi    # 0x1980ee
callq 0x22ea0
cmpl $0x0, %eax
jne 0x6a212
movl $0x1, 0x184(%rsp)
movq 0x190(%rsp), %rdi
leaq 0x12ded2(%rip), %rsi    # 0x1980f3
callq 0x22ea0
cmpl $0x0, %eax
jne 0x6a236
movl $0x1, 0x184(%rsp)
movq 0x178(%rsp), %rax
movb $0x2c, (%rax)
jmp 0x6a243
jmp 0x6a245
movl $0x1, 0x174(%rsp)
movq 0x1a0(%rsp), %rdi
leaq 0x12de99(%rip), %rsi    # 0x1980f8
callq 0x22190
movq %rax, 0x190(%rsp)
cmpq $0x0, 0x190(%rsp)
je 0x6a343
movq 0x190(%rsp), %rdi
movl $0x28, %esi
callq 0x22340
movq %rax, 0x190(%rsp)
cmpq $0x0, 0x190(%rsp)
je 0x6a341
movq 0x190(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x190(%rsp)
movq 0x190(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x20, %eax
jne 0x6a2de
movq 0x190(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x190(%rsp)
jmp 0x6a2b8
movq 0x190(%rsp), %rdi
movl $0x2c, %esi
callq 0x22340
movq %rax, 0x168(%rsp)
cmpq $0x0, 0x168(%rsp)
je 0x6a33f
movq 0x190(%rsp), %rax
cmpq 0x168(%rsp), %rax
jae 0x6a33f
movq 0x168(%rsp), %rax
movb $0x0, (%rax)
movq 0x190(%rsp), %rdi
callq 0x23070
movl %eax, 0x174(%rsp)
movq 0x168(%rsp), %rax
movb $0x2c, (%rax)
jmp 0x6a341
jmp 0x6a343
movl $0x1, 0x164(%rsp)
movq 0x1a0(%rsp), %rdi
leaq 0x12dd9b(%rip), %rsi    # 0x1980f8
callq 0x22190
movq %rax, 0x190(%rsp)
cmpq $0x0, 0x190(%rsp)
je 0x6a496
movq 0x190(%rsp), %rdi
movl $0x2c, %esi
callq 0x22340
movq %rax, 0x190(%rsp)
cmpq $0x0, 0x190(%rsp)
je 0x6a494
movq 0x190(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x190(%rsp)
movq 0x190(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x20, %eax
jne 0x6a3dc
movq 0x190(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x190(%rsp)
jmp 0x6a3b6
movq 0x190(%rsp), %rdi
movl $0x2c, %esi
callq 0x22340
movq %rax, 0x158(%rsp)
movq 0x190(%rsp), %rdi
movl $0x29, %esi
callq 0x22340
movq %rax, 0x150(%rsp)
movq 0x158(%rsp), %rax
cmpq 0x150(%rsp), %rax
jae 0x6a431
movq 0x158(%rsp), %rax
movq %rax, 0x40(%rsp)
jmp 0x6a43e
movq 0x150(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x148(%rsp)
cmpq $0x0, 0x148(%rsp)
je 0x6a492
movq 0x190(%rsp), %rax
cmpq 0x148(%rsp), %rax
jae 0x6a492
movq 0x148(%rsp), %rax
movb $0x0, (%rax)
movq 0x190(%rsp), %rdi
callq 0x23070
movl %eax, 0x164(%rsp)
movq 0x148(%rsp), %rax
movb $0x29, (%rax)
jmp 0x6a494
jmp 0x6a496
movq 0x1a0(%rsp), %rax
movq %rax, 0x38(%rsp)
cmpq $0x0, %rax
je 0x6a4b3
movq 0x38(%rsp), %rdi
callq 0x22d80
movl 0x174(%rsp), %eax
imull 0x164(%rsp), %eax
movl %eax, 0x34(%rsp)
movl 0x19c(%rsp), %edi
movl 0x198(%rsp), %esi
callq 0x6b3e0
movl %eax, %ecx
movl 0x34(%rsp), %eax
imull %ecx, %eax
movl %eax, 0x144(%rsp)
movl 0x144(%rsp), %eax
movl %eax, %edi
callq 0x22040
movq %rax, 0x138(%rsp)
movl $0x0, 0x134(%rsp)
movl 0x134(%rsp), %eax
cmpl 0x144(%rsp), %eax
jae 0x6a5fb
movq 0x138(%rsp), %rdi
movl 0x134(%rsp), %eax
addq %rax, %rdi
movl 0x144(%rsp), %eax
subl 0x134(%rsp), %eax
movl %eax, %eax
movl %eax, %edx
movq 0x1b8(%rsp), %rcx
movl $0x1, %esi
callq 0x22fd0
movq %rax, 0x128(%rsp)
cmpq $0x0, 0x128(%rsp)
ja 0x6a5dd
movq 0x193a5a(%rip), %rax    # 0x1fdfc8
movq (%rax), %rdi
movq 0x128(%rsp), %rdx
movl 0x134(%rsp), %ecx
movl 0x144(%rsp), %r8d
leaq 0x12db71(%rip), %rsi    # 0x198100
movb $0x0, %al
callq 0x22f10
cmpq $0x0, 0x128(%rsp)
jae 0x6a5db
movq 0x138(%rsp), %rax
movq %rax, 0x28(%rsp)
cmpq $0x0, %rax
je 0x6a5be
movq 0x28(%rsp), %rdi
callq 0x22d80
movq 0x1b8(%rsp), %rdi
callq 0x229c0
movl $0x0, 0x1d4(%rsp)
jmp 0x6a93e
jmp 0x6a5dd
movq 0x128(%rsp), %rcx
movl 0x134(%rsp), %eax
addq %rcx, %rax
movl %eax, 0x134(%rsp)
jmp 0x6a50a
movq 0x1b8(%rsp), %rdi
callq 0x229c0
movl $0x0, 0x124(%rsp)
movl 0x124(%rsp), %eax
cmpl 0x164(%rsp), %eax
jge 0x6a6c9
movl 0x124(%rsp), %edx
leaq 0x12daf9(%rip), %rsi    # 0x19812e
xorl %eax, %eax
movl %eax, 0x1c(%rsp)
leaq 0xa0(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x22150
movl $0x448, %edi            # imm = 0x448
callq 0x229d0
movq 0x50(%rsp), %rcx
movq 0x10(%rsp), %rdx
movq %rax, %rdi
movl 0x1c(%rsp), %eax
movq %rdi, %rsi
movq %rsi, 0x20(%rsp)
movq (%rcx), %rsi
movl %eax, %ecx
callq 0x6c2b0
jmp 0x6a67c
movq 0x20(%rsp), %rsi
movq 0x50(%rsp), %rdi
callq 0x69220
movl 0x124(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x124(%rsp)
jmp 0x6a613
movq 0x20(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x98(%rsp)
movl %eax, 0x94(%rsp)
movl $0x448, %esi            # imm = 0x448
callq 0x229f0
jmp 0x6a94d
movq 0x138(%rsp), %rax
movq %rax, 0x88(%rsp)
cmpl $0x0, 0x184(%rsp)
je 0x6a812
movl $0x0, 0x84(%rsp)
movl 0x84(%rsp), %eax
cmpl 0x164(%rsp), %eax
jge 0x6a80d
movl $0x0, 0x80(%rsp)
movl 0x80(%rsp), %eax
cmpl 0x174(%rsp), %eax
jge 0x6a7f5
cmpl $0x4, 0x198(%rsp)
jne 0x6a77f
movq 0x50(%rsp), %rdi
movq 0x88(%rsp), %rax
movq %rax, 0x78(%rsp)
movl 0x84(%rsp), %esi
callq 0x2b330
movq %rax, %rdi
movl 0x80(%rsp), %esi
movq 0x78(%rsp), %rax
movss (%rax), %xmm0
cvtss2sd %xmm0, %xmm0
callq 0x6f210
movq 0x88(%rsp), %rax
addq $0x4, %rax
movq %rax, 0x88(%rsp)
jmp 0x6a7dd
cmpl $0x8, 0x198(%rsp)
jne 0x6a7db
movq 0x50(%rsp), %rdi
movq 0x88(%rsp), %rax
movq %rax, 0x70(%rsp)
movl 0x84(%rsp), %esi
callq 0x2b330
movq %rax, %rdi
movl 0x80(%rsp), %esi
movq 0x70(%rsp), %rax
movsd (%rax), %xmm0
cvtsd2ss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
callq 0x6f210
movq 0x88(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x88(%rsp)
jmp 0x6a7dd
jmp 0x6a7df
movl 0x80(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x80(%rsp)
jmp 0x6a711
jmp 0x6a7f7
movl 0x84(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x84(%rsp)
jmp 0x6a6f2
jmp 0x6a916
movl $0x0, 0x6c(%rsp)
movl 0x6c(%rsp), %eax
cmpl 0x174(%rsp), %eax
jge 0x6a914
movl $0x0, 0x68(%rsp)
movl 0x68(%rsp), %eax
cmpl 0x164(%rsp), %eax
jge 0x6a902
cmpl $0x4, 0x198(%rsp)
jne 0x6a898
movq 0x50(%rsp), %rdi
movq 0x88(%rsp), %rax
movq %rax, 0x60(%rsp)
movl 0x68(%rsp), %esi
callq 0x2b330
movq %rax, %rdi
movl 0x6c(%rsp), %esi
movq 0x60(%rsp), %rax
movss (%rax), %xmm0
cvtss2sd %xmm0, %xmm0
callq 0x6f210
movq 0x88(%rsp), %rax
addq $0x4, %rax
movq %rax, 0x88(%rsp)
jmp 0x6a8f0
cmpl $0x8, 0x198(%rsp)
jne 0x6a8ee
movq 0x50(%rsp), %rdi
movq 0x88(%rsp), %rax
movq %rax, 0x58(%rsp)
movl 0x68(%rsp), %esi
callq 0x2b330
movq %rax, %rdi
movl 0x6c(%rsp), %esi
movq 0x58(%rsp), %rax
movsd (%rax), %xmm0
cvtsd2ss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
callq 0x6f210
movq 0x88(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x88(%rsp)
jmp 0x6a8f0
jmp 0x6a8f2
movl 0x68(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x68(%rsp)
jmp 0x6a833
jmp 0x6a904
movl 0x6c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x6c(%rsp)
jmp 0x6a81a
jmp 0x6a916
movq 0x138(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, %rax
je 0x6a933
movq 0x8(%rsp), %rdi
callq 0x22d80
movl $0x1, 0x1d4(%rsp)
movl 0x1d4(%rsp), %eax
addq $0x1d8, %rsp            # imm = 0x1D8
retq
movq 0x98(%rsp), %rdi
callq 0x23270
nopw (%rax,%rax)