// File: /workspace/github_cpp_makefile_star2_O2/twekkel[P]mzpq/libzpaq.cpp
// Function: libzpaq::compressBlock(libzpaq::StringBuffer*, libzpaq::Writer*, char const*, char const*, char const*, bool)
void compressBlock(StringBuffer* in, Writer* out, const char* method_,
                   const char* filename, const char* comment, bool dosha1) {
  assert(in);
  assert(out);
  assert(method_);
  assert(method_[0]);
  std::string method=method_;
  const unsigned n=in->size();  // input size
  const int arg0=MAX(lg(n+4095)-20, 0);  // block size
  assert((1u<<(arg0+20))>=n+4096);

  // Get type from method "LB,R,t" where L is level 0..5, B is block
  // size 0..11, R is redundancy 0..255, t = 0..3 = binary, text, exe, both.
  unsigned type=0;
  if (isdigit(method[0])) {
    int commas=0, arg[4]={0};
    for (int i=1; i<int(method.size()) && commas<4; ++i) {
      if (method[i]==',' || method[i]=='.') ++commas;
      else if (isdigit(method[i])) arg[commas]=arg[commas]*10+method[i]-'0';
    }
    if (commas==0) type=512;
    else type=arg[1]*4+arg[2];
  }

  // Get hash of input
  libzpaq::SHA1 sha1;
  const char* sha1ptr=0;
#ifdef DEBUG
  if (true) {
#else
  if (dosha1) {
#endif
    sha1.write(in->c_str(), n);
    sha1ptr=sha1.result();
  }

  // Expand default methods
  if (isdigit(method[0])) {
    const int level=method[0]-'0';
    assert(level>=0 && level<=9);

    // build models
    const int doe8=(type&2)*2;
    method="x"+itos(arg0);
    std::string htsz=","+itos(19+arg0+(arg0<=6));  // lz77 hash table size
    std::string sasz=","+itos(21+arg0);            // lz77 suffix array size

    // store uncompressed
    if (level==0)
      method="0"+itos(arg0)+",0";

    // LZ77, no model. Store if hard to compress
    else if (level==1) {
      if (type<40) method+=",0";
      else {
        method+=","+itos(1+doe8)+",";
        if      (type<80)  method+="4,0,1,15";
        else if (type<128) method+="4,0,2,16";
        else if (type<256) method+="4,0,2"+htsz;
        else if (type<960) method+="5,0,3"+htsz;
        else               method+="6,0,3"+htsz;
      }
    }

    // LZ77 with longer search
    else if (level==2) {
      if (type<32) method+=",0";
      else {
        method+=","+itos(1+doe8)+",";
        if (type<64) method+="4,0,3"+htsz;
        else method+="4,0,7"+sasz+",1";
      }
    }

    // LZ77 with CM depending on redundancy
    else if (level==3) {
      if (type<20)  // store if not compressible
        method+=",0";
      else if (type<48)  // fast LZ77 if barely compressible
        method+=","+itos(1+doe8)+",4,0,3"+htsz;
      else if (type>=640 || (type&1))  // BWT if text or highly compressible
        method+=","+itos(3+doe8)+"ci1";
      else  // LZ77 with O0-1 compression of up to 12 literals
        method+=","+itos(2+doe8)+",12,0,7"+sasz+",1c0,0,511i2";
    }

    // LZ77+CM, fast CM, or BWT depending on type
    else if (level==4) {
      if (type<12)
        method+=",0";
      else if (type<24)
        method+=","+itos(1+doe8)+",4,0,3"+htsz;
      else if (type<48)
        method+=","+itos(2+doe8)+",5,0,7"+sasz+"1c0,0,511";
      else if (type<900) {
        method+=","+itos(doe8)+"ci1,1,1,1,2a";
        if (type&1) method+="w";
        method+="m";
      }
      else
        method+=","+itos(3+doe8)+"ci1";
    }

    // Slow CM with lots of models
    else {  // 5..9

      // Model text files
      method+=","+itos(doe8);
      if (type&1) method+="w2c0,1010,255i1";
      else method+="w1i1";
      method+="c256ci1,1,1,1,1,1,2a";

      // Analyze the data
      const int NR=1<<12;
      int pt[256]={0};  // position of last occurrence
      int r[NR]={0};    // count repetition gaps of length r
      const unsigned char* p=in->data();
      if (level>0) {
        for (unsigned i=0; i<n; ++i) {
          const int k=i-pt[p[i]];
          if (k>0 && k<NR) ++r[k];
          pt[p[i]]=i;
        }
      }

      // Add periodic models
      int n1=n-r[1]-r[2]-r[3];
      for (int i=0; i<2; ++i) {
        int period=0;
        double score=0;
        int t=0;
        for (int j=5; j<NR && t<n1; ++j) {
          const double s=r[j]/(256.0+n1-t);
          if (s>score) score=s, period=j;
          t+=r[j];
        }
        if (period>4 && score>0.1) {
          method+="c0,0,"+itos(999+period)+",255i1";
          if (period<=255)
            method+="c0,"+itos(period)+"i1";
          n1-=r[period];
          r[period]=0;
        }
        else
          break;
      }
      method+="c0,2,0,255i1c0,3,0,0,255i1c0,4,0,0,0,255i1mm16ts19t0";
    }
  }

  // Compress
  std::string config;
  int args[9]={0};
  config=makeConfig(method.c_str(), args);
  assert(n<=(0x100000u<<args[0])-4096);
  libzpaq::Compressor co;
  co.setOutput(out);
#ifdef DEBUG
  co.setVerify(true);
#endif
  StringBuffer pcomp_cmd;
  co.writeTag();
  co.startBlock(config.c_str(), args, &pcomp_cmd);
  std::string cs=itos(n);
  if (comment) cs=cs+" "+comment;
  co.startSegment(filename, cs.c_str());
  if (args[1]>=1 && args[1]<=7 && args[1]!=4) {  // LZ77 or BWT
    LZBuffer lz(*in, args);
    co.setInput(&lz);
    co.compress();
  }
  else {  // compress with e8e9 or no preprocessing
    if (args[1]>=4 && args[1]<=7)
      e8e9(in->data(), in->size());
    co.setInput(in);
    co.compress();
  }
#ifdef DEBUG  // verify pre-post processing are inverses
  int64_t outsize;
  const char* sha1result=co.endSegmentChecksum(&outsize, dosha1);
  assert(sha1result);
  assert(sha1ptr);
  if (memcmp(sha1result, sha1ptr, 20)!=0)
    error("Pre/post-processor test failed");
#else
  co.endSegment(sha1ptr);
#endif
  co.endBlock();
}

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1f488, %rsp          # imm = 0x1F488
movl %r9d, %ebx
movq %r8, 0x118(%rsp)
movq %rcx, 0x108(%rsp)
movq %rsi, 0x110(%rsp)
movq %rdi, %r15
leaq 0x28(%rsp), %r14
leaq 0x4220(%rsp), %rax
movq %r14, %rdi
movq %rdx, %rsi
movq %rax, %rdx
callq 0x4aac
movq %r15, 0x68(%rsp)
movq 0x20(%r15), %r12
movl %r12d, %eax
movq %rax, 0x90(%rsp)
leal 0xfff(%r12), %edi
callq 0x16ae3
leal -0x14(%rax), %ebp
xorl %r13d, %r13d
cmpl $0x15, %eax
cmovll %r13d, %ebp
movq (%r14), %rsi
movsbl (%rsi), %r15d
leal -0x30(%r15), %eax
cmpl $0x9, %eax
ja 0xddac
xorpd %xmm0, %xmm0
movapd %xmm0, 0x4220(%rsp)
movslq 0x30(%rsp), %rdx
xorl %ecx, %ecx
pushq $0x1
popq %rdi
cmpq %rdx, %rdi
jge 0xdd8f
cmpl $0x4, %ecx
jge 0xdd8f
movzbl (%rsi,%rdi), %r8d
movl %r8d, %r9d
orl $0x2, %r9d
cmpl $0x2e, %r9d
jne 0xdd68
incl %ecx
incq %rdi
jmp 0xdd45
movsbl %r8b, %r8d
addl $-0x30, %r8d
cmpl $0x9, %r8d
ja 0xdd63
movslq %ecx, %r9
imull $0xa, 0x4220(%rsp,%r9,4), %r10d
addl %r10d, %r8d
movl %r8d, 0x4220(%rsp,%r9,4)
jmp 0xdd63
movl 0x4224(%rsp), %edx
shll $0x2, %edx
addl 0x4228(%rsp), %edx
testl %ecx, %ecx
movl $0x200, %r13d           # imm = 0x200
cmovnel %edx, %r13d
andq $0x0, 0x120(%rsp)
movapd 0x104c3(%rip), %xmm0    # 0x1e280
movupd %xmm0, 0x128(%rsp)
movl $0xc3d2e1f0, 0x138(%rsp) # imm = 0xC3D2E1F0
xorpd %xmm0, %xmm0
movupd %xmm0, 0x13c(%rsp)
movupd %xmm0, 0x14c(%rsp)
movupd %xmm0, 0x15c(%rsp)
movupd %xmm0, 0x16c(%rsp)
testb %bl, %bl
je 0xde3f
movq 0x68(%rsp), %rax
movq 0x10(%rax), %rsi
leaq 0x120(%rsp), %rbx
movq %rbx, %rdi
movq 0x90(%rsp), %rdx
callq 0x4dc0
movq %rbx, %rdi
callq 0x4cd8
movq %rax, 0x98(%rsp)
movq 0x28(%rsp), %rsi
movsbl (%rsi), %r15d
movl %r15d, %eax
addl $-0x30, %eax
jmp 0xde4b
movq $0x0, 0x98(%rsp)
cmpl $0x9, %eax
ja 0xe7f2
movslq %ebp, %r14
leaq 0x190(%rsp), %rdi
pushq $0x1
popq %rdx
movq %r14, %rsi
callq 0x169cf
leaq 0x142da(%rip), %rsi     # 0x2214b
leaq 0x4220(%rsp), %rdi
leaq 0x190(%rsp), %rdx
callq 0x1cb73
leaq 0x28(%rsp), %rdi
leaq 0x4220(%rsp), %rbx
movq %rbx, %rsi
callq 0x4220
movq %rbx, %rdi
callq 0x43a8
leaq 0x190(%rsp), %rdi
callq 0x43a8
xorl %eax, %eax
cmpl $0x7, %ebp
setl %al
leal 0x13(%rbp,%rax), %eax
movslq %eax, %rsi
leaq 0x4220(%rsp), %rdi
pushq $0x1
popq %rdx
callq 0x169cf
leaq 0x16ea6(%rip), %rsi     # 0x24d7c
leaq 0xa0(%rsp), %rdi
leaq 0x4220(%rsp), %rdx
callq 0x1cb73
leaq 0x4220(%rsp), %rdi
callq 0x43a8
addl $0x15, %ebp
movslq %ebp, %rsi
leaq 0x4220(%rsp), %rdi
pushq $0x1
popq %rdx
callq 0x169cf
leaq 0x16e67(%rip), %rsi     # 0x24d7c
leaq 0xe0(%rsp), %rdi
leaq 0x4220(%rsp), %rdx
callq 0x1cb73
leal (,%r13,2), %ebx
andl $0x4, %ebx
leaq 0x4220(%rsp), %rdi
callq 0x43a8
movzbl %r15b, %eax
addl $-0x30, %eax
movl %ebx, %esi
cmpl $0x4, %eax
ja 0xe28c
leaq 0x108e9(%rip), %rcx     # 0x1e844
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
leaq 0x16d77(%rip), %r15     # 0x24ce0
jmpq *%rax
leaq 0x8(%rsp), %rdi
pushq $0x1
popq %rdx
movq %r14, %rsi
callq 0x169cf
leaq 0x16d5f(%rip), %rsi     # 0x24ce1
leaq 0x190(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x1cb73
leaq 0x16d45(%rip), %rdx     # 0x24ce0
leaq 0x4220(%rsp), %rdi
leaq 0x190(%rsp), %rsi
callq 0x1caed
leaq 0x28(%rsp), %rdi
leaq 0x4220(%rsp), %rbx
movq %rbx, %rsi
callq 0x4220
movq %rbx, %rdi
callq 0x43a8
leaq 0x190(%rsp), %rdi
callq 0x43a8
leaq 0x8(%rsp), %rdi
jmp 0xe700
cmpl $0xc, %r13d
jb 0xe7c6
cmpl $0x17, %r13d
ja 0xe536
orl $0x1, %ebx
leaq 0x48(%rsp), %rdi
pushq $0x1
popq %rdx
movq %rbx, %rsi
callq 0x169cf
leaq 0x16d6a(%rip), %rsi     # 0x24d7c
leaq 0x8(%rsp), %rdi
leaq 0x48(%rsp), %rdx
callq 0x1cb73
leaq 0x16ce8(%rip), %rdx     # 0x24d10
leaq 0x190(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x1caed
leaq 0x4220(%rsp), %rdi
leaq 0x190(%rsp), %rsi
leaq 0xa0(%rsp), %rdx
callq 0x1ca70
leaq 0x28(%rsp), %rdi
leaq 0x4220(%rsp), %rsi
callq 0x4380
jmp 0xe1c0
cmpl $0x20, %r13d
jb 0xe7c6
orl $0x1, %ebx
leaq 0x8(%rsp), %rdi
pushq $0x1
popq %rdx
movq %rbx, %rsi
callq 0x169cf
leaq 0x16cea(%rip), %rsi     # 0x24d7c
leaq 0x190(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x1cb73
leaq 0x16cd1(%rip), %rdx     # 0x24d7c
leaq 0x4220(%rsp), %rdi
leaq 0x190(%rsp), %rsi
callq 0x1caed
leaq 0x28(%rsp), %rdi
leaq 0x4220(%rsp), %rsi
callq 0x4380
leaq 0x4220(%rsp), %rdi
callq 0x43a8
leaq 0x190(%rsp), %rdi
callq 0x43a8
leaq 0x8(%rsp), %rdi
callq 0x43a8
cmpl $0x3f, %r13d
ja 0xe6a1
leaq 0x16c0a(%rip), %rsi     # 0x24d11
leaq 0x4220(%rsp), %rdi
leaq 0xa0(%rsp), %rdx
callq 0x1cbbb
leaq 0x28(%rsp), %rdi
leaq 0x4220(%rsp), %rsi
callq 0x4380
leaq 0x4220(%rsp), %rdi
jmp 0xe700
cmpl $0x14, %r13d
jb 0xe7c6
cmpl $0x2f, %r13d
ja 0xe5cc
orl $0x1, %ebx
leaq 0x48(%rsp), %rdi
pushq $0x1
popq %rdx
movq %rbx, %rsi
callq 0x169cf
leaq 0x16c13(%rip), %rsi     # 0x24d7c
leaq 0x8(%rsp), %rdi
leaq 0x48(%rsp), %rdx
callq 0x1cb73
leaq 0x16b91(%rip), %rdx     # 0x24d10
leaq 0x190(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x1caed
leaq 0x4220(%rsp), %rdi
leaq 0x190(%rsp), %rsi
leaq 0xa0(%rsp), %rdx
callq 0x1ca70
leaq 0x28(%rsp), %rdi
leaq 0x4220(%rsp), %rsi
callq 0x4380
leaq 0x4220(%rsp), %rdi
callq 0x43a8
leaq 0x190(%rsp), %rdi
callq 0x43a8
leaq 0x8(%rsp), %rdi
callq 0x43a8
leaq 0x48(%rsp), %rdi
jmp 0xe700
cmpl $0x28, %r13d
jb 0xe7c6
orl $0x1, %ebx
leaq 0x8(%rsp), %rdi
pushq $0x1
popq %rdx
movq %rbx, %rsi
callq 0x169cf
leaq 0x16b6a(%rip), %rsi     # 0x24d7c
leaq 0x190(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x1cb73
leaq 0x16b51(%rip), %rdx     # 0x24d7c
leaq 0x4220(%rsp), %rdi
leaq 0x190(%rsp), %rsi
callq 0x1caed
leaq 0x28(%rsp), %rdi
leaq 0x4220(%rsp), %rsi
callq 0x4380
leaq 0x4220(%rsp), %rdi
callq 0x43a8
leaq 0x190(%rsp), %rdi
callq 0x43a8
leaq 0x8(%rsp), %rdi
callq 0x43a8
cmpl $0x50, %r13d
jae 0xe70a
leaq 0x16a5c(%rip), %r15     # 0x24ce3
jmp 0xe7c6
leaq 0x190(%rsp), %rdi
pushq $0x1
popq %rdx
callq 0x169cf
leaq 0x16ad9(%rip), %rsi     # 0x24d7c
leaq 0x4220(%rsp), %rdi
leaq 0x190(%rsp), %rdx
callq 0x1cb73
leaq 0x28(%rsp), %rdi
leaq 0x4220(%rsp), %rsi
callq 0x4380
leaq 0x4220(%rsp), %rdi
callq 0x43a8
leaq 0x190(%rsp), %rdi
callq 0x43a8
testb $0x1, %r13b
leaq 0x16a6f(%rip), %rax     # 0x24d5e
leaq 0x16a58(%rip), %rsi     # 0x24d4e
cmoveq %rax, %rsi
leaq 0x28(%rsp), %rdi
callq 0x4360
leaq 0x16a58(%rip), %rsi     # 0x24d63
leaq 0x28(%rsp), %rdi
callq 0x4360
leaq 0x190(%rsp), %rdi
xorl %ebp, %ebp
movl $0x400, %edx            # imm = 0x400
xorl %esi, %esi
callq 0x40e0
leaq 0x4220(%rsp), %rdi
movl $0x4000, %edx           # imm = 0x4000
xorl %esi, %esi
callq 0x40e0
movl $0x0, %eax
cmpb $0x31, %r15b
jl 0xe3aa
movq 0x68(%rsp), %rax
movq 0x10(%rax), %rax
xorl %ecx, %ecx
movq 0x90(%rsp), %r8
cmpq %rcx, %r8
je 0xe395
movzbl (%rax,%rcx), %edx
movl 0x190(%rsp,%rdx,4), %esi
movl %esi, %edi
notl %edi
addl %ecx, %edi
cmpl $0xffe, %edi            # imm = 0xFFE
ja 0xe389
negl %esi
addq %rcx, %rsi
movl %esi, %esi
incl 0x4220(%rsp,%rsi,4)
movl %ecx, 0x190(%rsp,%rdx,4)
incq %rcx
jmp 0xe35d
movl 0x4224(%rsp), %eax
addl 0x4228(%rsp), %eax
addl 0x422c(%rsp), %eax
subl %eax, %r12d
leaq 0x70(%rsp), %rbx
leaq 0x48(%rsp), %r15
leaq 0x8(%rsp), %r13
cmpl $0x2, %ebp
je 0xe520
cvtsi2sd %r12d, %xmm0
addsd 0xff7e(%rip), %xmm0     # 0x1e350
xorpd %xmm1, %xmm1
xorl %r14d, %r14d
pushq $0x5
popq %rax
xorl %ecx, %ecx
cmpq $0xfff, %rax            # imm = 0xFFF
ja 0xe41d
cmpl %r12d, %ecx
jge 0xe41d
movl 0x4220(%rsp,%rax,4), %edx
cvtsi2sd %edx, %xmm2
cvtsi2sd %ecx, %xmm3
movapd %xmm0, %xmm4
subsd %xmm3, %xmm4
divsd %xmm4, %xmm2
ucomisd %xmm1, %xmm2
cmoval %eax, %r14d
maxsd %xmm1, %xmm2
addl %edx, %ecx
incq %rax
movapd %xmm2, %xmm1
jmp 0xe3de
cmpl $0x5, %r14d
jl 0xe520
ucomisd 0xff29(%rip), %xmm1     # 0x1e358
jbe 0xe520
leal 0x3e7(%r14), %esi
movq %rbx, %rdi
pushq $0x1
popq %rdx
callq 0x169cf
movq %r15, %rdi
leaq 0x16927(%rip), %rsi     # 0x24d78
movq %rbx, %rdx
callq 0x1cb73
movq %r13, %rdi
movq %r15, %rsi
leaq 0x168f1(%rip), %rdx     # 0x24d57
callq 0x1caed
leaq 0x28(%rsp), %rdi
movq %r13, %rsi
callq 0x4380
movq %r13, %rdi
callq 0x43a8
movq %r15, %r13
movq %r15, %rdi
callq 0x43a8
movq %rbx, %rdi
callq 0x43a8
movl %r14d, %r15d
cmpl $0x100, %r14d           # imm = 0x100
jae 0xe500
movq %rbx, %rdi
movq %r15, %rsi
pushq $0x1
popq %rdx
callq 0x169cf
movq %r13, %r14
movq %r13, %rdi
leaq 0x168c4(%rip), %rsi     # 0x24d7e
movq %rbx, %rdx
callq 0x1cb73
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
leaq 0x1688c(%rip), %rdx     # 0x24d60
callq 0x1caed
leaq 0x28(%rsp), %rdi
movq %rbx, %rsi
callq 0x4380
movq %rbx, %rdi
callq 0x43a8
movq %r13, %rdi
callq 0x43a8
leaq 0x70(%rsp), %rdi
callq 0x43a8
subl 0x4220(%rsp,%r15,4), %r12d
andl $0x0, 0x4220(%rsp,%r15,4)
incl %ebp
leaq 0x70(%rsp), %rbx
movq %r13, %r15
jmp 0xe3b7
leaq 0x1685b(%rip), %rsi     # 0x24d82
leaq 0x28(%rsp), %rdi
callq 0x4360
jmp 0xe7d3
cmpl $0x2f, %r13d
ja 0xe723
orl $0x2, %ebx
leaq 0x70(%rsp), %rdi
pushq $0x1
popq %rdx
movq %rbx, %rsi
callq 0x169cf
leaq 0x16822(%rip), %rsi     # 0x24d7c
leaq 0x48(%rsp), %rdi
leaq 0x70(%rsp), %rdx
callq 0x1cb73
leaq 0x167c0(%rip), %rdx     # 0x24d30
leaq 0x8(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0x1caed
leaq 0x190(%rsp), %rdi
leaq 0x8(%rsp), %rsi
leaq 0xe0(%rsp), %rdx
callq 0x1ca70
leaq 0x16797(%rip), %rdx     # 0x24d37
leaq 0x4220(%rsp), %rdi
leaq 0x190(%rsp), %rsi
callq 0x1caed
leaq 0x28(%rsp), %rdi
leaq 0x4220(%rsp), %rsi
callq 0x4380
jmp 0xe66c
cmpl $0x280, %r13d           # imm = 0x280
setb %al
testb $0x1, %r13b
sete %cl
testb %cl, %al
je 0xea87
orl $0x2, %ebx
leaq 0x70(%rsp), %rdi
pushq $0x1
popq %rdx
movq %rbx, %rsi
callq 0x169cf
leaq 0x1677d(%rip), %rsi     # 0x24d7c
leaq 0x48(%rsp), %rdi
leaq 0x70(%rsp), %rdx
callq 0x1cb73
leaq 0x16706(%rip), %rdx     # 0x24d1b
leaq 0x8(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0x1caed
leaq 0x190(%rsp), %rdi
leaq 0x8(%rsp), %rsi
leaq 0xe0(%rsp), %rdx
callq 0x1ca70
leaq 0x166de(%rip), %rdx     # 0x24d23
leaq 0x4220(%rsp), %rdi
leaq 0x190(%rsp), %rsi
callq 0x1caed
leaq 0x28(%rsp), %rdi
leaq 0x4220(%rsp), %rsi
callq 0x4380
leaq 0x4220(%rsp), %rdi
callq 0x43a8
leaq 0x190(%rsp), %rdi
callq 0x43a8
leaq 0x8(%rsp), %rdi
callq 0x43a8
leaq 0x48(%rsp), %rdi
callq 0x43a8
leaq 0x70(%rsp), %rdi
jmp 0xe700
leaq 0x1665f(%rip), %rsi     # 0x24d07
leaq 0x190(%rsp), %rdi
leaq 0xe0(%rsp), %rdx
callq 0x1cbbb
leaq 0x16649(%rip), %rdx     # 0x24d0d
leaq 0x4220(%rsp), %rdi
leaq 0x190(%rsp), %rsi
callq 0x1caed
leaq 0x28(%rsp), %rdi
leaq 0x4220(%rsp), %rsi
callq 0x4380
leaq 0x4220(%rsp), %rdi
callq 0x43a8
leaq 0x190(%rsp), %rdi
callq 0x43a8
jmp 0xe7d3
cmpl $0x80, %r13d
jae 0xeae6
leaq 0x165ce(%rip), %r15     # 0x24cec
jmp 0xe7c6
cmpl $0x383, %r13d           # imm = 0x383
ja 0xeb26
leaq 0x8(%rsp), %rdi
pushq $0x1
popq %rdx
callq 0x169cf
leaq 0x16638(%rip), %rsi     # 0x24d7c
leaq 0x190(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x1cb73
leaq 0x165e4(%rip), %rdx     # 0x24d41
leaq 0x4220(%rsp), %rdi
leaq 0x190(%rsp), %rsi
callq 0x1caed
leaq 0x28(%rsp), %rdi
leaq 0x4220(%rsp), %rsi
callq 0x4380
leaq 0x4220(%rsp), %rdi
callq 0x43a8
leaq 0x190(%rsp), %rdi
callq 0x43a8
leaq 0x8(%rsp), %rdi
callq 0x43a8
leaq 0x13858(%rip), %r15     # 0x22007
testb $0x1, %r13b
je 0xe7c6
leaq 0x13db7(%rip), %rsi     # 0x22573
leaq 0x28(%rsp), %rdi
callq 0x4360
leaq 0x28(%rsp), %rdi
movq %r15, %rsi
callq 0x4360
leaq 0xe0(%rsp), %rdi
callq 0x43a8
leaq 0xa0(%rsp), %rdi
callq 0x43a8
movq 0x28(%rsp), %rsi
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
xorpd %xmm0, %xmm0
leaq 0xe0(%rsp), %rdx
movapd %xmm0, 0x10(%rdx)
movapd %xmm0, (%rdx)
andl $0x0, 0x20(%rdx)
leaq 0x4220(%rsp), %rdi
callq 0x17ae6
leaq 0x8(%rsp), %rdi
leaq 0x4220(%rsp), %rbx
movq %rbx, %rsi
callq 0x4220
movq %rbx, %rdi
callq 0x43a8
leaq 0x4220(%rsp), %rdi
callq 0x1cc32
leaq 0x4220(%rsp), %rdi
movq 0x110(%rsp), %rax
movq %rax, 0x180(%rdi)
leaq 0x1c48f(%rip), %r14     # 0x2ad00
movq %r14, 0xa0(%rsp)
leaq 0x1c4c0(%rip), %r15     # 0x2ad40
movq %r15, 0xa8(%rsp)
xorpd %xmm0, %xmm0
movupd %xmm0, 0xb0(%rsp)
movupd %xmm0, 0xc0(%rsp)
orq $-0x1, 0xd0(%rsp)
movq $0x80, 0xd8(%rsp)
callq 0xd3ca
movq 0x118(%rsp), %rbx
leaq 0xa8(%rsp), %rcx
movq 0x8(%rsp), %rsi
leaq 0x4220(%rsp), %rdi
leaq 0xe0(%rsp), %rdx
callq 0xd5a6
leaq 0x48(%rsp), %rdi
pushq $0x1
popq %rdx
movq 0x90(%rsp), %rsi
callq 0x169cf
testq %rbx, %rbx
je 0xe94e
leaq 0x162eb(%rip), %rdx     # 0x24bee
leaq 0x70(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0x1ccd1
leaq 0x190(%rsp), %rdi
leaq 0x70(%rsp), %rsi
movq %rbx, %rdx
callq 0x1caed
leaq 0x48(%rsp), %rdi
leaq 0x190(%rsp), %rbx
movq %rbx, %rsi
callq 0x4220
movq %rbx, %rdi
callq 0x43a8
leaq 0x70(%rsp), %rdi
callq 0x43a8
movq 0x48(%rsp), %rdx
leaq 0x4220(%rsp), %rdi
movq 0x108(%rsp), %rsi
callq 0xd658
movl 0xe4(%rsp), %eax
leal -0x1(%rax), %ecx
cmpl $0x7, %ecx
setae %cl
cmpl $0x4, %eax
sete %dl
orb %cl, %dl
jne 0xe9c7
leaq 0x190(%rsp), %rbx
leaq 0xe0(%rsp), %rdx
movq %rbx, %rdi
movq 0x68(%rsp), %rsi
xorl %ecx, %ecx
callq 0x1757c
leaq 0x4220(%rsp), %rdi
movq %rbx, 0x1b1d0(%rdi)
pushq $-0x1
popq %rsi
callq 0xd7de
leaq 0x190(%rsp), %rdi
callq 0x1cd0a
jmp 0xe9fc
andl $-0x4, %eax
cmpl $0x4, %eax
jne 0xe9e0
movq 0x68(%rsp), %rax
movq 0x10(%rax), %rdi
movl 0x20(%rax), %esi
callq 0x16a9f
leaq 0x4220(%rsp), %rdi
movq 0x68(%rsp), %rax
movq %rax, 0x1b1d0(%rdi)
pushq $-0x1
popq %rsi
callq 0xd7de
leaq 0x4220(%rsp), %rdi
movq 0x98(%rsp), %rsi
callq 0xd8fe
movq 0x43a0(%rsp), %rdi
movq (%rdi), %rax
movl $0xff, %esi
callq *(%rax)
leaq 0x4220(%rsp), %rbx
andl $0x0, 0x1b25c(%rbx)
leaq 0x48(%rsp), %rdi
callq 0x43a8
movq %r14, 0xa0(%rsp)
movq %r15, 0xa8(%rsp)
movq 0xb0(%rsp), %rdi
callq 0x4200
movq %rbx, %rdi
callq 0x1cd1e
leaq 0x8(%rsp), %rdi
callq 0x43a8
leaq 0x28(%rsp), %rdi
callq 0x43a8
addq $0x1f488, %rsp          # imm = 0x1F488
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
orl $0x3, %ebx
leaq 0x8(%rsp), %rdi
pushq $0x1
popq %rdx
movq %rbx, %rsi
callq 0x169cf
leaq 0x162db(%rip), %rsi     # 0x24d7c
leaq 0x190(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x1cb73
leaq 0x1625d(%rip), %rdx     # 0x24d17
leaq 0x4220(%rsp), %rdi
leaq 0x190(%rsp), %rsi
callq 0x1caed
leaq 0x28(%rsp), %rdi
leaq 0x4220(%rsp), %rsi
callq 0x4380
jmp 0xeb80
cmpl $0xff, %r13d
ja 0xeb8d
leaq 0x161fb(%rip), %rsi     # 0x24cf5
leaq 0x4220(%rsp), %rdi
leaq 0xa0(%rsp), %rdx
callq 0x1cbbb
leaq 0x28(%rsp), %rdi
leaq 0x4220(%rsp), %rsi
callq 0x4380
jmp 0xe12e
orl $0x3, %ebx
leaq 0x8(%rsp), %rdi
pushq $0x1
popq %rdx
movq %rbx, %rsi
callq 0x169cf
leaq 0x1623c(%rip), %rsi     # 0x24d7c
leaq 0x190(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x1cb73
leaq 0x161be(%rip), %rdx     # 0x24d17
leaq 0x4220(%rsp), %rdi
leaq 0x190(%rsp), %rsi
callq 0x1caed
leaq 0x28(%rsp), %rdi
leaq 0x4220(%rsp), %rsi
callq 0x4380
leaq 0x4220(%rsp), %rdi
jmp 0xdfc8
cmpl $0x3bf, %r13d           # imm = 0x3BF
ja 0xebc9
leaq 0x1615e(%rip), %rsi     # 0x24cfb
leaq 0x4220(%rsp), %rdi
leaq 0xa0(%rsp), %rdx
callq 0x1cbbb
leaq 0x28(%rsp), %rdi
leaq 0x4220(%rsp), %rsi
callq 0x4380
jmp 0xe12e
leaq 0x16131(%rip), %rsi     # 0x24d01
leaq 0x4220(%rsp), %rdi
leaq 0xa0(%rsp), %rdx
callq 0x1cbbb
leaq 0x28(%rsp), %rdi
leaq 0x4220(%rsp), %rsi
callq 0x4380
jmp 0xe12e
jmp 0xecb3
jmp 0xecb3
jmp 0xee1b
jmp 0xee1b
jmp 0xecb3
jmp 0xee1b
jmp 0xed21
jmp 0xed21
jmp 0xed5c
jmp 0xed5c
jmp 0xed7e
jmp 0xed7e
jmp 0xee1b
jmp 0xee1b
jmp 0xec44
movq %rax, %rbx
leaq 0x4220(%rsp), %rdi
callq 0x43a8
jmp 0xec5b
jmp 0xec58
movq %rax, %rbx
leaq 0x190(%rsp), %rdi
callq 0x43a8
jmp 0xee2d
jmp 0xed21
jmp 0xee2a
jmp 0xee2a
jmp 0xed5c
jmp 0xee20
jmp 0xee20
jmp 0xed7e
jmp 0xee25
jmp 0xee25
jmp 0xee1b
jmp 0xee1b
jmp 0xee1b
jmp 0xed4a
jmp 0xed6e
movq %rax, %rbx
leaq 0x4220(%rsp), %rdi
jmp 0xee46
jmp 0xee1b
jmp 0xeccf
jmp 0xee1b
movq %rax, %rbx
leaq 0x4220(%rsp), %rdi
callq 0x43a8
jmp 0xece6
jmp 0xece3
movq %rax, %rbx
leaq 0x190(%rsp), %rdi
callq 0x43a8
jmp 0xecfa
jmp 0xecf7
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x43a8
jmp 0xed0b
jmp 0xed08
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
jmp 0xee46
jmp 0xee1b
jmp 0xee1b
jmp 0xed21
movq %rax, %rbx
leaq 0x4220(%rsp), %rdi
callq 0x43a8
jmp 0xed5f
jmp 0xed5c
jmp 0xed5c
jmp 0xed7e
jmp 0xed7e
jmp 0xee1b
jmp 0xee1b
jmp 0xee1b
movq %rax, %rbx
leaq 0x4220(%rsp), %rdi
callq 0x43a8
jmp 0xed71
movq %rax, %rbx
leaq 0x190(%rsp), %rdi
callq 0x43a8
jmp 0xed81
movq %rax, %rbx
leaq 0x190(%rsp), %rdi
jmp 0xee46
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
jmp 0xee46
jmp 0xee1b
jmp 0xee1b
jmp 0xee1b
movq %rax, %rbx
leaq 0x190(%rsp), %rdi
callq 0x1cd0a
jmp 0xee6a
jmp 0xee67
movq %rax, %rbx
leaq 0x4220(%rsp), %rdi
jmp 0xee53
movq %rax, %rbx
jmp 0xee58
movq %rax, %rbx
leaq 0x4220(%rsp), %rdi
jmp 0xeea3
jmp 0xedee
movq %rax, %rbx
leaq 0x190(%rsp), %rdi
jmp 0xeea3
movq %rax, %rbx
jmp 0xeea8
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
callq 0x43a8
jmp 0xee6a
jmp 0xee67
jmp 0xee2a
jmp 0xee20
jmp 0xee25
jmp 0xee1b
jmp 0xee62
jmp 0xee13
movq %rax, %rbx
jmp 0xee9e
movq %rax, %rbx
jmp 0xee4b
movq %rax, %rbx
jmp 0xee37
movq %rax, %rbx
jmp 0xee41
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x43a8
leaq 0x48(%rsp), %rdi
callq 0x43a8
leaq 0x70(%rsp), %rdi
callq 0x43a8
leaq 0xe0(%rsp), %rdi
callq 0x43a8
leaq 0xa0(%rsp), %rdi
jmp 0xeea3
movq %rax, %rbx
jmp 0xee74
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x43a8
movq %r14, 0xa0(%rsp)
movq %r15, 0xa8(%rsp)
movq 0xb0(%rsp), %rdi
callq 0x4200
leaq 0x4220(%rsp), %rdi
callq 0x1cd1e
leaq 0x8(%rsp), %rdi
callq 0x43a8
leaq 0x28(%rsp), %rdi
callq 0x43a8
movq %rbx, %rdi
callq 0x4320