LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/kaityo256[P]minlex/minlex.cpp
// Function: input(char const*)
void input(const char *filename) {
  std::string line;
  MinlexSearcher s;
  std::ifstream ifs(filename);
  while (getline(ifs, line)) {
    Sudoku g(line.c_str());
    std::cout << s.search(g) << std::endl;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x528, %rsp            # imm = 0x528
leaq 0x18(%rsp), %rax
movq %rdi, %rbx
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x340(%rsp), %rdi
callq 0x2762
leaq 0x48(%rsp), %rdi
pushq $0x8
popq %rdx
movq %rbx, %rsi
callq 0x21f0
movq 0x59b0(%rip), %rbp      # 0x7fd8
leaq 0x48(%rsp), %rbx
leaq 0x8(%rsp), %r14
leaq 0x250(%rsp), %r15
leaq 0x28(%rsp), %r12
leaq 0x340(%rsp), %r13
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2030
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x2698
movq 0x8(%rsp), %rsi
movq %r15, %rdi
callq 0x2738
movq %r12, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x27b2
movq %rbp, %rdi
movq %r12, %rsi
callq 0x2120
movq %rax, %rdi
callq 0x20b0
movq %r12, %rdi
callq 0x20a0
jmp 0x2647
leaq 0x48(%rsp), %rdi
callq 0x2040
leaq 0x8(%rsp), %rdi
callq 0x20a0
addq $0x528, %rsp            # imm = 0x528
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x26c0
movq %rax, %rbx
jmp 0x26e5
jmp 0x26c9
jmp 0x26c9
movq %rax, %rbx
jmp 0x26db
leaq 0x28(%rsp), %rdi
movq %rax, %rbx
callq 0x20a0
leaq 0x48(%rsp), %rdi
callq 0x2040
leaq 0x8(%rsp), %rdi
callq 0x20a0
movq %rbx, %rdi
callq 0x21e0
// File: /workspace/github_cpp_makefile_star2_O2/kaityo256[P]minlex/minlex.cpp
// Function: main
int main(int argc, char **argv) {
  init_bits();
  if (argc > 1) {
    input(argv[1]);
  } else {
    std::cout << "Usage: ./minlex inputfile" << std::endl;
  }
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl %edi, %ebp
callq 0x2437
cmpl $0x2, %ebp
jl 0x2714
movq 0x8(%rbx), %rdi
callq 0x25df
jmp 0x272f
movq 0x58bd(%rip), %rdi      # 0x7fd8
leaq 0x298c(%rip), %rsi      # 0x50ae
callq 0x2140
movq %rax, %rdi
callq 0x20b0
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/kaityo256[P]minlex/minlex.cpp
// Function: Sudoku::Sudoku(char const*)
Sudoku(const char *str) {
    for (int i = 0; i < 81; i++) {
      data[i] = str[i] - '0';
      if (str[i] == '.') {
        data[i] = 0;
      }
    }
    array2bit();
  }

// Assembly:
xorl %eax, %eax
xorl %ecx, %ecx
cmpq $0x51, %rcx
je 0x29e8
movb (%rsi,%rcx), %dl
addb $-0x30, %dl
movb %dl, (%rdi,%rcx)
movzbl %dl, %edx
cmpb $0x2e, (%rsi,%rcx)
cmovel %eax, %edx
movb %dl, (%rdi,%rcx)
incq %rcx
jmp 0x273c
nop
// File: /workspace/github_cpp_makefile_star2_O2/kaityo256[P]minlex/minlex.cpp
// Function: Sudoku::show()
void show(void) {
    bit2array();
    for (int i = 0; i < 81; i++) {
      printf("%c", data[i] + '0');
    }
    printf("\n");
  }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x2a70
xorl %r14d, %r14d
cmpq $0x51, %r14
je 0x27a3
movzbl (%rbx,%r14), %edi
addl $0x30, %edi
callq 0x2160
incq %r14
jmp 0x278b
pushq $0xa
popq %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2160
// File: /workspace/github_cpp_makefile_star2_O2/kaityo256[P]minlex/minlex.cpp
// Function: MinlexSearcher::search[abi:cxx11](Sudoku&)
std::string search(Sudoku &g) {
    min = max;
    std::vector<Sudoku> v;
    std::vector<int> vi;
    for (auto a : perm3) {
      Sudoku g2 = g.perm_rbox(a);
      v.push_back(g2);
      vi.push_back(g2.headbox_index(true));
    }
    Sudoku gt = g.transpose();
    for (auto a : perm3) {
      Sudoku g2 = gt.perm_rbox(a);
      v.push_back(g2);
      vi.push_back(g2.headbox_index(true));
    }
    int hb_min = *std::min_element(vi.begin(), vi.end());
    for (size_t i = 0; i < v.size(); i++) {
      if (vi[i] > hb_min) continue;
      perm_cbox(v[i], hb_min);
    }
    return min.str();
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x248, %rsp            # imm = 0x248
vmovups 0xf0(%rsi), %zmm0
vmovups 0x130(%rsi), %zmm1
vmovups 0x170(%rsi), %zmm2
vmovups 0x1a0(%rsi), %zmm3
leaq 0x30(%rsp), %rax
leaq 0x10(%rsp), %rcx
leaq 0x5944(%rip), %r12      # 0x8140
leaq 0x150(%rsp), %rbp
movq %rdx, %r15
movq %rdi, 0x50(%rsp)
movq %rsi, 0x58(%rsp)
xorl %r13d, %r13d
vmovups %zmm3, 0xb0(%rsi)
vmovups %zmm0, (%rsi)
vmovups %zmm2, 0x80(%rsi)
vmovups %zmm1, 0x40(%rsi)
andq $0x0, 0x10(%rax)
andq $0x0, 0x10(%rcx)
vxorps %xmm0, %xmm0, %xmm0
vmovaps %xmm0, (%rax)
vmovaps %xmm0, (%rcx)
pushq $0x1
popq %rbx
leaq 0x60(%rsp), %r14
cmpq $0x48, %r13
je 0x2896
leaq (%r12,%r13), %rdx
movq %rbp, %rdi
movq %r15, %rsi
vzeroupper
callq 0x2af6
leaq 0x30(%rsp), %rdi
movq %rbp, %rsi
callq 0x2bf4
movq %rbp, %rdi
movl %ebx, %esi
callq 0x2c24
movl %eax, 0x60(%rsp)
leaq 0x10(%rsp), %rdi
movq %r14, %rsi
callq 0x30ca
addq $0xc, %r13
jmp 0x2850
leaq 0x150(%rsp), %rdi
movq %r15, %rsi
vzeroupper
callq 0x2d7a
leaq 0x60(%rsp), %r15
xorl %r13d, %r13d
pushq $0x1
popq %rbp
leaq 0x10(%rsp), %rbx
leaq 0xc(%rsp), %r14
cmpq $0x48, %r13
je 0x2904
leaq (%r12,%r13), %rdx
leaq 0x150(%rsp), %rsi
movq %r15, %rdi
callq 0x2af6
leaq 0x30(%rsp), %rdi
movq %r15, %rsi
callq 0x2bf4
movq %r15, %rdi
movl %ebp, %esi
callq 0x2c24
movl %eax, 0xc(%rsp)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x30ca
addq $0xc, %r13
jmp 0x28be
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x370f
movl (%rax), %ebx
movq 0x58(%rsp), %r13
movl $0xf0, %r15d
xorl %r14d, %r14d
xorl %r12d, %r12d
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rax
subq %rsi, %rax
cqto
idivq %r15
cmpq %rax, %r12
jae 0x2961
movq 0x10(%rsp), %rax
cmpl %ebx, (%rax,%r12,4)
jg 0x2955
addq %r14, %rsi
movq %r13, %rdi
movl %ebx, %edx
callq 0x2dd8
incq %r12
addq $0xf0, %r14
jmp 0x2926
movq 0x50(%rsp), %rbx
movq %r13, %rsi
movq %rbx, %rdi
callq 0x2e48
leaq 0x10(%rsp), %rdi
callq 0x32a8
leaq 0x30(%rsp), %rdi
callq 0x4420
movq %rbx, %rax
addq $0x248, %rsp            # imm = 0x248
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x29a6
jmp 0x29a6
jmp 0x29a6
jmp 0x29a6
jmp 0x29a6
jmp 0x29a6
leaq 0x10(%rsp), %rdi
movq %rax, %rbx
callq 0x32a8
leaq 0x30(%rsp), %rdi
callq 0x4420
movq %rbx, %rdi
callq 0x21e0
// File: /workspace/github_cpp_makefile_star2_O2/kaityo256[P]minlex/minlex.cpp
// Function: Sudoku::array2bit()
void array2bit(void) {
    for (int i = 0; i < 9; i++) {
      bdata[i] = 0;
    }
    for (int i = 0; i < 81; i++) {
      if (data[i] != 0) {
        bdata[data[i] - 1] |= mbit(1) << (80 - i);
      }
    }
  }

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
leaq 0x60(%rdi), %r15
movq %rdi, %rbx
pushq $0x60
popq %rax
vxorps %xmm0, %xmm0, %xmm0
cmpq $0xf0, %rax
je 0x2a12
vmovaps %xmm0, (%rbx,%rax)
addq $0x10, %rax
jmp 0x29ff
pushq $0x50
popq %r12
pushq $0x1
popq %r14
cmpq $-0x1, %r12
je 0x2a4f
movzbl (%rbx), %r13d
testq %r13, %r13
je 0x2a47
movzbl %r12b, %edx
movq %r14, %rdi
xorl %esi, %esi
callq 0x21a0
decl %r13d
shlq $0x4, %r13
orq %rax, (%r15,%r13)
orq %rdx, 0x8(%r15,%r13)
decq %r12
incq %rbx
jmp 0x2a1a
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/kaityo256[P]minlex/minlex.cpp
// Function: Sudoku::bit2array()
void bit2array(void) {
    std::fill(&data[0], &data[81], 0);
    for (int i = 0; i < 81; i++) {
      for (int j = 0; j < 9; j++) {
        if (bdata[j] & (mbit(1) << i)) {
          data[80 - i] = j + 1;
          continue;
        }
      }
    }
  }

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
xorl %eax, %eax
cmpq $0x51, %rax
je 0x2a8d
movb $0x0, (%rbx,%rax)
incq %rax
jmp 0x2a7e
xorl %r15d, %r15d
pushq $0x1
popq %r14
pushq $0x50
popq %r12
pushq $0x60
popq %r13
cmpq $0x51, %r15
je 0x2aeb
movzbl %r15b, %edx
movq %r14, %rdi
xorl %esi, %esi
callq 0x21a0
movq %r12, %rcx
subq %r15, %rcx
movb $0x1, %sil
movq %r13, %rdi
cmpq $0xf0, %rdi
je 0x2ae6
movq (%rbx,%rdi), %r8
movq 0x8(%rbx,%rdi), %r9
andq %rax, %r8
andq %rdx, %r9
orq %r8, %r9
je 0x2add
movb %sil, (%rbx,%rcx)
incb %sil
addq $0x10, %rdi
jmp 0x2abc
incq %r15
jmp 0x2a9c
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/kaityo256[P]minlex/minlex.cpp
// Function: Sudoku::perm_rbox(int*)
Sudoku perm_rbox(int a[3]) {
    mbit bdata2[9];
    mbit v[3];
    mbit t0 = (mbit(1) << 27) - 1;
    mbit t1 = t0 << 27;
    mbit t2 = t0 << 54;
    for (int i = 0; i < 9; i++) {
      v[0] = bdata[i] & t0;
      v[1] = (bdata[i] & t1) >> 27;
      v[2] = (bdata[i] & t2) >> 54;
      bdata2[i] = v[2 - a[2]];
      bdata2[i] |= v[2 - a[1]] << 27;
      bdata2[i] |= v[2 - a[0]] << 54;
    }
    return Sudoku(bdata2);
  }

// Assembly:
pushq %r14
pushq %rbx
subq $0xc8, %rsp
movslq 0x8(%rdx), %rax
movq %rdi, %rbx
pushq $0x2
popq %rdi
movslq 0x4(%rdx), %r9
movslq (%rdx), %rdx
movq %rdi, %rcx
movq %rdi, %r8
subq %rax, %rcx
shlq $0x4, %rcx
leaq (%rsp,%rcx), %rax
subq %r9, %r8
subq %rdx, %rdi
shlq $0x4, %r8
shlq $0x4, %rdi
leaq (%rsp,%r8), %rcx
leaq (%rsp,%rdi), %rdx
movl $0x1b1b, %r8d           # imm = 0x1B1B
xorl %edi, %edi
cmpq $0x90, %rdi
je 0x2bd8
movl 0x68(%rsi,%rdi), %r9d
movq 0x60(%rsi,%rdi), %r10
andq $0x0, 0x8(%rsp)
movl %r10d, %r11d
bextrq %r8, %r10, %r14
shll $0xa, %r9d
shrq $0x36, %r10
andl $0x7ffffff, %r11d       # imm = 0x7FFFFFF
orl %r9d, %r10d
movq %r11, (%rsp)
movq %r14, 0x10(%rsp)
andq $0x0, 0x18(%rsp)
andq $0x0, 0x28(%rsp)
andl $0x7ffffff, %r10d       # imm = 0x7FFFFFF
movq %r10, 0x20(%rsp)
movq 0x8(%rcx), %r9
movq (%rcx), %r10
movq 0x8(%rdx), %r11
movq (%rdx), %r14
shldq $0x1b, %r10, %r9
shlq $0x1b, %r10
orq (%rax), %r10
orq 0x8(%rax), %r9
shldq $0x36, %r14, %r11
shlq $0x36, %r14
orq %r9, %r11
orq %r10, %r14
movq %r14, 0x30(%rsp,%rdi)
movq %r11, 0x38(%rsp,%rdi)
addq $0x10, %rdi
jmp 0x2b40
leaq 0x30(%rsp), %rsi
movq %rbx, %rdi
callq 0x2ec8
movq %rbx, %rax
addq $0xc8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/kaityo256[P]minlex/minlex.cpp
// Function: Sudoku::headbox_index(bool)
int headbox_index(bool sort) {
    int min = 16 * 3 + 4 * 3 + 3;
    mbit v = 0;
    for (int i = 0; i < 9; i++) {
      v |= bdata[i];
    }
    for (int i = 0; i < 3; i++) {
      std::vector<int> a(3, 0);
      for (int j = 0; j < 3; j++) {
        for (int k = 0; k < 3; k++) {
          if (v & (mbit(1) << (80 - k - (j + i * 3) * 3))) a[j]++;
        }
      }
      if (sort) {
        std::sort(a.begin(), a.end());
      }
      int index = 0;
      for (int i = 0; i < 3; i++) {
        int t = ((1 << a[i]) - 1) << (2 - i) * 3;
        index += t;
      }
      if (index < min) {
        min = index;
      }
    }
    return min;
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %esi, 0x10(%rsp)
pushq $0x60
popq %rax
xorl %r12d, %r12d
xorl %r13d, %r13d
cmpq $0xf0, %rax
je 0x2c56
orq (%rdi,%rax), %r12
orq 0x8(%rdi,%rax), %r13
addq $0x10, %rax
jmp 0x2c3f
pushq $0x3f
popq %rbx
pushq $0x50
popq %rbp
leaq 0x18(%rsp), %r14
xorl %eax, %eax
cmpq $0x3, %rax
je 0x2d54
andl $0x0, 0x14(%rsp)
movq %rax, 0x30(%rsp)
movl %ebx, 0xc(%rsp)
movq %r14, %rdi
pushq $0x3
popq %rsi
leaq 0x14(%rsp), %rdx
leaq 0x7(%rsp), %rcx
callq 0x3224
movl %ebp, 0x8(%rsp)
xorl %r14d, %r14d
cmpq $0x3, %r14
je 0x2cd5
movq 0x18(%rsp), %r15
xorl %ebx, %ebx
cmpl $-0x3, %ebx
je 0x2ccd
leal (%rbp,%rbx), %eax
movzbl %al, %edx
pushq $0x1
popq %rdi
xorl %esi, %esi
callq 0x21a0
andq %r13, %rdx
andq %r12, %rax
orq %rdx, %rax
je 0x2cc9
incl (%r15,%r14,4)
decl %ebx
jmp 0x2ca4
incq %r14
addl $-0x3, %ebp
jmp 0x2c97
movq 0x18(%rsp), %rdi
cmpb $0x0, 0x10(%rsp)
je 0x2cff
movq 0x20(%rsp), %rsi
callq 0x3302
movl 0xc(%rsp), %ebx
movl 0x8(%rsp), %ebp
leaq 0x18(%rsp), %r14
movq 0x18(%rsp), %rdi
jmp 0x2d0c
movl 0xc(%rsp), %ebx
movl 0x8(%rsp), %ebp
leaq 0x18(%rsp), %r14
pushq $-0x1
popq %r8
xorl %eax, %eax
pushq $0x6
popq %rdx
xorl %ecx, %ecx
cmpq $0x3, %rax
je 0x2d37
movb (%rdi,%rax,4), %sil
incq %rax
shlxl %esi, %r8d, %esi
notl %esi
shlxl %edx, %esi, %esi
addl $-0x3, %edx
addl %esi, %ecx
jmp 0x2d17
cmpl %ebx, %ecx
movq %r14, %rdi
cmovll %ecx, %ebx
callq 0x32a8
movq 0x30(%rsp), %rax
addl $-0x9, %ebp
incq %rax
jmp 0x2c63
movl %ebx, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x18(%rsp), %rdi
movq %rax, %rbx
callq 0x32a8
movq %rbx, %rdi
callq 0x21e0
// File: /workspace/github_cpp_makefile_star2_O2/kaityo256[P]minlex/minlex.cpp
// Function: Sudoku::transpose()
Sudoku transpose(void) {
    bit2array();
    unsigned char data2[81];
    for (int i = 0; i < 9; i++) {
      for (int j = 0; j < 9; j++) {
        data2[j + i * 9] = data[i + j * 9];
      }
    }
    return Sudoku(data2);
  }

// Assembly:
pushq %r14
pushq %rbx
subq $0x58, %rsp
movq %rdi, %rbx
movq %rsi, %rdi
movq %rsi, %r14
callq 0x2a70
movq %rsp, %rax
xorl %ecx, %ecx
cmpq $0x9, %rcx
je 0x2dc1
movq %r14, %rdx
xorl %esi, %esi
cmpq $0x9, %rsi
je 0x2db5
movb (%rdx), %dil
addq $0x9, %rdx
movb %dil, (%rax,%rsi)
incq %rsi
jmp 0x2d9f
incq %rcx
incq %r14
addq $0x9, %rax
jmp 0x2d94
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x36f8
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/kaityo256[P]minlex/minlex.cpp
// Function: MinlexSearcher::perm_cbox(Sudoku&, int)
void perm_cbox(Sudoku &g, int hb_min) {
    for (auto a : perm3) {
      Sudoku g2 = g.perm_cbox(a);
      if (g2.headbox_index(false) > hb_min) continue;
      perm_toprbox(g2, hb_min);
    }
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
leaq 0x5350(%rip), %rbp      # 0x8140
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
xorl %r13d, %r13d
movq %rsp, %r12
cmpq $0x48, %r13
je 0x2e35
leaq (%rbp,%r13), %rdx
movq %r12, %rdi
movq %r14, %rsi
callq 0x3736
movq %r12, %rdi
xorl %esi, %esi
callq 0x2c24
cmpl %ebx, %eax
jg 0x2e2f
movq %r15, %rdi
movq %r12, %rsi
movl %ebx, %edx
callq 0x3838
addq $0xc, %r13
jmp 0x2dfe
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/kaityo256[P]minlex/minlex.cpp
// Function: Sudoku::str[abi:cxx11]()
std::string str(void) {
    bit2array();
    std::stringstream ss;
    for (int i = 0; i < 81; i++) {
      ss << (int)(data[i]);
    }
    return ss.str();
  }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x188, %rsp            # imm = 0x188
movq %rdi, %rbx
movq %rsi, %rdi
movq %rsi, %r14
callq 0x2a70
movq %rsp, %rdi
callq 0x20d0
leaq 0x10(%rsp), %r15
xorl %r12d, %r12d
cmpq $0x51, %r12
je 0x2e8c
movzbl (%r14,%r12), %esi
movq %r15, %rdi
callq 0x21d0
incq %r12
jmp 0x2e74
leaq 0x18(%rsp), %rsi
movq %rbx, %rdi
callq 0x2190
movq %rsp, %rdi
callq 0x20e0
movq %rbx, %rax
addq $0x188, %rsp            # imm = 0x188
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x2eb5
movq %rsp, %rdi
movq %rax, %rbx
callq 0x20e0
movq %rbx, %rdi
callq 0x21e0
// File: /workspace/github_cpp_makefile_star2_O2/kaityo256[P]minlex/minlex.cpp
// Function: Sudoku::perm_cbox(int*)
Sudoku perm_cbox(int a[3]) {
    mbit bdata2[9];
    mbit t2 = 0;
    for (int i = 0; i < 9; i++) {
      t2 |= (mbit(7) << (i * 9));
    }
    mbit t1 = t2 << 3;
    mbit t0 = t2 << 6;
    mbit v[3];
    for (int i = 0; i < 9; i++) {
      v[0] = (bdata[i] & t0) >> 6;
      v[1] = (bdata[i] & t1) >> 3;
      v[2] = (bdata[i] & t2);
      bdata2[i] = v[a[0]] << 6;
      bdata2[i] |= v[a[1]] << 3;
      bdata2[i] |= v[a[2]];
    }
    return Sudoku(bdata2);
  }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xc0, %rsp
movslq 0x4(%rdx), %r8
movq %rdi, %rbx
movslq (%rdx), %rdi
movslq 0x8(%rdx), %rdx
movl $0x703, %eax            # imm = 0x703
movabsq $-0x7e3f1f8fc7e3f1f9, %rcx # imm = 0x81C0E070381C0E07
xorl %r9d, %r9d
shlq $0x4, %rdi
shlq $0x4, %r8
shlq $0x4, %rdx
addq %rsp, %rdi
addq %rsp, %r8
addq %rsp, %rdx
cmpq $0x90, %r9
je 0x381b
movq 0x68(%rsi,%r9), %r10
movq 0x60(%rsi,%r9), %r11
movq %r10, %r14
shldq $0x3a, %r11, %r14
movl %r10d, %r15d
shrl $0x6, %r15d
andl %eax, %r15d
andq %rcx, %r14
movq %r15, 0x8(%rsp)
movl %r10d, %r15d
shrl $0x3, %r15d
movq %r14, (%rsp)
movq %r10, %r14
shldq $0x3d, %r11, %r14
andl %eax, %r15d
andl %eax, %r10d
andq %rcx, %r11
movq %r15, 0x18(%rsp)
andq %rcx, %r14
movq %r14, 0x10(%rsp)
movq %r11, 0x20(%rsp)
movq %r10, 0x28(%rsp)
movq (%rdi), %r10
movq 0x8(%rdi), %r11
movq (%r8), %r14
movq 0x8(%r8), %r15
shldq $0x6, %r10, %r11
shldq $0x3, %r14, %r15
shlq $0x6, %r10
shlq $0x3, %r14
orq %r10, %r14
orq (%rdx), %r14
orq %r11, %r15
orq 0x8(%rdx), %r15
movq %r14, 0x30(%rsp,%r9)
movq %r15, 0x38(%rsp,%r9)
addq $0x10, %r9
jmp 0x3777
leaq 0x30(%rsp), %rsi
movq %rbx, %rdi
callq 0x2ec8
movq %rbx, %rax
addq $0xc0, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/kaityo256[P]minlex/minlex.cpp
// Function: MinlexSearcher::perm_toprbox(Sudoku&, int)
void perm_toprbox(Sudoku &g, int hb_min) {
    for (auto a : perm3) {
      Sudoku g2 = g.perm_toprbox(a);
      if (g2.headline_index() > hb_min) continue;
      perm_columns(g2);
    }
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
leaq 0x48f0(%rip), %rbp      # 0x8140
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
xorl %r13d, %r13d
movq %rsp, %r12
cmpq $0x48, %r13
je 0x3891
leaq (%rbp,%r13), %rdx
movq %r12, %rdi
movq %r14, %rsi
callq 0x38a4
movq %r12, %rdi
callq 0x3998
cmpl %ebx, %eax
jg 0x388b
movq %r15, %rdi
movq %r12, %rsi
callq 0x3a92
addq $0xc, %r13
jmp 0x385e
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/kaityo256[P]minlex/minlex.cpp
// Function: Sudoku::perm_toprbox(int*)
Sudoku perm_toprbox(int a[3]) {
    mbit bdata2[9];
    mbit mask = ((mbit(1) << 54) - 1);
    mbit t0 = ((mbit(1) << 9) - 1) << 72;
    mbit t1 = ((mbit(1) << 9) - 1) << 63;
    mbit t2 = ((mbit(1) << 9) - 1) << 54;
    mbit v[3];
    for (int i = 0; i < 9; i++) {
      v[0] = (bdata[i] & t0) >> 18;
      v[1] = (bdata[i] & t1) >> 9;
      v[2] = (bdata[i] & t2) >> 0;
      bdata2[i] = bdata[i] & mask;
      bdata2[i] |= v[a[0]] << 18;
      bdata2[i] |= v[a[1]] << 9;
      bdata2[i] |= v[a[2]] << 0;
    }
    return Sudoku(bdata2);
  }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xc0, %rsp
movslq (%rdx), %rax
movslq 0x4(%rdx), %rcx
movslq 0x8(%rdx), %rdx
movabsq $0x7fc0000000000000, %r8 # imm = 0x7FC0000000000000
movb $0x36, %r9b
movq %rdi, %rbx
xorl %edi, %edi
shlq $0x4, %rax
shlq $0x4, %rcx
shlq $0x4, %rdx
addq %rsp, %rax
addq %rsp, %rcx
addq %rsp, %rdx
cmpq $0x90, %rdi
je 0x397a
movq 0x60(%rsi,%rdi), %r10
movq 0x68(%rsi,%rdi), %r11
andq $0x0, 0x8(%rsp)
movl %r11d, %r14d
shldq $0x37, %r10, %r11
andl $0x1ff00, %r14d         # imm = 0x1FF00
bzhiq %r9, %r10, %r15
andq %r8, %r10
shlq $0x2e, %r14
andq %r8, %r11
movq %r14, (%rsp)
andq $0x0, 0x18(%rsp)
movq %r11, 0x10(%rsp)
andq $0x0, 0x28(%rsp)
movq %r10, 0x20(%rsp)
movq 0x8(%rax), %r10
movq (%rax), %r14
movq 0x8(%rcx), %r11
shldq $0x12, %r14, %r10
shlq $0x12, %r14
orq %r15, %r14
movq (%rcx), %r15
shldq $0x9, %r15, %r11
shlq $0x9, %r15
orq %r14, %r15
orq (%rdx), %r15
orq %r10, %r11
orq 0x8(%rdx), %r11
movq %r15, 0x30(%rsp,%rdi)
movq %r11, 0x38(%rsp,%rdi)
addq $0x10, %rdi
jmp 0x38e2
leaq 0x30(%rsp), %rsi
movq %rbx, %rdi
callq 0x2ec8
movq %rbx, %rax
addq $0xc0, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/kaityo256[P]minlex/minlex.cpp
// Function: Sudoku::headline_index()
int headline_index(void) {
    mbit v = 0;
    for (int i = 0; i < 9; i++) {
      v |= bdata[i];
    }
    std::vector<int> a(3, 0);
    for (int j = 0; j < 3; j++) {
      for (int k = 0; k < 3; k++) {
        if (v & (mbit(1) << (80 - k - j * 3))) a[j]++;
      }
    }
    std::sort(a.begin(), a.end());
    int index = 0;
    for (int i = 0; i < 3; i++) {
      int t = ((1 << a[i]) - 1) << (2 - i) * 3;
      index += t;
    }
    return index;
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
pushq $0x60
popq %rax
xorl %r15d, %r15d
xorl %r12d, %r12d
cmpq $0xf0, %rax
je 0x39c6
orq (%rdi,%rax), %r15
orq 0x8(%rdi,%rax), %r12
addq $0x10, %rax
jmp 0x39af
leaq 0x24(%rsp), %rdx
leaq 0x8(%rsp), %rdi
andl $0x0, (%rdx)
pushq $0x3
popq %rsi
leaq 0x7(%rsp), %rcx
callq 0x3224
pushq $0x50
popq %r13
xorl %ebp, %ebp
movq 0x8(%rsp), %r14
cmpq $0x3, %rbp
je 0x3a26
xorl %ebx, %ebx
cmpl $-0x3, %ebx
je 0x3a1d
leal (%r13,%rbx), %eax
movzbl %al, %edx
pushq $0x1
popq %rdi
xorl %esi, %esi
callq 0x21a0
andq %r12, %rdx
andq %r15, %rax
orq %rdx, %rax
je 0x3a19
incl (%r14,%rbp,4)
decl %ebx
jmp 0x39f3
incq %rbp
addl $-0x3, %r13d
jmp 0x39e6
movq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0x3302
xorl %eax, %eax
pushq $0x6
popq %rcx
movq 0x8(%rsp), %rdx
pushq $-0x1
popq %rsi
xorl %ebx, %ebx
cmpq $0x3, %rax
je 0x3a62
movb (%rdx,%rax,4), %dil
incq %rax
shlxl %edi, %esi, %edi
notl %edi
shlxl %ecx, %edi, %edi
addl $-0x3, %ecx
addl %edi, %ebx
jmp 0x3a42
leaq 0x8(%rsp), %rdi
callq 0x32a8
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x8(%rsp), %rdi
movq %rax, %rbx
callq 0x32a8
movq %rbx, %rdi
callq 0x21e0
// File: /workspace/github_cpp_makefile_star2_O2/kaityo256[P]minlex/minlex.cpp
// Function: MinlexSearcher::perm_columns(Sudoku&)
void perm_columns(Sudoku &g) {
    int h1, h2, h3;
    g.headline_bits(h1, h2, h3);
    for (int k = 0; k < 6; k++) {
      if (!hlb_table[h3][k]) continue;
      int *ak = perm3[k];
      for (int j = 0; j < 6; j++) {
        if (!hlb_table[h2][j]) continue;
        int *aj = perm3[j];
        for (int i = 0; i < 6; i++) {
          if (!hlb_table[h1][i]) continue;
          int *ai = perm3[i];
          Sudoku g2 = g.perm_columns(ai, aj, ak).renumbering();
          if (min.head() < g2.head()) continue;
          perm_restrbox(g2);
        }
      }
    }
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x318, %rsp            # imm = 0x318
movq %rsi, %rax
leaq 0xc(%rsp), %rsi
leaq 0x8(%rsp), %rdx
leaq 0x4(%rsp), %rcx
movq %rdi, 0x18(%rsp)
movq %rax, %rdi
movq %rax, 0x28(%rsp)
callq 0x3c0c
leaq 0x4642(%rip), %r12      # 0x8110
leaq 0x220(%rsp), %r15
xorl %ecx, %ecx
cmpq $0x6, %rcx
je 0x3bf9
movslq 0x4(%rsp), %rax
imulq $0x6, %rax, %rax
addq %r12, %rax
cmpb $0x1, (%rcx,%rax)
jne 0x3bf1
imulq $0xc, %rcx, %rsi
leaq 0x463d(%rip), %rax      # 0x8140
movq %rcx, 0x20(%rsp)
addq %rax, %rsi
movq %rsi, 0x30(%rsp)
xorl %esi, %esi
cmpq $0x6, %rsi
je 0x3bf1
movslq 0x8(%rsp), %rax
movq %rsi, 0x10(%rsp)
imulq $0x6, %rax, %rax
addq %r12, %rax
cmpb $0x1, (%rsi,%rax)
jne 0x3bdf
imulq $0xc, 0x10(%rsp), %rax
leaq 0x45fc(%rip), %r13      # 0x8140
xorl %ebp, %ebp
addq %r13, %rax
movq %rax, 0x38(%rsp)
cmpq $0x6, %rbp
je 0x3bdf
movslq 0xc(%rsp), %rax
imulq $0x6, %rax, %rax
addq %rbp, %rax
cmpb $0x1, (%r12,%rax)
jne 0x3bd3
movq 0x28(%rsp), %rsi
movq 0x38(%rsp), %rcx
movq 0x30(%rsp), %r8
movq %r15, %rdi
movq %r13, %rdx
callq 0x3cf4
leaq 0x40(%rsp), %r14
movq %r15, %rsi
movq %r14, %rdi
callq 0x3f42
movq 0x18(%rsp), %rsi
movq %r15, %rdi
callq 0x3f8e
leaq 0x130(%rsp), %rbx
movq %r14, %rsi
movq %rbx, %rdi
callq 0x3f8e
movq %r15, %rdi
movq %rbx, %rsi
callq 0x3fe6
testb %al, %al
jne 0x3bd3
movq 0x18(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x409a
incq %rbp
addq $0xc, %r13
jmp 0x3b4e
movq 0x10(%rsp), %rsi
movq 0x20(%rsp), %rcx
incq %rsi
jmp 0x3b12
incq %rcx
jmp 0x3ad8
addq $0x318, %rsp            # imm = 0x318
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/kaityo256[P]minlex/minlex.cpp
// Function: Sudoku::headline_bits(int&, int&, int&)
void headline_bits(int &h1, int &h2, int &h3) {
    mbit v = 0;
    for (int i = 0; i < 9; i++) {
      v |= bdata[i];
    }
    h1 = 0;
    h2 = 0;
    h3 = 0;
    for (int i = 0; i < 3; i++) {
      if (v & (mbit(1) << (80 - i))) h1 += (1 << (2 - i));
      if (v & (mbit(1) << (77 - i))) h2 += (1 << (2 - i));
      if (v & (mbit(1) << (74 - i))) h3 += (1 << (2 - i));
    }
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r15
movq %rcx, 0x10(%rsp)
movq %rdx, 0x8(%rsp)
pushq $0x60
popq %rax
xorl %r13d, %r13d
xorl %ebp, %ebp
cmpq $0xf0, %rax
je 0x3c46
orq (%rdi,%rax), %r13
orq 0x8(%rdi,%rax), %rbp
addq $0x10, %rax
jmp 0x3c2f
movq 0x8(%rsp), %rax
movq 0x10(%rsp), %rcx
andl $0x0, (%r15)
andl $0x0, (%rax)
andl $0x0, (%rcx)
pushq $0x4a
popq %rbx
pushq $0x1
popq %r12
pushq $0x1
popq %r14
cmpl $0x47, %ebx
je 0x3ce5
leal 0x6(%rbx), %eax
movq %r12, %rdi
xorl %esi, %esi
movzbl %al, %edx
callq 0x21a0
andq %rbp, %rdx
andq %r13, %rax
orq %rdx, %rax
je 0x3c90
leal -0x48(%rbx), %eax
shlxl %eax, %r14d, %eax
addl %eax, (%r15)
leal 0x3(%rbx), %eax
movq %r12, %rdi
xorl %esi, %esi
movzbl %al, %edx
callq 0x21a0
andq %rbp, %rdx
andq %r13, %rax
orq %rdx, %rax
je 0x3cba
movq 0x8(%rsp), %rcx
leal -0x48(%rbx), %eax
shlxl %eax, %r14d, %eax
addl %eax, (%rcx)
movzbl %bl, %edx
movq %r12, %rdi
xorl %esi, %esi
callq 0x21a0
andq %rbp, %rdx
andq %r13, %rax
orq %rdx, %rax
je 0x3ce1
movq 0x10(%rsp), %rcx
leal -0x48(%rbx), %eax
shlxl %eax, %r14d, %eax
addl %eax, (%rcx)
decl %ebx
jmp 0x3c65
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/kaityo256[P]minlex/minlex.cpp
// Function: Sudoku::renumbering()
Sudoku renumbering(void) {
    mbit bdata2[9];
    for (int i = 0; i < 9; i++) {
      bdata2[i] = bdata[i];
    }
    // std::sort(&bdata2[0], &bdata2[9], std::greater<mbit>());
    mysort(bdata2);
    return Sudoku(bdata2);
  }

// Assembly:
pushq %r14
pushq %rbx
subq $0x98, %rsp
movq %rdi, %rbx
xorl %eax, %eax
cmpq $0x90, %rax
je 0x3f6a
vmovaps 0x60(%rsi,%rax), %xmm0
vmovaps %xmm0, (%rsp,%rax)
addq $0x10, %rax
jmp 0x3f51
movq %rsp, %r14
movq %r14, %rdi
callq 0x233c
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2ec8
movq %rbx, %rax
addq $0x98, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/kaityo256[P]minlex/minlex.cpp
// Function: Sudoku::head()
Sudoku head(void) {
    mbit bdata2[9];
    mbit mask = ((mbit(1) << 27) - 1) << 54;
    for (int i = 0; i < 9; i++) {
      bdata2[i] = bdata[i] & mask;
    }
    return Sudoku(bdata2);
  }

// Assembly:
pushq %rbx
subq $0x90, %rsp
movabsq $-0x40000000000000, %rcx # imm = 0xFFC0000000000000
movq %rdi, %rbx
xorl %eax, %eax
cmpq $0x90, %rax
je 0x3fcf
movq 0x68(%rsi,%rax), %rdx
movq 0x60(%rsi,%rax), %rdi
andq %rcx, %rdi
andl $0x1ffff, %edx          # imm = 0x1FFFF
movq %rdi, (%rsp,%rax)
movq %rdx, 0x8(%rsp,%rax)
addq $0x10, %rax
jmp 0x3fa5
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x2ec8
movq %rbx, %rax
addq $0x90, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/kaityo256[P]minlex/minlex.cpp
// Function: Sudoku::operator<(Sudoku const&) const
bool operator<(const Sudoku &rhs) const {
    mbit vmax = 0;
    bool less = false;
    for (int i = 0; i < 9; i++) {
      mbit v = bdata[i] ^ rhs.bdata[i];
      v = left_most_bit(v);
      if (v >= vmax) {
        vmax = v;
        less = (bdata[i] < rhs.bdata[i]);
      }
    }
    return less;
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, 0x10(%rsp)
movq %rdi, 0x8(%rsp)
pushq $0x60
popq %r12
xorl %esi, %esi
xorl %edi, %edi
xorl %ebp, %ebp
cmpq $0xf0, %r12
je 0x4085
movq 0x8(%rsp), %rax
movq 0x10(%rsp), %rcx
movq %rdi, 0x18(%rsp)
movq %rsi, 0x20(%rsp)
movq (%rcx,%r12), %rbx
movq 0x8(%rcx,%r12), %r13
movq (%rax,%r12), %r14
movq 0x8(%rax,%r12), %r15
movq %rbx, %rdi
movq %r13, %rsi
xorq %r14, %rdi
xorq %r15, %rsi
callq 0x23b1
movq 0x18(%rsp), %rdi
cmpq %rbx, %r14
movq %rdx, %rsi
sbbq %r13, %r15
setb %cl
movzbl %cl, %ecx
cmpq %rdi, %rax
sbbq %rbp, %rsi
movq 0x20(%rsp), %rsi
movzbl %sil, %esi
cmovael %ecx, %esi
cmpq %rax, %rdi
movq %rbp, %rcx
sbbq %rdx, %rcx
cmovbq %rdx, %rbp
cmovbq %rax, %rdi
addq $0x10, %r12
jmp 0x4008
andb $0x1, %sil
movl %esi, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/kaityo256[P]minlex/minlex.cpp
// Function: MinlexSearcher::perm_restrbox(Sudoku&)
void perm_restrbox(Sudoku &g) {
    for (auto ai : perm3) {
      Sudoku g1 = g.perm_restrbox2(ai, 0);
      for (auto aj : perm3) {
        Sudoku g2 = g1.perm_restrbox2(aj, 1).renumbering();
        // Sudoku g2 = g.perm_restrbox(ai,aj).renumbering();
        if (g2 < min) {
          min = g2;
        }
      }
    }
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2e8, %rsp            # imm = 0x2E8
leaq 0x1f0(%rsp), %r15
leaq 0x100(%rsp), %r12
movq %rsi, (%rsp)
movq %rdi, %r14
xorl %eax, %eax
pushq $0x1
popq %rbp
leaq 0x10(%rsp), %r13
cmpq $0x48, %rax
je 0x4196
movq (%rsp), %rsi
leaq 0x405f(%rip), %rcx      # 0x8140
movq %rax, 0x8(%rsp)
movq %r15, %rdi
leaq (%rcx,%rax), %rdx
xorl %ecx, %ecx
vzeroupper
callq 0x41ac
xorl %ebx, %ebx
cmpq $0x48, %rbx
je 0x4188
leaq 0x4036(%rip), %rax      # 0x8140
movq %r12, %rdi
movq %r15, %rsi
movl %ebp, %ecx
leaq (%rax,%rbx), %rdx
vzeroupper
callq 0x41ac
movq %r13, %rdi
movq %r12, %rsi
callq 0x3f42
movq %r13, %rdi
movq %r14, %rsi
callq 0x3fe6
testb %al, %al
je 0x417f
vmovups 0x10(%rsp), %zmm0
vmovups 0x50(%rsp), %zmm1
vmovups 0x90(%rsp), %zmm2
vmovups 0xc0(%rsp), %zmm3
vmovups %zmm3, 0xb0(%r14)
vmovups %zmm2, 0x80(%r14)
vmovups %zmm1, 0x40(%r14)
vmovups %zmm0, (%r14)
addq $0xc, %rbx
jmp 0x40f9
movq 0x8(%rsp), %rax
addq $0xc, %rax
jmp 0x40cc
addq $0x2e8, %rsp            # imm = 0x2E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
vzeroupper
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/hunterlxt[P]swim-membership-protocol/MP1Node.cpp
// Function: MP1Node::MP1Node(Member*, Params*, EmulNet*, Log*, Address*)
MP1Node::MP1Node(Member *member, Params *params, EmulNet *emul, Log *log,
                 Address *address) {
    for (int i = 0; i < 6; i++) {
        NULLADDR[i] = 0;
    }
    this->memberNode = member;
    this->emulNet = emul;
    this->log = log;
    this->par = params;
    this->memberNode->addr = *address;
    this->posInMemberList = 0;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x8769(%rip), %rax      # 0xaca0
movq %rax, (%rdi)
pushq $-0x6
popq %rax
testq %rax, %rax
je 0x254c
movb $0x0, 0x3e(%rbx,%rax)
incq %rax
jmp 0x253d
movq %rsi, 0x20(%rbx)
movq %rcx, 0x8(%rbx)
movq %r8, 0x10(%rbx)
movq %rdx, 0x18(%rbx)
addq $0x8, %rsi
movq %rsi, %rdi
movq %r9, %rsi
callq 0x5212
andq $0x0, 0x30(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/hunterlxt[P]swim-membership-protocol/MP1Node.cpp
// Function: MP1Node::recvLoop()
int MP1Node::recvLoop() {
    if (memberNode->bFailed) {
        return false;
    } else {
        return emulNet->ENrecv(&(memberNode->addr), enqueueWrapper, NULL, 1,
                               &(memberNode->mp1q));
    }
}

// Assembly:
movq 0x20(%rdi), %r9
cmpb $0x0, 0x10(%r9)
je 0x258a
xorl %eax, %eax
retq
movq 0x8(%rdi), %rdi
leaq 0x8(%r9), %rsi
addq $0x48, %r9
leaq 0xb(%rip), %rdx         # 0x25a8
pushq $0x1
popq %r8
xorl %ecx, %ecx
jmp 0x3e1c
// File: /workspace/github_cpp_makefile_star2_O2/hunterlxt[P]swim-membership-protocol/MP1Node.cpp
// Function: MP1Node::initThisNode(Address*)
int MP1Node::initThisNode(Address *joinaddr) {
    memberNode->bFailed = false;
    memberNode->inited = true;
    memberNode->inGroup = false;
    // node is up!
    memberNode->pingCounter = TFAIL;
    memberNode->timeOutCounter = TREMOVE;
    initMemberListTable(memberNode);
    return 0;
}

// Assembly:
movq 0x20(%rdi), %rax
movb $0x0, 0x10(%rax)
movw $0x1, 0xe(%rax)
movabsq $0x1400000004, %rcx     # imm = 0x1400000004
movq %rcx, 0x20(%rax)
movq 0x28(%rax), %rcx
cmpq %rcx, 0x30(%rax)
je 0x2630
movq %rcx, 0x30(%rax)
xorl %eax, %eax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/hunterlxt[P]swim-membership-protocol/MP1Node.cpp
// Function: MP1Node::introduceSelfToGroup(Address*)
int MP1Node::introduceSelfToGroup(Address *joinaddr) {
    if (0 == memcmp((char *)&(memberNode->addr.addr), (char *)&(joinaddr->addr),
                    sizeof(memberNode->addr.addr))) {
        // I am the group booter (first process to join the group). Boot up the
        // group

#ifdef DEBUGLOG
        log->LOG(&memberNode->addr, "Starting up group...");
#endif
        memberNode->inGroup = true;
    } else {
        // create JOINREQ message: format of data is {struct Address myaddr}
        MessageHdr *msg;
        size_t msgsize = sizeof(MessageHdr);
        msg = new MessageHdr;
        msg->msgType = JOINREQ;
        msg->srcAddr = memberNode->addr;

#ifdef DEBUGLOG
        log->LOG(&memberNode->addr, "Trying to join...");
#endif

        // send JOINREQ message to introducer member
        emulNet->ENsend(&memberNode->addr, joinaddr, (char *)msg, msgsize);

        free(msg);
    }

    return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x20(%rdi), %r12
addq $0x8, %r12
pushq $0x6
popq %rdx
movq %r12, %rdi
callq 0x21a0
testl %eax, %eax
je 0x26be
pushq $0x30
popq %rdi
callq 0x2180
movq %rax, %r15
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rax)
andq $0x0, 0x18(%rax)
andl $0x0, (%rax)
leaq 0x20(%rax), %rdi
movq %r12, %rsi
callq 0x5212
movq 0x10(%rbx), %rdi
movq 0x20(%rbx), %rsi
addq $0x8, %rsi
leaq 0x49c3(%rip), %rdx      # 0x7055
xorl %eax, %eax
callq 0x4cd2
movq 0x8(%rbx), %rdi
movq 0x20(%rbx), %rsi
addq $0x8, %rsi
pushq $0x30
popq %r8
movq %r14, %rdx
movq %r15, %rcx
callq 0x3c2a
movq %r15, %rdi
callq 0x21e0
jmp 0x26db
movq 0x10(%rbx), %rdi
leaq 0x4977(%rip), %rdx      # 0x7040
movq %r12, %rsi
xorl %eax, %eax
callq 0x4cd2
movq 0x20(%rbx), %rax
movb $0x1, 0xf(%rax)
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/hunterlxt[P]swim-membership-protocol/MP1Node.cpp
// Function: MP1Node::checkMessages()
void MP1Node::checkMessages() {
    void *ptr;
    int size;

    // Pop waiting messages from memberNode's mp1q
    while (!memberNode->mp1q.empty()) {
        ptr = memberNode->mp1q.front().elt;
        size = memberNode->mp1q.front().size;
        memberNode->mp1q.pop();
        recvCallBack((Member *)memberNode, (MessageHdr *)ptr, size);
    }
    return;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x20(%rbx), %rdi
movq 0x58(%rdi), %rax
cmpq %rax, 0x78(%rdi)
je 0x2761
addq $0x48, %rdi
movq (%rax), %r14
movl 0x8(%rax), %ebp
callq 0x35f2
movq %rbx, %rdi
movq %r14, %rdx
movl %ebp, %ecx
callq 0x2830
jmp 0x2735
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/hunterlxt[P]swim-membership-protocol/MP1Node.cpp
// Function: MP1Node::nodeLoopOps()
void MP1Node::nodeLoopOps() {
    if (memberNode->memberList.empty()) {
        return;
    }

    if (memberNode->timeOutCounter == 0) {
        memberNode->timeOutCounter = TREMOVE;

        if (!finishedPING) {
            // remove the failed node and send out information
            if (!deleteNode(&pingTarget)) {
                exit(1);
            }
            if (!sendFailedNode()) {
                exit(1);
            }
        }
    }

    if (posInMemberList == memberNode->memberList.size()) {
        // random time seed to boost performance
        srand(time(NULL));
        random_shuffle(memberNode->memberList.begin(),
                       memberNode->memberList.end());
        posInMemberList = 0;
    }

    if (memberNode->timeOutCounter == TREMOVE) {
        if (!startPing()) {
            exit(1);
        }
    }

    if (memberNode->timeOutCounter < TREMOVE && !finishedPING &&
        memberNode->pingCounter == 0) {
        if (!startPingREQ()) {
            exit(1);
        }
    }

    memberNode->pingCounter--;
    memberNode->timeOutCounter--;
    return;
}

// Assembly:
movq 0x20(%rdi), %rcx
movq 0x28(%rcx), %rdx
movq 0x30(%rcx), %rax
cmpq %rax, %rdx
je 0x282e
pushq %rbx
movq %rdi, %rbx
cmpl $0x0, 0x24(%rcx)
jne 0x27b2
movl $0x14, 0x24(%rcx)
cmpb $0x0, 0x28(%rbx)
jne 0x27b2
leaq 0x29(%rbx), %rsi
movq %rbx, %rdi
callq 0x2e8c
movq %rbx, %rdi
callq 0x2f12
movq 0x20(%rbx), %rcx
movq 0x28(%rcx), %rdx
movq 0x30(%rcx), %rax
subq %rdx, %rax
movq 0x30(%rbx), %rsi
pushq $0x18
popq %rdi
cqto
idivq %rdi
cmpq %rax, %rsi
jne 0x27ee
xorl %edi, %edi
callq 0x2130
movl %eax, %edi
callq 0x2150
movq 0x20(%rbx), %rax
movq 0x28(%rax), %rdi
movq 0x30(%rax), %rsi
callq 0x3291
andq $0x0, 0x30(%rbx)
movq 0x20(%rbx), %rcx
movl 0x24(%rcx), %eax
cmpl $0x14, %eax
jne 0x2805
movq %rbx, %rdi
callq 0x2fe8
movq 0x20(%rbx), %rcx
movl 0x24(%rcx), %eax
cmpl $0x13, %eax
jg 0x2825
cmpb $0x0, 0x28(%rbx)
jne 0x2825
cmpl $0x0, 0x20(%rcx)
jne 0x2825
movq %rbx, %rdi
callq 0x30ae
movq 0x20(%rbx), %rcx
movl 0x24(%rcx), %eax
decl 0x20(%rcx)
decl %eax
movl %eax, 0x24(%rcx)
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/hunterlxt[P]swim-membership-protocol/MP1Node.cpp
// Function: MP1Node::recvCallBack(Member*, MessageHdr*, int)
bool MP1Node::recvCallBack(Member *memberNode, MessageHdr *msg, int size) {
    switch (msg->msgType) {
        case JOINREQ:
            return handleJoinReq(msg, size);
        case JOINREP:
            return handleJoinReply(msg, size);
        case PING:
            return handlePing(msg, size);
        case ACK:
            return handleAck(msg, size);
        case PINGREQ:
            return handlePingReq(msg, size);
        case DELETE:
            return handleDelete(msg, size);
        default:
            break;
    }
    return false;
}

// Assembly:
movl (%rdx), %eax
cmpq $0x5, %rax
ja 0x2880
leaq 0x47c5(%rip), %rsi      # 0x7004
movslq (%rsi,%rax,4), %rax
addq %rsi, %rax
jmpq *%rax
movq %rdx, %rsi
jmp 0x2884
movq %rdx, %rsi
movl %ecx, %edx
jmp 0x2d60
movq %rdx, %rsi
jmp 0x2e2c
movq %rdx, %rsi
movl %ecx, %edx
jmp 0x2bc4
movq %rdx, %rsi
movl %ecx, %edx
jmp 0x29b2
movq %rdx, %rsi
movl %ecx, %edx
jmp 0x2c90
xorl %eax, %eax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/hunterlxt[P]swim-membership-protocol/MP1Node.cpp
// Function: MP1Node::handleJoinReq(MessageHdr*, int)
bool MP1Node::handleJoinReq(MessageHdr *msg, int size) {
    if (isNullAddress(&msg->srcAddr)) {
        return false;
    }

    // check if the requested node be in memberlist
    bool existed = false;
    for (auto entry : memberNode->memberList) {
        if (entry.getid() == msg->srcAddr.addr[0]) {
            existed = true;
            break;
        }
    }

    // add the node into the memberlist
    if (!existed) {
        MemberListEntry entry = MemberListEntry((int)msg->srcAddr.addr[0],
                                                (short)msg->srcAddr.addr[4]);
        memberNode->memberList.push_back(entry);
    }

#ifdef DEBUGLOG
    log->logNodeAdd(&memberNode->addr, &msg->srcAddr);
#endif

    // send a JOINREP message to the requested node
    size_t msgSize = sizeof(MessageHdr);
    Address dstAddr = msg->srcAddr;
    msg = new MessageHdr;
    msg->msgType = JOINREP;
    msg->srcAddr = memberNode->addr;
    msg->memberList = memberNode->memberList;
    emulNet->ENsend(&memberNode->addr, &dstAddr, (char *)msg, msgSize);

    free(msg);
    return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r12
movq %rdi, %r14
leaq 0x20(%rsi), %r15
movq %r15, %rsi
callq 0x2e6e
testl %eax, %eax
jne 0x299d
movl %eax, 0xc(%rsp)
movq 0x20(%r14), %rax
movq 0x28(%rax), %r13
movq 0x30(%rax), %rbx
leaq 0x10(%rsp), %rbp
cmpq %rbx, %r13
je 0x28e7
movq %rbp, %rdi
movq %r13, %rsi
callq 0x524a
movq %rbp, %rdi
callq 0x5280
movsbl (%r15), %ecx
addq $0x18, %r13
cmpl %ecx, %eax
jne 0x28c1
jmp 0x2910
movsbl 0x20(%r12), %esi
movsbl 0x24(%r12), %edx
leaq 0x10(%rsp), %r12
movq %r12, %rdi
callq 0x5242
movq 0x20(%r14), %rdi
addq $0x28, %rdi
movq %r12, %rsi
callq 0x319a
movq 0x10(%r14), %rdi
movq 0x20(%r14), %rsi
addq $0x8, %rsi
movq %r15, %rdx
callq 0x4f76
leaq 0x10(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x5204
pushq $0x30
popq %rdi
callq 0x2180
movq %rax, %r15
leaq 0x8(%rax), %r13
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rax)
andq $0x0, 0x18(%rax)
movl $0x1, (%rax)
movq 0x20(%r14), %rsi
addq $0x8, %rsi
leaq 0x20(%rax), %rdi
callq 0x5212
movq 0x20(%r14), %rsi
addq $0x28, %rsi
movq %r13, %rdi
callq 0x31c6
movq 0x8(%r14), %rdi
movq 0x20(%r14), %rsi
addq $0x8, %rsi
pushq $0x30
popq %r8
movq %r12, %rdx
movq %r15, %rcx
callq 0x3c2a
movq %r15, %rdi
callq 0x21e0
movl 0xc(%rsp), %eax
testl %eax, %eax
sete %al
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/hunterlxt[P]swim-membership-protocol/MP1Node.cpp
// Function: MP1Node::handlePing(MessageHdr*, int)
bool MP1Node::handlePing(MessageHdr *msg, int size) {
    if (isNullAddress(&msg->srcAddr) && isNullAddress(&msg->endAddr)) {
        return false;
    }

    Address end = msg->endAddr;
    Address dstAddr = msg->srcAddr;

    // create and send the ACK message
    msg = new MessageHdr;
    msg->msgType = ACK;
    msg->srcAddr = memberNode->addr;
    msg->endAddr = end;
    emulNet->ENsend(&memberNode->addr, &dstAddr, (char *)msg, size);

    free(msg);
    return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %edx, %ebx
movq %rsi, %r15
movq %rdi, %r14
leaq 0x20(%rsi), %r13
movq %r13, %rsi
callq 0x2e6e
testl %eax, %eax
je 0x2c00
leaq 0x26(%r15), %rsi
movq %r14, %rdi
callq 0x2e6e
testl %eax, %eax
je 0x2c00
xorl %eax, %eax
jmp 0x2c82
addq $0x26, %r15
leaq 0xa(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x5204
leaq 0x4(%rsp), %r15
movq %r15, %rdi
movq %r13, %rsi
callq 0x5204
pushq $0x30
popq %rdi
callq 0x2180
movq %rax, %r13
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rax)
andq $0x0, 0x18(%rax)
movl $0x5, (%rax)
movq 0x20(%r14), %rsi
addq $0x8, %rsi
leaq 0x20(%rax), %rdi
callq 0x5212
leaq 0x26(%r13), %rdi
movq %r12, %rsi
callq 0x5212
movq 0x8(%r14), %rdi
movq 0x20(%r14), %rsi
addq $0x8, %rsi
movq %r15, %rdx
movq %r13, %rcx
movl %ebx, %r8d
callq 0x3c2a
movq %r13, %rdi
callq 0x21e0
movb $0x1, %al
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/hunterlxt[P]swim-membership-protocol/MP1Node.cpp
// Function: MP1Node::handleAck(MessageHdr*, int)
bool MP1Node::handleAck(MessageHdr *msg, int size) {
    if (isNullAddress(&msg->srcAddr) && isNullAddress(&msg->endAddr)) {
        return false;
    }

    if (0 == memcmp((char *)&(memberNode->addr.addr),
                    (char *)&(msg->endAddr.addr),
                    sizeof(memberNode->addr.addr))) {
        finishedPING = true;
    } else {
        // forward the message to the destination node
        Address end = msg->endAddr;
        msg = new MessageHdr;
        msg->msgType = ACK;
        msg->srcAddr = memberNode->addr;
        msg->endAddr = end;
        emulNet->ENsend(&memberNode->addr, &end, (char *)msg, size);
        free(msg);
    }
    return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r15
movq %rdi, %r14
addq $0x20, %rsi
callq 0x2e6e
testl %eax, %eax
je 0x2cc4
leaq 0x26(%r15), %rsi
movq %r14, %rdi
callq 0x2e6e
testl %eax, %eax
je 0x2cc4
xorl %eax, %eax
jmp 0x2d54
movq 0x20(%r14), %rdi
addq $0x8, %rdi
addq $0x26, %r15
pushq $0x6
popq %rdx
movq %r15, %rsi
callq 0x21a0
testl %eax, %eax
je 0x2d4d
leaq 0x2(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x5204
pushq $0x30
popq %rdi
callq 0x2180
movq %rax, %r15
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rax)
andq $0x0, 0x18(%rax)
movl $0x5, (%rax)
movq 0x20(%r14), %rsi
addq $0x8, %rsi
leaq 0x20(%rax), %rdi
callq 0x5212
leaq 0x26(%r15), %rdi
movq %r12, %rsi
callq 0x5212
movq 0x8(%r14), %rdi
movq 0x20(%r14), %rsi
addq $0x8, %rsi
movq %r12, %rdx
movq %r15, %rcx
movl %ebx, %r8d
callq 0x3c2a
movq %r15, %rdi
callq 0x21e0
jmp 0x2d52
movb $0x1, 0x28(%r14)
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/hunterlxt[P]swim-membership-protocol/MP1Node.cpp
// Function: MP1Node::handlePingReq(MessageHdr*, int)
bool MP1Node::handlePingReq(MessageHdr *msg, int size) {
    if (isNullAddress(&msg->srcAddr) && isNullAddress(&msg->endAddr)) {
        return false;
    }

    Address end = msg->srcAddr;
    Address dstAddr = msg->endAddr;

    // create and send the PING message
    msg = new MessageHdr;
    msg->msgType = PING;
    msg->srcAddr = memberNode->addr;
    msg->endAddr = end;
    emulNet->ENsend(&memberNode->addr, &dstAddr, (char *)msg, size);

    free(msg);
    return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %edx, %ebx
movq %rsi, %r13
movq %rdi, %r14
leaq 0x20(%rsi), %r15
movq %r15, %rsi
callq 0x2e6e
testl %eax, %eax
je 0x2d9c
leaq 0x26(%r13), %rsi
movq %r14, %rdi
callq 0x2e6e
testl %eax, %eax
je 0x2d9c
xorl %eax, %eax
jmp 0x2e1e
leaq 0xa(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x5204
addq $0x26, %r13
leaq 0x4(%rsp), %r15
movq %r15, %rdi
movq %r13, %rsi
callq 0x5204
pushq $0x30
popq %rdi
callq 0x2180
movq %rax, %r13
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rax)
andq $0x0, 0x18(%rax)
movl $0x3, (%rax)
movq 0x20(%r14), %rsi
addq $0x8, %rsi
leaq 0x20(%rax), %rdi
callq 0x5212
leaq 0x26(%r13), %rdi
movq %r12, %rsi
callq 0x5212
movq 0x8(%r14), %rdi
movq 0x20(%r14), %rsi
addq $0x8, %rsi
movq %r15, %rdx
movq %r13, %rcx
movl %ebx, %r8d
callq 0x3c2a
movq %r13, %rdi
callq 0x21e0
movb $0x1, %al
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/hunterlxt[P]swim-membership-protocol/MP1Node.cpp
// Function: MP1Node::handleDelete(MessageHdr*, int)
bool MP1Node::handleDelete(MessageHdr *msg, int size) {
    if (isNullAddress(&msg->endAddr)) {
        return false;
    }

    Address *deleteNodeAddr = &msg->endAddr;
    deleteNode(deleteNodeAddr);

    free(msg);
    return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r15
leaq 0x26(%rsi), %r14
movq %r14, %rsi
callq 0x2e6e
movl %eax, %ebp
testl %eax, %eax
jne 0x2e5e
movq %r15, %rdi
movq %r14, %rsi
callq 0x2e8c
movq %rbx, %rdi
callq 0x21e0
testl %ebp, %ebp
sete %al
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/hunterlxt[P]swim-membership-protocol/MP1Node.cpp
// Function: MP1Node::deleteNode(Address*)
bool MP1Node::deleteNode(Address *deleteNodeAddr) {
    for (size_t i = 0; i < memberNode->memberList.size(); i++) {
        if ((int)deleteNodeAddr->addr[0] == memberNode->memberList[i].getid()) {
            memberNode->memberList.erase(memberNode->memberList.begin() + i);
            log->logNodeRemove(&memberNode->addr, deleteNodeAddr);
            break;
        }
    }
    return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
xorl %r15d, %r15d
pushq $0x18
popq %r12
xorl %r13d, %r13d
movq 0x20(%r14), %rax
movq 0x28(%rax), %rdi
movq 0x30(%rax), %rax
subq %rdi, %rax
cqto
idivq %r12
cmpq %rax, %r13
jae 0x2f00
movsbl (%rbx), %ebp
addq %r15, %rdi
callq 0x5280
cmpl %ebp, %eax
je 0x2ed8
incq %r13
addq $0x18, %r15
jmp 0x2ea7
movq 0x20(%r14), %rdi
addq 0x28(%rdi), %r15
addq $0x28, %rdi
movq %r15, %rsi
callq 0x328c
movq 0x10(%r14), %rdi
movq 0x20(%r14), %rsi
addq $0x8, %rsi
movq %rbx, %rdx
callq 0x4ff2
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop