LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: sbingner[P]kerneldec/lzfse/src/lzfse_encode_base.c
// Function: lzfse_backend_literals
static int lzfse_backend_literals(lzfse_encoder_state *s, lzfse_offset L) {
  // Create a fake match with M=0, D=1
  lzfse_match match;
  lzfse_offset pos = s->src_literal + L;
  match.pos = pos;
  match.ref = match.pos - 1;
  match.length = 0;
  return lzfse_backend_match(s, &match);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
addq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
subq $0x1, %rax
movq %rax, -0x20(%rbp)
movl $0x0, -0x18(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x4c00
addq $0x30, %rsp
popq %rbp
retq
nop
// File: sbingner[P]kerneldec/lzfse/src/lzfse_encode_base.c
// Function: lzfse_encode_finish
int lzfse_encode_finish(lzfse_encoder_state *s) {
  const lzfse_match NO_MATCH = {0};

  // Emit pending match
  if (s->pending.length > 0) {
    if (lzfse_backend_match(s, &s->pending) != LZFSE_STATUS_OK)
      return LZFSE_STATUS_DST_FULL;
    s->pending = NO_MATCH;
  }

  // Emit final literals if any
  lzfse_offset L = s->src_end - s->src_literal;
  if (L > 0) {
    if (lzfse_backend_literals(s, L) != LZFSE_STATUS_OK)
      return LZFSE_STATUS_DST_FULL;
  }

  // Emit all matches, and end-of-stream block
  if (lzfse_backend_end_of_stream(s) != LZFSE_STATUS_OK)
    return LZFSE_STATUS_DST_FULL;

  return LZFSE_STATUS_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
leaq -0x28(%rbp), %rdi
xorl %esi, %esi
movl $0x18, %edx
callq 0x3080
movq -0x10(%rbp), %rax
cmpl $0x0, 0x50(%rax)
jbe 0x4d11
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x40, %rsi
callq 0x4c00
cmpl $0x0, %eax
je 0x4cf5
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
jmp 0x4d67
movq -0x10(%rbp), %rax
movq -0x28(%rbp), %rcx
movq %rcx, 0x40(%rax)
movq -0x20(%rbp), %rcx
movq %rcx, 0x48(%rax)
movq -0x18(%rbp), %rcx
movq %rcx, 0x50(%rax)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
subq 0x10(%rcx), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jle 0x4d49
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x4c60
cmpl $0x0, %eax
je 0x4d47
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
jmp 0x4d67
jmp 0x4d49
movq -0x10(%rbp), %rdi
callq 0x4d70
cmpl $0x0, %eax
je 0x4d60
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
jmp 0x4d67
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
// File: sbingner[P]kerneldec/lzfse/src/lzfse_encode_base.c
// Function: lzfse_backend_end_of_stream
static int lzfse_backend_end_of_stream(lzfse_encoder_state *s) {
  // Final match triggers write, otherwise emit blocks when we have enough
  // matches stored
  if (lzfse_encode_matches(s) != LZFSE_STATUS_OK)
    return LZFSE_STATUS_DST_FULL; // DST full

  // Emit end-of-stream block
  if (s->dst + 4 > s->dst_end)
    return LZFSE_STATUS_DST_FULL; // DST full
  store4(s->dst, LZFSE_ENDOFSTREAM_BLOCK_MAGIC);
  s->dst += 4;

  return LZFSE_STATUS_OK; // OK
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x4f50
cmpl $0x0, %eax
je 0x4d93
movl $0xfffffffe, -0x10(%rbp) # imm = 0xFFFFFFFE
jmp 0x4de5
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
addq $0x4, %rax
movq -0x18(%rbp), %rcx
cmpq 0x38(%rcx), %rax
jbe 0x4db2
movl $0xfffffffe, -0x10(%rbp) # imm = 0xFFFFFFFE
jmp 0x4de5
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x8(%rbp)
movl $0x24787662, -0xc(%rbp) # imm = 0x24787662
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
movl %ecx, (%rax)
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rcx
addq $0x4, %rcx
movq %rcx, 0x28(%rax)
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: sbingner[P]kerneldec/lzfse/src/lzfse_encode_base.c
// Function: lzfse_encode_v1_freq_value
static inline uint32_t lzfse_encode_v1_freq_value(int value, int *nbits) {
  // Fixed Huffman code, bits are read from LSB.
  // Note that we rely on the position of the first '0' bit providing the number
  // of bits.
  switch (value) {
  case 0:
    *nbits = 2;
    return 0; //    0.0
  case 1:
    *nbits = 2;
    return 2; //    1.0
  case 2:
    *nbits = 3;
    return 1; //   0.01
  case 3:
    *nbits = 3;
    return 5; //   1.01
  case 4:
    *nbits = 5;
    return 3; // 00.011
  case 5:
    *nbits = 5;
    return 11; // 01.011
  case 6:
    *nbits = 5;
    return 19; // 10.011
  case 7:
    *nbits = 5;
    return 27; // 11.011
  default:
    break;
  }
  if (value < 24) {
    *nbits = 8;                    // 4+4
    return 7 + ((value - 8) << 4); // xxxx.0111
  }
  // 24..1047
  *nbits = 14;                     // 4+10
  return ((value - 24) << 4) + 15; // xxxxxxxxxx.1111
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl -0x8(%rbp), %eax
movq %rax, -0x18(%rbp)
subq $0x7, %rax
ja 0x7764
movq -0x18(%rbp), %rax
leaq 0x7a89(%rip), %rcx      # 0xf140
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x10(%rbp), %rax
movl $0x2, (%rax)
movl $0x0, -0x4(%rbp)
jmp 0x77a0
movq -0x10(%rbp), %rax
movl $0x2, (%rax)
movl $0x2, -0x4(%rbp)
jmp 0x77a0
movq -0x10(%rbp), %rax
movl $0x3, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x77a0
movq -0x10(%rbp), %rax
movl $0x3, (%rax)
movl $0x5, -0x4(%rbp)
jmp 0x77a0
movq -0x10(%rbp), %rax
movl $0x5, (%rax)
movl $0x3, -0x4(%rbp)
jmp 0x77a0
movq -0x10(%rbp), %rax
movl $0x5, (%rax)
movl $0xb, -0x4(%rbp)
jmp 0x77a0
movq -0x10(%rbp), %rax
movl $0x5, (%rax)
movl $0x13, -0x4(%rbp)
jmp 0x77a0
movq -0x10(%rbp), %rax
movl $0x5, (%rax)
movl $0x1b, -0x4(%rbp)
jmp 0x77a0
jmp 0x7766
cmpl $0x18, -0x8(%rbp)
jge 0x7787
movq -0x10(%rbp), %rax
movl $0x8, (%rax)
movl -0x8(%rbp), %eax
subl $0x8, %eax
shll $0x4, %eax
addl $0x7, %eax
movl %eax, -0x4(%rbp)
jmp 0x77a0
movq -0x10(%rbp), %rax
movl $0xe, (%rax)
movl -0x8(%rbp), %eax
subl $0x18, %eax
shll $0x4, %eax
addl $0xf, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: sbingner[P]kerneldec/lzfse/src/lzfse_decode_base.c
// Function: get_field
static inline uint32_t get_field(uint64_t v, int offset, int nbits) {
  assert(offset + nbits < 64 && offset >= 0 && nbits <= 32);
  if (nbits == 32)
    return (uint32_t)(v >> offset);
  return (uint32_t)((v >> offset) & ((1 << nbits) - 1));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movl -0x14(%rbp), %eax
addl -0x18(%rbp), %eax
cmpl $0x40, %eax
jge 0xa48b
cmpl $0x0, -0x14(%rbp)
jl 0xa48b
cmpl $0x20, -0x18(%rbp)
jg 0xa48b
jmp 0xa4aa
leaq 0x621a(%rip), %rdi      # 0x106ac
leaq 0x6407(%rip), %rsi      # 0x108a0
movl $0x38, %edx
leaq 0x6413(%rip), %rcx      # 0x108b8
callq 0x3070
cmpl $0x20, -0x18(%rbp)
jne 0xa4bf
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
shrq %cl, %rax
movl %eax, -0x4(%rbp)
jmp 0xa4e1
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
shrq %cl, %rax
movl -0x18(%rbp), %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
andq %rcx, %rax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: sbingner[P]kerneldec/lzfse/src/lzfse_decode_base.c
// Function: lzfse_decode_v1_freq_value
static inline int lzfse_decode_v1_freq_value(uint32_t bits, int *nbits) {
  static const int8_t lzfse_freq_nbits_table[32] = {
      2, 3, 2, 5, 2, 3, 2, 8, 2, 3, 2, 5, 2, 3, 2, 14,
      2, 3, 2, 5, 2, 3, 2, 8, 2, 3, 2, 5, 2, 3, 2, 14};
  static const int8_t lzfse_freq_value_table[32] = {
      0, 2, 1, 4, 0, 3, 1, -1, 0, 2, 1, 5, 0, 3, 1, -1,
      0, 2, 1, 6, 0, 3, 1, -1, 0, 2, 1, 7, 0, 3, 1, -1};

  uint32_t b = bits & 31; // lower 5 bits
  int n = lzfse_freq_nbits_table[b];
  *nbits = n;

  // Special cases for > 5 bits encoding
  if (n == 8)
    return 8 + ((bits >> 4) & 0xf);
  if (n == 14)
    return 24 + ((bits >> 4) & 0x3ff);

  // <= 5 bits encoding from table
  return lzfse_freq_value_table[b];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl -0x8(%rbp), %eax
andl $0x1f, %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
movl %eax, %ecx
leaq 0x5e20(%rip), %rax      # 0x10330
movsbl (%rax,%rcx), %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
cmpl $0x8, -0x18(%rbp)
jne 0xa537
movl -0x8(%rbp), %eax
shrl $0x4, %eax
andl $0xf, %eax
addl $0x8, %eax
movl %eax, -0x4(%rbp)
jmp 0xa563
cmpl $0xe, -0x18(%rbp)
jne 0xa550
movl -0x8(%rbp), %eax
shrl $0x4, %eax
andl $0x3ff, %eax            # imm = 0x3FF
addl $0x18, %eax
movl %eax, -0x4(%rbp)
jmp 0xa563
movl -0x14(%rbp), %eax
movl %eax, %ecx
leaq 0x5df4(%rip), %rax      # 0x10350
movsbl (%rax,%rcx), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax,%rax)
// File: sbingner[P]kerneldec/lzfse/src/lzfse_decode_base.c
// Function: copy
static inline void copy(uint8_t *dst, const uint8_t *src, size_t length) {
  const uint8_t *dst_end = dst + length;
  do {
    copy8(dst, src);
    dst += 8;
    src += 8;
  } while (dst < dst_end);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x38(%rbp)
movq %rsi, -0x40(%rbp)
movq %rdx, -0x48(%rbp)
movq -0x38(%rbp), %rax
addq -0x48(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x38(%rbp), %rcx
movq -0x40(%rbp), %rax
movq %rcx, -0x28(%rbp)
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rcx, -0x18(%rbp)
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq -0x20(%rbp), %rcx
movq %rcx, (%rax)
movq -0x38(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x38(%rbp)
movq -0x40(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x50(%rbp), %rax
jb 0xa5ac
popq %rbp
retq
nop
// File: sbingner[P]kerneldec/lzfse/src/lzvn_encode_base.c
// Function: lzvn_emit_match
static inline lzvn_offset lzvn_emit_match(lzvn_encoder_state *state,
                                          lzvn_match_info match) {
  size_t L = (size_t)(match.m_begin - state->src_literal); // literal count
  size_t M = (size_t)match.M;                              // match length
  size_t D = (size_t)match.D;                              // match distance
  size_t D_prev = (size_t)state->d_prev; // previously emitted match distance
  unsigned char *dst = emit(state->src + state->src_literal, state->dst,
                            state->dst_end, L, M, D, D_prev);
  // Check if DST is full
  if (dst >= state->dst_end) {
    return 0; // FULL
  }

  // Update state
  lzvn_offset dst_used = dst - state->dst;
  state->d_prev = match.D;
  state->dst = dst;
  state->src_literal = match.m_end;
  return dst_used;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
leaq 0x10(%rbp), %rax
movq %rax, -0x48(%rbp)
movq %rdi, -0x10(%rbp)
movq (%rax), %rcx
movq -0x10(%rbp), %rdx
subq 0x28(%rdx), %rcx
movq %rcx, -0x18(%rbp)
movq 0x10(%rax), %rcx
movq %rcx, -0x20(%rbp)
movq 0x18(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x70(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rax
addq 0x28(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rdx
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %r8
movq -0x28(%rbp), %r9
movq -0x30(%rbp), %rax
movq %rax, (%rsp)
callq 0xb4c0
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x40(%rcx), %rax
jb 0xb193
movq $0x0, -0x8(%rbp)
jmp 0xb1d6
movq -0x48(%rbp), %rax
movq -0x38(%rbp), %rcx
movq -0x10(%rbp), %rdx
movq 0x30(%rdx), %rdx
subq %rdx, %rcx
movq %rcx, -0x40(%rbp)
movq 0x18(%rax), %rdx
movq -0x10(%rbp), %rcx
movq %rdx, 0x70(%rcx)
movq -0x38(%rbp), %rdx
movq -0x10(%rbp), %rcx
movq %rdx, 0x30(%rcx)
movq 0x8(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x40(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
// File: sbingner[P]kerneldec/lzfse/src/lzvn_encode_base.c
// Function: lzvn_emit_literal
static inline lzvn_offset lzvn_emit_literal(lzvn_encoder_state *state,
                                            lzvn_offset n) {
  size_t L = (size_t)n;
  unsigned char *dst = emit_literal(state->src + state->src_literal, state->dst,
                                    state->dst_end, L);
  // Check if DST is full
  if (dst >= state->dst_end)
    return 0; // FULL

  // Update state
  lzvn_offset dst_used = dst - state->dst;
  state->dst = dst;
  state->src_literal += n;
  return dst_used;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rax
addq 0x28(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rdx
movq -0x20(%rbp), %rcx
callq 0xbc00
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x40(%rcx), %rax
jb 0xb23c
movq $0x0, -0x8(%rbp)
jmp 0xb273
movq -0x28(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x30(%rcx), %rcx
subq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
addq 0x28(%rax), %rcx
movq %rcx, 0x28(%rax)
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: sbingner[P]kerneldec/lzfse/src/lzvn_encode_base.c
// Function: lzvn_encode_buffer
size_t lzvn_encode_buffer(void *__restrict dst, size_t dst_size,
                          const void *__restrict src, size_t src_size,
                          void *__restrict work) {
  size_t src_used = 0;
  size_t dst_used =
      lzvn_encode_partial(dst, dst_size, src, src_size, &src_used, work);
  if (src_used != src_size)
    return 0;      // could not encode entire input stream = fail
  return dst_used; // return encoded size
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
movq -0x30(%rbp), %r9
leaq -0x38(%rbp), %r8
callq 0xb300
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x28(%rbp), %rax
je 0xb2e9
movq $0x0, -0x8(%rbp)
jmp 0xb2f1
movq -0x40(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: sbingner[P]kerneldec/lzfse/src/lzvn_encode_base.c
// Function: lzvn_encode_partial
static size_t lzvn_encode_partial(void *__restrict dst, size_t dst_size,
                                  const void *__restrict src, size_t src_size,
                                  size_t *src_used, void *__restrict work) {
  // Min size checks to avoid accessing memory outside buffers.
  if (dst_size < LZVN_ENCODE_MIN_DST_SIZE) {
    *src_used = 0;
    return 0;
  }
  // Max input size check (limit to offsets on uint32_t).
  if (src_size > LZVN_ENCODE_MAX_SRC_SIZE) {
    src_size = LZVN_ENCODE_MAX_SRC_SIZE;
  }

  // Setup encoder state
  lzvn_encoder_state state;
  memset(&state, 0, sizeof(state));

  state.src = src;
  state.src_begin = 0;
  state.src_end = (lzvn_offset)src_size;
  state.src_literal = 0;
  state.src_current = 0;
  state.dst = dst;
  state.dst_begin = dst;
  state.dst_end = (unsigned char *)dst + dst_size - 8; // reserve 8 bytes for end-of-stream
  state.table = work;

  // Do not encode if the input buffer is too small. We'll emit a literal instead.
  if (src_size >= LZVN_ENCODE_MIN_SRC_SIZE) {

    state.src_current_end = (lzvn_offset)src_size - LZVN_ENCODE_MIN_MARGIN;
    lzvn_init_table(&state);
    lzvn_encode(&state);

  }

  // No need to test the return value: src_literal will not be updated on failure,
  // and we will fail later.
  lzvn_emit_literal(&state, state.src_end - state.src_literal);

  // Restore original size, so end-of-stream always succeeds, and emit it
  state.dst_end = (unsigned char *)dst + dst_size;
  lzvn_emit_end_of_stream(&state);

  *src_used = state.src_literal;
  return (size_t)(state.dst - state.dst_begin);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
cmpq $0x8, -0x18(%rbp)
jae 0xb342
movq -0x30(%rbp), %rax
movq $0x0, (%rax)
movq $0x0, -0x8(%rbp)
jmp 0xb44b
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq %rax, -0x28(%rbp)
jbe 0xb356
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movq %rax, -0x28(%rbp)
leaq -0xb8(%rbp), %rdi
xorl %esi, %esi
movl $0x80, %edx
callq 0x3080
movq -0x20(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq $0x0, -0xb0(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq $0x0, -0x90(%rbp)
movq $0x0, -0xa0(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x10(%rbp), %rax
addq -0x18(%rbp), %rax
addq $-0x8, %rax
movq %rax, -0x78(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x40(%rbp)
cmpq $0x8, -0x28(%rbp)
jb 0xb3f9
movq -0x28(%rbp), %rax
subq $0x8, %rax
movq %rax, -0x98(%rbp)
leaq -0xb8(%rbp), %rdi
callq 0xbd90
leaq -0xb8(%rbp), %rdi
callq 0xa610
movq -0xa8(%rbp), %rsi
subq -0x90(%rbp), %rsi
leaq -0xb8(%rbp), %rdi
callq 0xb1e0
movq -0x10(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x78(%rbp)
leaq -0xb8(%rbp), %rdi
callq 0xbe70
movq -0x90(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq -0x88(%rbp), %rax
movq -0x80(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0xc0, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: sbingner[P]kerneldec/lzfse/src/lzvn_encode_base.c
// Function: emit_literal
static inline unsigned char *emit_literal(const unsigned char *p,
                                          unsigned char *q, unsigned char *q1,
                                          size_t L) {
  size_t x;
  while (L > 15) {
    x = L < 271 ? L : 271;
    if (q + x + 10 >= q1)
      goto OUT_FULL;
    store2(q, 0xE0 + ((x - 16) << 8));
    q += 2;
    L -= x;
    q = lzvn_copy8(q, p, x);
    p += x;
  }
  if (L > 0) {
    if (q + L + 10 >= q1)
      goto OUT_FULL;
    *q++ = 0xE0 + L; // 1110LLLL
    q = lzvn_copy8(q, p, L);
  }
  return q;

OUT_FULL:
  return q1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x20(%rbp)
movq %rsi, -0x28(%rbp)
movq %rdx, -0x30(%rbp)
movq %rcx, -0x38(%rbp)
cmpq $0xf, -0x38(%rbp)
jbe 0xbccb
cmpq $0x10f, -0x38(%rbp)     # imm = 0x10F
jae 0xbc37
movq -0x38(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0xbc42
movl $0x10f, %eax            # imm = 0x10F
movq %rax, -0x48(%rbp)
jmp 0xbc42
movq -0x48(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x28(%rbp), %rax
addq -0x40(%rbp), %rax
addq $0xa, %rax
cmpq -0x30(%rbp), %rax
jb 0xbc61
jmp 0xbd22
movq -0x28(%rbp), %rcx
movq -0x40(%rbp), %rax
subq $0x10, %rax
shlq $0x8, %rax
addq $0xe0, %rax
movq %rcx, -0x8(%rbp)
movw %ax, -0xa(%rbp)
movq -0x8(%rbp), %rax
movw -0xa(%rbp), %cx
movw %cx, (%rax)
movq -0x28(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x28(%rbp)
movq -0x40(%rbp), %rcx
movq -0x38(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x40(%rbp), %rdx
callq 0xbd40
movq %rax, -0x28(%rbp)
movq -0x40(%rbp), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0xbc18
cmpq $0x0, -0x38(%rbp)
jbe 0xbd18
movq -0x28(%rbp), %rax
addq -0x38(%rbp), %rax
addq $0xa, %rax
cmpq -0x30(%rbp), %rax
jb 0xbce6
jmp 0xbd22
movq -0x38(%rbp), %rax
addq $0xe0, %rax
movb %al, %cl
movq -0x28(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x28(%rbp)
movb %cl, (%rax)
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x38(%rbp), %rdx
callq 0xbd40
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0xbd2a
movq -0x30(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: sbingner[P]kerneldec/lzfse/src/lzvn_encode_base.c
// Function: lzvn_init_table
static inline void lzvn_init_table(lzvn_encoder_state *state) {
  lzvn_offset index = -LZVN_ENCODE_MAX_DISTANCE; // max match distance
  if (index < state->src_begin)
    index = state->src_begin;
  uint32_t value = load4(state->src + index);

  lzvn_encode_entry_type e;
  for (int i = 0; i < 4; i++) {
    e.indices[i] = offset_to_s32(index);
    e.values[i] = value;
  }
  for (int u = 0; u < LZVN_ENCODE_HASH_VALUES; u++)
    state->table[u] = e; // fill entire table
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x18(%rbp)
movq $-0xffff, -0x20(%rbp)   # imm = 0xFFFF0001
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jge 0xbdbe
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl (%rax), %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x24(%rbp)
movl $0x0, -0x48(%rbp)
cmpl $0x4, -0x48(%rbp)
jge 0xbe12
movq -0x20(%rbp), %rdi
callq 0xad60
movl %eax, %ecx
movslq -0x48(%rbp), %rax
movl %ecx, -0x44(%rbp,%rax,4)
movl -0x24(%rbp), %ecx
movslq -0x48(%rbp), %rax
movl %ecx, -0x34(%rbp,%rax,4)
movl -0x48(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x48(%rbp)
jmp 0xbde3
movl $0x0, -0x4c(%rbp)
cmpl $0x4000, -0x4c(%rbp)    # imm = 0x4000
jge 0xbe5f
movq -0x18(%rbp), %rax
movq 0x78(%rax), %rax
movslq -0x4c(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq -0x44(%rbp), %rcx
movq %rcx, (%rax)
movq -0x3c(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x34(%rbp), %rcx
movq %rcx, 0x10(%rax)
movq -0x2c(%rbp), %rcx
movq %rcx, 0x18(%rax)
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0xbe19
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: sbingner[P]kerneldec/lzfse/src/lzvn_encode_base.c
// Function: lzvn_emit_end_of_stream
static inline lzvn_offset lzvn_emit_end_of_stream(lzvn_encoder_state *state) {
  // Do we have 8 byte in dst?
  if (state->dst_end < state->dst + 8)
    return 0; // FULL

  // Insert end marker and update state
  store8(state->dst, 0x06); // end-of-stream command
  state->dst += 8;
  return 8; // dst_used
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq 0x40(%rax), %rax
movq -0x20(%rbp), %rcx
movq 0x30(%rcx), %rcx
addq $0x8, %rcx
cmpq %rcx, %rax
jae 0xbe9b
movq $0x0, -0x18(%rbp)
jmp 0xbed2
movq -0x20(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x8(%rbp)
movq $0x6, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
movq %rcx, (%rax)
movq -0x20(%rbp), %rax
movq 0x30(%rax), %rcx
addq $0x8, %rcx
movq %rcx, 0x30(%rax)
movq $0x8, -0x18(%rbp)
movq -0x18(%rbp), %rax
popq %rbp
retq
nopl (%rax,%rax)
// File: sbingner[P]kerneldec/lzfse/src/lzfse_fse.c
// Function: fse_init_encoder_table
void fse_init_encoder_table(int nstates, int nsymbols,
                            const uint16_t *__restrict freq,
                            fse_encoder_entry *__restrict t) {
  int offset = 0; // current offset
  int n_clz = __builtin_clz(nstates);
  for (int i = 0; i < nsymbols; i++) {
    int f = (int)freq[i];
    if (f == 0)
      continue; // skip this symbol, no occurrences
    int k =
        __builtin_clz(f) - n_clz; // shift needed to ensure N <= (F<<K) < 2*N
    t[i].s0 = (int16_t)((f << k) - nstates);
    t[i].k = (int16_t)k;
    t[i].delta0 = (int16_t)(offset - f + (nstates >> k));
    t[i].delta1 = (int16_t)(offset - f + (nstates >> (k - 1)));
    offset += f;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movq %rdx, -0x10(%rbp)
movq %rcx, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x4(%rbp), %eax
bsrl %eax, %eax
xorl $0x1f, %eax
movl %eax, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x8(%rbp), %eax
jge 0xdbbc
movq -0x10(%rbp), %rax
movslq -0x24(%rbp), %rcx
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x28(%rbp)
cmpl $0x0, -0x28(%rbp)
jne 0xdb22
jmp 0xdbae
movl -0x28(%rbp), %eax
bsrl %eax, %eax
xorl $0x1f, %eax
subl -0x20(%rbp), %eax
movl %eax, -0x2c(%rbp)
movl -0x28(%rbp), %eax
movl -0x2c(%rbp), %ecx
shll %cl, %eax
subl -0x4(%rbp), %eax
movw %ax, %dx
movq -0x18(%rbp), %rax
movslq -0x24(%rbp), %rcx
movw %dx, (%rax,%rcx,8)
movl -0x2c(%rbp), %eax
movw %ax, %dx
movq -0x18(%rbp), %rax
movslq -0x24(%rbp), %rcx
movw %dx, 0x2(%rax,%rcx,8)
movl -0x1c(%rbp), %eax
subl -0x28(%rbp), %eax
movl -0x4(%rbp), %edx
movl -0x2c(%rbp), %ecx
sarl %cl, %edx
movl %edx, %ecx
addl %ecx, %eax
movw %ax, %dx
movq -0x18(%rbp), %rax
movslq -0x24(%rbp), %rcx
movw %dx, 0x4(%rax,%rcx,8)
movl -0x1c(%rbp), %eax
subl -0x28(%rbp), %eax
movl -0x4(%rbp), %edx
movl -0x2c(%rbp), %ecx
subl $0x1, %ecx
sarl %cl, %edx
movl %edx, %ecx
addl %ecx, %eax
movw %ax, %dx
movq -0x18(%rbp), %rax
movslq -0x24(%rbp), %rcx
movw %dx, 0x6(%rax,%rcx,8)
movl -0x28(%rbp), %eax
addl -0x1c(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0xdafc
popq %rbp
retq
nop
// File: sbingner[P]kerneldec/lzfse/src/lzfse_fse.c
// Function: fse_adjust_freqs
static void fse_adjust_freqs(uint16_t *freq, int overrun, int nsymbols) {
  for (int shift = 3; overrun != 0; shift--) {
    for (int sym = 0; sym < nsymbols; sym++) {
      if (freq[sym] > 1) {
        int n = (freq[sym] - 1) >> shift;
        if (n > overrun)
          n = overrun;
        freq[sym] -= n;
        overrun -= n;
        if (overrun == 0)
          break;
      }
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl $0x3, -0x14(%rbp)
cmpl $0x0, -0xc(%rbp)
je 0xe19b
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl -0x10(%rbp), %eax
jge 0xe18b
movq -0x8(%rbp), %rax
movslq -0x18(%rbp), %rcx
movzwl (%rax,%rcx,2), %eax
cmpl $0x1, %eax
jle 0xe17e
movq -0x8(%rbp), %rax
movslq -0x18(%rbp), %rcx
movzwl (%rax,%rcx,2), %eax
subl $0x1, %eax
movl -0x14(%rbp), %ecx
sarl %cl, %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0xc(%rbp), %eax
jle 0xe154
movl -0xc(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %esi
movq -0x8(%rbp), %rax
movslq -0x18(%rbp), %rcx
movzwl (%rax,%rcx,2), %edx
subl %esi, %edx
movw %dx, (%rax,%rcx,2)
movl -0x1c(%rbp), %ecx
movl -0xc(%rbp), %eax
subl %ecx, %eax
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jne 0xe17c
jmp 0xe18b
jmp 0xe17e
jmp 0xe180
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0xe116
jmp 0xe18d
movl -0x14(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0xe105
popq %rbp
retq
// File: dudulu233[P]EMA-Tool/./log.h
// Function: GET_MSG(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
char *GET_MSG(int level, string s)
{
    static char log_msg[1000];
    time_t t = time(0);
    struct tm *local = localtime(&t);
    char time_buf[128];
    strftime(time_buf, 64, "%Y/%m/%d %H:%M:%S", local);
    strcpy(log_msg, "[");
    strcat(log_msg, time_buf);
    strcat(log_msg, "] [");
    strcat(log_msg, LEVEL[level]);
    strcat(log_msg, "] ");
    strcat(log_msg, s.c_str());
    strcat(log_msg, "\n");
    return log_msg;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rsi, -0xa8(%rbp)
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
xorl %eax, %eax
movl %eax, %edi
callq 0x3270
movq %rax, -0x18(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x3200
movq %rax, -0x20(%rbp)
leaq -0xa0(%rbp), %rdi
movq -0x20(%rbp), %rcx
movl $0x40, %esi
leaq 0x8973(%rip), %rdx      # 0xc04d
callq 0x3230
leaq 0xebca(%rip), %rdi      # 0x122b0
leaq 0x8974(%rip), %rsi      # 0xc061
callq 0x3280
leaq -0xa0(%rbp), %rsi
leaq 0xebb0(%rip), %rdi      # 0x122b0
callq 0x3480
leaq 0xeba4(%rip), %rdi      # 0x122b0
leaq 0x894c(%rip), %rsi      # 0xc05f
callq 0x3480
movslq -0x4(%rbp), %rax
leaq 0x8b3d(%rip), %rsi      # 0xc260
imulq $0x14, %rax, %rax
addq %rax, %rsi
leaq 0xeb7f(%rip), %rdi      # 0x122b0
callq 0x3480
leaq 0xeb73(%rip), %rdi      # 0x122b0
leaq 0x891f(%rip), %rsi      # 0xc063
callq 0x3480
movq -0xa8(%rbp), %rdi
callq 0x3130
movq %rax, %rsi
leaq 0xeb51(%rip), %rdi      # 0x122b0
callq 0x3480
leaq 0xeb45(%rip), %rdi      # 0x122b0
leaq 0x89a3(%rip), %rsi      # 0xc115
callq 0x3480
leaq 0xeb32(%rip), %rax      # 0x122b0
addq $0xb0, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: dudulu233[P]EMA-Tool/ema_tool.cpp
// Function: StringToDatetime(char const*)
time_t StringToDatetime(const char* str)
{
	tm tm_;
	int year, month, day, hour, minute, second;
	sscanf(str, "%d-%d-%d %d:%d:%d", &year, &month, &day, &hour, &minute, &second);
	tm_.tm_year = year - 1900;
	tm_.tm_mon = month - 1;
	tm_.tm_mday = day;
	tm_.tm_hour = hour;
	tm_.tm_min = minute;
	tm_.tm_sec = second;
	tm_.tm_isdst = 0;

	time_t t_ = mktime(&tm_);
	return t_;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x888f(%rip), %rsi      # 0xc066
leaq -0x44(%rbp), %rdx
leaq -0x48(%rbp), %rcx
leaq -0x4c(%rbp), %r8
leaq -0x50(%rbp), %r9
leaq -0x54(%rbp), %r10
leaq -0x58(%rbp), %rax
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
movb $0x0, %al
callq 0x32a0
movl -0x44(%rbp), %eax
subl $0x76c, %eax            # imm = 0x76C
movl %eax, -0x2c(%rbp)
movl -0x48(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x30(%rbp)
movl -0x4c(%rbp), %eax
movl %eax, -0x34(%rbp)
movl -0x50(%rbp), %eax
movl %eax, -0x38(%rbp)
movl -0x54(%rbp), %eax
movl %eax, -0x3c(%rbp)
movl -0x58(%rbp), %eax
movl %eax, -0x40(%rbp)
movl $0x0, -0x20(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x31e0
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax)
// File: dudulu233[P]EMA-Tool/cache_stat.cpp
// Function: StatCache::StatCache(long)
StatCache::StatCache(long st)
{
	total_seq = re_seq = map_size = current_hour = current_day = 0;
	start_time = st;
	for (int i = 0; i < 1024; i++)
	{
		reuse_dis_array[i] = 0l;
	}

	string output_path = "./result";
	string shell_str = "mkdir -p " + output_path;
	int ret = system(shell_str.c_str());
	assert(0 == ret);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x80(%rbp)
addq $0x2030, %rdi           # imm = 0x2030
movq %rdi, -0x90(%rbp)
callq 0x6960
movq -0x80(%rbp), %rdi
addq $0x2068, %rdi           # imm = 0x2068
movq %rdi, -0x88(%rbp)
callq 0x6980
movq -0x80(%rbp), %rax
movq $0x0, 0x20(%rax)
movq $0x0, 0x18(%rax)
movq $0x0, 0x10(%rax)
movq $0x0, 0x8(%rax)
movq $0x0, (%rax)
movq -0x10(%rbp), %rcx
movq %rcx, 0x28(%rax)
movl $0x0, -0x14(%rbp)
cmpl $0x400, -0x14(%rbp)     # imm = 0x400
jge 0x5aa4
movq -0x80(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq $0x0, 0x30(%rax,%rcx,8)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x5a7f
leaq -0x39(%rbp), %rdi
movq %rdi, -0x98(%rbp)
callq 0x3470
movq -0x98(%rbp), %rdx
leaq 0x6a0f(%rip), %rsi      # 0xc4d1
leaq -0x38(%rbp), %rdi
callq 0x3390
jmp 0x5acd
leaq -0x39(%rbp), %rdi
callq 0x32e0
leaq 0x68af(%rip), %rsi      # 0xc38c
leaq -0x70(%rbp), %rdi
leaq -0x38(%rbp), %rdx
callq 0x69a0
jmp 0x5aec
leaq -0x70(%rbp), %rdi
callq 0x3130
movq %rax, %rdi
callq 0x3240
movl %eax, -0x9c(%rbp)
jmp 0x5b05
movl -0x9c(%rbp), %eax
movl %eax, -0x74(%rbp)
xorl %eax, %eax
cmpl -0x74(%rbp), %eax
jne 0x5b17
jmp 0x5b72
leaq 0x6878(%rip), %rdi      # 0xc396
leaq 0x687a(%rip), %rsi      # 0xc39f
movl $0x13, %edx
leaq 0x687d(%rip), %rcx      # 0xc3ae
callq 0x31c0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x39(%rbp), %rdi
callq 0x32e0
jmp 0x5b96
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x5b8d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x31b0
jmp 0x5b8d
leaq -0x70(%rbp), %rdi
callq 0x31b0
leaq -0x38(%rbp), %rdi
callq 0x31b0
addq $0xa0, %rsp
popq %rbp
retq
leaq -0x38(%rbp), %rdi
callq 0x31b0
movq -0x88(%rbp), %rdi
callq 0x6ab0
movq -0x90(%rbp), %rdi
callq 0x6ad0
movq -0x48(%rbp), %rdi
callq 0x3460
nopw (%rax,%rax)
// File: dudulu233[P]EMA-Tool/cache_stat.cpp
// Function: StatCache::is_new_day(_IoRecord*)
bool StatCache::is_new_day(IoRecord* ir)
{
	bool result = false;
	long tmp = get_time_day(ir->alloc_time);
	if (tmp - current_day > 0)
	{
		result = true;
		current_day = tmp;
	}
	else if (tmp < current_day)
	{
		ir->alloc_time += 1;
	}
	return result;
}

// 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)
movb $0x0, -0x11(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rsi
callq 0x6490
movq -0x28(%rbp), %rcx
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
subq 0x20(%rcx), %rax
cmpq $0x0, %rax
jle 0x6460
movq -0x28(%rbp), %rax
movb $0x1, -0x11(%rbp)
movq -0x20(%rbp), %rcx
movq %rcx, 0x20(%rax)
jmp 0x647e
movq -0x28(%rbp), %rcx
movq -0x20(%rbp), %rax
cmpq 0x20(%rcx), %rax
jge 0x647c
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
jmp 0x647e
movb -0x11(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: dudulu233[P]EMA-Tool/cache_stat.cpp
// Function: StatCache::plot_rar_curve(SeqNum*)
void StatCache::plot_rar_curve(struct SeqNum* sn_tmp)
{
	//y = a*log(t) + b
	//x = log(t)
	//a = (y1-y2)/(x1-x2)
	//b = (x1*y2-x2*y1)/(x1-x2)
	double x1 = log(3600);
	double x2 = log(3600 * 20);
	double x3 = log(3600 * 47);
	double y1 = sn_tmp->re_retio[0];
	double y2 = sn_tmp->re_retio[1];
	double y3 = sn_tmp->re_retio[2];
	sn_tmp->a[0] = (y1 - y2) / (x1 - x2);
	sn_tmp->a[1] = (y3 - y2) / (x3 - x2);
	sn_tmp->b[0] = (x1 * y2 - x2 * y1) / (x1 - x2);
	sn_tmp->b[1] = (x3 * y2 - x2 * y3) / (x3 - x2);

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0xe10, %edi            # imm = 0xE10
callq 0x6c40
movsd %xmm0, -0x18(%rbp)
movl $0x11940, %edi          # imm = 0x11940
callq 0x6c40
movsd %xmm0, -0x20(%rbp)
movl $0x294f0, %edi          # imm = 0x294F0
callq 0x6c40
movsd %xmm0, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movsd (%rax), %xmm0
movsd %xmm0, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movsd 0x8(%rax), %xmm0
movsd %xmm0, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movsd 0x10(%rax), %xmm0
movsd %xmm0, -0x40(%rbp)
movsd -0x30(%rbp), %xmm0
subsd -0x38(%rbp), %xmm0
movsd -0x18(%rbp), %xmm1
subsd -0x20(%rbp), %xmm1
divsd %xmm1, %xmm0
movq -0x10(%rbp), %rax
movq (%rax), %rax
movsd %xmm0, (%rax)
movsd -0x40(%rbp), %xmm0
subsd -0x38(%rbp), %xmm0
movsd -0x28(%rbp), %xmm1
subsd -0x20(%rbp), %xmm1
divsd %xmm1, %xmm0
movq -0x10(%rbp), %rax
movq (%rax), %rax
movsd %xmm0, 0x8(%rax)
movsd -0x18(%rbp), %xmm0
movsd -0x38(%rbp), %xmm2
movsd -0x20(%rbp), %xmm1
mulsd -0x30(%rbp), %xmm1
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd -0x18(%rbp), %xmm1
subsd -0x20(%rbp), %xmm1
divsd %xmm1, %xmm0
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movsd %xmm0, (%rax)
movsd -0x28(%rbp), %xmm0
movsd -0x38(%rbp), %xmm2
movsd -0x20(%rbp), %xmm1
mulsd -0x40(%rbp), %xmm1
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd -0x28(%rbp), %xmm1
subsd -0x20(%rbp), %xmm1
divsd %xmm1, %xmm0
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movsd %xmm0, 0x8(%rax)
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: dudulu233[P]EMA-Tool/cache_stat.cpp
// Function: StatCache::is_new_hour(_IoRecord*)
bool StatCache::is_new_hour(IoRecord* ir)
{
	bool result = false;
	long tmp = get_time_hour(ir->alloc_time);
	if (tmp - current_hour > 0)
	{
		result = true;
		current_hour = tmp;
	}
	else if (tmp < current_hour)
	{
		ir->alloc_time += 1;
	}
	return result;
}

// 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)
movb $0x0, -0x11(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rsi
callq 0x66a0
movq -0x28(%rbp), %rcx
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
subq 0x18(%rcx), %rax
cmpq $0x0, %rax
jle 0x6670
movq -0x28(%rbp), %rax
movb $0x1, -0x11(%rbp)
movq -0x20(%rbp), %rcx
movq %rcx, 0x18(%rax)
jmp 0x668e
movq -0x28(%rbp), %rcx
movq -0x20(%rbp), %rax
cmpq 0x18(%rcx), %rax
jge 0x668c
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
jmp 0x668e
movb -0x11(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: dudulu233[P]EMA-Tool/cache_stat.cpp
// Function: StatCache::get_reuse_curve(long, long)
double StatCache::get_reuse_curve(long time_span, long timestamp)
{
	/*
	get reuse distance
	y = a*log(x) + b
	reusedistance = total_block_cnt * (1 - re_access_ratio)
	*/
	double result = 0;
	if (time_span <= 1 || (get_time_day(timestamp) - get_time_day(start_time) < 2))
	{
		result = 0;
	}
	else
	{
		SeqNum* sn_tmp = seq_map[get_time_day(timestamp) - 2];
		if (time_span <= 72000)
		{
			result = sn_tmp->a[0] * log(time_span) + sn_tmp->b[0];
		}
		else
		{
			result = sn_tmp->a[1] * log(time_span) + sn_tmp->b[1];
		}
	}

	return result < 0.99 ? result : 0.99;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x20(%rbp)
cmpq $0x1, -0x10(%rbp)
jle 0x6719
movq -0x38(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x6490
movq -0x38(%rbp), %rdi
movq %rax, -0x40(%rbp)
movq 0x28(%rdi), %rsi
callq 0x6490
movq %rax, %rcx
movq -0x40(%rbp), %rax
subq %rcx, %rax
cmpq $0x2, %rax
jge 0x6726
xorps %xmm0, %xmm0
movsd %xmm0, -0x20(%rbp)
jmp 0x67e0
movq -0x38(%rbp), %rdi
movq %rdi, %rax
addq $0x2068, %rax           # imm = 0x2068
movq %rax, -0x48(%rbp)
movq -0x18(%rbp), %rsi
callq 0x6490
movq -0x48(%rbp), %rdi
subq $0x2, %rax
movq %rax, -0x30(%rbp)
leaq -0x30(%rbp), %rsi
callq 0x6b20
movq (%rax), %rax
movq %rax, -0x28(%rbp)
cmpq $0x11940, -0x10(%rbp)   # imm = 0x11940
jg 0x67a2
movq -0x28(%rbp), %rax
movq (%rax), %rax
movsd (%rax), %xmm0
movsd %xmm0, -0x50(%rbp)
movq -0x10(%rbp), %rdi
callq 0x6c60
movaps %xmm0, %xmm2
movsd -0x50(%rbp), %xmm0
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movsd (%rax), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x20(%rbp)
jmp 0x67de
movq -0x28(%rbp), %rax
movq (%rax), %rax
movsd 0x8(%rax), %xmm0
movsd %xmm0, -0x58(%rbp)
movq -0x10(%rbp), %rdi
callq 0x6c60
movaps %xmm0, %xmm2
movsd -0x58(%rbp), %xmm0
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movsd 0x8(%rax), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x20(%rbp)
jmp 0x67e0
movsd 0x5b98(%rip), %xmm0     # 0xc380
ucomisd -0x20(%rbp), %xmm0
jbe 0x67fb
movsd -0x20(%rbp), %xmm0
movsd %xmm0, -0x60(%rbp)
jmp 0x680a
movsd 0x5b7d(%rip), %xmm0     # 0xc380
movsd %xmm0, -0x60(%rbp)
jmp 0x680a
movsd -0x60(%rbp), %xmm0
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: dudulu233[P]EMA-Tool/cache_stat.cpp
// Function: StatCache::output_reuse_distance()
void StatCache::output_reuse_distance()
{
	string filename = "./result/reuse_dis.txt";
	FILE* fp = fopen(filename.c_str(), "w");
	assert(NULL != fp);
	for (int i = 0; i < 1024; i++) {
		fprintf(fp, "%ld,", reuse_dis_array[i]);
	}
	fclose(fp);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x60(%rbp)
leaq -0x29(%rbp), %rdi
movq %rdi, -0x58(%rbp)
callq 0x3470
movq -0x58(%rbp), %rdx
leaq 0x5c24(%rip), %rsi      # 0xc470
leaq -0x28(%rbp), %rdi
callq 0x3390
jmp 0x6857
leaq -0x29(%rbp), %rdi
callq 0x32e0
leaq -0x28(%rbp), %rdi
callq 0x3130
movq %rax, %rdi
leaq 0x5ba9(%rip), %rsi      # 0xc41c
callq 0x3300
movq %rax, -0x68(%rbp)
jmp 0x687e
movq -0x68(%rbp), %rax
movq %rax, -0x48(%rbp)
xorl %eax, %eax
cmpq -0x48(%rbp), %rax
je 0x6890
jmp 0x68dd
leaq 0x5955(%rip), %rdi      # 0xc1ec
leaq 0x5b01(%rip), %rsi      # 0xc39f
movl $0x97, %edx
leaq 0x5bdd(%rip), %rcx      # 0xc487
callq 0x31c0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x29(%rbp), %rdi
callq 0x32e0
jmp 0x6931
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x31b0
jmp 0x6931
movl $0x0, -0x4c(%rbp)
cmpl $0x400, -0x4c(%rbp)     # imm = 0x400
jge 0x6917
movq -0x60(%rbp), %rax
movq -0x48(%rbp), %rdi
movslq -0x4c(%rbp), %rcx
movq 0x30(%rax,%rcx,8), %rdx
leaq 0x5baa(%rip), %rsi      # 0xc4af
movb $0x0, %al
callq 0x33b0
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x68e4
movq -0x48(%rbp), %rdi
callq 0x32b0
jmp 0x6922
leaq -0x28(%rbp), %rdi
callq 0x31b0
addq $0x70, %rsp
popq %rbp
retq
movq -0x38(%rbp), %rdi
callq 0x3460
nopw (%rax,%rax)
// File: dudulu233[P]EMA-Tool/time_analysis_tool.cpp
// Function: TimeAnalysis::add_time(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void TimeAnalysis::add_time(string key)
{
	if (!TIME_ON)
	{
		return;
	}
	auto it = time_map.find(key);
	if (it == time_map.end())
	{
		struct time_struct* ts = (struct time_struct*)
			malloc(sizeof(struct time_struct));
		ts->cnt = 1;
		ts->latency = end_tv.tv_sec * 1000 + end_tv.tv_usec * 1.0 / 1000 -
			start_tv.tv_sec * 1000 - start_tv.tv_usec * 1.0 / 1000;
		time_map[key] = ts;

	}
	else
	{
		struct time_struct* ts = it->second;
		ts->cnt++;
		ts->latency += end_tv.tv_sec * 1000 + end_tv.tv_usec * 1.0 / 1000 -
			start_tv.tv_sec * 1000 - start_tv.tv_usec * 1.0 / 1000;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rsi, -0x40(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x38(%rbp)
addq $0x20, %rdi
callq 0xa540
movq -0x38(%rbp), %rdi
movq %rax, -0x18(%rbp)
addq $0x20, %rdi
callq 0xa5a0
movq %rax, -0x20(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0xa570
testb $0x1, %al
jne 0xa0f0
jmp 0xa198
movl $0x10, %edi
callq 0x3380
movq -0x38(%rbp), %rdi
movq -0x40(%rbp), %rsi
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq $0x1, (%rax)
imulq $0x3e8, 0x10(%rdi), %rax # imm = 0x3E8
cvtsi2sd %rax, %xmm0
cvtsi2sdq 0x18(%rdi), %xmm1
movsd 0x224c(%rip), %xmm2     # 0xc378
mulsd %xmm2, %xmm1
movsd 0x2380(%rip), %xmm2     # 0xc4b8
divsd %xmm2, %xmm1
addsd %xmm1, %xmm0
imulq $0x3e8, (%rdi), %rax    # imm = 0x3E8
cvtsi2sd %rax, %xmm1
subsd %xmm1, %xmm0
cvtsi2sdq 0x8(%rdi), %xmm1
movsd 0x221a(%rip), %xmm2     # 0xc378
mulsd %xmm2, %xmm1
movsd 0x234e(%rip), %xmm2     # 0xc4b8
divsd %xmm2, %xmm1
subsd %xmm1, %xmm0
movq -0x28(%rbp), %rax
movsd %xmm0, 0x8(%rax)
movq -0x28(%rbp), %rax
movq %rax, -0x48(%rbp)
addq $0x20, %rdi
callq 0xa5d0
movq -0x48(%rbp), %rcx
movq %rcx, (%rax)
jmp 0xa22d
leaq -0x18(%rbp), %rdi
callq 0xa600
movq %rax, %rcx
movq -0x38(%rbp), %rax
movq 0x20(%rcx), %rcx
movq %rcx, -0x30(%rbp)
movq -0x30(%rbp), %rcx
movq (%rcx), %rdx
addq $0x1, %rdx
movq %rdx, (%rcx)
imulq $0x3e8, 0x10(%rax), %rcx # imm = 0x3E8
cvtsi2sd %rcx, %xmm0
cvtsi2sdq 0x18(%rax), %xmm1
movsd 0x219f(%rip), %xmm2     # 0xc378
mulsd %xmm2, %xmm1
movsd 0x22d3(%rip), %xmm2     # 0xc4b8
divsd %xmm2, %xmm1
addsd %xmm1, %xmm0
imulq $0x3e8, (%rax), %rcx    # imm = 0x3E8
cvtsi2sd %rcx, %xmm1
subsd %xmm1, %xmm0
cvtsi2sdq 0x8(%rax), %xmm1
movsd 0x216d(%rip), %xmm2     # 0xc378
mulsd %xmm2, %xmm1
movsd 0x22a1(%rip), %xmm2     # 0xc4b8
divsd %xmm2, %xmm1
subsd %xmm1, %xmm0
movq -0x30(%rbp), %rax
addsd 0x8(%rax), %xmm0
movsd %xmm0, 0x8(%rax)
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: dudulu233[P]EMA-Tool/time_analysis_tool.cpp
// Function: TimeAnalysis::get_latency(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
double TimeAnalysis::get_latency(string key)
{
	auto it = time_map.find(key);
	if (it == time_map.end())
	{
		return 0;
	}
	else
	{
		struct time_struct* ts = it->second;
		return ts->latency / ts->cnt;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x38(%rbp)
addq $0x20, %rdi
callq 0xa540
movq -0x38(%rbp), %rdi
movq %rax, -0x20(%rbp)
addq $0x20, %rdi
callq 0xa5a0
movq %rax, -0x28(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0xa570
testb $0x1, %al
jne 0xa289
jmp 0xa293
xorps %xmm0, %xmm0
movsd %xmm0, -0x8(%rbp)
jmp 0xa2dc
leaq -0x20(%rbp), %rdi
callq 0xa600
movq 0x20(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movsd 0x8(%rax), %xmm0
movq (%rax), %xmm1
movaps 0x1d68(%rip), %xmm2     # 0xc020
punpckldq %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
movapd 0x1d6c(%rip), %xmm2     # 0xc030
subpd %xmm2, %xmm1
movaps %xmm1, %xmm2
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
addsd %xmm2, %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x8(%rbp)
movsd -0x8(%rbp), %xmm0
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: dudulu233[P]EMA-Tool/time_analysis_tool.cpp
// Function: TimeAnalysis::print_all_latency()
void TimeAnalysis::print_all_latency()
{
	char shell_str[256];
	strcpy(shell_str, "mkdir -p ./result");
	int ret = system(shell_str);
	assert(0 == ret);

	FILE* fp = fopen("./result/time_analysis.log", "w");
	double total_time = 0;
	for (auto it = time_map.begin();
		it != time_map.end();
		++it)
	{
		struct time_struct* ts = it->second;
		fprintf(fp, "%s : %.6f ms \t\t\t total_time : %.6f ms ( cnt : % llu )\n",
			(it->first).c_str(), ts->latency / ts->cnt,
			ts->latency, ts->cnt);
		total_time += ts->latency;
	}
	fprintf(fp, "---------------------------------------------\n");
	fprintf(fp, "total time-consuming : %.6f minutes\n", total_time / 1000 / 60);
	fclose(fp);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x160, %rsp            # imm = 0x160
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x148(%rbp)
leaq -0x110(%rbp), %rdi
leaq 0x21b0(%rip), %rsi      # 0xc4c8
callq 0x3280
leaq -0x110(%rbp), %rdi
callq 0x3240
movl %eax, -0x114(%rbp)
xorl %eax, %eax
cmpl -0x114(%rbp), %eax
jne 0xa33b
jmp 0xa35a
leaq 0x2054(%rip), %rdi      # 0xc396
leaq 0x2191(%rip), %rsi      # 0xc4da
movl $0x47, %edx
leaq 0x219c(%rip), %rcx      # 0xc4f1
callq 0x31c0
leaq 0x21b7(%rip), %rdi      # 0xc518
leaq 0x20b4(%rip), %rsi      # 0xc41c
callq 0x3300
movq -0x148(%rbp), %rdi
movq %rax, -0x120(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x128(%rbp)
addq $0x20, %rdi
callq 0xa630
movq %rax, -0x130(%rbp)
movq -0x148(%rbp), %rdi
addq $0x20, %rdi
callq 0xa5a0
movq %rax, -0x138(%rbp)
leaq -0x130(%rbp), %rdi
leaq -0x138(%rbp), %rsi
callq 0xa660
testb $0x1, %al
jne 0xa3c9
jmp 0xa49a
leaq -0x130(%rbp), %rdi
movq %rdi, -0x158(%rbp)
callq 0xa600
movq -0x158(%rbp), %rdi
movq 0x20(%rax), %rax
movq %rax, -0x140(%rbp)
movq -0x120(%rbp), %rax
movq %rax, -0x150(%rbp)
callq 0xa600
movq %rax, %rdi
callq 0x3130
movq -0x150(%rbp), %rdi
movq %rax, %rdx
movq -0x140(%rbp), %rax
movsd 0x8(%rax), %xmm0
movq (%rax), %xmm1
movaps 0x1bf6(%rip), %xmm2     # 0xc020
punpckldq %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
movapd 0x1bfa(%rip), %xmm2     # 0xc030
subpd %xmm2, %xmm1
movaps %xmm1, %xmm2
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
addsd %xmm2, %xmm1
divsd %xmm1, %xmm0
movq -0x140(%rbp), %rax
movsd 0x8(%rax), %xmm1
movq -0x140(%rbp), %rax
movq (%rax), %rcx
leaq 0x20cd(%rip), %rsi      # 0xc533
movb $0x2, %al
callq 0x33b0
movq -0x140(%rbp), %rax
movsd 0x8(%rax), %xmm0
addsd -0x128(%rbp), %xmm0
movsd %xmm0, -0x128(%rbp)
leaq -0x130(%rbp), %rdi
callq 0xa690
jmp 0xa396
movq -0x120(%rbp), %rdi
leaq 0x20c2(%rip), %rsi      # 0xc56a
movb $0x0, %al
callq 0x33b0
movq -0x120(%rbp), %rdi
movsd -0x128(%rbp), %xmm0
movsd 0x1ff2(%rip), %xmm1     # 0xc4b8
divsd %xmm1, %xmm0
movsd 0x1fee(%rip), %xmm1     # 0xc4c0
divsd %xmm1, %xmm0
leaq 0x20bc(%rip), %rsi      # 0xc599
movb $0x1, %al
callq 0x33b0
movq -0x120(%rbp), %rdi
callq 0x32b0
addq $0x160, %rsp            # imm = 0x160
popq %rbp
retq
nopl (%rax)