// File: 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
movq %rsp, %rbp
subq $0xd0, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rsi
movq %rsi, -0x80(%rbp)
movq %rsi, %rdi
addq $0x1b018, %rdi          # imm = 0x1B018
addq $0x1b020, %rsi          # imm = 0x1B020
xorl %edx, %edx
callq 0x65c0
movq -0x80(%rbp), %rax
movq 0x808(%rax), %rdi
callq 0xee00
movq -0x80(%rbp), %rax
testb $0x1, 0x7810(%rax)
jne 0x11b76
movq -0x80(%rbp), %rdi
callq 0x30bc0
testb $0x1, %al
jne 0x11a22
jmp 0x11b76
movq -0x80(%rbp), %rdi
movb $0x1, 0x7810(%rdi)
addq $0x7814, %rdi           # imm = 0x7814
leaq 0x23985(%rip), %rsi     # 0x353c0
movl $0x400, %edx            # imm = 0x400
callq 0x5200
movq -0x80(%rbp), %rdi
addq $0x7c14, %rdi           # imm = 0x7C14
leaq 0x23d69(%rip), %rsi     # 0x357c0
movl $0x1000, %edx           # imm = 0x1000
callq 0x5200
movq -0x80(%rbp), %rdi
addq $0x8c14, %rdi           # imm = 0x8C14
xorl %esi, %esi
movl $0xac0, %edx            # imm = 0xAC0
callq 0x5150
movq -0x80(%rbp), %rdi
addq $0x8c14, %rdi           # imm = 0x8C14
addq $0xac0, %rdi            # imm = 0xAC0
leaq 0x24d2f(%rip), %rsi     # 0x367c0
movl $0xa80, %edx            # imm = 0xA80
callq 0x5200
movl $0xaa0, -0xc(%rbp)      # imm = 0xAA0
cmpl $0x1000, -0xc(%rbp)     # imm = 0x1000
jge 0x11ac8
movq -0x80(%rbp), %rax
movslq -0xc(%rbp), %rcx
movw $0x7fff, 0x8c14(%rax,%rcx,2) # imm = 0x7FFF
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x11aa2
movl $0x4000, -0x10(%rbp)    # imm = 0x4000
movl $0x0, -0x14(%rbp)
cmpl $0x2c8, -0x14(%rbp)     # imm = 0x2C8
jge 0x11b2f
movslq -0x14(%rbp), %rcx
leaq 0x25756(%rip), %rax     # 0x37240
movzbl (%rax,%rcx), %eax
movl %eax, -0x18(%rbp)
cmpl $0x0, -0x18(%rbp)
jle 0x11b22
movq -0x80(%rbp), %rax
movl -0x14(%rbp), %ecx
movw %cx, %dx
movl -0x10(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x10(%rbp)
movslq %ecx, %rcx
movw %dx, 0xac14(%rax,%rcx,2)
movl -0x18(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x11af1
jmp 0x11b24
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x11ad6
movl $0x0, -0x1c(%rbp)
cmpl $0x4000, -0x1c(%rbp)    # imm = 0x4000
jge 0x11b74
movq -0x80(%rbp), %rax
movl $0x7fff, %ecx           # imm = 0x7FFF
subl -0x1c(%rbp), %ecx
movslq %ecx, %rcx
movswl 0xac14(%rax,%rcx,2), %edx
xorl %ecx, %ecx
subl %edx, %ecx
movw %cx, %dx
movslq -0x1c(%rbp), %rcx
movw %dx, 0xac14(%rax,%rcx,2)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x11b36
jmp 0x11b76
movl $0x0, -0x20(%rbp)
cmpl $0x100, -0x20(%rbp)     # imm = 0x100
jge 0x11bb0
movq -0x80(%rbp), %rax
movslq -0x20(%rbp), %rcx
movl $0x0, 0x8(%rax,%rcx,4)
movslq -0x20(%rbp), %rcx
movl $0x0, 0x408(%rax,%rcx,4)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x11b7d
movl $0x0, -0x24(%rbp)
cmpl $0x100, -0x24(%rbp)     # imm = 0x100
jge 0x11be6
movq -0x80(%rbp), %rdi
addq $0x810, %rdi            # imm = 0x810
movslq -0x24(%rbp), %rax
imulq $0x70, %rax, %rax
addq %rax, %rdi
callq 0xe630
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x11bb7
movq -0x80(%rbp), %rax
movq 0x808(%rax), %rdi
addq $0x10, %rdi
movl $0x6, %esi
callq 0x30630
movq %rax, %rcx
movq -0x80(%rbp), %rax
movzbl (%rcx), %ecx
movl %ecx, -0x28(%rbp)
movq 0x808(%rax), %rdi
addq $0x10, %rdi
movl $0x7, %esi
callq 0x30630
movq %rax, -0x30(%rbp)
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x28(%rbp), %eax
jge 0x122df
movq -0x80(%rbp), %rax
movslq -0x34(%rbp), %rcx
imulq $0x70, %rcx, %rcx
leaq 0x810(%rax,%rcx), %rax
movq %rax, -0x40(%rbp)
movq -0x30(%rbp), %rax
movzbl (%rax), %eax
decl %eax
movl %eax, %ecx
movq %rcx, -0x88(%rbp)
subl $0x8, %eax
ja 0x122a4
movq -0x88(%rbp), %rax
leaq 0x22b27(%rip), %rcx     # 0x347a0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x80(%rbp), %rax
movq -0x30(%rbp), %rcx
movzbl 0x1(%rcx), %edx
subl $0x80, %edx
shll $0x2, %edx
movslq -0x34(%rbp), %rcx
movl %edx, 0x8(%rax,%rcx,4)
jmp 0x122b0
movq -0x30(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0x20, %eax
jle 0x11cbd
leaq 0x262db(%rip), %rdi     # 0x37f93
callq 0x5720
movq -0x40(%rbp), %rdi
addq $0x28, %rdi
movq -0x30(%rbp), %rax
movzbl 0x1(%rax), %edx
movl $0x1, %esi
callq 0x30220
movq -0x30(%rbp), %rax
movzbl 0x2(%rax), %eax
shll $0x2, %eax
movslq %eax, %rcx
movq -0x40(%rbp), %rax
movq %rcx, (%rax)
movq $0x0, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x40(%rbp), %rdi
addq $0x28, %rdi
callq 0x30c00
movq %rax, %rcx
movq -0x90(%rbp), %rax
cmpq %rcx, %rax
jae 0x11d40
movq -0x40(%rbp), %rdi
addq $0x28, %rdi
movq -0x48(%rbp), %rsi
callq 0x30880
movl $0x80000000, (%rax)     # imm = 0x80000000
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
jmp 0x11cf4
jmp 0x122b0
movq -0x30(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0x1a, %eax
jle 0x11d5e
leaq 0x26250(%rip), %rdi     # 0x37fa9
callq 0x5720
movq -0x40(%rbp), %rax
movq $0x3ff, (%rax)          # imm = 0x3FF
movq -0x40(%rbp), %rdi
addq $0x28, %rdi
movl $0x100, %esi            # imm = 0x100
xorl %edx, %edx
callq 0x30220
movq -0x40(%rbp), %rdi
addq $0x40, %rdi
movq -0x30(%rbp), %rax
movzbl 0x1(%rax), %edx
movl $0x40, %esi
callq 0x30370
movq $0x0, -0x50(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x40(%rbp), %rdi
addq $0x28, %rdi
callq 0x30c00
movq %rax, %rcx
movq -0x98(%rbp), %rax
cmpq %rcx, %rax
jae 0x11e09
movq -0x80(%rbp), %rdi
addq $0x1ac14, %rdi          # imm = 0x1AC14
movq -0x50(%rbp), %rax
movl %eax, %esi
callq 0x30c20
movl %eax, -0x9c(%rbp)
movq -0x40(%rbp), %rdi
addq $0x28, %rdi
movq -0x50(%rbp), %rsi
callq 0x30880
movl -0x9c(%rbp), %ecx
movl %ecx, (%rax)
movq -0x50(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x50(%rbp)
jmp 0x11d9f
jmp 0x122b0
movq -0x30(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0x20, %eax
jg 0x11e28
movq -0x30(%rbp), %rax
movzbl 0x2(%rax), %eax
cmpl $0x20, %eax
jle 0x11e34
leaq 0x26191(%rip), %rdi     # 0x37fc0
callq 0x5720
movq -0x40(%rbp), %rdi
addq $0x28, %rdi
movq -0x30(%rbp), %rax
movzbl 0x1(%rax), %edx
movl $0x1, %esi
callq 0x30220
movq -0x40(%rbp), %rdi
addq $0x40, %rdi
movq -0x30(%rbp), %rax
movzbl 0x2(%rax), %edx
movl $0x1, %esi
callq 0x30370
movq -0x40(%rbp), %rdi
addq $0x40, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x30940
movb $0x1, (%rax)
jmp 0x122b0
movq -0x30(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl -0x34(%rbp), %eax
jl 0x11e9a
leaq 0x26147(%rip), %rdi     # 0x37fdc
callq 0x5720
movq -0x30(%rbp), %rax
movzbl 0x2(%rax), %eax
cmpl -0x34(%rbp), %eax
jl 0x11eb3
leaq 0x26139(%rip), %rdi     # 0x37fe7
callq 0x5720
jmp 0x122b0
movq -0x30(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0x20, %eax
jle 0x11ed1
leaq 0x26126(%rip), %rdi     # 0x37ff2
callq 0x5720
movq -0x30(%rbp), %rax
movzbl 0x3(%rax), %eax
cmpl -0x34(%rbp), %eax
jl 0x11eea
leaq 0x26125(%rip), %rdi     # 0x3800a
callq 0x5720
movq -0x30(%rbp), %rax
movzbl 0x2(%rax), %eax
cmpl -0x34(%rbp), %eax
jl 0x11f03
leaq 0x26118(%rip), %rdi     # 0x38016
callq 0x5720
movq -0x30(%rbp), %rax
movzbl 0x1(%rax), %eax
movl %eax, %eax
movl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
movq %rax, %rcx
movq -0x40(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x40(%rbp), %rdi
addq $0x58, %rdi
movq -0x30(%rbp), %rax
movzbl 0x1(%rax), %edx
movl $0x1, %esi
callq 0x304c0
movq $0x0, -0x58(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq -0x40(%rbp), %rdi
addq $0x58, %rdi
callq 0x30c70
movq %rax, %rcx
movq -0xa8(%rbp), %rax
cmpq %rcx, %rax
jae 0x11f8f
movq -0x40(%rbp), %rdi
addq $0x58, %rdi
movq -0x58(%rbp), %rsi
callq 0x30c90
movw $0x8000, (%rax)         # imm = 0x8000
movq -0x58(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x58(%rbp)
jmp 0x11f44
jmp 0x122b0
movq -0x30(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0x20, %eax
jle 0x11fad
leaq 0x2607a(%rip), %rdi     # 0x38022
callq 0x5720
movq -0x30(%rbp), %rax
movzbl 0x2(%rax), %eax
cmpl -0x34(%rbp), %eax
jl 0x11fc6
leaq 0x26078(%rip), %rdi     # 0x38039
callq 0x5720
movq -0x30(%rbp), %rax
movzbl 0x3(%rax), %eax
cmpl $0x1, %eax
jl 0x11fec
movq -0x30(%rbp), %rax
movzbl 0x3(%rax), %eax
movl -0x34(%rbp), %ecx
movq -0x30(%rbp), %rdx
movzbl 0x2(%rdx), %edx
subl %edx, %ecx
cmpl %ecx, %eax
jle 0x11ff8
leaq 0x26051(%rip), %rdi     # 0x38044
callq 0x5720
movq -0x30(%rbp), %rax
movzbl 0x3(%rax), %eax
movl %eax, -0x5c(%rbp)
movq -0x30(%rbp), %rax
movzbl 0x1(%rax), %eax
movl %eax, %eax
movl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
movq %rax, %rcx
movq -0x40(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x40(%rbp), %rdi
addq $0x28, %rdi
movslq -0x5c(%rbp), %rsi
movq -0x30(%rbp), %rax
movzbl 0x1(%rax), %edx
callq 0x30220
movq $0x0, -0x68(%rbp)
movq -0x68(%rbp), %rax
movq %rax, -0xb0(%rbp)
movq -0x40(%rbp), %rdi
addq $0x28, %rdi
callq 0x30c00
movq %rax, %rcx
movq -0xb0(%rbp), %rax
cmpq %rcx, %rax
jae 0x120a0
movl $0x10000, %eax          # imm = 0x10000
cltd
idivl -0x5c(%rbp)
movl %eax, -0xb4(%rbp)
movq -0x40(%rbp), %rdi
addq $0x28, %rdi
movq -0x68(%rbp), %rsi
callq 0x30880
movl -0xb4(%rbp), %ecx
movl %ecx, (%rax)
movq -0x68(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x68(%rbp)
jmp 0x12043
jmp 0x122b0
movq -0x30(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0x20, %eax
jle 0x120be
leaq 0x25f9f(%rip), %rdi     # 0x38058
callq 0x5720
movq -0x30(%rbp), %rax
movzbl 0x2(%rax), %eax
cmpl -0x34(%rbp), %eax
jl 0x120d7
leaq 0x25f9e(%rip), %rdi     # 0x38070
callq 0x5720
movq -0x40(%rbp), %rdi
addq $0x40, %rdi
movq -0x30(%rbp), %rax
movzbl 0x1(%rax), %edx
movl $0x40, %esi
callq 0x30370
movq -0x40(%rbp), %rdi
addq $0x28, %rdi
movl $0x200, %esi            # imm = 0x200
xorl %edx, %edx
callq 0x30220
movl $0x0, -0x6c(%rbp)
cmpl $0x100, -0x6c(%rbp)     # imm = 0x100
jge 0x12193
movq -0x40(%rbp), %rdi
addq $0x28, %rdi
movl -0x6c(%rbp), %eax
shll %eax
movslq %eax, %rsi
callq 0x30880
movq -0x80(%rbp), %rdi
movl $0x8000, (%rax)         # imm = 0x8000
addq $0x1ac14, %rdi          # imm = 0x1AC14
movl -0x6c(%rbp), %esi
callq 0x30c20
movq -0x80(%rbp), %rdi
movl %eax, %esi
sarl $0x8, %esi
callq 0x30cf0
movq -0x80(%rbp), %rdi
movl %eax, %esi
shll $0xa, %esi
callq 0x30cb0
movl %eax, -0xb8(%rbp)
movq -0x40(%rbp), %rdi
addq $0x28, %rdi
movl -0x6c(%rbp), %eax
shll %eax
addl $0x1, %eax
movslq %eax, %rsi
callq 0x30880
movl -0xb8(%rbp), %ecx
movl %ecx, (%rax)
movl -0x6c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x6c(%rbp)
jmp 0x1210c
jmp 0x122b0
movq -0x30(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0x20, %eax
jle 0x121b1
leaq 0x25ed0(%rip), %rdi     # 0x3807c
callq 0x5720
movq -0x30(%rbp), %rax
movzbl 0x2(%rax), %eax
cmpl -0x34(%rbp), %eax
jl 0x121ca
leaq 0x25eac(%rip), %rdi     # 0x38071
callq 0x5720
movq -0x30(%rbp), %rax
movzbl 0x3(%rax), %eax
movq -0x30(%rbp), %rcx
movzbl 0x4(%rcx), %ecx
shll $0x2, %ecx
cmpl %ecx, %eax
jle 0x121ed
leaq 0x25eab(%rip), %rdi     # 0x38093
callq 0x5720
movq -0x40(%rbp), %rdi
addq $0x28, %rdi
movq -0x30(%rbp), %rax
movzbl 0x1(%rax), %edx
movl $0x20, %esi
callq 0x30220
movq -0x30(%rbp), %rax
movzbl 0x4(%rax), %eax
shll $0x2, %eax
movslq %eax, %rcx
movq -0x40(%rbp), %rax
movq %rcx, (%rax)
movq $0x0, -0x78(%rbp)
movq -0x78(%rbp), %rax
movq %rax, -0xc0(%rbp)
movq -0x40(%rbp), %rdi
addq $0x28, %rdi
callq 0x30c00
movq %rax, %rcx
movq -0xc0(%rbp), %rax
cmpq %rcx, %rax
jae 0x122a2
movq -0x80(%rbp), %rdi
movq -0x78(%rbp), %rax
andq $0x1f, %rax
shlq $0x6, %rax
subq $0x3e0, %rax            # imm = 0x3E0
movl %eax, %esi
callq 0x30d10
shll $0x11, %eax
movq -0x30(%rbp), %rcx
movzbl 0x3(%rcx), %ecx
orl %ecx, %eax
movl %eax, -0xc4(%rbp)
movq -0x40(%rbp), %rdi
addq $0x28, %rdi
movq -0x78(%rbp), %rsi
callq 0x30880
movl -0xc4(%rbp), %ecx
movl %ecx, (%rax)
movq -0x78(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x78(%rbp)
jmp 0x12224
jmp 0x122b0
leaq 0x25dfc(%rip), %rdi     # 0x380a7
callq 0x5720
movq -0x30(%rbp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x22900(%rip), %rax     # 0x34bc0
movl (%rax,%rcx,4), %ecx
movq -0x30(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x11c2c
addq $0xd0, %rsp
popq %rbp
retq
nopl (%rax,%rax)