// File: /workspace/github_cpp_makefile_star2_O1/lvandeve[P]lodepng/pngdetail.cpp
// Function: printICCDetails(unsigned char const*, unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void printICCDetails(const unsigned char* icc, size_t size, const std::string& indent) {
  // 128 for header, 4 for num tags
  if(size < 132) {
    std::cout << indent << "Invalid ICC: too small to contain header" << std::endl;
    return;
  }
  if(printableICCWord(icc, size, 36) != "acsp") {
    std::cout << indent << "Invalid ICC: does not contain signature \"acsp\"" << std::endl;
    return;
  }

  std::cout << indent << "profile size: " << getICCUint32(icc, size, 0) << std::endl;
  std::cout << indent << "CMM type: " << printableICCWord(icc, size, 4) << std::endl;

  uint32_t version = getICCUint32(icc, size, 8);
  uint16_t version_major = (version >> 24) & 255;
  uint16_t version_minor = (version >> 20) & 15;
  uint16_t version_bugfix = (version >> 16) & 15;
  std::cout << indent << "version: " << version_major << "." << version_minor
            << "." << version_bugfix << std::endl;

  std::cout << indent << "device class: " << printableICCWord(icc, size, 12) << std::endl;
  std::cout << indent << "input space: \"" << printableICCWord(icc, size, 16) << "\", ";
  std::cout << "output space: \"" << printableICCWord(icc, size, 20) << "\"" << std::endl;
  std::cout << indent;
  printf("date: %02d-%02d-%02dT%02d:%02d:%02d\n",
         getICCUint16(icc, size, 24), getICCUint16(icc, size, 26), getICCUint16(icc, size, 28),
         getICCUint16(icc, size, 30), getICCUint16(icc, size, 32), getICCUint16(icc, size, 34));
  std::cout << indent << "signature: " << printableICCWord(icc, size, 36) << std::endl;
  std::cout << indent << "platform: " << printableICCWord(icc, size, 40) << std::endl;
  std::cout << indent << "flags: " << getICCUint32(icc, size, 44) << std::endl;
  std::cout << indent << "device manufacturer: " << printableICCWord(icc, size, 48) << ", ";
  std::cout << "device model: " << printableICCWord(icc, size, 52) << ", ";
  std::cout << "device attributes: " << getICCUint32(icc, size, 56) << " "
            << getICCUint32(icc, size, 60) << std::endl;
  std::cout << indent << "rendering intent: " << getICCUint32(icc, size, 64) << std::endl;

  float pcsx = getICC15Fixed16(icc, size, 68);
  float pcsy = getICC15Fixed16(icc, size, 72);
  float pcsz = getICC15Fixed16(icc, size, 76);
  float pcsxyz = pcsx + pcsy + pcsz;
  std::cout << indent << "xyz illuminant: X:" << pcsx << ", Y:" << pcsy << ", Z:" << pcsz
            << ", xy:" << (pcsx / pcsxyz) << "," << (pcsy / pcsxyz) << std::endl;

  std::cout << indent << "creator: " << printableICCWord(icc, size, 80) << std::endl;

  // The md5 is present in v2.4 and above profiles, but it's always shown anyway. Those
  // bytes are normally all zero for older versions.
  std::cout << indent;
  printf("md5: %08x%08x%08x%08x\n", getICCUint32(icc, size, 84), getICCUint32(icc, size, 88),
                                    getICCUint32(icc, size, 92), getICCUint32(icc, size, 96));

  size_t numtags = getICCUint32(icc, size, 128);
  std::cout << indent << "num icc tags: " << numtags << std::endl;
  if(size < 128 + 4 + numtags * 12) {
    std::cout << indent << "Invalid ICC: too small to contain tag descriptions" << std::endl;
    return;
  }
  for(size_t i = 0; i < numtags; i++) {
    size_t pos = 132 + i * 12;
    std::cout << indent << "icc tag: \"" << printableICCWord(icc, size, pos) << "\"";
    size_t offset = getICCUint32(icc, size, pos + 4);
    size_t tagsize = getICCUint32(icc, size, pos + 8);
    std::cout << ", offset: " << offset << ", size: " << tagsize;
    if(offset + tagsize > size || tagsize < 4) {
      std::cout << std::endl << indent << "Invalid ICC: tag out of range" << std::endl;
      return;
    }
    std::string datatype = printableICCWord(icc, size, offset);
    std::cout << ", datatype: \"" << datatype << "\"";
    if(datatype == "XYZ ") {
      float x = getICC15Fixed16(icc, size, offset + 8);
      float y = getICC15Fixed16(icc, size, offset + 12);
      float z = getICC15Fixed16(icc, size, offset + 16);
      float xyz = x + y + z;
      std::cout << ", X:" << x << ", Y:" << y << ", Z:" << z;
      if(xyz) std::cout << ", xy:" << (x / xyz) << "," << (y / xyz);
    }
    if(datatype == "curv") {
      size_t lutsize = getICCUint32(icc, size, offset + 8);
      std::cout << ", lookup table size: " << lutsize;
      if(lutsize == 1 && offset + 14 <= size) {
        std::cout << " (gamma: " << (getICCUint16(icc, size, offset + 12) / 256.0) << ")";
      }
      if(lutsize == 0) std::cout << " (linear)";
    }
    if(datatype == "para") {
      unsigned type = getICCUint16(icc, size, offset + 8);
      float gamma = getICC15Fixed16(icc, size, offset + 12);
      int numparams = (type == 4) ? 7 : ((type >= 1 && type <= 3) ? (type + 1) : 0);
      std::cout << " type: " << type << ", gamma: " <<  gamma;
      if(numparams > 0) {
        std::cout << ", params: ";
        for(int j = 0; j < numparams; j++) {
          if(j > 0) std::cout << ", ";
          std::cout << getICC15Fixed16(icc, size, offset + 16 + j * 4);
        }
      }
    }
    if(datatype == "sf32") {
      std::cout << ":";
      for(size_t j = 8; j < tagsize; j += 4) {
        float v = getICC15Fixed16(icc, size, offset + j);
        std::cout << " " << v;
      }
    }
    if(datatype == "chrm") {
      size_t numchannels = getICCUint16(icc, size, offset + 8);
      std::cout << ": n:" << numchannels
                << " phosphor:" << getICCUint16(icc, size, offset + 10);
      for(size_t j = 0; j < numchannels; j++) {
        std::cout << " xy:" << getICC16Fixed16(icc, size, offset + 12 + j * 8)
                  << "," << getICC16Fixed16(icc, size, offset + 12 + j * 8 + 4);
      }
    }
    if(datatype == "text" || datatype == "mluc" || datatype == "desc") {
      // TODO: this is a bit of a simplification of the parse for now, e.g.
      // ignoring UTF-16, instead implicitely skipping non-ASCII bytes, and
      // potentially printing things multiple times in a row if multiple
      // variants are in desc or mluc.
      std::cout << ": ";
      for(size_t j = (datatype == "mluc" ? 28 : 8); j < tagsize; j++) {
        char c = icc[offset + j];
        if(c >= 32 && c < 127) std::cout << c;
      }
    }
    std::cout << std::endl;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdx, %r12
movq %rsi, %rdx
cmpq $0x83, %rsi
ja 0x1940c
movq (%r12), %rsi
movq 0x8(%r12), %rdx
movq 0x11bdd(%rip), %rdi     # 0x2afd0
callq 0x2280
movq %rax, %rbx
leaq 0xa81e(%rip), %rsi      # 0x23c20
movl $0x28, %edx
movq %rax, %rdi
jmp 0x1947a
movq %rdi, %rsi
leaq 0x28(%rsp), %rbx
movl $0x24, %ecx
movq %rbx, %rdi
movq %rsi, 0x10(%rsp)
movq %rdx, 0x18(%rsp)
callq 0x1a8a2
leaq 0xa817(%rip), %rsi      # 0x23c49
movq %rbx, %rdi
callq 0x2090
movl %eax, %ebp
leaq 0x38(%rsp), %r14
movq -0x10(%r14), %rdi
cmpq %r14, %rdi
je 0x1944f
callq 0x2200
movq (%r12), %rsi
movq 0x8(%r12), %rdx
movq 0x11b71(%rip), %rdi     # 0x2afd0
callq 0x2280
movq %rax, %rbx
testl %ebp, %ebp
je 0x194b8
leaq 0xa7dc(%rip), %rsi      # 0x23c4e
movl $0x2e, %edx
movq %rbx, %rdi
callq 0x2280
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2210
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2160
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xa7be(%rip), %rsi      # 0x23c7d
movl $0xe, %edx
movq %rbx, %rdi
callq 0x2280
movq 0x10(%rsp), %rbp
movl (%rbp), %esi
bswapl %esi
movq %rbx, %rdi
callq 0x2150
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2210
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2160
movq (%r12), %rsi
movq 0x8(%r12), %rdx
movq 0x11ab8(%rip), %rdi     # 0x2afd0
callq 0x2280
movq %rax, %rbx
leaq 0xa765(%rip), %rsi      # 0x23c8c
movl $0xa, %edx
movq %rax, %rdi
callq 0x2280
leaq 0x28(%rsp), %r15
movl $0x4, %ecx
movq %r15, %rdi
movq %rbp, %rsi
movq 0x18(%rsp), %rdx
callq 0x1a8a2
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %rbx, %rdi
callq 0x2280
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2210
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2160
movq %r12, 0x70(%rsp)
movq 0x28(%rsp), %rdi
cmpq %r14, %rdi
je 0x1959b
callq 0x2200
movzbl 0x8(%rbp), %r15d
movzbl 0x9(%rbp), %r12d
movl %r12d, %r13d
shrl $0x4, %r13d
andl $0xf, %r12d
movq 0x70(%rsp), %r14
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq 0x11a0d(%rip), %rbx     # 0x2afd0
movq %rbx, %rdi
callq 0x2280
movq %rax, %rbp
leaq 0x9b60(%rip), %rsi      # 0x23135
movl $0x9, %edx
movq %rax, %rdi
callq 0x2280
movq %rbp, %rdi
movq %r15, %rsi
callq 0x2150
movq %rax, %r15
leaq 0xa61a(%rip), %rbp      # 0x23c11
movl $0x1, %edx
movq %rax, %rdi
movq %rbp, %rsi
callq 0x2280
movq %r15, %rdi
movq %r13, %rsi
movq %r14, %r13
callq 0x2150
movq %rax, %r15
movl $0x1, %edx
movq %rax, %rdi
movq %rbp, %rsi
callq 0x2280
movq %r15, %rdi
movq %r12, %rsi
callq 0x2150
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2210
movsbl %al, %esi
movq %r15, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2160
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %rbx, %rdi
callq 0x2280
movq %rax, %rbx
leaq 0xa621(%rip), %rsi      # 0x23c97
movl $0xe, %edx
movq %rax, %rdi
callq 0x2280
leaq 0x28(%rsp), %r15
movl $0xc, %ecx
movq %r15, %rdi
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rbp
movq %rbp, %rdx
callq 0x1a8a2
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %rbx, %rdi
callq 0x2280
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2210
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2160
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %r14
cmpq %r14, %rdi
je 0x196ef
callq 0x2200
movq (%r13), %rsi
movq 0x8(%r13), %rdx
movq 0x118d2(%rip), %rdi     # 0x2afd0
callq 0x2280
movq %rax, %rbx
leaq 0xa599(%rip), %rsi      # 0x23ca6
movl $0xe, %edx
movq %rax, %rdi
callq 0x2280
leaq 0x28(%rsp), %r15
movl $0x10, %ecx
movq %r15, %rdi
movq 0x10(%rsp), %rsi
movq %rbp, %rdx
callq 0x1a8a2
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %rbx, %rdi
callq 0x2280
leaq 0xa56b(%rip), %rsi      # 0x23cb5
movl $0x3, %edx
movq %rax, %rdi
callq 0x2280
movq 0x28(%rsp), %rdi
cmpq %r14, %rdi
je 0x19766
callq 0x2200
movq 0x11863(%rip), %rbx     # 0x2afd0
leaq 0xa545(%rip), %rsi      # 0x23cb9
movl $0xf, %edx
movq %rbx, %rdi
callq 0x2280
leaq 0x28(%rsp), %r15
movl $0x14, %ecx
movq %r15, %rdi
movq 0x10(%rsp), %rsi
movq %rbp, %rdx
callq 0x1a8a2
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %rbx, %rdi
callq 0x2280
movq %rax, %rbx
leaq 0xa4ff(%rip), %rsi      # 0x23cb3
movl $0x1, %edx
movq %rax, %rdi
callq 0x2280
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2210
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2160
movq 0x28(%rsp), %rdi
cmpq %r14, %rdi
je 0x197f7
callq 0x2200
movq (%r13), %rsi
movq 0x8(%r13), %rdx
movq 0x117ca(%rip), %rbx     # 0x2afd0
movq %rbx, %rdi
callq 0x2280
movq 0x10(%rsp), %r12
movzwl 0x18(%r12), %eax
movzwl 0x1a(%r12), %ecx
rolw $0x8, %ax
movzwl %ax, %esi
rolw $0x8, %cx
movzwl %cx, %edx
movzwl 0x1c(%r12), %eax
rolw $0x8, %ax
movzwl %ax, %ecx
movzwl 0x1e(%r12), %eax
rolw $0x8, %ax
movzwl %ax, %r8d
movzwl 0x20(%r12), %eax
rolw $0x8, %ax
movzwl %ax, %r9d
movzwl 0x22(%r12), %eax
rolw $0x8, %ax
movzwl %ax, %eax
movl %eax, (%rsp)
leaq 0xa45c(%rip), %rdi      # 0x23cc9
xorl %eax, %eax
callq 0x2060
movq (%r13), %rsi
movq 0x8(%r13), %rdx
movq %rbx, %rdi
callq 0x2280
movq %rax, %rbx
leaq 0xa460(%rip), %rsi      # 0x23cee
movl $0xb, %edx
movq %rax, %rdi
callq 0x2280
leaq 0x28(%rsp), %r15
movl $0x24, %ecx
movq %r15, %rdi
movq %r12, %rsi
movq %rbp, %rdx
callq 0x1a8a2
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %rbx, %rdi
callq 0x2280
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2210
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2160
movq 0x28(%rsp), %rdi
cmpq %r14, %rdi
je 0x198fb
callq 0x2200
movq (%r13), %rsi
movq 0x8(%r13), %rdx
movq 0x116c6(%rip), %rdi     # 0x2afd0
callq 0x2280
movq %rax, %rbx
leaq 0xa3e1(%rip), %rsi      # 0x23cfa
movl $0xa, %edx
movq %rax, %rdi
callq 0x2280
leaq 0x28(%rsp), %r15
movl $0x28, %ecx
movq %r15, %rdi
movq 0x10(%rsp), %rsi
movq %rbp, %rdx
callq 0x1a8a2
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %rbx, %rdi
callq 0x2280
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2210
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2160
movq 0x28(%rsp), %rdi
cmpq %r14, %rdi
je 0x19988
callq 0x2200
movq (%r13), %rsi
movq 0x8(%r13), %rdx
movq 0x11639(%rip), %rbx     # 0x2afd0
movq %rbx, %rdi
callq 0x2280
movq %rax, %r15
leaq 0xa35c(%rip), %rsi      # 0x23d05
movl $0x7, %edx
movq %rax, %rdi
callq 0x2280
movq 0x10(%rsp), %r12
movl 0x2c(%r12), %esi
bswapl %esi
movq %r15, %rdi
callq 0x2150
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2210
movsbl %al, %esi
movq %r15, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2160
movq (%r13), %rsi
movq 0x8(%r13), %rdx
movq %rbx, %rdi
callq 0x2280
movq %rax, %rbx
leaq 0xa2ff(%rip), %rsi      # 0x23d0d
movl $0x15, %edx
movq %rax, %rdi
callq 0x2280
leaq 0x28(%rsp), %r15
movl $0x30, %ecx
movq %r15, %rdi
movq %r12, %rsi
movq %rbp, %rdx
callq 0x1a8a2
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %rbx, %rdi
callq 0x2280
leaq 0xa26d(%rip), %rsi      # 0x23cb6
movl $0x2, %edx
movq %rax, %rdi
callq 0x2280
movq 0x28(%rsp), %rdi
cmpq %r14, %rdi
je 0x19a65
callq 0x2200
movq 0x11564(%rip), %rbx     # 0x2afd0
leaq 0xa2b0(%rip), %rsi      # 0x23d23
movl $0xe, %edx
movq %rbx, %rdi
callq 0x2280
leaq 0x28(%rsp), %r15
movl $0x34, %ecx
movq %r15, %rdi
movq 0x10(%rsp), %rsi
movq %rbp, %rdx
callq 0x1a8a2
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %rbx, %rdi
callq 0x2280
leaq 0xa206(%rip), %rsi      # 0x23cb6
movl $0x2, %edx
movq %rax, %rdi
callq 0x2280
movq 0x28(%rsp), %rdi
cmpq %r14, %rdi
je 0x19acc
callq 0x2200
movq 0x114fd(%rip), %r12     # 0x2afd0
leaq 0xa258(%rip), %rsi      # 0x23d32
movl $0x13, %edx
movq %r12, %rdi
callq 0x2280
movq 0x10(%rsp), %r14
movl 0x38(%r14), %esi
bswapl %esi
movq %r12, %rdi
callq 0x2150
movq %rax, %rbx
leaq 0xa61e(%rip), %rsi      # 0x24122
movl $0x1, %edx
movq %rax, %rdi
callq 0x2280
movl 0x3c(%r14), %esi
bswapl %esi
movq %rbx, %rdi
callq 0x2150
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2210
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2160
movq (%r13), %rsi
movq 0x8(%r13), %rdx
movq %r12, %rdi
callq 0x2280
movq %rax, %rbx
leaq 0xa4e2(%rip), %rsi      # 0x24045
movl $0x12, %edx
movq %rax, %rdi
callq 0x2280
movl 0x40(%r14), %esi
bswapl %esi
movq %rbx, %rdi
callq 0x2150
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2210
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2160
movl 0x44(%r14), %eax
bswapl %eax
cvtsi2sd %eax, %xmm0
movsd 0x93c6(%rip), %xmm1     # 0x22f80
mulsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm3
movss %xmm3, 0x68(%rsp)
movl 0x48(%r14), %eax
bswapl %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
mulsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm2
movss %xmm2, 0x48(%rsp)
movl 0x4c(%r14), %eax
bswapl %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
mulsd %xmm1, %xmm0
xorps %xmm1, %xmm1
cvtsd2ss %xmm0, %xmm1
movss %xmm1, 0x60(%rsp)
movaps %xmm3, %xmm0
addss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, 0x5c(%rsp)
movq (%r13), %rsi
movq 0x8(%r13), %rdx
movq %r12, %rdi
callq 0x2280
movq %rax, %rbx
leaq 0xa11a(%rip), %rsi      # 0x23d46
movl $0x12, %edx
movq %rax, %rdi
callq 0x2280
xorps %xmm0, %xmm0
cvtss2sd 0x68(%rsp), %xmm0
movq %rbx, %rdi
callq 0x2320
movq %rax, %rbx
leaq 0xa105(%rip), %rsi      # 0x23d59
movl $0x4, %edx
movq %rax, %rdi
callq 0x2280
xorps %xmm0, %xmm0
cvtss2sd 0x48(%rsp), %xmm0
movq %rbx, %rdi
callq 0x2320
movq %rax, %rbx
leaq 0xa0e2(%rip), %rsi      # 0x23d5e
movl $0x4, %edx
movq %rax, %rdi
callq 0x2280
xorps %xmm0, %xmm0
cvtss2sd 0x60(%rsp), %xmm0
movq %rbx, %rdi
callq 0x2320
movq %rax, %rbx
leaq 0xa0bf(%rip), %rsi      # 0x23d63
movl $0x5, %edx
movq %rax, %rdi
callq 0x2280
movss 0x68(%rsp), %xmm0
divss 0x5c(%rsp), %xmm0
cvtss2sd %xmm0, %xmm0
movq %rbx, %rdi
callq 0x2320
movq %rax, %rbx
leaq 0xa096(%rip), %rsi      # 0x23d69
movl $0x1, %edx
movq %rax, %rdi
callq 0x2280
movss 0x48(%rsp), %xmm0
divss 0x5c(%rsp), %xmm0
cvtss2sd %xmm0, %xmm0
movq %rbx, %rdi
callq 0x2320
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2210
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2160
movq (%r13), %rsi
movq 0x8(%r13), %rdx
movq %r12, %rdi
callq 0x2280
movq %rax, %rbx
leaq 0xa02f(%rip), %rsi      # 0x23d6b
movl $0x9, %edx
movq %rax, %rdi
callq 0x2280
leaq 0x28(%rsp), %r15
movl $0x50, %ecx
movq %r15, %rdi
movq %r14, %rsi
movq %rbp, %rdx
callq 0x1a8a2
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %rbx, %rdi
callq 0x2280
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2210
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2160
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %r12
cmpq %r12, %rdi
je 0x19dae
callq 0x2200
movq (%r13), %rsi
movq 0x8(%r13), %rdx
movq 0x11213(%rip), %rdi     # 0x2afd0
callq 0x2280
movq 0x10(%rsp), %r15
movl 0x54(%r15), %esi
movl 0x58(%r15), %edx
bswapl %esi
bswapl %edx
movl 0x5c(%r15), %ecx
bswapl %ecx
movl 0x60(%r15), %r8d
bswapl %r8d
leaq 0x9f8e(%rip), %rdi      # 0x23d75
xorl %eax, %eax
callq 0x2060
movzbl 0x80(%r15), %r14d
shll $0x18, %r14d
movq %r13, %r12
movzbl 0x81(%r15), %r13d
shll $0x10, %r13d
leaq (%r14,%r13), %rbx
movzbl 0x82(%r15), %eax
shll $0x8, %eax
movq %rax, 0x60(%rsp)
orq %rax, %rbx
movzbl 0x83(%r15), %ebp
orq %rbp, %rbx
movq (%r12), %rsi
movq 0x8(%r12), %rdx
movq 0x11195(%rip), %rdi     # 0x2afd0
callq 0x2280
movq %rax, %r15
leaq 0x9f42(%rip), %rsi      # 0x23d8c
movl $0xe, %edx
movq %rax, %rdi
callq 0x2280
movq %r15, %rdi
movq %rbx, %rsi
callq 0x2150
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2210
movsbl %al, %esi
movq %r15, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2160
leaq (%rbx,%rbx,2), %rax
leaq 0x84(,%rax,4), %rax
cmpq 0x18(%rsp), %rax
jbe 0x19ec8
movq (%r12), %rsi
movq 0x8(%r12), %rdx
movq 0x11121(%rip), %rdi     # 0x2afd0
callq 0x2280
movq %rax, %rbx
leaq 0x9edd(%rip), %rsi      # 0x23d9b
movl $0x32, %edx
jmp 0x19407
testq %rbx, %rbx
movq 0x110fe(%rip), %r15     # 0x2afd0
je 0x194a6
orq %r13, %r14
movq 0x60(%rsp), %rax
orq %rbp, %rax
orq %r14, %rax
movq %rax, 0x60(%rsp)
movq 0x10(%rsp), %rax
leaq 0x13(%rax), %rcx
movq %rcx, 0x80(%rsp)
addq $0xb, %rax
movq %rax, 0x78(%rsp)
xorl %r13d, %r13d
leaq (,%r13,4), %r14
leaq (%r14,%r14,2), %rbx
addq $0x84, %rbx
movq 0x70(%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %r15, %rdi
callq 0x2280
movq %rax, %r15
movl $0xa, %edx
movq %rax, %rdi
leaq 0x9e8d(%rip), %rsi      # 0x23dce
callq 0x2280
leaq 0x28(%rsp), %rdi
movq 0x10(%rsp), %rbp
movq %rbp, %rsi
movq 0x18(%rsp), %r12
movq %r12, %rdx
movq %rbx, %rcx
callq 0x1a8a2
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
movq %r15, %rdi
callq 0x2280
movl $0x1, %edx
movq %rax, %rdi
leaq 0x9d2f(%rip), %rsi      # 0x23cb3
callq 0x2280
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x19f9d
callq 0x2200
movq %r13, 0x68(%rsp)
leaq (%r14,%r14,2), %rax
leaq 0x8c(%rax), %rcx
cmpq %r12, %rcx
movq 0x11019(%rip), %r15     # 0x2afd0
jbe 0x19fbe
xorl %r13d, %r13d
jmp 0x19fc9
movl 0x88(%rbp,%rax), %r13d
bswapl %r13d
leaq 0x90(%rax), %rcx
xorl %r14d, %r14d
cmpq %r12, %rcx
ja 0x19fe3
movl 0x8c(%rbp,%rax), %r14d
bswapl %r14d
movl %r14d, %ebp
movl $0xa, %edx
movq %r15, %rdi
leaq 0x9de4(%rip), %rsi      # 0x23dd9
callq 0x2280
movq %r15, %rdi
movq %r13, %rsi
callq 0x2150
movq %rax, %rbx
movl $0x8, %edx
movq %rax, %rdi
leaq 0x9dcd(%rip), %rsi      # 0x23de4
callq 0x2280
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x2150
movq %r13, %rax
addq %rbp, %rax
movq 0x18(%rsp), %rdx
cmpq %rdx, %rax
seta %al
cmpl $0x4, %r14d
setb %cl
orb %al, %cl
movb %cl, 0x5c(%rsp)
cmpb $0x1, %cl
jne 0x1a0d1
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2210
movsbl %al, %esi
movq %r15, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2160
movq 0x70(%rsp), %rcx
movq (%rcx), %rsi
movq 0x8(%rcx), %rdx
movq %rax, %rdi
callq 0x2280
movq %rax, %rbx
movl $0x1d, %edx
movq %rax, %rdi
leaq 0x9d52(%rip), %rsi      # 0x23ded
callq 0x2280
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2210
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2160
movq 0x68(%rsp), %r13
jmp 0x1a828
leaq 0x28(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq %r13, %rcx
callq 0x1a8a2
movl $0xd, %edx
movq %r15, %rdi
leaq 0x9d19(%rip), %rsi      # 0x23e0b
callq 0x2280
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
movq %r15, %rdi
callq 0x2280
movl $0x1, %edx
movq %rax, %rdi
leaq 0x9b9b(%rip), %rsi      # 0x23cb3
callq 0x2280
leaq 0x28(%rsp), %rdi
leaq 0x9cf0(%rip), %rsi      # 0x23e19
callq 0x2090
testl %eax, %eax
jne 0x1a2d1
leaq 0xc(%r13), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0x58(%rsp)
movss %xmm0, 0x48(%rsp)
cmpq 0x18(%rsp), %rax
ja 0x1a175
movq 0x10(%rsp), %rax
movl 0x8(%rax,%r13), %eax
bswapl %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
mulsd 0x8e15(%rip), %xmm0     # 0x22f80
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x48(%rsp)
leaq 0x10(%r13), %rax
cmpq 0x18(%rsp), %rax
ja 0x1a1a5
movq 0x10(%rsp), %rax
movl 0xc(%rax,%r13), %eax
bswapl %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
mulsd 0x8de5(%rip), %xmm0     # 0x22f80
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x58(%rsp)
leaq 0x14(%r13), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0x54(%rsp)
cmpq 0x18(%rsp), %rax
ja 0x1a1de
movq 0x10(%rsp), %rax
movl 0x10(%rax,%r13), %eax
bswapl %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
mulsd 0x8dac(%rip), %xmm0     # 0x22f80
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x54(%rsp)
movl $0x4, %edx
movq %r15, %rdi
leaq 0x9c31(%rip), %rsi      # 0x23e1e
callq 0x2280
xorps %xmm0, %xmm0
cvtss2sd 0x48(%rsp), %xmm0
movq %r15, %rdi
callq 0x2320
movq %rax, %rbx
movl $0x4, %edx
movq %rax, %rdi
leaq 0x9b44(%rip), %rsi      # 0x23d59
callq 0x2280
xorps %xmm0, %xmm0
cvtss2sd 0x58(%rsp), %xmm0
movq %rbx, %rdi
callq 0x2320
movq %rax, %rbx
movl $0x4, %edx
movq %rax, %rdi
leaq 0x9b21(%rip), %rsi      # 0x23d5e
callq 0x2280
xorps %xmm0, %xmm0
cvtss2sd 0x54(%rsp), %xmm0
movq %rbx, %rdi
callq 0x2320
movss 0x48(%rsp), %xmm0
addss 0x58(%rsp), %xmm0
addss 0x54(%rsp), %xmm0
movss %xmm0, 0x54(%rsp)
ucomiss 0x8d2e(%rip), %xmm0     # 0x22fa0
jne 0x1a276
jnp 0x1a2d1
movl $0x5, %edx
movq %r15, %rdi
leaq 0x9ade(%rip), %rsi      # 0x23d63
callq 0x2280
movss 0x48(%rsp), %xmm0
divss 0x54(%rsp), %xmm0
cvtss2sd %xmm0, %xmm0
movq %r15, %rdi
callq 0x2320
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
leaq 0x9ab5(%rip), %rsi      # 0x23d69
callq 0x2280
movss 0x58(%rsp), %xmm0
divss 0x54(%rsp), %xmm0
cvtss2sd %xmm0, %xmm0
movq %rbx, %rdi
callq 0x2320
leaq 0x28(%rsp), %rdi
leaq 0x8b94(%rip), %rsi      # 0x22e71
callq 0x2090
testl %eax, %eax
jne 0x1a3a4
leaq 0xc(%r13), %rax
xorl %ebx, %ebx
cmpq 0x18(%rsp), %rax
ja 0x1a303
movq 0x10(%rsp), %rax
movl 0x8(%rax,%r13), %ebx
bswapl %ebx
movl $0x15, %edx
movq %r15, %rdi
leaq 0x9b11(%rip), %rsi      # 0x23e23
callq 0x2280
movl %ebx, %esi
movq %r15, %rdi
callq 0x2150
cmpl $0x1, %ebx
jne 0x1a38c
leaq 0xe(%r13), %r14
cmpq 0x18(%rsp), %r14
ja 0x1a38c
movl $0x9, %edx
movq %r15, %rdi
leaq 0x9af9(%rip), %rsi      # 0x23e39
callq 0x2280
xorps %xmm0, %xmm0
cmpq 0x18(%rsp), %r14
ja 0x1a370
movq 0x10(%rsp), %rax
movzwl 0xc(%rax,%r13), %eax
rolw $0x8, %ax
movzwl %ax, %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
mulsd 0x8c18(%rip), %xmm0     # 0x22f88
movq %r15, %rdi
callq 0x2320
movl $0x1, %edx
movq %rax, %rdi
leaq 0x8b67(%rip), %rsi      # 0x22eee
callq 0x2280
testl %ebx, %ebx
jne 0x1a3a4
movl $0x9, %edx
movq %r15, %rdi
leaq 0x9aa4(%rip), %rsi      # 0x23e43
callq 0x2280
leaq 0x28(%rsp), %rdi
leaq 0x8ac6(%rip), %rsi      # 0x22e76
callq 0x2090
testl %eax, %eax
jne 0x1a519
leaq 0xa(%r13), %rax
xorl %ebx, %ebx
cmpq 0x18(%rsp), %rax
ja 0x1a3dc
movq 0x10(%rsp), %rax
movzwl 0x8(%rax,%r13), %eax
rolw $0x8, %ax
movzwl %ax, %ebx
leaq 0x10(%r13), %rax
xorps %xmm0, %xmm0
movsd %xmm0, 0x48(%rsp)
cmpq 0x18(%rsp), %rax
ja 0x1a419
movq 0x10(%rsp), %rax
movl 0xc(%rax,%r13), %eax
bswapl %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
mulsd 0x8b75(%rip), %xmm0     # 0x22f80
cvtsd2ss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, 0x48(%rsp)
leal -0x1(%rbx), %eax
leal 0x1(%rbx), %r15d
cmpl $0x3, %eax
movl $0x0, %eax
cmovael %eax, %r15d
cmpl $0x4, %ebx
movl $0x7, %eax
cmovel %eax, %r15d
movl $0x7, %edx
movq 0x10b8c(%rip), %rdi     # 0x2afd0
leaq 0x9844(%rip), %rsi      # 0x23c8f
callq 0x2280
movl %ebx, %esi
movq 0x10b77(%rip), %rdi     # 0x2afd0
callq 0x2150
movq %rax, %rbx
movl $0x9, %edx
movq %rax, %rdi
leaq 0x99dd(%rip), %rsi      # 0x23e4d
callq 0x2280
movq %rbx, %rdi
movsd 0x48(%rsp), %xmm0
callq 0x2320
testl %r15d, %r15d
jle 0x1a519
movl $0xa, %edx
movq 0x10b38(%rip), %rdi     # 0x2afd0
leaq 0x99b8(%rip), %rsi      # 0x23e57
callq 0x2280
movq 0x80(%rsp), %rax
leaq (%rax,%r13), %rbx
leaq 0x14(%r13), %r14
shll $0x2, %r15d
xorl %r12d, %r12d
testq %r12, %r12
je 0x1a4d8
movl $0x2, %edx
movq 0x10b04(%rip), %rdi     # 0x2afd0
leaq 0x97e3(%rip), %rsi      # 0x23cb6
callq 0x2280
leaq (%r14,%r12), %rax
xorps %xmm0, %xmm0
cmpq 0x18(%rsp), %rax
ja 0x1a504
movl -0x3(%rbx,%r12), %eax
bswapl %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
mulsd 0x8a84(%rip), %xmm0     # 0x22f80
cvtsd2ss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
movq 0x10ac5(%rip), %rdi     # 0x2afd0
callq 0x2320
addq $0x4, %r12
cmpq %r12, %r15
jne 0x1a4bb
leaq 0x28(%rsp), %rdi
leaq 0x993d(%rip), %rsi      # 0x23e62
callq 0x2090
testl %eax, %eax
jne 0x1a5d4
movl $0x1, %edx
movq 0x10a92(%rip), %rdi     # 0x2afd0
leaq 0x936a(%rip), %rsi      # 0x238af
callq 0x2280
cmpl $0x9, %ebp
jb 0x1a5d4
movq 0x78(%rsp), %rax
leaq (%rax,%r13), %rbx
leaq 0xc(%r13), %r14
xorl %r15d, %r15d
leaq (%r14,%r15), %rax
xorps %xmm0, %xmm0
movsd %xmm0, 0x48(%rsp)
cmpq 0x18(%rsp), %rax
ja 0x1a59b
movl -0x3(%rbx,%r15), %eax
bswapl %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
mulsd 0x89f3(%rip), %xmm0     # 0x22f80
cvtsd2ss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, 0x48(%rsp)
movl $0x1, %edx
movq 0x10a29(%rip), %r12     # 0x2afd0
movq %r12, %rdi
leaq 0x9b71(%rip), %rsi      # 0x24122
callq 0x2280
movq %r12, %rdi
movsd 0x48(%rsp), %xmm0
callq 0x2320
leaq 0x4(%r15), %rax
addq $0xc, %r15
cmpq %rbp, %r15
movq %rax, %r15
jb 0x1a563
leaq 0x28(%rsp), %rdi
leaq 0x9887(%rip), %rsi      # 0x23e67
callq 0x2090
movq 0x109e4(%rip), %r15     # 0x2afd0
testl %eax, %eax
jne 0x1a73f
leaq 0xa(%r13), %rax
cmpq 0x18(%rsp), %rax
jbe 0x1a603
xorl %ebx, %ebx
jmp 0x1a615
movq 0x10(%rsp), %rax
movzwl 0x8(%rax,%r13), %eax
rolw $0x8, %ax
movzwl %ax, %ebx
movl $0x4, %edx
movq %r15, %rdi
leaq 0x9848(%rip), %rsi      # 0x23e6c
callq 0x2280
movq 0x109a0(%rip), %rdi     # 0x2afd0
movq %rbx, %rsi
callq 0x2150
movq %rax, %r15
movl $0xa, %edx
movq %rax, %rdi
leaq 0x9827(%rip), %rsi      # 0x23e71
callq 0x2280
leaq 0xc(%r13), %rax
cmpq 0x18(%rsp), %rax
jbe 0x1a65e
xorl %esi, %esi
jmp 0x1a670
movq 0x10(%rsp), %rax
movzwl 0xa(%rax,%r13), %eax
rolw $0x8, %ax
movzwl %ax, %esi
movq %r15, %rdi
callq 0x2150
testq %rbx, %rbx
movq 0x1094e(%rip), %r15     # 0x2afd0
je 0x1a73f
leaq 0x14(%r13), %r14
movl $0x4, %edx
movq %r15, %rdi
leaq 0x96c9(%rip), %rsi      # 0x23d64
callq 0x2280
leaq -0x4(%r14), %rax
xorps %xmm0, %xmm0
cmpq 0x18(%rsp), %rax
ja 0x1a6d2
movq 0x10(%rsp), %rax
movl -0x8(%rax,%r14), %eax
bswapl %eax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
mulsd 0x88b6(%rip), %xmm0     # 0x22f80
cvtsd2ss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
movq 0x108f7(%rip), %rdi     # 0x2afd0
callq 0x2320
movq %rax, %r15
movl $0x1, %edx
movq %rax, %rdi
leaq 0x9679(%rip), %rsi      # 0x23d69
callq 0x2280
xorps %xmm0, %xmm0
cmpq 0x18(%rsp), %r14
ja 0x1a723
movq 0x10(%rsp), %rax
movl -0x4(%rax,%r14), %eax
bswapl %eax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
mulsd 0x8865(%rip), %xmm0     # 0x22f80
cvtsd2ss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
movq %r15, %rdi
callq 0x2320
addq $0x8, %r14
decq %rbx
movq 0x10897(%rip), %r15     # 0x2afd0
jne 0x1a68c
leaq 0x28(%rsp), %rdi
leaq 0x9731(%rip), %rsi      # 0x23e7c
callq 0x2090
testl %eax, %eax
je 0x1a77e
leaq 0x28(%rsp), %rdi
leaq 0x9721(%rip), %rsi      # 0x23e81
callq 0x2090
testl %eax, %eax
je 0x1a77e
leaq 0x28(%rsp), %rdi
leaq 0x9711(%rip), %rsi      # 0x23e86
callq 0x2090
testl %eax, %eax
jne 0x1a7e8
movl $0x2, %edx
movq %r15, %rdi
leaq 0x9ba1(%rip), %rsi      # 0x2432e
callq 0x2280
leaq 0x28(%rsp), %rdi
leaq 0x96e3(%rip), %rsi      # 0x23e81
callq 0x2090
testl %eax, %eax
movl $0x8, %ebx
movl $0x1c, %eax
cmoveq %rax, %rbx
cmpq %rbp, %rbx
jae 0x1a7e8
addq 0x10(%rsp), %r13
movb (%r13,%rbx), %al
leal -0x20(%rax), %ecx
cmpb $0x5e, %cl
ja 0x1a7e0
movb %al, 0x27(%rsp)
movl $0x1, %edx
movq %r15, %rdi
leaq 0x27(%rsp), %rsi
callq 0x2280
incq %rbx
cmpq %rbx, %rbp
jne 0x1a7bd
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2210
movsbl %al, %esi
movq %r15, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2160
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
movq 0x68(%rsp), %r13
je 0x1a828
callq 0x2200
incq %r13
cmpq 0x60(%rsp), %r13
sete %al
orb %al, 0x5c(%rsp)
je 0x19f08
jmp 0x194a6
jmp 0x1a862
jmp 0x1a862
jmp 0x1a862
movq %rax, %rbx
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
jmp 0x1a890
jmp 0x1a883
jmp 0x1a883
jmp 0x1a862
jmp 0x1a862
jmp 0x1a883
jmp 0x1a862
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r14, %rdi
jne 0x1a895
jmp 0x1a89a
jmp 0x1a883
jmp 0x1a883
jmp 0x1a883
jmp 0x1a883
jmp 0x1a883
jmp 0x1a883
jmp 0x1a883
jmp 0x1a883
jmp 0x1a883
movq %rax, %rbx
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x1a89a
callq 0x2200
movq %rbx, %rdi
callq 0x2390