LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: ctz[P]openssl-bench/bench.cc
// Function: Context::load_server_creds(KeyType)
void load_server_creds(const KeyType which) {
    int err;

    switch (which) {
    case KeyType::RSA2048:
      err = SSL_CTX_use_certificate_chain_file(
          m_ctx, "../rustls/test-ca/rsa-2048/end.fullchain");
      assert(err == 1);
      err = SSL_CTX_use_PrivateKey_file(
          m_ctx, "../rustls/test-ca/rsa-2048/end.key", SSL_FILETYPE_PEM);
      assert(err == 1);
      break;
    case KeyType::ECDSAP256:
      err = SSL_CTX_use_certificate_chain_file(
          m_ctx, "../rustls/test-ca/ecdsa-p256/end.fullchain");
      assert(err == 1);
      err = SSL_CTX_use_PrivateKey_file(
          m_ctx, "../rustls/test-ca/ecdsa-p256/end.key", SSL_FILETYPE_PEM);
      assert(err == 1);
      break;
    }
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x14(%rbp)
testl %eax, %eax
je 0x6004
jmp 0x5ff3
movl -0x14(%rbp), %eax
subl $0x1, %eax
je 0x6088
jmp 0x6109
movq -0x20(%rbp), %rax
movq (%rax), %rdi
leaq 0x819b(%rip), %rsi      # 0xe1ad
callq 0x3270
movl %eax, -0x10(%rbp)
cmpl $0x1, -0x10(%rbp)
jne 0x6022
jmp 0x6041
leaq 0x81ad(%rip), %rdi      # 0xe1d6
leaq 0x81af(%rip), %rsi      # 0xe1df
movl $0x35, %edx
leaq 0x81ac(%rip), %rcx      # 0xe1e8
callq 0x3210
movq -0x20(%rbp), %rax
movq (%rax), %rdi
leaq 0x81c8(%rip), %rsi      # 0xe217
movl $0x1, %edx
callq 0x3030
movl %eax, -0x10(%rbp)
cmpl $0x1, -0x10(%rbp)
jne 0x6064
jmp 0x6083
leaq 0x816b(%rip), %rdi      # 0xe1d6
leaq 0x816d(%rip), %rsi      # 0xe1df
movl $0x38, %edx
leaq 0x816a(%rip), %rcx      # 0xe1e8
callq 0x3210
jmp 0x6109
movq -0x20(%rbp), %rax
movq (%rax), %rdi
leaq 0x81a4(%rip), %rsi      # 0xe23a
callq 0x3270
movl %eax, -0x10(%rbp)
cmpl $0x1, -0x10(%rbp)
jne 0x60a6
jmp 0x60c5
leaq 0x8129(%rip), %rdi      # 0xe1d6
leaq 0x812b(%rip), %rsi      # 0xe1df
movl $0x3d, %edx
leaq 0x8128(%rip), %rcx      # 0xe1e8
callq 0x3210
movq -0x20(%rbp), %rax
movq (%rax), %rdi
leaq 0x8192(%rip), %rsi      # 0xe265
movl $0x1, %edx
callq 0x3030
movl %eax, -0x10(%rbp)
cmpl $0x1, -0x10(%rbp)
jne 0x60e8
jmp 0x6107
leaq 0x80e7(%rip), %rdi      # 0xe1d6
leaq 0x80e9(%rip), %rsi      # 0xe1df
movl $0x40, %edx
leaq 0x80e6(%rip), %rcx      # 0xe1e8
callq 0x3210
jmp 0x6109
addq $0x20, %rsp
popq %rbp
retq
nop
// File: ctz[P]openssl-bench/bench.cc
// Function: Context::load_client_creds(KeyType)
void load_client_creds(const KeyType which) {
    int err;
    switch (which) {
    case KeyType::RSA2048:
      err = SSL_CTX_load_verify_locations(
          m_ctx, "../rustls/test-ca/rsa-2048/ca.cert", NULL);
      break;
    case KeyType::ECDSAP256:
      err = SSL_CTX_load_verify_locations(
          m_ctx, "../rustls/test-ca/ecdsa-p256/ca.cert", NULL);
      break;
    }
    assert(err == 1);
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x14(%rbp)
testl %eax, %eax
je 0x613d
jmp 0x6133
movl -0x14(%rbp), %eax
subl $0x1, %eax
je 0x6159
jmp 0x6173
movq -0x20(%rbp), %rax
movq (%rax), %rdi
leaq 0x813f(%rip), %rsi      # 0xe28a
xorl %eax, %eax
movl %eax, %edx
callq 0x3430
movl %eax, -0x10(%rbp)
jmp 0x6173
movq -0x20(%rbp), %rax
movq (%rax), %rdi
leaq 0x8146(%rip), %rsi      # 0xe2ad
xorl %eax, %eax
movl %eax, %edx
callq 0x3430
movl %eax, -0x10(%rbp)
cmpl $0x1, -0x10(%rbp)
jne 0x617b
jmp 0x619a
leaq 0x8054(%rip), %rdi      # 0xe1d6
leaq 0x8056(%rip), %rsi      # 0xe1df
movl $0x51, %edx
leaq 0x813d(%rip), %rcx      # 0xe2d2
callq 0x3210
addq $0x20, %rsp
popq %rbp
retq
// File: ctz[P]openssl-bench/bench.cc
// Function: Conn::get_cipher_string[abi:cxx11]()
std::string get_cipher_string() {
    std::string r;
    r += SSL_get_cipher_version(m_ssl);
    r += '\t';
    r += SSL_get_cipher(m_ssl);
    return r;
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x48(%rbp)
movq %rdi, %rax
movq %rax, -0x40(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movb $0x0, -0x11(%rbp)
callq 0x3470
movq -0x38(%rbp), %rax
movq (%rax), %rdi
callq 0x31a0
movq %rax, -0x30(%rbp)
jmp 0x66ce
movq -0x30(%rbp), %rdi
callq 0x3250
movq %rax, -0x50(%rbp)
jmp 0x66dd
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdi
callq 0x32e0
jmp 0x66ec
movq -0x48(%rbp), %rdi
movl $0x9, %esi
callq 0x3200
jmp 0x66fc
movq -0x38(%rbp), %rax
movq (%rax), %rdi
callq 0x31a0
movq %rax, -0x58(%rbp)
jmp 0x670e
movq -0x58(%rbp), %rdi
callq 0x3390
movq %rax, -0x60(%rbp)
jmp 0x671d
movq -0x60(%rbp), %rsi
movq -0x48(%rbp), %rdi
callq 0x32e0
jmp 0x672c
movb $0x1, -0x11(%rbp)
testb $0x1, -0x11(%rbp)
jne 0x6758
jmp 0x674f
movq -0x48(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
callq 0x31f0
jmp 0x6762
movq -0x48(%rbp), %rdi
callq 0x31f0
movq -0x40(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
movq -0x20(%rbp), %rdi
callq 0x3590
nopl (%rax,%rax)
// File: ctz[P]openssl-bench/bench.cc
// Function: Conn::transfer_to(Conn&)
void transfer_to(Conn &other) {
    uint8_t buf[262144] = {0};

    bool new_bytes = false;

    while (true) {
      int err = BIO_read(m_writes_to, buf, sizeof(buf));

      if (err == 0 || err == -1) {
        break;
      } else if (err > 0) {
        if (!new_bytes) {
          other.drop_read_bytes();
          new_bytes = true;
        }

        other.m_read_buffer.insert(other.m_read_buffer.end(), buf, buf + err);
      }
    }

    if (new_bytes) {
      other.install_read_bio();
    }
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40040, %rsp          # imm = 0x40040
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x40038(%rbp)
leaq -0x40010(%rbp), %rdi
xorl %esi, %esi
movl $0x40000, %edx          # imm = 0x40000
callq 0x31d0
movb $0x0, -0x40011(%rbp)
movq -0x40038(%rbp), %rax
movq 0x28(%rax), %rdi
leaq -0x40010(%rbp), %rsi
movl $0x40000, %edx          # imm = 0x40000
callq 0x33c0
movl %eax, -0x40018(%rbp)
cmpl $0x0, -0x40018(%rbp)
je 0x7bec
cmpl $-0x1, -0x40018(%rbp)
jne 0x7bf1
jmp 0x7c86
cmpl $0x0, -0x40018(%rbp)
jle 0x7c7f
testb $0x1, -0x40011(%rbp)
jne 0x7c17
movq -0x10(%rbp), %rdi
callq 0x8470
movb $0x1, -0x40011(%rbp)
movq -0x10(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x40040(%rbp)
movq -0x10(%rbp), %rdi
addq $0x8, %rdi
callq 0x85d0
movq %rax, -0x40028(%rbp)
leaq -0x40020(%rbp), %rdi
leaq -0x40028(%rbp), %rsi
callq 0x8600
movq -0x40040(%rbp), %rdi
leaq -0x40010(%rbp), %rdx
leaq -0x40010(%rbp), %rcx
movslq -0x40018(%rbp), %rax
addq %rax, %rcx
movq -0x40020(%rbp), %rsi
callq 0x8530
movq %rax, -0x40030(%rbp)
jmp 0x7c81
jmp 0x7bb8
testb $0x1, -0x40011(%rbp)
je 0x7c98
movq -0x10(%rbp), %rdi
callq 0x8640
addq $0x40040, %rsp          # imm = 0x40040
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: ctz[P]openssl-bench/bench.cc
// Function: Conn::read(unsigned char*, unsigned long)
void read(uint8_t *buf, size_t n) {
    while (n) {
      int rd = SSL_read(m_ssl, buf, n);

      assert(rd >= 0);
      buf += rd;
      n -= rd;
    }
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x7d35
movq -0x28(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rax
movl %eax, %edx
callq 0x3060
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jl 0x7cf4
jmp 0x7d13
leaq 0x66d1(%rip), %rdi      # 0xe3cc
leaq 0x64dd(%rip), %rsi      # 0xe1df
movl $0x128, %edx            # imm = 0x128
leaq 0x66c6(%rip), %rcx      # 0xe3d4
callq 0x3210
movl -0x1c(%rbp), %ecx
movq -0x10(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movslq -0x1c(%rbp), %rcx
movq -0x18(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x18(%rbp)
jmp 0x7ccc
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: ctz[P]openssl-bench/bench.cc
// Function: Conn::drop_read_bytes()
void drop_read_bytes() {
    // eliminate processed bytes from read buffer
    char *old_buf = nullptr;
    long old_len = BIO_get_mem_data(m_reads_from, &old_buf);
    long consumed = m_read_buffer.size() - old_len;
    m_read_buffer.erase(m_read_buffer.begin(),
                        m_read_buffer.begin() + consumed);
    // caller _MUST_ now call install_read_bio() prior to touching
    // m_ssl
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x60(%rbp)
movq $0x0, -0x10(%rbp)
movq 0x20(%rax), %rdi
movl $0x3, %esi
xorl %eax, %eax
movl %eax, %edx
leaq -0x10(%rbp), %rcx
callq 0x3100
movq -0x60(%rbp), %rdi
movq %rax, -0x18(%rbp)
addq $0x8, %rdi
callq 0x7b60
movq -0x60(%rbp), %rdi
subq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq %rdi, %rax
addq $0x8, %rax
movq %rax, -0x58(%rbp)
addq $0x8, %rdi
callq 0x87a0
movq %rax, -0x30(%rbp)
leaq -0x28(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x8600
movq -0x60(%rbp), %rdi
addq $0x8, %rdi
callq 0x87a0
movq %rax, -0x48(%rbp)
movq -0x20(%rbp), %rsi
leaq -0x48(%rbp), %rdi
callq 0x87d0
movq %rax, -0x40(%rbp)
leaq -0x38(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x8600
movq -0x58(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x38(%rbp), %rdx
callq 0x8710
movq %rax, -0x50(%rbp)
addq $0x60, %rsp
popq %rbp
retq
nop
// File: ctz[P]openssl-bench/bench.cc
// Function: Conn::install_read_bio()
void install_read_bio() {
    static uint8_t empty_buf[0] = {};
    m_reads_from =
        BIO_new_mem_buf(m_read_buffer.data() ? m_read_buffer.data() : empty_buf,
                        m_read_buffer.size());
    assert(m_reads_from != nullptr);
    BIO_set_mem_eof_return(m_reads_from, -1);
    SSL_set0_rbio(m_ssl, m_reads_from); // frees previous m_reads_from
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x10(%rbp)
addq $0x8, %rdi
callq 0x9be0
cmpq $0x0, %rax
je 0x8676
movq -0x10(%rbp), %rdi
addq $0x8, %rdi
callq 0x9be0
movq %rax, -0x18(%rbp)
jmp 0x8683
leaq 0xdcbc(%rip), %rax      # 0x16339
movq %rax, -0x18(%rbp)
jmp 0x8683
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
addq $0x8, %rdi
callq 0x7b60
movq -0x20(%rbp), %rdi
movl %eax, %esi
callq 0x30b0
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x20(%rax)
cmpq $0x0, 0x20(%rax)
je 0x86b7
jmp 0x86d6
leaq 0x5cd8(%rip), %rdi      # 0xe396
leaq 0x5b1a(%rip), %rsi      # 0xe1df
movl $0xc9, %edx
leaq 0x5cdd(%rip), %rcx      # 0xe3ae
callq 0x3210
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rdi
movl $0x82, %esi
movq $-0x1, %rdx
xorl %eax, %eax
movl %eax, %ecx
callq 0x3100
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq 0x20(%rax), %rsi
callq 0x35d0
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: ctz[P]openssl-bench/bench.cc
// Function: LatencyOutput::LatencyOutput(char const*)
LatencyOutput(const char *which) : m_output(nullptr) {
    const char *file_prefix = getenv("BENCH_LATENCY");
    if (file_prefix) {
      std::ostringstream thread_id;
      thread_id << std::this_thread::get_id();
      char filename[128] = {0};
      snprintf(filename, sizeof(filename), "%s-%s-%s-latency.tsv", file_prefix,
               which, thread_id.str().c_str());
      m_output = fopen(filename, "w+");
    }
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x2a0, %rsp            # imm = 0x2A0
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x258(%rbp)
movq $0x0, (%rax)
leaq 0x34f4(%rip), %rdi      # 0xe560
callq 0x3400
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0xb1d4
leaq -0x190(%rbp), %rdi
movq %rdi, -0x260(%rbp)
callq 0x3450
callq 0xb340
movq -0x260(%rbp), %rdi
movq %rax, -0x198(%rbp)
movq -0x198(%rbp), %rsi
callq 0xb2d0
jmp 0xb0b4
xorps %xmm0, %xmm0
movaps %xmm0, -0x290(%rbp)
movaps %xmm0, -0x1c0(%rbp)
movaps %xmm0, -0x1d0(%rbp)
movaps %xmm0, -0x1e0(%rbp)
movaps %xmm0, -0x1f0(%rbp)
movaps %xmm0, -0x200(%rbp)
movaps %xmm0, -0x210(%rbp)
movaps %xmm0, -0x220(%rbp)
movaps %xmm0, -0x230(%rbp)
leaq -0x230(%rbp), %rax
movq %rax, -0x278(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x270(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x268(%rbp)
leaq -0x250(%rbp), %rdi
leaq -0x190(%rbp), %rsi
callq 0x3360
jmp 0xb12f
leaq -0x250(%rbp), %rdi
movq %rdi, -0x2a0(%rbp)
callq 0x3160
movq -0x278(%rbp), %rdi
movq -0x270(%rbp), %rcx
movq -0x268(%rbp), %r8
movq %rax, %r9
leaq 0x340d(%rip), %rdx      # 0xe56e
xorl %eax, %eax
movl $0x80, %esi
callq 0x3520
movq -0x2a0(%rbp), %rdi
callq 0x31f0
leaq 0x3403(%rip), %rsi      # 0xe583
leaq -0x230(%rbp), %rdi
callq 0x33d0
movq %rax, -0x298(%rbp)
jmp 0xb195
movq -0x258(%rbp), %rax
movq -0x298(%rbp), %rcx
movq %rcx, (%rax)
leaq -0x190(%rbp), %rdi
callq 0x30d0
jmp 0xb1d4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1a0(%rbp)
movl %eax, -0x1a4(%rbp)
leaq -0x190(%rbp), %rdi
callq 0x30d0
jmp 0xb1dd
addq $0x2a0, %rsp            # imm = 0x2A0
popq %rbp
retq
movq -0x1a0(%rbp), %rdi
callq 0x3590
nopl (%rax)
// File: ctz[P]openssl-bench/bench.cc
// Function: Context::enable_resume()
void enable_resume() {
    SSL_CTX_sess_set_new_cb(m_ctx, new_session_cb);
    SSL_CTX_set_session_cache_mode(m_ctx, SSL_SESS_CACHE_BOTH);
    SSL_CTX_set_session_id_context(m_ctx, (const uint8_t *)"localhost",
                                   strlen("localhost"));
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq (%rax), %rdi
leaq -0x5bfe(%rip), %rsi     # 0x5e60
callq 0x3300
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movl $0x2c, %esi
movl $0x3, %edx
xorl %eax, %eax
movl %eax, %ecx
callq 0x32c0
movq -0x10(%rbp), %rax
movq (%rax), %rdi
leaq 0x296c(%rip), %rsi      # 0xe3f7
movl $0x9, %edx
callq 0x3530
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: ctz[P]openssl-bench/bench.cc
// Function: Conn::get_session()
SSL_SESSION *get_session() {
    ragged_close();
    if (m_one_session) {
      SSL_SESSION_up_ref(m_one_session);
      return m_one_session;
    }
    return SSL_get1_session(m_ssl);
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x18(%rbp)
callq 0xbb40
movq -0x18(%rbp), %rax
cmpq $0x0, 0x30(%rax)
je 0xbb1f
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0x30a0
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0xbb2f
movq -0x18(%rbp), %rax
movq (%rax), %rdi
callq 0x35f0
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: ctz[P]openssl-bench/bench.cc
// Function: Context::dump_sess_stats()
void dump_sess_stats() {
    printf(
        "connects: %ld, connects-good: %ld, accepts: %ld, accepts-good: %ld\n",
        long(SSL_CTX_sess_connect(m_ctx)),
        long(SSL_CTX_sess_connect_good(m_ctx)),
        long(SSL_CTX_sess_accept(m_ctx)),
        long(SSL_CTX_sess_accept_good(m_ctx)));
    printf("sessions: %ld, hits: %ld, misses: %ld\n",
           long(SSL_CTX_sess_number(m_ctx)), long(SSL_CTX_sess_hits(m_ctx)),
           long(SSL_CTX_sess_misses(m_ctx)));
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq (%rax), %rdi
movl $0x15, %esi
xorl %eax, %eax
movl %eax, %ecx
movq %rcx, %rdx
callq 0x32c0
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, -0x38(%rbp)
movq (%rax), %rdi
movl $0x16, %esi
xorl %eax, %eax
movl %eax, %ecx
movq %rcx, %rdx
callq 0x32c0
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, -0x30(%rbp)
movq (%rax), %rdi
movl $0x18, %esi
xorl %eax, %eax
movl %eax, %ecx
movq %rcx, %rdx
callq 0x32c0
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, -0x28(%rbp)
movq (%rax), %rdi
movl $0x19, %esi
xorl %eax, %eax
movl %eax, %ecx
movq %rcx, %rdx
callq 0x32c0
movq -0x38(%rbp), %rsi
movq -0x30(%rbp), %rdx
movq -0x28(%rbp), %rcx
movq %rax, %r8
leaq 0x2a02(%rip), %rdi      # 0xe71d
movb $0x0, %al
callq 0x3050
movq -0x20(%rbp), %rax
movq (%rax), %rdi
movl $0x14, %esi
xorl %eax, %eax
movl %eax, %ecx
movq %rcx, %rdx
callq 0x32c0
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, -0x18(%rbp)
movq (%rax), %rdi
movl $0x1b, %esi
xorl %eax, %eax
movl %eax, %ecx
movq %rcx, %rdx
callq 0x32c0
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, -0x10(%rbp)
movq (%rax), %rdi
movl $0x1d, %esi
xorl %eax, %eax
movl %eax, %ecx
movq %rcx, %rdx
callq 0x32c0
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rdx
movq %rax, %rcx
leaq 0x29d7(%rip), %rdi      # 0xe761
movb $0x0, %al
callq 0x3050
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: ctz[P]openssl-bench/bench.cc
// Function: Conn::save_one_session(ssl_session_st*)
int save_one_session(SSL_SESSION *sess) {
    if (m_one_session == nullptr) {
      m_one_session = sess;
      return 1;
    }
    return 0;
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, 0x30(%rax)
jne 0xbdd0
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
movq %rcx, 0x30(%rax)
movl $0x1, -0x4(%rbp)
jmp 0xbdd7
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax)
// File: ctz[P]openssl-bench/bench.cc
// Function: Conn::Conn(Conn&&)
Conn(Conn &&other)
      : m_ssl(other.m_ssl), m_reads_from(nullptr),
        m_writes_to(other.m_writes_to), m_one_session(other.m_one_session) {
    SSL_set_app_data(m_ssl, this);
    other.m_ssl = nullptr;
    m_read_buffer.swap(other.m_read_buffer);
    install_read_bio();
    other.m_writes_to = nullptr;
    other.m_one_session = nullptr;
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, (%rdi)
addq $0x8, %rdi
movq %rdi, -0x30(%rbp)
callq 0xa940
movq -0x28(%rbp), %rdx
movq $0x0, 0x20(%rdx)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, 0x28(%rdx)
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, 0x30(%rdx)
movq (%rdx), %rdi
xorl %esi, %esi
callq 0x30e0
jmp 0xcebf
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rax
movq $0x0, (%rax)
addq $0x8, %rdi
movq -0x10(%rbp), %rsi
addq $0x8, %rsi
callq 0xcf30
movq -0x28(%rbp), %rdi
callq 0x8640
jmp 0xceea
movq -0x10(%rbp), %rax
movq $0x0, 0x28(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x30(%rax)
addq $0x30, %rsp
popq %rbp
retq
movq -0x30(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
callq 0x7da0
movq -0x18(%rbp), %rdi
callq 0x3590
nopw %cs:(%rax,%rax)
// File: kodejuice[P]chip8-emulator/./chip8.cc
// Function: Chip8::load_program(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
bool Chip8::load_program(string file) {
	FILE *f = fopen(file.c_str(), "rb");

	if (f == NULL) 
		return printf("Error: Couldn't open '%s'\n", file.c_str()), false;

	// get file size
	fseek(f, 0L, SEEK_END);
	program_size = ftell(f);
	fseek(f, 0L, SEEK_SET);

	// allocate memory for ROM (buffer)
	byte* rom = (byte*) malloc(sizeof(byte) * program_size);

	// read program into buffer
	fread(rom, sizeof(byte), program_size, f);

	// load program from buffer into memory
	for (int i=PC, j=0; i < int(PC + program_size); ++i, ++j) {
		memory[i] = rom[j];
	}

	free(rom);
	fclose(f);

	return true;
}

// Assembly:
subq $0x48, %rsp
movq %rsi, (%rsp)
movq %rdi, %rax
movq (%rsp), %rdi
movq %rdi, 0x8(%rsp)
movq %rax, 0x38(%rsp)
movq %rdi, 0x30(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x10(%rsp)
callq 0x2160
movq %rax, %rdi
leaq 0x79dd(%rip), %rsi      # 0xa1d4
callq 0x2320
movq %rax, 0x28(%rsp)
cmpq $0x0, 0x28(%rsp)
jne 0x282e
movq 0x8(%rsp), %rdi
callq 0x2160
movq %rax, %rsi
leaq 0x79ba(%rip), %rdi      # 0xa1d7
movb $0x0, %al
callq 0x2060
movb $0x0, 0x47(%rsp)
jmp 0x2925
movq 0x28(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0x2, %edx
callq 0x2300
movq 0x28(%rsp), %rdi
callq 0x2030
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x1028(%rax)
movq 0x28(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
xorl %edx, %edx
callq 0x2300
movq 0x10(%rsp), %rax
movq 0x1028(%rax), %rdi
shlq $0x0, %rdi
callq 0x2370
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x20(%rsp)
movq 0x20(%rsp), %rdi
movq 0x1028(%rax), %rdx
movq 0x28(%rsp), %rcx
movl $0x1, %esi
callq 0x23a0
movq 0x10(%rsp), %rax
movzwl 0x1002(%rax), %eax
movl %eax, 0x1c(%rsp)
movl $0x0, 0x18(%rsp)
movq 0x10(%rsp), %rdx
movl 0x1c(%rsp), %eax
movzwl 0x1002(%rdx), %ecx
addq 0x1028(%rdx), %rcx
cmpl %ecx, %eax
jge 0x290c
movq 0x10(%rsp), %rax
movq 0x20(%rsp), %rcx
movslq 0x18(%rsp), %rdx
movb (%rcx,%rdx), %dl
movslq 0x1c(%rsp), %rcx
movb %dl, (%rax,%rcx)
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c(%rsp)
movl 0x18(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x18(%rsp)
jmp 0x28bf
movq 0x20(%rsp), %rdi
callq 0x2330
movq 0x28(%rsp), %rdi
callq 0x22b0
movb $0x1, 0x47(%rsp)
movb 0x47(%rsp), %al
andb $0x1, %al
addq $0x48, %rsp
retq
// File: kodejuice[P]chip8-emulator/./debug/disassembler.cc
// Function: Chip8::disassemble[abi:cxx11]()
string Chip8::disassemble() {

	byte lsb, msb;
	string str = "";

	for (int i=PC; i < (PC + program_size); i+=2) {
		msb = memory[i], lsb = memory[i+1];

		str += decode(i, msb, lsb) + "\n";
	}

	return str;
}

// Assembly:
subq $0x88, %rsp
movq %rdi, 0x10(%rsp)
movq %rdi, %rax
movq %rax, (%rsp)
movq %rdi, 0x80(%rsp)
movq %rsi, 0x78(%rsp)
movq 0x78(%rsp), %rax
movq %rax, 0x8(%rsp)
movb $0x0, 0x75(%rsp)
leaq 0x74(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x2420
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rdx
leaq 0x6b52(%rip), %rsi      # 0xa1f1
callq 0x2380
jmp 0x36a6
leaq 0x74(%rsp), %rdi
callq 0x22f0
movq 0x8(%rsp), %rax
movzwl 0x1002(%rax), %eax
movl %eax, 0x60(%rsp)
movq 0x8(%rsp), %rdx
movslq 0x60(%rsp), %rax
movzwl 0x1002(%rdx), %ecx
addq 0x1028(%rdx), %rcx
cmpq %rcx, %rax
jae 0x37c4
movq 0x8(%rsp), %rcx
movslq 0x60(%rsp), %rax
movb (%rcx,%rax), %al
movb %al, 0x76(%rsp)
movslq 0x60(%rsp), %rax
movb 0x1(%rax,%rcx), %al
movb %al, 0x77(%rsp)
movl 0x60(%rsp), %esi
movzbl 0x76(%rsp), %edx
movzbl 0x77(%rsp), %ecx
leaq 0x20(%rsp), %rdi
callq 0x3800
jmp 0x3719
leaq 0x6ad0(%rip), %rdx      # 0xa1f0
leaq 0x40(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x5540
jmp 0x3731
movq 0x10(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x2350
jmp 0x3742
leaq 0x40(%rsp), %rdi
callq 0x21e0
leaq 0x20(%rsp), %rdi
callq 0x21e0
movl 0x60(%rsp), %eax
addl $0x2, %eax
movl %eax, 0x60(%rsp)
jmp 0x36c0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x68(%rsp)
movl %eax, 0x64(%rsp)
leaq 0x74(%rsp), %rdi
callq 0x22f0
jmp 0x37f0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x68(%rsp)
movl %eax, 0x64(%rsp)
jmp 0x37e6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x68(%rsp)
movl %eax, 0x64(%rsp)
jmp 0x37b8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x68(%rsp)
movl %eax, 0x64(%rsp)
leaq 0x40(%rsp), %rdi
callq 0x21e0
leaq 0x20(%rsp), %rdi
callq 0x21e0
jmp 0x37e6
movb $0x1, 0x75(%rsp)
testb $0x1, 0x75(%rsp)
jne 0x37da
movq 0x10(%rsp), %rdi
callq 0x21e0
movq (%rsp), %rax
addq $0x88, %rsp
retq
movq 0x10(%rsp), %rdi
callq 0x21e0
movq 0x68(%rsp), %rdi
callq 0x2410
nopw (%rax,%rax)
// File: kodejuice[P]chip8-emulator/main.cc
// Function: getfilename(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
string getfilename(const string filepath) {
	string filename = filepath;

	// Remove directory if present.
	// Do this before extension removal incase directory has a period character.
	const size_t last_slash_idx = filename.find_last_of("\\/");
	if (std::string::npos != last_slash_idx)
		filename.erase(0, last_slash_idx + 1);

	// Remove extension if present.
	const size_t period_idx = filename.rfind('.');
	if (std::string::npos != period_idx)
	    filename.erase(period_idx);

	return filename;
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x8(%rsp)
movq %rdi, %rax
movq %rax, (%rsp)
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movb $0x0, 0x37(%rsp)
callq 0x2170
movq 0x8(%rsp), %rdi
leaq 0x5161(%rip), %rsi      # 0xa411
movq $-0x1, %rdx
callq 0x2280
movq %rax, 0x28(%rsp)
movq $-0x1, %rax
cmpq 0x28(%rsp), %rax
je 0x5303
movq 0x8(%rsp), %rdi
movq 0x28(%rsp), %rdx
incq %rdx
xorl %eax, %eax
movl %eax, %esi
callq 0x20d0
jmp 0x52e7
jmp 0x5303
movq 0x8(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x20(%rsp)
movl %eax, 0x1c(%rsp)
callq 0x21e0
jmp 0x5365
movq 0x8(%rsp), %rdi
movl $0x2e, %esi
movq $-0x1, %rdx
callq 0x2460
movq %rax, 0x10(%rsp)
movq $-0x1, %rax
cmpq 0x10(%rsp), %rax
je 0x5346
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq $-0x1, %rdx
callq 0x20d0
jmp 0x5344
jmp 0x5346
movb $0x1, 0x37(%rsp)
testb $0x1, 0x37(%rsp)
jne 0x535c
movq 0x8(%rsp), %rdi
callq 0x21e0
movq (%rsp), %rax
addq $0x48, %rsp
retq
movq 0x20(%rsp), %rdi
callq 0x2410
nop
// File: Couragewang[P]50_clss/./TcpServer.hpp
// Function: TcpServer::InitServer()
void InitServer()
        {
            listen_sock = socket(AF_INET, SOCK_STREAM, 0);
            if(listen_sock < 0){
                std::cerr << "socket error" << std::endl;
                exit(2);
            }

            int opt = 1;
            setsockopt(listen_sock, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(opt));

            struct sockaddr_in local;
            bzero(&local, sizeof(local));
            local.sin_family = AF_INET;
            local.sin_port = htons(port);
            local.sin_addr.s_addr = htonl(INADDR_ANY);
            //local.sin_addr.s_addr = inet_addr(ip.c_str());
            if(bind(listen_sock, (struct sockaddr*)&local, sizeof(local)) < 0){
                std::cerr << "bind error" << std::endl;
                exit(3);
            }
            if(listen(listen_sock, 5) < 0){
                std::cout << "listen error" << std::endl;
                exit(4);
            }
            signal(SIGCHLD, SIG_IGN);
            pool.InitThreadPool();
        }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movl $0x2, %edi
movl $0x1, %esi
xorl %edx, %edx
callq 0x2080
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
cmpl $0x0, (%rax)
jge 0x2b8e
movq 0x7487(%rip), %rdi      # 0x9ff0
leaq 0x34d7(%rip), %rsi      # 0x6047
callq 0x21c0
movq %rax, %rdi
movq 0x7441(%rip), %rsi      # 0x9fc0
callq 0x21f0
movl $0x2, %edi
callq 0x2240
movq -0x28(%rbp), %rax
movl $0x1, -0xc(%rbp)
movl (%rax), %edi
movl $0x1, %esi
movl $0x2, %edx
leaq -0xc(%rbp), %rcx
movl $0x4, %r8d
callq 0x2330
leaq -0x1c(%rbp), %rdi
movl $0x10, %esi
callq 0x2300
movq -0x28(%rbp), %rax
movw $0x2, -0x1c(%rbp)
movl 0x4(%rax), %eax
movzwl %ax, %edi
callq 0x2050
movw %ax, -0x1a(%rbp)
xorl %edi, %edi
callq 0x2160
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, -0x18(%rbp)
movl (%rax), %edi
leaq -0x1c(%rbp), %rsi
movl $0x10, %edx
callq 0x2060
cmpl $0x0, %eax
jge 0x2c2c
movq 0x73e9(%rip), %rdi      # 0x9ff0
leaq 0x3446(%rip), %rsi      # 0x6054
callq 0x21c0
movq %rax, %rdi
movq 0x73a3(%rip), %rsi      # 0x9fc0
callq 0x21f0
movl $0x3, %edi
callq 0x2240
movq -0x28(%rbp), %rax
movl (%rax), %edi
movl $0x5, %esi
callq 0x2210
cmpl $0x0, %eax
jge 0x2c6d
movq 0x7388(%rip), %rdi      # 0x9fd0
leaq 0x3410(%rip), %rsi      # 0x605f
callq 0x21c0
movq %rax, %rdi
movq 0x7362(%rip), %rsi      # 0x9fc0
callq 0x21f0
movl $0x4, %edi
callq 0x2240
movl $0x11, %edi
movl $0x1, %esi
callq 0x2220
movq -0x28(%rbp), %rdi
addq $0x8, %rdi
callq 0x3be0
addq $0x30, %rsp
popq %rbp
retq
nop
// File: Couragewang[P]50_clss/./TcpServer.hpp
// Function: TcpServer::Start()
void Start()
        {
            struct sockaddr_in peer;
            socklen_t len;
            for(;;){
                len = sizeof(peer);
                int sock = accept(listen_sock, (struct sockaddr*)&peer, &len);
                if(sock < 0){
                    std::cerr << "accept error" << std::endl;
                    continue;
                }
                std::cout << "Get a new client " << sock << std::endl;

                Task t;
                t.InitTask(sock, TcpServer::Service);
                pool.PushTask(t);
              //  int port_ = ntohs(peer.sin_port);
              //  std::string ip_ = inet_ntoa(peer.sin_addr);

              //  pthread_t tid;
              //  Arg *arg = new Arg;
              //  arg->sock = sock;
              //  arg->ip = ip_;
              //  arg->port = port_;
              //  arg->tsp = this;
              //  pthread_create(&tid, NULL, HandlerRequest, (void *)arg);


                //pid_t id = fork();
                //if(id < 0){
                //    std::cerr << "fork error" << std::endl;
                //    close(sock);
                //    //TODO
                //    continue;
                //}
                //else if( id == 0 ){
                //    close(listen_sock);
                //    Service(sock, ip_, port_);
                //    exit(0);
                //}
                //else{
                //    //child
                //    close(sock);
                //}
            }
        }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movl $0x10, -0x1c(%rbp)
movl (%rax), %edi
leaq -0x18(%rbp), %rsi
leaq -0x1c(%rbp), %rdx
callq 0x20a0
movl %eax, -0x20(%rbp)
cmpl $0x0, -0x20(%rbp)
jge 0x2ceb
movq 0x7322(%rip), %rdi      # 0x9ff0
leaq 0x3397(%rip), %rsi      # 0x606c
callq 0x21c0
movq %rax, %rdi
movq 0x72dc(%rip), %rsi      # 0x9fc0
callq 0x21f0
jmp 0x2ca4
movq 0x72de(%rip), %rdi      # 0x9fd0
leaq 0x3380(%rip), %rsi      # 0x6079
callq 0x21c0
movq %rax, %rdi
movl -0x20(%rbp), %esi
callq 0x22f0
movq %rax, %rdi
movq 0x72ad(%rip), %rsi      # 0x9fc0
callq 0x21f0
leaq -0x30(%rbp), %rdi
movq %rdi, -0x50(%rbp)
callq 0x3d50
movq -0x50(%rbp), %rdi
movl -0x20(%rbp), %esi
leaq 0x13fd(%rip), %rdx      # 0x4130
callq 0x4100
jmp 0x2d3a
movq -0x48(%rbp), %rdi
addq $0x8, %rdi
leaq -0x30(%rbp), %rsi
callq 0x4340
jmp 0x2d4d
leaq -0x30(%rbp), %rdi
callq 0x3df0
jmp 0x2ca4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x3df0
movq -0x38(%rbp), %rdi
callq 0x2310
nopl (%rax)
// File: Couragewang[P]50_clss/./ThreadPool.hpp
// Function: ThreadPool::ThreadRountie(void*)
static void *ThreadRountie(void *arg)
        {
            pthread_detach(pthread_self());
            ThreadPool *tp = (ThreadPool*)arg;
            for( ; ; ){
                tp->LockQueue();
                while(tp->IsEmpty()){
                    tp->IdleThread();
                }
                Task t;
                tp->PopTask(t);
                tp->UnlockQueue();
                t.Run();
            }
        }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
callq 0x21a0
movq %rax, %rdi
callq 0x2140
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3cd0
movq -0x10(%rbp), %rdi
callq 0x3cf0
testb $0x1, %al
jne 0x3c69
jmp 0x3c74
movq -0x10(%rbp), %rdi
callq 0x3d20
jmp 0x3c5a
leaq -0x20(%rbp), %rdi
movq %rdi, -0x38(%rbp)
callq 0x3d50
movq -0x38(%rbp), %rsi
movq -0x10(%rbp), %rdi
callq 0x3d60
jmp 0x3c90
movq -0x10(%rbp), %rdi
callq 0x3db0
jmp 0x3c9b
leaq -0x20(%rbp), %rdi
callq 0x3dd0
jmp 0x3ca6
leaq -0x20(%rbp), %rdi
callq 0x3df0
jmp 0x3c51
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x3df0
movq -0x28(%rbp), %rdi
callq 0x2310
nop
// File: Couragewang[P]50_clss/./TcpServer.hpp
// Function: TcpServer::Service(int)
static void Service(int sock)
        {
            while(1){
                char buf[1024];
                ssize_t s = read(sock, buf, sizeof(buf)-1);
                if(s > 0){
                    buf[s] = 0;
                    auto it = dict.find(buf);
                    if(it == dict.end()){
                        write(sock, "NULL", strlen("NULL"));
                        continue;
                    }
                    write(sock, (it->second).c_str(), (it->second).size());
                }
                else if(s == 0){
                    std::cout << "client quit!" << std::endl;
                    break;
                }
                else{
                    std::cerr << "read error" << std::endl;
                    break;
                }
            }
            close(sock);
        }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x480, %rsp            # imm = 0x480
movl %edi, -0x4(%rbp)
movl -0x4(%rbp), %edi
leaq -0x410(%rbp), %rsi
movl $0x3ff, %edx            # imm = 0x3FF
callq 0x2260
movq %rax, -0x418(%rbp)
cmpq $0x0, -0x418(%rbp)
jle 0x42c6
movq -0x418(%rbp), %rax
movb $0x0, -0x410(%rbp,%rax)
leaq -0x441(%rbp), %rdi
movq %rdi, -0x468(%rbp)
callq 0x2320
movq -0x468(%rbp), %rdx
leaq -0x440(%rbp), %rdi
leaq -0x410(%rbp), %rsi
callq 0x2250
jmp 0x41a5
leaq 0x602c(%rip), %rdi      # 0xa1d8
leaq -0x440(%rbp), %rsi
callq 0x4390
movq %rax, -0x470(%rbp)
jmp 0x41c1
movq -0x470(%rbp), %rax
movq %rax, -0x420(%rbp)
leaq -0x440(%rbp), %rdi
callq 0x2120
leaq -0x441(%rbp), %rdi
callq 0x2200
leaq 0x5fea(%rip), %rdi      # 0xa1d8
callq 0x43f0
movq %rax, -0x460(%rbp)
leaq -0x420(%rbp), %rdi
leaq -0x460(%rbp), %rsi
callq 0x43c0
testb $0x1, %al
jne 0x4213
jmp 0x426f
movl -0x4(%rbp), %edi
leaq 0x1e6e(%rip), %rsi      # 0x608b
movl $0x4, %edx
callq 0x20b0
jmp 0x413e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x450(%rbp)
movl %eax, -0x454(%rbp)
jmp 0x425e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x450(%rbp)
movl %eax, -0x454(%rbp)
leaq -0x440(%rbp), %rdi
callq 0x2120
leaq -0x441(%rbp), %rdi
callq 0x2200
jmp 0x432e
movl -0x4(%rbp), %eax
movl %eax, -0x47c(%rbp)
leaq -0x420(%rbp), %rdi
callq 0x4420
movq %rax, %rdi
addq $0x20, %rdi
callq 0x20e0
movq %rax, -0x478(%rbp)
leaq -0x420(%rbp), %rdi
callq 0x4420
movq %rax, %rdi
addq $0x20, %rdi
callq 0x2130
movl -0x47c(%rbp), %edi
movq -0x478(%rbp), %rsi
movq %rax, %rdx
callq 0x20b0
jmp 0x4318
cmpq $0x0, -0x418(%rbp)
jne 0x42f4
movq 0x5cf9(%rip), %rdi      # 0x9fd0
leaq 0x1db2(%rip), %rsi      # 0x6090
callq 0x21c0
movq %rax, %rdi
movq 0x5cd3(%rip), %rsi      # 0x9fc0
callq 0x21f0
jmp 0x431d
movq 0x5cf5(%rip), %rdi      # 0x9ff0
leaq 0x1d9b(%rip), %rsi      # 0x609d
callq 0x21c0
movq %rax, %rdi
movq 0x5caf(%rip), %rsi      # 0x9fc0
callq 0x21f0
jmp 0x431d
jmp 0x413e
movl -0x4(%rbp), %edi
callq 0x2350
addq $0x480, %rsp            # imm = 0x480
popq %rbp
retq
movq -0x450(%rbp), %rdi
callq 0x2310
nopw (%rax,%rax)
// File: Couragewang[P]50_clss/./ThreadPool.hpp
// Function: ThreadPool::PushTask(Task const&)
void PushTask(const Task &t)
        {
            LockQueue();
            task_queue.push(t);
            WakeupOneThread();
            UnlockQueue();
        }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x18(%rbp)
callq 0x3cd0
movq -0x18(%rbp), %rdi
addq $0x8, %rdi
movq -0x10(%rbp), %rsi
callq 0x4720
movq -0x18(%rbp), %rdi
callq 0x4750
movq -0x18(%rbp), %rdi
callq 0x3db0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: salleaffaire[P]MXFParser/bit_extractor.cpp
// Function: operator<<(std::ostream&, bit_code)
std::ostream& operator<<(std::ostream& os, const bit_code bc) {
   
   unsigned int n    = bc.mSize;
   unsigned int mask = 1 << (n-1);
      
   os << "0b";
   while (n) {
      if (bc.mValue & mask) {
         os << "1";
      }
      else {
         os << "0";
      }
      mask >>= 1;
      --n;
   }
   
   return os;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rsi, -0x8(%rbp)
movq %rdi, -0x10(%rbp)
movl -0x4(%rbp), %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %ecx
subl $0x1, %ecx
movl $0x1, %eax
shll %cl, %eax
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x8783(%rip), %rsi      # 0xc004
callq 0x31f0
cmpl $0x0, -0x14(%rbp)
je 0x38cc
movl -0x8(%rbp), %eax
andl -0x18(%rbp), %eax
cmpl $0x0, %eax
je 0x38a9
movq -0x10(%rbp), %rdi
leaq 0x8765(%rip), %rsi      # 0xc007
callq 0x31f0
jmp 0x38b9
movq -0x10(%rbp), %rdi
leaq 0x8755(%rip), %rsi      # 0xc009
callq 0x31f0
movl -0x18(%rbp), %eax
shrl %eax
movl %eax, -0x18(%rbp)
movl -0x14(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x3886
movq -0x10(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: salleaffaire[P]MXFParser/hex_out.cpp
// Function: hex_bulk_output(std::ostream&, int, unsigned char*, unsigned long)
void hex_bulk_output(std::ostream &os, const int width, uint8_t *p, size_t size) {
   int column = 0;
   for (uint32_t i=0;i<size;++i) {
      os << std::hex << std::setw(2) << std::setfill('0') << (uint32_t)p[i] << " ";
      
      if (width == ++column) {
         os << std::endl;
         column = 0;
      }
   }
   os << std::endl;
 
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpq -0x20(%rbp), %rax
jae 0x39b6
movq -0x8(%rbp), %rdi
leaq 0xb3(%rip), %rsi        # 0x39d0
callq 0x30d0
movq %rax, -0x40(%rbp)
movl $0x2, %edi
callq 0x3a00
movq -0x40(%rbp), %rdi
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %esi
callq 0x3280
movq %rax, -0x38(%rbp)
movl $0x30, %edi
callq 0x3a20
movq -0x38(%rbp), %rdi
movb %al, -0x2d(%rbp)
movzbl -0x2d(%rbp), %esi
callq 0x3320
movq %rax, %rdi
movq -0x18(%rbp), %rax
movl -0x28(%rbp), %ecx
movzbl (%rax,%rcx), %esi
callq 0x32d0
movq %rax, %rdi
leaq 0x8b95(%rip), %rsi      # 0xc50f
callq 0x31f0
movl -0xc(%rbp), %eax
movl -0x24(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, -0x24(%rbp)
cmpl %ecx, %eax
jne 0x39a6
movq -0x8(%rbp), %rdi
movq 0xd61e(%rip), %rsi      # 0x10fb8
callq 0x3230
movl $0x0, -0x24(%rbp)
jmp 0x39a8
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x3905
movq -0x8(%rbp), %rdi
movq 0xd5f7(%rip), %rsi      # 0x10fb8
callq 0x3230
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: salleaffaire[P]MXFParser/klv.cpp
// Function: klv_item::klv_item()
klv_item::klv_item() : mKLVList(0) {
   for (int i=0;i<16;++i) {
      mKey[i] = 0;
   }
   mLength = 0;
   mValue = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq $0x0, 0x20(%rax)
movl $0x0, -0xc(%rbp)
cmpl $0x10, -0xc(%rbp)
jge 0x3b96
movq -0x18(%rbp), %rdi
movl -0xc(%rbp), %eax
movzbl %al, %esi
callq 0x5030
movb $0x0, (%rax)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x3b73
movq -0x18(%rbp), %rax
movl $0x0, 0x10(%rax)
movq $0x0, 0x18(%rax)
addq $0x20, %rsp
popq %rbp
retq
nop
// File: salleaffaire[P]MXFParser/main.cpp
// Function: main
int
main(int argc, char *argv[]) {

   #if 0
   for (int i=1;i<33;i++) {
      int mask = (1 << (i & 0x1F)) - 1;        
      std::cout << "0x" << std::hex << mask << ",";   
   } 
   #endif

   #if 0
   // Test Dictionary
   // ------------------------------------------------
   Dictionary<16> mxf_kv_dic;
   mxf_kv_dic.add( {0x0006, 0x000E, 0x002B, 0x0034, 
                    0x0001, 0x0001, 0x0001, 0x0002, 
                    0x0003, 0x0001, 0x0002, 0x0010, 
                    0x0010, 0x0000, 0x0000, 0x0000}, "Fill Item");

   mxf_kv_dic.add( {0x0006, 0x000E, 0x002B, 0x0034, 
                    0x0001, 0x0001, 0xFFFF, 0x0002, 
                    0x0005, 0x0001, 0x0003, 0x0010, 
                    0x0010, 0x0001, 0x0000, 0x0000}, "Another Item 1");

   mxf_kv_dic.add( {0x0006, 0x000E, 0x002B, 0x0034, 
                    0x0001, 0x0001, 0xFFFF, 0x0002, 
                    0x0005, 0x0001, 0x0004, 0x0010, 
                    0x0010, 0x0001, 0x0000, 0x0000}, "Another Item 2");

   mxf_kv_dic.add( {0x0006, 0x000E, 0x002B, 0x0034, 
                    0xFFFF, 0x0001, 0x0006, 0x0002, 
                    0x0005, 0x0001, 0x0004, 0x0010, 
                    0x0010, 0x0001, 0x0000, 0x0000}, "Another Item 3");

   mxf_kv_dic.add( {0x0006, 0x000E, 0x002B, 0x0034, 
                    0xFFFF, 0x0002, 0xFFFF, 0xFFFF, 
                    0x0005, 0x0001, 0x0004, 0x0010, 
                    0x0010, 0x0001, 0x0000, 0x0000}, "Another Item 4");

   std::cout << mxf_kv_dic.find({0x06, 0x0E, 0x2B, 0x34, 
                                 0x08, 0x01, 0x06, 0x02, 
                                 0x05, 0x01, 0x04, 0x10, 
                                 0x10, 0x01, 0x00, 0x00}) << std::endl;
   
   // ------------------------------------------------
   #endif
   
   #if 1
   //mxf_file file("freeMXF-mxf1.mxf");
   mxf_file file("GoneGirl_32K.mxf");

   file.build_klv_list();
   file.parse();

   //file.output_klv_list(std::cout);

   return 0;
   #endif
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x220, %rsp            # imm = 0x220
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x1f9(%rbp), %rdi
movq %rdi, -0x218(%rbp)
callq 0x3390
movq -0x218(%rbp), %rdx
leaq 0x62b5(%rip), %rsi      # 0xc3af
leaq -0x1f8(%rbp), %rdi
callq 0x61e0
jmp 0x6108
leaq -0x1d8(%rbp), %rdi
leaq -0x1f8(%rbp), %rsi
callq 0x6290
jmp 0x611d
leaq -0x1f8(%rbp), %rdi
callq 0x33c8
leaq -0x1f9(%rbp), %rdi
callq 0x3250
leaq -0x1d8(%rbp), %rdi
callq 0x6630
jmp 0x6143
leaq -0x1d8(%rbp), %rdi
callq 0x67a0
jmp 0x6151
movl $0x0, -0x4(%rbp)
leaq -0x1d8(%rbp), %rdi
callq 0x6a50
movl -0x4(%rbp), %eax
addq $0x220, %rsp            # imm = 0x220
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x208(%rbp)
movl %eax, -0x20c(%rbp)
jmp 0x61a2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x208(%rbp)
movl %eax, -0x20c(%rbp)
leaq -0x1f8(%rbp), %rdi
callq 0x33c8
leaq -0x1f9(%rbp), %rdi
callq 0x3250
jmp 0x61ce
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x208(%rbp)
movl %eax, -0x20c(%rbp)
leaq -0x1d8(%rbp), %rdi
callq 0x6a50
movq -0x208(%rbp), %rdi
callq 0x3380
nopw (%rax,%rax)
// File: salleaffaire[P]MXFParser/./mxf_base.hpp
// Function: mxf_file::build_klv_list()
bool build_klv_list() {
      bool rval = true;
      if (m_p_data) {
         // Initialize Bit Extractor
         bit_extractor be(m_p_data, m_file_size, BE_BIG_ENDIAN);
         // Need a KLV parser instance
         klv_parser klvp;

         klvp.set_verbosity(true);
         klvp.set_validation(true);

         bool klv_ret_val;
         do {
            auto p_klvi = std::shared_ptr<klv_item>(new klv_item);
            klv_ret_val = klvp.get_klv_item(*p_klvi, be);
            
            if (klv_ret_val) {
               m_klv_list.push_back(p_klvi);
            }
            //std::cout << "  Bytes left: " << be.get_bytes_left() << std::endl; 
         } while (true == klv_ret_val);
      }
      return rval;
   }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x58(%rbp)
movb $0x1, -0x9(%rbp)
cmpq $0x0, 0x1a0(%rax)
je 0x6785
movq -0x58(%rbp), %rax
movq 0x1a0(%rax), %rsi
movl 0x198(%rax), %edx
leaq -0x28(%rbp), %rdi
movl $0x1, %ecx
callq 0x5090
leaq -0x30(%rbp), %rdi
callq 0x5010
jmp 0x6680
leaq -0x30(%rbp), %rdi
movl $0x1, %esi
callq 0x3ee0
jmp 0x6690
leaq -0x30(%rbp), %rdi
movl $0x1, %esi
callq 0x3f00
jmp 0x66a0
jmp 0x66a2
movl $0x28, %edi
callq 0x3200
movq %rax, -0x60(%rbp)
jmp 0x66b2
movq -0x60(%rbp), %rdi
callq 0x3b50
jmp 0x66bd
movq -0x60(%rbp), %rsi
leaq -0x50(%rbp), %rdi
callq 0x50d0
jmp 0x66cc
leaq -0x50(%rbp), %rdi
callq 0x5100
movq %rax, %rsi
leaq -0x30(%rbp), %rdi
leaq -0x28(%rbp), %rdx
callq 0x3f20
movb %al, -0x61(%rbp)
jmp 0x66ea
movb -0x61(%rbp), %al
andb $0x1, %al
movb %al, -0x3d(%rbp)
testb $0x1, -0x3d(%rbp)
je 0x6751
movq -0x58(%rbp), %rdi
addq $0x1b0, %rdi            # imm = 0x1B0
leaq -0x50(%rbp), %rsi
callq 0x5130
jmp 0x670e
jmp 0x6751
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x677a
movq -0x60(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
movl $0x28, %esi
callq 0x3210
jmp 0x677a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x5190
jmp 0x677a
leaq -0x50(%rbp), %rdi
callq 0x5190
movb -0x3d(%rbp), %al
andb $0x1, %al
movzbl %al, %ecx
movl $0x1, %eax
cmpl %ecx, %eax
je 0x66a2
leaq -0x28(%rbp), %rdi
callq 0x51b0
jmp 0x6785
leaq -0x28(%rbp), %rdi
callq 0x51b0
jmp 0x6790
movb -0x9(%rbp), %al
andb $0x1, %al
addq $0x70, %rsp
popq %rbp
retq
movq -0x38(%rbp), %rdi
callq 0x3380
nopl (%rax)
// File: salleaffaire[P]MXFParser/./mxf_base.hpp
// Function: mxf_file::decode_partition_pack(klv_item&)
int decode_partition_pack(klv_item &klv) {
      int rval = 0;
      switch (klv.mKey[13]) {
      case 0x02:
         decode_header_partition_pack(klv);
         break;
      case 0x03:
         decode_body_partition_pack(klv);
         break;
      case 0x04:
         decode_footer_partition_pack(klv);
         break;
      }
      return rval;
   }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movl $0x0, -0x14(%rbp)
movq -0x10(%rbp), %rdi
movl $0xd, %esi
callq 0x5030
movzbl (%rax), %eax
movl %eax, -0x18(%rbp)
subl $0x2, %eax
je 0x712e
jmp 0x711a
movl -0x18(%rbp), %eax
subl $0x3, %eax
je 0x713d
jmp 0x7124
movl -0x18(%rbp), %eax
subl $0x4, %eax
je 0x714c
jmp 0x7159
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x7690
jmp 0x7159
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x7fc0
jmp 0x7159
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x88f0
movl -0x14(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: yhirose[P]fizzbuzzlang/fzbz.cc
// Function: eval_ternary(peg::AstBase<peg::EmptyType> const&, std::shared_ptr<Environment>)
Value eval_ternary(const Ast& ast, shared_ptr<Environment> env) {
  auto cond = eval(*ast.nodes[0], env).get<bool>();
  auto val1 = eval(*ast.nodes[1], env);
  auto val2 = eval(*ast.nodes[2], env);
  return cond ? val1 : val2;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x130, %rsp            # imm = 0x130
movq %rdx, -0xf0(%rbp)
movq %rdi, -0x100(%rbp)
movq %rdi, %rax
movq %rax, -0xf8(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rdi
addq $0xc0, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x130c0
movq %rax, %rdi
callq 0x130e0
movq -0xf0(%rbp), %rsi
movq %rax, -0xe8(%rbp)
leaq -0x58(%rbp), %rdi
movq %rdi, -0xe0(%rbp)
callq 0x13110
movq -0xe8(%rbp), %rsi
movq -0xe0(%rbp), %rdx
leaq -0x48(%rbp), %rdi
callq 0xadb0
jmp 0xabc2
leaq -0x48(%rbp), %rdi
callq 0x13140
movb %al, -0x101(%rbp)
jmp 0xabd3
leaq -0x48(%rbp), %rdi
callq 0x13210
leaq -0x58(%rbp), %rdi
callq 0x13230
movb -0x101(%rbp), %al
andb $0x1, %al
movb %al, -0x19(%rbp)
movq -0x10(%rbp), %rdi
addq $0xc0, %rdi
movl $0x1, %esi
callq 0x130c0
movq %rax, %rdi
callq 0x130e0
movq -0xf0(%rbp), %rsi
movq %rax, -0x118(%rbp)
leaq -0xa0(%rbp), %rdi
movq %rdi, -0x110(%rbp)
callq 0x13110
movq -0x118(%rbp), %rsi
movq -0x110(%rbp), %rdx
leaq -0x90(%rbp), %rdi
callq 0xadb0
jmp 0xac4a
leaq -0xa0(%rbp), %rdi
callq 0x13230
movq -0x10(%rbp), %rdi
addq $0xc0, %rdi
movl $0x2, %esi
callq 0x130c0
movq %rax, %rdi
callq 0x130e0
movq -0xf0(%rbp), %rsi
movq %rax, -0x128(%rbp)
leaq -0xd8(%rbp), %rdi
movq %rdi, -0x120(%rbp)
callq 0x13110
movq -0x128(%rbp), %rsi
movq -0x120(%rbp), %rdx
leaq -0xc8(%rbp), %rdi
callq 0xadb0
jmp 0xacb0
leaq -0xd8(%rbp), %rdi
callq 0x13230
testb $0x1, -0x19(%rbp)
je 0xacd2
leaq -0x90(%rbp), %rax
movq %rax, -0x130(%rbp)
jmp 0xace2
leaq -0xc8(%rbp), %rax
movq %rax, -0x130(%rbp)
jmp 0xace2
movq -0x100(%rbp), %rdi
movq -0x130(%rbp), %rsi
callq 0x13250
jmp 0xacf7
leaq -0xc8(%rbp), %rdi
callq 0x13210
leaq -0x90(%rbp), %rdi
callq 0x13210
movq -0xf8(%rbp), %rax
addq $0x130, %rsp            # imm = 0x130
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0xad42
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x13210
leaq -0x58(%rbp), %rdi
callq 0x13230
jmp 0xada5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0x13230
jmp 0xada5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0xd8(%rbp), %rdi
callq 0x13230
jmp 0xad99
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0xc8(%rbp), %rdi
callq 0x13210
leaq -0x90(%rbp), %rdi
callq 0x13210
movq -0x60(%rbp), %rdi
callq 0xa650
nop