// File: /workspace/github_cpp_makefile_star2_O3/twekkel[P]mzpq/libzpaq.cpp
// Function: libzpaq::Predictor::init()
void Predictor::init() {

  // Clear old JIT code if any
  allocx(pcode, pcode_size, 0);

  // Initialize context hash function
  z.inith();

  // Initialize model independent tables
  if (!initTables && isModeled()) {
    initTables=true;
    memcpy(dt2k, sdt2k, sizeof(dt2k));
    memcpy(dt, sdt, sizeof(dt));

    // ssquasht[i]=int(32768.0/(1+exp((i-2048)*(-1.0/64))));
    // Copy middle 1344 of 4096 entries.
    memset(squasht, 0, 1376*2);
    memcpy(squasht+1376, ssquasht, 1344*2);
    for (int i=2720; i<4096; ++i) squasht[i]=32767;

    // sstretcht[i]=int(log((i+0.5)/(32767.5-i))*64+0.5+100000)-100000;
    int k=16384;
    for (int i=0; i<712; ++i)
      for (int j=stdt[i]; j>0; --j)
        stretcht[k++]=i;
    assert(k==32768);
    for (int i=0; i<16384; ++i)
      stretcht[i]=-stretcht[32767-i];

#ifndef NDEBUG
    // Verify floating point math for squash() and stretch()
    U32 sqsum=0, stsum=0;
    for (int i=32767; i>=0; --i)
      stsum=stsum*3+stretch(i);
    for (int i=4095; i>=0; --i)
      sqsum=sqsum*3+squash(i-2048);
    assert(stsum==3887533746u);
    assert(sqsum==2278286169u);
#endif
  }

  // Initialize predictions
  for (int i=0; i<256; ++i) h[i]=p[i]=0;

  // Initialize components
  for (int i=0; i<256; ++i)  // clear old model
    comp[i].init();
  int n=z.header[6]; // hsize[0..1] hh hm ph pm n (comp)[n] END 0[128] (hcomp) END
  const U8* cp=&z.header[7];  // start of component list
  for (int i=0; i<n; ++i) {
    assert(cp<&z.header[z.cend]);
    assert(cp>&z.header[0] && cp<&z.header[z.header.isize()-8]);
    Component& cr=comp[i];
    switch(cp[0]) {
      case CONS:  // c
        p[i]=(cp[1]-128)*4;
        break;
      case CM: // sizebits limit
        if (cp[1]>32) error("max size for CM is 32");
        cr.cm.resize(1, cp[1]);  // packed CM (22 bits) + CMCOUNT (10 bits)
        cr.limit=cp[2]*4;
        for (size_t j=0; j<cr.cm.size(); ++j)
          cr.cm[j]=0x80000000;
        break;
      case ICM: // sizebits
        if (cp[1]>26) error("max size for ICM is 26");
        cr.limit=1023;
        cr.cm.resize(256);
        cr.ht.resize(64, cp[1]);
        for (size_t j=0; j<cr.cm.size(); ++j)
          cr.cm[j]=st.cminit(j);
        break;
      case MATCH:  // sizebits
        if (cp[1]>32 || cp[2]>32) error("max size for MATCH is 32 32");
        cr.cm.resize(1, cp[1]);  // index
        cr.ht.resize(1, cp[2]);  // buf
        cr.ht(0)=1;
        break;
      case AVG: // j k wt
        if (cp[1]>=i) error("AVG j >= i");
        if (cp[2]>=i) error("AVG k >= i");
        break;
      case MIX2:  // sizebits j k rate mask
        if (cp[1]>32) error("max size for MIX2 is 32");
        if (cp[3]>=i) error("MIX2 k >= i");
        if (cp[2]>=i) error("MIX2 j >= i");
        cr.c=(size_t(1)<<cp[1]); // size (number of contexts)
        cr.a16.resize(1, cp[1]);  // wt[size][m]
        for (size_t j=0; j<cr.a16.size(); ++j)
          cr.a16[j]=32768;
        break;
      case MIX: {  // sizebits j m rate mask
        if (cp[1]>32) error("max size for MIX is 32");
        if (cp[2]>=i) error("MIX j >= i");
        if (cp[3]<1 || cp[3]>i-cp[2]) error("MIX m not in 1..i-j");
        int m=cp[3];  // number of inputs
        assert(m>=1);
        cr.c=(size_t(1)<<cp[1]); // size (number of contexts)
        cr.cm.resize(m, cp[1]);  // wt[size][m]
        for (size_t j=0; j<cr.cm.size(); ++j)
          cr.cm[j]=65536/m;
        break;
      }
      case ISSE:  // sizebits j
        if (cp[1]>32) error("max size for ISSE is 32");
        if (cp[2]>=i) error("ISSE j >= i");
        cr.ht.resize(64, cp[1]);
        cr.cm.resize(512);
        for (int j=0; j<256; ++j) {
          cr.cm[j*2]=1<<15;
          cr.cm[j*2+1]=clamp512k(stretch(st.cminit(j)>>8)*1024);
        }
        break;
      case SSE: // sizebits j start limit
        if (cp[1]>32) error("max size for SSE is 32");
        if (cp[2]>=i) error("SSE j >= i");
        if (cp[3]>cp[4]*4) error("SSE start > limit*4");
        cr.cm.resize(32, cp[1]);
        cr.limit=cp[4]*4;
        for (size_t j=0; j<cr.cm.size(); ++j)
          cr.cm[j]=squash((j&31)*64-992)<<17|cp[3];
        break;
      default: error("unknown component type");
    }
    assert(compsize[*cp]>0);
    cp+=compsize[*cp];
    assert(cp>=&z.header[7] && cp<&z.header[z.cend]);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq 0x1b018(%rdi), %rdi
testq %rdi, %rdi
sete %cl
movl 0x1b020(%rbx), %eax
testl %eax, %eax
sete %dl
testb %dl, %cl
jne 0xb2ab
testq %rdi, %rdi
je 0xb296
movslq %eax, %rsi
callq 0x40f0
movq $0x0, 0x1b018(%rbx)
movl $0x0, 0x1b020(%rbx)
movq 0x808(%rbx), %rdi
movq 0x10(%rdi), %rax
movzbl 0x2(%rax), %esi
movzbl 0x3(%rax), %edx
callq 0x9de0
cmpb $0x0, 0x7810(%rbx)
jne 0xb3d2
movq 0x808(%rbx), %rax
movq 0x10(%rax), %rax
cmpb $0x0, 0x6(%rax)
je 0xb3d2
movb $0x1, 0x7810(%rbx)
leaq 0x7814(%rbx), %rdi
leaq 0x2b796(%rip), %rsi     # 0x36a90
movl $0x400, %edx            # imm = 0x400
callq 0x4140
leaq 0x7c14(%rbx), %rdi
leaq 0x2bb7e(%rip), %rsi     # 0x36e90
movl $0x1000, %edx           # imm = 0x1000
callq 0x4140
leaq 0x8c14(%rbx), %rdi
xorl %r14d, %r14d
movl $0xac0, %edx            # imm = 0xAC0
xorl %esi, %esi
callq 0x40e0
leaq 0x96d4(%rbx), %rdi
leaq 0x2cb50(%rip), %rsi     # 0x37e90
movl $0xa80, %edx            # imm = 0xA80
callq 0x4140
movdqa 0x29f9e(%rip), %xmm0    # 0x352f0
movdqu %xmm0, 0xa154(%rbx,%r14,2)
addq $0x8, %r14
cmpq $0x560, %r14            # imm = 0x560
jne 0xb352
leaq 0xac14(%rbx), %rax
movl $0x4000, %ecx           # imm = 0x4000
xorl %edx, %edx
leaq 0x2d592(%rip), %rsi     # 0x38910
movzbl (%rdx,%rsi), %edi
testl %edi, %edi
je 0xb3a0
movslq %ecx, %rcx
leaq (%rax,%rcx,2), %r8
addl %edi, %ecx
incl %edi
movw %dx, (%r8)
addq $0x2, %r8
decl %edi
cmpl $0x1, %edi
ja 0xb391
incq %rdx
cmpq $0x2c8, %rdx            # imm = 0x2C8
jne 0xb37e
leaq 0x1ac12(%rbx), %rax
xorl %ecx, %ecx
xorl %edx, %edx
subw (%rax), %dx
movw %dx, 0xac14(%rbx,%rcx,2)
incq %rcx
addq $-0x2, %rax
cmpq $0x4000, %rcx           # imm = 0x4000
jne 0xb3b5
leaq 0x8(%rbx), %rdi
leaq 0x810(%rbx), %rax
movq %rax, 0x8(%rsp)
movl $0x800, %edx            # imm = 0x800
movq %rdi, (%rsp)
xorl %esi, %esi
callq 0x40e0
movl $0x810, %r14d           # imm = 0x810
leaq (%rbx,%r14), %rdi
callq 0x981c
addq $0x70, %r14
cmpq $0x7810, %r14           # imm = 0x7810
jne 0xb3f8
movq 0x808(%rbx), %rax
movq 0x10(%rax), %r15
movzbl 0x6(%r15), %eax
movq %rax, 0x10(%rsp)
testq %rax, %rax
je 0xbcfd
addq $0x7, %r15
xorl %ebp, %ebp
movzbl (%r15), %eax
decl %eax
cmpl $0x8, %eax
ja 0xbcd1
imulq $0x70, %rbp, %r14
addq 0x8(%rsp), %r14
leaq 0x2aadf(%rip), %rcx     # 0x35f30
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movzbl 0x1(%r15), %eax
leal -0x200(,%rax,4), %eax
movq (%rsp), %rcx
movl %eax, (%rcx,%rbp,4)
jmp 0xbcdd
movzbl 0x1(%r15), %eax
cmpq %rax, %rbp
ja 0xb488
leaq 0x2e1f9(%rip), %rdi     # 0x3967c
callq 0x455c
movzbl 0x2(%r15), %eax
cmpq %rax, %rbp
ja 0xbcdd
leaq 0x2e1ea(%rip), %rdi     # 0x39687
jmp 0xbcd8
cmpb $0x1b, 0x1(%r15)
jb 0xb4b5
leaq 0x2e199(%rip), %rdi     # 0x39649
callq 0x455c
movq $0x3ff, (%r14)          # imm = 0x3FF
leaq 0x28(%r14), %r13
movl $0x100, %esi            # imm = 0x100
movq %r13, %rdi
xorl %edx, %edx
callq 0x3378c
leaq 0x40(%r14), %rdi
movzbl 0x1(%r15), %edx
movl $0x40, %esi
callq 0x3386a
movq 0x30(%r14), %rcx
testq %rcx, %rcx
je 0xbcdd
movq (%r13), %rsi
movl $0x2, %edi
xorl %r8d, %r8d
leal 0x1(%rdi), %eax
cltq
movzbl 0x1ac14(%rbx,%rax), %eax
movslq %edi, %rdi
movzbl 0x1ac14(%rbx,%rdi), %edx
leal (%rax,%rdx), %r9d
incl %r9d
shll $0x17, %eax
orl $0x400000, %eax         # imm = 0x400000
xorl %edx, %edx
divl %r9d
movl %eax, (%rsi,%r8,4)
incq %r8
addl $0x4, %edi
cmpq %r8, %rcx
jne 0xb4fb
jmp 0xbcdd
movb 0x1(%r15), %al
cmpb $0x20, %al
ja 0xb54a
cmpb $0x21, 0x2(%r15)
jb 0xb55a
leaq 0x2e10f(%rip), %rdi     # 0x39660
callq 0x455c
movb 0x1(%r15), %al
leaq 0x28(%r14), %rdi
movzbl %al, %edx
movl $0x1, %esi
callq 0x3378c
leaq 0x40(%r14), %rdi
movzbl 0x2(%r15), %edx
movl $0x1, %esi
callq 0x3386a
movq 0x40(%r14), %rax
movb $0x1, (%rax)
jmp 0xbcdd
cmpb $0x21, 0x1(%r15)
jb 0xb59d
leaq 0x2e160(%rip), %rdi     # 0x396f8
callq 0x455c
movzbl 0x2(%r15), %eax
cmpq %rax, %rbp
ja 0xb5b3
leaq 0x2e162(%rip), %rdi     # 0x39710
callq 0x455c
leaq 0x40(%r14), %rdi
movzbl 0x1(%r15), %edx
movl $0x40, %esi
callq 0x3386a
leaq 0x28(%r14), %rdi
movl $0x200, %esi            # imm = 0x200
xorl %edx, %edx
callq 0x3378c
movq 0x28(%r14), %rcx
xorl %esi, %esi
movl $0x7ffff, %r8d          # imm = 0x7FFFF
movl $0xfff80000, %r9d       # imm = 0xFFF80000
movl $0x8000, (%rcx,%rsi,8)  # imm = 0x8000
movzbl 0x1ac17(%rbx,%rsi,4), %eax
movzbl 0x1ac16(%rbx,%rsi,4), %edx
leal (%rax,%rdx), %edi
incl %edi
shll $0x17, %eax
orl $0x400000, %eax         # imm = 0x400000
xorl %edx, %edx
divl %edi
shrl $0x7, %eax
andl $0xfffffe, %eax         # imm = 0xFFFFFE
movswl 0xac14(%rbx,%rax), %eax
shll $0xa, %eax
cmpl %r8d, %eax
cmovgel %r8d, %eax
cmpl $0xfff80001, %eax       # imm = 0xFFF80001
cmovll %r9d, %eax
movl %eax, 0x4(%rcx,%rsi,8)
incq %rsi
cmpq $0x100, %rsi            # imm = 0x100
jne 0xb5e8
jmp 0xbcdd
movb 0x1(%r15), %al
cmpb $0x21, %al
jb 0xb660
leaq 0x2dfdc(%rip), %rdi     # 0x39633
callq 0x455c
movb 0x1(%r15), %al
leaq 0x28(%r14), %r13
movzbl %al, %edx
movl $0x1, %esi
movq %r13, %rdi
callq 0x3378c
movzbl 0x2(%r15), %eax
shll $0x2, %eax
movq %rax, (%r14)
movq 0x30(%r14), %rdx
testq %rdx, %rdx
movdqa 0x29c92(%rip), %xmm6    # 0x35320
pcmpeqd %xmm7, %xmm7
movdqa 0x29c95(%rip), %xmm8    # 0x35330
je 0xbcdd
movq (%r13), %rax
leaq 0x3(%rdx), %rcx
andq $-0x4, %rcx
decq %rdx
movq %rdx, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
pxor %xmm6, %xmm0
xorl %edx, %edx
movdqa 0x29c48(%rip), %xmm1    # 0x35310
movdqa 0x29c30(%rip), %xmm2    # 0x35300
movdqa %xmm1, %xmm3
pxor %xmm6, %xmm3
movdqa %xmm3, %xmm4
pcmpgtd %xmm0, %xmm4
pcmpeqd %xmm0, %xmm3
pshufd $0xf5, %xmm3, %xmm5     # xmm5 = xmm3[1,1,3,3]
pand %xmm4, %xmm5
pshufd $0xf5, %xmm4, %xmm3     # xmm3 = xmm4[1,1,3,3]
por %xmm5, %xmm3
movd %xmm3, %esi
notl %esi
testb $0x1, %sil
je 0xb709
movl $0x80000000, (%rax,%rdx,4) # imm = 0x80000000
pxor %xmm7, %xmm3
pextrw $0x4, %xmm3, %esi
testb $0x1, %sil
je 0xb720
movl $0x80000000, 0x4(%rax,%rdx,4) # imm = 0x80000000
movdqa %xmm2, %xmm3
pxor %xmm6, %xmm3
movdqa %xmm3, %xmm4
pcmpgtd %xmm0, %xmm4
pcmpeqd %xmm0, %xmm3
pshufd $0xf5, %xmm3, %xmm5     # xmm5 = xmm3[1,1,3,3]
pand %xmm4, %xmm5
pshufd $0xf5, %xmm4, %xmm3     # xmm3 = xmm4[1,1,3,3]
por %xmm5, %xmm3
pxor %xmm7, %xmm3
pextrw $0x0, %xmm3, %esi
testb $0x1, %sil
je 0xb75d
movl $0x80000000, 0x8(%rax,%rdx,4) # imm = 0x80000000
pextrw $0x4, %xmm3, %esi
testb $0x1, %sil
je 0xb770
movl $0x80000000, 0xc(%rax,%rdx,4) # imm = 0x80000000
addq $0x4, %rdx
paddq %xmm8, %xmm1
paddq %xmm8, %xmm2
cmpq %rdx, %rcx
jne 0xb6d0
jmp 0xbcdd
cmpb $0x21, 0x1(%r15)
jb 0xb79f
leaq 0x2def8(%rip), %rdi     # 0x39692
callq 0x455c
movzbl 0x3(%r15), %eax
cmpq %rax, %rbp
ja 0xb7b5
leaq 0x2defa(%rip), %rdi     # 0x396aa
callq 0x455c
movzbl 0x2(%r15), %eax
cmpq %rax, %rbp
ja 0xb7cb
leaq 0x2def0(%rip), %rdi     # 0x396b6
callq 0x455c
movb 0x1(%r15), %cl
movl $0x1, %eax
shlq %cl, %rax
movq %rax, 0x20(%r14)
leaq 0x58(%r14), %r12
movzbl 0x1(%r15), %edx
movl $0x1, %esi
movq %r12, %rdi
callq 0x33938
movq 0x60(%r14), %rdx
testq %rdx, %rdx
movdqa 0x29b1f(%rip), %xmm11   # 0x35320
pcmpeqd %xmm12, %xmm12
movdqa 0x29b51(%rip), %xmm13   # 0x35360
je 0xbcdd
movq (%r12), %rax
leaq 0x7(%rdx), %rcx
andq $-0x8, %rcx
decq %rdx
movq %rdx, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
xorl %edx, %edx
movdqa 0x29ad8(%rip), %xmm1    # 0x35310
movdqa 0x29ac0(%rip), %xmm2    # 0x35300
movdqa 0x29b08(%rip), %xmm3    # 0x35350
movdqa 0x29af0(%rip), %xmm4    # 0x35340
movdqa %xmm0, %xmm5
pxor %xmm11, %xmm5
movdqa %xmm1, %xmm6
pxor %xmm11, %xmm6
movdqa %xmm6, %xmm8
pcmpgtd %xmm5, %xmm8
pshufd $0xa0, %xmm8, %xmm7     # xmm7 = xmm8[0,0,2,2]
pshuflw $0xe8, %xmm7, %xmm9     # xmm9 = xmm7[0,2,2,3,4,5,6,7]
pcmpeqd %xmm5, %xmm6
pshufd $0xf5, %xmm6, %xmm6     # xmm6 = xmm6[1,1,3,3]
pshuflw $0xe8, %xmm6, %xmm10    # xmm10 = xmm6[0,2,2,3,4,5,6,7]
pand %xmm9, %xmm10
pshufd $0xf5, %xmm8, %xmm8     # xmm8 = xmm8[1,1,3,3]
pshuflw $0xe8, %xmm8, %xmm9     # xmm9 = xmm8[0,2,2,3,4,5,6,7]
por %xmm10, %xmm9
pxor %xmm12, %xmm9
packssdw %xmm9, %xmm9
movd %xmm9, %esi
testb $0x1, %sil
je 0xb8b8
movw $0x8000, (%rax,%rdx,2)  # imm = 0x8000
pand %xmm7, %xmm6
por %xmm8, %xmm6
packssdw %xmm6, %xmm6
pxor %xmm12, %xmm6
packssdw %xmm6, %xmm6
movd %xmm6, %esi
shrl $0x10, %esi
testb $0x1, %sil
je 0xb8e2
movw $0x8000, 0x2(%rax,%rdx,2) # imm = 0x8000
movdqa %xmm2, %xmm7
pxor %xmm11, %xmm7
movdqa %xmm7, %xmm8
pcmpgtd %xmm5, %xmm8
pshufd $0xa0, %xmm8, %xmm6     # xmm6 = xmm8[0,0,2,2]
pcmpeqd %xmm5, %xmm7
pshufd $0xf5, %xmm7, %xmm7     # xmm7 = xmm7[1,1,3,3]
movdqa %xmm7, %xmm9
pand %xmm6, %xmm9
pshufd $0xf5, %xmm8, %xmm8     # xmm8 = xmm8[1,1,3,3]
por %xmm8, %xmm9
packssdw %xmm9, %xmm9
pxor %xmm12, %xmm9
packssdw %xmm9, %xmm9
pextrw $0x2, %xmm9, %esi
testb $0x1, %sil
je 0xb93b
movw $0x8000, 0x4(%rax,%rdx,2) # imm = 0x8000
pshufhw $0x84, %xmm6, %xmm6     # xmm6 = xmm6[0,1,2,3,4,5,4,6]
pshufhw $0x84, %xmm7, %xmm7     # xmm7 = xmm7[0,1,2,3,4,5,4,6]
pand %xmm6, %xmm7
pshufhw $0x84, %xmm8, %xmm6     # xmm6 = xmm8[0,1,2,3,4,5,4,6]
por %xmm7, %xmm6
pxor %xmm12, %xmm6
packssdw %xmm6, %xmm6
pextrw $0x3, %xmm6, %esi
testb $0x1, %sil
je 0xb96e
movw $0x8000, 0x6(%rax,%rdx,2) # imm = 0x8000
movdqa %xmm3, %xmm6
pxor %xmm11, %xmm6
movdqa %xmm6, %xmm8
pcmpgtd %xmm5, %xmm8
pshufd $0xa0, %xmm8, %xmm7     # xmm7 = xmm8[0,0,2,2]
pshuflw $0xe8, %xmm7, %xmm9     # xmm9 = xmm7[0,2,2,3,4,5,6,7]
pcmpeqd %xmm5, %xmm6
pshufd $0xf5, %xmm6, %xmm6     # xmm6 = xmm6[1,1,3,3]
pshuflw $0xe8, %xmm6, %xmm10    # xmm10 = xmm6[0,2,2,3,4,5,6,7]
pand %xmm9, %xmm10
pshufd $0xf5, %xmm8, %xmm8     # xmm8 = xmm8[1,1,3,3]
pshuflw $0xe8, %xmm8, %xmm9     # xmm9 = xmm8[0,2,2,3,4,5,6,7]
por %xmm10, %xmm9
pxor %xmm12, %xmm9
packssdw %xmm9, %xmm9
pextrw $0x4, %xmm9, %esi
testb $0x1, %sil
je 0xb9cf
movw $0x8000, 0x8(%rax,%rdx,2) # imm = 0x8000
pand %xmm7, %xmm6
por %xmm8, %xmm6
packssdw %xmm6, %xmm6
pxor %xmm12, %xmm6
packssdw %xmm6, %xmm6
pextrw $0x5, %xmm6, %esi
testb $0x1, %sil
je 0xb9f7
movw $0x8000, 0xa(%rax,%rdx,2) # imm = 0x8000
movdqa %xmm4, %xmm7
pxor %xmm11, %xmm7
movdqa %xmm7, %xmm8
pcmpgtd %xmm5, %xmm8
pshufd $0xa0, %xmm8, %xmm6     # xmm6 = xmm8[0,0,2,2]
pcmpeqd %xmm5, %xmm7
pshufd $0xf5, %xmm7, %xmm5     # xmm5 = xmm7[1,1,3,3]
movdqa %xmm5, %xmm9
pand %xmm6, %xmm9
pshufd $0xf5, %xmm8, %xmm7     # xmm7 = xmm8[1,1,3,3]
por %xmm7, %xmm9
packssdw %xmm9, %xmm8
pxor %xmm12, %xmm8
packssdw %xmm8, %xmm8
pextrw $0x6, %xmm8, %esi
testb $0x1, %sil
je 0xba50
movw $0x8000, 0xc(%rax,%rdx,2) # imm = 0x8000
pshufhw $0x84, %xmm6, %xmm6     # xmm6 = xmm6[0,1,2,3,4,5,4,6]
pshufhw $0x84, %xmm5, %xmm5     # xmm5 = xmm5[0,1,2,3,4,5,4,6]
pand %xmm6, %xmm5
pshufhw $0x84, %xmm7, %xmm6     # xmm6 = xmm7[0,1,2,3,4,5,4,6]
por %xmm5, %xmm6
pxor %xmm12, %xmm6
packssdw %xmm6, %xmm5
pextrw $0x7, %xmm5, %esi
testb $0x1, %sil
je 0xba82
movw $0x8000, 0xe(%rax,%rdx,2) # imm = 0x8000
addq $0x8, %rdx
paddq %xmm13, %xmm1
paddq %xmm13, %xmm2
paddq %xmm13, %xmm3
paddq %xmm13, %xmm4
cmpq %rdx, %rcx
jne 0xb850
jmp 0xbcdd
cmpb $0x21, 0x1(%r15)
jb 0xbabb
leaq 0x2dc0c(%rip), %rdi     # 0x396c2
callq 0x455c
movzbl 0x2(%r15), %eax
cmpq %rax, %rbp
ja 0xbad1
leaq 0x2dc0d(%rip), %rdi     # 0x396d9
callq 0x455c
movzbl 0x3(%r15), %eax
testl %eax, %eax
je 0xbae7
movzbl 0x2(%r15), %ecx
movl %ebp, %edx
subl %ecx, %edx
cmpl %eax, %edx
jge 0xbaf7
leaq 0x2dbf6(%rip), %rdi     # 0x396e4
callq 0x455c
movb 0x3(%r15), %al
movb 0x1(%r15), %cl
movl $0x1, %edx
shlq %cl, %rdx
movq %rdx, 0x20(%r14)
leaq 0x28(%r14), %r13
movzbl %al, %r12d
movzbl 0x1(%r15), %edx
movq %r13, %rdi
movq %r12, %rsi
callq 0x3378c
movq 0x30(%r14), %rsi
testq %rsi, %rsi
movdqa 0x297f2(%rip), %xmm7    # 0x35320
pcmpeqd %xmm8, %xmm8
movdqa 0x297f4(%rip), %xmm9    # 0x35330
je 0xbcdd
movl $0x10000, %eax          # imm = 0x10000
xorl %edx, %edx
divl %r12d
movq (%r13), %rcx
leaq 0x3(%rsi), %rdx
andq $-0x4, %rdx
decq %rsi
movq %rsi, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
xorl %esi, %esi
movdqa 0x297a1(%rip), %xmm1    # 0x35310
movdqa 0x29789(%rip), %xmm2    # 0x35300
movdqa %xmm0, %xmm3
pxor %xmm7, %xmm3
movdqa %xmm1, %xmm4
pxor %xmm7, %xmm4
movdqa %xmm4, %xmm5
pcmpgtd %xmm3, %xmm5
pcmpeqd %xmm3, %xmm4
pshufd $0xf5, %xmm4, %xmm6     # xmm6 = xmm4[1,1,3,3]
pand %xmm5, %xmm6
pshufd $0xf5, %xmm5, %xmm4     # xmm4 = xmm5[1,1,3,3]
por %xmm6, %xmm4
movd %xmm4, %edi
notl %edi
testb $0x1, %dil
je 0xbbb4
movl %eax, (%rcx,%rsi,4)
pxor %xmm8, %xmm4
pextrw $0x4, %xmm4, %edi
testb $0x1, %dil
je 0xbbc8
movl %eax, 0x4(%rcx,%rsi,4)
movdqa %xmm2, %xmm4
pxor %xmm7, %xmm4
movdqa %xmm4, %xmm5
pcmpgtd %xmm3, %xmm5
pcmpeqd %xmm3, %xmm4
pshufd $0xf5, %xmm4, %xmm4     # xmm4 = xmm4[1,1,3,3]
pand %xmm5, %xmm4
pshufd $0xf5, %xmm5, %xmm3     # xmm3 = xmm5[1,1,3,3]
por %xmm4, %xmm3
pxor %xmm8, %xmm3
pextrw $0x0, %xmm3, %edi
testb $0x1, %dil
je 0xbc02
movl %eax, 0x8(%rcx,%rsi,4)
pextrw $0x4, %xmm3, %edi
testb $0x1, %dil
je 0xbc11
movl %eax, 0xc(%rcx,%rsi,4)
addq $0x4, %rsi
paddq %xmm9, %xmm1
paddq %xmm9, %xmm2
cmpq %rsi, %rdx
jne 0xbb77
jmp 0xbcdd
cmpb $0x21, 0x1(%r15)
jb 0xbc40
leaq 0x2dae1(%rip), %rdi     # 0x3971c
callq 0x455c
movzbl 0x2(%r15), %eax
cmpq %rax, %rbp
ja 0xbc56
leaq 0x2dac0(%rip), %rdi     # 0x39711
callq 0x455c
movzbl 0x3(%r15), %eax
movzbl 0x4(%r15), %ecx
shll $0x2, %ecx
cmpl %eax, %ecx
jae 0xbc73
leaq 0x2dac5(%rip), %rdi     # 0x39733
callq 0x455c
leaq 0x28(%r14), %r13
movzbl 0x1(%r15), %edx
movl $0x20, %esi
movq %r13, %rdi
callq 0x3378c
movzbl 0x4(%r15), %eax
shll $0x2, %eax
movq %rax, (%r14)
movq 0x30(%r14), %rax
testq %rax, %rax
je 0xbcdd
movq (%r13), %rcx
xorl %edx, %edx
xorl %esi, %esi
movl %edx, %edi
andl $0x7c0, %edi            # imm = 0x7C0
movl 0x9454(%rbx,%rdi,2), %edi
shll $0x11, %edi
movzbl 0x3(%r15), %r8d
orl %edi, %r8d
movl %r8d, (%rcx,%rsi,4)
incq %rsi
addq $0x40, %rdx
cmpq %rsi, %rax
jne 0xbca5
jmp 0xbcdd
leaq 0x2da6f(%rip), %rdi     # 0x39747
callq 0x455c
movzbl (%r15), %eax
leaq 0x2a5a8(%rip), %rcx     # 0x36290
movslq (%rcx,%rax,4), %rax
addq %rax, %r15
incq %rbp
cmpq 0x10(%rsp), %rbp
jne 0xb432
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq