LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/nilnilnil[P]autocomplete/deps/mongoose/mongoose.c
// Function: get_request_len
static int get_request_len(const char *buf, int buflen) {
  const char *s, *e;
  int len = 0;

  DEBUG_TRACE(("buf: %p, len: %d", buf, buflen));
  for (s = buf, e = s + buflen - 1; len <= 0 && s < e; s++)
    // Control characters are not allowed but >=128 is.
    if (!isprint(* (const unsigned char *) s) && *s != '\r' &&
        *s != '\n' && * (const unsigned char *) s < 128) {
      len = -1;
    } else if (s[0] == '\n' && s[1] == '\n') {
      len = (int) (s - buf) + 2;
    } else if (s[0] == '\n' && &s[1] < e &&
        s[1] == '\r' && s[2] == '\n') {
      len = (int) (s - buf) + 3;
    }

  return len;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movslq %esi, %rax
leaq (%rdi,%rax), %r14
decq %r14
xorl %eax, %eax
cmpq %rdi, %r14
jbe 0x12e13
movq %rdi, %rbx
callq 0x5520
movq (%rax), %rcx
leaq 0x1(%rbx), %rdx
xorl %r8d, %r8d
movl $0x3, %esi
movq %rbx, %rdi
movzbl -0x1(%rdx), %r9d
movb 0x1(%rcx,%r9,2), %al
andb $0x40, %al
cmpb $0x1, %al
movl $0x0, %eax
sbbl %eax, %eax
orl %r8d, %eax
cmpb $0xd, %r9b
cmovel %r8d, %eax
testb %r9b, %r9b
cmovsl %r8d, %eax
cmpb $0xa, %r9b
cmovel %r8d, %eax
jne 0x12dfb
cmpb $0xa, (%rdx)
jne 0x12ddb
movl %edi, %eax
subl %ebx, %eax
addl $0x2, %eax
jmp 0x12dfb
cmpb $0xa, %r9b
jne 0x12df8
cmpq %r14, %rdx
jae 0x12df8
cmpb $0xd, (%rdx)
jne 0x12df8
cmpb $0xa, 0x1(%rdx)
movl %r8d, %eax
jne 0x12dfb
movl %esi, %eax
jmp 0x12dfb
movl %r8d, %eax
testl %eax, %eax
jg 0x12e13
incq %rdi
leaq 0x1(%rdx), %r9
incl %esi
movl %eax, %r8d
cmpq %r14, %rdx
movq %r9, %rdx
jb 0x12d9c
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/nilnilnil[P]autocomplete/deps/mongoose/mongoose.c
// Function: read_request
static int read_request(FILE *fp, SOCKET sock, SSL *ssl, char *buf, int bufsiz,
                        int *nread) {
  int n, request_len;

  request_len = 0;
  while (*nread < bufsiz && request_len == 0) {
    n = pull(fp, sock, ssl, buf + *nread, bufsiz - *nread);
    if (n <= 0) {
      break;
    } else {
      *nread += n;
      request_len = get_request_len(buf, *nread);
    }
  }

  return request_len;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movslq (%r9), %rax
xorl %r15d, %r15d
cmpl %eax, %r8d
jle 0x12e96
movq %r9, %rbx
movl %r8d, %ebp
movq %rcx, %r14
movq %rax, %rcx
addq %r14, %rcx
subl %eax, %r8d
movq %rdi, 0x10(%rsp)
movl %esi, 0xc(%rsp)
movq %rdx, %r13
callq 0xe7be
testl %eax, %eax
jle 0x12e96
movslq (%rbx), %rcx
movslq %eax, %r12
addq %rcx, %r12
movl %r12d, (%rbx)
movq %r14, %rdi
movl %r12d, %esi
callq 0x12d69
movl %eax, %r15d
movl %ebp, %r8d
subl %r12d, %r8d
jle 0x12e96
testl %r15d, %r15d
jne 0x12e96
addq %r14, %r12
movq 0x10(%rsp), %rdi
movl 0xc(%rsp), %esi
movq %r13, %rdx
movq %r12, %rcx
jmp 0x12e52
movl %r15d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/nilnilnil[P]autocomplete/deps/mongoose/mongoose.c
// Function: send_http_error
static void send_http_error(struct mg_connection *conn, int status,
                            const char *reason, const char *fmt, ...) {
  char buf[BUFSIZ];
  va_list ap;
  int len;

  conn->request_info.status_code = status;

  if (call_user(conn, MG_HTTP_ERROR) == NULL) {
    buf[0] = '\0';
    len = 0;

    /* Errors 1xx, 204 and 304 MUST NOT send a body */
    if (status > 199 && status != 204 && status != 304) {
      len = mg_snprintf(conn, buf, sizeof(buf), "Error %d: %s", status, reason);
      cry(conn, "%s", buf);
      buf[len++] = '\n';

      va_start(ap, fmt);
      len += mg_vsnprintf(conn, buf + len, sizeof(buf) - len, fmt, ap);
      va_end(ap);
    }
    DEBUG_TRACE(("[%s]", buf));

    mg_printf(conn, "HTTP/1.1 %d %s\r\n"
              "Content-Type: text/plain\r\n"
              "Content-Length: %d\r\n"
              "Connection: %s\r\n\r\n", status, reason, len,
              suggest_connection_header(conn));
    conn->num_bytes_sent += mg_printf(conn, "%s", buf);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20d8, %rsp           # imm = 0x20D8
movq %rcx, %r15
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %rbx
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
testb %al, %al
je 0x12f09
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movl %esi, 0x4c(%rdi)
movq 0x458(%rdi), %rax
movq 0xc8(%rax), %rcx
movq %rcx, 0x8(%rdi)
movq 0xc0(%rax), %rax
testq %rax, %rax
je 0x12f41
leaq 0x8(%rbx), %rdx
movl $0x1, %edi
movq %rbx, %rsi
callq *%rax
testq %rax, %rax
jne 0x13049
movb $0x0, 0xd0(%rsp)
xorl %r12d, %r12d
cmpl $0xcc, %ebp
je 0x12ff2
cmpl $0x130, %ebp            # imm = 0x130
je 0x12ff2
leaq 0x2f2f(%rip), %rcx      # 0x15e9a
leaq 0xd0(%rsp), %r12
movl $0x2000, %edx           # imm = 0x2000
movq %rbx, %rdi
movq %r12, %rsi
movl %ebp, %r8d
movq %r14, %r9
xorl %eax, %eax
callq 0x131fd
movl %eax, %r13d
leaq 0x37db(%rip), %rsi      # 0x16770
movq %rbx, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0xfc79
movslq %r13d, %r12
leaq (%rsp,%r12), %rsi
addq $0xd1, %rsi
movb $0xa, -0x1(%rsi)
movabsq $0x3000000020, %rax     # imm = 0x3000000020
movq %rsp, %r8
movq %rax, (%r8)
leaq 0x2110(%rsp), %rax
movq %rax, 0x8(%r8)
leaq 0x20(%rsp), %rax
movq %rax, 0x10(%r8)
movl $0x1fff, %edx           # imm = 0x1FFF
subq %r12, %rdx
movq %rbx, %rdi
movq %r15, %rcx
callq 0xe9ba
addl %eax, %r12d
incl %r12d
movq %rbx, %rdi
callq 0x13176
testl %eax, %eax
leaq 0x2f00(%rip), %rax      # 0x15f03
leaq 0x2eee(%rip), %r9       # 0x15ef8
cmoveq %rax, %r9
leaq 0x2e92(%rip), %rsi      # 0x15ea7
movq %rbx, %rdi
movl %ebp, %edx
movq %r14, %rcx
movl %r12d, %r8d
xorl %eax, %eax
callq 0xe8fd
leaq 0x3742(%rip), %rsi      # 0x16770
leaq 0xd0(%rsp), %rdx
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe8fd
cltq
addq %rax, 0x4b0(%rbx)
addq $0x20d8, %rsp           # imm = 0x20D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/nilnilnil[P]autocomplete/deps/mongoose/mongoose.c
// Function: log_access
static void log_access(const struct mg_connection *conn) {
  const struct mg_request_info *ri;
  FILE *fp;
  char date[64];

  fp = conn->ctx->config[ACCESS_LOG_FILE] == NULL ?  NULL :
    mg_fopen(conn->ctx->config[ACCESS_LOG_FILE], "a+");

  if (fp == NULL)
    return;

  (void) strftime(date, sizeof(date), "%d/%b/%Y:%H:%M:%S %z",
      localtime(&conn->birth_time));

  ri = &conn->request_info;

  flockfile(fp);

  (void) fprintf(fp,
      "%s - %s [%s] \"%s %s HTTP/%s\" %d %" INT64_FMT,
      inet_ntoa(conn->client.rsa.u.sin.sin_addr),
      ri->remote_user == NULL ? "-" : ri->remote_user,
      date,
      ri->request_method ? ri->request_method : "-",
      ri->uri ? ri->uri : "-",
      ri->http_version,
      conn->request_info.status_code, conn->num_bytes_sent);
  log_header(conn, "Referer", fp);
  log_header(conn, "User-Agent", fp);
  (void) fputc('\n', fp);
  (void) fflush(fp);

  funlockfile(fp);
  (void) fclose(fp);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rdi, %r14
movq 0x458(%rdi), %rax
movq 0x48(%rax), %rdi
testq %rdi, %rdi
je 0x13088
leaq 0x26fc(%rip), %rsi      # 0x1577a
callq 0x55c0
movq %rax, %rbx
jmp 0x1308a
xorl %ebx, %ebx
testq %rbx, %rbx
je 0x1316c
leaq 0x4a8(%r14), %rdi
callq 0x5340
leaq 0x2e8a(%rip), %rdx      # 0x15f30
movq %rsp, %r15
movl $0x40, %esi
movq %r15, %rdi
movq %rax, %rcx
callq 0x53a0
movq %rbx, %rdi
callq 0x51b0
movl 0x490(%r14), %edi
callq 0x5220
movq 0x30(%r14), %rcx
testq %rcx, %rcx
leaq 0x2ea2(%rip), %rdx      # 0x15f7d
cmoveq %rdx, %rcx
movq 0x10(%r14), %r9
movq 0x18(%r14), %r10
testq %r9, %r9
cmoveq %rdx, %r9
testq %r10, %r10
cmoveq %rdx, %r10
movl 0x4c(%r14), %r11d
leaq 0x2e45(%rip), %rsi      # 0x15f45
movq %rbx, %rdi
movq %rax, %rdx
movq %r15, %r8
xorl %eax, %eax
pushq 0x4b0(%r14)
pushq %r11
pushq 0x20(%r14)
pushq %r10
callq 0x56f0
addq $0x20, %rsp
leaq 0x2e3f(%rip), %rsi      # 0x15f69
movq %r14, %rdi
movq %rbx, %rdx
callq 0x133e4
leaq 0x2e35(%rip), %rsi      # 0x15f71
movq %r14, %rdi
movq %rbx, %rdx
callq 0x133e4
movl $0xa, %edi
movq %rbx, %rsi
callq 0x5630
movq %rbx, %rdi
callq 0x55b0
movq %rbx, %rdi
callq 0x53c0
movq %rbx, %rdi
callq 0x54a0
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/nilnilnil[P]autocomplete/deps/mongoose/mongoose.c
// Function: should_keep_alive
static int should_keep_alive(const struct mg_connection *conn) {
  const char *http_version = conn->request_info.http_version;
  const char *header = mg_get_header(conn, "Connection");
  return (header == NULL && http_version && !strcmp(http_version, "1.1")) ||
      (header != NULL && !mg_strcasecmp(header, "keep-alive"));
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x20(%rdi), %r14
addq $0x8, %rdi
leaq 0x3bd4(%rip), %rsi      # 0x16d5d
callq 0xe677
movq %rax, %rbx
testq %rax, %rax
sete %al
testq %r14, %r14
setne %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x131b7
leaq 0x3458(%rip), %rsi      # 0x16603
movq %r14, %rdi
callq 0x56b0
testl %eax, %eax
jmp 0x131eb
testq %rbx, %rbx
je 0x131f9
callq 0x50e0
movq (%rax), %rax
xorl %ecx, %ecx
leaq 0x2d2b(%rip), %rdx      # 0x15ef8
movzbl (%rbx,%rcx), %r8d
movl (%rax,%r8,4), %esi
movzbl (%rcx,%rdx), %edi
movl (%rax,%rdi,4), %edi
testl %r8d, %r8d
je 0x131e9
incq %rcx
cmpl %edi, %esi
je 0x131cd
cmpl %edi, %esi
sete %al
movzbl %al, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
xorl %eax, %eax
jmp 0x131ee
// File: /workspace/github_cpp_makefile_star2_O1/nilnilnil[P]autocomplete/deps/mongoose/mongoose.c
// Function: mg_snprintf
static int mg_snprintf(struct mg_connection *conn, char *buf, size_t buflen,
                       const char *fmt, ...) {
  va_list ap;
  int n;

  va_start(ap, fmt);
  n = mg_vsnprintf(conn, buf, buflen, fmt, ap);
  va_end(ap);

  return n;
}

// Assembly:
subq $0xd8, %rsp
leaq 0x20(%rsp), %r10
movq %r8, 0x20(%r10)
movq %r9, 0x28(%r10)
testb %al, %al
je 0x1324c
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %rsp, %r8
movq %r10, 0x10(%r8)
leaq 0xe0(%rsp), %rax
movq %rax, 0x8(%r8)
movabsq $0x3000000020, %rax     # imm = 0x3000000020
movq %rax, (%r8)
callq 0xe9ba
addq $0xd8, %rsp
retq
// File: /workspace/github_cpp_makefile_star2_O1/nilnilnil[P]autocomplete/deps/mongoose/mongoose.c
// Function: parse_http_headers
static void parse_http_headers(char **buf, struct mg_request_info *ri) {
  int i;

  for (i = 0; i < (int) ARRAY_SIZE(ri->http_headers); i++) {
    ri->http_headers[i].name = skip_quoted(buf, ":", " ", 0);
    ri->http_headers[i].value = skip(buf, "\r\n");
    if (ri->http_headers[i].name[0] == '\0')
      break;
    ri->num_headers = i + 1;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl $0x1, %ebp
xorl %r15d, %r15d
leaq 0x202f(%rip), %r12      # 0x152c8
leaq 0x2fa0(%rip), %r13      # 0x16240
movq %r14, %rdi
leaq 0x202c(%rip), %rsi      # 0x152d6
movq %r12, %rdx
xorl %ecx, %ecx
callq 0x132f9
movq %rax, 0x50(%rbx,%r15)
movq %r14, %rdi
movq %r13, %rsi
movq %r13, %rdx
xorl %ecx, %ecx
callq 0x132f9
movq %rax, 0x58(%rbx,%r15)
movq 0x50(%rbx,%r15), %rax
cmpb $0x0, (%rax)
je 0x132ea
movl %ebp, 0x4c(%rbx)
addq $0x10, %r15
incl %ebp
cmpq $0x400, %r15            # imm = 0x400
jne 0x132a0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/nilnilnil[P]autocomplete/deps/mongoose/mongoose.c
// Function: skip_quoted
static char *skip_quoted(char **buf, const char *delimiters, const char *whitespace, char quotechar) {
  char *p, *begin_word, *end_word, *end_whitespace;

  begin_word = *buf;
  end_word = begin_word + strcspn(begin_word, delimiters);

  /* Check for quotechar */
  if (end_word > begin_word) {
    p = end_word - 1;
    while (*p == quotechar) {
      /* If there is anything beyond end_word, copy it */
      if (*end_word == '\0') {
        *p = '\0';
        break;
      } else {
        size_t end_off = strcspn(end_word + 1, delimiters);
        memmove (p, end_word, end_off + 1);
        p += end_off; /* p must correspond to end_word - 1 */
        end_word += end_off + 1;
      }
    }
    for (p++; p < end_word; p++) {
      *p = '\0';
    }
  }

  if (*end_word == '\0') {
    *buf = end_word;
  } else {
    end_whitespace = end_word + 1 + strspn(end_word + 1, whitespace);

    for (p = end_word; p < end_whitespace; p++) {
      *p = '\0';
    }

    *buf = end_whitespace;
  }

  return begin_word;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, %ebp
movq %rdx, %r14
movq %rsi, %r13
movq %rdi, %r12
movq (%rdi), %rbx
movq %rbx, %rdi
callq 0x5090
leaq (%rbx,%rax), %r15
testq %rax, %rax
jle 0x1339b
movq %r14, 0x8(%rsp)
movq %r12, 0x10(%rsp)
leaq -0x1(%r15), %r12
cmpb %bpl, -0x1(%r15)
jne 0x13378
cmpb $0x0, (%r15)
je 0x13373
leaq 0x1(%r15), %rdi
movq %r13, %rsi
callq 0x5090
movq %rax, %r14
leaq 0x1(%rax), %rdx
movq %r12, %rdi
movq %r15, %rsi
callq 0x5870
leaq (%r12,%r14), %rdx
addq %r14, %r15
incq %r15
cmpb %bpl, (%r12,%r14)
movq %rdx, %r12
je 0x1333a
jmp 0x1337b
movb $0x0, (%r12)
movq %r12, %rdx
leaq 0x1(%rdx), %rdi
cmpq %r15, %rdi
jae 0x13391
notq %rdx
addq %r15, %rdx
xorl %esi, %esi
callq 0x5270
movq 0x10(%rsp), %r12
movq 0x8(%rsp), %r14
cmpb $0x0, (%r15)
je 0x133cb
leaq 0x1(%r15), %rdi
movq %r14, %rsi
callq 0x5200
leaq (%r15,%rax), %r14
incq %r14
cmpq %r14, %r15
jae 0x133ce
incq %rax
movq %r15, %rdi
xorl %esi, %esi
movq %rax, %rdx
callq 0x5270
jmp 0x133ce
movq %r15, %r14
movq %r14, (%r12)
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/nilnilnil[P]autocomplete/deps/mongoose/mongoose.c
// Function: log_header
static void log_header(const struct mg_connection *conn, const char *header,
                       FILE *fp) {
  const char *header_value;

  if ((header_value = mg_get_header(conn, header)) == NULL) {
    (void) fprintf(fp, "%s", " -");
  } else {
    (void) fprintf(fp, " \"%s\"", header_value);
  }
}

// Assembly:
pushq %rbx
movq %rdx, %rbx
addq $0x8, %rdi
callq 0xe677
testq %rax, %rax
je 0x1340b
leaq 0x3473(%rip), %rsi      # 0x16870
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
popq %rbx
jmp 0x56f0
leaq 0x2b6a(%rip), %rdi      # 0x15f7c
movq %rbx, %rsi
popq %rbx
jmp 0x5550
// File: /workspace/github_cpp_makefile_star2_O1/nilnilnil[P]autocomplete/deps/mongoose/mongoose.c
// Function: match_extension
static int match_extension(const char *path, const char *ext_list) {
  struct vec ext_vec;
  size_t path_len;

  path_len = strlen(path);

  while ((ext_list = next_option(ext_list, &ext_vec, NULL)) != NULL)
    if (ext_vec.len < path_len &&
        mg_strncasecmp(path + path_len - ext_vec.len,
          ext_vec.ptr, ext_vec.len) == 0)
      return 1;

  return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r15
movq %rdi, %rbx
callq 0x5210
movq %rax, %r14
xorl %r13d, %r13d
movq %rsp, %rsi
movq %r15, %rdi
xorl %edx, %edx
callq 0x12976
testq %rax, %rax
je 0x13be4
movq %rax, %r15
addq %r14, %rbx
movq %rsp, %r12
movq 0x8(%rsp), %rdx
cmpq %r14, %rdx
jae 0x13bc4
movq %rbx, %rdi
subq %rdx, %rdi
movq (%rsp), %rsi
callq 0xeb3c
testl %eax, %eax
je 0x13bde
xorl %r13d, %r13d
movq %r15, %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0x12976
movq %rax, %r15
testq %rax, %rax
jne 0x13ba7
jmp 0x13be4
movl $0x1, %r13d
movl %r13d, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/nilnilnil[P]autocomplete/deps/mongoose/mongoose.c
// Function: handle_ssi_file_request
static void handle_ssi_file_request(struct mg_connection *conn,
                                    const char *path) {
  FILE *fp;

  if ((fp = mg_fopen(path, "rb")) == NULL) {
    send_http_error(conn, 500, http_500_error, "fopen(%s): %s", path,
                    strerror(ERRNO));
  } else {
    set_close_on_exec(fileno(fp));
    mg_printf(conn, "HTTP/1.1 200 OK\r\n"
              "Content-Type: text/html\r\nConnection: %s\r\n\r\n",
              suggest_connection_header(conn));
    send_ssi_file(conn, path, fp, 0);
    (void) fclose(fp);
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x295e(%rip), %rsi      # 0x16565
movq %rbx, %rdi
callq 0x55c0
testq %rax, %rax
je 0x13c7c
movq %rax, %r15
movq %rax, %rdi
callq 0x54f0
movl %eax, %edi
movl $0x2, %esi
movl $0x1, %edx
xorl %eax, %eax
callq 0x5290
movq %r14, %rdi
callq 0x13176
testl %eax, %eax
leaq 0x22c0(%rip), %rax      # 0x15f03
leaq 0x22ae(%rip), %rdx      # 0x15ef8
cmoveq %rax, %rdx
leaq 0x2b8f(%rip), %rsi      # 0x167e4
movq %r14, %rdi
xorl %eax, %eax
callq 0xe8fd
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
xorl %ecx, %ecx
callq 0x14946
movq %r15, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x54a0
callq 0x5060
movl (%rax), %edi
callq 0x51a0
leaq 0x2400(%rip), %rdx      # 0x1608f
leaq 0x2c58(%rip), %rcx      # 0x168ee
movq %r14, %rdi
movl $0x1f4, %esi            # imm = 0x1F4
movq %rbx, %r8
movq %rax, %r9
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
jmp 0x12ea8
// File: /workspace/github_cpp_makefile_star2_O1/nilnilnil[P]autocomplete/deps/mongoose/mongoose.c
// Function: get_document_root
static int get_document_root(const struct mg_connection *conn,
                             struct vec *document_root) {
  const char *root, *uri;
  int len_of_matched_uri;
  struct vec uri_vec, path_vec;

  uri = conn->request_info.uri;
  len_of_matched_uri = 0;
  root = next_option(conn->ctx->config[DOCUMENT_ROOT], document_root, NULL);

  while ((root = next_option(root, &uri_vec, &path_vec)) != NULL) {
    if (memcmp(uri, uri_vec.ptr, uri_vec.len) == 0) {
      *document_root = path_vec;
      len_of_matched_uri = uri_vec.len;
      break;
    }
  }

  return len_of_matched_uri;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq 0x18(%rdi), %r15
movq 0x458(%rdi), %rax
movq 0xa0(%rax), %rdi
xorl %ebx, %ebx
movq %rsi, (%rsp)
xorl %edx, %edx
callq 0x12976
movq %rax, %rbp
leaq 0x8(%rsp), %r12
leaq 0x18(%rsp), %r13
movq %rbp, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x12976
testq %rax, %rax
je 0x142b0
movq %rax, %rbp
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %r14
movq %r15, %rdi
movq %r14, %rdx
callq 0x54d0
testl %eax, %eax
jne 0x14272
movups 0x18(%rsp), %xmm0
movq (%rsp), %rax
movups %xmm0, (%rax)
movl %r14d, %ebx
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/nilnilnil[P]autocomplete/deps/mongoose/mongoose.c
// Function: compare_dir_entries
static int WINCDECL compare_dir_entries(const void *p1, const void *p2) {
  const struct de *a = (const struct de *) p1, *b = (const struct de *) p2;
  const char *query_string = a->conn->request_info.query_string;
  int cmp_result = 0;

  if (query_string == NULL) {
    query_string = "na";
  }

  if (a->st.is_directory && !b->st.is_directory) {
    return -1;  // Always put directories on top
  } else if (!a->st.is_directory && b->st.is_directory) {
    return 1;   // Always put directories on top
  } else if (*query_string == 'n') {
    cmp_result = strcmp(a->file_name, b->file_name);
  } else if (*query_string == 's') {
    cmp_result = a->st.size == b->st.size ? 0 :
      a->st.size > b->st.size ? 1 : -1;
  } else if (*query_string == 'd') {
    cmp_result = a->st.mtime == b->st.mtime ? 0 :
      a->st.mtime > b->st.mtime ? 1 : -1;
  }

  return query_string[1] == 'd' ? -cmp_result : cmp_result;
}

// Assembly:
pushq %rbx
movq (%rdi), %rax
movq 0x28(%rax), %rax
testq %rax, %rax
leaq 0x1d78(%rip), %rbx      # 0x164b4
cmovneq %rax, %rbx
movl 0x10(%rdi), %eax
testl %eax, %eax
je 0x14751
cmpl $0x0, 0x10(%rsi)
je 0x1477f
testl %eax, %eax
jne 0x1475c
movl $0x1, %ecx
cmpl $0x0, 0x10(%rsi)
jne 0x147b5
movzbl (%rbx), %ecx
cmpl $0x64, %ecx
je 0x14794
cmpl $0x73, %ecx
je 0x14786
xorl %eax, %eax
cmpl $0x6e, %ecx
jne 0x147aa
movq 0x8(%rdi), %rdi
movq 0x8(%rsi), %rsi
callq 0x56b0
jmp 0x147aa
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
jmp 0x147b5
movq 0x18(%rdi), %rax
xorl %ecx, %ecx
xorl %edx, %edx
cmpq 0x18(%rsi), %rax
jmp 0x147a0
movq 0x20(%rdi), %rax
xorl %ecx, %ecx
xorl %edx, %edx
cmpq 0x20(%rsi), %rax
setg %dl
leal -0x1(%rdx,%rdx), %eax
cmovel %ecx, %eax
movl %eax, %ecx
negl %ecx
cmpb $0x64, 0x1(%rbx)
cmovnel %eax, %ecx
movl %ecx, %eax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/nilnilnil[P]autocomplete/deps/mongoose/mongoose.c
// Function: send_file_data
static void send_file_data(struct mg_connection *conn, FILE *fp, int64_t len) {
  char buf[BUFSIZ];
  int to_read, num_read, num_written;

  while (len > 0) {
    // Calculate how much to read from the file in the buffer
    to_read = sizeof(buf);
    if ((int64_t) to_read > len)
      to_read = (int) len;

    // Read from file, exit the loop on error
    if ((num_read = fread(buf, 1, (size_t)to_read, fp)) == 0)
      break;

    // Send read bytes to the client, exit the loop on error
    if ((num_written = mg_write(conn, buf, (size_t)num_read)) != num_read)
      break;

    // Both read and were successful, adjust counters
    conn->num_bytes_sent += num_written;
    len -= num_written;
  }
}

// Assembly:
testq %rdx, %rdx
jle 0x14844
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2008, %rsp           # imm = 0x2008
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movl $0x2000, %ebp           # imm = 0x2000
movq %rsp, %r12
cmpq %rbp, %rbx
movl %ebx, %edx
cmovgeq %rbp, %rdx
movl $0x1, %esi
movq %r12, %rdi
movq %r14, %rcx
callq 0x5780
movq %rax, %r13
testl %r13d, %r13d
je 0x14833
movslq %r13d, %r8
movl 0x470(%r15), %esi
movq 0x460(%r15), %rdx
xorl %edi, %edi
movq %r12, %rcx
callq 0xe841
cmpl %r13d, %eax
jne 0x14833
cltq
addq %rax, 0x4b0(%r15)
subq %rax, %rbx
jg 0x147e4
addq $0x2008, %rsp           # imm = 0x2008
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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:
pushq %r15
pushq %r14
pushq %rbx
subq $0xd0, %rsp
movq %rsi, %r10
movq %rdi, %rbx
leaq 0x20(%rsp), %rsi
movq %rdx, 0x10(%rsi)
movq %rcx, 0x18(%rsi)
movq %r8, 0x20(%rsi)
movq %r9, 0x28(%rsi)
testb %al, %al
je 0x148a7
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movslq 0x1008(%rdi), %rax
movl $0xffe, %ecx            # imm = 0xFFE
subl %eax, %ecx
leaq (%rdi,%rax), %r14
addq $0x8, %r14
movq %rsp, %r8
movq %rsi, 0x10(%r8)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%r8)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, (%r8)
movq (%rdi), %rdi
movslq %ecx, %r15
movq %r14, %rsi
movq %r15, %rdx
movq %r10, %rcx
callq 0xe9ba
testl %eax, %eax
setle %cl
cmpl %r15d, %eax
setge %dl
orb %cl, %dl
jne 0x14936
movslq 0x1210(%rbx), %rcx
cmpq $0x3d, %rcx
jg 0x14936
leaq 0x8(%rbx), %rdx
movslq 0x1008(%rbx), %rsi
addq %rsi, %rdx
leal 0x1(%rcx), %edi
movl %edi, 0x1210(%rbx)
movq %rdx, 0x1010(%rbx,%rcx,8)
addl %esi, %eax
incl %eax
movl %eax, 0x1008(%rbx)
movq %r14, %rax
addq $0xd0, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/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:
pushq %r14
pushq %rbx
subq $0x2008, %rsp           # imm = 0x2008
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x1b1e(%rip), %rsi      # 0x168ae
movq %rsp, %rdx
movq %r14, %rdi
xorl %eax, %eax
callq 0x5490
cmpl $0x1, %eax
jne 0x14dd8
leaq 0x1bdd(%rip), %rsi      # 0x16986
movq %rsp, %rdi
callq 0x5150
testq %rax, %rax
je 0x14dee
movq %rax, %r14
movabsq $0x7fffffffffffffff, %rdx # imm = 0x7FFFFFFFFFFFFFFF
movq %rbx, %rdi
movq %rax, %rsi
callq 0x147b9
movq %r14, %rdi
callq 0x56c0
jmp 0x14e11
leaq 0x1b1d(%rip), %rsi      # 0x168fc
movq %rbx, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0xfc79
jmp 0x14e11
callq 0x5060
movl (%rax), %edi
callq 0x51a0
leaq 0x1b0f(%rip), %rsi      # 0x16910
movq %rsp, %rdx
movq %rbx, %rdi
movq %rax, %rcx
xorl %eax, %eax
callq 0xfc79
addq $0x2008, %rsp           # imm = 0x2008
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/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:
testq %rsi, %rsi
je 0x5ccf
movzbl -0x1(%rdi,%rsi), %eax
xorl %ecx, %ecx
addl $-0x47, %eax
cmpl $0x26, %eax
ja 0x5ce4
movabsq $0x100000001, %r8       # imm = 0x100000001
btq %rax, %r8
jb 0x5cdc
movabsq $0x1000000010, %r8      # imm = 0x1000000010
btq %rax, %r8
jb 0x5cd2
movabsq $0x4000000040, %r8      # imm = 0x4000000040
btq %rax, %r8
jae 0x5ce4
decq %rsi
movl $0x14, %ecx
jmp 0x5ce4
xorl %eax, %eax
retq
decq %rsi
movl $0xa, %ecx
jmp 0x5ce4
decq %rsi
movl $0x1e, %ecx
pushq %rbp
pushq %rbx
movb $0x1, %r9b
testq %rsi, %rsi
je 0x5d54
cmpq $0x1, %rsi
je 0x5cf9
cmpb $0x30, (%rdi)
je 0x5d54
movabsq $0x1999999999999999, %rax # imm = 0x1999999999999999
decq %rsi
xorl %r10d, %r10d
xorl %r8d, %r8d
movzbl (%rdi,%r10), %r11d
leal -0x30(%r11), %ebx
movb $0x1, %r9b
cmpb $0x9, %bl
ja 0x5d41
addq $-0x30, %r11
cmpq %rax, %r8
jb 0x5d36
setne %bl
cmpq $0x6, %r11
setae %bpl
orb %bl, %bpl
jne 0x5d41
leaq (%r8,%r8,4), %r8
leaq (%r11,%r8,2), %r8
xorl %r9d, %r9d
testb %r9b, %r9b
jne 0x5d54
leaq 0x1(%r10), %r11
cmpq %r10, %rsi
movq %r11, %r10
jne 0x5d0c
jmp 0x5d54
movq $-0x1, %rsi
shrq %cl, %rsi
xorl %eax, %eax
testb %r9b, %r9b
jne 0x5d75
cmpq %rsi, %r8
ja 0x5d75
shlq %cl, %r8
movq %r8, (%rdx)
movl $0x1, %eax
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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:
subq $0x18, %rsp
xorps %xmm0, %xmm0
movq %rsp, %rdi
movaps %xmm0, (%rdi)
xorl %esi, %esi
callq 0x4500
testl %eax, %eax
jne 0x6018
cvtsi2sdq (%rsp), %xmm1
xorps %xmm0, %xmm0
cvtsi2sdq 0x8(%rsp), %xmm0
divsd 0x53031(%rip), %xmm0    # 0x59040
addsd %xmm1, %xmm0
addq $0x18, %rsp
retq
leaq 0x53641(%rip), %rdi     # 0x59660
leaq 0x53641(%rip), %rsi     # 0x59667
leaq 0x5365e(%rip), %rcx     # 0x5968b
movl $0x33, %edx
callq 0x4200
// File: /workspace/github_cpp_makefile_star2_O1/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %r8, %r15
movq %rcx, %r12
movq %rdx, %r13
movq %rdi, %r14
movl $0x80a0, %edi           # imm = 0x80A0
callq 0x6bb3
testq %rax, %rax
je 0x68f4
movq %rax, %rbx
movb $-0xf, 0xf(%rsp)
cmpq %r12, %r15
jne 0x690b
cmpl $0x0, 0x28(%r14)
jne 0x69be
addq $0x28, %r14
movl $0x2, (%r14)
jmp 0x69be
cmpl $0x0, 0x28(%r14)
jne 0x6903
movl $0x1, 0x28(%r14)
xorl %r15d, %r15d
jmp 0x69ce
leaq 0x10(%rsp), %rcx
leaq 0xf(%rsp), %rdx
movq %r13, %rdi
movq %r12, %rsi
callq *0x10(%r13)
testl %eax, %eax
je 0x69be
incq %r12
movl $0xa0, %edx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x41c0
leaq 0xa0(%rbx), %rax
movq %rax, 0x18(%rbx)
movq $0x8000, 0x20(%rbx)     # imm = 0x8000
movq %r13, 0x10(%rbx)
movq %r12, (%rbx)
movq %r15, 0x8(%rbx)
movsbl 0xf(%rsp), %esi
movb %sil, 0x98(%rbx)
movq %rbx, %rdi
addq $0x28, %rdi
leaq 0x25c(%rip), %rax       # 0x6bcd
movq %rax, 0x68(%rbx)
leaq 0x273(%rip), %rax       # 0x6bef
movq %rax, 0x70(%rbx)
movq %rbx, 0x78(%rbx)
leaq 0x52908(%rip), %rdx     # 0x59293
movl $0x70, %ecx
callq 0x4f34e
movq %rbx, %r15
testl %eax, %eax
je 0x69c1
movl 0x9c(%rbx), %eax
testl %eax, %eax
je 0x68d9
cmpl $0x0, 0x28(%r14)
jne 0x68d9
movl %eax, 0x28(%r14)
jmp 0x68d9
xorl %r15d, %r15d
testq %r15, %r15
jne 0x69ce
movq %rbx, %rdi
callq 0x43b0
movq %r15, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r14
pushq %rbx
movq %rsi, %rbx
testq %rsi, %rsi
je 0x6a2d
movq %rdi, %r14
movl 0x9c(%rbx), %eax
testl %eax, %eax
je 0x6a03
cmpl $0x0, 0x28(%r14)
jne 0x6a03
movl %eax, 0x28(%r14)
movl $0x1, %ebp
cmpq $0x0, 0x60(%rbx)
je 0x6a1c
leaq 0x28(%rbx), %rdi
callq 0x50e9e
testl %eax, %eax
jne 0x6a46
movl $0xa0, %edx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x41c0
jmp 0x6a32
movl $0x1, %ebp
testq %rbx, %rbx
je 0x6a3f
movq %rbx, %rdi
callq 0x43b0
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
movq 0x7557b(%rip), %rax     # 0x7bfc8
movq (%rax), %rcx
leaq 0x52900(%rip), %rdi     # 0x59357
movl $0x2f, %esi
movl $0x1, %edx
callq 0x4660
xorl %ebp, %ebp
cmpl $0x0, 0x28(%r14)
jne 0x6a1c
movl $0x4, 0x28(%r14)
jmp 0x6a1c
// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
cmpq %rdx, %rsi
ja 0x6b94
movq %rdi, %rbx
movq %rsi, 0x40(%rdi)
movl $0x1, %eax
subl %esi, %edx
movl %edx, 0x48(%rdi)
je 0x6b85
leaq 0x28(%rbx), %r14
movq (%rbx), %rsi
movq 0x8(%rbx), %r15
subq %rsi, %r15
cmpl $0x0, 0x30(%rbx)
sete %al
testq %r15, %r15
setne %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x6afa
movq 0x20(%rbx), %r12
cmpq %r15, %r12
cmovaeq %r15, %r12
movq 0x10(%rbx), %rdi
movq 0x18(%rbx), %rdx
movq %rdx, 0x28(%rbx)
leaq (%rdx,%r12), %rcx
callq *0x10(%rdi)
testl %eax, %eax
je 0x6af2
movl %r12d, 0x30(%rbx)
addq %r12, (%rbx)
subq %r12, %r15
testl %eax, %eax
je 0x6b83
movl 0x30(%rbx), %r13d
movl 0x48(%rbx), %r12d
movq %r14, %rdi
xorl %esi, %esi
callq 0x4f4a6
cmpl $0x1, %eax
je 0x6b23
testl %eax, %eax
jne 0x6b6d
cmpl %r13d, 0x30(%rbx)
jne 0x6b5c
cmpl %r12d, 0x48(%rbx)
jne 0x6b5c
jmp 0x6b6d
movl 0x30(%rbx), %r12d
addq %r12, %r15
jne 0x6b34
cmpl $0x0, 0x48(%rbx)
je 0x6b5c
jmp 0x6b6d
movq 0x28(%rbx), %r15
movq 0x40(%rbx), %rbp
movl 0x48(%rbx), %r13d
movq %r14, %rdi
callq 0x4f27d
testl %eax, %eax
jne 0x6b6d
movq %rbp, 0x40(%rbx)
movq %r15, 0x28(%rbx)
movl %r13d, 0x48(%rbx)
movl %r12d, 0x30(%rbx)
cmpl $0x0, 0x48(%rbx)
jne 0x6aa8
movl $0x1, %eax
jmp 0x6b85
cmpl $0x0, 0x9c(%rbx)
jne 0x6b83
addq $0x9c, %rbx
movl $0x3, (%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x527ec(%rip), %rdi     # 0x59387
leaq 0x5278a(%rip), %rsi     # 0x5932c
leaq 0x527ff(%rip), %rcx     # 0x593a8
movl $0xf7, %edx
callq 0x4200
// File: /workspace/github_cpp_makefile_star2_O1/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 %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rdi, %r14
testq %rdx, %rdx
je 0x6c22
movq %rsi, %rdx
movq 0x8(%r14), %rdi
movq 0x10(%r14), %rsi
leaq (%rdx,%rbx), %rcx
callq *0x18(%rdi)
testl %eax, %eax
je 0x6c28
addq %rbx, 0x10(%r14)
jmp 0x6c32
movl $0x1, 0x18(%r14)
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %rdx
movq %rdi, %r14
movq (%rbx), %rax
movq 0x8(%rdi), %rdi
movq 0x10(%r14), %rsi
leaq (%rsi,%rax), %rcx
movq 0x8(%rdi), %r8
movq %r8, %r15
subq %rsi, %r15
cmpq %r8, %rcx
cmovbeq %rax, %r15
testq %r15, %r15
je 0x6c7b
leaq (%rdx,%r15), %rcx
callq *0x10(%rdi)
testl %eax, %eax
je 0x6c83
addq %r15, 0x10(%r14)
xorl %eax, %eax
jmp 0x6c8b
movl $0x8, %eax
xorl %r15d, %r15d
movq %r15, (%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/sisong[P]ApkDiffPatch/src/../HDiffPatch/decompress_plugin_demo.h
// Function: lzma2_open(hpatch_TDecompress*, unsigned long long, hpatch_TStreamInput const*, unsigned long long, unsigned long long)
static hpatch_decompressHandle _lzma2_open(hpatch_TDecompress* decompressPlugin,
                                            hpatch_StreamPos_t dataSize,
                                            const hpatch_TStreamInput* codeStream,
                                            hpatch_StreamPos_t code_begin,
                                            hpatch_StreamPos_t code_end){
        _lzma2_TDecompress* self=0;
        SRes ret;
        unsigned char propsSize=0;
        //load propsSize
        if (code_end-code_begin<1) _dec_openErr_rt();
        if (!codeStream->read(codeStream,code_begin,&propsSize,&propsSize+1)) return 0;
        ++code_begin;
        
        self=(_lzma2_TDecompress*)_dec_malloc(sizeof(_lzma2_TDecompress));
        if (!self) _dec_memErr_rt();
        memset(self,0,sizeof(_lzma2_TDecompress)-kDecompressBufSize);
        self->memAllocBase.Alloc=__lzma2_dec_Alloc;
        *((void**)&self->memAllocBase.Free)=(void*)__dec_free;
        self->codeStream=codeStream;
        self->code_begin=code_begin;
        self->code_end=code_end;
        
        self->decCopyPos=0;
        self->decReadPos=kDecompressBufSize;
        
        Lzma2Dec_Construct(&self->decEnv);
        ret=Lzma2Dec_Allocate(&self->decEnv,propsSize,&self->memAllocBase);
        if (ret!=SZ_OK){ _dec_onDecErr_up(); free(self); _dec_openErr_rt(); }
        Lzma2Dec_Init(&self->decEnv);
        return self;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movb $0x0, 0x7(%rsp)
cmpq %rcx, %r8
jne 0x6cea
cmpl $0x0, 0x28(%rbx)
jne 0x6dbd
movl $0x2, 0x28(%rbx)
jmp 0x6dbd
movq %r8, %r15
movq %rcx, %r12
movq %rdx, %r13
leaq 0x8(%rsp), %rcx
leaq 0x7(%rsp), %rdx
movq %r13, %rdi
movq %r12, %rsi
callq *0x10(%r13)
testl %eax, %eax
je 0x6dbd
movl $0x80d0, %edi           # imm = 0x80D0
callq 0x6bb3
testq %rax, %rax
je 0x6db0
movq %rax, %r14
incq %r12
xorl %ebp, %ebp
movl $0xd0, %edx
movq %rax, %rdi
xorl %esi, %esi
callq 0x41c0
leaq 0x289(%rip), %rax       # 0x6fc9
movq %rax, (%r14)
leaq -0x15b(%rip), %rax      # 0x6bef
movq %rax, 0x8(%r14)
movq %r13, 0x10(%r14)
movq %r12, 0x18(%r14)
movq %r15, 0x20(%r14)
movq %rbp, 0xb8(%r14)
movq $0x8000, 0xc0(%r14) # imm = 0x8000
movq %r14, %r15
addq $0x28, %r15
movq %rbp, 0x50(%r14)
movq %rbp, 0x40(%r14)
movzbl 0x7(%rsp), %esi
movq %r15, %rdi
movq %r14, %rdx
callq 0x57aa8
testl %eax, %eax
je 0x6dd2
movl 0xc8(%r14), %eax
testl %eax, %eax
je 0x6da3
cmpl $0x0, 0x28(%rbx)
jne 0x6da3
movl %eax, 0x28(%rbx)
movq %r14, %rdi
callq 0x43b0
jmp 0x6cd4
cmpl $0x0, 0x28(%rbx)
jne 0x6dbd
movl $0x1, 0x28(%rbx)
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r15, %rdi
callq 0x57b0c
jmp 0x6dc0
// File: /workspace/github_cpp_makefile_star2_O1/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:
testq %rsi, %rsi
je 0x6e18
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x38(%rsi), %rdi
callq 0x5771d
movl 0xc8(%rbx), %eax
testl %eax, %eax
je 0x6e09
cmpl $0x0, 0x28(%r14)
jne 0x6e09
movl %eax, 0x28(%r14)
movq %rbx, %rdi
callq 0x43b0
addq $0x8, %rsp
popq %rbx
popq %r14
movl $0x1, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/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:
testq %rsi, %rsi
je 0x719a
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x28(%rsi), %rdi
callq 0x5771d
movl 0xb8(%rbx), %eax
testl %eax, %eax
je 0x718b
cmpl $0x0, 0x28(%r14)
jne 0x718b
movl %eax, 0x28(%r14)
movq %rbx, %rdi
callq 0x43b0
addq $0x8, %rsp
popq %rbx
popq %r14
movl $0x1, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/sisong[P]ApkDiffPatch/src/diff/DiffData.cpp
// Function: zipFileData_isSame(UnZipper*, int, UnZipper*, int)
bool zipFileData_isSame(UnZipper* selfZip,int selfIndex,UnZipper* srcZip,int srcIndex){
    uint32_t selfFileSize=UnZipper_file_uncompressedSize(selfZip,selfIndex);
    if (selfFileSize!=UnZipper_file_uncompressedSize(srcZip,srcIndex)) return false;
    if (selfFileSize==0) return true;
    std::vector<TByte> buf(selfFileSize*2);
    hpatch_TStreamOutput stream;
    mem_as_hStreamOutput(&stream,buf.data(),buf.data()+selfFileSize);
    check(UnZipper_fileData_decompressTo(selfZip,selfIndex,&stream));
    mem_as_hStreamOutput(&stream,buf.data()+selfFileSize,buf.data()+selfFileSize*2);
    check(UnZipper_fileData_decompressTo(srcZip,srcIndex,&stream));
    return 0==memcmp(buf.data(),buf.data()+selfFileSize,selfFileSize);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %ecx, %ebx
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %r13
callq 0x4092e
movl %eax, %r15d
movq %r14, %rdi
movl %ebx, %esi
callq 0x4092e
cmpl %eax, %r15d
jne 0x74d0
testl %r15d, %r15d
je 0x74d4
leal (%r15,%r15), %r12d
movq %rsp, %rdi
leaq 0x18(%rsp), %rdx
movq %r12, %rsi
callq 0x9ca8
movq %rsp, %rax
movq (%rax), %rsi
movl %r15d, %r15d
leaq (%rsi,%r15), %rdx
leaq 0x18(%rsp), %rdi
callq 0x4397b
leaq 0x18(%rsp), %rdx
movq %r13, %rdi
movl %ebp, %esi
xorl %ecx, %ecx
callq 0x40d86
testb %al, %al
je 0x74e7
movq (%rsp), %rax
leaq (%rax,%r15), %rsi
addq %rax, %r12
leaq 0x18(%rsp), %rdi
movq %r12, %rdx
callq 0x4397b
leaq 0x18(%rsp), %rdx
movq %r14, %rdi
movl %ebx, %esi
xorl %ecx, %ecx
callq 0x40d86
testb %al, %al
je 0x7512
movq (%rsp), %r14
leaq (%r14,%r15), %rsi
movq %r14, %rdi
movq %r15, %rdx
callq 0x4310
testl %eax, %eax
sete %bl
testq %r14, %r14
je 0x74d6
movq 0x10(%rsp), %rsi
subq %r14, %rsi
movq %r14, %rdi
callq 0x4300
jmp 0x74d6
xorl %ebx, %ebx
jmp 0x74d6
movb $0x1, %bl
movl %ebx, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x533d0(%rip), %rdi     # 0x5a8be
callq 0x44e0
leaq 0x52b56(%rip), %rdi     # 0x5a050
leaq 0x52b55(%rip), %rsi     # 0x5a056
leaq 0x52b64(%rip), %rcx     # 0x5a06c
movl $0x39, %edx
callq 0x4200
leaq 0x52faa(%rip), %rdi     # 0x5a4c3
callq 0x44e0
leaq 0x52b2b(%rip), %rdi     # 0x5a050
leaq 0x52b2a(%rip), %rsi     # 0x5a056
leaq 0x52b39(%rip), %rcx     # 0x5a06c
movl $0x3b, %edx
callq 0x4200
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x7556
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x4300
movq %rbx, %rdi
callq 0x45e0
// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r14
pushq %rbx
subq $0x80, %rsp
movq %rcx, %rbx
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rsi
xorps %xmm0, %xmm0
leaq 0x40(%rsp), %rdi
movaps %xmm0, (%rdi)
movaps %xmm0, 0x10(%rdi)
movaps %xmm0, 0x20(%rdi)
movaps %xmm0, 0x30(%rdi)
movaps %xmm0, (%rsp)
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x30(%rsp)
callq 0x48a3c
testl %eax, %eax
je 0x7aa3
movq %rsp, %rdi
movq %r14, %rsi
callq 0x48a3c
testl %eax, %eax
je 0x7ace
leaq 0x40(%rsp), %rdi
movq %rsp, %r14
movq %r14, %rsi
movl %ebp, %edx
movq %rbx, %rcx
callq 0x755e
movl %eax, %ebx
movq %r14, %rdi
callq 0x48caf
testl %eax, %eax
je 0x7af9
leaq 0x40(%rsp), %rdi
callq 0x48caf
testl %eax, %eax
je 0x7b24
movl %ebx, %eax
addq $0x80, %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x52bb5(%rip), %rdi     # 0x5a65f
callq 0x44e0
leaq 0x5259a(%rip), %rdi     # 0x5a050
leaq 0x52599(%rip), %rsi     # 0x5a056
leaq 0x52645(%rip), %rcx     # 0x5a109
movl $0x7a, %edx
callq 0x4200
leaq 0x52bc8(%rip), %rdi     # 0x5a69d
callq 0x44e0
leaq 0x5256f(%rip), %rdi     # 0x5a050
leaq 0x5256e(%rip), %rsi     # 0x5a056
leaq 0x5261a(%rip), %rcx     # 0x5a109
movl $0x7b, %edx
callq 0x4200
leaq 0x52bdb(%rip), %rdi     # 0x5a6db
callq 0x44e0
leaq 0x52544(%rip), %rdi     # 0x5a050
leaq 0x52543(%rip), %rsi     # 0x5a056
leaq 0x525ef(%rip), %rcx     # 0x5a109
movl $0x80, %edx
callq 0x4200
leaq 0x52be4(%rip), %rdi     # 0x5a70f
callq 0x44e0
leaq 0x52519(%rip), %rdi     # 0x5a050
leaq 0x52518(%rip), %rsi     # 0x5a056
leaq 0x525c4(%rip), %rcx     # 0x5a109
movl $0x81, %edx
callq 0x4200