LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: nilnilnil[P]autocomplete/deps/mongoose/mongoose.c
// Function: addenv
static char *addenv(struct cgi_env_block *block, const char *fmt, ...) {
  int n, space;
  char *added;
  va_list ap;

  // Calculate how much space is left in the buffer
  space = sizeof(block->buf) - block->len - 2;
  assert(space >= 0);

  // Make a pointer to the free space int the buffer
  added = block->buf + block->len;

  // Copy VARIABLE=VALUE\0 string into the free space
  va_start(ap, fmt);
  n = mg_vsnprintf(block->conn, added, (size_t) space, fmt, ap);
  va_end(ap);

  // Make sure we do not overflow buffer and the envp array
  if (n > 0 && n < space &&
      block->nvars < (int) ARRAY_SIZE(block->vars) - 2) {
    // Append a pointer to the added string into the envp array
    block->vars[block->nvars++] = block->buf + block->len;
    // Bump up used length counter. Include \0 terminator
    block->len += n + 1;
  }

  return added;
}

// Assembly:
subq $0xe8, %rsp
testb %al, %al
je 0x208dc
movaps %xmm0, 0x30(%rsp)
movaps %xmm1, 0x40(%rsp)
movaps %xmm2, 0x50(%rsp)
movaps %xmm3, 0x60(%rsp)
movaps %xmm4, 0x70(%rsp)
movaps %xmm5, 0x80(%rsp)
movaps %xmm6, 0x90(%rsp)
movaps %xmm7, 0xa0(%rsp)
movq %r9, 0x28(%rsp)
movq %r8, 0x20(%rsp)
movq %rcx, 0x18(%rsp)
movq %rdx, 0x10(%rsp)
movq %rdi, 0xe0(%rsp)
movq %rsi, 0xd8(%rsp)
movq 0xe0(%rsp), %rax
movslq 0x1008(%rax), %rcx
movl $0x1000, %eax           # imm = 0x1000
subq %rcx, %rax
subq $0x2, %rax
movl %eax, 0xd0(%rsp)
movq 0xe0(%rsp), %rax
addq $0x8, %rax
movq 0xe0(%rsp), %rcx
movslq 0x1008(%rcx), %rcx
addq %rcx, %rax
movq %rax, 0xc8(%rsp)
leaq 0xb0(%rsp), %rax
movq %rsp, %rcx
movq %rcx, 0x10(%rax)
leaq 0xf0(%rsp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x10, (%rax)
movq 0xe0(%rsp), %rax
movq (%rax), %rdi
movq 0xc8(%rsp), %rsi
movslq 0xd0(%rsp), %rdx
movq 0xd8(%rsp), %rcx
leaq 0xb0(%rsp), %r8
callq 0x17120
movl %eax, 0xd4(%rsp)
leaq 0xb0(%rsp), %rax
cmpl $0x0, 0xd4(%rsp)
jle 0x20a46
movl 0xd4(%rsp), %eax
cmpl 0xd0(%rsp), %eax
jge 0x20a46
movq 0xe0(%rsp), %rax
cmpl $0x3e, 0x1210(%rax)
jge 0x20a46
movq 0xe0(%rsp), %rdx
addq $0x8, %rdx
movq 0xe0(%rsp), %rax
movslq 0x1008(%rax), %rax
addq %rax, %rdx
movq 0xe0(%rsp), %rax
movq 0xe0(%rsp), %rsi
movl 0x1210(%rsi), %ecx
movl %ecx, %edi
addl $0x1, %edi
movl %edi, 0x1210(%rsi)
movslq %ecx, %rcx
movq %rdx, 0x1010(%rax,%rcx,8)
movl 0xd4(%rsp), %ecx
addl $0x1, %ecx
movq 0xe0(%rsp), %rax
addl 0x1008(%rax), %ecx
movl %ecx, 0x1008(%rax)
movq 0xc8(%rsp), %rax
addq $0xe8, %rsp
retq
nopw %cs:(%rax,%rax)
// File: nilnilnil[P]autocomplete/deps/mongoose/mongoose.c
// Function: do_ssi_exec
static void do_ssi_exec(struct mg_connection *conn, char *tag) {
  char cmd[BUFSIZ];
  FILE *fp;

  if (sscanf(tag, " \"%[^\"]\"", cmd) != 1) {
    cry(conn, "Bad SSI #exec: [%s]", tag);
  } else if ((fp = popen(cmd, "r")) == NULL) {
    cry(conn, "Cannot SSI #exec: [%s]: %s", cmd, strerror(ERRNO));
  } else {
    send_file_data(conn, fp, INT64_MAX);
    (void) pclose(fp);
  }
}

// Assembly:
subq $0x2038, %rsp           # imm = 0x2038
movq %rdi, 0x2030(%rsp)
movq %rsi, 0x2028(%rsp)
movq 0x2028(%rsp), %rdi
leaq 0x20(%rsp), %rdx
leaq 0x282b(%rip), %rsi      # 0x238b6
movb $0x0, %al
callq 0x5540
cmpl $0x1, %eax
je 0x210ba
movq 0x2030(%rsp), %rdi
movq 0x2028(%rsp), %rdx
leaq 0x2856(%rip), %rsi      # 0x23904
movb $0x0, %al
callq 0x184e0
jmp 0x2113e
leaq 0x20(%rsp), %rdi
leaq 0x28c8(%rip), %rsi      # 0x2398e
callq 0x5160
movq %rax, 0x18(%rsp)
cmpq $0x0, %rax
jne 0x21116
movq 0x2030(%rsp), %rax
movq %rax, 0x8(%rsp)
leaq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
callq 0x5060
movl (%rax), %edi
callq 0x5190
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rdx
movq %rax, %rcx
leaq 0x280b(%rip), %rsi      # 0x23918
movb $0x0, %al
callq 0x184e0
jmp 0x2113c
movq 0x2030(%rsp), %rdi
movq 0x18(%rsp), %rsi
movabsq $0x7fffffffffffffff, %rdx # imm = 0x7FFFFFFFFFFFFFFF
callq 0x207c0
movq 0x18(%rsp), %rdi
callq 0x5820
jmp 0x2113e
addq $0x2038, %rsp           # imm = 0x2038
retq
nopw %cs:(%rax,%rax)
// File: nilnilnil[P]autocomplete/deps/mongoose/mongoose.c
// Function: month_number_to_month_name
static int month_number_to_month_name(const char *s) {
  size_t i;

  for (i = 0; i < ARRAY_SIZE(month_names); i++)
    if (!strcmp(s, month_names[i]))
      return (int) i;

  return -1;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
movq $0x0, (%rsp)
cmpq $0xc, (%rsp)
jae 0x213c0
movq 0x8(%rsp), %rdi
movq (%rsp), %rcx
leaq 0xa6e8(%rip), %rax      # 0x2ba80
movq (%rax,%rcx,8), %rsi
callq 0x5810
cmpl $0x0, %eax
jne 0x213b0
movq (%rsp), %rax
movl %eax, 0x14(%rsp)
jmp 0x213c8
jmp 0x213b2
movq (%rsp), %rax
addq $0x1, %rax
movq %rax, (%rsp)
jmp 0x21381
movl $0xffffffff, 0x14(%rsp) # imm = 0xFFFFFFFF
movl 0x14(%rsp), %eax
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: nilnilnil[P]autocomplete/deps/mongoose/mongoose.c
// Function: get_mime_type
static void get_mime_type(struct mg_context *ctx, const char *path,
                          struct vec *vec) {
  struct vec ext_vec, mime_vec;
  const char *list, *ext;
  size_t i, path_len;

  path_len = strlen(path);

  // Scan user-defined mime types first, in case user wants to
  // override default mime types.
  list = ctx->config[EXTRA_MIME_TYPES];
  while ((list = next_option(list, &ext_vec, &mime_vec)) != NULL) {
    // ext now points to the path suffix
    ext = path + path_len - ext_vec.len;
    if (mg_strncasecmp(ext, ext_vec.ptr, ext_vec.len) == 0) {
      *vec = mime_vec;
      return;
    }
  }

  // Now scan built-in mime types
  for (i = 0; builtin_mime_types[i].extension != NULL; i++) {
    ext = path + (path_len - builtin_mime_types[i].ext_len);
    if (path_len > builtin_mime_types[i].ext_len &&
        mg_strcasecmp(ext, builtin_mime_types[i].extension) == 0) {
      vec->ptr = builtin_mime_types[i].mime_type;
      vec->len = builtin_mime_types[i].mime_type_len;
      return;
    }
  }

  // Nothing found. Fall back to "text/plain"
  vec->ptr = "text/plain";
  vec->len = 10;
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq %rdx, 0x40(%rsp)
movq 0x48(%rsp), %rdi
callq 0x5230
movq %rax, (%rsp)
movq 0x50(%rsp), %rax
movq 0x90(%rax), %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rdi
leaq 0x30(%rsp), %rsi
leaq 0x20(%rsp), %rdx
callq 0x1ab00
movq %rax, 0x18(%rsp)
cmpq $0x0, %rax
je 0x2147f
movq 0x48(%rsp), %rax
addq (%rsp), %rax
xorl %ecx, %ecx
subq 0x38(%rsp), %rcx
addq %rcx, %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
callq 0x17390
cmpl $0x0, %eax
jne 0x2147d
movq 0x40(%rsp), %rax
movq 0x20(%rsp), %rcx
movq %rcx, (%rax)
movq 0x28(%rsp), %rcx
movq %rcx, 0x8(%rax)
jmp 0x21581
jmp 0x21412
movq $0x0, 0x8(%rsp)
movq 0x8(%rsp), %rcx
leaq 0x941c(%rip), %rax      # 0x2a8b0
shlq $0x5, %rcx
addq %rcx, %rax
cmpq $0x0, (%rax)
je 0x21565
movq 0x48(%rsp), %rax
movq (%rsp), %rcx
movq 0x8(%rsp), %rsi
leaq 0x93f6(%rip), %rdx      # 0x2a8b0
shlq $0x5, %rsi
addq %rsi, %rdx
subq 0x8(%rdx), %rcx
addq %rcx, %rax
movq %rax, 0x10(%rsp)
movq (%rsp), %rax
movq 0x8(%rsp), %rdx
leaq 0x93d3(%rip), %rcx      # 0x2a8b0
shlq $0x5, %rdx
addq %rdx, %rcx
cmpq 0x8(%rcx), %rax
jbe 0x21550
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rcx
leaq 0x93b5(%rip), %rax      # 0x2a8b0
shlq $0x5, %rcx
addq %rcx, %rax
movq (%rax), %rsi
callq 0x19510
cmpl $0x0, %eax
jne 0x21550
movq 0x8(%rsp), %rcx
leaq 0x9395(%rip), %rax      # 0x2a8b0
shlq $0x5, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rcx
movq 0x40(%rsp), %rax
movq %rcx, (%rax)
movq 0x8(%rsp), %rcx
leaq 0x9376(%rip), %rax      # 0x2a8b0
shlq $0x5, %rcx
addq %rcx, %rax
movq 0x18(%rax), %rcx
movq 0x40(%rsp), %rax
movq %rcx, 0x8(%rax)
jmp 0x21581
jmp 0x21552
movq 0x8(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x8(%rsp)
jmp 0x21488
movq 0x40(%rsp), %rax
leaq 0x2524(%rip), %rcx      # 0x23a95
movq %rcx, (%rax)
movq 0x40(%rsp), %rax
movq $0xa, 0x8(%rax)
addq $0x58, %rsp
retq
nopw %cs:(%rax,%rax)
// File: nilnilnil[P]autocomplete/deps/mongoose/mongoose.c
// Function: close_socket_gracefully
static void close_socket_gracefully(SOCKET sock) {
  char buf[BUFSIZ];
  int n;

  // Send FIN to the client
  (void) shutdown(sock, SHUT_WR);
  set_non_blocking_mode(sock);

  // Read and discard pending data. If we do not do that and close the
  // socket, the data in the send buffer may be discarded. This
  // behaviour is seen on Windows, when client keeps sending data
  // when server decide to close the connection; then when client
  // does recv() it gets no data back.
  do {
    n = pull(NULL, sock, NULL, buf, sizeof(buf));
  } while (n > 0);

  // Now we know that our FIN is ACK-ed, safe to close
  (void) closesocket(sock);
}

// Assembly:
subq $0x2018, %rsp           # imm = 0x2018
movl %edi, 0x2014(%rsp)
movl 0x2014(%rsp), %edi
movl $0x1, %esi
callq 0x57e0
movl 0x2014(%rsp), %edi
callq 0x21600
movl 0x2014(%rsp), %esi
leaq 0x10(%rsp), %rcx
xorl %eax, %eax
movl %eax, %edx
movl $0x2000, %r8d           # imm = 0x2000
movq %rdx, %rdi
callq 0x16e30
movl %eax, 0xc(%rsp)
cmpl $0x0, 0xc(%rsp)
jg 0x215bb
movl 0x2014(%rsp), %edi
callq 0x5b70
addq $0x2018, %rsp           # imm = 0x2018
retq
nopl (%rax,%rax)
// File: nilnilnil[P]autocomplete/deps/mongoose/mongoose.c
// Function: set_non_blocking_mode
static int set_non_blocking_mode(SOCKET sock) {
  int flags;

  flags = fcntl(sock, F_GETFL, 0);
  (void) fcntl(sock, F_SETFL, flags | O_NONBLOCK);

  return 0;
}

// Assembly:
pushq %rax
movl %edi, 0x4(%rsp)
movl 0x4(%rsp), %edi
movl $0x3, %esi
xorl %edx, %edx
movb $0x0, %al
callq 0x52d0
movl %eax, (%rsp)
movl 0x4(%rsp), %edi
movl (%rsp), %edx
orl $0x800, %edx            # imm = 0x800
movl $0x4, %esi
movb $0x0, %al
callq 0x52d0
xorl %eax, %eax
popq %rcx
retq
// File: sisong[P]ApkDiffPatch/src/../HDiffPatch/_atosize.h
// Function: kmg_to_size(char const*, unsigned long, unsigned long*)
hpatch_inline static
hpatch_BOOL kmg_to_size(const char* pkmgnum,size_t slen,size_t* out_size){
    size_t shl;
    size_t v;
    if (slen==0) return hpatch_FALSE;
    switch (pkmgnum[slen-1]) {
        case 'k': case 'K': { shl=10; --slen;} break;
        case 'm': case 'M': { shl=20; --slen;} break;
        case 'g': case 'G': { shl=30; --slen;} break;
        default:            { shl= 0;        } break;
    }
    if (!a_to_size(pkmgnum,slen,&v)) return hpatch_FALSE;
    if (v>(_kSizeMax>>shl)) return hpatch_FALSE;
    *out_size=v<<shl;
    return hpatch_TRUE;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x57a7
movl $0x0, -0x4(%rbp)
jmp 0x5898
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %rax
movsbl -0x1(%rax,%rcx), %eax
movl %eax, -0x34(%rbp)
subl $0x47, %eax
je 0x581c
jmp 0x57be
movl -0x34(%rbp), %eax
subl $0x4b, %eax
je 0x57f0
jmp 0x57c8
movl -0x34(%rbp), %eax
subl $0x4d, %eax
je 0x5806
jmp 0x57d2
movl -0x34(%rbp), %eax
subl $0x67, %eax
je 0x581c
jmp 0x57dc
movl -0x34(%rbp), %eax
subl $0x6b, %eax
je 0x57f0
jmp 0x57e6
movl -0x34(%rbp), %eax
subl $0x6d, %eax
je 0x5806
jmp 0x5832
movq $0xa, -0x28(%rbp)
movq -0x18(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x583a
movq $0x14, -0x28(%rbp)
movq -0x18(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x583a
movq $0x1e, -0x28(%rbp)
movq -0x18(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x583a
movq $0x0, -0x28(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
leaq -0x30(%rbp), %rdx
callq 0x58b0
cmpl $0x0, %eax
jne 0x5859
movl $0x0, -0x4(%rbp)
jmp 0x5898
movq -0x30(%rbp), %rax
movq -0x28(%rbp), %rcx
movq $-0x1, %rdx
shrq %cl, %rdx
movq %rdx, %rcx
cmpq %rcx, %rax
jbe 0x587c
movl $0x0, -0x4(%rbp)
jmp 0x5898
movq -0x30(%rbp), %rax
movq -0x28(%rbp), %rcx
shlq %cl, %rax
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: sisong[P]ApkDiffPatch/src/../HDiffPatch/_atosize.h
// Function: a_to_size(char const*, unsigned long, unsigned long*)
hpatch_inline static
hpatch_BOOL a_to_size(const char* pnum,size_t slen,size_t* out_size){
    const size_t _kSizeMaxDiv10=_kSizeMax/10;
    const size_t _kSizeMaxMod10=_kSizeMax-_kSizeMaxDiv10*10;
    size_t v=0;
    size_t s;
    if (slen==0) return hpatch_FALSE;
    if ((slen>=2)&(pnum[0]=='0')) return hpatch_FALSE;
    for (s=0; s<slen; ++s) {
        size_t c=pnum[s];
        if (('0'<=c)&(c<='9'))
            ;//empty ok
        else
            return hpatch_FALSE;
        c-='0';
        if (v<_kSizeMaxDiv10)
            ;//empty ok
        else if ((v>_kSizeMaxDiv10)|(c>_kSizeMaxMod10))
            return hpatch_FALSE;
        v=v*10+c;
    }
    *out_size=v;
    return hpatch_TRUE;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movabsq $0x1999999999999999, %rax # imm = 0x1999999999999999
movq %rax, -0x28(%rbp)
movq $0x5, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x58f1
movl $0x0, -0x4(%rbp)
jmp 0x5a03
cmpq $0x2, -0x18(%rbp)
setae %al
andb $0x1, %al
movzbl %al, %eax
movq -0x10(%rbp), %rcx
movsbl (%rcx), %ecx
cmpl $0x30, %ecx
sete %cl
andb $0x1, %cl
movzbl %cl, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
je 0x5924
movl $0x0, -0x4(%rbp)
jmp 0x5a03
movq $0x0, -0x40(%rbp)
movq -0x40(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0x59f1
movq -0x10(%rbp), %rax
movq -0x40(%rbp), %rcx
movsbq (%rax,%rcx), %rax
movq %rax, -0x48(%rbp)
movl $0x30, %eax
cmpq -0x48(%rbp), %rax
setbe %al
andb $0x1, %al
movzbl %al, %eax
cmpq $0x39, -0x48(%rbp)
setbe %cl
andb $0x1, %cl
movzbl %cl, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
je 0x5973
jmp 0x597f
movl $0x0, -0x4(%rbp)
jmp 0x5a03
movq -0x48(%rbp), %rax
subq $0x30, %rax
movq %rax, -0x48(%rbp)
movabsq $0x1999999999999999, %rax # imm = 0x1999999999999999
cmpq %rax, -0x38(%rbp)
jae 0x599d
jmp 0x59d3
movabsq $0x1999999999999999, %rax # imm = 0x1999999999999999
cmpq %rax, -0x38(%rbp)
seta %al
andb $0x1, %al
movzbl %al, %eax
cmpq $0x5, -0x48(%rbp)
seta %cl
andb $0x1, %cl
movzbl %cl, %ecx
orl %ecx, %eax
cmpl $0x0, %eax
je 0x59d1
movl $0x0, -0x4(%rbp)
jmp 0x5a03
jmp 0x59d3
imulq $0xa, -0x38(%rbp), %rax
addq -0x48(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x592c
movq -0x38(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax,%rax)
// File: sisong[P]ApkDiffPatch/src/../HDiffPatch/compress_plugin_demo.h
// Function: lzma_setThreadNumber(hdiff_TCompress*, int)
static int _lzma_setThreadNumber(hdiff_TCompress* compressPlugin,int threadNum){
        TCompressPlugin_lzma* plugin=(TCompressPlugin_lzma*)compressPlugin;
        if (threadNum>2) threadNum=2;
        plugin->thread_num=threadNum;
        return threadNum;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpl $0x2, -0xc(%rbp)
jle 0x5e00
movl $0x2, -0xc(%rbp)
movl -0xc(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x30(%rax)
movl -0xc(%rbp), %eax
popq %rbp
retq
nop
// File: sisong[P]ApkDiffPatch/src/../HDiffPatch/_clock_for_demo.h
// Function: clock_s()
static double clock_s(){
        struct timeval t={0,0};
        int ret=gettimeofday(&t,0);
        assert(ret==0);
        if (ret==0)
            return t.tv_sec + t.tv_usec/1000000.0;
        else
            return 0;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
leaq -0x18(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x4210
leaq -0x18(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x45b0
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jne 0x61a0
jmp 0x61bf
leaq 0xa7021(%rip), %rdi     # 0xad1c8
leaq 0xa7021(%rip), %rsi     # 0xad1cf
movl $0x33, %edx
leaq 0xa7039(%rip), %rcx     # 0xad1f3
callq 0x4270
cmpl $0x0, -0x1c(%rbp)
jne 0x61e8
cvtsi2sdq -0x18(%rbp), %xmm0
cvtsi2sdq -0x10(%rbp), %xmm1
movsd 0xa5ecf(%rip), %xmm2    # 0xac0a8
divsd %xmm2, %xmm1
addsd %xmm1, %xmm0
movsd %xmm0, -0x8(%rbp)
jmp 0x61f0
xorps %xmm0, %xmm0
movsd %xmm0, -0x8(%rbp)
movsd -0x8(%rbp), %xmm0
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: sisong[P]ApkDiffPatch/src/../HDiffPatch/compress_plugin_demo.h
// Function: lzma2_setThreadNumber(hdiff_TCompress*, int)
static int _lzma2_setThreadNumber(hdiff_TCompress* compressPlugin,int threadNum){
        TCompressPlugin_lzma2* plugin=(TCompressPlugin_lzma2*)compressPlugin;
        if (threadNum>MTCODER_THREADS_MAX) threadNum=MTCODER_THREADS_MAX;
        plugin->thread_num=threadNum;
        return threadNum;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpl $0x40, -0xc(%rbp)
jle 0x67e0
movl $0x40, -0xc(%rbp)
movl -0xc(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x30(%rax)
movl -0xc(%rbp), %eax
popq %rbp
retq
nop
// File: sisong[P]ApkDiffPatch/src/../HDiffPatch/compress_plugin_demo.h
// Function: zlib_compress_open_by(hdiff_TCompress const*, int, int, hpatch_TStreamOutput const*, unsigned char*, unsigned long)
static _zlib_TCompress*  _zlib_compress_open_by(const hdiff_TCompress* compressPlugin,
                                                    int compressLevel,int compressMemLevel,
                                                    const hpatch_TStreamOutput* out_code,
                                                    unsigned char* _mem_buf,size_t _mem_buf_size){
        #define __MAX_TS(a,b)  ((a)>=(b)?(a):(b))
        const hpatch_size_t kZlibAlign=__MAX_TS(__MAX_TS(sizeof(hpatch_StreamPos_t),sizeof(void*)),sizeof(uLongf));
        #undef __MAX_TS
        unsigned char* _mem_buf_end=_mem_buf+_mem_buf_size;
        unsigned char* self_at=(unsigned char*)_hpatch_align_upper(_mem_buf,kZlibAlign);
        if (self_at>=_mem_buf_end) return 0;
        return _zlib_compress_open_at(compressPlugin,compressLevel,compressMemLevel,out_code,
                                      (_zlib_TCompress*)self_at,_mem_buf_end-self_at);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq $0x8, -0x38(%rbp)
movq -0x28(%rbp), %rax
addq -0x30(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x28(%rbp), %rax
addq $0x7, %rax
andq $-0x8, %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
cmpq -0x40(%rbp), %rax
jb 0x6b56
movq $0x0, -0x8(%rbp)
jmp 0x6b7c
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movl -0x18(%rbp), %edx
movq -0x20(%rbp), %rcx
movq -0x48(%rbp), %r8
movq -0x40(%rbp), %r9
movq -0x48(%rbp), %rax
subq %rax, %r9
callq 0x6e90
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: sisong[P]ApkDiffPatch/src/../HDiffPatch/compress_plugin_demo.h
// Function: zlib_compress_close_by(hdiff_TCompress const*, _zlib_TCompress*)
static hpatch_BOOL _zlib_compress_close_by(const hdiff_TCompress* compressPlugin,_zlib_TCompress* self){
        hpatch_BOOL result=hpatch_TRUE;
        if (!self) return result;
        if (self->c_stream.state!=0){
            int ret=deflateEnd(&self->c_stream);
            result=(Z_OK==ret)|(Z_DATA_ERROR==ret);
        }
        memset(self,0,sizeof(_zlib_TCompress));
        return result;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl $0x1, -0x1c(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x6e26
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x6e7a
movq -0x18(%rbp), %rax
cmpq $0x0, 0x50(%rax)
je 0x6e64
movq -0x18(%rbp), %rdi
addq $0x18, %rdi
callq 0x930c0
movl %eax, -0x20(%rbp)
xorl %eax, %eax
cmpl -0x20(%rbp), %eax
sete %al
andb $0x1, %al
movzbl %al, %eax
movl $0xfffffffd, %ecx       # imm = 0xFFFFFFFD
cmpl -0x20(%rbp), %ecx
sete %cl
andb $0x1, %cl
movzbl %cl, %ecx
orl %ecx, %eax
movl %eax, -0x1c(%rbp)
movq -0x18(%rbp), %rdi
xorl %esi, %esi
movl $0x88, %edx
callq 0x4210
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: sisong[P]ApkDiffPatch/src/../HDiffPatch/compress_plugin_demo.h
// Function: zlib_compress_open_at(hdiff_TCompress const*, int, int, hpatch_TStreamOutput const*, _zlib_TCompress*, unsigned long)
static _zlib_TCompress*  _zlib_compress_open_at(const hdiff_TCompress* compressPlugin,
                                                    int compressLevel,int compressMemLevel,
                                                    const hpatch_TStreamOutput* out_code,
                                                    _zlib_TCompress* self,size_t _self_and_buf_size){
        const TCompressPlugin_zlib* plugin=(const TCompressPlugin_zlib*)compressPlugin;
        assert(_self_and_buf_size>sizeof(_zlib_TCompress));
        memset(self,0,sizeof(_zlib_TCompress));
        self->c_buf=((unsigned char*)self)+sizeof(_zlib_TCompress);;
        self->c_buf_size=_self_and_buf_size-sizeof(_zlib_TCompress);
        self->out_code=out_code;
        
        self->c_stream.next_out = (Bytef*)self->c_buf;
        self->c_stream.avail_out = (uInt)self->c_buf_size;
        if (Z_OK!=deflateInit2(&self->c_stream,compressLevel,Z_DEFLATED,
                               plugin->windowBits,compressMemLevel,plugin->strategy))
            return 0;
        return self;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
cmpq $0x88, -0x30(%rbp)
jbe 0x6ec2
jmp 0x6ee1
leaq 0xa5c4e(%rip), %rdi     # 0xacb17
leaq 0xa5c72(%rip), %rsi     # 0xacb42
movl $0x8d, %edx
leaq 0xa5c8f(%rip), %rcx     # 0xacb6b
callq 0x4270
movq -0x28(%rbp), %rdi
xorl %esi, %esi
movl $0x88, %edx
callq 0x4210
movq -0x28(%rbp), %rcx
addq $0x88, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x30(%rbp), %rcx
subq $0x88, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x38(%rax)
movq -0x28(%rbp), %rdi
addq $0x18, %rdi
movl -0x14(%rbp), %esi
movq -0x38(%rbp), %rax
movsbl 0x30(%rax), %ecx
movl -0x18(%rbp), %r8d
movq -0x38(%rbp), %rax
movl 0x38(%rax), %r9d
movl $0x8, %edx
leaq 0xa5c81(%rip), %rax     # 0xacbef
movq %rax, (%rsp)
movl $0x70, 0x8(%rsp)
callq 0x92c90
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
je 0x6f91
movq $0x0, -0x8(%rbp)
jmp 0x6f99
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: sisong[P]ApkDiffPatch/src/../HDiffPatch/decompress_plugin_demo.h
// Function: zlib_decompress_open(hpatch_TDecompress*, unsigned long long, hpatch_TStreamInput const*, unsigned long long, unsigned long long)
static hpatch_decompressHandle  _zlib_decompress_open(hpatch_TDecompress* decompressPlugin,
                                                          hpatch_StreamPos_t dataSize,
                                                          const hpatch_TStreamInput* codeStream,
                                                          hpatch_StreamPos_t code_begin,
                                                          hpatch_StreamPos_t code_end){
        _zlib_TDecompress* self=0;
        unsigned char* _mem_buf=(unsigned char*)_dec_malloc(sizeof(_zlib_TDecompress)+kDecompressBufSize);
        if (!_mem_buf) _dec_memErr_rt();
        self=_zlib_decompress_open_at(decompressPlugin,codeStream,code_begin,code_end,1,
                                      (_zlib_TDecompress*)_mem_buf,sizeof(_zlib_TDecompress)+kDecompressBufSize);
        if (!self)
            free(_mem_buf);
        return self;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
movl $0x80a0, %edi           # imm = 0x80A0
callq 0x71b0
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
jne 0x7070
jmp 0x704b
jmp 0x704d
movq -0x10(%rbp), %rax
movl 0x28(%rax), %eax
cmpl $0x0, %eax
jne 0x7064
movq -0x10(%rbp), %rax
movl $0x1, 0x28(%rax)
jmp 0x7066
movq $0x0, -0x8(%rbp)
jmp 0x70b3
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x30(%rbp), %rcx
movq -0x40(%rbp), %r9
movl $0x1, %r8d
movq $0x80a0, (%rsp)         # imm = 0x80A0
callq 0x7220
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x70ab
movq -0x40(%rbp), %rdi
callq 0x4460
movq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
// File: sisong[P]ApkDiffPatch/src/../HDiffPatch/decompress_plugin_demo.h
// Function: zlib_decompress_close(hpatch_TDecompress*, void*)
static hpatch_BOOL _zlib_decompress_close(struct hpatch_TDecompress* decompressPlugin,
                                              hpatch_decompressHandle decompressHandle){
        _zlib_TDecompress* self=(_zlib_TDecompress*)decompressHandle;
        hpatch_BOOL result=_zlib_decompress_close_by(decompressPlugin,self);
        if (self) free(self);
        return result;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x74a0
movl %eax, -0x1c(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x70f8
movq -0x18(%rbp), %rdi
callq 0x4460
movl -0x1c(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: sisong[P]ApkDiffPatch/src/../HDiffPatch/decompress_plugin_demo.h
// Function: zlib_decompress_part(void*, unsigned char*, unsigned char*)
static hpatch_BOOL _zlib_decompress_part(hpatch_decompressHandle decompressHandle,
                                             unsigned char* out_part_data,unsigned char* out_part_data_end){
        _zlib_TDecompress* self=(_zlib_TDecompress*)decompressHandle;
        assert(out_part_data<=out_part_data_end);
        
        self->d_stream.next_out = out_part_data;
        self->d_stream.avail_out =(uInt)(out_part_data_end-out_part_data);
        while (self->d_stream.avail_out>0) {
            if (!__zlib_do_inflate(self))
                return hpatch_FALSE;//error;
        }
        return hpatch_TRUE;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
ja 0x7138
jmp 0x7157
leaq 0xa5d47(%rip), %rdi     # 0xace86
leaq 0xa5c3c(%rip), %rsi     # 0xacd82
movl $0xf7, %edx
leaq 0xa5d55(%rip), %rcx     # 0xacea7
callq 0x4270
movq -0x18(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x40(%rax)
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
subq %rcx, %rax
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x48(%rax)
movq -0x28(%rbp), %rax
cmpl $0x0, 0x48(%rax)
jbe 0x719a
movq -0x28(%rbp), %rdi
callq 0x7580
cmpl $0x0, %eax
jne 0x7198
movl $0x0, -0x4(%rbp)
jmp 0x71a1
jmp 0x7177
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: sisong[P]ApkDiffPatch/src/../HDiffPatch/decompress_plugin_demo.h
// Function: zlib_decompress_close_by(hpatch_TDecompress*, _zlib_TDecompress*)
static hpatch_BOOL _zlib_decompress_close_by(struct hpatch_TDecompress* decompressPlugin,
                                                 _zlib_TDecompress* self){
        hpatch_BOOL result=hpatch_TRUE;
        if (!self) return result;
        _dec_onDecErr_up();
        if (self->d_stream.state!=0){
            _dec_close_check(Z_OK==inflateEnd(&self->d_stream));
        }
        memset(self,0,sizeof(_zlib_TDecompress));
        return result;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl $0x1, -0x1c(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x74c9
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x756f
jmp 0x74cb
movq -0x18(%rbp), %rax
cmpl $0x0, 0x9c(%rax)
je 0x74fb
jmp 0x74da
movq -0x10(%rbp), %rax
movl 0x28(%rax), %eax
cmpl $0x0, %eax
jne 0x74f7
movq -0x18(%rbp), %rax
movl 0x9c(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x28(%rax)
jmp 0x74f9
jmp 0x74fb
jmp 0x74fd
movq -0x18(%rbp), %rax
cmpq $0x0, 0x60(%rax)
je 0x7559
movq -0x18(%rbp), %rdi
addq $0x28, %rdi
callq 0x9db40
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
je 0x7557
movq 0xdeaac(%rip), %rax     # 0xe5fd0
movq (%rax), %rdi
leaq 0xa5928(%rip), %rsi     # 0xace56
movb $0x0, %al
callq 0x4520
movl $0x0, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movl 0x28(%rax), %eax
cmpl $0x0, %eax
jne 0x7553
movq -0x10(%rbp), %rax
movl $0x4, 0x28(%rax)
jmp 0x7555
jmp 0x7557
jmp 0x7559
movq -0x18(%rbp), %rdi
xorl %esi, %esi
movl $0xa0, %edx
callq 0x4210
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: sisong[P]ApkDiffPatch/src/../HDiffPatch/decompress_plugin_demo.h
// Function: zlib_reset_for_next_node(z_stream_s*)
static hpatch_BOOL _zlib_reset_for_next_node(z_stream* d_stream){
            //backup
            Bytef*   next_out_back=d_stream->next_out;
            Bytef*   next_in_back=d_stream->next_in;
            unsigned int avail_out_back=d_stream->avail_out;
            unsigned int avail_in_back=d_stream->avail_in;
                //reset
            if (Z_OK!=inflateReset(d_stream)) return hpatch_FALSE;
                //restore
            d_stream->next_out=next_out_back;
            d_stream->next_in=next_in_back;
            d_stream->avail_out=avail_out_back;
            d_stream->avail_in=avail_in_back;
            return hpatch_TRUE;
        }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movl 0x20(%rax), %eax
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
callq 0x9ae20
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
je 0x77e1
movl $0x0, -0x4(%rbp)
jmp 0x7813
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movl -0x24(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x20(%rax)
movl -0x28(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x8(%rax)
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: sisong[P]ApkDiffPatch/src/../HDiffPatch/compress_plugin_demo.h
// Function: _lzma_SeqOutStream_Write(ISeqOutStream_ const*, void const*, unsigned long)
static size_t __lzma_SeqOutStream_Write(const ISeqOutStream *p, const void *buf, size_t size){
        __lzma_SeqOutStream_t* self=(__lzma_SeqOutStream_t*)p;
        const unsigned char* pdata=(const unsigned char*)buf;
        if (size>0){
            if (!self->out_code->write(self->out_code,self->writeToPos,pdata,pdata+size)){
                self->isCanceled=1;
                return 0;
            }
        }
        self->writeToPos+=size;
        return size;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x20(%rbp)
jbe 0x7891
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x18(%rax), %rax
movq -0x28(%rbp), %rcx
movq 0x8(%rcx), %rdi
movq -0x28(%rbp), %rcx
movq 0x10(%rcx), %rsi
movq -0x30(%rbp), %rdx
movq -0x30(%rbp), %rcx
addq -0x20(%rbp), %rcx
callq *%rax
cmpl $0x0, %eax
jne 0x788f
movq -0x28(%rbp), %rax
movl $0x1, 0x18(%rax)
movq $0x0, -0x8(%rbp)
jmp 0x78a9
jmp 0x7891
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %rax
addq 0x10(%rax), %rcx
movq %rcx, 0x10(%rax)
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: sisong[P]ApkDiffPatch/src/../HDiffPatch/compress_plugin_demo.h
// Function: _lzma_SeqInStream_Read(ISeqInStream_ const*, void*, unsigned long*)
static SRes __lzma_SeqInStream_Read(const ISeqInStream *p, void *buf, size_t *size){
        __lzma_SeqInStream_t* self=(__lzma_SeqInStream_t*)p;
        size_t readLen=*size;
        if (readLen+self->readFromPos>self->in_data->streamSize)
            readLen=(size_t)(self->in_data->streamSize-self->readFromPos);
        if (readLen>0){
            unsigned char* pdata=(unsigned char*)buf;
            if (!self->in_data->read(self->in_data,self->readFromPos,pdata,pdata+readLen)){
                *size=0;
                return SZ_ERROR_READ;
            }
        }
        self->readFromPos+=readLen;
        *size=readLen;
        return SZ_OK;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq -0x28(%rbp), %rcx
addq 0x10(%rcx), %rax
movq -0x28(%rbp), %rcx
movq 0x8(%rcx), %rcx
cmpq 0x8(%rcx), %rax
jbe 0x7919
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rax
movq -0x28(%rbp), %rcx
subq 0x10(%rcx), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jbe 0x796d
movq -0x18(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rax
movq -0x28(%rbp), %rcx
movq 0x8(%rcx), %rdi
movq -0x28(%rbp), %rcx
movq 0x10(%rcx), %rsi
movq -0x38(%rbp), %rdx
movq -0x38(%rbp), %rcx
addq -0x30(%rbp), %rcx
callq *%rax
cmpl $0x0, %eax
jne 0x796b
movq -0x20(%rbp), %rax
movq $0x0, (%rax)
movl $0x8, -0x4(%rbp)
jmp 0x798f
jmp 0x796d
movq -0x30(%rbp), %rcx
movq -0x28(%rbp), %rax
addq 0x10(%rax), %rcx
movq %rcx, 0x10(%rax)
movq -0x30(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: sisong[P]ApkDiffPatch/src/../HDiffPatch/decompress_plugin_demo.h
// Function: lzma2_close(hpatch_TDecompress*, void*)
static hpatch_BOOL _lzma2_close(struct hpatch_TDecompress* decompressPlugin,
                                    hpatch_decompressHandle decompressHandle){
        _lzma2_TDecompress* self=(_lzma2_TDecompress*)decompressHandle;
        if (!self) return hpatch_TRUE;
        Lzma2Dec_Free(&self->decEnv,&self->memAllocBase);
        _dec_onDecErr_up();
        free(self);
        return hpatch_TRUE;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x7c48
movl $0x1, -0x4(%rbp)
jmp 0x7c9f
movq -0x20(%rbp), %rdi
addq $0x28, %rdi
addq $0x10, %rdi
movq -0x20(%rbp), %rsi
callq 0xa7610
movq -0x20(%rbp), %rax
cmpl $0x0, 0xc8(%rax)
je 0x7c8d
jmp 0x7c6c
movq -0x10(%rbp), %rax
movl 0x28(%rax), %eax
cmpl $0x0, %eax
jne 0x7c89
movq -0x20(%rbp), %rax
movl 0xc8(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x28(%rax)
jmp 0x7c8b
jmp 0x7c8d
jmp 0x7c8f
movq -0x20(%rbp), %rdi
callq 0x4460
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: sisong[P]ApkDiffPatch/src/../HDiffPatch/decompress_plugin_demo.h
// Function: lzma_close(hpatch_TDecompress*, void*)
static hpatch_BOOL _lzma_close(struct hpatch_TDecompress* decompressPlugin,
                                   hpatch_decompressHandle decompressHandle){
        _lzma_TDecompress* self=(_lzma_TDecompress*)decompressHandle;
        if (!self) return hpatch_TRUE;
        LzmaDec_Free(&self->decEnv,&self->memAllocBase);
        _dec_onDecErr_up();
        free(self);
        return hpatch_TRUE;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x82d8
movl $0x1, -0x4(%rbp)
jmp 0x832b
movq -0x20(%rbp), %rdi
addq $0x28, %rdi
movq -0x20(%rbp), %rsi
callq 0xa7610
movq -0x20(%rbp), %rax
cmpl $0x0, 0xb8(%rax)
je 0x8319
jmp 0x82f8
movq -0x10(%rbp), %rax
movl 0x28(%rax), %eax
cmpl $0x0, %eax
jne 0x8315
movq -0x20(%rbp), %rax
movl 0xb8(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x28(%rax)
jmp 0x8317
jmp 0x8319
jmp 0x831b
movq -0x20(%rbp), %rdi
callq 0x4460
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: sisong[P]ApkDiffPatch/src/diff/DiffData.cpp
// Function: getZipIsSame(char const*, char const*, int, bool*)
bool getZipIsSame(const char* oldZipPath,const char* newZipPath,
                  int newApkFilesRemoved,bool* out_isOldHaveApkV2Sign){
    hpatch_TFileStreamInput    oldZipStream;
    hpatch_TFileStreamInput    newZipStream;
    bool            result=true;
    bool            _isInClear=false;
    
    hpatch_TFileStreamInput_init(&oldZipStream);
    hpatch_TFileStreamInput_init(&newZipStream);
    check_clear(hpatch_TFileStreamInput_open(&oldZipStream,oldZipPath));
    check_clear(hpatch_TFileStreamInput_open(&newZipStream,newZipPath));
    result=getZipIsSameWithStream(&oldZipStream.base,&newZipStream.base,
                                  newApkFilesRemoved,out_isOldHaveApkV2Sign);
clear:
    _isInClear=true;
    check_clear(hpatch_TFileStreamInput_close(&newZipStream));
    check_clear(hpatch_TFileStreamInput_close(&oldZipStream));
    return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movb $0x1, -0xa1(%rbp)
movb $0x0, -0xa2(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x9600
leaq -0xa0(%rbp), %rdi
callq 0x9600
movq -0x8(%rbp), %rsi
leaq -0x60(%rbp), %rdi
callq 0x8da90
cmpl $0x0, %eax
jne 0x94f3
leaq 0xa4006(%rip), %rdi     # 0xad4cc
movb $0x0, %al
callq 0x4060
movb $0x0, -0xa1(%rbp)
leaq 0xa3d95(%rip), %rdi     # 0xad270
leaq 0xa3d94(%rip), %rsi     # 0xad276
movl $0x7a, %edx
leaq 0xa401d(%rip), %rcx     # 0xad50b
callq 0x4270
movq -0x10(%rbp), %rsi
leaq -0xa0(%rbp), %rdi
callq 0x8da90
cmpl $0x0, %eax
jne 0x953c
leaq 0xa4037(%rip), %rdi     # 0xad546
movb $0x0, %al
callq 0x4060
movb $0x0, -0xa1(%rbp)
leaq 0xa3d4c(%rip), %rdi     # 0xad270
leaq 0xa3d4b(%rip), %rsi     # 0xad276
movl $0x7b, %edx
leaq 0xa3fd4(%rip), %rcx     # 0xad50b
callq 0x4270
leaq -0x60(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
movl -0x14(%rbp), %edx
movq -0x20(%rbp), %rcx
callq 0x8c70
andb $0x1, %al
movb %al, -0xa1(%rbp)
movb $0x1, -0xa2(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0x8e030
cmpl $0x0, %eax
jne 0x95a7
leaq 0xa400b(%rip), %rdi     # 0xad585
movb $0x0, %al
callq 0x4060
movb $0x0, -0xa1(%rbp)
leaq 0xa3ce1(%rip), %rdi     # 0xad270
leaq 0xa3ce0(%rip), %rsi     # 0xad276
movl $0x80, %edx
leaq 0xa3f69(%rip), %rcx     # 0xad50b
callq 0x4270
leaq -0x60(%rbp), %rdi
callq 0x8e030
cmpl $0x0, %eax
jne 0x95e9
leaq 0xa3ffe(%rip), %rdi     # 0xad5ba
movb $0x0, %al
callq 0x4060
movb $0x0, -0xa1(%rbp)
leaq 0xa3c9f(%rip), %rdi     # 0xad270
leaq 0xa3c9e(%rip), %rsi     # 0xad276
movl $0x81, %edx
leaq 0xa3f27(%rip), %rcx     # 0xad50b
callq 0x4270
movb -0xa1(%rbp), %al
andb $0x1, %al
addq $0xb0, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: sisong[P]ApkDiffPatch/src/diff/DiffData.cpp
// Function: getCompressedFilesInfosWithZip(UnZipper const*, TCompressedFilesInfos*)
bool getCompressedFilesInfosWithZip(const UnZipper* zip,TCompressedFilesInfos* out_infos){
    TCompressedFilesInfos infos={0};
    int fcount=UnZipper_fileCount(zip);
    for (int i=0;i<fcount;++i){
            if (UnZipper_file_isCompressed(zip,i)){
            infos.compressedCount++;
            infos.sumCompressedSize+=UnZipper_file_compressedSize(zip,i);
            infos.sumCompressedUncompressedSize+=UnZipper_file_uncompressedSize(zip,i);
        }else{
            infos.uncompressedCount++;
            infos.sumUncompressedSize+=UnZipper_file_uncompressedSize(zip,i);
        }
    }
    *out_infos=infos;
    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x30(%rbp), %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0x4210
movq -0x8(%rbp), %rdi
callq 0x7ea90
movl %eax, -0x34(%rbp)
movl $0x0, -0x38(%rbp)
movl -0x38(%rbp), %eax
cmpl -0x34(%rbp), %eax
jge 0x96e0
movq -0x8(%rbp), %rdi
movl -0x38(%rbp), %esi
callq 0x7f2e0
testb $0x1, %al
jne 0x967d
jmp 0x96b4
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
movq -0x8(%rbp), %rdi
movl -0x38(%rbp), %esi
callq 0x80520
movl %eax, %eax
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movl -0x38(%rbp), %esi
callq 0x80480
movl %eax, %eax
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x96d3
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movl -0x38(%rbp), %esi
callq 0x80480
movl %eax, %eax
addq -0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0x96d5
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x9663
movq -0x10(%rbp), %rax
movq -0x30(%rbp), %rcx
movq %rcx, (%rax)
movq -0x28(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rcx
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rcx
movq %rcx, 0x18(%rax)
movb $0x1, %al
andb $0x1, %al
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: sisong[P]ApkDiffPatch/src/diff/DiffData.cpp
// Function: getCompressedFilesInfosWithStream(hpatch_TStreamInput const*, TCompressedFilesInfos*)
bool getCompressedFilesInfosWithStream(const hpatch_TStreamInput* zipStream,TCompressedFilesInfos* out_infos){
    UnZipper            zip;
    bool            result=true;
    bool            _isInClear=false;
    UnZipper_init(&zip);
    check_clear(UnZipper_openStream(&zip,zipStream));
    result=getCompressedFilesInfosWithZip(&zip,out_infos);
clear:
    _isInClear=true;
    check_clear(UnZipper_close(&zip));
    return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movb $0x1, -0xc1(%rbp)
movb $0x0, -0xc2(%rbp)
leaq -0xc0(%rbp), %rdi
callq 0x7f360
movq -0x8(%rbp), %rsi
leaq -0xc0(%rbp), %rdi
xorl %r8d, %r8d
movl %r8d, %edx
movl %r8d, %ecx
callq 0x7f480
testb $0x1, %al
jne 0x978e
leaq 0xa3e8e(%rip), %rdi     # 0xad5ef
movb $0x0, %al
callq 0x4060
movb $0x0, -0xc1(%rbp)
leaq 0xa3afa(%rip), %rdi     # 0xad270
leaq 0xa3af9(%rip), %rsi     # 0xad276
movl $0x9d, %edx
leaq 0xa3e92(%rip), %rcx     # 0xad61b
callq 0x4270
movq -0x10(%rbp), %rsi
leaq -0xc0(%rbp), %rdi
callq 0x9630
andb $0x1, %al
movb %al, -0xc1(%rbp)
movb $0x1, -0xc2(%rbp)
leaq -0xc0(%rbp), %rdi
callq 0x7f390
testb $0x1, %al
jne 0x97f1
leaq 0xa3eb4(%rip), %rdi     # 0xad678
movb $0x0, %al
callq 0x4060
movb $0x0, -0xc1(%rbp)
leaq 0xa3a97(%rip), %rdi     # 0xad270
leaq 0xa3a96(%rip), %rsi     # 0xad276
movl $0xa1, %edx
leaq 0xa3e2f(%rip), %rcx     # 0xad61b
callq 0x4270
movb -0xc1(%rbp), %al
andb $0x1, %al
addq $0xd0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: sisong[P]ApkDiffPatch/src/diff/DiffData.cpp
// Function: getCompressedFilesInfos(char const*, TCompressedFilesInfos*)
bool getCompressedFilesInfos(const char* zipPath,TCompressedFilesInfos* out_infos){
    hpatch_TFileStreamInput    zipStream;
    bool            result=true;
    bool            _isInClear=false;
    
    hpatch_TFileStreamInput_init(&zipStream);
    check_clear(hpatch_TFileStreamInput_open(&zipStream,zipPath));
    result=getCompressedFilesInfosWithStream(&zipStream.base,out_infos);
clear:
    _isInClear=true;
    check_clear(hpatch_TFileStreamInput_close(&zipStream));
    return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movb $0x1, -0x51(%rbp)
movb $0x0, -0x52(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x9600
movq -0x8(%rbp), %rsi
leaq -0x50(%rbp), %rdi
callq 0x8da90
cmpl $0x0, %eax
jne 0x9874
leaq 0xa3e4b(%rip), %rdi     # 0xad695
movb $0x0, %al
callq 0x4060
movb $0x0, -0x51(%rbp)
leaq 0xa3a14(%rip), %rdi     # 0xad270
leaq 0xa3a13(%rip), %rsi     # 0xad276
movl $0xab, %edx
leaq 0xa3e5f(%rip), %rcx     # 0xad6ce
callq 0x4270
leaq -0x50(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x9710
andb $0x1, %al
movb %al, -0x51(%rbp)
movb $0x1, -0x52(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x8e030
cmpl $0x0, %eax
jne 0x98c9
leaq 0xa3e73(%rip), %rdi     # 0xad712
movb $0x0, %al
callq 0x4060
movb $0x0, -0x51(%rbp)
leaq 0xa39bf(%rip), %rdi     # 0xad270
leaq 0xa39be(%rip), %rsi     # 0xad276
movl $0xaf, %edx
leaq 0xa3e0a(%rip), %rcx     # 0xad6ce
callq 0x4270
movb -0x51(%rbp), %al
andb $0x1, %al
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: sisong[P]ApkDiffPatch/src/diff/DiffData.cpp
// Function: getNormalizedCompressedCode(UnZipper*, int, std::vector<unsigned char, std::allocator<unsigned char>>&, int, int)
static bool getNormalizedCompressedCode(UnZipper* selfZip,int selfIndex,
                                        std::vector<TByte>& out_compressedCode,
                                        int zlibCompressLevel,int zlibCompressMemLevel){
    size_t selfFileSize=UnZipper_file_uncompressedSize(selfZip,selfIndex);
    size_t maxCodeSize=Zipper_compressData_maxCodeSize(selfFileSize);
    std::vector<TByte>& buf(out_compressedCode);
    buf.resize(maxCodeSize+selfFileSize);
    hpatch_TStreamOutput stream;
    mem_as_hStreamOutput(&stream,buf.data()+maxCodeSize,buf.data()+maxCodeSize+selfFileSize);
    check(UnZipper_fileData_decompressTo(selfZip,selfIndex,&stream));
    size_t compressedSize=Zipper_compressData(buf.data()+maxCodeSize,selfFileSize,buf.data(),
                                              maxCodeSize,zlibCompressLevel,zlibCompressMemLevel);
    buf.resize(compressedSize);
    return compressedSize>0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl %r8d, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x80480
movl %eax, %eax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
callq 0x81ae0
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rsi
addq -0x28(%rbp), %rsi
callq 0xbeb0
movq -0x38(%rbp), %rdi
callq 0xbb60
addq -0x30(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x38(%rbp), %rdi
callq 0xbb60
movq -0x68(%rbp), %rsi
movq %rax, %rdx
addq -0x30(%rbp), %rdx
addq -0x28(%rbp), %rdx
leaq -0x58(%rbp), %rdi
callq 0x85c10
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
leaq -0x58(%rbp), %rdx
xorl %eax, %eax
movl %eax, %ecx
callq 0x80d50
testb $0x1, %al
jne 0x9c7c
leaq 0xa35d8(%rip), %rdi     # 0xad22e
movb $0x0, %al
callq 0x4060
leaq 0xa360c(%rip), %rdi     # 0xad270
leaq 0xa360b(%rip), %rsi     # 0xad276
movl $0xbc, %edx
leaq 0xa3f34(%rip), %rcx     # 0xadbab
callq 0x4270
movq -0x38(%rbp), %rdi
callq 0xbb60
addq -0x30(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x38(%rbp), %rdi
callq 0xbb60
movq -0x78(%rbp), %rdi
movq -0x70(%rbp), %rsi
movq %rax, %rdx
movq -0x30(%rbp), %rcx
movl -0x1c(%rbp), %r8d
movl -0x20(%rbp), %r9d
callq 0x81b10
movq %rax, -0x60(%rbp)
movq -0x38(%rbp), %rdi
movq -0x60(%rbp), %rsi
callq 0xbeb0
cmpq $0x0, -0x60(%rbp)
seta %al
andb $0x1, %al
addq $0x80, %rsp
popq %rbp
retq
nop