LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/twekkel[P]mzpq/libzpaq.cpp
// Function: libzpaq::Decompresser::decompress(int)
bool Decompresser::decompress(int n) {
  assert(state==DATA);
  if (decode_state==SKIP) error("decompression after skipped segment");
  assert(decode_state!=SKIP);

  // Initialize models to start decompressing block
  if (decode_state==FIRSTSEG) {
    dec.init();
    assert(z.header.size()>5);
    pp.init(z.header[4], z.header[5]);
    decode_state=SEG;
  }

  // Decompress and load PCOMP into postprocessor
  while ((pp.getState()&3)!=1)
    pp.write(dec.decompress());

  // Decompress n bytes, or all if n < 0
  while (n) {
    int c=dec.decompress();
    pp.write(c);
    if (c==-1) {
      state=SEGEND;
      return false;
    }
    if (n>0) --n;
  }
  return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movl 0x1b1fc(%rdi), %eax
cmpl $0x2, %eax
jne 0xd0c9
leaq 0x2c7d0(%rip), %rdi     # 0x3988e
callq 0x455c
movl 0x1b1fc(%rbx), %eax
testl %eax, %eax
jne 0xd148
leaq 0xe8(%rbx), %rdi
callq 0xb25c
movq 0x8f0(%rbx), %rax
movq 0x10(%rax), %rax
xorl %ecx, %ecx
cmpb $0x0, 0x6(%rax)
setne %cl
movl %ecx, %eax
negl %eax
movl $0x0, 0xd8(%rbx)
movl %eax, 0xd4(%rbx)
movl %ecx, 0xd0(%rbx)
movq 0x10(%rbx), %rax
movzwl 0x4(%rax), %eax
movd %eax, %xmm0
movq $0x0, 0x1b128(%rbx)
pxor %xmm1, %xmm1
punpcklbw %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1],xmm0[2],xmm1[2],xmm0[3],xmm1[3],xmm0[4],xmm1[4],xmm0[5],xmm1[5],xmm0[6],xmm1[6],xmm0[7],xmm1[7]
punpcklwd %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1],xmm0[2],xmm1[2],xmm0[3],xmm1[3]
movq %xmm0, 0x1b130(%rbx)
leaq 0x1b138(%rbx), %rdi
callq 0x9b6c
movl $0x1, 0x1b1fc(%rbx)
leaq 0x1b128(%rbx), %r14
movl 0x1b128(%rbx), %eax
andl $0x3, %eax
cmpl $0x1, %eax
je 0xd181
leaq 0xc0(%rbx), %r15
movq %r15, %rdi
callq 0xc956
movq %r14, %rdi
movl %eax, %esi
callq 0xccac
movl (%r14), %eax
andl $0x3, %eax
cmpl $0x1, %eax
jne 0xd164
movb $0x1, %r15b
testl %ebp, %ebp
je 0xd1c4
leaq 0xc0(%rbx), %r12
movq %r12, %rdi
callq 0xc956
movl %eax, %r13d
movq %r14, %rdi
movl %eax, %esi
callq 0xccac
cmpl $-0x1, %r13d
je 0xd1b7
xorl %eax, %eax
testl %ebp, %ebp
setg %al
subl %eax, %ebp
jne 0xd18f
jmp 0xd1c4
movl $0x4, 0x1b1f8(%rbx)
xorl %r15d, %r15d
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/twekkel[P]mzpq/libzpaq.cpp
// Function: libzpaq::Decompresser::readSegmentEnd(char*)
void Decompresser::readSegmentEnd(char* sha1string) {
  assert(state==DATA || state==SEGEND);

  // Skip remaining data if any and get next byte
  int c=0;
  if (state==DATA) {
    c=dec.skip();
    decode_state=SKIP;
  }
  else if (state==SEGEND)
    c=dec.get();
  state=FILENAME;

  // Read checksum
  if (c==254) {
    if (sha1string) sha1string[0]=0;  // no checksum
  }
  else if (c==253) {
    if (sha1string) sha1string[0]=1;
    for (int i=1; i<=20; ++i) {
      c=dec.get();
      if (sha1string) sha1string[i]=c;
    }
  }
  else
    error("missing end of segment marker");
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movl 0x1b1f8(%rdi), %eax
cmpl $0x3, %eax
je 0xd1ff
cmpl $0x4, %eax
jne 0xd239
leaq 0xc0(%r14), %rdi
callq 0x33c18
jmp 0xd216
leaq 0xc0(%r14), %rdi
callq 0xcbb6
movl $0x2, 0x1b1fc(%r14)
movl $0x1, 0x1b1f8(%r14)
cmpl $0xfd, %eax
je 0xd255
cmpl $0xfe, %eax
jne 0xd244
testq %rbx, %rbx
je 0xd284
movb $0x0, (%rbx)
jmp 0xd284
movl $0x1, 0x1b1f8(%r14)
leaq 0x2c667(%rip), %rdi     # 0x398b2
popq %rbx
popq %r14
popq %r15
jmp 0x455c
testq %rbx, %rbx
je 0xd25d
movb $0x1, (%rbx)
addq $0xc0, %r14
movl $0x1, %r15d
movq %r14, %rdi
callq 0x33c18
testq %rbx, %rbx
je 0xd27b
movb %al, (%rbx,%r15)
incq %r15
cmpq $0x15, %r15
jne 0xd26a
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/twekkel[P]mzpq/libzpaq.cpp
// Function: libzpaq::decompress(libzpaq::Reader*, libzpaq::Writer*)
void decompress(Reader* in, Writer* out) {
  Decompresser d;
  d.setInput(in);
  d.setOutput(out);
  while (d.findBlock()) {       // don't calculate memory
    while (d.findFilename()) {  // discard filename
      d.readComment();          // discard comment
      d.decompress();           // to end of segment
      d.readSegmentEnd();       // discard sha1string
    }
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x1b200, %rsp          # imm = 0x1B200
movq %rsi, %r15
movq %rdi, %r14
movq %rsp, %rbx
movq %rbx, %rdi
callq 0x33c74
movq %r14, 0xc8(%rbx)
leaq 0x1b138(%rsp), %r14
movq %r15, (%r14)
movq %rbx, %rdi
xorl %esi, %esi
callq 0xce56
testb %al, %al
je 0xd2f8
movq %rbx, %rdi
xorl %esi, %esi
callq 0xcf7c
testb %al, %al
je 0xd2b9
movq %rbx, %rdi
xorl %esi, %esi
callq 0xd01c
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xd09c
movq %rbx, %rdi
xorl %esi, %esi
callq 0xd1d6
jmp 0xd2c7
movq %r14, %rdi
callq 0x9d58
leaq 0x338a1(%rip), %rax     # 0x40ba8
leaq 0x1b110(%rsp), %rdi
movq %rax, -0x1b050(%rdi)
callq 0x33778
leaq 0xe8(%rsp), %rdi
callq 0xb1dc
movq %rsp, %rdi
callq 0x9d58
addq $0x1b200, %rsp          # imm = 0x1B200
popq %rbx
popq %r14
popq %r15
retq
jmp 0xd33f
movq %rax, %rbx
movq %rsp, %rdi
callq 0x33cf6
movq %rbx, %rdi
callq 0x4310
// File: /workspace/github_cpp_makefile_star2_O3/twekkel[P]mzpq/libzpaq.cpp
// Function: libzpaq::Encoder::init()
void Encoder::init() {
  low=1;
  high=0xFFFFFFFF;
  pr.init();
  if (!pr.isModeled()) low=0, buf.resize(1<<16);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movabsq $-0xffffffff, %rax      # imm = 0xFFFFFFFF00000001
movq %rax, 0x8(%rdi)
addq $0x10, %rdi
callq 0xb25c
movq 0x818(%rbx), %rax
movq 0x10(%rax), %rax
cmpb $0x0, 0x6(%rax)
je 0xd380
popq %rbx
retq
movl $0x0, 0x8(%rbx)
addq $0x1b038, %rbx          # imm = 0x1B038
movl $0x10000, %esi          # imm = 0x10000
movq %rbx, %rdi
xorl %edx, %edx
popq %rbx
jmp 0x33a16
// File: /workspace/github_cpp_makefile_star2_O3/twekkel[P]mzpq/libzpaq.cpp
// Function: libzpaq::Encoder::encode(int, int)
void Encoder::encode(int y, int p) {
  assert(out);
  assert(p>=0 && p<65536);
  assert(y==0 || y==1);
  assert(high>low && low>0);
  U32 mid=low+U32(((high-low)*U64(U32(p)))>>16);  // split range
  assert(high>mid && mid>=low);
  if (y) high=mid; else low=mid+1; // pick half
  while ((high^low)<0x1000000) { // write identical leading bytes
    out->put(high>>24);  // same as low>>24
    high=high<<8|255;
    low=low<<8;
    low+=(low==0); // so we don't code 4 0 bytes in a row
  }
}

// Assembly:
pushq %rbx
movl %esi, %eax
movq %rdi, %rbx
movl 0x8(%rdi), %ecx
movl 0xc(%rdi), %edi
movl %edi, %r8d
subl %ecx, %r8d
movl %edx, %esi
imulq %r8, %rsi
shrq $0x10, %rsi
addl %ecx, %esi
testl %eax, %eax
je 0xd3c5
movl %esi, 0xc(%rbx)
jmp 0xd3ce
incl %esi
movl %esi, 0x8(%rbx)
movl %esi, %ecx
movl %edi, %esi
xorl %esi, %ecx
cmpl $0xffffff, %ecx         # imm = 0xFFFFFF
ja 0xd40b
movq (%rbx), %rdi
shrl $0x18, %esi
movq (%rdi), %rax
callq *(%rax)
movl 0x8(%rbx), %eax
movl 0xc(%rbx), %ecx
shll $0x8, %ecx
leal 0xff(%rcx), %esi
movl %esi, 0xc(%rbx)
xorl %edx, %edx
shll $0x8, %eax
sete %dl
orl %eax, %edx
movl %edx, 0x8(%rbx)
xorl %ecx, %eax
cmpl $0x1000000, %eax        # imm = 0x1000000
jb 0xd3d8
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/twekkel[P]mzpq/libzpaq.cpp
// Function: libzpaq::Encoder::compress(int)
void Encoder::compress(int c) {
  assert(out);
  if (pr.isModeled()) {
    if (c==-1)
      encode(1, 0);
    else {
      assert(c>=0 && c<=255);
      encode(0, 0);
      for (int i=7; i>=0; --i) {
        int p=pr.predict()*2+1;
        assert(p>0 && p<65536);
        int y=c>>i&1;
        encode(y, p);
        pr.update(y);
      }
    }
  }
  else {
    if (low && (c<0 || low==buf.size())) {
      out->put((low>>24)&255);
      out->put((low>>16)&255);
      out->put((low>>8)&255);
      out->put(low&255);
      out->write(&buf[0], low);
      low=0;
    }
    if (c>=0) buf[low++]=c;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
movq 0x818(%rdi), %rax
movq 0x10(%rax), %rax
cmpb $0x0, 0x6(%rax)
je 0xd480
cmpl $-0x1, %ebx
je 0xd506
leaq 0x10(%r14), %r15
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xd39e
movl $0x7, %r12d
movq %r15, %rdi
callq 0xca56
leal 0x1(,%rax,2), %edx
xorl %ebp, %ebp
btl %r12d, %ebx
setb %bpl
movq %r14, %rdi
movl %ebp, %esi
callq 0xd39e
movq %r15, %rdi
movl %ebp, %esi
callq 0xcaf6
addl $-0x1, %r12d
jb 0xd44b
jmp 0xd4fd
movl 0x8(%r14), %esi
testq %rsi, %rsi
je 0xd4e4
testl %ebx, %ebx
js 0xd496
cmpq %rsi, 0x1b040(%r14)
jne 0xd4ea
movq (%r14), %rdi
shrl $0x18, %esi
movq (%rdi), %rax
callq *(%rax)
movq (%r14), %rdi
movzbl 0xa(%r14), %esi
movq (%rdi), %rax
callq *(%rax)
movq (%r14), %rdi
movzbl 0x9(%r14), %esi
movq (%rdi), %rax
callq *(%rax)
movq (%r14), %rdi
movzbl 0x8(%r14), %esi
movq (%rdi), %rax
callq *(%rax)
movq (%r14), %rdi
movq 0x1b038(%r14), %rsi
movl 0x8(%r14), %edx
movq (%rdi), %rax
callq *0x8(%rax)
movl $0x0, 0x8(%r14)
xorl %esi, %esi
testl %ebx, %ebx
js 0xd4fd
leal 0x1(%rsi), %eax
movl %eax, 0x8(%r14)
movl %esi, %eax
movq 0x1b038(%r14), %rcx
movb %bl, (%rcx,%rax)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
movl $0x1, %esi
xorl %edx, %edx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xd39e
nop
// File: /workspace/github_cpp_makefile_star2_O3/twekkel[P]mzpq/libzpaq.cpp
// Function: libzpaq::Compiler::next()
void Compiler::next() {
  assert(in);
  for (; *in; ++in) {
    if (*in=='\n') ++line;
    if (*in=='(') state+=1+(state<0);
    else if (state>0 && *in==')') --state;
    else if (state<0 && *in<=' ') state=0;
    else if (state==0 && *in>' ') {state=-1; break;}
  }
  if (!*in) error("unexpected end of config");
}

// Assembly:
movq (%rdi), %rax
movl 0x28(%rdi), %ecx
movl 0x2c(%rdi), %edx
incq %rax
movzbl -0x1(%rax), %esi
cmpl $0xa, %esi
je 0xd539
testl %esi, %esi
jne 0xd542
jmp 0xd59a
incl %ecx
movl %ecx, 0x28(%rdi)
movb -0x1(%rax), %sil
cmpb $0x28, %sil
jne 0xd556
movl %edx, %esi
shrl $0x1f, %esi
leal (%rdx,%rsi), %r8d
incl %r8d
jmp 0xd565
cmpb $0x29, %sil
jne 0xd571
testl %edx, %edx
jle 0xd571
decl %edx
movl %edx, %r8d
movl %r8d, 0x2c(%rdi)
movl %r8d, %edx
movq %rax, (%rdi)
jmp 0xd527
testl %edx, %edx
js 0xd581
cmpb $0x21, %sil
jl 0xd56c
testl %edx, %edx
jne 0xd56c
jmp 0xd58c
xorl %r8d, %r8d
cmpb $0x21, %sil
jl 0xd565
jmp 0xd56c
movl $0xffffffff, 0x2c(%rdi) # imm = 0xFFFFFFFF
cmpb $0x0, -0x1(%rax)
je 0xd59a
retq
leaq 0x2c710(%rip), %rdi     # 0x39cb1
jmp 0x455c
// File: /workspace/github_cpp_makefile_star2_O3/twekkel[P]mzpq/libzpaq.cpp
// Function: libzpaq::Compiler::matchToken(char const*)
bool Compiler::matchToken(const char* word) {
  const char* a=in;
  for (; (*a>' ' && *a!='(' && *word); ++a, ++word)
    if (tolower(*a)!=tolower(*word)) return false;
  return !*word && (*a<=' ' || *a=='(');
}

// Assembly:
movq (%rdi), %rcx
movb (%rcx), %al
cmpb $0x21, %al
setl %dil
cmpb $0x28, %al
sete %dl
orb %dl, %dil
je 0xd5d1
cmpb $0x0, (%rsi)
je 0xd616
xorl %eax, %eax
retq
incq %rcx
movsbl (%rsi), %edx
testl %edx, %edx
je 0xd614
movzbl %al, %eax
leal -0x41(%rax), %edi
leal 0x20(%rax), %r8d
cmpl $0x1a, %edi
cmovael %eax, %r8d
leal -0x41(%rdx), %eax
leal 0x20(%rdx), %edi
cmpl $0x1a, %eax
cmovael %edx, %edi
cmpl %edi, %r8d
jne 0xd5ce
incq %rsi
movb (%rcx), %al
cmpb $0x28, %al
sete %dl
cmpb $0x21, %al
jl 0xd5c9
incq %rcx
cmpb $0x28, %al
jne 0xd5d4
jmp 0xd5c9
xorl %edx, %edx
cmpb $0x21, %al
setl %al
orb %dl, %al
retq
// File: /workspace/github_cpp_makefile_star2_O3/twekkel[P]mzpq/libzpaq.cpp
// Function: libzpaq::Compiler::syntaxError(char const*, char const*)
void Compiler::syntaxError(const char* msg, const char* expected) {
  Array<char> sbuf(128);  // error message to report
  char* s=&sbuf[0];
  strcat(s, "Config line ");
  for (int i=strlen(s), r=1000000; r; r/=10)  // append line number
    if (line/r) s[i++]='0'+line/r%10;
  strcat(s, " at ");
  for (int i=strlen(s); i<40 && *in>' '; ++i)  // append token found
    s[i]=*in++;
  strcat(s, ": ");
  strncat(s, msg, 40);  // append message
  if (expected) {
    strcat(s, ", expected: ");
    strncat(s, expected, 20);  // append expected token if any
  }
  error(s);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r12
xorps %xmm0, %xmm0
movq %rsp, %r14
movaps %xmm0, (%r14)
movl $0x0, 0x10(%r14)
movl $0x80, %esi
movq %r14, %rdi
xorl %edx, %edx
callq 0x33a16
movq (%r14), %r14
movq %r14, %rdi
callq 0x40b0
movabsq $0x6c206769666e6f43, %rcx # imm = 0x6C206769666E6F43
movq %rcx, (%r14,%rax)
movabsq $0x20656e696c2067, %rcx # imm = 0x20656E696C2067
movq %rcx, 0x5(%r14,%rax)
movq %r14, %rdi
callq 0x40b0
movq %rax, %rcx
movl $0xf4240, %esi          # imm = 0xF4240
movl 0x28(%r12), %eax
cltd
idivl %esi
testl %eax, %eax
je 0xd6c0
movslq %eax, %rdx
imulq $0x66666667, %rdx, %rdx # imm = 0x66666667
movq %rdx, %rdi
shrq $0x3f, %rdi
shrq $0x22, %rdx
addl %edi, %edx
addl %edx, %edx
leal (%rdx,%rdx,4), %edx
subl %edx, %eax
addb $0x30, %al
movslq %ecx, %rdx
incl %ecx
movb %al, (%r14,%rdx)
movslq %esi, %rax
imulq $0x66666667, %rax, %rax # imm = 0x66666667
movq %rax, %rdx
shrq $0x3f, %rdx
sarq $0x22, %rax
addl %edx, %eax
addl $0x9, %esi
cmpl $0x13, %esi
movl %eax, %esi
jae 0xd68b
movq %r14, %rdi
callq 0x40b0
movl $0x20746120, (%r14,%rax) # imm = 0x20746120
movb $0x0, 0x4(%r14,%rax)
movq %r14, %rdi
callq 0x40b0
cmpl $0x27, %eax
jg 0xd72f
cltq
incq %rax
movq (%r12), %rcx
cmpb $0x20, (%rcx)
jle 0xd72f
leaq 0x1(%rcx), %rdx
movq %rdx, (%r12)
movb (%rcx), %cl
movb %cl, -0x1(%r14,%rax)
movq %rax, %rcx
incq %rcx
cmpl $0x28, %eax
movq %rcx, %rax
jne 0xd709
movq %r14, %rdi
callq 0x40b0
movw $0x203a, (%r14,%rax)    # imm = 0x203A
movb $0x0, 0x2(%r14,%rax)
movl $0x28, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x4110
testq %rbx, %rbx
je 0xd78e
movq %r14, %rdi
callq 0x40b0
movabsq $0x746365707865202c, %rcx # imm = 0x746365707865202C
movq %rcx, (%r14,%rax)
movabsq $0x203a6465746365, %rcx # imm = 0x203A6465746365
movq %rcx, 0x5(%r14,%rax)
movl $0x14, %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4110
movq %r14, %rdi
callq 0x455c
movq %rsp, %rdi
callq 0x33778
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x33778
movq %rbx, %rdi
callq 0x4310
nop
// File: /workspace/github_cpp_makefile_star2_O3/twekkel[P]mzpq/libzpaq.cpp
// Function: libzpaq::Compiler::rtoken(char const**)
int Compiler::rtoken(const char* list[]) {
  assert(in);
  assert(list);
  next();
  for (int i=0; list[i]; ++i)
    if (matchToken(list[i]))
      return i;
  syntaxError("unexpected");
  assert(0);
  return -1; // not reached
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
callq 0xd51e
movq (%r14), %rsi
testq %rsi, %rsi
je 0xd7f2
xorl %r15d, %r15d
movq %rbx, %rdi
callq 0xd5b4
testb %al, %al
jne 0xd809
movq 0x8(%r14,%r15,8), %rsi
incq %r15
testq %rsi, %rsi
jne 0xd7d9
leaq 0x2c4f0(%rip), %rsi     # 0x39ce9
movq %rbx, %rdi
xorl %edx, %edx
callq 0xd61e
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
movl %r15d, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/twekkel[P]mzpq/libzpaq.cpp
// Function: libzpaq::Compiler::rtoken(int, int)
int Compiler::rtoken(int low, int high) {
  next();
  int r=0;
  if (in[0]=='$' && in[1]>='1' && in[1]<='9') {
    if (in[2]=='+') r=atoi(in+3);
    if (args) r+=args[in[1]-'1'];
  }
  else if (in[0]=='-' || (in[0]>='0' && in[0]<='9')) r=atoi(in);
  else syntaxError("expected a number");
  if (r<low) syntaxError("number too low");
  if (r>high) syntaxError("number too high");
  return r;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %rbx
callq 0xd51e
movq (%rbx), %rdi
movzbl (%rdi), %eax
cmpl $0x2d, %eax
je 0xd8b3
cmpl $0x24, %eax
jne 0xd8ad
movzbl 0x1(%rdi), %r12d
leal -0x31(%r12), %eax
cmpb $0x8, %al
ja 0xd8bd
xorl %r15d, %r15d
cmpb $0x2b, 0x2(%rdi)
jne 0xd89a
addq $0x3, %rdi
callq 0x42a0
movl %eax, %r15d
movq 0x8(%rbx), %rax
testq %rax, %rax
je 0xd8d1
addl -0xc4(%rax,%r12,4), %r15d
jmp 0xd8d1
addb $-0x30, %al
cmpb $0x9, %al
ja 0xd8bd
callq 0x42a0
movl %eax, %r15d
jmp 0xd8d1
leaq 0x2c430(%rip), %rsi     # 0x39cf4
xorl %r15d, %r15d
movq %rbx, %rdi
xorl %edx, %edx
callq 0xd61e
cmpl %r14d, %r15d
jge 0xd8e7
leaq 0x2c429(%rip), %rsi     # 0x39d06
movq %rbx, %rdi
xorl %edx, %edx
callq 0xd61e
cmpl %ebp, %r15d
jle 0xd8fd
leaq 0x2c422(%rip), %rsi     # 0x39d15
movq %rbx, %rdi
xorl %edx, %edx
callq 0xd61e
movl %r15d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/twekkel[P]mzpq/libzpaq.cpp
// Function: libzpaq::Compressor::startBlock(char const*)
void Compressor::startBlock(const char* hcomp) {
  assert(state==INIT);
  MemoryReader m(hcomp);
  z.read(&m);
  pz.sha1=&sha1;
  assert(z.header.isize()>6);
  enc.out->put('z');
  enc.out->put('P');
  enc.out->put('Q');
  enc.out->put(1+(z.header[6]==0));  // level 1 or 2
  enc.out->put(1);
  z.write(enc.out, false);
  state=BLOCK1;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x32985(%rip), %rcx     # 0x40cb8
movq %rsp, %rax
movq %rcx, (%rax)
movq %rsi, 0x8(%rax)
movq %rax, %rsi
callq 0x991a
leaq 0x1b1d8(%rbx), %rax
movq %rax, 0xc8(%rbx)
movq 0x180(%rbx), %rdi
movq (%rdi), %rax
movl $0x7a, %esi
callq *(%rax)
movq 0x180(%rbx), %rdi
movq (%rdi), %rax
movl $0x50, %esi
callq *(%rax)
movq 0x180(%rbx), %rdi
movq (%rdi), %rax
movl $0x51, %esi
callq *(%rax)
movq 0x10(%rbx), %rax
xorl %esi, %esi
cmpb $0x1, 0x6(%rax)
movq 0x180(%rbx), %rdi
adcl $0x1, %esi
movq (%rdi), %rax
callq *(%rax)
movq 0x180(%rbx), %rdi
movq (%rdi), %rax
movl $0x1, %esi
callq *(%rax)
movq 0x180(%rbx), %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x9870
movl $0x1, 0x1b25c(%rbx)
addq $0x10, %rsp
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/twekkel[P]mzpq/libzpaq.cpp
// Function: libzpaq::Compressor::startBlock(char const*, int*, libzpaq::Writer*)
void Compressor::startBlock(const char* config, int* args, Writer* pcomp_cmd) {
  assert(state==INIT);
  Compiler(config, args, z, pz, pcomp_cmd);
  pz.sha1=&sha1;
  assert(z.header.isize()>6);
  enc.out->put('z');
  enc.out->put('P');
  enc.out->put('Q');
  enc.out->put(1+(z.header[6]==0));  // level 1 or 2
  enc.out->put(1);
  z.write(enc.out, false);
  state=BLOCK1;
}

// Assembly:
pushq %rbx
subq $0x70, %rsp
movq %rcx, %r9
movq %rdi, %rbx
leaq 0xc0(%rdi), %r8
movq %rsp, %rdi
movq %rbx, %rcx
callq 0xde1e
leaq 0x50(%rsp), %rdi
callq 0x340e8
leaq 0x30(%rsp), %rdi
callq 0x340e8
leaq 0x1b1d8(%rbx), %rax
movq %rax, 0xc8(%rbx)
movq 0x180(%rbx), %rdi
movq (%rdi), %rax
movl $0x7a, %esi
callq *(%rax)
movq 0x180(%rbx), %rdi
movq (%rdi), %rax
movl $0x50, %esi
callq *(%rax)
movq 0x180(%rbx), %rdi
movq (%rdi), %rax
movl $0x51, %esi
callq *(%rax)
movq 0x10(%rbx), %rax
xorl %esi, %esi
cmpb $0x1, 0x6(%rax)
movq 0x180(%rbx), %rdi
adcl $0x1, %esi
movq (%rdi), %rax
callq *(%rax)
movq 0x180(%rbx), %rdi
movq (%rdi), %rax
movl $0x1, %esi
callq *(%rax)
movq 0x180(%rbx), %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x9870
movl $0x1, 0x1b25c(%rbx)
addq $0x70, %rsp
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/twekkel[P]mzpq/libzpaq.cpp
// Function: libzpaq::Compressor::startSegment(char const*, char const*)
void Compressor::startSegment(const char* filename, const char* comment) {
  assert(state==BLOCK1 || state==BLOCK2);
  enc.out->put(1);
  while (filename && *filename)
    enc.out->put(*filename++);
  enc.out->put(0);
  while (comment && *comment)
    enc.out->put(*comment++);
  enc.out->put(0);
  enc.out->put(0);
  if (state==BLOCK1) state=SEG1;
  if (state==BLOCK2) state=SEG2;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq 0x180(%rdi), %rdi
movq (%rdi), %rax
movl $0x1, %esi
callq *(%rax)
testq %r15, %r15
je 0xe4d7
movb (%r15), %al
testb %al, %al
je 0xe4d7
incq %r15
movq 0x180(%rbx), %rdi
movsbl %al, %esi
movq (%rdi), %rax
callq *(%rax)
movb (%r15), %al
incq %r15
testb %al, %al
jne 0xe4be
movq 0x180(%rbx), %rdi
movq (%rdi), %rax
xorl %esi, %esi
callq *(%rax)
testq %r14, %r14
je 0xe50d
movb (%r14), %al
testb %al, %al
je 0xe50d
incq %r14
movq 0x180(%rbx), %rdi
movsbl %al, %esi
movq (%rdi), %rax
callq *(%rax)
movb (%r14), %al
incq %r14
testb %al, %al
jne 0xe4f4
movq 0x180(%rbx), %rdi
movq (%rdi), %rax
xorl %esi, %esi
callq *(%rax)
movq 0x180(%rbx), %rdi
movq (%rdi), %rax
xorl %esi, %esi
callq *(%rax)
movl 0x1b25c(%rbx), %eax
cmpl $0x1, %eax
je 0xe540
cmpl $0x3, %eax
jne 0xe54b
movl $0x4, %eax
jmp 0xe545
movl $0x2, %eax
movl %eax, 0x1b25c(%rbx)
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/twekkel[P]mzpq/libzpaq.cpp
// Function: libzpaq::Compressor::postProcess(char const*, int)
void Compressor::postProcess(const char* pcomp, int len) {
  if (state==SEG2) return;
  assert(state==SEG1);
  enc.init();
  if (!pcomp) {
    len=pz.hend-pz.hbegin;
    if (len>0) {
      assert(pz.header.isize()>pz.hend);
      assert(pz.hbegin>=0);
      pcomp=(const char*)&pz.header[pz.hbegin];
    }
    assert(len>=0);
  }
  else if (len==0) {
    len=toU16(pcomp);
    pcomp+=2;
  }
  if (len>0) {
    enc.compress(1);
    enc.compress(len&255);
    enc.compress((len>>8)&255);
    for (int i=0; i<len; ++i)
      enc.compress(pcomp[i]&255);
    if (verify)
      pz.initp();
  }
  else
    enc.compress(0);
  state=SEG2;
}

// Assembly:
cmpl $0x4, 0x1b25c(%rdi)
je 0xe647
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x180(%rdi), %r15
movq %r15, %rdi
callq 0xd352
testq %r14, %r14
je 0xe59b
testl %ebp, %ebp
jne 0xe592
movzwl (%r14), %ebp
addq $0x2, %r14
testl %ebp, %ebp
jg 0xe5b4
jmp 0xe625
movl 0xf0(%rbx), %ebp
movslq 0xec(%rbx), %r14
subl %r14d, %ebp
jle 0xe625
addq 0xd0(%rbx), %r14
movq %r15, %rdi
movl $0x1, %esi
callq 0xd40e
movl $0xff, %r12d
movl %ebp, %esi
andl %r12d, %esi
movq %r15, %rdi
callq 0xd40e
movl %ebp, %esi
shrl $0x8, %esi
andl %r12d, %esi
movq %r15, %rdi
callq 0xd40e
movl %ebp, %r12d
xorl %r13d, %r13d
movzbl (%r14,%r13), %esi
movq %r15, %rdi
callq 0xd40e
incq %r13
cmpq %r13, %r12
jne 0xe5ea
cmpb $0x0, 0x1b260(%rbx)
je 0xe62f
leaq 0xc0(%rbx), %rdi
movq 0xd0(%rbx), %rax
movzbl 0x4(%rax), %esi
movzbl 0x5(%rax), %edx
callq 0x9de0
jmp 0xe62f
movq %r15, %rdi
xorl %esi, %esi
callq 0xd40e
movl $0x4, 0x1b25c(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/twekkel[P]mzpq/libzpaq.cpp
// Function: libzpaq::Compressor::compress(int)
bool Compressor::compress(int n) {
  if (state==SEG1)
    postProcess();
  assert(state==SEG2);

  const int BUFSIZE=1<<14;
  char buf[BUFSIZE];  // input buffer
  while (n) {
    int nbuf=BUFSIZE;  // bytes read into buf
    if (n>=0 && n<nbuf) nbuf=n;
    int nr=in->read(buf, nbuf);
    if (nr<0 || nr>BUFSIZE || nr>nbuf) error("invalid read size");
    if (nr<=0) return false;
    if (n>=0) n-=nr;
    for (int i=0; i<nr; ++i) {
      int ch=U8(buf[i]);
      enc.compress(ch);
      if (verify) {
        if (pz.hend) pz.run(ch);
        else sha1.put(ch);
      }
    }
  }
  return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x4028, %rsp           # imm = 0x4028
movl %esi, %ebx
movq %rdi, %r14
cmpl $0x2, 0x1b25c(%rdi)
jne 0xe673
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xe552
testl %ebx, %ebx
je 0xe755
leaq 0x180(%r14), %r15
leaq 0xc0(%r14), %rax
movq %rax, 0x18(%rsp)
leaq 0x1b1d8(%r14), %rax
movq %rax, 0x10(%rsp)
movl $0x4000, %eax           # imm = 0x4000
cmpl %eax, %ebx
movl $0x4000, %r13d          # imm = 0x4000
cmovbl %ebx, %r13d
movq 0x1b1d0(%r14), %rdi
movq (%rdi), %rax
leaq 0x20(%rsp), %rsi
movl %r13d, %edx
callq *0x8(%rax)
movl %eax, %ebp
cmpl $0x4001, %eax           # imm = 0x4001
setb %al
cmpl %r13d, %ebp
setle %cl
testb %cl, %al
jne 0xe6e0
leaq 0x2b731(%rip), %rdi     # 0x39e0c
callq 0x455c
testl %ebp, %ebp
setg %al
jle 0xe75d
movl %eax, 0x8(%rsp)
movl %ebx, 0xc(%rsp)
testl %ebx, %ebx
movl %ebp, %ebx
movl $0x0, %eax
cmovsl %eax, %ebp
xorl %r12d, %r12d
movzbl 0x20(%rsp,%r12), %r13d
movq %r15, %rdi
movl %r13d, %esi
callq 0xd40e
cmpb $0x1, 0x1b260(%r14)
jne 0xe73f
cmpl $0x0, 0xf0(%r14)
je 0xe732
movq 0x18(%rsp), %rdi
movl %r13d, %esi
callq 0xc6e2
jmp 0xe73f
movq 0x10(%rsp), %rdi
movl %r13d, %esi
callq 0x33712
incq %r12
cmpq %r12, %rbx
jne 0xe6fe
movl 0xc(%rsp), %ebx
subl %ebp, %ebx
jne 0xe69a
jmp 0xe765
movb $0x1, %al
movl %eax, 0x8(%rsp)
jmp 0xe765
movl $0x0, 0x8(%rsp)
movl 0x8(%rsp), %eax
addq $0x4028, %rsp           # imm = 0x4028
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/twekkel[P]mzpq/libzpaq.cpp
// Function: libzpaq::Compressor::endSegment(char const*)
void Compressor::endSegment(const char* sha1string) {
  if (state==SEG1)
    postProcess();
  assert(state==SEG2);
  enc.compress(-1);
  if (verify && pz.hend) {
    pz.run(-1);
    pz.flush();
  }
  enc.out->put(0);
  enc.out->put(0);
  enc.out->put(0);
  enc.out->put(0);
  if (sha1string) {
    enc.out->put(253);
    for (int i=0; i<20; ++i)
      enc.out->put(sha1string[i]);
  }
  else
    enc.out->put(254);
  state=BLOCK2;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
cmpl $0x2, 0x1b25c(%rdi)
jne 0xe79f
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xe552
leaq 0x180(%rbx), %r15
movq %r15, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xd40e
cmpb $0x1, 0x1b260(%rbx)
jne 0xe7e1
cmpl $0x0, 0xf0(%rbx)
je 0xe7e1
leaq 0xc0(%rbx), %r12
movq %r12, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xc6e2
movq %r12, %rdi
callq 0x9e6c
movq (%r15), %rdi
movq (%rdi), %rax
xorl %esi, %esi
callq *(%rax)
movq (%r15), %rdi
movq (%rdi), %rax
xorl %esi, %esi
callq *(%rax)
movq (%r15), %rdi
movq (%rdi), %rax
xorl %esi, %esi
callq *(%rax)
movq (%r15), %rdi
movq (%rdi), %rax
xorl %esi, %esi
callq *(%rax)
movq (%r15), %rdi
movq (%rdi), %rax
movq (%rax), %rax
testq %r14, %r14
je 0xe839
movl $0xfd, %esi
callq *%rax
xorl %r12d, %r12d
movq (%r15), %rdi
movsbl (%r14,%r12), %esi
movq (%rdi), %rax
callq *(%rax)
incq %r12
cmpq $0x14, %r12
jne 0xe821
jmp 0xe840
movl $0xfe, %esi
callq *%rax
movl $0x3, 0x1b25c(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/twekkel[P]mzpq/libzpaq.cpp
// Function: libzpaq::Compressor::endSegmentChecksum(long*, bool)
char* Compressor::endSegmentChecksum(int64_t* size, bool dosha1) {
  if (state==SEG1)
    postProcess();
  assert(state==SEG2);
  enc.compress(-1);
  if (verify && pz.hend) {
    pz.run(-1);
    pz.flush();
  }
  enc.out->put(0);
  enc.out->put(0);
  enc.out->put(0);
  enc.out->put(0);
  if (verify) {
    if (size) *size=sha1.usize();
    memcpy(sha1result, sha1.result(), 20);
  }
  if (verify && dosha1) {
    enc.out->put(253);
    for (int i=0; i<20; ++i)
      enc.out->put(sha1result[i]);
  }
  else
    enc.out->put(254);
  state=BLOCK2;
  return verify ? sha1result : 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %rbx
cmpl $0x2, 0x1b25c(%rdi)
jne 0xe87b
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xe552
leaq 0x180(%rbx), %r14
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xd40e
cmpb $0x1, 0x1b260(%rbx)
jne 0xe8bd
cmpl $0x0, 0xf0(%rbx)
je 0xe8bd
leaq 0xc0(%rbx), %r12
movq %r12, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xc6e2
movq %r12, %rdi
callq 0x9e6c
movq 0x180(%rbx), %rdi
movq (%rdi), %rax
xorl %esi, %esi
callq *(%rax)
movq 0x180(%rbx), %rdi
movq (%rdi), %rax
xorl %esi, %esi
callq *(%rax)
movq 0x180(%rbx), %rdi
movq (%rdi), %rax
xorl %esi, %esi
callq *(%rax)
movq 0x180(%rbx), %rdi
movq (%rdi), %rax
xorl %esi, %esi
callq *(%rax)
movb 0x1b260(%rbx), %al
cmpb $0x1, %al
jne 0xe937
testq %r15, %r15
je 0xe912
movq 0x1b1d8(%rbx), %rax
shrq $0x3, %rax
movq %rax, (%r15)
leaq 0x1b1d8(%rbx), %rdi
callq 0x4fdc
movups (%rax), %xmm0
movups %xmm0, 0x1b248(%rbx)
movl 0x10(%rax), %eax
movl %eax, 0x1b258(%rbx)
movb 0x1b260(%rbx), %al
andb %bpl, %al
movq (%r14), %rdi
movq (%rdi), %rcx
movq (%rcx), %rcx
cmpb $0x1, %al
jne 0xe971
movl $0xfd, %esi
callq *%rcx
xorl %r14d, %r14d
movq 0x180(%rbx), %rdi
movsbl 0x1b248(%rbx,%r14), %esi
movq (%rdi), %rax
callq *(%rax)
incq %r14
cmpq $0x14, %r14
jne 0xe951
jmp 0xe978
movl $0xfe, %esi
callq *%rcx
movl $0x3, 0x1b25c(%rbx)
xorl %eax, %eax
cmpb $0x0, 0x1b260(%rbx)
leaq 0x1b248(%rbx), %rcx
cmovneq %rcx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/twekkel[P]mzpq/libzpaq.cpp
// Function: libzpaq::compress(libzpaq::Reader*, libzpaq::Writer*, char const*, char const*, char const*, bool)
void compress(Reader* in, Writer* out, const char* method,
              const char* filename, const char* comment, bool dosha1) {

  // Get block size
  int bs=4;
  if (method && method[0] && method[1]>='0' && method[1]<='9') {
    bs=method[1]-'0';
    if (method[2]>='0' && method[2]<='9') bs=bs*10+method[2]-'0';
    if (bs>11) bs=11;
  }
  bs=(0x100000<<bs)-4096;

  // Compress in blocks
  StringBuffer sb(bs);
  sb.write(0, bs);
  int n=0;
  while (in && (n=in->read((char*)sb.data(), bs))>0) {
    sb.resize(n);
    compressBlock(&sb, out, method, filename, comment, dosha1);
    filename=0;
    comment=0;
    sb.resize(0);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %r8, %r13
movq %rcx, %r12
movq %rdx, %rbx
movq %rsi, 0x50(%rsp)
movq %rdi, %r15
movl $0x4, %ecx
testq %rdx, %rdx
je 0xea1a
cmpb $0x0, (%rbx)
je 0xea1a
movb 0x1(%rbx), %al
addb $-0x30, %al
cmpb $0x9, %al
ja 0xea1a
movzbl %al, %eax
movsbl 0x2(%rbx), %ecx
leal -0x30(%rcx), %edx
cmpb $0xa, %dl
leal (%rax,%rax,4), %edx
leal -0x30(%rcx,%rdx,2), %edx
cmovael %eax, %edx
cmpl $0xb, %edx
movl $0xb, %ecx
cmovll %edx, %ecx
movl $0x100000, %eax         # imm = 0x100000
shll %cl, %eax
leal -0x1000(%rax), %ebp
leaq 0x322d2(%rip), %rcx     # 0x40d00
movq %rcx, 0x10(%rsp)
leaq 0x32306(%rip), %rcx     # 0x40d40
movq %rcx, 0x18(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rsp)
movups %xmm0, 0x30(%rsp)
movq $-0x1, 0x40(%rsp)
movslq %ebp, %rcx
movq %rcx, 0x48(%rsp)
cmpl $0x1001, %eax           # imm = 0x1001
jl 0xea83
movl %r9d, 0xc(%rsp)
movl %ebp, %r14d
leaq 0x10(%rsp), %rdi
movq %r14, %rsi
callq 0x34290
addq %r14, 0x30(%rsp)
movl 0xc(%rsp), %r9d
testq %r15, %r15
je 0xeafc
movzbl %r9b, %r14d
movq 0x20(%rsp), %rsi
movq (%r15), %rax
movq %r15, %rdi
movl %ebp, %edx
callq *0x8(%rax)
testl %eax, %eax
jle 0xeafc
movl %eax, %eax
movq %rax, 0x30(%rsp)
cmpq %rax, 0x38(%rsp)
jbe 0xeab3
movq %rax, 0x38(%rsp)
leaq 0x10(%rsp), %rdi
movq 0x50(%rsp), %rsi
movq %rbx, %rdx
movq %r12, %rcx
movq %r13, %r8
movl %r14d, %r9d
callq 0xeb66
movq $0x0, 0x30(%rsp)
cmpq $0x0, 0x38(%rsp)
movl $0x0, %r12d
movl $0x0, %r13d
je 0xea8c
movq $0x0, 0x38(%rsp)
xorl %r12d, %r12d
xorl %r13d, %r13d
jmp 0xea8c
leaq 0x321fd(%rip), %rax     # 0x40d00
movq %rax, 0x10(%rsp)
leaq 0x32231(%rip), %rax     # 0x40d40
movq %rax, 0x18(%rsp)
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0xeb23
callq 0x4200
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xeb34
movq %rax, %rbx
leaq 0x321c2(%rip), %rax     # 0x40d00
movq %rax, 0x10(%rsp)
leaq 0x321f6(%rip), %rax     # 0x40d40
movq %rax, 0x18(%rsp)
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0xeb5e
callq 0x4200
movq %rbx, %rdi
callq 0x4310
// File: /workspace/github_cpp_makefile_star2_O3/twekkel[P]mzpq/libzpaq.cpp
// Function: libzpaq::itos[abi:cxx11](long, int)
std::string itos(int64_t x, int n=1) {
  assert(x>=0);
  assert(n>=0);
  std::string r;
  for (; x || n>0; x/=10, --n) r=std::string(1, '0'+x%10)+r;
  return r;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rsp)
movq %rax, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
testq %rsi, %rsi
sete %al
testl %edx, %edx
setle %cl
testb %cl, %al
jne 0x28e31
movl %edx, %r14d
movq %rsi, %r15
leaq 0x38(%rsp), %r13
leaq 0x8(%rsp), %r12
movq %r15, %rax
movabsq $0x6666666666666667, %rcx # imm = 0x6666666666666667
imulq %rcx
movq %rdx, %rbp
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x2, %rbp
addq %rax, %rbp
leal (,%rbp,2), %eax
leal (%rax,%rax,4), %eax
movl %r15d, %ecx
subl %eax, %ecx
addb $0x30, %cl
leaq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movsbl %cl, %edx
movl $0x1, %esi
movq %r12, %rdi
callq 0x41d0
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq %r12, %rdi
callq 0x4080
movq %r13, 0x28(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x28dad
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x28db5
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
movq %rdx, 0x30(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %rbx, %rdi
leaq 0x28(%rsp), %rsi
callq 0x4220
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x28df1
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x4180
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x28e0d
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4180
addq $-0xa, %r15
cmpq $-0x13, %r15
setb %al
cmpl $0x2, %r14d
leal -0x1(%r14), %ecx
setge %dl
orb %al, %dl
movl %ecx, %r14d
movq %rbp, %r15
jne 0x28d2e
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0x28e67
movq %rax, %r14
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x28e67
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4180
movq (%rbx), %rdi
cmpq (%rsp), %rdi
je 0x28e7f
movq (%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x4180
movq %r14, %rdi
callq 0x4310
// File: /workspace/github_cpp_makefile_star2_O3/twekkel[P]mzpq/libzpaq.cpp
// Function: libzpaq::e8e9(unsigned char*, int)
void e8e9(unsigned char* buf, int n) {
  for (int i=n-5; i>=0; --i) {
    if (((buf[i]&254)==0xe8) && ((buf[i+4]+1)&254)==0) {
      unsigned a=(buf[i+1]|buf[i+2]<<8|buf[i+3]<<16)+i;
      buf[i+1]=a;
      buf[i+2]=a>>8;
      buf[i+3]=a>>16;
    }
  }
}

// Assembly:
cmpl $0x5, %esi
jl 0x28ed1
addl $-0x5, %esi
movb (%rdi,%rsi), %al
andb $-0x2, %al
cmpb $-0x18, %al
jne 0x28ec5
movb 0x4(%rdi,%rsi), %al
incb %al
cmpb $0x1, %al
ja 0x28ec5
movzwl 0x1(%rdi,%rsi), %ecx
movzbl 0x3(%rdi,%rsi), %eax
shll $0x10, %eax
orl %ecx, %eax
addl %esi, %eax
addb %sil, %cl
movb %cl, 0x1(%rdi,%rsi)
movb %ah, 0x2(%rdi,%rsi)
shrl $0x10, %eax
movb %al, 0x3(%rdi,%rsi)
leaq -0x1(%rsi), %rax
testq %rsi, %rsi
movq %rax, %rsi
jg 0x28e8f
retq
// File: /workspace/github_cpp_makefile_star2_O3/twekkel[P]mzpq/libzpaq.cpp
// Function: libzpaq::lg(unsigned int)
int lg(unsigned x) {
  unsigned r=0;
  if (x>=65536) r=16, x>>=16;
  if (x>=256) r+=8, x>>=8;
  if (x>=16) r+=4, x>>=4;
  assert(x>=0 && x<16);
  return
    "\x00\x01\x02\x02\x03\x03\x03\x03\x04\x04\x04\x04\x04\x04\x04\x04"[x]+r;
}

// Assembly:
movl %edi, %eax
shrl $0x10, %eax
xorl %ecx, %ecx
cmpl $0x10000, %edi          # imm = 0x10000
setae %cl
cmovbl %edi, %eax
shll $0x4, %ecx
leal 0x8(%rcx), %edx
movl %eax, %esi
shrl $0x8, %esi
cmpl $0x100, %eax            # imm = 0x100
cmovbl %eax, %esi
cmovbl %ecx, %edx
leal 0x4(%rdx), %ecx
movl %esi, %eax
shrl $0x4, %eax
cmpl $0x10, %esi
cmovbl %esi, %eax
cmovbl %edx, %ecx
leaq 0xfdf8(%rip), %rdx      # 0x38d0b
movsbl (%rax,%rdx), %eax
addl %ecx, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/twekkel[P]mzpq/libzpaq.cpp
// Function: libzpaq::LZBuffer::read(char*, int)
int LZBuffer::read(char* p, int n) {
  if (rpos==wpos) fill();
  int nr=n;
  if (nr>int(wpos-rpos)) nr=wpos-rpos;
  if (nr) memcpy(p, buf+rpos, nr);
  rpos+=nr;
  assert(rpos<=wpos);
  if (rpos==wpos) rpos=wpos=0;
  return nr;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %r15d
movq %rsi, %r14
movq %rdi, %rbx
movl 0x74(%rdi), %eax
movl 0x78(%rdi), %ecx
cmpl %ecx, %eax
jne 0x28f5c
movq %rbx, %rdi
callq 0x28fa8
movl 0x74(%rbx), %eax
movl 0x78(%rbx), %ecx
movl %ecx, %ebp
subl %eax, %ebp
cmpl %r15d, %ebp
cmovgel %r15d, %ebp
testl %ebp, %ebp
je 0x28f89
movl %eax, %eax
leaq (%rbx,%rax), %rsi
addq $0x90, %rsi
movslq %ebp, %rdx
movq %r14, %rdi
callq 0x4140
movl 0x74(%rbx), %eax
movl 0x78(%rbx), %ecx
addl %ebp, %eax
movl %eax, 0x74(%rbx)
cmpl %ecx, %eax
jne 0x28f9a
movq $0x0, 0x74(%rbx)
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/twekkel[P]mzpq/./libzpaq.h
// Function: libzpaq::SHA1::put(int)
void put(int c) {  // hash 1 byte
    U32& r=w[U32(len)>>5&15];
    r=(r<<8)|(c&255);
    len+=8;
    if ((U32(len)&511)==0) process();
  }

// Assembly:
movq (%rdi), %rax
movl %eax, %ecx
shrl $0x3, %ecx
andl $0x3c, %ecx
movl 0x1c(%rdi,%rcx), %edx
shll $0x8, %edx
movzbl %sil, %esi
orl %edx, %esi
movl %esi, 0x1c(%rdi,%rcx)
addq $0x8, %rax
movq %rax, (%rdi)
testl $0x1ff, %eax            # imm = 0x1FF
je 0x518a
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/twekkel[P]mzpq/./libzpaq.h
// Function: libzpaq::SHA256::put(int)
void put(int c) {  // hash 1 byte
    unsigned& r=w[len0>>5&15];
    r=(r<<8)|(c&255);
    if (!(len0+=8)) ++len1;
    if ((len0&511)==0) process();
  }

// Assembly:
movl (%rdi), %eax
movl %eax, %ecx
shrl $0x3, %ecx
andl $0x3c, %ecx
movl 0x28(%rdi,%rcx), %edx
shll $0x8, %edx
movzbl %sil, %esi
orl %edx, %esi
movl %esi, 0x28(%rdi,%rcx)
addl $0x8, %eax
movl %eax, (%rdi)
je 0x33770
testl $0x1ff, %eax            # imm = 0x1FF
je 0x6420
retq
incl 0x4(%rdi)
jmp 0x6420
// File: /workspace/github_cpp_makefile_star2_O3/twekkel[P]mzpq/./libzpaq.h
// Function: libzpaq::Array<unsigned int>::resize(unsigned long, int)
void Array<T>::resize(size_t sz, int ex) {
  assert(size_t(-1)>0);  // unsigned type?
  while (ex>0) {
    if (sz>sz*2) error("Array too big");
    sz*=2, --ex;
  }
  if (n>0) {
    assert(offset>0 && offset<=64);
    assert((char*)data-offset);
    ::free((char*)data-offset);
  }
  n=0;
  offset=0;
  if (sz==0) return;
  n=sz;
  const size_t nb=128+n*sizeof(T);  // test for overflow
  if (nb<=128 || (nb-128)/sizeof(T)!=n) n=0, error("Array too big");
  data=(T*)::calloc(nb, 1);
  if (!data) n=0, error("Out of memory");
  offset=64-(((char*)data-(char*)0)&63);
  assert(offset>0 && offset<=64);
  data=(T*)((char*)data+offset);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
testl %edx, %edx
jle 0x337bf
movl %edx, %ebp
incl %ebp
leaq 0x8df1(%rip), %r15      # 0x3c599
testq %r14, %r14
jns 0x337b5
movq %r15, %rdi
callq 0x455c
addq %r14, %r14
decl %ebp
cmpl $0x1, %ebp
jg 0x337a8
cmpq $0x0, 0x8(%rbx)
je 0x337d5
movq (%rbx), %rdi
movslq 0x10(%rbx), %rax
subq %rax, %rdi
callq 0x4200
movq $0x0, 0x8(%rbx)
movl $0x0, 0x10(%rbx)
testq %r14, %r14
je 0x3385f
movq %r14, 0x8(%rbx)
leaq 0x80(,%r14,4), %r15
cmpq $0x81, %r15
setae %al
shrq $0x3e, %r14
sete %cl
testb %cl, %al
jne 0x3381e
movq $0x0, 0x8(%rbx)
leaq 0x8d80(%rip), %rdi      # 0x3c599
callq 0x455c
movl $0x1, %esi
movq %r15, %rdi
callq 0x4100
movq %rax, (%rbx)
testq %rax, %rax
jne 0x3384a
movq $0x0, 0x8(%rbx)
leaq 0x663b(%rip), %rdi      # 0x39e7d
callq 0x455c
movq (%rbx), %rax
movl %eax, %ecx
andl $0x3f, %ecx
movl $0x40, %edx
subl %ecx, %edx
movl %edx, 0x10(%rbx)
addq %rax, %rdx
movq %rdx, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/twekkel[P]mzpq/./libzpaq.h
// Function: libzpaq::Decoder::get()
int get() {        // return 1 byte of buffered input or EOF
    if (rpos==wpos) {
      rpos=0;
      wpos=in ? in->read(&buf[0], BUFSIZE) : 0;
      assert(wpos<=BUFSIZE);
    }
    return rpos<wpos ? U8(buf[rpos++]) : -1;
  }

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl 0x1c(%rdi), %edx
movl 0x20(%rdi), %eax
cmpl %eax, %edx
jne 0x33c54
movl $0x0, 0x1c(%rbx)
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x33c4d
movq 0x1b050(%rbx), %rsi
movq (%rdi), %rax
movl $0x10000, %edx          # imm = 0x10000
callq *0x8(%rax)
movl 0x1c(%rbx), %edx
jmp 0x33c51
xorl %edx, %edx
xorl %eax, %eax
movl %eax, 0x20(%rbx)
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpl %eax, %edx
jae 0x33c70
leal 0x1(%rdx), %eax
movl %eax, 0x1c(%rbx)
movl %edx, %eax
movq 0x1b050(%rbx), %rcx
movzbl (%rcx,%rax), %ecx
movl %ecx, %eax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/twekkel[P]mzpq/./libzpaq.h
// Function: libzpaq::StringBuffer::write(char const*, int)
void write(const char* buf, int n) {
    if (n<1) return;
    lengthen(n);
    assert(p);
    assert(wpos+n<=al);
    if (buf) memcpy(p+wpos, buf, n);
    wpos+=n;
  }

// Assembly:
testl %edx, %edx
jle 0x33d71
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movl %edx, %r15d
movq %r15, %rsi
callq 0x34290
testq %r14, %r14
je 0x33d68
movq 0x10(%rbx), %rdi
addq 0x20(%rbx), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x4140
addq %r15, 0x20(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/twekkel[P]mzpq/libzpaq.cpp
// Function: libzpaq::LZBuffer::putb(unsigned int, int)
void putb(unsigned x, int k) {
    x&=(1<<k)-1;
    bits|=x<<nbits;
    nbits+=k;
    while (nbits>7) {
      assert(wpos<BUFSIZE);
      buf[wpos++]=bits, bits>>=8, nbits-=8;
    }
  }

// Assembly:
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %edx, %ecx
shll %cl, %eax
notl %eax
andl %esi, %eax
movl 0x70(%rdi), %ecx
shll %cl, %eax
orl 0x6c(%rdi), %eax
movl %eax, 0x6c(%rdi)
addl %edx, %ecx
cmpl $0x8, %ecx
jb 0x33e42
movl 0x78(%rdi), %edx
movl %edx, %esi
incl %edx
movb %al, 0x90(%rdi,%rsi)
shrl $0x8, %eax
addl $-0x8, %ecx
cmpl $0x7, %ecx
ja 0x33e26
movl %edx, 0x78(%rdi)
movl %eax, 0x6c(%rdi)
movl %ecx, 0x70(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O3/twekkel[P]mzpq/libzpaq.cpp
// Function: libzpaq::LZBuffer::get()
int get() {
    int c=-1;
    if (rpos==wpos) fill();
    if (rpos<wpos) c=buf[rpos++];
    if (rpos==wpos) rpos=wpos=0;
    return c;
  }

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl 0x74(%rdi), %edx
movl 0x78(%rdi), %ecx
cmpl %ecx, %edx
jne 0x34042
movq %rbx, %rdi
callq 0x28fa8
movl 0x74(%rbx), %edx
movl 0x78(%rbx), %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl %ecx, %edx
jae 0x3405a
movl %edx, %eax
incl %edx
movl %edx, 0x74(%rbx)
movzbl 0x90(%rbx,%rax), %eax
cmpl %ecx, %edx
jne 0x34066
movq $0x0, 0x74(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/twekkel[P]mzpq/./libzpaq.h
// Function: libzpaq::StringBuffer::lengthen(unsigned long)
void lengthen(size_t n) {
    assert(wpos<=al);
    if (wpos+n>limit || wpos+n<wpos) error("StringBuffer overflow");
    if (wpos+n<=al) return;
    size_t a=al;
    while (wpos+n>=a) a=a*2+init;
    reserve(a);
  }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x20(%rdi), %rax
addq %rsi, %rax
setae %cl
cmpq 0x30(%rdi), %rax
setbe %dl
testb %cl, %dl
jne 0x342c2
movq %rsi, %r14
leaq 0x82cd(%rip), %rdi      # 0x3c583
callq 0x455c
addq 0x20(%rbx), %r14
movq %r14, %rax
movq 0x18(%rbx), %rsi
cmpq %rsi, %rax
jbe 0x342e7
movq 0x38(%rbx), %rcx
leaq (%rcx,%rsi,2), %rsi
cmpq %rsi, %rax
jae 0x342cf
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x342f0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/twekkel[P]mzpq/./libzpaq.h
// Function: libzpaq::StringBuffer::reserve(unsigned long)
void reserve(size_t a) {
    assert(!al==!p);
    if (a<=al) return;
    unsigned char* q=0;
    if (a>0) q=(unsigned char*)(p ? realloc(p, a) : malloc(a));
    if (a>0 && !q) error("Out of memory");
    p=q;
    al=a;
  }

// Assembly:
cmpq %rsi, 0x18(%rdi)
jae 0x3433d
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq 0x10(%rdi), %rdi
testq %rdi, %rdi
je 0x34314
movq %rbx, %rsi
callq 0x42e0
jmp 0x3431c
movq %rbx, %rdi
callq 0x4230
movq %rax, %r15
testq %rax, %rax
jne 0x34330
leaq 0x5b52(%rip), %rdi      # 0x39e7d
callq 0x455c
movq %r15, 0x10(%r14)
movq %rbx, 0x18(%r14)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/danomatika[P]miditester/src/main.cpp
// Function: realtimeMessages(std::vector<TestSet, std::allocator<TestSet>>&, int)
void realtimeMessages(TestQueue &queue, int channel) {
    TestSet set;
    set.name = "realtime";
    set.messages = {
        {MIDI_CLOCK},
        {MIDI_START},
        {MIDI_CONTINUE},
        {MIDI_STOP},
        {MIDI_ACTIVESENSING},
        {MIDI_SYSTEMRESET}
    };
    queue.push_back(set);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %rdi, %r15
leaq 0x20(%rsp), %rbp
movq %rbp, -0x10(%rbp)
xorl %eax, %eax
movq %rax, -0x8(%rbp)
movb $0x0, (%rbp)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbp)
movq %rax, 0x20(%rbp)
leaq 0x3051(%rip), %rcx      # 0x826a
leaq 0x10(%rsp), %rdi
movl $0x8, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x3210
leaq 0xf(%rsp), %rsi
movb $-0x8, (%rsi)
leaq 0x48(%rsp), %rbx
leaq 0xe(%rsp), %rcx
movl $0x1, %edx
movq %rbx, %rdi
callq 0x5d50
leaq 0x60(%rsp), %r14
leaq 0xd(%rsp), %rsi
movb $-0x6, (%rsi)
leaq 0xc(%rsp), %rcx
movl $0x1, %edx
movq %r14, %rdi
callq 0x5d50
leaq 0x78(%rsp), %r14
leaq 0xb(%rsp), %rsi
movb $-0x5, (%rsi)
leaq 0xa(%rsp), %rcx
movl $0x1, %edx
movq %r14, %rdi
callq 0x5d50
leaq 0x90(%rsp), %r14
leaq 0x9(%rsp), %rsi
movb $-0x4, (%rsi)
leaq 0x8(%rsp), %rcx
movl $0x1, %edx
movq %r14, %rdi
callq 0x5d50
leaq 0xa8(%rsp), %r14
leaq 0x7(%rsp), %rsi
movb $-0x2, (%rsi)
leaq 0x6(%rsp), %rcx
movl $0x1, %edx
movq %r14, %rdi
callq 0x5d50
leaq 0xc0(%rsp), %r14
leaq 0x5(%rsp), %rsi
movb $-0x1, (%rsi)
leaq 0x4(%rsp), %rcx
movl $0x1, %edx
movq %r14, %rdi
callq 0x5d50
leaq 0x30(%rsp), %r12
leaq 0xd8(%rsp), %r13
leaq 0x48(%rsp), %rsi
movq %r12, %rdi
movq %r13, %rdx
callq 0x5fbc
movl $0x90, %ebx
movq 0x30(%rsp,%rbx), %rdi
testq %rdi, %rdi
je 0x5329
movq 0x40(%rsp,%rbx), %rsi
subq %rdi, %rsi
callq 0x31a0
addq $-0x18, %rbx
jne 0x5312
leaq 0x10(%rsp), %rsi
movq %r15, %rdi
callq 0x5d94
movq %r12, %rdi
callq 0x5df0
movq 0x10(%rsp), %rdi
cmpq %rbp, %rdi
je 0x535b
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x31a0
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
leaq 0x48(%rsp), %rsi
movq %r13, %rdi
callq 0x3330
movb $0x1, %al
jmp 0x538e
jmp 0x5389
jmp 0x5389
jmp 0x5389
jmp 0x5389
movq %rax, %r15
xorl %eax, %eax
cmpq %r14, %rbx
sete %cl
orb %al, %cl
jne 0x53bd
movq -0x18(%r14), %rdi
testq %rdi, %rdi
je 0x53ad
movq -0x8(%r14), %rsi
subq %rdi, %rsi
callq 0x31a0
addq $-0x18, %r14
cmpq %rbx, %r14
jne 0x5398
jmp 0x53bd
jmp 0x53ba
movq %rax, %r15
leaq 0x10(%rsp), %rdi
callq 0x5dbe
movq %r15, %rdi
callq 0x3280